aboutsummaryrefslogtreecommitdiffstats
path: root/mayor-orig/www/skin/classic
diff options
context:
space:
mode:
authorM.Gergo2018-07-06 11:14:41 +0200
committerM.Gergo2018-07-06 11:14:41 +0200
commit43de9af71f7f4ca5731b94a06d688ae8412ba427 (patch)
tree54835de1dfcda504c02da261f0dc26885aed2e89 /mayor-orig/www/skin/classic
parent50310b0e4513ee3fcce67351ae61e8fff851130e (diff)
downloadmayor-43de9af71f7f4ca5731b94a06d688ae8412ba427.tar.gz
mayor-43de9af71f7f4ca5731b94a06d688ae8412ba427.zip
2018/Feb/28 -i állapot hozzáadva, mint a módosítások kiindulási állapota
Diffstat (limited to 'mayor-orig/www/skin/classic')
-rw-r--r--mayor-orig/www/skin/classic/base/css/base.css752
-rw-r--r--mayor-orig/www/skin/classic/base/html/alert.phtml85
-rw-r--r--mayor-orig/www/skin/classic/base/html/base.phtml618
-rw-r--r--mayor-orig/www/skin/classic/base/img/ajaxLoad.gifbin0 -> 847 bytes
-rw-r--r--mayor-orig/www/skin/classic/base/img/alert.pngbin0 -> 3425 bytes
-rw-r--r--mayor-orig/www/skin/classic/base/img/favicon.icobin0 -> 318 bytes
-rw-r--r--mayor-orig/www/skin/classic/base/img/flags/de_DE.gifbin0 -> 124 bytes
-rw-r--r--mayor-orig/www/skin/classic/base/img/flags/en_US.gifbin0 -> 170 bytes
-rw-r--r--mayor-orig/www/skin/classic/base/img/flags/hu_HU.gifbin0 -> 106 bytes
-rw-r--r--mayor-orig/www/skin/classic/base/img/flags/jp_JP.gifbin0 -> 573 bytes
-rw-r--r--mayor-orig/www/skin/classic/base/img/gradient.jpgbin0 -> 1419 bytes
-rw-r--r--mayor-orig/www/skin/classic/base/img/gradient.pngbin0 -> 515 bytes
-rw-r--r--mayor-orig/www/skin/classic/base/img/mayor_small_ssl-flip.pngbin0 -> 4536 bytes
-rw-r--r--mayor-orig/www/skin/classic/base/img/mayor_small_ssl-marc15.pngbin0 -> 5324 bytes
-rw-r--r--mayor-orig/www/skin/classic/base/img/mayor_small_ssl-santa.pngbin0 -> 4765 bytes
-rw-r--r--mayor-orig/www/skin/classic/base/img/mayor_small_ssl.gifbin0 -> 1703 bytes
-rw-r--r--mayor-orig/www/skin/classic/base/img/mayor_small_ssl.jpgbin0 -> 1084 bytes
-rw-r--r--mayor-orig/www/skin/classic/base/img/mayor_small_ssl.pngbin0 -> 6178 bytes
-rw-r--r--mayor-orig/www/skin/classic/base/img/policy/parent.gifbin0 -> 977 bytes
-rw-r--r--mayor-orig/www/skin/classic/base/img/policy/parent100.gifbin0 -> 4235 bytes
-rw-r--r--mayor-orig/www/skin/classic/base/img/policy/parent100.pngbin0 -> 4182 bytes
-rw-r--r--mayor-orig/www/skin/classic/base/img/policy/private.gifbin0 -> 923 bytes
-rw-r--r--mayor-orig/www/skin/classic/base/img/policy/private100.gifbin0 -> 1807 bytes
-rw-r--r--mayor-orig/www/skin/classic/base/img/policy/private100.pngbin0 -> 13017 bytes
-rw-r--r--mayor-orig/www/skin/classic/base/img/policy/public.gifbin0 -> 269 bytes
-rw-r--r--mayor-orig/www/skin/classic/base/img/policy/public100.gifbin0 -> 6321 bytes
-rw-r--r--mayor-orig/www/skin/classic/base/img/policy/public100.pngbin0 -> 6305 bytes
-rw-r--r--mayor-orig/www/skin/classic/base/javascript/base.jquery.min.js977
-rw-r--r--mayor-orig/www/skin/classic/base/javascript/jquery-1.8.3.min.js2
-rw-r--r--mayor-orig/www/skin/classic/base/javascript/jquery.min.js5
-rw-r--r--mayor-orig/www/skin/classic/base/javascript/noiframe.js1
-rw-r--r--mayor-orig/www/skin/classic/module-auth/css/forgotten.css66
-rw-r--r--mayor-orig/www/skin/classic/module-auth/css/login.css108
-rw-r--r--mayor-orig/www/skin/classic/module-auth/html/forgotten.phtml103
-rw-r--r--mayor-orig/www/skin/classic/module-auth/html/login.phtml77
-rw-r--r--mayor-orig/www/skin/classic/module-auth/img/login.gifbin0 -> 1807 bytes
-rw-r--r--mayor-orig/www/skin/classic/module-auth/javascript/forgotten.jquery.min.js19
-rw-r--r--mayor-orig/www/skin/classic/module-auth/javascript/login.jquery.min.js24
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/admin/azonositok.css10
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/admin/csoportok.css9
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/admin/import.css8
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/admin/intezmenyek.css26
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/admin/rpcPrivilege.css12
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/admin/szemeszterek.css6
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/admin/szuloiAzonositok.css12
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/admin/tanevek.css17
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/admin/tankorok.css8
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/bejegyzesek/bejegyzesTipus.css19
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/bejegyzesek/bejegyzesek.css34
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/bejegyzesek/ujBejegyzes.css10
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/diakValaszto.css4
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/ertekeles/ertekeles.css41
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/ertekeles/kerdoivBetoltes.css11
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/esemeny/esemenyDiak.css34
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/esemeny/jelentkezes.css27
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/esemeny/ujEsemeny.css43
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/export/bizonyitvany.css19
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/export/diakExport.css19
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/export/kreta.css23
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/export/sulix.css9
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/export/tantargyFelosztas.css20
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/haladasi/elmaradas.css12
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/haladasi/elszamolas.css32
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/haladasi/haladasi.css297
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/haladasi/helyettesites.css162
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/haladasi/hetes.css8
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/haladasi/minuszora.css28
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/haladasi/oralatogatas.css12
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/haladasi/osszevonas.css27
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/haladasi/pluszora.css30
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/haladasi/specialis.css36
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/haladasi/stat.css12
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/haladasi/teremModositas.css17
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/hianyzas/diak.css128
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/hianyzas/diakIgazolatlan.css12
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/hianyzas/diakLista.css50
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/hianyzas/info.css19
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/hianyzas/nap.css125
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/hianyzas/oktstat.css22
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/hianyzas/ora.css125
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/hianyzas/osztaly.css170
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/hianyzas/osztalyNap.css43
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/hibabejelento/admin.css89
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/hibabejelento/hibabejelento.css26
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/hirnok/cronFutar.css9
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/hirnok/hirnok.css108
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/intezmeny/diak.css148
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/intezmeny/diakExport.css46
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/intezmeny/diakFelmentes.css33
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/intezmeny/diakStatusz.css14
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/intezmeny/diakSzulo.css49
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/intezmeny/diakTankor.css70
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/intezmeny/diakTankorJelentkezes.css126
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/intezmeny/felmentes.css36
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/intezmeny/kepesitesek.css14
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/intezmeny/kepzes.css25
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/intezmeny/kepzesOraterv.css100
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/intezmeny/kepzesTankor.css13
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/intezmeny/munkakozosseg.css47
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/intezmeny/osztaly.css57
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/intezmeny/tanar.css60
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/intezmeny/tankor.css83
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/intezmeny/tankorDiak.css128
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/intezmeny/tankorLetszam.css7
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/intezmeny/tankorSzemeszter.css24
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/intezmeny/tankorTanar.css39
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/intezmeny/tankorTanarHozzarendeles.css94
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/intezmeny/terem.css15
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/intezmeny/tovabbkepzes.css89
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/intezmeny/valtas.css2
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/intezmeny/zaradek.css16
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/koszi/esemenyAdmin.css39
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/koszi/koszi.css39
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/koszi/kosziAdmin.css47
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/naplo.css317
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/nyomtatas/diakTankorJelentkezes.css4
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/nyomtatas/helyettesitesinaplo.css7
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/nyomtatas/osztalyozonaplo.css2
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/nyomtatas/tankorNaplohozRendeles.css9
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/orarend/ascExport.css18
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/orarend/helyettesites.css44
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/orarend/orarend.css282
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/orarend/orarendBetolto.css6
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/orarend/orarendEllenorzes.css3
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/orarend/orarendModosito.css156
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/orarend/orarendTankor.css29
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/orarend/orarendTeremModositas.css8
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/orarend/szabadTerem.css103
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/orarend/tanarOrarend.css2
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/orarend/termez.css13
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/bizelomenetel.css71
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/bizonyitvany.css115
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/diak.css58
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/dolgozat.css172
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/jegy.css39
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/stat.css339
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/szempontRendszer.css10
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/szovegesErtekeles.css10
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/tankor.css152
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/targySorrend.css10
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/vizsga.css30
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/vizsgaJelentkezes.css2
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/zaroJegyCheck.css0
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/sni/diakAllapot.css27
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/sni/fejlesztesiTerv.css21
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/sni/tantargyiFeljegyzesek.css15
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/stat/lemorzsolodas.css3
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/stat/letszam.css11
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/stat/tantargyFelosztas.css36
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/tanev/diakTanarai.css9
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/tanev/fogadoOra.css46
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/tanev/munkaterv.css149
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/tanev/tankorBlokk.css11
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/tanev/tankorCsoport.css16
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/tanev/targyBontas.css121
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/tanev/targyOraszam.css7
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/tanev/vegzosOrarendLezaras.css5
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/tanev/vegzosTankorLezaras.css5
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/tanmenet/tanmenetInfo.css11
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/tanmenet/tanmenetJovahagyas.css23
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/tanmenet/tanmenetLeadas.css11
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/tanmenet/tanmenetModositas.css54
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/tanmenet/tanmenetTankor.css76
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/tanmenet/ujTanmenet.css19
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/css/uzeno/uzeno.css139
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/admin/azonositok.phtml95
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/admin/csoportok.phtml87
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/admin/fillhaladasi.phtml12
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/admin/import.phtml5
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/admin/intezmenyek.phtml142
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/admin/rpcPrivilege.phtml72
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/admin/szemeszterek.phtml61
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/admin/szuloiAzonositok.phtml113
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/admin/tanevek.phtml165
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/admin/tankorok.phtml5
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/base.phtml1230
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/bejegyzesek/bejegyzesTipus.phtml52
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/bejegyzesek/bejegyzesek.phtml97
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/bejegyzesek/info.phtml9
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/bejegyzesek/ujBejegyzes.phtml47
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/diakValaszto.phtml22
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/ertekeles/ertekeles.phtml77
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/ertekeles/kerdoivBetoltes.phtml90
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/esemeny/esemenyDiak.phtml102
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/esemeny/jelentkezes.phtml87
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/esemeny/ujEsemeny.phtml171
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/export/bizonyitvany.phtml47
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/export/diakExport.phtml153
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/export/kreta.phtml138
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/export/sulix.phtml43
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/export/tanarOsztalyOraszam.phtml46
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/export/tantargyFelosztas.phtml41
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/haladasi/elmaradas.phtml63
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/haladasi/elszamolas.phtml284
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/haladasi/haladasi.phtml697
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/haladasi/helyettesites.phtml696
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/haladasi/hetes.phtml37
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/haladasi/minuszora.phtml55
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/haladasi/ora.phtml51
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/haladasi/oralatogatas.phtml56
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/haladasi/osszevonas.phtml51
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/haladasi/pluszora.phtml95
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/haladasi/specialis.phtml181
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/haladasi/stat.phtml76
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/haladasi/tankor.phtml54
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/haladasi/teremModositas.phtml49
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/hianyzas/diak.phtml226
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/hianyzas/diakIgazolatlan.phtml42
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/hianyzas/diakLista.phtml50
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/hianyzas/info.phtml96
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/hianyzas/nap.phtml252
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/hianyzas/oktstat.phtml133
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/hianyzas/ora.phtml279
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/hianyzas/osztaly.phtml613
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/hianyzas/osztalyNap.phtml112
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/hibabejelento/admin.phtml150
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/hibabejelento/hibabejelento.phtml32
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/hirnok/cronFutar.phtml265
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/hirnok/hirnok.phtml319
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/hirnok/hirnokFeliratkozas.phtml68
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/intezmeny/diak.phtml942
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/intezmeny/diakExport.phtml93
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/intezmeny/diakFelmentes.phtml225
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/intezmeny/diakStatusz.phtml97
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/intezmeny/diakSzulo.phtml300
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/intezmeny/diakTankor.phtml84
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/intezmeny/diakTankorJelentkezes.phtml167
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/intezmeny/felmentes.phtml261
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/intezmeny/kepesitesek.phtml121
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/intezmeny/kepzes.phtml143
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/intezmeny/kepzesOraterv.phtml271
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/intezmeny/munkakozosseg.phtml316
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/intezmeny/osztaly.phtml424
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/intezmeny/tanar.phtml411
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/intezmeny/tankor.phtml370
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/intezmeny/tankorDiak.phtml310
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/intezmeny/tankorLetszam.phtml83
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/intezmeny/tankorSzemeszter.phtml101
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/intezmeny/tankorTanar.phtml103
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/intezmeny/tankorTanarHozzarendeles.phtml147
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/intezmeny/terem.phtml93
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/intezmeny/tovabbkepzes.phtml479
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/intezmeny/valtas.phtml85
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/intezmeny/verseny.phtml41
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/intezmeny/zaradek.phtml78
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/koszi/esemenyAdmin.phtml246
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/koszi/koszi.phtml277
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/koszi/kosziAdmin.phtml331
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/naplo.phtml33
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/nyomtatas/diakTankorJelentkezes.phtml31
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/nyomtatas/helyettesitesinaplo.phtml17
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/nyomtatas/osztalyozonaplo.phtml9
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/nyomtatas/tankorNaplohozRendeles.phtml127
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/orarend/ascExport.phtml142
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/orarend/helyettesites.phtml90
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/orarend/orarend.phtml411
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/orarend/orarendBetolto.phtml60
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/orarend/orarendEllenorzes.phtml88
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/orarend/orarendLoad.phtml26
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/orarend/orarendModosito.phtml309
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/orarend/orarendTankor.phtml88
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/orarend/orarendTeremModositas.phtml107
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/orarend/szabadTerem.phtml63
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/orarend/tanarOrarend.phtml38
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/orarend/termez.phtml86
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/bizelomenetel.phtml139
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/bizonyitvany.phtml426
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/diak.phtml235
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/dolgozat.phtml304
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/jegy.phtml164
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/stat.phtml659
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/szempontRendszer.phtml75
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/szovegesErtekeles.phtml70
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/tankor.phtml550
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/targySorrend.phtml45
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/vizsga.phtml144
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/vizsgaJelentkezes.phtml16
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/zaroJegyCheck.phtml50
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/share/email.phtml42
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/share/face.phtml71
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/share/file.phtml92
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/share/hianyzas.phtml71
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/share/jegy.phtml92
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/share/orarend.phtml48
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/sni/diakAllapot.phtml165
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/sni/fejlesztesiTerv.phtml94
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/sni/tantargyiFeljegyzesek.phtml110
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/stat/lemorzsolodas.phtml59
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/stat/letszam.phtml54
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/stat/tantargyFelosztas.phtml414
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/tanev/checkStatus.phtml34
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/tanev/diakTanarai.phtml62
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/tanev/fogadoOra.phtml317
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/tanev/munkaterv.phtml370
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/tanev/tankorBlokk.phtml200
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/tanev/tankorCsoport.phtml122
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/tanev/targyBontas.phtml296
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/tanev/targyOraszam.phtml25
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/tanev/vegzosOrarendLezaras.phtml32
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/tanev/vegzosTankorLezaras.phtml36
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/tanmenet/tanmenetInfo.phtml67
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/tanmenet/tanmenetJovahagyas.phtml61
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/tanmenet/tanmenetLeadas.phtml38
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/tanmenet/tanmenetModositas.phtml136
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/tanmenet/tanmenetTankor.phtml65
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/tanmenet/ujTanmenet.phtml31
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/uzeno/postas.phtml81
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/html/uzeno/uzeno.phtml434
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/img/anim/garfield.gifbin0 -> 11847 bytes
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/img/anim/kutya.gifbin0 -> 9506 bytes
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/img/anim/majom.gifbin0 -> 16468 bytes
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/img/anim/nyuszi.gifbin0 -> 11799 bytes
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/img/anim/pingvin.gifbin0 -> 38954 bytes
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/img/anim/smiley.gifbin0 -> 4261 bytes
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/img/anim/tux-hard.gifbin0 -> 33427 bytes
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/img/cr.pngbin0 -> 272 bytes
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/img/fel.gifbin0 -> 294 bytes
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/img/flipper/adatok.gifbin0 -> 850 bytes
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/img/flipper/nevsor.gifbin0 -> 977 bytes
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/img/helyettesites/csere.gifbin0 -> 143 bytes
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/img/helyettesites/kez.gifbin0 -> 126 bytes
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/img/helyettesites/mozgat.gifbin0 -> 144 bytes
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/img/helyettesites/ora.gifbin0 -> 573 bytes
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/img/hianyzas/change.pngbin0 -> 444 bytes
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/img/hianyzas/felkjel.gifbin0 -> 59 bytes
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/img/hianyzas/green.gifbin0 -> 308 bytes
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/img/hianyzas/h.gifbin0 -> 323 bytes
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/img/hianyzas/i.gifbin0 -> 206 bytes
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/img/hianyzas/pin.gifbin0 -> 883 bytes
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/img/hianyzas/red-pin.gifbin0 -> 202 bytes
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/img/hianyzas/red.gifbin0 -> 203 bytes
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/img/hianyzas/sum.gifbin0 -> 149 bytes
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/img/hianyzas/ter-pin.gifbin0 -> 912 bytes
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/img/hianyzas/yellow-pin.gifbin0 -> 998 bytes
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/img/hianyzas/yellow.gifbin0 -> 296 bytes
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/img/hibabejelento/buggie.gifbin0 -> 718 bytes
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/img/hibabejelento/buggie.svg51
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/img/io/kreta.svg21
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/img/le.gifbin0 -> 296 bytes
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/img/print.pngbin0 -> 423 bytes
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/img/tankorok/gold_box.gifbin0 -> 68 bytes
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/img/tankorok/gray-pixel.gifbin0 -> 35 bytes
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/img/tanmenet/close.pngbin0 -> 2189 bytes
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/img/tanmenet/updown.pngbin0 -> 1551 bytes
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/img/toggle.pngbin0 -> 601 bytes
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/img/toolSubmit.gifbin0 -> 127 bytes
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/admin/regisztracio.jquery.min.js7
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/admin/regisztracio.js7
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/admin/szemeszterek.jquery.min.js43
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/ertekeles/ertekeles.js56
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/esemeny/esemenyDiak.jquery.min.js101
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/esemeny/jelentkezes.jquery.min.js7
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/esemeny/ujEsemeny.jquery.min.js89
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/export/diakExport.jquery.min.js177
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/export/diakExport.js141
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/haladasi/elszamolas.jquery.min.js42
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/haladasi/haladasi.jquery.min.js78
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/haladasi/helyettesites.jquery.min.js27
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/haladasi/pluszora.jquery.min.js42
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/hianyzas/info.jquery.min.js11
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/hianyzas/nap.jquery.min.js19
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/hianyzas/nap.js13
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/hianyzas/ora.jquery.min.js27
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/hianyzas/ora.js13
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/diak.jquery.min.js192
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/diakFelmentes.jquery.min.js9
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/diakStatusz.jquery.min.js31
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/diakSzulo.jquery.min.js18
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/diakTankorJelentkezes.jquery.min.js56
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/kepesitesek.jquery.min.js64
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/kepzesOraterv.jquery.min.js48
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/osztaly.jquery.min.js57
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/tanar.jquery.min.js41
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/tankor.jquery.min.js8
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/tankorDiak.jquery.min.js23
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/tankorTanarHozzarendeles.jquery.min.js594
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/tovabbkepzes.jquery.min.js210
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/zaradek.jquery.min.js13
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/naplo.jquery.min.js1234
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/orarend/orarend.jquery.min.js81
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/orarend/orarendModosito.jquery.min.js12
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/orarend/orarendModosito.js80
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/orarend/termez.jquery.min.js5
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/osztalyozo/diak.jquery.min.js93
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/osztalyozo/stat.jquery.min.js49
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/osztalyozo/tankor.jquery.min.js132
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/osztalyozo/targySorrend.jquery.min.js16
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/osztalyozo/vizsga.jquery.min.js50
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/stat/tantargyFelosztas.jquery.min.js15
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/tanev/targyBontas.jquery.min.js823
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/tanmenet/tanmenetJovahagyas.jquery.min.js18
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/tanmenet/tanmenetModositas.jquery.min.js126
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/tanmenet/tanmenetTankor.jquery.min.js93
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/uzeno/postas.jquery.min.js63
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/uzeno/postas.js54
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/uzeno/uzeno.jquery.min.js23
-rw-r--r--mayor-orig/www/skin/classic/module-naplo/javascript/uzeno/uzeno.js33
-rw-r--r--mayor-orig/www/skin/classic/module-password/css/password.css19
-rw-r--r--mayor-orig/www/skin/classic/module-password/html/changeMyPassword.phtml76
-rw-r--r--mayor-orig/www/skin/classic/module-password/html/changePassword.phtml89
-rw-r--r--mayor-orig/www/skin/classic/module-password/html/resetPassword.phtml79
-rw-r--r--mayor-orig/www/skin/classic/module-password/javascript/changeMyPassword.jquery.min.js27
-rw-r--r--mayor-orig/www/skin/classic/module-session/css/accountInfo.css100
-rw-r--r--mayor-orig/www/skin/classic/module-session/css/admin/knownNodes.css14
-rw-r--r--mayor-orig/www/skin/classic/module-session/css/admin/registration.css54
-rw-r--r--mayor-orig/www/skin/classic/module-session/css/createAccount.css24
-rw-r--r--mayor-orig/www/skin/classic/module-session/css/createGroup.css13
-rw-r--r--mayor-orig/www/skin/classic/module-session/css/download.css9
-rw-r--r--mayor-orig/www/skin/classic/module-session/css/facebookConnect.css25
-rw-r--r--mayor-orig/www/skin/classic/module-session/css/googleapi.css24
-rw-r--r--mayor-orig/www/skin/classic/module-session/css/groupInfo.css96
-rw-r--r--mayor-orig/www/skin/classic/module-session/css/search/searchAccount.css31
-rw-r--r--mayor-orig/www/skin/classic/module-session/css/search/searchGroup.css44
-rw-r--r--mayor-orig/www/skin/classic/module-session/css/sessionAdmin.css8
-rw-r--r--mayor-orig/www/skin/classic/module-session/html/accountInfo.phtml253
-rw-r--r--mayor-orig/www/skin/classic/module-session/html/admin/knownNodes.phtml70
-rw-r--r--mayor-orig/www/skin/classic/module-session/html/admin/registration.phtml270
-rw-r--r--mayor-orig/www/skin/classic/module-session/html/createAccount.phtml107
-rw-r--r--mayor-orig/www/skin/classic/module-session/html/createGroup.phtml90
-rw-r--r--mayor-orig/www/skin/classic/module-session/html/download.phtml32
-rw-r--r--mayor-orig/www/skin/classic/module-session/html/facebookConnect.phtml53
-rw-r--r--mayor-orig/www/skin/classic/module-session/html/googleapi.phtml45
-rw-r--r--mayor-orig/www/skin/classic/module-session/html/groupInfo.phtml5
-rw-r--r--mayor-orig/www/skin/classic/module-session/html/search/searchAccount.phtml126
-rw-r--r--mayor-orig/www/skin/classic/module-session/html/search/searchGroup.phtml103
-rw-r--r--mayor-orig/www/skin/classic/module-session/html/sessionAdmin.phtml57
-rw-r--r--mayor-orig/www/skin/classic/module-session/img/download.gifbin0 -> 1516 bytes
-rw-r--r--mayor-orig/www/skin/classic/module-session/javascript/createAccount.jquery.min.js13
-rw-r--r--mayor-orig/www/skin/classic/module-session/javascript/facebookConnect.jquery.min.js31
-rw-r--r--mayor-orig/www/skin/classic/module-session/javascript/googleapi.jquery.min.js30
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/aac.pngbin0 -> 1318 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/ai.pngbin0 -> 1063 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/aiff.pngbin0 -> 1221 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/avi.pngbin0 -> 1184 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/bmp.pngbin0 -> 1162 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/c.pngbin0 -> 592 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/css.pngbin0 -> 1198 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/dat.pngbin0 -> 782 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/dmg.pngbin0 -> 1152 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/doc.pngbin0 -> 1285 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/dotx.pngbin0 -> 1195 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/dwg.pngbin0 -> 1466 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/dxf.pngbin0 -> 1419 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/eps.pngbin0 -> 1167 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/exe.pngbin0 -> 1227 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/flv.pngbin0 -> 1208 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/gif.pngbin0 -> 1147 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/h.pngbin0 -> 550 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/hpp.pngbin0 -> 671 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/html.pngbin0 -> 1001 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/ics.pngbin0 -> 1360 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/iso.pngbin0 -> 1271 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/java.pngbin0 -> 1173 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/jpg.pngbin0 -> 1151 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/key.pngbin0 -> 1048 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/mid.pngbin0 -> 1214 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/mp3.pngbin0 -> 1291 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/mp4.pngbin0 -> 1249 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/mpg.pngbin0 -> 1254 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/odf.pngbin0 -> 924 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/odt.pngbin0 -> 1011 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/otp.pngbin0 -> 925 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/ots.pngbin0 -> 1034 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/ott.pngbin0 -> 1009 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/pdf.pngbin0 -> 1208 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/php.pngbin0 -> 1056 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/png.pngbin0 -> 1263 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/ppt.pngbin0 -> 942 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/psd.pngbin0 -> 1236 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/py.pngbin0 -> 995 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/qt.pngbin0 -> 1164 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/rar.pngbin0 -> 1161 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/rb.pngbin0 -> 1052 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/rtf.pngbin0 -> 755 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/sql.pngbin0 -> 1235 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/tga.pngbin0 -> 1192 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/tgz.pngbin0 -> 1128 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/tiff.pngbin0 -> 1107 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/txt.pngbin0 -> 747 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/wav.pngbin0 -> 1326 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/xls.pngbin0 -> 1185 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/xlsx.pngbin0 -> 1217 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/xml.pngbin0 -> 1165 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/yml.pngbin0 -> 758 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/img/filetypes/zip.pngbin0 -> 1077 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/calendar_date_select/MIT-LICENSE20
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/calendar_date_select/README10
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/calendar_date_select/blank_iframe.html2
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/calendar_date_select/images/calendar_date_select/calendar.gifbin0 -> 581 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/calendar_date_select.js430
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/format_american.js34
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/format_db.js27
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/format_euro_24hr.js7
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/format_finnish.js24
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/format_hyphen_ampm.js36
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/format_iso_date.js46
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/format_italian.js24
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/format_mayor.js42
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/locale/fi.js10
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/locale/hu.js10
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/locale/jp.js10
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/locale/pl.js10
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/calendar_date_select/stylesheets/calendar_date_select/blue.css130
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/calendar_date_select/stylesheets/calendar_date_select/default.css135
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/calendar_date_select/stylesheets/calendar_date_select/plain.css128
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/calendar_date_select/stylesheets/calendar_date_select/red.css135
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/calendar_date_select/stylesheets/calendar_date_select/silver.css133
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/ColReorder.min.js33
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/css/ColReorder.css21
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/css/jquery.dataTables.css221
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/back_disabled.pngbin0 -> 1361 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/back_enabled.pngbin0 -> 1379 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/back_enabled_hover.pngbin0 -> 1375 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/forward_disabled.pngbin0 -> 1363 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/forward_enabled.pngbin0 -> 1380 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/forward_enabled_hover.pngbin0 -> 1379 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/insert.pngbin0 -> 1885 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/sort_asc.pngbin0 -> 1118 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/sort_asc_disabled.pngbin0 -> 1050 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/sort_both.pngbin0 -> 1136 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/sort_desc.pngbin0 -> 1127 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/sort_desc_disabled.pngbin0 -> 1045 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/unchecked.gifbin0 -> 223 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/jquery.dataTables.columnFilter.js365
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/jquery.dataTables.min.js155
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/animated-overlay.gifbin0 -> 1738 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-bg_flat_0_aaaaaa_40x100.pngbin0 -> 180 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-bg_flat_75_ffffff_40x100.pngbin0 -> 178 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-bg_glass_55_fbf9ee_1x400.pngbin0 -> 120 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-bg_glass_65_ffffff_1x400.pngbin0 -> 105 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-bg_glass_75_dadada_1x400.pngbin0 -> 111 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-bg_glass_75_e6e6e6_1x400.pngbin0 -> 110 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-bg_glass_95_fef1ec_1x400.pngbin0 -> 119 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-bg_highlight-soft_75_cccccc_1x100.pngbin0 -> 101 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-icons_222222_256x240.pngbin0 -> 4369 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-icons_2e83ff_256x240.pngbin0 -> 4369 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-icons_454545_256x240.pngbin0 -> 4369 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-icons_888888_256x240.pngbin0 -> 4369 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-icons_cd0a0a_256x240.pngbin0 -> 4369 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/jquery-ui-timepicker-addon.css10
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/jquery-ui.min.css4
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/jquery-ui/i18n/jquery-ui-i18n.min.js6
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/jquery-ui/i18n/jquery-ui-timepicker-hu.js21
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/jquery-ui/i18n/jquery.ui.datepicker-hu.min.js4
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/jquery-ui/jquery-ui-timepicker-addon.js2128
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/jquery-ui/jquery-ui.min.js12
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/changelog.txt81
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/custom1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_arrow.php101
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_back.pngbin0 -> 827 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_cellid.php62
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_checkpw.php169
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_deleteimage.php43
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_download.php32
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_explorer.php301
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_flip.php52
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_fullimg.php231
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_getcustomsettings.php25
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_getsetsettings.php161
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_getuploadinfo.php76
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_js_basic.php635
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_js_changeorder.php593
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_js_delete.php425
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_js_explorer.php349
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_js_framework.php1070
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_js_managefolders.php266
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_js_settings.php530
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_js_upload.php611
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_js_view.php1789
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_koschtit.php404
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_loading.gifbin0 -> 477 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_makepic.php317
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_managefolders.php122
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_mouse_help.pngbin0 -> 1463 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_close.pngbin0 -> 478 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_download.pngbin0 -> 499 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_full.pngbin0 -> 450 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_globe.pngbin0 -> 593 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_info.pngbin0 -> 398 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_link.pngbin0 -> 524 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_next.pngbin0 -> 328 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_play.pngbin0 -> 338 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_prev.pngbin0 -> 328 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_stop.pngbin0 -> 239 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_vcomm.pngbin0 -> 377 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_next.pngbin0 -> 861 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_noimage.gifbin0 -> 43 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nojs.php447
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nojsdisplayimage.php427
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_online_docu.jpgbin0 -> 21653 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_preview.php240
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_savecomment.php65
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_saveneworder.php129
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_savesquarethumb.php101
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_shade.php41
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_upload.php243
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_vcomm.php221
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/kos-epulet_dir2
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/kos-epulet_lastmodified4
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/mayor logo_dir2
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/mayor logo_lastmodified4
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_config/ki_setup.php96
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_config/kos-epulet_ki_setup.php96
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/ki_include.php306
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/koschtit/readme.txt61
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/scriptaculous/MIT-LICENSE20
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/scriptaculous/builder.js136
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/scriptaculous/controls.js965
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/scriptaculous/dragdrop.js974
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/scriptaculous/effects.js1123
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/scriptaculous/scriptaculous.js68
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/scriptaculous/slider.js275
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/scriptaculous/sound.js59
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/scriptaculous/unittest.js568
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/langs/de.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/langs/en.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/langs/hu.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/langs/ja.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/license.txt504
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advhr/css/advhr.css5
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advhr/editor_plugin.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advhr/editor_plugin_src.js57
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advhr/js/rule.js43
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advhr/langs/de_dlg.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advhr/langs/en_dlg.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advhr/langs/hu_dlg.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advhr/langs/ja_dlg.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advhr/rule.htm58
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advimage/css/advimage.css13
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advimage/editor_plugin.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advimage/editor_plugin_src.js50
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advimage/image.htm235
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advimage/img/sample.gifbin0 -> 1624 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advimage/js/image.js464
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advimage/langs/de_dlg.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advimage/langs/en_dlg.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advimage/langs/hu_dlg.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advimage/langs/ja_dlg.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlink/css/advlink.css8
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlink/editor_plugin.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlink/editor_plugin_src.js61
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlink/js/advlink.js543
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlink/langs/de_dlg.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlink/langs/en_dlg.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlink/langs/hu_dlg.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlink/langs/ja_dlg.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlink/link.htm338
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlist/editor_plugin.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlist/editor_plugin_src.js176
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/autolink/editor_plugin.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/autolink/editor_plugin_src.js184
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/autoresize/editor_plugin.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/autoresize/editor_plugin_src.js119
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/autosave/editor_plugin.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/autosave/editor_plugin_src.js433
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/autosave/langs/en.js4
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/bbcode/editor_plugin.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/bbcode/editor_plugin_src.js120
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/contextmenu/editor_plugin.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/contextmenu/editor_plugin_src.js163
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/directionality/editor_plugin.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/directionality/editor_plugin_src.js85
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/editor_plugin.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/editor_plugin_src.js43
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/emotions.htm42
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-cool.gifbin0 -> 354 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-cry.gifbin0 -> 329 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-embarassed.gifbin0 -> 331 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gifbin0 -> 342 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-frown.gifbin0 -> 340 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-innocent.gifbin0 -> 336 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-kiss.gifbin0 -> 338 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-laughing.gifbin0 -> 343 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-money-mouth.gifbin0 -> 321 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-sealed.gifbin0 -> 323 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-smile.gifbin0 -> 344 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-surprised.gifbin0 -> 338 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-tongue-out.gifbin0 -> 328 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-undecided.gifbin0 -> 337 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-wink.gifbin0 -> 350 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-yell.gifbin0 -> 336 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/js/emotions.js43
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/langs/de_dlg.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/langs/en_dlg.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/langs/hu_dlg.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/langs/ja_dlg.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/example/dialog.htm22
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/example/editor_plugin.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/example/editor_plugin_src.js84
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/example/img/example.gifbin0 -> 87 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/example/js/dialog.js19
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/example/langs/en.js3
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/example/langs/en_dlg.js3
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/example_dependency/editor_plugin.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/example_dependency/editor_plugin_src.js50
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullpage/css/fullpage.css143
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullpage/editor_plugin.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullpage/editor_plugin_src.js405
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullpage/fullpage.htm259
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullpage/js/fullpage.js232
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullpage/langs/de_dlg.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullpage/langs/en_dlg.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullpage/langs/hu_dlg.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullpage/langs/ja_dlg.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullscreen/editor_plugin.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullscreen/editor_plugin_src.js159
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullscreen/fullscreen.htm110
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/iespell/editor_plugin.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/iespell/editor_plugin_src.js54
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/editor_plugin.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/editor_plugin_src.js699
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gifbin0 -> 810 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gifbin0 -> 272 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gifbin0 -> 1195 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gifbin0 -> 907 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gifbin0 -> 909 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gifbin0 -> 769 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gifbin0 -> 84 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css90
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/template.htm387
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/insertdatetime/editor_plugin.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/insertdatetime/editor_plugin_src.js83
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/layer/editor_plugin.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/layer/editor_plugin_src.js262
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/legacyoutput/editor_plugin.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/legacyoutput/editor_plugin_src.js139
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/lists/editor_plugin.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/lists/editor_plugin_src.js955
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/css/media.css17
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/editor_plugin.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/editor_plugin_src.js898
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/js/embed.js73
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/js/media.js503
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/langs/de_dlg.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/langs/en_dlg.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/langs/hu_dlg.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/langs/ja_dlg.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/media.htm922
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/moxieplayer.swfbin0 -> 19980 bytes
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/nonbreaking/editor_plugin.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/nonbreaking/editor_plugin_src.js54
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/noneditable/editor_plugin.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/noneditable/editor_plugin_src.js537
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/pagebreak/editor_plugin.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/pagebreak/editor_plugin_src.js74
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/paste/editor_plugin.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/paste/editor_plugin_src.js885
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/paste/js/pastetext.js36
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/paste/js/pasteword.js51
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/paste/langs/de_dlg.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/paste/langs/en_dlg.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/paste/langs/hu_dlg.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/paste/langs/ja_dlg.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/paste/pastetext.htm27
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/paste/pasteword.htm21
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/preview/editor_plugin.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/preview/editor_plugin_src.js53
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/preview/example.html28
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/preview/jscripts/embed.js73
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/preview/preview.html17
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/print/editor_plugin.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/print/editor_plugin_src.js34
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/save/editor_plugin.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/save/editor_plugin_src.js101
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/searchreplace/css/searchreplace.css6
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/searchreplace/editor_plugin.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/searchreplace/editor_plugin_src.js61
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/searchreplace/js/searchreplace.js142
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/searchreplace/langs/de_dlg.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/searchreplace/langs/en_dlg.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/searchreplace/langs/hu_dlg.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/searchreplace/langs/ja_dlg.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/searchreplace/searchreplace.htm100
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/spellchecker/css/content.css1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/spellchecker/editor_plugin.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/spellchecker/editor_plugin_src.js436
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/spellchecker/img/wline.gifbin0 -> 46 bytes
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/style/css/props.css14
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/style/editor_plugin.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/style/editor_plugin_src.js71
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/style/js/props.js709
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/style/langs/de_dlg.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/style/langs/en_dlg.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/style/langs/hu_dlg.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/style/langs/ja_dlg.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/style/props.htm845
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/style/readme.txt19
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/tabfocus/editor_plugin.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/tabfocus/editor_plugin_src.js122
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/cell.htm180
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/css/cell.css17
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/css/row.css25
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/css/table.css13
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/editor_plugin.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/editor_plugin_src.js1452
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/js/cell.js319
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/js/merge_cells.js27
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/js/row.js237
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/js/table.js501
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/langs/de_dlg.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/langs/en_dlg.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/langs/hu_dlg.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/langs/ja_dlg.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/merge_cells.htm32
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/row.htm158
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/table.htm188
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/template/blank.htm12
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/template/css/template.css23
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/template/editor_plugin.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/template/editor_plugin_src.js159
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/template/js/template.js106
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/template/langs/de_dlg.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/template/langs/en_dlg.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/template/langs/hu_dlg.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/template/langs/ja_dlg.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/template/template.htm31
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/visualblocks/css/visualblocks.css21
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/visualblocks/editor_plugin.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/visualblocks/editor_plugin_src.js63
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/visualchars/editor_plugin.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/visualchars/editor_plugin_src.js83
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/wordcount/editor_plugin.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/wordcount/editor_plugin_src.js122
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/abbr.htm142
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/acronym.htm142
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/attributes.htm149
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/cite.htm142
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/css/attributes.css11
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/css/popup.css9
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/del.htm162
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/editor_plugin.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js132
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/ins.htm162
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/js/abbr.js28
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/js/acronym.js28
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/js/attributes.js111
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/js/cite.js28
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/js/del.js53
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/js/element_common.js229
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/js/ins.js53
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/langs/de_dlg.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/langs/en_dlg.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/langs/hu_dlg.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/langs/ja_dlg.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/about.htm52
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/anchor.htm26
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/charmap.htm55
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/color_picker.htm70
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/editor_template.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/editor_template_src.js1490
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/image.htm80
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/colorpicker.jpgbin0 -> 2584 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/flash.gifbin0 -> 239 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/icons.gifbin0 -> 11982 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/iframe.gifbin0 -> 600 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/pagebreak.gifbin0 -> 325 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/quicktime.gifbin0 -> 301 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/realmedia.gifbin0 -> 439 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/shockwave.gifbin0 -> 384 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/trans.gifbin0 -> 43 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/video.gifbin0 -> 597 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/windowsmedia.gifbin0 -> 415 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/js/about.js73
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/js/anchor.js56
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/js/charmap.js363
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/js/color_picker.js345
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/js/image.js253
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/js/link.js159
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/js/source_editor.js78
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/langs/de.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/langs/de_dlg.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/langs/en.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/langs/en_dlg.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/langs/hu.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/langs/hu_dlg.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/langs/ja.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/langs/ja_dlg.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/link.htm57
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/shortcuts.htm47
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/default/content.css50
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/default/dialog.css118
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/default/img/buttons.pngbin0 -> 3133 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/default/img/items.gifbin0 -> 64 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gifbin0 -> 68 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/default/img/menu_check.gifbin0 -> 70 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/default/img/progress.gifbin0 -> 1787 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/default/img/tabs.gifbin0 -> 1322 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/default/ui.css219
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/highcontrast/content.css24
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/highcontrast/dialog.css106
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/highcontrast/ui.css106
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/o2k7/content.css48
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/o2k7/dialog.css118
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.pngbin0 -> 2766 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.pngbin0 -> 651 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.pngbin0 -> 2084 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/o2k7/ui.css222
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/o2k7/ui_black.css8
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css5
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/source_editor.htm25
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/editor_template.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/editor_template_src.js84
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/img/icons.gifbin0 -> 806 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/langs/de.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/langs/en.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/langs/hu.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/langs/ja.js1
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/skins/default/content.css25
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/skins/default/ui.css32
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/skins/o2k7/content.css17
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/skins/o2k7/img/button_bg.pngbin0 -> 5102 bytes
-rw-r--r--mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/skins/o2k7/ui.css35
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/tiny_mce.js1
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/tiny_mce_popup.js5
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/tiny_mce_src.js18988
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/utils/editable_selects.js70
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/utils/form_utils.js210
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/utils/mctabs.js162
-rwxr-xr-xmayor-orig/www/skin/classic/share/javascript/tiny_mce/utils/validate.js252
919 files changed, 103677 insertions, 0 deletions
diff --git a/mayor-orig/www/skin/classic/base/css/base.css b/mayor-orig/www/skin/classic/base/css/base.css
new file mode 100644
index 00000000..66f74645
--- /dev/null
+++ b/mayor-orig/www/skin/classic/base/css/base.css
@@ -0,0 +1,752 @@
+@media screen {
+
+ html { height: 100%; }
+ html body { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; margin:0px; padding:0px; height: 100%; overflow: auto; }
+ a { text-decoration:none; }
+ .onClickHideShow, .onClickHide, .onClickShow { cursor: pointer; }
+ .input {outline: none;}
+
+ /* mayorlayers */
+ #debug {
+ padding: 20px; background: rgba(0,0,0,0.7); color: yellow; border: 0px red solid;
+ position: absolute; z-index: 1000; top: 0px; left: 0px; right: 0px;
+ }
+ #debug pre { background: rgba(240,240,240,0.9); color: #880000; padding: 10px; margin: 0px;}
+
+ #help {
+ border-radius: 2px;
+ box-shadow: 3px 3px 15px 0px rgba(100,100,100,5.0);
+ position: absolute; top: 10px; left: 50%; height: 600px; width: 1000px; z-index: 500; margin: 0 -500px;
+ border: 1px solid #888888; background: white; }
+ #help iframe { width: 1000px; height: 558px; margin: 0; border: none; }
+ #helpHeader { text-align: center; font-size: 16px; width: 992px; height: 20px; margin: 0px; background: #44cbf8; cursor: pointer; color: white; font-weight: bold; padding: 4px;
+ border-bottom: #f3f3f3 solid 4px;
+ }
+ #hideHelp {
+ position: absolute; top:4px; right: 4px;
+ cursor: pointer; background: #822; color: white; padding: 2px 5px; font-size: 12px;
+ border: #822 1px solid; border-radius: 2px; text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.5);
+/* box-shadow: inset 0px -3px 1px rgba(0, 0, 0, 0.45), 0px 2px 2px rgba(0, 0, 0, 0.25);*/
+ }
+ #hideHelp:hover { background-color:red;}
+
+ div.errorMsg { margin: 10px 20%; background: #fee; border: solid 1px red; border-radius: 2px; padding: 10px; box-shadow: 0px 0px 0px rgba(0,0,0,0.5); }
+ div.errorMsg span { font-weight: bold; color: #f00; }
+ div.infoMsg { margin: 10px 20%; background-color: #eee; border: solid 1px rgb(90,133,184); border-radius: 2px; padding: 10px; box-shadow: 0px 0px 0px rgba(0,0,0,0.5); }
+ div.infoMsg span { font-weight: bold; color: rgb(21,71,123); }
+ div.errorMsg span.alertParam, div.infoMsg span.alertParam { font-weight: normal; color: rgba(0,0,0,0.8); }
+
+ div#mayorErrorSmall span { padding:4px 4px;}
+ div#mayorErrorSmall span.errorMsg { color:red; }
+ div#mayorErrorSmall span.infoMsg { color:rgb(21,71,123); }
+
+ #mayorSearch {
+ z-index:4;
+ position: fixed;
+ width: 500px;
+ max-height: 500px; overflow:auto;
+ padding: 10px;
+ border: 5px solid #ccc;
+ border-radius: 2px;
+ background-color: #fff;
+ top: 30%;
+ left: 50%;
+ margin-top: -100px;
+ margin-left: -250px;
+ box-shadow: 0px 1px 100px 30px rgba(101,101,101,0.9);
+ }
+ #mayorSearch input {
+ overflow:none;
+ font-size:30px;
+ width: 99%;
+ height: 50px;
+ padding: 0px 0px 0px 0px;
+ margin: 0px;
+ border-style: solid;
+ border-width: 0px 0px 1px 0px;
+ border-color: #dddddd;
+ outline: none;
+ }
+
+ #mayorSearch a { display: block; color: cornflowerblue; padding: 2px; font-size: 13px; }
+ #mayorSearch a:before { content:' \25AB '; }
+ #mayorSearch a:hover { text-decoration: underline; }
+ #mayorSearch a.aktiv { outline: solid 2px cornflower; }
+ #mayorSearch a.aktiv:before, #mayorSearch a:hover:before { content:' \25AA '; }
+
+ div.inlinehelp { position: relative; display: inline-block; color:#446688; }
+/* div.inlinehelp span.onClickHideShow { padding: 1px 6px; border-radius: 14px; border: #68a solid 1px; color: #468; font-weight: bold; font-size: 10px;}*/
+ div.inlinehelp span.onClickHideShow { font-size: 10px; color: #446688;}
+ div.inlinehelp p {
+ width: 200px; position: absolute; display: inline-block; top: -15px; left: 35px; z-index: 1000;
+ background-color: #ffa;
+ border: solid 1px #888; padding: 4px; border-radius: 2px;
+ font-weight: normal; text-align: left; white-space: pre-wrap;
+ }
+ div.inlinehelp span.onClickHideShow:hover { color: rgb(106,128,250); }
+
+ /* mayorhead */
+ /* placeholder */
+ #head { z-index: 2; position: absolute; width: 100%; height: 60px;
+ background-color: #3496B9;
+ }
+
+ #mayorhead { }
+
+ #logo { z-index: 3; height: 40px; position: absolute; top: 8px; left: 14px; border: 0px none; }
+ #logobadge { z-index: 4; height: 25px; position: fixed; top: 28px; left: 90px; border: 0px none; }
+
+ #nav, #nav ul { list-style: none; }
+ #nav { z-index: 3; margin: 0px;
+ padding-left: 140px;
+ }
+
+ #nav li { position: relative; }
+ #nav > li { float: left; z-index: 20; text-align: center; padding: 0;
+/* background-color: #3fa79c; */
+ background-color: #3496B9;
+ border-bottom: 0px solid #D2DFE9;
+ /* border-bottom: 1px solid rgb(165,190,200);/* */
+ }
+ #nav > li.active { max-width: 160px; }
+ #nav > li:hover { z-index: 22; }
+ #nav > li > ul { top: 50px; left: -1px; /* background: #1A4B5C; */}
+ #nav > li > ul > li > a { margin-left: 10px; }
+
+ #nav li:hover { background: #4fbcd7;
+ background-color: #3FA79C;
+ }
+ #nav li.active { background: #3facc7; }
+
+ #nav li a { display: block; padding: 3px 10px; color: white; }
+ #nav > li > a { padding: 0px 20px; line-height: 60px; vertical-align: middle; display: table-cell; min-width: 70px;
+ -webkit-transition: all 0.1s ease;
+ transition: all 0.1s ease;
+ }
+ #nav li a:hover { color: orange; }
+ #nav li:hover > ul { display: block; }
+
+ #nav li.nav1szin { background: #3496B9; border-bottom: 1px solid white; }
+ #nav ul.sub { background: #3facc7; }
+
+ #nav ul { display: none; position: absolute; width: 160px; padding: 0px; }
+ #nav ul span { float: left; margin: 6px 5px; color: white; }
+
+ #nav > li > ul { top: 60px; border-top: solid 4px rgba(255,255,255,0.4); }
+ #nav ul > li { background: #3496B9; }
+ #nav ul li { text-align: left; margin-bottom: 1px; }
+ #nav ul li a { padding: 6px 10px; }
+ #nav ul li.active > a { color:#fdb933; }
+
+ #nav ul ul { top: 0px; left: -145px; z-index: 30; background: #3facc7; background: #3496B9}
+ #nav ul ul a { background: #3facc7; }
+ #nav ul ul a:hover { background: #4fbcd7; color: white; border-right: solid 4px orange;} /* mod */
+
+ #nav li.start { /* fogó */
+ height: 20px; min-width: 0; padding-right: 0px; padding-left: 6px;
+ margin-top:20px;
+ background-color:lightgrey;
+ border-radius: 0px 50px 50px 0px; border-bottom: 0px;
+ z-index: 20;
+ }
+
+ #nav:hover li.start {
+ animation: moIn 0.1s; -webkit-animation: moIn 0.1s;
+ }
+
+ #nav li.start:hover {
+ background: #D2DFE9;
+ padding-left:9px;
+ }
+
+ #poz { z-index: 2; padding: 0; list-style: none; background-color: rgb(230,230,230); margin: 0;
+ height: 20px; border-bottom: #f3f3f3 solid 4px; text-shadow: 0px 1px rgba(52, 150, 185, 0.1);
+ border-top: rgb(247, 197, 14) solid 4px;
+ animation-name: niceMaYoR;
+ animation-duration: 30s;
+ animation-iteration-count: 4;
+ animation-direction: alternate;
+ animation-timing-function: ease-in-out;
+ animation-delay: 60s;
+ }
+
+ #poz > li { padding: 2px 6px; }
+ #poz > li div.nev { float: right; padding: 2px; width: auto; color: #3496b9; text-align: right; }
+ #poz > li div.nev span { margin-right: 0px; }
+ #poz > li div.nev span:hover { color:rgb(70, 130, 180);/*color:#00c0ff;*/ }
+ #poz > li div.nev a { color: #3496b9;}
+
+/* #poz > li div.nev span.icon-googleplus, #poz > li div.nev span.icon-facebook { color:#aaa; }*/
+ #poz > li div.nev.googleapi span.icon-googleplus { color: #f44336;}
+ #poz > li div.nev.fbconnect span.icon-facebook { color: #3B5998;}
+
+ #poz > li a { margin-right:4px; margin-left:4px; padding:0px; margin-top:0px; vertical-align: top;}
+
+ #settings {
+ width: 100%;
+ margin-top: 5px; position:relative; right: 0px;
+ background: #eeeeee;
+ border-width: 0px 1px 1px 1px;
+ border-style: solid;
+ border-color: rgb(230,230,230);
+ border-top: dotted 1px #dddddd;
+ }
+ #settings div {
+ padding: 20px 10px;
+ border-bottom: 1px solid rgb(230,230,230);
+ }
+ #settings div p { margin: 0; padding: 0; text-align: center; }
+ #settings div p.name { font-weight: bold; }
+ #settings table { width: 100%; background: rgb(245,245,245);}
+ #settings table:hover { box-shadow: 0px 0px 100px #eeeeee;}
+ #settings td { width: 50%; text-align: center; padding: 10px; }
+ #settings td a {
+ display: inline-block;
+ vertical-align: baseline; line-height: 29px;
+ position: static;
+ padding: 0px 8px; height: 29px; margin: 0px 8px;
+ text-align: center; text-decoration: none; font-weight: bold; font-size: 10px;
+ background: white; color: #444;
+ border: solid 1px rgba(0, 0, 0, 0.0976563);
+ border-radius: 2px;
+ }
+ #settings td a:hover { border: white 1px solid; background-color: #44CBF8; color: white; }
+
+ #poz > li span.school {
+ font-variant: small-caps;
+ font-size: 14px;
+ color: rgb(125,150,160);
+ /* font-weight: bold; */
+ letter-spacing: 0.16em;
+ overflow: hidden;
+ white-space:nowrap;
+ }
+ #poz > li span.school:hover { text-shadow: 0 0 0.2em #eee, 0 0 0.2em #eee; color: #666; cursor: default; }
+
+ #nav1 { z-index: 3; position: absolute; margin-left: 290px; margin-right: 0px; width: 100%;
+
+ }
+ #nav1 div { background: rgba(52,150,185,0.6); }
+ #nav1 div a { line-height:60px; padding: 0px 12px 0px 12px; display: inline-block; text-decoration: none; color: #fff;
+ background: #3496b9; margin-top: 0px;
+ }
+ #nav1 div a:hover { color: #fdb933;
+ background-color: ;
+ box-shadow: inset 0px -3px 0px #44CBF8;
+ }
+ #nav1 div a.aktiv { color:#fdb933; }
+ #nav1 div a.aktiv:hover { color: white; }
+
+ #nav1 div span.onClickHideShow {
+ display:none;
+ cursor: pointer; color: white; background: rgba(255,255,255,0.2); line-height:60px;
+ padding: 0px 12px 0px 12px; float: right; margin-right: 290px/* annyi, amennyi a #nav1 bal margója!*/; }
+
+ #nav2.vertical {
+ z-index: 1; width: 140px; margin: 0; height: 100%;
+ background-color: #D2DFE9;
+/* margin-top: -25px;
+ padding-top: 25px;
+*/ position: fixed;
+ overflow: auto;
+ top:88px;
+ background: -webkit-linear-gradient(top, #D2DFE9 0%,#D2DFE9 50%,#ffffff 100%);
+ background: -moz-linear-gradient(top, #D2DFE9 0%,#D2DFE9 50%,#ffffff 100%);
+ background: linear-gradient(top, #D2DFE9 0%,#D2DFE9 50%,#ffffff 100%);
+ }
+ #nav2.vertical ul { margin: 0; padding: 0; list-style: none; }
+ #nav2.vertical ul li { border-bottom: solid 1px rgba(100,100,100,0.4); }
+ #nav2.vertical ul li:first-child { border-top: solid 1px rgba(100,100,100,0.4); }
+ #nav2.vertical ul li a { display: block; color: black; font-size: 11px; text-decoration: none; padding: 6px 6px; width:128px; }
+ #nav2.vertical ul li a.aktiv { background-color: white; }
+ #nav2.vertical ul li a:hover { color: white; background: #9abcd8; }
+
+ #nav2.horizontal {
+ z-index: 1; width: 100%;
+ margin-top: 0px;
+ top: 88px;
+ text-align: center;
+ padding-top: 5px; padding-bottom: 5px;
+ position: fixed;
+ overflow: none;
+ border-bottom: solid 3px #eeeeee;
+ background-color: #82bfd5;
+ color: white;
+ font-size:x-small;
+ }
+ #nav2.horizontal ul { margin: 0; padding: 0; list-style: none; }
+ #nav2.horizontal ul li { display: inline; border-right: solid 1px #888888; }
+ #nav2.horizontal ul li:last-child { display: inline; border-right: solid 0px #888888; }
+ #nav2.horizontal ul li a {display: inline; color: white; width: 128px; padding: 0px 6px; text-decoration: none; }
+ #nav2.horizontal ul li a.aktiv { color: white; background-color: orange;}
+ #nav2.horizontal ul li a:hover { color: white; background: orange; }
+ #nav2.horizontal:hover li { }
+
+ div.mayorfoot { text-align: center; font-size:smaller; color: #aaa; }
+ div.mayorfoot a { color: rgba(52, 150, 185, 0.6);}
+ div.mayorfoot:hover a { color: rgba(52, 150, 185, 1);}
+ #mayorfoot.leftpad { margin-top:2em; margin-left: 141px; }
+ #mayorfoot.toppad { margin-top: 40px; margin-left: 0px; }
+
+ #takaro { z-index:150;position: fixed;top:0px; left:0px; right:0px; bottom:0px; background-color: rgba(0,0,0,0.7); }
+
+ #updateWindow { z-index: 152; position: fixed; background: rgb(255,255,255); min-height: 100px; min-width: 200px; border: #3496B9 2px solid; border-radius: 4px; left:20%; right:20%;}
+/* #updateWindow #updateHeader { min-height: 20px; min-width: 100px; background: #1a4c5c; color: white; text-align: center; line-height: 20px; position: relative; top: -13px; border-radius: 4px; margin: 0 50px; border: solid 2px #3496b9; }*/
+ #updateWindow #updateHeader { min-height: 30px; min-width: 100px; background: #1a4c5c; color: white;
+ font-size:16px;text-align: center; line-height:30px; margin: 0 0px 10px 0px; border-bottom: solid 2px rgb(247, 197, 14); /*#3496b9*/ }
+ #updateWindow #updateCloseButton { position: absolute; right: -20px; top: -20px; z-index: 0; background : white; border: solid 3px #3496b9; border-radius: 20px;}
+ #updateWindow #updateCloseButton:hover { background : #eeeeee;}
+ #updateHeader { cursor: pointer; }
+ #updateForm { max-height: 100%; overflow: auto; }
+
+
+ #keyHelp { z-index:151;position: absolute; top:200px; left: 200px; right:200px; margin: auto; padding: 20px; width: 400px;
+ border: solid 1px yellow; border-radius: 20px; border-spacing: 15px; background-color: rgba(0,0,0,0.4);
+ }
+ #keyHelp th { color: white; text-align: center; border-bottom: yellow 2px solid; font-size: 20px; font-weight: bold; }
+ #keyHelp td.key { color: yellow; text-align: right; width: 100px; }
+ #keyHelp td.desc { color: white; text-align: left; }
+
+ #logo, #head, #nav1, #nav, #poz { position: fixed; }
+ #head { top: 0; left: 0; }
+ #nav { top: 0; left: 0; }
+ #nav1 { top: 0; }
+ #poz { top: 60px; width: 100%; }
+
+ #mayorbody { padding-top: 1px; padding-right: 0px;
+ /*margin-left:0px;*/ margin-top: 88px;
+ }
+ #mayorbody.leftpad { margin-left: 141px; }
+ #mayorbody.toppad { margin-left: 0px; top:33px; position: relative;}
+
+ /* alternates */
+ #mayorhead.small #nav1 div a { line-height:30px; }
+ #mayorhead.small #nav > li > a { line-height:30px;}
+ #mayorhead.small #head { height:30px;}
+ #mayorhead.small #poz { height:20px;}
+
+ /* ------------ */
+/* #mayorerror {z-index:100;position:fixed; bottom:0px; min-height:88px; width:100%;background-color: rgba(255,20,147,0.9); border-bottom: solid 1px red; display:none;}*/
+
+ #nav2 .icons span { padding: 0px 6px; vertical-align:middle; cursor:pointer}
+ #nav2.vertical .icons { height:26px; color: lightslategrey;}
+ #nav2.vertical .icons span { font-size:11px; display:table-cell; padding-top:8px;}
+ #nav2.vertical .icons span:hover {color:white;}
+
+ #nav2.horizontal .icons {display:inline; float:left; padding-top:3px; height:100%;}
+ #nav2.horizontal .icons span { font-size:11px; display:inline; padding-top:0px; color: white; border: dotted 1px lightblue; padding:3px; margin:0px 2px; background-color: rgba(100,100,100,0.1);}
+ #nav2.horizontal .icons span:hover {color:orange;}
+
+ #nav2 ul li.fullmenuitem { display:none }
+
+ #nav2fullmenu.aktiv { color: rgb(30, 144, 255);}
+ #nav2fullmenu.aktiv:hover { color: rgb(60,174,255) !important;}
+
+ #mayorGlobalLogin {
+ /*background-color: rgba(0, 0, 0, 0.6); */
+ padding:0px 0px 0px 0px; z-index: 100; position:fixed; top:0px; right:0px; height:60px; max-height:60px; }
+ #mayorGlobalLogin span { color:#eeeeee; padding-right:0px; }
+ #mayorGlobalLogin span.failed { color: rgb(255,215,0);; text-shadow: 0px 0px 2px #ff0000;}
+ #mayorGlobalLogin:hover span.failed { color: rgb(255,235,0); }
+
+ #mayorGlobalLogin form.fb button:hover span { color: #3B5998; }
+ #mayorGlobalLogin form.googleapi button:hover span { color: red; }
+
+ #mayorGlobalLogin div.large { font-size:40px; padding:10px; color: #eeeeee;}
+ #mayorGlobalLogin div.large:hover { font-size:40px; padding:10px; color: white; }
+
+ #mayorGlobalLogin input[type=text] { width:100px; }
+ #mayorGlobalLogin input[type=password] { width:100px; }
+
+ /* add default */
+ #mayorGlobalLogin form input {margin:2px;}
+ #mayorGlobalLogin table { height:60px;}
+
+ #mayorGlobalLogin form button.api {
+ background-color: inherit;
+ border: solid 0px #fff;
+ padding: 0px;
+ font-size: 24px;
+ margin-top: 2px;
+ }
+ #mayorGlobalLogin.restricted { background-color: #F06; }
+
+
+
+ #mglFBconnect.FBstatusunknown { /*color: #aaa;*/ }
+ #mglFBconnect:after { content: " ";
+ margin-left:4px;display: inline-block; width:8px;
+ height:8px;border-radius: 8px;border: solid 1px white; background-color:#888;
+ }
+ #mglFBconnect:hover:after {}
+ #mglFBconnect.FB2:after {background-color:lightgreen;}
+ #mglFBconnect.FB1:after {background-color:orange;}
+ #mglFBconnect.FB0:after {background-color:red;}
+
+ #mayorErrorHide {color: rgb(90, 133, 184); cursor:pointer;}
+ #mayorErrorHide:hover {color: rgba(52, 150, 185, 0.6);}
+
+ .hidden { display:none }
+
+ #ui-datepicker-div {position: relative; z-index:4 !important;}
+
+ #mayorErrorSmall.mayorErrorSmallInfo {
+ overflow:hidden;
+ line-height:22px;
+ border-bottom: solid 4px rgb(106,128,250);
+ border-top: solid 4px lightblue;
+ padding:0px; height:20px; width:100%;
+ background-color:rgba(250,250,250,0.9); position:fixed;
+ top:60px;left:0px; z-index:3
+ }
+
+ #mayorErrorSmall.mayorErrorSmallError {
+ overflow:hidden;
+ line-height:22px;
+ border-bottom: solid 4px red;
+ border-top: solid 4px orange;
+ padding:0px; height:20px; width:100%;
+ background-color:rgba(250,250,250,0.9); position:fixed;
+ top:60px;left:0px; z-index:3
+ }
+
+
+/* .nyitva2 { width:390px !important; }*/
+
+ #updateWindowSide {
+ z-index: 152;
+ position: fixed;
+ background-color: rgba(73, 71, 71,0.92);
+ border-left: solid 0px black;
+ padding:4px;
+ color:white;
+ right: -368px;
+ width: 360px;
+ top:60px;
+ bottom:0;
+ overflow-y: auto;
+ border-top : solid 4px grey;
+ transition: all 300ms ease;
+ }
+ #updateWindowSide.nyitva { right:0px; }
+ #updateWindowSide h1 { padding: 4px 8px; margin:0px; text-align:center; border-bottom: solid 1px #dddddd; }
+ #updateWindowSide h1 div { font-size:16px; min-height: 20px; }
+ #updateWindowSide h1 span#btn_updateWindowSideClose { float:left; font-size:18px; cursor: pointer; }
+ #updateWindowSide h1 span#btn_updateWindowSideClose:hover { color: #777777; }
+ #updateWindowSide a {color: inherit; }
+ #updateWindowSide a:hover {color: inherit; }
+
+ #updateWindowSideSub {
+ z-index: 153;
+ position: fixed;
+ background-color: rgba(100, 100, 100, 0.98);
+ border-left: solid 0px black;
+ padding:4px;
+ color:white;
+ right: -368px;
+ width: 360px;
+ top:60px;
+ bottom:0;
+ overflow-y: auto;
+ border-top : solid 4px #eee;
+ transition: all 300ms ease;
+ }
+ #updateWindowSideSub.nyitva { right:0px; }
+ #updateWindowSideSub h1 { padding: 4px 8px; margin:0px; text-align:center; border-bottom: solid 1px #dddddd; }
+ #updateWindowSideSub h1 div { font-size:16px; min-height: 20px; }
+ #updateWindowSideSub h1 span#btn_updateWindowSideSubClose { float:left; font-size:18px; cursor: pointer; }
+ #updateWindowSideSub h1 span#btn_updateWindowSideSubClose:hover { color: #777777; }
+ #updateWindowSideSub a {color: inherit; }
+ #updateWindowSideSub a:hover {color: inherit; }
+
+ #mayorNaviIconHolder { text-align:center; display:table; width:100%; border-bottom: solid 1px white; font-size:12px; }
+ div.mayorNaviIcon { display:inline-block; text-align:center; padding: 10px 5px 5px 5px; margin-right:4px; border-width:0px 0px 0px 0px; border-style: solid; border-color:white;}
+ div.mayorNaviIcon a { color:inherit; text-decoration: none; display:inline-block;}
+ div.mayorNaviIcon span { font-size:16px; }
+ div.mayorNaviIcon:hover { background-color: cornflowerblue; cursor:pointer; text-shadow: 0px 0px 1px blue;}
+
+ #nav, #nav1,#nav2 {display:visible;}
+ #mayorIcons { height: 26px; color: #789; }
+ #hamburgerIcon {
+display:none;
+color:#D2DFE9; font-size:20px;z-index:100000;
+margin-left:0px;
+position:fixed;
+top:0px;
+padding:0px 8px;
+cursor: pointer;
+vertical-align: middle;
+border-radius:1px;
+border: solid 0px #eee;
+ }
+ #hamburgerIcon span { line-height:60px; }
+ #hamburgerIcon:active {color:white;}
+ #hamburgerIcon.nyitva {
+ color:white;
+ }
+
+ .hamburger { display:none;
+ position:fixed; z-index:1000; top:0px; left:0px;
+ padding: 15px 15px;
+ cursor: pointer;
+ transition-property: opacity, -webkit-filter;
+ transition-property: opacity, filter;
+ transition-property: opacity, filter, -webkit-filter;
+ transition-duration: 0.15s;
+ transition-timing-function: linear;
+ font: inherit;
+ color: inherit;
+ text-transform: none;
+ background-color: transparent;
+ border: 0;
+ margin: 0;
+ overflow: visible;
+ }
+
+ /* author Jonathan Suh jonsuh + mayor.hu */
+ /* https://github.com/jonsuh/hamburgers */
+ .hamburger:hover { opacity: 0.7; }
+ .hamburger-box {width: 20px;height: 30px;display: inline-block;position: relative;}
+ .hamburger-inner {display: block;top: 50%;margin-top: -2px;}
+ .hamburger-inner, .hamburger-inner::before, .hamburger-inner::after {
+ width: 20px;height: 3px;
+ background-color: #eee;
+ border-radius: 2px;position: absolute;
+ transition-property: -webkit-transform;
+ transition-property: transform;
+ transition-property: transform, -webkit-transform;
+ transition-duration: 0.15s;
+ transition-timing-function: ease;
+ }
+ .hamburger-inner::before, .hamburger-inner::after {content: "";display: block;}
+ .hamburger-inner::before { top: -7px; }
+ .hamburger-inner::after { bottom: -7px; }
+
+ /* Squeeze */
+ .hamburger--squeeze .hamburger-inner {
+ transition-duration: 0.1s;
+ transition-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
+ }
+ .hamburger--squeeze .hamburger-inner::before { transition: top 0.1s 0.14s ease, opacity 0.1s ease;}
+ .hamburger--squeeze .hamburger-inner::after {
+ transition: bottom 0.1s 0.14s ease, -webkit-transform 0.1s cubic-bezier(0.55, 0.055, 0.675, 0.19);
+ transition: bottom 0.1s 0.14s ease, transform 0.1s cubic-bezier(0.55, 0.055, 0.675, 0.19);
+ transition: bottom 0.1s 0.14s ease, transform 0.1s cubic-bezier(0.55, 0.055, 0.675, 0.19), -webkit-transform 0.1s cubic-bezier(0.55, 0.055, 0.675, 0.19);
+ }
+ .hamburger--squeeze.is-active .hamburger-inner {
+ -webkit-transform: rotate(45deg);
+ transform: rotate(45deg);
+ transition-delay: 0.14s;
+ transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
+ }
+ .hamburger--squeeze.is-active .hamburger-inner::before {top: 0;opacity: 0;transition: top 0.1s ease, opacity 0.1s 0.14s ease;}
+
+ .hamburger--squeeze.is-active .hamburger-inner::after {
+ bottom: 0;
+ -webkit-transform: rotate(-90deg);
+ transform: rotate(-90deg);
+ transition: bottom 0.1s ease, -webkit-transform 0.1s 0.14s cubic-bezier(0.215, 0.61, 0.355, 1);
+ transition: bottom 0.1s ease, transform 0.1s 0.14s cubic-bezier(0.215, 0.61, 0.355, 1);
+ transition: bottom 0.1s ease, transform 0.1s 0.14s cubic-bezier(0.215, 0.61, 0.355, 1), -webkit-transform 0.1s 0.14s cubic-bezier(0.215, 0.61, 0.355, 1);
+ }
+ /* end of hamburger */
+
+ #mayorNav {
+ width:100%;
+ position:absolute;
+ z-index:1;
+ background-color: #37699d; /* #82bfd5; */
+ opacity:1;
+ padding-bottom:1em;
+ border-bottom: solid 4px #F7C50E;
+ }
+
+ #mayorNav { color:#fff; }
+ #mayorNav a { color:#fff; }
+ #mayorNav a:hover { color:white; }
+ #mayorNav ul {list-style-type: none; }
+ #mayorNav>ul>li { margin-bottom:1.4em; font-size:16px; padding-bottom:1em;}
+ #mayorNav>ul>li>a { font-size: large; border-bottom: solid 1px #eee; }
+ #mayorNav>ul>li>a:first-child { line-height:2em;}
+ #mayorNav ul li a:active { background-color: #303F9F;}
+ #mayorNav ul li {line-height:2em; }
+
+ #mayorNav div.mayorNavIcons {
+ width:100%;
+ text-align: center;
+ } /* ALERT! elnevezés */
+ #mayorNav div.mayorNavIcons div {
+ background-color: ; display: inline-block; text-align:center; padding:14px;
+ }
+ #mayorNav div.mayorNavIcons div:active { background-color: orange; }
+ #mayorNav div.mayorNavIcons div:hover { background-color: orange; }
+ #mayorNav div.mayorNavIcons div span { font-size:x-large;}
+ div.mayorLogo a img {
+ -webkit-transition: margin 1s;
+ transition: margin 1s;
+ }
+
+ div.arckep--container { display:inline-block; position: relative;overflow: hidden;border: solid 2px #fff; color: white; border-radius: 50%;}
+ div.arckep--container img {width: 100%; height: auto; filter: grayscale(100%)};
+ div.arckep--container:hover { border: solid 2px orange; }
+ div.arckep--container img:hover { filter: grayscale(10%)};
+
+ div.arckepContainer {
+ position: relative;overflow: hidden;border-radius: 50%;border: solid 2px #fff; color: white;
+ }
+ div.arckepContainer span {
+ border-radius: 50%;border: solid 2px #fff; color: white;
+ height:50px; min-height:50px; width:50px; min-width:50px; background-color: #ddd;
+ font-size:20px;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ }
+ div.arckepContainer.osztalyAdat:hover span { background-color: #8cc864; }
+ div.arckepContainer.diakNev:hover span { background-color: #ff8c00; }
+ div.arckepContainer.tankorAdat:hover span { background-color: #aca; }
+
+ div.arckepContainer.square,
+ div.arckep--container.square,
+ div.arckepContainer.square span { border-radius: 0px; transition: all 0.1s ease;}
+
+ div.arckepContainer.classic,
+ div.arckep--container.classic,
+ div.arckepContainer.classic span { border-radius: 0px;
+ height:66px; min-height:66px; width:50px; min-width:50px;
+ }
+
+ div.arckepContainer.size_s { height:32px;width:32px;min-height:32px;min-width:32px;font-size:15px; }
+ div.arckepContainer.size_s span {height:30px;width:30px;min-height:30px;min-width:30px;font-size:13px;}
+ div.arckepContainer {display: inline-block !important;}
+ div.arckep--container {display: inline-block !important;}
+
+ div._dotHolder {text-align:center; width:90%; margin:auto; padding:10px 0px;vertical-align:middle;}
+ div._dot {background-color:#eee;display: inline-block;border-radius: 50%;height:10px; width:10px;}
+ div._dot:hover {background-color:cornflowerblue !important;}
+ div._dotHolder:hover div._dot {background-color:#ccc;}
+
+ div.arckepContainer:hover span { border: solid 2px orange; }
+
+}
+@media print {
+ #nav, #nav1, #nav2, #poz, #head, #logo, #mayorfoot, #logobadge, #mayorGlobalLogin, #updateWindowSide, #updateWindowSideSub, #mayorErrorSmall, .noprint { display: none; }
+ div.arckep--container {display: none;}
+ div.arckepContainer {display: none;}
+}
+
+@media (max-width: 900px) {
+ #nav>li a {padding:0px 8px;}
+}
+@media (max-width: 850px) {
+ #nav>li a {width:70px; padding:0px 4px;}
+}
+@media (max-width: 764px) {
+
+ .input {outline: none;}
+ .school { display: none; }
+ #nav, #nav1, #nav2 { display: none;}
+ #nav2>ul:not(:first-child) {display:none;}
+ #mayorbody { margin-left:0px; }
+ #mayorbody.toppad { margin-left: 0px; top:0px; position: relative;}
+ #hamburgerIcon {display:block;}
+ div.mayorLogo a img { margin-left:40px; }
+
+ #mayorSearch {
+ z-index:4;
+ position: fixed;
+ width: 99%;
+ padding: 0px;
+ border: 5px solid #ccc;
+ border-radius: 2px;
+ background-color: #fff;
+ top: 120px;
+ left: 0px;
+ margin-top: 0px;
+ margin-left: 0px;
+ box-shadow: 0px 1px 100px 10px rgba(101,101,101,0.9);
+ }
+ #mayorSearch a { font-size:16px; line-height:16px; padding:8px; }
+
+ .hamburger { display: inline-block;}
+ div.arckepContainer {display:none;}
+ div.arckep--container {display:none;}
+
+ #updateWindowSide input[type="color"],
+ #updateWindowSide input[type="date"],
+ #updateWindowSide input[type="datetime"],
+ #updateWindowSide input[type="datetime-local"],
+ #updateWindowSide input[type="email"],
+ #updateWindowSide input[type="month"],
+ #updateWindowSide input[type="number"],
+ #updateWindowSide input[type="password"],
+ #updateWindowSide input[type="search"],
+ #updateWindowSide input[type="tel"],
+ #updateWindowSide input[type="text"],
+ #updateWindowSide input[type="time"],
+ #updateWindowSide input[type="url"],
+ #updateWindowSide input[type="week"],
+ #updateWindowSide select,
+ #updateWindowSide select:focus,
+ #updateWindowSide textarea {
+ font-size: 16px;
+ }
+ #updateWindowSide, #updateWindowSideSub {
+ overflow: scroll;
+ -webkit-overflow-scrolling: touch;
+ font-size: 16px;
+ }
+ #updateWindowSide.nyitva, #updateWindowSideSub.nyitva {
+ width: 360px;
+ background-color: #494747;
+ }
+
+ #updateWindowSide h1 span#btn_updateWindowSideClose { float: left; font-size: 20px; cursor: pointer; }
+ #updateWindowSideSub h1 span#btn_updateWindowSideSubClose { float: left; font-size: 20px; cursor: pointer; }
+}
+@media (max-width: 350px) {
+ div#mayorGlobalLogin form.passwordAuth span {display:none;}
+}
+
+@keyframes niceMaYoR {
+ 0% { border-top: rgb(247,197,14) solid 4px; }
+ 100% { border-top: rgb(147,197,214) solid 4px; }
+}
+
+@keyframes moIn {from {padding-left:6px;}to {padding-left:9px;}}
+@-webkit-keyframes moIn {from {padding-left:6px;}to {padding-left:9px;}}
+@keyframes moOut {from {padding-left:9px;}to {padding-left:6px;}}
+@-webkit-keyframes moOut {from {padding-left:9px;}to {padding-left:6px;}}
+
+.mayorLoader {
+ background: linear-gradient(270deg, #E6E6E6, #E6E6E6, #7D96A0, #E6E6E6, #E6E6E6);
+ background-size: 400% 400%;
+ -webkit-animation: mayorLoaderAnim 4s ease infinite;
+ -moz-animation: mayorLoaderAnim 4s ease infinite;
+ -o-animation: mayorLoaderAnim 4s ease infinite;
+ animation: mayorLoaderAnim 4s ease infinite;
+}
+
+@-webkit-keyframes mayorLoaderAnim {
+ 0%{background-position:0% 50%}
+ 50%{background-position:100% 50%}
+ 100%{background-position:0% 50%}
+}
+@-moz-keyframes mayorLoaderAnim {
+ 0%{background-position:0% 50%}
+ 50%{background-position:100% 50%}
+ 100%{background-position:0% 50%}
+}
+@-o-keyframes mayorLoaderAnim {
+ 0%{background-position:0% 50%}
+ 50%{background-position:100% 50%}
+ 100%{background-position:0% 50%}
+}
+@keyframes mayorLoaderAnim {
+ 0%{background-position:0% 50%}
+ 50%{background-position:100% 50%}
+ 100%{background-position:0% 50%}
+}
+
+
+
diff --git a/mayor-orig/www/skin/classic/base/html/alert.phtml b/mayor-orig/www/skin/classic/base/html/alert.phtml
new file mode 100644
index 00000000..ae3379cb
--- /dev/null
+++ b/mayor-orig/www/skin/classic/base/html/alert.phtml
@@ -0,0 +1,85 @@
+<?php
+/*
+ Module: base
+
+ js_alert($alert)
+ html_alert($alert)
+*/
+
+// ------------------------------------------------------------------- //
+// Az $alert két részből áll: típus:hiba //
+// típus: alert : javaScript alert //
+// message : hibaüzenet után az oldal betöltődik //
+// page : hibaüzenet után az oldal nem töltődik be //
+// info : információs üzenet //
+// ------------------------------------------------------------------- //
+
+// ---------------------------------------------------------------- //
+// Hibaüzenet kiiratása
+// visszatérési érték: legyen-e utána megjelenítve a lap?
+// --------------------------------------------------------------- //
+
+ function html_alert($alert='') {
+
+ global $ALERT_MSG;
+
+ //$alert = $_SESSION['alert'];
+ if (!isset($alert) || (is_array($alert) && count($alert)==0)) {
+ return true;
+ exit;
+ }
+
+ $showPage = true;
+ while ( ($a = array_pop($alert)) ) {
+ $j++;
+ $param = array();
+ $tmp = explode(':', $a);
+ $aType = readVariable($tmp[0], 'enum', 'message', array('message','info','page')); $aCode = $tmp[1];
+ for ($p = 2; $p < count($tmp); $p++) $param[] = htmlspecialchars($tmp[$p]);
+ $pstr = '';
+ // preparing $msg
+ if (!isset($ALERT_MSG[$aCode]) || $ALERT_MSG[$aCode] == '')
+ $msg = $ALERT_MSG['default'].' <span class="alertParam">'.$aType.':'.$aCode.'</span>';
+ else $msg = $ALERT_MSG[$aCode];
+
+ // paraméter behelyettesítés
+ for($i = 0; $i < count($param); $i++) {
+ $_msg = $msg;
+ $msg = @str_replace("%$i%",'<span class="alertParam">'.($param[$i]).'</span>',$msg);
+ if ($param[$i] != '' and $_msg == $msg) $pstr .= '<span class="alertParam">'.($param[$i]).'</span>,';
+ }
+ if ($pstr != '') $msg .= '<br/>' . substr($pstr,0,-1) . '';
+ if (($aType == 'message') or ($aType == 'page')) {
+ $title = _ERROR;
+ $class = 'errorMsg';
+ if ($aType == 'page') $showPage = false;
+ $sign='<span class="icon-exclamation-sign '.$class.'"></span>';
+ $hasError = true;
+ } else {
+ $title = _INFORMATION;
+ $class = 'infoMsg';
+ $sign='<span class="icon-info-sign '.$class.'"></span>';
+ $hasInfo = true;
+ }
+ $class .= ' hidden';
+
+ $msg = '<span>'.$title.' ['.$j.']:</span> ' . $msg;
+ //echo '<div class="'.$class.'">'.str_replace('***','<br/>',$msg).'</div>'."\n";
+
+ $x .= $sign.str_replace('***',' ',str_replace('<br/>',' ',$msg))."<br/>\n";
+
+ // Függetlenül attól, hogy milyen paramétert kaptunk a $_SESSION['alert']-et üresre állítjuk
+ $_SESSION['alert'] = array();
+ }
+
+ if ($hasInfo==true && $hasError==false) {
+ echo '<div id="mayorErrorSmall" class="mayorErrorSmallInfo" ><div><span id="mayorErrorHide" class="icon-remove-sign"></span>'.$x.'</div></div>';
+ } else {
+ echo '<div id="mayorErrorSmall" class="mayorErrorSmallError"><div><span id="mayorErrorHide" class="icon-remove-sign"></span>'.$x.'</div></div>';
+ }
+
+ return $showPage;
+
+ }
+
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/base/html/base.phtml b/mayor-orig/www/skin/classic/base/html/base.phtml
new file mode 100644
index 00000000..e482d4e6
--- /dev/null
+++ b/mayor-orig/www/skin/classic/base/html/base.phtml
@@ -0,0 +1,618 @@
+<?php
+/*
+ Module: base
+
+ html_base($sessionID,$page,$sub,$f,$lang,$skin,$MENU)
+ html_head($page,$f,$lang,$skin)
+ html_mayor_head($sessionID,$page,$sub,$f,$lang,$MENU,$skin = 'default')
+ html_mayor_foot()
+ //page($page,$sub,$f,$lang,$skin) --> base.php
+ putValidXHTML()
+
+ Felhasználtuk: http://projects.lukehaas.me/css-loaders/
+
+*/
+
+ require('skin/blue/base/color_schemes.php'); // blue? !!!!!!!!!!!!????????????????
+ if (!defined('__COLOR_SCHEME') || !is_array($_COLOR_SCHEMES[__COLOR_SCHEME]))
+ $_COLORS = $_COLOR_SCHEMES['blue'];
+ else
+ $_COLORS = $_COLOR_SCHEMES[__COLOR_SCHEME];
+
+
+// -------------------------------------------------------------------
+// html_base() : a html oldal szerkezete
+// -------------------------------------------------------------------
+
+function html_base($sessionID,$policy,$page,$sub,$f,$lang,$skin,$MENU) {
+
+ _httpHeader();
+
+ if ($MENU['set'][$policy][$page][$sub][$f]['refresh'] > 0) {
+ @header("Refresh:".intval($MENU['set'][$policy][$page][$sub][$f]['refresh']));
+ }
+
+ html_head($page,$sub,$f,$lang,$skin);
+ _debugLayer();
+ html_mayor_head($sessionID,$page,$sub,$f,$lang,$MENU,$skin);
+ echo '<div id="mayorerror"></div>';
+ $_defaultPageLayout = ($_SESSION['pageLayout']==0) ? 'leftpad' : 'toppad';
+ echo '<div class="mayorbody '.$_defaultPageLayout.'" id="mayorbody">';
+ page($page,$sub,$f,$lang,$skin,$policy);
+ echo '</div>';
+ html_mayor_foot();
+}
+
+// -------------------------------------------------------------------
+// html_head() : html fejlec kiirasa
+// -------------------------------------------------------------------
+
+function html_head($page,$sub,$f,$lang,$skin) {
+
+ global $INCLUDES, $SSSHH, $SSSBB;
+
+ if ($f == '') $f = $page;
+ ## ----------------------------------------------
+ ## Note http://hixie.ch/advocacy/xhtml
+ ## But this is crazy! Using Doctype sniffing instead...
+ ## Also read: http://www.mozilla.org/docs/web-developer/faq.html
+ ## header('Content-type: application/xhtml+xml');
+ ## -----------------------------------------------
+
+ // debug üzenetek layer-ének lezárása
+// if (defined('__START_DEBUG') && __START_DEBUG === true) echo "</div>\n<!--// debug end //-->";
+
+ echo '<?xml version="1.0" encoding="utf-8"?>'."\n";
+ echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'."\n";
+ echo '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="hu">'."\n";
+ echo '<head>'."\n";
+ echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />'."\n";
+ echo '<meta name=viewport content="width=device-width, initial-scale=1" />'."\n";
+ echo '<title>';
+ if (defined('_SITE')) echo _SITE.' - ';
+ echo _MAIN_TITLE;
+ echo '.';
+ echo _MAYORREV;
+ echo '</title>'."\n";
+ includeCSS($page,$sub,$f,$skin);
+ includeCSS($page,$sub,$f,$skin,'handheld'); // install css for handheld devices
+ includeJS($page,$sub,$f,$skin);
+ includeSocial($page,$sub,$f);
+
+ if (is_string($SSSHH) && $SSSHH!='') echo $SSSHH;
+
+ if (is_array(@$INCLUDES['html_head']['global'])) foreach ($INCLUDES['html_head']['global'] as $key => $include) {
+ if (file_exists("skin/$skin/$include")) {
+ include("skin/$skin/$include");
+ } elseif (file_exists('skin/'._DEFAULT_SKIN.'/'.$include)) {
+ include('skin/'._DEFAULT_SKIN.'/'.$include);
+ }
+ }
+ if (is_array(@$INCLUDES['html_head'][$page])) foreach ($INCLUDES['html_head'][$page] as $key => $include) {
+ if (file_exists("skin/$skin/$include")) {
+ include("skin/$skin/$include");
+ } elseif (file_exists('skin/'._DEFAULT_SKIN.'/'.$include)) {
+ include('skin/'._DEFAULT_SKIN.'/'.$include);
+ }
+ }
+ echo '<link rel="shortcut icon" href="/skin/classic/base/img/favicon.ico" />'."\n";
+ echo '</head>'."\n".'<body data-sessionid="'._SESSIONID.'" data-mayortoken="'.$_SESSION['mayorToken'].'" data-mayorrev="'._MAYORREV.'">'."\n";
+ if (is_string($SSSBB) && $SSSBB!='') echo $SSSBB;
+
+}
+
+// -------------------------------------------------------------------
+// mayor_menu(): a menü kiiratása
+// -------------------------------------------------------------------
+
+function mayor_menu($MENU,$sessionID,$lang = _DEFAULT_LANG,$skin = _DEFAULT_SKIN) {
+
+ global $policy, $page, $sub, $f, $LANGUAGES, $SKINSSHOW, $_COLORS,$NAV;
+// echo '<div id="hamburgerIcon"><span class="icon-align-justify"></span></div>';
+ echo '<div class="hamburger hamburger--squeeze"><span class="hamburger-box"><span class="hamburger-inner"></span></span></div>';
+
+ echo '<ul id="nav" class="hideShowContainer">'."\n";
+ if (is_array($MENU)) {
+
+ $active_page=false;
+ foreach ($MENU as $aModule => $pItems) {
+ if ($aModule != 'modules') {
+ for ($i = 0; $i < count($pItems); $i++) {
+ if ($page == $aModule and
+ ( $active_page===false && ( $_SERVER["REQUEST_URI"]=='/' || (!isset($pItems[$i]['url'])) || strpos($_SERVER["REQUEST_URI"],$pItems[$i]['url']) !== false || strpos($pItems[$i]['url'],"page=$page") !== false) )
+ ) {
+ echo '<li class="active">';
+ $active_page=true;
+ } else {
+ if ($page=='n4p1o' || count($NAV[1])>0)
+ echo '<li style="display: none;" class="openable">'; //--none
+ else
+ echo '<li style="display: ;" class="openable">'; //--none
+ }
+ if (isset($pItems[$i]['url']) && $pItems[$i]['url'] != '') {
+ if ($pItems[$i]['url'][0] == '&') $href = href("index.php?page=$aModule".$pItems[$i]['url']);
+ elseif (substr($pItems[$i]['url'],0,4) == 'http') $href = href($pItems[$i]['url'], array());
+ elseif (isset($pItems[$i]['get']) && is_array($pItems[$i]['get'])) $href = href($pItems[$i]['url'], $pItems[$i]['get']);
+ else $href = href($pItems[$i]['url']);
+ } else {
+ $href = href("index.php?page=$aModule");
+ }
+ echo '<a href="'.$href.'"'.((isset($pItems[$i]['target']))?' target="'.$pItems[$i]['target'].'" ':'').'>'
+ .$pItems[$i]['txt']
+ .'</a>'."\n";
+ // --- sub ---
+
+ @$pageArray = $MENU['modules'][$aModule];
+
+ if (is_array($pageArray) && count($pageArray)>0) {
+ echo '<ul class="sub">'."\n";
+ foreach ($pageArray as $aSub => $sItems) {
+ if ($aSub != 'sub') {
+ for ($j=0;$j<count($sItems);$j++) {
+ if (
+ $page == $aModule and
+ (
+ (!isset($sItems[$j]['url']) && $f == $aSub)
+ || (isset($sItems[$j]['url']) && strpos($_SERVER["REQUEST_URI"],$sItems[$j]['url']) !== false)
+ )
+ ) {
+ echo '<li class="active">'; $activeSub = true;
+ } else {
+ echo '<li>'; $activeSub = false;
+ }
+ if (isset($sItems[$j]['url']) && $sItems[$j]['url'] != '') {
+ if ($sItems[$j]['url'][0] == '&') $href = href("index.php?page=$aModule&f=$aSub".$sItems[$j]['url']);
+ elseif (substr($sItems[$j]['url'],0,4) == 'http') $href = href($sItems[$j]['url'], array());
+ elseif (isset($sItems[$j]['get']) && is_array($sItems[$j]['get'])) $href = href($sItems[$j]['url'], $sItems[$j]['get']);
+ else $href = href($sItems[$j]['url']);
+ } else {
+ $href = href("index.php?page=$aModule&f=$aSub",array('policy','sessionID','lang','skin'));
+ }
+ @$subArray = $MENU['modules'][$aModule]['sub'][$aSub];
+ if (!is_array($subArray) || count($subArray) == 0) {
+ echo '<a href="'.$href.'"'.((isset($sItems[$j]['target']))?' target="'.$sItems[$j]['target'].'" ':'').'>'
+ .$sItems[$j]['txt'].'</a>';
+ } else { // vannak al-al menúk (f - menü)
+ echo '<a class="larr" href="'.$href.'"'.((isset($sItems[$j]['target']))?' target="'.$sItems[$j]['target'].'" ':'').'>'
+ .$sItems[$j]['txt'].'</a>';
+ // -- f menü --
+ echo '<ul class="fmenu">'."\n";
+
+ foreach ($subArray as $anF => $items) {
+ for ($k=0;$k<count($items);$k++) {
+ if ($aModule == $page and
+ $aSub == $sub and
+ $anF == $f and
+ (!isset($items[$k]['url']) or strpos($_SERVER["REQUEST_URI"],$items[$k]['url']) !== false)
+ ) { echo '<li class="active">'."\n"; }
+ else { echo '<li>'."\n"; }
+
+ if (isset($items[$k]['url']) && $items[$k]['url'] != '') {
+ if ($items[$k]['url'][0] == '&') $href = href("index.php?page=$aModule&sub=$aSub&f=$anF".$items[$k]['url']);
+ elseif (substr($items[$k]['url'],0,4) == 'http') $href = href($items[$k]['url'], array());
+ elseif (isset($items[$k]['get']) && is_array($items[$k]['get'])) $href = href($items[$k]['url'], $items[$k]['get']);
+ else $href = href($items[$k]['url']);
+ } else {
+ $href = href("index.php?page=$aModule&sub=$aSub&f=$anF");
+ }
+ echo '<a href="'.$href.'"'.((isset($items[$k]['target']))?' target="'.$items[$k]['target'].'" ':'').'> '
+ .$items[$k]['txt'].' </a>'."\n";
+
+ echo '</li>'."\n"; // al-al menüpont vége (f)
+ } // for - on items
+ } // foreach - on subArray
+
+ echo '</ul>'."\n"; // fmenu
+ } // vannak al-al menük (f -menü)
+
+ echo '</li>'."\n"; // almenü-pont vége (sub)
+ } // for - on sItems
+ } // ha nem sub == aSub
+ } // foreach pageArray
+ echo '</ul>'."\n"; // submenu
+ } // vannak almenük (sub)
+ echo '</li>'."\n"; // menüpont vége (page)
+ } // for - on pItems
+ } // ha aModule != 'modules'
+ } // foreach on MENU
+ }
+ echo '<li class="start onClickHideShow">&nbsp;</li>';
+ echo '</ul>'."\n";
+
+ // ------------------------
+
+
+
+}
+
+// -------------------------------------------------------------------
+// html_mayor_head() : fejlec kiirasa (logo+menu+lastupdated)
+// -------------------------------------------------------------------
+
+function html_mayor_head($sessionID,$page,$sub,$f,$lang,$MENU,$skin = _DEFAULT_SKIN) {
+
+ global $INCLUDES, $INSTALLED_MODULES, $LANGUAGES, $SKINS, $SKINSSHOW, $policy, $SCHOOL_LOGO, $SCHOOL_IDENTITY, $SCHOOL_URL, $NAV;
+
+ _updateWindow();
+ _updateWindowSide();
+ _keyHelp();
+ _searchLayer();
+
+ echo '<div id="mayorhead">';
+ mayorGlobalLogin(defined('_USERACCOUNT') && (!is_string(_USERACCOUNT) || _USERACCOUNT=='') );
+
+ //if (date('m')==12) $imgextra = '-santa'; else $imgextra = '';
+ if (defined('_HOME_LOGO') && file_exists(_HOME_LOGO)) $HOME_LOGO=_HOME_LOGO;
+ elseif (!file_exists($HOME_LOGO = 'skin/'.$skin.'/base/img/mayor_small_ssl'.$imgextra.'.png'))
+ $HOME_LOGO = 'skin/'._DEFAULT_SKIN.'/base/img/mayor_small_ssl'.$imgextra.'.png';
+
+ if (defined('_HOME_LOGO_BADGE') && file_exists(_HOME_LOGO_BADGE)) $HOME_LOGO_BADGE=_HOME_LOGO_BADGE;
+// elseif (!file_exists($HOME_LOGO = 'skin/'.$skin.'/base/img/mayor_small_ssl'.$imgextra.'.png'))
+// $HOME_LOGO = 'skin/'._DEFAULT_SKIN.'/base/img/mayor_small_ssl'.$imgextra.'.png';
+
+ echo '<div id="head"></div>';
+
+ echo "<!--// NAV1 start //-->\n";
+ echo '<div id="nav1" data-nav1count="'.count($NAV[1]).'">';
+
+ echo '<div class="hideShowContainer">';
+
+ $db = 0; $max = __MAX_MENU; // Az egy sorba megjeleníthető menüpontok maximális száma
+ if (is_array($NAV[1])) foreach ($NAV[1] as $N1) {
+ $txt = '';
+ $i = intval($N1['index']);
+ if (isset($N1['sub'])) {
+ if (!isset($N1['f'])) {
+ $M = $MENU['modules'][ $N1['page'] ][ $N1['sub'] ][ $i ];
+ } else {
+ $M = $MENU['modules'][ $N1['page'] ]['sub'][ $N1['sub'] ][ $N1['f'] ][ $i ];
+ }
+ } elseif (isset($N1['f'])) {
+ $M = $MENU['modules'][ $N1['page'] ][ $N1['f'] ][ $i ];
+ } else {
+ $M = $MENU[$N1['page']][ $i ];
+ }
+ $txt = $M['txt'];
+ $url = $M['url'];
+ $get = $M['get'];
+ if (isset($get)) $href = href( isset($url)?$url:'index.php?page='.$N1['page'].'&sub='.$N1['sub'].'&f='.$N1['f'], $get);
+ else $href = href( isset($url)?$url:'index.php?page='.$N1['page'].'&sub='.$N1['sub'].'&f='.$N1['f']);
+ if ($db<$max) {
+ if ($page == $N1['page'] && $sub == $N1['sub'] && (!isset($N1['f']) || $f == $N1['f'])) $class = ' class="aktiv" '; else $class = '';
+ } else {
+ if ($page == $N1['page'] && $sub == $N1['sub'] && (!isset($N1['f']) || $f == $N1['f'])) $class = ' class="openable aktiv" '; else $class = ' class="openable" ';
+ $style = ' style="display: none;" ';
+ }
+ if ($txt != '') { // Hibás hivatkozás ne rontsa el a menüt!
+ if ($db == $max) echo '<span class="onClickHideShow openable">&nabla;</span><span class="onClickHideShow openable" style="display: none;">&Delta;</span><br />';
+ echo '<a href="'.$href.'"'.$class.$style.'>';
+ echo $txt;
+ echo '</a>';
+ $db++;
+ }
+ }
+
+ echo '</div>';
+ echo '</div>'."\n<!--// NAV1 end //-->\n";
+
+ mayor_menu($MENU,$sessionID,$lang,$skin);
+
+
+ echo '<div class="mayorLogo">';
+ echo '<a href="'.href('index.php').'">';
+ echo '<img src="'.$HOME_LOGO.'" alt="MaYoR" id="logo" />';
+ if ($HOME_LOGO_BADGE!='') echo '<img src="'.$HOME_LOGO_BADGE.'" alt="" id="logobadge" />';
+ echo '</a>';
+ echo '</div>';
+
+ /* ----------------- POZ ----------------- */
+ $loginout_img = _svgLoginout(array('print'=>false, 'color' => $_COLORS['login']));
+ $down_svg = _svgDown(array('print'=>false, 'color' => $_COLORS['login']));
+ echo '<ul id="poz">';
+ echo '<li>';
+ if (!defined('_SCHOOL_NAME')) define('_SCHOOL_NAME',_SITE); // TODO - ?
+ echo '<span class="school">'._SCHOOL_NAME.'</span>';
+ // if ($policy == 'public') {
+ if (defined('_USERACCOUNT') && (!is_string(_USERACCOUNT) || _USERACCOUNT=='')) {
+
+ echo '<div class="nev">';
+ //echo $down_svg.'<span class="onClickHideShow" style="padding-left:14px;" > '._LOGIN.'</span>';
+ echo '<a id="logout" title="'._LOGIN.'" href="'.href('index.php?page=auth&f=login&toPolicy=private',array('skin','lang','sessionID')).'">';
+ echo _LOGIN;
+ echo '</a>';
+ echo $loginout_img;
+
+ // echo '<div id="settings" class="openable" style="display: none">';
+ // echo '<table>';
+ // echo '<tr>';
+ // echo '<td><a href="'.href('index.php?page=auth&f=login&toPolicy=parent').'">'.str_replace(' ','&nbsp;',_PARENT_LOGIN).'</a></td>';
+ // echo '<td><a href="'.href('index.php?page=auth&f=login&toPolicy=private').'">'._LOGIN.'</a></td>';
+ // echo '</tr>';
+ // echo '</table>';
+ // echo '</div>';
+ echo '</div>';
+ } else {
+ $_class = $_profileImg ='';
+ if ($_SESSION['googleapi_object']['picture']!='') {
+// $_profileImg = '<a href="'.href('index.php?page=session&f=googleapi&userAccount='._USERACCOUNT).'"><img src="'.$_SESSION['googleapi_object']['picture'].'" style="height:12px;" /></a>';
+ $_class = 'googleapi';
+ }
+ if ($_SESSION['facebook_access_token']!='') {
+// echo '<a href="'.href('index.php?page=session&f=googleapi&userAccount='._USERACCOUNT).'"><img src="'.$_SESSION['googleapi_object']['picture'].'" style="height:12px;" /></a>';
+ $_class = 'fbconnect';
+ }
+ echo '<div class="nev hideShowContainer '.$_class.'">';
+
+ echo '<a href="'.href('index.php?page=password&f=changeMyPassword&toPolicy='.$policy.'&userAccount='._USERACCOUNT.'&policy=public',array('skin','lang','sessionID')).'"><span class="icon-key" title="'._PASSWORD.'"></span></a>';
+ echo '<a href="'.href('index.php?page=session&f=googleapi&userAccount='._USERACCOUNT).'"><span class="icon-googleplus" title="'._GOOGLEAPI.'"></span></a>';
+ echo '<a href="'.href('index.php?page=session&f=facebookConnect&userAccount='._USERACCOUNT).'"><span class="icon-facebook" title="'._FACEBOOK_CONNECT.'"></span></a>';
+
+ echo '<span class="onClickHideShow" >'._USERCN.'</span>';
+ //echo '<a id="logout" title="'._LOGOUT.'" href="'.href('index.php?page=session&f=logout&policy=public',array('skin','lang','sessionID')).'">';
+ //echo $loginout_img;
+ //echo '</a>';
+ echo ' <span class="onClickHideShow icon-cog"></span>';
+ echo '<div id="settings" class="openable" style="display: none">';
+ echo '<div>';
+ echo '<p class="name">'._USERCN.'</p>';
+ echo '<p class="account">'._USERACCOUNT.'</p>';
+ echo '</div>';
+ echo '<table>';
+ echo '<tr>';
+ echo '<td><a href="'.href('index.php?page=password&f=changeMyPassword&toPolicy='.$policy.'&userAccount='._USERACCOUNT.'&policy=public',array('skin','lang','sessionID')).'">'._PASSWORD.'</a></td>';
+ echo '<td><a href="'.href('index.php?page=session&f=logout&policy=public',array('skin','lang','sessionID')).'">'._LOGOUT.'</a></td>';
+ echo '</tr>';
+ echo '</table>';
+ formBegin();
+ $sessionMaxIdleTime=$sessionAlertTime=0;
+ if ((_SESSIONID!='' && _POLICY!='public') && defined('_SESSION_MAX_IDLE_TIME') && _SESSION_MAX_IDLE_TIME>0) {
+ $sessionMaxIdleTime=((_SESSION_MAX_IDLE_TIME*1000*60*60)+1000);
+ if (defined('_SESSION_ALERT_TIME')) $sessionAlertTime = ((_SESSION_MAX_IDLE_TIME*1000*60*60)-(_SESSION_ALERT_TIME*1000*60));
+ }
+ echo '<input type="hidden" id="SESSION_MAX_IDLE_TIME" value="'.$sessionMaxIdleTime.'" />';
+ echo '<input type="hidden" id="SESSION_ALERT_TIME" value="'.$sessionAlertTime.'" />';
+ formEnd();
+ echo '</div>';
+
+ echo '</div>';
+ } // policy != public
+ echo '</li>';
+ echo '</ul>';
+ // ------------- POZ ------------
+
+
+ echo "<!--// NAV2 start //-->\n";
+ $_defaultPageLayout = ($_SESSION['pageLayout']==0) ? 'vertical' : 'horizontal';
+ echo '<div id="nav2" class="'.$_defaultPageLayout.'">';
+// echo '<span id="hideNav2:tavtarto" class="onClickHide">X</span>';
+
+// $__M = $MENU['modules'][$page]['sub'][$sub];
+
+ echo '<div id="mayorIcons" class="icons" >';
+ echo '<span id="leftsideclose" class="icon-resize-full" title="'._ICON_SWAPNAV.'"></span>';
+// echo '<span id="" class="icon-envelope"></span>';
+// echo '<span id="skin-vakbarat" class="icon-blind"></span>';
+ if (in_array('vakbarat',$SKINSSHOW)) echo '<span id="skin-vakbarat" class="icon-braille" title="'._ICON_VAKBARAT.'"></span>';
+ if (in_array('oldschool',$SKINSSHOW)) echo '<span id="skin-oldschool" class="icon-view-mode" title="'._ICON_OLDSCHOOL.'"></span>';
+// echo '<span id="nav2fullmenu" class="icon-list"></span>';
+ echo '<span id="mayorMenuSearchIcon" class="icon-search" title="'._ICON_SEARCH.'"></span>';
+ echo '<span id="mayorErrorSign" class="icon-exclamation-sign" style="display:none"></span>';
+ // echo '<div class="g-signin2" data-onsuccess="onSignIn"></div>';
+ echo '</div>';
+
+ echo '<ul>';
+ if (is_array($NAV[2])) {
+ /* Plusz menü - teszt */
+ if (is_array($__M)) {
+ foreach ($__M as $__f=>$__D) {
+ echo '<li class="fullmenuitem">';
+ echo '<a href="">'.$__D[0]['txt'].'</a>';
+ echo '</li>';
+ }
+ }
+ foreach ($NAV[2] as $N2) {
+ $txt = '';
+ $i = intval($N2['index']);
+ if (isset($N2['sub'])) {
+ if (!isset($N2['f'])) {
+ $M = $MENU['modules'][ $N2['page'] ][ $N2['sub'] ][ $i ];
+ } else {
+ $M = $MENU['modules'][ $N2['page'] ]['sub'][ $N2['sub'] ][ $N2['f'] ][ $i ];
+ }
+ } elseif (isset($N2['f'])) {
+ $M = $MENU['modules'][ $N2['page'] ][ $N2['f'] ][ $i ];
+ } else {
+ $M = $MENU[$N2['page']][ $i ];
+ }
+ $txt = $M['txt'];
+ $url = $M['url'];
+ $get = $M['get'];
+ if (isset($get)) $href = href( isset($url)?$url:'index.php?page='.$N2['page'].'&sub='.$N2['sub'].'&f='.$N2['f'], $get);
+ else $href = href( isset($url)?$url:'index.php?page='.$N2['page'].'&sub='.$N2['sub'].'&f='.$N2['f']);
+
+ if ($page == $N2['page'] && $sub == $N2['sub'] && (!isset($N2['f']) || $f == $N2['f'])) $class = ' class="aktiv" '; else $class ='';
+ if ($txt != '') {
+ echo '<li class="nav2menuitem '.'">';
+ echo '<a href="'.$href.'"'.$class.'>';
+ if (isset($M['icon'])) echo '<span class="'.$M['icon'].'"> </span>';
+ echo $txt;
+ echo '</a>';
+ echo '</li>';
+ }
+ }
+ }
+ echo '</ul>';
+ if (function_exists('_nav2widget')) _nav2widget();
+ echo '</div>'."\n<!--// NAV2 end //-->\n";
+ echo '</div>'."\n";
+
+ mayor_menu_full($MENU);
+ mayor_breadcrumb();
+
+}
+
+
+// -------------------------------------------------------------------
+// html_mayor_foot() : lablec kiirasa ( )
+// -------------------------------------------------------------------
+
+function html_mayor_foot() {
+ $_defaultPageLayout = ($_SESSION['pageLayout']==0) ? 'leftpad' : 'toppad';
+ echo '<div class="mayorfoot '.$_defaultPageLayout.'" id="mayorfoot">'._MAIN_FOOTER.'</div>'."\n\n";
+ echo "</body>\n</html>";
+}
+
+function mayor_menu_full($MENU,$lang = _DEFAULT_LANG,$skin = _DEFAULT_SKIN) { // TESTING ONLY
+
+ global $policy, $page, $sub, $f, $LANGUAGES, $SKINSSHOW, $_COLORS, $NAVI;
+
+ echo '<div id="mayorNav" style="display:none">';
+
+ $NAVI[] = array('txt'=>'Kereső', 'url'=>'','icon'=>'icon-search','id'=>'mayorNaviSearchIcon');
+ if (count($NAVI)>0) {
+ echo '<div class="mayorNavIcons">';
+ for ($i=0; $i<count($NAVI); $i++) {
+ echo '<div id="'.$NAVI[$i]['id'].'">';
+ if ($NAVI[$i]['url']!='') echo '<a href="'.href($NAVI[$i]['url']).'">';
+ echo '<span class="'.$NAVI[$i]['icon'].'"></span><br/>';
+ echo $NAVI[$i]['txt'];
+ if ($NAVI[$i]['url']!='') echo '</a>';
+ echo '</div>';
+ }
+ echo '</div>';
+ }
+ echo '<ul>'."\n";
+ if (is_array($MENU)) {
+ $active_page=false;
+ foreach ($MENU as $aModule => $pItems) {
+ if ($aModule != 'modules') {
+ for ($i = 0; $i < count($pItems); $i++) {
+ if ($page == $aModule and
+ ( $active_page===false && ( $_SERVER["REQUEST_URI"]=='/' || (!isset($pItems[$i]['url'])) || strpos($_SERVER["REQUEST_URI"],$pItems[$i]['url']) !== false || strpos($pItems[$i]['url'],"page=$page") !== false) )
+ ) {
+ echo '<li class="active___">';
+ $active_page=true;
+ } else {
+ echo '<li style="display: ;" class="openable___">';
+
+ }
+ if (isset($pItems[$i]['url']) && $pItems[$i]['url'] != '') {
+ if ($pItems[$i]['url'][0] == '&') $href = href("index.php?page=$aModule".$pItems[$i]['url']);
+ elseif (substr($pItems[$i]['url'],0,4) == 'http') $href = href($pItems[$i]['url'], array());
+ elseif (isset($pItems[$i]['get']) && is_array($pItems[$i]['get'])) $href = href($pItems[$i]['url'], $pItems[$i]['get']);
+ else $href = href($pItems[$i]['url']);
+ } else {
+ $href = href("index.php?page=$aModule");
+ }
+ echo '<a href="'.$href.'"'.((isset($pItems[$i]['target']))?' target="'.$pItems[$i]['target'].'" ':'').'>'
+ .$pItems[$i]['txt']
+ .'</a>'."\n";
+ // --- sub ---
+
+ @$pageArray = $MENU['modules'][$aModule];
+
+ if (is_array($pageArray) && count($pageArray)>0) {
+ echo '<ul class="sub">'."\n";
+ foreach ($pageArray as $aSub => $sItems) {
+ if ($aSub != 'sub') {
+ for ($j=0;$j<count($sItems);$j++) {
+ if (
+ $page == $aModule and
+ (
+ (!isset($sItems[$j]['url']) && $f == $aSub)
+ || (isset($sItems[$j]['url']) && strpos($_SERVER["REQUEST_URI"],$sItems[$j]['url']) !== false)
+ )
+ ) {
+ echo '<li class="active">'; $activeSub = true;
+ } else {
+ echo '<li>'; $activeSub = false;
+ }
+ if (isset($sItems[$j]['url']) && $sItems[$j]['url'] != '') {
+ if ($sItems[$j]['url'][0] == '&') $href = href("index.php?page=$aModule&f=$aSub".$sItems[$j]['url']);
+ elseif (substr($sItems[$j]['url'],0,4) == 'http') $href = href($sItems[$j]['url'], array());
+ elseif (isset($sItems[$j]['get']) && is_array($sItems[$j]['get'])) $href = href($sItems[$j]['url'], $sItems[$j]['get']);
+ else $href = href($sItems[$j]['url']);
+ } else {
+ $href = href("index.php?page=$aModule&f=$aSub",array('policy','sessionID','lang','skin'));
+ }
+ @$subArray = $MENU['modules'][$aModule]['sub'][$aSub];
+ if (!is_array($subArray) || count($subArray) == 0) {
+ echo '<a href="'.$href.'"'.((isset($sItems[$j]['target']))?' target="'.$sItems[$j]['target'].'" ':'').'>'
+ .$sItems[$j]['txt'].'</a>';
+ } else { // vannak al-al menúk (f - menü)
+ echo '<a class="larr" href="'.$href.'"'.((isset($sItems[$j]['target']))?' target="'.$sItems[$j]['target'].'" ':'').'>'
+ .$sItems[$j]['txt'].'</a>';
+ // -- f menü --
+ echo '<ul class="fmenu">'."\n";
+
+ foreach ($subArray as $anF => $items) {
+ for ($k=0;$k<count($items);$k++) {
+ if ($aModule == $page and
+ $aSub == $sub and
+ $anF == $f and
+ (!isset($items[$k]['url']) or strpos($_SERVER["REQUEST_URI"],$items[$k]['url']) !== false)
+ ) { echo '<li class="active">'."\n"; }
+ else { echo '<li>'."\n"; }
+
+ if (isset($items[$k]['url']) && $items[$k]['url'] != '') {
+ if ($items[$k]['url'][0] == '&') $href = href("index.php?page=$aModule&sub=$aSub&f=$anF".$items[$k]['url']);
+ elseif (substr($items[$k]['url'],0,4) == 'http') $href = href($items[$k]['url'], array());
+ elseif (isset($items[$k]['get']) && is_array($items[$k]['get'])) $href = href($items[$k]['url'], $items[$k]['get']);
+ else $href = href($items[$k]['url']);
+ } else {
+ $href = href("index.php?page=$aModule&sub=$aSub&f=$anF");
+ }
+ echo '<a href="'.$href.'"'.((isset($items[$k]['target']))?' target="'.$items[$k]['target'].'" ':'').'> '
+ .$items[$k]['txt'].' </a>'."\n";
+
+ echo '</li>'."\n"; // al-al menüpont vége (f)
+ } // for - on items
+ } // foreach - on subArray
+
+ echo '</ul>'."\n"; // fmenu
+ } // vannak al-al menük (f -menü)
+
+ echo '</li>'."\n"; // almenü-pont vége (sub)
+ } // for - on sItems
+ } // ha nem sub == aSub
+ } // foreach pageArray
+ echo '</ul>'."\n"; // submenu
+ } // vannak almenük (sub)
+ echo '</li>'."\n"; // menüpont vége (page)
+ } // for - on pItems
+ } // ha aModule != 'modules'
+ } // foreach on MENU
+ }
+ echo '</ul>'."\n";
+ echo '</div>'."\n";
+
+ // ------------------------
+
+
+
+}
+
+function mayor_breadcrumb() { // TESTING ONLY
+
+ return false;
+ global $MENU,$page;
+ echo '<div class="breadcrumbs" style="position:fixed; top:100px; right:20px; z-index:100000; background-color: red;">';
+ echo '<ul>';
+ for ($i=0; $i<count($_SESSION['breadcrumb']); $i++) {
+ $H = $_SESSION['breadcrumb'][$i];
+ echo '<li>';
+ echo implode(':',$H).' = ';
+ echo '<a href="'.href('index.php?page='.$H['page'].'&sub='.$H['sub'].'&f='.$H['f']).'">'.$H['txt'].'</a>';
+ echo '</li>';
+ }
+ echo '</ul>';
+ echo '</div>';
+}
+
+//dump(array_keys($MENU));
+//dump($MENU['modules']);
+ // naplo:orarend:i:[txt,url,refresh,icon]
+ // portal:sub:
+//die();
+
+?>
diff --git a/mayor-orig/www/skin/classic/base/img/ajaxLoad.gif b/mayor-orig/www/skin/classic/base/img/ajaxLoad.gif
new file mode 100644
index 00000000..ab584bdf
--- /dev/null
+++ b/mayor-orig/www/skin/classic/base/img/ajaxLoad.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/base/img/alert.png b/mayor-orig/www/skin/classic/base/img/alert.png
new file mode 100644
index 00000000..ae0b97e6
--- /dev/null
+++ b/mayor-orig/www/skin/classic/base/img/alert.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/base/img/favicon.ico b/mayor-orig/www/skin/classic/base/img/favicon.ico
new file mode 100644
index 00000000..b62f5763
--- /dev/null
+++ b/mayor-orig/www/skin/classic/base/img/favicon.ico
Binary files differ
diff --git a/mayor-orig/www/skin/classic/base/img/flags/de_DE.gif b/mayor-orig/www/skin/classic/base/img/flags/de_DE.gif
new file mode 100644
index 00000000..eec5b66b
--- /dev/null
+++ b/mayor-orig/www/skin/classic/base/img/flags/de_DE.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/base/img/flags/en_US.gif b/mayor-orig/www/skin/classic/base/img/flags/en_US.gif
new file mode 100644
index 00000000..06fdc66b
--- /dev/null
+++ b/mayor-orig/www/skin/classic/base/img/flags/en_US.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/base/img/flags/hu_HU.gif b/mayor-orig/www/skin/classic/base/img/flags/hu_HU.gif
new file mode 100644
index 00000000..8a85f033
--- /dev/null
+++ b/mayor-orig/www/skin/classic/base/img/flags/hu_HU.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/base/img/flags/jp_JP.gif b/mayor-orig/www/skin/classic/base/img/flags/jp_JP.gif
new file mode 100644
index 00000000..b4100239
--- /dev/null
+++ b/mayor-orig/www/skin/classic/base/img/flags/jp_JP.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/base/img/gradient.jpg b/mayor-orig/www/skin/classic/base/img/gradient.jpg
new file mode 100644
index 00000000..57d9afbc
--- /dev/null
+++ b/mayor-orig/www/skin/classic/base/img/gradient.jpg
Binary files differ
diff --git a/mayor-orig/www/skin/classic/base/img/gradient.png b/mayor-orig/www/skin/classic/base/img/gradient.png
new file mode 100644
index 00000000..e9a9cfca
--- /dev/null
+++ b/mayor-orig/www/skin/classic/base/img/gradient.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/base/img/mayor_small_ssl-flip.png b/mayor-orig/www/skin/classic/base/img/mayor_small_ssl-flip.png
new file mode 100644
index 00000000..5021cec5
--- /dev/null
+++ b/mayor-orig/www/skin/classic/base/img/mayor_small_ssl-flip.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/base/img/mayor_small_ssl-marc15.png b/mayor-orig/www/skin/classic/base/img/mayor_small_ssl-marc15.png
new file mode 100644
index 00000000..84a84068
--- /dev/null
+++ b/mayor-orig/www/skin/classic/base/img/mayor_small_ssl-marc15.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/base/img/mayor_small_ssl-santa.png b/mayor-orig/www/skin/classic/base/img/mayor_small_ssl-santa.png
new file mode 100644
index 00000000..bdd10d8b
--- /dev/null
+++ b/mayor-orig/www/skin/classic/base/img/mayor_small_ssl-santa.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/base/img/mayor_small_ssl.gif b/mayor-orig/www/skin/classic/base/img/mayor_small_ssl.gif
new file mode 100644
index 00000000..378ffb88
--- /dev/null
+++ b/mayor-orig/www/skin/classic/base/img/mayor_small_ssl.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/base/img/mayor_small_ssl.jpg b/mayor-orig/www/skin/classic/base/img/mayor_small_ssl.jpg
new file mode 100644
index 00000000..74e323c8
--- /dev/null
+++ b/mayor-orig/www/skin/classic/base/img/mayor_small_ssl.jpg
Binary files differ
diff --git a/mayor-orig/www/skin/classic/base/img/mayor_small_ssl.png b/mayor-orig/www/skin/classic/base/img/mayor_small_ssl.png
new file mode 100644
index 00000000..ca42a8d0
--- /dev/null
+++ b/mayor-orig/www/skin/classic/base/img/mayor_small_ssl.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/base/img/policy/parent.gif b/mayor-orig/www/skin/classic/base/img/policy/parent.gif
new file mode 100644
index 00000000..cbb71a41
--- /dev/null
+++ b/mayor-orig/www/skin/classic/base/img/policy/parent.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/base/img/policy/parent100.gif b/mayor-orig/www/skin/classic/base/img/policy/parent100.gif
new file mode 100644
index 00000000..1d14530b
--- /dev/null
+++ b/mayor-orig/www/skin/classic/base/img/policy/parent100.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/base/img/policy/parent100.png b/mayor-orig/www/skin/classic/base/img/policy/parent100.png
new file mode 100644
index 00000000..9537b1ba
--- /dev/null
+++ b/mayor-orig/www/skin/classic/base/img/policy/parent100.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/base/img/policy/private.gif b/mayor-orig/www/skin/classic/base/img/policy/private.gif
new file mode 100644
index 00000000..238bc04b
--- /dev/null
+++ b/mayor-orig/www/skin/classic/base/img/policy/private.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/base/img/policy/private100.gif b/mayor-orig/www/skin/classic/base/img/policy/private100.gif
new file mode 100644
index 00000000..82faef04
--- /dev/null
+++ b/mayor-orig/www/skin/classic/base/img/policy/private100.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/base/img/policy/private100.png b/mayor-orig/www/skin/classic/base/img/policy/private100.png
new file mode 100644
index 00000000..f2716596
--- /dev/null
+++ b/mayor-orig/www/skin/classic/base/img/policy/private100.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/base/img/policy/public.gif b/mayor-orig/www/skin/classic/base/img/policy/public.gif
new file mode 100644
index 00000000..21a7298c
--- /dev/null
+++ b/mayor-orig/www/skin/classic/base/img/policy/public.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/base/img/policy/public100.gif b/mayor-orig/www/skin/classic/base/img/policy/public100.gif
new file mode 100644
index 00000000..368c7a4d
--- /dev/null
+++ b/mayor-orig/www/skin/classic/base/img/policy/public100.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/base/img/policy/public100.png b/mayor-orig/www/skin/classic/base/img/policy/public100.png
new file mode 100644
index 00000000..8aee3a73
--- /dev/null
+++ b/mayor-orig/www/skin/classic/base/img/policy/public100.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/base/javascript/base.jquery.min.js b/mayor-orig/www/skin/classic/base/javascript/base.jquery.min.js
new file mode 100644
index 00000000..713de384
--- /dev/null
+++ b/mayor-orig/www/skin/classic/base/javascript/base.jquery.min.js
@@ -0,0 +1,977 @@
+var debug = false;
+function _debug(str) {
+ if (debug) console.log(str);
+}
+
+// A $.getScript hívás cache-eléséért...
+$.ajaxSetup({
+ cache: true
+});
+
+includeCSS = function(href) {
+ for (i = 0; i < arguments.length; i++) {
+ href = arguments[i];
+ var cssLink = $("<link>");
+ $("head").append(cssLink); //IE hack: append before setting href
+ cssLink.attr({
+ rel: "stylesheet",
+ type: "text/css",
+ href: href+'?r='+$('body').data('mayorrev')
+ });
+ }
+};
+
+// Hogy az aloldalak megváják az alábbi modulok betöltését...
+$.holdReady(true);
+ // A korábbi loadJs megoldás helyett...
+ includeCSS(
+ "skin/classic/share/javascript/jquery-ui/css/base/jquery-ui.min.css",
+ "skin/classic/share/javascript/jquery-ui/css/base/jquery-ui-timepicker-addon.css"
+ );
+
+ $.getScript("skin/classic/share/javascript/jquery-ui/jquery-ui.min.js").done(function() {
+ $.getScript("skin/classic/share/javascript/jquery-ui/i18n/jquery.ui.datepicker-hu.min.js").done(function() {
+ $.getScript("skin/classic/share/javascript/jquery-ui/jquery-ui-timepicker-addon.js").done(function() {
+ $.getScript("skin/classic/share/javascript/jquery-ui/i18n/jquery-ui-timepicker-hu.js").done(function() {
+ $.holdReady(false);
+ });
+ });
+ });
+ });
+
+
+$(document).ready(function() {
+
+ /*var isMobile = false;
+ if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)
+ || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4))) isMobile = true;
+ */
+
+ $('body').bind('click', mayorClick);
+ $('body').bind('change', mayorChange);
+ $('body').bind('keypress', mayorKeyPress);
+ $('body').bind('keydown', mayorKeyDown);
+ $('body').bind('submit', mayorSubmit);
+
+ $(window).resize(mayorNavResize);
+ if ($(document).width()>$(window).width()) mayorNavResize();
+ $('#leftsideclose').bind('click', mayorNavResize);
+
+ if (e = $('#focus')) e.focus(); // A focus id-t használhatjuk automatikus fokuszálásra... (ld. login)
+ // A loadUrl id-t használhatjuk automatikus betöltésre... hol használunk ilyet? Például a download oldalon.
+ loadElement = $('#loadUrl');
+ if (loadElement.length > 0) { window.location.replace(loadElement.attr('href')); }
+
+ $('.date').datepicker({ dateFormat: "yy-mm-dd" });
+ $('.datetime').datetimepicker({ dateFormat: "yy-mm-dd", timeFormat: "HH:mm", controlTypee: "select" });
+ $('#hideHelp').click(function() { $('#takaro').hide(); });
+ $('#help').draggable();
+ $('#updateWindow').draggable({ handle: '#updateHeader' });
+ var uwNext = {'width': '100%', 'top': '10px', 'left': '0px' };
+ $('#updateHeader').dblclick(function(event) {
+ tmp = $('#updateWindow').css(['width','top','left']);
+ $('#updateWindow').css(uwNext);
+ uwNext = tmp;
+ });
+
+ // hibakijelzés
+ mayorErrorCounter = 0;
+ $('#mayorErrorSmall').hover(
+ function() {
+ if ($('#mayorErrorSmall div').height() > 25 ) {
+ var h = $('#mayorErrorSmall div').height();
+ if (h>=300) h=300;
+ $('#mayorErrorSmall').css('overflow','auto');
+ $('#mayorErrorSmall').stop().animate({height: h+"px"}, 400);
+ }
+ mayorErrorCounter++;
+ },
+ function() {
+ if ($('#mayorErrorSmall').hasClass('closedbyuser')==true) return;
+ if ($('#mayorErrorSmall div').height() > 25 ) {
+ $('#mayorErrorSmall').css('overflow','hidden');
+ }
+ if (mayorErrorCounter>3) {
+ $('#mayorErrorSmall').slideUp( 300 );
+// $('#mayorErrorSign').show().animate({ color: 'red'}, 1000).delay(1000).animate({color: "#778899"}, 1000);
+ $('#mayorErrorSign').fadeIn(300);
+ } else {
+ $('#mayorErrorSmall').stop().animate({height: "20px"}, 200);
+ }
+ }
+ );
+
+// !!!!!!!!!!!!!!!!!!!
+// !!!!!!!!!!!!!!!!!!! DEV
+// $('#mayorNav').toggle();
+
+ $('#hamburgerIcon').click(function(){
+ window.scrollTo(0, 0);
+ $(this).toggleClass('nyitva').toggleClass('is-active');
+ $('#mayorNav').toggle();
+ });
+
+ $('.hamburger').click(function(){
+ window.scrollTo(0, 0);
+ $(this).toggleClass('is-active');
+ $('#mayorNav').toggle();
+ });
+
+ // --TODO mayorClick()
+ $('#mayorErrorHide').click(function(){
+ mayorErrorCounter=0;
+ $('#mayorErrorSmall').addClass('closedbyuser').fadeOut('fast');
+ $('#mayorErrorSign').fadeIn('fast');
+ });
+ // --TODO mayorClick();
+ $('#mayorErrorSign').click(function(){
+ mayorErrorCounter=0;
+ $('#mayorErrorSmall').slideDown(100);
+ $('#mayorErrorSign').fadeOut();
+ });
+ // --TODO mayorSubmit
+ $('#mayorGlobalLogin form.check').submit(function() {
+ var inputs = $('#mayorGlobalLogin form input');
+ for (i=0 ; i<inputs.length; i++) {
+ if (inputs[i].name==='userAccount' || inputs[i].name==='userPassword') {
+ if ($(inputs[i]).val() === '') {
+ $(inputs[i]).prev().addClass('failed');
+ return false;
+ }
+ }
+ }
+ $('#mayorGlobalLogin form').submit();
+ });
+ $('#mayorGlobalLogin form input').focus(function(event) {
+ $(event.target).prev().removeClass('failed');
+ });
+ $('#mayorGlobalLogin div.large').hover(function(event) {
+ $(event.target).removeClass('icon-lock').addClass('icon-unlock');
+ },function(event) {
+ $(event.target).removeClass('icon-unlock').addClass('icon-lock');
+ }
+ );
+ $('#mayorGlobalLogin form.fb').submit(function() { // facebook
+ FB.getLoginStatus(function(response) {
+ if (response.status === 'connected') {
+ mayor_facebookconnect_redirect();
+ } else if (response.status === 'not_authorized') {
+ FB.login(function(loginResponse) {
+ if (loginResponse.status=='connected') {
+ mayor_facebookconnect_redirect();
+ }
+ });
+ } else {
+ FB.login(function(loginResponse) {
+ if (loginResponse.status=='connected') {
+ mayor_facebookconnect_redirect();
+ }
+ });
+ }
+ },true);
+ return false;
+ });
+
+ $('#logo').on('dragstart', function(event) { event.preventDefault(); });
+
+ // onLoadUpdate
+ $('.onLoadUpdate').each( function(index, element) {
+ var formElement = $(element).closest('form');
+ updateForm(formElement, $(element));
+ });
+
+ var url = document.URL;
+ if (url.indexOf('policy=private')>0) {
+ if ($('#SESSION_ALERT_TIME').val() !== undefined) {
+ var sessionAlertTime = $('#SESSION_ALERT_TIME').val();
+ if (sessionAlertTime>0) setTimeout('mayorSessionTimeOutAlert()',sessionAlertTime);
+ }
+ if ($('#SESSION_MAX_IDLE_TIME').val() !== undefined) {
+ var sessionMaxIdleTime = $('#SESSION_MAX_IDLE_TIME').val();
+ if (sessionMaxIdleTime>0) setTimeout('mayorSessionTimedOut()',sessionMaxIdleTime);
+ }
+ }
+ $('form').preventDoubleSubmission();
+
+});
+
+/*
+ .gsub --> .replace
+ .up --> parents()[0] = parent(), vagy inkább closest?
+ include --> indexOf() > -1
+ .down --> .find
+ $F() --> .val()
+*/
+
+(function($) {
+ var re = /([^&=]+)=?([^&]*)/g;
+ var decode = function(str) {
+ return decodeURIComponent(str.replace(/\+/g, ' '));
+ };
+ $.parseParams = function(query) {
+ var params = {}, e;
+ if (query) {
+ if (query.substr(0, 1) == '?') {
+ query = query.substr(1);
+ }
+
+ while (e = re.exec(query)) {
+ var k = decode(e[1]);
+ var v = decode(e[2]);
+ if (params[k] !== undefined) {
+ if (!$.isArray(params[k])) {
+ params[k] = [params[k]];
+ }
+ params[k].push(v);
+ } else {
+ params[k] = v;
+ }
+ }
+ }
+ return params;
+ };
+})(jQuery);
+
+mayorKeyDown = function(event) {
+ var element = $(event.target);
+ var charKeyCode = event.keyCode ? event.keyCode : event.which;
+ var shiftKey = event.shiftKey ? event.shiftKey : ((charKeyCode == 16) ? true : false);
+ var altKey = event.altKey ? event.altKey : ((charKeyCode == 18) ? true : false);
+ var ctrlKey = event.ctrlKey ? event.ctrlKey : ((charKeyCode == 17) ? true : false);
+
+ // Esc - WebKit csak keyup esetén
+ if (charKeyCode==27) { // Esc
+ $('#takaro').hide(); // takaró elem
+ $('#keyHelp').hide(); // gyorsbillentyűk
+ $('#help').hide(); // súgó
+ $('.inlinehelp .openable').hide(); // helyi súgó
+ $('#mayorSearch').hide(); // kereső
+ if ($('#inform') !== null) $('#inform').parent('div').hide(); // haladási/tanmenet
+ if ($('#haladform') !== null) $('#haladform').parent('div').hide(); // haladási/tankör órái
+ if ($('#jegyAdat') !== null) $('#jegyAdat').hide(); // osztályozó/tankor
+ if ($('#updateWindow').is(':visible')) {
+ $('#updateWindow').hide(); // update ablak
+ if ($.isFunction(hideUpdateLayer)) hideUpdateLayer();
+ }
+ if ($('#updateWindowSideSub').hasClass('nyitva') ) {
+ $('#updateWindowSideSub').removeClass('nyitva');
+ } else if ($('#updateWindowSide').hasClass('nyitva') ) {
+ $('#updateWindowSide').removeClass('nyitva'); // update ablak (jobb oldal)
+ if ($.isFunction(hideUpdateWindowSide)) hideUpdateWindowSide();
+ } else if (ctrlKey) { //nyitjuk
+ $('#updateWindowSide').addClass('nyitva');
+ //$('#updateWindowSideSub').toggleClass('nyitva');
+ }
+ } else if (charKeyCode==112) { // F1 - Help // charKeyCode==121 F10
+ var params = $.parseParams(window.location.toString().split('?')[1] || '' );
+ var page=params.page?params.page:'';
+ var sub=params.sub?params.sub:'';
+ var f=params.f?params.f:'';
+ var url = "http://wiki.mayor.hu/doku.php?id="+page+":"+sub+":"+f;
+ var helpElement = $('#help');
+ if (typeof(helpElement) === 'undefined' || helpElement === null) {
+ window.open(url,'help');
+ } else {
+ if (helpElement.css('display') == 'none') helpElement.children('iframe').prop('src',url);
+ $('#takaro').fadeToggle('fast'); // takaró elem
+ helpElement.fadeToggle('fast');
+ }
+// event.stopImmediatePropagation();
+ event.preventDefault();
+// event.stopPropagation();
+ } else if (charKeyCode==86 && ctrlKey && shiftKey) { // Ctrl-Shift-V: Vakbarát nézet
+ if (location.toString().indexOf('skin')>-1) {
+ window.location = location.toString().replace(/skin=([^&]*)/,'skin=vakbarat');
+ } else {
+ if (location.toString().indexOf('?')>-1) window.location = location.toString()+'&skin=vakbarat';
+ else window.location = location.toString()+'?skin=vakbarat';
+ }
+ } else if (charKeyCode==38) { // fel nyíl
+ if (element.closest('#mayorSearch').length == 1) {
+ $('#mayorSearch *:focus').removeClass('aktiv').prev('a').focus();
+ $('#mayorSearch a:focus').addClass('aktiv');
+ event.preventDefault();
+ }
+ } else if (charKeyCode==40) { // le nyíl
+ if (element.closest('#mayorSearch').length == 1) {
+ $('#mayorSearch *:focus').removeClass('aktiv').next('a').focus();
+ $('#mayorSearch a:focus').addClass('aktiv');
+ event.preventDefault();
+ }
+ } else {
+ }
+
+}
+
+mayorKeyPress = function(event) {
+ var element = $(event.target);
+ var charKeyCode = event.keyCode ? event.keyCode : event.which;
+ var shiftKey = event.shiftKey ? event.shiftKey : ((charKeyCode == 16) ? true : false);
+ var altKey = event.altKey ? event.altKey : ((charKeyCode == 18) ? true : false);
+ var ctrlKey = event.ctrlKey ? event.ctrlKey : ((charKeyCode == 17) ? true : false);
+
+ if ($('capsLockWarning')) {
+ var s = String.fromCharCode( event.which );
+ if ( s.toUpperCase() === s && s.toLowerCase() !== s && !event.shiftKey ) {
+ $('#capsLockWarning').show();
+ } else {
+ $('#capsLockWarning').hide();
+ }
+ }
+
+ // formon belül
+ if(event.target.type!='text' && event.target.type!='textarea' && event.target.type!='select' && event.target.type!='select-one' && event.target.type!='password') {
+ var location = window.location.toString();
+ if (charKeyCode==63) { // ?: Help
+ $('#takaro').toggle();
+ $('#keyHelp').toggle();
+ } else if (charKeyCode==83) { // S: settings
+ $('#settings').toggle();
+ } else if (charKeyCode==70 || charKeyCode==95) { // F,_: find
+ $('#mayorSearch').toggle();
+ event.preventDefault();
+ $('#mayorSearch input[type=text]').focus();
+ } else if (charKeyCode==68) { // D: debug
+ $('#debug').toggle();
+// } else if (charKeyCode==104) {
+// alert('Alt-H: HELP: '+event.altKey+event.target.type);
+ } else if (charKeyCode==76) { // L: login/logout
+ if (location.indexOf('policy=private')>-1 || location.indexOf('policy=parent')>-1) {
+ window.location = window.location.toString().replace(/page=([^&]*)/,'page=session').replace(/sub=([^&]*)/,'sub=').replace(/f=([^&]*)/,'f=logout').replace(/policy=([^&]*)/,'policy=public');
+ } else {
+ if (location.indexOf('?')>-1) {
+ // window.location = window.location.toString().replace(/page=([^&]*)/,'page=auth').replace(/sub=([^&]*)/,'sub=').replace(/f=([^&]*)/,'f=login').replace(/policy=([^&]*)/,'policy=public');
+ window.location=window.location.toString().replace(/\?(.*)/,'')+'?page=auth&f=login';
+ } else {
+ window.location = window.location+'?page=auth&sub=&f=login&policy=public';
+ }
+ }
+ } else {
+ }
+ }
+}
+
+mayorClick = function(event) {
+ var element = $(event.target);
+ $('body').data('lastClick',element);
+ $('.inlinehelp .openable:visible').hide();
+ $('#mayorSearch:visible').hide();
+ if (element.hasClass('confirm')) {
+ // A confirm elemre kattintva a form jóváhagyását előbb jóvá kell hagyni
+ if (!confirm(element.prop('title'))) {
+ event.preventDefault();
+ }
+ }
+ if (element.hasClass('onClickHideShow')) {
+ var o = element.parents('.hideShowContainer').find('.openable').toggle();
+ event.preventDefault();
+ }
+
+ if (element.hasClass('onClickHide')) {
+ // Az onClickHide elem kattintásra becsukja a hozzárendelt elemet. A hozzárendelés
+ // az id-ben történik: 'hide'+ElemId+[':'+elemId2...]
+ var id = element[0].id;
+ if (id && id.substring(0,4) == 'hide') {
+ var openables = ('#'+id.charAt(4).toLowerCase()+ id.substring(5).replace(':',', #') );
+ $(openables).hide();
+ }
+ }
+ if (element.hasClass('onClickShow')) {
+ // Az onClickShow elem kattintásra kinyitja a hozzárendelt elemet, miközben a többi
+ // őt tartalmazó hideShowContainer-en belüli openable elemet becsukaja. A hozzárendelés
+ // az id-ben történik: 'show'+ElemId+[':'+elemId2...]
+ var container = element.parents('.hideShowContainer');
+ var openable = container.find('.openable').hide();
+ var onclickshow = container.find('.onClickShow').removeClass('selected');
+ var id = element[0].id;
+ if (id && id.substring(0,4) == 'show') {
+ var openables = ('#'+id.charAt(4).toLowerCase()+ id.substring(5).replace(':',', #') );
+ $(openables).show();
+ }
+ element.addClass('selected');
+ }
+ if (element[0].id == 'updateCloseButtonClick') {
+ if ($('#updateWindow').is(':visible')) {
+ $('#updateWindow').hide();
+ $('#takaro').hide();
+ if ($.isFunction(hideUpdateLayer)) hideUpdateLayer();
+ }
+ }
+ if (element[0].id == 'btn_updateWindowSideClose') {
+ //if ($('#updateWindowSide').is(':visible')) {
+ $('#updateWindowSideSub').removeClass('nyitva');
+ $('#updateWindowSide').removeClass('nyitva');
+ if ($.isFunction(hideUpdateWindowSide)) hideUpdateWindowSide();
+ //}
+ }
+ if (element[0].id == 'btn_updateWindowSideSubClose') {
+ $('#updateWindowSideSub').removeClass('nyitva');
+ if ($.isFunction(hideUpdateWindowSideSub)) hideUpdateWindowSideSub();
+ }
+ if (element.hasClass('onClickUpdateAction')) {
+//TODO - check
+ element.parents('form').find('input[name=action]').val(element[0].id);
+ }
+ if (element.hasClass('onClickUpdateWindow')) {
+ // A kattintott elem href paraméteréből vett url-ből kiveszi a getParameters-ben megadott
+ // paramétereken kívüli paramétereket, ezeket post paraméterként rakja az updateForm-ba.
+ // Az url "maradéka" pedig a form action-be kerül, végül update-eli a form-ot...
+ formElement = $('#updateForm');
+ formElement.html('');
+ var origUrl = '', title = '';
+ if (element.prop('title')) $('#updateHeader').html(element.prop('title'));
+ if (element.prop('href')) origUrl = element.prop('href');
+ var pos = origUrl.indexOf("?");
+ if (pos != -1) url = origUrl.substr(0,pos);
+ else url = origUrl;
+ var getParameters = ["page", "sub", "f", "lang", "sessionID", "policy"];
+ var separator = '?';
+
+ var o = $.parseParams( origUrl.split('?')[1] );
+ $.each(o,function(key,value) {
+ if (getParameters.indexOf(key) != -1) {
+ url = url+separator+key+'='+value;
+ separator='&';
+ } else if (key == 'skin') {
+ url = url+separator+'skin=ajax';
+ separator='&';
+ } else {
+ //formElement.insert({ bottom: new Element('input', {type : 'hidden', name : key, value : value}) });
+ jQuery('<input/>').attr('type','text').attr('name',key).attr('value',value).appendTo(formElement);
+ }
+ });
+
+ formElement.prop('action',url);
+ updateForm(formElement, element);
+// event.stopImmediatePropagation();
+ event.preventDefault();
+ event.stopPropagation();
+ }
+ if (element.hasClass('onClickUpdate')) {
+ event.preventDefault();
+ // Az onClickUpdate class tagjaira kattintva update-eli az őket tartalmazó formot
+ var formElement = element.parents("form");
+ updateForm(formElement, element);
+ event.preventDefault();
+ event.stopPropagation();
+// jQuery.post(url);
+ }
+ if (event.target.id == 'nav2fullmenu') {
+ $('#nav2').find('.fullmenuitem').toggle();
+ $('#nav2').find('.nav2menuitem').toggle();
+ $('#nav2fullmenu').toggleClass('aktiv');
+ }
+ if (event.target.id ==='skin-oldschool') {
+ mayorSkinChange('oldschool');
+ }
+ if (event.target.id ==='skin-vakbarat') {
+ mayorSkinChange('vakbarat');
+ }
+}
+
+
+
+
+// || event.target.id ==='mayorNaviSearchIcon') {
+
+
+mayorSkinChange = function(toSkin) {
+ if (location.toString().indexOf('skin')>-1) {
+ window.location = location.toString().replace(/skin=([^&]*)/,'skin='+toSkin);
+ } else {
+ if (location.toString().indexOf('?')>-1) window.location = location.toString()+'&skin='+toSkin;
+ else window.location = location.toString()+'?skin='+toSkin;
+ }
+}
+
+mayorChange = function(event) {
+
+ var element = $(event.target);
+
+ if (element.hasClass('onChangeSubmit') && window.location.toString().indexOf('skin=vakbarat')<=0) {
+ element.parents('form').submit();
+ }
+ if (element.closest('form.onChangeRequest').length > 0) {
+ var formElement = element.closest('form.onChangeRequest');
+
+ var uriOrig = formElement.attr('action');
+ var uri = formElement.attr('action').replace(/skin=([^&]*)/,'skin=ajax')+'&request=true';
+
+ // input class="ajaxOption"-ban megadott value="onChangeRequestStop" tudja tiltani az eseményt (új szülő felvétele - diakSzulo oldal)
+ var ajaxRequestOK = (formElement.find('input.ajaxOption[value=onChangeRequestStop]').length == 0);
+ // A class="DOA" - disable on ajax req - elemek letiltása
+ formElement.find('.DOA').prop('disabled',true);
+
+ formElement.attr('action', uri);
+ element.addClass('ajaxRequest');
+ if (ajaxRequestOK) {
+ ajaxRequest(formElement, {
+ onSuccess: function(transport, status, xhr) {
+ element.addClass('ajaxRequestDone');
+ element.removeClass('ajaxRequest');
+ element.removeClass('ajaxRequestError');
+ formElement.find('.DOA').prop('disabled',false).removeClass('ajaxRequest');
+ // Egyedi kezelőfüggvény meghívása
+ // pre-be pl.: $_JSON['onSuccess']['func'] = 'myTestFunc'; $_JSON['onSuccess']['param'] = array('txt' => 'Hahó');
+ // js-be pl.: myTestFunc = function(param) { console.log('myTestFunc: '+param.txt); }
+ if (transport.onSuccess && transport.onSuccess.func && $.isFunction(window[transport.onSuccess.func]))
+ window[transport.onSuccess.func](transport.onSuccess.param);
+
+ },
+ onFailure: function() {
+ element.addClass('ajaxRequestError');
+ element.removeClass('ajaxRequest');
+ element.removeClass('ajaxRequestDone');
+ formElement.find('.DOA').prop('disabled',false).removeClass('ajaxRequest');
+ }
+ });
+ }
+ formElement.attr('action', uriOrig);
+
+ }
+
+
+ if (element.hasClass('onChangeUpdate')) {
+ // Az onChangeUpdate class tagjaira kattintva update-eli az őket tartalmazó formot
+
+
+ var formElement = $(element).closest('form');
+ updateForm(formElement, $(element));
+ event.preventDefault();
+ event.stopPropagation();
+ }
+
+
+
+}
+
+function ucfirst(str) {
+ var f = str.charAt(0).toUpperCase();
+ return f + str.substr(1);
+}
+function lcfirst(str) {
+ var f = str.charAt(0).toLowerCase();
+ return f + str.substr(1);
+}
+
+
+mayorSubmit = function(event) {
+ var element = $(event.target);
+ var formElement;
+ if (element.is('form')) {
+ formElement = element;
+ // elmentettük a body.data.lastClick - be, hogy mi volt az utolsó clicked elem
+ var element2 = $('body').data('lastClick');
+ } else {
+ formElement = element.parents('form');
+ }
+ if (formElement.hasClass('onSubmitUpdate')) {
+ event.preventDefault();
+ // Az onSubmitUpdate class-ba sorolt formok submit esetén update-elve lesznek - !! az összes submit elmegy !!
+ updateForm(formElement, element2);
+ event.stopImmediatePropagation();
+ event.stopPropagation();
+ return false;
+ } else if (element.attr('id') == 'mayorSearch') {
+ //$('#nav li.active a:contains()')
+ $('#mayorSearch a').remove();
+ var pattern = $('#mayorSearch input[type=text]').val();
+ $('#nav li a:contains('+pattern+')').clone().appendTo('#mayorSearch');
+ if (pattern!=lcfirst(pattern))
+ $('#nav li a:contains('+lcfirst(pattern)+')').clone().appendTo('#mayorSearch');
+ if (pattern!=ucfirst(pattern))
+ $('#nav li a:contains('+ucfirst(pattern)+')').clone().appendTo('#mayorSearch');
+/* $('#nav li.active a:contains('+pattern+')').clone().appendTo('#mayorSearch');
+ if (pattern!=lcfirst(pattern))
+ $('#nav li.active a:contains('+lcfirst(pattern)+')').clone().appendTo('#mayorSearch');
+ if (pattern!=ucfirst(pattern))
+ $('#nav li.active a:contains('+ucfirst(pattern)+')').clone().appendTo('#mayorSearch');
+*/
+ return false;
+ }
+}
+/*
+var lastScrollLeft = 0;
+$(window).scroll(function() {
+ var documentScrollLeft = $(document).scrollLeft();
+ if (lastScrollLeft != documentScrollLeft) {
+ //console.log('scroll x'+documentScrollLeft);
+ lastScrollLeft = documentScrollLeft;
+ }
+ //mayorNavResize();
+});
+*/
+
+var mayorLoaderCounter = 0;
+mayorLoaderStart = function() {
+ mayorLoaderCounter++;
+ $('#poz li:first').addClass('mayorLoader');
+}
+mayorLoaderStop = function() { // override by naplo.js
+ $('#poz li:first').removeClass('mayorLoader');
+}
+
+
+mayorNavResize = function(event) {
+ if (event===undefined) return true;
+
+ var wi = $(window).width();
+ var navElem = $('#nav2');
+ var mayorbodyElem = $('#mayorbody');
+ var mayorfootElem = $('#mayorfoot');
+ var smallWidth = false;
+ if (event.target.id == "leftsideclose") swap=true; else swap = false;
+ if (navElem) {
+ if ($(document).width()>$(window).width()+140) smallWidth = true;
+ if ((swap || wi<1100 || smallWidth) && navElem.hasClass('vertical')) {
+ mayorbodyElem.removeClass('leftpad').addClass('toppad');
+ mayorfootElem.removeClass('leftpad').addClass('toppad');
+ navElem.removeClass('vertical').addClass('horizontal');
+// navElem.addClass('horizontal');
+// mayorbodyElem.addClass('toppad');
+// mayorfootElem.addClass('toppad');
+ new $.ajax('/index.php?skin=ajax&request=true&page=session&sub=&f=set&policy=public&layout=1', {
+ method: 'get',
+ success: function(transport) {
+ }
+ });
+ } else if
+ ((swap || (wi>=1100 && !smallWidth)) && navElem.hasClass('horizontal')) {
+ mayorbodyElem.removeClass('toppad').addClass('leftpad');
+ mayorfootElem.removeClass('toppad').addClass('leftpad');
+ navElem.removeClass('horizontal').addClass('vertical');
+// navElem.addClass('vertical');
+// mayorbodyElem.addClass('leftpad');
+// mayorfootElem.addClass('leftpad');
+ new $.ajax('/index.php?skin=ajax&request=true&page=session&sub=&f=set&policy=public&layout=0', {
+ method: 'post',
+ success: function(transport) {
+ }
+ });
+ } else {
+ //console.log('Nothing to do');
+ }
+ } else {
+ //console.log('Not ready');
+ }
+ /*if ($('#nav1').data('nav1count')==0) { // ha nincs nav1 menu, akkor engedélyezzük a nav dinamikus resize-ját (igen ám, de inicializálásnál ugrál)
+ $('nav').show();
+ var navSize = 140+$('#mayorGlobalLogin').width() + 0;
+ $('#nav>li').each(function() {
+ navSize+=($(this).width());
+ if (navSize>$('#mayorhead').width()) {
+ $(this).hide();
+ } else {
+ $(this).show();
+ }
+ });
+ }*/
+
+}
+
+updateForm = function(formElement, submitElement) {
+
+ var url = formElement.attr('action').replace(/skin=([^&]*)/,'skin=ajax');
+// szerintem ez mpst nem kell... ?
+// formElement.find('input[type=submit]').prop('disabled',true);
+// submitElement.prop('disabled',false);
+ if (submitElement && submitElement.attr('name')!==undefined) options = { submitClass: submitElement.attr('class'), submitName: submitElement.attr('name'), submitValue: submitElement.val() };
+ else options = false;
+ ajaxUpdate(formElement, url, options);
+
+}
+
+/**
+ * Az options paraméterben át kell adni az átadandó submit elem nevét és értékét, mert a serializeArray nem teszi be!
+ * , és a serialize()???
+**/
+ajaxUpdate = function(container, url, options) {
+
+ mayorLoaderStart();
+ postData = container.serializeArray();
+ if (options) postData.push({ name: options.submitName, value: options.submitValue });
+ postData.push({ name: 'mayorToken', value : $('body').data('mayortoken') });
+
+ $.ajax(url,{
+ data: postData,
+ type: 'POST',
+ success: function(transport, status, xhr){
+ var contentType=xhr.getResponseHeader('Content-type');
+ if (contentType.indexOf('application/json')>-1 || contentType.indexOf('text/html')>-1) {
+ if ( typeof transport.html !== 'undefined' && transport.html !== null) {
+ container.html(transport.html);
+ if ($.isFunction(showUpdateLayer)) showUpdateLayer(options);
+ } else if ($.isFunction(processJSON)) {
+ processJSON(transport);
+ } else {
+ }
+ } else {
+ container.html(xhr.responseText);
+ }
+ if (options && options.onSuccess && $.isFunction(options.onSuccess)) options.onSuccess(transport, status, xhr);
+ // IE bubbling? A most betöltött form-okra...
+ },
+ error: function (xhr,status,errText) { // Type: Function( jqXHR jqXHR, String textStatus, String errorThrown )
+ _debug(status);
+ _debug(errText);
+ updateSalt(xhr.getResponseHeader('Etag'));
+ },
+ complete: function(xhr, status) {
+ mayorLoaderStop();
+ updateSalt(xhr.getResponseHeader('Etag'));
+ }
+ });
+}
+
+ajaxRequest = function(formElement, options) {
+
+ var url = formElement.attr('action').replace(/skin=([^&]*)/,'skin=ajax');
+ var adat = formElement.serializeArray();
+ adat.push({ name: 'mayorToken', value : $('body').data('mayortoken') });
+
+ mayorLoaderStart();
+ $.ajax(url,{
+ data: adat,
+ type: 'POST',
+ success: function(transport, status, xhr){
+ if (options && options.onSuccess && $.isFunction(options.onSuccess)) options.onSuccess(transport, status, xhr);
+ },
+ error: function (xhr,status,errText) { // Type: Function( jqXHR jqXHR, String textStatus, String errorThrown )
+ _debug('stat: '+status);
+ _debug('errTxt: '+errText);
+ if (options && options.onFailure && $.isFunction(options.onFailure)) options.onFailure(xhr,status,errText);
+ },
+ complete: function(xhr, status) {
+ mayorLoaderStop();
+ updateSalt(xhr.getResponseHeader('Etag'));
+ }
+
+ });
+}
+
+var showUpdateLayer = function() {}
+var processJSON;
+updateSalt = function(etagHeader) {
+ if (etagHeader !== null) {
+ /**
+ * A header Etag mezője (__SALTVALUE-__SALTNAME[-...]) alapján frissítjük az input.salt mezőket
+ **/
+ etagArray=etagHeader.split("-");
+ $('input.salt').each(
+ function(index) {
+ // tömörített oldalküldés (?) esetén a web-szerver
+ if ($(this).prop('name') == etagArray[1]) $(this).val(etagArray[0]);
+ }
+ );
+ $('input.mayorToken').each(
+ function(index) {
+ if ($(this).prop('name') == 'mayorToken') $(this).val(etagArray[2]);
+ }
+ );
+ $('body').data('mayortoken',etagArray[2]);
+ }
+}
+
+// Hasznos függvények
+// string funkciók
+function LTrim(str) { return str.replace(/\s*((\S+\s*)*)/, "$1"); }
+function RTrim(str) { return str.replace(/((\s*\S+)*)\s*/, "$1"); }
+function Trim(str) { return LTrim(RTrim(str)); }
+
+// formátum-ellenőrzők
+function IsEmpty(str) {
+ return (str === null | Trim(str) === "") ? true : false;
+}
+
+function IsEmail(str) {
+ var reEmail = /^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/;
+ return (str) ? reEmail.test(Trim(str)) : false;
+}
+
+function IsInteger(str) {
+ var reInteger = /^[+-]?\d+?$/;
+ return (str) ? reInteger.test(Trim(str)) : false;
+}
+
+function IsNumber(str) {
+ var reNumber = /^[+-]?\d+([,\.]\d+)?$/;
+ return (str) ? reNumber.test(Trim(str)) : false;
+}
+
+function IsHexa(str) {
+ var reString = /^[0-9A-Fa-f]*?$/;
+ return (str) ? reString.test(Trim(str)) : false;
+}
+
+function IsDate(str) {
+ var reDate = /^(19|20)\d\d([-/.])(0[1-9]|1[0-2])\2(0[1-9]|[12][0-9]|3[01])$/;
+ return (str) ? reDate.test(Trim(str)) : false;
+}
+
+function CorrectDate(str) {
+ if (IsDate(str))
+ return Trim(str).replace(/^(\d{4})[-/.](\d{2})[-/.](\d{2})$/, "$1.$2.$3");
+ else
+ return null;
+}
+
+mayorSessionTimeOutAlert();
+
+function mayorSessionTimeOutAlert() {
+ $('#takaro').fadeIn();
+ $('#updateWindow').fadeIn();
+ $('#updateForm').html('<div class="infoMsg" style="margin-bottom:20px;">A munkamenet hamarosan lejár!</div>').fadeIn();
+ $('body,html').animate({scrollTop: 0}, 800);
+}
+
+function mayorSessionTimedOut() {
+// $('#takaro').fadeOut();
+// $('.infoMsg').fadeOut();
+// $('#mayorhead').append('<div id="mayorbodytakaro" style="background-color: rgba(100,100,100,0.1);z-index: inherit;height:100%;width:100%; position:absolute; top:0px;"><div class="errorMsg" style="margin-top:130px;">A munkamenet lejárt, kérjük jelentkezzen be újra!</div></div>').fadeIn();
+ $('#mayorbody').fadeOut();
+ window.location.replace(location.origin);
+}
+
+jQuery.fn.preventDoubleSubmission = function() {
+ $(this).on('submit',function(e){
+ var $form = $(this);
+ if ($form.data('submitted') === true) {
+ e.preventDefault();
+ } else {
+ $form.data('submitted', true);
+ }
+ });
+ return this;
+};
+
+/* teszt
+function isNear( $element, distance, event ) {
+ var left = $element.offset().left - distance,
+ top = $element.offset().top - distance,
+ right = left + $element.width() + ( 2 * distance ),
+ bottom = top + $element.height() + ( 2 * distance ),
+ x = event.pageX,
+ y = event.pageY;
+ return ( x > left && x < right && y > top && y < bottom );
+};
+*/
+
+function href(p) {
+ var get = '';
+ $.each( p, function( key, value ) { get += key + "=" + value + "&"; });
+ return ('index.php?policy=private&'+get+'sessionID='+$('body').data('sessionid')).replace('&','&#38;');
+}
+
+$(document).ready(function() { // facebook
+
+ if (typeof(FB_APP_ID)!=='undefined' && FB_APP_ID!='') {
+
+ window.fbAsyncInit = function() {
+ FB.init({
+ appId : FB_APP_ID,
+ cookie : true,
+ xfbml : true,
+ version : 'v2.2'
+ });
+ FB.getLoginStatus(function(response) {
+ if (response.status === 'connected') {
+ $('#mglFBconnect').removeClass('FBstatusunknown').addClass('FB2');
+ } else if (response.status === 'not_authorized') {
+ $('#mglFBconnect').removeClass('FBstatusunknown').addClass('FB1');
+ } else {
+ $('#mglFBconnect').removeClass('FBstatusunknown').addClass('FB0');
+ }
+ }); // ,true - ha nem cache-elt változat kell
+ FB.Event.subscribe('auth.login', my_login_event);
+ FB.Event.subscribe('auth.logout', my_logout_event);
+ FB.Event.subscribe('auth.authResponseChange', my_authResponseChange_event);
+ };
+ // Load the SDK asynchronously
+ (function(d, s, id) {
+ var js, fjs = d.getElementsByTagName(s)[0];
+ if (d.getElementById(id)) return;
+ js = d.createElement(s); js.id = id;
+ js.src = "//connect.facebook.net/en_US/sdk.js";
+ fjs.parentNode.insertBefore(js, fjs);
+ }(document, 'script', 'facebook-jssdk'));
+ }
+}); // doc ready
+
+var my_login_event = function() {
+ //console.log('***facebook login event');
+}
+
+var my_logout_event = function() {
+ //console.log('***facebook logout event');
+}
+
+var my_authResponseChange_event = function(response) {
+ //console.log('***authResponseChange');
+}
+
+var mayor_facebookconnect_redirect = function() {
+ var origUrl = $(location).attr('href');
+ var pos = origUrl.indexOf("?");
+ if (pos != -1) url = origUrl+'&action=facebooklogin';
+ else url = origUrl+'?action=facebooklogin';
+ window.location = url;
+}
+
+
+// Az ajax hívások vésszatérési értékét feldolgozó és a layer-t megjelenítő függvény változók inicializálása (hogy ne legyen undefined)
+var showUpdateLayer = function() {};
+var hideUpdateLayer = function() {};
+var showUpdateWindowSide = function() {};
+var hideUpdateWindowSide = function() {};
+var showUpdateWindowSideSub = function() {};
+var hideUpdateWindowSideSub = function() {};
+var processJSON;
+
+$(document).ready(function() { // még több click eseménykezelő!
+ $('#mayorMenuSearchIcon').on('click',function() {
+ $('#mayorSearch').show();
+ event.preventDefault();
+ event.stopImmediatePropagation(); // STOP mayorClick
+ $('#mayorSearch input[type=text]').focus();
+ });
+ $('#mayorNaviSearchIcon').on('click',function() {
+ $('#mayorSearch').show();
+ event.preventDefault();
+ event.stopImmediatePropagation(); // STOP mayorClick
+ $('#mayorSearch input[type=text]').focus();
+ });
+
+ //gapi.load('auth2', function() {
+ // gapi.auth2.init();
+ //});
+ if (typeof(GOOGLEAPI_CLIENT_ID)!=='undefined' && GOOGLEAPI_CLIENT_ID!='') {
+ startGoogleAuth();
+ }
+});
+
+// GOOGLE
+var googleUser = {};
+var startGoogleAuth = function() {
+ gapi.load('auth2', function(){
+ auth2 = gapi.auth2.init({
+ client_id: GOOGLEAPI_CLIENT_ID,
+ cookiepolicy: 'single_host_origin',
+ });
+ attachSignin(document.getElementById('googleLoginBtn'));
+ });
+};
+function attachSignin(element) {
+ auth2.attachClickHandler(element, {},
+ function(googleUser) {
+ var id_token = googleUser.getAuthResponse().id_token;
+ var origUrl = $(location).attr('href');
+ var pos = origUrl.indexOf("?");
+ if (pos != -1) url = origUrl+'&action=googleapilogin'+'&id_token='+id_token;
+ else url = origUrl+'?action=googleapilogin'+'&id_token='+id_token;
+ window.location = url;
+ }, function(error) {
+ // alert(JSON.stringify(error, undefined, 2));
+ });
+}
+// GOOGLE
+
diff --git a/mayor-orig/www/skin/classic/base/javascript/jquery-1.8.3.min.js b/mayor-orig/www/skin/classic/base/javascript/jquery-1.8.3.min.js
new file mode 100644
index 00000000..83589daa
--- /dev/null
+++ b/mayor-orig/www/skin/classic/base/javascript/jquery-1.8.3.min.js
@@ -0,0 +1,2 @@
+/*! jQuery v1.8.3 jquery.com | jquery.org/license */
+(function(e,t){function _(e){var t=M[e]={};return v.each(e.split(y),function(e,n){t[n]=!0}),t}function H(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(P,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:D.test(r)?v.parseJSON(r):r}catch(s){}v.data(e,n,r)}else r=t}return r}function B(e){var t;for(t in e){if(t==="data"&&v.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function et(){return!1}function tt(){return!0}function ut(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function at(e,t){do e=e[t];while(e&&e.nodeType!==1);return e}function ft(e,t,n){t=t||0;if(v.isFunction(t))return v.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return v.grep(e,function(e,r){return e===t===n});if(typeof t=="string"){var r=v.grep(e,function(e){return e.nodeType===1});if(it.test(t))return v.filter(t,r,!n);t=v.filter(t,r)}return v.grep(e,function(e,r){return v.inArray(e,t)>=0===n})}function lt(e){var t=ct.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function At(e,t){if(t.nodeType!==1||!v.hasData(e))return;var n,r,i,s=v._data(e),o=v._data(t,s),u=s.events;if(u){delete o.handle,o.events={};for(n in u)for(r=0,i=u[n].length;r<i;r++)v.event.add(t,n,u[n][r])}o.data&&(o.data=v.extend({},o.data))}function Ot(e,t){var n;if(t.nodeType!==1)return;t.clearAttributes&&t.clearAttributes(),t.mergeAttributes&&t.mergeAttributes(e),n=t.nodeName.toLowerCase(),n==="object"?(t.parentNode&&(t.outerHTML=e.outerHTML),v.support.html5Clone&&e.innerHTML&&!v.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):n==="input"&&Et.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):n==="option"?t.selected=e.defaultSelected:n==="input"||n==="textarea"?t.defaultValue=e.defaultValue:n==="script"&&t.text!==e.text&&(t.text=e.text),t.removeAttribute(v.expando)}function Mt(e){return typeof e.getElementsByTagName!="undefined"?e.getElementsByTagName("*"):typeof e.querySelectorAll!="undefined"?e.querySelectorAll("*"):[]}function _t(e){Et.test(e.type)&&(e.defaultChecked=e.checked)}function Qt(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Jt.length;while(i--){t=Jt[i]+n;if(t in e)return t}return r}function Gt(e,t){return e=t||e,v.css(e,"display")==="none"||!v.contains(e.ownerDocument,e)}function Yt(e,t){var n,r,i=[],s=0,o=e.length;for(;s<o;s++){n=e[s];if(!n.style)continue;i[s]=v._data(n,"olddisplay"),t?(!i[s]&&n.style.display==="none"&&(n.style.display=""),n.style.display===""&&Gt(n)&&(i[s]=v._data(n,"olddisplay",nn(n.nodeName)))):(r=Dt(n,"display"),!i[s]&&r!=="none"&&v._data(n,"olddisplay",r))}for(s=0;s<o;s++){n=e[s];if(!n.style)continue;if(!t||n.style.display==="none"||n.style.display==="")n.style.display=t?i[s]||"":"none"}return e}function Zt(e,t,n){var r=Rt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function en(e,t,n,r){var i=n===(r?"border":"content")?4:t==="width"?1:0,s=0;for(;i<4;i+=2)n==="margin"&&(s+=v.css(e,n+$t[i],!0)),r?(n==="content"&&(s-=parseFloat(Dt(e,"padding"+$t[i]))||0),n!=="margin"&&(s-=parseFloat(Dt(e,"border"+$t[i]+"Width"))||0)):(s+=parseFloat(Dt(e,"padding"+$t[i]))||0,n!=="padding"&&(s+=parseFloat(Dt(e,"border"+$t[i]+"Width"))||0));return s}function tn(e,t,n){var r=t==="width"?e.offsetWidth:e.offsetHeight,i=!0,s=v.support.boxSizing&&v.css(e,"boxSizing")==="border-box";if(r<=0||r==null){r=Dt(e,t);if(r<0||r==null)r=e.style[t];if(Ut.test(r))return r;i=s&&(v.support.boxSizingReliable||r===e.style[t]),r=parseFloat(r)||0}return r+en(e,t,n||(s?"border":"content"),i)+"px"}function nn(e){if(Wt[e])return Wt[e];var t=v("<"+e+">").appendTo(i.body),n=t.css("display");t.remove();if(n==="none"||n===""){Pt=i.body.appendChild(Pt||v.extend(i.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!Ht||!Pt.createElement)Ht=(Pt.contentWindow||Pt.contentDocument).document,Ht.write("<!doctype html><html><body>"),Ht.close();t=Ht.body.appendChild(Ht.createElement(e)),n=Dt(t,"display"),i.body.removeChild(Pt)}return Wt[e]=n,n}function fn(e,t,n,r){var i;if(v.isArray(t))v.each(t,function(t,i){n||sn.test(e)?r(e,i):fn(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&v.type(t)==="object")for(i in t)fn(e+"["+i+"]",t[i],n,r);else r(e,t)}function Cn(e){return function(t,n){typeof t!="string"&&(n=t,t="*");var r,i,s,o=t.toLowerCase().split(y),u=0,a=o.length;if(v.isFunction(n))for(;u<a;u++)r=o[u],s=/^\+/.test(r),s&&(r=r.substr(1)||"*"),i=e[r]=e[r]||[],i[s?"unshift":"push"](n)}}function kn(e,n,r,i,s,o){s=s||n.dataTypes[0],o=o||{},o[s]=!0;var u,a=e[s],f=0,l=a?a.length:0,c=e===Sn;for(;f<l&&(c||!u);f++)u=a[f](n,r,i),typeof u=="string"&&(!c||o[u]?u=t:(n.dataTypes.unshift(u),u=kn(e,n,r,i,u,o)));return(c||!u)&&!o["*"]&&(u=kn(e,n,r,i,"*",o)),u}function Ln(e,n){var r,i,s=v.ajaxSettings.flatOptions||{};for(r in n)n[r]!==t&&((s[r]?e:i||(i={}))[r]=n[r]);i&&v.extend(!0,e,i)}function An(e,n,r){var i,s,o,u,a=e.contents,f=e.dataTypes,l=e.responseFields;for(s in l)s in r&&(n[l[s]]=r[s]);while(f[0]==="*")f.shift(),i===t&&(i=e.mimeType||n.getResponseHeader("content-type"));if(i)for(s in a)if(a[s]&&a[s].test(i)){f.unshift(s);break}if(f[0]in r)o=f[0];else{for(s in r){if(!f[0]||e.converters[s+" "+f[0]]){o=s;break}u||(u=s)}o=o||u}if(o)return o!==f[0]&&f.unshift(o),r[o]}function On(e,t){var n,r,i,s,o=e.dataTypes.slice(),u=o[0],a={},f=0;e.dataFilter&&(t=e.dataFilter(t,e.dataType));if(o[1])for(n in e.converters)a[n.toLowerCase()]=e.converters[n];for(;i=o[++f];)if(i!=="*"){if(u!=="*"&&u!==i){n=a[u+" "+i]||a["* "+i];if(!n)for(r in a){s=r.split(" ");if(s[1]===i){n=a[u+" "+s[0]]||a["* "+s[0]];if(n){n===!0?n=a[r]:a[r]!==!0&&(i=s[0],o.splice(f--,0,i));break}}}if(n!==!0)if(n&&e["throws"])t=n(t);else try{t=n(t)}catch(l){return{state:"parsererror",error:n?l:"No conversion from "+u+" to "+i}}}u=i}return{state:"success",data:t}}function Fn(){try{return new e.XMLHttpRequest}catch(t){}}function In(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function $n(){return setTimeout(function(){qn=t},0),qn=v.now()}function Jn(e,t){v.each(t,function(t,n){var r=(Vn[t]||[]).concat(Vn["*"]),i=0,s=r.length;for(;i<s;i++)if(r[i].call(e,t,n))return})}function Kn(e,t,n){var r,i=0,s=0,o=Xn.length,u=v.Deferred().always(function(){delete a.elem}),a=function(){var t=qn||$n(),n=Math.max(0,f.startTime+f.duration-t),r=n/f.duration||0,i=1-r,s=0,o=f.tweens.length;for(;s<o;s++)f.tweens[s].run(i);return u.notifyWith(e,[f,i,n]),i<1&&o?n:(u.resolveWith(e,[f]),!1)},f=u.promise({elem:e,props:v.extend({},t),opts:v.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:qn||$n(),duration:n.duration,tweens:[],createTween:function(t,n,r){var i=v.Tween(e,f.opts,t,n,f.opts.specialEasing[t]||f.opts.easing);return f.tweens.push(i),i},stop:function(t){var n=0,r=t?f.tweens.length:0;for(;n<r;n++)f.tweens[n].run(1);return t?u.resolveWith(e,[f,t]):u.rejectWith(e,[f,t]),this}}),l=f.props;Qn(l,f.opts.specialEasing);for(;i<o;i++){r=Xn[i].call(f,e,l,f.opts);if(r)return r}return Jn(f,l),v.isFunction(f.opts.start)&&f.opts.start.call(e,f),v.fx.timer(v.extend(a,{anim:f,queue:f.opts.queue,elem:e})),f.progress(f.opts.progress).done(f.opts.done,f.opts.complete).fail(f.opts.fail).always(f.opts.always)}function Qn(e,t){var n,r,i,s,o;for(n in e){r=v.camelCase(n),i=t[r],s=e[n],v.isArray(s)&&(i=s[1],s=e[n]=s[0]),n!==r&&(e[r]=s,delete e[n]),o=v.cssHooks[r];if(o&&"expand"in o){s=o.expand(s),delete e[r];for(n in s)n in e||(e[n]=s[n],t[n]=i)}else t[r]=i}}function Gn(e,t,n){var r,i,s,o,u,a,f,l,c,h=this,p=e.style,d={},m=[],g=e.nodeType&&Gt(e);n.queue||(l=v._queueHooks(e,"fx"),l.unqueued==null&&(l.unqueued=0,c=l.empty.fire,l.empty.fire=function(){l.unqueued||c()}),l.unqueued++,h.always(function(){h.always(function(){l.unqueued--,v.queue(e,"fx").length||l.empty.fire()})})),e.nodeType===1&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],v.css(e,"display")==="inline"&&v.css(e,"float")==="none"&&(!v.support.inlineBlockNeedsLayout||nn(e.nodeName)==="inline"?p.display="inline-block":p.zoom=1)),n.overflow&&(p.overflow="hidden",v.support.shrinkWrapBlocks||h.done(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t){s=t[r];if(Un.exec(s)){delete t[r],a=a||s==="toggle";if(s===(g?"hide":"show"))continue;m.push(r)}}o=m.length;if(o){u=v._data(e,"fxshow")||v._data(e,"fxshow",{}),"hidden"in u&&(g=u.hidden),a&&(u.hidden=!g),g?v(e).show():h.done(function(){v(e).hide()}),h.done(function(){var t;v.removeData(e,"fxshow",!0);for(t in d)v.style(e,t,d[t])});for(r=0;r<o;r++)i=m[r],f=h.createTween(i,g?u[i]:0),d[i]=u[i]||v.style(e,i),i in u||(u[i]=f.start,g&&(f.end=f.start,f.start=i==="width"||i==="height"?1:0))}}function Yn(e,t,n,r,i){return new Yn.prototype.init(e,t,n,r,i)}function Zn(e,t){var n,r={height:e},i=0;t=t?1:0;for(;i<4;i+=2-t)n=$t[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function tr(e){return v.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:!1}var n,r,i=e.document,s=e.location,o=e.navigator,u=e.jQuery,a=e.$,f=Array.prototype.push,l=Array.prototype.slice,c=Array.prototype.indexOf,h=Object.prototype.toString,p=Object.prototype.hasOwnProperty,d=String.prototype.trim,v=function(e,t){return new v.fn.init(e,t,n)},m=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,g=/\S/,y=/\s+/,b=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,w=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,E=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,S=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,T=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,N=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,C=/^-ms-/,k=/-([\da-z])/gi,L=function(e,t){return(t+"").toUpperCase()},A=function(){i.addEventListener?(i.removeEventListener("DOMContentLoaded",A,!1),v.ready()):i.readyState==="complete"&&(i.detachEvent("onreadystatechange",A),v.ready())},O={};v.fn=v.prototype={constructor:v,init:function(e,n,r){var s,o,u,a;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(typeof e=="string"){e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3?s=[null,e,null]:s=w.exec(e);if(s&&(s[1]||!n)){if(s[1])return n=n instanceof v?n[0]:n,a=n&&n.nodeType?n.ownerDocument||n:i,e=v.parseHTML(s[1],a,!0),E.test(s[1])&&v.isPlainObject(n)&&this.attr.call(e,n,!0),v.merge(this,e);o=i.getElementById(s[2]);if(o&&o.parentNode){if(o.id!==s[2])return r.find(e);this.length=1,this[0]=o}return this.context=i,this.selector=e,this}return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}return v.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),v.makeArray(e,this))},selector:"",jquery:"1.8.3",length:0,size:function(){return this.length},toArray:function(){return l.call(this)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=v.merge(this.constructor(),e);return r.prevObject=this,r.context=this.context,t==="find"?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return v.each(this,e,t)},ready:function(e){return v.ready.promise().done(e),this},eq:function(e){return e=+e,e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(l.apply(this,arguments),"slice",l.call(arguments).join(","))},map:function(e){return this.pushStack(v.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:[].sort,splice:[].splice},v.fn.init.prototype=v.fn,v.extend=v.fn.extend=function(){var e,n,r,i,s,o,u=arguments[0]||{},a=1,f=arguments.length,l=!1;typeof u=="boolean"&&(l=u,u=arguments[1]||{},a=2),typeof u!="object"&&!v.isFunction(u)&&(u={}),f===a&&(u=this,--a);for(;a<f;a++)if((e=arguments[a])!=null)for(n in e){r=u[n],i=e[n];if(u===i)continue;l&&i&&(v.isPlainObject(i)||(s=v.isArray(i)))?(s?(s=!1,o=r&&v.isArray(r)?r:[]):o=r&&v.isPlainObject(r)?r:{},u[n]=v.extend(l,o,i)):i!==t&&(u[n]=i)}return u},v.extend({noConflict:function(t){return e.$===v&&(e.$=a),t&&e.jQuery===v&&(e.jQuery=u),v},isReady:!1,readyWait:1,holdReady:function(e){e?v.readyWait++:v.ready(!0)},ready:function(e){if(e===!0?--v.readyWait:v.isReady)return;if(!i.body)return setTimeout(v.ready,1);v.isReady=!0;if(e!==!0&&--v.readyWait>0)return;r.resolveWith(i,[v]),v.fn.trigger&&v(i).trigger("ready").off("ready")},isFunction:function(e){return v.type(e)==="function"},isArray:Array.isArray||function(e){return v.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):O[h.call(e)]||"object"},isPlainObject:function(e){if(!e||v.type(e)!=="object"||e.nodeType||v.isWindow(e))return!1;try{if(e.constructor&&!p.call(e,"constructor")&&!p.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||p.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){var r;return!e||typeof e!="string"?null:(typeof t=="boolean"&&(n=t,t=0),t=t||i,(r=E.exec(e))?[t.createElement(r[1])]:(r=v.buildFragment([e],t,n?null:[]),v.merge([],(r.cacheable?v.clone(r.fragment):r.fragment).childNodes)))},parseJSON:function(t){if(!t||typeof t!="string")return null;t=v.trim(t);if(e.JSON&&e.JSON.parse)return e.JSON.parse(t);if(S.test(t.replace(T,"@").replace(N,"]").replace(x,"")))return(new Function("return "+t))();v.error("Invalid JSON: "+t)},parseXML:function(n){var r,i;if(!n||typeof n!="string")return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(s){r=t}return(!r||!r.documentElement||r.getElementsByTagName("parsererror").length)&&v.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&g.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(C,"ms-").replace(k,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,n,r){var i,s=0,o=e.length,u=o===t||v.isFunction(e);if(r){if(u){for(i in e)if(n.apply(e[i],r)===!1)break}else for(;s<o;)if(n.apply(e[s++],r)===!1)break}else if(u){for(i in e)if(n.call(e[i],i,e[i])===!1)break}else for(;s<o;)if(n.call(e[s],s,e[s++])===!1)break;return e},trim:d&&!d.call("\ufeff\u00a0")?function(e){return e==null?"":d.call(e)}:function(e){return e==null?"":(e+"").replace(b,"")},makeArray:function(e,t){var n,r=t||[];return e!=null&&(n=v.type(e),e.length==null||n==="string"||n==="function"||n==="regexp"||v.isWindow(e)?f.call(r,e):v.merge(r,e)),r},inArray:function(e,t,n){var r;if(t){if(c)return c.call(t,e,n);r=t.length,n=n?n<0?Math.max(0,r+n):n:0;for(;n<r;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,s=0;if(typeof r=="number")for(;s<r;s++)e[i++]=n[s];else while(n[s]!==t)e[i++]=n[s++];return e.length=i,e},grep:function(e,t,n){var r,i=[],s=0,o=e.length;n=!!n;for(;s<o;s++)r=!!t(e[s],s),n!==r&&i.push(e[s]);return i},map:function(e,n,r){var i,s,o=[],u=0,a=e.length,f=e instanceof v||a!==t&&typeof a=="number"&&(a>0&&e[0]&&e[a-1]||a===0||v.isArray(e));if(f)for(;u<a;u++)i=n(e[u],u,r),i!=null&&(o[o.length]=i);else for(s in e)i=n(e[s],s,r),i!=null&&(o[o.length]=i);return o.concat.apply([],o)},guid:1,proxy:function(e,n){var r,i,s;return typeof n=="string"&&(r=e[n],n=e,e=r),v.isFunction(e)?(i=l.call(arguments,2),s=function(){return e.apply(n,i.concat(l.call(arguments)))},s.guid=e.guid=e.guid||v.guid++,s):t},access:function(e,n,r,i,s,o,u){var a,f=r==null,l=0,c=e.length;if(r&&typeof r=="object"){for(l in r)v.access(e,n,l,r[l],1,o,i);s=1}else if(i!==t){a=u===t&&v.isFunction(i),f&&(a?(a=n,n=function(e,t,n){return a.call(v(e),n)}):(n.call(e,i),n=null));if(n)for(;l<c;l++)n(e[l],r,a?i.call(e[l],l,n(e[l],r)):i,u);s=1}return s?e:f?n.call(e):c?n(e[0],r):o},now:function(){return(new Date).getTime()}}),v.ready.promise=function(t){if(!r){r=v.Deferred();if(i.readyState==="complete")setTimeout(v.ready,1);else if(i.addEventListener)i.addEventListener("DOMContentLoaded",A,!1),e.addEventListener("load",v.ready,!1);else{i.attachEvent("onreadystatechange",A),e.attachEvent("onload",v.ready);var n=!1;try{n=e.frameElement==null&&i.documentElement}catch(s){}n&&n.doScroll&&function o(){if(!v.isReady){try{n.doScroll("left")}catch(e){return setTimeout(o,50)}v.ready()}}()}}return r.promise(t)},v.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(e,t){O["[object "+t+"]"]=t.toLowerCase()}),n=v(i);var M={};v.Callbacks=function(e){e=typeof e=="string"?M[e]||_(e):v.extend({},e);var n,r,i,s,o,u,a=[],f=!e.once&&[],l=function(t){n=e.memory&&t,r=!0,u=s||0,s=0,o=a.length,i=!0;for(;a&&u<o;u++)if(a[u].apply(t[0],t[1])===!1&&e.stopOnFalse){n=!1;break}i=!1,a&&(f?f.length&&l(f.shift()):n?a=[]:c.disable())},c={add:function(){if(a){var t=a.length;(function r(t){v.each(t,function(t,n){var i=v.type(n);i==="function"?(!e.unique||!c.has(n))&&a.push(n):n&&n.length&&i!=="string"&&r(n)})})(arguments),i?o=a.length:n&&(s=t,l(n))}return this},remove:function(){return a&&v.each(arguments,function(e,t){var n;while((n=v.inArray(t,a,n))>-1)a.splice(n,1),i&&(n<=o&&o--,n<=u&&u--)}),this},has:function(e){return v.inArray(e,a)>-1},empty:function(){return a=[],this},disable:function(){return a=f=n=t,this},disabled:function(){return!a},lock:function(){return f=t,n||c.disable(),this},locked:function(){return!f},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],a&&(!r||f)&&(i?f.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},v.extend({Deferred:function(e){var t=[["resolve","done",v.Callbacks("once memory"),"resolved"],["reject","fail",v.Callbacks("once memory"),"rejected"],["notify","progress",v.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return v.Deferred(function(n){v.each(t,function(t,r){var s=r[0],o=e[t];i[r[1]](v.isFunction(o)?function(){var e=o.apply(this,arguments);e&&v.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===i?n:this,[e])}:n[s])}),e=null}).promise()},promise:function(e){return e!=null?v.extend(e,r):r}},i={};return r.pipe=r.then,v.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[e^1][2].disable,t[2][2].lock),i[s[0]]=o.fire,i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=l.call(arguments),r=n.length,i=r!==1||e&&v.isFunction(e.promise)?r:0,s=i===1?e:v.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?l.call(arguments):r,n===u?s.notifyWith(t,n):--i||s.resolveWith(t,n)}},u,a,f;if(r>1){u=new Array(r),a=new Array(r),f=new Array(r);for(;t<r;t++)n[t]&&v.isFunction(n[t].promise)?n[t].promise().done(o(t,f,n)).fail(s.reject).progress(o(t,a,u)):--i}return i||s.resolveWith(f,n),s.promise()}}),v.support=function(){var t,n,r,s,o,u,a,f,l,c,h,p=i.createElement("div");p.setAttribute("className","t"),p.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=p.getElementsByTagName("*"),r=p.getElementsByTagName("a")[0];if(!n||!r||!n.length)return{};s=i.createElement("select"),o=s.appendChild(i.createElement("option")),u=p.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:r.getAttribute("href")==="/a",opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:u.value==="on",optSelected:o.selected,getSetAttribute:p.className!=="t",enctype:!!i.createElement("form").enctype,html5Clone:i.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",boxModel:i.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},u.checked=!0,t.noCloneChecked=u.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!o.disabled;try{delete p.test}catch(d){t.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",h=function(){t.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick"),p.detachEvent("onclick",h)),u=i.createElement("input"),u.value="t",u.setAttribute("type","radio"),t.radioValue=u.value==="t",u.setAttribute("checked","checked"),u.setAttribute("name","t"),p.appendChild(u),a=i.createDocumentFragment(),a.appendChild(p.lastChild),t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=u.checked,a.removeChild(u),a.appendChild(p);if(p.attachEvent)for(l in{submit:!0,change:!0,focusin:!0})f="on"+l,c=f in p,c||(p.setAttribute(f,"return;"),c=typeof p[f]=="function"),t[l+"Bubbles"]=c;return v(function(){var n,r,s,o,u="padding:0;margin:0;border:0;display:block;overflow:hidden;",a=i.getElementsByTagName("body")[0];if(!a)return;n=i.createElement("div"),n.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",a.insertBefore(n,a.firstChild),r=i.createElement("div"),n.appendChild(r),r.innerHTML="<table><tr><td></td><td>t</td></tr></table>",s=r.getElementsByTagName("td"),s[0].style.cssText="padding:0;margin:0;border:0;display:none",c=s[0].offsetHeight===0,s[0].style.display="",s[1].style.display="none",t.reliableHiddenOffsets=c&&s[0].offsetHeight===0,r.innerHTML="",r.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=r.offsetWidth===4,t.doesNotIncludeMarginInBodyOffset=a.offsetTop!==1,e.getComputedStyle&&(t.pixelPosition=(e.getComputedStyle(r,null)||{}).top!=="1%",t.boxSizingReliable=(e.getComputedStyle(r,null)||{width:"4px"}).width==="4px",o=i.createElement("div"),o.style.cssText=r.style.cssText=u,o.style.marginRight=o.style.width="0",r.style.width="1px",r.appendChild(o),t.reliableMarginRight=!parseFloat((e.getComputedStyle(o,null)||{}).marginRight)),typeof r.style.zoom!="undefined"&&(r.innerHTML="",r.style.cssText=u+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=r.offsetWidth===3,r.style.display="block",r.style.overflow="visible",r.innerHTML="<div></div>",r.firstChild.style.width="5px",t.shrinkWrapBlocks=r.offsetWidth!==3,n.style.zoom=1),a.removeChild(n),n=r=s=o=null}),a.removeChild(p),n=r=s=o=u=a=p=null,t}();var D=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;v.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(v.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?v.cache[e[v.expando]]:e[v.expando],!!e&&!B(e)},data:function(e,n,r,i){if(!v.acceptData(e))return;var s,o,u=v.expando,a=typeof n=="string",f=e.nodeType,l=f?v.cache:e,c=f?e[u]:e[u]&&u;if((!c||!l[c]||!i&&!l[c].data)&&a&&r===t)return;c||(f?e[u]=c=v.deletedIds.pop()||v.guid++:c=u),l[c]||(l[c]={},f||(l[c].toJSON=v.noop));if(typeof n=="object"||typeof n=="function")i?l[c]=v.extend(l[c],n):l[c].data=v.extend(l[c].data,n);return s=l[c],i||(s.data||(s.data={}),s=s.data),r!==t&&(s[v.camelCase(n)]=r),a?(o=s[n],o==null&&(o=s[v.camelCase(n)])):o=s,o},removeData:function(e,t,n){if(!v.acceptData(e))return;var r,i,s,o=e.nodeType,u=o?v.cache:e,a=o?e[v.expando]:v.expando;if(!u[a])return;if(t){r=n?u[a]:u[a].data;if(r){v.isArray(t)||(t in r?t=[t]:(t=v.camelCase(t),t in r?t=[t]:t=t.split(" ")));for(i=0,s=t.length;i<s;i++)delete r[t[i]];if(!(n?B:v.isEmptyObject)(r))return}}if(!n){delete u[a].data;if(!B(u[a]))return}o?v.cleanData([e],!0):v.support.deleteExpando||u!=u.window?delete u[a]:u[a]=null},_data:function(e,t,n){return v.data(e,t,n,!0)},acceptData:function(e){var t=e.nodeName&&v.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),v.fn.extend({data:function(e,n){var r,i,s,o,u,a=this[0],f=0,l=null;if(e===t){if(this.length){l=v.data(a);if(a.nodeType===1&&!v._data(a,"parsedAttrs")){s=a.attributes;for(u=s.length;f<u;f++)o=s[f].name,o.indexOf("data-")||(o=v.camelCase(o.substring(5)),H(a,o,l[o]));v._data(a,"parsedAttrs",!0)}}return l}return typeof e=="object"?this.each(function(){v.data(this,e)}):(r=e.split(".",2),r[1]=r[1]?"."+r[1]:"",i=r[1]+"!",v.access(this,function(n){if(n===t)return l=this.triggerHandler("getData"+i,[r[0]]),l===t&&a&&(l=v.data(a,e),l=H(a,e,l)),l===t&&r[1]?this.data(r[0]):l;r[1]=n,this.each(function(){var t=v(this);t.triggerHandler("setData"+i,r),v.data(this,e,n),t.triggerHandler("changeData"+i,r)})},null,n,arguments.length>1,null,!1))},removeData:function(e){return this.each(function(){v.removeData(this,e)})}}),v.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=v._data(e,t),n&&(!r||v.isArray(n)?r=v._data(e,t,v.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=v.queue(e,t),r=n.length,i=n.shift(),s=v._queueHooks(e,t),o=function(){v.dequeue(e,t)};i==="inprogress"&&(i=n.shift(),r--),i&&(t==="fx"&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return v._data(e,n)||v._data(e,n,{empty:v.Callbacks("once memory").add(function(){v.removeData(e,t+"queue",!0),v.removeData(e,n,!0)})})}}),v.fn.extend({queue:function(e,n){var r=2;return typeof e!="string"&&(n=e,e="fx",r--),arguments.length<r?v.queue(this[0],e):n===t?this:this.each(function(){var t=v.queue(this,e,n);v._queueHooks(this,e),e==="fx"&&t[0]!=="inprogress"&&v.dequeue(this,e)})},dequeue:function(e){return this.each(function(){v.dequeue(this,e)})},delay:function(e,t){return e=v.fx?v.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,s=v.Deferred(),o=this,u=this.length,a=function(){--i||s.resolveWith(o,[o])};typeof e!="string"&&(n=e,e=t),e=e||"fx";while(u--)r=v._data(o[u],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(a));return a(),s.promise(n)}});var j,F,I,q=/[\t\r\n]/g,R=/\r/g,U=/^(?:button|input)$/i,z=/^(?:button|input|object|select|textarea)$/i,W=/^a(?:rea|)$/i,X=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,V=v.support.getSetAttribute;v.fn.extend({attr:function(e,t){return v.access(this,v.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){v.removeAttr(this,e)})},prop:function(e,t){return v.access(this,v.prop,e,t,arguments.length>1)},removeProp:function(e){return e=v.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,s,o,u;if(v.isFunction(e))return this.each(function(t){v(this).addClass(e.call(this,t,this.className))});if(e&&typeof e=="string"){t=e.split(y);for(n=0,r=this.length;n<r;n++){i=this[n];if(i.nodeType===1)if(!i.className&&t.length===1)i.className=e;else{s=" "+i.className+" ";for(o=0,u=t.length;o<u;o++)s.indexOf(" "+t[o]+" ")<0&&(s+=t[o]+" ");i.className=v.trim(s)}}}return this},removeClass:function(e){var n,r,i,s,o,u,a;if(v.isFunction(e))return this.each(function(t){v(this).removeClass(e.call(this,t,this.className))});if(e&&typeof e=="string"||e===t){n=(e||"").split(y);for(u=0,a=this.length;u<a;u++){i=this[u];if(i.nodeType===1&&i.className){r=(" "+i.className+" ").replace(q," ");for(s=0,o=n.length;s<o;s++)while(r.indexOf(" "+n[s]+" ")>=0)r=r.replace(" "+n[s]+" "," ");i.className=e?v.trim(r):""}}}return this},toggleClass:function(e,t){var n=typeof e,r=typeof t=="boolean";return v.isFunction(e)?this.each(function(n){v(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var i,s=0,o=v(this),u=t,a=e.split(y);while(i=a[s++])u=r?u:!o.hasClass(i),o[u?"addClass":"removeClass"](i)}else if(n==="undefined"||n==="boolean")this.className&&v._data(this,"__className__",this.className),this.className=this.className||e===!1?"":v._data(this,"__className__")||""})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n<r;n++)if(this[n].nodeType===1&&(" "+this[n].className+" ").replace(q," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,s=this[0];if(!arguments.length){if(s)return n=v.valHooks[s.type]||v.valHooks[s.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(s,"value"))!==t?r:(r=s.value,typeof r=="string"?r.replace(R,""):r==null?"":r);return}return i=v.isFunction(e),this.each(function(r){var s,o=v(this);if(this.nodeType!==1)return;i?s=e.call(this,r,o.val()):s=e,s==null?s="":typeof s=="number"?s+="":v.isArray(s)&&(s=v.map(s,function(e){return e==null?"":e+""})),n=v.valHooks[this.type]||v.valHooks[this.nodeName.toLowerCase()];if(!n||!("set"in n)||n.set(this,s,"value")===t)this.value=s})}}),v.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,s=e.type==="select-one"||i<0,o=s?null:[],u=s?i+1:r.length,a=i<0?u:s?i:0;for(;a<u;a++){n=r[a];if((n.selected||a===i)&&(v.support.optDisabled?!n.disabled:n.getAttribute("disabled")===null)&&(!n.parentNode.disabled||!v.nodeName(n.parentNode,"optgroup"))){t=v(n).val();if(s)return t;o.push(t)}}return o},set:function(e,t){var n=v.makeArray(t);return v(e).find("option").each(function(){this.selected=v.inArray(v(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{},attr:function(e,n,r,i){var s,o,u,a=e.nodeType;if(!e||a===3||a===8||a===2)return;if(i&&v.isFunction(v.fn[n]))return v(e)[n](r);if(typeof e.getAttribute=="undefined")return v.prop(e,n,r);u=a!==1||!v.isXMLDoc(e),u&&(n=n.toLowerCase(),o=v.attrHooks[n]||(X.test(n)?F:j));if(r!==t){if(r===null){v.removeAttr(e,n);return}return o&&"set"in o&&u&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r)}return o&&"get"in o&&u&&(s=o.get(e,n))!==null?s:(s=e.getAttribute(n),s===null?t:s)},removeAttr:function(e,t){var n,r,i,s,o=0;if(t&&e.nodeType===1){r=t.split(y);for(;o<r.length;o++)i=r[o],i&&(n=v.propFix[i]||i,s=X.test(i),s||v.attr(e,i,""),e.removeAttribute(V?i:n),s&&n in e&&(e[n]=!1))}},attrHooks:{type:{set:function(e,t){if(U.test(e.nodeName)&&e.parentNode)v.error("type property can't be changed");else if(!v.support.radioValue&&t==="radio"&&v.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}},value:{get:function(e,t){return j&&v.nodeName(e,"button")?j.get(e,t):t in e?e.value:null},set:function(e,t,n){if(j&&v.nodeName(e,"button"))return j.set(e,t,n);e.value=t}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,s,o,u=e.nodeType;if(!e||u===3||u===8||u===2)return;return o=u!==1||!v.isXMLDoc(e),o&&(n=v.propFix[n]||n,s=v.propHooks[n]),r!==t?s&&"set"in s&&(i=s.set(e,r,n))!==t?i:e[n]=r:s&&"get"in s&&(i=s.get(e,n))!==null?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):z.test(e.nodeName)||W.test(e.nodeName)&&e.href?0:t}}}}),F={get:function(e,n){var r,i=v.prop(e,n);return i===!0||typeof i!="boolean"&&(r=e.getAttributeNode(n))&&r.nodeValue!==!1?n.toLowerCase():t},set:function(e,t,n){var r;return t===!1?v.removeAttr(e,n):(r=v.propFix[n]||n,r in e&&(e[r]=!0),e.setAttribute(n,n.toLowerCase())),n}},V||(I={name:!0,id:!0,coords:!0},j=v.valHooks.button={get:function(e,n){var r;return r=e.getAttributeNode(n),r&&(I[n]?r.value!=="":r.specified)?r.value:t},set:function(e,t,n){var r=e.getAttributeNode(n);return r||(r=i.createAttribute(n),e.setAttributeNode(r)),r.value=t+""}},v.each(["width","height"],function(e,t){v.attrHooks[t]=v.extend(v.attrHooks[t],{set:function(e,n){if(n==="")return e.setAttribute(t,"auto"),n}})}),v.attrHooks.contenteditable={get:j.get,set:function(e,t,n){t===""&&(t="false"),j.set(e,t,n)}}),v.support.hrefNormalized||v.each(["href","src","width","height"],function(e,n){v.attrHooks[n]=v.extend(v.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return r===null?t:r}})}),v.support.style||(v.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||t},set:function(e,t){return e.style.cssText=t+""}}),v.support.optSelected||(v.propHooks.selected=v.extend(v.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),v.support.enctype||(v.propFix.enctype="encoding"),v.support.checkOn||v.each(["radio","checkbox"],function(){v.valHooks[this]={get:function(e){return e.getAttribute("value")===null?"on":e.value}}}),v.each(["radio","checkbox"],function(){v.valHooks[this]=v.extend(v.valHooks[this],{set:function(e,t){if(v.isArray(t))return e.checked=v.inArray(v(e).val(),t)>=0}})});var $=/^(?:textarea|input|select)$/i,J=/^([^\.]*|)(?:\.(.+)|)$/,K=/(?:^|\s)hover(\.\S+|)\b/,Q=/^key/,G=/^(?:mouse|contextmenu)|click/,Y=/^(?:focusinfocus|focusoutblur)$/,Z=function(e){return v.event.special.hover?e:e.replace(K,"mouseenter$1 mouseleave$1")};v.event={add:function(e,n,r,i,s){var o,u,a,f,l,c,h,p,d,m,g;if(e.nodeType===3||e.nodeType===8||!n||!r||!(o=v._data(e)))return;r.handler&&(d=r,r=d.handler,s=d.selector),r.guid||(r.guid=v.guid++),a=o.events,a||(o.events=a={}),u=o.handle,u||(o.handle=u=function(e){return typeof v=="undefined"||!!e&&v.event.triggered===e.type?t:v.event.dispatch.apply(u.elem,arguments)},u.elem=e),n=v.trim(Z(n)).split(" ");for(f=0;f<n.length;f++){l=J.exec(n[f])||[],c=l[1],h=(l[2]||"").split(".").sort(),g=v.event.special[c]||{},c=(s?g.delegateType:g.bindType)||c,g=v.event.special[c]||{},p=v.extend({type:c,origType:l[1],data:i,handler:r,guid:r.guid,selector:s,needsContext:s&&v.expr.match.needsContext.test(s),namespace:h.join(".")},d),m=a[c];if(!m){m=a[c]=[],m.delegateCount=0;if(!g.setup||g.setup.call(e,i,h,u)===!1)e.addEventListener?e.addEventListener(c,u,!1):e.attachEvent&&e.attachEvent("on"+c,u)}g.add&&(g.add.call(e,p),p.handler.guid||(p.handler.guid=r.guid)),s?m.splice(m.delegateCount++,0,p):m.push(p),v.event.global[c]=!0}e=null},global:{},remove:function(e,t,n,r,i){var s,o,u,a,f,l,c,h,p,d,m,g=v.hasData(e)&&v._data(e);if(!g||!(h=g.events))return;t=v.trim(Z(t||"")).split(" ");for(s=0;s<t.length;s++){o=J.exec(t[s])||[],u=a=o[1],f=o[2];if(!u){for(u in h)v.event.remove(e,u+t[s],n,r,!0);continue}p=v.event.special[u]||{},u=(r?p.delegateType:p.bindType)||u,d=h[u]||[],l=d.length,f=f?new RegExp("(^|\\.)"+f.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null;for(c=0;c<d.length;c++)m=d[c],(i||a===m.origType)&&(!n||n.guid===m.guid)&&(!f||f.test(m.namespace))&&(!r||r===m.selector||r==="**"&&m.selector)&&(d.splice(c--,1),m.selector&&d.delegateCount--,p.remove&&p.remove.call(e,m));d.length===0&&l!==d.length&&((!p.teardown||p.teardown.call(e,f,g.handle)===!1)&&v.removeEvent(e,u,g.handle),delete h[u])}v.isEmptyObject(h)&&(delete g.handle,v.removeData(e,"events",!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(n,r,s,o){if(!s||s.nodeType!==3&&s.nodeType!==8){var u,a,f,l,c,h,p,d,m,g,y=n.type||n,b=[];if(Y.test(y+v.event.triggered))return;y.indexOf("!")>=0&&(y=y.slice(0,-1),a=!0),y.indexOf(".")>=0&&(b=y.split("."),y=b.shift(),b.sort());if((!s||v.event.customEvent[y])&&!v.event.global[y])return;n=typeof n=="object"?n[v.expando]?n:new v.Event(y,n):new v.Event(y),n.type=y,n.isTrigger=!0,n.exclusive=a,n.namespace=b.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,h=y.indexOf(":")<0?"on"+y:"";if(!s){u=v.cache;for(f in u)u[f].events&&u[f].events[y]&&v.event.trigger(n,r,u[f].handle.elem,!0);return}n.result=t,n.target||(n.target=s),r=r!=null?v.makeArray(r):[],r.unshift(n),p=v.event.special[y]||{};if(p.trigger&&p.trigger.apply(s,r)===!1)return;m=[[s,p.bindType||y]];if(!o&&!p.noBubble&&!v.isWindow(s)){g=p.delegateType||y,l=Y.test(g+y)?s:s.parentNode;for(c=s;l;l=l.parentNode)m.push([l,g]),c=l;c===(s.ownerDocument||i)&&m.push([c.defaultView||c.parentWindow||e,g])}for(f=0;f<m.length&&!n.isPropagationStopped();f++)l=m[f][0],n.type=m[f][1],d=(v._data(l,"events")||{})[n.type]&&v._data(l,"handle"),d&&d.apply(l,r),d=h&&l[h],d&&v.acceptData(l)&&d.apply&&d.apply(l,r)===!1&&n.preventDefault();return n.type=y,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(s.ownerDocument,r)===!1)&&(y!=="click"||!v.nodeName(s,"a"))&&v.acceptData(s)&&h&&s[y]&&(y!=="focus"&&y!=="blur"||n.target.offsetWidth!==0)&&!v.isWindow(s)&&(c=s[h],c&&(s[h]=null),v.event.triggered=y,s[y](),v.event.triggered=t,c&&(s[h]=c)),n.result}return},dispatch:function(n){n=v.event.fix(n||e.event);var r,i,s,o,u,a,f,c,h,p,d=(v._data(this,"events")||{})[n.type]||[],m=d.delegateCount,g=l.call(arguments),y=!n.exclusive&&!n.namespace,b=v.event.special[n.type]||{},w=[];g[0]=n,n.delegateTarget=this;if(b.preDispatch&&b.preDispatch.call(this,n)===!1)return;if(m&&(!n.button||n.type!=="click"))for(s=n.target;s!=this;s=s.parentNode||this)if(s.disabled!==!0||n.type!=="click"){u={},f=[];for(r=0;r<m;r++)c=d[r],h=c.selector,u[h]===t&&(u[h]=c.needsContext?v(h,this).index(s)>=0:v.find(h,this,null,[s]).length),u[h]&&f.push(c);f.length&&w.push({elem:s,matches:f})}d.length>m&&w.push({elem:this,matches:d.slice(m)});for(r=0;r<w.length&&!n.isPropagationStopped();r++){a=w[r],n.currentTarget=a.elem;for(i=0;i<a.matches.length&&!n.isImmediatePropagationStopped();i++){c=a.matches[i];if(y||!n.namespace&&!c.namespace||n.namespace_re&&n.namespace_re.test(c.namespace))n.data=c.data,n.handleObj=c,o=((v.event.special[c.origType]||{}).handle||c.handler).apply(a.elem,g),o!==t&&(n.result=o,o===!1&&(n.preventDefault(),n.stopPropagation()))}}return b.postDispatch&&b.postDispatch.call(this,n),n.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return e.which==null&&(e.which=t.charCode!=null?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,s,o,u=n.button,a=n.fromElement;return e.pageX==null&&n.clientX!=null&&(r=e.target.ownerDocument||i,s=r.documentElement,o=r.body,e.pageX=n.clientX+(s&&s.scrollLeft||o&&o.scrollLeft||0)-(s&&s.clientLeft||o&&o.clientLeft||0),e.pageY=n.clientY+(s&&s.scrollTop||o&&o.scrollTop||0)-(s&&s.clientTop||o&&o.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?n.toElement:a),!e.which&&u!==t&&(e.which=u&1?1:u&2?3:u&4?2:0),e}},fix:function(e){if(e[v.expando])return e;var t,n,r=e,s=v.event.fixHooks[e.type]||{},o=s.props?this.props.concat(s.props):this.props;e=v.Event(r);for(t=o.length;t;)n=o[--t],e[n]=r[n];return e.target||(e.target=r.srcElement||i),e.target.nodeType===3&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,r):e},special:{load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(e,t,n){v.isWindow(this)&&(this.onbeforeunload=n)},teardown:function(e,t){this.onbeforeunload===t&&(this.onbeforeunload=null)}}},simulate:function(e,t,n,r){var i=v.extend(new v.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?v.event.trigger(i,null,t):v.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},v.event.handle=v.event.dispatch,v.removeEvent=i.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]=="undefined"&&(e[r]=null),e.detachEvent(r,n))},v.Event=function(e,t){if(!(this instanceof v.Event))return new v.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?tt:et):this.type=e,t&&v.extend(this,t),this.timeStamp=e&&e.timeStamp||v.now(),this[v.expando]=!0},v.Event.prototype={preventDefault:function(){this.isDefaultPrevented=tt;var e=this.originalEvent;if(!e)return;e.preventDefault?e.preventDefault():e.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=tt;var e=this.originalEvent;if(!e)return;e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=tt,this.stopPropagation()},isDefaultPrevented:et,isPropagationStopped:et,isImmediatePropagationStopped:et},v.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){v.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,s=e.handleObj,o=s.selector;if(!i||i!==r&&!v.contains(r,i))e.type=s.origType,n=s.handler.apply(this,arguments),e.type=t;return n}}}),v.support.submitBubbles||(v.event.special.submit={setup:function(){if(v.nodeName(this,"form"))return!1;v.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=v.nodeName(n,"input")||v.nodeName(n,"button")?n.form:t;r&&!v._data(r,"_submit_attached")&&(v.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),v._data(r,"_submit_attached",!0))})},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&v.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){if(v.nodeName(this,"form"))return!1;v.event.remove(this,"._submit")}}),v.support.changeBubbles||(v.event.special.change={setup:function(){if($.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")v.event.add(this,"propertychange._change",function(e){e.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),v.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),v.event.simulate("change",this,e,!0)});return!1}v.event.add(this,"beforeactivate._change",function(e){var t=e.target;$.test(t.nodeName)&&!v._data(t,"_change_attached")&&(v.event.add(t,"change._change",function(e){this.parentNode&&!e.isSimulated&&!e.isTrigger&&v.event.simulate("change",this.parentNode,e,!0)}),v._data(t,"_change_attached",!0))})},handle:function(e){var t=e.target;if(this!==t||e.isSimulated||e.isTrigger||t.type!=="radio"&&t.type!=="checkbox")return e.handleObj.handler.apply(this,arguments)},teardown:function(){return v.event.remove(this,"._change"),!$.test(this.nodeName)}}),v.support.focusinBubbles||v.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){v.event.simulate(t,e.target,v.event.fix(e),!0)};v.event.special[t]={setup:function(){n++===0&&i.addEventListener(e,r,!0)},teardown:function(){--n===0&&i.removeEventListener(e,r,!0)}}}),v.fn.extend({on:function(e,n,r,i,s){var o,u;if(typeof e=="object"){typeof n!="string"&&(r=r||n,n=t);for(u in e)this.on(u,n,r,e[u],s);return this}r==null&&i==null?(i=n,r=n=t):i==null&&(typeof n=="string"?(i=r,r=t):(i=r,r=n,n=t));if(i===!1)i=et;else if(!i)return this;return s===1&&(o=i,i=function(e){return v().off(e),o.apply(this,arguments)},i.guid=o.guid||(o.guid=v.guid++)),this.each(function(){v.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,s;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,v(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if(typeof e=="object"){for(s in e)this.off(s,n,e[s]);return this}if(n===!1||typeof n=="function")r=n,n=t;return r===!1&&(r=et),this.each(function(){v.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},live:function(e,t,n){return v(this.context).on(e,this.selector,t,n),this},die:function(e,t){return v(this.context).off(e,this.selector||"**",t),this},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return arguments.length===1?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){v.event.trigger(e,t,this)})},triggerHandler:function(e,t){if(this[0])return v.event.trigger(e,t,this[0],!0)},toggle:function(e){var t=arguments,n=e.guid||v.guid++,r=0,i=function(n){var i=(v._data(this,"lastToggle"+e.guid)||0)%r;return v._data(this,"lastToggle"+e.guid,i+1),n.preventDefault(),t[i].apply(this,arguments)||!1};i.guid=n;while(r<t.length)t[r++].guid=n;return this.click(i)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),v.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){v.fn[t]=function(e,n){return n==null&&(n=e,e=null),arguments.length>0?this.on(t,null,e,n):this.trigger(t)},Q.test(t)&&(v.event.fixHooks[t]=v.event.keyHooks),G.test(t)&&(v.event.fixHooks[t]=v.event.mouseHooks)}),function(e,t){function nt(e,t,n,r){n=n||[],t=t||g;var i,s,a,f,l=t.nodeType;if(!e||typeof e!="string")return n;if(l!==1&&l!==9)return[];a=o(t);if(!a&&!r)if(i=R.exec(e))if(f=i[1]){if(l===9){s=t.getElementById(f);if(!s||!s.parentNode)return n;if(s.id===f)return n.push(s),n}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(f))&&u(t,s)&&s.id===f)return n.push(s),n}else{if(i[2])return S.apply(n,x.call(t.getElementsByTagName(e),0)),n;if((f=i[3])&&Z&&t.getElementsByClassName)return S.apply(n,x.call(t.getElementsByClassName(f),0)),n}return vt(e.replace(j,"$1"),t,n,r,a)}function rt(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function it(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function st(e){return N(function(t){return t=+t,N(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function ot(e,t,n){if(e===t)return n;var r=e.nextSibling;while(r){if(r===t)return-1;r=r.nextSibling}return 1}function ut(e,t){var n,r,s,o,u,a,f,l=L[d][e+" "];if(l)return t?0:l.slice(0);u=e,a=[],f=i.preFilter;while(u){if(!n||(r=F.exec(u)))r&&(u=u.slice(r[0].length)||u),a.push(s=[]);n=!1;if(r=I.exec(u))s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=r[0].replace(j," ");for(o in i.filter)(r=J[o].exec(u))&&(!f[o]||(r=f[o](r)))&&(s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=o,n.matches=r);if(!n)break}return t?u.length:u?nt.error(e):L(e,a).slice(0)}function at(e,t,r){var i=t.dir,s=r&&t.dir==="parentNode",o=w++;return t.first?function(t,n,r){while(t=t[i])if(s||t.nodeType===1)return e(t,n,r)}:function(t,r,u){if(!u){var a,f=b+" "+o+" ",l=f+n;while(t=t[i])if(s||t.nodeType===1){if((a=t[d])===l)return t.sizset;if(typeof a=="string"&&a.indexOf(f)===0){if(t.sizset)return t}else{t[d]=l;if(e(t,r,u))return t.sizset=!0,t;t.sizset=!1}}}else while(t=t[i])if(s||t.nodeType===1)if(e(t,r,u))return t}}function ft(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function lt(e,t,n,r,i){var s,o=[],u=0,a=e.length,f=t!=null;for(;u<a;u++)if(s=e[u])if(!n||n(s,r,i))o.push(s),f&&t.push(u);return o}function ct(e,t,n,r,i,s){return r&&!r[d]&&(r=ct(r)),i&&!i[d]&&(i=ct(i,s)),N(function(s,o,u,a){var f,l,c,h=[],p=[],d=o.length,v=s||dt(t||"*",u.nodeType?[u]:u,[]),m=e&&(s||!t)?lt(v,h,e,u,a):v,g=n?i||(s?e:d||r)?[]:o:m;n&&n(m,g,u,a);if(r){f=lt(g,p),r(f,[],u,a),l=f.length;while(l--)if(c=f[l])g[p[l]]=!(m[p[l]]=c)}if(s){if(i||e){if(i){f=[],l=g.length;while(l--)(c=g[l])&&f.push(m[l]=c);i(null,g=[],f,a)}l=g.length;while(l--)(c=g[l])&&(f=i?T.call(s,c):h[l])>-1&&(s[f]=!(o[f]=c))}}else g=lt(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):S.apply(o,g)})}function ht(e){var t,n,r,s=e.length,o=i.relative[e[0].type],u=o||i.relative[" "],a=o?1:0,f=at(function(e){return e===t},u,!0),l=at(function(e){return T.call(t,e)>-1},u,!0),h=[function(e,n,r){return!o&&(r||n!==c)||((t=n).nodeType?f(e,n,r):l(e,n,r))}];for(;a<s;a++)if(n=i.relative[e[a].type])h=[at(ft(h),n)];else{n=i.filter[e[a].type].apply(null,e[a].matches);if(n[d]){r=++a;for(;r<s;r++)if(i.relative[e[r].type])break;return ct(a>1&&ft(h),a>1&&e.slice(0,a-1).join("").replace(j,"$1"),n,a<r&&ht(e.slice(a,r)),r<s&&ht(e=e.slice(r)),r<s&&e.join(""))}h.push(n)}return ft(h)}function pt(e,t){var r=t.length>0,s=e.length>0,o=function(u,a,f,l,h){var p,d,v,m=[],y=0,w="0",x=u&&[],T=h!=null,N=c,C=u||s&&i.find.TAG("*",h&&a.parentNode||a),k=b+=N==null?1:Math.E;T&&(c=a!==g&&a,n=o.el);for(;(p=C[w])!=null;w++){if(s&&p){for(d=0;v=e[d];d++)if(v(p,a,f)){l.push(p);break}T&&(b=k,n=++o.el)}r&&((p=!v&&p)&&y--,u&&x.push(p))}y+=w;if(r&&w!==y){for(d=0;v=t[d];d++)v(x,m,a,f);if(u){if(y>0)while(w--)!x[w]&&!m[w]&&(m[w]=E.call(l));m=lt(m)}S.apply(l,m),T&&!u&&m.length>0&&y+t.length>1&&nt.uniqueSort(l)}return T&&(b=k,c=N),x};return o.el=0,r?N(o):o}function dt(e,t,n){var r=0,i=t.length;for(;r<i;r++)nt(e,t[r],n);return n}function vt(e,t,n,r,s){var o,u,f,l,c,h=ut(e),p=h.length;if(!r&&h.length===1){u=h[0]=h[0].slice(0);if(u.length>2&&(f=u[0]).type==="ID"&&t.nodeType===9&&!s&&i.relative[u[1].type]){t=i.find.ID(f.matches[0].replace($,""),t,s)[0];if(!t)return n;e=e.slice(u.shift().length)}for(o=J.POS.test(e)?-1:u.length-1;o>=0;o--){f=u[o];if(i.relative[l=f.type])break;if(c=i.find[l])if(r=c(f.matches[0].replace($,""),z.test(u[0].type)&&t.parentNode||t,s)){u.splice(o,1),e=r.length&&u.join("");if(!e)return S.apply(n,x.call(r,0)),n;break}}}return a(e,h)(r,t,s,n,z.test(e)),n}function mt(){}var n,r,i,s,o,u,a,f,l,c,h=!0,p="undefined",d=("sizcache"+Math.random()).replace(".",""),m=String,g=e.document,y=g.documentElement,b=0,w=0,E=[].pop,S=[].push,x=[].slice,T=[].indexOf||function(e){var t=0,n=this.length;for(;t<n;t++)if(this[t]===e)return t;return-1},N=function(e,t){return e[d]=t==null||t,e},C=function(){var e={},t=[];return N(function(n,r){return t.push(n)>i.cacheLength&&delete e[t.shift()],e[n+" "]=r},e)},k=C(),L=C(),A=C(),O="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",_=M.replace("w","w#"),D="([*^$|!~]?=)",P="\\["+O+"*("+M+")"+O+"*(?:"+D+O+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+_+")|)|)"+O+"*\\]",H=":("+M+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+P+")|[^:]|\\\\.)*|.*))\\)|)",B=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+O+"*((?:-\\d)?\\d*)"+O+"*\\)|)(?=[^-]|$)",j=new RegExp("^"+O+"+|((?:^|[^\\\\])(?:\\\\.)*)"+O+"+$","g"),F=new RegExp("^"+O+"*,"+O+"*"),I=new RegExp("^"+O+"*([\\x20\\t\\r\\n\\f>+~])"+O+"*"),q=new RegExp(H),R=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,U=/^:not/,z=/[\x20\t\r\n\f]*[+~]/,W=/:not\($/,X=/h\d/i,V=/input|select|textarea|button/i,$=/\\(?!\\)/g,J={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),NAME:new RegExp("^\\[name=['\"]?("+M+")['\"]?\\]"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+H),POS:new RegExp(B,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+O+"*(even|odd|(([+-]|)(\\d*)n|)"+O+"*(?:([+-]|)"+O+"*(\\d+)|))"+O+"*\\)|)","i"),needsContext:new RegExp("^"+O+"*[>+~]|"+B,"i")},K=function(e){var t=g.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}},Q=K(function(e){return e.appendChild(g.createComment("")),!e.getElementsByTagName("*").length}),G=K(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==p&&e.firstChild.getAttribute("href")==="#"}),Y=K(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return t!=="boolean"&&t!=="string"}),Z=K(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!e.getElementsByClassName||!e.getElementsByClassName("e").length?!1:(e.lastChild.className="e",e.getElementsByClassName("e").length===2)}),et=K(function(e){e.id=d+0,e.innerHTML="<a name='"+d+"'></a><div name='"+d+"'></div>",y.insertBefore(e,y.firstChild);var t=g.getElementsByName&&g.getElementsByName(d).length===2+g.getElementsByName(d+0).length;return r=!g.getElementById(d),y.removeChild(e),t});try{x.call(y.childNodes,0)[0].nodeType}catch(tt){x=function(e){var t,n=[];for(;t=this[e];e++)n.push(t);return n}}nt.matches=function(e,t){return nt(e,null,null,t)},nt.matchesSelector=function(e,t){return nt(t,null,null,[e]).length>0},s=nt.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(i===1||i===9||i===11){if(typeof e.textContent=="string")return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=s(e)}else if(i===3||i===4)return e.nodeValue}else for(;t=e[r];r++)n+=s(t);return n},o=nt.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":!1},u=nt.contains=y.contains?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t&&t.parentNode;return e===r||!!(r&&r.nodeType===1&&n.contains&&n.contains(r))}:y.compareDocumentPosition?function(e,t){return t&&!!(e.compareDocumentPosition(t)&16)}:function(e,t){while(t=t.parentNode)if(t===e)return!0;return!1},nt.attr=function(e,t){var n,r=o(e);return r||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):r||Y?e.getAttribute(t):(n=e.getAttributeNode(t),n?typeof e[t]=="boolean"?e[t]?t:null:n.specified?n.value:null:null)},i=nt.selectors={cacheLength:50,createPseudo:N,match:J,attrHandle:G?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},find:{ID:r?function(e,t,n){if(typeof t.getElementById!==p&&!n){var r=t.getElementById(e);return r&&r.parentNode?[r]:[]}}:function(e,n,r){if(typeof n.getElementById!==p&&!r){var i=n.getElementById(e);return i?i.id===e||typeof i.getAttributeNode!==p&&i.getAttributeNode("id").value===e?[i]:t:[]}},TAG:Q?function(e,t){if(typeof t.getElementsByTagName!==p)return t.getElementsByTagName(e)}:function(e,t){var n=t.getElementsByTagName(e);if(e==="*"){var r,i=[],s=0;for(;r=n[s];s++)r.nodeType===1&&i.push(r);return i}return n},NAME:et&&function(e,t){if(typeof t.getElementsByName!==p)return t.getElementsByName(name)},CLASS:Z&&function(e,t,n){if(typeof t.getElementsByClassName!==p&&!n)return t.getElementsByClassName(e)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace($,""),e[3]=(e[4]||e[5]||"").replace($,""),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1]==="nth"?(e[2]||nt.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*(e[2]==="even"||e[2]==="odd")),e[4]=+(e[6]+e[7]||e[2]==="odd")):e[2]&&nt.error(e[0]),e},PSEUDO:function(e){var t,n;if(J.CHILD.test(e[0]))return null;if(e[3])e[2]=e[3];else if(t=e[4])q.test(t)&&(n=ut(t,!0))&&(n=t.indexOf(")",t.length-n)-t.length)&&(t=t.slice(0,n),e[0]=e[0].slice(0,n)),e[2]=t;return e.slice(0,3)}},filter:{ID:r?function(e){return e=e.replace($,""),function(t){return t.getAttribute("id")===e}}:function(e){return e=e.replace($,""),function(t){var n=typeof t.getAttributeNode!==p&&t.getAttributeNode("id");return n&&n.value===e}},TAG:function(e){return e==="*"?function(){return!0}:(e=e.replace($,"").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[d][e+" "];return t||(t=new RegExp("(^|"+O+")"+e+"("+O+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==p&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r,i){var s=nt.attr(r,e);return s==null?t==="!=":t?(s+="",t==="="?s===n:t==="!="?s!==n:t==="^="?n&&s.indexOf(n)===0:t==="*="?n&&s.indexOf(n)>-1:t==="$="?n&&s.substr(s.length-n.length)===n:t==="~="?(" "+s+" ").indexOf(n)>-1:t==="|="?s===n||s.substr(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r){return e==="nth"?function(e){var t,i,s=e.parentNode;if(n===1&&r===0)return!0;if(s){i=0;for(t=s.firstChild;t;t=t.nextSibling)if(t.nodeType===1){i++;if(e===t)break}}return i-=r,i===n||i%n===0&&i/n>=0}:function(t){var n=t;switch(e){case"only":case"first":while(n=n.previousSibling)if(n.nodeType===1)return!1;if(e==="first")return!0;n=t;case"last":while(n=n.nextSibling)if(n.nodeType===1)return!1;return!0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||nt.error("unsupported pseudo: "+e);return r[d]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?N(function(e,n){var i,s=r(e,t),o=s.length;while(o--)i=T.call(e,s[o]),e[i]=!(n[i]=s[o])}):function(e){return r(e,0,n)}):r}},pseudos:{not:N(function(e){var t=[],n=[],r=a(e.replace(j,"$1"));return r[d]?N(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)if(s=o[u])e[u]=!(t[u]=s)}):function(e,i,s){return t[0]=e,r(t,null,s,n),!n.pop()}}),has:N(function(e){return function(t){return nt(e,t).length>0}}),contains:N(function(e){return function(t){return(t.textContent||t.innerText||s(t)).indexOf(e)>-1}}),enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!i.pseudos.empty(e)},empty:function(e){var t;e=e.firstChild;while(e){if(e.nodeName>"@"||(t=e.nodeType)===3||t===4)return!1;e=e.nextSibling}return!0},header:function(e){return X.test(e.nodeName)},text:function(e){var t,n;return e.nodeName.toLowerCase()==="input"&&(t=e.type)==="text"&&((n=e.getAttribute("type"))==null||n.toLowerCase()===t)},radio:rt("radio"),checkbox:rt("checkbox"),file:rt("file"),password:rt("password"),image:rt("image"),submit:it("submit"),reset:it("reset"),button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},input:function(e){return V.test(e.nodeName)},focus:function(e){var t=e.ownerDocument;return e===t.activeElement&&(!t.hasFocus||t.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},active:function(e){return e===e.ownerDocument.activeElement},first:st(function(){return[0]}),last:st(function(e,t){return[t-1]}),eq:st(function(e,t,n){return[n<0?n+t:n]}),even:st(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:st(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:st(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:st(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},f=y.compareDocumentPosition?function(e,t){return e===t?(l=!0,0):(!e.compareDocumentPosition||!t.compareDocumentPosition?e.compareDocumentPosition:e.compareDocumentPosition(t)&4)?-1:1}:function(e,t){if(e===t)return l=!0,0;if(e.sourceIndex&&t.sourceIndex)return e.sourceIndex-t.sourceIndex;var n,r,i=[],s=[],o=e.parentNode,u=t.parentNode,a=o;if(o===u)return ot(e,t);if(!o)return-1;if(!u)return 1;while(a)i.unshift(a),a=a.parentNode;a=u;while(a)s.unshift(a),a=a.parentNode;n=i.length,r=s.length;for(var f=0;f<n&&f<r;f++)if(i[f]!==s[f])return ot(i[f],s[f]);return f===n?ot(e,s[f],-1):ot(i[f],t,1)},[0,0].sort(f),h=!l,nt.uniqueSort=function(e){var t,n=[],r=1,i=0;l=h,e.sort(f);if(l){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e},nt.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},a=nt.compile=function(e,t){var n,r=[],i=[],s=A[d][e+" "];if(!s){t||(t=ut(e)),n=t.length;while(n--)s=ht(t[n]),s[d]?r.push(s):i.push(s);s=A(e,pt(i,r))}return s},g.querySelectorAll&&function(){var e,t=vt,n=/'|\\/g,r=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,i=[":focus"],s=[":active"],u=y.matchesSelector||y.mozMatchesSelector||y.webkitMatchesSelector||y.oMatchesSelector||y.msMatchesSelector;K(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||i.push("\\["+O+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||i.push(":checked")}),K(function(e){e.innerHTML="<p test=''></p>",e.querySelectorAll("[test^='']").length&&i.push("[*^$]="+O+"*(?:\"\"|'')"),e.innerHTML="<input type='hidden'/>",e.querySelectorAll(":enabled").length||i.push(":enabled",":disabled")}),i=new RegExp(i.join("|")),vt=function(e,r,s,o,u){if(!o&&!u&&!i.test(e)){var a,f,l=!0,c=d,h=r,p=r.nodeType===9&&e;if(r.nodeType===1&&r.nodeName.toLowerCase()!=="object"){a=ut(e),(l=r.getAttribute("id"))?c=l.replace(n,"\\$&"):r.setAttribute("id",c),c="[id='"+c+"'] ",f=a.length;while(f--)a[f]=c+a[f].join("");h=z.test(e)&&r.parentNode||r,p=a.join(",")}if(p)try{return S.apply(s,x.call(h.querySelectorAll(p),0)),s}catch(v){}finally{l||r.removeAttribute("id")}}return t(e,r,s,o,u)},u&&(K(function(t){e=u.call(t,"div");try{u.call(t,"[test!='']:sizzle"),s.push("!=",H)}catch(n){}}),s=new RegExp(s.join("|")),nt.matchesSelector=function(t,n){n=n.replace(r,"='$1']");if(!o(t)&&!s.test(n)&&!i.test(n))try{var a=u.call(t,n);if(a||e||t.document&&t.document.nodeType!==11)return a}catch(f){}return nt(n,null,null,[t]).length>0})}(),i.pseudos.nth=i.pseudos.eq,i.filters=mt.prototype=i.pseudos,i.setFilters=new mt,nt.attr=v.attr,v.find=nt,v.expr=nt.selectors,v.expr[":"]=v.expr.pseudos,v.unique=nt.uniqueSort,v.text=nt.getText,v.isXMLDoc=nt.isXML,v.contains=nt.contains}(e);var nt=/Until$/,rt=/^(?:parents|prev(?:Until|All))/,it=/^.[^:#\[\.,]*$/,st=v.expr.match.needsContext,ot={children:!0,contents:!0,next:!0,prev:!0};v.fn.extend({find:function(e){var t,n,r,i,s,o,u=this;if(typeof e!="string")return v(e).filter(function(){for(t=0,n=u.length;t<n;t++)if(v.contains(u[t],this))return!0});o=this.pushStack("","find",e);for(t=0,n=this.length;t<n;t++){r=o.length,v.find(e,this[t],o);if(t>0)for(i=r;i<o.length;i++)for(s=0;s<r;s++)if(o[s]===o[i]){o.splice(i--,1);break}}return o},has:function(e){var t,n=v(e,this),r=n.length;return this.filter(function(){for(t=0;t<r;t++)if(v.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1),"not",e)},filter:function(e){return this.pushStack(ft(this,e,!0),"filter",e)},is:function(e){return!!e&&(typeof e=="string"?st.test(e)?v(e,this.context).index(this[0])>=0:v.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,s=[],o=st.test(e)||typeof e!="string"?v(e,t||this.context):0;for(;r<i;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&n.nodeType!==11){if(o?o.index(n)>-1:v.find.matchesSelector(n,e)){s.push(n);break}n=n.parentNode}}return s=s.length>1?v.unique(s):s,this.pushStack(s,"closest",e)},index:function(e){return e?typeof e=="string"?v.inArray(this[0],v(e)):v.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n=typeof e=="string"?v(e,t):v.makeArray(e&&e.nodeType?[e]:e),r=v.merge(this.get(),n);return this.pushStack(ut(n[0])||ut(r[0])?r:v.unique(r))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}}),v.fn.andSelf=v.fn.addBack,v.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return v.dir(e,"parentNode")},parentsUntil:function(e,t,n){return v.dir(e,"parentNode",n)},next:function(e){return at(e,"nextSibling")},prev:function(e){return at(e,"previousSibling")},nextAll:function(e){return v.dir(e,"nextSibling")},prevAll:function(e){return v.dir(e,"previousSibling")},nextUntil:function(e,t,n){return v.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return v.dir(e,"previousSibling",n)},siblings:function(e){return v.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return v.sibling(e.firstChild)},contents:function(e){return v.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:v.merge([],e.childNodes)}},function(e,t){v.fn[e]=function(n,r){var i=v.map(this,t,n);return nt.test(e)||(r=n),r&&typeof r=="string"&&(i=v.filter(r,i)),i=this.length>1&&!ot[e]?v.unique(i):i,this.length>1&&rt.test(e)&&(i=i.reverse()),this.pushStack(i,e,l.call(arguments).join(","))}}),v.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),t.length===1?v.find.matchesSelector(t[0],e)?[t[0]]:[]:v.find.matches(e,t)},dir:function(e,n,r){var i=[],s=e[n];while(s&&s.nodeType!==9&&(r===t||s.nodeType!==1||!v(s).is(r)))s.nodeType===1&&i.push(s),s=s[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}});var ct="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ht=/ jQuery\d+="(?:null|\d+)"/g,pt=/^\s+/,dt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,vt=/<([\w:]+)/,mt=/<tbody/i,gt=/<|&#?\w+;/,yt=/<(?:script|style|link)/i,bt=/<(?:script|object|embed|option|style)/i,wt=new RegExp("<(?:"+ct+")[\\s/>]","i"),Et=/^(?:checkbox|radio)$/,St=/checked\s*(?:[^=]|=\s*.checked.)/i,xt=/\/(java|ecma)script/i,Tt=/^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,Nt={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},Ct=lt(i),kt=Ct.appendChild(i.createElement("div"));Nt.optgroup=Nt.option,Nt.tbody=Nt.tfoot=Nt.colgroup=Nt.caption=Nt.thead,Nt.th=Nt.td,v.support.htmlSerialize||(Nt._default=[1,"X<div>","</div>"]),v.fn.extend({text:function(e){return v.access(this,function(e){return e===t?v.text(this):this.empty().append((this[0]&&this[0].ownerDocument||i).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(v.isFunction(e))return this.each(function(t){v(this).wrapAll(e.call(this,t))});if(this[0]){var t=v(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&e.firstChild.nodeType===1)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return v.isFunction(e)?this.each(function(t){v(this).wrapInner(e.call(this,t))}):this.each(function(){var t=v(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=v.isFunction(e);return this.each(function(n){v(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){v.nodeName(this,"body")||v(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(e,this.firstChild)})},before:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(e,this),"before",this.selector)}},after:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(this,e),"after",this.selector)}},remove:function(e,t){var n,r=0;for(;(n=this[r])!=null;r++)if(!e||v.filter(e,[n]).length)!t&&n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),v.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n);return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++){e.nodeType===1&&v.cleanData(e.getElementsByTagName("*"));while(e.firstChild)e.removeChild(e.firstChild)}return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return v.clone(this,e,t)})},html:function(e){return v.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodeType===1?n.innerHTML.replace(ht,""):t;if(typeof e=="string"&&!yt.test(e)&&(v.support.htmlSerialize||!wt.test(e))&&(v.support.leadingWhitespace||!pt.test(e))&&!Nt[(vt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(dt,"<$1></$2>");try{for(;r<i;r++)n=this[r]||{},n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),n.innerHTML=e);n=0}catch(s){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){return ut(this[0])?this.length?this.pushStack(v(v.isFunction(e)?e():e),"replaceWith",e):this:v.isFunction(e)?this.each(function(t){var n=v(this),r=n.html();n.replaceWith(e.call(this,t,r))}):(typeof e!="string"&&(e=v(e).detach()),this.each(function(){var t=this.nextSibling,n=this.parentNode;v(this).remove(),t?v(t).before(e):v(n).append(e)}))},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=[].concat.apply([],e);var i,s,o,u,a=0,f=e[0],l=[],c=this.length;if(!v.support.checkClone&&c>1&&typeof f=="string"&&St.test(f))return this.each(function(){v(this).domManip(e,n,r)});if(v.isFunction(f))return this.each(function(i){var s=v(this);e[0]=f.call(this,i,n?s.html():t),s.domManip(e,n,r)});if(this[0]){i=v.buildFragment(e,this,l),o=i.fragment,s=o.firstChild,o.childNodes.length===1&&(o=s);if(s){n=n&&v.nodeName(s,"tr");for(u=i.cacheable||c-1;a<c;a++)r.call(n&&v.nodeName(this[a],"table")?Lt(this[a],"tbody"):this[a],a===u?o:v.clone(o,!0,!0))}o=s=null,l.length&&v.each(l,function(e,t){t.src?v.ajax?v.ajax({url:t.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):v.error("no ajax"):v.globalEval((t.text||t.textContent||t.innerHTML||"").replace(Tt,"")),t.parentNode&&t.parentNode.removeChild(t)})}return this}}),v.buildFragment=function(e,n,r){var s,o,u,a=e[0];return n=n||i,n=!n.nodeType&&n[0]||n,n=n.ownerDocument||n,e.length===1&&typeof a=="string"&&a.length<512&&n===i&&a.charAt(0)==="<"&&!bt.test(a)&&(v.support.checkClone||!St.test(a))&&(v.support.html5Clone||!wt.test(a))&&(o=!0,s=v.fragments[a],u=s!==t),s||(s=n.createDocumentFragment(),v.clean(e,n,s,r),o&&(v.fragments[a]=u&&s)),{fragment:s,cacheable:o}},v.fragments={},v.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){v.fn[e]=function(n){var r,i=0,s=[],o=v(n),u=o.length,a=this.length===1&&this[0].parentNode;if((a==null||a&&a.nodeType===11&&a.childNodes.length===1)&&u===1)return o[t](this[0]),this;for(;i<u;i++)r=(i>0?this.clone(!0):this).get(),v(o[i])[t](r),s=s.concat(r);return this.pushStack(s,e,o.selector)}}),v.extend({clone:function(e,t,n){var r,i,s,o;v.support.html5Clone||v.isXMLDoc(e)||!wt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(kt.innerHTML=e.outerHTML,kt.removeChild(o=kt.firstChild));if((!v.support.noCloneEvent||!v.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!v.isXMLDoc(e)){Ot(e,o),r=Mt(e),i=Mt(o);for(s=0;r[s];++s)i[s]&&Ot(r[s],i[s])}if(t){At(e,o);if(n){r=Mt(e),i=Mt(o);for(s=0;r[s];++s)At(r[s],i[s])}}return r=i=null,o},clean:function(e,t,n,r){var s,o,u,a,f,l,c,h,p,d,m,g,y=t===i&&Ct,b=[];if(!t||typeof t.createDocumentFragment=="undefined")t=i;for(s=0;(u=e[s])!=null;s++){typeof u=="number"&&(u+="");if(!u)continue;if(typeof u=="string")if(!gt.test(u))u=t.createTextNode(u);else{y=y||lt(t),c=t.createElement("div"),y.appendChild(c),u=u.replace(dt,"<$1></$2>"),a=(vt.exec(u)||["",""])[1].toLowerCase(),f=Nt[a]||Nt._default,l=f[0],c.innerHTML=f[1]+u+f[2];while(l--)c=c.lastChild;if(!v.support.tbody){h=mt.test(u),p=a==="table"&&!h?c.firstChild&&c.firstChild.childNodes:f[1]==="<table>"&&!h?c.childNodes:[];for(o=p.length-1;o>=0;--o)v.nodeName(p[o],"tbody")&&!p[o].childNodes.length&&p[o].parentNode.removeChild(p[o])}!v.support.leadingWhitespace&&pt.test(u)&&c.insertBefore(t.createTextNode(pt.exec(u)[0]),c.firstChild),u=c.childNodes,c.parentNode.removeChild(c)}u.nodeType?b.push(u):v.merge(b,u)}c&&(u=c=y=null);if(!v.support.appendChecked)for(s=0;(u=b[s])!=null;s++)v.nodeName(u,"input")?_t(u):typeof u.getElementsByTagName!="undefined"&&v.grep(u.getElementsByTagName("input"),_t);if(n){m=function(e){if(!e.type||xt.test(e.type))return r?r.push(e.parentNode?e.parentNode.removeChild(e):e):n.appendChild(e)};for(s=0;(u=b[s])!=null;s++)if(!v.nodeName(u,"script")||!m(u))n.appendChild(u),typeof u.getElementsByTagName!="undefined"&&(g=v.grep(v.merge([],u.getElementsByTagName("script")),m),b.splice.apply(b,[s+1,0].concat(g)),s+=g.length)}return b},cleanData:function(e,t){var n,r,i,s,o=0,u=v.expando,a=v.cache,f=v.support.deleteExpando,l=v.event.special;for(;(i=e[o])!=null;o++)if(t||v.acceptData(i)){r=i[u],n=r&&a[r];if(n){if(n.events)for(s in n.events)l[s]?v.event.remove(i,s):v.removeEvent(i,s,n.handle);a[r]&&(delete a[r],f?delete i[u]:i.removeAttribute?i.removeAttribute(u):i[u]=null,v.deletedIds.push(r))}}}}),function(){var e,t;v.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e=v.uaMatch(o.userAgent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),v.browser=t,v.sub=function(){function e(t,n){return new e.fn.init(t,n)}v.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(r,i){return i&&i instanceof v&&!(i instanceof e)&&(i=e(i)),v.fn.init.call(this,r,i,t)},e.fn.init.prototype=e.fn;var t=e(i);return e}}();var Dt,Pt,Ht,Bt=/alpha\([^)]*\)/i,jt=/opacity=([^)]*)/,Ft=/^(top|right|bottom|left)$/,It=/^(none|table(?!-c[ea]).+)/,qt=/^margin/,Rt=new RegExp("^("+m+")(.*)$","i"),Ut=new RegExp("^("+m+")(?!px)[a-z%]+$","i"),zt=new RegExp("^([-+])=("+m+")","i"),Wt={BODY:"block"},Xt={position:"absolute",visibility:"hidden",display:"block"},Vt={letterSpacing:0,fontWeight:400},$t=["Top","Right","Bottom","Left"],Jt=["Webkit","O","Moz","ms"],Kt=v.fn.toggle;v.fn.extend({css:function(e,n){return v.access(this,function(e,n,r){return r!==t?v.style(e,n,r):v.css(e,n)},e,n,arguments.length>1)},show:function(){return Yt(this,!0)},hide:function(){return Yt(this)},toggle:function(e,t){var n=typeof e=="boolean";return v.isFunction(e)&&v.isFunction(t)?Kt.apply(this,arguments):this.each(function(){(n?e:Gt(this))?v(this).show():v(this).hide()})}}),v.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Dt(e,"opacity");return n===""?"1":n}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":v.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(!e||e.nodeType===3||e.nodeType===8||!e.style)return;var s,o,u,a=v.camelCase(n),f=e.style;n=v.cssProps[a]||(v.cssProps[a]=Qt(f,a)),u=v.cssHooks[n]||v.cssHooks[a];if(r===t)return u&&"get"in u&&(s=u.get(e,!1,i))!==t?s:f[n];o=typeof r,o==="string"&&(s=zt.exec(r))&&(r=(s[1]+1)*s[2]+parseFloat(v.css(e,n)),o="number");if(r==null||o==="number"&&isNaN(r))return;o==="number"&&!v.cssNumber[a]&&(r+="px");if(!u||!("set"in u)||(r=u.set(e,r,i))!==t)try{f[n]=r}catch(l){}},css:function(e,n,r,i){var s,o,u,a=v.camelCase(n);return n=v.cssProps[a]||(v.cssProps[a]=Qt(e.style,a)),u=v.cssHooks[n]||v.cssHooks[a],u&&"get"in u&&(s=u.get(e,!0,i)),s===t&&(s=Dt(e,n)),s==="normal"&&n in Vt&&(s=Vt[n]),r||i!==t?(o=parseFloat(s),r||v.isNumeric(o)?o||0:s):s},swap:function(e,t,n){var r,i,s={};for(i in t)s[i]=e.style[i],e.style[i]=t[i];r=n.call(e);for(i in t)e.style[i]=s[i];return r}}),e.getComputedStyle?Dt=function(t,n){var r,i,s,o,u=e.getComputedStyle(t,null),a=t.style;return u&&(r=u.getPropertyValue(n)||u[n],r===""&&!v.contains(t.ownerDocument,t)&&(r=v.style(t,n)),Ut.test(r)&&qt.test(n)&&(i=a.width,s=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=u.width,a.width=i,a.minWidth=s,a.maxWidth=o)),r}:i.documentElement.currentStyle&&(Dt=function(e,t){var n,r,i=e.currentStyle&&e.currentStyle[t],s=e.style;return i==null&&s&&s[t]&&(i=s[t]),Ut.test(i)&&!Ft.test(t)&&(n=s.left,r=e.runtimeStyle&&e.runtimeStyle.left,r&&(e.runtimeStyle.left=e.currentStyle.left),s.left=t==="fontSize"?"1em":i,i=s.pixelLeft+"px",s.left=n,r&&(e.runtimeStyle.left=r)),i===""?"auto":i}),v.each(["height","width"],function(e,t){v.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth===0&&It.test(Dt(e,"display"))?v.swap(e,Xt,function(){return tn(e,t,r)}):tn(e,t,r)},set:function(e,n,r){return Zt(e,n,r?en(e,t,r,v.support.boxSizing&&v.css(e,"boxSizing")==="border-box"):0)}}}),v.support.opacity||(v.cssHooks.opacity={get:function(e,t){return jt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=v.isNumeric(t)?"alpha(opacity="+t*100+")":"",s=r&&r.filter||n.filter||"";n.zoom=1;if(t>=1&&v.trim(s.replace(Bt,""))===""&&n.removeAttribute){n.removeAttribute("filter");if(r&&!r.filter)return}n.filter=Bt.test(s)?s.replace(Bt,i):s+" "+i}}),v(function(){v.support.reliableMarginRight||(v.cssHooks.marginRight={get:function(e,t){return v.swap(e,{display:"inline-block"},function(){if(t)return Dt(e,"marginRight")})}}),!v.support.pixelPosition&&v.fn.position&&v.each(["top","left"],function(e,t){v.cssHooks[t]={get:function(e,n){if(n){var r=Dt(e,t);return Ut.test(r)?v(e).position()[t]+"px":r}}}})}),v.expr&&v.expr.filters&&(v.expr.filters.hidden=function(e){return e.offsetWidth===0&&e.offsetHeight===0||!v.support.reliableHiddenOffsets&&(e.style&&e.style.display||Dt(e,"display"))==="none"},v.expr.filters.visible=function(e){return!v.expr.filters.hidden(e)}),v.each({margin:"",padding:"",border:"Width"},function(e,t){v.cssHooks[e+t]={expand:function(n){var r,i=typeof n=="string"?n.split(" "):[n],s={};for(r=0;r<4;r++)s[e+$t[r]+t]=i[r]||i[r-2]||i[0];return s}},qt.test(e)||(v.cssHooks[e+t].set=Zt)});var rn=/%20/g,sn=/\[\]$/,on=/\r?\n/g,un=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,an=/^(?:select|textarea)/i;v.fn.extend({serialize:function(){return v.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?v.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||an.test(this.nodeName)||un.test(this.type))}).map(function(e,t){var n=v(this).val();return n==null?null:v.isArray(n)?v.map(n,function(e,n){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),v.param=function(e,n){var r,i=[],s=function(e,t){t=v.isFunction(t)?t():t==null?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};n===t&&(n=v.ajaxSettings&&v.ajaxSettings.traditional);if(v.isArray(e)||e.jquery&&!v.isPlainObject(e))v.each(e,function(){s(this.name,this.value)});else for(r in e)fn(r,e[r],n,s);return i.join("&").replace(rn,"+")};var ln,cn,hn=/#.*$/,pn=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,dn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,vn=/^(?:GET|HEAD)$/,mn=/^\/\//,gn=/\?/,yn=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bn=/([?&])_=[^&]*/,wn=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,En=v.fn.load,Sn={},xn={},Tn=["*/"]+["*"];try{cn=s.href}catch(Nn){cn=i.createElement("a"),cn.href="",cn=cn.href}ln=wn.exec(cn.toLowerCase())||[],v.fn.load=function(e,n,r){if(typeof e!="string"&&En)return En.apply(this,arguments);if(!this.length)return this;var i,s,o,u=this,a=e.indexOf(" ");return a>=0&&(i=e.slice(a,e.length),e=e.slice(0,a)),v.isFunction(n)?(r=n,n=t):n&&typeof n=="object"&&(s="POST"),v.ajax({url:e,type:s,dataType:"html",data:n,complete:function(e,t){r&&u.each(r,o||[e.responseText,t,e])}}).done(function(e){o=arguments,u.html(i?v("<div>").append(e.replace(yn,"")).find(i):e)}),this},v.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){v.fn[t]=function(e){return this.on(t,e)}}),v.each(["get","post"],function(e,n){v[n]=function(e,r,i,s){return v.isFunction(r)&&(s=s||i,i=r,r=t),v.ajax({type:n,url:e,data:r,success:i,dataType:s})}}),v.extend({getScript:function(e,n){return v.get(e,t,n,"script")},getJSON:function(e,t,n){return v.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?Ln(e,v.ajaxSettings):(t=e,e=v.ajaxSettings),Ln(e,t),e},ajaxSettings:{url:cn,isLocal:dn.test(ln[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Tn},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":v.parseJSON,"text xml":v.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:Cn(Sn),ajaxTransport:Cn(xn),ajax:function(e,n){function T(e,n,s,a){var l,y,b,w,S,T=n;if(E===2)return;E=2,u&&clearTimeout(u),o=t,i=a||"",x.readyState=e>0?4:0,s&&(w=An(c,x,s));if(e>=200&&e<300||e===304)c.ifModified&&(S=x.getResponseHeader("Last-Modified"),S&&(v.lastModified[r]=S),S=x.getResponseHeader("Etag"),S&&(v.etag[r]=S)),e===304?(T="notmodified",l=!0):(l=On(c,w),T=l.state,y=l.data,b=l.error,l=!b);else{b=T;if(!T||e)T="error",e<0&&(e=0)}x.status=e,x.statusText=(n||T)+"",l?d.resolveWith(h,[y,T,x]):d.rejectWith(h,[x,T,b]),x.statusCode(g),g=t,f&&p.trigger("ajax"+(l?"Success":"Error"),[x,c,l?y:b]),m.fireWith(h,[x,T]),f&&(p.trigger("ajaxComplete",[x,c]),--v.active||v.event.trigger("ajaxStop"))}typeof e=="object"&&(n=e,e=t),n=n||{};var r,i,s,o,u,a,f,l,c=v.ajaxSetup({},n),h=c.context||c,p=h!==c&&(h.nodeType||h instanceof v)?v(h):v.event,d=v.Deferred(),m=v.Callbacks("once memory"),g=c.statusCode||{},b={},w={},E=0,S="canceled",x={readyState:0,setRequestHeader:function(e,t){if(!E){var n=e.toLowerCase();e=w[n]=w[n]||e,b[e]=t}return this},getAllResponseHeaders:function(){return E===2?i:null},getResponseHeader:function(e){var n;if(E===2){if(!s){s={};while(n=pn.exec(i))s[n[1].toLowerCase()]=n[2]}n=s[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return E||(c.mimeType=e),this},abort:function(e){return e=e||S,o&&o.abort(e),T(0,e),this}};d.promise(x),x.success=x.done,x.error=x.fail,x.complete=m.add,x.statusCode=function(e){if(e){var t;if(E<2)for(t in e)g[t]=[g[t],e[t]];else t=e[x.status],x.always(t)}return this},c.url=((e||c.url)+"").replace(hn,"").replace(mn,ln[1]+"//"),c.dataTypes=v.trim(c.dataType||"*").toLowerCase().split(y),c.crossDomain==null&&(a=wn.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===ln[1]&&a[2]===ln[2]&&(a[3]||(a[1]==="http:"?80:443))==(ln[3]||(ln[1]==="http:"?80:443)))),c.data&&c.processData&&typeof c.data!="string"&&(c.data=v.param(c.data,c.traditional)),kn(Sn,c,n,x);if(E===2)return x;f=c.global,c.type=c.type.toUpperCase(),c.hasContent=!vn.test(c.type),f&&v.active++===0&&v.event.trigger("ajaxStart");if(!c.hasContent){c.data&&(c.url+=(gn.test(c.url)?"&":"?")+c.data,delete c.data),r=c.url;if(c.cache===!1){var N=v.now(),C=c.url.replace(bn,"$1_="+N);c.url=C+(C===c.url?(gn.test(c.url)?"&":"?")+"_="+N:"")}}(c.data&&c.hasContent&&c.contentType!==!1||n.contentType)&&x.setRequestHeader("Content-Type",c.contentType),c.ifModified&&(r=r||c.url,v.lastModified[r]&&x.setRequestHeader("If-Modified-Since",v.lastModified[r]),v.etag[r]&&x.setRequestHeader("If-None-Match",v.etag[r])),x.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+(c.dataTypes[0]!=="*"?", "+Tn+"; q=0.01":""):c.accepts["*"]);for(l in c.headers)x.setRequestHeader(l,c.headers[l]);if(!c.beforeSend||c.beforeSend.call(h,x,c)!==!1&&E!==2){S="abort";for(l in{success:1,error:1,complete:1})x[l](c[l]);o=kn(xn,c,n,x);if(!o)T(-1,"No Transport");else{x.readyState=1,f&&p.trigger("ajaxSend",[x,c]),c.async&&c.timeout>0&&(u=setTimeout(function(){x.abort("timeout")},c.timeout));try{E=1,o.send(b,T)}catch(k){if(!(E<2))throw k;T(-1,k)}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var Mn=[],_n=/\?/,Dn=/(=)\?(?=&|$)|\?\?/,Pn=v.now();v.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Mn.pop()||v.expando+"_"+Pn++;return this[e]=!0,e}}),v.ajaxPrefilter("json jsonp",function(n,r,i){var s,o,u,a=n.data,f=n.url,l=n.jsonp!==!1,c=l&&Dn.test(f),h=l&&!c&&typeof a=="string"&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Dn.test(a);if(n.dataTypes[0]==="jsonp"||c||h)return s=n.jsonpCallback=v.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,o=e[s],c?n.url=f.replace(Dn,"$1"+s):h?n.data=a.replace(Dn,"$1"+s):l&&(n.url+=(_n.test(f)?"&":"?")+n.jsonp+"="+s),n.converters["script json"]=function(){return u||v.error(s+" was not called"),u[0]},n.dataTypes[0]="json",e[s]=function(){u=arguments},i.always(function(){e[s]=o,n[s]&&(n.jsonpCallback=r.jsonpCallback,Mn.push(s)),u&&v.isFunction(o)&&o(u[0]),u=o=t}),"script"}),v.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return v.globalEval(e),e}}}),v.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),v.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=i.head||i.getElementsByTagName("head")[0]||i.documentElement;return{send:function(s,o){n=i.createElement("script"),n.async="async",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,i){if(i||!n.readyState||/loaded|complete/.test(n.readyState))n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild(n),n=t,i||o(200,"success")},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var Hn,Bn=e.ActiveXObject?function(){for(var e in Hn)Hn[e](0,1)}:!1,jn=0;v.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&Fn()||In()}:Fn,function(e){v.extend(v.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(v.ajaxSettings.xhr()),v.support.ajax&&v.ajaxTransport(function(n){if(!n.crossDomain||v.support.cors){var r;return{send:function(i,s){var o,u,a=n.xhr();n.username?a.open(n.type,n.url,n.async,n.username,n.password):a.open(n.type,n.url,n.async);if(n.xhrFields)for(u in n.xhrFields)a[u]=n.xhrFields[u];n.mimeType&&a.overrideMimeType&&a.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(u in i)a.setRequestHeader(u,i[u])}catch(f){}a.send(n.hasContent&&n.data||null),r=function(e,i){var u,f,l,c,h;try{if(r&&(i||a.readyState===4)){r=t,o&&(a.onreadystatechange=v.noop,Bn&&delete Hn[o]);if(i)a.readyState!==4&&a.abort();else{u=a.status,l=a.getAllResponseHeaders(),c={},h=a.responseXML,h&&h.documentElement&&(c.xml=h);try{c.text=a.responseText}catch(p){}try{f=a.statusText}catch(p){f=""}!u&&n.isLocal&&!n.crossDomain?u=c.text?200:404:u===1223&&(u=204)}}}catch(d){i||s(-1,d)}c&&s(u,f,c,l)},n.async?a.readyState===4?setTimeout(r,0):(o=++jn,Bn&&(Hn||(Hn={},v(e).unload(Bn)),Hn[o]=r),a.onreadystatechange=r):r()},abort:function(){r&&r(0,1)}}}});var qn,Rn,Un=/^(?:toggle|show|hide)$/,zn=new RegExp("^(?:([-+])=|)("+m+")([a-z%]*)$","i"),Wn=/queueHooks$/,Xn=[Gn],Vn={"*":[function(e,t){var n,r,i=this.createTween(e,t),s=zn.exec(t),o=i.cur(),u=+o||0,a=1,f=20;if(s){n=+s[2],r=s[3]||(v.cssNumber[e]?"":"px");if(r!=="px"&&u){u=v.css(i.elem,e,!0)||n||1;do a=a||".5",u/=a,v.style(i.elem,e,u+r);while(a!==(a=i.cur()/o)&&a!==1&&--f)}i.unit=r,i.start=u,i.end=s[1]?u+(s[1]+1)*n:n}return i}]};v.Animation=v.extend(Kn,{tweener:function(e,t){v.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;r<i;r++)n=e[r],Vn[n]=Vn[n]||[],Vn[n].unshift(t)},prefilter:function(e,t){t?Xn.unshift(e):Xn.push(e)}}),v.Tween=Yn,Yn.prototype={constructor:Yn,init:function(e,t,n,r,i,s){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=s||(v.cssNumber[n]?"":"px")},cur:function(){var e=Yn.propHooks[this.prop];return e&&e.get?e.get(this):Yn.propHooks._default.get(this)},run:function(e){var t,n=Yn.propHooks[this.prop];return this.options.duration?this.pos=t=v.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Yn.propHooks._default.set(this),this}},Yn.prototype.init.prototype=Yn.prototype,Yn.propHooks={_default:{get:function(e){var t;return e.elem[e.prop]==null||!!e.elem.style&&e.elem.style[e.prop]!=null?(t=v.css(e.elem,e.prop,!1,""),!t||t==="auto"?0:t):e.elem[e.prop]},set:function(e){v.fx.step[e.prop]?v.fx.step[e.prop](e):e.elem.style&&(e.elem.style[v.cssProps[e.prop]]!=null||v.cssHooks[e.prop])?v.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},Yn.propHooks.scrollTop=Yn.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},v.each(["toggle","show","hide"],function(e,t){var n=v.fn[t];v.fn[t]=function(r,i,s){return r==null||typeof r=="boolean"||!e&&v.isFunction(r)&&v.isFunction(i)?n.apply(this,arguments):this.animate(Zn(t,!0),r,i,s)}}),v.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Gt).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=v.isEmptyObject(e),s=v.speed(t,n,r),o=function(){var t=Kn(this,v.extend({},e),s);i&&t.stop(!0)};return i||s.queue===!1?this.each(o):this.queue(s.queue,o)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return typeof e!="string"&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=e!=null&&e+"queueHooks",s=v.timers,o=v._data(this);if(n)o[n]&&o[n].stop&&i(o[n]);else for(n in o)o[n]&&o[n].stop&&Wn.test(n)&&i(o[n]);for(n=s.length;n--;)s[n].elem===this&&(e==null||s[n].queue===e)&&(s[n].anim.stop(r),t=!1,s.splice(n,1));(t||!r)&&v.dequeue(this,e)})}}),v.each({slideDown:Zn("show"),slideUp:Zn("hide"),slideToggle:Zn("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){v.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),v.speed=function(e,t,n){var r=e&&typeof e=="object"?v.extend({},e):{complete:n||!n&&t||v.isFunction(e)&&e,duration:e,easing:n&&t||t&&!v.isFunction(t)&&t};r.duration=v.fx.off?0:typeof r.duration=="number"?r.duration:r.duration in v.fx.speeds?v.fx.speeds[r.duration]:v.fx.speeds._default;if(r.queue==null||r.queue===!0)r.queue="fx";return r.old=r.complete,r.complete=function(){v.isFunction(r.old)&&r.old.call(this),r.queue&&v.dequeue(this,r.queue)},r},v.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},v.timers=[],v.fx=Yn.prototype.init,v.fx.tick=function(){var e,n=v.timers,r=0;qn=v.now();for(;r<n.length;r++)e=n[r],!e()&&n[r]===e&&n.splice(r--,1);n.length||v.fx.stop(),qn=t},v.fx.timer=function(e){e()&&v.timers.push(e)&&!Rn&&(Rn=setInterval(v.fx.tick,v.fx.interval))},v.fx.interval=13,v.fx.stop=function(){clearInterval(Rn),Rn=null},v.fx.speeds={slow:600,fast:200,_default:400},v.fx.step={},v.expr&&v.expr.filters&&(v.expr.filters.animated=function(e){return v.grep(v.timers,function(t){return e===t.elem}).length});var er=/^(?:body|html)$/i;v.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){v.offset.setOffset(this,e,t)});var n,r,i,s,o,u,a,f={top:0,left:0},l=this[0],c=l&&l.ownerDocument;if(!c)return;return(r=c.body)===l?v.offset.bodyOffset(l):(n=c.documentElement,v.contains(n,l)?(typeof l.getBoundingClientRect!="undefined"&&(f=l.getBoundingClientRect()),i=tr(c),s=n.clientTop||r.clientTop||0,o=n.clientLeft||r.clientLeft||0,u=i.pageYOffset||n.scrollTop,a=i.pageXOffset||n.scrollLeft,{top:f.top+u-s,left:f.left+a-o}):f)},v.offset={bodyOffset:function(e){var t=e.offsetTop,n=e.offsetLeft;return v.support.doesNotIncludeMarginInBodyOffset&&(t+=parseFloat(v.css(e,"marginTop"))||0,n+=parseFloat(v.css(e,"marginLeft"))||0),{top:t,left:n}},setOffset:function(e,t,n){var r=v.css(e,"position");r==="static"&&(e.style.position="relative");var i=v(e),s=i.offset(),o=v.css(e,"top"),u=v.css(e,"left"),a=(r==="absolute"||r==="fixed")&&v.inArray("auto",[o,u])>-1,f={},l={},c,h;a?(l=i.position(),c=l.top,h=l.left):(c=parseFloat(o)||0,h=parseFloat(u)||0),v.isFunction(t)&&(t=t.call(e,n,s)),t.top!=null&&(f.top=t.top-s.top+c),t.left!=null&&(f.left=t.left-s.left+h),"using"in t?t.using.call(e,f):i.css(f)}},v.fn.extend({position:function(){if(!this[0])return;var e=this[0],t=this.offsetParent(),n=this.offset(),r=er.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(v.css(e,"marginTop"))||0,n.left-=parseFloat(v.css(e,"marginLeft"))||0,r.top+=parseFloat(v.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(v.css(t[0],"borderLeftWidth"))||0,{top:n.top-r.top,left:n.left-r.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||i.body;while(e&&!er.test(e.nodeName)&&v.css(e,"position")==="static")e=e.offsetParent;return e||i.body})}}),v.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);v.fn[e]=function(i){return v.access(this,function(e,i,s){var o=tr(e);if(s===t)return o?n in o?o[n]:o.document.documentElement[i]:e[i];o?o.scrollTo(r?v(o).scrollLeft():s,r?s:v(o).scrollTop()):e[i]=s},e,i,arguments.length,null)}}),v.each({Height:"height",Width:"width"},function(e,n){v.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){v.fn[i]=function(i,s){var o=arguments.length&&(r||typeof i!="boolean"),u=r||(i===!0||s===!0?"margin":"border");return v.access(this,function(n,r,i){var s;return v.isWindow(n)?n.document.documentElement["client"+e]:n.nodeType===9?(s=n.documentElement,Math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])):i===t?v.css(n,r,i,u):v.style(n,r,i,u)},n,o?i:t,o,null)}})}),e.jQuery=e.$=v,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return v})})(window); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/base/javascript/jquery.min.js b/mayor-orig/www/skin/classic/base/javascript/jquery.min.js
new file mode 100644
index 00000000..ce1b6b6e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/base/javascript/jquery.min.js
@@ -0,0 +1,5 @@
+/*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
+*/
+(function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:a,!0)),k.test(i[1])&&x.isPlainObject(n))for(i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return g.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isPlainObject(r)||(n=x.isArray(r)))?(n?(n=!1,a=e&&x.isArray(e)?e:[]):a=e&&x.isPlainObject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=l),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readyWait:!x.isReady){if(!a.body)return setTimeout(x.ready);x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray||function(e){return"array"===x.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(x.support.ownLast)for(n in e)return v.call(e,n);for(n in e);return n===t||v.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||a;var r=k.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=x.trim(n),n&&E.test(n.replace(A,"@").replace(j,"]").replace(S,"")))?Function("return "+n)():(x.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&x.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(D,"ms-").replace(L,H)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:b&&!b.call("\ufeff\u00a0")?function(e){return null==e?"":b.call(e)}:function(e){return null==e?"":(e+"").replace(C,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(m)return m.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return d.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),x.isFunction(e)?(r=g.call(arguments,2),i=function(){return e.apply(n||this,r.concat(g.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):t},access:function(e,n,r,i,o,a,s){var l=0,u=e.length,c=null==r;if("object"===x.type(r)){o=!0;for(l in r)x.access(e,n,l,r[l],!0,a,s)}else if(i!==t&&(o=!0,x.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(x(e),n)})),n))for(;u>l;l++)n(e[l],r,s?i:i.call(e[l],l,n(e[l],r)));return o?e:c?n.call(e):u?n(e[0],r):a},now:function(){return(new Date).getTime()},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),x.ready.promise=function(t){if(!n)if(n=x.Deferred(),"complete"===a.readyState)setTimeout(x.ready);else if(a.addEventListener)a.addEventListener("DOMContentLoaded",q,!1),e.addEventListener("load",q,!1);else{a.attachEvent("onreadystatechange",q),e.attachEvent("onload",q);var r=!1;try{r=null==e.frameElement&&a.documentElement}catch(i){}r&&r.doScroll&&function o(){if(!x.isReady){try{r.doScroll("left")}catch(e){return setTimeout(o,50)}_(),x.ready()}}()}return n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=x(a),function(e,t){var n,r,i,o,a,s,l,u,c,p,f,d,h,g,m,y,v,b="sizzle"+-new Date,w=e.document,T=0,C=0,N=st(),k=st(),E=st(),S=!1,A=function(e,t){return e===t?(S=!0,0):0},j=typeof t,D=1<<31,L={}.hasOwnProperty,H=[],q=H.pop,_=H.push,M=H.push,O=H.slice,F=H.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",W=R.replace("w","w#"),$="\\["+P+"*("+R+")"+P+"*(?:([*^$|!~]?=)"+P+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+W+")|)|)"+P+"*\\]",I=":("+R+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+$.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),X=RegExp("^"+P+"*,"+P+"*"),U=RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),V=RegExp(P+"*[+~]"),Y=RegExp("="+P+"*([^\\]'\"]*)"+P+"*\\]","g"),J=RegExp(I),G=RegExp("^"+W+"$"),Q={ID:RegExp("^#("+R+")"),CLASS:RegExp("^\\.("+R+")"),TAG:RegExp("^("+R.replace("w","w*")+")"),ATTR:RegExp("^"+$),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:RegExp("^(?:"+B+")$","i"),needsContext:RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),it=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{M.apply(H=O.call(w.childNodes),w.childNodes),H[w.childNodes.length].nodeType}catch(ot){M={apply:H.length?function(e,t){_.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function at(e,t,n,i){var o,a,s,l,u,c,d,m,y,x;if((t?t.ownerDocument||t:w)!==f&&p(t),t=t||f,n=n||[],!e||"string"!=typeof e)return n;if(1!==(l=t.nodeType)&&9!==l)return[];if(h&&!i){if(o=Z.exec(e))if(s=o[1]){if(9===l){if(a=t.getElementById(s),!a||!a.parentNode)return n;if(a.id===s)return n.push(a),n}else if(t.ownerDocument&&(a=t.ownerDocument.getElementById(s))&&v(t,a)&&a.id===s)return n.push(a),n}else{if(o[2])return M.apply(n,t.getElementsByTagName(e)),n;if((s=o[3])&&r.getElementsByClassName&&t.getElementsByClassName)return M.apply(n,t.getElementsByClassName(s)),n}if(r.qsa&&(!g||!g.test(e))){if(m=d=b,y=t,x=9===l&&e,1===l&&"object"!==t.nodeName.toLowerCase()){c=mt(e),(d=t.getAttribute("id"))?m=d.replace(nt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",u=c.length;while(u--)c[u]=m+yt(c[u]);y=V.test(e)&&t.parentNode||t,x=c.join(",")}if(x)try{return M.apply(n,y.querySelectorAll(x)),n}catch(T){}finally{d||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,n,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>o.cacheLength&&delete t[e.shift()],t[n]=r}return t}function lt(e){return e[b]=!0,e}function ut(e){var t=f.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ct(e,t){var n=e.split("|"),r=e.length;while(r--)o.attrHandle[n[r]]=t}function pt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function dt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return lt(function(t){return t=+t,lt(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}s=at.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},r=at.support={},p=at.setDocument=function(e){var n=e?e.ownerDocument||e:w,i=n.defaultView;return n!==f&&9===n.nodeType&&n.documentElement?(f=n,d=n.documentElement,h=!s(n),i&&i.attachEvent&&i!==i.top&&i.attachEvent("onbeforeunload",function(){p()}),r.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),r.getElementsByTagName=ut(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=ut(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),r.getById=ut(function(e){return d.appendChild(e).id=b,!n.getElementsByName||!n.getElementsByName(b).length}),r.getById?(o.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){return e.getAttribute("id")===t}}):(delete o.find.ID,o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),o.find.TAG=r.getElementsByTagName?function(e,n){return typeof n.getElementsByTagName!==j?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},o.find.CLASS=r.getElementsByClassName&&function(e,n){return typeof n.getElementsByClassName!==j&&h?n.getElementsByClassName(e):t},m=[],g=[],(r.qsa=K.test(n.querySelectorAll))&&(ut(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+B+")"),e.querySelectorAll(":checked").length||g.push(":checked")}),ut(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&g.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(r.matchesSelector=K.test(y=d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ut(function(e){r.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),m.push("!=",I)}),g=g.length&&RegExp(g.join("|")),m=m.length&&RegExp(m.join("|")),v=K.test(d.contains)||d.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},A=d.compareDocumentPosition?function(e,t){if(e===t)return S=!0,0;var i=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return i?1&i||!r.sortDetached&&t.compareDocumentPosition(e)===i?e===n||v(w,e)?-1:t===n||v(w,t)?1:c?F.call(c,e)-F.call(c,t):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return S=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:c?F.call(c,e)-F.call(c,t):0;if(o===a)return pt(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?pt(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},n):f},at.matches=function(e,t){return at(e,null,null,t)},at.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&p(e),t=t.replace(Y,"='$1']"),!(!r.matchesSelector||!h||m&&m.test(t)||g&&g.test(t)))try{var n=y.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(i){}return at(t,f,null,[e]).length>0},at.contains=function(e,t){return(e.ownerDocument||e)!==f&&p(e),v(e,t)},at.attr=function(e,n){(e.ownerDocument||e)!==f&&p(e);var i=o.attrHandle[n.toLowerCase()],a=i&&L.call(o.attrHandle,n.toLowerCase())?i(e,n,!h):t;return a===t?r.attributes||!h?e.getAttribute(n):(a=e.getAttributeNode(n))&&a.specified?a.value:null:a},at.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},at.uniqueSort=function(e){var t,n=[],i=0,o=0;if(S=!r.detectDuplicates,c=!r.sortStable&&e.slice(0),e.sort(A),S){while(t=e[o++])t===e[o]&&(i=n.push(o));while(i--)e.splice(n[i],1)}return e},a=at.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=a(t);return n},o=at.selectors={cacheLength:50,createPseudo:lt,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(rt,it),e[3]=(e[4]||e[5]||"").replace(rt,it),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||at.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&at.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&J.test(r)&&(n=mt(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(rt,it).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=N[e+" "];return t||(t=RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&N(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=at.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!l&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[b]||(m[b]={}),u=c[e]||[],d=u[0]===T&&u[1],f=u[0]===T&&u[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[T,d,f];break}}else if(v&&(u=(t[b]||(t[b]={}))[e])&&u[0]===T)f=u[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[b]||(p[b]={}))[e]=[T,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=o.pseudos[e]||o.setFilters[e.toLowerCase()]||at.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?lt(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=F.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:lt(function(e){var t=[],n=[],r=l(e.replace(z,"$1"));return r[b]?lt(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:lt(function(e){return function(t){return at(e,t).length>0}}),contains:lt(function(e){return function(t){return(t.textContent||t.innerText||a(t)).indexOf(e)>-1}}),lang:lt(function(e){return G.test(e||"")||at.error("unsupported lang: "+e),e=e.replace(rt,it).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return tt.test(e.nodeName)},input:function(e){return et.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}},o.pseudos.nth=o.pseudos.eq;for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[n]=ft(n);for(n in{submit:!0,reset:!0})o.pseudos[n]=dt(n);function gt(){}gt.prototype=o.filters=o.pseudos,o.setFilters=new gt;function mt(e,t){var n,r,i,a,s,l,u,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,l=[],u=o.preFilter;while(s){(!n||(r=X.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=U.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),s=s.slice(n.length));for(a in o.filter)!(r=Q[a].exec(s))||u[a]&&!(r=u[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?at.error(e):k(e,l).slice(0)}function yt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function vt(e,t,n){var r=t.dir,o=n&&"parentNode"===r,a=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,s){var l,u,c,p=T+" "+a;if(s){while(t=t[r])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[r])if(1===t.nodeType||o)if(c=t[b]||(t[b]={}),(u=c[r])&&u[0]===p){if((l=u[1])===!0||l===i)return l===!0}else if(u=c[r]=[p],u[1]=e(t,n,s)||i,u[1]===!0)return!0}}function bt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,a=[],s=0,l=e.length,u=null!=t;for(;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),u&&t.push(s));return a}function wt(e,t,n,r,i,o){return r&&!r[b]&&(r=wt(r)),i&&!i[b]&&(i=wt(i,o)),lt(function(o,a,s,l){var u,c,p,f=[],d=[],h=a.length,g=o||Nt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:xt(g,f,e,s,l),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,l),r){u=xt(y,d),r(u,[],s,l),c=u.length;while(c--)(p=u[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){u=[],c=y.length;while(c--)(p=y[c])&&u.push(m[c]=p);i(null,y=[],u,l)}c=y.length;while(c--)(p=y[c])&&(u=i?F.call(o,p):f[c])>-1&&(o[u]=!(a[u]=p))}}else y=xt(y===a?y.splice(h,y.length):y),i?i(null,a,y,l):M.apply(a,y)})}function Tt(e){var t,n,r,i=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],l=a?1:0,c=vt(function(e){return e===t},s,!0),p=vt(function(e){return F.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;i>l;l++)if(n=o.relative[e[l].type])f=[vt(bt(f),n)];else{if(n=o.filter[e[l].type].apply(null,e[l].matches),n[b]){for(r=++l;i>r;r++)if(o.relative[e[r].type])break;return wt(l>1&&bt(f),l>1&&yt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&Tt(e.slice(l,r)),i>r&&Tt(e=e.slice(r)),i>r&&yt(e))}f.push(n)}return bt(f)}function Ct(e,t){var n=0,r=t.length>0,a=e.length>0,s=function(s,l,c,p,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,C=u,N=s||a&&o.find.TAG("*",d&&l.parentNode||l),k=T+=null==C?1:Math.random()||.1;for(w&&(u=l!==f&&l,i=n);null!=(h=N[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,l,c)){p.push(h);break}w&&(T=k,i=++n)}r&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,r&&b!==v){g=0;while(m=t[g++])m(x,y,l,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=q.call(p));y=xt(y)}M.apply(p,y),w&&!s&&y.length>0&&v+t.length>1&&at.uniqueSort(p)}return w&&(T=k,u=C),x};return r?lt(s):s}l=at.compile=function(e,t){var n,r=[],i=[],o=E[e+" "];if(!o){t||(t=mt(e)),n=t.length;while(n--)o=Tt(t[n]),o[b]?r.push(o):i.push(o);o=E(e,Ct(i,r))}return o};function Nt(e,t,n){var r=0,i=t.length;for(;i>r;r++)at(e,t[r],n);return n}function kt(e,t,n,i){var a,s,u,c,p,f=mt(e);if(!i&&1===f.length){if(s=f[0]=f[0].slice(0),s.length>2&&"ID"===(u=s[0]).type&&r.getById&&9===t.nodeType&&h&&o.relative[s[1].type]){if(t=(o.find.ID(u.matches[0].replace(rt,it),t)||[])[0],!t)return n;e=e.slice(s.shift().value.length)}a=Q.needsContext.test(e)?0:s.length;while(a--){if(u=s[a],o.relative[c=u.type])break;if((p=o.find[c])&&(i=p(u.matches[0].replace(rt,it),V.test(s[0].type)&&t.parentNode||t))){if(s.splice(a,1),e=i.length&&yt(s),!e)return M.apply(n,i),n;break}}}return l(e,f)(i,t,!h,n,V.test(e)),n}r.sortStable=b.split("").sort(A).join("")===b,r.detectDuplicates=S,p(),r.sortDetached=ut(function(e){return 1&e.compareDocumentPosition(f.createElement("div"))}),ut(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||ct("type|href|height|width",function(e,n,r){return r?t:e.getAttribute(n,"type"===n.toLowerCase()?1:2)}),r.attributes&&ut(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ct("value",function(e,n,r){return r||"input"!==e.nodeName.toLowerCase()?t:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||ct(B,function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&i.specified?i.value:e[n]===!0?n.toLowerCase():null}),x.find=at,x.expr=at.selectors,x.expr[":"]=x.expr.pseudos,x.unique=at.uniqueSort,x.text=at.getText,x.isXMLDoc=at.isXML,x.contains=at.contains}(e);var O={};function F(e){var t=O[e]={};return x.each(e.match(T)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?O[e]||F(e):x.extend({},e);var n,r,i,o,a,s,l=[],u=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=l.length,n=!0;l&&o>a;a++)if(l[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,l&&(u?u.length&&c(u.shift()):r?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this},remove:function(){return l&&x.each(arguments,function(e,t){var r;while((r=x.inArray(t,l,r))>-1)l.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?x.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],o=0,this},disable:function(){return l=u=r=t,this},disabled:function(){return!l},lock:function(){return u=t,r||p.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||i&&!u||(t=t||[],t=[e,t.slice?t.slice():t],n?u.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var a=o[0],s=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=g.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?g.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,l,u;if(r>1)for(s=Array(r),l=Array(r),u=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(a(t,u,n)).fail(o.reject).progress(a(t,l,s)):--i;return i||o.resolveWith(u,n),o.promise()}}),x.support=function(t){var n,r,o,s,l,u,c,p,f,d=a.createElement("div");if(d.setAttribute("className","t"),d.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*")||[],r=d.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;s=a.createElement("select"),u=s.appendChild(a.createElement("option")),o=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!o.value,t.optSelected=u.selected,t.enctype=!!a.createElement("form").enctype,t.html5Clone="<:nav></:nav>"!==a.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!u.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}o=a.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),l=a.createDocumentFragment(),l.appendChild(o),t.appendChecked=o.checked,t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(f in x(t))break;return t.ownLast="0"!==f,x(function(){var n,r,o,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",l=a.getElementsByTagName("body")[0];l&&(n=a.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",l.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",o=d.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",t.reliableHiddenOffsets=p&&0===o[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",x.swap(l,null!=l.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===d.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(a.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(l.style.zoom=1)),l.removeChild(n),n=d=o=r=null)}),n=s=l=u=r=o=null,t
+}({});var B=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function R(e,n,r,i){if(x.acceptData(e)){var o,a,s=x.expando,l=e.nodeType,u=l?x.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==t||"string"!=typeof n)return c||(c=l?e[s]=p.pop()||x.guid++:s),u[c]||(u[c]=l?{}:{toJSON:x.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=x.extend(u[c],n):u[c].data=x.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[x.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[x.camelCase(n)])):o=a,o}}function W(e,t,n){if(x.acceptData(e)){var r,i,o=e.nodeType,a=o?x.cache:e,s=o?e[x.expando]:x.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){x.isArray(t)?t=t.concat(x.map(t,x.camelCase)):t in r?t=[t]:(t=x.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;while(i--)delete r[t[i]];if(n?!I(r):!x.isEmptyObject(r))return}(n||(delete a[s].data,I(a[s])))&&(o?x.cleanData([e],!0):x.support.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}x.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?x.cache[e[x.expando]]:e[x.expando],!!e&&!I(e)},data:function(e,t,n){return R(e,t,n)},removeData:function(e,t){return W(e,t)},_data:function(e,t,n){return R(e,t,n,!0)},_removeData:function(e,t){return W(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&x.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),x.fn.extend({data:function(e,n){var r,i,o=null,a=0,s=this[0];if(e===t){if(this.length&&(o=x.data(s),1===s.nodeType&&!x._data(s,"parsedAttrs"))){for(r=s.attributes;r.length>a;a++)i=r[a].name,0===i.indexOf("data-")&&(i=x.camelCase(i.slice(5)),$(s,i,o[i]));x._data(s,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){x.data(this,e)}):arguments.length>1?this.each(function(){x.data(this,e,n)}):s?$(s,e,x.data(s,e)):null},removeData:function(e){return this.each(function(){x.removeData(this,e)})}});function $(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(P,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:B.test(r)?x.parseJSON(r):r}catch(o){}x.data(e,n,r)}else r=t}return r}function I(e){var t;for(t in e)if(("data"!==t||!x.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}x.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=x._data(e,n),r&&(!i||x.isArray(r)?i=x._data(e,n,x.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),a=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return x._data(e,n)||x._data(e,n,{empty:x.Callbacks("once memory").add(function(){x._removeData(e,t+"queue"),x._removeData(e,n)})})}}),x.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?x.queue(this[0],e):n===t?this:this.each(function(){var t=x.queue(this,e,n);x._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=x.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=x._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var z,X,U=/[\t\r\n\f]/g,V=/\r/g,Y=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,G=/^(?:checked|selected)$/i,Q=x.support.getSetAttribute,K=x.support.input;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return e=x.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,l="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var t,r=0,o=x(this),a=e.match(T)||[];while(t=a[r++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else(n===i||"boolean"===n)&&(this.className&&x._data(this,"__className__",this.className),this.className=this.className||e===!1?"":x._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(U," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=x.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,x(this).val()):e,null==o?o="":"number"==typeof o?o+="":x.isArray(o)&&(o=x.map(o,function(e){return null==e?"":e+""})),r=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=x.valHooks[o.type]||x.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(V,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,l=0>i?s:o?i:0;for(;s>l;l++)if(n=r[l],!(!n.selected&&l!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),a=i.length;while(a--)r=i[a],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,n,r){var o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===i?x.prop(e,n,r):(1===s&&x.isXMLDoc(e)||(n=n.toLowerCase(),o=x.attrHooks[n]||(x.expr.match.bool.test(n)?X:z)),r===t?o&&"get"in o&&null!==(a=o.get(e,n))?a:(a=x.find.attr(e,n),null==a?t:a):null!==r?o&&"set"in o&&(a=o.set(e,r,n))!==t?a:(e.setAttribute(n,r+""),r):(x.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(T);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)?K&&Q||!G.test(n)?e[r]=!1:e[x.camelCase("default-"+n)]=e[r]=!1:x.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!x.isXMLDoc(e),a&&(n=x.propFix[n]||n,o=x.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):Y.test(e.nodeName)||J.test(e.nodeName)&&e.href?0:-1}}}}),X={set:function(e,t,n){return t===!1?x.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&x.propFix[n]||n,n):e[x.camelCase("default-"+n)]=e[n]=!0,n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,n){var r=x.expr.attrHandle[n]||x.find.attr;x.expr.attrHandle[n]=K&&Q||!G.test(n)?function(e,n,i){var o=x.expr.attrHandle[n],a=i?t:(x.expr.attrHandle[n]=t)!=r(e,n,i)?n.toLowerCase():null;return x.expr.attrHandle[n]=o,a}:function(e,n,r){return r?t:e[x.camelCase("default-"+n)]?n.toLowerCase():null}}),K&&Q||(x.attrHooks.value={set:function(e,n,r){return x.nodeName(e,"input")?(e.defaultValue=n,t):z&&z.set(e,n,r)}}),Q||(z={set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},x.expr.attrHandle.id=x.expr.attrHandle.name=x.expr.attrHandle.coords=function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&""!==i.value?i.value:null},x.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&r.specified?r.value:t},set:z.set},x.attrHooks.contenteditable={set:function(e,t,n){z.set(e,""===t?!1:t,n)}},x.each(["width","height"],function(e,n){x.attrHooks[n]={set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}}})),x.support.hrefNormalized||x.each(["href","src"],function(e,t){x.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),x.support.style||(x.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.support.enctype||(x.propFix.enctype="encoding"),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,n){return x.isArray(n)?e.checked=x.inArray(x(e).val(),n)>=0:t}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}function at(){try{return a.activeElement}catch(e){}}x.event={global:{},add:function(e,n,r,o,a){var s,l,u,c,p,f,d,h,g,m,y,v=x._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=x.guid++),(l=v.events)||(l=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof x===i||e&&x.event.triggered===e.type?t:x.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(T)||[""],u=n.length;while(u--)s=rt.exec(n[u])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),g&&(p=x.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=x.event.special[g]||{},d=x.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&x.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=l[g])||(h=l[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),x.event.global[g]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,l,u,c,p,f,d,h,g,m=x.hasData(e)&&x._data(e);if(m&&(c=m.events)){t=(t||"").match(T)||[""],u=t.length;while(u--)if(s=rt.exec(t[u])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=x.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));l&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||x.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)x.event.remove(e,d+t[u],n,r,!0);x.isEmptyObject(c)&&(delete m.handle,x._removeData(e,"events"))}},trigger:function(n,r,i,o){var s,l,u,c,p,f,d,h=[i||a],g=v.call(n,"type")?n.type:n,m=v.call(n,"namespace")?n.namespace.split("."):[];if(u=f=i=i||a,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+x.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),l=0>g.indexOf(":")&&"on"+g,n=n[x.expando]?n:new x.Event(g,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:x.makeArray(r,[n]),p=x.event.special[g]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!x.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(u=u.parentNode);u;u=u.parentNode)h.push(u),f=u;f===(i.ownerDocument||a)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((u=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(x._data(u,"events")||{})[n.type]&&x._data(u,"handle"),s&&s.apply(u,r),s=l&&u[l],s&&x.acceptData(u)&&s.apply&&s.apply(u,r)===!1&&n.preventDefault();if(n.type=g,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(h.pop(),r)===!1)&&x.acceptData(i)&&l&&i[g]&&!x.isWindow(i)){f=i[l],f&&(i[l]=null),x.event.triggered=g;try{i[g]()}catch(y){}x.event.triggered=t,f&&(i[l]=f)}return n.result}},dispatch:function(e){e=x.event.fix(e);var n,r,i,o,a,s=[],l=g.call(arguments),u=(x._data(this,"events")||{})[e.type]||[],c=x.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((x.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,l),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],l=n.delegateCount,u=e.target;if(l&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(o=[],a=0;l>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?x(r,this).index(u)>=0:x.find(r,this,null,[u]).length),o[r]&&o.push(i);o.length&&s.push({elem:u,handlers:o})}return n.length>l&&s.push({elem:this,handlers:n.slice(l)}),s},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new x.Event(o),t=r.length;while(t--)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||a),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,s=n.button,l=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||a,o=i.documentElement,r=i.body,e.pageX=n.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&l&&(e.relatedTarget=l===e.target?n.toElement:l),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==at()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===at()&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},click:{trigger:function(){return x.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=a.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},x.Event=function(e,n){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&x.extend(this,n),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,t):new x.Event(e,n)},x.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.submitBubbles||(x.event.special.submit={setup:function(){return x.nodeName(this,"form")?!1:(x.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=x.nodeName(n,"input")||x.nodeName(n,"button")?n.form:t;r&&!x._data(r,"submitBubbles")&&(x.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),x._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&x.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return x.nodeName(this,"form")?!1:(x.event.remove(this,"._submit"),t)}}),x.support.changeBubbles||(x.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(x.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),x.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),x.event.simulate("change",this,e,!0)})),!1):(x.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!x._data(t,"changeBubbles")&&(x.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||x.event.simulate("change",this.parentNode,e,!0)}),x._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return x.event.remove(this,"._change"),!Z.test(this.nodeName)}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&a.addEventListener(e,r,!0)},teardown:function(){0===--n&&a.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return x().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=x.guid++)),this.each(function(){x.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,x(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){x.event.remove(this,e,r,n)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?x.event.trigger(e,n,r,!0):t}});var st=/^.[^:#\[\.,]*$/,lt=/^(?:parents|prev(?:Until|All))/,ut=x.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=x(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(x.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e||[],!0))},filter:function(e){return this.pushStack(ft(this,e||[],!1))},is:function(e){return!!ft(this,"string"==typeof e&&ut.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],a=ut.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(a?a.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?x.inArray(this[0],x(e)):x.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return x.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(ct[e]||(i=x.unique(i)),lt.test(e)&&(i=i.reverse())),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!x(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return x.inArray(e,t)>=0!==n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Ct=/^(?:checkbox|radio)$/i,Nt=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:x.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(a),Dt=jt.appendChild(a.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===t?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||a).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(Ft(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&_t(Ft(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&x.cleanData(Ft(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&x.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!x.support.htmlSerialize&&mt.test(e)||!x.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(x.cleanData(Ft(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=d.apply([],e);var r,i,o,a,s,l,u=0,c=this.length,p=this,f=c-1,h=e[0],g=x.isFunction(h);if(g||!(1>=c||"string"!=typeof h||x.support.checkClone)&&Nt.test(h))return this.each(function(r){var i=p.eq(r);g&&(e[0]=h.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(l=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),r=l.firstChild,1===l.childNodes.length&&(l=r),r)){for(a=x.map(Ft(l,"script"),Ht),o=a.length;c>u;u++)i=l,u!==f&&(i=x.clone(i,!0,!0),o&&x.merge(a,Ft(i,"script"))),t.call(this[u],i,u);if(o)for(s=a[a.length-1].ownerDocument,x.map(a,qt),u=0;o>u;u++)i=a[u],kt.test(i.type||"")&&!x._data(i,"globalEval")&&x.contains(s,i)&&(i.src?x._evalUrl(i.src):x.globalEval((i.text||i.textContent||i.innerHTML||"").replace(St,"")));l=r=null}return this}});function Lt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function Ht(e){return e.type=(null!==x.find.attr(e,"type"))+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function _t(e,t){var n,r=0;for(;null!=(n=e[r]);r++)x._data(n,"globalEval",!t||x._data(t[r],"globalEval"))}function Mt(e,t){if(1===t.nodeType&&x.hasData(e)){var n,r,i,o=x._data(e),a=x._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)x.event.add(t,n,s[n][r])}a.data&&(a.data=x.extend({},a.data))}}function Ot(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!x.support.noCloneEvent&&t[x.expando]){i=x._data(t);for(r in i.events)x.removeEvent(t,r,i.handle);t.removeAttribute(x.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),x.support.html5Clone&&e.innerHTML&&!x.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ct.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=0,i=[],o=x(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),x(o[r])[t](n),h.apply(i,n.get());return this.pushStack(i)}});function Ft(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||x.nodeName(o,n)?s.push(o):x.merge(s,Ft(o,n));return n===t||n&&x.nodeName(e,n)?x.merge([e],s):s}function Bt(e){Ct.test(e.type)&&(e.defaultChecked=e.checked)}x.extend({clone:function(e,t,n){var r,i,o,a,s,l=x.contains(e.ownerDocument,e);if(x.support.html5Clone||x.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(x.support.noCloneEvent&&x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(r=Ft(o),s=Ft(e),a=0;null!=(i=s[a]);++a)r[a]&&Ot(i,r[a]);if(t)if(n)for(s=s||Ft(e),r=r||Ft(o),a=0;null!=(i=s[a]);a++)Mt(i,r[a]);else Mt(e,o);return r=Ft(o,"script"),r.length>0&&_t(r,!l&&Ft(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,l,u,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===x.type(o))x.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),l=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[l]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!x.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!x.support.tbody){o="table"!==l||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)x.nodeName(u=o.childNodes[i],"tbody")&&!u.childNodes.length&&o.removeChild(u)}x.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),x.support.appendChecked||x.grep(Ft(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===x.inArray(o,r))&&(a=x.contains(o.ownerDocument,o),s=Ft(f.appendChild(o),"script"),a&&_t(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,l=x.expando,u=x.cache,c=x.support.deleteExpando,f=x.event.special;for(;null!=(n=e[s]);s++)if((t||x.acceptData(n))&&(o=n[l],a=o&&u[o])){if(a.events)for(r in a.events)f[r]?x.event.remove(n,r):x.removeEvent(n,r,a.handle);
+u[o]&&(delete u[o],c?delete n[l]:typeof n.removeAttribute!==i?n.removeAttribute(l):n[l]=null,p.push(o))}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){if(x.isFunction(e))return this.each(function(t){x(this).wrapAll(e.call(this,t))});if(this[0]){var t=x(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+w+")(.*)$","i"),Yt=RegExp("^("+w+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+w+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=x._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=x._data(r,"olddisplay",ln(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&x._data(r,"olddisplay",i?n:x.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}x.fn.extend({css:function(e,n){return x.access(this,function(e,n,r){var i,o,a={},s=0;if(x.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=x.css(e,n[s],!1,o);return a}return r!==t?x.style(e,n,r):x.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){nn(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":x.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=x.camelCase(n),u=e.style;if(n=x.cssProps[l]||(x.cssProps[l]=tn(u,l)),s=x.cssHooks[n]||x.cssHooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(x.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||x.cssNumber[l]||(r+="px"),x.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(u[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=x.camelCase(n);return n=x.cssProps[l]||(x.cssProps[l]=tn(e.style,l)),s=x.cssHooks[n]||x.cssHooks[l],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||x.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s.getPropertyValue(n)||s[n]:t,u=e.style;return s&&(""!==l||x.contains(e.ownerDocument,e)||(l=x.style(e,n)),Yt.test(l)&&Ut.test(n)&&(i=u.width,o=u.minWidth,a=u.maxWidth,u.minWidth=u.maxWidth=u.width=l,l=s.width,u.width=i,u.minWidth=o,u.maxWidth=a)),l}):a.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s[n]:t,u=e.style;return null==l&&u&&u[n]&&(l=u[n]),Yt.test(l)&&!zt.test(n)&&(i=u.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),u.left="fontSize"===n?"1em":l,l=u.pixelLeft+"px",u.left=i,a&&(o.left=a)),""===l?"auto":l});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=x.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=x.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=x.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=x.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function ln(e){var t=a,n=Gt[e];return n||(n=un(e,t),"none"!==n&&n||(Pt=(Pt||x("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=un(e,t),Pt.detach()),Gt[e]=n),n}function un(e,t){var n=x(t.createElement(e)).appendTo(t.body),r=x.css(n[0],"display");return n.remove(),r}x.each(["height","width"],function(e,n){x.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(x.css(e,"display"))?x.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,i),i):0)}}}),x.support.opacity||(x.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=x.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===x.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),x(function(){x.support.reliableMarginRight||(x.cssHooks.marginRight={get:function(e,n){return n?x.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!x.support.pixelPosition&&x.fn.position&&x.each(["top","left"],function(e,n){x.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?x(e).position()[n]+"px":r):t}}})}),x.expr&&x.expr.filters&&(x.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!x.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||x.css(e,"display"))},x.expr.filters.visible=function(e){return!x.expr.filters.hidden(e)}),x.each({margin:"",padding:"",border:"Width"},function(e,t){x.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(x.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Ct.test(e))}).map(function(e,t){var n=x(this).val();return null==n?null:x.isArray(n)?x.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),x.param=function(e,n){var r,i=[],o=function(e,t){t=x.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=x.ajaxSettings&&x.ajaxSettings.traditional),x.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(x.isArray(t))x.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==x.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}x.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){x.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),x.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var mn,yn,vn=x.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Cn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Nn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=x.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=o.href}catch(Ln){yn=a.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(T)||[];if(x.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(l){var u;return o[l]=!0,x.each(e[l]||[],function(e,l){var c=l(n,r,i);return"string"!=typeof c||a||o[c]?a?!(u=c):t:(n.dataTypes.unshift(c),s(c),!1)}),u}return s(n.dataTypes[0])||!o["*"]&&s("*")}function _n(e,n){var r,i,o=x.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&x.extend(!0,e,r),e}x.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,l=e.indexOf(" ");return l>=0&&(i=e.slice(l,e.length),e=e.slice(0,l)),x.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&x.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?x("<div>").append(x.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Cn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":x.parseJSON,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?_n(_n(e,x.ajaxSettings),t):_n(x.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,l,u,c,p=x.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?x(f):x.event,h=x.Deferred(),g=x.Callbacks("once memory"),m=p.statusCode||{},y={},v={},b=0,w="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return b||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)m[t]=[m[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||w;return u&&u.abort(t),k(0,t),this}};if(h.promise(C).complete=g.add,C.success=C.done,C.error=C.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=x.trim(p.dataType||"*").toLowerCase().match(T)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(mn[3]||("http:"===mn[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=x.param(p.data,p.traditional)),qn(An,p,n,C),2===b)return C;l=p.global,l&&0===x.active++&&x.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Nn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(x.lastModified[o]&&C.setRequestHeader("If-Modified-Since",x.lastModified[o]),x.etag[o]&&C.setRequestHeader("If-None-Match",x.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)C.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,C,p)===!1||2===b))return C.abort();w="abort";for(i in{success:1,error:1,complete:1})C[i](p[i]);if(u=qn(jn,p,n,C)){C.readyState=1,l&&d.trigger("ajaxSend",[C,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){C.abort("timeout")},p.timeout));try{b=1,u.send(y,k)}catch(N){if(!(2>b))throw N;k(-1,N)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,N=n;2!==b&&(b=2,s&&clearTimeout(s),u=t,a=i||"",C.readyState=e>0?4:0,c=e>=200&&300>e||304===e,r&&(w=Mn(p,C,r)),w=On(p,w,C,c),c?(p.ifModified&&(T=C.getResponseHeader("Last-Modified"),T&&(x.lastModified[o]=T),T=C.getResponseHeader("etag"),T&&(x.etag[o]=T)),204===e||"HEAD"===p.type?N="nocontent":304===e?N="notmodified":(N=w.state,y=w.data,v=w.error,c=!v)):(v=N,(e||!N)&&(N="error",0>e&&(e=0))),C.status=e,C.statusText=(n||N)+"",c?h.resolveWith(f,[y,N,C]):h.rejectWith(f,[C,N,v]),C.statusCode(m),m=t,l&&d.trigger(c?"ajaxSuccess":"ajaxError",[C,p,c?y:v]),g.fireWith(f,[C,N]),l&&(d.trigger("ajaxComplete",[C,p]),--x.active||x.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,n){return x.get(e,t,n,"script")}}),x.each(["get","post"],function(e,n){x[n]=function(e,r,i,o){return x.isFunction(r)&&(o=o||i,i=r,r=t),x.ajax({url:e,type:n,dataType:o,data:r,success:i})}});function Mn(e,n,r){var i,o,a,s,l=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in l)if(l[s]&&l[s].test(o)){u.unshift(s);break}if(u[0]in r)a=u[0];else{for(s in r){if(!u[0]||e.converters[s+" "+u[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==u[0]&&u.unshift(a),r[a]):t}function On(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(i in u)if(s=i.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){a===!0?a=u[i]:u[i]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(p){return{state:"parsererror",error:a?p:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),x.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=a.head||x("head")[0]||a.documentElement;return{send:function(t,i){n=a.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Fn=[],Bn=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Fn.pop()||x.expando+"_"+vn++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,l=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return l||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=x.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,l?n[l]=n[l].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||x.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Fn.push(o)),s&&x.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}x.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=x.ajaxSettings.xhr(),x.support.cors=!!Rn&&"withCredentials"in Rn,Rn=x.support.ajax=!!Rn,Rn&&x.ajaxTransport(function(n){if(!n.crossDomain||x.support.cors){var r;return{send:function(i,o){var a,s,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.username,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)l[s]=n.xhrFields[s];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)l.setRequestHeader(s,i[s])}catch(u){}l.send(n.hasContent&&n.data||null),r=function(e,i){var s,u,c,p;try{if(r&&(i||4===l.readyState))if(r=t,a&&(l.onreadystatechange=x.noop,$n&&delete Pn[a]),i)4!==l.readyState&&l.abort();else{p={},s=l.status,u=l.getAllResponseHeaders(),"string"==typeof l.responseText&&(p.text=l.responseText);try{c=l.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,u)},n.async?4===l.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},x(e).unload($n)),Pn[a]=r),l.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+w+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Yn.exec(t),o=i&&i[3]||(x.cssNumber[e]?"":"px"),a=(x.cssNumber[e]||"px"!==o&&+r)&&Yn.exec(x.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do s=s||".5",a/=s,x.style(n.elem,e,a+o);while(s!==(s=n.cur()/r)&&1!==s&&--l)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=x.now()}function Zn(e,t,n){var r,i=(Qn[t]||[]).concat(Qn["*"]),o=0,a=i.length;for(;a>o;o++)if(r=i[o].call(n,t,e))return r}function er(e,t,n){var r,i,o=0,a=Gn.length,s=x.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,u.startTime+u.duration-t),r=n/u.duration||0,o=1-r,a=0,l=u.tweens.length;for(;l>a;a++)u.tweens[a].run(o);return s.notifyWith(e,[u,o,n]),1>o&&l?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:x.extend({},t),opts:x.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=x.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)u.tweens[n].run(1);return t?s.resolveWith(e,[u,t]):s.rejectWith(e,[u,t]),this}}),c=u.props;for(tr(c,u.opts.specialEasing);a>o;o++)if(r=Gn[o].call(u,e,c,u.opts))return r;return x.map(c,Zn,u),x.isFunction(u.opts.start)&&u.opts.start.call(e,u),x.fx.timer(x.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function tr(e,t){var n,r,i,o,a;for(n in e)if(r=x.camelCase(n),i=t[r],o=e[n],x.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=x.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}x.Animation=x.extend(er,{tweener:function(e,t){x.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,l,u=this,c={},p=e.style,f=e.nodeType&&nn(e),d=x._data(e,"fxshow");n.queue||(s=x._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,x.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===x.css(e,"display")&&"none"===x.css(e,"float")&&(x.support.inlineBlockNeedsLayout&&"inline"!==ln(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",x.support.shrinkWrapBlocks||u.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],Vn.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(f?"hide":"show"))continue;c[r]=d&&d[r]||x.style(e,r)}if(!x.isEmptyObject(c)){d?"hidden"in d&&(f=d.hidden):d=x._data(e,"fxshow",{}),o&&(d.hidden=!f),f?x(e).show():u.done(function(){x(e).hide()}),u.done(function(){var t;x._removeData(e,"fxshow");for(t in c)x.style(e,t,c[t])});for(r in c)a=Zn(f?d[r]:0,r,u),r in d||(d[r]=a.start,f&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}x.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(x.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=x.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[x.cssProps[e.prop]]||x.cssHooks[e.prop])?x.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.each(["toggle","show","hide"],function(e,t){var n=x.fn[t];x.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),x.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=x.isEmptyObject(e),o=x.speed(t,n,r),a=function(){var t=er(this,x.extend({},e),o);(i||x._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=x.timers,a=x._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&x.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=x._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=x.timers,a=r?r.length:0;for(n.finish=!0,x.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}x.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){x.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),x.speed=function(e,t,n){var r=e&&"object"==typeof e?x.extend({},e):{complete:n||!n&&t||x.isFunction(e)&&e,duration:e,easing:n&&t||t&&!x.isFunction(t)&&t};return r.duration=x.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in x.fx.speeds?x.fx.speeds[r.duration]:x.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){x.isFunction(r.old)&&r.old.call(this),r.queue&&x.dequeue(this,r.queue)},r},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},x.timers=[],x.fx=rr.prototype.init,x.fx.tick=function(){var e,n=x.timers,r=0;for(Xn=x.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||x.fx.stop(),Xn=t},x.fx.timer=function(e){e()&&x.timers.push(e)&&x.fx.start()},x.fx.interval=13,x.fx.start=function(){Un||(Un=setInterval(x.fx.tick,x.fx.interval))},x.fx.stop=function(){clearInterval(Un),Un=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fx.step={},x.expr&&x.expr.filters&&(x.expr.filters.animated=function(e){return x.grep(x.timers,function(t){return e===t.elem}).length}),x.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){x.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,x.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},x.offset={setOffset:function(e,t,n){var r=x.css(e,"position");"static"===r&&(e.style.position="relative");var i=x(e),o=i.offset(),a=x.css(e,"top"),s=x.css(e,"left"),l=("absolute"===r||"fixed"===r)&&x.inArray("auto",[a,s])>-1,u={},c={},p,f;l?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),x.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(u.top=t.top-o.top+p),null!=t.left&&(u.left=t.left-o.left+f),"using"in t?t.using.call(e,u):i.css(u)}},x.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===x.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),x.nodeName(e[0],"html")||(n=e.offset()),n.top+=x.css(e[0],"borderTopWidth",!0),n.left+=x.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-x.css(r,"marginTop",!0),left:t.left-n.left-x.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||s;while(e&&!x.nodeName(e,"html")&&"static"===x.css(e,"position"))e=e.offsetParent;return e||s})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);x.fn[e]=function(i){return x.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?x(a).scrollLeft():o,r?o:x(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return x.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}x.each({Height:"height",Width:"width"},function(e,n){x.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){x.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return x.access(this,function(n,r,i){var o;return x.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?x.css(n,r,s):x.style(n,r,i,s)},n,a?i:t,a,null)}})}),x.fn.size=function(){return this.length},x.fn.andSelf=x.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=x:(e.jQuery=e.$=x,"function"==typeof define&&define.amd&&define("jquery",[],function(){return x}))})(window);
diff --git a/mayor-orig/www/skin/classic/base/javascript/noiframe.js b/mayor-orig/www/skin/classic/base/javascript/noiframe.js
new file mode 100644
index 00000000..f0e2aefc
--- /dev/null
+++ b/mayor-orig/www/skin/classic/base/javascript/noiframe.js
@@ -0,0 +1 @@
+if (window != window.top) {window.top.location = window.location;stop();}
diff --git a/mayor-orig/www/skin/classic/module-auth/css/forgotten.css b/mayor-orig/www/skin/classic/module-auth/css/forgotten.css
new file mode 100644
index 00000000..a3e63ada
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-auth/css/forgotten.css
@@ -0,0 +1,66 @@
+
+ div.mayorbody h1 {text-align: center; margin:10px; font-size:20px; }
+ div.mayorbody h2 {text-align: center; margin:10px; font-size: 15px; }
+
+ form.forgot { width: 450px; margin: 40px auto; text-align: center;
+ box-shadow: 0px 0px 2px 0px #ccc;
+ padding: 20px;
+ }
+ form.forgot h1 { font-size: 16px; }
+/*
+ form.forgot input[type=submit] { background: #1f6fd9; color: white; text-shadow: 0 -1px 0 rgba(0,0,0,0.3); font-size: 12px; border: 1px solid #1d66c8; padding: 2px 10px; }
+ form.forgot input[type=submit]:hover { background-color: #2f7fe9;}
+*/
+ div.forgot { width: 400px; margin: 20px auto; text-align: center; box-shadow: 0px 0px 2px 0px #ccc; padding:0px; }
+/*
+régi
+ div.forgot a { color:#aaaaaa; display: block; padding:20px;}
+ div.forgot:hover a { background-color: cornflowerblue; color:white; }
+*/
+form.forgot input, form.forgot select,
+form.preforgot input, form.preforgot select{
+ border: 1px solid rgba(0, 0, 0, .20);
+ border-radius: 4px;
+ color: rgba(0, 0, 0, 1);
+ display: block;
+ font-size: 17px;
+ height: 42px;
+ margin-bottom: 12px;
+ margin-left: auto;
+ margin-right: auto;
+ padding: 0 16px;
+ width: 286px;
+}
+form.forgot input.error {border-color:red;}
+
+form.forgot select, form.forgot input[type="submit"],
+form.preforgot select, form.preforgot input[type="submit"]{
+ width: 320px;
+}
+form.forgot input[type="submit"],form.preforgot input[type="submit"]{ border-color: white; background-color:white;}
+form.forgot input[type="submit"]:hover,form.preforgot input[type="submit"]:hover { background-color:white; cursor: pointer; color: cornflowerblue; border-color: cornflowerblue;}
+
+div.loginlogo {margin-left: auto; margin-right:auto; text-align:center; margin-bottom: 2em; margin-top:50px;}
+div.loginlogo img { padding:20px; height:50px; background-color: cornflowerblue; }
+
+p.forgotDone { text-align:center; }
+
+
+
+ p.forgotDone a {
+ border: 1px solid rgba(0, 0, 0, .10);
+ border-radius: 4px;
+ color: rgba(0, 0, 0, .1);
+ display: block;
+ font-size: 16px;
+ height: 42px;
+ margin-bottom: 12px;
+ margin-left: auto;
+ margin-right: auto;
+ padding: 0 16px;
+ width: 286px;
+ line-height:42px;
+ }
+ p.forgotDone a:hover { background-color: cornflowerblue; }
+ p.forgotDone a:hover { color:white; }
+
diff --git a/mayor-orig/www/skin/classic/module-auth/css/login.css b/mayor-orig/www/skin/classic/module-auth/css/login.css
new file mode 100644
index 00000000..da948475
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-auth/css/login.css
@@ -0,0 +1,108 @@
+div.mayorbody h1 {text-align: center; margin:10px; font-size:20px; }
+div.mayorbody h2 {text-align: center; margin:10px; font-size: 15px; }
+
+form.nagylogin input, form.nagylogin select{
+ border: 1px solid rgba(0, 0, 0, .20);
+ border-radius: 4px;
+ color: rgba(0, 0, 0, 1);
+ display: block;
+ font-size: 17px;
+ height: 42px;
+ margin-bottom: 12px;
+ margin-left: auto;
+ margin-right: auto;
+ padding: 0 16px;
+ width: 286px;
+}
+form.nagylogin input.error {border-color:red;}
+
+form.nagylogin select, form.nagylogin input[type="submit"]{
+ width: 320px;
+}
+form.nagylogin input[type="submit"]{ border-color: white; background-color:white;}
+form.nagylogin input[type="submit"]:hover { background-color:white; cursor: pointer; color: cornflowerblue; border-color: cornflowerblue;}
+form.nagylogin div.loginlogo {margin-left: auto; margin-right:auto; text-align:center; margin-bottom: 2em;}
+form.nagylogin div.loginlogo img { padding:20px; height:50px; background-color: cornflowerblue; }
+
+form.nagylogin div.loaderContainer { position: relative;
+ top: -45px;
+ left:-90px;
+ margin-left: auto;
+ margin-right: auto;
+ height:2px;
+ width:2px;
+ margin-bottom:0px;
+ padding-bottom:0px;
+}
+form.nagylogin div.loaderContainer div.loader { display: inline-block; }
+
+#warning { height: 40px; }
+#capsLockWarning {
+ background: #ffffaa; color: #ffaaaa;
+ text-align: center; font-size: 20px; font-weight: bold;
+ padding: 20px; margin: 10px auto; width: 300px;
+}
+
+ form.forgot { margin: 0px auto; text-align: center; padding: 0px 0px; }
+ form.forgot h1 { }
+ form.forgot input[type=submit] {
+ background: #1f6fd9; color: white; text-shadow: 0 -1px 0 rgba(0,0,0,0.3); border: 1px solid #1d66c8; padding: 2px 10px;
+ }
+ form.forgot a {
+ border: 1px solid rgba(0, 0, 0, .10);
+ border-radius: 4px;
+ color: rgba(0, 0, 0, .1);
+ display: block;
+ font-size: 16px;
+ height: 42px;
+ margin-bottom: 12px;
+ margin-left: auto;
+ margin-right: auto;
+ padding: 0 16px;
+ width: 286px;
+ line-height:42px;
+ }
+ form.forgot a:hover { background-color: cornflowerblue; }
+ form.forgot a:hover { color:white; }
+
+.loader {
+ margin: 0px auto;
+ font-size: 2px;
+ position: relative;
+ text-indent: -9999em;
+ border-top: 1.1em solid rgba(255,42,99, 0.2);
+ border-right: 1.1em solid rgba(255,42,99, 0.2);
+ border-bottom: 1.1em solid rgba(255,42,99, 0.2);
+ border-left: 1.1em solid #ff2a63;
+ -webkit-transform: translateZ(0);
+ -ms-transform: translateZ(0);
+ transform: translateZ(0);
+ -webkit-animation: load8 1.1s infinite linear;
+ animation: load8 1.1s infinite linear;
+}
+.loader,
+.loader:after {
+ border-radius: 50%;
+ width: 10em;
+ height: 10em;
+}
+@-webkit-keyframes load8 {
+ 0% {
+ -webkit-transform: rotate(0deg);
+ transform: rotate(0deg);
+ }
+ 100% {
+ -webkit-transform: rotate(360deg);
+ transform: rotate(360deg);
+ }
+}
+@keyframes load8 {
+ 0% {
+ -webkit-transform: rotate(0deg);
+ transform: rotate(0deg);
+ }
+ 100% {
+ -webkit-transform: rotate(360deg);
+ transform: rotate(360deg);
+ }
+}
diff --git a/mayor-orig/www/skin/classic/module-auth/html/forgotten.phtml b/mayor-orig/www/skin/classic/module-auth/html/forgotten.phtml
new file mode 100644
index 00000000..464f4f64
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-auth/html/forgotten.phtml
@@ -0,0 +1,103 @@
+<?php
+
+ function putForgotPasswordForm($ADAT) {
+
+ echo '<h1>'._SITE.'</h1>'."\n";
+ echo '<h2>'._GREETING.'</h2>'."\n";
+
+ formBegin(array('class'=>'forgot'));
+
+ echo '<h1>'._FORGOT_PASSWORD.'</h1>';
+
+ echo '<p>'._ENTER_USERACCOUNT.'</p>';
+ echo '<input type="hidden" name="action" value="sendResetPasswordMail" />';
+ echo '<input type="hidden" name="toPolicy" value="'.$ADAT['toPolicy'].'" />';
+ echo '<input type="text" name="userAccount" value="'.$ADAT['userAccount'].'" placeholder="'._USERNAME.'" />';
+ echo '<input type="submit" value="'._RESET_PASSWORD.'" />';
+ echo '<p>'._FORGOT_PASSWORD_HELP.'</p>';
+
+ formEnd();
+
+ }
+
+ function putForgotUserAccountForm($ADAT) {
+
+ formBegin(array('class'=>'forgot'));
+
+ echo '<h1>'._FORGOT_USERACCOUNT.'</h1>';
+
+ echo '<p>'._ENTER_EMAIL.'</p>';
+ echo '<input type="hidden" name="action" value="sendResetPasswordMail" />';
+ echo '<input type="hidden" name="toPolicy" value="'.$ADAT['toPolicy'].'" />';
+ echo '<input type="text" name="mail" value="'.$ADAT['mail'].'" class="email" placeholder="'._EMAIL.'" />';
+ echo '<input type="submit" value="'._RESET_PASSWORD.'" />';
+ echo '<p>'._FORGOT_USERACCOUNT_HELP.'</p>';
+
+ formEnd();
+
+ }
+
+ function putForgotThankYou() {
+
+ echo '<h1>'._SITE.'</h1>'."\n";
+ echo '<h2>'._GREETING.'</h2>'."\n";
+
+ formBegin(array('class'=>'preforgot'));
+ echo '<a href="'.href('index.php?page=auth&f=login').'">';
+ _mayorLogo();
+ echo '</a>';
+ echo '<p class="forgotDone">'._FORGOT_INFO.'</p>';
+ formEnd();
+
+ }
+
+ function putForgotDisabled() {
+ global $POLICIES,$AUTH;
+
+ echo '<h1>'._SITE.'</h1>'."\n";
+ echo '<h2>'._GREETING.'</h2>'."\n";
+ echo '<a href="'.href('index.php?page=auth&f=login').'">';
+ _mayorLogo();
+ echo '</a>';
+
+ formBegin(array('class'=>'preforgot'));
+
+ echo '<select class="pp" name="toPolicy" class="onChangeSubmit">'."\n";
+ echo '<option value="">'._FORGOT_DISABLED.'</option>';
+ $SEL = array($toPolicy => ' selected="selected" ');
+ for ($i=0; $i<count($POLICIES); $i++) {
+ $_policy = $POLICIES[$i];
+ $DIS = ($AUTH[$_policy]['enablePasswordReset']!==true) ? ' disabled = "disabled" ' : '';
+ if ($AUTH[$_policy]['authentication'] != 'none') {
+ echo '<option value="'.$_policy.'" '.$SEL[$_policy].$DIS.'>';
+ echo constant('_'.strtoupper($_policy).'_LOGIN');
+ echo '</option>'."\n";
+ }
+ }
+ echo '</select>'."\n";
+ echo '<input type="submit" value="'._KIVALASZT.'" />';
+ formEnd();
+
+ }
+
+ function putBackToLogin($ADAT) {
+
+ //echo '<div class="">';
+ echo '<p class="forgotDone"><a href="'.href('index.php?page=auth&f=login&userAccount='.$ADAT['userAccount'].'&toPolicy='.$ADAT['toPolicy']).'">'._BACK_TO_LOGIN.'</a></p>';
+ //echo '</div>';
+
+ }
+
+ function _mayorLogo() {
+ echo '<div class="loginlogo">';
+ //mayorLogoSvg(array('dot'=>'#bbff44','startColor'=>'cornflowerblue','stopColor'=>'lightgreen'));
+ mayorLogoSvg(array(
+ 'dot'=>'#C9CFE8',
+ 'startColor'=>'#0E396A',
+ 'stopColor'=>'#4B6B90',
+ ));
+ echo '</div>';
+ }
+
+
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-auth/html/login.phtml b/mayor-orig/www/skin/classic/module-auth/html/login.phtml
new file mode 100644
index 00000000..cac82b7e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-auth/html/login.phtml
@@ -0,0 +1,77 @@
+<?php
+
+ function putLoginForm($userAccount,$toPolicy,$toPSF='',$toSkin='') {
+ global $POLICIES, $AUTH, $sessionID;
+
+ // TODO IDEIGLENES OVERRIDE -- if ($toPolicy=='public') $toPSF='portal:portal:vmgNyiltnap';
+
+ /* reading data from SESSION */
+ if ($userAccount=='' && $_SESSION['lastCreatedAccount']!='')
+ $userAccount=$_SESSION['lastCreatedAccount'];
+
+ echo '<h1>'._SITE.'</h1>'."\n";
+ echo '<h2>'._GREETING.'</h2>'."\n";
+
+ if (is_array($AUTH[$toPolicy]['allowOnly']) && !in_array($userAccount,$AUTH[$toPolicy]['allowOnly'])) {
+ echo '<div style="text-align:center; background-color:#f06; border-radius: 5px; width:150px; margin:auto; color:white;">Korlátozott belépés!</div>';
+ }
+
+ // Caps-Lock
+ echo '<div id="warning"><div style="display:none;" id="capsLockWarning">'._CAPSLOCKWARNING.'</div></div>';
+
+ formBegin(array('method'=>'post',
+ 'class'=>'nagylogin',
+ 'action'=>'index.php?policy=public&page=auth&f=login&toPolicy='.$toPolicy.'&sessionID='.$sessionID ,
+ 'name'=>"loginablak"));
+
+// echo '<input type="hidden" name="action" value="login" />';
+ echo '<input type="hidden" name="action" value="mayorGlobalLogin" />';
+ echo '<input type="hidden" name="toPSF" value="'.$toPSF.'" />';
+
+ echo '<div class="loginlogo">';
+ _putsvg();
+ echo '</div>';
+
+ echo '<input type="text" id="focus" accesskey="l" tabindex="1" name="userAccount" value="'.$userAccount.'" maxlength="32" placeholder="'._USERNAME.'" />'."\n";
+ echo '<input type="password" id="userPassword" accesskey="p" tabindex="2" name="userPassword" maxlength="20" placeholder="'._PASSWORD.'" value="" />'."\n";
+
+
+ if (intval(_MAYORAUTHRESULT)>0 || (defined('_FORCE_LOGIN_POLICY_SELECT') && _FORCE_LOGIN_POLICY_SELECT===true)) {
+ echo '<select class="pp" name="policyOrderIndex">'."\n";
+ //$_SEL = array($toPolicy => ' selected="selected" ');
+ echo '<option value="0">'._LOGIN_ALL_AUTH_LEVEL.'</option>';
+ for ($i=0; $i<count($POLICIES); $i++) {
+ $_policy = $POLICIES[$i];
+ if ($AUTH[$_policy]['authentication'] != 'none') {
+ echo '<option value="'.($i+1).'" '.$_SEL[$_policy].'>';
+ echo constant('_'.strtoupper($_policy).'_LOGIN');
+ echo '</option>'."\n";
+ }
+ }
+ echo '</select>'."\n";
+ }
+
+ echo '<input type="submit" class="mayorButton" tabindex="3" name="button" value=" '. _LOGIN .' "
+ class="submit" />'."\n";
+ echo '<div class="loaderContainer"><div class="loader" style="display:none" ></div></div>';
+
+ formEnd();
+ //if ($AUTH[$toPolicy]['enablePasswordReset']===true) {
+ formBegin(array('class'=>'forgot'));
+ echo '<div id="forgotten"><a href="'.href('index.php?page=auth&f=forgotten&userAccount='.$userAccount.'&toPolicy='.$toPolicy).'">'._FORGOTTEN.'</a></div>';
+ formEnd();
+ //}
+ }
+
+ function putAlreadyLoggedIn() {
+ echo '<div style="margin:40px auto; width:200px; padding:10px; background-color: #eeeeee; border: solid 2px #ddd; border-radius:2px; text-align:center; color: cornflowerblue">';
+ echo '<span class="icon-ok-sign" style="float:left; line-height:18px;font-size:18px; color:lightgreen; "></span>';
+ echo _BELEPVE;
+ echo '</div>';
+ }
+
+ function _putsvg() {
+ mayorLogoSvg();
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-auth/img/login.gif b/mayor-orig/www/skin/classic/module-auth/img/login.gif
new file mode 100644
index 00000000..82faef04
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-auth/img/login.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/module-auth/javascript/forgotten.jquery.min.js b/mayor-orig/www/skin/classic/module-auth/javascript/forgotten.jquery.min.js
new file mode 100644
index 00000000..46b8c27f
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-auth/javascript/forgotten.jquery.min.js
@@ -0,0 +1,19 @@
+$(function() {
+
+ $("input.email").focus(function() {
+ }).blur(function() {
+ if (validateEmail($(this).val()) === false)
+ alert('Nem megfelelő email cím!');
+ });
+
+ $("input[type=submit]").click(function() {
+ // ellenőrzés
+ // return false;
+ });
+
+});
+
+function validateEmail(email) {
+ var re = /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i;
+ return re.test(email);
+}
diff --git a/mayor-orig/www/skin/classic/module-auth/javascript/login.jquery.min.js b/mayor-orig/www/skin/classic/module-auth/javascript/login.jquery.min.js
new file mode 100644
index 00000000..0299746d
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-auth/javascript/login.jquery.min.js
@@ -0,0 +1,24 @@
+$(function() {
+
+ $("input[type=submit]").click(function() {
+
+ //$(this).toggle();
+ //$(this).addClass('loader');
+ // ellenőrzés
+ if ($('#focus').val() =="") {
+ $('#focus').addClass('error');
+ return false;
+ }
+ if ($('#userPassword').val() =="") {
+ $('#userPassword').addClass('error');
+ return false;
+ }
+ document.loginablak.button.disabled=true;
+ $('.loader').show();
+ $(this).closest('form').submit();
+ });
+ $('form input').focus(function(event) {
+ $(event.target).prev().removeClass('error');
+ });
+});
+
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/admin/azonositok.css b/mayor-orig/www/skin/classic/module-naplo/css/admin/azonositok.css
new file mode 100644
index 00000000..f2024e98
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/admin/azonositok.css
@@ -0,0 +1,10 @@
+
+ form.azonosito table {
+ margin: 0px auto; background-color: rgb(20,40,80); color: white
+ }
+ form.azonosito table th { background-color: rgb(60,80,100); }
+ form.azonosito table td { background-color: rgb(40,80,120); }
+ form.azonosito table td.azonosNev { background-color: rgb(40,120,80); }
+ form.azonosito table td.tobbszorosOid { background-color: rgb(120,40,40); }
+
+
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/admin/csoportok.css b/mayor-orig/www/skin/classic/module-naplo/css/admin/csoportok.css
new file mode 100644
index 00000000..0ab895f8
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/admin/csoportok.css
@@ -0,0 +1,9 @@
+@CHARSET "UTF-8";
+
+ form.csoport { width: 80%; background-color: rgb(180,180,200); margin: 20px auto; text-align: center; padding: 5px;}
+ form.csoport label { color: white; padding: 8px; }
+ form.csoport table { margin: 20px auto; background-color: rgb(140,140,180); }
+ form.csoport table td { background-color: rgb(255,255,255); }
+ form.csoport h1 { background-color: rgb(120,120,160); color: white; }
+ form.csoport p { background-color: rgb(200,200,220); padding: 15px; text-align: justify; border: dotted 1px rgb(120,120,160);}
+ form.csoport select.kiemelt { color: red; font-weight: bold; }
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/admin/import.css b/mayor-orig/www/skin/classic/module-naplo/css/admin/import.css
new file mode 100644
index 00000000..dbe69451
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/admin/import.css
@@ -0,0 +1,8 @@
+@CHARSET "UTF-8";
+
+form.updateTable { width: 98%; background-color: rgb(180,180,200); margin: 20px auto; text-align: center; padding: 5px;}
+form.updateTable label { color: white; padding: 8px; }
+form.updateTable table { margin: 10px auto; background-color: rgb(140,140,180); width:100%; overflow:hidden; }
+form.updateTable table td { background-color: rgb(255,255,255); }
+form.updateTable table th { background-color: rgb(120,120,160); }
+form.updateTable p { background-color: rgb(200,200,220); padding: 15px; text-align: justify; border: dotted 1px rgb(120,120,160);}
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/admin/intezmenyek.css b/mayor-orig/www/skin/classic/module-naplo/css/admin/intezmenyek.css
new file mode 100644
index 00000000..25a0be92
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/admin/intezmenyek.css
@@ -0,0 +1,26 @@
+
+ form.intezmeny { background-color: rgb(40,60,120); color: white; margin: 20px; padding: 5px; }
+ form.intezmeny h2 {
+ background-color: rgb(20,40,80);
+ text-align: center;
+ border: white 1px dotted;
+ border-width: 1px 0px;
+ padding: 3px;
+ }
+
+ form.ujTelephely { background-color: rgb(40,120,120); color: white; margin: 20px; padding: 5px; margin: 0px 30px 10px 30px}
+ form.ujTelephely:hover { background-color: rgb(80,160,200); }
+ form.ujTelephely h2 {
+ color: white; background-color: rgb(20,80,80); text-align: center;
+ border: white 1px dotted; border-width: 1px 0px;
+ padding: 3px;
+ }
+ form.telephely { background-color: rgb(40,120,60); color: white; margin: 20px; padding: 5px; margin: 0px 30px 10px 30px}
+ form.telephely:hover { background-color: rgb(120,180,60); }
+ form.telephely h2 {
+ color: white; background-color: rgb(20,80,40); text-align: center;
+ border: white 1px dotted; border-width: 1px 0px;
+ padding: 3px;
+ }
+
+
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/admin/rpcPrivilege.css b/mayor-orig/www/skin/classic/module-naplo/css/admin/rpcPrivilege.css
new file mode 100644
index 00000000..680cfb1c
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/admin/rpcPrivilege.css
@@ -0,0 +1,12 @@
+
+ form#addNode { background-color: #ceddec; margin: 10px auto; width: 600px; padding: 10px; text-align: center; border: outset 2px; color: #234; }
+ form#addNode p { text-align: left; padding: 1px 4px; }
+ form#addNode p select { width: 100%; color: #234; }
+ form#addNode h3 { border-bottom: 1px solid #a00; }
+ form#addNode label { margin-right: 5px; }
+
+
+ table#privNodes { background-color: white; border: 1px solid #ceddec; border-spacing: 0px; margin: auto; }
+ table#privNodes th, table#requNodes td { border: 1px solid #ddd; padding: 2px 5px; }
+ table#privNodes td label { padding: 2px 5px; border: 1px solid #ddd; border-radius: 4px; margin: 1px 2px; }
+
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/admin/szemeszterek.css b/mayor-orig/www/skin/classic/module-naplo/css/admin/szemeszterek.css
new file mode 100644
index 00000000..2f72dc3a
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/admin/szemeszterek.css
@@ -0,0 +1,6 @@
+
+ form.szemeszter { color: white; background-color: rgb(80,100,70); padding: 10px; margin: 10px; text-align: center; }
+ form.szemeszter h2 { background-color: rgb(40,50,35); }
+ form.szemeszter table { }
+ form.szemeszter tr td { background-color: rgb(100,50,50); margin: 1px; padding: 4px; text-align: left; }
+ form.szemeszter tr td input { border: solid rgb(100,50,50); }
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/admin/szuloiAzonositok.css b/mayor-orig/www/skin/classic/module-naplo/css/admin/szuloiAzonositok.css
new file mode 100644
index 00000000..ec096326
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/admin/szuloiAzonositok.css
@@ -0,0 +1,12 @@
+
+ form.azonosito table {
+ margin: 0px auto; background-color: rgb(180,180,180); color: white
+ }
+ form.azonosito table th { background-color: rgb(140,140,140); }
+ form.azonosito table td { background-color: rgb(160,160,160); }
+ form.azonosito table td.azonosNev { background-color: rgb(40,120,80); }
+ form.azonosito table td.tobbszorosOid { background-color: rgb(120,40,40); }
+ form.azonosito table td.anya { background-color: #993333; }
+ form.azonosito table td.apa { background-color: #333399; }
+ form.azonosito table td.apa span.elhunyt,
+ form.azonosito table td.anya span.elhunyt { background-color: black; color: white; font-style: italic; padding: 8px 20px; }
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/admin/tanevek.css b/mayor-orig/www/skin/classic/module-naplo/css/admin/tanevek.css
new file mode 100644
index 00000000..7562ff6f
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/admin/tanevek.css
@@ -0,0 +1,17 @@
+
+ form.intezmeny { background-color: rgb(40,60,120); color: white; margin: 20px; padding: 0px; }
+ form.intezmeny h2 {
+ background-color: rgb(20,40,80);
+ text-align: center;
+ border: white 1px dotted;
+ border-width: 1px 0px;
+ padding: 3px;
+ }
+ form.intezmeny div.data {
+ padding: 1em;
+ }
+ input.date { width: 100px; }
+
+ form.intezmeny fieldset p { margin-left: 50px; }
+ form.intezmeny fieldset label { background-coor: red; padding: 0px 14px 0px 0px; }
+ form.intezmeny fieldset h3 { color: rgb(255,255,100); } \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/admin/tankorok.css b/mayor-orig/www/skin/classic/module-naplo/css/admin/tankorok.css
new file mode 100644
index 00000000..48556e71
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/admin/tankorok.css
@@ -0,0 +1,8 @@
+@CHARSET "UTF-8";
+
+ form.updateTable { width: 80%; background-color: rgb(180,180,200); margin: 20px auto; text-align: center; padding: 5px;}
+ form.updateTable label { color: white; padding: 8px; }
+ form.updateTable table { margin: 20px auto; background-color: rgb(140,140,180); }
+ form.updateTable table td { background-color: rgb(255,255,255); }
+ form.updateTable table th { background-color: rgb(120,120,160); }
+ form.updateTable p { background-color: rgb(200,200,220); padding: 15px; text-align: justify; border: dotted 1px rgb(120,120,160);}
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/bejegyzesek/bejegyzesTipus.css b/mayor-orig/www/skin/classic/module-naplo/css/bejegyzesek/bejegyzesTipus.css
new file mode 100644
index 00000000..8f2a4592
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/bejegyzesek/bejegyzesTipus.css
@@ -0,0 +1,19 @@
+
+ form.bejegyzes { }
+ form.bejegyzes ul { margin: 0px 20px 20px 30px; list-style-type: none; padding: 0; }
+ form.bejegyzes ul.dicseret { background-color: rgb(82,100,215); }
+ form.bejegyzes ul.fegyelmi { background-color: rgb(180,82,215) }
+ form.bejegyzes ul.uzenet { background-color: rgb(215,215,180) }
+ form.bejegyzes lh { text-align: center; background: rgba(0,0,0,0.5); display: block; margin: 0px; padding: 10px; color: #fff; font-weight: bold; border-bottom: solid 1px white; }
+ form.bejegyzes ul li { padding: 5px; }
+ form.bejegyzes ul li input[type=text] { width: 300px; background: rgba(255,255,255,0.5); }
+ form.bejegyzes span { float: right; }
+ form.bejegyzes label { padding-right: 15px; }
+ form.bejegyzes input { border: solid 1px #eeeeee; }
+ form.bejegyzes ul li:hover { background-color: rgba(255,255,255,0.2); }
+ form.bejegyzes input:hover { border-bottom: solid 1px #aaaaaa; }
+ form.bejegyzes input.ok { width: 500px; }
+ form.bejegyzes input.del { width: 200px; color: red; float: right; }
+ form.bejegyzes input.new { width: 200px; color: green; float: right; }
+ form.bejegyzes input[type=submit] { background-color: rgba(255,255,255,0.5); }
+ form.bejegyzes input[type=submit]:hover { background-color: rgba(255,255,255,1); }
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/bejegyzesek/bejegyzesek.css b/mayor-orig/www/skin/classic/module-naplo/css/bejegyzesek/bejegyzesek.css
new file mode 100644
index 00000000..d90c958f
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/bejegyzesek/bejegyzesek.css
@@ -0,0 +1,34 @@
+
+@media screen {
+
+ div.bejegyzes { margin: 1px 40px; }
+ div.bejegyzes ul { list-style-type: none; padding: 0px; margin: 0px; background-color: #ffffff; }
+ div.bejegyzes ul li { margin: 0px; color: white; padding: 1px;}
+ div.bejegyzes ul li form { text-align: right; }
+ div.bejegyzes ul li form input { background-color: white; font-size: 10px; border: none;}
+
+ div.bejegyzes ul li div.kategoria { text-align: center; padding: 2px; margin: 0px; font-weight: bold; }
+ div.bejegyzes ul li div.megjegyzes { font-style: italic; padding: 10px 20px;}
+ div.bejegyzes ul li.dicséret div.dt { padding: 0px 10px; }
+
+ span.tanar { float: right; font-weight: normal; font-style: italic; }
+ span.dt { float: left; font-weight: normal; font-style: italic; }
+ div.bejegyzes form.nev { margin: 10px 0px 0px 0px; border: dotted black; border-width: 1px 0px 0px 0px; }
+ div.bejegyzes form.nev input { margin: 0px; background-color: white; border: none; cursor: pointer; width: 100%; font-weight: bold; text-align: left; }
+
+ div.bejegyzes ul li.dicséret div.dt, div.bejegyzes ul li.dicséret div.kategoria { background-color: lightgreen; }
+ div.bejegyzes ul li.dicséret div.megjegyzes { background-color: #eee; color:black; }
+ div.bejegyzes ul li.dicséret form { border-bottom: solid 1px #883311; }
+ div.bejegyzes ul li.dicséret form input { color: #883311; }
+
+ div.bejegyzes ul li.fegyelmi div.dt,div.bejegyzes ul li.fegyelmi div.kategoria { background-color: #e91e63; }
+ div.bejegyzes ul li.fegyelmi div.megjegyzes { background-color: #eee; font-style: italic; color: black; }
+ div.bejegyzes ul li.fegyelmi form { border-bottom: solid 1px #224466; }
+ div.bejegyzes ul li.fegyelmi form input { color: #224466; }
+
+ div.bejegyzes ul li.üzenet div.dt, div.bejegyzes ul li.üzenet div.kategoria { background-color: cornflowerblue; }
+ div.bejegyzes ul li.üzenet div.megjegyzes { background-color: ; color: black; }
+ div.bejegyzes ul li.üzenet form { border-bottom: solid 1px #226644; }
+ div.bejegyzes ul li.üzenet form input { color: #226644; }
+
+} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/bejegyzesek/ujBejegyzes.css b/mayor-orig/www/skin/classic/module-naplo/css/bejegyzesek/ujBejegyzes.css
new file mode 100644
index 00000000..0f07266a
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/bejegyzesek/ujBejegyzes.css
@@ -0,0 +1,10 @@
+
+@media screen {
+
+ form.bejegyzes { margin: 40px; background-color: white; border: dotted 1px #446688; text-align: center; padding: 5px; }
+ form.bejegyzes select { color: #224466; border: dotted 1px #224466; }
+ form.bejegyzes textarea { color: #224466; width: 80%; border: dotted 1px #224466; margin: 2px; background-color: #e7f0ff; }
+ form.bejegyzes label { color: #224466; font-weight: bold; }
+ form.bejegyzes input { margin: 2px; padding: 0px 20px; background-color: white; color: #224466; font-size: 10px; border: dotted 1px #224466;}
+
+} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/diakValaszto.css b/mayor-orig/www/skin/classic/module-naplo/css/diakValaszto.css
new file mode 100644
index 00000000..37b12d9e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/diakValaszto.css
@@ -0,0 +1,4 @@
+
+ form.valaszto {
+ text-align: center;
+ } \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/ertekeles/ertekeles.css b/mayor-orig/www/skin/classic/module-naplo/css/ertekeles/ertekeles.css
new file mode 100644
index 00000000..560c2418
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/ertekeles/ertekeles.css
@@ -0,0 +1,41 @@
+
+ form.kerdoiv { background-color: rgb(210,210,250); margin: 20px; padding: 20px 50px; }
+ form.kerdoiv h1 { background-color: rgb(110,110,150); color: white; font-size: 20px; border: solid white; border-width: 1px 0px; text-align: center; }
+ form.kerdoiv p { font-style: italic; margin: 4pt 20pt; background-color: rgb(255,255,255); padding: 20px; }
+ form.kerdoiv > ol > li { font-weight: bold; border: solid rgba(60,80,100,0.5); border-width: 1px 0 0 0; margin-top: 10px; padding-top: 10px; }
+ form.kerdoiv ol ol { list-style-type: none; box-shadow: 1px 1px 4px rgba(0,0,0,0.5); margin-top: 15px; padding: 10px; }
+ form.kerdoiv ol ol.negativ { background-color: #bbf; }
+ form.kerdoiv ol ol.semleges { background-color: #eee; }
+ form.kerdoiv ol ol.pozitiv { background-color: #fbb; }
+ form.kerdoiv ol ol li { font-weight: normal; }
+ form.kerdoiv input.szabadValasz { width: 100%; }
+ span.gomb { font-weight: bold; padding: 1px 8px; margin: 5px; cursor: pointer; float: right; }
+ span.pozitiv {
+ border: 1px solid maroon;
+ background-color: red;
+ border-radius: 4px;
+ box-shadow: inset 0 1px 3px pink, inset 0 -5px 12px maroon, 0 2px 1px rgba(0,0,0,0.5);
+ color: white;
+ text-shadow: 0 1px 1px #000;
+ }
+ span.semleges {
+ border: 1px solid #666;
+ background-color: #eee;
+ border-radius: 4px;
+ box-shadow: inset 0 1px 3px #888, inset 0 -5px 12px #999, 0 2px 1px rgba(0,0,0,0.5);
+ color: #fff;
+ text-shadow: 0px 1px 1px #000;
+ }
+ span.negativ {
+ border: 1px solid #55a;
+ background-color: #008;
+ border-radius: 4px;
+ box-shadow: inset 0 1px 3px #aaf, inset 0 -5px 12px #55a, 0 2px 1px rgba(0,0,0,0.5);
+ color: white;
+ text-shadow: 0 1px 1px #000;
+ }
+ ol li label { padding: 0px 4px; }
+ ol li label:hover { background-color: purple; color: white; }
+ #ok { width: 100%; }
+ #ok:hover { background-color: orange; }
+
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/ertekeles/kerdoivBetoltes.css b/mayor-orig/www/skin/classic/module-naplo/css/ertekeles/kerdoivBetoltes.css
new file mode 100644
index 00000000..a391d32d
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/ertekeles/kerdoivBetoltes.css
@@ -0,0 +1,11 @@
+
+ form.kerdoiv { width: 80%; margin: 10px auto; background-color: rgb(20,60,40); color: white; padding: 10px; text-align: center; }
+ form.kerdoiv label { margin: 10px; padding: 2px; }
+ form.kerdoiv #megjegyzes { height: 50px; }
+ form.kerdoiv textarea { width: 80%; height: 400px; }
+
+ form.kerdoivCimzett { width: 800px; margin: 10px auto; background-color: rgb(20,60,40); color: white; padding: 10px; text-align: center; }
+ form.kerdoivCimzett div.bal { float: left; }
+ form.kerdoivCimzett div.jobb { float: right; }
+ form.kerdoivCimzett select { height: 300px; min-width: 100px;}
+ form.kerdoivCimzett input[type=submit] { width: 100%; }
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/esemeny/esemenyDiak.css b/mayor-orig/www/skin/classic/module-naplo/css/esemeny/esemenyDiak.css
new file mode 100644
index 00000000..97880624
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/esemeny/esemenyDiak.css
@@ -0,0 +1,34 @@
+
+ form#nevsorForm { margin-left: 35px; }
+ form#nevsorForm table#kontener td { vertical-align: top; background-color: #ddd; border: solid 1px #abc;}
+ form#nevsorForm table#kontener > tbody > tr > th { padding: 5px; background-color: #eee; cdolor: white; border: solid #aaa; border-width: 0px 1px 1px 0px; }
+ form#nevsorForm table#kontener > tbody > tr > th:nth-child(3) { width: 300px; }
+ form#nevsorForm table#kontener td#osztalyok input[type=button] { width: 100px; text-align: right; }
+ form#nevsorForm table#kontener td#osztalyok input[type=button]:hover { background-color: orange; }
+ form#nevsorForm table#kontener input.add { color: #68a; width: 100%; font-size: 22px; font-weight: bold; text-align: center; margin-top: 20px; }
+ form#nevsorForm table#kontener td.openable select { min-height: 300px; width: 100%; }
+ form#nevsorForm table#kontener input.selected { background-color: #aaccee; }
+
+ form#nevsorForm table#nevsor { min-width: 500px; }
+
+ form#nevsorForm table#nevsor tr th { padding: 5px; background-color: #c8c8c8; vertical-align: middle; }
+ form#nevsorForm table#nevsor tr td { padding: 5px; background-color: #d8d8d8; vertical-align: middle; }
+ form#nevsorForm table#nevsor tr td.sorsz { text-align: right; }
+ form#nevsorForm table#nevsor tr td.osztaly { text-align: right; cursor: pointer;}
+ form#nevsorForm table#nevsor tr:nth-child(odd) td { background-color: #eeeeee; }
+ form#nevsorForm table#nevsor tr.ujDiak td { background-color: #99dd99; }
+
+ form#nevsorForm table#nevsor span.icon-remove-sign {color: red; cursor: pointer; padding: 3px 20px; }
+ form#nevsorForm table#nevsor span.icon-remove-sign:hover { color: orange; }
+ form#nevsorForm table#nevsor span.icon-remove-sign:hover:before { content: "\e103"; }
+
+ form#nevsorForm table#nevsor span.icon-minus-sign { color: #800; cursor: pointer; padding: 3px 20px; }
+ form#nevsorForm table#nevsor span.icon-minus-sign:hover { color: orange; }
+ form#nevsorForm table#nevsor span.icon-minus-sign:hover:before { content: "\e06e"; }
+
+ form#nevsorForm table#nevsor span.icon-ok-sign { color: #080; cursor: pointer; padding: 3px 20px; }
+ form#nevsorForm table#nevsor span.icon-ok-sign:hover { color: orange; }
+ form#nevsorForm table#nevsor span.icon-ok-sign:hover:before { content: "\e075"; }
+
+ form#nevsorForm table#nevsor tr#submitRow input { width: 100%; }
+ form#nevsorForm table#nevsor tr#submitRow input:hover { background-color: orange; }
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/esemeny/jelentkezes.css b/mayor-orig/www/skin/classic/module-naplo/css/esemeny/jelentkezes.css
new file mode 100644
index 00000000..c1004624
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/esemeny/jelentkezes.css
@@ -0,0 +1,27 @@
+
+ form.esemeny table { margin-left:auto; margin-right:auto; border-spacing: 1px; border: 1px solid #aabbcc; background-color: #f0f0f0; padding: 10px; }
+ form.esemeny table th { background-color: #a8a8a8; padding: 4px; color: white; }
+ form.esemeny table tr:hover th { background-color: #ff8800; padding: 4px; color: white; cursor: pointer; }
+ form.esemeny table td { background-color: #ececec; padding: 4px; }
+
+ form.esemeny table tr.jelentkezes:nth-child(odd) td { background-color: #d6d6d6; }
+
+/*
+ form.esemeny table tr.valasztott:nth-child(even) td { background-color: #a6e6a6; }
+ form.esemeny table tr.valasztott:nth-child(odd) td { background-color: #86d686; }
+*/
+ form.esemeny table tr.jelentkezes td, form.esemeny table tr.valasztott td { min-width: 60px; }
+ form.esemeny table input.felvesz { font-size: 12px; color: green; }
+ form.esemeny table input.lead { font-size: 12px; color: red; }
+ form.esemeny table input.felvesz:hover, form.esemeny table input.lead:hover { }
+ form.esemeny table input.felvesz:disabled, form.esemeny table input.lead:disabled { color: #666; }
+ form.esemeny table td.letszam { text-align: right; }
+ form.esemeny table td.minmax { text-align: center; }
+ form.esemeny table td.min { border-left: 1px dotted red; }
+ form.esemeny table td.max { border-right: 1px dotted red; }
+ form.esemeny table td span.icon-minus-sign { padding: 3px 20px; color: #800; }
+ form.esemeny table td span.icon-ok-sign { padding: 3px 20px; color: #080; }
+
+ form.esemeny table tr td.gombKontener { text-align:center; }
+ form.esemeny table tr:hover td.gombKontener.lead { background-color: #fee;}
+ form.esemeny table tr:hover td.gombKontener.felvesz { background-color: #efe;}
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/esemeny/ujEsemeny.css b/mayor-orig/www/skin/classic/module-naplo/css/esemeny/ujEsemeny.css
new file mode 100644
index 00000000..2dc8381e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/esemeny/ujEsemeny.css
@@ -0,0 +1,43 @@
+
+ form.esemeny table { margin: 20px 35px 0px 35px; border-spacing: 0; border: 1px solid #aabbcc; background-color: #f0f0f0; padding: 10px; position: relative; width: 550px; }
+ form.esemeny table td, form.esemeny table th { background-color: #ececec; padding: 4px; }
+ form.esemeny table th { text-align: right; }
+ form.esemeny table td input.datetime { width: 140px; }
+ form.esemeny table textarea { width: 98%; margin-top: 5px; }
+ form.esemeny table td#submitTd { background-color: #99dd99; text-align: center; padding: 20px 0px; }
+/*
+ form.esemeny table input[type=submit] { width: 500px; color: #080; }
+ form.esemeny table input:focus, form.esemeny table textarea:focus { background-color: #fd2; }
+ form.esemeny table input:disabled, form.esemeny table textarea:disabled, form.esemeny table select:disabled { background-color: #eee; color: #68a; border:solid #ccc 1px;}
+ form.esemeny table input[type=submit]:hover { }
+*/
+ form.esemeny table td hr { background-color: #f8f8f8; border: none; }
+ form.esemeny table select#kategoria { float: right; margin-top: -5px; }
+
+ form.esemeny table td.tanarok { position: relative; }
+ form.esemeny table td.tanarok div.select { margin-left: 3px; display:inline-block; vertical-align:top; overflow:hidden; border:solid #ccc 1px; }
+ form.esemeny table select#esemenyTanar { overflow: hide; min-width: 150px; width: 300px; height: 250px; padding:10px; margin:-5px -20px -5px -5px; background-color: #f8f8f8; }
+ form.esemeny table select#esemenyTanar option.uj { background-color: #99dd99; }
+ form.esemeny table input#plusz { color: red; width: 140px; }
+ form.esemeny table input#minusz { color: green; width: 140px; }
+ form.esemeny table input#add { color: #68a; width: 100%; font-size: 22px; font-weight: bold; }
+
+ form.esemeny table div#tanarLista { padding: 15px 5px 5px 5px; width: 300px; position: absolute; top:0px; right: -330px; background-color: #ace; border: 1px #abc solid; }
+ form.esemeny table span#closeTanarLista { position: absolute; font-weight: bold; color: white; padding: 0px 5px; right: 0px; top: 0px; }
+ form.esemeny table span#closeTanarLista:hover { cursor: pointer; }
+ form.esemeny table select#tanarok { width: 300px; height: 250px; }
+ form.esemeny table div#osztalyLista { background: #f0f0f0; position: absolute; top: 0px; right: -463px; width: 440px; border: 1px solid #aabbcc; padding: 10px; }
+ form.esemeny table div#osztalyLista ul {
+ list-style-type: none; padding: 0px 0px;
+/* -moz-column-count: 2; -moz-column-gap: 0px;
+ -webkit-column-count: 2; -webkit-column-gap: 0px;
+ column-count: 2; column-gap: 0px;
+ width: 740px;
+*/
+ }
+ form.esemeny table div#osztalyLista ul label.oJel { display: inline-block; width: 40px; font-weight: bold; text-align: center; }
+ form.esemeny table div#osztalyLista ul li.uj { background-color: #99dd99; }
+
+ form.esemenyTorles {margin: 0px 35px; border-spacing: 0; border: 1px solid #aabbcc; background-color: #f0f0f0; padding: 2px 0px; position: relative; width: 548px; text-align: center; background-color: #f00; }
+ form.esemenyTorles input { color: red; width: 500px; }
+ form.esemenyTorles input:hover { background-color: #eca; border-color: #fdd #dcc #dcc #fdd; }
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/export/bizonyitvany.css b/mayor-orig/www/skin/classic/module-naplo/css/export/bizonyitvany.css
new file mode 100644
index 00000000..bc531fad
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/export/bizonyitvany.css
@@ -0,0 +1,19 @@
+
+ form.export { background-color: white; margin: 5px 30px 20px 20px; font-size:10px; }
+ form.export h1 { border: dotted white; border-width: 1px 0px; background-color: rgb(80,100,120); font-size: 20px; text-align: center; }
+ form.export input { font-size: 10px; border: solid 1px #777777; margin-left: 3px; padding-left: 2px; }
+ form.export label { font-size:11px; }
+ form.export input:focus { background-color: orange; }
+
+ form.export fieldset { border: solid 1px rgb(40,60,80); }
+ form.export fieldset th { text-align: right; }
+ form.export fieldset legend {
+ background-color: rgb(140,160,180);
+ color: white;
+ font-size:90%;
+ text-align: left;
+ margin-left:20px;
+ padding-left: 10px;
+ padding-right: 10px;
+ border: solid 1px rgb(40,60,80);
+ }
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/export/diakExport.css b/mayor-orig/www/skin/classic/module-naplo/css/export/diakExport.css
new file mode 100644
index 00000000..99997093
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/export/diakExport.css
@@ -0,0 +1,19 @@
+
+ form.diak { margin: 5px 30px 20px 30px; font-size:10px; }
+ form.diak input, form.diak select {
+ font-size:10px; border: solid 1px #777777; margin-left: 3px;
+ padding-left: 2px;
+ }
+ form.diak fieldset legend {
+ background-color: rgb(140,160,180); color: white;
+ border: solid 1px rgb(40,60,80); padding: 2px 10px; margin-left:20px;
+ }
+ #tableDiv { margin: 10px 50px; }
+ #diakTabla { margin: auto; }
+ #diakTable tr:hover td { background: rgb(50,50,100); }
+ #exportOptions fieldset { background: rgba(150,50,100,0.9); position: absolute; left: 20px; z-index: 10; width: 80%; margin: auto 10%; box-shadow: 5px 5px 5px #999; border: 3px solid orange; color: white; }
+ #exportOptions select { height: 200px; width: 200px; }
+ #exportOptions table { margin: auto; }
+ #submitForm { text-align: center; }
+ table.TF tr:hover td { background: rgb(100,100,200); color: white; }
+ table.TF tr:hover td span { color: black; }
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/export/kreta.css b/mayor-orig/www/skin/classic/module-naplo/css/export/kreta.css
new file mode 100644
index 00000000..a163f7ff
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/export/kreta.css
@@ -0,0 +1,23 @@
+
+ form.export { background-color: white; margin: 5px 30px 20px 20px; }
+ form.export h1 { border: dotted white; border-width: 1px 0px; background-color: rgb(80,100,120); text-align: center; }
+ form.export input { border: solid 1px #777777; }
+ form.export label { }
+ form.export input:focus { background-color: orange; }
+
+ form.export fieldset { border: solid 1px rgb(40,60,80); }
+ form.export fieldset th { }
+ form.export fieldset legend {
+ background-color: rgb(140,160,180);
+ color: white;
+ text-align: left;
+ margin-left:20px;
+ padding-left: 10px;
+ padding-right: 10px;
+ border: solid 1px rgb(40,60,80);
+ }
+ form.export:hover fieldset legend { background-color: rgb(140,160,250); }
+
+
+ form.export table { width:100%; }
+ form.export ul { list-style-type: none; }
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/export/sulix.css b/mayor-orig/www/skin/classic/module-naplo/css/export/sulix.css
new file mode 100644
index 00000000..5f68d40e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/export/sulix.css
@@ -0,0 +1,9 @@
+
+ form.export { width: 60%; float: left; margin: 0px 20%; }
+
+ form.export input[type=submit] { width: 100%; }
+ form.export input[type=submit]:hover { background: rgb(100,100,100); color: white }
+ form.export div.leiras { background: rgba(200,200,200,0.8); margin: 10px; text-align: left; padding: 6px; height: 300px; }
+
+ div.txt { margin: 1%; background: #3496B9; padding: 10px; padding-bottom: 50px; }
+ div.txt div { background: rgba(200,200,200,0.8); padding: 6px; margin-bottom: 10px; } \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/export/tantargyFelosztas.css b/mayor-orig/www/skin/classic/module-naplo/css/export/tantargyFelosztas.css
new file mode 100644
index 00000000..c4671887
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/export/tantargyFelosztas.css
@@ -0,0 +1,20 @@
+
+ form.export { background-color: white; margin: 5px 30px 20px 20px; font-size:10px; }
+ form.export h1 { border: dotted white; border-width: 1px 0px; background-color: rgb(80,100,120); font-size: 20px; text-align: center; }
+ form.export input { font-size: 10px; border: solid 1px #777777; margin-left: 3px; padding-left: 2px; }
+ form.export label { font-size:11px; }
+ form.export input:focus { background-color: orange; }
+
+ form.export fieldset { border: solid 1px rgb(40,60,80); }
+ form.export fieldset th { text-align: right; }
+ form.export fieldset legend {
+ background-color: rgb(140,160,180);
+ color: white;
+ font-size:90%;
+ text-align: left;
+ margin-left:20px;
+ padding-left: 10px;
+ padding-right: 10px;
+ border: solid 1px rgb(40,60,80);
+ }
+ form.export:hover fieldset legend { background-color: rgb(140,160,250); } \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/haladasi/elmaradas.css b/mayor-orig/www/skin/classic/module-naplo/css/haladasi/elmaradas.css
new file mode 100644
index 00000000..d6252159
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/haladasi/elmaradas.css
@@ -0,0 +1,12 @@
+
+ table.elmaradas { margin: 0px auto; background-color: rgb(32, 130, 155); color: white; margin-bottom:1em;}
+ table.elmaradas thead th { background-color: rgb(40, 40, 80); padding: 2px 4px;}
+ table.elmaradas tbody th { font-weight: normal; background-color: rgb(120, 140, 180); padding: 2px 4px;}
+ table.elmaradas tbody tr:hover th { outline: solid 1px orange; }
+ table.elmaradas tbody tr:hover td { outline: solid 1px orange; }
+ table.elmaradas tbody td { font-weight: normal; background-color: rgb(52, 150, 185); text-align: right; padding: 2px 4px;}
+ table.elmaradas tr.beirando td { background-color: rgb(40, 80, 60); }
+
+ table.elmaradas tr th.tanarNev { text-align:left; }
+
+ table.elmaradas tfoot tr th, table.elmaradas tfoot tr td { font-size: smaller; text-align: center; background-color: rgb(82,180,205); padding: 2px 4px;}
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/haladasi/elszamolas.css b/mayor-orig/www/skin/classic/module-naplo/css/haladasi/elszamolas.css
new file mode 100644
index 00000000..41c1d07f
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/haladasi/elszamolas.css
@@ -0,0 +1,32 @@
+
+ table.elszamolas { background-color: rgb(220,220,220); margin: 10px auto; }
+
+ table.elszamolas thead tr th { background-color: #F23668; color: white; text-align: center; padding:2px; font-weight:normal;}
+ table.elszamolas thead tr th.eloirt_egyeb { background-color: rgb(170, 170, 204);}
+ table.elszamolas thead tr th.egyeb { background-color: #E8C }
+
+ table.elszamolas tbody tr th { background-color: #f9f9f9; text-align: left; padding-left:1em; padding-right:0.5em;}
+ table.elszamolas tbody tr th a { color: black; display:block; }
+
+ table.elszamolas tbody tr th.sum { text-align:right; font-weight:normal;}
+ table.elszamolas tbody tr th.sum.highlight { background-color: cornflowerblue;color:white; }
+ table.elszamolas tbody tr th.sumsum { text-align:right;}
+
+ table.elszamolas tbody tr td {background-color:#eee; text-align: right ; padding-right:1em;}
+ table.elszamolas tbody tr td.highlight {background-color: cornflowerblue !important; color: white !important;}
+
+ table.elszamolas tr .e1 { background-color: #493E89; color: white; }
+ table.elszamolas tr .e2 { background-color: green; color: white; }
+ table.elszamolas tr .e3 { background-color: orange; color: white; }
+ table.elszamolas tr .e4 { background-color: red; color: white; }
+
+ table.elszamolas tbody tr td.osszevonas { background-color: rgba(0,0,0,0.1); color: #333333; }
+
+ table.elszamolas tbody tr:hover th { background-color: #eeeeee; }
+ table.elszamolas tbody tr:hover td { background-color: #E7FCFE; }
+ table.elszamolas tbody tr:hover td.e1 { background-color: #382d78; }
+ table.elszamolas tbody tr:hover td.e2 { background-color: #007000; }
+ table.elszamolas tbody tr:hover td.e3 { background-color: #ee9400; }
+ table.elszamolas tbody tr:hover td.e4 { background-color: #e00; }
+
+ \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/haladasi/haladasi.css b/mayor-orig/www/skin/classic/module-naplo/css/haladasi/haladasi.css
new file mode 100644
index 00000000..c2862fe8
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/haladasi/haladasi.css
@@ -0,0 +1,297 @@
+@media screen {
+
+ table.haladasiBejegyzesek {
+ background-color: rgb(50,60,80);
+ margin-top: 10px;
+ font-size: 11px;
+ width: 98%;
+ }
+ table.haladasiBejegyzesek thead tr th {height:18px;}
+ table.haladasiBejegyzesek thead tr th span.aktiv {
+ position:relative; top:-5px; padding-left:5px;
+ color: orange;
+ }
+
+ table.haladasiBejegyzesek tbody tr td {height:18px;}
+ table.haladasiBejegyzesek tbody tr:hover td { background-color: rgba(255,255,255,0.2); }
+ table.haladasiBejegyzesek tbody tr td input:focus {
+ background-color: white !important;
+ }
+ table.haladasiBejegyzesek tbody tr td input.gomb:focus {
+ background-color: red;
+ }
+ table.haladasiBejegyzesek tbody tr.torolt td {
+ background-color: black;
+ color:#dddddd;
+ text-decoration:line-through;
+ }
+ table.haladasiBejegyzesek tbody tr.torolt input.ajaxRequestDone { display:none; }
+ table.haladasiBejegyzesek tbody tr.torolt span.INFO.ajaxRequestDone { display:none; }
+
+ table.haladasiBejegyzesek tbody.parosNap {
+ background-color: #dddddd;
+ }
+ table.haladasiBejegyzesek tbody.paratlanNap {
+ background-color: #eeeeee;
+ }
+ table.haladasiBejegyzesek tbody td.ora {
+ text-align: center;
+ }
+ table.haladasiBejegyzesek tbody td.t {
+ padding-left:4px;
+ }
+
+ /* ajax eredménye */
+ table.haladasiBejegyzesek tbody tr.elmarad td {
+ background-color: #999999;color:#dddddd;text-decoration:line-through;
+ }
+
+ table.haladasiBejegyzesek tbody th.nincsOra {
+ background-color: rgb(200,200,200);
+ color: rgb(100,100,100);
+ text-align: center;
+ border: none;
+ font-weight: normal;
+ }
+ table.haladasiBejegyzesek tbody th.nap {
+ text-align: center;
+ background-color: #666688;
+ color: white;
+ border: none;
+ height:1em;
+ font-weight: normal;
+ height:2em;
+ }
+ table.haladasiBejegyzesek tbody th.nap div { color: white; padding-top:4px;}
+ table.haladasiBejegyzesek tbody th.nap div:hover { color: #aaa; }
+ table.haladasiBejegyzesek tbody.szunet th.nap {
+ background-color: #778877;
+ }
+ table.haladasiBejegyzesek tbody.tanitasNelkul th.nap {
+ background-color: #aaaa44;
+ }
+ table.haladasiBejegyzesek tbody.szorgalmiIdoszakonKivul th.nap {
+ background-color: #e91e63;
+ }
+
+ table.haladasiBejegyzesek tbody td.dolgozat {
+ background-color: #ffaa44;
+ padding-left: 20px;
+ }
+ table.haladasiBejegyzesek tbody td.dolgozat a {
+ text-decoration: none;
+ color: black;
+ }
+
+ table.haladasiBejegyzesek tbody td.nincsBeirva {
+ font-style:italic;
+ }
+
+ table.haladasiBejegyzesek th {
+ border-style: none none solid none;
+ border-width: 0 0 2px 0;
+ border-color: #556677;
+ background-color: rgb(50,60,80);
+ color: rgb(210,215,220);
+ border-style: solid;
+ border-width: 1px;
+ }
+ table.haladasiBejegyzesek th.fejlec8 {
+ font-size: 14px;
+ height: 30px;
+ text-align: center
+ }
+ table.haladasiBejegyzesek th.fejlec8 a { color: white }
+
+
+ table.haladasiBejegyzesek td.osztaly { text-align: center; }
+ table.haladasiBejegyzesek select {
+ font-size: 10px;
+ }
+
+ input { font-family: Verdana,Arial; color: inherit; }
+ input.data { border-style: none none solid none;
+ border-width: 1px;
+ border-color: #dddddd;
+ width:85%;
+ padding-right: 10px;
+ }
+ input.data:hover { border-bottom: solid 1px #556677; background-color: white }
+
+ table.haladasiBejegyzesek span.INFO { display: none; width:1em; padding:2px 2px; position: relative; left:-12px; border-radius:2px;color: white;}
+ table.haladasiBejegyzesek input.ajaxRequestDone+span.INFO { display: inline; background-color: green; }
+ table.haladasiBejegyzesek input.ajaxRequest+span.INFO { display: inline; background-color: orange; }
+ table.haladasiBejegyzesek input.ajaxRequestError+span.INFO { display: inline; background-color: red; }
+
+ table.haladasiBejegyzesek input.data:focus {
+ border-left: solid 2px blue !important; background-color: white; color:black !important;
+ border-radius:2px;
+ }
+
+ table.haladasiBejegyzesek tbody.parosNap input.data { border-left: solid 2px #cccccc; }
+ table.haladasiBejegyzesek tbody.paratlanNap input.data { border-left: solid 2px #eeeeee; }
+ table.haladasiBejegyzesek tbody.parosNap input.beirva { background-color: #cccccc; }
+ table.haladasiBejegyzesek tbody.paratlanNap input.beirva { background-color: #eeeeee; }
+
+ table.haladasiBejegyzesek tbody.parosNap input.data.ajaxRequest,
+ table.haladasiBejegyzesek tbody.paratlanNap input.data.ajaxRequest { border-left: solid 2px orange; }
+ table.haladasiBejegyzesek tbody.parosNap input.gomb.ajaxRequest,
+ table.haladasiBejegyzesek tbody.paratlanNap input.gomb.ajaxRequest { background-color: orange; }
+ table.haladasiBejegyzesek tbody select option.ajaxRequestDone,
+ table.haladasiBejegyzesek tbody.parosNap input.ajaxRequestDone,
+ table.haladasiBejegyzesek tbody.paratlanNap input.ajaxRequestDone { border-left: solid 2px green; background-color: lightgreen; }
+
+ table.haladasiBejegyzesek tbody.parosNap tr.helyettesit td { background-color: #ccccaa; }
+ table.haladasiBejegyzesek tbody.paratlanNap tr.helyettesit td { background-color: #eeeecc; }
+ table.haladasiBejegyzesek tbody.parosNap tr.helyettesit input.beirva { background-color: #ccccaa; }
+ table.haladasiBejegyzesek tbody.paratlanNap tr.helyettesit input.beirva { background-color: #eeeecc; }
+
+ table.haladasiBejegyzesek tbody tr.egyeb { background-color: #ee88cc; }
+ table.haladasiBejegyzesek tbody tr.egyeb.órarend { background-color: #aaaacc; }
+
+ input.gomb {
+ font-size: xx-small; border: solid 1px #777777;
+ padding: 0px 1px; margin: 0px;
+ background-color: #009900;
+ color: white;
+ }
+ input.gomb:hover { background-color: rgba(255,255,255,0.8); color:black;}
+/* input.rejtettGomb { border: solid 1px rgb(50,60,80);; background-color: rgb(50,60,80); }
+ input.rejtettGomb:hover { border: solid 1px orange; background-color: rgb(80,60,50); color: white }
+*/
+ div.rejtMutat { color: rgb(100,80,70);}
+ div.rejtMutat:hover { color: white; }
+
+ table.haladasiBejegyzesek a.gomb {
+ padding: 1px;
+ background-color: #dddddd;
+ font-size: 10px;
+ border: outset 1px #556677;
+ margin: 2px;
+ text-decoration: none;
+ }
+ table.haladasiBejegyzesek a.gomb:hover {
+ padding: 1px;
+ background-color: #556677;
+ font-size: 10px;
+ border: outset 1px #dddddd;
+ margin: 2px;
+ text-decoration: none;
+ color: white;
+ }
+
+ table.haladasiBejegyzesek a {
+ display: block;
+ color: black;
+ text-decoration: none;
+ }
+ table.haladasiBejegyzesek a:hover {
+ color: green;
+ text-decoration: underline;
+ }
+ table.haladasiBejegyzesek a.h {
+ text-align: center;
+ }
+ table.haladasiBejegyzesek tr.dolgozat td {
+ padding: 0px 10px;
+ background-color: rgb(160,100,120);
+ }
+
+ table.haladasiBejegyzesek tr.dolgozat td a {
+ color: white;
+ text-decoration: none;
+ }
+
+ table.haladasiBejegyzesek tr.dolgozat td a:hover {
+ color: rgb(260,200,220);
+ }
+
+ table.haladasiBejegyzesek tbody tr td.mg {
+ text-align: center;
+ }
+ table.haladasiBejegyzesek tbody tr td.info, table.haladasiBejegyzesek tbody tr td.halad {
+ cursor: pointer;
+ }
+
+ table.haladasiBejegyzesek tr td.mg span.latogatott {
+ background-color: rgb(100,150,100);
+ color: white;
+ text-decoration: none;
+ padding-left:5px;
+ padding-right:5px;
+ border-bottom: solid 1px green;
+ margin:0px;
+ }
+
+
+ table.haladasiBejegyzesek tr td select.teremvalt { background-color: white ; }
+
+ form.hetes {
+ border: solid 1px #008800;
+ background-color: rgb(100,200,100); text-align: center; color: white; margin: 15px 13px; font-weight: bold;
+ }
+ form.hetes input { color: black; border: none; margin: 4px; border: solid 1px #008800; }
+ form.hetes span { padding-right:2em; }
+ form.hetes select option {
+ font-size:small;
+ background-color:# white;
+ border: solix 1px #00aa00;
+ }
+
+
+ table.haladasiNaplo {
+ background-color: rgb(50,60,80);
+ width: 98%;
+ font-size: 11px;
+ }
+ table.haladasiNaplo thead tr th{
+ background-color: rgb(50,60,80);
+ color: white;
+ border-bottom: solid 1px white;
+ height:1.5em;
+ }
+ table.haladasiNaplo tfoot tr th{
+ font-size: 10px;
+ color: white;
+ }
+ table.haladasiNaplo tr td{ padding:0.6em; background-color: #eee; }
+
+ #updateWindow { width: 80%; top: 10%; margin-top: auto; margin-bottom: auto; height: 80%; left: 50%; margin-left: -40%; }
+ #updateHeader { cursor: pointer; }
+
+ #updateForm { max-height: 95%; overflow: auto; }
+
+ #updateForm fieldset { margin-top:2px; background-color: #eeeeee; border: solid 1px rgb(50,60,70);}
+ #updateForm fieldset legend { text-align: right; background-color: yellow; margin:0px 10px; padding: 2px 10px; border: solid 1px rgb(40,60,80); }
+
+ #updateForm fieldset.alapadatok p { text-align: center; font-style: italic; }
+ #updateForm fieldset.alapadatok p span { color: rgb(100,50,25); font-weight: bold; font-style: normal; }
+
+ #updateForm #temakor { list-style-type: none; }
+ #updateForm #temakor li { margin-top: 10px; }
+ #updateForm #temakor span.oraszam { display: block; float: left; width: 100px; text-align: right; color: rgb(160,80,40); margin-right: 6px; }
+ #updateForm #temakor div.megnevezes { display: inline-block; font-style: normal; }
+ #updateForm p.kiemelt { text-align: center; margin-top: 100px; font-size: 20px; }
+
+ table.haladasiBejegyzesek label.on { color: orange; }
+ table.haladasiBejegyzesek label:hover { color: white; text-shadow: 1px 1px 1px orange; }
+
+ table tr.ujOra { background-color: rgb(100, 149, 237); }
+ table tr.ujOra th { background-color: rgba(238, 136, 204,0.5);
+ font-weight:normal;
+ border: none 0px;
+ }
+
+ table.haladasiBejegyzesek button.gomb { font-size:8px; padding:4px;}
+
+ table.haladasiBejegyzesek tbody tr td.ora a.tankorStat {display:none;}
+ table.haladasiBejegyzesek tbody tr:hover td.ora a.tankorStat { display:inline;}
+
+}
+@media print {
+ table.haladasiBejegyzesek thead tr th { border-bottom: solid 1px black;}
+ table.haladasiBejegyzesek thead tr th:not(:last-child) { border-right: solid 1px black;}
+ table.haladasiBejegyzesek tbody tr td { border-bottom: solid 1px black;}
+ table.haladasiBejegyzesek div[class*="icon"] { display:none;}
+ table.haladasiBejegyzesek [class*="icon"] { display:none;}
+} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/haladasi/helyettesites.css b/mayor-orig/www/skin/classic/module-naplo/css/haladasi/helyettesites.css
new file mode 100644
index 00000000..298f29f1
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/haladasi/helyettesites.css
@@ -0,0 +1,162 @@
+/*
+input[type=image]
+{
+background-image: url('/skin/classic/share/javascript/jquery-mobile/images/icons-36-white.png');
+-moz-background-size: 864px 18px;
+-o-background-size: 864px 18px;
+-webkit-background-size: 864px 18px;
+background-size: 810px 18px;
+}
+*/
+
+ span.teremId { font-style: italic; color: gray; }
+
+ table.tanarForm {
+ width:50%;
+ border-style: solid solid solid solid;
+ border-width: 1px 1px 2px 1px;
+ border-color: rgb(100,80,100);
+ margin-bottom: 20px;
+ }
+
+ table.tanarForm th {
+ background-color: rgb(140,20,100);
+ color: white;
+ height: 2em;
+ }
+
+ table.tanarForm td {
+ background-color: #ffffff;
+ text-align: center;
+ }
+
+
+ table.tanarForm select {
+ height: 160px;
+ width: 60%;
+ }
+
+ table.hianyzoTanar {
+ border-style: solid ;
+ border-width: 1px;
+ border-color: purple;
+ background-color: #dddddd;
+ width: 95%;
+ margin-bottom:30px;
+ }
+
+ table.hianyzoTanar thead th {
+ background-color: rgb(100,100,200);
+ color: white;
+ height:2em;
+ }
+ table.hianyzoTanar tfoot th { background-color: #eeeeee; }
+ table.hianyzoTanar tfoot th input {
+ font-size:10px;
+ }
+
+ table.hianyzoTanar td {
+ background-color: white;
+ color: black;
+ padding: 0px 10px 0px 10px;
+ }
+
+ table.hianyzoTanar tr.elmarad td {
+ background-color: rgb(200,200,200);
+ color: rgb(140,140,140);
+ }
+
+ table.hianyzoTanar tbody tr:hover td {
+ background-color: rgba(128,0,128,0.2);
+ }
+ table.hianyzoTanar tbody tr td.info {
+ color:rgba(128,0,128,0.6);
+ }
+ table.hianyzoTanar tr td a.O { color: #aaaaaa; border-radius: 0px; font-size:12px; background-color: rgba(255,255,255,0.9); border: solid 1px #eeeeee; padding:0px 4px;}
+ table.hianyzoTanar tr td a.O:hover { color: white; background-color: rgb(50,60,80); border: solid 1px grey; padding:0px 4px;}
+
+
+/* ----------------------- */
+ table.mozgatas thead th {
+ background-color: purple;
+ color: white;
+ height:2em;
+ }
+ table.mozgatas tfoot th {
+ background-color: rgb(80,100,80);
+ }
+ table.mozgatas tbody th {
+ background-color: rgb(80,20,80);
+ color: white;
+ }
+
+ table.mozgatas td {
+ background-color: rgb(200,200,180);
+ padding: 0px 10px 0px 10px;
+ }
+
+ table.mozgatas td.mozgatando {
+ background-color: rgb(220,200,180);
+ }
+ table.mozgatas td.utkozik {
+ background-color: rgb(160,160,160);
+ }
+ table.mozgatas td.nemMegtartott {
+ background-color: rgb(180,200,220);
+ }
+
+/* ---------------------- */
+
+ table.csere td {
+ background-color: rgb(200,200,190);
+ padding: 0px 10px 0px 10px;
+ }
+
+ table.csere th {
+ background-color: rgb(110,120,110);
+ color: white;
+ height: 2em;
+ }
+
+ table.csere td.mozgatando {
+ background-color: rgb(220,200,180);
+ }
+ table.csere td.orajavan {
+ background-color: rgb(160,200,140);
+ }
+ table.csere td.nemMegtartott {
+ background-color: rgb(180,200,220);
+ }
+
+/* ---------------------- */
+ table.keziBeallitas { background-color: #555550; }
+ table.keziBeallitas td { background-color: rgb(200,200,190); }
+ table.keziBeallitas th { background-color: rgb(140,150,160); color: white; height:2em;}
+/* ---------------------- */
+
+ h2 { text-align: center; border: dotted black; border-width: 1px 0px; margin: 20px 50px;}
+ table.csereAttekintes { background-color: #555550; margin: 10px; text-align: center; margin: auto; }
+ table.csereAttekintes td { background-color: rgb(200,200,190); padding: 2px 20px; }
+ table.csereAttekintes th { background-color: rgb(140,150,160); color: white; }
+
+ #updateWindow { width: 80%; top: 10%; margin-top: auto; margin-bottom: auto; height: 80%; left: 50%; margin-left: -40%; }
+ #updateHeader { cursor: pointer; }
+
+ #updateForm { max-height: 95%; overflow: auto; }
+
+ table.haladasiNaplo {
+ background-color: rgb(50,60,80);
+ width: 98%;
+ font-size: 11px;
+ }
+ table.haladasiNaplo thead tr th{
+ background-color: rgb(50,60,80);
+ color: white;
+ border-bottom: solid 1px white;
+ height:1.5em;
+ }
+ table.haladasiNaplo tfoot tr th{
+ font-size: 10px;
+ color: white;
+ }
+ table.haladasiNaplo tr td{ padding:0.6em; background-color: #eee; }
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/haladasi/hetes.css b/mayor-orig/www/skin/classic/module-naplo/css/haladasi/hetes.css
new file mode 100644
index 00000000..78809cd3
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/haladasi/hetes.css
@@ -0,0 +1,8 @@
+@media screen {
+
+ table.hetes { background-color: #fefefe;}
+ table.hetes tr th { background-color: #64C864; border-bottom: solid 1px lightgreen; }
+ table.hetes tr td { padding: 1px 8px; }
+ table.hetes tr:nth-child(odd) td { background-color: #e0e0e0 }
+
+} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/haladasi/minuszora.css b/mayor-orig/www/skin/classic/module-naplo/css/haladasi/minuszora.css
new file mode 100644
index 00000000..1637e333
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/haladasi/minuszora.css
@@ -0,0 +1,28 @@
+
+ form.minuszora { margin: 20px auto; width: 500px; text-align: center; }
+ form.minuszora ul { text-align: left; list-style-type: none; padding: 1px; background-color: rgb(20,40,60);}
+ form.minuszora ul li { margin: 1px; padding: 2px; background-color: rgb(20,80,40); color: white; font-weight: bold; }
+ form.minuszora ul ul { list-style-type: none; background-color: rgb(200,200,200); }
+ form.minuszora ul ul li { padding: 4px 4px; margin: 1px 20px; background-color: rgb(255,240,220); color: black; font-weight: normal; }
+ form.minuszora input { color: rgb(200,0,0); font-weight: bold; }
+
+ span.latogatott {
+ background-color: #649664;
+ color: #FFF;
+ text-decoration: none;
+ padding-left: 5px;
+ padding-right: 5px;
+ border-bottom: solid 1px #008000;
+ margin: 0px 2px 0px 2px;
+ }
+
+ form.minuszora ul li.egyéb { background-color: #ee88cc; }
+ form.minuszora ul li.egyéb.órarend { background-color: #aaaacc; }
+
+ form.minuszora ul li.egyéb:after { content: "\25B5"; color: cornflowerblue; }
+ form.minuszora ul li.egyéb.órarend:after { content: "\25B2"; }
+
+ form.minuszora ul li { border-left: solid 2px darkgreen; }
+ form.minuszora ul li ul li { border-left: solid 0px darkgreen; }
+ form.minuszora ul li:hover { border-left: solid 2px cornflowerblue; }
+ form.minuszora ul li:hover ul li { border-left: solid 0px cornflowerblue; }
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/haladasi/oralatogatas.css b/mayor-orig/www/skin/classic/module-naplo/css/haladasi/oralatogatas.css
new file mode 100644
index 00000000..df459f0e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/haladasi/oralatogatas.css
@@ -0,0 +1,12 @@
+
+ ul.ora { list-style-type: none; color: white; margin: 20px; padding: 0px; }
+ ul.ora li { background-color: rgb(130,100,130); margin: 1px 0px; padding: 0px; }
+ ul.ora li p { background-color: rgb(60,0,60); border: 1px solid white; border-width: 0px 0px 1px 0px; padding: 10px; text-align: center; }
+ ul.ora li p span.ora { float: left; color: yellow; }
+ ul.ora li p input { margin: 0px; float: right; }
+ ul.ora li select { height: 100px; }
+ ul.ora li textarea { width: 80%; height: 100px; }
+ ul.ora li div { padding: 4px; }
+ ul.ora li div.jobb { float: right; }
+
+ ul.ora li form.latogatva { background-color: rgb(100,130,100); }
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/haladasi/osszevonas.css b/mayor-orig/www/skin/classic/module-naplo/css/haladasi/osszevonas.css
new file mode 100644
index 00000000..edbde3bb
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/haladasi/osszevonas.css
@@ -0,0 +1,27 @@
+
+ form.pluszora {
+ background-color: rgb(200,200,180);
+ margin-left: 180px;
+ margin-right: 180px;
+ text-align: center;
+ }
+ form.pluszora h2 {
+ margin-bottom: 2em;
+ font-size:larger;
+ }
+ form.pluszora ul {
+ text-align: left;
+ }
+
+ ul.pluszora {
+ background-color: rgb(20,40,80);
+ list-style-type: none;
+ margin: 20px;
+ padding: 10px 0px;
+ }
+
+ ul.pluszora li { background-color: rgb(160,160,250); margin: 2px 100px; padding: 2px 20px;}
+ ul.pluszora li span { color: rgb(20,40,80); padding: 0px 5px; margin: 1px 5px;}
+ ul.pluszora li span.oraszam { color: red; padding: 0px 20px;}
+
+ h2 { text-align: center; border: 1px dotted rgb(20,40,80); border-width: 1px 0px; margin: 20px; } \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/haladasi/pluszora.css b/mayor-orig/www/skin/classic/module-naplo/css/haladasi/pluszora.css
new file mode 100644
index 00000000..4aaa1dfe
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/haladasi/pluszora.css
@@ -0,0 +1,30 @@
+
+ form.pluszora {
+// background-color: rgb(200,200,180);
+ text-align: center;
+ margin: 20px;
+ }
+
+ ul.pluszora {
+// background-color: rgb(20,40,80);
+ list-style-type: none;
+ margin: 20px;
+ padding: 10px 0px;
+ }
+
+ ul.pluszora li { background-color: rgb(160,160,250); margin: 1px 100px; padding: 1px 20px;}
+ ul.pluszora li span { color: rgb(20,40,80); padding: 0px 5px; margin: 1px 5px;}
+ ul.pluszora li span.oraszam { color: rgb(128,0,128); padding: 0px 4px;}
+
+ h2 { text-align: center; border: 1px dotted rgb(20,40,80); border-width: 1px 0px; margin: 20px; }
+
+ h1 { margin:20px; }
+ form.pluszLila {margin:20px; padding-left:10px;}
+ form.pluszLila { margin:20px;}
+ form.pluszLila label { display:block; margin-top:2em; margin-bottom:1em; border-bottom: solid 1px #ddd; width:100px; }
+
+ form.pluszLila button.selectorButton { font-size:14px; padding:2px; display:inline-block; cursor: pointer}
+ form.pluszLila button.selectorButton span.icon-plus-sign { color: #009688;}
+ form.pluszLila button.selectorButton span.icon-minus-sign { color: #607D8B}
+
+ form.pluszLila button.selectorButton:active span { text-shadow: 0px 0px 1px cornflowerblue;}
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/haladasi/specialis.css b/mayor-orig/www/skin/classic/module-naplo/css/haladasi/specialis.css
new file mode 100644
index 00000000..68bad63b
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/haladasi/specialis.css
@@ -0,0 +1,36 @@
+
+ form.specialis {
+ background-color: rgb(230,230,230);
+ margin: 40px;
+ text-align: center;
+ padding: 10px;
+ border: 1px solid rgb(20, 40, 80);
+ border-style: solid dotted;
+ }
+
+ form.specialis table {
+ color: white;
+ margin: 10px 20% 10px 20%;
+ width: 60%;
+ background-color: rgb(200,100,180);
+ }
+
+ form.specialis table thead th, form.specialis table tfoot th {
+ background-color: rgb(140,40,120);
+ }
+
+ form.specialis table th {
+ background-color: rgb(160,60,140);
+ }
+
+ form.specialis table td {
+ background-color: rgb(180,80,160);
+ }
+
+ table.napinfo { background: #999999; margin: 0px auto; }
+ table.napinfo th { background: #6688aa; color: white; text-align: center; }
+ table.napinfo td { padding: 5px 15px; width: 300px; }
+ table.napinfo td:nth-child(odd) { background: #aaeecc; }
+ table.napinfo td:nth-child(even) { background: #aaccee; }
+ table.napinfo td h3 { font-size: 12px; }
+ table.napinfo td strong { font-weight: normal; font-style: italic; color: #aa66aa; }
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/haladasi/stat.css b/mayor-orig/www/skin/classic/module-naplo/css/haladasi/stat.css
new file mode 100644
index 00000000..d0cf780a
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/haladasi/stat.css
@@ -0,0 +1,12 @@
+
+ table.stat { background-color: rgb(120,160,140); margin: 0px auto; }
+ table.stat thead tr th { background-color: rgb(60,100,80); padding-left: 8px; padding-right:8px; color: white;
+ border-bottom: solid 1px #00ff00;
+ height:2.5em;
+ }
+ table.stat tbody tr th { text-align: left; background-color: #dddddd; padding:0px 8px; font-weight:normal;}
+ table.stat tbody tr:hover th { color: white; background-color: rgba(255,255,255,0.1);}
+ table.stat tbody tr td { background-color: #eeeeee; text-align: right; padding: 0px 8px}
+ table.stat tbody tr:hover td { background-color: rgba(255,255,255,0.8); }
+
+ table.stat tr td.ertesitendo { background-color: #880000; color: white; }
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/haladasi/teremModositas.css b/mayor-orig/www/skin/classic/module-naplo/css/haladasi/teremModositas.css
new file mode 100644
index 00000000..fb360e8c
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/haladasi/teremModositas.css
@@ -0,0 +1,17 @@
+
+ table.terem {
+ background-color: #eeeeee;
+ }
+ table.terem tr th {
+ background-color: #666666;
+ color: white;
+ padding: 1px 3px;
+ }
+ table.terem tr td {
+ background-color: #cdcddc;
+ }
+ table.terem.oraAdat {
+ width:100%;
+ }
+
+ table.terem select option.nemferbe { color: red; }
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/hianyzas/diak.css b/mayor-orig/www/skin/classic/module-naplo/css/hianyzas/diak.css
new file mode 100644
index 00000000..40024f74
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/hianyzas/diak.css
@@ -0,0 +1,128 @@
+
+ table.naptar { background-color: #eeeeee; border-spacing: 0px; }
+ table.naptar thead { background-color: #770088; font-size: medium; height:3em; color: white; }
+ table.naptar thead a { color: white; text-decoration: none }
+ table.naptar thead a:hover { color: white; text-decoration: underline }
+
+ table.naptar thead tr th { padding: 0.4em 0.1em; border-bottom: solid 1px #aa00bb; }
+
+ table.naptar tfoot th { padding:0.3em; text-align: center; background-color: #440055; color: white }
+ table.naptar tfoot td { text-align: center; background-color: #770088; border-top: solid 1px #aa00bb; }
+ table.naptar tfoot td select { background-color: #770088; color: white; font-size:11px; font-family: Verdana;
+ border: solid 1px none; }
+ table.naptar tfoot td select option { color: white; background: #fff; color: #000;}
+
+
+ table.naptar tbody th.fejlec { background-color: #440055; color: white; font-style:italic; padding: 0.3em; border-bottom: solid 1px #777777; border-right: solid 0px #999999; }
+ table.naptar tbody th.fej2 {
+ background-color: #440055; color: white; font-style:italic; border-bottom: solid 1px #770088; border-right: solid 1px #999999;
+ }
+ table.naptar tbody th.fej2:last-child { border-right: solid 0px #999999; }
+ table.naptar tbody td.egynap {
+ height: 40px; width:100px;
+ background-color: #dddddd;
+ border-width: 0px 0px;
+ border-style: solid;
+ border-color: #999999;
+ }
+ table.naptar tbody td.uresnap { background-color: #dddddd; height: 40px; }
+
+
+
+
+ table.naptar table.tanuloEgyNapja { height:100%; background-color: #667766; width:110px;}
+
+ table.naptar table.tanuloEgyNapja:hover { background-color: #778877; outline-offset: 0px; outline: solid 2px orange;}
+
+
+ table.tanuloEgyNapja th.datum { color: #ffffff; width: 40px; height: 10px; }
+ table.tanuloEgyNapja th.balgomb { width:15px; }
+ table.tanuloEgyNapja th.balgombokhelye { min-width:30px; width:30px; max-width:30px; }
+ table.tanuloEgyNapja th.jobbgomb { min-width:30px; width:30px; text-align: right; background-color: #889988; }
+
+ table.tanuloEgyNapja td { }
+
+ table.tanuloEgyNapja form { margin:0px; }
+ table.tanuloEgyNapja input { border: solid 1px #666660; font-size:8px; width:14px; padding:0px; }
+ table.tanuloEgyNapja input.I { color: green; }
+ table.tanuloEgyNapja input.I:hover { background-color: green; color: white; outline: solid 1px lightgreen; }
+ table.tanuloEgyNapja input.H { color: red; }
+ table.tanuloEgyNapja input.H:hover { background-color: red; color: white; outline: solid 1px #ff5500; }
+
+ table.tanuloEgyNapja table.orak {background-color: #889988; }
+ table.tanuloEgyNapja table.orak a { color: #eeeee0; text-decoration: none }
+ table.tanuloEgyNapja table.orak a:hover { background-color: #667766; }
+
+ div.spec {
+ /* background-color: rgb(245,123,12); */
+ background-color: #556699;
+ color: white; width:100%; height: 100%;
+ font-size: 10px;
+ text-align: center;
+ margin-bottom:0px;
+
+ }
+ table.szunet {
+ /* background-color: rgb(245,123,12); */
+ background-color: #667777;
+ color: white; width:100%; height: 100%;
+ font-size: 10px;
+ }
+
+
+
+
+ .jelen {
+ border-color: rgb(100,200,100);
+ border-width: 0px 1px 3px 1px;
+ border-style: solid;
+ }
+
+ .hianyzas {
+ border-color: rgb(200,100,100);
+ border-width: 0px 1px 3px 1px;
+ border-style: solid;
+ }
+
+ .keses {
+ border-color: rgb(200,200,100);
+ border-width: 0px 1px 3px 1px;
+ border-style: solid;
+ }
+
+ .felszereles_hiany {
+ color: white;
+ background-color:blue;
+ }
+
+ .egyenruha_hiany {
+ color: white;
+ background-color:orange;
+ }
+
+ .felmentes {
+ background-color: #eeeeee;
+ color: purple;
+ }
+
+ table.hianyzasNaptar {
+ background-color: #778890;
+ }
+
+ .igazolt { background-color: #008800; }
+ .igazolatlan { background-color: #880000; }
+
+ table.hianyzasNaptar {background-color: #778877; font-size:10px; width:100%;}
+ table.hianyzasNaptar th {background-color: #889988; font-weight: normal; }
+ table.hianyzasNaptar a { color: #eeeee0; text-decoration: none }
+ table.hianyzasNaptar a:hover { background-color: red; }
+ table.hianyzasNaptar a.igazolatlan:hover { background-color: lightgreen; }
+ table.hianyzasNaptar td.felszerelesHiany { background-color: rgb(100,100,200); }
+ table.hianyzasNaptar td.egyenruhaHiany { background-color: orange; }
+
+ table.naptar tr th span.kepzes {
+ padding: 1px 3px 1px 3px; font-size:10px; background-color: #776690;
+ border-radius: 2px 2px 2px 2px;
+ -moz-border-radius: 2px;
+ -webkit-border-radius: 2px;
+ }
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/hianyzas/diakIgazolatlan.css b/mayor-orig/www/skin/classic/module-naplo/css/hianyzas/diakIgazolatlan.css
new file mode 100644
index 00000000..6c83c5d6
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/hianyzas/diakIgazolatlan.css
@@ -0,0 +1,12 @@
+
+ table.igazolatlan { margin: 3em auto; background-color: rgb(20,40,60); width: 50%; }
+
+ table.igazolatlan tr th { background-color: rgb(120,140,160); color: white; height: 1.5em;}
+ table.igazolatlan tr.fej th { border-bottom: solid 1px white; }
+ table.igazolatlan tr.lab th { background-color: rgb(160,180,140); text-align: right; padding-right: 1em; }
+
+ table.igazolatlan tr td { color: black; background-color: #eeeeee; }
+
+ table.igazolatlan tr:hover:nth-child(even) td { background-color: rgb(220,240,160); }
+ table.igazolatlan tr:hover:nth-child(odd) td { background-color: rgb(200,240,240); }
+ \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/hianyzas/diakLista.css b/mayor-orig/www/skin/classic/module-naplo/css/hianyzas/diakLista.css
new file mode 100644
index 00000000..cceccd64
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/hianyzas/diakLista.css
@@ -0,0 +1,50 @@
+
+ table.hianyzasLista { background-color: #eeeeee; empty-cells:show; }
+ table.hianyzasLista tr th { border-bottom: solid 1px #878787; background-color:#cccccc; }
+ table.hianyzasLista tr td { background-color: #ffffff; }
+
+ table.hianyzasLista form { margin:0px; display: inline;}
+ table.hianyzasLista input { border: solid 1px #666660; font-size:8px; width:14px; }
+
+ table.hianyzasLista caption { background-color: rgb(100,0,100); color: white; padding: 5px; font-size: 12px; font-weight: bold; }
+
+ .jelen {
+ border-color: rgb(100,200,100);
+ border-width: 0px 1px 3px 1px;
+ border-style: solid;
+ }
+
+ .hianyzas {
+ border-color: rgb(200,100,100);
+ border-width: 0px 1px 3px 1px;
+ border-style: solid;
+ }
+
+ .keses {
+ border-color: rgb(200,200,100);
+ border-width: 0px 1px 3px 1px;
+ border-style: solid;
+ }
+
+ .felszereles_hiany {
+ color: white;
+ background-color:blue;
+ }
+
+ .egyenruha_hiany {
+ color: white;
+ background-color: orange;
+ }
+
+ .felmentes {
+ background-color: #eeeeee;
+ color: purple;
+ }
+
+ table.hianyzasNaptar {
+ background-color: #778890;
+ }
+
+ table.hianyzasLista tr td.igazolt { background-color: lightgreen; }
+ table.hianyzasLista tr td.igazolatlan { background-color: #cc0000; }
+
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/hianyzas/info.css b/mayor-orig/www/skin/classic/module-naplo/css/hianyzas/info.css
new file mode 100644
index 00000000..d3ac53f8
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/hianyzas/info.css
@@ -0,0 +1,19 @@
+
+
+ table.info { background-color: #eeeeee; }
+ table.info thead tr th {
+ background-color: purple; color: white;
+ height: 2em;
+ border-bottom: solid 1px #777777;
+ padding-left:1em;
+ padding-right:1em;
+ }
+ table.info tfoot tr th {
+ background-color: #667760; color: white;
+ }
+ table.info tbody tr th { background-color: #aaaabb; padding-left: 2em; padding-right: 2em; }
+ table.info tbody tr td { background-color: white; text-align: center; padding-left: 2em; padding-right: 2em; }
+ table.info tbody tr th.up { background-color: red; }
+ table.info tbody tr th.down { background-color: green; }
+
+ table.info tbody tr.nap0 th,table.info tbody tr.nap0 td { border-top: solid 2px #ffaab0; } \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/hianyzas/nap.css b/mayor-orig/www/skin/classic/module-naplo/css/hianyzas/nap.css
new file mode 100644
index 00000000..a3ed6c1e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/hianyzas/nap.css
@@ -0,0 +1,125 @@
+
+ table.csoportNevsorHianyzok {
+ background-color: #eeeeee;
+ color: white;
+ }
+ table.csoportNevsorHianyzok thead { background-color: #440055; }
+ table.csoportNevsorHianyzok thead a { color: white; text-decoration: none }
+ table.csoportNevsorHianyzok thead a:hover { color: white; text-decoration: underline; }
+
+ table.csoportNevsorHianyzok thead th.neve {
+ background-color: purple;
+ font-size: 12px;
+ height: 2em;
+ }
+ table.csoportNevsorHianyzok thead.oraAdat table.oraAdat td { font-weight: normal; }
+
+ table.csoportNevsorHianyzok tfoot { background-color: #440055; }
+ table.csoportNevsorHianyzok tfoot input { background-color: #eeeeee; font-size:11px; }
+
+ table.csoportNevsorHianyzok tbody {
+ color: black
+ }
+ table.csoportNevsorHianyzok tbody a { color: black; text-decoration: none }
+ table.csoportNevsorHianyzok tbody a:hover { color: black; text-decoration: underline; }
+
+
+
+ table.csoportNevsorHianyzok tbody th {
+ /* background-color: rgb(80,100,120); */
+ }
+
+ table.csoportNevsorHianyzok td { text-align: left; }
+ table.csoportNevsorHianyzok td.késés { text-align: center; }
+
+ table.csoportNevsorHianyzok tbody tr.delutani td,
+ table.csoportNevsorHianyzok tbody tr.tanoran_kivuli td,
+ table.csoportNevsorHianyzok tbody tr.egyeni_foglalkozas td
+ { background-color: #aaaaaa; }
+
+ table.csoportNevsorHianyzok tbody tr:hover { background-color: #ffffff;}
+ table.csoportNevsorHianyzok td a { color: inherit; }
+
+ table.csoportNevsorHianyzok select { border: solid 1px #888888; background-color: #eeeeee; }
+ table.csoportNevsorHianyzok select.igazolatlan { color: red }
+ table.csoportNevsorHianyzok select.igazolt { color: green }
+ table.csoportNevsorHianyzok td.igazolatlan { color: red }
+ table.csoportNevsorHianyzok td.igazolt { color: green }
+ table.csoportNevsorHianyzok th.radio { width: 28px; }
+ table.csoportNevsorHianyzok tr.magantanulo > td.nemkot { background-color: purple; color: white; }
+
+ table.csoportNevsorHianyzok td.nemkot { text-align: center; color: #888888; font-style: italic; }
+
+ table.csoportNevsorHianyzok tr td input.perc {
+ font-size:10px;
+ vertical-align: top;
+ border: solid 1px #aabb99;
+ text-align: right;
+ width:1.5em;
+ }
+
+
+ .jelen {
+ border-color: rgb(100,200,100);
+ border-width: 0px 1px 3px 1px;
+ border-style: solid;
+ }
+
+ .hianyzas, .hiányzás {
+ border-color: rgb(200,100,100);
+ border-width: 0px 1px 3px 1px;
+ border-style: solid;
+ }
+
+ .keses, .késés {
+ border-color: rgb(200,200,100);
+ border-width: 0px 1px 3px 1px;
+ border-style: solid;
+ }
+ span.perc {
+ border-color: rgb(200,200,100);
+ border-width: 1px 1px 1px 1px;
+ border-style: solid;
+ background-color: rgb(230,210,130);
+ color: rgb(100,80,0);
+ }
+
+ .felszereles_hiany {
+ color: white;
+ background-color:blue;
+ }
+
+ .egyenruha_hiany {
+ color: white;
+ background-color: orange;
+ }
+
+ .felmentes {
+ background-color: #eeeeee;
+ color: purple;
+ }
+ .igazolt { background-color: #008800; }
+ .igazolatlan { background-color: #880000; }
+
+ .fbetus {
+ /* border-color: rgb(100,100,200); */
+ border-color: rgb(120,120,220) rgb(190,190,230);
+ border-width: 0px 1px 3px 1px;
+ border-style: solid;
+ background-color: rgb(210,210,255);
+ min-width: 18px;
+
+ }
+
+ .kesett {background-color: orange;}
+
+ table.hianyzasNaptar {
+ background-color: #778890;
+ }
+
+ table.hianyzasNaptar {background-color: #778877; font-size:10px}
+ table.hianyzasNaptar th {background-color: #889988; }
+ table.hianyzasNaptar a { color: #eeeee0; text-decoration: none }
+ table.hianyzasNaptar a:hover { background-color: #667766; }
+ table.hianyzasNaptar td.felszerelesHiany { background-color: rgb(100,100,200); }
+ table.hianyzasNaptar td.egyenruhaHiany { background-color: orange; }
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/hianyzas/oktstat.css b/mayor-orig/www/skin/classic/module-naplo/css/hianyzas/oktstat.css
new file mode 100644
index 00000000..4f2ff500
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/hianyzas/oktstat.css
@@ -0,0 +1,22 @@
+
+
+ table.info { background-color: #eeeeee; }
+ table.info thead tr th {
+ background-color: purple; color: white;
+ height: 2em;
+ border-bottom: solid 1px #777777;
+ padding-left:1em;
+ padding-right:1em;
+ }
+ table.info tfoot tr th {
+ background-color: #667760; color: white;
+ }
+ table.info tbody tr th { background-color: #aaaabb; padding-left: 2em; padding-right: 2em; }
+ table.info tbody tr td { background-color: white; text-align: center; padding-left: 2em; padding-right: 2em; }
+ table.info tbody tr th.up { background-color: red; }
+ table.info tbody tr th.down { background-color: green; }
+
+ table.info tbody tr.nap0 th,table.info tbody tr.nap0 td { border-top: solid 2px #ffaab0; }
+
+
+ div.oktstatszam { border: solid 2px #aaaaaa; display:table-cell; padding:4px; } \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/hianyzas/ora.css b/mayor-orig/www/skin/classic/module-naplo/css/hianyzas/ora.css
new file mode 100644
index 00000000..6eee317a
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/hianyzas/ora.css
@@ -0,0 +1,125 @@
+
+ table.csoportNevsorHianyzok { background-color: #eeeeee; color: white; }
+
+ form.delutani table.csoportNevsorHianyzok { background-color: rgb(150,150,150); }
+
+ form.delutani table.csoportNevsorHianyzok thead { background-color: rgb(200,100,100); }
+ form.delutani table.csoportNevsorHianyzok tfoot { background-color: rgb(200,100,100); }
+
+ table.csoportNevsorHianyzok thead { background-color: #440055; }
+ table.csoportNevsorHianyzok thead a { color: white; text-decoration: none }
+ table.csoportNevsorHianyzok thead a:hover { color: white; text-decoration: underline; }
+
+ table.csoportNevsorHianyzok thead.oraAdat table.oraAdat {
+ width:100%;
+ background-color: #eeeeee;
+ font-size: normal;
+ }
+ table.csoportNevsorHianyzok thead.oraAdat table.oraAdat td { font-weight: normal; }
+
+ table.csoportNevsorHianyzok thead.fejlec tr th { font-weight: normal; height:1.8em; border-bottom: solid 2px rgb(170, 0, 187) }
+
+ table.csoportNevsorHianyzok tfoot { background-color: #440055; }
+ table.csoportNevsorHianyzok tfoot input { background-color: #eeeeee; font-size:11px; }
+
+ table.csoportNevsorHianyzok tbody { color: black ;}
+ table.csoportNevsorHianyzok tbody a { color: black; text-decoration: none }
+ table.csoportNevsorHianyzok tbody a:hover { color: black; text-decoration: underline; }
+
+ table.csoportNevsorHianyzok tbody tr.ujTag th { background-color: lightgreen; }
+ table.csoportNevsorHianyzok tbody tr.ujTag td { background-color: #ffffaa; text-align: center; }
+ table.csoportNevsorHianyzok td { text-align: left; }
+ table.csoportNevsorHianyzok td.késés { text-align: center; }
+ table.csoportNevsorHianyzok tbody tr:hover { background-color: #ffffff;}
+ table.csoportNevsorHianyzok td a { color: inherit; }
+
+ table.csoportNevsorHianyzok select { border: solid 1px #888888; background-color: #eeeeee; }
+ table.csoportNevsorHianyzok select.igazolatlan { color: red }
+ table.csoportNevsorHianyzok select.igazolt { color: green }
+ table.csoportNevsorHianyzok td.igazolatlan { color: red }
+ table.csoportNevsorHianyzok td.igazolt { color: green }
+ table.csoportNevsorHianyzok th.radio { width: 28px; }
+
+ table.csoportNevsorHianyzok td.nemkot { text-align: center; color: #888888; font-style: italic; }
+
+ table.csoportNevsorHianyzok tr td input.perc {
+ font-size:10px;
+ vertical-align: top;
+ border: solid 1px #aabb99;
+ text-align: right;
+ width:1.5em;
+ }
+
+ table.csoportNevsorHianyzok tbody tr.magantanulo > td { background-color: purple; color: white; }
+
+ .jelen {
+ width:12px;
+ border-color: rgb(100,200,100);
+ border-width: 0px 1px 3px 1px;
+ border-style: solid;
+ }
+
+ .hianyzas, .hiányzás {
+/* width:12px;*/
+ border-color: rgb(200,100,100);
+ border-width: 0px 1px 3px 1px;
+ border-style: solid;
+ }
+
+ .keses, .késés {
+/* width:12px;*/
+ border-color: rgb(200,200,100);
+ border-width: 0px 1px 3px 1px;
+ border-style: solid;
+ }
+ span.perc {
+ border-color: rgb(200,200,100);
+ border-width: 1px 1px 1px 1px;
+ border-style: solid;
+ background-color: rgb(230,210,130);
+ color: rgb(100,80,0);
+ }
+
+ .felszereles_hiany {
+ color: white;
+ background-color:blue;
+ }
+
+ .egyenruha_hiany {
+ color: white;
+ background-color: orange;
+ }
+
+ .felmentes {
+ background-color: #eeeeee;
+ color: purple;
+ }
+ .fbetus {
+ /* border-color: rgb(100,100,200); */
+ border-color: rgb(120,120,220) rgb(190,190,230);
+ border-width: 0px 1px 3px 1px;
+ border-style: solid;
+ background-color: rgb(210,210,255);
+ min-width: 18px;
+ }
+
+ .igazolt { background-color: #008800; }
+ .igazolatlan { background-color: #880000; }
+
+
+ .kesett {background-color: orange;}
+
+ table.hianyzasNaptar { background-color: #778877; font-size:10px;}
+ table.hianyzasNaptar th {background-color: #889988; font-weight: normal; text-align:center; }
+ table.hianyzasNaptar a { color: #eeeee0; text-decoration: none }
+ table.hianyzasNaptar a:hover { background-color: #667766; }
+ table.hianyzasNaptar td:nth-child(even) { }
+ table.hianyzasNaptar td.felszerelesHiany { background-color: rgb(100,100,200); }
+ table.hianyzasNaptar td.egyenruhaHiany { background-color: orange; }
+
+ form.vissza { background-color: white; width: 570px; margin: 0px auto; }
+ form.vissza input { border: none; background-color: white; cursor: pointer; }
+
+ table.csoportNevsorHianyzok tbody tr th.c { font-weight: normal }
+ table.csoportNevsorHianyzok tbody tr th.c:hover span { display: none; }
+ table.csoportNevsorHianyzok tbody tr th.c:hover:after { content: "\e0ca"; font-family: "Elusive-Icons";}
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/hianyzas/osztaly.css b/mayor-orig/www/skin/classic/module-naplo/css/hianyzas/osztaly.css
new file mode 100644
index 00000000..b342097b
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/hianyzas/osztaly.css
@@ -0,0 +1,170 @@
+
+ table.hianyzas {
+ background-color: rgb(180,180,200);
+ color: white;
+ max-width:95%;
+ }
+
+ table.hianyzas thead th {
+ background-color: rgb(40,80,120);
+ }
+
+ table.hianyzas thead th.alcim {
+ background-color: rgb(255,255,255);
+ color: rgb(40,80,120);
+ font-style: italic;
+ padding: 0px 4px 0px 4px;
+ }
+
+ table.hianyzas thead th.alcim img { hight: 16px; }
+
+ table.hianyzas tfoot th { background-color: rgb(80,20,80); }
+ table.hianyzas tfoot td { background-color: rgb(95,75,95); text-align: center; }
+
+ table.hianyzas tbody td { text-align: center; }
+ table.hianyzas tbody td.nev {
+ background-color: rgb(90,90,110);
+ font-style: italic;
+ padding: 4px 10px 4px 10px;
+ text-align:left;
+ }
+
+ table.hianyzas tbody tr.jogviszonyalezarva td.nev {
+ background-color: rgb(40,40,90);
+ }
+
+ table.hianyzas tbody tr.magantanulo td.nev {
+ background-color: rgb(140,40,90);
+ }
+
+ table.hianyzas tbody td.nev a {
+ color: white;
+ text-decoration: none;
+ }
+
+ table.hianyzas tbody td.nev a:hover {
+ color: white;
+ /* background-color: rgb(180,180,220); */
+ text-decoration: underline;
+ }
+
+ table.hianyzas tbody td.ulezart {
+ width: 18px;
+ background-color: rgb(200,200,220);
+ }
+
+ table.hianyzas tbody td.lezart {
+ width: 18px;
+ background-color: rgb(100,100,120);
+ text-align: center;
+ }
+
+ table.hianyzas tbody td.uigazolhato {
+ width: 18px;
+ background-color: rgb(240,240,260);
+ }
+
+ table.hianyzas tbody td.igazolhato {
+ width: 18px;
+ background-color: rgb(140,140,160);
+ text-align: center;
+ }
+
+ table.hianyzas tbody td.uosszes {
+ width: 18px;
+ background-color: rgb(220,240,230);
+ }
+
+ table.hianyzas tbody td.osszes {
+ width: 18px;
+ background-color: rgb(120,140,130);
+ text-align: center;
+ }
+
+ table.hianyzas tbody td.ufegyelmi {
+ width: 18px;
+ background-color: rgb(220,230,240);
+ }
+
+ table.hianyzas tbody td.fegyelmi {
+ width: 18px;
+ background-color: rgb(130,150,150);
+ text-align: center;
+ }
+
+ table.hianyzas tbody td.ufokozat {
+ width: 18px;
+ background-color: rgb(220,210,200);
+ }
+
+ table.hianyzas tbody td.fokozat { background-color: rgb(120,110,100); }
+ table.hianyzas tbody td.fokozat form { display: inline; }
+ table.hianyzas tbody td.fokozat form input,select { font-size:11px; }
+ table.hianyzas tbody td.fokozat form select option.megerdemelt { background-color: rgb(100,100,100); color: rgb(220,255,220); }
+ table.hianyzas tbody td.fokozat form select option.tiltott { background-color: rgb(100,100,100); color: rgb(250,100,100); font-family: italic }
+
+ table.hianyzas tbody td.oi { text-align: center; }
+
+ /* table.hianyzas tbody */
+ td.hianyzas {
+ border-color: rgb(200,100,100);
+ border-width: 0px 1px 3px 1px;
+ border-style: solid;
+ }
+
+ /* table.hianyzas tbody */
+ td.keses {
+ border-color: rgb(200,200,100);
+ border-width: 0px 1px 3px 1px;
+ border-style: solid;
+ }
+
+ /* table.hianyzas tbody */
+ td.felszereles {
+ border-color: rgb(100,100,200);;
+ border-width: 0px 1px 3px 1px;
+ border-style: solid;
+ }
+ td.egyenruha {
+ border-color: orange;
+ border-width: 0px 1px 3px 1px;
+ border-style: solid;
+ }
+
+ /* table.hianyzas tbody */
+ td.felmentes {
+ border-color: rgb(100,200,100);;
+ border-width: 0px 1px 3px 1px;
+ border-style: solid;
+ }
+
+ /* table.hianyzas tbody */
+ td.igazolt { color: rgb(55,255,55); }
+ /* table.hianyzas tbody */
+ td.igazolatlan { color: rgb(255,55,55); }
+ /* table.hianyzas tbody */
+ td.mind { color: white; }
+
+ /* navi */
+
+ table.navi {
+ width:95%;
+ background-color: #666699;
+ color: #eeeee0;
+ }
+ table.navi th, table.navi td {
+ text-align: center;
+ border-style: solid none solid none;
+ border-width: 1px 0px 2px 0px;
+ border-color: #aabbc0;
+ }
+ table.navi input {
+ background-color: #778890;
+ border: solid 1px #aabbc0;
+ width:30px;
+ }
+ table.navi input.aktiv {
+ color: #aabbc0;
+ background-color: rgb(90,50,90);
+ }
+ table.navi select { border: 1px solid #eeeee0; background-color: #aabbc0; }
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/hianyzas/osztalyNap.css b/mayor-orig/www/skin/classic/module-naplo/css/hianyzas/osztalyNap.css
new file mode 100644
index 00000000..6664faa5
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/hianyzas/osztalyNap.css
@@ -0,0 +1,43 @@
+
+ table.hianyzas { margin: auto; border-spacing: 1px; background-color:#aaaaaa; }
+ table.hianyzas thead th { background-color: #440055; padding: 4px 8px; color: white;
+ }
+ table.hianyzas tbody th { background-color: rgb(150,140,150); padding: 4px 2px; color: white; }
+ table.hianyzas tbody th.tk { background-color: #ffffff; color: black; font-weight:normal;font-style: italic; padding-left:10px; padding-right:10px; }
+
+ table.hianyzas tfoot th { background-color: #440055; padding: 1px; color: white; border-bottom: solid 1px white; text-align: right; font-size:xx-small; }
+ table.hianyzas tbody td { background-color: #ffffff; padding: 4px 8px; }
+
+
+ table.hianyzas tbody tr td.d { width:5px; padding:0px;
+ border-width: 0px 4px 0px 4px;
+ border-style: solid;
+ text-align: center;
+ color: white;
+ font-weight: bold;
+ }
+
+ table.hianyzas tbody tr td.d.igazolatlan {
+ background-color: #cc0000;
+ }
+ table.hianyzas tbody tr td.d.igazolt {
+ background-color: #00cc00;
+ }
+ table.hianyzas tbody tr td.d.hianyzas {
+ border-color: rgb(200,100,100);
+ }
+ table.hianyzas tbody tr td.d.keses {
+ border-color: rgb(200,200,100);
+ }
+ table.hianyzas tbody tr td.d.felszereles {
+ border-color: rgb(100,100,200);
+ }
+ table.hianyzas tbody tr td.d.egyenruha {
+ border-color: orange;
+ }
+
+ table.hianyzas tbody th a { color: white; text-decoration: none; }
+ table.hianyzas tbody th.tk a { color: black; text-decoration: none; }
+ table.hianyzas tbody td a { color: black; text-decoration: none; }
+ table.hianyzas tbody th a:hover,
+ table.hianyzas tbody td a:hover { text-decoration: underline; }
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/hibabejelento/admin.css b/mayor-orig/www/skin/classic/module-naplo/css/hibabejelento/admin.css
new file mode 100644
index 00000000..89eefd3d
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/hibabejelento/admin.css
@@ -0,0 +1,89 @@
+
+ ol.kerelem { list-style-type: none; margin: 0px; padding:10px;}
+ ol.kerelem li { background-color: #ddd; margin: 10px 0px 10px 0px; padding: 10px; text-align: left; }
+ ol.kerelem li div.szoveg { background-color:; padding: 10px; margin: 0px auto; color: white; font-size: 14px;}
+ ol.kerelem li div.valasz { background-color: rgb(220,200,180); width: 80%; padding: 10px; margin: 5px auto 10px auto; font-style: italic; }
+
+ ol.kerelem fieldset { background-color: #3F51B5;#3c3c64;#2196f3; border-style:hidden; }
+ ol.kerelem legend { border: 1px solid white; padding: 6px; font-weight: normal; color: white;background-color: #aaa; ; }
+ ol.kerelem li textarea { width: 90%; margin: 10px auto; border: solid 1px #888888; font-size:14px; height:5em; padding:0.8em; }
+
+ ol.kerelem span.dt { padding: 5px 10px; margin: 5px 20px; border: 1px solid white; font-weight: bold; color: white; background-color: rgb(60,100,60); }
+ ol.kerelem input { padding: 5px 10px; margin: 5px 20px; border: 1px solid white; font-weight: bold; color: white; background-color: rgb(100,100,60); }
+
+ span.mg { background-color: orange; color: white; padding:7px 20px; margin:20px; border: solid 1px white; }
+ span.mg2 { background-color: rgb(200,100,100); color: white; padding:7px 20px; margin:20px; border: solid 1px white; }
+ ol.kerelem select.mg { background-color: orange; color: white; font-weight: bold; border: solid 1px orange; }
+ ol.kerelem select.telephely { background-color: rgb(200,100,100); color: white; font-weight: bold; border: solid 1px rgb(200,100,100); }
+
+ ol.kerelem input.mg { background-color: rgb(100,100,100); }
+
+ ol.kerelem li.jovahagyott,
+ ol.kerelem input.jh { background-color: rgb(100,160,100); }
+ ol.kerelem input.njh { background-color: rgb(200,100,60); }
+ ol.kerelem input.done { background-color: rgb(100,100,160); }
+
+ ol.kerelem li.jovahagyott { border: solid 1px green; }
+
+ table.kerelemValasz { width:99%; background-color: #efefef; margin:auto;}
+ table.kerelemValasz tr th { width:80px; font-weight:normal; text-align:right; vertical-align:top; padding:2px 4px;}
+ table.kerelemValasz tr td.userAccount { border-left: solid 2px white;}
+ table.kerelemValasz tr.c0 td.userAccount { border-color: #ffeb3b;}
+ table.kerelemValasz tr.c1 td.userAccount { border-color: #ffc107;}
+ table.kerelemValasz tr.c2 td.userAccount { border-color: #ff9800;}
+ table.kerelemValasz tr.c3 td.userAccount { border-color: #ff5722;}
+ table.kerelemValasz tr.c4 td.userAccount { border-color: #03a9f4;}
+
+ table.kerelemValasz tr td { background-color: white; padding:2px 4px; vertical-align:top;}
+ table.kerelemValasz tr td.userAccount { width:80px;}
+
+ table.kerelemValasz span.diakNev { height:10px; width:10px; font-size:10px; color:white; background-color: #6495ed; border-radius:50%; padding:2px; border: solid 2px #eee;}
+ table.kerelemValasz span.diakNev:hover { border: solid 2px #15477b;}
+
+ table.kerelemValasz span.tanarNev { height:10px; width:10px; font-size:10px; color:white; background-color: #db0601; border-radius:50%; padding:2px; border: solid 2px #eee;}
+ table.kerelemValasz span.tanarNev:hover { border: solid 2px #e91e63;}
+
+ form.hiba {
+ background-color: cornflowerblue;
+ margin:10px;
+ padding-left: 0px;
+ padding-top: 0em;
+ padding-bottom: 0.5em;
+ color: white;
+ margin-bottom: 2em;
+ text-align: center;
+ border-bottom: solid 1px rgb(20,40,60);
+ }
+
+ form.hiba h1 { font-size: 14pt; border-bottom: solid 1px #eee; background-color: rgb(20,40,60); margin: 4px 0px; padding: 3px}
+/*
+ form.hiba textarea { font-size: 14px; background-color: rgb(250,250,250); width: 99%; height: 100px; border: solid 1px black; padding:2px;}
+*/
+form.hiba textarea {
+ font-size:14px;
+ margin-top: 10px;
+ margin-left: 0px;
+ width: 90%;
+ height: 100px;
+ -moz-border-bottom-colors: none;
+ -moz-border-left-colors: none;
+ -moz-border-right-colors: none;
+ -moz-border-top-colors: none;
+ background: none repeat scroll 0 0 rgba(255, 255, 255, 0.9);
+ border-color: -moz-use-text-color #FFFFFF #FFFFFF -moz-use-text-color;
+ border-image: none;
+ border-radius: 0px;
+ border-style: none solid solid none;
+ border-width: medium 1px 1px medium;
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12) inset;
+ color: #555555;
+ line-height: 1.4em;
+ padding: 5px 8px;
+ transition: background-color 0.1s ease 0s;
+}
+
+textarea:focus {
+ background-color: #fff !important;
+ background: none repeat scroll 0 0 #FFFFFF;
+ outline-width: 0;
+}
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/hibabejelento/hibabejelento.css b/mayor-orig/www/skin/classic/module-naplo/css/hibabejelento/hibabejelento.css
new file mode 100644
index 00000000..c767a75d
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/hibabejelento/hibabejelento.css
@@ -0,0 +1,26 @@
+
+ form.hiba {
+ background-color: rgb(20,120,140);
+ margin-left: 10%;
+ margin-right: 10%;
+ padding-left: 0px;
+ padding-top: 0em;
+ padding-bottom: 0.5em;
+ color: white;
+ margin-bottom: 2em;
+ text-align: center;
+ border-bottom: solid 2px rgb(20,40,60);
+ }
+
+ form.hiba h1 { font-size: 14pt; border-bottom: solid 2px rgb(100,200,160); border-width: 2px 0px; background-color: rgb(20,40,60); margin: 4px 0px; padding: 3px}
+ form.hiba textarea { font-size: 14px; background-color: rgb(250,250,250); width: 99%; height: 100px; border: solid 1px black; padding:2px;}
+
+ form.hiba input,
+ form.hiba select {
+ margin:2px 10px;
+ background-color: cyan;
+ border: solid 1px rgb(120,220,240);
+ padding:0px 10px;
+ }
+
+
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/hirnok/cronFutar.css b/mayor-orig/www/skin/classic/module-naplo/css/hirnok/cronFutar.css
new file mode 100644
index 00000000..9ddb9010
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/hirnok/cronFutar.css
@@ -0,0 +1,9 @@
+
+ div.emailFejlec {
+ text-align: center; border-bottom: solid 1px cornflowerblue ;
+ font-size:18px; line-height:30px; margin-bottom:20px; padding:4px;
+ margin-right:auto; margin-left: auto;
+ width:200px;
+ /* background: linear-gradient(90deg, #336, #0aa); */
+ color: cornflowerblue;
+ }
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/hirnok/hirnok.css b/mayor-orig/www/skin/classic/module-naplo/css/hirnok/hirnok.css
new file mode 100644
index 00000000..20b9861f
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/hirnok/hirnok.css
@@ -0,0 +1,108 @@
+
+ /* flex container */
+ div.hirnokDoboz {
+ width:90%;
+ max-width: 800px;
+ background-color: #f8f8f8;
+ padding:2px;
+ border: solid 1px #ddd;
+ border-radius: 2px;
+ margin-left: auto; margin-right:auto;
+ margin-bottom:1em;
+ display:flex;
+ align-items: center;
+ }
+ /* special */
+ div.hirnokDoboz.uzeno {
+ align-items: flex-start;
+ }
+
+ /* flex item */
+ div.hirnokBadgeHolder {
+ /*height: 30px;*/
+ padding: 2px;
+ margin: 4px;
+ }
+ div.hirnokBadgeHolder span {
+ height:30px;
+ width:30px;
+ font-size:30px;
+ padding:4px;
+ margin:0px;
+ color: white;
+ background-color: cornflowerblue;
+ border-radius: 2px;
+ }
+ div.hirnokBadgeHolder a:hover span { background-color: rgba(255,0,100,0.5); }
+ div.hirnokBadgeHolder.jegy span { background-color: lightgreen; }
+ div.hirnokBadgeHolder.haladasiBeiratlan span { background-color: orange; }
+ div.hirnokBadgeHolder.zaroJegy span { background-color: gold; }
+ div.hirnokBadgeHolder.uzeno span { background-color: #3f51b5; }
+ div.hirnokBadgeHolder.bejegyzes span { background-color: #9c27b0; }
+ div.hirnokBadgeHolder.bejegyzes.bejegyzes_dicseret { background-color: red; }
+ div.hirnokBadgeHolder.haladasiOra span { background-color: #9c27b0; }
+
+ div.hirnokDoboz.uzeno div.hirnokBadgeHolder, div.hirnokDoboz.uzeno div.hirnokDt {
+ padding-top:8px;
+ }
+
+ div.hirnokDt {
+ font-size:smaller;
+ padding-right: 2px;
+ }
+ div.hirnokDt a { color: black; }
+ div.hirnokDt a:hover { text-decoration: underline; }
+ div.hirnokDt span { color: #aaa; }
+ div.hirnokDt span a { color: #aaa; }
+ div.hirnokDt span a:hover { text-decoration: underline; }
+ div.hirnokText {
+ padding-left:6px;
+ padding-right:6px;
+ padding-top: 6px;
+ padding-bottom:6px;
+ border-left: solid 1px #aaa;
+ margin-left:2px;
+ margin:auto;
+ flex: 0 1 90%;
+ }
+
+ div.hirnokRight {
+ /*border-left: solid 1px #aaa;*/
+ }
+
+ div.hirnokFooter {flex-break: after; width:500px; background-color:#ddd; border-top:solid 1px black;}
+
+
+ div.hirnokSeparator {
+ color: #888;
+ max-width:150px;
+ margin:auto;
+ text-align:center;
+ padding:10px;
+/* border-bottom: solid 1px #eee; */
+ }
+ div.hirnokSeparator {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ justify-content: center;
+ }
+ div.hirnokSeparator:before, div.hirnokSeparator:after{
+ content: "";
+ flex: 1 1;
+ border-bottom: 1px solid #ddd;
+ margin: auto;
+ }
+ div.hirnokSeparator a { color:inherit; display:block;}
+ div.hirnokSeparator:hover { background-color: cornflowerblue; color:white; }
+
+
+/* teszt */
+ div.hirnokDoboz div.hirnokIkonKontener{ display:inline-flex; padding-left:1em; opacity: 0.2; visibility: hidden}
+ div.hirnokDoboz div.hirnokIkonKontener span { padding-left:4px; padding-right:4px;}
+ div.hirnokDoboz:hover div.hirnokIkonKontener{ display:inline-flex; padding-left:1em; opacity: 1;
+ transition: visibility 0s, opacity 0.5s linear;
+visibility: visible;
+}
+ div.hirnokText a { color: #aaa; }
+ div.hirnokText a:hover { color:#111; cursor: hand }
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/diak.css b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/diak.css
new file mode 100644
index 00000000..4aa979a5
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/diak.css
@@ -0,0 +1,148 @@
+
+ div.diakStatusz {
+ position:absolute;
+ right:28px;
+ background-color: #dddddd; border: solid 1px black; padding:10px;
+ font-size:13px;
+ border-radius:2px;
+ }
+
+ form.diak #felfuggesztesOk { width: 500px; margin-top: 10px; }
+ form.diak #lezarasIgazolatlan { width: 50px; }
+ form.diak #lezaras { margin-top: 10px; }
+ form.diak label { font-weight: bold; }
+
+ form.diak table tr th label { font-weight: normal; }
+
+ div form.diak fieldset { background-color: #efefef; box-shadow: 1px 1px 1px #cccccc; padding-top:1.5em;}
+ fieldset.bizonyitvanyTorzslap { background-color: #DD1458 !important; box-shadow: 1px 1px 1px #cccccc; padding-top:1.5em; color: white;}
+
+ form.diak { margin: 5px 30px 50px 20px; font-size:13px; }
+ form.diak h1 { border: solid rgb(40,60,80); border-width: 0px 0px 1px 0px; background-color: rgb(80,100,120); text-align: center; color: white; margin:0px 0px; font-size:13px; padding:2px;}
+
+ form.diak input, form.diak select {
+ font-size:13px;
+ border: solid 1px #777777;
+ margin-left: 3px;
+ padding-left: 2px;
+ }
+
+ form.diak input.diakSubmit { float:right; padding:2px 30px; width:100px; }
+
+/* lásd alul */
+ form.diak:hover input.diakSubmit { border: solid 1px lightgreen; }
+ form.diak:hover input.diakSubmit:hover { background-color: lightgreen; }
+
+ form.diak input.kiemelt { background-color: rgb(255,255,100); border-width: 1px 1px 0px 1px; }
+ form.diak label { font-size:13px; }
+ form.diak label.kotelezo { color:rgb(100,20,20); }
+
+ form.diak input:read-only { background-color: #aaa; }
+ form.diak input:focus, form.diak select:focus { background-color: orange; }
+
+/* form.diak input[type="checkbox"] { -moz-appearance: none; }*/
+ from.diak input.ajaxRequest { color: black; background-color: red; }
+ form.diak input.ajaxRequestDone { color: white; background-color: rgb(0,130,0); }
+ form.diak select.ajaxRequestDone { color: white; background-color: rgb(0,130,0); }
+ form.diak input.ajaxRequestError { color: white; background-color: rgb(130,0,0); }
+ form.diak select.ajaxRequestError { color: white; background-color: rgb(130,0,0); }
+
+ form.diak input:hover { outline: solid 1px lightblue; }
+
+ form.diak fieldset { border: solid 1px rgb(140,160,180); }
+ form.diak fieldset th { text-align: right; }
+ form.diak fieldset legend {
+ background-color: rgb(100,120,140);
+ color: white;
+ font-size:90%;
+ text-align: left;
+ margin-left:20px;
+ padding-left: 10px;
+ padding-right: 10px;
+ border: solid 1px rgb(40,60,80);
+ }
+ form.diak fieldset:hover legend { box-shadow: 0px 0px 1px rgb(21, 174, 236); }
+ form.diak fieldset fieldset:hover legend { box-shadow: 0px 0px 1px orange; }
+
+ form.diak #megjegyzes { width: 90%; }
+ div.magantanulo form.diak fieldset { background-color: rgb(180,180,100); }
+ div.magantanulo form.diak fieldset legend { background-color: rgb(80,80,10); }
+ div.vendegtanulo form.diak fieldset { background-color: rgb(180,180,180); }
+ div.vendegtanulo form.diak fieldset legend { background-color: rgb(80,80,10); }
+
+ div.jogviszonyLezarva form.diak fieldset { background-color: rgb(210,140,130); }
+ div.jogviszonyLezarva form.diak fieldset legend { background-color: rgb(110,40,30); }
+ div.jogviszonyFelfuggesztve form.diak fieldset { background-color: rgb(130,140,210); }
+ div.jogviszonyFelfuggesztve form.diak fieldset legend { background-color: rgb(30,40,110); }
+ div.felveteltNyert form.diak fieldset { background-color: lightgreen }
+ div.felveteltNyert form.diak fieldset legend { background-color: rgb(40,110,30); }
+/*
+ div.magantanulo form.diak fieldset { background-color: rgb(180,180,100); }
+ div.jogviszonyLezarva form.diak fieldset { background-color: rgb(210,140,130); }
+ div.jogviszonyFelfuggesztve form.diak fieldset { background-color: rgb(130,140,210); }
+ div.felveteltNyert form.diak fieldset { background-color: rgb(140,210,130); }
+*/
+ form.diak input.kiemelt {
+ background-color: rgb(220,220,255);
+ border-width: 1px 1px 1px 1px; border-color: #777777 #777777 rgb(220,220,255) #777777;
+ margin-bottom: 0px; padding-top: 2px;
+ }
+
+ form.diak table.fiu { border-left: solid 4px cornflowerblue;}
+ form.diak table.lany { border-left: solid 4px deeppink;}
+
+ form.diak fieldset table.reszletek { width: 100%; background-color: rgb(220,220,255); }
+ form.diak fieldset table.reszletek th { text-align: right; font-weight: normal; }
+ form.diak fieldset table.reszletek h1 {
+ text-align: center; background-color: rgb(100,100,120); font-size: 13px;
+ border-color: rgb(200,200,200); color: white;
+ }
+ form.diak table.reszletek legend { background-color: rgb(100,100,120); font-weight: bold; color: white; }
+ form.diak td.top { vertical-align: top; }
+ form.diak fieldset fieldset legend { background-color: white; color: black; }
+
+ form.diak ul li { font-size:13px; list-style-type: square; }
+ form.diak ul li.volt { background: #aaaaaa; list-style-type: circle; }
+
+ form.updateTable { color: white; width: 80%; background-color: rgb(180,180,200); margin: 20px auto; }
+ form.updateTable h1 { text-align: center; border: 1px dotted white; border-width: 1px 0px; background-color: rgb(60,60,80); }
+ form.updateTable label { color: white; padding: 8px; }
+ form.updateTable table { margin: 20px auto; background-color: rgb(140,140,180); color: red; }
+ form.updateTable table td { background-color: rgb(255,255,255); }
+ form.updateTable table th { background-color: rgb(120,120,160); }
+
+ form.megnyitas input { border: 2px solid red; background-color: rgb(120,50,10); color: white; font-size: 13px; font-weight: bold; padding: 4px; }
+ form.statusz { border: 1px solid rgb(40,60,80); padding: 2px; text-align: center; }
+
+ form.diak span.naploSorszam { background-color: rgb(120,120,160); color: white; padding:0px 10px; font-size:normal; }
+
+ #createAccount { background-color: green; color: white; float: left; margin-left: 200px; }
+ #deleteAccount { background-color: red; color: white; float: right; margin-right: 200px; }
+
+
+form.diak input.diakSubmit
+{
+ border:1px solid #15aeec; -webkit-border-radius: 3px; -moz-border-radius: 3px;border-radius: 3px;
+ text-decoration:none; display:inline-block;
+ text-shadow: -1px -1px 0 rgba(0,0,0,0.3);
+ font-weight:bold; color: #FFFFFF;
+ background-color: #49c0f0; background-image: -webkit-gradient(linear, left top, left bottom, from(#49c0f0), to(#2CAFE3));
+ background-image: -webkit-linear-gradient(top, #49c0f0, #2CAFE3);
+ background-image: -moz-linear-gradient(top, #49c0f0, #2CAFE3);
+ background-image: -ms-linear-gradient(top, #49c0f0, #2CAFE3);
+ background-image: -o-linear-gradient(top, #49c0f0, #2CAFE3);
+ background-image: linear-gradient(to bottom, #49c0f0, #2CAFE3);filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=#49c0f0, endColorstr=#2CAFE3);
+}
+
+
+button:hover, .toolBarTool table.flipper input:hover,form.diak input.diakSubmit:hover
+, table.toolBar tr td.szemely:hover
+ {
+ border:1px solid #1090c3;
+ background-color: #1ab0ec; background-image: -webkit-gradient(linear, left top, left bottom, from(#1ab0ec), to(#1a92c2));
+ background-image: -webkit-linear-gradient(top, #1ab0ec, #1a92c2);
+ background-image: -moz-linear-gradient(top, #1ab0ec, #1a92c2);
+ background-image: -ms-linear-gradient(top, #1ab0ec, #1a92c2);
+ background-image: -o-linear-gradient(top, #1ab0ec, #1a92c2);
+ background-image: linear-gradient(to bottom, #1ab0ec, #1a92c2);filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=#1ab0ec, endColorstr=#1a92c2);
+}
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/diakExport.css b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/diakExport.css
new file mode 100644
index 00000000..b07bf0db
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/diakExport.css
@@ -0,0 +1,46 @@
+
+ form.diak { background-color: white; }
+
+ form.diak { margin: 5px 30px 20px 20px; font-size:10px; }
+ form.diak h1 { border: dotted white; border-width: 1px 0px; background-color: rgb(80,100,120); font-size: 20px; text-align: center; }
+ form.diak input, form.diak select {
+ font-size:10px; border: solid 1px #777777; margin-left: 3px;
+ padding-left: 2px;
+ }
+ form.diak input.kiemelt { background-color: rgb(255,255,100); border-width: 1px 1px 0px 1px; }
+ form.diak label { font-size:11px; }
+ form.diak label.kotelezo { color:rgb(100,20,20); }
+ form.diak input:focus { background-color: orange; }
+
+ form.diak fieldset { border: solid 1px rgb(40,60,80); }
+ form.diak fieldset th { text-align: right; }
+ form.diak fieldset legend {
+ background-color: rgb(140,160,180);
+ color: white;
+ font-size:90%;
+ text-align: left;
+ margin-left:20px;
+ padding-left: 10px;
+ padding-right: 10px;
+ border: solid 1px rgb(40,60,80);
+ }
+ form.diak input.kiemelt {
+ background-color: rgb(220,220,255);
+ border-width: 1px 1px 1px 1px; border-color: #777777 #777777 rgb(220,220,255) #777777;
+ margin-bottom: 0px; padding-top: 2px;
+ }
+ form.diak fieldset table.reszletek { width: 100%; background-color: rgb(220,220,255); }
+ form.diak fieldset table.reszletek th { text-align: right; }
+ form.diak fieldset table.reszletek h1 {
+ text-align: center; background-color: rgb(100,100,120); font-size: 12pt;
+ border-color: rgb(200,200,200); color: white;
+ }
+ form.diak table.reszletek legend { background-color: rgb(100,100,120); font-weight: bold; color: white; }
+
+ form.updateTable { color: white; width: 80%; background-color: rgb(180,180,200); margin: 20px auto; }
+ form.updateTable h1 { text-align: center; border: 1px dotted white; border-width: 1px 0px; background-color: rgb(60,60,80); }
+ form.updateTable label { color: white; padding: 8px; }
+ form.updateTable table { margin: 20px auto; background-color: rgb(140,140,180); color: red; }
+ form.updateTable table td { background-color: rgb(255,255,255); }
+ form.updateTable table th { background-color: rgb(120,120,160); }
+
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/diakFelmentes.css b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/diakFelmentes.css
new file mode 100644
index 00000000..e7630da3
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/diakFelmentes.css
@@ -0,0 +1,33 @@
+div.FM {
+ margin:10px auto;
+ width: 90%;
+ padding-bottom:2em;
+ border-bottom: solid 1px rgb(100,120,140);
+}
+
+div.FM h2 {
+ background-color: rgb(200,240,200);
+ border-bottom: solid 1px white;
+}
+
+div.FM div { padding: 1em; }
+div.FM label { padding:0px 10px 0px 20px; font-weight: bold; font-size:13px; line-height:2em;}
+
+div.FM.FM1 {background-color:rgb(200,210,220);}
+div.FM.FM2 {background-color:rgb(200,210,220);}
+div.FM.FM3 {background-color:rgb(200,210,220);}
+div.FM.FMZAR, div.FM.FMTAN {background-color:rgb(210,250,210); }
+
+div.FM div.submit { text-align: center; }
+
+div.FM div.rejtett { }
+
+div.FM table {
+ width:100%; border: solid 1px #787878;
+ background-color: lightgreen;
+}
+div.FM table th { background-color: #56765f; color: white; border-bottom: solid 1px white;}
+div.FM table td { }
+
+div.FM input[readonly] { background-color: #dddddd; }
+div.FM input { background-color: #ffffff; border: solid 1px #787878;} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/diakStatusz.css b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/diakStatusz.css
new file mode 100644
index 00000000..c824ece3
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/diakStatusz.css
@@ -0,0 +1,14 @@
+
+ div.dj { margin: 2px 10px; background-color: rgb(200,220,240); padding: 20px; }
+ div.dj form { background-color: rgb(240,245,250); padding: 10px; }
+ div.dj ul { list-style-type: none; margin: 0px; padding: 5px 0px; background-color: rgb(20,40,60); }
+ div.dj ul li { margin: 5px; padding: 2px 0px; background-color: rgb(140,160,180); }
+ div.dj ul li form { margin: 4px; }
+ div.dj ul li span.dt { font-weight: bold; color: red; }
+ div.dj ul li form.statusz p { padding: 3px; margin: 0px; }
+ div.dj ul li form.zaradek p { font-style: italic; }
+ div.dj ul li form.zaradek p span { color: red; }
+ div.dj ul li h2 { font-size: 12px; border: solid rgb(140,160,180); border-width: 1px 0px; padding: 3px; }
+ div.dj ul li form input[type=submit] { font-size: 12px; margin: 3px 20px; float:right;}
+ div.dj ul li form select { font-size: 12px; padding: 5px; }
+ div.dj ul li table th { text-align: right; } \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/diakSzulo.css b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/diakSzulo.css
new file mode 100644
index 00000000..bd007b93
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/diakSzulo.css
@@ -0,0 +1,49 @@
+
+# form.diak { background-color: rgb(40,60,80); color: white; margin: 5px 20px; padding: 4px 10px; }
+
+ form.diak { margin: 5px 30px 20px 20px; font-size:10px; }
+ form.diak h1 { border: dotted white; border-width: 1px 0px; background-color: rgb(80,100,120); font-size: 20px; text-align: center; }
+ form.diak input, form.diak select {
+ font-size:10px; border: solid 1px #777777; margin-left: 3px;
+ padding-left: 2px;
+ margin: 2px;
+ }
+ form.diak label { font-size:11px; padding: 10px;}
+ form.diak input:focus, form.diak select:focus { background-color: orange; }
+ form.diak input[type="checkbox"] { /* -moz-appearance: none; */ }
+ from.diak input.ajaxRequest { color: black; background-color: red; }
+ form.diak input.ajaxRequestDone { color: white; background-color: rgb(0,130,0); }
+ form.diak select.ajaxRequestDone { color: white; background-color: rgb(0,130,0); }
+
+ form.diak fieldset { border: solid 1px rgb(40,60,80); }
+ form.diak fieldset legend {
+ background-color: rgb(140,160,180);
+ color: white;
+ font-size:90%;
+ text-align: left;
+ margin-left:20px;
+ padding-left: 10px;
+ padding-right: 10px;
+ border: solid 1px rgb(40,60,80);
+ }
+ form.diak input.kiemelt {
+ background-color: rgb(220,220,255);
+ border-width: 1px 1px 1px 1px; border-color: #777777 #777777 rgb(220,220,255) #777777;
+ margin-bottom: 0px; padding-top: 2px;
+ }
+ form.diak fieldset table.reszletek { width: 100%; background-color: rgb(220,220,255); }
+ form.diak fieldset table.reszletek th { text-align: right; }
+ form.diak fieldset table.reszletek h1 {
+ text-align: center; background-color: rgb(100,100,120); font-size: 12pt;
+ border-color: rgb(200,200,200); color: white;
+ }
+ form.diak table.reszletek legend { background-color: rgb(100,100,120); font-weight: bold; color: white; }
+
+ form.updateTable { color: white; width: 80%; background-color: rgb(180,180,200); margin: 20px auto; }
+ form.updateTable h1 { text-align: center; border: 1px dotted white; border-width: 1px 0px; background-color: rgb(60,60,80); }
+ form.updateTable label { color: white; padding: 8px; }
+ form.updateTable table { margin: 20px auto; background-color: rgb(140,140,180); color: red; }
+ form.updateTable table td { background-color: rgb(255,255,255); }
+ form.updateTable table th { background-color: rgb(120,120,160); }
+
+
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/diakTankor.css b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/diakTankor.css
new file mode 100644
index 00000000..49310124
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/diakTankor.css
@@ -0,0 +1,70 @@
+
+table.tankor {
+ background-color: rgb(100,100,150);
+ padding-left: 0px;
+ padding-top: 0em;
+ padding-bottom: 1em;
+ color: white;
+ margin-bottom: 0px;
+}
+
+table.tankor tr th {
+ background-color: rgb(50, 50, 110);
+ border-bottom: solid 1px white;
+}
+table.tankor tr.benne td {
+ background-color: rgb(100,150,100);
+}
+
+table.tankor tfoot tr td {
+ background-color: rgb(150,100,150);
+ text-align: center;
+}
+
+
+h2.tankorTablazat {
+ width:80%;
+ padding-top:2px;
+ padding-left:1em;
+ margin-left:10%;
+ margin-right:20%;
+ background-color: rgb(60,60,80);
+ color: white;
+ border: 1px dotted white; border-width: 1px 0px;
+ padding-bottom:0px;
+ margin-bottom:0px;
+}
+
+form.tankor {
+ background-color: rgb(100,100,150);
+ margin-left: 10%;
+ margin-right: 10%;
+ padding-left: 0px;
+ padding-top: 0em;
+ padding-bottom: 1em;
+ color: white;
+ margin-bottom: 2em;
+}
+
+form.tankor h2 {
+ padding-top:2px;
+ padding-left:2px;
+ background-color: rgb(60,60,80);
+ color: white;
+ border: 1px dotted white; border-width: 1px 0px;
+}
+form.tankor label {
+ padding-left:2em;
+}
+
+form.tankor input {
+ border: solid 1px blue;
+}
+
+form.tankor input#targytorolg, form.tankor input#mktorolg {
+ background-color: #880000;
+ color: white;
+ padding:0px;
+ margin:0px;
+ border: solid 1px red;
+} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/diakTankorJelentkezes.css b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/diakTankorJelentkezes.css
new file mode 100644
index 00000000..36ce800f
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/diakTankorJelentkezes.css
@@ -0,0 +1,126 @@
+
+table.tankor {
+ background-color: rgb(100,100,150);
+ padding-left: 0px;
+ padding-top: 0em;
+ padding-bottom: 1em;
+ color: white;
+ margin-bottom: 0px;
+ empty-cells:show;
+}
+
+table.tankor thead tr th {
+ background-color: rgb(50, 50, 110);
+ border-bottom: solid 1px white;
+ padding-top:0.8em;
+ padding-bottom:0.8em;
+}
+table.tankor thead tr.small th { padding:0.2em; }
+table.tankor tbody tr th {
+ text-align: center; background-color: rgb(150,100,150);
+ border-bottom: solid 1px white;
+ border-top: solid 1px;
+ padding:2px;
+ font-weight: normal;
+}
+table.tankor tbody tr td.k { text-align: center; background-color: rgb(160,140,180); }
+
+
+table.tankor tr.benne td {
+ background-color: rgb(100,150,100);
+}
+
+table.tankor tr.ez td {
+ border-top: solid rgb(0,0,0); border-width: 1px 0px;
+ color: black ;
+ background-color: orange;
+}
+table.tankor tr.ez td input.felvesz { background-color: green; color:white;}
+table.tankor tr.ez td input.lead { background-color: red; color:white;}
+
+table.tankor tr.utkozik td {
+ border-top: solid rgb(0,0,0); border-width: 1px 0px;
+ color: #444444;
+ background-color: rgb(100,100,100); text-decoration: line-through;
+}
+table.tankor tr.utkozik td input {
+ background-color:#555555;
+ color: #777777;
+ text-decoration: underline !important;
+}
+
+table.tankor tr td {
+ border: solid white;
+ border-width: 1px 0px;
+ color: #ffffff;
+ padding-left:0.5em;
+ padding-right:0.5em;
+}
+table.tankor tr td.szam { text-align: right; }
+table.tankor tr td.lok { background-color: rgb(150,200,100); }
+table.tankor tr td.lsok { background-color: rgb(150,100,100); }
+table.tankor tr td.lkeves { background-color: rgb(150,150,100); }
+table.tankor tr td.loktop { border-right:dotted 2px red; }
+table.tankor tr td.lokbottom { border-left:dotted 2px yellow; }
+
+table.tankor tfoot tr td {
+ background-color: rgb(150,100,150);
+ text-align: center;
+ border-top: solid 1px white;
+ padding-top:0.5em;
+ padding-bottom:0.5em;
+ border-bottom: solid 1px rgb(50,50,110);
+}
+
+
+h2.tankorTablazat {
+ width:80%;
+ padding-top:2px;
+ padding-left:1em;
+ margin-left:10%;
+ margin-right:20%;
+ background-color: rgb(60,60,80);
+ color: white;
+ border: 1px dotted white; border-width: 1px 0px;
+ padding-bottom:0px;
+ margin-bottom:0px;
+}
+
+form.tankor {
+ background-color: rgb(100,100,150);
+ margin-left: 10%;
+ margin-right: 10%;
+ padding-left: 0px;
+ padding-top: 0em;
+ padding-bottom: 1em;
+ color: white;
+ margin-bottom: 2em;
+}
+
+form.tankor h2 {
+ padding-top:2px;
+ padding-left:2px;
+ background-color: rgb(60,60,80);
+ color: white;
+ border: 1px dotted white; border-width: 1px 0px;
+}
+form.tankor label {
+ padding-left:2em;
+}
+
+form.tankor input {
+ border: solid 1px #444444;
+}
+
+form.tankor input#targytorolg, form.tankor input#mktorolg {
+ background-color: #880000;
+ color: white;
+ padding:0px;
+ margin:0px;
+ border: solid 1px red;
+}
+
+table.tankor input { font-size:11px; }
+input.felvesz { border: solid 1px #777777;}
+input.lead { border: solid 1px #777777;}
+input[disabled] { border: none; background-color: #cccccc; color: #aaaaaa; }
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/felmentes.css b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/felmentes.css
new file mode 100644
index 00000000..d47fad84
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/felmentes.css
@@ -0,0 +1,36 @@
+div.FM {
+ margin:10px auto;
+ width: 90%;
+ padding-bottom:2em;
+ border-bottom: solid 1px rgb(100,120,140);
+}
+
+div.FM a { color: #4682B4}
+div.FM a:hover { color: #1E90FF}
+
+div.FM h2 {
+ background-color: rgb(200,240,200);
+ border-bottom: solid 1px white;
+}
+
+div.FM div { padding: 1em; }
+div.FM label { padding:0px 10px 0px 20px; font-weight: bold; font-size:13px; line-height:2em;}
+
+div.FM.FM1 {background-color:rgb(200,210,220);}
+div.FM.FM2 {background-color:rgb(200,210,220);}
+div.FM.FM3 {background-color:rgb(200,210,220);}
+div.FM.FMZAR, div.FM.FMTAN {background-color:rgb(210,250,210); }
+
+div.FM div.submit { text-align: center; }
+
+div.FM table {
+ width:100%; border: solid 1px #787878;
+ background-color: #eee;
+}
+div.FM table th { background-color: #56765f; color: white; border-bottom: solid 1px white;}
+div.FM table td { background-color: #e0e0e0;}
+
+div.FM table tr:hover td { background-color: #f0f0f0;}
+
+div.FM input[readonly] { background-color: #dddddd; }
+div.FM input { background-color: #ffffff; border: solid 1px #787878;}
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/kepesitesek.css b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/kepesitesek.css
new file mode 100644
index 00000000..735d7c9c
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/kepesitesek.css
@@ -0,0 +1,14 @@
+
+ form.kepesites { margin: 20px 30px; background-color: #ddd; padding: 30px; }
+ form.kepesites input[type=text] { width: 800px; padding: 10px; }
+ form.kepesites label { margin-left: 20px; margin-right: 10px; }
+ form.kepesites ul {}
+ form.kepesites span.delTargy,
+ form.kepesites span.delTanar { color: #aaa; margin: 0px 4px; cursor: pointer; display:none; }
+ form.kepesites ul li:hover span.delTargy,
+ form.kepesites ul li:hover span.delTanar { display: inline;}
+
+ form.kepesites ul li:hover span.delTargy:hover,
+ form.kepesites ul li:hover span.delTanar:hover { color: #f00;}
+
+
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/kepzes.css b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/kepzes.css
new file mode 100644
index 00000000..44cfe3fd
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/kepzes.css
@@ -0,0 +1,25 @@
+
+ form.kepzes { background-color: rgb(70,70,120); color: white; margin: 30px; text-align: left; padding: 0px 0px 10px 0px; }
+ form.kepzes h1 { background-color: rgb(0,0,80); text-align: center; border: white solid; border-width: 1px 0px; font-size: 16px; padding: 4px 2px; }
+
+ form.kepzes.eles { background-color: rgb(70,120,70); }
+ form.kepzes.eles h1 { background-color: rgb(0,80,0); }
+
+ form.kepzes.hibernalt { background-color: rgba(0,0,0,0.6); }
+
+ form.kepzes select.osztalySel { height: 400px; min-width: 200px; }
+
+ form.kepzes div { display:table-cell; padding:20px 0px 10px 120px;}
+ form.kepzes p { text-align: center; }
+
+ form.kepzes span.minih {
+ display:block;padding: 2px 15px; background-color: rgb(100, 200, 100); border-top:solid 1px white;
+ }
+
+ form.kepzes option.jellegUgyanaz { color: green; }
+
+ .hidden { display: none; }
+
+ form.kepzes label { display: inline-block; padding: 10px; width: 100px; text-align: right; }
+ form.kepzes input[type=text] { width: 500px; }
+ form.kepzes input[type=submit] { width: 500px; }
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/kepzesOraterv.css b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/kepzesOraterv.css
new file mode 100644
index 00000000..21fb65e4
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/kepzesOraterv.css
@@ -0,0 +1,100 @@
+
+ form.kepzesOraterv table { background-color: rgb(20,40,60); color: white; width:98%;}
+ form.kepzesOraterv table th { background-color: rgb(40,60,80); }
+ form.kepzesOraterv table th.lezart { background-color: black; font-style:italic; }
+ form.kepzesOraterv table th.aktiv { background-color: rgb(80,130,80); }
+
+
+ form.kepzesOraterv table tbody tr th.nm { background-color: rgb(80,100,140); }
+ form.kepzesOraterv table tbody tr td.nn { background-color: rgb(140,170,140); }
+
+ form.kepzesOraterv table tbody tr:hover th { background-color: rgb(80,130,80); }
+ form.kepzesOraterv table tbody tr:hover td { background-color: rgb(80,130,80); }
+
+ form.kepzesOraterv table thead tr th { height:2.5em; }
+ form.kepzesOraterv table tfoot tr th { height:2.5em; }
+/* form.kepzesOraterv table thead tr.evfolyamJel th { height:3em; }*/
+ form.kepzesOraterv table thead td:hover { background-color: orange; }
+ form.kepzesOraterv table tbody tr td:hover { background-color: lightgreen; }
+
+ form.kepzesOraterv table tfoot tr td.alert { background-color: #880000; color:white }
+ form.kepzesOraterv table tfoot tr td.ok { background-color: #008800; color:white }
+
+ form.kepzesOraterv table th.bigleft { font-size: larger; border-bottom: solid 1px #667788; }
+
+ form.kepzesOraterv table td { background-color: rgb(60,70,80); text-align: center;}
+ form.kepzesOraterv table td.lezart { background-color: black;}
+ form.kepzesOraterv table td.aktiv { background-color: rgb(80,130,80); }
+/*
+ form.kepzesOraterv table td { max-width:100px; font-size:10px; }
+ form.kepzesOraterv table td div { display: none;}
+ form.kepzesOraterv table td div { display: none;}
+ form.kepzesOraterv table td:hover span { display: none;}
+ form.kepzesOraterv table td:hover div { display: block; background-color: rgba(100,100,100,0.5); }
+*/
+
+/*
+ form.kepzesOraterv table td.nn select, form.kepzesOraterv table td.nn input {
+ border-bottom: solid 1px white;
+ background-color: rgb(140,170,140); color: white;
+ }
+*/
+ form.kepzesOraterv table tbody td { background-color: #222222; }
+
+ form.kepzesOraterv table tfoot tr.ures th,
+ form.kepzesOraterv table tfoot tr.ures td { background-color: #888888; color:black; padding: 0 8px;}
+
+ form.kepzesOraterv table tbody th { text-align:left; font-weight:normal; padding: 0px 8px; }
+
+ form.kepzesOraterv table td input {
+/* background-color: rgb(20,40,60); color: white;
+ border: solid 1px black;
+*/ text-align: right;
+
+ }
+ form.kepzesOraterv table td select{
+/* background-color: rgb(20,40,60); color: white;
+ border: solid 1px black;
+*/ font-size:10px;
+ padding:2px;
+ width:70px;
+
+ }
+ form.kepzesOraterv table td input:focus,
+ form.kepzesOraterv table td select:focus {
+ background-color: rgb(140,160,180); color:white; }
+
+
+ form.kepzesOraterv table td select option { font-size:smaller;}
+ form.kepzesOraterv table td.lezart input { background-color: black }
+
+ form.kepzesOraterv table th a { text-decoration: none; color: white; border: none; }
+ form.kepzesOraterv table th a:hover { text-decoration: underline; }
+
+ form.kepzesOraterv table th span.tan { color: #aaaaaa; font-weight:normal; font-size:smaller; }
+
+ form.kepzesOraterv table input.torol { background-color: #880000; border: solid 1px red; color: white;}
+ form.kepzesOraterv table input.felvesz { background-color: #008800; border: solid 1px lightgreen; color: white;}
+
+ form.kepzesOraterv table input:hover,form.kepzesOraterv table select:hover { outline:orange 1px solid; }
+ form.kepzesOraterv table input.torol:hover { background-color: #FF0000; border: solid 1px lightred; color: white;}
+
+ form.kepzesOraterv tr.rogzitett td select,
+ form.kepzesOraterv tr.rogzitett td input { display: none; }
+ form.kepzesOraterv tr span.kovetelmeny { display: none; }
+ form.kepzesOraterv tr.rogzitett td div.felev1 { ddisplay: none; }
+ form.kepzesOraterv tr .felev2 { display: none; }
+
+ form.kepzesOraterv thead th > span { padding: 10px 5px; }
+ form.kepzesOraterv thead span.icon-refresh { color: darkorange; }
+ form.kepzesOraterv thead span:hover span.icon-refresh { color: yellow; }
+ form.kepzesOraterv thead span:hover { cursor: pointer; background-color: #88a; }
+/*
+ form.kepzesOraterv tr.rogzitett td div.felev1 { background: red }
+ form.kepzesOraterv tr.rogzitett td div.felev2 { background: blue; }
+ form.kepzesOraterv tr.rogzitett td span.oraszam { color: yellow; }
+ form.kepzesOraterv tr.rogzitett td span.kovetelmeny { color: orange; }
+*/
+
+ form#oratervMasolas { background-color: darkorange; width: 98%; margin: auto; text-align: center; padding-bottom: 5px; }
+ form#oratervMasolas h1 { border-bottom: 2px yellow solid; font-size: 14px; font-weight: bold; background-color: #a40; color: white; padding: 4px; } \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/kepzesTankor.css b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/kepzesTankor.css
new file mode 100644
index 00000000..b1987009
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/kepzesTankor.css
@@ -0,0 +1,13 @@
+
+
+span.valaszthato {
+ background-color: #eeeeee;
+ font-style:italic;
+}
+
+/*
+
+ form.kepzes { background-color: rgb(100,70,120); color: white; margin: 30px; text-align: center; padding-bottom: 10px; }
+ form.kepzes h1 { background-color: rgb(60,0,80); border: white solid; border-width: 1px 0px; font-size: 16px; padding: 2px; }
+
+*/ \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/munkakozosseg.css b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/munkakozosseg.css
new file mode 100644
index 00000000..5ae89b85
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/munkakozosseg.css
@@ -0,0 +1,47 @@
+form.mk {
+ background-color: rgb(100,100,150);
+ margin-left: 10%;
+ margin-right: 10%;
+ padding-left: 0px;
+ padding-top: 0em;
+ padding-bottom: 1em;
+ color: white;
+ margin-bottom: 2em;
+ border-bottom: solid 1px black;
+}
+
+form.mk h2 {
+ padding-top:2px;
+ padding-left:2px;
+ background-color: rgb(60,60,80);
+ color: white;
+ border: 10px solid white; border-width: 0px 0px 1px 0px;
+ margin-bottom: 10px;
+}
+form.mk h2 span { color: yellow; font-style: italic; font-weight: normal; }
+
+form.mk div.leiras { margin: -10px 0 10px 0; padding: 10px; background: rgba(255,255,255,0.5); color: black; }
+form.mk label {padding-left:2em;}
+
+form.mk input {}
+
+form.mk input#targytorolg, form.mk input#mktorolg {
+ background-color: #880000;
+ color: white;
+ padding:0px;
+ margin:0px;
+ border: solid 1px red;
+}
+
+form.mk.uj h2 { border-left: solid 2px #00ff00; }
+form.mk.uj:hover h2 { background-color: #005500;}
+form.mk.torol h2 { border-left: solid 2px #ff0000; }
+form.mk.torol:hover h2 { background-color: #550000;}
+
+div.tagok { display: inline-block; margin-left:2em; }
+div.tagok div.header { background-color: rgba(0,0,0,0.4); margin-top:10px; padding:2px 4px; border-bottom: solid 1px white; }
+div.tagok:hover div.header {background-color: rgba(0,255,0,0.4);}
+div.tagok div.header label {padding:0px;}
+div.submit {display: inline-block; padding-left:2em; vartical-align: middle;}
+
+div.arckepContainer,div.arckep--container {display: inline-block; margin:2px;}
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/osztaly.css b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/osztaly.css
new file mode 100644
index 00000000..a61f7c44
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/osztaly.css
@@ -0,0 +1,57 @@
+
+ form.osztalyForm { padding: 0px; background-color: rgb(100,100,150); margin: 40px auto 10px auto; width: 90%; color: white; }
+ form.osztalyForm h1 { text-align: left; padding:4px; border-bottom: 1px solid white; border-width: 1px 0px; background-color: rgb(60,60,80); margin-top:0px; margin-bottom:20px; }
+ form.osztalyForm:hover h1 {border-bottom: solid 1px #6464C8;}
+ form.osztalyForm li { background-color: rgb(60,60,100); margin-top: 2px; padding: 5px 2px 5px 2px; }
+ form.osztalyForm table { width: 100%; background-color: #aaaaaa;}
+ form.osztalyForm table th { background-color: rgb(20,40,60); padding: 4px 8px; }
+ form.osztalyForm table td { background-color: rgb(60,130,120); width: 33%; padding:0px 4px; height:1.8em; }
+
+ form.osztalyForm hr { background-color: #eeeeee; margin-top: 22px; margin-bottom: 22px; padding: 0px; }
+
+ form.osztalyForm ol li:hover { background-color: rgb(100,100,200); }
+ form.osztalyForm input[type=submit] { width: 100px; margin:4px; }
+ form.osztalyForm input[type=submit]:hover { outline: solid 2px cornflowerblue; }
+
+ form.osztalyForm ol li div.kepzes { float: right; background-color: rgb(60,100,60); position: relative; top: -5px; padding: 4px 5px 1px 1px; height: 19px;}
+ form.osztalyForm ol li:hover div.kepzes { background-color: rgb(200,100,200); }
+ form.osztalyForm ol li div.hideShowContainer { float: right; background-color: rgb(160,0,0); position: relative; top: -4px; padding: 5px 5px 2px 5px; margin-left: 10px; }
+ form.osztalyForm ol li div.kepzes input[type=text] { margin: 0; padding: 0; border: none; position: relative; top: -2px; }
+ form.osztalyForm ol li div.kepzes span.onClickHideShow { font-size: 14px; cursor: pointer; padding: 0; }
+ form.osztalyForm ol li div.kepzes ul.openable {
+ background: #ddaaee; list-style-type: none; position: absolute; z-index: 20; width: 600px; right: 0px; top: 25px; padding: 0px 10px 10px 10px;
+ border: rgb(200,100,200) 2px solid; border-radius: 4px;
+ }
+ form.osztalyForm ol li div.kepzes ul.openable li { background: rgb(100,50,100); }
+ form.osztalyForm ol li div.kepzes ul.openable li:hover { background: rgb(150,75,150); }
+ form.osztalyForm ol li div.kepzes ul.openable li.uj { background: rgb(100,75,150); padding-right: 175px; }
+ form.osztalyForm ol li div.kepzes ul.openable li.close { background: transparent; color: red; cursor: pointer; }
+ form.osztalyForm ol li div.kepzes ul.openable li.close:hover { color: white; }
+ form.osztalyForm ol li div.kepzes ul.openable span.datum { float: right; }
+
+/* form.osztalyForm ol li div.kepzes label.chk { background-color: rgb(250,140,60);}*/
+ form.osztalyForm ol li div.kepzes span { padding: 2px 4px; position: relative; top: 0px; margin-right: 1px; margin-left:1px; }
+ form.osztalyForm ol li div.kepzes span.chk { background-color: rgb(250,140,60); }
+ form.osztalyForm ol li div.kepzes span.mas { background-color: rgb(160,100,60); }
+ form.osztalyForm div.datum { background: rgb(160,0,0); text-align: center; border: 1px dotted white; }
+
+ form.updateTable { padding: 0px; background-color: rgb(150,100,150); margin: 120px auto 20px auto; width: 90%; color: white; }
+ form.updateTable h1 { text-align: center; padding:4px; border-bottom: 1px solid white; border-width: 1px 0px; background-color: rgb(60,60,80); margin-top:0px; margin-bottom:20px; }
+ form.updateTable li { background-color: rgb(60,60,100); margin-top: 2px; padding: 5px 2px 5px 2px; }
+ form.updateTable table { width: 100%; background-color: #aaaaaa;}
+ form.updateTable table th { background-color: rgb(20,40,60); padding: 4px 8px; }
+ form.updateTable table td { background-color: rgb(60,130,120); width: 33%; padding:0px 4px; height:1.8em; }
+
+ form.uj div { padding: 5px 10px; display: none; }
+ form.uj div#divOsztalyJelleg { display: block; }
+ form.uj div#divKezdoTanev, form.uj div#divVegzoTanev, form.uj div#divJel { display: inline-block; width: 300px; }
+ form.uj ul#evfolyamJelek { list-style-type: none; margin: 0; padding: 0; }
+ form.uj ul#evfolyamJelek li { display: inline-block; height: 40px; vertical-align: top; border-right: 1px solid white; padding: 10px; }
+ form.uj ul#evfolyamJelek li.kivalasztott { background-color: #2aa; }
+
+ form.uj label { margin-right: 20px; }
+ form.uj input[type="submit"] { height:2em; margin: 10px 80px; }
+
+ form.osztalyForm span.data { margin: 20px; background-color: white; color: black; padding: 5px; font-size: 12px; font-weight: bold; }
+ form.osztalyForm ol li span.diakNev { padding-left:0.5em; cursor:pointer; }
+ form.osztalyForm ol li span.datumok { color: #888; padding-left:1em; }
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/tanar.css b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/tanar.css
new file mode 100644
index 00000000..2f80f013
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/tanar.css
@@ -0,0 +1,60 @@
+
+
+ form.tanar { background-color: white; }
+
+ form.tanar { margin: 5px 30px 20px 20px; font-size:10px; }
+ form.tanar h1 { border: dotted white; border-width: 1px 0px; background-color: rgb(80,100,120); font-size: 20px; text-align: center; }
+ form.tanar input, form.tanar select {
+ font-size:10px; border: solid 1px #777777; margin-left: 3px;
+ padding-left: 2px;
+ }
+ form.tanar input.kiemelt { background-color: rgb(255,255,100); border-width: 1px 1px 0px 1px; }
+ form.tanar label { font-size:11px; }
+ form.tanar label.kotelezo { color:rgb(100,20,20); }
+ form.tanar input:focus { background-color: orange; }
+
+ form.tanar fieldset { border: solid 1px rgb(40,60,80); }
+ form.tanar fieldset th { text-align: right; }
+ form.tanar fieldset legend {
+ background-color: rgb(140,160,180);
+ color: white;
+ font-size:90%;
+ text-align: left;
+ margin-left:20px;
+ padding-left: 10px;
+ padding-right: 10px;
+ border: solid 1px rgb(40,60,80);
+ }
+ form.tanar fieldset:hover legend { background-color: navy; }
+
+ form.tanar input.kiemelt {
+ background-color: rgb(220,220,255);
+ border-width: 1px 1px 1px 1px; border-color: #777777 #777777 rgb(220,220,255) #777777;
+ margin-bottom: 0px; padding-top: 2px;
+ }
+
+ form.tanar table#kepesites { border-spacing: 0; margin: 10px 0; width: 800px; }
+ form.tanar table#kepesites th,
+ form.tanar table#kepesites td { text-align: left; border-left: 1px dotted black; padding: 0 10px; }
+ form.tanar table#kepesites th { padding-bottom: 5px; }
+ form.tanar table#kepesites tbody tr:last-child td { padding-bottom: 10px; }
+ form.tanar table#kepesites tr#ujKepesites { display: none; }
+ form.tanar table#kepesites tr#ujKepesites td { padding-top: 10px; }
+ form.tanar table#kepesites tr#uj td { padding: 6px 10px; cursor: pointer; border-top: 1px none #888; border-bottom: 1px dotted black; }
+ form.tanar table#kepesites td#kepesitesNev { width: 300px; }
+ form.tanar table#kepesites tr#ujKepesites input[type=text] { width: 260px; }
+ form.tanar table#kepesites tr#hozzarendel th { padding: 15px 10px 10px 10px; }
+
+ form.updateTable { color: white; width: 80%; background-color: rgb(180,180,200); margin: 20px auto; }
+ form.updateTable h1 { text-align: center; border: 1px dotted white; border-width: 1px 0px; background-color: rgb(60,60,80); }
+ form.updateTable label { color: white; padding: 8px; }
+ form.updateTable table { margin: 20px auto; background-color: rgb(140,140,180); color: red; }
+ form.updateTable table td { background-color: rgb(255,255,255); }
+ form.updateTable table th { background-color: rgb(120,120,160); }
+
+
+ from.tanar input.ajaxRequest { color: black; background-color: red; }
+ form.tanar input.ajaxRequestDone { color: white; background-color: rgb(0,130,0); }
+ form.tanar select.ajaxRequestDone { color: white; background-color: rgb(0,130,0); }
+ form.tanar input.ajaxRequestError { color: white; background-color: rgb(130,0,0); }
+ form.tanar select.ajaxRequestError { color: white; background-color: rgb(130,0,0); } \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/tankor.css b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/tankor.css
new file mode 100644
index 00000000..f81c35f1
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/tankor.css
@@ -0,0 +1,83 @@
+form.tankor {
+ background-color: rgb(100,100,150);
+ margin-left: 5%;
+ margin-right: 5%;
+ padding-left: 0px;
+ padding-top: 0em;
+ padding-bottom: 1em;
+ color: white;
+ margin-bottom: 2em;
+}
+form.tankor:hover { background-color: rgb(120,120,170); }
+form.meglevo { background-color: rgb(100,150,100); }
+form.meglevo:hover { background-color: rgb(110,160,110); }
+
+form.tankor h2 {
+ padding-top:2px;
+ padding-left:2px;
+ background-color: rgb(60,60,80);
+ color: white;
+ border-bottom: 1px solid white;
+ border-left: 0.4em solid lightgreen;
+ margin-bottom: 0em;
+}
+form.tankor:hover h2 { border-left: solid 0.4em rgb(242,0,86); }
+
+form.meglevo h2 {
+ background-color: lightgreen;
+ color: rgb(60,60,80);
+}
+
+form.tankor label {
+ padding-left:0.4em;
+}
+
+
+form.tankor input:hover,
+form.tankor label:hover {
+ text-decoration: underline;
+}
+
+form.tankor input {
+ border: solid 1px blue;
+}
+
+form.tankor input.lezart { background-color: #aaaaaa; border: solid 1px black; }
+
+form.tankor input#torolg {
+ background-color: #880000;
+ color: white;
+ padding:0px 1em;
+ margin:0px;
+ border: solid 1px red;
+}
+
+form.tankor table tr th.sz0 { background-color: green; }
+form.tankor table tr th.sz1 { background-color: darkgreen; }
+form.tankor table tr td.sz0 { background-color: green; text-align: center;}
+form.tankor table tr td.sz1 { background-color: darkgreen; text-align:center; }
+form.tankor table tr td:hover { outline: solid 1px orange; }
+
+form.tankor table td.tankorCsoportok div.header{ background-color: #1E90FF; color:white; border-bottom: solid 1px white; width:180px; text-align: center;}
+
+form.tankor table td.tankorCsoportok {
+ border: solid 1px white;
+ background-color: rgba(0,0,0,0.2);
+ vertical-align: top;
+}
+form.tankor table td.tankorCsoportok a { color: lightblue; text-decoration:none;}
+form.tankor table td.tankorCsoportok a:hover { color: white; text-decoration:underline; }
+form.tankor table td.tankorCsoportok ul { list-style-type: circle; margin-left:14px; padding:4px;}
+
+form.meglevo table tbody tr.vanTag th, form.meglevo table tbody tr.vanTag td { background-color: rgb(60,120,80); }
+
+span.dob {
+ background-color: #2799bb !important;
+ margin-right:5px;
+}
+
+form.tankor div.sel { background-color: lightgreen; color:black; }
+form.tankor div:hover { background-color: #2799bb; }
+
+form.tankor p { padding: 0em 1em; }
+
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/tankorDiak.css b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/tankorDiak.css
new file mode 100644
index 00000000..a70a4b7f
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/tankorDiak.css
@@ -0,0 +1,128 @@
+@media screen,handheld {
+table.tankor {
+ background-color: rgb(100,100,150);
+ margin-left: 10%;
+ margin-right: 10%;
+ padding-left: 0px;
+ padding-top: 0em;
+ color: white;
+}
+
+table.bentlevo thead tr th { background-color: lightgreen; border-bottom: solid 2px green; color: black;}
+
+
+h2.tankorTablazat {
+ width:90%;
+ padding-top:2px;
+ padding-left:1em;
+ margin-left:10%;
+ margin-right:20%;
+ background-color: rgb(60,60,80);
+ color: white;
+ border: 1px dotted white; border-width: 1px 0px;
+ padding-bottom:0px;
+ margin-bottom:0px;
+}
+
+form.tankor {
+ background-color: #eeeeee;
+ margin-left: 3%;
+ margin-right: 3%;
+ padding-left: 0px;
+ padding-top: 0em;
+ margin-bottom:4em;
+}
+form.tankor table th {
+ height:1.8em;
+ font-weight:normal;
+ padding:0px 4px;
+ background-color: rgb(100,120,100);
+ border-bottom: solid 1px rgb(200,220,200);
+ color:white;
+}
+form.tankor table td {
+/* background-color: rgb(100,100,110);*/
+ padding:1px 4px;
+}
+form.tankor table tr:nth-child(even) td { background-color: #dddddd; }
+
+form.tankor table tr.magantanulo td {
+ background-color: rgb(150,100,150);
+}
+
+form.tankor h2 {
+ padding-top:2px;
+ padding-left:2px;
+ background-color: rgb(60,60,80);
+ color: white;
+ border-color: white;
+ border-width: 1px 0px;
+ border-style: none none solid none;
+ margin-bottom: 0px;
+ margin-top: 10px;
+}
+form.tankor:hover h2 { border-right: solid 3px lightgreen; }
+
+form.tankor label {
+ padding-left:1em;
+}
+
+
+form.tankor input[type=checkbox]:checked:after { display:block; content: ""; display:block;height:14px; width:4px; background-color: lightgreen; border-radius:2px; top:-2px; left:-6px; position:relative; border: solid 1px green; }
+form.tankor input[type=checkbox].lany:checked:after { background-color: magenta; border: solid 1px #ff3366;}
+form.tankor input[type=checkbox].fiu:checked:after { background-color: #1e90ff; border: solid 1px lightblue;}
+
+form.tankor input#targytorolg, form.tankor input#mktorolg {
+ background-color: #880000;
+ color: white;
+ padding:0px;
+ margin:0px;
+ border: solid 1px red;
+}
+
+form#tankorDiak table tbody tr td input {
+ background-color: green;
+}
+
+table.egyosztaly {
+ background-color: #eeeeee;
+}
+
+/* neme */
+td.fiu { color:blue; cursor: pointer}
+td.lany { color:magenta; cursor:pointer }
+/* ---- */
+
+
+form.tankor span {
+ font-size: 10px;
+}
+
+form.tankor span.kepzes0 {
+ color:white;
+ background-color: #778877;
+ padding-left: 3px; padding-right:3px;
+ margin-left:2px;
+ -moz-border-radius: 1px;
+ border-radius: 1px;
+ white-space: nowrap;
+}
+
+form.tankor span.kepzes1 {
+ color: white;
+ background-color: #777788;
+ padding-left: 3px; padding-right:3px;
+ margin-left:2px;
+ -moz-border-radius: 1px;
+ border-radius: 1px;
+ white-space: nowrap;
+
+}
+
+}
+
+@media print {
+
+ form.tankor { width: 100%; }
+ form.tankor table { width:100%; }
+} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/tankorLetszam.css b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/tankorLetszam.css
new file mode 100644
index 00000000..981ac34d
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/tankorLetszam.css
@@ -0,0 +1,7 @@
+
+ table.tankorLetszam { background-color: #aaaaff; }
+ table.tankorLetszam tr th { background-color: #aa7788; color: white; border-bottom: solid 1px white; height:2em;}
+ table.tankorLetszam tr td { background-color: #eeeeee; }
+ table.tankorLetszam tr td.letszam { text-align:right; padding-right:4px; }
+ table.tankorLetszam tr:hover td { background-color: #ffffff; }
+ table.tankorLetszam tr td a { display: block; color:black; text-decoration: none;} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/tankorSzemeszter.css b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/tankorSzemeszter.css
new file mode 100644
index 00000000..ef113b38
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/tankorSzemeszter.css
@@ -0,0 +1,24 @@
+
+ form.tankorSzemeszter table { background-color: rgb(20,40,60); color: white; width:90%;}
+ form.tankorSzemeszter table th { background-color: rgb(40,60,80); }
+ form.tankorSzemeszter table th.aktualis { background-color: rgb(80,60,40); }
+ form.tankorSzemeszter table th.lezart { background-color: black; font-style:italic; }
+ form.tankorSzemeszter table th.aktiv { background-color: rgb(80,130,80); }
+
+ form.tankorSzemeszter table th.bigleft { font-size: larger; border-bottom: solid 1px #667788; }
+
+ form.tankorSzemeszter table td { background-color: rgb(60,70,80); text-align: center;}
+ form.tankorSzemeszter table td.aktualis { background-color: rgb(80,70,60); }
+ form.tankorSzemeszter table td.lezart { background-color: black;}
+ form.tankorSzemeszter table td.aktiv { background-color: rgb(80,130,80); }
+
+ form.tankorSzemeszter table td input {
+ background-color: rgb(20,40,60); color: white;
+ border: solid 1px black;
+ }
+ form.tankorSzemeszter table td.lezart input { background-color: black }
+
+ form.tankorSzemeszter table th a { text-decoration: none; color: white; border: none; }
+ form.tankorSzemeszter table th a:hover { text-decoration: underline; }
+
+ form.tankorSzemeszter table th span.tan { color: #aaaaaa; font-weight:normal; font-size:smaller; } \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/tankorTanar.css b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/tankorTanar.css
new file mode 100644
index 00000000..50a9c3e9
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/tankorTanar.css
@@ -0,0 +1,39 @@
+form.tankor {
+ margin-left: 20px;
+ margin-right: 20px;
+ padding-left: 0px;
+ padding-top: 0em;
+ padding-bottom: 1em;
+ margin-bottom: 2em;
+}
+form.tankor h2 {
+ padding-top:2px;
+ padding-left:2px;
+ background-color: rgb(60,60,80);
+ color: white;
+ border-bottom: solid 1px white;
+}
+form.tankor label {
+ padding-left:2em;
+}
+
+form.tankor input {
+ border: solid 1px blue;
+}
+
+form.tankor select, form.tankor option {
+
+}
+
+form.tankor a { color: rgb(100, 149, 237); }
+form.tankor a:hover { color: rgb(110, 159, 247); }
+form.tankor a span { color: #555555; margin:1px; padding-left:2px; padding-right: 2px; text-decoration: none;}
+form.tankor a:hover span { color:red; }
+
+form.tankor table.felosztas { width:100%; background-color: #eeeeee; border-spacing: 0px; }
+form.tankor table.felosztas th { background-color: rgb(100, 149, 237); padding: 5px 2px; border-bottom: solid 2px violet; color:white; }
+form.tankor table.felosztas td { background-color: ; padding: 2px 2px 2px 10px; }
+form.tankor table.felosztas tr:nth-child(odd) td { background-color: #fafafa; }
+form.tankor table.felosztas tr:hover td { }
+
+select.vantanara { border: solid 1px lime;}
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/tankorTanarHozzarendeles.css b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/tankorTanarHozzarendeles.css
new file mode 100644
index 00000000..a346f49c
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/tankorTanarHozzarendeles.css
@@ -0,0 +1,94 @@
+
+
+ div#statusz { border-radius: 0 0 10px 10px; width:850px; background: rgba(170,170,170); color: white; margin: 0 auto; position:relative; top: -12px; left:-34px; z-index: auto; padding: 0 5px;}
+ div#statusz #filter { cursor: pointer; background-color: rgba(100,100,100,0.7); padding: 5px; display: inline-block; margin: 0 0 0 10px; height:16px;}
+ div#statusz #filter:hover { background-color: #4285F4; }
+ div#statusz #filter:hover span.icon-chevron-right { color: white; }
+ div#statusz #limit { display: inline-block; background-color: rgba(100,100,100,0.7); padding: 3px 5px; margin: 0 1px; }
+ div#statusz #limit:hover { background-color: rgba(100,100,100,1); }
+ div#statusz #limit span#minusz { background-color: rgba(130,160,255,0.7); padding: 4px 5px; margin: 0; cursor: pointer; display: inline-block; position: relative; }
+ div#statusz #limit span#plusz { background-color: rgba(255,160,130,0.7); padding: 4px 5px; margin: 0; cursor: pointer; display: inline-block; position: relative; }
+ div#statusz #limit i { background-color: rgba(200,200,200,0.9); color: rgb(100,100,100); padding: 2px 5px; }
+ div#statusz #limit ul.limit { display: none; position: absolute; top: 22px; left: 0; right: 0; list-style-type: none; margin: 0; padding: 5px 0; text-align: center; background-color: rgba(100,100,100,1); }
+ div#statusz #limit ul.limit li { margin: 0; padding: 4px; }
+ div#statusz #limit ul.limit li:hover { background-color: rgb(200,200,200); color: rgb(80,80,80); }
+ div#statusz #limit ul.limit li.selected { background-color: rgba(250,100,100,0.5); }
+ div#statusz #stat { background-color: rgba(100,100,100,0.7); display: inline-block; margin: 0 0 0 10px; height: 16px; padding: 5px; }
+
+ #updateWindowSideContent div.slideContainer { border-bottom: 1px dotted #aaa; cursor: pointer; padding: 3px 10px; }
+ #updateWindowSideContent div.slideContainer span.icon-chevron-up,
+ #updateWindowSideContent div.slideContainer span.icon-chevron-down { float: right; }
+ #updateWindowSideContent div.slideContainer ul { display: none; list-style-type: none; margin: 10px 0; cursor: default; padding: 0 10px; }
+ #updateWindowSideContent div.slideContainer ul li { display: inline-block; }
+ #updateWindowSideContent div.slideContainer ul li.tanarNelkuli { margin-bottom: 10px; }
+ #updateWindowSideContent input[type=submit] { width: 100%; }
+
+ #updateWindowSideContent div.slideContainer ul li { width: 98%; }
+ #updateWindowSideContent div#szOsztaly.slideContainer ul li { width: 100px; }
+
+ #updateWindowSide p.tankorNev { text-align: center; border-bottom: solid 1px #ddd; padding: 8px 0; margin: 0; }
+ #updateWindowSide div.slideToggleContainer ul { list-style-type: none; margin: 10px 0px; display: none; cursor: default; padding: 0 10px; }
+ #updateWindowSide div.slideToggleContainer ul li { display: inline-block; width: 100px; }
+ #updateWindowSide div.slideToggleContainer { cursor: pointer; margin: 0; padding: 3px 10px; border-bottom: 1px dotted #aaa; }
+ #updateWindowSide div.slideToggleContainer span.icon-chevron-down { float: right; z-index: 0; }
+ #updateWindowSide div.slideToggleContainer span.changed { color: yellow; }
+ #updateWindowSide ul#tankorSzemeszter li { width: 120px; }
+ #updateWindowSide ul#tankorSzemeszter input { width: 40px; text-align: right;}
+
+ #updateWindowSide p.tankorModosit { cursor: pointer; color: yellow; text-align: right; margin: 0; padding: 0 10px 0 0; display: none; background-color: rgba(240,240,220,0.5); border-bottom: 2px solid yellow; color: rgb(70,70,70); color: white; }
+ #updateWindowSide span.tankorNevExtra { cursor: pointer;}
+ #updateWindowSide span.tankorNevExtra.changed { color: yellow; }
+ #updateWindowSide input#tankorNevExtra { width: 50px; display: none; }
+
+
+
+ /* table-layout:fixed; */
+ div.tanarTankor { margin: 40px auto auto 2px;}
+ div.tanarTankor table { font-size:x-small; background-color: #ababab; }
+ div.tanarTankor table thead tr th { background-color: white; cursor: pointer; }
+ div.tanarTankor table thead tr td { border-bottom: solid 1px white; cursor:pointer;}
+ div.tanarTankor table thead tr td.slctd { border-bottom: solid 1px cornflowerblue; }
+ div.tanarTankor table thead tr th.targy { height: 30px; }
+ div.tanarTankor table thead tr td.tankor { text-align: center; height: 30px; border-bottom: red 4px solid; }
+ div.tanarTankor table thead tr td.tankor.kesz { border-bottom: green 4px solid; }
+ div.tanarTankor table thead tr td.tankor.tobb { border-bottom: yellow 4px solid; }
+ div.tanarTankor table thead tr td.tankor.bontasHiba { border-top: red 4px solid; }
+ div.tanarTankor table thead tr th span#keszTanarDb,
+ div.tanarTankor table thead tr th span#osszTanarDb,
+ div.tanarTankor table thead tr th span#keszTankorDb,
+ div.tanarTankor table thead tr th span#osszTankorDb { color: red; }
+
+ div.tanarTankor table tbody tr.szurt { display: none; }
+ div.tanarTankor table tbody tr.csukott { display: none; }
+ div.tanarTankor table tbody tr th { height:20px; background-color: white; }
+ div.tanarTankor table tbody tr td.lekotott { padding: 0 4px; }
+ div.tanarTankor table tbody tr.ok td.lekotott { border-right: 4px solid green; border-left: 4px solid green; background-color: #88ffaa; }
+ div.tanarTankor table tbody tr.plusz td.lekotott { border-right: 4px solid red; border-left: 4px solid #cdcdcd; }
+ div.tanarTankor table tbody tr.minusz td.lekotott { border-right: 4px solid #cdcdcd; border-left: 4px solid blue; }
+ div.tanarTankor table tbody tr:hover th { background-color:orange }
+
+ div.tanarTankor table tbody tr td { min-width:20px; text-align:center; background-color: #efefef;}
+
+ div.tanarTankor input[type="checkbox"] { display:none; }
+ div.tanarTankor input[type="checkbox"]:checked { display:table-cell; }
+ div.tanarTankor table tbody tr th.slctd { background-color: rgba(0,200,0,0.7); }
+ div.tanarTankor table tbody tr td:hover input[type="checkbox"] { display:table-cell; }
+
+pre { text-align: left; }
+ div.tankorTanar table#tt thead tr th.szurt { display: none; }
+ div.tankorTanar table#tt thead tr td.szurt { display: none; }
+ div.tankorTanar table#tt tbody tr td.szurt { display: none; }
+
+ div.tanarTankor table tbody td.disable { background-color: #888; }
+
+ div.rot {
+ background-color: #eeeeee;
+ -webkit-transform: rotate(-90deg);
+ -moz-transform: rotate(-90deg);
+ -ms-transform: rotate(-90deg);
+ -o-transform: rotate(-90deg);
+ filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
+ }
+
+
+
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/terem.css b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/terem.css
new file mode 100644
index 00000000..cb91e123
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/terem.css
@@ -0,0 +1,15 @@
+
+ div.terem { text-align: center; background-color: #ffffff; }
+ div.terem table { margin: auto; background-color: #555555; }
+ div.terem table th { background-color: white; padding: 2px 4px; font-size:large; background-color: #555555; color:white; border-bottom:solid 2px white; padding:1px 10px;}
+ div.terem table td { background-color: rgb(240,240,240); text-align: left; padding: 2px 4px; }
+ div.terem table tr:hover td { background-color: #826373; color: white; }
+ div.terem table tr td a { color: black; }
+ div.terem table tr:hover td a { color: white; }
+
+ form.terem h1 { background-color: #555555; color:white; margin:0px; padding:0.4em 0.2em; border-bottom: solid 2px lightgreen;}
+
+ form.terem { background-color: ; width: 80%; margin: auto; padding: 20px; text-align: center; }
+ form.terem label { margin-left: 10px; margin-right:1em; }
+ form.terem div.tipus { width: 200px; float: right; background-color: #dddddd; border-width: 0px 1px 1px 1px; border-style: solid; border-color: #555555;}
+/* form.terem label, form.terem input, form.terem select { vertical-align: top; }*/
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/tovabbkepzes.css b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/tovabbkepzes.css
new file mode 100644
index 00000000..1769eb87
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/tovabbkepzes.css
@@ -0,0 +1,89 @@
+@charset "utf-8";
+
+ h1 { margin-left:30px;}
+ h2 { margin-left:30px;}
+
+ table.tovabbkepzes {background-color: white; width:90%;}
+
+ table.tovabbkepzes thead tr th {background-color: #eeeeee; border-bottom: solid 1px #555555; padding: 5px; }
+
+ table.tovabbkepzes tbody tr th { border-left: solid 2px white; }
+ table.tovabbkepzes tbody tr:nth-child(even) td { background-color: #F8F8F9;}
+ table.tovabbkepzes tbody tr:hover th:nth-child(1) { border-left: solid 2px cornflowerblue; }
+ table.tovabbkepzes tbody tr:hover td { background-color: rgba(230,230,230,0.8); }
+
+ table.tovabbkepzes tbody tr td { padding: 0px 3px; background-color: white; border-bottom: solid 1px #eeeeee;}
+ table.tovabbkepzes tbody tr th span { color: cornflowerblue;}
+
+ table.tovabbkepzes tbody tr.megszűnt td input.currency,
+ table.tovabbkepzes tbody tr.elutasított td input.currency { background-color: #aaa; color:white;}
+ table.tovabbkepzes tbody tr.elutasított td { background-color: red; color:white;}
+ table.tovabbkepzes tbody tr.jóváhagyott td { background-color: #49A74C; color:white;}
+ table.tovabbkepzes tbody tr.teljesített td { background-color: #2F6A31; color:white;}
+ table.tovabbkepzes tbody tr.megszűnt td { text-decoration: line-through;}
+ table.tovabbkepzes tbody tr.terv td { }
+
+ table.tovabbkepzes tbody tr td select.tovabbkepzesNev { width:220px; }
+
+ table.tovabbkepzes tbody tr td.osszeg, table.tovabbkepzes tbody tr th.osszeg { white-space: nowrap; }
+
+ table.tovabbkepzes input.currency { text-align:right; width:60px;}
+ table.tovabbkepzes input.sumCurrency { text-align:right; width:60px;}
+ table.tovabbkepzes input.hiba { outline: solid 1px red; }
+ table.tovabbkepzes td.oraszam { text-align:right; white-space: nowrap; }
+ table.tovabbkepzes td.oraszam input { width:50px; text-align:right;}
+
+ table.tovabbkepzes input.date { width:70px; text-align:center;}
+
+ table.tovabbkepzes tfoot tr td,table.tovabbkepzes tfoot tr th
+ { padding: 3px 3px; background-color: #eeeeee;
+ border-top: solid 1px #888888;
+ }
+
+ #ujTovabbkepzes form { margin:30px 50px; padding:30px; border: solid 1px #ddd;
+background: rgb(255,255,255);
+background: -moz-linear-gradient(-45deg, rgba(255,255,255,1) 0%, rgba(246,246,246,1) 47%, rgba(237,237,237,1) 100%);
+background: -webkit-gradient(linear, left top, right bottom, color-stop(0%,rgba(255,255,255,1)), color-stop(47%,rgba(246,246,246,1)), color-stop(100%,rgba(237,237,237,1)));
+background: -webkit-linear-gradient(-45deg, rgba(255,255,255,1) 0%,rgba(246,246,246,1) 47%,rgba(237,237,237,1) 100%);
+background: -o-linear-gradient(-45deg, rgba(255,255,255,1) 0%,rgba(246,246,246,1) 47%,rgba(237,237,237,1) 100%);
+background: -ms-linear-gradient(-45deg, rgba(255,255,255,1) 0%,rgba(246,246,246,1) 47%,rgba(237,237,237,1) 100%);
+background: linear-gradient(135deg, rgba(255,255,255,1) 0%,rgba(246,246,246,1) 47%,rgba(237,237,237,1) 100%);
+
+ }
+ form#ujTovabbkepzes span.ujIntezmeny { color: #eeeeee; }
+ form#ujTovabbkepzes span.ujIntezmeny:hover { color: cornflowerblue; }
+
+ form#ujTovabbkepzes table tbody tr th { text-align: right; }
+ form#ujTovabbkepzes table tbody tr th:after { content: ":" }
+
+ div.separator {
+ height:1px; width: 80%;
+ margin:40px auto;
+ background-color: #eeeeee;
+ }
+
+ #tanarAdatok input.ajaxDone { background-color:lightgreen; }
+ #tanarAdatok input.ajaxError { background-color:red; }
+
+ th.tovabbkepzesCiklus div { margin:0px auto; border: solid 1px #888; height:10px; display:block; width:120px; background-color:#ddd; color:white; font-weight:normal; font-size:7px;}
+ th.tovabbkepzesCiklus div span { display:table-cell;height:8px; color: white !important;}
+ th.tovabbkepzesCiklus div span.terv { background-color: #03A9F4;}
+ th.tovabbkepzesCiklus div span.teljesitett { background-color: green; }
+ th.tovabbkepzesCiklus div span.jovahagyott {background-color: #49A74C;}
+
+ th.tovabbkepzesCiklus span.forduloEv { font-size:6px; color: cornflowerblue; }
+ th.tovabbkepzesCiklus span.forduloEv.left { float:left; margin-left:8px; }
+ th.tovabbkepzesCiklus span.forduloEv.right { float:right; margin-right:8px; }
+
+ th.tovabbkepzesCiklus.alert span.forduloEv { color:#E91E63; }
+
+ #tanarTovabbkepzesForduloDt span[class*='icon'].alert2 { color: #FFEB3B;}
+ #tanarTovabbkepzesForduloDt span[class*='icon'].alert1 { color: orange;}
+ #tanarTovabbkepzesForduloDt span[class*='icon'].alert0 { color: red;}
+ #tanarTovabbkepzesForduloDt span[class*='icon'].alert { color: #e91E63;}
+ #tanarTovabbkepzesForduloDt span[class*='icon'].kesz { color: green;}
+ #tanarTovabbkepzesForduloDt span[class*='icon'].folyamatban { color: lightgreen;}
+ #tanarTovabbkepzesForduloDt span[class*='icon'].varakozik { color: #888;}
+
+ #tovabbkepzesNavi { text-align:center; width:;}
+ input.datum {width:70px;}
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/valtas.css b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/valtas.css
new file mode 100644
index 00000000..ed56aa1e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/valtas.css
@@ -0,0 +1,2 @@
+table.tanarLista {}
+table.tanarLista div.titulus { font-size:smaller; color:#aaa;} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/zaradek.css b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/zaradek.css
new file mode 100644
index 00000000..2e3b0fc0
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/intezmeny/zaradek.css
@@ -0,0 +1,16 @@
+
+ form.zaradek { margin: 10px 40px; padding: 10px; border: rgb(100,125,150) solid; border-width: 3px 1px; background-color: rgb(200,220,240); }
+ form.zaradek p { border: rgb(20,40,80) solid 1px; padding: 8px; text-align: center; background-color: white; }
+ form.zaradek p span { color: red; }
+ form.zaradek table { margin-left: 100px; }
+ form.zaradek th { padding: 4px; background-color: rgb(20,40,80); color: white; }
+ form.zaradek div { text-align: center; }
+ form.zaradek div input { padding: 4px; background-color: rgb(20,40,80); color: white; }
+
+ form.diakZaradek { margin: 10px; }
+ form.diakZaradek table { background-color: rgb(20,40,80); }
+ form.diakZaradek table th { background-color: rgb(100,100,200); color: white; }
+ form.diakZaradek table td { background-color: rgb(230,230,255); }
+ form.diakZaradek table td.jobbra { text-align: right; }
+
+ form.diakZaradek input.delZaradek { background-color: red; border: none; color: white; }
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/koszi/esemenyAdmin.css b/mayor-orig/www/skin/classic/module-naplo/css/koszi/esemenyAdmin.css
new file mode 100644
index 00000000..abd310c3
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/koszi/esemenyAdmin.css
@@ -0,0 +1,39 @@
+/*
+$color1="#CAE0F7";
+$color2="#9FBFD6";
+$color3="#2E5282";
+$color4="#434037";
+$color="#929493";
+*/
+
+h2 { margin:30pt 60pt 0pt 60pt;
+ background-color: #2e5282;
+ color: white;
+ border-bottom: solid 1px #9FBFD6;
+}
+div.kosziline {
+ height:1pt;
+ margin: 0em 60pt;
+ border-bottom: solid 1px #434037;
+}
+
+fieldset.koszi { margin: 1em 60pt; border: solid 1px #888;}
+fieldset.koszi legend {
+ border: solid 1px #888;
+ background-color: #eee;
+ color: ;
+ padding: 0.1em 0.5em;
+ border-radius:5px;
+ text-align: right;
+ outline:
+}
+
+fieldset.koszi:hover legend { background-color: #9FBFD6; }
+
+fieldset.koszi input[type="submit"] { outline: 1px solid #2E5282; background-color: #2E5282; padding:1px 1em; margin: 1px; border: solid 1px white; color: white; }
+fieldset.koszi input[type="submit"]:hover { outline: 1px solid #CAE0F7; background-color: #9FBFD6; padding:1px 1em; margin: 1px; border: solid 1px white; color: white; }
+
+fieldset.koszi select option { outline: 1px solid #CAE0F7; }
+
+fieldset.koszi table {background-color: #dddddd;}
+fieldset.koszi table tr th {background-color: #eeeeee; padding: 1px 8px; border-bottom: solid 1px #2e5282;}
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/koszi/koszi.css b/mayor-orig/www/skin/classic/module-naplo/css/koszi/koszi.css
new file mode 100644
index 00000000..8636b27e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/koszi/koszi.css
@@ -0,0 +1,39 @@
+
+fieldset.koszi { margin: 4em 10em; border: solid 0px #888;}
+fieldset.koszi legend {
+ border: solid 1px #888;
+ background-color: #eee;
+ color: ;
+ padding: 0.1em 0.5em;
+ border-radius:5px;
+ text-align: right;
+}
+
+fieldset.koszi:hover legend { background-color: #9fbfd6; }
+
+fieldset.koszi table { width: 100%; background-color: #eee; }
+fieldset.koszi table tr.head th { background-color: #2e5282; color: white; border-bottom: solid 2px #434037; height:2em; }
+
+fieldset.koszi table tr.foot th { background-color: #aa0066; color: white;border-bottom: solid 1px black; border-top: solid 1px #434037; height:2em; }
+fieldset.koszi table tr.foot th.r { text-align: right ; padding-right:2em;}
+
+fieldset.koszi table tr td { }
+fieldset.koszi table tr td.r { text-align: right; padding-right: 2em; }
+fieldset.koszi table tr:nth-child(even) td { background-color: white; }
+fieldset.koszi table tr.jovahagyva td { background-color: #92ff93; }
+
+fieldset.koszi table tr td span.tag { padding: 0.1em 2em; border-radius:5px; }
+fieldset.koszi table tr td:hover span.tag { opacity: 0.9; }
+fieldset.koszi table tr td span.tag1 { background-color: #CAE0F7; }
+fieldset.koszi table tr td span.tag2 { background-color: #9FBFD6; }
+fieldset.koszi table tr td span.tag0 { background-color: #2E5282; color: white; }
+fieldset.koszi table tr td span.tag4 { background-color: #434037; color: white; }
+fieldset.koszi table tr td span.tag5 { background-color: #929493; }
+fieldset.koszi table tr td span.tag3 { background-color: #EEEEEE; }
+
+div.koszi { padding-top: 1em; width:80%; padding-bottom: 1em; margin-left:auto; margin-right:auto; text-align: center; }
+
+div.koszi form select { font-size: normal; height:2.3em; }
+div.koszi form select option { color: black; }
+div.koszi form select option.placeholder:selected { background-color: red; }
+div.koszi form input { height:2.3em; padding: 0.1em 3em;}
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/koszi/kosziAdmin.css b/mayor-orig/www/skin/classic/module-naplo/css/koszi/kosziAdmin.css
new file mode 100644
index 00000000..0a36cd66
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/koszi/kosziAdmin.css
@@ -0,0 +1,47 @@
+
+
+form input.accept { outline: solid 1px #009900; background-color: green; border: solid 1px white; color: white; padding: 0.1em 1em; }
+form input.accept:hover { outline: solid 1px #00aa00; background-color: lightgreen; border: solid 1px white; color: white; padding: 0.1em 1em; }
+
+form input.decline { outline: solid 1px #990000; background-color: red; border: solid 1px white; color: white; padding: 0.1em 1em; }
+form input.decline:hover { outline: solid 1px #aa0000; background-color: #aa0000; border: solid 1px white; color: white; padding: 0.1em 1em; }
+
+
+fieldset.koszi { margin: 4em 10em; border: solid 0px #888;}
+fieldset.koszi legend {
+ border: solid 1px #888;
+ background-color: #eee;
+ color: ;
+ padding: 0.1em 0.5em;
+ border-radius:5px;
+ text-align: right;
+}
+
+fieldset.koszi:hover legend { background-color: #55ff55; }
+
+fieldset.koszi table { width: 100%; background-color: #eee; }
+fieldset.koszi table tr.head th { background-color: #2e5282; color: white; border-bottom: solid 2px #9fbfd6; height:2em; }
+
+fieldset.koszi table tr.foot th { background-color: #aaa; border-bottom: solid 1px black; border-top: solid 1px #9fbfd6; height:2em; }
+fieldset.koszi table tr.foot th.r { text-align: right ; padding-right:2em;}
+
+fieldset.koszi table tr td { }
+fieldset.koszi table tr td.r { text-align: right; padding-right: 2em; }
+fieldset.koszi table tr:nth-child(even) td { background-color: white; }
+fieldset.koszi table tr.jovahagyva td { background-color: lightgreen; }
+
+fieldset.koszi table tr td span.tag { padding: 0.1em 2em; border-radius:5px; }
+fieldset.koszi table tr td:hover span.tag { opacity: 0.9; }
+fieldset.koszi table tr td span.tag1 { background-color: #CAE0F7; }
+fieldset.koszi table tr td span.tag2 { background-color: #9FBFD6; }
+fieldset.koszi table tr td span.tag0 { background-color: #2E5282; color: white; }
+fieldset.koszi table tr td span.tag4 { background-color: #434037; }
+fieldset.koszi table tr td span.tag5 { background-color: #929493; }
+fieldset.koszi table tr td span.tag3 { background-color: #EEEEEE; }
+
+div.koszi { padding-top: 1em; width:80%; padding-bottom: 1em; margin-left:auto; margin-right:auto; text-align: center; }
+
+div.koszi form select { font-size: normal; height:2.3em; }
+div.koszi form select option { color: black; }
+div.koszi form select option.placeholder:selected { background-color: red; }
+div.koszi form input { height:2.3em; padding: 0.1em 3em;}
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/naplo.css b/mayor-orig/www/skin/classic/module-naplo/css/naplo.css
new file mode 100644
index 00000000..0585e4cd
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/naplo.css
@@ -0,0 +1,317 @@
+@charset "UTF-8";
+
+ #toolBarIntezmeny {
+ color: #1E90FF;
+ border: solid #eeeeee;
+ border-width: 0px 0px 0px 0px;
+ font-size: 10px;
+ }
+ #toolBarHelpButton { margin-left:5px;font-size:8px; border-radius: 50%; border: solid 1px #dddddd; padding:0px 3px; color: #aaaaaa; font-weight:normal;}
+ #toolBarHelpButton:hover { background-color:#1e90ff; color: white; border-color: navy;}
+ img#mayorBuggie { height:34px; }
+ img#mayorBuggie:hover { animation-name: spin;
+ animation-duration: 1000ms;
+ animation-iteration-count: 1;
+ animation-timing-function: ease;
+ }
+ #diakSelectIcon {
+ vertical-align: middle;
+ color: #aaaaaa;
+ padding: 0px 2px;
+ cursor: pointer;
+ margin-right:2px;
+ border: solid 0px #eeeeee;
+ }
+ #diakSelectIcon:hover {color:white;}
+
+
+ table.toolBar { width: 95%; max-width: 95%; border-spacing: 0px; margin: 1em auto; overflow: auto; border-collapse: collapse;}
+ table.toolBar tr.first td.toolBarTitle { border: solid 1px #333333; }
+ table.toolBar tr.first td.toolBarTool { border-style: solid; border-width: 1px 1px 1px 1px; border-color: #333333; }
+
+ table.toolBar form { margin: 0px; padding: 0px;}
+
+/* TH */
+
+ table.toolBar th {
+ background-color: rgb(90,133,184);
+ text-align: center;
+ color: white;
+ font-size:10px;
+ padding: 0px 4px 0px 4px;
+ font-weight: 600;
+ letter-spacing: 0.2px;
+ border-color: rgb(21,71,123);
+ border-width: 1px 0px 1px 1px;
+ border-style: solid;
+ }
+ table.toolBar th button.toolBarClear { float:right; border: none; background-color: #5A85B8; height:10px;font-size:9px; color:inherit; padding:0px 2px; color: rgba(255,255,255,0.5);}
+ table.toolBar th button.toolBarClear:hover { color: rgba(255,255,255,1);}
+
+ table.toolBar th button.toolBarLeft {height: 100%;
+ line-height: 2em;background-color: rgba(100,100,100,0);
+ color: #fff; border: solid 0px #fff;
+ border-radius: 2px;padding: 4px 10px; }
+ table.toolBar th button.toolBarLeft:hover { color: rgba(255,255,255,0.5);}
+
+ table.toolBar tr td.szemely { background-color: #5A85B8; color:white; border: solid 1px #558; padding:2px 10px; color: rgba(255,255,255,0.5);}
+ table.toolBar tr td.szemely:hover { color: rgba(255,255,255,1);}
+
+
+/* TD */
+ table.toolBar td.gap { width: 50%; border-spacing: 0px; }
+ table.toolBar td.help {
+ background-color: rgb(11,51,103);
+ color: white;
+ border-width: 0px 1px 1px 1px;
+ border-color: black;
+ border-style: none solid solid solid;
+ font-size:smaller;
+ }
+ table.toolBar td.toolBarTitle {
+ background-color: white;
+ font-size: 18px;
+ font-weight: bold;
+ width: 100%;
+ }
+ table.toolBar td.toolBarTool {
+ border: solid 1px #666699;
+ background-color: #666699;
+ margin: 0px;
+ padding: 0px;
+ }
+ table.toolBar td.toolBarTool table { border-spacing: 0px; width: 100%; }
+ table.toolBar td.toolBarTool table th {
+ background-color: rgb(90,133,184);
+ text-align: left;
+ color: white;
+ font-size:10px;
+ padding: 0px 0px 0px 4px;
+ border-color: rgb(21,71,123);
+ border-width: 1px 0px;
+ border-style: solid;
+ }
+
+/* Submit */
+
+ table.toolBar input.toolSubmit,
+ table.toolBar button.toolSubmit {
+ vertical-align: middle; border: 0px none;
+ padding:0px;
+ margin:0px;
+ color: #aaaaaa;
+ background-color: inherit;
+ font-size:8px;
+ }
+ table.toolBar form:hover input.toolSubmit,
+ table.toolBar form:hover button.toolSubmit {
+ outline: solid 0px;
+ color:#dddddd;
+ }
+
+ table.toolBar form input.toolSubmit:hover {
+ outline: solid 0px;
+ color: lightgreen;
+ }
+ table.toolBar td.toolBarTool.cella select { max-width:180px; min-width:60px;}
+ table.toolBar td.toolBarTool.sor select { max-width:320px; min-width:60px;}
+
+ table.toolBar img { border: none; }
+
+/* spec */
+
+ table.toolBar table.hianyzasOsszegzo { width:100%; font-size:10px; }
+ table.toolBar table.hianyzasOsszegzo th {
+ text-align: center !important;
+ border-style: none none solid none;
+ border-color: #888888;
+ border-width: 0px 0px 1px 0px;
+ }
+ table.toolBar table.hianyzasOsszegzo td { width: 18%; border-bottom: solid 1px rgb(60,80,100); background-color: #dddddd; text-align: center; }
+
+ form.lapozo input { font-size: 10px; border: solid 1px #555555; }
+ form button.lapozo { font-size:10px; }
+ form span.lapozo { color:white; background-color: rgb(90,133,184); padding:1px 5px; border: solid 1px rgb(21,71,123);}
+
+ table.flipper input {height: 30px; color: white;
+ border-right: solid 1px #15477B;
+ border-bottom: solid 1px #15477B;
+ border-top: solid 1px #37699D;
+ border-left: solid 1px #37699D;
+ background-color: rgb(90,133,184);
+ padding:0px 10px;
+ }
+ table.flipper input:hover {background-color: rgba(90,133,184,0.6);border: solid 1px #15477B;}
+ table.flipper input.step { background-color: rgb(100,100,60); }
+ table.gomb button { height:30px; background-color: rgb(90,133,184);
+ border-right: solid 1px rgb(21, 71, 123);
+ border-bottom: solid 1px rgb(21, 71, 123);
+ border-top: solid 1px rgb(55, 105, 157);
+ border-left: solid 1px rgb(55, 105, 157);
+ }
+ table.gomb button:hover { background-color: rgba(21, 71, 123,0.7); }
+ div.beirasAdatok { text-align: center; }
+ div.beirasAdatok span { font-weight: bold; font-size: 20pt; vertical-align: middle; }
+ div.beirasAdatok img { vertical-align: middle; }
+
+ table.toolBar input { font-size: 10px; }
+
+ table.toolBar #toolBarHamburgerVezerlo { color:rgb(170, 170, 170); }
+ table.toolBar #toolBarHamburgerVezerlo:hover { color:white; }
+
+ #toolBarHamburgerLista ul { list-style-type:none; }
+ #toolBarHamburgerLista li { text-align:right; }
+ #toolBarHamburgerLista button.hamburgerIkon {
+ height: 30px;
+ color: rgb(255, 255, 255);
+ border-radius: 2px 0px 0px 2px;
+ border-right: solid 0px rgb(21, 71, 123);
+ border-bottom: solid 1px rgb(21, 71, 123);
+ border-top: solid 1px rgb(55, 105, 157);
+ border-left: solid 1px rgb(55, 105, 157);
+ background-color: rgb(90, 133, 184);
+ padding: 0px 10px;
+ margin-bottom:4px;
+ }
+ #toolBarHamburgerLista button.hamburgerIkon:hover {background-color: rgba(90,133,184,0.6);border: solid 1px #15477B;}
+
+ .diakNev:hover, .szuloNev:hover, .tankorAdat:hover, .tanarNev:hover, .zaroJegyAdat:hover, .jegyAdat:hover, .oraAdat:hover, .jegyzetAdat:hover, .dolgozatAdat:hover { cursor: pointer; }
+ .activeElement { outline: solid 2px orange; background-color: rgba(255,255,255,0.9); }
+
+ #mayorSearch a.diakNev:before, #mayorSearch a.diakNev:hover:before { content:'\e0ca'; font-family: 'Elusive-Icons'; padding-right:2px; color: rgba(100,149,237,0.4);}
+ #mayorSearch a.diakNev.aktiv:before, #mayorSearch a.diakNev:hover:before { content:'\e0ca'; font-family: 'Elusive-Icons'; color: rgba(100,149,237,1);}
+
+ #mayorSearch a.tanarNev{ color: rgb(219,6,161); }
+ #mayorSearch a.tanarNev:before, #mayorSearch a.tanarNev:hover:before { content:'\e0da'; font-family: 'Elusive-Icons'; padding-right:2px; color: rgba(219,6,161,0.4);}
+ #mayorSearch a.tanarNev.aktiv:before, #mayorSearch a.tanarNev:hover:before { content:'\e0da'; font-family: 'Elusive-Icons'; color: rgb(219,6,161)}
+
+ #mayorSearch a.szuloNev { color: rgb(76,175,80); }
+ #mayorSearch a.szuloNev:before, #mayorSearch a.szuloNev:hover:before { content:'\e091'; font-family: 'Elusive-Icons'; padding-right:2px; color: rgba(76,175,80,0.4);}
+ #mayorSearch a.szuloNev.aktiv:before, #mayorSearch a.szuloNev:hover:before { content:'\e091'; font-family: 'Elusive-Icons'; color: rgb(76,175,80)}
+
+ #updateWindowSide div.ora { }
+
+ #updateWindowSideContent .diakNev:after { font-family: 'Elusive-Icons'; content: "\e0f3"; color:cornflowerblue !important; }
+ #updateWindowSideContent .diakNev:hover:after { font-family: 'Elusive-Icons'; content: "\e0f4"; color:cornflowerblue !important; }
+ #updateWindowSideContent .diakNev:hover { color:#999 }
+
+ #updateWindowSide ul li,#updateWindowSideSub ul li { padding-top:2px; }
+ #updateWindowSideContent h3, #updateWindowSideSubContent h3 { border-bottom: solid 0px #aaa; margin: 18px 16px 8px 16px;}
+ #updateWindowSideContent h3 a:hover,#updateWindowSideSubContent h3 a:hover { color:#999 }
+ #updateWindowSideContent ul li a:hover,#updateWindowSideSubContent ul li a:hover { color:#999 }
+ #updateWindowSideTitle a:hover, #updateWindowSideSubTitle a:hover { color:#999 }
+
+/* #updateWindowSide h3:before { font-family: 'Elusive-Icons'; font-size:10px; content: "\e0a4"; padding-right:8px;font-weight:100; }*/
+
+ .updateWindowSide button.mentes, .updateWindowSide button.torles { margin: 4px 18px; height:2em; border-radius:2px; border: solid 1px white; color:white;}
+ .updateWindowSide button.mentes:hover { background-color: lightgreen; }
+ .updateWindowSide button.torles:hover { background-color: red; }
+
+ .updateWindowSide i {line-height:1.5em; background-color: rgba(255,255,255,0.4); padding-left:2px; padding-right:4px; }
+
+ span.diakEletkor {font-size:; border: solid 1px white; border-radius: 4px; padding:2px;background-color:white; color:black;}
+ span.diakEletkor:hover:after { content: " éves"; }
+
+ table.toolBar button.toolBarBtn {
+ background: inherit;
+ border: none;
+ color: white;
+ padding: 2px;
+ text-align: center;
+ text-decoration: none;
+ display: inline-block;
+ font-size: 14px;
+ margin: 0px 0px;
+ cursor: pointer;
+ color: rgba(255,255,255,0.5);
+ }
+ table.toolBar button.toolBarBtn:hover { color:white; }
+ table.toolBar button.toolBarBtn:active { color:#f06 ; background-color: cornflowerblue;}
+ table.toolBar button.toolBarBtn.loved { color: #f06; }
+ table.toolBar button.toolBarBtn.loved:active { color:red ; background-color: cornflowerblue;}
+
+ table.toolBar button.toolBarBtn.mobileOnly { display: none;}
+
+ div.arckepContainer.tanar span {background-color: #db06a1; }
+ div.arckepContainer.szulo span {background-color: #40e0d0; }
+ div.arckepContainer.diak span {background-color: #6495ed; }
+
+@media (max-width: 764px) {
+
+ #toolBarTitle {display:;}
+ #toolBarKerelem { display:none; }
+ .toolBarClear {display:none;}
+ table.toolBar table,
+ table.toolBar thead,
+ table.toolBar tbody,
+ table.toolBar th,
+ table.toolBar td,
+ table.toolBar tr {
+ display: block;
+ text-align:left;
+ }
+
+ table.toolBar table tbody { background-color: white; }
+ table.toolBar thead tr {
+ position: absolute;
+ top: -9999px;
+ left: -9999px;
+ }
+ table.toolBar tr { border: 0px solid #fff; margin-bottom:0px; }
+ table.toolBar td {
+ border: none;
+ border-bottom: 0px solid #eee;
+ position: relative;
+ padding-left: 0px;
+ background-color: #eee; color:black;
+ }
+ table.toolBar td.toolBarTitle { width: inherit; }
+ table.toolBar td.sbmt { display:none }
+
+ table.toolBar button.toolBarBtn {
+ border: none;
+ color: white;
+ padding: 2px;
+ text-align: center;
+ text-decoration: none;
+ display: inline-block;
+ font-size: 20px;
+ margin: 0px 0px;
+ cursor: pointer;
+ color: cornflowerblue;
+ }
+ table.toolBar button.toolBarBtn:hover { color: lightgreen ; }
+ table.toolBar button.toolBarBtn:active { color: lightgreen ; }
+ table.toolBar td.szemely { font-size: 24px; }
+
+ table.toolBar button.toolBarBtn.mobileOnly { display:inline-block;}
+ table.toolBar th button.toolBarLeft { background-color: #5a85b8;border: solid 0px white; }
+
+ .updateWindowSide {font-size:16px;}
+ .updateWindowSide button.mentes, .updateWindowSide button.torles {
+ font-size: 16px;
+ }
+ .updateWindowSide button.mentes { background-color: lightgreen; }
+ .updateWindowSide button.torles { background-color: red; }
+
+}
+
+@media print {
+ table.toolBar tr th { border: none;}
+ table.toolBar tr td { border: none;}
+ input[type=submit] {display:none;}
+ input[type=button] {display:none;}
+ button[type=submit] {display:none;}
+ a {text-decoration: none; color:black;}
+}
+
+@keyframes spin {
+ from {
+ transform: rotate(0deg);
+ } to {
+ transform: rotate(360deg);
+ }
+}
+
+/* Tipso Bubble Styles */
+.tipso_bubble,.tipso_bubble > .tipso_arrow{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.tipso_bubble{position:absolute;text-align:center;border-radius:6px;z-index:9999}.tipso_style{cursor:help;border-bottom:1px dotted}.tipso_title{border-radius:6px 6px 0 0}.tipso_content{word-wrap:break-word;padding:0.5em}.tipso_bubble.tiny{font-size:0.6rem}.tipso_bubble.small{font-size:0.8rem}.tipso_bubble.default{font-size:1rem}.tipso_bubble.large{font-size:1.2rem;width:100%}.tipso_bubble > .tipso_arrow{position:absolute;width:0;height:0;border:8px solid;pointer-events:none}.tipso_bubble.top > .tipso_arrow{border-top-color:#000;border-right-color:transparent;border-left-color:transparent;border-bottom-color:transparent;top:100%;left:50%;margin-left:-8px}.tipso_bubble.bottom > .tipso_arrow{border-bottom-color:#000;border-right-color:transparent;border-left-color:transparent;border-top-color:transparent;bottom:100%;left:50%;margin-left:-8px}.tipso_bubble.left > .tipso_arrow{border-left-color:#000;border-top-color:transparent;border-bottom-color:transparent;border-right-color:transparent;top:50%;left:100%;margin-top:-8px}.tipso_bubble.right > .tipso_arrow{border-right-color:#000;border-top-color:transparent;border-bottom-color:transparent;border-left-color:transparent;top:50%;right:100%;margin-top:-8px}.tipso_bubble .top_right_corner,.tipso_bubble.top_right_corner{border-bottom-left-radius:0}.tipso_bubble .bottom_right_corner,.tipso_bubble.bottom_right_corner{border-top-left-radius:0}.tipso_bubble .top_left_corner,.tipso_bubble.top_left_corner{border-bottom-right-radius:0}.tipso_bubble .bottom_left_corner,.tipso_bubble.bottom_left_corner{border-top-right-radius:0}
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/nyomtatas/diakTankorJelentkezes.css b/mayor-orig/www/skin/classic/module-naplo/css/nyomtatas/diakTankorJelentkezes.css
new file mode 100644
index 00000000..4c5ba967
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/nyomtatas/diakTankorJelentkezes.css
@@ -0,0 +1,4 @@
+
+ form.nyomtat { text-align: center; border: 1px black; border-style: solid none; padding: 10px; margin: 10px 80px;}
+ form.nyomtat h3 { border: 1px black; border-style: solid none; background-color: rgb(200,200,200); }
+ form.nyomtat label { margin: 10px 10px 2px 2px; background-color: rgb(255,255,255); }
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/nyomtatas/helyettesitesinaplo.css b/mayor-orig/www/skin/classic/module-naplo/css/nyomtatas/helyettesitesinaplo.css
new file mode 100644
index 00000000..035db08d
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/nyomtatas/helyettesitesinaplo.css
@@ -0,0 +1,7 @@
+
+ form.letolt {
+ text-align: center;
+ background-color: white;
+
+
+ } \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/nyomtatas/osztalyozonaplo.css b/mayor-orig/www/skin/classic/module-naplo/css/nyomtatas/osztalyozonaplo.css
new file mode 100644
index 00000000..6c3b52ec
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/nyomtatas/osztalyozonaplo.css
@@ -0,0 +1,2 @@
+
+ a.letoltes { display: block; border: solid green 1px; color: green; padding: 5px; text-align: center; width: 200px; margin: auto; } \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/nyomtatas/tankorNaplohozRendeles.css b/mayor-orig/www/skin/classic/module-naplo/css/nyomtatas/tankorNaplohozRendeles.css
new file mode 100644
index 00000000..adf96ba5
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/nyomtatas/tankorNaplohozRendeles.css
@@ -0,0 +1,9 @@
+
+ table.tankorBealliras { background-color: rgb(220,220,220); margin-top: 20px; }
+ table.tankorBealliras th { padding: 2px 10px; }
+ table.tankorBealliras thead th { background-color: rgb(20,40,80); color: white; }
+ table.tankorBealliras tfoot th { background-color: rgb(20,40,80); color: white; }
+ table.tankorBealliras tfoot td { background-color: rgb(20,40,80); color: white; text-align: center; }
+ table.tankorBealliras tbody th { background-color: rgb(120,140,180); color: white; }
+ table.tankorBealliras tbody td { background-color: rgb(230,240,250); color: black; text-align: center; }
+ div.torlesForm { text-align: center; }
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/orarend/ascExport.css b/mayor-orig/www/skin/classic/module-naplo/css/orarend/ascExport.css
new file mode 100644
index 00000000..86f90082
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/orarend/ascExport.css
@@ -0,0 +1,18 @@
+
+ form.export { text-align: center; margin: 1px; background-color: rgb(140,140,220); float-left; }
+ form.export h1 { text-align: center; border: solid rgb(140,160,180); border-width: 1px 0px; font-size: 12px; margin: 0px 0px 5px 0px; background-color: rgb(60,80,100); color: rgb(220,250,250); }
+ fieldset { width: 300px; margin: 0px auto; }
+
+ form.blokk { margin: 0px 5px; float: left; width: 310px; }
+ form.blokk ul { background-color: rgb(140,160,180); width: 300px; list-style-type: none; padding: 0px; margin: 0px; }
+ form.blokk ul li { background-color: rgb(180,200,220); padding: 6px; margin: 1px; height: 16px; font-size: 10px; text-align: left; }
+ form.blokk ul li select { height: 16px; font-size: 10px; }
+
+ form.tobbszoros { width: 400px; float: left; }
+ form.ok { width: 400px; float: left; }
+
+ form.export img { border: none; position: relative; top: 10px; }
+ form.export a { text-decoration: none; display: block; padding-bottom: 14px; background-color: rgb(20,40,60); color: white; margin-top: 40px; }
+ form.export a:hover { color: rgb(255,200,100); }
+
+ a#loadUrl { background: green; color: white; padding: 20px; fonr-weight: bold; margin: 30px; } \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/orarend/helyettesites.css b/mayor-orig/www/skin/classic/module-naplo/css/orarend/helyettesites.css
new file mode 100644
index 00000000..33132c5c
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/orarend/helyettesites.css
@@ -0,0 +1,44 @@
+@media screen {
+
+ table.helyettesitesek {
+ background-color: #555555; width:95%
+ }
+ table.helyettesitesek tr {
+ background-color: #dddddd;
+ }
+ table.helyettesitesek tbody tr td {
+ background-color: white;
+ }
+ table.helyettesitesek tr.plusz td {
+ background-color: #334450; color: white;
+ font-style: italic;
+ }
+ table.helyettesitesek tfoot tr th {
+ background-color: white;
+ font-size: 8px;
+ text-align: right;
+ }
+
+
+}
+@media print {
+ table.helyettesitesek {
+ width: 100%;
+ }
+ table.helyettesitesek thead tr th {
+ border: solid 1px black;
+ }
+ table.helyettesitesek tbody tr td {
+ border-style: solid;
+ border-width: 0px 1px 1px 0px;
+ }
+ table.helyettesitesek tr.plusz td {
+ font-style: italic;
+ font-weight: bold;
+ }
+ table.helyettesitesek tfoot tr th {
+ background-color: white;
+ font-size: 8px;
+ text-align: right;
+ }
+} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/orarend/orarend.css b/mayor-orig/www/skin/classic/module-naplo/css/orarend/orarend.css
new file mode 100644
index 00000000..f6bab505
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/orarend/orarend.css
@@ -0,0 +1,282 @@
+@media screen {
+
+h2 { text-align: center; color: red;}
+h2.toPrint { display: none; }
+
+table.toolBar tr td select, table.toolBar tr td option {
+ font-size:11px;
+}
+
+table.orarend {
+ width: 95%;
+ background-color: #333333;
+ max-width: 1000px;
+}
+table.orarend tr th {
+ background-color: #889988;
+ color: white;
+/* border-width: 0px 1px 2px 0px !important; */
+ width:2%;
+ height:30px;
+}
+
+table.orarend tbody tr th {
+ border-right: solid 2px #889988;
+ border-left: solid 2px #889988;
+}
+table.orarend tbody tr th.most { background-color: #99aa99; border-right: solid 2px #1e90ff;
+
+ -webkit-transition: all 0.5s ease;
+ -moz-transition: all 0.5s ease;
+ -o-transition: all 0.5s ease;
+ transition: all 0.5s ease;
+
+}
+
+/* THEAD */
+
+table.orarend thead tr th {
+ background-color: #889999;
+ color: white;
+ border-bottom: solid 1px white;
+ font-weight: 100;
+ letter-spacing:0.2px;
+}
+table.orarend thead tr th.ma { border-bottom: solid 1px #1E90FF; background-color: #9aa; }
+table.orarend thead tr th.het { background-color: #6495ED}
+
+table.orarend thead tr th.spec { background-color: #f06; }
+table.orarend thead tr th.spec.roviditett { background-color: lightgreen; }
+
+table.orarend thead tr th.hover { background-color: rgba(200,150,200,0.5); }
+table.orarend tbody tr th.hover { background-color: rgba(100,150,200,0.5); border-color: rgb(100,150,200); }
+table.orarend tbody tr th.most.hover { background-color: rgba(200,150,200,0.5); border-color: rgb(100,150,200); }
+
+/* TFOOT */
+
+table.orarend tfoot.publikus tr th {
+ background-color: lightgreen;
+ color: white;
+}
+table.orarend tfoot.nempublikus tr th {
+ background-color: #f06;
+ color: white;
+}
+table.orarend tfoot:hover tr th {
+ background-color: #8f8;
+}
+
+table.orarend tbody tr td div.oraMostVan {
+ border-style: solid;
+ border-color: lightgreen; border-width: 0px 4px 0px 4px; border-radius:2px;
+}
+
+table.orarend tbody tr td div.dolgozat {
+ background-color: orange; color:white;
+ border-radius:2px; padding:2px;
+ border: solid 1px white;
+ margin:2px;
+ font-size: x-small;
+}
+table.orarend tbody tr td div.jegyzet {
+ background-color: lightgreen; color:white;
+ border-radius:2px; padding:2px;
+ border: solid 1px white;
+ margin:2px;
+ font-size: x-small;
+}
+table.orarend tbody tr td div.jegyzet.publikus0 { }
+table.orarend tbody tr td div.jegyzet.publikus1 { border: dashed 1px white; }
+table.orarend tbody tr td div.jegyzet.publikus2 { border: dotted 1px white; }
+table.orarend tbody tr td div.jegyzet.mase.publikus1 { background-color: #4caf50;}
+table.orarend tbody tr td div.jegyzet.mase.publikus2 { background-color: #4caf50;}
+
+table.orarend tbody tr.orarendJegyzetSor th { background-color: orange; border-color: orange; font-weight:normal; font-size: x-small; cursor: pointer}
+table.orarend tbody tr.orarendJegyzetSor td.jegyzetContainer { background-color: cornflowerblue; }
+
+table.orarend tr td {
+ text-align: center;
+ background-color: #efefef;
+/* border-width: 0px 1px 2px 0px;*/
+ width:18%;
+}
+
+table.orarend tbody tr td.eppTart {
+ outline: solid 2px #1e90ff;
+ background-color: rgba(255,255,255,1);
+}
+
+
+table.orarend tr td select {
+ font-size: 10px;
+ background-color:#000011;
+ color: white
+}
+
+div.unfinished {
+ background-color: yellow;
+}
+ table.orarend tbody tr td hr { width: 80% }
+ div.normál {}
+ div.plusz {
+ background-color: #eeccee;
+ }
+ div.elmarad {
+ color: white;
+ background-color: black;
+ }
+ div.elmarad_máskor {
+ color: white;
+ background-color: #555555;
+ }
+ div.normál_máskor {
+ color: white;
+ background-color: #776699;
+ }
+ div.felügyelet {
+ background-color: #FF69B4; /* #bbaac0 */
+ }
+ div.helyettesítés {
+ background-color: #ccffcc;
+ }
+ div.összevonás {
+ background-color: #B0C4DE /*#aabbc0;*/
+ }
+ div.friss { }
+
+ div.nemVoltBent { color: #bbb; }
+
+ span.hianyzasTicker {
+ float:left;
+ width: 12px;
+ line-height: 12px;
+ border-radius: 50%;
+ text-align: center;
+ border: 2px solid #aaa;
+ font-size:12px;
+ margin-left:2px;
+ padding:2px;
+ background-color: white;
+ color:#333;
+ font-weight: bold;
+ }
+ span.hianyzasTicker.igazolatlan { border-color: #e91e63; }
+ span.hianyzasTicker.igazolt { border-color: green; }
+ span.hianyzasTicker.hianyzas { }
+ span.hianyzasTicker.keses { border-color: orange; font-size:8px;}
+ span.hianyzasTicker.felszereles { color:cornflowerblue; font-size:8px; }
+ span.hianyzasTicker.felmentes { color:cornflowerblue; font-size:8px; }
+
+ div.osztályfüggetlen { color: #eeeeee; background-color: rgba(52, 150, 185, 1); }
+ table.osztalyOrarend div.osztályfüggetlen { display:none; }
+ table.diakOrarend div.osztályfüggetlen { display:none; }
+
+ span.helyett {
+ color: gray;
+ text-decoration: line-through;
+ }
+
+ table.orarend tr td span.t0 {
+ padding:0px 2px;
+ background-color: mediumvioletred; color:white;
+ }
+ table.orarend tr td span.t1 {
+ }
+
+ table.orarend tbody tr th div {
+ color: #dddddd;
+ white-space:nowrap;font-size:xx-small; font-weight:normal; width:100%; text-align: center;
+ /* text-shadow: 0px 1px black;*/
+ }
+
+ table.orarend thead tr th:hover span.napLeiras { display:none; }
+
+ table.orarend div.orarendTools { display:none; padding: 0px; }
+ table.orarend thead tr th:hover div.orarendTools { display: block; }
+ table.orarend div.orarendTools span { padding: 4px; font-size:20px; }
+ table.orarend div.orarendTools a span { color:white; }
+ table.orarend div.orarendTools span:hover { text-shadow: -1px 0 white, 0 1px white, 1px 0 white, 0 -1px white;}
+ table.orarend div.orarendTools span.icon-info-sign:hover { color: cornflowerblue;}
+ table.orarend div.orarendTools span.jegyzet:hover { color: lightgreen;}
+ table.orarend div.orarendTools span.dolgozat:hover { color: orange;}
+ table.orarend div.orarendTools span.bezar:hover { color: #f06; }
+
+ .animated {
+ -webkit-animation-duration: 1.5s;
+ animation-duration: 1.5s;
+ -webkit-animation-fill-mode: both;
+ animation-fill-mode: both;
+ }
+
+ @-webkit-keyframes shake {
+ 0%, 100% {-webkit-transform: translateX(0);}
+ 10%, 30%, 50%, 70%, 90% {-webkit-transform: translateX(-2px);}
+ 20%, 40%, 60%, 80% {-webkit-transform: translateX(2px);}
+ }
+ @keyframes shake {
+ 0%, 100% {transform: translateX(0);}
+ 10%, 30%, 50%, 70%, 90% {transform: translateX(-2px);}
+ 20%, 40%, 60%, 80% {transform: translateX(2px);}
+ }
+ .shake {
+ -webkit-animation-name: shake;
+ animation-name: shake;
+ }
+}
+@media (max-width: 764px) {
+
+/*
+ table.orarend thead tr th div.orarendTools { display: block; border-top: solid 1px white; padding-top:4px; background-color: cornflowerblue;}
+ table.orarend thead tr th div.orarendTools span { color: #eee;}
+ table.orarend thead tr th span.napLeiras { display:block; }
+ table.orarend thead tr th:hover span.napLeiras { display:block; }
+*/
+}
+@media print {
+ table.toolBar, #nav, #nav1, #nav2, #poz, #head {
+ display: none;
+ }
+ table.orarend {
+ width: 100%;
+ }
+ table.orarend thead tr th {
+ color: black;
+ border-color: black;
+ border-style: solid;
+ border-width: 1px 1px 2px 1px;
+ width:2%;
+ height:30px;
+ }
+ table.orarend tbody tr th {
+ color: black;
+ border-color: black;
+ border-style: solid;
+ border-width: 0px 1px 2px 1px;
+ width:2%;
+ height:30px;
+ }
+
+ table.orarend tr td {
+ text-align: center;
+ border-color: black;
+ border-style: solid;
+ border-width: 0px 1px 2px 0px;
+ width:18%;
+ font-size:10px;
+ page-break-inside: avoid;
+ }
+ hr { width: 80% }
+ h2.toPrint { color: black; text-align: center; margin-top:0px; margin-bottom: 0px; padding-top:0px; padding-bottom:0px; }
+
+ table.orarend tbody tr th div {
+ color: #dddddd; text-shadow: 0px 1px black;white-space:nowrap;font-size:xx-small; font-weight:normal; width:100%; text-align: center;
+ }
+
+}
+
+sup, sub {
+ vertical-align: baseline;
+ position: relative;
+ top: -0.4em;
+ padding-left: 1px;
+}
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/orarend/orarendBetolto.css b/mayor-orig/www/skin/classic/module-naplo/css/orarend/orarendBetolto.css
new file mode 100644
index 00000000..9dd7e321
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/orarend/orarendBetolto.css
@@ -0,0 +1,6 @@
+
+ form.file { background-color: rgb(200,200,240); margin: 10px auto; padding: 20px 5px 5px 5px; width: 500px; text-align: center; border: rgb(40,80,120) solid; border-width: 3px 0px; }
+ form.file img { border: none; position: relative; top: 10px; }
+ form.file a { text-decoration: none; display: block; padding-bottom: 14px; background-color: rgb(20,40,60); color: white; margin-top: 40px; }
+ form.file a:hover { color: rgb(255,200,100); }
+
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/orarend/orarendEllenorzes.css b/mayor-orig/www/skin/classic/module-naplo/css/orarend/orarendEllenorzes.css
new file mode 100644
index 00000000..3a72f844
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/orarend/orarendEllenorzes.css
@@ -0,0 +1,3 @@
+
+ form.orarend { background-color: rgb(140,160,180); }
+ form.orarend ol.kritikus li { background: red; margin-right: 20px; padding: 4px; } \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/orarend/orarendModosito.css b/mayor-orig/www/skin/classic/module-naplo/css/orarend/orarendModosito.css
new file mode 100644
index 00000000..4d2ef3aa
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/orarend/orarendModosito.css
@@ -0,0 +1,156 @@
+@media screen {
+h2 { text-align: center; color: red;}
+h2.toPrint { display: none; }
+
+table.toolBar tr td select, table.toolBar tr td option {
+ font-size:11px;
+}
+
+table.orarend {
+ width: 85%;
+ background-color: #888;
+}
+table.orarend tr th {
+ background-color: #889988;
+ color: white;
+ border-width: 0px 1px 2px 0px;
+ width:2%;
+ height:30px;
+}
+table.orarend thead tr th {
+ background-color: rgba(52, 150, 185, 1);
+ color: white;
+ border-bottom: solid 1px white;
+ width:2%;
+ height:2em;
+ font-weight: normal;
+}
+table.orarend thead tr th.spec {
+ background-color: #2196F3;
+}
+
+table.orarend tbody tr th { font-weight: normal; padding:0px 1em; }
+
+
+table.orarend tr td {
+ text-align: center;
+ background-color: #efefef;
+ border-width: 0px 1px 2px 0px;
+ width:18%;
+}
+
+table.orarend tr td:hover { outline: solid 1px orange; }
+
+table.orarend tr td select {
+ font-size: 10px;
+ background-color:#000011;
+ color: white;
+}
+
+div.unfinished {
+ background-color: yellow;
+}
+ table.orarend tbody tr td hr { width: 80% }
+ div.normál { background-color: lightgreen !important;}
+ div.plusz { background-color: #eeccee !important;}
+ div.elmarad { background-color: black !important;}
+ div.elmarad_máskor { background-color: #555555 !important; }
+ div.normál_máskor { background-color: #776699 !important; }
+ div.felügyelet { background-color: #FF69B4 !important; }
+ div.helyettesítés { background-color: #ccffcc !important; }
+ div.összevonás { background-color: #B0C4DE !important; }
+
+ span.helyett {
+ color: gray;
+ text-decoration: line-through;
+ }
+
+ table.orarend tr td span.t0 {
+ background-color: #880000; color:white;
+ }
+ table.orarend tr td span.t1 {
+ }
+
+ table.orarend tr td select, table.orarend tr td select option { background-color: black; color: white; }
+ table.orarend tr td select.terem ,
+ table.orarend tr td select.terem option { background-color: white; color: black; }
+ table.orarend tr td select.nincs option { background-color: orange; color: black; }
+
+ table.orarend tr td select.terem option.orig { font-style: italic; color: #aaaaaa;}
+
+ table.orarend tbody tr td { background-color: #cccccc; }
+ table.orarend tbody tr td div { background-color: rgb(130,200,130); }
+ table.orarend tbody tr td div.nincsTerem { background-color: rgb(200,130,130); }
+ table.orarend tbody tr td div.moved { background-color: rgb(200,130,230) !important; }
+
+ table.orarend tbody tr:hover th { background-color: #aabbcd; }
+
+ table.orarend tbody tr td input { background-color: red; }
+
+ div#hibasOrak {
+ width:100%;
+ margin: 0px auto;
+ border-top: #F3F3F3 solid 4px;
+ border-bottom: #F3F3F3 solid 4px;
+ }
+ div.hibas { overflow: hidden; margin:1px;height:100px; width:189px; border: solid 1px black; display:inline-block; background-color: orange; }
+ div.details { font-size: x-small; padding-left:1em; }
+
+ div.button {
+ width:200px;
+ margin:20px auto;
+ }
+ div.button input {
+ width:100%;
+ background-color: #82C882; color: white;
+ padding:0.4em 0.4em;
+ border: solid 1px rgb(52, 150, 185);
+ border-radius: 2px;
+ }
+ div.button input:hover {
+ background-color:#3496B9;
+ border: solid 1px rgb(52, 150, 185);
+ color: white;
+ }
+ div.haladasi { background-color: #F44336; border: solid 1px #ccc; padding:0.5em; color:white; }
+ div.haladasi.haladasiModositando { background-color: #4CAF50; }
+ table.orarend tbody tr td div.haladasiOra { color:white; cursor: pointer; }
+ div.torlesreJelolve { background-color: #888 !important; text-decoration: line-through; outline: solid 1px red; }
+}
+@media print {
+ table.toolBar {
+ display: none;
+ }
+ table.orarend {
+ width: 100%;
+ }
+ table.orarend thead tr th {
+ color: black;
+ border-color: black;
+ border-style: solid;
+ border-width: 1px 1px 2px 1px;
+ width:2%;
+ height:30px;
+ }
+ table.orarend tbody tr th {
+ color: black;
+ border-color: black;
+ border-style: solid;
+ border-width: 0px 1px 2px 1px;
+ width:2%;
+ height:30px;
+ }
+
+ table.orarend tr td {
+ text-align: center;
+ border-color: black;
+ border-style: solid;
+ border-width: 0px 1px 2px 0px;
+ width:18%;
+ font-size:10px;
+ page-break-inside: avoid;
+ }
+ hr { width: 80% }
+ h2.toPrint { color: black; text-align: center; margin-top:0px; margin-bottom: 0px; padding-top:0px; padding-bottom:0px; }
+}
+
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/orarend/orarendTankor.css b/mayor-orig/www/skin/classic/module-naplo/css/orarend/orarendTankor.css
new file mode 100644
index 00000000..ed5bb002
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/orarend/orarendTankor.css
@@ -0,0 +1,29 @@
+h2 { text-align: center; }
+
+table.orarend {
+ width: 85%;
+ background-color: black;
+}
+table.orarend tr th {
+ background-color: #889988;
+ color: white;
+ border-width: 0px 1px 2px 0px;
+}
+
+table.orarend tr td {
+ text-align: center;
+ background-color: #eeeeff;
+ border-width: 0px 1px 2px 0px;
+}
+
+table.orarend tr td select {
+ font-size: 10px;
+ background-color:#000011;
+ color: white;
+}
+table.orarend tr td select option { background: #000011; }
+form input.sub {
+ color: white;
+ background-color: blue;
+ border: solid 1px #000088;
+} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/orarend/orarendTeremModositas.css b/mayor-orig/www/skin/classic/module-naplo/css/orarend/orarendTeremModositas.css
new file mode 100644
index 00000000..fb0172cc
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/orarend/orarendTeremModositas.css
@@ -0,0 +1,8 @@
+
+ form.terem { background-color: rgb(100,50,100); color: white; margin: 5px auto; text-align: center; width: 640px; }
+ form.terem h1 { text-align: center; font-size: 16px; background-color: rgb(80,40,80); padding: 2px; }
+ form.terem select { margin: 2px; }
+ form.terem select option.foglalt { color: red; }
+ form.terem select option.szabad { color: green; }
+
+
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/orarend/szabadTerem.css b/mayor-orig/www/skin/classic/module-naplo/css/orarend/szabadTerem.css
new file mode 100644
index 00000000..c7b8cdf2
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/orarend/szabadTerem.css
@@ -0,0 +1,103 @@
+@media screen {
+h2 { text-align: center; color: red;}
+h2.toPrint { display: none; }
+
+table.toolBar tr td select, table.toolBar tr td option {
+ font-size:normal;
+}
+
+table.orarend {
+ width: 85%;
+ background-color: black;
+}
+table.orarend tr th {
+ background-color: #889988;
+ color: white;
+ border-width: 0px 1px 2px 0px;
+ width:2%;
+ height:30px;
+}
+table.orarend thead tr th {
+ background-color: #889999;
+ color: white;
+ border-width: 0px 1px 2px 0px;
+ width:2%;
+ height:1em;
+}
+table.orarend thead tr th.spec {
+ background-color: red;
+}
+
+table.orarend tr td {
+ text-align: center;
+ background-color: #eeeeff;
+ border-width: 0px 1px 2px 0px;
+ width:18%;
+}
+
+table.orarend tr td select {
+ font-size: 10px;
+ background-color:#000011;
+ color: white
+}
+
+div.unfinished {
+ background-color: yellow;
+}
+ table.orarend tbody tr td hr { width: 80% }
+ div.normál {}
+ div.elmarad {
+ color: white;
+ background-color: black;
+ }
+ div.felügyelet {
+ background-color: #bbaac0;
+ }
+ div.helyettesítés {
+ background-color: #ccffcc;
+ }
+ div.összevonás {
+ background-color: #aabbc0;
+ }
+ span.helyett {
+ color: gray;
+ text-decoration: line-through;
+ }
+
+}
+@media print {
+ table.toolBar {
+ display: none;
+ }
+ table.orarend {
+ width: 100%;
+ }
+ table.orarend thead tr th {
+ color: black;
+ border-color: black;
+ border-style: solid;
+ border-width: 1px 1px 2px 1px;
+ width:2%;
+ height:30px;
+ }
+ table.orarend tbody tr th {
+ color: black;
+ border-color: black;
+ border-style: solid;
+ border-width: 0px 1px 2px 1px;
+ width:2%;
+ height:30px;
+ }
+
+ table.orarend tr td {
+ text-align: center;
+ border-color: black;
+ border-style: solid;
+ border-width: 0px 1px 2px 0px;
+ width:18%;
+ font-size:10px;
+ page-break-inside: avoid;
+ }
+ hr { width: 80% }
+ h2.toPrint { color: black; text-align: center; margin-top:0px; margin-bottom: 0px; padding-top:0px; padding-bottom:0px; }
+} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/orarend/tanarOrarend.css b/mayor-orig/www/skin/classic/module-naplo/css/orarend/tanarOrarend.css
new file mode 100644
index 00000000..b17b3fce
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/orarend/tanarOrarend.css
@@ -0,0 +1,2 @@
+
+ form.orarend { text-align: center; margin: 40px; } \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/orarend/termez.css b/mayor-orig/www/skin/classic/module-naplo/css/orarend/termez.css
new file mode 100644
index 00000000..bc3197c4
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/orarend/termez.css
@@ -0,0 +1,13 @@
+
+ table.teremPreferencia { background-color: #eeeeee; margin: 4px 8px; width:95%; max-width:95%;}
+ table.teremPreferencia tr th { ; border-bottom: solid 1px white;}
+ table.teremPreferencia tr td { background-color: white;}
+
+
+ table.teremPreferencia tr td.terem { font-size:smaller; }
+ table.teremPreferencia tr td a { color: #dddddd;}
+ table.teremPreferencia tr td a.del:hover { color: #880000;}
+
+ table.teremPreferencia tr td a.run:hover { color: green;}
+
+ table.teremPreferencia tr:hover td { outline: solid 1px orange;}
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/bizelomenetel.css b/mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/bizelomenetel.css
new file mode 100644
index 00000000..001470fc
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/bizelomenetel.css
@@ -0,0 +1,71 @@
+@media screen {
+
+ /* TanuloBizonyitvany */
+ table.tanuloBizonyitvany { background-color: #555555; margin-bottom: 5px;}
+ table.tanuloBizonyitvany thead th { background-color: rgb(100,140,130);
+ color: white; text-align: center; padding: 5px 8px 5px 8px; font-weight: normal;
+ }
+ table.tanuloBizonyitvany thead tr th.cim { }
+ table.tanuloBizonyitvany thead tr th.nev { }
+ table.tanuloBizonyitvany thead a { color: white; text-decoration: none; }
+ table.tanuloBizonyitvany thead a:hover { text-decoration: underline; }
+ table.tanuloBizonyitvany textarea { width: 100%; }
+ table.tanuloBizonyitvany tbody.jegyzet td { padding: 16px; font-size: 10px; background-color: rgb(200,200,200); }
+ table.tanuloBizonyitvany thead tr.evf th { height:25px; width:50px; padding-right:10px; padding-left: 10px;
+ background-color: rgb(100,110,120); color: white; font-weight: normal;
+ border-right: solid 1px #eeeeee;
+ }
+ table.tanuloBizonyitvany tbody th { height:25px; padding-right:10px; padding-left: 10px;
+ background-color: rgb(130,140,150); color: white; font-weight: normal;
+ }
+ table.tanuloBizonyitvany tbody th,table.tanuloBizonyitvany tbody td {
+ border-color: rgb(220,220,220); border-style: solid; border-width: 1px 1px 0px 0px;
+ }
+ table.tanuloBizonyitvany tbody tr.fejlec th { background-color: rgb(100,110,120); font-weight: bold; }
+ table.tanuloBizonyitvany tbody td.vanjegy { color: white; text-align: center; }
+ table.tanuloBizonyitvany tbody td.nbiz {background-color: rgb(180,100,140); text-align: center; color: white; padding-left:5px; padding-right:5px; }
+ table.tanuloBizonyitvany tbody td.biz {background-color: rgb(100,180,140); text-align: center; color: white; padding-left:5px; padding-right:5px; }
+ table.tanuloBizonyitvany tbody td.avg {background-color: #f1f1f1; text-align: center; padding-left:5px; padding-right:5px; }
+ table.tanuloBizonyitvany tbody td.oraszam { text-align: center; }
+ table.tanuloBizonyitvany tfoot tr th { background-color: rgb(120,100,100); color: white; height:1.5em; }
+ table.tanuloBizonyitvany span.megj { font-size: 8px; font-style: italic; }
+
+ table.tanuloBizonyitvany tbody tr td span.szem1 { background-color: rgb(220,140,255); display: block; padding-left: 2px; }
+
+ table.tanuloBizonyitvany tbody tr th input { background-color: rgb(160,170,180); border: solid 1px rgb(180,100,140); }
+
+ table.sign { width: 100%; margin-top: 25px;}
+ table.sign td { text-align: center; border-style: none}
+ table.sign td.vonal {
+ width: 40%;
+ border-color: black;
+ border-width: 0px 0px 1px 0px;
+ border-style: dotted;
+ }
+
+}
+@media print {
+
+ .mayorhead, .toolBar, form.modosit, .nemNyomtatando { display: none; }
+
+ table.tanuloBizonyitvany { border-width: 2px 2px 3px 3px; border-style: solid; border-color: black; }
+ table.tanuloBizonyitvany a { color: black; text-decoration: none; }
+ table.tanuloBizonyitvany td, table.tanuloBizonyitvany th { padding: 0px 10px 0px 10px; }
+ table.tanuloBizonyitvany thead th { border-width: 0px 1px 1px 0px; border-style: solid; border-color: black;
+ padding: 4px 10px 3px 10px; font-weight: normal;
+ }
+ table.tanuloBizonyitvany thead th.nev { border-width: 1px 1px 0px 0px; border-style: solid; border-color: black; font-size: 16px; }
+ table.tanuloBizonyitvany thead th.cim { border-width: 0px 1px 0px 0px; font-size: 20px; }
+ table.tanuloBizonyitvany tfoot > tr > td { border-width: 0px 1px 0px 0px; border-style: solid; border-color: black; }
+ table.tanuloBizonyitvany > tbody th, table.tanuloBizonyitvany > tbody td { border-width: 1px 1px 0px 0px; border-style: solid; border-color: black; }
+ table.tanuloBizonyitvany > tbody th { text-align: left; font-weight: normal; }
+ table.tanuloBizonyitvany > tbody tr.fejlec th { border-width: 2px 1px 1px 0px; text-align: center; font-weight: bold; padding: 3px 10px 3px 10px; }
+ table.tanuloBizonyitvany tbody.jegyzet td { padding: 10px; }
+ table.tanuloBizonyitvany .info { display: none }
+ table.tanuloBizonyitvany td.biz { font-style: italic; }
+
+ table.sign { width: 100%; margin-top: 40px; margin-bottom: 25px;}
+ table.sign td { text-align: center; border-style: none}
+ table.sign td.vonal { width: 40%; border-color: black; border-width: 0px 0px 1px 0px; border-style: dotted; }
+
+} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/bizonyitvany.css b/mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/bizonyitvany.css
new file mode 100644
index 00000000..fd2d7c75
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/bizonyitvany.css
@@ -0,0 +1,115 @@
+@media screen {
+
+/*
+ table.osztalyozo { background-color: rgb(220,220,220); color: white; }
+ table.osztalyozo a { color: white; text-decoration:none }
+ table.osztalyozo a:hover { color: white; text-decoration:underline }
+ table.osztalyozo thead th { background-color: rgb(100,120,120); }
+ table.osztalyozo thead th.nev { height:30px }
+ table.osztalyozo thead td { background-color: rgb(100,140,130); text-align: center; padding: 0px 4px 0px 4px; }
+ table.osztalyozo tfoot th { background-color: rgb(100,120,120); padding: 0px; vertical-align: center; }
+ table.osztalyozo tfoot th select { width: 200px; }
+ table.osztalyozo tfoot th input { width: 100px; }
+ table.osztalyozo tfoot th input.jegy1 { color: blue; }
+ table.osztalyozo tfoot th input.jegy2 { color: black; }
+ table.osztalyozo tfoot th input.jegy3 { color: green; }
+ table.osztalyozo tfoot th input.jegy4 { color: red; }
+ table.osztalyozo tfoot td { font-size:10px; background-color: rgb(100,140,130); text-align: center; }
+ table.osztalyozo tbody th { background-color: rgb(130,140,150); font-weight: normal; }
+ table.osztalyozo tbody th.atlag { background-color: rgb(100,100,130); padding: 0px 4px 0px 4px; }
+ table.osztalyozo tbody th.kituno { background-color: #ff0000; }
+ table.osztalyozo tbody th.jeles { background-color: #883333; }
+ table.osztalyozo tbody th.bukott { background-color: black; }
+ table.osztalyozo tbody th.i { background-color: #f1f1f1; color: green; }
+ table.osztalyozo tbody th.ni {background-color: #f1f1f1; color: red; }
+ table.osztalyozo tbody td.jegyek { background-color: #eeeeee; color: black; text-align: center; }
+ table.osztalyozo tbody td.biz { background-color: rgb(180,100,140); text-align: center; }
+ table.osztalyozo tbody td.biz select { background-color: rgb(180,100,140); }
+ table.osztalyozo tbody td.biz select:hover { background-color: rgb(250,250,250); }
+
+ table.bizstat { margin-left:60px; border: solid 1px orange; }
+ table.bizstat th { background-color: #eeeeee; font-weight: normal; }
+ table.bizstat td { background-color: #f7f7f7; text-align: right; padding-right:5px; padding-left: 5px;}
+ table.bizstat tr.ossz th { background-color: #dddddd; }
+ table.bizstat tr.ossz td { background-color: #dddddd; }
+ table.bizstat caption {
+ margin-left: 60px;
+ caption-side: top;
+ font-size:11px;
+ background-color: #778877;
+ color: white;
+ padding:2px;
+ }
+
+ table.floatleft { float:left }
+*/
+
+
+ /* TanuloBizonyitvany */
+ table.tanuloBizonyitvany { background-color: #ffffff; }
+ table.tanuloBizonyitvany thead th { background-color: rgb(100,140,130);
+ color: white; text-align: center; padding: 5px 8px 5px 8px; font-weight: normal;
+ }
+ table.tanuloBizonyitvany thead th.cim { font-size: 20px; font-weight: bold; }
+ table.tanuloBizonyitvany thead th.nev { font-size: 16px; font-weight: bold;}
+ table.tanuloBizonyitvany thead a { color: white; text-decoration: none; }
+ table.tanuloBizonyitvany thead a:hover { text-decoration: underline; }
+ table.tanuloBizonyitvany textarea { width: 100%; }
+ table.tanuloBizonyitvany tbody.jegyzet td { padding: 16px; font-size: 10px; background-color: rgb(200,200,200); }
+ table.tanuloBizonyitvany tbody th { height:25px; padding-right:10px; padding-left: 10px;
+ background-color: rgb(130,140,150); color: white; font-weight: normal;
+ }
+ table.tanuloBizonyitvany tbody th,table.tanuloBizonyitvany tbody td {
+ border-color: rgb(220,220,220); border-style: solid; border-width: 1px 1px 0px 0px;
+ }
+ table.tanuloBizonyitvany tbody tr.fejlec th { background-color: rgb(100,110,120); font-weight: bold; }
+ table.tanuloBizonyitvany tbody td.biz {background-color: rgb(180,100,140); text-align: center; color: white; padding-left:5px; padding-right:5px; }
+ table.tanuloBizonyitvany tbody td.avg {background-color: #f1f1f1; text-align: center; padding-left:5px; padding-right:5px; }
+ table.tanuloBizonyitvany tbody td.oraszam { text-align: center; }
+ table.tanuloBizonyitvany tfoot td { border-style: none; }
+ table.tanuloBizonyitvany span.megj { font-size: 8px; font-style: italic; }
+
+ table.sign { width: 100%; margin-top: 25px;}
+ table.sign td { text-align: center; border-style: none}
+ table.sign td.vonal {
+ width: 40%;
+ border-color: black;
+ border-width: 0px 0px 1px 0px;
+ border-style: dotted;
+ }
+
+ form.modosit { margin: 50px auto 0px auto; padding: 0px; width: 500px; background-color: rgb(180,100,140); }
+ form.modosit h1 { text-align: center; color: white; font-size: 14px; background-color: rgb(100,110,120);
+ padding: 3px; margin:1px;
+ border-bottom: solid 1px white;
+ }
+ form.modosit table.jegy { width:100%; background-color: #eeeeee; }
+ form.modosit table.jegy tbody tr th { background-color: #888888; color: white; font-weight: normal; }
+ form.modosit table.jegy tbody tr td { background-color: rgb(180,100,140); color: white; font-weight: normal; }
+ form.modosit table.jegy tfoot tr th { background-color: #554455; color: white; font-weight: normal; }
+}
+@media print {
+
+ .mayorhead, .toolBar, form.modosit, .nemNyomtatando { display: none; }
+
+ table.tanuloBizonyitvany { border-width: 2px 2px 3px 3px; border-style: solid; border-color: black; }
+ table.tanuloBizonyitvany a { color: black; text-decoration: none; }
+ table.tanuloBizonyitvany td, table.tanuloBizonyitvany th { padding: 0px 10px 0px 10px; }
+ table.tanuloBizonyitvany thead th { border-width: 0px 1px 1px 0px; border-style: solid; border-color: black;
+ padding: 4px 10px 3px 10px; font-weight: normal;
+ }
+ table.tanuloBizonyitvany thead th.nev { border-width: 1px 1px 0px 0px; border-style: solid; border-color: black; font-size: 16px; }
+ table.tanuloBizonyitvany thead th.cim { border-width: 0px 1px 0px 0px; font-size: 20px; }
+ table.tanuloBizonyitvany tfoot > tr > td { border-width: 0px 1px 0px 0px; border-style: solid; border-color: black; }
+ table.tanuloBizonyitvany > tbody th, table.tanuloBizonyitvany > tbody td { border-width: 1px 1px 0px 0px; border-style: solid; border-color: black; }
+ table.tanuloBizonyitvany > tbody th { text-align: left; font-weight: normal; }
+ table.tanuloBizonyitvany > tbody tr.fejlec th { border-width: 2px 1px 1px 0px; text-align: center; font-weight: bold; padding: 3px 10px 3px 10px; }
+ table.tanuloBizonyitvany tbody.jegyzet td { padding: 10px; }
+ table.tanuloBizonyitvany .info { display: none }
+ table.tanuloBizonyitvany td.biz { font-style: italic; }
+
+ table.sign { width: 100%; margin-top: 40px; margin-bottom: 25px;}
+ table.sign td { text-align: center; border-style: none}
+ table.sign td.vonal { width: 40%; border-color: black; border-width: 0px 0px 1px 0px; border-style: dotted; }
+
+} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/diak.css b/mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/diak.css
new file mode 100644
index 00000000..ea8f30e5
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/diak.css
@@ -0,0 +1,58 @@
+@media screen {
+ table.osztalyozo { background-color: rgb(220,220,220); color: white; }
+ table.osztalyozo a { color: white; text-decoration:none }
+ table.osztalyozo a:hover { color: white; text-decoration:underline }
+ table.osztalyozo thead th { background-color: #660077; padding: 2px 4px 2px 4px; }
+ table.osztalyozo thead th.nev { background-color: #660077; height:30px; font-size: 16px; }
+ table.osztalyozo thead td { background-color: #440055; text-align: center; padding: 0px 4px 0px 4px; }
+ table.osztalyozo thead th.biz { background-color: #224433; }
+ table.osztalyozo thead th.defaultSulyozas { background-color: lightgreen; }
+
+ table.osztalyozo tfoot th { background-color: rgb(100,120,120); padding: 2px; vertical-align: center; }
+ table.osztalyozo tfoot th span { padding: 1px 10px; font-weight: normal; background-color: rgb(220,220,220); }
+
+ table.osztalyozo tbody th { background-color: rgb(130,140,150); font-weight: normal; padding: 4px 4px 4px 4px; }
+ table.osztalyozo tbody th a { color: white; text-decoration: none; }
+ table.osztalyozo tbody th.atlag { background-color: rgb(100,100,130); padding: 0px 4px 0px 4px; }
+ table.osztalyozo tbody th.t { text-align: left; padding-left: 0.5em; padding-right:0.5em; }
+ table.osztalyozo tbody td { background-color: #eeeeee; }
+ table.osztalyozo tbody td.biz { background-color: #446655; text-align: center; padding-right:3px; padding-left:3px; }
+ table.osztalyozo tbody td a { text-decoration: none; }
+
+ table.osztalyozo tbody td a.jegy0, table.osztalyozo tfoot th span.jegy0 { color: grey; }
+ table.osztalyozo tbody td a.jegy1, table.osztalyozo tfoot th span.jegy1 { color: blue; }
+ table.osztalyozo tbody td a.jegy2, table.osztalyozo tfoot th span.jegy2 { color: black; }
+ table.osztalyozo tbody td a.jegy3, table.osztalyozo tfoot th span.jegy3 { color: green; }
+ table.osztalyozo tbody td a.jegy4, table.osztalyozo tfoot th span.jegy4 { color: red; }
+ table.osztalyozo tbody td a.jegy5, table.osztalyozo tfoot th span.jegy5 { color: purple; background-color: gold; }
+
+ table.osztalyozo tbody td.biz span.sikertelen {background-color:black; padding:0px 4px;}
+
+ table.osztalyozo tfoot th span {cursor: pointer}
+
+ .jegyKiemel { outline: solid 1px orange; }
+
+ table.osztalyozo thead td.ho span.literal {display: table-cell}
+ table.osztalyozo thead td.ho span.roman {display: none;}
+
+ table.osztalyozo tbody tr:hover th { background-color: rgba(100,100,100,0.5);}
+ span.addVirtualJegy {cursor: pointer; padding-left:4px;}
+ a.virtual { border: dotted 1px lightgreen; }
+}
+@media (max-width: 764px) {
+ table.osztalyozo { width:95%;}
+ table.osztalyozo thead td.ho span.literal {display: none;}
+ table.osztalyozo thead td.ho span.roman {display: table-cell;}
+}
+
+@media print {
+ input, select, .toolBar { display: none; }
+ .biz select { display: inline; }
+ a { text-decoration: none; color: black; }
+ table { background-color: rgb(200,200,200); border-spacing: 0px; border: 1px black solid; font-size: 10px; border-collapse:collapse; }
+ td { border: solid 1px black; padding: 4px 4px; }
+ th { border: solid 1px black; padding: 6px 4px 2px 4px; vertical-align: middle; }
+ table.osztalyozo tbody td { text-align: right; }
+ table.osztalyozo tfoot {display:none;}
+ table.osztalyozo tbody th.t { text-align: left; padding-left: 0.5em; padding-right:0.5em; }
+}
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/dolgozat.css b/mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/dolgozat.css
new file mode 100644
index 00000000..957f833c
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/dolgozat.css
@@ -0,0 +1,172 @@
+
+ table.dolgozatLista {
+ background-color: rgb(220,220,250);
+ margin-top: 20px;
+ width: 90%;
+ empty-cells: show;
+ margin-bottom:4em;
+ border-bottom: solid 1px rgb(40,40,100) ;
+ }
+
+ table.dolgozatLista th {
+ background-color: rgb(40,40,100);
+ color: white;
+ padding: 3px;
+ }
+
+ table.dolgozatLista th.kuszob {
+ background-color: rgb(0,100,100);
+ height:3px;
+ max-height:3px;
+ }
+
+ table.dolgozatLista td {
+ background-color: rgb(100,100,140);
+ color: white;
+ padding: 3px 10px;
+ }
+
+ table.dolgozatLista td a {
+ color: rgb(255,255,255);
+ text-decoration: none;
+ }
+
+ table.dolgozatLista td a:hover {
+ color: rgb(155,155,255);
+ }
+ table.dolgozatLista td.nincsdolgozat {background-color: rgb(100,100,100); text-align:center; }
+ table.dolgozatLista tbody tr:hover th {background-color: rgb(80,180,120); }
+ table.dolgozatLista tbody tr:hover td {background-color: rgb(80,80,120); }
+
+ /* ------- Adatok ------- */
+
+ table.dolgozatAdatok {
+ min-width:300px;
+ background-color: rgb(220,220,250);
+ margin-top: 10px;
+ }
+
+ table.dolgozatAdatok thead th {
+ background-color: rgb(60,60,110);
+ color: white;
+ padding: 4px 0px;
+ }
+
+ table.dolgozatAdatok tfoot th {
+ background-color: rgb(100,100,140);
+ padding: 4px;
+ }
+
+ table.dolgozatAdatok tfoot input {
+/* border-color: rgb(220,220,250);
+ border-width: 1px;
+ border-style: solid;
+ background-color: rgb(40,40,100);
+ color: rgb(255,255,255);
+*/
+ }
+
+ table.dolgozatAdatok tbody th {
+ background-color: rgb(140,140,200);
+ color: white;
+ padding: 2px 6px;
+ }
+
+ table.dolgozatAdatok tbody td {
+ background-color: rgb(100,100,160);
+ color: white;
+ padding: 2px 6px;
+ }
+
+ table.dolgozatAdatok tbody td select.multiple {
+ height: 150px;
+ width: 100%;
+ }
+
+ table.dolgozatAdatok td input.hosszu {
+ width: 95%;
+ }
+
+ table.dolgozatAdatok tbody td span.onClickHideShow {
+ background-color: rgb(70,70,100);
+ color: white;
+ padding: 2px 4px;
+ border: 1px solid rgb(140,140,200);
+ cursor: pointer;
+ }
+
+ table.dolgozatAdatok tbody td span.openable {
+ background-color: rgb(70,70,100);
+ color: white;
+ padding: 2px 4px;
+ border: 1px solid rgb(140,140,200);
+ }
+
+ table.dolgozatAdatok tbody td ul { padding: 0px; margin: 0px; }
+ table.dolgozatAdatok tbody td ul li { list-style-type: none; background-color: rgb(70,70,100); margin: 1px 0px; padding: 4px 12px; }
+ table.dolgozatAdatok tbody td ul li a { color: white; text-decoration: none; }
+
+ /* ------- jegyek -------- */
+
+ table.dolgozatJegyek {
+ min-width:300px;
+ background-color: rgb(220,220,250);
+ margin-top: 10px;
+ }
+
+ table.dolgozatJegyek th {
+ background-color: rgb(60,60,110);
+ color: white;
+ padding: 2px 10px;
+ }
+
+ table.dolgozatJegyek tbody th {
+ background-color: rgb(100,100,160);
+ font-weight: normal;
+ text-align:left;
+ }
+
+ table.dolgozatJegyek th a {
+ text-decoration: none;
+ color: white;
+ }
+
+ table.dolgozatJegyek th a:hover {
+ text-decoration: underline;
+ }
+
+ table.dolgozatJegyek thead td {
+ background-color: rgb(100,100,140);
+ color: white;
+ text-align: center;
+ }
+
+ table.dolgozatJegyek td {
+ background-color: rgb(200,200,240);
+ color: rgb(60,60,110);
+ text-align: center;
+ }
+
+ table.dolgozatJegyek td a {
+ text-decoration: none;
+ }
+
+ table.dolgozatJegyek td a:hover {
+ text-decoration: underline;
+ }
+
+ table.dolgozatJegyek td a.jegy3 {
+ color: green;
+ }
+
+ table.dolgozatJegyek td a.jegy4 {
+ color: red;
+ }
+
+ form.dolgozat { margin-left:5%; margin-right:5%; width:90%; color: white; text-align: center; }
+ form.dolgozat input {
+ margin: 10px; background-color: rgb(0,100,100); border: 2px solid rgb(40,40,100); color: white; font-size: large; padding:2px 4px 2px 4px;
+ }
+
+ table.dolgozatJegyek tr.atlag th { text-align:right; background-color: #9C64A0; }
+ table.dolgozatJegyek tr.atlag th:after { padding-left:4px; }
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/jegy.css b/mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/jegy.css
new file mode 100644
index 00000000..20ccb4c4
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/jegy.css
@@ -0,0 +1,39 @@
+@media screen {
+ table.jegyInfo {
+ background-color: rgb(200,200,200);
+ color: white;
+ }
+
+ table.jegyInfo thead th {
+ background-color: rgb(100,120,100);
+ height:30px;
+ }
+
+ table.jegyInfo tfoot th {
+ background-color: rgb(100,120,100);
+ padding:5px;
+ }
+
+ table.jegyInfo tbody select { max-width:300px; }
+ table.jegyInfo tbody th {
+ background-color: rgb(140,160,150);
+ padding: 0px 4px 0px 4px;
+ }
+
+ table.jegyInfo tbody td {
+ background-color: rgb(140,160,150);
+ padding: 2px 4px 2px 4px;
+ }
+
+ table.jegyInfo tr td a {color: white;text-decoration: none;}
+ table.jegyInfo tr td a:hover {color: white;text-decoration: underline;}
+ table.jegyInfo tr th a {color: white;text-decoration: none;}
+ table.jegyInfo tr th a:hover {color: white;text-decoration: underline;}
+ table.jegyInfo tr th a:visited {color: white;text-decoration: underline;}
+
+ table.jegyInfo tbody td input {
+ width: 99%;
+ }
+
+
+} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/stat.css b/mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/stat.css
new file mode 100644
index 00000000..725adee6
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/stat.css
@@ -0,0 +1,339 @@
+@media screen {
+
+ table.osztalyozo thead tr td { cursor: pointer; }
+ table.osztalyozo thead tr td.szuk { overflow:hidden; width:5px; max-width:5px;}
+ table.osztalyozo thead tr td.szuk { background-color: rgba(0,100,0,0.5);}
+ table.osztalyozo thead tr td.foTargy { background-color: #3F51B5;}
+ table.osztalyozo thead tr td.alTargy { border-bottom: solid 2px #3F51b5; background-color:#03A9F4;}
+
+ table.osztalyozo tbody tr td.szuk { background-color: rgba(100,100,100,0.75);}
+
+ table.osztalyozo {
+ background-color: rgb(220,220,220);
+ color: white;
+ width:98%;
+ }
+
+ table.osztalyozo a { color: white; text-decoration:none }
+ table.osztalyozo a:hover { color: white; text-decoration:underline }
+
+ table.osztalyozo thead th {
+ background-color: rgb(100,120,120);
+ }
+ table.osztalyozo thead th.nev { height:30px; }
+ table.osztalyozo thead th.beallitasok { text-align:left; font-weight:normal; font-size:x-small; color: rgba(255,255,255,0.7); }
+ table.osztalyozo thead th.beallitasok span { color: rgba(255,255,255,0.1); }
+ table.osztalyozo thead th.beallitasok label:hover { color: #ffffff;}
+ table.osztalyozo thead th.beallitasok span:hover { color: rgba(255,255,255,1); }
+ table.osztalyozo thead td {
+ background-color: rgb(100,140,130);
+ text-align: center;
+ padding: 0px 4px 0px 4px;
+ }
+
+ table.osztalyozo tfoot th {
+ background-color: rgb(100,120,120);
+ padding: 0px;
+ vertical-align: center;
+ }
+
+ table.osztalyozo tfoot th select {
+ width: 200px;
+ }
+ table.osztalyozo tfoot th input {
+ width: 100px;
+ }
+
+ table.osztalyozo tfoot th input.jegy1 {
+ color: blue;
+ }
+
+ table.osztalyozo tfoot th input.jegy2 {
+ color: black;
+ }
+
+ table.osztalyozo tfoot th input.jegy3 {
+ color: green;
+ }
+
+ table.osztalyozo tfoot th input.jegy4 {
+ color: red;
+ }
+
+ table.osztalyozo tfoot td {
+ font-size:10px;
+ background-color: rgb(100,140,130);
+ text-align: center;
+
+ }
+
+ table.osztalyozo tbody th { background-color: rgb(130,140,150); font-weight: normal; }
+ table.osztalyozo tbody tr.elment th { background-color: rgb(65,70,75); }
+ table.osztalyozo tbody tr.elment th.jogviszonyafelfuggesztve { background-color: rgb(30,140,150); }
+ table.osztalyozo tbody tr.elment td.jegyek { background-color: #aaaaaa; }
+ table.osztalyozo tbody td span.masikFelev { font-style: italic; color: #555}
+ table.osztalyozo tbody td span.masikFelev:after { font-size: 6pt; position: relative; top: -2pt; content: "*"; }
+
+ table.osztalyozo tbody th.jogviszonyalezarva { background-color: rgb(30,40,50); }
+ table.osztalyozo tbody th.jogviszonyafelfuggesztve { background-color: rgb(30,140,150); }
+ table.osztalyozo tbody th.magantanulo { background-color: rgb(130,40,150); }
+ table.osztalyozo tbody th.vendegtanulo { background-color: rgb(130,140,50); }
+ table.osztalyozo tbody th a { display: block; }
+
+ table.osztalyozo tbody th.atlag {
+ background-color: rgb(100,100,130);
+ padding: 0px 4px 0px 4px;
+ }
+ table.osztalyozo tbody th.kituno { background-color: #ff0000; }
+ table.osztalyozo tbody th.jeles { background-color: #883333; }
+ table.osztalyozo tbody th.bukott { background-color: black; }
+ table.osztalyozo tbody th.i { background-color: #f1f1f1; color: green; }
+ table.osztalyozo tbody th.ni {background-color: #f1f1f1; color: red; }
+
+ table.osztalyozo tbody th div.naploSorszam {background-color: #777777; border-right: solid 1px white; vertical-align: middle; display:table-cell; min-width:20px;}
+
+
+ table.osztalyozo tbody td.jegyek {
+ background-color: #eeeeee;
+ color: black;
+ text-align: center;
+ }
+
+ table.osztalyozo tbody td.biz {
+ background-color: rgb(180,100,140);
+ text-align: center;
+ }
+ table.osztalyozo tbody td.bizZaradek select {
+ width:400px;
+ }
+ table.osztalyozo thead td.bizZaradek span { color: rgba(255,255,255,0.1); }
+ table.osztalyozo thead td.bizZaradek span:hover { color: white; }
+
+ table.osztalyozo tbody td.biz select { background-color: rgb(180,100,140);}
+ table.osztalyozo tbody td.biz select:hover {background-color: rgb(250,250,250); }
+
+ table.osztalyozo tbody tr td.targyEloszlas { background-color: #ccddcc; text-align: center; color: black; }
+
+ table.osztalyozo tbody tr td div.osz { display:none; font-size:smaller; color:#666666;}
+
+ table.bizstat { margin-left:60px; border: solid 1px orange; margin-right:20px; }
+ table.bizstat th { background-color: #eeeeee; font-weight: normal; text-align: right; }
+ table.bizstat td { background-color: #f7f7f7; text-align: right; padding-right:5px; padding-left: 5px;}
+ table.bizstat tr.ossz th { background-color: #dddddd; font-weight:bold; }
+ table.bizstat tr.ossz td { background-color: #dddddd; font-weight:bold; }
+ table.bizstat caption {
+ margin-left: 0px;
+ margin-top: 2em;
+ caption-side: top;
+ font-size:12px;
+ background-color: #778877;
+ color: white;
+ padding:2px;
+ }
+
+ table.floatleft { float:left }
+
+ /* TanuloBizonyitvany */
+ table.tanuloBizonyitvany { background-color: #ffffff; }
+ table.tanuloBizonyitvany thead th {
+ background-color: rgb(100,140,130);
+ color: white;
+ text-align: center;
+ padding: 5px 8px 5px 8px;
+ font-weight: normal;
+ font-family: Times;
+ }
+ table.tanuloBizonyitvany thead th.cim { font-size: 20px; font-weight: bold; }
+ table.tanuloBizonyitvany thead th.nev { font-size: 16px; font-weight: bold; }
+
+
+
+ table.tanuloBizonyitvany thead a {
+ color: white;
+ text-decoration: none;
+ }
+ table.tanuloBizonyitvany thead a:hover {
+ text-decoration: underline;
+ }
+
+ table.tanuloBizonyitvany textarea {
+ width: 100%;
+ }
+
+ table.tanuloBizonyitvany tbody.jegyzet td {
+ padding: 16px;
+ font-size: 10px;
+ background-color: rgb(200,200,200);
+ }
+
+ table.tanuloBizonyitvany tbody th {
+ height:25px;
+ padding-right:10px; padding-left: 10px;
+ background-color: rgb(130,140,150);
+ color: white;
+ font-weight: normal;
+ }
+
+ table.tanuloBizonyitvany tbody th,table.tanuloBizonyitvany tbody td {
+ border-color: rgb(220,220,220);
+ border-style: solid;
+ border-width: 1px 1px 0px 0px;
+ }
+
+
+ table.tanuloBizonyitvany tbody tr.fejlec th {
+ background-color: rgb(100,110,120);
+ font-weight: bold;
+ }
+ table.tanuloBizonyitvany tbody td.biz {background-color: rgb(180,100,140); text-align: center; color: white; padding-left:5px; padding-right:5px; }
+ table.tanuloBizonyitvany tbody td.avg {background-color: #f1f1f1; text-align: center; padding-left:5px; padding-right:5px; }
+
+ table.tanuloBizonyitvany tfoot td {
+ border-style: none;
+ }
+
+ table.sign { width: 100%; margin-top: 25px;}
+ table.sign td { text-align: center; border-style: none}
+ table.sign td.vonal {
+ width: 40%;
+ border-color: black;
+ border-width: 0px 0px 1px 0px;
+ border-style: dotted;
+ }
+
+ /* iskolaStatisztika */
+ table.iskolaStatisztika { background-color: #eeeeee; empty-cells: show;}
+ table.iskolaStatisztika thead th {
+ background-color: rgb(100,140,130);
+ color: white;
+ text-align: center;
+ padding: 2px;
+ font-weight: normal;
+ }
+ table.iskolaStatisztika tfoot { }
+ table.iskolaStatisztika tbody td { text-align: right; }
+ table.iskolaStatisztika tbody th { background-color: rgb(190,210,200); }
+ table.iskolaStatisztika tbody td { background-color: rgb(210,230,220); }
+ table.iskolaStatisztika tbody.hianyzas th { background-color: rgb(180,180,150); }
+ table.iskolaStatisztika tbody.hianyzas td { background-color: #ccccc0; }
+ table.iskolaStatisztika tbody.atlag th { background-color: rgb(220,220,220); text-align: left; padding: 0px 6px 0px 6px; font-weight: normal;}
+ table.iskolaStatisztika tbody.atlag th.ossz { background-color: rgb(220,220,220); text-align: center; }
+ table.iskolaStatisztika tbody.atlag td { background-color: white; }
+ table.iskolaStatisztika tbody.atlag tr:hover td, table.iskolaStatisztika tbody.atlag tr:hover th { background-color: #cccccc; }
+ table.iskolaStatisztika tbody.atlag tr.ossz th { background-color: rgb(200,200,210); text-align: center; font-weight: bold;}
+ table.iskolaStatisztika tbody.atlag tr.ossz td { background-color: rgb(220,220,230); }
+
+}
+@media print {
+
+ .mayorhead, .toolBar, img { display: none; }
+
+ table.osztalyozo { border: solid 1px black; width:100%}
+ table.osztalyozo td { border-style: none solid solid none; border-width: 1px; text-align: center }
+ table.osztalyozo th { border: solid 1px black; }
+ table.osztalyozo a { text-decoration: none; color: black }
+ table.osztalyozo tbody th div.naploSorszam { display:none; }
+
+ table.tanuloBizonyitvany {
+ border-width: 2px 2px 3px 3px;
+ border-style: solid;
+ border-color: black;
+ }
+ table.tanuloBizonyitvany a {
+ color: black;
+ text-decoration: none;
+ }
+ table.tanuloBizonyitvany td, table.tanuloBizonyitvany th {
+ padding: 0px 10px 0px 10px;
+
+ }
+ table.tanuloBizonyitvany thead th {
+ border-width: 0px 1px 1px 0px;
+ border-style: solid;
+ border-color: black;
+ padding: 4px 10px 3px 10px;
+ font-weight: normal;
+ font-family: Times;
+ }
+ table.tanuloBizonyitvany thead th.nev {
+ border-width: 1px 1px 0px 0px;
+ border-style: solid;
+ border-color: black;
+ font-size: 16px;
+ }
+ table.tanuloBizonyitvany thead th.cim {
+ border-width: 0px 1px 0px 0px;
+ font-size: 20px;
+ }
+ table.tanuloBizonyitvany tfoot > tr > td {
+ border-width: 0px 1px 0px 0px;
+ border-style: solid;
+ border-color: black;
+ }
+
+ table.tanuloBizonyitvany > tbody th, table.tanuloBizonyitvany > tbody td {
+ border-width: 1px 1px 0px 0px;
+ border-style: solid;
+ border-color: black;
+ }
+ table.tanuloBizonyitvany > tbody th {
+ text-align: left;
+ font-weight: normal;
+ }
+ table.tanuloBizonyitvany > tbody tr.fejlec th {
+ border-width: 2px 1px 1px 0px;
+ text-align: center;
+ font-weight: bold;
+ padding: 3px 10px 3px 10px;
+ }
+ table.tanuloBizonyitvany tbody.jegyzet td {
+ padding: 10px;
+ }
+ table.tanuloBizonyitvany .info { display: none }
+ table.tanuloBizonyitvany td.biz { font-style: italic; }
+
+ table.sign { width: 100%; margin-top: 40px; margin-bottom: 25px;}
+ table.sign td { text-align: center; border-style: none}
+ table.sign td.vonal {
+ width: 40%;
+ border-color: black;
+ border-width: 0px 0px 1px 0px;
+ border-style: dotted;
+ }
+
+ /* ------- */
+ table.iskolaStatisztika { empty-cells: show;}
+ table.iskolaStatisztika thead th {
+ font-size: 12px;
+ text-align: center;
+ padding: 2px;
+ font-weight: bold;
+ border-style: none none solid none; border-color: #777777; border-width:2px;
+ }
+ table.iskolaStatisztika th { border-style: none solid solid solid; border-color: #777777; border-width:1px; }
+ table.iskolaStatisztika td { border-style: none solid solid none; border-color: #777777; border-width:1px; }
+ table.iskolaStatisztika th.ossz { border-style: none solid solid none; border-color: #777777; border-width:1px; }
+
+ table.iskolaStatisztika tbody td { text-align: right; }
+
+ table.iskolaStatisztika tbody.atlag th { text-align: left; padding-left: 6px; padding-right: 6px; font-weight: normal;}
+ table.iskolaStatisztika tbody.atlag th.ossz { text-align: center; }
+ table.iskolaStatisztika tbody.atlag tr.ossz th { height:25px; border-width: 0px 1px 2px 1px;text-align: center; font-weight: bold;}
+ table.iskolaStatisztika tbody.atlag tr.ossz td { border-width: 1px 1px 2px 1px; font-weight: bold}
+
+ table.bizstat { margin-left:60px; border: solid 1px black; margin-right:20px; }
+ table.bizstat th { font-weight: normal; text-align: right; }
+ table.bizstat td { text-align: right; padding-right:5px; padding-left: 5px;}
+ table.bizstat tr.ossz th { background-color: #dddddd; font-weight:bold; }
+ table.bizstat tr.ossz td { background-color: #dddddd; font-weight:bold; }
+ table.bizstat caption {
+ margin-left: 0px;
+ margin-top: 2em;
+ caption-side: top;
+ font-size:12px;
+ color: white;
+ padding:2px;
+ }
+
+ table.floatleft { float:left }
+} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/szempontRendszer.css b/mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/szempontRendszer.css
new file mode 100644
index 00000000..3b44ffb0
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/szempontRendszer.css
@@ -0,0 +1,10 @@
+
+ form.szr { background-color: rgb(200,200,240); margin: 20px; text-align: center; padding: 20px; }
+ form.szr textarea { width: 80%; height: 300px; margin: auto; }
+ form.szr ol { text-align: left; font-weight: bold; margin: 0px 20px; }
+ form.szr ol ul { font-weight: normal; font-style: italic; margin-bottom: 10px; }
+
+ table.lista { background-color: rgb(20,40,60); margin: auto; border-spacing: 1px; }
+ table.lista th { background-color: rgb(200,200,200); }
+ table.lista td { background-color: rgb(230,230,230); }
+ table.lista th, table.lista td { padding: 4px; } \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/szovegesErtekeles.css b/mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/szovegesErtekeles.css
new file mode 100644
index 00000000..1cf46b55
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/szovegesErtekeles.css
@@ -0,0 +1,10 @@
+
+ form.ertekeles { background-color: rgb(255,255,255); margin: 4px 20px; padding: 10px 20px; border: solid black; border-width: 2px 0px 0px 0px; }
+ form.ertekeles h1 { font-size: 16px; text-align: center; color: white; background-color: rgb(40,60,80); margin: 0px 0px 2px 0px; padding: 2px; }
+ form.zaro h1 { background-color: rgb(120,60,40); }
+ form.ertekeles h2 { font-size: 14px; text-align: center; border: black solid; border-width: 1px 0px; margin: 0px; padding: 0px; }
+ form.ertekeles span.egyediMinosites { font-style: italic; }
+ form.ertekeles ol li { margin-top: 26px; }
+ form.ertekeles ol ul li { margin-top: 4px; }
+ form.ertekeles ol ul li input[type=text] { width: 95%; background-color: rgb(220,220,200); }
+ form.ertekeles input[type=submit] { width: 100%; background-color: #4a8; }
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/tankor.css b/mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/tankor.css
new file mode 100644
index 00000000..ad0d51a0
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/tankor.css
@@ -0,0 +1,152 @@
+@media screen {
+ table.osztalyozo {
+ background-color: rgb(220,220,220);
+ color: white;
+ }
+
+ table.osztalyozo a { color: white; text-decoration:none }
+ table.osztalyozo a:hover { color: white; text-decoration:underline }
+
+ table.osztalyozo thead th { background-color: rgb(100,120,120); }
+ table.osztalyozo thead th select { background-color: rgb(100,120,120); color: white; border: 1px solid rgb(120,140,140); }
+ table.osztalyozo thead th.nev { height:30px }
+ table.osztalyozo thead th.defaultSulyozas { background-color:lightgreen; }
+ table.osztalyozo thead th select.sulyozas { width:44px; }
+
+ table.osztalyozo thead td {
+ background-color: rgb(100,140,130);
+ text-align: center;
+ padding: 0px 4px 0px 4px;
+ }
+
+ table.osztalyozo tfoot th {
+ background-color: rgb(100,120,120);
+ padding: 0px;
+ vertical-align: middle;
+ }
+
+ table.osztalyozo tfoot th select {
+ width: 200px;
+ }
+ table.osztalyozo tfoot th input {
+ width: 100px;
+ }
+
+ table.osztalyozo tfoot th input.jegy1 { color: blue; }
+ table.osztalyozo tfoot th input.jegy2 { color: black; }
+ table.osztalyozo tfoot th input.jegy3 { color: green; }
+ table.osztalyozo tfoot th input.jegy4 { color: red; }
+ table.osztalyozo tfoot th input.jegy5 { color: purple; /*background-color: gold; font-weight: bold;*/ }
+
+ table.osztalyozo tbody th {
+ background-color: rgb(130,140,150);
+ font-weight: normal;
+ }
+ table.osztalyozo tbody tr.magantanulo th { background-color: purple; }
+
+ table.osztalyozo tbody th.diakNev { text-align:left; padding-left:4px; }
+ table.osztalyozo tbody th.diakNevTxt { width:120px;}
+ table.osztalyozo tbody th.face { }
+/*
+ table.osztalyozo tbody th.diakNev.c { text-align:center; padding-left:2px; padding-right:2px; }
+*/
+ table.osztalyozo tbody th.atlag {
+ background-color: rgb(100,100,130);
+ padding: 0px 4px 0px 4px;
+ }
+
+ table.osztalyozo tbody th.dolgozat {
+ background-color: rgb(100,120,120);
+ }
+
+ table.osztalyozo tbody td.jegyek { background-color: #eeeeee; white-space: nowraps; }
+ .ujSzemeszter { border: rgb(220,220,220) solid; border-width: 0px 0px 0px 6px; }
+ table.osztalyozo tbody tr:hover th { background-color: #44a; }
+ table.osztalyozo tbody tr:hover td,
+ table.osztalyozo tbody tr:hover td a { background-color: #aaf; }
+ table.osztalyozo tbody tr:hover td.dolgozat,
+ table.osztalyozo tbody tr:hover td.dolgozat a { background-color: #aca; }
+ table.osztalyozo tbody tr:hover td.biz { background-color: rgb(100,40,45); }
+
+ table.osztalyozo tbody td { text-align: right; }
+ table.osztalyozo tbody td.dolgozat { background-color: rgb(160,180,160); }
+ table.osztalyozo tbody td.dolgozatMase { background-color: rgb(200,200,160); }
+
+ table.osztalyozo tbody td a {
+ text-decoration: none;
+ }
+
+ table.osztalyozo tbody td a.jegy1 { color: blue; }
+ table.osztalyozo tbody td a.jegy2 { color: black; }
+ table.osztalyozo tbody td a.jegy3 { color: green; }
+ table.osztalyozo tbody td a.jegy4 { color: red; }
+ table.osztalyozo tbody td a.jegy5 { color:purple; /*background-color: gold; font-weight: bold;*/ }
+
+ table.osztalyozo tbody td a.jegy1mase { color: rgb(55,55,160); background-color: rgb(200,200,160); font-size: 0.8em; padding: 0.2em; }
+ table.osztalyozo tbody td a.jegy2mase { color: rgb(80,80,80); background-color: rgb(200,200,160); font-size: 0.8em; padding: 0.2em; }
+ table.osztalyozo tbody td a.jegy3mase { color: rgb(55,160,55); background-color: rgb(200,200,160); font-size: 0.8em; padding: 0.2em; }
+ table.osztalyozo tbody td a.jegy4mase { color: rgb(160,55,55); background-color: rgb(200,200,160); font-size: 0.8em; padding: 0.2em; }
+ table.osztalyozo tbody td a.jegy5mase { color: rgb(160,160,55); background-color: rgb(200,200,160); font-size: 0.8em; padding: 0.2em; }
+
+ table.osztalyozo #megjegyzes { width: 50%; min-width: 200px; background: #eee; border: solid 1px rgb(100,120,120); margin: 1px 0px;}
+ table.osztalyozo #megjegyzes:focus { background: #ffa; color: black; border: 1px outset #eee; }
+
+/* table.osztalyozo tbody td a.masodikFelev { background-color: rgb(200, 250, 200); padding: 2px; } */
+
+ table.osztalyozo tbody td.biz {
+ background-color: rgb(180,120,140);
+ text-align: center;
+ }
+ table.osztalyozo tbody td.biz select { width:95px; }
+
+ table.osztalyozo tbody tr th.c:hover span { display: none; }
+ table.osztalyozo tbody tr th.c:hover:after { content: "\e0ca"; font-family: "Elusive-Icons";}
+
+ table.osztalyozo tbody td.biz select { background-color: rgb(180,120,140); }
+ table.osztalyozo tbody td.biz select option { color: black; }
+
+
+ /* jegyInfo */
+ table.jegyInfo a { color: black; text-decoration: none; width: 800px; }
+ table.jegyInfo thead th { font-size:large; margin-bottom:2px; padding-bottom: 2px; border-bottom: solid 1px #eeeeee; }
+ table.jegyInfo tbody input { width: 99%; border: solid 1px #eeeeee;}
+ table.jegyInfo tbody th { padding-right:1em; text-align: left;}
+ table.jegyInfo tbody select { width: 99%; }
+ table.jegyInfo tfoot input { width: 50px;
+ color: white;
+ padding: 0.4em 0.4em;
+ border: solid 1px #3496B9;
+ border-radius: 2px;
+ }
+ table.jegyInfo tfoot input.modosit { background-color: #82C882; }
+ table.jegyInfo tfoot input.modosit:hover { background-color: #82fa82; }
+ table.jegyInfo tfoot input.torol { background-color: #f06; }
+ table.jegyInfo tfoot input.torol:hover { background-color: #a06; }
+
+ #updateWindow { width: 800px; top: 200px; left: 50%; margin-left: -400px; min-height: 100px; height: 800px; mmax-height: 90%; }
+ #updateWindow form { padding: 20px; }
+ #updateWindow form h1 { text-align: center; margin-bottom: 0px; }
+ #updateWindow form h2 { text-align: center; }
+ #updateForm { max-height: 80%; overflow: auto; }
+
+ #updateWindow form input.szoveges[type=submit] { width: 100%; background-color: #82c882; color: white; padding: 0.4em; border: solid 1px #3496B9; border-radius: 2px; }
+ #updateWindow form input.szoveges[type=submit]:hover { background-color: #82fa82; }
+
+ table.osztalyozo thead td.ho span.literal {display:;}
+ table.osztalyozo thead td.ho span.roman {display: none;}
+
+}
+@media (max-width: 764px) {
+ table.osztalyozo { width:95%;}
+ table.osztalyozo thead td.ho span.literal {display: none;}
+ table.osztalyozo thead td.ho span.roman {display: inline-block;}
+}
+@media print {
+ input, select, .toolBar { display: none; }
+ .biz select { display: inline; width: 80px; }
+ a { text-decoration: none; color: black; }
+ table { background-color: rgb(200,200,200); border-spacing: 0px; border: 0px black solid; font-size: 10px; }
+ td { border: 1px #888 solid; padding: 4px 4px; }
+ th { border: 1px #888 solid; padding: 6px 4px 2px 4px; vertical-align: middle; }
+ table.osztalyozo tbody th.diakNev { text-align:left; }
+}
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/targySorrend.css b/mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/targySorrend.css
new file mode 100644
index 00000000..611a544d
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/targySorrend.css
@@ -0,0 +1,10 @@
+
+ form.sorrend { width: 300px; margin: 10px auto; padding: 5px; text-align: center; background-color: rgb(100,120,140); }
+ form.sorrend h1 { font-size: 14px; padding: 2px; margin: 0px; background-color: rgb(160,100,100); color: white; }
+ form.sorrend select { margin: 5px; }
+
+ #targyUl { list-style-image:none; list-style-type:none; margin-top:5px; margin:0px; padding:0px; text-align: left;}
+ #targyUl li { padding: 2px; margin:0px; background-color: white; margin-top: 1px; }
+ #targyUl li span.handle { padding: 2px; margin: 0px 10px 0px 2px; background-color: #E8A400; color: white; cursor: move; }
+
+ #submit { margin: 2px; }
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/vizsga.css b/mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/vizsga.css
new file mode 100644
index 00000000..80c452a0
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/vizsga.css
@@ -0,0 +1,30 @@
+
+ form.jelentkezes { margin: 10px 30px; padding: 10px; background-color: rgb(40,80,80); color: white; text-align: center; border: solid rgb(20,60,60); border-width: 3px 0px; }
+ form.jelentkezes h1 { border: solid white; border-width: 1px 0px; margin-top: 0px; font-size: 12pt; background-color: rgb(20,60,60); }
+
+ form.lista { margin: 0px 30px; padding: 0px; background-color: rgb(40,80,90); color: white; text-align: center; border: solid rgb(20,60,70); border-width: 3px 0px; }
+ form.lista h1 { border: solid white; border-width: 1px 0px; margin-top: 0px; font-size: 12pt; background-color: rgb(20,60,70);}
+ form.lista table { margin: 0px auto; background-color: rgb(40,50,60); }
+ form.lista th { background-color: rgb(10,30,50); padding: 2px 4px; }
+ form.lista td { background-color: rgb(20,30,30); padding: 2px 4px; }
+ form.lista table tbody tr td { text-align:left; padding-left:4px; }
+ form.lista table tbody tr:hover td { outline: solid 1px #888;}
+
+ form.lista table tbody tr.javitovizsga td { background-color: rgb(60,70,80);}
+ form.lista table tbody tr.beszamoltatovizsga td { background-color: rgb(80,70,60);}
+
+ form.lista td.kiemelt { background-color: rgb(240,150,0); }
+ form.lista td.hideShowContainer label { color: black; font-weight: bold; padding: 0px 10px 0px 4px; }
+ form.lista td.szoveg { text-align: left; width: 400px; font-style: italic; }
+ form.lista td.jegy { text-align: left; }
+ form.lista td.jegy span { float: left; }
+ form.lista td.jegy span.jegy { float: right; color: yellow; padding-left: 10px;}
+ form.lista input[type="text"] { width: 100px; }
+ form.lista span.onClickHideShow {
+ color: red; float: right; font-size: 12px; font-weight: bold;
+ border: red 1px dotted;
+ padding: 2px 10px;
+ }
+ form.lista td a { color: white; text-decoration: none; display: block; background-color: red; padding: 2px 4px; font-weight: bold; }
+ form.lista td a:hover { color: red; background-color: white; }
+ form.lista span.onClickHideShow:hover { background-color: rgb(20,60,60); cursor: pointer; }
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/vizsgaJelentkezes.css b/mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/vizsgaJelentkezes.css
new file mode 100644
index 00000000..b0dac656
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/vizsgaJelentkezes.css
@@ -0,0 +1,2 @@
+
+ \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/zaroJegyCheck.css b/mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/zaroJegyCheck.css
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/osztalyozo/zaroJegyCheck.css
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/sni/diakAllapot.css b/mayor-orig/www/skin/classic/module-naplo/css/sni/diakAllapot.css
new file mode 100644
index 00000000..3c6e15fb
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/sni/diakAllapot.css
@@ -0,0 +1,27 @@
+
+ div.sni { padding: 10px; }
+
+/*
+ div.mentor form.sniAdat { }
+ div.mentor form.sni { }
+ div.mentor form.sni:hover, div.mentor form.sniAdat:hover { }
+*/
+ form.sni:hover, form.sniAdat:hover { }
+
+ form.sniAdat { margin: 1px auto; padding: 10px; }
+
+ form.sniAdat table { margin: auto; }
+ form.sniAdat td { text-align: left; padding: 20px; vertical-align: top; }
+
+ form.sni { padding: 10px; margin: 1px; }
+ form.sni fieldset { border: solid 1px #aaaaaa; margin-bottom:4em;}
+ form.sni fieldset.utolso { }
+ form.sni fieldset legend { background-color: lightgreen; border: solid 1px lime; padding:2px 4px; }
+
+ form.sni h2 { text-align: center; border: solid black; border-width: 1px 0px; padding:10px; }
+ form.sni input { font-size: 12px; }
+ form.sni ul { margin-top: 0px; list-style-type: none; }
+ form.sni li { background-color: rgb(150,200,150); margin-top: 1px; }
+ form.sni:hover li { background-color: rgb(150,250,150); }
+
+ form.sni label { font-weight:bold;} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/sni/fejlesztesiTerv.css b/mayor-orig/www/skin/classic/module-naplo/css/sni/fejlesztesiTerv.css
new file mode 100644
index 00000000..13d04475
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/sni/fejlesztesiTerv.css
@@ -0,0 +1,21 @@
+
+
+
+ div.sni { text-align: center; padding: 2px; }
+ div.sni h1 { text-align: center; }
+
+ div.sni form { text-align: center; background-color: ; padding: 10px; margin: 2px auto; }
+ div.sni form:hover { background-color: ; }
+ div.mentor form { background-color: ; }
+ div.mentor form:hover { background-color:; }
+ div.sni form table { margin: auto; }
+ div.sni form td { text-align: left; padding: 20px; vertical-align: top; }
+ div.sni form h2 { text-align: center; border: solid black; border-width: 1px 0px; }
+ div.sni form label { }
+ div.sni form input { font-size: 12px; }
+ div.sni form option { font-size: 12px; padding: 2px; text-align: right; }
+ div.sni form select.multi option { text-align: left; }
+
+ div.sni form fieldset { }
+ div.sni form fieldset.utolso { }
+
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/sni/tantargyiFeljegyzesek.css b/mayor-orig/www/skin/classic/module-naplo/css/sni/tantargyiFeljegyzesek.css
new file mode 100644
index 00000000..a881aede
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/sni/tantargyiFeljegyzesek.css
@@ -0,0 +1,15 @@
+
+ h2.sni { text-align: center; border: solid black; border-width: 1px 0px; font-size: 14px; font-weight: bold; width: 800px; margin: auto;}
+ ul.sni { text-align: center; padding: 2px; list-style-type: none; width: 800px; margin: 0px auto; }
+
+ ul.sni form { text-align: center; background-color: rgb(220,200,200); width: 97%; padding: 10px; margin: 2px auto; }
+ ul.sni form:hover { background-color: rgb(250,200,200); }
+ ul.sni li.mod form { background-color: rgb(200,220,200); }
+ ul.sni li.mod form:hover { background-color: rgb(200,250,200); }
+ ul.sni input[type=submit] { vertical-align: top; padding: 34px 5px; }
+ ul.sni li p { width: 700px; height: 80px; background-color: rgb(225,210,210); margin: 5px auto; border: 1px solid rgb(200,200,200); text-align: left; }
+
+
+
+
+
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/stat/lemorzsolodas.css b/mayor-orig/www/skin/classic/module-naplo/css/stat/lemorzsolodas.css
new file mode 100644
index 00000000..71919e09
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/stat/lemorzsolodas.css
@@ -0,0 +1,3 @@
+
+ div.mayorbody {padding:20px;}
+ table.lemorzsolodas { background-color: #f9f9f9; } \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/stat/letszam.css b/mayor-orig/www/skin/classic/module-naplo/css/stat/letszam.css
new file mode 100644
index 00000000..c5d01202
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/stat/letszam.css
@@ -0,0 +1,11 @@
+
+
+ table.letszamStat {
+ background-color: #eeeeee;
+ }
+ table.letszamStat thead tr th { background-color: #555555; color: white; }
+ table.letszamStat tfoot tr th { background-color: #555555; color: white; font-size:smaller;}
+
+ table.letszamStat tbody tr th { background-color: #888888; color: white; }
+ table.letszamStat tbody tr td { background-color: #dddddd; color: black; text-align: center; width:2em; }
+ table.letszamStat tbody tr td.l { color: #555555; }
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/stat/tantargyFelosztas.css b/mayor-orig/www/skin/classic/module-naplo/css/stat/tantargyFelosztas.css
new file mode 100644
index 00000000..f1b65851
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/stat/tantargyFelosztas.css
@@ -0,0 +1,36 @@
+@media screen {
+
+ table#tfStat tr.hide { display: none; }
+
+ table#tfStat th { background-color: #ddd; padding: 2px 6px; }
+ table#tfStat td { background-color: #eee; padding: 2px 6px; }
+ table#tfStat td.gap { background-color: #fff; }
+ table#tfStat td.number { text-align: right; min-width: 30px; }
+ table#tfStat td.alert,
+ table#tfStat td span.alert { color: red; }
+
+ table#tfStat th.slide { cursor: pointer; min-width: 180px; }
+
+ table#tfStat span.icon-chevron-up,
+ table#tfStat span.icon-chevron-down { float: right; margin: 4px 0 0 10px; }
+}
+@media print {
+
+ table.toolBar, span.icon-lock, span.icon-remove-circle, div.icon-lock { display: none; }
+ table#tfStat span.icon-chevron-up,
+ table#tfStat span.icon-chevron-down { display: none; }
+
+ table#tfStat { border-spacing: 0; border-collapse: collapse; line-height: 24px; }
+ table#tfStat, table#tfStat td, table#tfStat th { border: 1px solid black; }
+
+ table#tfStat th { background-color: #fff; padding: 2px 6px; }
+ table#tfStat td { background-color: #fff; padding: 2px 6px; }
+ table#tfStat td.gap { background-color: #fff; }
+ table#tfStat td.number { text-align: right; min-width: 30px; }
+ table#tfStat td.alert,
+ table#tfStat td span.alert { color: red; }
+
+ table#tfStat th.slide { min-width: 180px; }
+
+
+} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/tanev/diakTanarai.css b/mayor-orig/www/skin/classic/module-naplo/css/tanev/diakTanarai.css
new file mode 100644
index 00000000..b92fccf6
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/tanev/diakTanarai.css
@@ -0,0 +1,9 @@
+
+ table.lista { background-color: rgb(160,0,0); margin: 0px auto; padding: 4px; width: 500px; }
+ table.lista td.nev { text-align: left; background-color: rgb(240,240,100); margin: 1px 0px; padding: 4px; }
+ table.lista td.osztaly { text-align: left; background-color: rgb(240,240,100); margin: 1px 0px; text-align: center; padding: 4px; }
+ table.lista td.tanar { text-align: right; background-color: rgb(240,240,100); margin: 1px 0px; font-style: italic; padding: 4px; }
+ table.lista th { background-color: rgb(170,170,60); font-weight: bold; font-style: normal; padding: 4px; }
+
+ form.osztaly { text-align: center; border: 1px dotted rgb(20,60,100); margin: 10px; }
+ form.osztaly label { background-color: rgb(200,220,240); padding: 4px; margin: 0px 4px 0px 0px; }
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/tanev/fogadoOra.css b/mayor-orig/www/skin/classic/module-naplo/css/tanev/fogadoOra.css
new file mode 100644
index 00000000..786ffc78
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/tanev/fogadoOra.css
@@ -0,0 +1,46 @@
+
+@media screen {
+ form.fogado { margin: 10px 20px; }
+ form.fogado table { background-color: rgb(130,160,130); margin: 0px auto; }
+ form.fogado table td { background-color: rgb(250,250,200); }
+ form.fogado table th { background-color: rgb(150,20,20); color: white; padding: 4px; }
+ form.fogado table thead td { background-color: rgb(180,30,30); color: white; text-align: center; }
+ form.fogado table thead th { }
+ form.fogado table thead th.cim { border-bottom: solid 1px white; height:3em; }
+ form.fogado table tfoot th { }
+ form.fogado table tbody td { text-align: center; }
+ form.fogado table tbody td.ok { background-color: lightgreen; }
+ form.fogado table tbody td.foglalt { background-color: #666666; }
+ form.fogado table tbody td.torol { background-color: rgb(130,180,130); }
+ form.fogado table tbody th { text-align: left; background-color: rgb(180,30,30); color: white; }
+ form.fogado h1 { text-align: center; border: dotted white; border-width: 1px 0px; font-size: 12pt; background-color: rgb(150,20,20); color: white; margin: 0px; }
+ form.fogado div { text-align: center; background-color: rgb(250,250,200); }
+ form.fogado a { text-decoration: none; color: rgb(250,250,200); display: block; }
+ form.fogado a:hover { text-decoration: underlined; color: rgb(250,250,100); }
+ form.fogado div.diak {
+ display: table-cell; border: solid 1px white; padding-right:20px; padding-left:20px; vertical-align:baseline;">';
+ }
+ form.fogado div.diak span.diakNev { background-color: #eeeee0; padding-left:1em; padding-right:1em; }
+}
+
+@media print {
+
+ .mayorhead, .toolBar { display: none; }
+
+ form.fogado { margin: 0px 20px; }
+ form.fogado table { width: 600px; background-color: white; margin: 20px auto; border: 1px black solid; border-spacing: 0px; page-break-after: always; page-break-inside: avoid; }
+ form.fogado table td { background-color: white; border: 1px black solid; padding: 10px; }
+ form.fogado table th { background-color: white; color: black; padding: 4px; border: 1px black solid; padding: 10px; }
+ form.fogado table thead td { background-color: white; color: blck; text-align: center; }
+ form.fogado table thead th { }
+ form.fogado table tbody td { text-align: center; }
+ form.fogado table tbody th { text-align: left; background-color: white; color: black; }
+ form.fogado h1 { text-align: center; border: dotted white; border-width: 1px 0px; font-size: 12pt; background-color: white; color: black; margin: 0px; }
+ form.fogado div { text-align: center; background-color: white; }
+ form.fogado a { text-decoration: none; color: black; display: block; }
+ form.fogado a:hover { text-decoration: underlined; color: black; }
+ form.fogado table tfoot { display: none; }
+ form.fogado div.diak img { display:none; }
+ form.fogado div.diak span.diakNev { background-color: white; padding-left:1em; padding-right:1em;}
+
+} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/tanev/munkaterv.css b/mayor-orig/www/skin/classic/module-naplo/css/tanev/munkaterv.css
new file mode 100644
index 00000000..3cbd9748
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/tanev/munkaterv.css
@@ -0,0 +1,149 @@
+@media screen {
+ /* összesités */
+
+ table.osszesites {
+ margin: 20px auto;
+ background-color: rgb(200,200,200);
+ }
+ table.osszesites td {
+ padding: 2px 10px;
+ background-color: rgb(210,210,240);
+ font-style: italic;
+ }
+ table.osszesites td.osszesMunkanap {
+ background-color: rgb(240,210,210);
+ color: red;
+ }
+ table.osszesites th {
+ padding: 2px 10px;
+ background-color: rgb(100,100,120);
+ color: white;
+ }
+
+ /* munkaterv - naptár */
+
+ form.munkaterv h2 { width: 60%; margin: 10px auto; text-align: center; border: 1px dotted; border-width: 1px 0px; font-size: 12px; }
+
+ table.munkaterv {
+ background-color: rgb(220,230,240);
+ color: white;
+ width: 70%;
+ font-size: 12px;
+ }
+
+ table.munkaterv tfoot th {background-color: rgb(120,130,140);}
+ table.munkaterv tfoot th input {border: none;}
+
+ table.munkaterv thead th {
+ background-color: rgb(120,140,130);
+ vertical-align: center;
+ }
+ table.munkaterv thead th input {
+ background-color: rgb(120,140,130);
+ border-style: none;
+ padding: 0px;
+ margin: 0px;
+ float: right;
+ color: white;
+ font-size: 10px;
+ }
+
+ table.munkaterv td {
+ width: 12%;
+ vertical-align: top;
+ text-align: center;
+ background-color: rgb(160,160,160);
+ }
+ table.munkaterv td input { width: 100%; }
+ table.munkaterv td.tanitasinap { background-color: rgb(200,100,100); border: none; }
+ table.munkaterv td.tanitasinap input { background-color: rgb(250,150,150); border: none; }
+ table.munkaterv td.tanitasinap select { background-color: rgb(250,150,150); border: 1px solid rgb(200,100,100); }
+
+ table.munkaterv td.specialistanitasinap { background-color: rgb(180,130,70); }
+ table.munkaterv td.specialistanitasinap input { background-color: rgb(220,180,120); border: none; }
+ table.munkaterv td.specialistanitasinap select { background-color: rgb(220,180,120); border: 1px solid rgb(180,130,70); }
+
+ table.munkaterv td.tanitasnelkulimunkanap { background-color: rgb(200,200,100); }
+ table.munkaterv td.tanitasnelkulimunkanap input { background-color: rgb(250,250,150); border: none; }
+ table.munkaterv td.tanitasnelkulimunkanap select { background-color: rgb(250,250,150); border: 1px solid rgb(200,200,100); }
+
+ table.munkaterv td.tanitasiszunet { background-color: rgb(70,140,70); }
+ table.munkaterv td.tanitasiszunet input { background-color: rgb(120,190,120); border: none; }
+ table.munkaterv td.tanitasiszunet select { background-color: rgb(120,190,120); border: 1px solid rgb(70,140,70); }
+
+ table.munkaterv td.szorgalmiidoszakonkivulimunkanap { background-color: rgb(240,130,60); }
+ table.munkaterv td.szorgalmiidoszakonkivulimunkanap input { background-color: rgb(250,175,100); border: none; }
+ table.munkaterv td.szorgalmiidoszakonkivulimunkanap select { background-color: rgb(250,175,100); border: 1px solid rgb(240,130,60); }
+
+ table.munkaterv td.felevZarasDt { border: red solid; border-width: 4px 0px 0px 4px; }
+ table.munkaterv td.felevZaras { border: red solid; border-width: 4px 0px 0px 0px; }
+
+ table.munkaterv td span { color:#ddd; margin:2px; font-size: 10px; }
+
+ table.munkaterv td span.orarendiHet1 { background-color: rgba(0,0,0,0.2); }
+ table.munkaterv td span.orarendiHet2 { background-color: rgba(255,0,0,0.2); }
+ table.munkaterv td span.orarendiHet3 { background-color: rgba(255,255,0,0.2); }
+ table.munkaterv td span.orarendiHet4 { background-color: rgba(255,255,255,0.2); }
+
+ table.munkaterv td select {
+ width: 100pt;
+ }
+
+ table.munkaterv a {
+ color: white;
+ text-decoration: none;
+ }
+
+ /* ------------------- */
+
+ form.init { background: #d6e0e6; margin: 0; padding: 20px; text-align: center; }
+ form.init h2, #napokSzama h2 { text-align: center; margin: 10px; border: 1px dotted; border-width: 1px 0px; font-size: 12px; }
+ form.init p { background-color: rgb(180,180,210); padding: 10px; }
+ form.init label { background-color: rgb(200,200,250); padding: 10px; }
+ form.init input[type=submit] { background-color: rgb(200,200,200); margin: 10px 5px; }
+
+ /* admin form */
+ div.admin { width: 95%;max-width: 95%;margin: 2em auto 0px auto; }
+ div.admin .onClickShow { float: left; text-align: center; min-width: 100px; margin: 0 2px 0 0; color: white;
+ background: rgba(52, 150, 185, 0.6); padding: 4px 10px; cursor: pointer;
+ border-radius: 4px 4px 0 0;
+ border-bottom: solid 1px rgb(52, 150, 185);
+ }
+ div.admin .onClickShow:hover {
+ background: rgba(52, 150, 185, 1);
+ border-bottom: solid 1px orange;
+ }
+ div.admin .openable { clear: both; }
+ div.admin .selected { background: #d6e0e6; color: black; border-bottom: solid 1px orange; }
+ div.admin #napokSzama { background: #d6e0e6; margin: 0; padding: 20px; }
+
+ div.admin ul { list-style: none; text-align: left; margin: 0; padding: 0; }
+ div.admin ul li { margin: 0px auto 1px auto; background: #abcdef; padding: 10px; width: 500px; }
+ div.admin ul li:hover { background: rgb(100,100,200); color: white; }
+ div.admin ul li select { float: right; margin-top: -3px; }
+ div.admin ul li input[type=submit] { float: right; margin-top: -3px; }
+
+}
+@media print {
+
+ table.osszesites { width:100%; font-size:10px;
+ background-color: #eeeeee;
+ }
+ table.osszesites th { text-align: center; background-color: #ffffff; }
+ table.osszesites td { text-align: center; background-color: #ffffff; }
+ a { font-size:10px; text-decoration: none; color: black }
+ select { font-size:10px; border: none; }
+
+ table.munkaterv td.specialisTanitasiNap {
+ border: dotted 1px black;
+ }
+
+ table.munkaterv td.tanitasiSzunet {
+ background-color: #eeeeee;
+ }
+
+ table.munkaterv td.tanitasNelkuliMunkanap {
+ border: dotted 1px black;
+ }
+
+} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/tanev/tankorBlokk.css b/mayor-orig/www/skin/classic/module-naplo/css/tanev/tankorBlokk.css
new file mode 100644
index 00000000..205296b3
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/tanev/tankorBlokk.css
@@ -0,0 +1,11 @@
+
+ table.modosit { margin: 20px auto; }
+ table.modosit th { padding: 2px; color: white; border: 1px solid #223340; background-color: #445560; }
+
+ form.csoport table { margin: 2px auto; color: white; background-color: #aabbc0; }
+ form.csoport table th { background-color: #445560; padding: 2px 14px; }
+ form.csoport table td { text-align: center; }
+ form.csoport table td input { background-color: #ccdde0; margin: 2px 0px; border: 1px solid #667780; }
+ form.csoport table td select { background-color: #ccdde0; font-size:10px; }
+
+ form.szuro { width: 200px; background-color: white; float: right; margin-right: 20px; } \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/tanev/tankorCsoport.css b/mayor-orig/www/skin/classic/module-naplo/css/tanev/tankorCsoport.css
new file mode 100644
index 00000000..4ac3bcac
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/tanev/tankorCsoport.css
@@ -0,0 +1,16 @@
+
+ table.modosit { margin: 20px auto; }
+ table.modosit th { padding: 4px; color: white; border: 3px solid rgb(20,80,40); background-color: rgb(30,120,60); }
+
+ form.csoport table { margin: 0px auto; color: white; background-color: rgb(20,80,40); }
+ form.csoport table th { background-color: rgb(30,120,60); }
+ form.csoport table td { text-align: center; }
+ form.csoport table td input { background-color: rgb(160,250,160); margin: 2px 0px; border: 1px solid rgb(30,120,60); }
+ form.csoport table td select { background-color: rgb(160,250,160); }
+ form.csoport input.torol { border: solid 1px red; background-color: rgb(120,50,10); color: white; float: right; margin: -3px; padding: 0px;}
+
+ form.csoportKereses table { margin: 10px auto; color: white; background-color: rgb(20,40,80); }
+ form.csoportKereses table th { background-color: rgb(30,60,120); }
+ form.csoportKereses table td { text-align: center; }
+ form.csoportKereses table td input { background-color: rgb(160,160,250); margin: 2px 0px; border: 1px solid rgb(30,60,120); }
+ form.csoportKereses table td select { background-color: rgb(160,160,250); } \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/tanev/targyBontas.css b/mayor-orig/www/skin/classic/module-naplo/css/tanev/targyBontas.css
new file mode 100644
index 00000000..dc02bb8d
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/tanev/targyBontas.css
@@ -0,0 +1,121 @@
+
+ #mayorbody { position: relative; }
+
+ table.bontas { border-spacing: 0 15px; margin: 70px 20px;}
+
+
+ table.bontas tbody tr th { -moz-box-shadow: 0px -15px #3ca; -webkit-box-shadow: 0px -15px #3ca; box-shadow: 0px -15px #3ca; }
+ table.bontas tbody tr th.targyTipus { background-color: #ddd; color: #a55; }
+ table.bontas tbody:nth-child(odd) tr th { -moz-box-shadow: 0px -15px #3ac; -webkit-box-shadow: 0px -15px #3ac; box-shadow: 0px -15px #3ac; }
+ table.bontas tbody tr:first-child th { -moz-box-shadow: 0px 0px; -webkit-box-shadow: 0px 0px; box-shadow: 0px 0px; }
+ table.bontas tbody tr.kesz:first-child th { -moz-box-shadow: 0px 3px #0f0 inset; -webkit-box-shadow: 0px 3px #0f0 inset; box-shadow: 0px 3px #0f0 inset; }
+
+ table.bontas td, table.bontas th { position: relative; background: #cba; background: #0a7; padding: 5px 8px; height: 50px; border: solid white; border-width: 2px 1px; color: white; }
+ table.bontas th { text-align: left; }
+ table.bontas tbody:nth-child(odd) td, table.bontas tbody:nth-child(odd) th { background: #abc; background: #3facc7; background: #07a; }
+
+ table.bontas tr.shadow1 td { -moz-box-shadow: 5px 5px #888; -webkit-box-shadow: 5px 5px #888; box-shadow: 5px 5px #888; }
+ table.bontas tr.shadow2 td { -moz-box-shadow: 5px 5px #888, 10px 10px #999; -webkit-box-shadow: 5px 5px #888, 10px 10px #999; box-shadow: 5px 5px #888, 10px 10px #999; }
+ table.bontas tr.shadow3 td { -moz-box-shadow: 5px 5px #888, 10px 10px #999, 15px 15px #aaa; -webkit-box-shadow: 5px 5px #888, 10px 10px #999, 15px 15px #aaa; box-shadow: 5px 5px #888, 10px 10px #999, 15px 15px #aaa; }
+ table.bontas tr.shadow4 td { -moz-box-shadow: 5px 5px #888, 10px 10px #999, 15px 15px #aaa, 20px 20px #bbb; -webkit-box-shadow: 5px 5px #888, 10px 10px #999, 15px 15px #aaa, 20px 20px #bbb; box-shadow: 5px 5px #888, 10px 10px #999, 15px 15px #aaa, 20px 20px #bbb; }
+ table.bontas tr.shadow5 td { -moz-box-shadow: 5px 5px #888, 10px 10px #999, 15px 15px #aaa, 20px 20px #bbb, 25px 25px #ccc; -webkit-box-shadow: 5px 5px #888, 10px 10px #999, 15px 15px #aaa, 20px 20px #bbb, 25px 25px #ccc; box-shadow: 5px 5px #888, 10px 10px #999, 15px 15px #aaa, 20px 20px #bbb, 25px 25px #ccc; }
+
+ table.bontas tr.aktiv td { opacity: 1; } /* ha <1-re állítom, akkor olyan, mintha z-index-e a targyak div fölé nőne... */
+
+ table.bontas div.bontas { background: white; color: #333; padding: 2px 4px; margin: 2px 0px; cursor: pointer; }
+ table.bontas div.bontas ul.tankor-oraszam { list-style-type: none; margin: 0 0 0 6px; padding: 0; display: inline-block; float: right; color: #fff; }
+ table.bontas div.bontas ul.tankor-oraszam li { margin: 0 1px 0 0; padding: 0px 4px; display: inline-block; background-color: #f60; }
+ table.bontas div.bontas ul.tankor-oraszam li:nth-child(even) { background-color: #fa0; }
+ table.bontas div.bontas ul.tankor-oraszam li.marad { margin: 0; padding: 0px 4px; display: inline-block; background-color: #888; }
+ table.bontas div.bontas.ok ul.tankor-oraszam li.marad { background-color: green; }
+ table.bontas div.bontas.fail ul.tankor-oraszam li.marad { background-color: red; }
+
+ table.bontas td span.felev1, table.bontas td span.felev2 {
+ background-color: yellow; color: black; margin:0; padding:0; position: absolute; border: solid yellow; font-size: 8pt;
+ }
+ table.bontas td span.felev1 { top: 0; left: 0; border-width: 0px 10px 2px 0px; border-radius: 0 0 10px 0; }
+ table.bontas td span.felev2 { bottom: 0; right: 0; border-width: 2px 0px 0px 10px; border-radius: 10px 0 0 0;}
+ table.bontas span { cursor: pointer; padding: 5px; }
+ table.bontas span:hover { color: orange; }
+ table.bontas span.delBontas { float: right; color: #800; margin-right: -5px; margin-top: -2px;}
+ table.bontas span.addBontas, table.bontas span.addBontasTargy { padding: 20px 10px; }
+ table.bontas tr.aktiv span.addBontasTargy { color: orange; }
+ table.bontas span.slideDown { padding: 20px 5px; }
+ table.bontas span.slideUp { padding: 20px 5px; }
+ table.bontas span.slideUpAll { padding: 20px 5px; }
+
+
+ div#targyak { z-index: 79; position: fixed; top: 200px; overflow: auto; height: 60%; background-color: rgba(73,71,71,0.92); border: black 1px solid; color: white; padding: 0px 2px; display: none; }
+/*
+ div#targyak { overflow: auto; padding: 0px 2px; display: none; }
+*/
+ div#targyak h1 { font-size: 16px; text-align: center; border-bottom: 1px solid #ddd; padding: 4px 8px; margin: 2px; }
+ div#targyak h1 span { position:relative; z-index: 100; }
+ div#targyak span.icon-remove-circle { float: left; font-size: 18px; cursor: pointer; }
+ ul#targyakUl { list-style-type: none; padding: 0px 6px 20px 6px; }
+ ul#targyakUl li { padding: 3px; }
+ ul#targyakUl li:hover { background-color: rgba(255,255,255,0.9); color: rgb(71,71,71); cursor: pointer; }
+ div#targyakUp, div#targyakDown { z-index: 80; position: fixed; text-align: center; background-color: rgba(170,70,70,0.6); height: 21px; padding-top: 10px; width: auto; display: none; }
+
+ #updateWindowSide p.bontasAdat,
+ #updateWindowSide p.tankorNev { text-align: center; border-bottom: solid 1px #ddd; padding: 8px 0; margin: 0; }
+ #updateWindowSide ul.tankorLista { list-style-type: none; color: rgba(255,255,255,1); margin:30px 10px; padding:0; }
+ #updateWindowSide ul.tankorLista li { padding:0; cursor: pointer; margin-right: 40px; }
+ #updateWindowSide ul.tankorLista li:hover { background-color: rgba(200,200,200,1); color: #000; }
+ #updateWindowSide ul.tankorLista li.hozzarendelt { border-right: 0px orange solid; }
+ #updateWindowSide ul.tankorLista li.tiltott { color: rgba(255,255,255,0.5); cursor: not-allowed; }
+ #updateWindowSide ul.tankorLista li.osszevonasTilt { color: rgba(255,255,255,0.5); }
+ #updateWindowSide ul.tankorLista li.tiltott:hover { background-color: rgba(200,200,200,1); color: #fff; }
+ #updateWindowSide ul.tankorLista li div.jobbra { float: right; margin-right: -40px; color: white; min-width: 40px; text-align: right; }
+ #updateWindowSide ul.tankorLista li:hover div.jobbra { background-color: rgb(200,150,150); }
+ #updateWindowSide ul.tankorLista li div.jobbra span.plusz { display: none; position: absolute; margin-top: -18px; margin-left: -3px; border-bottom: 1px solid white}
+ #updateWindowSide ul.tankorLista li div.jobbra span.minusz { display: none; position: absolute; margin-top: 26px; margin-left: -3px; padding-top: 1px; border-top: 1px solid white}
+ #updateWindowSide ul.tankorLista li div.jobbra:hover strong { position: absolute; display: inline-block; padding: 20px 20px 23px 20px; right: 5px; font-size: 20px; background: rgb(200,150,150); color: yellow; }
+ #updateWindowSide ul.tankorLista li div.jobbra:hover span.plusz,
+ #updateWindowSide ul.tankorLista li div.jobbra:hover span.minusz { display: inline-block; color: white; }
+ #updateWindowSide ul.tankorLista li strong { color: white; }
+ #updateWindowSide ul.tankorLista li.tiltott strong { color: #eee; }
+ #updateWindowSide ul.tankorLista li.tiltott.hozzarendelt div.jobbra::before { content: "✔"; float:right; color: #4f4; width: 10px; margin-right: -11px; text-align: center; } /* ✕ ☑ ☒ ⊗ ×✖ ❌ ☠" */
+ #updateWindowSide ul.tankorLista li.tiltott div.jobbra::before { content: "❌"; float: right; color: red; width: 10px; margin-right: -11px; text-align: center; }
+ #updateWindowSide ul.tankorLista li.osszevonasTilt div.jobbra::before { content: "▚"; float: right; color: darkorange; width: 10px; margin-right: -11px; text-align: center; font-weigth: bold; }
+ #updateWindowSide ul.tankorLista li.osszevonasEnged div.jobbra::before { content: "▐"; float: right; color: yellow; width: 10px; margin-right: -11px; text-align: center; font-weigth: bold; }
+
+ #updateWindowSide div#addTankor { background: rgba(70,70,70,0.9); position: absolute; width: 330px; margin: 0; padding: 3px 10px; border-bottom: 1px dotted #aaa; text-align: right; }
+ #updateWindowSide div#addTankor, #updateWindowSide div#addTankor span { cursor: pointer; }
+ #updateWindowSide div#disableAddTankor, #updateWindowSide div#disableAddTankor span { cursor: not-allowed; }
+ #updateWindowSide div#disableAddTankor { color: #888; background: rgba(70,70,70,0.9); position: absolute; width: 330px; margin: 0; padding: 3px 10px; border-bottom: 1px dotted #aaa; text-align: right; }
+
+ #updateWindowSide div.slideToggleContainer ul { list-style-type: none; margin: 10px 0px; display: none; cursor: default; padding: 0 10px; }
+ #updateWindowSide div.slideToggleContainer ul li { display: inline-block; width: 100px; }
+ #updateWindowSide div.slideToggleContainer { cursor: pointer; margin: 0; padding: 3px 10px; border-bottom: 1px dotted #aaa; }
+ #updateWindowSide div.slideToggleContainer span.icon-chevron-down { float: right; z-index: 0; }
+ #updateWindowSide div.slideToggleContainer span.changed { color: yellow; }
+ #updateWindowSide ul#tankorSzemeszter li { width: 120px; }
+ #updateWindowSide ul#tankorSzemeszter input { width: 40px; text-align: right;}
+
+ #updateWindowSide p.tankorModosit { cursor: pointer; color: yellow; text-align: right; margin: 0; padding: 0 10px 0 0; display: none; background-color: rgba(240,240,220,0.5); border-bottom: 2px solid yellow; color: rgb(70,70,70); color: white;}
+ #updateWindowSide span.tankorNevExtra { cursor: pointer;}
+ #updateWindowSide span.tankorNevExtra.changed { color: yellow; }
+ #updateWindowSide input#tankorNevExtra { width: 50px; display: none; }
+
+ form#szures { border-radius: 0 0 10px 10px; background: rgba(170,170,170,0.9); color: white; margin: 0px auto; position: absolute; left: 35px; top: 63px; right: 240px; z-index: 1; }
+ form#szures div#osztaly div.evfolyamJel { display: inline-block; cursor: pointer; background-color: rgb(70,70,70); width: 50px; height; text-align: center; padding: 5px 0; margin-bottom: 1px;}
+ form#szures div#osztaly div.evfolyamJel.checked { background-color: #820; }
+ form#szures div#osztaly span.selectOsztaly { display: inline-block; cursor: pointer; background-color: #888; margin: 0px 0px 1px 1px; border: none #888; border-width: 0px 1px 1px 0px; padding: 5px; }
+ form#szures div#osztaly span.selectOsztaly.checked { background-color: orange; }
+ form#szures div#osztaly span.selectOsztaly.checked.bontasOk { background-color: darkorange; }
+ form#szures div#osztaly span.selectOsztaly.bontasOk { background-color: green; }
+ form#szures div.kSelect { float: left; }
+ form#szures input#filterOk { float: right; padding: 10px; margin-right: 15px; margin-top: 1px; }
+
+ div#stat { background: black; position: absolute; top: 63px; right: 20px; z-index: 2; border-radius: 0 0 0px 0px; }
+ div#stat table { width: 230px; }
+ div#stat table td { background-color: #ddd; text-align: center; }
+ div#stat table #oratervenKivuli { cursor: pointer; }
+ div#stat table #oratervenKivuli span { cursor: pointer; margin-left: 8px; color: #666; }
+ div#stat table #oratervenKivuli ul { display: none; list-style-type: none; margin: 0; padding: 4px 0 0 0; text-align: left; font-weight: normal; position: absolute; left: -50px; right: 0px; background-color: #888; }
+ div#stat table #oratervenKivuli ul li { margin: 1px 0; padding: 4px; background: #ddd; }
+ div#stat table #oratervenKivuli ul li span.diff { float: right; }
+
+
+
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/tanev/targyOraszam.css b/mayor-orig/www/skin/classic/module-naplo/css/tanev/targyOraszam.css
new file mode 100644
index 00000000..14d9bd0c
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/tanev/targyOraszam.css
@@ -0,0 +1,7 @@
+
+ table.targyOraszam {
+ background-color:#eeeeee;
+ }
+
+ table.targyOraszam tr th { background-color: rgb(100,100,150); color: white; border-bottom: solid 2px white; padding:3px; }
+ table.targyOraszam tr td.oraszam { text-align: right }
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/tanev/vegzosOrarendLezaras.css b/mayor-orig/www/skin/classic/module-naplo/css/tanev/vegzosOrarendLezaras.css
new file mode 100644
index 00000000..717a9b66
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/tanev/vegzosOrarendLezaras.css
@@ -0,0 +1,5 @@
+
+ form.vegzos { background-color: rgb(200,200,100); margin: 20px 15%; text-align: center; padding: 10px; }
+ form.vegzos h1 { font-size: 12px; color: white; background-color: rgb(60,20,10); border: dotted white; border-width: 1px 0px; }
+ form.vegzos ul { list-style-type: none; margin: auto; padding: 10px 0%; width: 40%; text-align: left; background-color: rgb(100,40,10); }
+ form ul li { background-color: rgb(150,150,100); margin: 1px; } \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/tanev/vegzosTankorLezaras.css b/mayor-orig/www/skin/classic/module-naplo/css/tanev/vegzosTankorLezaras.css
new file mode 100644
index 00000000..1e377952
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/tanev/vegzosTankorLezaras.css
@@ -0,0 +1,5 @@
+
+ form.vegzos { background-color: rgb(200,200,100); margin: 20px 15%; text-align: center; padding: 10px; border: solid 1px black; }
+ form.vegzos h1 { font-size: 12px; color: white; background-color: rgb(60,20,10); border: dotted white; border-width: 1px 0px; }
+ form.vegzos ul { list-style-type: none; margin: auto; padding: 10px 0%; width: 40%; text-align: left; background-color: rgb(100,40,10); }
+ form ul li { background-color: rgb(150,150,100); margin: 1px; } \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/tanmenet/tanmenetInfo.css b/mayor-orig/www/skin/classic/module-naplo/css/tanmenet/tanmenetInfo.css
new file mode 100644
index 00000000..ca1dc18b
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/tanmenet/tanmenetInfo.css
@@ -0,0 +1,11 @@
+
+ fieldset { margin: 20px; }
+ fieldset.alapadatok p { text-align: center; font-style: italic; }
+ fieldset.alapadatok p span { color: rgb(100,50,25); font-weight: bold; font-style: normal; }
+
+ #temakor { list-style-type: none; }
+ #temakor li { margin-top: 10px; }
+ #temakor span.oraszam { display: block; float: left; width: 120px; text-align: right; color: rgb(160,80,40); margin-right: 6px; }
+ #temakor div.megnevezes { display: inline-block; color: #000; font-weight: normal; font-style: normal; }
+
+ fieldset.tankor ul li span { color: rgb(100,50,25); font-weight: bold; }
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/tanmenet/tanmenetJovahagyas.css b/mayor-orig/www/skin/classic/module-naplo/css/tanmenet/tanmenetJovahagyas.css
new file mode 100644
index 00000000..1a7814d1
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/tanmenet/tanmenetJovahagyas.css
@@ -0,0 +1,23 @@
+
+ #tanmenet { margin: auto; border-spacing: 0px; border: #888888 solid 3px; border-collapse: collapse; }
+ #tanmenet th { text-align: left; }
+ #tanmenet td, #tanmenet th { height: 34px; vertical-align: middle; padding: 0px 10px; border: #888888 solid 1px; }
+ #tanmenet tr { background-color: #eeeeee; }
+ #tanmenet tr.uj { background-color: orange; }
+ #tanmenet tr.kesz { background-color: yellow; }
+ #tanmenet tr.jovahagyott { background-color: lightgreen; }
+ #tanmenet tr.publikus { background-color: cornflowerblue; }
+ #tanmenet tr.uj:hover { background-color: #eeaaaa; }
+ #tanmenet tr.kesz:hover { background-color: #eeeeaa; }
+ #tanmenet tr.jovahagyott:hover { background-color: #aaeeaa; }
+ #tanmenet tr.publikus:hover { background-color: #aaaaee; }
+ #tanmenet a { color: black; text-decoration: none; display: block; padding: 10px; }
+
+ #tanmenet tr.aktiv td, #tanmenet tr.aktiv th { border-top: 10px red solid; border-bottom: 10px red solid; }
+ #tanmenet tr.aktiv th { border-left: 10px red solid; }
+ #tanmenet tr.aktiv td:last-child { border-right: 10px red solid; }
+/* #updateWindow { width: 80%; top: 10%; margin-top: auto; margin-bottom: auto; height: 80%; left: 50%; margin-left: -40%; }*/
+ #updateWindow { width: 40%; top: 10px; margin-top: auto; margin-bottom: auto; height: 100%; left: 0%; margin-left: 0%; }
+ #updateForm { max-height: 95%; overflow: auto; }
+ #updateHeader { cursor: pointer; }
+
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/tanmenet/tanmenetLeadas.css b/mayor-orig/www/skin/classic/module-naplo/css/tanmenet/tanmenetLeadas.css
new file mode 100644
index 00000000..d98cf5ac
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/tanmenet/tanmenetLeadas.css
@@ -0,0 +1,11 @@
+
+ table.tanmenet { margin: auto; background-color: black; border-spacing: 1px; }
+ table.tanmenet th { background-color: rgb(40, 70, 100); color: white; padding: 4px 10px; }
+ table.tanmenet th.tanarNev { padding: 0px; }
+ table.tanmenet th.tanarNev a { background-color: rgb(140,170,200); color: white; display: block; text-decoration: none; padding: 4px 10px; margin: 0px; }
+ table.tanmenet th.tanarNev a:hover { background-color: rgb(100,130,170); }
+ table.tanmenet td { padding: 4px; text-align: right; background-color: rgb(200,200,200); }
+ table.tanmenet td.jovahagyott { background-color: rgb(200,250,200); }
+ table.tanmenet td.nincsJovahagyva { background-color: rgb(255,255,200); }
+ table.tanmenet td.felkesz { background-color: rgb(255, 225, 175); }
+ table.tanmenet td.hianyzik { background-color: rgb(255,200,200); } \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/tanmenet/tanmenetModositas.css b/mayor-orig/www/skin/classic/module-naplo/css/tanmenet/tanmenetModositas.css
new file mode 100644
index 00000000..93e8e3f7
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/tanmenet/tanmenetModositas.css
@@ -0,0 +1,54 @@
+
+
+ fieldset.alapadatokfieldset {
+ margin:auto;
+ border: solid 1px darkblue;
+ border-bottom: solid 5px;
+ width:500px;
+ }
+ fieldset.alapadatokfieldset.uj { background: orange; border-color: #afa; }
+ fieldset.alapadatokfieldset.kesz { background: yellow; border-color: #aaf; }
+ fieldset.alapadatokfieldset.jovahagyott { background: lightgreen; border-color: #faa; }
+ fieldset.alapadatokfieldset.publikus { background: cornflowerblue; border-color: #ffa; }
+ fieldset.alapadatokfieldset.elavult { background: gray; border-color: #ccc; }
+
+ fieldset.alapadatokfieldset legend { background-color: yellow; margin:0px 10px; padding: 2px 10px; border: solid 1px rgb(40,60,80);}
+
+ fieldset.temakorokfieldset legend {
+ background-color: yellow; margin:0px 10px; padding: 2px 10px; border: solid 1px rgb(40,60,80);
+ }
+
+ form.alapadatok { padding: 20px 20px; text-align: center; }
+ form.alapadatok label { }
+ form.alapadatok input[type=text] { width: 400px; }
+
+
+ #temakor { list-style-type: none;
+ padding: 5px;
+ margin: 20px; }
+ #temakor li { background-color: #ddddaa; margin: 15px 0px; padding: 4px 10px; border: 1px solid;}
+ #temakor li textarea { width: 80%; }
+ #temakor li select { width: 50px; text-align: right; vertical-align: top; margin-top: 6px; }
+ #temakor li:nth-child(even) select.temakorOraszam { background-color: #eee;}
+ #temakor li:nth-child(odd) select.temakorOraszam { background-color: #aaa;}
+ #temakor li.sortable:nth-child(even) { background-color: #aaaaaa; border-color: #222277; }
+ #temakor li.sortable:nth-child(odd) { background-color: #eeeeee; border-color: #227722; }
+ #temakor li img.close { float: right; width: 25px; cursor: pointer; display: none; }
+ #temakor li.sortable img.close { display: inline; }
+ #temakor li span.handle { border: 1px solid; height: 32px; cursor: move;
+ width: 40px; display: block; float: left; text-align: center; padding: 4px 8px;
+ position: relative; top: 5px; margin-right: 2px; background-color: #ddddaa;
+ }
+ #temakor li span.oraszam { border: solid 1px;
+ height: 28px; width: 50px; display: block; float: left; text-align: center; padding: 12px 6px 0px 6px;
+ position: relative; top: 5px; background-color: red; margin-right: 2px;
+ }
+ #temakor li.sortable:nth-child(even) span.handle { background-color: #eee; border-color: #222277; }
+ #temakor li.sortable:nth-child(odd) span.handle { background-color: #aaa; border-color: #227722; }
+ #temakor li.sortable:nth-child(even) span.oraszam { background-color: #eee; border-color: #222277; }
+ #temakor li.sortable:nth-child(odd) span.oraszam { background-color: #aaa; border-color: #227722; }
+ #temakor li.sortable:nth-child(even) span.nagy { background-color: red; }
+ #temakor li.sortable:nth-child(odd) span.nagy { background-color: red; }
+
+ form.tanmenet input[type=submit] { width: 80%; margin: 10px 10%; text-align: center; }
+ form.tanmenet input[type=submit]:hover { background-color: rgb(20,40,60); color: white; }
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/tanmenet/tanmenetTankor.css b/mayor-orig/www/skin/classic/module-naplo/css/tanmenet/tanmenetTankor.css
new file mode 100644
index 00000000..77d2c031
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/tanmenet/tanmenetTankor.css
@@ -0,0 +1,76 @@
+
+
+
+ table.tanmenet { margin: 10px auto; background-color: rgb(25,50,100); border-spacing: 1px; }
+ table.tanmenet td, table.tanmenet th { padding: 4px; }
+ table.tanmenet th { background-color: #336; color: white; }
+ table.tanmenet tr td { background-color: rgb(210,220,230); }
+ table.tanmenet tr:nth-child(even) td { background: #eee; }
+ table.tanmenet tr:nth-child(odd) td { background: white; }
+ table.tanmenet td.nev { font-weight: bold; }
+ table.tanmenet td.tanmenet { text-align: left; }
+ table.tanmenet td.tanmenet div { text-align: right; padding:4px; }
+
+ table.tanmenet td.tanmenet select { max-width:800px; }
+
+ table.tanmenet tr.uj td { background-color: orange; }
+ table.tanmenet tr.kesz td.tanmenet { background-color: yellow; }
+ table.tanmenet tr.jovahagyott td { background-color: lightgreen; }
+ table.tanmenet tr.publikus td.tanmenet { background-color: cornflowerblue; }
+ table.tanmenet tr.elavult td.tanmenet { background-color: lightgray; }
+
+/*
+ table.tanmenet td.tanmenet select.uj { background-color: #8f8; }
+ table.tanmenet td.tanmenet select.kesz { background-color: #88f; }
+ table.tanmenet td.tanmenet select.jovahagyott { background-color: #f88; }
+ table.tanmenet td.tanmenet select.publikus { background-color: #ff8; }
+ table.tanmenet td.tanmenet select.elavult { background-color: lightgray; }
+
+ table.tanmenet td.tanmenet select option { background-color: white; }
+ table.tanmenet td.tanmenet select option.uj { color: green; }
+ table.tanmenet td.tanmenet select option.kesz { color: blue; }
+ table.tanmenet td.tanmenet select option.jovahagyott { color: red; }
+ table.tanmenet td.tanmenet select option.publikus { color: yellow; }
+ table.tanmenet td.tanmenet select option.elavult { color: gray; }
+*/
+ table.tanmenet td.tanmenet input.info { }
+ table.tanmenet td.tanmenet input { }
+ table.tanmenet td.tanmenet input:hover { }
+
+ #infodiv {
+ padding: 0px; margin: 0px 10%; width: 80%; height: 500px; position: absolute; top: 80px;
+ opacity: 1; background-color: #eeeeee;
+ z-index: 200;
+ border: solid 1px #999999;
+ background-color: #eeeeee;
+ }
+
+ #infodivheader {
+
+ padding:5px;
+ margin-bottom:4px;
+ background-color: #5a85b8;
+ border-bottom: solid 1px #15477B ;
+ color: white;
+ font-weight: bold;
+ cursor: pointer;
+ }
+ #infodivclose {
+ margin-right: 10px;
+ cursor: pointer; border: #822 solid 1px; padding: 2px 5px; background: #822; color: white; font-weight: bold;
+ box-shadow: inset 0px -3px 1px rgba(0, 0, 0, 0.45), 0px 2px 2px rgba(0, 0, 0, 0.25); border-radius: 3px; text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.5);
+ }
+ #infodiv fieldset { margin-top:2px; background-color: #eeeeee; border: solid 1px rgb(50,60,70);}
+ #infodiv fieldset legend { text-align: right; background-color: yellow; margin:0px 10px; padding: 2px 10px; border: solid 1px rgb(40,60,80); }
+
+ #inform { overflow: scroll; height: 460px;}
+/* border-color: rgb(130,30,20) rgb(110,20,15) rgb(90,10,10) rgb(150,40,25); outset*/
+ #inform fieldset.alapadatok p { text-align: center; font-style: italic; }
+ #inform fieldset.alapadatok p span { color: rgb(100,50,25); font-weight: bold; font-style: normal; }
+
+ #inform #temakor { list-style-type: none; }
+ #inform #temakor li { margin-top: 10px; }
+ #inform #temakor span.oraszam { display: block; float: left; width: 120px; text-align: right; color: rgb(160,80,40); margin-right: 6px; }
+ #inform #temakor div.megnevezes { display: inline-block; font-style: normal; }
+
+ #inform p.kiemelt { text-align: center; margin-top: 100px; font-size: 20px; }
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/tanmenet/ujTanmenet.css b/mayor-orig/www/skin/classic/module-naplo/css/tanmenet/ujTanmenet.css
new file mode 100644
index 00000000..c8a4f5dc
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/tanmenet/ujTanmenet.css
@@ -0,0 +1,19 @@
+
+
+ div#ujTanmenet {
+ width:90%;
+ margin:auto;
+ }
+
+ div.tanmenetHeader {
+padding:5px;
+margin-bottom:0px;
+background-color: #5a85b8;
+border-bottom: solid 1px #15477B ;
+color: white;
+font-weight: bold;
+ }
+
+ form.tanmenet { background: #ddd; padding: 10px;margin:0px; border-width: 0px 1px 1px 1px; border-style: solid ; border-color:#366; }
+ form.tanmenet input[type=text] { width: 100%; }
+ form.tanmenet input[type=submit] { width: 80%; margin: 5px 10%; } \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/css/uzeno/uzeno.css b/mayor-orig/www/skin/classic/module-naplo/css/uzeno/uzeno.css
new file mode 100644
index 00000000..04d5ea37
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/css/uzeno/uzeno.css
@@ -0,0 +1,139 @@
+
+ table.uzeno, table.ujUzenet, table.egyUzenet {
+ width:90%;
+ background-color: #fff;
+ margin-top:1em;
+ margin-bottom:1em;
+ }
+ table.uzeno thead tr th, table.ujUzenet tr th {
+ color: white; border-bottom: solid 0px white;
+ background-color: #3f51b5;
+ padding:0.5em; font-weight: normal;
+ }
+ table.uzeno thead tr th a, table.ujUzenet tr th a { color:white; }
+
+ table.uzeno a { text-decoration: none; font-style:normal;}
+ table.uzeno a:hover { }
+
+ table.ujUzenet select { }
+ table.ujUzenet tr td { text-align: center }
+ table.ujUzenet textarea { width:98%; height: 100px; border: solid 1px rgb(100,100,90); background-color:#eeeeee; margin-bottom:10px;}
+ table.ujUzenet tr.admin td textarea { background-color: green; color: white; }
+
+ table.uzeno thead tr th.dt { width:30em; }
+ table.uzeno thead tr th.cimzett { width:30em; }
+
+ table.uzeno tfoot tr th, table.uzeno tfoot tr th a { color:white; }
+ table.uzeno tbody tr td { padding:0px 4px; background-color: #eee;}
+ table.uzeno tbody tr td div.nev--container { display:table-cell; vertical-align:middle; padding-left:2px; }
+
+ table.uzeno tbody tr td.felado { min-width:120px;}
+ table.uzeno tbody tr td.cimzett { min-width:120px;}
+ table.uzeno tbody tr td.uzenet { width:70%; padding:10px; }
+
+ table.uzeno tbody tr th { padding:0px 4px; text-align:left; font-weight: normal; }
+ table.uzeno tbody tr td.content { padding:10px; background-color:#eeeeee; }
+ table.uzeno tbody tr.uj td { background-color: #eeeeee; }
+ table.uzeno tbody tr.olvasott td { background-color: #dddddd;}
+ table.uzeno tbody tr td a { color: black; }
+ table.uzeno tbody tr td a:hover { color: rgb(100, 149, 237); }
+ table.uzeno tbody tr td.uzenet a { color: black; }
+ table.uzeno tbody tr td.uzenet:hover a { color: rgb(100,149,237); }
+
+ tr.diak th, select optgroup.diak { background-color: rgb(255, 140, 0);}
+ tr.tanar th, select optgroup.tanar { background-color: #88ccff;}
+ tr.szulo th, select optgroup.szulo { background-color: rgb(64, 224, 208);}
+
+ tr.diak.asterix th { background-color: #aaaaff;}
+ tr.tanar.asterix th { background-color: #aaaaff;}
+ tr.szulo.asterix th { background-color: #aaaaff;}
+
+ tr.munkakozosseg th, select optgroup.munkakozosseg { background-color: #99aacc;}
+ tr.tankor th, select optgroup.tankor { background-color: #aaccaa; }
+ tr.tankorSzulo th, select optgroup.tankorSzulo { background-color: #aacccc; }
+
+ tr.osztaly th, select optgroup.osztaly { background-color: #bbcc99; }
+ tr.osztalySzulo th, select optgroup.osztalySzulo { background-color: #bbcccc; }
+ tr.osztalyTanar th, select optgroup.osztalyTanar { background-color: rgb(140,200,100); }
+
+ span.dt { font-size: smaller; color: #888888; white-space:nowrap; }
+ a.more {
+ text-decoration: none;
+ margin:1px;
+ padding:1px;
+ }
+ a.more:hover { color:rgb(170, 204, 170); }
+
+/*
+ a.more.uj { background-color: #ffeeaa; }
+ a.more.olvasott { background-color: #bbcc99; }
+*/
+
+ table.uzeno tbody tr td.uzenoEszkozok { min-width: 40px; text-align:center; font-size:16px}
+ table.uzeno tbody tr td.uzenoEszkozok a { color:#aaa; text-decoration: none;}
+ table.uzeno tbody tr td.uzenoEszkozok a:hover { color: cornflowerblue; }
+ table.uzeno tbody tr td.uzenoEszkozok a.del:hover {color: red !important;}
+
+ table.lapozo { width: 80%; }
+ table.lapozo table { background-color: #cccccc; border: solid 1px #778890; font-size:14px;}
+ table.lapozo table th.title { background-color: navy; color: white; padding-left: 4px; padding-right:4px;}
+ table.lapozo table td { text-align: center; background-color: #eeeeee; }
+ table.lapozo table td.aktiv { background-color: #ffffff; font-weight: bold; }
+ table.lapozo table td.nav { background-color: #aaaaaa; }
+ table.lapozo a {color:black; text-decoration: none; }
+
+ form#uzenoKereso {
+ margin-bottom:100px;
+ }
+
+
+ form#uzenoKereso table tr td { color:;}
+ table.uzenetSzal { width:90%; background-color: rgb(50, 50, 100);}
+ table.uzenetSzal thead tr th { background-color: rgb(100, 149, 237); color:white; height:2em; border-bottom: solid 1px white; }
+
+ table.uzenetSzal tbody tr td { background-color: #eeeeee;}
+ table.uzenetSzal tbody tr td.uzenetDt { width:150px; font-weight:normal; text-align:center; }
+ table.uzenetSzal tbody tr td.uzenetSzerep { width:150px; font-weight: normal; text-align:left;}
+ table.uzenetSzal tbody tr td.uzenetSzerep a { color: black; }
+ table.uzenetSzal tbody tr td.uzenetSzerep a:hover { color: rgb(100,149,237); }
+ table.uzenetSzal tbody tr th.uzenet { width:80%; font-weight: normal;}
+
+ table.uzenetSzal tbody tr.uzenetSajat th { border-left:solid 2px rgb(100,149,237); border-right:solid 2px #dddddd;}
+ table.uzenetSzal tbody tr.uzenetPartner th { border-left: solid 2px #dddddd; border-right:solid 2px rgb(100,149,237);}
+
+ table.uzenetSzal tbody tr td.uzenet div {display: table-cell; padding:4px; border: solid 1px #aaaaaa;border-radius:2px; background-color: #f9f9f9; }
+ table.uzenetSzal tbody tr td.uzenet div:hover { background-color: #ffffff;}
+ table.uzenetSzal tbody tr td.uzenet div a { color: black; }
+ table.uzenetSzal tbody tr td.uzenet div a:hover { color: rgb(100,149,237); }
+
+ table.uzenetSzal tbody tr.uzenetPartner td.uzenet div { background-color: white; }
+
+/*
+ table.uzenetSzal tr td.uzenet div:before {
+ width: 0;
+ height: 0;
+ border-top: 5px solid transparent;
+ border-bottom: 5px solid transparent;
+ border-right: 5px solid blue;
+ content:"";
+ position:absolute;
+ display:block;
+ }
+*/
+
+ table.uzeno tbody tr td.uzenet a {
+ display: inline-block; overflow: hidden; max-width:200px; text-overflow: ellipsis; line-height: 1em;
+ }
+
+ a span.icon-network { color: #aaa; }
+ a:hover span.icon-network { color: cornflowerblue; }
+
+@media (max-width: 764px) {
+
+ table.uzeno tbody tr td.felado { min-width:80px;}
+ table.uzeno tbody tr td.cimzett { min-width:80px;}
+ table.uzeno tbody tr td.uzenet { width:90%; padding:4px; word-break:break-word;}
+
+ table.uzeno tbody tr td.uzenoEszkozok { min-width:50px; text-align:center; font-size:20px}
+
+} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/admin/azonositok.phtml b/mayor-orig/www/skin/classic/module-naplo/html/admin/azonositok.phtml
new file mode 100644
index 00000000..b529f995
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/admin/azonositok.phtml
@@ -0,0 +1,95 @@
+<?php
+
+ function putCreateAzonositoForm($osztalyId, $osztalyTagok, $tanev=__TANEV, $Tagok) {
+
+ global $AUTH;
+
+ formBegin(array('class'=>'azonosito'));
+
+ echo '<input type="hidden" name="action" value="createAzonosito" />'."\n";
+ echo '<input type="hidden" name="osztalyId" value="'.$osztalyId.'" />'."\n";
+ echo '<input type="hidden" name="tanev" value="'.$tanev.'" />'."\n";
+ echo '<input type="hidden" name="createOu" value="'.intval(!is_array($ldapTagok)).'" />'."\n";
+
+ echo '<table>';
+ echo '<tr><th colspan="4">';
+ echo _JELSZO;
+ echo ' <input type="text" name="userPassword" value="" />'."\n";
+ echo '</th></tr>'."\n";
+
+ $CONTAINERS = $AUTH['private'][ $AUTH['private']['backend'].'Containers'];
+ if (isset($CONTAINERS) and is_array($CONTAINERS) and count($CONTAINERS) > 0) {
+ echo '<tr><th colspan="4">';
+ echo _CONTAINER;
+ echo '<select name="container">';
+ echo '<option value=""> - </option>'."\n";
+ for ($i=0;$i<count($CONTAINERS);$i++) {
+ echo '<option value="'.$CONTAINERS[$i].'">'.$CONTAINERS[$i].'</option>';
+ }
+ echo '</select>';
+ echo '</th></tr>'."\n";
+ }
+
+ echo '<tr>';
+ echo '<th>'._NEV.'</th>'."\n";
+ echo '<th>'._OID.'</th>'."\n";
+ echo '<th>'._AZONOSITO.'</th>'."\n";
+ echo '<th>'._HASONLO_FELHASZNALOK.'</th>'."\n";
+ echo '</tr>';
+// for ($i = 0; $i < count($ldapTagok['oIdNelkuli']); $i++) {
+// echo '<tr>';
+// echo '<th></th>';
+// echo '<td>';
+// echo $ldapTagok['oIdNelkuli'][$i]['oId'];
+// echo '</td>';
+// echo '<td>';
+// echo $ldapTagok['oIdNelkuli'][$i]['dn'];
+// echo '</td>';
+// echo '</tr>'."\n";
+// }
+ for ($i = 0; $i < count($osztalyTagok); $i++) {
+ echo '<tr>';
+ echo '<th>';
+ echo $osztalyTagok[$i]['diakNev'];
+ echo '</th>';
+ echo '<td>';
+ echo $osztalyTagok[$i]['oId'];
+ echo '</td>';
+
+ echo '<td>';
+ if (!isset($osztalyTagok[$i]['userAccount'])) {
+ if ($osztalyTagok[$i]['oId'] != '') {
+ echo '<input type="hidden" name="oId[]" value="'.$osztalyTagok[$i]['oId'].'" />'."\n";
+ echo '<input type="text" name="userAccount[]" value="'.$osztalyTagok[$i]['generatedAccount'].'" />'."\n";
+ } else {
+ echo _NINCS_OID;
+ }
+ } else {
+ echo $osztalyTagok[$i]['userAccount'];
+ if (__JELSZOGENERALAS === true && isset($Tagok[ $osztalyTagok[$i]['oId'] ]['userPassword']))
+ echo ' ('.$Tagok[ $osztalyTagok[$i]['oId'] ]['userPassword'].')';
+ }
+ echo '</td>';
+
+ if (is_array($osztalyTagok[$i]['studyIds'])) {
+ for ($j = 0; $j < count($osztalyTagok[$i]['userAccounts']); $j++)
+ $L[] = $osztalyTagok[$i]['userAccounts'][$j].' ('.$osztalyTagok[$i]['studyIds'][$j].')';
+ echo '<td class="azonosNev">'.implode(',', $L).'</td>'."\n";
+ } elseif (count($osztalyTagok[$i]['userAccounts']) > 0) {
+ echo '<td class="tobbszorosOid">'.implode(',', $osztalyTagok[$i]['userAccounts']).'</td>'."\n";
+ } else {
+ echo '<td></td>'."\n";
+ }
+
+ echo '</tr>'."\n";
+ }
+ echo '<tr>';
+ echo '<th colspan="4"><input type="submit" value="'._OK.'" /></th>';
+ echo '</tr>';
+ echo '</table>';
+
+ formEnd();
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/admin/csoportok.phtml b/mayor-orig/www/skin/classic/module-naplo/html/admin/csoportok.phtml
new file mode 100644
index 00000000..61c2d123
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/admin/csoportok.phtml
@@ -0,0 +1,87 @@
+<?php
+
+ function putCsoportLista($Csoportok, $osztalyId, $csoportId) {
+
+ formBegin(array('class'=>'csoport'));
+ echo '<input type="hidden" name="osztalyId" value="'.$osztalyId.'" />'."\n";
+
+ if ($csoportId != '') echo '<select name="csoportId" class="onChangeSubmit kiemelt" >'."\n";
+ else echo '<select name="csoportId" class="onChangeSubmit">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ $SEL = array($csoportId => ' selected="selected" ');
+ for ($i = 0; $i < count($Csoportok); $i++) {
+ echo '<option value="'.$Csoportok[$i]['csoportId'].'"'.$SEL[$Csoportok[$i]['csoportId']].'>'.$Csoportok[$i]['csoportNev'].'</option>'."\n";
+ }
+ echo '</select>'."\n";
+ echo '<input type="submit" value="'._OK.'" />'."\n";
+
+ formEnd();
+
+ }
+
+ function putUjCsoportForm($osztalyId, $Tankorok) {
+
+ formBegin(array('class'=>'csoport'));
+
+ echo '<h1>'._UJ_CSOPORT.'</h1>'."\n";
+
+ echo '<input type="hidden" name="action" value="ujCsoport" />'."\n";
+ echo '<input type="hidden" name="osztalyId" value="'.$osztalyId.'" />'."\n";
+
+ echo '<label for="csoportNev">'._CSOPORT_NEVE.': </label>';
+ echo '<input id="csoportNev" type="text" name="csoportNev" value="" />'."\n";
+
+ echo '<select name="tankorId[]" multiple="multiple">'."\n";
+ for ($i = 0; $i < count($Tankorok); $i++) {
+ echo '<option value="'.$Tankorok[$i]['tankorId'].'">'.$Tankorok[$i]['tankorNev'].'</option>'."\n";
+ }
+ echo '</select>'."\n";
+
+ echo '<input type="submit" value="'._OK.'" />'."\n";
+
+ formEnd();
+
+ }
+
+ function putCsoportModositoForm($csoportAdatok, $Tankorok, $osztalyId) {
+
+ formBegin(array('class'=>'csoport'));
+
+ echo '<h1>'._CSOPORT_MODOSITAS.'</h1>'."\n";
+
+ echo '<input type="hidden" name="action" value="csoportModositas" />'."\n";
+ echo '<input type="hidden" name="osztalyId" value="'.$osztalyId.'" />'."\n";
+ echo '<input type="hidden" name="csoportId" value="'.$csoportAdatok['csoportId'].'" />'."\n";
+
+ echo '<label for="ujCsoportNev">'._CSOPORT_NEVE.': </label>';
+ echo '<input type="text" name="csoportNev" value="'.$csoportAdatok['csoportNev'].'" id="ujCsoportNev" />'."\n";
+ echo '<select name="tankorId[]" multiple="multiple">'."\n";
+ for ($i = 0; $i < count($Tankorok); $i++) {
+ if (in_array($Tankorok[$i]['tankorId'],$csoportAdatok['tankorId']))
+ echo '<option value="'.$Tankorok[$i]['tankorId'].'" selected="selected">'.$Tankorok[$i]['tankorNev'].'</option>'."\n";
+ else
+ echo '<option value="'.$Tankorok[$i]['tankorId'].'">'.$Tankorok[$i]['tankorNev'].'</option>'."\n";
+ }
+ echo '</select>'."\n";
+
+ echo '<input type="submit" value="'._OK.'" />'."\n";
+ formEnd();
+
+ }
+
+ function putCsoportTorlesForm($csoportId, $osztalyId) {
+
+ formBegin(array('class'=>'csoport'));
+
+ echo '<h1>'._CSOPORT_TORLESE.'</h1>'."\n";
+
+ echo '<input type="hidden" name="action" value="csoportTorlese" />'."\n";
+ echo '<input type="hidden" name="osztalyId" value="'.$osztalyId.'" />'."\n";
+ echo '<input type="hidden" name="csoportId" value="'.$csoportId.'" />'."\n";
+
+ echo '<input type="submit" value="'._TOROL.'" title="'._BIZTOS_E.'" class="confirm" />'."\n";
+
+ formEnd();
+
+ }
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/admin/fillhaladasi.phtml b/mayor-orig/www/skin/classic/module-naplo/html/admin/fillhaladasi.phtml
new file mode 100644
index 00000000..cc97974a
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/admin/fillhaladasi.phtml
@@ -0,0 +1,12 @@
+<?php
+
+ function fillHaladasiForm($tolDt, $igDt) {
+ formBegin();
+ echo '<input type="hidden" name="tolDt" value="'.$tolDt.'" />';
+ echo '<input type="hidden" name="igDt" value="'.$igDt.'" />';
+ echo '<input type="submit" name="action" value="ok" style="display:block; margin-left: auto; margin-right:auto; width:30%;" />';
+ formEnd();
+ }
+
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/admin/import.phtml b/mayor-orig/www/skin/classic/module-naplo/html/admin/import.phtml
new file mode 100644
index 00000000..4aa1f88c
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/admin/import.phtml
@@ -0,0 +1,5 @@
+<?php
+
+ require_once('skin/classic/module-naplo/html/share/file.phtml');
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/admin/intezmenyek.phtml b/mayor-orig/www/skin/classic/module-naplo/html/admin/intezmenyek.phtml
new file mode 100644
index 00000000..f70e7739
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/admin/intezmenyek.phtml
@@ -0,0 +1,142 @@
+<?php
+
+ function putIntezmenyModositasForm($ADAT) {
+
+ $Intezmeny = $ADAT['intezmenyAdat'];
+
+ formBegin(array('class'=>'intezmeny'));
+
+ echo '<h2>'._INTEZMENY_MODOSITAS.'</h2>'."\n";
+
+ echo '<input type="hidden" name="action" value="intezmenyModositas" />'."\n";
+
+ echo _OMKOD . ': <input type="text" name="OMKod" id="OMKod" value="'.$Intezmeny['OMKod'].'" maxlength="8" />'."\n";
+ echo _ROVIDNEV .': <input type="text" name="rovidNev" id="rovidNev" value="'.$Intezmeny['rovidNev'].'" readonly="readonly" />'."\n";
+ echo _NEV.': <input type="text" name="nev" id="nev" value="'.$Intezmeny['nev'].'" />'."\n";
+ echo _FENNTARTO.': ';
+ echo '<select name="fenntarto">';
+ echo '<option value=""> - </option>';
+ foreach ($ADAT['fenntartok'] as $fenntarto) {
+ $SEL = ($Intezmeny['fenntarto']==$fenntarto?' selected="selected" ':'');
+ echo '<option value="'.$fenntarto.'"'.$SEL.'>'.$fenntarto.'</option>';
+ }
+ echo '</select>';
+ if ($Intezmeny['alapertelmezett'])
+ echo '<input type="checkbox" name="alapertelmezett" value="1" checked="checked" />' . _ALAPERTELMEZETT;
+ else
+ echo '<input type="checkbox" name="alapertelmezett" value="1" />' . _ALAPERTELMEZETT;
+ echo '<input type="submit" value="'._OK.'" />'."\n";
+ formEnd();
+
+ if (is_array($Intezmeny['telephely']) && count($Intezmeny['telephely']) > 0) {
+ for ($i = 0; $i < count($Intezmeny['telephely']); $i++) {
+
+ formBegin(array('class'=>'telephely'));
+
+ echo '<h2>'.($i+1).'. '._TELEPHELY_MODOSITAS.'</h2>'."\n";
+ echo '<input type="hidden" name="action" value="telephelyModositas" />'."\n";
+ echo '<input type="hidden" name="telephelyId" value="'.$Intezmeny['telephely'][$i]['telephelyId'].'" />'."\n";
+
+ echo _TELEPHELYROVIDNEV .': <input type="text" name="telephelyRovidNev" id="telephelyRovidNev'.$i.'" value="'.$Intezmeny['telephely'][$i]['telephelyRovidNev'].'" />'."\n";
+ echo _TELEPHELYNEV.': <input type="text" name="telephelyNev" id="telephelyNev'.$i.'" value="'.$Intezmeny['telephely'][$i]['telephelyNev'].'" />'."\n";
+ if ($Intezmeny['telephely'][$i]['alapertelmezett'])
+ echo '<input type="checkbox" name="alapertelmezett" value="1" checked="checked" />' . _ALAPERTELMEZETT;
+ else
+ echo '<input type="checkbox" name="alapertelmezett" value="1" />' . _ALAPERTELMEZETT;
+ echo '<hr />';
+ echo _IRSZ . ': <input type="text" name="cimIrsz" value="'.$Intezmeny['telephely'][$i]['cimIrsz'].'" />'."\n";
+ echo _HELYSEG . ': <input type="text" name="cimHelyseg" value="'.$Intezmeny['telephely'][$i]['cimHelyseg'].'" />'."\n";
+ echo '<hr />'."\n";
+ echo _KOZTERULETNEV . ': <input type="text" name="cimKozteruletNev" value="'.$Intezmeny['telephely'][$i]['cimKozteruletNev'].'" />'."\n";
+ echo _KOZTERULETJELLEG . ': <input type="text" name="cimKozteruletJelleg" value="'.$Intezmeny['telephely'][$i]['cimKozteruletJelleg'].'" />'."\n";
+ echo _HAZSZAM . ': <input type="text" name="cimHazszam" value="'.$Intezmeny['telephely'][$i]['cimHazszam'].'" />'."\n";
+ echo '<hr />';
+ echo _TELEFON . ': <input type="text" name="telefon" value="'.$Intezmeny['telephely'][$i]['telefon'].'" />'."\n";
+ echo _FAX . ': <input type="text" name="fax" value="'.$Intezmeny['telephely'][$i]['fax'].'" />'."\n";
+ echo _EMAIL . ': <input type="text" name="email" value="'.$Intezmeny['telephely'][$i]['email'].'" />'."\n";
+ echo _HONLAP . ': <input type="text" name="honlap" value="'.$Intezmeny['telephely'][$i]['honlap'].'" />'."\n";
+
+
+ echo '<input type="submit" value="'._OK.'" />'."\n";
+
+ formEnd();
+ }
+ }
+
+ formBegin(array('class'=>'ujTelephely'));
+
+ echo '<h2 class="ujTelephely">'._UJ_TELEPHELY.'</h2>'."\n";
+
+ echo '<input type="hidden" name="action" value="ujTelephely" />'."\n";
+
+ echo _TELEPHELYROVIDNEV .': <input type="text" name="telephelyRovidNev" id="telephelyRovidNevUj" value="" />'."\n";
+ echo _TELEPHELYNEV.': <input type="text" name="telephelyNev" id="telephelyNevUj" value="" />'."\n";
+ echo '<input type="checkbox" name="alapertelmezett" value="1" />' . _ALAPERTELMEZETT;
+ echo '<hr />';
+ echo _IRSZ . ': <input type="text" name="cimIrsz" value="" />'."\n";
+ echo _HELYSEG . ': <input type="text" name="cimHelyseg" value="" />'."\n";
+ echo '<hr />'."\n";
+ echo _KOZTERULETNEV . ': <input type="text" name="cimKozteruletNev" value="" />'."\n";
+ echo _KOZTERULETJELLEG . ': <input type="text" name="cimKozteruletJelleg" value="" />'."\n";
+ echo _HAZSZAM . ': <input type="text" name="cimHazszam" value="" />'."\n";
+ echo '<hr />';
+ echo _TELEFON . ': <input type="text" name="telefon" value="" />'."\n";
+ echo _FAX . ': <input type="text" name="fax" value="" />'."\n";
+ echo _EMAIL . ': <input type="text" name="email" value="" />'."\n";
+ echo _HONLAP . ': <input type="text" name="honlap" value="" />'."\n";
+
+ echo '<input type="submit" value="'._OK.'" />'."\n";
+
+ formEnd();
+
+ }
+
+ function putIntezmenyTorlesForm($ADAT) {
+
+ $Intezmeny = $ADAT['intezmenyAdat'];
+
+ formBegin(array('class'=>'intezmeny'));
+
+ echo '<h2>'._INTEZMENY_TORLES.'</h2>'."\n";
+
+ echo '<input type="hidden" name="action" value="intezmenyTorles" />'."\n";
+
+ echo '<p>Az adatbázisok törlése csak egy esetleges későbbi fejlesztés lesz. Egyelőre csak az
+ intézmények listájából törlünk. Az adatbázisokat kézzel kell törölni.</p>';
+ echo '<input type="checkbox" name="dbTorles" value="1" readonly />' . _ADATBAZISOK_TORLESE;
+
+ echo '<hr />'."\n";
+
+ echo 'rootUser: <input type="text" name="rootUser" id="rootUser" value="root" />'."\n";
+ echo 'rootPassword: <input type="password" name="rootPassword" id="rootPassword" value="" />'."\n";
+
+ echo '<input type="submit" value="'._TORLES.'" />'."\n";
+
+ formEnd();
+ }
+
+ function putUjIntezmenyForm() {
+
+ formBegin(array('class'=>'intezmeny'));
+
+ echo '<h2>'._UJ_INTEZMENY.'</h2>'."\n";
+
+ echo '<input type="hidden" name="action" value="ujIntezmeny" />'."\n";
+
+
+ echo _OMKOD . ': <input type="text" name="OMKod" id="OMKod" value="0000000" maxlength="7" />'."\n";
+ echo _ROVIDNEV .': <input type="text" name="rovidnev" id="rovidnev" />'."\n";
+ echo _NEV.': <input type="text" name="nev" id="nev" />'."\n";
+
+ echo '<hr />'."\n";
+
+ echo 'rootUser: <input type="text" name="rootUser" id="rootUser" value="root" />'."\n";
+ echo 'rootPassword: <input type="password" name="rootPassword" id="rootPassword" value="" />'."\n";
+
+ echo '<input type="submit" value="'._OK.'" />'."\n";
+
+ formEnd();
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/admin/rpcPrivilege.phtml b/mayor-orig/www/skin/classic/module-naplo/html/admin/rpcPrivilege.phtml
new file mode 100644
index 00000000..e9ffde6d
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/admin/rpcPrivilege.phtml
@@ -0,0 +1,72 @@
+<?php
+
+ function putAddNodeForm($ADAT) {
+ formBegin(array('id'=>'addNode'));
+ echo '<h3>'._UJ_VEGPONT.'</h3>';
+ echo '<input type="hidden" name="action" value="addNode" />';
+ echo '<p>';
+ echo '<select name="nodeId">';
+ foreach ($ADAT['nodes'] as $nodeId => $nAdat) {
+ echo '<option value="'.$nAdat[0]['nodeId'].'">'.$nAdat[0]['nev'].' - '.$nAdat[0]['cimHelyseg'].' ('.$nAdat[0]['nodeId'].')</option>';
+ }
+ echo '</select>';
+ echo '<br/>';
+ echo '<label for="userAccount">'._ACCOUNT.'</label>';
+ echo '<input type="text" id="userAccount" name="userAccount" value="" />';
+ echo '<br/>';
+ echo '<select name="OMKod">';
+ foreach ($ADAT['intezmenyek'] as $OMKod => $iAdat) {
+ echo '<option value="'.$iAdat[0]['OMKod'].'">'.$iAdat[0]['nev'].' - '.$iAdat[0]['cimHelyseg'].' ('.$iAdat[0]['OMKod'].')</option>';
+ }
+ echo '</select>';
+ echo '</p>';
+ echo '<input type="submit" value="'._ADD.'" />';
+ formEnd();
+ }
+
+ function putPrivilegesForm($ADAT) {
+ echo '<table id="privNodes">';
+ echo '<thead>';
+ echo '<tr>';
+ echo '<th>'._NODE.'</th>';
+ echo '<th>'._NODEID.'</th>';
+ echo '<th>'._INTEZMENY.'</th>';
+ echo '<th>'._OMKOD.'</th>';
+ echo '<th>'._ACCOUNT.'</th>';
+ echo '<th>'._PRIVS.'</th>';
+ echo '</tr>';
+ echo '</thead>';
+ echo '<tbody>';
+ foreach ($ADAT['privs'] as $index => $pAdat) {
+ echo '<tr>';
+ echo '<td>'.$ADAT['nodes'][ $pAdat['nodeId'] ][0]['nev'].'</td>';
+ echo '<td>'.$pAdat['nodeId'].'</td>';
+ echo '<td>'.$ADAT['intezmenyek'][ $pAdat['OMKod'] ][0]['nev'].'</td>';
+ echo '<td>'.$pAdat['OMKod'].'</td>';
+ echo '<td>'.$pAdat['userAccount'].'</td>';
+ echo '<td>';
+ formBegin(array('id'=>'priv'));
+ echo '<input type="hidden" name="action" value="setPriv" />';
+ echo '<input type="hidden" name="nodeId" value="'.$pAdat['nodeId'].'" />';
+ echo '<input type="hidden" name="userAccount" value="'.$pAdat['userAccount'].'" />';
+ echo '<input type="hidden" name="OMKod" value="'.$pAdat['OMKod'].'" />';
+ $nPriv = explode(',',$pAdat['priv']);
+ foreach ($ADAT['privileges'] as $index => $priv) {
+ if (in_array($priv, $nPriv)) $CHK=' checked="checked" ';
+ else $CHK = '';
+ $id = 'n'.$pAdat['nodeId'].ekezettelen($pAdat['userAccount']).$pAdat['OMKod'].$index;
+ echo '<input id="'.$id.'" type="checkbox" name="priv[]" value="'.$priv.'"'.$CHK.' />';
+ echo '<label for="'.$id.'">'.$priv.'</label>';
+ }
+ echo '<input type="submit" value="'._OK.'" />';
+ formEnd();
+ echo '</td>';
+ echo '</tr>';
+ }
+ echo '</tbody>';
+ echo '</table>';
+
+
+ }
+
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/admin/szemeszterek.phtml b/mayor-orig/www/skin/classic/module-naplo/html/admin/szemeszterek.phtml
new file mode 100644
index 00000000..f7cff27b
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/admin/szemeszterek.phtml
@@ -0,0 +1,61 @@
+<?php
+
+ function putSzemeszterAdat($ADAT) {
+
+ $Sz = $ADAT['szemeszterAdat'];
+
+ formBegin(array('class'=>'szemeszter'));
+ echo '<input type="hidden" name="action" value="idoszakModositas" />'."\n";
+ echo '<input type="hidden" name="szemeszterId" value="'.$Sz['szemeszterId'].'" />'."\n";
+
+
+// echo '<h1>'.$Sz['tanev'].'/'.$Sz['szemeszter'].'('.$Sz['szemeszterId'].')</h1>'."\n";
+// echo '<p>'.$Sz['kezdesDt'].' - '.$Sz['zarasDt'].' ('.$Sz['statusz'].')</p>'."\n";
+ echo '<h2>'._IDOSZAKOK.'</h2>';
+ echo '<table align="center" cellpadding="1" cellspacing="1">';
+ for ($i = 0; $i < count($Sz['idoszak']); $i++) {
+
+ echo '<tr>';
+ echo '<td><input id="t'.$i.'" type="checkbox" name="torlendo[]" value="'.$Sz['idoszak'][$i]['idoszakId'].'" title="'._TORLENDO.'" /></td>'."\n";
+ echo '<td><input type="hidden" name="idoszakId[]" value="'.$Sz['idoszak'][$i]['idoszakId'].'" />'."\n";
+ echo '<label for="t'.$i.'">'.$Sz['idoszak'][$i]['tipus'].':</label></td>';
+ echo '<td><input type="text" name="tolDt[]" value="'.$Sz['idoszak'][$i]['tolDt'].'" class="datetime txt" /></td>'."\n";
+ echo '<td><input type="text" name="igDt[]" value="'.$Sz['idoszak'][$i]['igDt'].'" class="datetime txt" /></td>'."\n";
+ echo '</tr>'."\n";
+
+ }
+ echo '</table>'."\n";
+
+ echo '<input type="submit" value="'._TORLES.'" />'."\n";
+
+ formEnd();
+ }
+
+ function putUjIdoszak($szemeszterId, $idoszakTipusok) {
+
+ formBegin(array('class'=>'szemeszter'));
+
+ echo '<input type="hidden" name="action" value="ujIdoszak" />'."\n";
+ echo '<input type="hidden" name="szemeszterId" value="'.$szemeszterId.'" />'."\n";
+
+ echo '<h2>'._UJ_IDOSZAK.'</h2>';
+
+ echo '<label for="tolDt">'._TOLDT.'</label>'."\n";
+ echo '<input class="datetime" type="text" name="tolDt" id="tolDt" value="" />'."\n";
+ echo '<label for="igDt">'._IGDT.'</label>'."\n";
+ echo '<input class="datetime" type="text" name="igDt" id="igDt" value="" />'."\n";
+ echo '<label for="tipus">'._TIPUS.'</label>'."\n";
+ echo '<select name="tipus" id="tipus">'."\n";
+ for ($i = 0; $i < count($idoszakTipusok); $i++) {
+ echo '<option value="'.$idoszakTipusok[$i].'">'.$idoszakTipusok[$i].'</option>'."\n";
+ }
+ echo '</select>'."\n";
+
+ echo '<input type="submit" value="'._OK.'" />'."\n";
+
+ formEnd();
+
+ }
+
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/admin/szuloiAzonositok.phtml b/mayor-orig/www/skin/classic/module-naplo/html/admin/szuloiAzonositok.phtml
new file mode 100644
index 00000000..650afce6
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/admin/szuloiAzonositok.phtml
@@ -0,0 +1,113 @@
+<?php
+
+ function putCreateAzonositoForm($osztalyId, $osztalyTagok, $tanev=__TANEV, $Tagok) {
+
+ global $AUTH;
+
+ formBegin(array('class'=>'azonosito'));
+
+ echo '<input type="hidden" name="action" value="createAzonosito" />'."\n";
+ echo '<input type="hidden" name="osztalyId" value="'.$osztalyId.'" />'."\n";
+ echo '<input type="hidden" name="tanev" value="'.$tanev.'" />'."\n";
+
+ echo '<table>';
+ echo '<tr><th colspan="9">';
+ echo _JELSZO;
+ echo ' <input type="text" name="userPassword" value="" />'."\n";
+ echo '</th></tr>'."\n";
+
+ $CONTAINERS = $AUTH['parent'][ $AUTH['private']['backend'].'Containers'];
+ if (isset($CONTAINERS) and is_array($CONTAINERS) and count($CONTAINERS) > 0) {
+ echo '<tr><th colspan="4">';
+ echo _CONTAINER;
+ echo '<select name="container">';
+ echo '<option value=""> - </option>'."\n";
+ for ($i=0;$i<count($CONTAINERS);$i++) {
+ echo '<option value="'.$CONTAINERS[$i].'">'.$CONTAINERS[$i].'</option>';
+ }
+ echo '</select>';
+ echo '</th></tr>'."\n";
+ }
+
+ echo '<tr>';
+ echo '<th>'._NEV.'</th>'."\n";
+
+ echo '<th>'._ANYANEV.'</th>'."\n";
+ echo '<th>'._ANYAAZONOSITO.'</th>'."\n";
+ echo '<th>'._ANYA_FELHASZNALO.'</th>'."\n";
+ echo '<th>'._ANYA_HASONLO_NEV.'</th>'."\n";
+
+ echo '<th>'._APANEV.'</th>'."\n";
+ echo '<th>'._APAAZONOSITO.'</th>'."\n";
+ echo '<th>'._APA_FELHASZNALO.'</th>'."\n";
+ echo '<th>'._APA_HASONLO_NEV.'</th>'."\n";
+
+ echo '</tr>';
+ for ($i = 0; $i < count($osztalyTagok); $i++) {
+ echo '<tr>';
+
+ echo '<th>';
+ echo $osztalyTagok[$i]['diakNev'];
+ echo '</th>';
+ foreach (array('anya','apa') as $szulo) {
+ if ($osztalyTagok[$i][$szulo]['szuloNev'] == '') {
+ echo '<td></td><td></td><td></td><td></td>';
+ continue;
+ }
+ echo '<td class="'.$szulo.'">';
+ echo $osztalyTagok[$i][$szulo]['szuloNev'];
+
+ echo '</td>';
+ echo '<td class="'.$szulo.'">';
+ if ($osztalyTagok[$i][$szulo]['statusz'] == 'elhunyt') { // elhunyt státuszú a szülő
+ echo '<span class="elhunyt">'._ELHUNYT.'</span>';
+ } elseif (!isset($osztalyTagok[$i][$szulo.'Account'])) { // Ha nem találtunk létező $szulo.Account-ot
+ // ez kellene, hogy a szulő táblát módosítsuk...
+ echo '<input type="hidden" name="szuloId[]" value="'.$osztalyTagok[$i][$szulo.'Id'].'" />'."\n";
+ if ($osztalyTagok[$i][$szulo]['userAccount'] != '') { // de a szulő táblában be van írva
+ echo '<input type="text" name="userAccount[]" value="'.$osztalyTagok[$i][$szulo]['userAccount'].'" />'."\n";
+ } else {
+ echo '<input type="text" name="userAccount[]" value="'.$osztalyTagok[$i][$szulo.'GeneratedAccount'].'" />'."\n";
+ }
+ // generált jelszó
+ echo '<br />('.$osztalyTagok[$i][$szulo]['userPassword'].')';
+ } else {
+ if (false && $osztalyTagok[$i][$szulo]['email'] != '') { // nem megvalósított funkció...
+ echo '<div style="float: right; display: inline-block; width: 50px; font-size: 1.5em; margin: -4px -16px 0 0; padding: 0;">';
+ echo '&#009993;';
+ echo '<input type="checkbox" name="mailto[]" title="'.$osztalyTagok[$i][$szulo]['email'].'" value="'.$osztalyTagok[$i][$szulo.'Id'].'" />';
+ echo '</div>';
+ }
+ echo $osztalyTagok[$i][$szulo]['userAccount'];
+ // generált jelszó
+ echo '<br />('.$osztalyTagok[$i][$szulo]['userPassword'].')';
+ }
+ echo '</td>';
+
+ echo '<td class="'.$szulo.'">';
+ if (isset($osztalyTagok[$i][$szulo.'Account'])) { // Ha találtunk létező $szulo.Account-ot
+ echo $osztalyTagok[$i][$szulo.'UserCn'];
+ }
+ echo '</td>';
+
+ if (is_array($osztalyTagok[$i][$szulo.'Cns'])) {
+ $L = array();
+ for ($j = 0; $j < count($osztalyTagok[$i][$szulo.'Cns']); $j++)
+ $L[] = $osztalyTagok[$i][$szulo.'Cns'][$j].' ('.$osztalyTagok[$i][$szulo.'Accounts'][$j].')';
+ echo '<td class="azonosNev">'.implode(',<br />', $L).'</td>'."\n";
+ } else {
+ echo '<td></td>'."\n";
+ }
+ } // anya / apa
+ echo '</tr>'."\n";
+ }
+ echo '<tr>';
+ echo '<th colspan="9"><input type="submit" value="'._OK.'" /></th>';
+ echo '</tr>';
+ echo '</table>';
+
+ formEnd();
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/admin/tanevek.phtml b/mayor-orig/www/skin/classic/module-naplo/html/admin/tanevek.phtml
new file mode 100644
index 00000000..ba77f647
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/admin/tanevek.phtml
@@ -0,0 +1,165 @@
+<?php
+
+ function putUjTanevForm() {
+
+ $SZEMESZTER_STATUSZ = Array('aktív','tervezett');
+
+ formBegin(array('class'=>'intezmeny'));
+
+ echo '<h2>'._UJ_TANEV.'</h2>'."\n";
+
+ echo '<div class="data">';
+
+ echo '<input type="hidden" name="action" value="ujTanev" />'."\n";
+
+ //szemeszter: tanev, sorszám, status (aktív, lezárt, új, tervezett), kezdete, vége
+
+ echo _TANEV_JELE . ': <input type="text" name="ujTanev" id="tanev" value="" maxlength="4" size="4" />'."\n";
+ echo '<hr />'."\n";
+
+ for ( $i = 1; $i <= 2; $i++ ) {
+ echo $i .'. ' . _SZEMESZTER . ":";
+ echo '<input type="hidden" name="szemeszter[]" value="'.$i.'" />'."\n";
+ echo '<input class="date" type="text" name="kezdesDt[]" value="" maxlength="10" size="10" /> - '."\n";
+ echo '<input class="date" type="text" name="zarasDt[]" value="" maxlength="10" size="10" />'."\n";
+ echo ' ('._TERVEZETT.')';
+ echo '<br/>';
+
+// echo '<select name="statusz[]">';
+// foreach($SZEMESZTER_STATUSZ as $key => $statusz) {
+// echo '<option value="'.$statusz.'">'.$statusz.'</option>';
+// }
+// echo '</select>';
+ }
+
+ echo '<hr />'."\n";
+
+// echo 'rootUser: <input type="text" name="rootUser" id="rootUser" value="root" />'."\n";
+// echo 'rootPassword: <input type="password" name="rootPassword" id="rootPassword" value="" />'."\n";
+
+ echo '<input type="submit" value="'._OK.'" />'."\n";
+
+ echo '</div>';
+ formEnd();
+
+ }
+
+ function putTanevSzemeszterekForm($Szemeszterek) {
+
+ global $tanev;
+
+ formBegin(array('class'=>'intezmeny'));
+
+ echo '<input type="hidden" name="action" value="szemeszterTorles" />'."\n";
+ echo '<input type="hidden" name="tanev" value="'.$tanev.'" />'."\n";
+
+ echo '<h2>'._TANEV_SZEMESZTEREI.'</h2>'."\n";
+
+ echo '<div class="data">'."\n";
+
+ for ($i = 0; $i < count($Szemeszterek); $i++) {
+ $Sz = $Szemeszterek[$i];
+ echo '<input type="checkbox" name="szemeszterId[]" value="'.$Sz['szemeszterId'].'">';
+ echo $Sz['szemeszter'].'. '._SZEMESZTER.': ';
+ echo '<input type="text" name="kezdesDt[]" value="'.$Sz['kezdesDt'].'" title="'._KEZDESDT.'" maxlength="10" class="date" />'."\n";
+ echo ' - ';
+ echo '<input type="text" name="zarasDt[]" value="'.$Sz['zarasDt'].'" title="'._ZARASDT.'" maxlength="10" class="date" />'."\n";
+ echo ' ('.$Sz['statusz'].')<br />'."\n";
+ }
+ echo '<input type="submit" value="'._TOROL.'" />'."\n";
+
+ echo '</div>'."\n";
+ formEnd();
+
+ }
+
+ function putTanevAktivalForm( $tanev ) {
+
+ if ($tanev=='') return false;
+ formBegin(array('class'=>'intezmeny'));
+
+ echo '<input type="hidden" name="action" value="tanevAktival" />'."\n";
+
+ echo '<h2>'._TANEV_AKTIVALAS.'</h2>'."\n";
+
+ echo '<div class="data">'."\n";
+ echo '<input type="hidden" name="tanev" value="'.$tanev.'"/>';
+ echo '<label for="rootUser">rootUser:</label><input type="text" name="rootUser" id="rootUser" value="root" />'."\n";
+ echo '<label for="rootPassword">rootPassword:</label><input type="password" name="rootPassword" id="rootPassword" value="" />'."\n";
+
+ echo '<input type="submit" value="'._AKTIVAL.'" />'."\n";
+
+ echo '</div>';
+ formEnd();
+ }
+
+ function putTanevLezarasForm( $ADAT ) {
+
+ formBegin(array('class'=>'intezmeny'));
+
+ echo '<input type="hidden" name="action" value="tanevLezar" />'."\n";
+
+ echo '<h2>'._TANEV_LEZARAS.'</h2>'."\n";
+
+ echo '<div class="data">'."\n";
+ echo '<input type="hidden" name="tanev" value="'.$ADAT['tanev'].'"/>';
+
+ echo '<p>'._TAJEKOZTATO.'</p>';
+
+ echo '<label for="tanevZarasDt">'._TANEV_ZARASDT.'</label>'."\n";
+ echo '<input id="tanevZarasDt" type="text" name="dt" value="'.$ADAT['dt'].'" title="'._TANEV_ZARASDT.'" maxlength="10" class="date" />'."\n";
+
+ echo '<fieldset>';
+ echo '<h3>';
+ echo '<input type="checkbox" name="step[]" value="vegzosJogviszonyLezaras" id="vjl" /> ';
+ echo '<label for="vjl">'._VEGZOSOK_JOGVISZONYANAK_LEZARASA.'</label>'."\n";
+ echo '</h3>';
+ echo '<p>';
+ for ($i = 0; $i < count($ADAT['vegzoOsztalyok']); $i++) {
+ echo '<input id="vjl'.$i.'" type="checkbox" name="vjlOsztaly[]" value="'.$ADAT['vegzoOsztalyok'][$i]['osztalyId'].'" />';
+ echo '<label for="vjl'.$i.'">'.$ADAT['vegzoOsztalyok'][$i]['osztalyJel'].'</label>'."\n";
+ }
+ echo '</p>';
+ echo '</fieldset>';
+
+ echo '<fieldset>';
+ echo '<h3>';
+ echo '<input type="checkbox" name="step[]" value="vegzosOsztalyokLezarasa" id="vol" /> ';
+ echo '<label for="vol">'._VEGZOS_OSZTALYOK_LEZARASA.'</label>'."\n";
+ echo '</h3>';
+ echo '</fieldset>';
+
+ echo '<fieldset>';
+ echo '<h3>';
+ echo '<input type="checkbox" name="step[]" value="vegzosAzonositokTorlese" id="vat" /> ';
+ echo '<label for="vat">'._VEGZOSOK_AZONOSITOINAK_TORLESE.'</label>'."\n";
+ echo '</h3>';
+ echo '</fieldset>';
+
+ echo '<fieldset>';
+ echo '<h3>';
+ echo '<input type="checkbox" name="step[]" value="vegzosSzuloAzonositokTorlese" id="vszat" /> ';
+ echo '<label for="vszat">'._VEGZOSOK_SZULOI_AZONOSITOINAK_TORLESE.'</label>'."\n";
+ echo '</h3>';
+ echo '</fieldset>';
+
+ echo '<fieldset>';
+ echo '<h3>';
+ echo '<input type="checkbox" name="step[]" value="tanevLezaras" id="tl" /> ';
+ echo '<label for="tl">'._TANEV_LEZARAS.'</label>'."\n";
+ echo '</h3>';
+ echo '</fieldset>';
+
+ echo '<p>';
+ echo '<label for="rootUser">rootUser:</label><input type="text" name="rootUser" id="rootUser" value="root" />'."\n";
+ echo '<label for="rootPassword">rootPassword:</label><input type="password" name="rootPassword" id="rootPassword" value="" />'."\n";
+ echo '</p>'."\n";
+
+ echo '<input type="submit" value="'._LEZAR.'" />'."\n";
+ echo '</div>';
+
+ formEnd();
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/admin/tankorok.phtml b/mayor-orig/www/skin/classic/module-naplo/html/admin/tankorok.phtml
new file mode 100644
index 00000000..4aa1f88c
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/admin/tankorok.phtml
@@ -0,0 +1,5 @@
+<?php
+
+ require_once('skin/classic/module-naplo/html/share/file.phtml');
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/base.phtml b/mayor-orig/www/skin/classic/module-naplo/html/base.phtml
new file mode 100644
index 00000000..f8200b8c
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/base.phtml
@@ -0,0 +1,1230 @@
+<?php
+
+ if (_RIGHTS_OK !== true) die();
+
+ require_once('include/share/date/names.php');
+
+ if (_RUNLEVEL!=='cron') putEszkozSor();
+
+ function putUjIntezmeny() {
+
+ formBegin();
+ echo ' <input type="hidden" name="action" value="ujIntezmeny" />
+
+ _OMKOD(max7): <input type="text" name="OMKod" id="OMKod" value="0000000" maxlength="7" />
+ _ROVIDNEV(sql): <input type="text" name="rovidnev" id="rovidnev" />
+ _NEV: <input type="text" name="nev" id="nev" />
+
+ <input type="submit" />
+ ';
+ formEnd();
+
+ }
+
+ function putEszkozSor() {
+
+ global $TOOL,$policy;
+
+ if (__NOPAGEHELP!==true && (defined('__PAGEHELP') || isset($TOOL['pageHelp']) && defined('__'.$TOOL['pageHelp']))) $showHelp = true;
+ else $showHelp=false;
+
+ $colspan=3;
+
+ $_diakId = readVariable($_POST['diakId'],'id',readVariable($_GET['diakId'],'id',(defined('__USERDIAKID')?__USERDIAKID:null)));
+ $_tanarId = readVariable($_POST['tanarId'],'id',readVariable($_GET['tanarId'],'id',(defined('__USERTANARID')?__USERTANARID:null)));
+ $_tankorId = readVariable($_POST['tankorId'],'id',readVariable($_GET['tankorId'],'id',(null)));
+
+ echo '<table align="center" cellspacing="0" class="toolBar hideShowContainer"><tr class="first">';
+ if (is_array($TOOL['vissza'])) {
+ echo '<th style="width:32px;">';
+ putToolFormStart('vissza', '');
+ echo '<button type="submit" class="toolBarLeft icon-'.$TOOL['vissza']['icon'].'"></button>';
+ putToolFormStop(false, "");
+
+ echo '</th>';
+ $colspan++;
+ }
+
+ echo '<td class="toolBarTitle" id="toolBarTitle" colspan="3">';
+ if (defined('__PAGETITLE')) echo __PAGETITLE.'<br/>';
+ echo '<a href="'.href('index.php?page=naplo&sub=intezmeny&f=valtas').'">';
+ if (defined('__TELEPHELYID')) echo '<span id="toolBarIntezmeny" title="TelephelyId:".'.__TELEPHELYID.'>'.__INTEZMENY .', ' . __TANEV.'/'.(__TANEV+1).'</span>';
+ else echo '<span id="toolBarIntezmeny">'.__INTEZMENY . '/' . __TANEV.'</span>';
+ echo '</a>';
+ if ($showHelp) echo '<span id="toolBarHelpButton" class="onClickHideShow">?</span>';
+ echo '</td>'."\n";
+ reset($TOOL);
+ // TESZT echo '<td class="toolBarTool cella" style="position:; vertical-align:top; background-color: #5A85B8">';
+ // echo '<div class="icon-search" style="color:white; font-size:30px;max-width:30px;"></div>';
+ // echo '</td>';
+ foreach ( $TOOL as $tool => $params ) {
+// if ( function_exists( $func = "put$tool" ) && $params['tipus']=='cella') {
+ if ( isset($params['tipus']) && $params['tipus']=='cella') {
+ if (isset($params['title'])) $title = '__'.$params['title'];
+ else $title = '__'.nagybetus($tool).'TITLE';
+
+ echo '<td class="toolBarTool cella" style="position:; vertical-align:top">';
+ echo '<table style="/*border-bottom:solid 1px #558;*/" >'."\n";
+ if (defined($title)) {
+ echo '<tr><th>';
+ echo constant($title);
+ echo '</th><th>';
+ if ($GLOBALS['skin'] != 'vakbarat') echo '<button type="button" value="x" class="toolBarClear"><span class="icon-remove-circle"></span></button>';
+ echo '</th></tr>'."\n";
+ }
+ echo '<tr><td colspan="2">'."\n";
+ $func = "put$tool";
+ if (function_exists( $func )) { $func(); }
+ else { putGeneralSelect($tool); }
+ echo '</td></tr>'."\n";
+ echo '</table>'."\n";
+
+ echo '</td>'."\n";
+ $colspan++;
+ } elseif (isset($params['tipus']) && $params['tipus'] == 'sor') { $sorDb++; }
+ }
+
+ if (__PAGE_PRESET===true) {
+ echo '<th>';
+
+ putToolFormStart('preSetSave', '');
+ echo '<button type="submit" class="icon-heart-alt toolBarBtn"></button>';
+ echo '<input type="hidden" name="preSetSave" value="1" />';
+ putPostParams($TOOL['general']['post']);
+ putToolFormStop(false, "");
+
+ putToolFormStart('preSetLoad', '');
+ echo '<button type="submit" class="icon-reverse-alt toolBarBtn"></button>';
+ echo '<input type="hidden" name="preSetLoad" value="1" />';
+ // putPostParams($TOOL['general']['post']);
+ putToolFormStop(false, "");
+
+ echo '</th>';
+ }
+ if ($_diakId>0 && _POLICY=='private') {
+ echo '<td class="szemely diakNev" data-diakid="'.$_diakId.'">';
+ echo '<span class="icon-child" data-diakid="'.$_diakId.'"></span>'; // itt is kell a data...
+ echo '</td>'."\n";
+ } elseif ($_tanarId>0 && _POLICY=='private') {
+ echo '<td class="szemely tanarNev" data-tanarid="'.$_tanarId.'">';
+ echo '<span class="icon-adult" data-tanarid="'.$_tanarId.'"></span>'; // itt is kell a data...
+ echo '</td>'."\n";
+ }
+ if ($_tankorId>0 && _POLICY=='private') { //--TODO css class szemely->csoport
+ echo '<td class="szemely tankorAdat" data-tankorid="'.$_tankorId.'">';
+ echo '<span class="icon-group" data-tankorid="'.$_tankorId.'"></span>';
+ echo '</td>'."\n";
+ }
+ echo '<td id="toolBarKerelem">';
+ //echo '<div id="toolBarHamburgerVezerlo" style="height:100%; padding:4px; font-size:20px;">';
+ // echo '<span class="icon-th-list"></span>';
+ //echo '</div>';
+ if ($policy!='public') {
+ $href = href('index.php?page=naplo&sub=hibabejelento&f=hibabejelento');
+ echo '<a href="'.$href.'" class="noprint">';
+ //echo '<img src="skin/classic/module-naplo/img/hibabejelento/buggie.gif" alt="'._HIBABEJELENTES.'" />';
+ echo '<img src="skin/classic/module-naplo/img/hibabejelento/buggie.svg" style="height:34px;" alt="'._HIBABEJELENTES.'" id="mayorBuggie" />';
+ echo '</a>';
+ }
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+
+ if (__NOPAGEHELP!==true) {
+ if (isset($TOOL['pageHelp']) && defined('__'.$TOOL['pageHelp']))
+ echo '<tr><td colspan="'.$colspan.'" class="help openable" style="display:none">'.constant('__'.$TOOL['pageHelp']).'</td></tr>'."\n";
+ elseif (defined('__PAGEHELP'))
+ echo '<tr><td colspan="'.$colspan.'" class="help openable" style="display:none">'.__PAGEHELP.'</td></tr>'."\n";
+ }
+
+ reset($TOOL);
+ foreach ( $TOOL as $tool => $params ) {
+ if ( function_exists( $func = "put$tool" ) && $params['tipus']=='sor') {
+ echo '<tr><td colspan="'.($colspan).'">';
+
+ echo '<table align="center" cellspacing="0"><tr>';
+ if (isset($params['title'])) $title = '__'.$params['title'];
+ else $title = '__'.nagybetus($tool).'TITLE';
+ if (defined($title)) echo '<th class="toolBarTool">'.constant($title).'</th>'."\n";
+
+ echo '<td class="toolBarTool sor">';
+ $func();
+ echo '</td></tr></table>';
+ echo '</td></tr>';
+ }
+ }
+ echo '</table>';
+
+ }
+
+ function putPostParams($postParams, $postOverride=array()) {
+
+ if (is_array($postParams))
+ for ($i = 0; $i < count($postParams); $i++) {
+ $postParam = $postParams[$i];
+ if (is_array($_POST[$postParam])) {
+ for ($j = 0; $j < count($_POST[$postParam]); $j++) {
+ echo '<input type="hidden" name="'.$postParam.'[]" value="'.str_replace('"', '', $_POST[$postParam][$j]).'" />'."\n";
+ }
+ } else {
+ echo '<input type="hidden" name="'.$postParam.'" value="'.str_replace('"', '', $_POST[$postParam]).'" />'."\n";
+ }
+ }
+ if (is_array($postOverride) && count($postOverride)>=1) {
+ foreach($postOverride as $_k => $_v)
+ echo '<input type="hidden" name="'.$_k.'" value="'.str_replace('"', '', $_v).'" />'."\n";
+ }
+ }
+
+ function setParam($toolName, $paramName) {
+
+ global $TOOL;
+
+ if (isset($TOOL[$toolName]['paramName'])) $paramName = $TOOL[$toolName]['paramName'];
+ else $TOOL[$toolName]['paramName'] = $paramName;
+ global $$paramName;
+
+ $TOOL[$toolName]['paramValue'] = ($$paramName != '' || $$paramName === 0) ? $$paramName : $TOOL[$toolName][$paramName];
+
+ }
+
+ function putToolFormStart($toolName, $paramName, $_action='') {
+
+ global $TOOL;
+ //if (!isset($_action))
+ $_action = href('index.php',array('page','sub','f','lang','skin','sessionID','policy'));
+ setParam($toolName, $paramName);
+ formBegin(array('id' => $toolName.'Tool', 'method' => 'post', 'action'=> $_action));
+ if (isset($TOOL[$toolName]['action']))
+ echo '<input type="hidden" name="action" value="'.$TOOL[$toolName]['action'].'" />'."\n";
+ putPostParams($TOOL[$toolName]['post'],$TOOL[$toolName]['postOverride']);
+ echo '<table><tr><td>'."\n";
+
+ }
+
+ function putToolFormStop($putSubmitButton=true, $putTextButton="") {
+
+ echo '</td>';
+ if ($putSubmitButton===true) {
+ echo '<td class="sbmt">'."\n";
+// echo '<input style="float: right; height:17px; width:17px;" class="toolSubmit" type="image" name="kiválaszt" value="kiválaszt" src="skin/classic/module-naplo/img/toolSubmit.png" />'."\n";
+ if ($GLOBALS['skin'] != 'vakbarat')
+ echo '<button type="submit" class="toolSubmit" value=""><span class="icon-ok"></span></button>';
+ else echo '<input type="submit" class="toolSubmit" name="kivalaszt" value="kiválaszt" />';
+ echo '</td>';
+ }
+ if ($putTextButton!='') {
+ echo '<td>'."\n";
+ echo '<input style="float: right;" class="toolSubmit" type="button" name="" value="'.$putTextButton.'" />'."\n";
+ echo '</td>';
+ }
+ echo '</tr></table>'."\n";
+ formEnd();
+ }
+
+ /* Toolok */
+
+ function putGeneralSelect($tool) {
+
+ global $TOOL;
+
+ putToolFormStart($tool, $TOOL[$tool]['paramName']);
+
+ echo '<select name="'.$TOOL[$tool]['paramName'].'" class="onChangeSubmit">';
+ echo '<option value=""> - </option>'."\n";
+ $SEL = array($TOOL[$tool]['paramValue'] => ' selected="selected" ');
+ for ($i=0; $i < count($TOOL[$tool]['adatok']); $i++) {
+ $M = $TOOL[$tool]['adatok'][$i];
+ $id = $M[ $TOOL[$tool]['paramName'] ];
+ $nev = $M[ $TOOL[$tool]['paramDesc'] ];
+ echo '<option value="'.$id.'"'.$SEL[$id].'>'.htmlspecialchars($nev);
+ if ($id != $nev) echo ' ('.$id.')';
+ echo '</option>';
+ }
+ echo '</select>';
+ putToolFormStop();
+
+ }
+
+ function putSzamSelect() {
+
+ global $TOOL;
+ putToolFormStart('szamSelect', 'szam');
+ echo '<select name="'.$TOOL['szamSelect']['paramName'].'" class="onChangeSubmit">';
+ echo '<option value=""> - </option>'."\n";
+ $SEL = array($TOOL['szamSelect']['paramValue'] => ' selected="selected" ');
+ foreach ($TOOL['szamSelect']['szamok'] as $_szam) {
+ echo '<option value="'.$_szam.'"'.$SEL[$_szam].'>'.$_szam.'</option>';
+ }
+ echo '</select>';
+ putToolFormStop();
+
+ }
+
+ function putIntezmenySelect() {
+
+ global $TOOL;
+
+ putToolFormStart('intezmenySelect', 'intezmeny');
+ echo '<select name="'.$TOOL['intezmenySelect']['paramName'].'" class="onChangeSubmit">';
+ echo '<option value=""> - </option>'."\n";
+ $SEL = array($TOOL['intezmenySelect']['paramValue'] => ' selected="selected" ');
+ for ($i=0; $i < count($TOOL['intezmenySelect']['intezmenyek']); $i++) {
+ $I = $TOOL['intezmenySelect']['intezmenyek'][$i];
+ echo '<option value="'.$I['rovidNev'].'"'.$SEL[$I['rovidNev']].'>'.htmlspecialchars($I['nev']).' ('.$I['OMKod'].')'.'</option>';
+ }
+ echo '</select>';
+ putToolFormStop();
+
+ }
+
+ function putTelephelySelect() {
+
+ global $TOOL;
+
+ putToolFormStart('telephelySelect', 'telephelyId');
+ echo '<select name="'.$TOOL['telephelySelect']['paramName'].'" class="onChangeSubmit" style="width:50px">';
+ echo '<option value=""> - </option>'."\n";
+ $SEL = array($TOOL['telephelySelect']['paramValue'] => ' selected="selected" ');
+ for ($i=0; $i < count($TOOL['telephelySelect']['telephelyek']); $i++) {
+ $I = $TOOL['telephelySelect']['telephelyek'][$i];
+ echo '<option value="'.$I['telephelyId'].'"'.$SEL[$I['telephelyId']].'>'.$I['telephelyRovidNev'].' ('.htmlspecialchars($I['telephelyNev']).')</option>';
+ }
+ echo '</select>';
+ putToolFormStop();
+
+ }
+
+ function putTanevSelect() {
+
+ global $TOOL;
+
+ putToolFormStart('tanevSelect', 'tanev');
+ echo '<select name="'.$TOOL['tanevSelect']['paramName'].'" class="onChangeSubmit">';
+ echo '<option value=""> - </option>'."\n";
+ $SEL = array($TOOL['tanevSelect']['paramValue'] => ' selected="selected" ');
+ for ($i=0; $i < count($TOOL['tanevSelect']['tanevek']); $i++) {
+ $T = $TOOL['tanevSelect']['tanevek'][$i];
+ echo '<option value="'.$T.'"'.$SEL[$T].'>'.$T.'</option>';
+ }
+ echo '</select>';
+ putToolFormStop();
+
+ }
+
+ function putSzemeszterSelect() {
+
+ global $TOOL;
+
+ putToolFormStart('szemeszterSelect', 'szemeszterId');
+ echo '<select name="'.$TOOL['szemeszterSelect']['paramName'].'" class="onChangeSubmit">';
+ echo '<option value=""> - </option>'."\n";
+ $SEL = array( $TOOL['szemeszterSelect']['paramValue'] => ' selected="selected" ');
+ for ($i = 0; $i < count($TOOL['szemeszterSelect']['szemeszterek']); $i++) {
+ $T = $TOOL['szemeszterSelect']['szemeszterek'][$i];
+ echo '<option value="'.$T['szemeszterId'].'"'.$SEL[$T['szemeszterId']].'>'.$T['tanev'].' / '.$T['szemeszter'].'</option>';
+ }
+ echo '</select>';
+ putToolFormStop();
+
+ }
+
+ function putFelevSelect() {
+
+ global $TOOL;
+
+ putToolFormStart('felevSelect', 'szemeszter');
+ echo '<select name="'.$TOOL['felevSelect']['paramName'].'" class="onChangeSubmit">';
+ echo '<option value=""> - </option>'."\n";
+ $SEL = array( $TOOL['felevSelect']['paramValue'] => ' selected="selected" ');
+ for ($i = 1; $i <= 2 ; $i++) {
+ echo '<option value="'.$i.'"'.$SEL[$i].'>'.$i.'</option>';
+ }
+ echo '</select>';
+ putToolFormStop();
+
+ }
+
+ function putTargySorrendSelect() {
+
+ global $TOOL;
+
+ putToolFormStart('targySorrendSelect', 'sorrendNev');
+ echo '<select name="'.$TOOL['targySorrendSelect']['paramName'].'" class="onChangeSubmit">';
+ echo '<option value=""> - </option>'."\n";
+ $SEL = array( $TOOL['targySorrendSelect']['paramValue'] => ' selected="selected" ');
+ for ($i = 0; $i < count($TOOL['targySorrendSelect']['sorrendNevek']); $i++) {
+ $T = $TOOL['targySorrendSelect']['sorrendNevek'][$i];
+ echo '<option value="'.$T.'"'.$SEL[$T].'>'.$T.'</option>';
+ }
+ echo '</select>';
+ putToolFormStop();
+
+ }
+
+ function putMunkakozossegSelect() {
+
+ global $TOOL;
+
+ putToolFormStart('munkakozossegSelect', 'mkId');
+ echo '<select name="'.$TOOL['munkakozossegSelect']['paramName'].'" class="onChangeSubmit">';
+ echo '<option value=""> - </option>'."\n";
+ $SEL = array($TOOL['munkakozossegSelect']['paramValue'] => ' selected="selected" ');
+ for ($i=0; $i < count($TOOL['munkakozossegSelect']['munkakozossegek']); $i++) {
+ $M = $TOOL['munkakozossegSelect']['munkakozossegek'][$i];
+ echo '<option value="'.$M['mkId'].'"'.$SEL[$M['mkId']].'>'.$M['leiras'];
+ if ($M['mkVezNev']!='') echo ' ('.htmlspecialchars($M['mkVezNev']).') ';
+ echo '</option>';
+ }
+ echo '</select>';
+ putToolFormStop();
+
+ }
+
+ function putTargySelect() {
+
+ global $TOOL;
+
+ putToolFormStart('targySelect', 'targyId');
+ echo '<select name="'.$TOOL['targySelect']['paramName'].'" class="onChangeSubmit">';
+ echo '<option value=""> - </option>'."\n";
+ $SEL = array($TOOL['targySelect']['paramValue'] => ' selected="selected" ');
+ for ($i=0; $i < count($TOOL['targySelect']['targyak']); $i++) {
+ $M = $TOOL['targySelect']['targyak'][$i];
+ echo '<option value="'.$M['targyId'].'"'.$SEL[$M['targyId']].'>'.htmlspecialchars($M['targyNev']).' ('.$M['targyId'].')'.'</option>';
+ }
+ echo '</select>';
+ putToolFormStop();
+
+ }
+
+ function putMunkatervSelect() {
+
+ global $TOOL;
+
+ putToolFormStart('munkatervSelect', 'munkatervId');
+ echo '<select name="'.$TOOL['munkatervSelect']['paramName'].'" class="onChangeSubmit">';
+ echo '<option value=""></option>'."\n";
+ $SEL = array($TOOL['munkatervSelect']['paramValue'] => ' selected="selected" ');
+ for ($i=0; $i < count($TOOL['munkatervSelect']['munkatervek']); $i++) {
+ $M = $TOOL['munkatervSelect']['munkatervek'][$i];
+ echo '<option value="'.$M['munkatervId'].'"'.$SEL[$M['munkatervId']].'>'.htmlspecialchars($M['munkatervNev']).' ('.$M['munkatervId'].')'.'</option>';
+ }
+ echo '</select>';
+ putToolFormStop();
+
+ }
+
+ function putTanarSelect() {
+
+ global $TOOL;
+ $StatuszJel = array(
+ 'jogviszonya lezárva' => ' [-]',
+ 'tartósan távol' => ' [t]',
+ 'külső óraadó' => ' [k]'
+ );
+
+ putToolFormStart('tanarSelect', 'tanarId');
+ echo '<select name="'.$TOOL['tanarSelect']['paramName'].'" class="onChangeSubmit" accesskey="t">';
+ echo '<option value=""></option>'."\n";
+ $SEL = array($TOOL['tanarSelect']['paramValue'] => ' selected="selected" ');
+ for ($i=0; $i < count($TOOL['tanarSelect']['tanarok']); $i++) {
+ $M = $TOOL['tanarSelect']['tanarok'][$i];
+// echo '<option value="'.$M['tanarId'].'"'.$SEL[$M['tanarId']].'>'.(($M['aktualisStatusz'] == 'jogviszonyban van')?'':'[-] ').htmlspecialchars($M['tanarNev']).' ('.$M['tanarId'].')'.'</option>';
+ echo '<option value="'.$M['tanarId'].'"'.$SEL[$M['tanarId']].'>'.htmlspecialchars($M['tanarNev']).' ('.$M['tanarId'].')'.$StatuszJel[$M['statusz']].'</option>';
+ }
+ echo '</select>';
+ putToolFormStop();
+
+ }
+
+ function putDiakSelect() {
+
+ global $TOOL;
+
+ putToolFormStart('diakSelect', 'diakId');
+
+ if ($TOOL['diakSelect']['searchable']==true && $TOOL['diakSelect']['paramValue']=='' && count($TOOL['diakSelect']['diakok'])>100) {
+ echo '<span style="display:none" id="diakSelectIcon">ዖ</span>';
+ echo '<input type="text" name="diakSelectPattern" id="diakSelectPattern" value="" placeholder="'._NEV.'" />';
+ echo '<select style="display:none" id="diakSelectLista" name="'.$TOOL['diakSelect']['paramName'].'" class="onChangeSubmit" accesskey="d">';
+ echo '<option value=""></option>';
+ echo '</select>';
+ } else {
+ echo '<span style="display:inline" id="diakSelectIcon" class="icon-view-mode"></span>'; //ዖ
+ echo '<input style="display:none;" type="text" name="diakSelectPattern" id="diakSelectPattern" value="" placeholder="'._NEV.'"/>';
+ echo '<select id="diakSelectLista" name="'.$TOOL['diakSelect']['paramName'].'" class="onChangeSubmit" accesskey="d">';
+ echo '<option value=""></option>'."\n";
+ $SEL = array($TOOL['diakSelect']['paramValue'] => ' selected="selected" ');
+ foreach ($TOOL['diakSelect']['statusz'] as $statusz) {
+ if (count($TOOL['diakSelect']['statusz']) > 1) echo '<optgroup label="'.$statusz.'">'."\n";
+ for ($i = 0; $i < count($TOOL['diakSelect']['diakok']); $i++) {
+ $M = $TOOL['diakSelect']['diakok'][$i];
+ if ($M['aktualisStatusz'] == 'magántanuló') $statuszStr = ' - [m]';
+ elseif ($M['aktualisStatusz'] == 'jogviszonya lezárva') $statuszStr = ' - [-]';
+ elseif ($M['aktualisStatusz'] == 'jogviszonya felfüggesztve') $statuszStr = ' - [f]';
+ else $statuszStr = '';
+ if ($M['aktualisStatusz'] == $statusz) {
+ echo '<option value="'.$M['diakId'].'"'.$SEL[$M['diakId']].'>';
+ if (_POLICY=='private') {
+ echo htmlspecialchars($M['diakNev']).' ('.$M['diakId'].')'.$statuszStr;
+ } else {
+ $_tmpNev = explode(' ',str_replace(' ',' ',$M['diakNev']));
+ $_tmpStr = '';
+ // echo serialize($_tmpNev);
+ for ($n=0; $n<count($_tmpNev); $n++) $_tmpStr .= mb_substr($_tmpNev[$n],0,1).'.';
+ echo htmlspecialchars($_tmpStr);
+ }
+ echo '</option>';
+ }
+ }
+ if (count($TOOL['diakSelect']['statusz']) > 1) echo '</optgroup>'."\n";
+ }
+ echo '</select>';
+ } // <100
+ putToolFormStop();
+
+ }
+
+ function putDiakLapozo() {
+
+ global $TOOL;
+
+ putToolFormStart('diakLapozo', 'diakId');
+
+ for ($i = 0; $i < count($TOOL['diakLapozo']['diakok']); $i++) {
+ if ($TOOL['diakLapozo']['diakok'][$i]['diakId'] == $TOOL['diakLapozo']['paramValue']) {
+ $M[0] = $TOOL['diakLapozo']['diakok'][$i-1];
+ $M[1] = $TOOL['diakLapozo']['diakok'][$i];
+ $M[2] = $TOOL['diakLapozo']['diakok'][$i+1];
+ break;
+ }
+ }
+ if (is_array($M[0])) echo '<button type="submit" class="lapozo balra" name="diakId" value="'.$M[0]['diakId'].'">'.htmlspecialchars($M[0]['diakNev']).'</button>';
+
+ if ($TOOL['diakLapozo']['withSelect'] === true) {
+ echo '<select id="diakSelectLista" name="'.$TOOL['diakLapozo']['paramName'].'" class="onChangeSubmit" accesskey="d">';
+ echo '<option value="">------------------------------ '.__DIAKLAPOZOTITLE.' ------------------------------------</option>'."\n";
+ $SEL = array($TOOL['diakLapozo']['paramValue'] => ' selected="selected" ');
+ foreach ($TOOL['diakLapozo']['statusz'] as $statusz) {
+ if (count($TOOL['diakLapozo']['statusz']) > 1) echo '<optgroup label="'.$statusz.'">'."\n";
+ for ($i = 0; $i < count($TOOL['diakLapozo']['diakok']); $i++) {
+ $D = $TOOL['diakLapozo']['diakok'][$i];
+ if ($D['aktualisStatusz'] == 'magántanuló') $statuszStr = ' - [m]';
+ elseif ($D['aktualisStatusz'] == 'jogviszonya lezárva') $statuszStr = ' - [-]';
+ elseif ($D['aktualisStatusz'] == 'jogviszonya felfüggesztve') $statuszStr = ' - [f]';
+ else $statuszStr = '';
+ if ($D['aktualisStatusz'] == $statusz) echo '<option value="'.$D['diakId'].'"'.$SEL[$D['diakId']].'>'.htmlspecialchars($D['diakNev']).' ('.$D['diakId'].')'.$statuszStr.'</option>';
+ }
+ if (count($TOOL['diakLapozo']['statusz']) > 1) echo '</optgroup>'."\n";
+ }
+ echo '</select>';
+ } else {
+ echo '<span class="lapozo">'.htmlspecialchars($M[1]['diakNev']).'</span>';
+ }
+ if (is_array($M[2])) echo '<button type="submit" class="lapozo jobbra" name="diakId" value="'.$M[2]['diakId'].'">'.htmlspecialchars($M[2]['diakNev']).'</button>';
+
+ putToolFormStop(false);
+
+ }
+
+ function putTableSelect() {
+
+ global $TOOL;
+
+ putToolFormStart('tableSelect', 'table');
+ echo '<select name="'.$TOOL['tableSelect']['paramName'].'" class="onChangeSubmit">';
+ echo '<option value=""></option>'."\n";
+ $SEL = array($TOOL['tableSelect']['paramValue'] => ' selected="selected" ');
+ for ($i = 0; $i < count($TOOL['tableSelect']['naplo_intezmeny']); $i++) {
+ $t = $TOOL['tableSelect']['naplo_intezmeny'][$i];
+ echo '<option value="'."naplo_intezmeny:$t".'"'.$SEL["naplo_intezmeny:$t"].'>'.$t.' ('.__INTEZMENY.')</option>';
+ }
+ for ($i = 0; $i < count($TOOL['tableSelect']['naplo']); $i++) {
+ $t = $TOOL['tableSelect']['naplo'][$i];
+ echo '<option value="'."naplo:$t".'"'.$SEL["naplo:$t"].'>'.$t.' ('.__TANEV.')</option>';
+ }
+ echo '</select>';
+ putToolFormStop();
+ }
+
+ function putOsztalySelect() {
+
+ global $TOOL;
+
+ putToolFormStart('osztalySelect', 'osztalyId');
+ echo '<select name="'.$TOOL['osztalySelect']['paramName'].'" class="onChangeSubmit" accesskey="o">';
+ echo '<option value=""> - </option>'."\n";
+ $SEL = array($TOOL['osztalySelect']['paramValue'] => ' selected="selected" ');
+ for ($i = 0; $i < count($TOOL['osztalySelect']['osztalyok']); $i++) {
+ $M = $TOOL['osztalySelect']['osztalyok'][$i];
+ if (isset($M['osztalyJel'])) $osztalyJel = $M['osztalyJel'].' - '.$M['kezdoTanev'];
+ else $osztalyJel = $M['kezdoTanev'].'/'.$M['jel'];
+ if (is_array($M['osztalyfonok']) && $M['osztalyfonokNev']!=''){
+ $osztalyJel .= ' ('.htmlspecialchars($M['osztalyfonokNev']).')';
+ }
+ echo '<option value="'.$M['osztalyId'].'"'.$SEL[$M['osztalyId']].'>'.$osztalyJel.'</option>';
+ }
+ echo '</select>';
+ putToolFormStop();
+ }
+
+ function putTanmenetSelect() {
+
+ global $TOOL;
+ putToolFormStart('tanmenetSelect', 'tanmenetId');
+ echo '<select name="'.$TOOL['tanmenetSelect']['paramName'].'" class="onChangeSubmit" accesskey="t">';
+ echo '<option value=""> - </option>'."\n";
+ $SEL = array($TOOL['tanmenetSelect']['paramValue'] => ' selected="selected" ');
+ for ($i = 0; $i < count($TOOL['tanmenetSelect']['tanmenetek']); $i++) {
+ $M = $TOOL['tanmenetSelect']['tanmenetek'][$i];
+ $tanmenetNev = $M['tanmenetNev'].' ('.$M['tanmenetId'].') - '.$M['tanarNev'].' '.$M['dt'].' ('.$M['statusz'].')';
+ echo '<option value="'.$M['tanmenetId'].'"'.$SEL[$M['tanmenetId']].'>'.htmlspecialchars($tanmenetNev).'</option>';
+ }
+ echo '</select>';
+ putToolFormStop();
+ }
+
+ function putTankorSelect() {
+
+ global $TOOL;
+
+ if (count($TOOL['tankorSelect']['tankorok'])>0) {
+ if ($TOOL['tankorSelect']['tankorIdsDt']!='') $_info = true; else $_info=false;
+ putToolFormStart('tankorSelect', 'tankorId');
+ echo '<select name="'.$TOOL['tankorSelect']['paramName'].'" class="onChangeSubmit" accesskey="k" title="'.$TOOL['tankorSelect']['tankorIdsDt'].'">';
+ echo '<option value=""></option>'."\n";
+ $SEL = array($TOOL['tankorSelect']['paramValue'] => ' selected="selected" ');
+ if (is_array($TOOL['tankorSelect']['tankorIds'])) {
+ if ($_info) echo '<optgroup label="--['.$TOOL['tankorSelect']['tankorIdsDt'].']-----------------">';
+ for ($i = 0; $i < count($TOOL['tankorSelect']['tankorok']); $i++) {
+ $M = $TOOL['tankorSelect']['tankorok'][$i];
+ if (in_array($M['tankorId'], $TOOL['tankorSelect']['tankorIds']))
+ echo '<option value="'.$M['tankorId'].'"'.$SEL[$M['tankorId']].'>'.htmlspecialchars($M['tankorNev']).' ('.$M['tankorId'].')'.'</option>';
+ }
+ if ($_info) echo '</optgroup>';
+ if ($_info) echo '<optgroup label="--------------------------------------">';
+ for ($i = 0; $i < count($TOOL['tankorSelect']['tankorok']); $i++) {
+ $M = $TOOL['tankorSelect']['tankorok'][$i];
+ if (!in_array($M['tankorId'], $TOOL['tankorSelect']['tankorIds']))
+ echo '<option value="'.$M['tankorId'].'"'.$SEL[$M['tankorId']].'>'.htmlspecialchars($M['tankorNev']).' ('.$M['tankorId'].')'.'</option>';
+ }
+ if ($_info) echo '</optgroup>';
+ } else {
+ for ($i = 0; $i < count($TOOL['tankorSelect']['tankorok']); $i++) {
+ $M = $TOOL['tankorSelect']['tankorok'][$i];
+ echo '<option value="'.$M['tankorId'].'"'.$SEL[$M['tankorId']].'>'.htmlspecialchars($M['tankorNev']).' ('.$M['tankorId'].')'.'</option>';
+ }
+ }
+ echo '</select>';
+ putToolFormStop();
+ }
+
+ }
+
+ function putTanevLapozo() {
+ global $TOOL;
+
+ putToolFormStart('tanevLapozo', 'tanev');
+ echo '&larr;';
+ echo '<input type="submit" name="tanev" value="'.($TOOL['tanevLapozo']['tanev']-1).'" />';
+ echo '</td>';
+ echo '<th>'.$TOOL['tanevLapozo']['tanev'].'</th>';
+ echo '<td>';
+ echo '<input type="submit" name="tanev" value="'.($TOOL['tanevLapozo']['tanev']+1).'" />';
+ echo '&rarr;';
+ echo '</td></tr></table>';
+ formEnd();
+ }
+
+ function putDatumSelect() {
+ global $TOOL;
+ $paramName = $TOOL['datumSelect']['paramName'];
+ global $$paramName;
+
+ $aHetNapjai = json_decode(AHETNAPJAI);
+
+ if ($TOOL['datumSelect']['lapozo']) {
+ // Előző és következő dátum meghatározása
+ $elozo = $kovetkezo = '';
+ if (is_array($TOOL['datumSelect']['napok'])) {
+ for ($i = 0; $i < count($TOOL['datumSelect']['napok']); $i++) {
+ if ($TOOL['datumSelect']['napok'][$i] == $$paramName) {
+ $kovetkezo = $TOOL['datumSelect']['napok'][$i+1];
+ $elozo = $TOOL['datumSelect']['napok'][$i-1];
+ break;
+ }
+ }
+ } else {
+ $tolTime = strtotime($TOOL['datumSelect']['tolDt']);
+ $igTime = strtotime($TOOL['datumSelect']['igDt']);
+ $count = $TOOL['datumSelect']['hanyNaponta'];
+ for ($t = $tolTime; $t <= $igTime; $t = strtotime("$count days", $t)) {
+ $d = date('Y-m-d', $t);
+ if ($d == $$paramName) {
+ if (strtotime("$count days", $t) <= $igTime) $kovetkezo = date('Y-m-d', strtotime("$count days", $t));
+ break;
+ }
+ $elozo = $d;
+ }
+ }
+ echo '<table><tr>';
+ if ($elozo!='') {
+ echo '<td>';
+ formBegin(array('method'=>'post', 'action'=>href('index.php',array('page','sub','f','lang','skin','sessionID','policy'))));
+ echo '<table><tr><td>';
+ if (isset($TOOL['datumSelect']['action']))
+ echo '<input type="hidden" name="action" value="'.$TOOL['datumSelect']['action'].'" />'."\n";
+ putPostParams($TOOL['datumSelect']['post']);
+ echo '<input name="'.$paramName.'" style="float: left;" class="toolSubmit" type="submit" value="'.$elozo.'" />';
+ echo '</td></tr></table>';
+ formEnd();
+ echo '</td>';
+ }
+ echo '<td>';
+
+ }
+
+ formBegin(array('method'=>'post', 'action'=>href('index.php',array('page','sub','f','lang','skin','sessionID','policy'))));
+ echo '<table><tr><td>';
+ if (isset($TOOL['datumSelect']['action']))
+ echo '<input type="hidden" name="action" value="'.$TOOL['datumSelect']['action'].'" />'."\n";
+ putPostParams($TOOL['datumSelect']['post']);
+ $SEL = array($$paramName => ' selected="selected" ');
+ echo '<button type="button" name="selectorBtn" value="'.$elozo.'" class="btnSelectPrev toolBarBtn mobileOnly">'.'<span class="icon-chevron-left"></span></button>';
+ echo '<select name="'.$paramName.'" class="onChangeSubmit">';
+ echo '<option value=""> - </option>'."\n";
+ if (is_array($TOOL['datumSelect']['napok'])) {
+ for ($i = 0; $i < count($TOOL['datumSelect']['napok']); $i++) {
+ $d = $TOOL['datumSelect']['napok'][$i];
+ echo '<option value="'.$d.'"'.$SEL[$d].'>'.$d.' ('.$aHetNapjai[(date('w',strtotime($d))+6) % 7].')</option>';
+ }
+ } else {
+ $tolTime = strtotime($TOOL['datumSelect']['tolDt']);
+ $igTime = strtotime($TOOL['datumSelect']['igDt']);
+ $count = $TOOL['datumSelect']['hanyNaponta'];
+ for (
+ $t = $tolTime;
+ $t <= $igTime;
+ $t = ($count == 'havonta') ? strtotime("next month", $t) : strtotime("$count days", $t)
+ ) {
+ $d = date('Y-m-d', $t);
+ echo '<option value="'.$d.'"'.$SEL[$d].'>'.$d.' ('.$aHetNapjai[(date('w',strtotime($d))+6) % 7].')</option>';
+ }
+ }
+ echo '</select>';
+ echo '<button type="button" name="selectorBtn" value="'.$kovetkezo.'" class="btnSelectNext toolBarBtn mobileOnly">'.'<span class="icon-chevron-right"></span></button>';
+ putToolFormStop();
+
+ if ($TOOL['datumSelect']['lapozo']) {
+ echo '</td>';
+ if ($kovetkezo!='') {
+ echo '<td>';
+
+ formBegin(array('method'=>'post', 'action'=>href('index.php',array('page','sub','f','lang','skin','sessionID','policy'))));
+ echo '<table><tr><td>';
+ if (isset($TOOL['datumSelect']['action']))
+ echo '<input type="hidden" name="action" value="'.$TOOL['datumSelect']['action'].'" />'."\n";
+ putPostParams($TOOL['datumSelect']['post']);
+ echo '<input name="'.$paramName.'" style="float: right;" class="toolSubmit" type="submit" value="'.$kovetkezo.'" />';
+ echo '</td></tr></table>';
+ formEnd();
+
+ echo '</td>';
+ }
+ echo '</tr></table>';
+ }
+
+
+
+ }
+
+//--
+ function putDatumTolIgSelect() {
+
+ global $TOOL, $aHetNapjai;
+
+ $tolParamName = $TOOL['datumTolIgSelect']['tolParamName'];
+ global $$tolParamName;
+ $igParamName = $TOOL['datumTolIgSelect']['igParamName'];
+ global $$igParamName;
+
+ formBegin(array('method'=>'post', 'action'=>href('index.php',array('page','sub','f','lang','skin','sessionID','policy'))));
+ putPostParams($TOOL['datumTolIgSelect']['post']);
+ if (isset($TOOL['datumTolIgSelect']['action']))
+ echo '<input type="hidden" name="action" value="'.$TOOL['datumTolIgSelect']['action'].'" />'."\n";
+ echo '<table><tr><td>'."\n";
+ echo '<select name="'.$tolParamName.'" class="onChangeSubmit">';
+ echo '<option value=""> - </option>'."\n";
+ $SEL = array($$tolParamName => ' selected="selected" ');
+ if (is_array($TOOL['datumTolIgSelect']['napok'])) {
+ for ($i = 0; $i < count($TOOL['datumTolIgSelect']['napok']); $i++) {
+ $d = $TOOL['datumTolIgSelect']['napok'][$i];
+ echo '<option value="'.$d.'"'.$SEL[$d].'>'.$d.' ('.$aHetNapjai[(date('w',strtotime($d))+6) % 7].')</option>';
+ }
+ } else {
+ $tolTime = strtotime($TOOL['datumTolIgSelect']['tolDt']);
+ $igTime = strtotime($TOOL['datumTolIgSelect']['igDt']);
+ $count = $TOOL['datumTolIgSelect']['hanyNaponta'];
+ for (
+ $t = $tolTime;
+ $t <= $igTime && $t != 0;
+ $t = ($count == 'havonta') ? strtotime("next month", $t) : strtotime("$count days", $t)
+ ) {
+ $d = date('Y-m-d', $t);
+ echo '<option value="'.$d.'"'.$SEL[$d].'>'.$d.' ('.$aHetNapjai[(date('w',strtotime($d))+6) % 7].')</option>';
+ }
+ }
+ echo '</select>';
+
+ echo ' - ';
+
+ echo '<select name="'.$igParamName.'" class="onChangeSubmit">';
+ echo '<option value=""> - </option>'."\n";
+ $SEL = array($$igParamName => ' selected="selected" ');
+ if (is_array($TOOL['datumTolIgSelect']['napok'])) {
+ for ($i = 0; $i < count($TOOL['datumTolIgSelect']['napok']); $i++) {
+ $d = $TOOL['datumTolIgSelect']['napok'][$i];
+ echo '<option value="'.$d.'"'.$SEL[$d].'>'.$d.' ('.$aHetNapjai[(date('w',strtotime($d))+6) % 7].')</option>';
+ }
+ } else {
+ $tolTime = strtotime($TOOL['datumTolIgSelect']['tolDt']);
+ $igTime = strtotime($TOOL['datumTolIgSelect']['igDt']);
+ $count = $TOOL['datumTolIgSelect']['hanyNaponta'];
+ for (
+ $t = $tolTime;
+ $t <= $igTime && $t != 0;
+ $t = ($count == 'havonta') ? strtotime("next month", $t) : strtotime("$count days", $t)
+ ) {
+ $d = date('Y-m-d', $t);
+ echo '<option value="'.$d.'"'.$SEL[$d].'>'.$d.' ('.$aHetNapjai[(date('w',strtotime($d))+6) % 7].')</option>';
+ }
+ }
+ echo '</select>';
+ putToolFormStop();
+
+ }
+
+
+ function putOraSelect() {
+
+ global $TOOL;
+
+ putToolFormStart('oraSelect', 'ora');
+ echo '<select name="'.$TOOL['oraSelect']['paramName'].'" class="onChangeSubmit">';
+ $SEL = array($TOOL['oraSelect']['paramValue'] => ' selected="selected" ');
+ echo '<option value=""> - </option>'."\n";
+ if (is_array($TOOL['oraSelect']['orak'])) {
+ for ($i = 0; $i < count($TOOL['oraSelect']['orak']); $i++) {
+ echo '<option value="'.$TOOL['oraSelect']['orak'][$i].'"'.$SEL[$TOOL['oraSelect']['orak'][$i]].'>'.$TOOL['oraSelect']['orak'][$i].'</option>';
+ }
+ if ($TOOL['oraSelect']['foglaltOrakkal']) {
+ echo '<optgroup label="'._FOGLALT_ORAK.'">';
+ for ($t = $TOOL['oraSelect']['tol']; $t <= $TOOL['oraSelect']['ig']; $t++) {
+ if (!in_array($t, $TOOL['oraSelect']['orak'])) echo '<option value="'.$t.'"'.$SEL[$t].'>'.$t.'</option>';
+ }
+ echo '</optgroup>'."\n";
+ }
+ } else {
+ for ($t = $TOOL['oraSelect']['tol']; $t <= $TOOL['oraSelect']['ig']; $t++) {
+ echo '<option value="'.$t.'"'.$SEL[$t].'>'.$t.'</option>';
+ }
+ }
+ echo '</select>';
+ putToolFormStop();
+
+ }
+
+ function putTeremSelect() {
+
+ global $TOOL;
+
+ // telephely szerint szétválogatás:
+ $numt=0;
+ if (is_array($TOOL['teremSelect']['termek'])) {
+ for ($i = 0; $i < count($TOOL['teremSelect']['termek']); $i++) {
+ $I = $TOOL['teremSelect']['termek'][$i];
+ $T[$I['telephelyId']][] = $I;
+ $numt++;
+ }
+ }
+
+ putToolFormStart('teremSelect', 'teremId');
+ echo '<select name="'.$TOOL['teremSelect']['paramName'].'" class="onChangeSubmit">';
+ $SEL = array($TOOL['teremSelect']['paramValue'] => ' selected="selected" ');
+ echo '<option value=""> - </option>'."\n";
+ if ($numt>=2) {
+ foreach($T AS $telephelyId => $I) {
+ $disp = ($telephelyId=='')?'Nincs telephely':$telephelyId;
+ echo '<optgroup label="'.$disp.'">';
+ if (is_array($I)) {
+ for ($i = 0; $i < count($I); $i++) {
+ $show = $I[$i]['leiras'];
+ echo '<option value="'.$I[$i]['teremId'].'"'.$SEL[$I[$i]['teremId']].'>'.$show.'</option>';
+ }
+ }
+ echo '</optgroup>'."\n";
+ }
+ } else {
+ if (is_array($TOOL['teremSelect']['termek'])) {
+ for ($i = 0; $i < count($TOOL['teremSelect']['termek']); $i++) {
+ $show = $TOOL['teremSelect']['termek'][$i]['leiras'];
+ echo '<option value="'.$TOOL['teremSelect']['termek'][$i]['teremId'].'"'.$SEL[$TOOL['teremSelect']['termek'][$i]['teremId']].'>'.$show.'</option>';
+ }
+ }
+ }
+ echo '</select>';
+ putToolFormStop();
+
+ }
+
+
+ function putOrarendiHetSelect() {
+
+ global $TOOL;
+
+ putToolFormStart('orarendiHetSelect', 'orarendiHet');
+ echo '<select name="'.$TOOL['orarendiHetSelect']['paramName'].'" class="onChangeSubmit" '.$_DS.'>';
+ echo '<option value=""></option>'."\n";
+ $SEL = array($TOOL['orarendiHetSelect']['paramValue'] => ' selected="selected" ');
+ foreach ($TOOL['orarendiHetSelect']['hetek'] as $M) {
+ echo '<option value="'.$M.'"'.$SEL[$M].'>'.$M.'</option>';
+ }
+ if (is_array($TOOL['orarendiHetSelect']['megjelenitendoHetek'])) {
+ echo '<optgroup label="'._UJ_ORARENDIHET.'">';
+ foreach ($TOOL['orarendiHetSelect']['megjelenitendoHetek'] as $index => $het) {
+ if (!in_array($het, $TOOL['orarendiHetSelect']['hetek']))
+ echo '<option value="'.$het.'"'.$SEL[$het].'>'.$het.'</option>';
+ }
+ echo '</optgroup>'."\n";
+ }
+ echo '</select>';
+ putToolFormStop();
+
+ }
+
+ function putKepzesSelect() {
+
+ global $TOOL;
+
+ putToolFormStart('kepzesSelect', 'kepzesId');
+ echo '<select name="'.$TOOL['kepzesSelect']['paramName'].'" class="onChangeSubmit">';
+ echo '<option value=""></option>'."\n";
+ $SEL = array($TOOL['kepzesSelect']['paramValue'] => ' selected="selected" ');
+ for ($i=0; $i < count($TOOL['kepzesSelect']['kepzes']); $i++) {
+ $M = $TOOL['kepzesSelect']['kepzes'][$i];
+ $_prefix = ($M['kepzesEles']!=1) ? '-' : '';
+ echo '<option value="'.$M['kepzesId'].'"'.$SEL[$M['kepzesId']].'>'.$_prefix.htmlspecialchars($M['kepzesNev']).' '.$M['tanev'].' ('.$M['kepzesId'].')'.'</option>';
+ }
+ echo '</select>';
+ putToolFormStop();
+
+ }
+
+ function putSzuloSelect() {
+
+ global $TOOL;
+
+ putToolFormStart('szuloSelect', 'szuloId');
+ echo '<select name="'.$TOOL['szuloSelect']['paramName'].'" class="onChangeSubmit">';
+ echo '<option value=""></option>'."\n";
+ $SEL = array($TOOL['szuloSelect']['paramValue'] => ' selected="selected" ');
+ for ($i=0; $i < count($TOOL['szuloSelect']['szulo']); $i++) {
+ $M = $TOOL['szuloSelect']['szulo'][$i];
+ echo '<option value="'.$M['szuloId'].'"'.$SEL[$M['szuloId']].'>'.htmlspecialchars($M['szuloNev']).' ('.$M['szuloId'].')'.'</option>';
+ }
+ echo '</select>';
+ putToolFormStop();
+
+ }
+
+
+ function putKerdoivSelect() {
+
+ global $TOOL;
+
+ putToolFormStart('kerdoivSelect', 'kerdoivId');
+ echo '<select name="'.$TOOL['kerdoivSelect']['paramName'].'" class="onChangeSubmit">';
+ echo '<option value=""></option>'."\n";
+ $SEL = array($TOOL['kerdoivSelect']['paramValue'] => ' selected="selected" ');
+ for ($i = 0; $i < count($TOOL['kerdoivSelect']['kerdoiv']); $i++) {
+ $M = $TOOL['kerdoivSelect']['kerdoiv'][$i];
+ echo '<option value="'.$M['kerdoivId'].'"'.$SEL[$M['kerdoivId']].'>'.$M['cim'].'</option>';
+ }
+ echo '</select>';
+ putToolFormStop();
+
+ }
+
+
+ function putZaradekSelect() {
+
+ global $TOOL;
+
+ putToolFormStart('zaradekSelect', 'zaradekIndex');
+ $mit = array('bizonyítvány','törzslap','osztálynapló','beírási napló');
+ $mire = array('Bi.','Tl.','On.','Bn.');
+ echo '<select name="'.$TOOL['zaradekSelect']['paramName'].'" class="onChangeSubmit">';
+ $SEL = array($TOOL['zaradekSelect']['paramValue'] => ' selected="selected" ');
+ echo '<option value=""> - </option>'."\n";
+ if (is_array($TOOL['zaradekSelect']['zaradekok'])) {
+ foreach ($TOOL['zaradekSelect']['zaradekok'] as $zaradekIndex => $zaradekAdat) {
+ $length = mb_strlen($zaradekAdat['szoveg'], 'utf-8');
+ $rpos = mb_strrpos(mb_substr($zaradekAdat['szoveg'],0,-15), ' ', 0, 'utf-8');
+ echo '<option value="'.$zaradekIndex.'"'.$SEL[$zaradekIndex].'>';
+ echo $zaradekAdat['sorszam'].' '
+ .($length>80?
+ mb_substr($zaradekAdat['szoveg'],0,mb_strpos($zaradekAdat['szoveg'],' ',40,'utf-8'),'utf-8').
+ ' ... '.
+ mb_substr($zaradekAdat['szoveg'], $rpos, $length-$rpos+10, 'utf-8'):$zaradekAdat['szoveg']).
+ ' ('.str_replace($mit, $mire, $zaradekAdat['dokumentum']).')</option>';
+ }
+ }
+ echo '</select>';
+ putToolFormStop();
+
+ }
+
+
+ function putTanarOraLapozo() {
+
+ global $TOOL;
+
+ $paramName = $TOOL['tanarOraLapozo']['paramName'];
+ global $$paramName; // most oraId
+ if ((is_array($TOOL['tanarOraLapozo']['elozo'])) || (is_array($TOOL['tanarOraLapozo']['kovetkezo']))) {
+ formBegin(array('class'=>'lapozo','method'=>'post', 'action'=>href('index.php',array('page','sub','f','lang','skin','sessionID','policy'))));
+ putPostParams($TOOL['tanarOraLapozo']['post']);
+ echo '<table><tr><td>';
+ if (is_array($TOOL['tanarOraLapozo']['elozo'])) {
+ $_leiras = '&larr;'.($TOOL['tanarOraLapozo']['elozo']['ora']).'. '._ORA;
+ if ($TOOL['tanarOraLapozo']['elozo']['leiras']!='') $_leiras .= ' ('.$TOOL['tanarOraLapozo']['elozo']['leiras'].')';
+ echo '<input type="submit" name="oraId" value="'.$_leiras.'" onclick="this.value='.($TOOL['tanarOraLapozo']['elozo']['oraId']).'" />';
+ }
+ echo '</td>';
+ echo '<th>';
+ echo $TOOL['tanarOraLapozo']['oraAdat']['ora'].'. '._ORA.' ';
+ if ($TOOL['tanarOraLapozo']['oraAdat']['leiras'] != '') echo '('.$TOOL['tanarOraLapozo']['oraAdat']['leiras'].') ';
+ echo '</th>';
+ echo '<td>';
+ if (is_array($TOOL['tanarOraLapozo']['kovetkezo'])) {
+ $_leiras = ($TOOL['tanarOraLapozo']['kovetkezo']['ora']).'. '._ORA;
+ if ($TOOL['tanarOraLapozo']['kovetkezo']['leiras']!='') $_leiras .= ' ('.$TOOL['tanarOraLapozo']['kovetkezo']['leiras'].')';
+ $_leiras .=' &rarr;';
+ echo '<input type="submit" name="oraId" value="'.$_leiras.'" onclick="this.value='.($TOOL['tanarOraLapozo']['kovetkezo']['oraId']).'" />';
+ }
+ echo '</td></tr></table>';
+ formEnd();
+ echo "\n";
+ }
+ }
+
+ function putHonapLapozo() {
+
+ global $TOOL,$Honapok;
+
+ $paramName = $TOOL['honapLapozo']['paramName'];
+ global $$paramName;
+ formBegin(array('class' => 'lapozo', 'method' => 'post', 'action' => href('index.php',array('page','sub','f','lang','skin','sessionID','policy'))));
+ putPostParams($TOOL['honapLapozo']['post']);
+ echo '<table><tr><td>';
+ echo '&larr;';
+ echo '<input type="submit" name="ho" value="'.(($$paramName-1)==0?12:$$paramName-1).'" />';
+ echo '</td>';
+ echo '<th>'.$Honapok[$$paramName-1].'</th>';
+ echo '<td>';
+ echo '<input type="submit" name="ho" value="'.(($$paramName%12+1)).'" />';
+ echo '&rarr;';
+ echo '</td></tr></table>';
+
+ // ideiglenes megoldás!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+// echo '<input type="hidden" name="diakId" value="'.$TOOL['honapLapozo']['diakId'].'" />'."\n";
+
+ formEnd();
+
+ }
+
+//-- INSECURE
+ function putOldalFlipper() {
+
+ global $TOOL;
+ $paramName = $TOOL['oldalFlipper']['paramName'];
+ global $$paramName;
+
+ $stepCount = count($TOOL['oldalFlipper']['url']);
+ if (isset($TOOL['oldalFlipper']['step'])) $step = $TOOL['oldalFlipper']['step'];
+ for ($i = 0; $i < count($TOOL['oldalFlipper']['titleConst']); $i++) {
+ if (defined($TOOL['oldalFlipper']['titleConst'][$i]))
+ $TOOL['oldalFlipper']['title'][$i] = constant($TOOL['oldalFlipper']['titleConst'][$i]);
+ else
+ $TOOL['oldalFlipper']['title'][$i] = '';
+ }
+
+
+
+
+ echo '<table class="flipper"><tr>';
+ if ($stepCount > 1 && isset($step) && $step > 0) {
+ echo '<td>';
+ formBegin(array('action'=>href($TOOL['oldalFlipper']['url'][$step-1])));
+ putPostParams($TOOL['oldalFlipper']['post']);
+ if (isset($TOOL['oldalFlipper']['action']))
+ echo '<input type="hidden" name="action" value="'.$TOOL['oldalFlipper']['action'].'" />'."\n";
+ if (isset($TOOL['oldalFlipper']['paramName']))
+ echo '<input type="hidden" name="'.$paramName.'" value="'.$$paramName.'" />'."\n";
+ echo '<input type="submit" value="&larr;" title="'.$TOOL['oldalFlipper']['title'][$step-1].'" />'."\n";
+ formEnd();
+ echo '</td>';
+ }
+ if ($stepCount > 1)
+ for ($j = 0; $j < $stepCount; $j++) {
+ echo '<td>';
+ formBegin(array('action'=>href($TOOL['oldalFlipper']['url'][$j])));
+ putPostParams($TOOL['oldalFlipper']['post']);
+ if (isset($TOOL['oldalFlipper']['action']))
+ echo '<input type="hidden" name="action" value="'.$TOOL['oldalFlipper']['action'].'" />'."\n";
+ if (isset($TOOL['oldalFlipper']['paramName']))
+ echo '<input type="hidden" name="'.$paramName.'" value="'.$$paramName.'" />'."\n";
+
+ if (isset($step) && $step == $j)
+ echo '<input class="step" type="button" value="'.($j+1).'" title="'.$TOOL['oldalFlipper']['title'][$j].'" />'."\n";
+ else
+ echo '<input type="submit" value="'.($j+1).'" title="'.$TOOL['oldalFlipper']['title'][$j].'" />'."\n";
+ formEnd();
+ echo '</td>';
+ }
+ if ($stepCount == 1 || (isset($step) && $step < $stepCount-1)) {
+ if (!isset($step)) $step = 0; else $step++;
+ echo '<td>';
+ formBegin(array('action'=>href($TOOL['oldalFlipper']['url'][$step])));
+ putPostParams($TOOL['oldalFlipper']['post']);
+ if (isset($TOOL['oldalFlipper']['action']))
+ echo '<input type="hidden" name="action" value="'.$TOOL['oldalFlipper']['action'].'" />'."\n";
+ if (isset($TOOL['oldalFlipper']['paramName']))
+ echo '<input type="hidden" name="'.$paramName.'" value="'.$$paramName.'" />'."\n";
+
+ echo '<input type="submit" value="&rarr;" title="'.$TOOL['oldalFlipper']['title'][$step].'" />'."\n";
+ formEnd();
+ echo '</td>';
+ }
+ echo '</tr></table>'."\n";
+
+ }
+
+ function putNyomtatasGomb() {
+
+ global $TOOL;
+ $paramName = $TOOL['nyomtatasGomb']['paramName'];
+ global $$paramName;
+
+ if (defined($TOOL['nyomtatasGomb']['titleConst']))
+ $TOOL['nyomtatasGomb']['title'] = constant($TOOL['nyomtatasGomb']['titleConst']);
+ else
+ $TOOL['nyomtatasGomb']['title'] = '';
+
+ echo '<table class="gomb"><tr>';
+ echo '<td>';
+ formBegin(array('method'=>'post', 'action'=>href($TOOL['nyomtatasGomb']['url'])));
+ putPostParams($TOOL['nyomtatasGomb']['post']);
+ if (isset($TOOL['nyomtatasGomb']['action']))
+ echo '<input type="hidden" name="action" value="'.$TOOL['nyomtatasGomb']['action'].'" />'."\n";
+ if (isset($TOOL['nyomtatasGomb']['paramName']))
+ echo '<input type="hidden" name="'.$paramName.'" value="'.$$paramName.'" />'."\n";
+// echo '<input type="submit" value="&larr;" title="'.$TOOL['nyomtatasGomb']['title'].'" />'."\n";
+ echo '<button title="'.$TOOL['nyomtatasGomb']['title'].'"><span class="icon-print" style="font-size:15px; color:white;"></span></button>'."\n";
+ formEnd();
+ echo '</td>';
+ echo '</tr></table>'."\n";
+
+ }
+
+
+ function putIgazolasOsszegzo() {
+
+ global $TOOL;
+
+ $H = $TOOL['igazolasOsszegzo']['igazolasok'];
+ echo '<table class="hianyzasOsszegzo" cellpadding="1" cellspacing="1" style="width:300px;">';
+ echo '<tr>';
+ echo '<th></th>';
+ echo '<th>'._ORVOSI.'</th>';
+ echo '<th>'._SZULOI.'</th>';
+ echo '<th>'._OSZTALYFONOKI.'</th>';
+ echo '<th>'._TANULMANYI_VERSENY.'</th>';
+ echo '<th>'._NYELVVIZSGA.'</th>';
+ echo '<th>'._IGAZGATOI.'</th>';
+ echo '<th>'._HATOSAGI.'</th>';
+ echo '</tr>'."\n";
+ echo '<tr>';
+
+ echo '<td></td>';
+ echo '<td>'.intval($H['napok']['osszesen']['orvosi']).' nap</td>';
+ echo '<td>';
+ if (__SZULOI_IGAZOLAS_EVRE != 0) echo (int)$H['napok']['osszesen']['szülői'].'/'.__SZULOI_IGAZOLAS_EVRE.' '._NAP.'/'._EV.' ';
+ if (__SZULOI_IGAZOLAS_FELEVRE != 0) foreach ($H['szemeszterek'] as $i => $szemeszter) {
+ echo decimal_to_roman($szemeszter).':&nbsp;'.(int)$H['napok'][ $szemeszter ]['szülői'].'/'.__SZULOI_IGAZOLAS_FELEVRE.'&nbsp;'._NAP.', ';
+ }
+ echo '</td>';
+ echo '<td>'.(int)$H['napok']['osszesen']['osztályfőnöki'].'/'.__OSZTALYFONOKI_IGAZOLAS_EVRE. ' '._NAP.'</td>';
+ echo '<td>'.(int)$H['napok']['osszesen']['tanulmányi verseny'].' '._NAP.'</td>';
+ echo '<td>'.(int)$H['napok']['osszesen']['nyelvvizsga'].' '._NAP.'</td>';
+ echo '<td>'.(int)$H['napok']['osszesen']['igazgatói'].' '._NAP.'</td>';
+ echo '<td>'.(int)$H['napok']['osszesen']['hatósági'].' '._NAP.'</td>';
+ echo '</tr>'."\n";
+ echo '<tr>';
+ echo '<td>';
+ echo '<span style="color: white; font-weight:bold;margin-right:3px; border: solid 1px white; padding:2px 5px;background-color: green;">'.intval($TOOL['igazolasOsszegzo']['hianyzasok']['igazolt']).'</span>';
+ echo '<span style="color: white; font-weight:bold;margin-right:3px; border: solid 1px white; padding:2px 5px;background-color: red;">'.intval($TOOL['igazolasOsszegzo']['hianyzasok']['igazolatlan']).'</span>';
+ echo '<span style="color: white; font-weight:bold;margin-right:3px; border: solid 1px white; padding:2px 5px;background-color: #C8C864;">'.intval($TOOL['igazolasOsszegzo']['hianyzasok']['kesesPercOsszeg']).'\'</span>';
+ echo '</td>'; // igazolatlan, kesesPercOsszeg
+ echo '<td>'.(int)$H['orak']['osszesen']['orvosi'].' '._ORA.'</td>';
+ echo '<td>';
+ if (__SZULOI_ORA_IGAZOLAS_EVRE != 0) echo (int)$H['orak']['osszesen']['szülői'].'/'.__SZULOI_ORA_IGAZOLAS_EVRE.' '._ORA.'/'._EV.' ';
+ if (__SZULOI_ORA_IGAZOLAS_FELEVRE != 0) foreach ($H['szemeszterek'] as $i => $szemeszter) {
+ echo decimal_to_roman($szemeszter).':&nbsp;'.(int)$H['orak'][ $szemeszter ]['szülői'].'/'.__SZULOI_ORA_IGAZOLAS_FELEVRE.'&nbsp;'._ORA.', ';
+ }
+ echo '</td>';
+
+ echo '<td>'.(int)$H['orak']['osszesen']['osztályfőnöki'].'/'.__OSZTALYFONOKI_ORA_IGAZOLAS_EVRE.' '._ORA.'</td>';
+ echo '<td>'.(int)$H['orak']['osszesen']['tanulmányi verseny'].' '._ORA.'</td>';
+ echo '<td>'.(int)$H['orak']['osszesen']['nyelvvizsga'].' '._ORA.'</td>';
+ echo '<td>'.(int)$H['orak']['osszesen']['igazgatói'].' '._ORA.'</td>';
+ echo '<td>'.(int)$H['orak']['osszesen']['hatósági'].' '._ORA.'</td>';
+ echo '</tr>'."\n";
+ echo '</table>'."\n";
+ }
+
+ function putKerelemStat() {
+
+ global $TOOL;
+ echo '<span style="padding:0px 10px; border-bottom: solid 1px white; background-color: #6969ff;" title="sum">'.$TOOL['kerelemStat']['stat']['n'].'</span>';
+ echo '<span style="padding:0px 10px; border-bottom: solid 1px white; background-color: lightgreen;" title="done">'.$TOOL['kerelemStat']['stat']['nofdone'].'</span>';
+ echo '<span style="padding:0px 10px; border-bottom: solid 1px white; background-color: magenta; " title="avgtime">'.$TOOL['kerelemStat']['stat']['avgTime'].'</span>';
+
+ }
+
+ function putToolBarHamburger() {
+ global $TOOL;
+ echo '<div id="toolBarHamburgerLista" style="position:fixed; top:150px;right:0px;">';
+ echo '<ul>';
+ for ($j = 0; $j < count($TOOL['toolBarHamburger']['url']); $j++) {
+ echo '<li>';
+ formBegin(array('action'=>href($TOOL['toolBarHamburger']['url'][$j])));
+ putPostParams($TOOL['toolBarHamburger']['post']);
+ if (isset($TOOL['toolBarHamburger']['action']))
+ echo '<input type="hidden" name="action" value="'.$TOOL['toolBarHamburger']['action'].'" />'."\n";
+ if (isset($TOOL['toolBarHamburger']['paramName']))
+ echo '<input type="hidden" name="'.$paramName.'" value="'.$$paramName.'" />'."\n";
+ //echo '<input type="submit" value="'.$TOOL['toolBarHamburger']['title'][$j].'" title="'.$TOOL['toolBarHamburger']['title'][$j].'" />'."\n";
+ echo '<button type="submit" class="hamburgerIkon" value="'.$TOOL['toolBarHamburger']['title'][$j].'" title="'.$TOOL['toolBarHamburger']['title'][$j].'">'.$TOOL['toolBarHamburger']['title'][$j].'</button>'."\n";
+ formEnd();
+ echo '</li>';
+ }
+ echo '</ul>';
+ echo '</div>';
+ }
+
+
+ // CONTRIB!
+ include('skin/classic/module-naplo/html/share/face.phtml');
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/bejegyzesek/bejegyzesTipus.phtml b/mayor-orig/www/skin/classic/module-naplo/html/bejegyzesek/bejegyzesTipus.phtml
new file mode 100644
index 00000000..d216ade0
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/bejegyzesek/bejegyzesTipus.phtml
@@ -0,0 +1,52 @@
+<?php
+
+ function putBejegyzesTipusForm($ADAT) {
+
+ formBegin(array('action'=>'', 'method'=>'post', 'class'=>'bejegyzes'));
+
+ echo '<input type="hidden" name="dt" value="'.$ADAT['dt'].'" />';
+ echo '<input type="hidden" name="action" value="modositas" />';
+
+ foreach ($ADAT['bejegyzesTipusok'] as $tipus => $tAdat) {
+ echo '<ul class="'.ekezettelen($tipus).'">';
+ echo '<lh>'.$tipus.'</lh>';
+ for ($i = 0; $i < count($tAdat); $i++) {
+ $btId = $tAdat[$i]['bejegyzesTipusId'];
+ echo '<li>';
+ echo '<input type="hidden" name="bejegyzesTipusId[]" value="'.$btId.'" />';
+ if ($tAdat[$i]['fokozat'] < 10) echo '&nbsp';
+ echo $tAdat[$i]['fokozat'].'. '._FOKOZAT.'('.$btId.') - ';
+ echo '<input type="text" name="bejegyzesTipusNev[]" value="'.$tAdat[$i]['bejegyzesTipusNev'].'" />';
+ if ($tipus == 'fegyelmi') {
+ $SEL = array($tAdat[$i]['hianyzasDb'] => ' selected="selected" ');
+ echo '<select name="hianyzasDb[]">';
+ for ($h = 0; $h < 26; $h++) {
+ echo '<option value="'."$btId-$h".'"'.$SEL[$h].'>'.($h==0?'-':$h).'</option>';
+ }
+ echo '</select>'._DARAB_IGAZOLATLAN_HIANYZAS_ESETEN;
+ }
+// echo ' ('.$tAdat[$i]['jogosult'].')';
+ echo '<span title="'._JOGOSULT.'">';
+ foreach ($ADAT['jogosult'] as $jogosult) {
+ if (strpos($tAdat[$i]['jogosult'], $jogosult) !== false)
+ echo '<input id="'.$jogosult.$tipus.$i.'" checked="checked" type="checkbox" name="jogosult[]" value="'."$btId-$jogosult".'" />';
+ else
+ echo '<input id="'.$jogosult.$tipus.$i.'" type="checkbox" name="jogosult[]" value="'."$btId-$jogosult".'" />';
+ echo '<label for="'.$jogosult.$tipus.$i.'">';
+ echo $jogosult;
+ echo '</label>';
+ }
+ echo '</span>';
+ echo '</li>';
+ }
+ echo '<li class="submit">';
+ echo '<input class="ok" type="submit" value="'._OK.'" />';
+ echo '<input class="del confirm" type="submit" name="del-'.ekezettelen($tipus).'" value="'._UTOLSO_TORLESE.'" title="'._BIZTOS_TOROL_E.'" />';
+ echo '<input class="new" type="submit" name="new-'.ekezettelen($tipus).'" value="'._UJ_FOKOZAT.'" title="'._UJ_FOKOZAT.'" />';
+ echo '</li>';
+ echo '</ul>';
+ }
+ formEnd();
+ }
+
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/bejegyzesek/bejegyzesek.phtml b/mayor-orig/www/skin/classic/module-naplo/html/bejegyzesek/bejegyzesek.phtml
new file mode 100644
index 00000000..b46a9d3e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/bejegyzesek/bejegyzesek.phtml
@@ -0,0 +1,97 @@
+<?php
+/*
+ module: naplo
+*/
+
+ function putBejegyzesLista($diakId, $BEJEGYZESEK, $DIAKOK = array()) {
+
+ global $osztalyId;
+
+ echo '<div class="bejegyzes">'."\n";
+
+ echo '<ul>';
+ for ($i = 0; $i < count($BEJEGYZESEK); $i++) {
+
+ echo $DIAKOK[$BEJEGYZESEK[$i]['diakId']]['diakNev'];
+
+ echo '<li class="'.$BEJEGYZESEK[$i]['tipus'].'">';
+ echo '<div class="kategoria">';
+ echo $BEJEGYZESEK[$i]['bejegyzesTipusNev'];
+ echo '</div>';
+ echo '<div class="megjegyzes">';
+ echo $BEJEGYZESEK[$i]['szoveg'];
+ echo '</div>';
+ echo '<div class="dt">';
+ echo '<span class="tanar">';
+ echo $BEJEGYZESEK[$i]['tanarNev'];
+ echo '</span>';
+ echo $BEJEGYZESEK[$i]['beirasDt'];
+ if (!in_array($BEJEGYZESEK[$i]['referenciaDt'],array('',0,'0000-00-00'))) echo ' / '.$BEJEGYZESEK[$i]['referenciaDt'];
+ echo '</div>';
+
+ if (
+ __NAPLOADMIN ||
+ ($BEJEGYZESEK[$i]['tanarId'] == __USERTANARID && $BEJEGYZESEK[$i]['beirasDt'] == date('Y-m-d'))
+ ) {
+ formBegin();
+ echo '<input type="hidden" name="action" value="delBejegyzes" />';
+ echo '<input type="hidden" name="diakId" value="'.$diakId.'" />';
+ echo '<input type="hidden" name="osztalyId" value="'.$osztalyId.'" />';
+ echo '<input type="hidden" name="bejegyzesId" value="'.$BEJEGYZESEK[$i]['bejegyzesId'].'" />';
+ echo '<input type="submit" value="'._TOROL.'" />'."\n";
+ formEnd();
+ }
+
+ echo '</li>'."\n";
+
+ }
+ echo '</ul>';
+
+ echo '</div>'."\n";
+
+ }
+
+ function putOsztalyBejegyzesek($Bejegyzesek, $Diakok) {
+
+ global $osztalyId;
+
+ for ($j = 0; $j < count($Diakok); $j++) {
+
+ $diakId = $Diakok[$j]['diakId'];
+ $diakNev = $Diakok[$j]['diakNev'];
+ $B = $Bejegyzesek[$diakId];
+ if (count($B) == 0) continue;
+
+ echo '<div class="bejegyzes">'."\n";
+
+ formBegin(array('class'=>'nev'));
+ echo '<input type="hidden" name="diakId" value="'.$diakId.'" />'."\n";
+ echo '<input type="hidden" name="osztalyId" value="'.$osztalyId.'" />'."\n";
+ echo '<input type="submit" value="'.$diakNev.'" />'."\n";
+ formEnd();
+
+ echo '<ul>';
+ for ($i = 0; $i < count($B); $i++) {
+
+ echo '<li class="'.$B[$i]['tipus'].'">';
+ echo '<div class="kategoria">';
+ echo '<span class="tanar">';
+ echo $B[$i]['tanarNev'];
+ echo '</span>';
+ echo '<span class="dt">';
+ echo $B[$i]['beirasDt'];
+ if (!in_array($BEJEGYZESEK[$i]['referenciaDt'],array('',0,'0000-00-00'))) echo ' / '.$BEJEGYZESEK[$i]['referenciaDt'];
+ echo '</span>';
+ echo $B[$i]['bejegyzesTipusNev'];
+ echo '</div>';
+
+ }
+ echo '</ul>';
+
+ echo '</div>'."\n";
+
+ }
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/bejegyzesek/info.phtml b/mayor-orig/www/skin/classic/module-naplo/html/bejegyzesek/info.phtml
new file mode 100644
index 00000000..bbbe2c4c
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/bejegyzesek/info.phtml
@@ -0,0 +1,9 @@
+<?php
+
+ function putBejegyzesInfo($ADAT) {
+ echo '<div style="text-align: center">';
+ echo _AKTUALIS_BEJEGYZESEK_SZAMA.' '.$ADAT['db'];
+ echo '</div>';
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/bejegyzesek/ujBejegyzes.phtml b/mayor-orig/www/skin/classic/module-naplo/html/bejegyzesek/ujBejegyzes.phtml
new file mode 100644
index 00000000..22759d38
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/bejegyzesek/ujBejegyzes.phtml
@@ -0,0 +1,47 @@
+<?php
+/*
+ module: naplo
+*/
+
+ function putUjBejegyzesForm($diakId) {
+
+ global $FOKOZATOK, $osztalyId;
+
+ formBegin(array('class'=>'bejegyzes'));
+
+ echo '<input type="hidden" name="action" value="ujBejegyzes" />';
+ echo '<input type="hidden" name="diakId" value="'.$diakId.'" />';
+ echo '<input type="hidden" name="osztalyId" value="'.$osztalyId.'" />';
+
+ $tipus = '';
+ echo '<select name="bejegyzesTipusId">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ foreach ($FOKOZATOK as $i => $F) {
+ if ($tipus != $F['tipus']) {
+ if ($tipus != '') echo '</optgroup>'."\n";
+ $tipus = $F['tipus'];
+ echo '<optgroup label="'.$tipus.'">'."\n";
+ }
+ echo '<option value="'.$F['bejegyzesTipusId'].'">'.$F['bejegyzesTipusNev'].'</option>'."\n";
+ }
+ if ($tipus != '') echo '</optgroup>'."\n";
+ echo '</select>';
+
+ echo '<input type="checkbox" id="evvegi" name="evvegi" value="true" />'."\n";
+ echo '<label for="evvegi">'._EVVEGI.'</label>'."\n";
+ _inlineHelp(_SUGO_EVVEGI);
+
+ echo '<br />'."\n";
+
+
+
+ echo '<label for="szoveg">'._MEGJEGYZES.'</label><br />'."\n";
+ echo '<textarea name="szoveg" id="szoveg"></textarea><br />'."\n";
+
+ echo '<input type="submit" value="'._ROGZIT.'" />'."\n";
+
+ formEnd();
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/diakValaszto.phtml b/mayor-orig/www/skin/classic/module-naplo/html/diakValaszto.phtml
new file mode 100644
index 00000000..4b925da8
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/diakValaszto.phtml
@@ -0,0 +1,22 @@
+<?php
+
+ function putDiakValasztoForm($ADAT) {
+
+ formBegin(array('class'=>'valaszto'));
+ echo '<input type="hidden" name="action" value="valaszt" />'."\n";
+
+ $SEL = array(__PARENTDIAKID => ' selected="selected" ');
+ echo '<select name="diakId">'."\n";
+ for ($i=0; $i<count($ADAT); $i++) {
+ echo '<option value="'.$ADAT[$i]['diakId'].'" '.$SEL[ $ADAT[$i]['diakId'] ].'>';
+ echo $ADAT[$i]['diakNev'];
+ echo '</option>'."\n";
+ }
+ echo '</select>'."\n";
+
+ echo '<input type="submit" value="'._OK.'" />'."\n";
+ formEnd();
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/ertekeles/ertekeles.phtml b/mayor-orig/www/skin/classic/module-naplo/html/ertekeles/ertekeles.phtml
new file mode 100644
index 00000000..74c0143c
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/ertekeles/ertekeles.phtml
@@ -0,0 +1,77 @@
+<?php
+
+ function _sgn($a) {
+ if ($a < 0) return -1;
+ elseif ($a == 0) return 0;
+ else return 1;
+ }
+
+ function putKerdoiv($ADAT) {
+
+ $class = array(-1 => 'negativ', 0 => 'semleges', 1 => 'pozitiv');
+
+ formBegin(array('class'=>'kerdoiv'));
+ echo '<input type="hidden" name="action" value="ertekeles" />'."\n";
+ echo '<input type="hidden" name="kerdoivId" value="'.$ADAT['kerdoivId'].'" />'."\n";
+ echo '<input type="hidden" name="cimzettId" value="'.$ADAT['cimzettId'].'" />'."\n";
+ echo '<input type="hidden" name="cimzettTipus" value="'.$ADAT['cimzettTipus'].'" />'."\n";
+ echo '<h1>'.$ADAT['kerdoivAdat']['cim'].'<br />'.$ADAT['cimzettLeiras'].'</h1>'."\n";
+ if ($ADAT['kerdoivAdat']['megjegyzes'] != '') echo '<p>'.$ADAT['kerdoivAdat']['megjegyzes'].'</p>'."\n";
+ echo '<ol>';
+ for ($i = 0; $i < count($ADAT['kerdoivAdat']['kerdes']); $i++) {
+ $kerdesId = $ADAT['kerdoivAdat']['kerdes'][$i]['kerdesId'];
+ $valaszok = $ADAT['kerdoivAdat']['kerdes'][$i]['valasz'];
+ echo '<li>';
+ echo $ADAT['kerdoivAdat']['kerdes'][$i]['kerdes'];
+ if (
+ ($valaszok[0]['pont'] == 0 && $valaszok[ count($valaszok)-1 ]['pont'] == 0)
+ || in_array($kerdesId, $ADAT['megvalaszoltKerdes'])
+ ) {
+ echo '<ol>'; $sgn = 0;
+ } else {
+ echo '<span class="gomb negativ">-</span><span class="gomb semleges">0</span><span class="gomb pozitiv">+</span>';
+ echo '<ol style="display: none;" class="'.$class[_sgn($valaszok[0]['pont'])].'">'; $sgn = _sgn($valaszok[0]['pont']);
+ }
+ if (!in_array($kerdesId, $ADAT['megvalaszoltKerdes'])) {
+ if (count($valaszok) == 0) {
+ echo '<input class="szabadValasz" type="text" name="szabadValasz'.$kerdesId.'" value="" />'."\n";
+ } else {
+ for ($j = 0; $j < count($valaszok); $j++) {
+ $valaszId = $valaszok[$j]['valaszId'];
+ if ($sgn != _sgn($valaszok[$j]['pont'])) {
+ echo '</ol>';
+ echo '<ol style="display: none;" class="'.$class[_sgn($valaszok[$j]['pont'])].'">'; $sgn = _sgn($valaszok[$j]['pont']);
+ }
+ echo '<li>';
+ if (
+ $valaszok[$j]['pont'] == 0
+ && ($j == 0 || $valaszok[$j-1]['pont'] < 0)
+ && ($j+1 == count($valaszok) || $valaszok[$j+1]['pont'] > 0)
+ ) $CHK = ' checked="checked" '; else $CHK = '';
+ echo '<input type="radio" name="valasz'.$kerdesId.'" id="valasz'.$kerdesId.$j.'" value="'.$valaszId.'"'.$CHK.' />'."\n";
+ echo '<label for="valasz'.$kerdesId.$j.'">'.$valaszok[$j]['valasz'].'</label>';
+ echo '</li>';
+ }
+ }
+ } else {
+ echo '<li>'._MAR_MEGVALASZOLT_KERDES.'</li>';
+/* for ($j = 0; $j < count($ADAT['kerdoivAdat']['kerdes'][$i]['valasz']); $j++) {
+ echo '<li>';
+ echo $ADAT['kerdoivAdat']['kerdes'][$i]['valasz'][$j]['valasz'];
+ echo '</li>';
+ }
+*/
+ }
+ echo '</ol>'."\n";
+
+ echo '</li>'."\n";
+ }
+ echo '</ol>'."\n";
+
+ echo '<input id="ok" type="submit" value="'._OK.'" />'."\n";
+
+ formEnd();
+ }
+
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/ertekeles/kerdoivBetoltes.phtml b/mayor-orig/www/skin/classic/module-naplo/html/ertekeles/kerdoivBetoltes.phtml
new file mode 100644
index 00000000..f019f1d5
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/ertekeles/kerdoivBetoltes.phtml
@@ -0,0 +1,90 @@
+<?php
+
+ function putKerdoivForm($ADAT) {
+
+ formBegin(array('class'=>'kerdoiv'));
+ echo '<input type="hidden" name="action" value="kerdoivBetoltes1" />'."\n";
+
+ echo '<p><label for="cim">'._CIM.'</label>';
+ echo '<input type="text" name="cim" id="cim" value="" />'."\n";
+ echo '</p>';
+
+ echo '<p><label for="tolDt">'._ERVENYESSEG.'</label>'."\n";
+ echo '<input type="text" name="tolDt" id="tolDt" class="date" value="" /> - <input type="text" name="igDt" id="igDt" class="date" value="" />';
+ echo '</p>';
+
+/*
+ echo '<p><label for="feladoTipus">'._FELADO.'</label>';
+ echo '<select name="feladoTipus" id="feladoTipus">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ for ($i = 0; $i < count($ADAT['feladoTipusok']); $i++) {
+ $feladoTipus = $ADAT['feladoTipusok'][$i];
+ $feladoNev = constant('_FELADO_'.nagybetus($feladoTipus));
+ echo '<option value="'.$feladoTipus.'">'.$feladoNev.'</option>'."\n";
+ }
+ echo '</select>'."\n";
+*/
+ echo '<label for="cimzettTipus">'._CIMZETT.'</label>';
+ echo '<select name="cimzettTipus" id="cimzettTipus">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ for ($i = 0; $i < count($ADAT['cimzettTipusok']); $i++) {
+ $cimzettTipus = $ADAT['cimzettTipusok'][$i];
+ $cimzettNev = constant('_CIMZETT_'.nagybetus($cimzettTipus));
+ echo '<option value="'.$cimzettTipus.'">'.$cimzettNev.'</option>'."\n";
+ }
+ echo '</select>'."\n";
+ echo '</p>';
+
+ echo '<label for="txt">'._MEGJEGYZES.'</label><br /><textarea name="megjegyzes" id="megjegyzes"></textarea>'."\n";
+
+ echo '<p><lable for="txt">'._KERDESEK_VALASZOK.'</lable>'."\n";
+ echo '<br /><textarea name="txt" id="txt"></textarea>'."\n";
+ echo '</p>';
+
+ echo '<input type="submit" value="OK" />'."\n";
+
+ formEnd();
+
+ }
+
+ function putCimzettForm($ADAT) {
+
+ formBegin(array('class'=>'kerdoivCimzett'));
+
+ echo '<input type="hidden" name="action" value="kerdoivBetoltes2" />'."\n";
+ echo '<input type="hidden" name="kerdoivId" value="'.$ADAT['kerdoivId'].'" />'."\n";
+ echo '<input type="hidden" name="cimzettTipus" value="'.$ADAT['cimzettTipus'].'" />'."\n";
+
+ echo '<h2>'.$ADAT['cim'].' ('.$ADAT['kerdoivId'].')</h2>';
+
+ // Akit fel akarunk venni
+ echo '<div class="bal">';
+ echo '<label for="cimzett">'._TOVABBI_CIMZETTEK.': '.constant('_CIMZETT_'.nagybetus($ADAT['cimzettTipus'])).'</label><br />';
+ echo '<select name="cimzettId[]" id="cimzettId" multiple="multiple">'."\n";
+ // echo '<option value="0" selected="selected">'._OSSZES.'</option>'."\n";
+ for ($i = 0; $i < count($ADAT['cimzettek']); $i++) {
+ if (!in_array($ADAT['cimzettek'][$i]['cimzettId'], $ADAT['kerdoivAdat']['cimzett'][ $ADAT['cimzettTipus'] ]))
+ echo '<option value="'.$ADAT['cimzettek'][$i]['cimzettId'].'">'
+ .$ADAT['cimzettek'][$i]['cimzettNev'].' ('.$ADAT['cimzettek'][$i]['cimzettId'].')</option>'."\n";
+ }
+ echo '</select>'."\n";
+ echo '</div>';
+ echo '<div class="jobb">';
+ echo '<label for="torlendoCimzett">'._CIMZETT.': '.constant('_CIMZETT_'.nagybetus($ADAT['cimzettTipus'])).'</label><br />';
+ echo '<select name="torlendoCimzettId[]" id="torlendoCimzettId" multiple="multiple">'."\n";
+ //echo '<option value="0" selected="selected">'._OSSZES.'</option>'."\n";
+ for ($i = 0; $i < count($ADAT['cimzettek']); $i++) {
+ if (in_array($ADAT['cimzettek'][$i]['cimzettId'], $ADAT['kerdoivAdat']['cimzett'][ $ADAT['cimzettTipus'] ]))
+ echo '<option value="'.$ADAT['cimzettek'][$i]['cimzettId'].'">'
+ .$ADAT['cimzettek'][$i]['cimzettNev'].' ('.$ADAT['cimzettek'][$i]['cimzettId'].')</option>'."\n";
+ }
+ echo '</select>'."\n";
+ echo '</div>';
+
+ echo '<input type="submit" value="OK" />'."\n";
+
+ formEnd();
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/esemeny/esemenyDiak.phtml b/mayor-orig/www/skin/classic/module-naplo/html/esemeny/esemenyDiak.phtml
new file mode 100644
index 00000000..cb6062d4
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/esemeny/esemenyDiak.phtml
@@ -0,0 +1,102 @@
+<?php
+
+ function esemenyNevsor($ADAT) {
+
+ $DIS = (__MODOSITHAT)?'':' disabled="disabled" ';
+ formBegin(array('method'=>'post','action'=>'','class'=>'nevsor','id'=>'nevsorForm'));
+
+ echo '<input type="hidden" name="action" value="nevsorModositas" />'."\n";
+ echo '<input type="hidden" name="esemenyId" value="'.$ADAT['esemenyId'].'" />'."\n";
+ echo '<input type="hidden" name="postDiakId" value="semmi" id="postDiakId" />'."\n";
+
+ echo '<h2>Jelentkezők</h2>';
+
+ echo '<table id="kontener">'."\n";
+ echo '<tr>'."\n";
+ echo '<th>'._NEVSOR.' '; if (__MODOSITHAT) _inlineHelp(_SUGO_NEVSOR); echo '</th>';
+ if (__MODOSITHAT) {
+ echo '<th>'._OSZTALYOK.' '; _inlineHelp(_SUGO_OSZTALYOK); echo '</th>'."\n";
+ echo '<th>'._DIAKOK.' '; _inlineHelp(_SUGO_DIAKOK); echo '</th>'."\n";
+ }
+ echo '</tr>';
+ echo '<tr><td>';
+
+ echo '<table class="nevsor" id="nevsor">'."\n";
+ echo '<thead>'."\n";
+ echo '<tr>'."\n";
+ echo '<th colspan="2"></th>'."\n";
+ echo '<th colspan="2">'._NEV.'</th>'."\n";
+ echo '<th>'._JELENTKEZES.'</th>'."\n";
+ echo '<th colspan="2">'._JOVAHAGYAS.'</th>'."\n";
+ echo '</tr>'."\n";
+ echo '</thead>';
+
+ echo '<tbody>'."\n";
+ foreach ($ADAT['esemenyAdat']['diakok'] as $dAdat) {
+ $_osztalyJel = $ADAT['osztalyId2osztalyJel'][ $ADAT['diak2osztaly'][ $dAdat['diakId'] ]];
+
+ echo '<tr class="'.str_replace('.','',$_osztalyJel).'">'."\n";
+ echo '<td class="sorsz">'.(++$i).'.</td>'."\n";
+ echo '<td><span class="icon-remove-sign" title="'._DIAK_TOROL_E.' ('.$dAdat['diakNev'].')"><input type="hidden" name="diakId" value="'.$dAdat['diakId'].'" /></span></td>'."\n";
+ echo '<td class="nev">'.$dAdat['diakNev'].' ('.$dAdat['diakId'].')</td>'."\n";
+ echo '<td class="osztaly">'.$_osztalyJel.'</td>'."\n";
+ echo '<td class="jelDt">'.$dAdat['jelentkezesDt'].'</td>'."\n";
+ if ($dAdat['jovahagyasDt'] != '0000-00-00 00:00:00') {
+ echo '<td class="jovahagy" title="'._ELUTASIT.'"><span class="icon-ok-sign"></span></td>'."\n";
+ echo '<td class="jovDt">'.$dAdat['jovahagyasDt'].'</td>'."\n";
+ } else {
+ echo '<td class="jovahagy" title="'._JOVAHAGY.'"><span class="icon-minus-sign"></span></td>'."\n";
+ echo '<td class="jovDt"></td>'."\n";
+ }
+ echo '</tr>'."\n";
+ }
+ echo '</tbody>'."\n";
+
+ if (__MODOSITHAT === true) {
+ echo '<tfoot>'."\n";
+ echo '<tr id="submitRow">';
+ echo '<td colspan="6">'."\n";
+ echo '<input type="submit" value="'._OK.'" />'."\n";
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+ echo '</tfoor>'."\n";
+ }
+
+ echo '</table>'."\n";
+
+ echo '</td>'."\n";
+
+ if (__MODOSITHAT) {
+ echo '<td id="osztalyok">';
+ foreach ($ADAT['osztalyok'] as $oAdat) {
+ if (in_array($oAdat['osztalyId'], $ADAT['esemenyAdat']['osztalyIds'])) {
+ echo '<input type="button" class="plusz" id="showO'.$oAdat['osztalyId'].'" value="'.$oAdat['osztalyJel'].' ('.$oAdat['osztalyId'].') &#10140;" /><br />';
+ }
+ }
+ echo '</td>';
+ }
+
+ if (__MODOSITHAT) {
+ echo '<td class="openable" id="oEmpty">';
+ echo '<select name="odiak" class="diakok" multiple="multiple">';
+ echo '</select>';
+ echo '</td>';
+ }
+ foreach ($ADAT['esemenyAdat']['osztalyIds'] as $osztalyId) {
+ echo '<td style="display: none;" class="openable" id="o'.$osztalyId.'">';
+ echo '<select name="odiak" class="diakok" id="od'.$osztalyId.'" multiple="multiple">';
+ foreach ($ADAT['diakok'][$osztalyId] as $dAdat) {
+ echo '<option value="'.$dAdat['diakId'].'">'.$dAdat['diakNev'].' ('.$dAdat['diakId'].')</option>';
+ }
+ echo '</select>';
+ echo '<input type="button" class="add" value="&#8678;" />'."\n";
+ echo '</td>';
+ }
+ echo '</tr></table>';
+
+ formEnd();
+
+ }
+
+
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/esemeny/jelentkezes.phtml b/mayor-orig/www/skin/classic/module-naplo/html/esemeny/jelentkezes.phtml
new file mode 100644
index 00000000..1169390a
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/esemeny/jelentkezes.phtml
@@ -0,0 +1,87 @@
+<?php
+
+ function putJelentkezesForm($ADAT) {
+
+ formBegin(array('method'=>'post', 'action'=>'', 'class'=>'esemeny'));
+
+ echo '<input type="hidden" name="action" value="jelentkezes" />'."\n";
+ echo '<input type="hidden" name="diakId" value="'.$ADAT['diakId'].'" />'."\n";
+
+ echo '<table>'."\n";
+ echo '<tr title="'._OSSZES_AKTUALIS.'">'."\n";
+ echo '<th colspan="2">'._JELENTKEZES.'</th>'."\n";
+ echo '<th colspan="2">'._ESEMENYNEV.'</th>'."\n";
+ echo '<th>'._KATEGORIA.'</th>'."\n";
+ echo '<th>'._LETSZAM.'</th>'."\n";
+ echo '<th>'._MINMAX.'</th>'."\n";
+ echo '<th>'._JOVAHAGYAS.'</th>'."\n";
+ echo '</tr>'."\n";
+
+ foreach ($ADAT['esemenyek'] as $eAdat) {
+ $valasztott = (is_array($ADAT['valasztottEsemenyek']) && in_array($eAdat['esemenyId'], $ADAT['valasztottEsemenyek']));
+ $jovahagyott = (is_array($ADAT['jovahagyottEsemenyek']) && in_array($eAdat['esemenyId'], $ADAT['jovahagyottEsemenyek']));
+ $aktualis = (strtotime($eAdat['jelentkezesTolDt']) <= time() && time() <= strtotime($eAdat['jelentkezesIgDt']));
+ $maxLetszam = (($eAdat['max'] != 0) && ($eAdat['letszam'] >= $eAdat['max']));
+ $minLetszam = $eAdat['min'] >= $eAdat['letszam'];
+ $jelentkezhet = (
+ $aktualis // határidőn belül vagyunk
+ && (($eAdat['max'] == 0) || ($eAdat['letszam'] < $eAdat['max'])) // van még hely
+ );
+ $leadhat = (
+ $aktualis // határidőn belül vagyunk
+ && $eAdat['min'] < $eAdat['letszam'] // nem túl kicsi a létszám
+ && !$jovahagyott // jóváhagyott eseményt már ne adjon le
+ );
+ $minmaxClass="minmax";
+ if ($valasztott) $trClass='valasztott';
+ else $trClass='jelentkezes';
+ if ($aktualis) {
+ $trClass .= ' aktualis';
+ $trStyle = '';
+ } else {
+ $trStyle = ' style="display: none;" ';
+ };
+ if ($minLetszam) $minmaxClass .= " min";
+ if ($maxLetszam) $minmaxClass .= " max";
+ echo '<tr class="'.$trClass.'"'.$trStyle.'>'."\n";
+ if ($valasztott) {
+ echo '<td></td>'."\n";
+ echo '<td class="gombKontener lead">';
+ if ($leadhat) {
+ echo '<input type="submit" class="lead" id="l'. $eAdat['esemenyId'].'" name="lead'.$eAdat['esemenyId'].'" value="'._LEAD.'" />';
+ } else {
+ echo '<input type="submit" class="lead" id="l'. $eAdat['esemenyId'].'" name="lead'.$eAdat['esemenyId'].'" value="'._LEAD.'" disabled="disabled" />';
+ }
+ echo '</td>'."\n";
+ } else {
+ echo '<td class="gombKontener felvesz">';
+ if ($jelentkezhet) {
+ echo '<input type="submit" class="felvesz" id="f'. $eAdat['esemenyId'].'" name="felvesz'.$eAdat['esemenyId'].'" value="'._FELVESZ.'" />';
+ } else {
+ echo '<input type="submit" class="felvesz" id="f'. $eAdat['esemenyId'].'" name="felvesz'.$eAdat['esemenyId'].'" value="'._FELVESZ.'" disabled="disabled" />';
+ }
+ echo '</td>'."\n";
+ echo '<td></td>'."\n";
+ }
+ echo '<td>'.$eAdat['esemenyRovidnev'].'</td>'."\n";
+ echo '<td>';
+ _inlineHelp($eAdat['esemenyNev']."\n\n".$eAdat['esemenyLeiras']);
+ echo '</td>'."\n";
+ echo '<td>'.$eAdat['esemenyKategoria'].'</td>'."\n";
+ echo '<td class="letszam">'.$eAdat['letszam'].'</td>'."\n";
+ echo '<td class="'.$minmaxClass.'">'.$eAdat['min'].'-'.$eAdat['max'].'</td>'."\n";
+
+ echo '<td>';
+ if ($jovahagyott) echo '<span class="icon-ok-sign"></span>';
+ else echo '<span class="icon-minus-sign"></span>';
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+ }
+
+ echo '</table>'."\n";
+
+ formEnd();
+
+ }
+
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/esemeny/ujEsemeny.phtml b/mayor-orig/www/skin/classic/module-naplo/html/esemeny/ujEsemeny.phtml
new file mode 100644
index 00000000..604b5c9c
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/esemeny/ujEsemeny.phtml
@@ -0,0 +1,171 @@
+<?php
+
+ function esemenyForm($ADAT) {
+
+ $DIS = (__MODOSITHAT)?'':' disabled="disabled" ';
+ formBegin(array('action'=>'','method'=>'post','class'=>'esemeny'));
+
+ if ($ADAT['esemenyId'] == '') {
+ echo '<input type="hidden" name="action" value="ujEsemeny" />'."\n";
+ } else {
+ echo '<input type="hidden" name="action" value="esemenyModositas" />'."\n";
+ echo '<input type="hidden" name="esemenyId" value="'.$ADAT['esemenyId'].'" />'."\n";
+ }
+
+ echo '<table>'."\n";
+ echo '<tr>'."\n";
+ echo '<th><label for="rovidnev">'._ROVIDNEV.'</label></th>';
+ echo '<td>'."\n";
+ echo '<input id="rovidnev" type="text" name="esemenyRovidnev" value="'.$ADAT['esemenyAdat']['esemenyRovidnev'].'" '.$DIS.'/>'."\n";
+ _inlineHelp(_SUGO_ROVIDNEV);
+ echo '</td>'."\n";
+ echo '</tr><tr>'."\n";
+ echo '<th><label for="nev">'._ESEMENYNEV.'</label></th>';
+ echo '<td>'."\n";
+ echo '<input id="nev" type="text" name="esemenyNev" value="'.$ADAT['esemenyAdat']['esemenyNev'].'" '.$DIS.'/>'."\n";
+ _inlineHelp(_SUGO_ESEMENYNEV);
+ echo '</td>'."\n";
+ echo '</tr><tr>'."\n";
+ echo '<td colspan="2"><hr/>'."\n";
+ echo '</td>'."\n";
+ echo '</tr><tr>'."\n";
+ echo '<td colspan="2">'."\n";
+ echo '<select id="kategoria" name="esemenyKategoria"'.$DIS.'>'."\n";
+ echo '<option value="">&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;&nbsp;&nbsp;&nbsp;'._KATEGORIA.'&nbsp;&nbsp;&nbsp;&nbsp;- </option>'."\n";
+ $SEL = array($ADAT['esemenyAdat']['esemenyKategoria'] => ' selected="selected" ');
+ foreach ($ADAT['esemenyKategoriak'] as $eKategoria) {
+ echo '<option value="'.$eKategoria.'"'.$SEL[$eKategoria].'>'.$eKategoria.'</option>'."\n";
+ }
+ echo '</select>'."\n";
+ echo '<label for="leiras"><strong>'._LEIRAS.'</strong></label>&nbsp;&nbsp;'."\n";
+ _inlineHelp(_SUGO_LEIRAS);
+ echo '<br/>';
+ echo '<textarea name="esemenyLeiras" id="leiras"'.$DIS.'>'.$ADAT['esemenyAdat']['esemenyLeiras'].'</textarea>'."\n";
+ echo '</td>'."\n";
+ echo '</tr><tr>'."\n";
+ echo '<th><label for="tolDt">'._JELENTKEZES.'</label></th>'."\n";
+ echo '<td>'."\n";
+ echo '<input type="text" id="tolDt" name="jelentkezesTolDt" class="datetime" value="'.$ADAT['esemenyAdat']['jelentkezesTolDt'].'"'.$DIS.'/>
+ - <input type="text" id="igDt" name="jelentkezesIgDt" class="datetime" value="'.$ADAT['esemenyAdat']['jelentkezesIgDt'].'"'.$DIS.' />'."\n";
+ _inlineHelp(_SUGO_JELENTKEZES);
+ echo '</td>'."\n";
+ echo '</tr><tr>'."\n";
+ echo '<th><label for="min">'._LETSZAM_KORLAT.'</label></th>';
+ echo '<td>'."\n";
+ echo '<select name="min"'.$DIS.'>'."\n";
+ echo '<option value="0"> - </option>'."\n";
+ $SEL = array($ADAT['esemenyAdat']['min'] => ' selected="selected" ');
+ for ($i=1; $i<501; $i++) {
+ echo '<option value="'.$i.'"'.$SEL[$i].'>'.$i.'</option>'."\n";
+ }
+ echo '</select> - '."\n";
+ $count = count($ADAT['esemenyAdat']['diakIds']);
+ echo '<select name="max"'.$DIS.'>'."\n";
+ echo '<option value="0"> - </option>'."\n";
+ $SEL = array($ADAT['esemenyAdat']['max'] => ' selected="selected" ');
+ for ($i=1; $i<501; $i++) {
+ if ($count > $i) echo '<option value="'.$i.'"'.$SEL[$i].' disabled="disabled">'.$i.'</option>'."\n";
+ else echo '<option value="'.$i.'"'.$SEL[$i].'>'.$i.'</option>'."\n";
+ }
+ echo '</select>'."\n";
+ _inlineHelp(_SUGO_LETSZAM_KORLAT);
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+
+ if ($ADAT['esemenyId'] != '') {
+
+ echo '<tr>';
+ echo '<td colspan="2"><hr/>'."\n";
+
+ echo '<div id="osztalyLista">'."\n";
+ echo '<strong>'._OSZTALYOK.'</strong>&nbsp;&nbsp'."\n";
+ _inlineHelp(_SUGO_OSZTALYOK);
+
+ echo '<ul>'."\n";
+ foreach ($ADAT['osztalyok'] as $oAdat) {
+ if (__MODOSITHAT) {
+ echo '<li>';
+ echo '<label class="oJel" for="osztaly'.$oAdat['osztalyId'].'">'.$oAdat['osztalyJel'].'</label>'."\n";
+ $CHK = (in_array($oAdat['osztalyId'], $ADAT['esemenyAdat']['osztalyIds']))?' checked="checked" ':'';
+ echo '<input type="checkbox" value="'.$oAdat['osztalyId'].'" name="esemenyOsztaly[]" id="osztaly'.$oAdat['osztalyId'].'" '.$CHK.'/>'."\n";
+ echo '<label for="osztaly'.$oAdat['osztalyId'].'">'.$oAdat['kezdoTanev'].'/'.$oAdat['vegzoTanev'].'.'.$oAdat['jel'].' ('.$oAdat['leiras'].')</label>'."\n";
+ echo '</li>';
+ } elseif (in_array($oAdat['osztalyId'], $ADAT['esemenyAdat']['osztalyIds'])) {
+ echo '<li>';
+ echo '<label class="oJel" for="osztaly'.$oAdat['osztalyId'].'">'.$oAdat['osztalyJel'].'</label>'."\n";
+ echo '<label for="osztaly'.$oAdat['osztalyId'].'">'.$oAdat['kezdoTanev'].'/'.$oAdat['vegzoTanev'].'.'.$oAdat['jel'].' ('.$oAdat['leiras'].')</label>'."\n";
+ echo '</li>';
+ }
+ }
+ echo '</ul>'."\n";
+ echo '<a href="'.href('index.php?page=naplo&sub=esemeny&f=esemenyDiak&esemenyId='.$ADAT['esemenyId']).'">'._ESEMENYJELENTKEZOK.'...</a>'."\n";
+ echo '</div>'."\n";
+
+ echo '</td>'."\n";
+ echo '</tr><tr>'."\n";
+ echo '<th><label for="tanarok">'._TANAROK.'</label></th>'."\n";
+ echo '<td class="tanarok">'."\n";
+ echo '<div class="select"><select id="esemenyTanar" name="esemenyTanar[]" multiple="multiple"'.$DIS.'>'."\n";
+ foreach ($ADAT['tanarok'] as $tAdat) {
+ if (in_array($tAdat['tanarId'], $ADAT['esemenyAdat']['tanarIds']))
+ echo '<option value="'.$tAdat['tanarId'].'">'.$tAdat['tanarNev'].' ('.$tAdat['tanarId'].')</option>'."\n";
+ }
+ echo '</select></div>'."\n";
+
+ if (__MODOSITHAT) {
+ echo '<br />'."\n";
+ echo '<input type="button" id="plusz" value="+" />'."\n";
+ echo '<input type="button" id="minusz" value="&#8722;" />'."\n";
+ _inlineHelp(_SUGO_TANAROK);
+ echo '<div id="tanarLista" style="display: none" >'."\n";
+ echo '<span id="closeTanarLista">&times;</span>'."\n";
+ echo '<select id="tanarok" name="tanarok" multiple="multiple">'."\n";
+ foreach ($ADAT['tanarok'] as $tAdat) {
+ echo '<option value="'.$tAdat['tanarId'].'">'.$tAdat['tanarNev'].' ('.$tAdat['tanarId'].')</option>'."\n";
+ }
+ echo '</select>'."\n";
+ echo '<input type="button" id="add" value="&#8678;" />'."\n";
+ echo '</div>'."\n";
+ }
+ echo '</td>'."\n";
+ echo '</tr>';
+ }
+
+ if (__MODOSITHAT) {
+ echo '<tr class="submit">'."\n";
+ echo '<td colspan="2" id="submitTd">'."\n";
+ echo '<input id="submitButton" type="submit" value="'._OK.'" />'."\n";
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+ }
+
+ echo '</table>'."\n";
+ formEnd();
+
+ if ($ADAT['esemenyId'] != '' && __MODOSITHAT) {
+ formBegin(array('method'=>'post','action'=>'','class'=>'esemenyTorles'));
+ echo '<input type="hidden" name="action" value="esemenyTorles" />'."\n";
+ echo '<input type="hidden" name="esemenyId" value="'.$ADAT['esemenyId'].'" />'."\n";
+ echo '<input type="submit" value="'._TOROL.'" class="confirm" title="'._ESEMENY_TOROL_E.'" />'."\n";
+ formEnd();
+ }
+ }
+/*
+ function esemenyLista($ADAT) {
+ echo '<p>Ez még csúny, tudom... :)</p>';
+ if (is_array($ADAT['esemenyek'])) {
+ echo '<ul id="esemenyLista">';
+ foreach ($ADAT['esemenyek'] as $eAdat) {
+ echo '<li>';
+ formBegin(array('method'=>'post','action'=>''));
+ echo '<input type="hidden" name="esemenyId" value="'.$eAdat['esemenyId'].'" />'."\n";
+ echo '<input type="submit" value="'.$eAdat['esemenyRovidnev'].' ('.$eAdat['esemenyId'].')" />'."\n";
+ formEnd();
+ echo '</li>';
+ }
+ echo '</ul>';
+ }
+
+ }
+*/
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/export/bizonyitvany.phtml b/mayor-orig/www/skin/classic/module-naplo/html/export/bizonyitvany.phtml
new file mode 100644
index 00000000..2d357aa1
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/export/bizonyitvany.phtml
@@ -0,0 +1,47 @@
+<?php
+
+ function putExportForm($ADAT) {
+
+ global $skin;
+
+ formBegin(array('action'=>href('index.php?page=naplo&sub=export&f=bizonyitvany'), 'class'=>"export"));
+ echo '<input type="hidden" name="action" value="bizonyitvanyExport" />'."\n";
+
+ if (isset($ADAT['osztalyId'])) echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalyId'].'" />'."\n";
+ if (isset($ADAT['szemeszterAdat']['szemeszterId']))
+ echo '<input type="hidden" name="szemeszterId" value="'.$ADAT['szemeszterAdat']['szemeszterId'].'" />'."\n";
+
+ echo '<fieldset><legend>'._EXPORT.'</legend>'."\n";
+ echo '<table>'."\n";
+
+ $CHK = array('ods' => ' checked="checked" ');
+
+ echo '<tr>'."\n";
+ echo '<th>'._FORMATUM.'</th>'."\n";
+ echo '<td>';
+ echo '<input type="radio" name="formatum" value="csv" id="csv"'.$CHK['csv'].' />'."\n";
+ echo '<label for="csv">'._CSV.'</label><br />'."\n";
+ echo '</td>';
+ echo '<td>';
+ echo '<input type="radio" name="formatum" value="ods" id="ods"'.$CHK['ods'].' />'."\n";
+ echo '<label for="ods">'._ODS.'</label>'."\n";
+ echo '</td>'."\n";
+ echo '<td>';
+ echo '<input type="radio" name="formatum" value="xml" id="xml"'.$CHK['xml'].' />'."\n";
+ echo '<label for="xml">'._XML.'</label>'."\n";
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+
+ echo '<tr>';
+ echo '<th>';
+ echo '<input type="submit" value="'._OK.'" />'."\n";
+ echo '</th>';
+ echo '</tr>';
+
+ echo '</table>'."\n";
+ echo '</fieldset>';
+ if ($skin != 'ajax') formEnd();
+ }
+
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/export/diakExport.phtml b/mayor-orig/www/skin/classic/module-naplo/html/export/diakExport.phtml
new file mode 100644
index 00000000..f3f8a8f2
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/export/diakExport.phtml
@@ -0,0 +1,153 @@
+<?php
+
+ function putDiakTabla($ADAT) {
+
+ echo '<div id="tableDiv">';
+
+ $i = 0;
+ foreach ($ADAT['mezok'] as $attr => $attrNev) {
+ if ($ADAT['types'][$attr] == 'int') $sortType[] = 'Number';
+ elseif ($ADAT['types'][$attr] == 'date') $sortType[] = 'Date';
+ else $sortType[] = 'String';
+ if (in_array($attr, array('szuletesiHely','lakhelyHelyseg','nem','lakohelyiJellemzo'))) $selIndex[] = $i;
+ $i++;
+ }
+echo '<script type="text/javascript">'."var cellTypes = ['".implode("','", $sortType)."']; selIndex = [".implode(',', $selIndex)."];".'</script>';
+ echo '<table class="diak" id="diakTabla" class="filterable">'."\n";
+
+ echo '<thead>'."\n";
+ echo '<tr>';
+ foreach ($ADAT['mezok'] as $attr => $attrNev) {
+ echo '<th>';
+ echo $attrNev;
+ echo '</th>';
+ }
+ echo '<th></th>';
+ echo '</tr>'."\n";
+ echo '</thead>'."\n";
+
+ echo '<tfoot>'."\n";
+ echo '<tr>';
+ foreach ($ADAT['mezok'] as $attr => $attrNev) {
+ echo '<th>';
+ echo $attrNev;
+ echo '</th>';
+ }
+ echo '<th></th>';
+ echo '</tr>'."\n";
+ echo '</tfoot>'."\n";
+
+ echo '<tbody>'."\n";
+ foreach ($ADAT['export'] as $i => $dAdat) {
+ echo '<tr>';
+ foreach ($ADAT['mezok'] as $attr => $attrNev) {
+ echo '<td>';
+ echo $dAdat[$attr];
+ echo '</td>'."\n";
+ }
+ echo '<td>';
+ formBegin(array('action'=>href('index.php?page=naplo&sub=intezmeny&f=diak')));
+ echo '<input type="hidden" name="diakId" value="'.$dAdat['diakId'].'" />';
+ echo '<input type="submit" value="&rarr;" />';
+ formEnd();
+ echo '</td>';
+ echo '</tr>'."\n";
+ }
+ echo '</tbody>'."\n";
+
+ echo '</table>'."\n";
+ echo '</div>';
+ }
+
+ function putDiakExportForm($ADAT) {
+
+ global $skin, $exportFormatum;
+
+ if ($skin != 'ajax') formBegin(array('action'=>href('index.php?page=naplo&sub=export&f=diakExport'), 'class'=>"diak hideShowContainer", 'id'=>"exportOptions"));
+
+ echo '<input type="hidden" name="action" value="diakExport" />'."\n";
+ if (isset($ADAT['osztalyId'])) echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalyId'].'" />'."\n";
+ if (isset($ADAT['dt'])) echo '<input type="hidden" name="dt" value="'.$ADAT['dt'].'" />'."\n";
+
+
+ echo '<div id="submitForm">';
+ echo '<input type="button" value="'._BEALLITASOK.'" class="onClickHideShow" />';
+
+ echo '<input type="submit" name="html" value="'._HTML.'" id="htmml" />'."\n";
+ echo '<input type="submit" name="csv" value="'._CSV.'" id="csv" />'."\n";
+ echo '<input type="submit" name="xml" value="'._XML.'" id="xml" />'."\n";
+
+ echo '</div>';
+
+
+ if (is_array($ADAT['export']) && count($ADAT['export']) > 0) {
+ echo '<fieldset class="openable" style="display: none;"><legend>'._EXPORT.'</legend>'."\n";
+ } else {
+ echo '<fieldset class="openable"><legend>'._EXPORT.'</legend>'."\n";
+ }
+ echo '<table>'."\n";
+
+ echo '<tr>'."\n";
+ echo '<th colspan="3">'._MEGJELENITENDO_MEZOK.'</th>';
+ echo '</tr>';
+ echo '<tr>';
+ echo '<td>';
+ echo '<select multiple="multiple" name="szabad" id="szabad">'."\n";
+ foreach ($ADAT['fields'] as $attr => $attrNev) {
+ if (!isset($ADAT['mezok'][$attr])) {
+ echo '<option value="'.$attr.'">'.$attrNev.'</option>';
+ }
+ }
+ echo '</select>'."\n";
+ echo '</td>'."\n";
+ echo '<td>';
+ echo '<input type="button" id="valaszt" value="&rarr;" />';
+ echo '<br />';
+ echo '<input type="button" id="torol" value="&larr;" />';
+ echo '</td>';
+ echo '<td>';
+ echo '<select multiple="multiple" name="mezok[]" id="kivalasztott">'."\n";
+ foreach ($ADAT['mezok'] as $attr => $attrNev) {
+ echo '<option value="'.$attr.'">'.$attrNev.'</option>';
+ }
+ echo '</select>'."\n";
+ echo '</td>';
+ echo '</tr>'."\n";
+
+ echo '<tr>';
+ echo '<td colspan="3" align="center">';
+ foreach ($exportFormatum as $formatum => $mezok) {
+ $format = ekezettelen($formatum);
+ echo '<input type="button" name="'.$format.'" value="'.$formatum.'" class="onClickMezoSelect" />'."\n";
+ echo '<input type="hidden" name="'.$format.'Lista" id="'.$format.'Lista" value="'.implode(',', $mezok).'" />'."\n";
+ }
+ echo '</td>';
+ echo '</tr>';
+
+ echo '</table>'."\n";
+ echo '</fieldset>';
+
+ if ($skin != 'ajax') formEnd();
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/export/kreta.phtml b/mayor-orig/www/skin/classic/module-naplo/html/export/kreta.phtml
new file mode 100644
index 00000000..cea5556e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/export/kreta.phtml
@@ -0,0 +1,138 @@
+<?php
+
+ function putKretaTanarExportForm($ADAT) {
+
+ global $skin;
+
+ formBegin(array('action'=>href('index.php?page=naplo&sub=export&f=kreta'), 'class'=>"export"));
+ echo '<input type="hidden" name="action" value="kretaTanarExport" />'."\n";
+ echo '<input type="hidden" name="telephelyId" value="'.$ADAT['telephelyId'].'" />'."\n";
+
+ echo '<fieldset><legend>Kréta - Tanár adatbázis</legend>'."\n";
+ echo '<table>'."\n";
+
+ echo '<tr>'."\n";
+ echo '<th>Tanár adatok</th>'."\n";
+ echo '</tr><tr>';
+ echo '<td>';
+ echo 'Elsődleges, hogy a KIR, KRÉTA és MaYoR rendszerekben a tanár neveket és születési dátumokat szinkronizálni kell!';
+ echo '</td>';
+ echo '</tr>';
+
+ echo '<tr><th>A MaYoR tanár adatainak letöltése (export)</th></tr>';
+
+
+ echo '<tr>';
+ echo '<td>';
+ echo '<ul>';
+ echo '<li>';
+ echo '<input type="radio" name="formatum" value="xml" id="xml" checked="checked" />'."\n";
+ echo '<label for="xml">.XML</label>'."\n";
+ echo '</li>';
+ echo '<li>';
+ echo '<input type="radio" name="formatum" value="csv" id="csv" />'."\n";
+ echo '<label for="csv">.CSV</label>'."\n";
+ echo '</li>';
+ echo '<li>';
+ echo '<input type="radio" name="formatum" value="ods" id="ods" />'."\n";
+ echo '<label for="ods">.ODS</label>'."\n";
+ echo '</li></ul>';
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+
+ echo '<tr>';
+ echo '<th>';
+ echo '<input type="submit" value="'._LETOLTES.'" />'."\n";
+ echo '</th>';
+ echo '</tr>';
+
+ echo '</table>'."\n";
+ echo '</fieldset>';
+ //if ($skin != 'ajax')
+ formEnd();
+ }
+
+
+ function putKretaTankorTanarExportForm($ADAT) {
+
+ global $skin;
+
+ formBegin(array('action'=>href('index.php?page=naplo&sub=export&f=kreta'), 'class'=>"export"));
+ echo '<input type="hidden" name="action" value="tankorTanarExport" />'."\n";
+ echo '<input type="hidden" name="telephelyId" value="'.$ADAT['telephelyId'].'" />'."\n";
+
+ echo '<fieldset><legend>ETTF - Előzetes Tantárgyfelosztás</legend>'."\n";
+ echo '<table>'."\n";
+
+ echo '<tr>'."\n";
+ echo '<th>Előzetes Tantárgyfelosztás (ETTF) - egyszerű formátum</th>'."\n";
+ echo '</tr><tr>';
+ echo '<td>';
+ echo 'Az előzetes tantárgyfelosztás a kiválasztott formátumú file letöltése és megnyitása után <span style="color:green; font-weight:bold;">.xlsx</span> formában elmentve közvetlenül importálható a központi Kréta rendszerbe.';
+ echo '</td>';
+ echo '</tr><tr>';
+ echo '<td>';
+ echo '<ul>';
+ echo '<li>';
+ echo '<input type="radio" name="formatum" value="xml" id="xml" checked="checked" />'."\n";
+ echo '<label for="xml">.XML</label>'."\n";
+ echo '</li>';
+ echo '<li>';
+ echo '<input type="radio" name="formatum" value="csv" id="csv" />'."\n";
+ echo '<label for="csv">.CSV</label>'."\n";
+ echo '</li>';
+ echo '<li>';
+ echo '<input type="radio" name="formatum" value="ods" id="ods" />'."\n";
+ echo '<label for="ods">.ODS</label>'."\n";
+ echo '</li></ul>';
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+
+ echo '</tr><tr>';
+ echo '<td>';
+ echo 'A tankörtípusokban megkülönböztetjük a csak óratervi - képzési hálóban szereplő tanköröket.';
+ echo '</td>';
+ echo '</tr><tr>';
+ echo '<td>';
+ echo '<ul>';
+ $_CHK1 = ($ADAT['csakOratervi']==false) ? 'checked="checked" ': '';
+ $_CHK2 = ($ADAT['csakOratervi']==true) ? 'checked="checked" ': '';
+ echo '<li><input type="radio" id="mindenTankor_radio" name="csakOratervi" value="false" '.$_CHK1.'/> <label for="mindenTankor_radio">minden tankört</label></li>';
+ echo '<li><input type="radio" id="csakOratervi_radio" name="csakOratervi" value="true" '.$_CHK2.'/> <label for="csakOratervi_radio">csak óratervinek jelölt tanköröket</label></li>';
+ echo '</ul>';
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+
+ echo '<tr>';
+ echo '<th>';
+ echo '<input type="submit" value="'._LETOLTES.'" />'."\n";
+ echo '</th>';
+ echo '</tr>';
+
+ echo '</table>'."\n";
+ echo '</fieldset>';
+ //if ($skin != 'ajax')
+ formEnd();
+
+ /* ha ki szeretnénk írni a bontasOk === false okat
+ echo '<table align="center">';
+ for ($i=0; $i<count($ADAT['tankorok']); $i++) {
+ $D = $ADAT['tankorok'][$i];
+ if ($ADAT['tankorok'][$i]['bontasOk']===false) {
+ //dump($ADAT['tankorok'][$i]);
+ echo '<tr>';
+ echo '<td>'.$D['tankorNev'].' ('.$D['tankorId'].')</td>';
+ echo '<td>'.$D['hetiOraszam'].'</td>';
+ echo '<td>'.implode(',',$D['tanarIds']).'</td>';
+ echo '<td>';
+ dump($D['tervezettOraszamok']);
+ echo '</td>';
+ echo '</tr>';
+ }
+ }
+ echo '</table>';
+ */
+
+ }
+
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/export/sulix.phtml b/mayor-orig/www/skin/classic/module-naplo/html/export/sulix.phtml
new file mode 100644
index 00000000..7979153d
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/export/sulix.phtml
@@ -0,0 +1,43 @@
+<?php
+
+ function putExportForm($ADAT) {
+
+ echo '<div class="txt">';
+ echo '<div>';
+ echo '<p>A MaYoR és a SuliXerver legújabb verziói képesek együttműködésre, aminek számos előnye van a felhasználók és az
+üzemeltetők számára. Az előnyök közé tartozik például, hogy az együttműködés során megoldottuk a közös felhasználókezelést, az
+egypontos bejelentkezést, az automatikus adatmentést, automatikus rendszerfrissítést. Ezen kívül a rendszer rendkívül kompakt módon,
+egyetlen szerverről is működhet.</p>';
+ echo '<p>A két rendszer együttműködésének előnyeit egyaránt kihasználhatják azok, akik a MaYoR mellett már használnak
+SuliXervert, de azok is, akik még nem, és most fogják telepíteni.</p>';
+ echo '<p>Az együttműködésnek két alapvető üzemmódja van:</p>';
+ echo '<ul>';
+ echo '<li>Teljes áttérés SuliXerverre: ebben az esetben az új SuliXerveren futó MaYoR alapú SuliX Napló fogja ezentúl az
+összes MaYoR funkciót ellátni. Ennek a megoldásnak az az előnye, hogy egy szerveren települ és üzemeltethető a komplett megoldás,
+valamint a közös adatbázisnak köszönhetően az adatok mindig egységesek és konzisztensek maradnak. Az adatok migrálásához csupán egy
+pendrive-ra van szükség, amelyre egy kattintással lementhetjük a meglévő MaYoR adatokat és a SuliXerveren egy kattintással beolvashatjuk
+azokat.</li>';
+ echo '<li>Integráció SuliXerverrel: ennél a módszernél a jelenlegi MaYoR szerver megmarad, de közös felhasználói adatbázist
+és autentikációt fog használni a SuliXerverrel. Ennek előnye, hogy külön szerveren is futhat a Napló, azonban néhány kényelmi
+funkció nem lesz elérhető, pl. egypontos belépés, integrált mentés, adatok változtatása esetén azok automatikus átvezetése a másik
+rendszerbe.</li>';
+ echo '</ul>';
+ echo '<p>Mindkét esetben kattintson a "Felhasználói azonosítók exportálása" gombra a lap alján, majd a keletkezett fájlt
+másolja egy hordozható adattárolóra. Amennyiben nincs futó SuliXervere, telepítsen egyet a <a href="http://www.sulix.hu">www.sulix.hu</a>
+oldalon leírtak alapján.
+A SuliXerveren a szokványos beállításokon kívül még néhány beállítást meg kell tennie ahhoz, hogy a mentett adatokat be tudja olvasni.
+Ehhez lépjen be a SuliXerverre adminisztrátorként, majd kattintson a Segédeszközök -> SuliXerver Napló beállítások fülre, válassza ki
+az "Integrált napló használata" illetve a "Külső napló használata" lehetőséget és kövesse az ott leírtakat.</p>';
+
+ echo '</div>';
+
+ formBegin(array('method'=>'post','action'=>'','class'=>'export'));
+ echo '<input type="hidden" name="action" value="sulixExport" />'."\n";
+ echo '<input type="submit" value="'._EXPORT.'" />'."\n";
+ formEnd();
+
+ echo '</div>';
+
+ }
+
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/export/tanarOsztalyOraszam.phtml b/mayor-orig/www/skin/classic/module-naplo/html/export/tanarOsztalyOraszam.phtml
new file mode 100644
index 00000000..dc1e2565
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/export/tanarOsztalyOraszam.phtml
@@ -0,0 +1,46 @@
+<?php
+
+ function putTanarOsztalyOraszamForm($ADAT) {
+
+ global $skin;
+
+ formBegin(array('action'=>href('index.php?page=naplo&sub=export&f=tanarOsztalyOraszam'), 'class'=>"export"));
+ echo '<input type="hidden" name="action" value="tanarOsztalyOraszam" />'."\n";
+
+ echo '<fieldset><legend>Tanár-osztály óraszám</legend>'."\n";
+ echo '<table>'."\n";
+
+ echo '<tr><th>A MaYoR tanár-osztály óraszám mátrixának letöltése (export)</th></tr>';
+
+ echo '<tr>';
+ echo '<td>';
+ echo '<ul>';
+ echo '<li>';
+ echo '<input type="radio" name="formatum" value="xml" id="xml" checked="checked" />'."\n";
+ echo '<label for="xml">.XML</label>'."\n";
+ echo '</li>';
+ echo '<li>';
+ echo '<input type="radio" name="formatum" value="csv" id="csv" />'."\n";
+ echo '<label for="csv">.CSV</label>'."\n";
+ echo '</li>';
+ echo '<li>';
+ echo '<input type="radio" name="formatum" value="ods" id="ods" />'."\n";
+ echo '<label for="ods">.ODS</label>'."\n";
+ echo '</li></ul>';
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+
+ echo '<tr>';
+ echo '<th>';
+ echo '<input type="submit" value="'._LETOLTES.'" />'."\n";
+ echo '</th>';
+ echo '</tr>';
+
+ echo '</table>'."\n";
+ echo '</fieldset>';
+ //if ($skin != 'ajax')
+ formEnd();
+ }
+
+
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/export/tantargyFelosztas.phtml b/mayor-orig/www/skin/classic/module-naplo/html/export/tantargyFelosztas.phtml
new file mode 100644
index 00000000..fa495fad
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/export/tantargyFelosztas.phtml
@@ -0,0 +1,41 @@
+<?php
+
+ function putExportForm($ADAT) {
+
+ global $skin;
+
+ formBegin(array('action'=>href('index.php?page=naplo&sub=export&f=tantargyFelosztas'), 'class'=>"export"));
+ echo '<input type="hidden" name="action" value="tantargyFelosztasExport" />'."\n";
+
+
+ echo '<fieldset><legend>'._EXPORT.'</legend>'."\n";
+ echo '<table>'."\n";
+
+ echo '<tr>'."\n";
+ echo '<th>'._FORMATUM.'</th>'."\n";
+ echo '<td>';
+ echo '<input type="radio" name="formatum" value="csv" id="csv" />'."\n";
+ echo '<label for="csv">'._CSV.'</label><br />'."\n";
+ echo '</td>';
+ echo '<td>';
+ echo '<input type="radio" name="formatum" value="ods" id="ods" />'."\n";
+ echo '<label for="ods">'._ODS.'</label>'."\n";
+ echo '</td>'."\n";
+ echo '<td>';
+ echo '<input type="radio" name="formatum" value="xml" id="xml" />'."\n";
+ echo '<label for="xml">'._XML.'</label>'."\n";
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+
+ echo '<tr>';
+ echo '<th>';
+ echo '<input type="submit" value="'._OK.'" />'."\n";
+ echo '</th>';
+ echo '</tr>';
+
+ echo '</table>'."\n";
+ echo '</fieldset>';
+ if ($skin != 'ajax') formEnd();
+ }
+
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/haladasi/elmaradas.phtml b/mayor-orig/www/skin/classic/module-naplo/html/haladasi/elmaradas.phtml
new file mode 100644
index 00000000..d8249691
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/haladasi/elmaradas.phtml
@@ -0,0 +1,63 @@
+<?php
+
+ function putElmaradas($Elmaradas, $Tanarok) {
+
+ echo '<table class="elmaradas" cellspacing="1">';
+ echo '<thead><tr>';
+ echo '<th colspan="2">'._TANAR.'</th>';
+ echo '<th>'._LEZART.'</th>';
+ echo '<th>'._BEIRANDO.'</th>';
+ echo '</tr></thead><tfoot><tr><td colspan="4">'._HATARIDO.':'._HALADASI_HATARIDO.'; '._MAIDATUM.': '.date('Y-m-d').'</td></tr></tfoot>';
+ echo '<tbody>';
+ for ($i = 0; $i < count($Elmaradas['lezart']); $i++) {
+
+ echo '<tr>';
+ $tanarId = $Elmaradas['lezart'][$i]['ki'];
+ $tanarNev = $Tanarok[$tanarId]['tanarNev'];
+ $Tanarok[$tanarId]['volt'] = true;
+ $lezartDb = $Elmaradas['lezart'][$i]['db'];
+ $beirandoDb = $Elmaradas['beirando'][$tanarId]['db'];
+ echo '<th>';
+ echo ($i+1).'. ';
+ echo '</th>';
+ echo '<th class="tanarNev" data-tanarid="'.$tanarId.'">';
+ echo $tanarNev;
+ echo '</th>';
+ echo '<td>';
+ echo $lezartDb;
+ echo '</td>';
+ echo '<td>';
+ echo $beirandoDb;
+ echo '</td>';
+ echo '</tr>';
+ }
+
+ foreach ($Elmaradas['beirando'] as $tanarId => $beirandoAdat) {
+ if (!$Tanarok[$tanarId]['volt']) {
+ $tanarNev = $Tanarok[$tanarId]['tanarNev'];
+ $lezartDb = '';
+ $beirandoDb = $Elmaradas['beirando'][$tanarId]['db'];
+ $Tanarok[$tanarId]['volt'] = true;
+ echo '<tr class="beirando">';
+ echo '<th>';
+ echo (++$i).'.';
+ echo '</th>';
+ echo '<th class="tanarNev" data-tanarid="'.$tanarId.'">';
+ echo $tanarNev;
+ echo '</th>';
+ echo '<td>';
+ echo $lezartDb;
+ echo '</td>';
+ echo '<td>';
+ echo $beirandoDb;
+ echo '</td>';
+ echo '</tr>';
+ }
+ }
+ // Ha nagyon akarjuk, akkor kirakhatjuk a többi nevet is - de nem akarjuk...
+ echo '</tbody>';
+ echo '</table>';
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/haladasi/elszamolas.phtml b/mayor-orig/www/skin/classic/module-naplo/html/haladasi/elszamolas.phtml
new file mode 100644
index 00000000..7d9adb23
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/haladasi/elszamolas.phtml
@@ -0,0 +1,284 @@
+<?php
+
+ function putElszamolas($ADAT) {
+
+ if (!is_array($ADAT['napok']) || count($ADAT['napok'])==0) return false;
+
+ $napszam = ($ADAT['napok'][1]['tanítási nap']+$ADAT['napok'][1]['speciális tanítási nap']);
+ $napTipus = array('tanítási nap','speciális tanítási nap','tanítás nélküli munkanap','tanítási szünet');
+ $T = array(
+ 'lekötött' => array('normál','normál máskor','helyettesítés'),
+ 'fennmaradó' => array('helyettesítés','felügyelet','előírt egyéb','egyéb') // 'összevonás'
+ );
+
+ $Munkaido = array_keys($T);
+ $SumTipus = array('normál','normál máskor','helyettesítés','felügyelet','egyéb');
+
+ /* Munkaterv */
+ echo '<table class="elszamolas" cellpadding="1" cellspacing="1">'."\n";
+ echo '<thead>';
+ echo '<tr><th>'._MUNKATERV.'</th>';
+ foreach ($ADAT['napTipusok'] as $tipus) {
+ echo '<th>'.$tipus.'</th>';
+ }
+ echo '</tr>'."\n";
+ echo '</thead><tfoot></tfoot>';
+ echo '<tbody>';
+ foreach ($ADAT['napok'] as $munkatervId => $mAdat) {
+ echo '<tr><th>'.$ADAT['munkaterv'][$munkatervId]['munkatervNev'].' ('.$munkatervId.')</th>';
+ foreach ($ADAT['napTipusok'] as $tipus) {
+ echo '<td>'.$mAdat[$tipus].'</td>';
+ }
+ echo '</tr>';
+ }
+ echo '</tbody>';
+ echo '</table>'."\n";
+
+ /* Elszámolás, órastatisztika */
+ echo '<table class="elszamolas" cellpadding="1" cellspacing="1" >'."\n";
+ echo '<thead><tr>';
+
+ echo '<th rowspan="3">'._TANAR.'</th>';
+ echo '<th rowspan="1" colspan="7">'._KOTOTT_MUNKAIDO.'</th>';
+ echo '<th colspan="3">Σ</th>';
+ echo '<th rowspan="2" colspan="4">';
+ echo _ELOIRT_HETI_MUNKAORA.' '.$napszam.' '._NAPRA_VETITVE;
+ echo '<div style="border: solid 1px #ddd; width:174px; height:8px; background-color: #aaa;"><span id="munkaoraBar" style="display:block; width:0%;height:8px;"></span></div>';
+ echo '</th>';
+ echo '<th colspan="2" rowspan="2">'._HETI_ORASZAM.'</th>';
+
+ echo '</tr>'."\n";
+ echo '<tr>';
+ echo '<th colspan="3">lekötött</th>';
+ //echo '<th colspan="1">lekötött+fennmaradó</th>';
+ echo '<th colspan="4">fennmaradó</th>';
+// echo '<th colspan="1">nem számolt</th>'; // összevonás
+ echo '<th rowspan="2">lekötött</th>';
+ echo '<th rowspan="2">fennmaradó</th>';
+ echo '<th rowspan="2">+</th>';
+ echo '</tr>';
+ echo '<tr>';
+ foreach ($T as $_munkaido => $Tipus) {
+ for ($i = 0; $i < count($Tipus); $i++) {
+ echo '<th class="'.str_replace(' ','_',ekezettelen($Tipus[$i])).'">'.$Tipus[$i].'</th>';
+ }
+ }
+ echo '<th class="e1">55%</th>';
+ echo '<th class="e2">65%</th>';
+ echo '<th class="e3">80%</th>';
+ echo '<th class="e4">100%</th>';
+ echo '<th>'._TANTARGYFELOSZTASBOL.'</th><th>'._ORARENDBOL.'</th>';
+
+ echo '</tr></thead>'."\n";
+
+ echo '<tbody>';
+ for ($t = 0; $t < count($ADAT['tanarok']); $t++) {
+ $_O = $ADAT['tanarok'][$t];
+ $tanarId = $ADAT['tanarok'][$t]['tanarId'];
+ if (!__VEZETOSEG && !__NAPLOADMIN && $tanarId!=__USERTANARID) continue;
+ $tanarNev = $ADAT['tanarok'][$t]['tanarNev'];
+
+ // Elavult
+ //$tanarHetiMunkaora = $ADAT['tanarok'][$t]['hetiMunkaora'];
+ //$_THM = ($tanarHetiMunkaora / 5) * $napszam ; // Tanári Heti Munkaóra a vizsgált időszakra vetítve (tanítási napok
+
+ $_THM = $_heti = ($_O['hetiMunkaora']>0) ? ($_O['hetiMunkaora']):40;
+ $_kotottMax= ($_O['hetiKotottMaxOraszam']>0) ? ($_O['hetiKotottMaxOraszam']) : (($_O['hetiMunkaora']>0) ? ($_O['hetiMunkaora']*0.8):32);
+ $_lekotottMax = ($_O['hetiLekotottMaxOraszam']>0) ? ($_O['hetiLekotottMaxOraszam']) : (($_O['hetiMunkaora']>0) ? ($_O['hetiMunkaora']*0.65):26);
+ $_lekotottMin = ($_O['hetiLekotottMinOraszam']>0) ? ($_O['hetiLekotottMinOraszam']) : (($_O['hetiMunkaora']>0) ? ($_O['hetiMunkaora']*0.55):22);
+
+ $_korrekciosSzam = $napszam/5; // HETI öt nap
+
+ $sum = 0;
+ for ($i=0; $i<count($SumTipus); $i++) {
+ $sum += intval($ADAT[$tanarId][$SumTipus[$i]]);
+ }
+ if ($sum<=($_lekotottMin*$_korrekciosSzam)) $_style = ' class="e1" ';
+ elseif ($sum<=($_lekotottMax*$_korrekciosSzam)) $_style=' class="e2" ';
+ elseif ($sum<=($_kotottMax*$_korrekciosSzam)) $_style=' class="e3" ';
+ else $_style = ' class="e4" ';
+
+ $SUM = array();
+ echo '<tr data-percent="'.((100*$sum/($_heti*$_korrekciosSzam))).'" '.$_style.'>';
+ echo '<th class="tanarNev" data-tanarid="'.$tanarId.'">'.$tanarNev.'</th>';
+ foreach ($T as $_munkaido => $Tipus) {
+ for ($i = 0; $i < count($Tipus); $i++) {
+ echo '<td class="'.ekezettelen($Tipus[$i]).' '.ekezettelen($_munkaido).'">';
+ if ($Tipus[$i]=='helyettesítés') {
+ echo $_c = ($ADAT['detailed'][$tanarId][$Tipus[$i]][$_munkaido]);
+ } elseif (in_array($Tipus[$i],array('előírt egyéb','egyéb'))) {
+ if ($Tipus[$i]=='előírt egyéb') echo $_c = ($ADAT['detailed_ki_tipus_munkaido_eredet'][$tanarId]['egyéb'][$_munkaido]['órarend']);
+ else echo $_c = ($ADAT['detailed_ki_tipus_munkaido_eredet'][$tanarId]['egyéb'][$_munkaido]['plusz']);
+ } else {
+ echo $_c = $ADAT[$tanarId][$Tipus[$i]];
+ }
+ echo '</td>';
+ $SUM[$_munkaido] += $_c;
+ }
+ }
+ echo '<th class="sum lekotott">'.$SUM['lekötött'].'</th>';
+ echo '<th class="sum fennmarado">'.$SUM['fennmaradó'].'</th>';
+ echo '<th class="sumsum">'.($SUM['lekötött']+$SUM['fennmaradó']).'</th>';
+
+ echo '<td '.$_style.'>'.($_lekotottMin*$_korrekciosSzam).'</td>';
+ echo '<td '.$_style.'>'.($_lekotottMax*$_korrekciosSzam).'</td>';
+ echo '<td '.$_style.'>'.($_kotottMax*$_korrekciosSzam).'</td>';
+ echo '<td '.$_style.'>'.($_heti*$_korrekciosSzam).'</th>';
+
+ echo '<td>'.number_format($_O['hetiKotelezoOraszam'],1).'</td>';
+ echo '<td>'.number_format($ADAT[$tanarId]['oraszam'],1).'</td>';
+ echo '</tr>'."\n";
+
+ }
+
+ echo '</tbody></table>'."\n";
+
+ }
+
+
+/*
+ function putElszamolas_old($ADAT) {
+
+ if (!is_array($ADAT['napok']) || count($ADAT['napok'])==0) return false;
+
+ $napszam = ($ADAT['napok'][1]['tanítási nap']+$ADAT['napok'][1]['speciális tanítási nap']);
+ $napTipus = array('tanítási nap','speciális tanítási nap','tanítás nélküli munkanap','tanítási szünet');
+ $T = array(
+ 'lekötött' => array('normál','normál máskor','helyettesítés'),
+ 'fennmaradó' => array('helyettesítés','felügyelet','egyéb') // 'összevonás'
+ );
+ $Munkaido = array('lekötött','fennmaradó');
+ $Tipus = array('normál','normál máskor','helyettesítés','felügyelet','egyéb'); // 'összevonás'
+ $SumTipus = array('normál','normál máskor','helyettesítés','felügyelet','egyéb');
+
+ echo '<table class="elszamolas" cellpadding="1" cellspacing="1">'."\n";
+ echo '<thead>';
+ echo '<tr><th>'._MUNKATERV.'</th>';
+ foreach ($ADAT['napTipusok'] as $tipus) {
+ echo '<th>'.$tipus.'</th>';
+ }
+ echo '</tr>'."\n";
+ echo '</thead><tfoot></tfoot>';
+ echo '<tbody>';
+ foreach ($ADAT['napok'] as $munkatervId => $mAdat) {
+ echo '<tr><th>'.$ADAT['munkaterv'][$munkatervId]['munkatervNev'].' ('.$munkatervId.')</th>';
+ foreach ($ADAT['napTipusok'] as $tipus) {
+ echo '<td>'.$mAdat[$tipus].'</td>';
+ }
+ echo '</tr>';
+ }
+ echo '</tbody>';
+ echo '</table>'."\n";
+
+ echo '<table class="elszamolas" cellpadding="1" cellspacing="1" >'."\n";
+ echo '<thead><tr>';
+
+ echo '<th rowspan="3">'._TANAR.'</th>';
+ echo '<th rowspan="1" colspan="'.(count($Tipus)+1).'">'._KOTOTT_MUNKAIDO.'</th>';
+ echo '<th colspan="3">Σ</th>';
+
+ echo '<th rowspan="2" colspan="4">'._ELOIRT_HETI_MUNKAORA.' '.$napszam.' '._NAPRA_VETITVE.'</th>';
+ echo '<th rowspan="3">'._HETI_ORASZAM.'</th>';
+
+ echo '</tr>'."\n";
+ echo '<tr>';
+ echo '<th colspan="3">lekötött</th>';
+ //echo '<th colspan="1">lekötött+fennmaradó</th>';
+ echo '<th colspan="3">fennmaradó</th>';
+// echo '<th colspan="1">nem számolt</th>';
+ echo '<th rowspan="2">lekötött</th>';
+ echo '<th rowspan="2">fennmaradó</th>';
+ echo '<th rowspan="2">+</th>';
+ echo '</tr>';
+ echo '<tr>';
+ foreach ($T as $_munkaido => $Tipus) {
+ for ($i = 0; $i < count($Tipus); $i++) {
+ echo '<th>'.$Tipus[$i].'</th>';
+ }
+ }
+ echo '<th>55%</th>';
+ echo '<th>65%</th>';
+ echo '<th>80%</th>';
+ echo '<th>100%</th>';
+
+ echo '</tr></thead>'."\n";
+
+ echo '<tbody>';
+ for ($t = 0; $t < count($ADAT['tanarok']); $t++) {
+ $_O = $ADAT['tanarok'][$t];
+
+ $tanarId = $ADAT['tanarok'][$t]['tanarId'];
+ if (!__VEZETOSEG && !__NAPLOADMIN && $tanarId!=__USERTANARID) continue;
+ $tanarNev = $ADAT['tanarok'][$t]['tanarNev'];
+
+ // Elavult
+ //$tanarHetiMunkaora = $ADAT['tanarok'][$t]['hetiMunkaora'];
+ //$_THM = ($tanarHetiMunkaora / 5) * $napszam ; // Tanári Heti Munkaóra a vizsgált időszakra vetítve (tanítási napok
+
+ $_THM = $_heti = ($_O['hetiMunkaora']>0) ? ($_O['hetiMunkaora']):40;
+ $_kotottMax= ($_O['hetiKotottMaxOraszam']>0) ? ($_O['hetiKotottMaxOraszam']) : (($_O['hetiMunkaora']>0) ? ($_O['hetiMunkaora']*0.8):32);
+ $_lekotottMax = ($_O['hetiLekotottMaxOraszam']>0) ? ($_O['hetiLekotottMaxOraszam']) : (($_O['hetiMunkaora']>0) ? ($_O['hetiMunkaora']*0.65):26);
+ $_lekotottMin = ($_O['hetiLekotottMinOraszam']>0) ? ($_O['hetiLekotottMinOraszam']) : (($_O['hetiMunkaora']>0) ? ($_O['hetiMunkaora']*0.55):22);
+
+ $_korrekciosSzam = $napszam/5; // HETI öt nap
+
+ $sum = 0;
+ $SUM = array();
+ echo '<tr>';
+ echo '<th><a href="'.href('index.php?page=naplo&sub=haladasi&f=haladasi&tanarId='.$tanarId).'">'.$tanarNev.'</a></th>';
+ foreach ($T as $_munkaido => $Tipus) {
+ for ($i = 0; $i < count($Tipus); $i++) {
+ echo '<td class="'.ekezettelen($Tipus[$i]).' '.ekezettelen($_munkaido).'">';
+
+
+ echo '<span title="';
+ echo intval($ADAT['detailed'][$tanarId][$Tipus[$i]]['lekötött']).'+';
+ echo intval($ADAT['detailed'][$tanarId][$Tipus[$i]]['fennmaradó']).'=';
+ echo '">';
+ if ($Tipus[$i]=='helyettesítés') {
+ echo $_c = ($ADAT['detailed'][$tanarId][$Tipus[$i]][$_munkaido]);
+ } elseif ($Tipus[$i]=='egyéb') {
+ dump($ADAT['detailed_ki_tipus_munkaido_eredet'][$tanarId]);
+ } else {
+ echo $_c = $ADAT[$tanarId][$Tipus[$i]];
+ }
+ echo '</span>';//ezt mégsem így kéne
+ echo '</td>';
+ $SUM[$_munkaido] += $_c;
+ }
+ }
+ for ($i=0; $i<count($SumTipus); $i++) {
+ $sum += intval($ADAT[$tanarId][$SumTipus[$i]]);
+ }
+ echo '<th class="sum lekotott">'.$SUM['lekötött'].'</th>';
+ echo '<th class="sum fennmarado">'.$SUM['fennmaradó'].'</th>';
+ echo '<th class="sumsum">'.($SUM['lekötött']+$SUM['fennmaradó']).'</th>';
+
+
+ if ($_THM>0) $eff = @ceil(100*$sum/$_THM);
+ else $eff = 100;
+
+ if ($eff<=55) $_style = ' class="e1" ';
+ elseif ($eff<=65) $_style = ' class="e2" ';
+ elseif ($eff<=80) $_style = ' class="e3" ';
+ else $_style = ' class="e4" ';
+ //echo '<td '.$_style.'>'.$_THM*0.55.'</td>';
+ //echo '<td '.$_style.'>'.$_THM*0.65.'</td>';
+ //echo '<td '.$_style.'>'.$_THM*0.80.'</td>';
+ //echo '<td '.$_style.' title="'.$ADAT['tanarok'][$t]['hetiMunkaora'].'" >'.$_THM.'</th>';
+ echo '<td '.$_style.'>'.($_lekotottMin*$_korrekciosSzam).'</td>';
+ echo '<td '.$_style.'>'.($_lekotottMax*$_korrekciosSzam).'</td>';
+ echo '<td '.$_style.'>'.($_kotottMax*$_korrekciosSzam).'</td>';
+ echo '<td '.$_style.'>'.($_heti*$_korrekciosSzam).'</th>';
+
+ echo '<td>'.number_format($ADAT[$tanarId]['oraszam'],1).'</td>';
+
+ echo '</tr>'."\n";
+
+ }
+
+ echo '</tbody></table>'."\n";
+
+ }
+*/
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/haladasi/haladasi.phtml b/mayor-orig/www/skin/classic/module-naplo/html/haladasi/haladasi.phtml
new file mode 100644
index 00000000..5f958c54
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/haladasi/haladasi.phtml
@@ -0,0 +1,697 @@
+<?php
+/*
+ module: naplo
+
+ todo: függvény paraméterezések tisztítása (2010)
+
+ függőségek:
+
+ function putHaladasiBejegyzesek($data, $tankorId, $osztalyId, $tanarId, $title, $diakId, $order, $ADAT)
+ |- function putNap($dt, $dNap, $napInfo, $doga, $napInfo2)
+ |-function putHaladasiDolgozat
+ |-function putOra($dOra)
+ |- function putTankorNap($dt, $dNap, $doga, $order)
+ |-function putHaladasiDolgozat($dt,$doga)
+ |-function putTankorOra($dOra)
+ function putHetesForm($ADAT)
+
+*/
+##
+# Haladási naplo megjelenítése
+##
+
+ global $SZLO;
+
+ function putHaladasiBejegyzesek($ADAT) {
+
+ global $_TANEV,$SZLO;
+ // kompatibilitás miatt -- átnevezhetők
+ $title = $ADAT['title'];
+ $data = $ADAT['haladasi'];
+ $order = $ADAT['order'];
+ //..
+ $tankorId = $ADAT['tankorId'];
+ $osztalyId = $ADAT['osztalyId'];
+ $tanarId = $ADAT['tanarId'];
+ $diakId = $ADAT['diakId'];
+ $teremId = $ADAT['teremId'];
+
+ if ($ADAT['title']=='') return;
+
+ if ($tankorId!='') $AKTIV_TH['tankor'] = true;
+
+ $FORM = array('action'=>href('index.php?page=naplo&sub=haladasi&f=haladasi'), 'name'=>'haladasiOrabeiras', 'class'=>'onChangeRequest');
+ formBegin($FORM);
+ echo '<input type="hidden" name="igDt" value="'._SHOW_DAYS_TO.'" />'."\n";
+ echo '<input type="hidden" name="osztalyId" value="'.$osztalyId.'" />'."\n";
+ echo '<input type="hidden" name="diakId" value="'.$diakId.'" />'."\n";
+ echo '<input type="hidden" name="teremId" value="'.$teremId.'" />'."\n";
+ echo '<input type="hidden" name="tanarId" value="'.$tanarId.'" />'."\n";
+ echo '<input type="hidden" name="order" value="'.$order.'" />'."\n";
+ echo '<input type="hidden" name="action" value="haladasiNaploBeiras" />'."\n";
+ if ($tankorId != '') echo '<input type="hidden" name="tankorId" value="'.$tankorId.'" />'."\n";
+
+ echo '<table class="haladasiBejegyzesek" align="center" cellpadding="1" cellspacing="1">'."\n";
+
+ echo '<thead>'."\n";
+ echo '<tr>';
+ echo '<th>';
+ if ($ADAT['oraTerheles'][$ADAT['tanarId']]['ossz']['heti']>0) {
+ echo '<span class="icon-time"></span>';
+ echo ($ADAT['oraTerheles'][$ADAT['tanarId']]['ossz']['heti']);
+ }
+ echo '</th>';
+ echo '<th colspan="7" class="fejlec8">';
+ echo $title;
+ if ($tanarId!='') {
+ if ($ADAT['csakUres']==true) {
+ $_CHK = ' checked="checked" ';
+ $_ACTIVE = ' class="on" ';
+ $AKTIV_TH['tananyag'] = true;
+ }
+ echo ' <label for="csakUres" '.$_ACTIVE.'><span class="icon-bullhorn"></span></label>';
+ echo '<input type="checkbox" id="csakUres" name="csakUres" value="1" class="onChangeSubmit" '.$_CHK.' style="display:none;" />';
+ $AKTIV_TH['tanar'] = true;
+ }
+ echo '</th></tr>'."\n";
+ echo '<tr>';
+ echo '<th style="width:30px;">';
+ // ENTER esetén az első submit érvényes - ne a dátum gomb legyen
+ echo '<input type="submit" value="" class="rejtettGomb DOA" style="display:none;" />'."\n"; //⨁⍟☉
+ echo _ORA;
+ //echo '<input type="button" id="rejtMutat" name="orderInvert" value="'._ORA.' ⨁" class="rejtettGomb" tabindex="10" />'."\n";
+ //if ($order=='DESC') echo '<img src="skin/classic/module-naplo/img/fel.gif" alt="^" />'."\n";
+ //else echo '<img src="skin/classic/module-naplo/img/le.gif" alt="v" />'."\n";
+ echo '</th>';
+ echo '<th colspan="3">';
+ echo _TANKOR;
+ if ($AKTIV_TH['tankor']) echo '<span class="aktiv icon-bookmark"></span>';
+ echo '</th>';
+ echo '<th>';
+ echo _TANAR;
+ if ($AKTIV_TH['tanar']) echo '<span class="aktiv icon-bookmark"></span>';
+ echo '</th><th>'._ORASZAM.'</th>';
+ echo '<th style="width:45%">';
+ echo _TANANYAG;
+ if ($AKTIV_TH['tananyag']) echo '<span class="aktiv icon-bookmark"></span>';
+ echo '</th>';
+ echo '<th style="width:64px;">';
+ //if (_SHOW_DAYS_FROM > $_TANEV['kezdesDt']) echo '<input class="gomb" type="submit" name="lapoz1" value="<<" tabindex="7" />';
+ //if (_SHOW_DAYS_TO < date('Y-m-d')) echo '<input class="gomb" type="submit" name="lapoz1" value=">>" tabindex="8" />';
+ if (_SHOW_DAYS_FROM > $_TANEV['kezdesDt']) echo '<button class="gomb" type="submit" name="lapoz1" value="prevWeek" tabindex="7"><span class="icon-chevron-left"></span></button>';
+ if (_SHOW_DAYS_TO < date('Y-m-d')) echo '<button class="gomb" type="submit" name="lapoz1" value="nextWeek" tabindex="8"><span class="icon-chevron-right"></span></button>';
+ echo ' </th></tr>'."\n";
+ echo '</thead>'."\n";
+ echo '<tfoot>'."\n";
+ echo '<tr>';
+ echo '<th>';
+ if ($ADAT['oraTerheles'][$ADAT['tanarId']]['ossz']['heti']>0) {
+ echo '<span class="icon-time"></span>';
+ echo ($ADAT['oraTerheles'][$ADAT['tanarId']]['ossz']['heti']);
+ }
+ echo '</th>';
+ echo '<th colspan="7">';
+ // if (_SHOW_DAYS_FROM > $_TANEV['kezdesDt']) echo '<input class="gomb" type="submit" name="lapoz" value="<<" tabindex="5" />'."\n";
+ if (_SHOW_DAYS_FROM > $_TANEV['kezdesDt']) echo '<button class="gomb" type="submit" name="lapoz1" value="prevWeek" tabindex="7"><span class="icon-chevron-left"></span></button>';
+
+ echo ' '._IDOSZAK.': '.str_replace('-','.',_SHOW_DAYS_FROM) . '. - '. str_replace('-','.', _SHOW_DAYS_TO) .'. '."\n";
+ // if (_SHOW_DAYS_TO < date('Y-m-d')) echo '<input class="gomb" type="submit" name="lapoz" value=">>" tabindex="6" />'."\n";
+ if (_SHOW_DAYS_TO < date('Y-m-d')) echo '<button class="gomb" type="submit" name="lapoz1" value="nextWeek" tabindex="8"><span class="icon-chevron-right"></span></button>';
+
+ echo '</th></tr>'."\n";
+ echo '</tfoot>'."\n";
+
+ // -------------------------------
+ $toTime = strtotime(_SHOW_DAYS_TO);
+ $fromTime = strtotime(_SHOW_DAYS_FROM);
+
+ if ($order == 'ASC') {
+
+ for ($time = $fromTime; $time <= $toTime; $time = strtotime('1 day',$time)) {
+
+ $dt = date('Y-m-d',$time);
+ $count = count($data[$dt]);
+ if ($tankorId == '') {
+ putNap($dt, $data[$dt], $data['napok'][$dt], $data['dolgozatok'], $ADAT['tanitasiNap'][$dt]);
+ } elseif ($count > 0) {
+ putTankorNap($dt, $data[$dt], $data['dolgozatok'], $order);
+ } // kirakjuk-e a napot
+
+ } // for $dt
+ } else {
+
+ for ($time = $toTime; $time >= $fromTime; $time = strtotime('-1 day',$time)) {
+
+ $dt = date('Y-m-d',$time);
+ $count = count($data[$dt]);
+
+ if ($tankorId == '') {
+ putNap($dt, $data[$dt], $data['napok'][$dt], $data['dolgozatok'], $ADAT['tanitasiNap'][$dt]);
+ } elseif ($count > 0) {
+ putTankorNap($dt, $data[$dt], $data['dolgozatok'], $order);
+ } // kirakjuk-e a napot
+
+ } // for $dt
+ }
+ // ---------------------------------
+
+ echo '</table>'."\n";
+
+ formEnd();
+
+ }
+
+
+ function putNap($dt, $dNap, $napInfos, $doga, $napInfo2) {
+
+ global $ADAT;
+ global $aHetNapjai;
+
+ $time = strtotime($dt);
+ $count = count($dNap);
+
+ $tipus = $orarendiHet = $megjegyzes = array();
+ if (is_array($napInfos)) foreach ($napInfos as $ni) {
+ if (!in_array($ni['tipus'], $tipus)) $tipus[] = $ni['tipus'];
+ if ($ni['orarendiHet'] != 0 && !in_array($ni['orarendiHet'], $orarendiHet)) $orarendiHet[] = $ni['orarendiHet'];
+ if ($ni['megjegyzes'] != '' && !in_array($ni['megjegyzes'], $megjegyzes)) $megjegyzes[] = $ni['megjegyzes'];
+ }
+ $tanitasiNap = false;
+ if (in_array('tanítási nap', $tipus) || in_array('speciális tanítási nap', $tipus)) {
+ if (date('w',$time) % 2 == 0) echo '<tbody class="parosNap">'."\n";
+ else echo '<tbody class="paratlanNap">'."\n";
+ $tanitasiNap = true;
+ } elseif (in_array('tanítás nélküli munkanap', $tipus)) {
+ echo '<tbody class="tanitasNelkul">'."\n";
+ } elseif (in_array('szorgalmi időszakon kívüli munkanap', $tipus)) {
+ echo '<tbody class="szorgalmiIdoszakonKivul">'."\n";
+ } else {
+ echo '<tbody class="szunet">'."\n";
+ }
+/*
+ if ($napInfo['tipus'] == 'tanítási szünet') echo '<tbody class="szunet">'."\n";
+ elseif ($napInfo['típus'] == 'tanítás nélküli munkanap') echo '<tbody class="tanitasNelkul">'."\n";
+ elseif (date('w',$time) % 2 == 0) echo '<tbody class="parosNap">'."\n";
+ else echo '<tbody class="paratlanNap">'."\n";
+<button type="button" name="orderInvert" value="" class="rejtMutat" tabindex="10">
+
+*/
+ echo '<tr>';
+ echo '<th class="nap">';
+ if (__PLUSZBEIRHAT===true) echo '<div class="icon-plus-sign rejtMutat"></div>';
+ echo '</th>'."\n";
+ // Az első cella a dátum/nap
+ echo '<th colspan="7" class="nap">';
+ echo str_replace('-','.',$dt) .'. '. $aHetNapjai[(date('w',$time)+6)%7];
+ if ($napInfo2['napszam']!='' || $napInfo['orarendiHet'] != 0) {
+ echo ' (';
+ // if ($napInfo2['napszam']!='') {
+ if ($tanitasiNap) {
+ echo $napInfo2['napszam'] . '. ' . _TANITASI_NAP;
+ if ($napInfo['orarendiHet'] != 0) echo '/';
+ }
+ // if ($napInfo['orarendiHet'] != 0) echo $napInfo['orarendiHet'] . '. '. _HET;
+ if (count($orarendiHet) > 0) echo ' - '.implode('./',$orarendiHet).'. '._HET;
+ // if ($napInfo['megjegyzes'] != '') echo ' - '.$napInfo['megjegyzes'];
+ if (count($megjegyzes) > 0) echo ' - '.implode('/', $megjegyzes);
+ echo ')';
+ } else {
+ echo '<br/>'.implode(' ',$tipus);
+ }
+ echo '</th>';
+ echo '</tr>';
+ putHaladasiDolgozat($dt,$doga);
+
+ $o=0; // MINORA
+ if ($count > 0) {
+ for ($i=0; $i<$count; $i++) {
+ if (__PLUSZBEIRHAT===true && intval($dNap[$i]['ora'])>=$o) {
+ while ($o < intval($dNap[$i]['ora'])) {
+// if (__PLUSZBEIRHAT===true) {
+ putUjOra(array('dt'=>$dt, 'ora'=>$o++));
+// }
+ }
+ }
+ if ($dNap[$i]['ki']!=$ADAT['tanarId'] && __PLUSZBEIRHAT===true) putUjOra(array('dt'=>$dt, 'ora'=>$o, 'class'));
+ putOra($dNap[$i]);
+ $o=intval($dNap[$i]['ora'])+1;
+ } // órák kiírása
+ for($j=intval($dNap[$i-1]['ora'])+1; $j<=$ADAT['maxOra']; $j++) {
+ if (__PLUSZBEIRHAT===true) putUjOra(array('dt'=>$dt, 'ora'=>$j));
+ }
+ } else {
+ echo '<tr><th colspan="8" class="nincsOra">'._NINCS_ORAJA.'</th></tr>';
+// if ($tanitasiNap && strtotime(date('Y-m-d'))>=strtotime($dt)) {
+// if (
+// (strtotime(date('Y-m-d'))>=strtotime($dt)
+// || ((__NAPLOADMIN===true || __VEZETOSEG===true))
+// )) {
+ for($j=1; $j<=$ADAT['maxOra']; $j++) {
+ if (__PLUSZBEIRHAT===true) putUjOra(array('dt'=>$dt, 'ora'=>$j));
+ }
+
+// }
+ }
+
+ echo '</tbody>'."\n";
+
+ }
+
+
+ function putTankorNap($dt, $dNap, $doga, $order) {
+
+ $time = strtotime($dt);
+ $count = count($dNap);
+
+ if (date('w',$time) % 2 == 0) echo '<tbody class="parosNap">'."\n";
+ else echo '<tbody class="paratlanNap">'."\n";
+
+ putHaladasiDolgozat($dt,$doga);
+
+ for ($i=0; $i<$count; $i++) {
+ if ($order == 'DESC') putTankorOra($dNap[$count-$i-1]);
+ else putTankorOra($dNap[$i]);
+ } // órák kiírása
+
+ echo '</tbody>'."\n";
+
+ }
+
+
+ function putHaladasiDolgozat($dt,$doga) {
+
+ for ($i=0;$i<count($doga['tervezett'][$dt]);$i++) {
+ $did = $doga['tervezett'][$dt][$i];
+ echo '<tr>';
+ echo '<td colspan="8" class="dolgozat">';
+ $href = href('index.php?page=naplo&sub=osztalyozo&f=dolgozat&dolgozatId='.$did);
+ echo '<a href="'.$href.'">';
+ echo _BEJELENTETT_DOLGOZAT . ': '. $doga[$did]['dolgozatNev'];
+ echo ' (' ;
+ for ($j=0;$j<count($doga[$did]['tankor']);$j++) {
+ if ($j != 0) echo ', ';
+ echo $doga[$did]['tankor'][$j]['tankorNev'];
+ }
+ echo ')';
+ echo '</a>';
+ echo '</td>';
+ echo '</tr>'."\n";
+ }
+
+ }
+
+ function putUjOra($dOra) {
+
+ global $ADAT; // --FIXME
+
+ if (__TANAR !==true && __VEZETOSEG!==true && __NAPLOADMIN !== true) return false;
+ if (__NAPLOADMIN ===true || __VEZETOSEG===true) {
+ $_eredet='órarend';
+ if (__PLUSZBEIRHAT!==true
+ || strtotime($dOra['dt'])>strtotime("+1week")
+ || (strtotime(_ZARAS_HATARIDO)>strtotime($dOra['dt']))
+ // Ha már a haladási naplót írhatja, akkor a plusz órát is engedjük meg...
+ // || (__TANAR ===true && strtotime(_HALADASI_HATARIDO)>strtotime($dOra['dt']))
+ ) return false;
+ } else {
+ $_eredet='plusz';
+ if (__PLUSZBEIRHAT!==true
+ || strtotime($dOra['dt'])>time()
+ || (__TANAR ===true && strtotime(_HALADASI_HATARIDO)>strtotime($dOra['dt']))
+ ) {
+ return false;
+ }
+ }
+
+ $_tipus='egyéb';
+
+ echo '<tr class="ujOra" style="display:none">';
+ echo '<th class="ora">';
+ echo $dOra['ora'].'.';
+ echo '</th>'."\n";
+ echo '<td class="t">';
+ echo '<select class="DOA" name="UJORA[]" style="width:90%">';
+ echo '<option value="">'._FELADAT_TIPUS.'</option>';
+ if (is_array($ADAT['feladatTipus'])) foreach($ADAT['feladatTipus'] as $feladatTipusId=>$_D) {
+ echo '<option value="'.$dOra['dt'].'_'.$dOra['ora'].'_'.$_tipus.'_'.$_D['feladatTipusId'].'">'.$_D['feladatTipusLeiras'].' ('.$_D['feladatTipusId'].')</option>';
+ }
+ echo '</select>';
+ //echo $ADAT['feladatTipus'][$dOra['feladatTipusId']]['feladatTipusLeiras'].' ('.$dOra['eredet'].')';
+ echo '<input type="submit" value="'._OK.'" class="gomb DOA" />';
+ echo '</td>'."\n";
+ echo '<td class="mg">';
+ echo '</td>';
+ echo '<td class="mg">';
+ echo '</td>'."\n";
+ // ----- Tanár(ok) -------------------------------
+ echo '<td class="t">';
+ echo '</td>'."\n";
+ echo '<td class="mg">';
+ echo '</td>'."\n";
+ // ----- Leírás ---------------------------------
+ echo '<td>'; // két lépcsőben
+ echo '</td>'."\n";
+
+ // ----- Hiányzók -------------------------------
+ echo '<td>';
+ echo '</td>'."\n";
+
+ echo '</tr>'."\n";
+
+
+ }
+
+
+
+ function putOra($dOra) {
+
+ global $ADAT,$SZLO;
+ if ( $ADAT['tankorTipusok'][$dOra['tankorTipusId']]['jelleg']=='osztályfüggetlen' && ($ADAT['haladasiTipus']=='osztalyHaladasi' || $ADAT['haladasiTipus']=='diakHaladasi')) return false;
+ $modosithatoOra = modosithatoOra($dOra);
+// $torolhetoOra = torolhetoOra($dOra);
+ if (!in_array($dOra['tipus'],array('normál','normál máskor'))) {
+ if ($dOra['tipus'] == 'összevonás') $tipus = 'Ö';
+ else $tipus = nagybetus(substr($dOra['tipus'],0,1));
+ if ($dOra['tipus'] == 'egyéb') $tr_class = ' class="egyeb '.$dOra['eredet'].'"';
+ else $tr_class = ' class="helyettesit"';
+ } else {
+ $tipus = '';
+ $tr_class = '';
+ }
+ $tr_id = (intval($dOra['oraId'])>0 ? ' id="ORAID_'.$dOra['oraId'].'"':'');
+
+ echo '<tr'.$tr_class.$tr_id.'>';
+
+ // ----- óra ----------------------------------
+ echo '<td class="ora oraAdat"'.' data-oraid="'.$dOra['oraId'].'">';
+ echo $dOra['ora'].'.';
+/* if ( __NAPLOADMIN===true) {
+ echo '<a style="display:inline" href="'.href('index.php?page=naplo&sub=haladasi&f=ora&oraId='.$dOra['oraId']).'" class="onClickUpdateWindow" title="'.$dOra['ora'].'. '._ORA.' '._BEALLITASAI.'">';
+ echo '≡'; //≡☰
+ echo '</a>';
+ }
+*/ if ( __NAPLOADMIN===true || __DIAK === true ) {
+// echo '<a href="'.href('index.php?page=naplo&sub=haladasi&f=tankor&tankorId='.$dOra['tankorId']).'"
+// class="onClickUpdateWindow tankorStat icon-graph" title="A tankör statisztikái">';
+// //echo ; //≡☰
+// echo '</a>';
+
+// echo '<span class="oraAdat icon-bullhorn" data-oraid="'.$dOra['oraId'].'"></span>';
+ }
+
+ echo '</td>'."\n";
+
+ // ----- Tankör -------------------------------
+ echo '<td class="t">';
+ // -------------------------------------------------------------------------
+ // Csoportok kezelése - Váltható tankörök (egy csoportba és egy tanárhoz tartozó tankörök
+ // FeladatTípus kezelése
+ // -------------------------------------------------------------------------
+ if (
+ in_array($dOra['tipus'],array('normál','normál máskor')) // helyettesített óra esetén ne lehessen váltani - bár kirakná a selectet jól...
+ && is_array($dOra['csoport']) && count($dOra['csoport'])>1
+ && $modosithatoOra
+ ) {
+
+ echo '<select name="M_'.$dOra['oraId'].'">';
+ for ($t = 0; $t < count($dOra['csoport']); $t++) {
+ if ($dOra['tankorId'] == $dOra['csoport'][$t]['tankorId']) $__SEL = ' selected="selected" ';
+ else $__SEL = '';
+ echo '<option value="'.$dOra['csoportId'].':'.$dOra['csoport'][$t]['tankorId'].'" '.$__SEL.'>';
+ echo $dOra['csoport'][$t]['tankorNev'];
+ echo '</option>';
+ }
+ // Ha egy másik tanár helyettesít, akinek vannak órái ugyanabból a tankör csoportból - akkor a jelenlegi tankorId nincs a select-ben még!
+ if ($__SEL == '') echo '<option value="'.$dOra['csoportId'].':'.$dOra['tankorId'].' selected="selected">'.$dOra['tankorNev'].'</option>';
+ echo '</select>';
+ // ugyanakkor js-ből meg kellene változtatni a tankorId paramétert...
+ echo '<a style="display:inline" href="'.href('index.php?page=naplo&sub=haladasi&f=haladasi&tankorId='.$dOra['tankorId']).'" class="onClickUpdateWindow" title="'.$dOra['tankorNev'].' '._TANKOR_HALADASI.'">';
+ echo '☰'; //≡
+ echo '</a>';
+
+ } elseif ($dOra['tipus']=='egyéb') {
+ /*for ($t = 0; $t<count($ADAT['feladatTipus']); $t++) {
+ $_D = $ADAT['feladatTipus'][$t];
+ $_SEL = ($_D['feladatTipusId'] == $dOra['feladatTipusId']) ? ' selected="selected" ':'';
+ }*/
+ echo $ADAT['feladatTipus'][$dOra['feladatTipusId']]['feladatTipusLeiras'].' ('.$dOra['eredet'].')';
+ } else { // nincs választási lehetőség, vagy a módosítási határidő lejárt
+ echo '<a href="'.href('index.php?page=naplo&sub=haladasi&f=haladasi&tankorId='.$dOra['tankorId']).'" class="onClickUpdateWindow" title="'.$dOra['tankorNev'].' '._TANKOR_HALADASI.'">';
+ echo $dOra['tankorNev'];
+ echo '</a>';
+ }
+ echo '<input type="hidden" name="tanmenetIdContainer[]" value="'.$ADAT['tankorTanmenet'][ $dOra['tankorId'] ].'" />'."\n";
+ echo '<input type="hidden" name="tankorIdContainer[]" value="'.$dOra['tankorId'].'" />'."\n";
+ // -------------------------------------------------------------------------
+ echo '</td>'."\n";
+ echo '<td class="mg">';
+ if ($dOra['tipus']=='egyéb' && (__VEZETOSEG===true || __NAPLOADMIN === true)) {
+ echo '<select name="TEREMVALT[]" class="teremvalt">';
+ echo '<option value="">'.$ADAT['terem'][$dOra['teremId']]['leiras'].'</option>';
+ for ($t=0; $t<count($ADAT['szabadTermek'][$dOra['dt']][$dOra['ora']]); $t++) {
+ $_T = $ADAT['szabadTermek'][$dOra['dt']][$dOra['ora']][$t];
+ echo '<option value="'.$dOra['oraId'].'_'.$_T.'" '.$_SEL.'>'.$ADAT['terem'][$_T]['leiras'].'</option>';
+ }
+ echo '</select>';
+ } else {
+ echo '<a style="display:inline" href="'.href('index.php?page=naplo&sub=orarend&f=orarend&teremId='.$dOra['teremId'].'&dt='.$dOra['dt']).'" class="onClickUpdateWindow" title="'.$dOra['teremId'].'">';
+ echo $ADAT['terem'][$dOra['teremId']]['leiras'];
+ echo '</a>';
+ }
+ echo '</td>';
+ echo '<td class="mg">';
+ echo $tipus;
+ if (isset($ADAT['oraLatogatasok'][$dOra['oraId']])) {
+ echo '<span class="latogatott" title="';
+ if (is_array($ADAT['oraLatogatasok'][$dOra['oraId']]['tanarNevek'])) echo implode(', ',$ADAT['oraLatogatasok'][$dOra['oraId']]['tanarNevek']);
+ echo '">L</span>';
+ }
+ echo '</td>'."\n";
+
+
+ // ----- Tanár(ok) -------------------------------
+ echo '<td class="t tanarNev" data-tanarid="'.$dOra['ki'].'">';
+ // Ha egy normál órának több tanára is van, és módosítható az óra, akkor lehet választani a tanárok közül
+ if (count($dOra['tanar']) > 1 && in_array($dOra['tipus'],array('normál','normál máskor')) && $modosithatoOra) {
+ $_SEL = array($dOra['ki'] => 'selected="selected" ');
+ if ($dOra['ki']!=$tanarId) $_masTartja=true;
+ echo '<select name="K_'.$dOra['oraId'].'">'."\n";
+ for ($t = 0; $t < count($dOra['tanar']); $t++) {
+ echo '<option value="'.$dOra['tanar'][$t]['tanarId'].'" '.$_SEL[$dOra['tanar'][$t]['tanarId']].'>';
+ echo $dOra['tanar'][$t]['tanarNev'];
+ echo '</option>'."\n";
+ }
+ echo '</select>';
+ } else {
+ echo $dOra['kiCn'];
+ }
+ echo '</td>'."\n";
+
+ echo '<td class="mg">';
+ if ($dOra['tipus']!='egyéb') {
+ echo '<a href="'.href('index.php?page=naplo&sub=tanmenet&f=tanmenetInfo&tanmenetId='.$ADAT['tankorTanmenet'][ $dOra['tankorId'] ]).'" class="onClickUpdateWindow" title="'._TANMENET.'">';
+ echo $dOra['oraszam'];
+ echo '</a>';
+ } else { // itt kiírhatjuk a heti terhelését
+ //echo '<span style="color: purple;" title="a típusból ezen a héten összesen">eheti:'.($ADAT['oraTerheles'][$dOra['feladatTipusId']]['db']-$SZLO[$dOra['feladatTipusId']])."/".($ADAT['oraTerheles'][$dOra['feladatTipusId']]['db']).'</span>';
+ //echo '<span style="color: purple;" title="a típusból ezen a héten összesen">eheti:'.($SZLO['sum']-$SZLO['sum_c'])."/".($SZLO['sum']).'</span>';
+ $SZLO[$dOra['feladatTipusId']]++;
+ $SZLO['sum_c']++;
+ }
+ echo '</td>'."\n";
+
+ // ----- Leírás ---------------------------------
+ if ($modosithatoOra) {
+ echo '<td class="l">';
+ if ($dOra['leiras']!='') { // beírva
+ echo '<input type="text" tabindex="1" name="L_'.($dOra['oraId']).'" class="data beirva" size="30" value="'.htmlspecialchars($dOra['leiras']).'" />';
+ echo '<span class="INFO" id="B_'.($dOra['oraId']).'"></span>';
+ echo '<input type="submit" class="gomb DOA" value="'._OK.'" tabindex="" />';
+ } else {
+ echo '<input type="text" tabindex="1" name="L_'.($dOra['oraId']).'" class="data" size="30" value="'.htmlspecialchars($dOra['leiras']).'" />';
+ echo '<span class="INFO" id="B_'.($dOra['oraId']).'">✓</span>';
+ echo '<input type="submit" class="gomb DOA" value="'._ROGZIT.'" tabindex="" />';
+ }
+ echo '<input type="hidden" name="oraId[]" value="'.$dOra['oraId'].'" />';
+ //echo '<span type="text" class="INFO" style="display:none;" id="B_'.($dOra['oraId']).'">√</span>';
+ } else {
+ if ($dOra['leiras']!='') {
+ echo '<td>'.$dOra['leiras'];
+ } else {
+ echo '<td class="nincsBeirva">'._NINCS_BEIRVA;
+ }
+ }
+ echo '</td>'."\n";
+
+ // ----- Hiányzók -------------------------------
+ echo '<td>';
+ if ($dOra['tipus']=='egyéb') {
+ if ($modosithatoOra === true) {
+ echo '<div style="text-align: center;">';
+ echo '<input type="checkbox" class="torol" name="ORATOROL[]" value="'.$dOra['oraId'].'" />';
+ echo '<span class="oraTorol">'._TOROL.'</span>';
+ echo '</div>';
+ }
+ } else {
+ if ( __DIAK) {
+ $href = href('index.php?page=naplo&sub=hianyzas&f=diak&dt='.$dOra['dt'].'&diakId='.$diakId);
+ } else {
+ $href = href('index.php?page=naplo&sub=hianyzas&f=ora&oraId='.$dOra['oraId']);
+ }
+ //2014? echo '<a href="'.$href.'" tabindex="200" class="onClickUpdateWindow">';
+ echo '<a href="'.$href.'" tabindex="200" class="h" >';
+ echo _HIANYZOK;
+ echo '</a>';
+ }
+ echo '</td>'."\n";
+
+ echo '</tr>'."\n";
+
+ if ( // helyettesített kolléga írhasson be plusz órát (saját óráját helyettesítették, hogy ő felvételi dolgozatokat mutogathasson pl.)
+ __PLUSZBEIRHAT===true
+ && in_array($dOra['tipus'], array('helyettesítés','felügyelet'))
+ && $dOra['ki'] != $ADAT['tanarId']
+ )
+ putUjOra(array('dt'=>$dOra['dt'], 'ora'=>$dOra['ora']));
+
+ }
+
+
+ function putTankorOra($dOra) {
+
+ global $aHetNapjai;
+ $modosithatoOra = modosithatoOra($dOra);
+ if (!in_array($dOra['tipus'],array('normál','normál máskor'))) {
+// if (substr($dOra['tipus'],0,6) != 'normál') {
+ $tipus = nagybetus(substr($dOra['tipus'],0,1));
+ $tr_class = ' class="helyettesit"';
+ } else {
+ $tipus = '';
+ $tr_class = '';
+ }
+
+ echo '<tr'.$tr_class.'>';
+ // ----- óra ----------------------------------
+ echo '<td class="ora">';
+ echo str_replace('-','.',$dOra['dt']) .'. '. $aHetNapjai[(date('w',strtotime($dOra['dt']))+6)%7].' ';
+ echo $dOra['ora'].'.';
+ echo '</td>'."\n";
+
+ // ----- Tankör -------------------------------
+ echo '<td>';
+ // -------------------------------------------------------------------------
+ // Csoportok kezelése - Váltható tankörök (egy csoportba és egy tanárhoz tartozó tankörök
+ // -------------------------------------------------------------------------
+ if (
+ in_array($dOra['tipus'],array('normál','normál máskor')) // helyettesített óra esetén ne lehessen váltani - bár kirakná a selectet jól...
+ && is_array($dOra['csoport']) && count($dOra['csoport']) > 1
+ && $modosithatoOra
+ ) {
+ echo '<select name="M_'.$dOra['oraId'].'">';
+ for ($t = 0; $t < count($dOra['csoport']); $t++) {
+ if ($dOra['tankorId'] == $dOra['csoport'][$t]['tankorId']) $__SEL = ' selected="selected" ';
+ else $__SEL = '';
+ // !?! A másik függvényben a csoportId-t is átadjuk - nem hiba???
+ echo '<option value="'.$dOra['csoport'][$t]['tankorId'].'" '.$__SEL.'>';
+ echo $dOra['csoport'][$t]['tankorNev'];
+ echo '</option>';
+ }
+ echo '</select>';
+ // Ha egy másik tanár helyettesít, akinek vannak órái ugyanabból a tankör csoportból - akkor a jelenlegi tankorId nincs a select-ben még!
+ // !?! A másik függvényben a csoportId-t is átadjuk - nem hiba???
+ if ($__SEL == '') echo '<option value="'.$dOra['tankorId'].' selected="selected">'.$dOra['tankorNev'].'</option>';
+ } else { // nincs választási lehetőség, vagy a módosítási határidő lejárt
+ echo '<span class="tankorAdat" data-tankorid="'.$dOra['tankorId'].'">'.$dOra['tankorNev'].'</span>';
+ }
+ // -------------------------------------------------------------------------
+ echo '</td>'."\n";
+
+ //echo '<td>';
+ //echo $ADAT['terem'][$dOra['teremId']]['leiras'];
+ //echo '</td>'."\n";
+ echo '<td colspan="2">';
+ echo $tipus;
+ echo '</td>'."\n";
+
+
+ // ----- Tanör(ok) -------------------------------
+ echo '<td>';
+ // Ha egy normál órának több tanára is van, és módosítható az óra, akkor lehet választani a tanárok közül
+ if (count($dOra['tanár']['id']) > 1 and $modosithatoOra) {
+ $_SEL = array($dOra['kiId'] => 'selected="selected" ');
+ echo '<select name="K_'.$dOra['oraId'].'">'."\n";
+ for ($t=0;$t<count($dOra['tanár']['id']);$t++) {
+ echo '<option value="'.$dOra['tanár']['id'][$t].'" '.$_SEL[$dOra['tanár']['id'][$t]].'>';
+ echo $dOra['tanár'][$dOra['tanár']['id'][$t]]['cn'];
+ echo '</option>'."\n";
+ }
+ echo '</select>';
+ } else {
+ echo '<span class="tanarNev" data-tanarid="'.$dOra['ki'].'">'.$dOra['kiCn'].'</span>';
+ }
+ echo '</td>'."\n";
+
+ echo '<td>';
+ echo $dOra['oraszam'];
+ echo '</td>'."\n";
+
+ // ----- Leíráás ---------------------------------
+ if ($modosithatoOra) {
+ echo '<td>';
+ if ($dOra['leiras']!='') { // beírva
+ echo '<input type="text" tabindex="1" name="L_'.($dOra['oraId']).'" class="data beirva" size="30" value="'.htmlspecialchars($dOra['leiras']).'" />';
+ echo '<input type="submit" class="gomb DOA" value="'._MODOSIT.'" />';
+ } else {
+ echo '<input type="text" tabindex="1" name="L_'.($dOra['oraId']).'" class="data" size="30" value="'.htmlspecialchars($dOra['leiras']).'" />';
+ echo '<input type="submit" class="gomb DOA" value="'._ROGZIT.'" />';
+ }
+ echo '<input type="hidden" name="oraId[]" value="'.$dOra['oraId'].'" />';
+ } else {
+ if ($dOra['leiras']!='') {
+ echo '<td>'.$dOra['leiras'];
+ } else {
+ echo '<td>'._NINCS_BEIRVA;
+ }
+ }
+ echo '</td>'."\n";
+ // ----- Hiányzók -------------------------------
+ echo '<td>';
+ if ( __DIAK) {
+ $href = href('index.php?page=naplo&sub=hianyzas&f=diak&dt='.$dOra['dt'].'&diakId='.$diakId);
+ } else {
+ $href = href('index.php?page=naplo&sub=hianyzas&f=ora&oraId='.$dOra['oraId']);
+ }
+ echo '<a href="'.$href.'">';
+ echo _HIANYZOK;
+ echo '</a>';
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+ }
+
+ function putHetesForm($ADAT) {
+
+ formBegin(array('class'=>'hetes'));
+ echo '<input type="hidden" name="igDt" value="'._SHOW_DAYS_TO.'" />'."\n";
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalyId'].'" />'."\n";
+ echo '<input type="hidden" name="dt" value="'._SHOW_DAYS_FROM.'" />'."\n";
+// echo '<input type="hidden" name="order" value="'.$order.'" />'."\n";
+ echo '<input type="hidden" name="action" value="hetesFelvetel" />'."\n";
+
+ echo '<span>'._HETESEK.'</span>';
+ for ($k = 1; $k < 3; $k++) {
+ $SEL = array($ADAT['hetesek'][$k]['diakId'] => ' selected="selected" ');
+ echo '<select name="hetes'.$k.'">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ for ($i = 0; $i < count($ADAT['diakok']); $i++) {
+ echo '<option value="'.$ADAT['diakok'][$i]['diakId'].'"'.$SEL[ $ADAT['diakok'][$i]['diakId'] ].'>'.$ADAT['diakok'][$i]['diakNev'].'</option>'."\n";
+ }
+ echo '</select>'."\n";
+ }
+
+ echo '<input type="submit" value="'._OK.'" />'."\n";
+
+ formEnd();
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/haladasi/helyettesites.phtml b/mayor-orig/www/skin/classic/module-naplo/html/haladasi/helyettesites.phtml
new file mode 100644
index 00000000..1effc9e1
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/haladasi/helyettesites.phtml
@@ -0,0 +1,696 @@
+<?php
+/*
+ Module: naplo
+*/
+
+ function putHianyzoTanarForm($Tanarok, $Hianyzok, $dt) {
+
+ formBegin(array('class'=>'helyettesites'));
+ echo '<input type="hidden" name="action" value="hianyzoModositas" />'."\n";
+ echo '<input type="hidden" name="dt" value="'.$dt.'" />'."\n";
+
+ echo '<table align="center" class="tanarForm" cellspacing="1" cellpadding="1" >'."\n";
+
+ echo '<tr>';
+ echo '<th>'._JELENLEVO_TANAROK.'</th>';
+ echo '<th>'._HIANYZO_TANAROK.'</th>';
+ echo '</tr>'."\n";
+
+ echo '<tr>'."\n";
+ echo '<td>'."\n";
+ echo '<select name="addHianyzo[]" id="ah" multiple="multiple">'."\n";
+
+ for ($i = 0;$i < count($Tanarok['tanarIds']); $i++) {
+
+ $tanarId = $Tanarok['tanarIds'][$i];
+ $tanarNev = $Tanarok[$tanarId]['tanarNev']." (".$tanarId.")";
+
+ if (!in_array($tanarId,$Hianyzok)) echo '<option value="'.$tanarId.'"'.$SEL.'>'.$tanarNev.'</option>'."\n";
+
+ }
+
+ echo '</select>'."\n";
+ echo '</td>'."\n";
+ echo '<td>'."\n";
+ echo '<select name="delHianyzo[]" id="dh" multiple="multiple">'."\n";
+
+ for ($i = 0;$i < count($Tanarok['tanarIds']); $i++) {
+
+ $tanarId = $Tanarok['tanarIds'][$i];
+ $tanarNev = $Tanarok[$tanarId]['tanarNev'];
+
+ if (in_array($tanarId,$Hianyzok)) echo '<option value="'.$tanarId.'"'.$SEL.'>'.$tanarNev.'</option>'."\n";
+
+ }
+
+ echo '</select>'."\n";
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+ echo '<tr>';
+ echo '<th colspan="2">';
+ echo '<input type="submit" value="'._OK.'" />';
+// Ez ugye nem kell? // echo '<input type="reset" value="'._VISSZAALLIT.'" />';
+ echo '</th>';
+ echo '</tr>'."\n";
+
+ echo '</table>'."\n";
+ formEnd();
+ flush();
+ }
+
+
+
+ function putHianyzoOrak($HELYETTESITES, $dt) {
+ for ($i = 0; $i < count($HELYETTESITES['helyettesites']['tanarIds']);$i++) {
+ $tanarId = $HELYETTESITES['helyettesites']['tanarIds'][$i];
+ $tanarNev = $HELYETTESITES['tanarok'][$tanarId]['tanarNev'];
+ $tanarOrak = $HELYETTESITES['helyettesites'][$tanarId]['orak'];
+ putTanarHianyzoOrak($tanarId, $tanarNev, $tanarOrak, $HELYETTESITES['tanarok'], $dt, $HELYETTESITES);
+ flush();
+ }
+ }
+
+ function putTanarHianyzoOrak($tanarId, $tanarNev, $tanarOrak, $Tanarok, $dt, $ADAT=array()) { // az ADAT az általános...(2013)
+
+ formBegin();
+ echo '<input type="hidden" name="action" value="helyettesitesRogzitese" />'."\n";
+ echo '<input type="hidden" name="kit" value="'.$tanarId.'" />'."\n";
+ echo '<input type="hidden" name="dt" value="'.$dt.'" />'."\n";
+
+ echo '<table class="hianyzoTanar" cellspacing="1" cellpadding="1" align="center">'."\n";
+
+ echo '<thead><tr>'."\n";
+ echo '<th colspan="6">'.$tanarNev.'</th>'."\n";
+ echo '</tr></thead>'."\n";
+ echo '<tfoot><tr>'."\n";
+ echo '<th colspan="6">'."\n";
+ echo '<input type="submit" value="'._OK.'" />'."\n";
+ echo '</th>'."\n";
+ echo '</tr></tfoot>'."\n";
+
+ echo '<tbody>'."\n";
+ for ($i = 0; $i < count($tanarOrak); $i++) {
+
+ $SELECT = sulyKiszamitas($tanarOrak[$i], $Tanarok);
+
+ if (substr($tanarOrak[$i]['tipus'],0,7) == 'elmarad') echo '<tr class="elmarad">'."\n";
+ else echo '<tr>'."\n";
+
+ echo '<td>'."\n";
+ echo $_ora = $tanarOrak[$i]['ora'].'. '._ORA;
+ echo '</td>'."\n";
+
+ echo '<td>';
+ echo $tanarOrak[$i]['tankorNev'];
+ echo '</td>'."\n";
+
+ echo '<td>';
+ if ($ADAT['termek'][$tanarOrak[$i]['teremId']]['leiras']!='') {
+ echo $ADAT['termek'][$tanarOrak[$i]['teremId']]['leiras'];
+ echo ' <span class="teremId">('.$tanarOrak[$i]['teremId'].')</span>';
+ }
+ echo '</td>'."\n";
+
+ echo '<td>';
+ if ($tanarOrak[$i]['ki']!='') {
+ $_ki_txt = ' terhelés:';
+ $_ki_txt .= ' '.$ADAT['tanarTerheles'][ $tanarOrak[$i]['ki'] ]['lekotott']['heti'];
+ $_ki_txt .= ' '.$ADAT['tanarTerheles'][ $tanarOrak[$i]['ki'] ]['kotottEloirt']['heti'];
+ $_ki_txt .= ' '.$ADAT['tanarTerheles'][ $tanarOrak[$i]['ki']]['kotott']['heti'];
+ } else $_ki_txt = '';
+ echo '<select name="T[]">'."\n";
+
+ // A jelenlegi állapot kiírása --> value='' --> Nem módosítja
+ if ($tanarOrak[$i]['eredet'] == 'órarend') {
+ if ($tanarOrak[$i]['tipus'] == 'normál') $txt = 'megtartva';
+ elseif ($tanarOrak[$i]['tipus'] == 'felügyelet') $txt = $Tanarok[$tanarOrak[$i]['ki']]['tanarNev'].' (felügyelet)';
+ elseif ($tanarOrak[$i]['tipus'] == 'összevonás') $txt = $Tanarok[$tanarOrak[$i]['ki']]['tanarNev'].' (összevonás)';
+ elseif ($tanarOrak[$i]['tipus'] == 'helyettesítés') $txt = $Tanarok[$tanarOrak[$i]['ki']]['tanarNev'].' (helyettesítés)';
+ elseif ($tanarOrak[$i]['tipus'] == 'elmarad máskor') $txt = 'máskor megtartva';
+ elseif ($tanarOrak[$i]['tipus'] == 'elmarad') $txt = 'elmarad';
+ elseif ($tanarOrak[$i]['tipus'] == 'egyéb') $txt = 'egyéb feladat (kiírt)';
+ else $txt = 'ismeretlen típus!!!!!!!';
+ } elseif ($tanarOrak[$i]['eredet'] == 'plusz') {
+ if ($tanarOrak[$i]['tipus'] == 'normál') $txt = 'plusz óra';
+ elseif ($tanarOrak[$i]['tipus'] == 'normál máskor') $txt = 'cserélt/mozgatott óra';
+ elseif ($tanarOrak[$i]['tipus'] == 'elmarad') $txt = 'elmaradt mozgatott óra';
+ elseif ($tanarOrak[$i]['tipus'] == 'helyettesítés') $txt = $Tanarok[$tanarOrak[$i]['ki']]['tanarNev'].' helyettesített plusz óra';
+ elseif ($tanarOrak[$i]['tipus'] == 'felügyelet') $txt = $Tanarok[$tanarOrak[$i]['ki']]['tanarNev'].' felügyelt plusz óra';
+ elseif ($tanarOrak[$i]['tipus'] == 'összevonás') $txt = $Tanarok[$tanarOrak[$i]['ki']]['tanarNev'].' összevont plusz óra';
+ elseif ($tanarOrak[$i]['tipus'] == 'egyéb') $txt = 'egyéb feladat (tanár által megadott)';
+ else $txt = 'ismeretlen típus!!!!!!!';
+ } else {
+ $txt = 'nem ered sehonnan!!!!!!!!';
+ }
+ echo '<option value="">'.$txt.$_ki_txt.'</option>'."\n";
+
+ if ($tanarOrak[$i]['tipus'] == 'egyéb') {
+ echo '<option value="/'.$tanarOrak[$i]['oraId'].'/töröl">töröl</option>'."\n";
+ } else {
+ if ($tanarOrak[$i]['tipus'] == 'elmarad máskor') {
+ echo '<option value="/'.$tanarOrak[$i]['oraId'].'/normál">megtartva</option>'."\n";
+ echo '<option value="/'.$tanarOrak[$i]['oraId'].'/elmarad">elmarad</option>'."\n";
+ } elseif ($tanarOrak[$i]['tipus'] == 'normál máskor') {
+ echo '<option value="/'.$tanarOrak[$i]['oraId'].'/">csere/mozgatás visszaállítása</option>'."\n";
+ echo '<option value="/'.$tanarOrak[$i]['oraId'].'/elmarad">elmarad</option>'."\n";
+ } elseif ($tanarOrak[$i]['tipus'] == 'normál') {
+ echo '<option value="/'.$tanarOrak[$i]['oraId'].'/elmarad">elmarad</option>'."\n";
+ } elseif ($tanarOrak[$i]['tipus'] == 'elmarad') {
+ echo '<option value="/'.$tanarOrak[$i]['oraId'].'/normál">megtartva</option>'."\n";
+ } else {
+ echo '<option value="/'.$tanarOrak[$i]['oraId'].'/normál">megtartva</option>'."\n";
+ echo '<option value="/'.$tanarOrak[$i]['oraId'].'/elmarad">elmarad</option>'."\n";
+ }
+ foreach ($SELECT as $_tanarId => $_tanarAdat) {
+ // a nullás súlyúaknak órája van! nem jelenhet meg (ha mégis szeretné, manuális beállítás)
+ if ($_tanarId != $tanarId && $_tanarId != 'foglaltak' && $_tanarAdat['súly']>0) {
+ $value = $_tanarId.'/'.$tanarOrak[$i]['oraId'].'/'.$_tanarAdat['tipus'];
+ /* 2013.09 beta ... */
+ $_disabled = (
+ $_tanarAdat['tipus']!='összevonás'
+ && (
+ (
+ $ADAT['tanarTerheles'][ $_tanarId ]['munkaido']['lekotott']<$ADAT['tanarTerheles'][$_tanarId]['lekotott']['heti']
+ && ($ADAT['tanarTerheles'][ $_tanarId ]['over']['napi']>=2
+ || $ADAT['tanarTerheles'][ $_tanarId ]['over']['ora']>=6
+ || $ADAT['tanarTerheles'][ $_tanarId ]['over']['eves']>=30)
+ )
+ || $ADAT['tanarTerheles'][ $_tanarId ]['kotottEloirt']['heti']>=$ADAT['tanarTerheles'][ $_tanarId ]['munkaido']['kotott']
+ )
+ );
+ if ($ADAT['tanarTerheles'][ $_tanarId ]['kotottEloirt']['heti']>=$ADAT['tanarTerheles'][ $_tanarId ]['munkaido']['kotott'])
+ $_tanarAdat['súly'] .= '!'.$_tanarAdat['tipus'];
+ if ($ADAT['tanarTerheles'][ $_tanarId ]['kotott']['heti']>=$ADAT['tanarTerheles'][ $_tanarId ]['munkaido']['kotott'])
+ $_tanarAdat['súly'] .= '!';
+ if ($ADAT['tanarTerheles'][ $_tanarId ]['lekotott']['heti']>=$ADAT['tanarTerheles'][ $_tanarId ]['munkaido']['lekotott'])
+ $_tanarAdat['súly'] .= '!';
+ if ($ADAT['tanarTerheles'][ $_tanarId ]['over']['napi']>=2
+ || $ADAT['tanarTerheles'][ $_tanarId ]['over']['ora']>=6
+ || $ADAT['tanarTerheles'][ $_tanarId ]['over']['eves']>=30)
+ $_tanarAdat['súly'] .= '!';
+ /* */
+ echo '<option value="'.$value.'" '.($_disabled?' disabled="disabled" ':'').'>'."\n";
+ echo ''.$_tanarAdat['súly'].'| '.$_tanarAdat['tanarNev'].' ('.$_tanarAdat['tipus'].') '.$_tanarAdat['txt'];
+ echo ' terhelés:';
+ echo ' '.$ADAT['tanarTerheles'][ $_tanarId ]['lekotott']['heti'];
+ echo ' '.$ADAT['tanarTerheles'][ $_tanarId ]['kotottEloirt']['heti'];
+ echo ' '.$ADAT['tanarTerheles'][ $_tanarId ]['kotott']['heti'];
+ echo '</option>'."\n";
+ }
+ }
+ for($j=0; $j<count($ADAT['egyeb'][$tanarOrak[$i]['ora']]); $j++) {
+ $_D = $ADAT['egyeb'][$tanarOrak[$i]['ora']];
+ $_tanarNev = $Tanarok[$_D[$j]]['tanarNev'];
+ echo '<option value="'.$_D[$j].'" disabled="disabled" >[már beosztva] '.$_tanarNev.'</option>';
+ }
+ }
+ echo '</select>';
+
+ echo '</td>'."\n";
+ echo '<td class="info">';
+
+ /* itt célszerű lenne infóval ellátni a kiírót, ha korlátozás van érvényben! */
+ // ⚠ ♺ ⦷
+ $__ki = $tanarOrak[$i]['ki'];
+ if ($__ki>0) {
+ if ( $ADAT['tanarTerheles'][ $__ki ]['munkaido']['lekotott']<$ADAT['tanarTerheles'][ $__ki]['lekotott']['heti']
+// && ($ADAT['tanarTerheles'][ $__ki ]['over']['napi']>=2
+// || $ADAT['tanarTerheles'][ $__ki ]['over']['ora']>=6
+// || $ADAT['tanarTerheles'][ $__ki ]['over']['eves']>=30)
+ ) {
+ echo '<span style="cursor:help" title="A nevelés-oktatással lekötött munkaidőbe már nem fér bele, ezért a fennmaradó részt terheljük! '.$ADAT['tanarTerheles'][ $__ki ]['lekotott']['heti'].'">';
+ echo " ⚠ ";
+ echo '</span>';
+ }
+ if ($ADAT['tanarTerheles'][ $__ki ]['kotottEloirt']['heti']>=$ADAT['tanarTerheles'][ $__ki ]['munkaido']['kotott']) {
+ echo '<span style="cursor:help" title="A lekötött és az előírt pluszfeladatok száma '
+ .'('.$ADAT['tanarTerheles'][ $__ki ]['kotottEloirt']['heti'].') '
+ .'a heti megengedettel egyezik vagy túl is lépi azt'
+ .'('.$ADAT['tanarTerheles'][ $__ki ]['munkaido']['kotott'].')! A tanár tovább nem terhelhető!">';
+ echo " ⚠ ";
+ echo '</span>';
+ }
+ // echo ($ADAT['tanarTerheles'][$__ki]['over']['napi']);
+ // echo ($ADAT['tanarTerheles'][$__ki]['over']['heti']);
+ echo '<span class="info" style="font-size:10px;background-color: rgba(255,255,255,1); border: solid 1px grey; padding: 0px 5px; border-radius:8px; cursor:help" title="'.$tanarOrak[$i]['munkaido'].'">'.($tanarOrak[$i]['munkaido'][0]).'</span>';
+ }
+ /* ----------- */
+
+ echo '</td>'."\n";
+
+ echo '<td>';
+ if ($tanarOrak[$i]['tipus'] != 'elmarad máskor') {
+ echo '<input type="image" name="gomb_manual_'.$tanarOrak[$i]['oraId'].'" value="'.$tanarOrak[$i]['oraId'].'" src="skin/classic/module-naplo/img/helyettesites/kez.gif" alt="manual" /> '."\n";
+ echo '<input type="image" name="gomb_mozgat_'.$tanarOrak[$i]['oraId'].'" value="'.$tanarOrak[$i]['oraId'].'" src="skin/classic/module-naplo/img/helyettesites/mozgat.gif" alt="mozgat" /> '."\n";
+ echo '<input type="image" name="gomb_csere_'.$tanarOrak[$i]['oraId'].'" value="'.$tanarOrak[$i]['oraId'].'" src="skin/classic/module-naplo/img/helyettesites/csere.gif" alt="csere" /> '."\n";
+
+ //echo '<input type="image" class="btn_manual" name="gomb_manual_'.$tanarOrak[$i]['oraId'].'" value="'.$tanarOrak[$i]['oraId'].'" alt=" " /> '."\n";
+ //echo '<input type="image" class="btn_mozgat" name="gomb_mozgat_'.$tanarOrak[$i]['oraId'].'" value="'.$tanarOrak[$i]['oraId'].'" alt=" " /> '."\n";
+ //echo '<input type="image" class="btn_csere" name="gomb_csere_'.$tanarOrak[$i]['oraId'].'" value="'.$tanarOrak[$i]['oraId'].'" alt=" " /> '."\n";
+ }
+ if (substr($tanarOrak[$i]['tipus'],-7) == 'máskor') {
+ echo '!<input type="image" name="csereAttekintes" value="'.$tanarOrak[$i]['oraId'].'" src="skin/classic/module-naplo/img/helyettesites/kez.gif" alt="manual" />! '."\n";
+ }
+ if ($tanarOrak[$i]['ki']!='') {
+ // Órarend clock/clock3
+ //echo '<input type="image" name="orarendGomb" value="'.$tanarId.'/'.$dt.'" src="skin/classic/module-naplo/img/helyettesites/ora.gif" alt="orarend" class="onClickUpdateWindow" />'."\n";
+ echo '<a href ="'.href('index.php?page=naplo&sub=haladasi&f=haladasi&tolDt='.$dt.'&igDt='.$dt.'&tanarId='.$tanarOrak[$i]['ki']).'" alt="orarend" class="onClickUpdateWindow O">O</a>'."\n";
+ }
+ echo '<input type="hidden" name="orarend" value="'.$tanarId.'/'.$dt.'" />'."\n";
+ echo '</td>'."\n";
+
+ echo '</tr>'."\n\n";
+ }
+ echo '</tbody>'."\n";
+
+ echo '</table>'."\n";
+
+ formEnd();
+ }
+
+
+ function sulyKiszamitas($tanarOra, $Tanarok) {
+
+ for ($j = 0; $j < count($tanarOra['osszevono']); $j++) {
+ $osszevonoId = $tanarOra['osszevono'][$j];
+ $Tanarok[$osszevonoId]['osszevon'] = true;
+ }
+ for ($j = 0; $j < count($tanarOra['foglalt']); $j++) {
+ $foglaltId = $tanarOra['foglalt'][$j];
+ $Tanarok[$foglaltId]['foglalt'] = true;
+ }
+ unset($Tanarok['tanarIds']);
+
+ // súly kiszámítása
+ foreach ($Tanarok as $tId => $tAdatok) {
+// if (!$tAdatok['osszevon'] and $tAdatok['orak'][$tanarOra['ora']]) {
+ if ($tAdatok['foglalt']) {
+ // ütközés - tanít, de nem tud összevonni, mert nem szakos
+ $suly = 0;
+ $Tanarok[$tId]['txt'] = '[X]';
+
+ } elseif ($tAdatok['osszevon']) {
+ // össze tud vonni
+ //[2013.09.20.ig volt érvényben az ősidőktől :( RIP]$suly = 9; // az <- -> szakos/nem szakos között
+ $suly = 1;
+ $Tanarok[$tId]['txt'] = '[Ö]';
+ $Tanarok[$tId]['tipus'] = 'összevonás';
+
+ } else {
+ $Tanarok[$tId]['tipus'] = 'felügyelet';
+ $Tanarok[$tId]['txt'] = '[';
+ $suly = 2;
+ if (isset($tAdatok['elso ora']) && ($tAdatok['elso ora'] < $tanarOra['ora'])) {
+ // Van elötte órája
+ $Tanarok[$tId]['txt'] .= '<- ';
+ $suly += 3;
+ if ($tAdatok['utolso ora'] > $tanarOra['ora']) {
+ // Van utána is órája
+ $suly += 3;
+ $Tanarok[$tId]['txt'] .= '-> ';
+ }
+ } else {
+ if ($tAdatok['utolso ora'] > $tanarOra['ora']) {
+ // Csak utána van órája
+ $suly += 1;
+ $Tanarok[$tId]['txt'] .= '-> ';
+ }
+ }
+ if ($tAdatok['targyak'][$tanarOra['targyId']]) {
+ // Taníthatja az adott tárgyat
+ $suly += 2;
+ $Tanarok[$tId]['txt'] .= 'SZ ';
+ $Tanarok[$tId]['tipus'] = 'helyettesítés';
+ }
+ if ($tAdatok['db'] > 4) {
+ // Már van legalább 5 órája
+ $suly = floor($suly/2);
+ $Tanarok[$tId]['txt'] .= '!6!';
+ }
+ if (strlen($Tanarok[$tId]['txt']) == 1) $Tanarok[$tId]['txt'] .= ']';
+ else $Tanarok[$tId]['txt'] = substr($Tanarok[$tId]['txt'], 0, -1) . ']';
+ }
+ $Tanarok[$tId]['súly'] = $suly;
+ }
+
+ if (__HELYETTESITES_RENDEZES != 'ABC') uasort($Tanarok,'cmp');
+
+ return $Tanarok;
+ }
+
+ function putKeziBeallitas($oraAdat, $Termek, $Tanarok) {
+
+ global $aHetNapjai;
+
+ formBegin();
+ echo '<input type="hidden" name="action" value="keziBeallitas" />';
+ echo '<input type="hidden" name="oraId" value="'.$oraAdat['oraId'].'" />';
+ echo '<input type="hidden" name="dt" value="'.$oraAdat['dt'].'" />';
+
+ echo '<table class="keziBeallitas" cellspacing="1" cellpadding="1" align="center">';
+
+ echo '<tr>';
+ echo '<th colspan="6">'._KEZI_BEALLITAS.'</th>';
+ echo '</tr>';
+
+ echo '<tr>';
+ echo '<td>';
+ echo $oraAdat['dt'].' ('.$aHetNapjai[(date('w',strtotime($oraAdat['dt']))+6) % 7].')';
+ echo '</td>';
+
+ echo '<td>';
+ echo $oraAdat['ora'].'. '._ORA;
+ echo '</td>';
+
+ echo '<td>';
+ echo $oraAdat['tankorNev'];
+ echo '</td>';
+
+ echo '<td>';
+ $SEL = array($oraAdat['ki'] => ' selected="selected" ');
+ echo '<select name="ki">';
+ echo '<option value=""> - </option>';
+ for ($i = 0; $i < count($Tanarok);$i++) {
+ echo '<option value="'.$Tanarok[$i]['tanarId'].'" '.$SEL[$Tanarok[$i]['tanarId']].'>';
+ echo $Tanarok[$i]['tanarNev'];
+ echo '</option>';
+ }
+ echo '</select>';
+ echo '</td>';
+
+ echo '<td>';
+ $SEL = array($oraAdat['tipus'] => ' selected="selected" ');
+ $Tipus = array('helyettesítés','felügyelet','összevonás');
+ if (!in_array($oraAdat['tipus'], $Tipus)) $Tipus[] = $oraAdat['tipus'];
+ echo '<select name="tipus">';
+ foreach ($Tipus as $key => $tipus) {
+ echo '<option value="'.$tipus.'" '.$SEL[$tipus].'>';
+ echo $tipus ;
+ echo '</option>';
+ }
+ echo '</select>';
+ echo '</td>';
+
+ echo '<td>';
+ $SEL = array($oraAdat['teremId'] => ' selected="selected" ');
+ echo '<select name="teremId">';
+ for ($i = 0; $i < count($Termek); $i++) {
+ echo '<option value="'.$Termek[$i]['teremId'].'" '.$SEL[$Termek[$i]['teremId']].'>';
+ echo $Termek[$i]['leiras'];
+ echo '</option>';
+ }
+ echo '</select>';
+ echo '</td>';
+
+ echo '</tr>';
+
+ echo '<tr>';
+ echo '<th colspan="6"><input type="submit" value="'._OK.'" />';
+ echo '</tr>';
+
+ echo '</table>';
+ formEnd();
+
+ }
+
+ function putMozgatas($tanarId, $oraAdat, $TANAR_DT_NAPI_ORAK, $ujDt, $TANAR_UJDT_NAPI_ORAK) {
+
+ global $aHetNapjai, $_TANEV, $napiMinOra, $napiMaxOra;
+
+ formBegin();
+ echo '<input type="hidden" name="action" value="oraMozgatas" />';
+ echo '<input type="hidden" name="ujDt" value="'.$ujDt.'" />';
+ echo '<input type="hidden" name="dt" value="'.$oraAdat['dt'].'" />';
+ echo '<input type="hidden" name="mozgat" value="'.$oraAdat['oraId'].'" />';
+// echo '<input type="hidden" name="kit" value="'.$tanarId.'" />';
+
+ echo '<table align="center" class="mozgatas" cellspacing="1" cellpadding="1">';
+ echo '<thead>';
+ echo '<tr>';
+ echo '<th colspan="4">'._ORA_MOZGATAS.'</th>';
+ echo '</tr>';
+
+ echo '<tr>';
+ echo '<th colspan="2">'._MOZGATANDO.'</th>';
+ echo '<th colspan="2">'._UJ_IDOPONT.'</th>';
+ echo '</tr>';
+ echo '</thead>'."\n";
+
+ echo '<tfoot>';
+ echo '<tr>';
+ echo '<th colspan="4">';
+ echo '<input type="submit" name="rogzit" value="'._OK.'" />';
+ echo '</th>';
+ echo '</tr>';
+ echo '</tfoot>'."\n";
+
+ echo '<tbody>';
+ echo '<tr>';
+ echo '<th colspan="2">';
+ echo $oraAdat['dt'].' ('.$aHetNapjai[(date('w',strtotime($oraAdat['dt']))+6) % 7].')';
+ echo '</th>';
+ echo '<th colspan="2">';
+ echo '<select name="ujDt" class="onChangeSubmit">';
+
+ $SEL = array( $ujDt => ' selected="selected" ');
+ $_dt = date('Y-m-d',strtotime('-10 days',strtotime($ujDt)));
+ while (strtotime($_dt) <= strtotime($_TANEV['zarasDt'])) {
+
+ echo '<option value="'.$_dt.'"'.$SEL[$_dt].'>'.$_dt.' ('.$aHetNapjai[(date('w',strtotime($_dt))+6) % 7].')</option>';
+ $_dt = date('Y-m-d',strtotime('+1 days',strtotime($_dt)));
+
+ }
+
+ echo '</select>';
+
+ echo '</th>';
+ echo '</tr>';
+
+ // órarend
+ for ($i = $napiMinOra; $i <= $napiMaxOra; $i++) {
+
+ if (isset($_POST['ora']) && $_POST['ora'] == $i) $CHK = ' checked="checked" ';
+ else $CHK = '';
+
+ if (is_array($TANAR_DT_NAPI_ORAK[$i])&&count($TANAR_DT_NAPI_ORAK[$i])>0) {
+ $txt1 = '';
+ for ($j=0; $j<count($TANAR_DT_NAPI_ORAK[$i]); $j++) {
+ $txt1 .= $TANAR_DT_NAPI_ORAK[$i][$j]['tankorNev'].' ';
+ if ($TANAR_DT_NAPI_ORAK[$i][$j]['tipus'] != 'normál') $txt1 .= '('.$TANAR_DT_NAPI_ORAK[$i][$j]['tipus'].') ';
+ }
+ } else {
+ $txt1 = '';
+ }
+
+ if (is_array($TANAR_UJDT_NAPI_ORAK[$i]) && count($TANAR_UJDT_NAPI_ORAK[$i])>0) {
+ $txt2='';
+ for ($j=0; $j<count($TANAR_UJDT_NAPI_ORAK[$i]); $j++) {
+ $txt2 .= $TANAR_UJDT_NAPI_ORAK[$i][$j]['tankorNev'].' ';
+ if ($TANAR_UJDT_NAPI_ORAK[$i][$j]['tipus'] != 'normál') $txt2 .= '('.$TANAR_UJDT_NAPI_ORAK[$i][$j]['tipus'].') ';
+ }
+ } else {
+ $txt2 = '';
+ }
+
+ $class='';
+ for ($j=0; $j<count($TANAR_DT_NAPI_ORAK[$i]); $j++) {
+ if ($TANAR_DT_NAPI_ORAK[$i][$j]['oraId'] == $oraAdat['oraId']) { $class = 'mozgatando'; break; }
+ }
+
+ $class2 = '';
+ $txt2ext = '<input type="radio" name="ora" value="'.$i.'" '.$CHK.'/>'.$txt2;
+ for ($j=0; $j<count($TANAR_UJDT_NAPI_ORAK[$i]); $j++) {
+ $_U = $TANAR_UJDT_NAPI_ORAK[$i][$j];
+ if ($_U['oraId'] == $oraAdat['oraId']) {
+ $class2 = 'mozgatando';
+ $txt2ext = $txt2;
+ break;
+ } elseif ($_U['ki']==$tanarId) {
+ $class2 = 'utkozik';
+ $txt2ext = $txt2;
+ break;
+ } elseif ($_U['kit'] == $tanarId) {
+ $class2 = 'nemMegtartott';
+ } else {
+ }
+ }
+ echo '<tr>';
+ echo '<td>'.$i.'.</td>';
+ echo '<td class="'.$class.'">';
+ echo $txt1;
+ echo '</td>';
+ echo '<td class="'.$class2.'">';
+ echo $txt2ext;
+ echo '</td>';
+ echo '<td>'.$i.'.</td>';
+ echo '</tr>';
+
+ }
+ echo '</tbody>'."\n";
+ echo '</table>';
+
+ formEnd();
+ }
+
+ function putCsere($tanarId, $oraAdat, $TANAR_DT_NAPI_ORAK, $csTanarId, $csDt, $CSTANAR_CSDT_NAPI_ORAK, $Tanarok) {
+
+ global $aHetNapjai, $_TANEV, $napiMinOra, $napiMaxOra;
+
+ formBegin();
+ echo '<input type="hidden" name="action" value="oraCsere" />';
+ echo '<input type="hidden" name="csDt" value="'.$csDt.'" />';
+ echo '<input type="hidden" name="dt" value="'.$oraAdat['dt'].'" />';
+ echo '<input type="hidden" name="csere" value="'.$oraAdat['oraId'].'" />';
+// echo '<input type="hidden" name="kit" value="'.$tanarId.'" />';
+
+ echo '<table class="csere" cellspacing="1" cellpadding="1" align="center">';
+ echo '<tr>';
+ echo '<th colspan="4">'._ORA_CSERE.'</th>';
+ echo '</tr>';
+
+ echo '<tr>';
+ echo '<th colspan="2">'._CSERELENDO.'</th>';
+ echo '<th colspan="2">'._UJ_IDOPONT.'</th>';
+ echo '</tr>';
+
+ echo '<tr>';
+
+ echo '<th colspan="2">';
+ echo $oraAdat['dt'].' ('.$aHetNapjai[(date('w',strtotime($oraAdat['dt']))+6) % 7].') ';
+ for ($i = 0; ($i < count($Tanarok) && $Tanarok[$i]['tanarId'] != $tanarId); $i++);
+ echo $Tanarok[$i]['tanarNev'];
+ echo '</th>';
+
+ echo '<th colspan="2">';
+ echo '<select name="csDt" class="onChangeSubmit">';
+
+ $SEL = array( $csDt => ' selected="selected" ');
+ $_dt = date('Y-m-d',strtotime('-10 days',strtotime($csDt)));
+ while (strtotime($_dt) <= strtotime($_TANEV['zarasDt'])) {
+
+ echo '<option value="'.$_dt.'"'.$SEL[$_dt].'>'.$_dt.' ('.$aHetNapjai[(date('w',strtotime($_dt))+6) % 7].')</option>';
+ $_dt = date('Y-m-d',strtotime('+1 days',strtotime($_dt)));
+
+ }
+
+ echo '</select>';
+
+ echo '<select name="csTanarId" class="onChangeSubmit">';
+ $SEL = array($csTanarId => ' selected="selected"');
+ for ($i = 0; $i < count($Tanarok); $i++) {
+ echo '<option value="'.$Tanarok[$i]['tanarId'].'"'.$SEL[$Tanarok[$i]['tanarId']].'>'.$Tanarok[$i]['tanarNev'].'</option>';
+ }
+ echo '</select>';
+
+ echo '</th>';
+ echo '</tr>';
+
+ // órarend
+ for ($i = $napiMinOra; $i <= $napiMaxOra; $i++) {
+
+ if (is_array($TANAR_DT_NAPI_ORAK[$i])&&count($TANAR_DT_NAPI_ORAK[$i])>0) {
+ $txt1 = '';
+ for ($j=0; $j<count($TANAR_DT_NAPI_ORAK[$i]); $j++) {
+ $txt1 .= $TANAR_DT_NAPI_ORAK[$i][$j]['tankorNev'].' ';
+ if ($TANAR_DT_NAPI_ORAK[$i][$j]['tipus'] != 'normál') $txt1 .= '('.$TANAR_DT_NAPI_ORAK[$i][$j]['tipus'].') ';
+ }
+ } else {
+ $txt1 = '';
+ }
+
+ if (is_array($CSTANAR_CSDT_NAPI_ORAK[$i]) && count($CSTANAR_CSDT_NAPI_ORAK[$i])>0) {
+ $txt2='';
+ for ($j=0; $j<count($CSTANAR_CSDT_NAPI_ORAK[$i]); $j++) {
+ $txt2 .= $CSTANAR_CSDT_NAPI_ORAK[$i][$j]['tankorNev'].' ';
+ if ($CSTANAR_CSDT_NAPI_ORAK[$i][$j]['tipus'] != 'normál') $txt2 .= '('.$CSTANAR_CSDT_NAPI_ORAK[$i][$j]['tipus'].') ';
+ }
+ } else {
+ $txt2 = '';
+ }
+
+ echo '<tr>';
+ echo '<td>'.$i.'.</td>';
+ if ($TANAR_DT_NAPI_ORAK[$i][0]['oraId'] == $oraAdat['oraId']) $class = 'mozgatando';
+ else $class='';
+ echo '<td class="'.$class.'">';
+ echo $txt1;
+ echo '</td>';
+ if ($CSTANAR_CSDT_NAPI_ORAK[$i][0]['oraId'] == $oraAdat['oraId']) {
+ // A mozgatandó óra...
+ echo '<td class="mozgatando">';
+ echo $txt2;
+ echo '</td>';
+ } elseif ($CSTANAR_CSDT_NAPI_ORAK[$i][0]['ki'] == $csTanarId) {
+ // órája van
+ echo '<td class="orajavan">';
+ echo '<input type="radio" name="csId" value="'.$CSTANAR_CSDT_NAPI_ORAK[$i][0]['oraId'].'" /> ';
+ echo $txt2;
+ echo '</td>';
+ } elseif ($CSTANAR_CSDT_NAPI_ORAK[$i][0]['kit'] == $csTanarId) {
+ // nem megtartott óra: helyettesítik, elmarad
+ echo '<td class="nemMegtartott">';
+ echo '<input type="radio" name="csId" value="'.$CSTANAR_CSDT_NAPI_ORAK[$i][0]['oraId'].'" /> ';
+ echo $txt2;
+ echo '</td>';
+ } else {
+ // Lukas óra
+ echo '<td>';
+ echo $txt2;
+ echo '</td>';
+ }
+ echo '<td>'.$i.'.</td>';
+ echo '</tr>';
+
+ }
+ echo '<tr>';
+ echo '<th colspan="4">';
+ echo '<input type="submit" name="rogzit" value="'._OK.'" />';
+ echo '</th>';
+ echo '</tr>';
+ echo '</table>';
+
+ formEnd();
+
+ }
+
+ function putCsereAttekintes($oraId, $Orak) {
+
+ global $aHetNapjai;
+
+ echo '<h2>'._CSERE_ATTEKINTES.'</h2>'."\n";
+ echo '<table class="csereAttekintes">'."\n";
+
+ echo '<tr>'."\n";
+ echo '<th>'._MIT.'</th>'."\n";
+ echo '<th>'._HONNAN.'</th>'."\n";
+ echo '<th></th>'."\n";
+ echo '<th>'._HOVA.'</th>'."\n";
+ echo '</tr>'."\n";
+
+ foreach ($Orak['plusz'] as $tankorId => $pluszAdat) {
+
+ // felhasználjuk, hogy minden alapórának pontosan egy plusz óra felel meg
+ $oraAdat = $Orak['alap'][$tankorId];
+ for ($i = 0; $i < count($pluszAdat); $i++) {
+
+ echo '<tr>'."\n";
+
+ echo '<td>'.$oraAdat[$i]['tankorNev'].'</td>'."\n";
+ echo '<td>'.$oraAdat[$i]['dt'].' ('.$aHetNapjai[(date('w',strtotime($oraAdat[$i]['dt']))+6) % 7].') '.$oraAdat[$i]['ora'].'. '._ORA.'</td>'."\n";
+ echo '<td> --&gt; </td>';
+ if (substr($pluszAdat[$i]['tipus'],0,7) == 'normál')
+ echo '<td>'.$pluszAdat[$i]['dt'].' ('.$aHetNapjai[(date('w',strtotime($pluszAdat[$i]['dt']))+6) % 7].') '.$pluszAdat[$i]['ora'].'. '._ORA.'</td>'."\n";
+ else
+ echo '<td>'.$pluszAdat[$i]['dt'].' ('.$aHetNapjai[(date('w',strtotime($pluszAdat[$i]['dt']))+6) % 7].') '.$pluszAdat[$i]['ora'].'. '._ORA.' ('.$pluszAdat[$i]['tipus'].')</td>'."\n";
+
+ echo '</tr>'."\n";
+
+ }
+
+ }
+
+ echo '</table>'."\n";
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/haladasi/hetes.phtml b/mayor-orig/www/skin/classic/module-naplo/html/haladasi/hetes.phtml
new file mode 100644
index 00000000..0609ed37
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/haladasi/hetes.phtml
@@ -0,0 +1,37 @@
+<?php
+
+ function putHetesForm($ADAT) {
+
+ formBegin(array('class'=>'hetes'));
+ echo '<input type="hidden" name="igDt" value="'._SHOW_DAYS_TO.'" />'."\n";
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalyId'].'" />'."\n";
+ echo '<input type="hidden" name="dt" value="'._SHOW_DAYS_FROM.'" />'."\n";
+ echo '<input type="hidden" name="action" value="hetesFelvetel" />'."\n";
+
+ echo '<table align="center" class="hetes" cellpadding="1" cellspacing="1" >';
+ if (is_array($ADAT['hetesek'])) foreach (($ADAT['hetesek']) as $osztalyId=>$D) {
+ echo '<tr><th colspan="3">'.$ADAT['osztalyok'][$osztalyId]['osztalyJel'].' '.$ADAT['osztalyok'][$osztalyId]['osztalyfonokNev'].'</th></tr>';
+ for ($k = 0; $k < count($D); $k++) {
+/*
+ $SEL = array($D[$k]['diakId'] => ' selected="selected" ');
+ echo '<select name="hetes'.$k.'">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ for ($i = 0; $i < count($ADAT['diakok']); $i++) {
+ echo '<option value="'.$ADAT['diakok'][$i]['diakId'].'"'.$SEL[ $ADAT['diakok'][$i]['diakId'] ].'>'.$ADAT['diakok'][$i]['diakNev'].'</option>'."\n";
+ }
+ echo '</select>'."\n";
+*/
+ echo '<tr>';
+ echo '<td>'.str_replace('-','.',$D[$k]['dt']).'.</td>';
+ echo '<td>'.$D[$k]['sorszam'].'</td>';
+ echo '<td>'.$ADAT['diakok'][$D[$k]['diakId']]['diakNev'].'</td>';
+ echo '</tr>';
+ }
+ }
+ echo '</table>';
+// echo '<input type="submit" value="'._OK.'" />'."\n";
+ formEnd();
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/haladasi/minuszora.phtml b/mayor-orig/www/skin/classic/module-naplo/html/haladasi/minuszora.phtml
new file mode 100644
index 00000000..61a91533
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/haladasi/minuszora.phtml
@@ -0,0 +1,55 @@
+<?php
+
+ function putOrak($ADAT) {
+
+ formBegin(array('class'=>'minuszora'));
+
+ echo '<input type="hidden" name="action" value="oraElmaradas" />'."\n";
+ echo '<input type="hidden" name="dt" value="'.$ADAT['dt'].'" />'."\n";
+ echo '<input type="hidden" name="tanarId" value="'.$ADAT['tanarId'].'" />'."\n";
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalyId'].'" />'."\n";
+
+ echo '<ul>'."\n";
+ for ($i = $ADAT['napiMinOra']; $i <= $ADAT['napiMaxOra']; $i++) {
+
+ echo '<li>';
+ echo $i . '. ' . _ORA;
+ if (is_array($ADAT['orak'][$i]) && count($ADAT['orak'][$i]) > 0) {
+ echo '<ul>'."\n";
+ for ($j = 0; $j < count($ADAT['orak'][$i]); $j++) {
+ if (!in_array($ADAT['orak'][$i][$j]['tipus'], array('elmarad','elmarad máskor'))) {
+ $D = $ADAT['orak'][$i][$j];
+ echo '<li class="'.$D['tipus'].' '.$D['eredet'].'">';
+ echo '<input type="checkbox" name="oraId[]" value="'.$D['oraId'].'" />'."\n";
+ if (is_null($D['tankorId'])) echo $D['tipus'];
+ else echo $D['tankorNev'];
+ if ($D['teremId']!='')
+ echo ' ('.$D['teremLeiras'].')';
+ echo ' ';
+ echo $D['leiras'];
+ if ($D['oralatogatasId']!='') {
+ echo '<span class="latogatott">L</span>';
+ echo $D['megjegyzes'];
+ }
+ echo ' {'.$D['munkaido'].'}';
+ echo '</li>'."\n";
+ }
+ }
+ echo '</ul>'."\n";
+// } else {
+// echo ' - ';
+ }
+
+ echo '</li>'."\n";
+
+ }
+ echo '</ul>'."\n";
+
+ echo '<input type="submit" value="'._ELMARAD.'" />'."\n";
+
+ formEnd();
+
+ }
+
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/haladasi/ora.phtml b/mayor-orig/www/skin/classic/module-naplo/html/haladasi/ora.phtml
new file mode 100644
index 00000000..ef21f763
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/haladasi/ora.phtml
@@ -0,0 +1,51 @@
+<?php
+
+ function putOraAdat($ADAT) {
+ $O = $ADAT['oraAdat'];
+
+ echo '<style type="text/css">
+ .modGomb {
+ background-color: #eeeeee;
+ padding:4px 1em; margin:1em; background-color: #eeeeee; border-radius: 2px; border-style: solid solid solid none; border-width: 1px 1px 1px 1px; border-color: #aaa;
+ }
+ .oraElmarad {background-color: red; color:white;}
+ .oraMegtartva {background-color: green; color:white;}
+ </style>';
+
+ echo '<div style="padding:1em 0em;float:left; margin-right:2em;background-color: #eeeeee; width:294px; border-radius: 0px 4px 4px 0px; border-style: solid solid solid none; border-width: 1px 1px 1px 0px; border-color: #aaa;">';
+ if (is_array($O)) {
+ foreach($ADAT['oraAdat'] as $k => $v) {
+ echo '<div style="width:90px; text-align:right; display:table-cell;">';
+ echo $k;
+ echo '</div>';
+ echo '<div style="width:200px; text-align:left; display:table-cell; padding-left:1em;">';
+ echo $v;
+ echo '</div><div style="clear:both"></div>';
+ }
+ }
+ echo '</div>';
+echo '<h2>Ez a funkció még nem működik!</h2>';
+ echo '<input type="hidden" name="oraId" value="'.$O['oraId'].'" />';
+ echo '<input type="submit" name="oraElmarad" value="'._ELMARAD.'" id="oraElmarad" class="modGomb oraElmarad" />';
+ echo '<input type="submit" name="oraMegtartva" value="'._MEGTARTVA.'" id="oraMegtartva" class="modGomb oraMegtartva" />';
+
+/*
+ echo 'Mit lehet csinálni egy órával?
+
+<pre>
+Haladási:
+- elmarad
+- helyettesítk/felügyelik stb
+- összevonjuk másikkal (lásd előbb)
+- terme megváltozik ideiglenesen
+
+Órarend:
+- terme megváltozik véglegesen
+</pre>
+';
+*/
+ echo '<div style="clear: both"></div>';
+
+ }
+
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/haladasi/oralatogatas.phtml b/mayor-orig/www/skin/classic/module-naplo/html/haladasi/oralatogatas.phtml
new file mode 100644
index 00000000..008544b4
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/haladasi/oralatogatas.phtml
@@ -0,0 +1,56 @@
+<?php
+
+ function putOralatogatasForm($ADAT) {
+
+
+ echo '<ul class="ora">'."\n";
+ foreach ($ADAT['orak'] as $ora => $oAdat) {
+ foreach ($oAdat as $key => $oraAdat) {
+ $_OK = is_array($ADAT['oralatogatas'][ $oraAdat['oraId'] ]['tanarIds']);
+ $_class = ($_OK) ? 'latogatva' : '';
+ echo '<li>';
+
+ formBegin(array('class'=>$_class));
+
+ echo '<input type="hidden" name="action" value="oralatogatasBeiras" />'."\n";
+ echo '<input type="hidden" name="tanarId" value="'.$ADAT['tanarId'].'" />'."\n";
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalyId'].'" />'."\n";
+ echo '<input type="hidden" name="dt" value="'.$ADAT['dt'].'" />'."\n";
+ echo '<input type="hidden" name="oraId" value="'.$oraAdat['oraId'].'" />'."\n";
+
+ echo '<p>';
+ echo '<input type="submit" name="delete_'.$oraAdat['oraId'].'" value="'._TOROL.'" />'."\n";
+ echo '<input type="submit" value="'._OK.'" />'."\n";
+ echo '<span class="ora">'.$ora.'. '._ORA.'</span>';
+ echo $oraAdat['tankorNev'];
+ echo '</p>';
+
+ echo '<div class="jobb">';
+ echo '<label for="tanar'.$oraAdat['oraId'].'">'._LATOGATO.'</label>'."<br />\n";
+ echo '<select name="tanarIds[]" multiple="multiple">'."\n";
+ for ($i = 0; $i < count($ADAT['tanarok']); $i++) {
+ echo '<option value="'.$ADAT['tanarok'][$i]['tanarId'].'"';
+ if (
+ is_array($ADAT['oralatogatas'][ $oraAdat['oraId'] ]['tanarIds']) &&
+ in_array($ADAT['tanarok'][$i]['tanarId'], $ADAT['oralatogatas'][ $oraAdat['oraId'] ]['tanarIds'])) echo ' selected="selected" ';
+ echo '>'.$ADAT['tanarok'][$i]['tanarNev'].'</option>'."\n";
+ }
+ echo '</select>'."\n";
+ echo '</div>';
+
+ echo '<div>';
+ echo '<label for="megjegyzes'.$oraAdat['oraId'].'">'._MEGJEGYZES.'</label>'."<br />\n";
+ echo '<textarea name="megjegyzes">';
+ echo htmlspecialchars($ADAT['oralatogatas'][ $oraAdat['oraId'] ]['megjegyzes']);
+ echo '</textarea>'."\n";
+ echo '</div>';
+ formEnd();
+
+ echo '</li>'."\n";
+ }
+ }
+ echo '</ul>'."\n";
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/haladasi/osszevonas.phtml b/mayor-orig/www/skin/classic/module-naplo/html/haladasi/osszevonas.phtml
new file mode 100644
index 00000000..b0e38c08
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/haladasi/osszevonas.phtml
@@ -0,0 +1,51 @@
+<?php
+
+ function putOraFelvetelForm($ADAT) {
+
+ formBegin(array('class'=>'pluszora'));
+ echo '<input type="hidden" name="action" value="oraFelvetele" />';
+ echo '<input type="hidden" name="tankorId" value="'.$ADAT['tankorId'].'" />';
+ echo '<input type="hidden" name="tanarId" value="'.$ADAT['tanarId'].'" />';
+ echo '<input type="hidden" name="dt" value="'.$ADAT['dt'].'" />';
+ echo '<input type="hidden" name="ora" value="'.$ADAT['ora'].'" />';
+
+ echo '<h2>'._TORLENDOK.'</h2>';
+ echo '<ul>';
+ for ($i=0; $i<count($ADAT['torlendoTankorok']); $i++) {
+ $T = $ADAT['torlendoTankorok'][$i];
+ echo '<li>'.$ADAT['tankorok'][$T['tankorId']][0]['tankorNev'].' ('.$T['oraId'].')</li>';
+ }
+ echo '</ul>';
+
+ echo '<input type="submit" value="'._ORA_FELVETELE.'" class="confirm" title="'._ORA_FELVETELE_CONFIRM.'" />';
+ formEnd();
+ }
+
+ function putOrak($Orak, $title) {
+
+ global $napiMinOra, $napiMaxOra;
+
+ echo '<h2>'.$title.' '._ORAI.'</h2>';
+ echo '<ul class="pluszora">';
+
+ for ($i = $napiMinOra; $i <= $napiMaxOra; $i++) {
+ echo '<li>';
+ echo '<span class="oraszam">' . $i . '. ' . _ORA . '</span> ';
+ if (is_array($Orak[$i])) {
+ if (is_array($Orak[$i][0])) {
+ for ($j = 0; $j < count($Orak[$i]); $j++) {
+ echo '<span>' . $Orak[$i][$j]['tankorNev'] . '</span> ';
+ }
+ } else {
+ echo 'AJJAJJ';
+ }
+ }
+ echo '</li>';
+ }
+
+ echo '</ul>';
+
+ }
+
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/haladasi/pluszora.phtml b/mayor-orig/www/skin/classic/module-naplo/html/haladasi/pluszora.phtml
new file mode 100644
index 00000000..af74fcb5
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/haladasi/pluszora.phtml
@@ -0,0 +1,95 @@
+<?php
+
+ function putOraFelvetelForm($tankorId, $tanarId, $dt, $ora, $teremId, $ADAT) {
+ formBegin(array('class'=>'pluszora'));
+ echo '<input type="hidden" name="action" value="oraFelvetele" />';
+ echo '<input type="hidden" name="tankorId" value="'.$tankorId.'" />';
+ echo '<input type="hidden" name="tanarId" value="'.$tanarId.'" />';
+ echo '<input type="hidden" name="dt" value="'.$dt.'" />';
+ echo '<input type="hidden" name="ora" value="'.$ora.'" />';
+ echo '<input type="hidden" name="teremId" value="'.$teremId.'" />';
+
+ echo '<label for="eredet">'._EREDET.'</label>';
+ echo '<select name="eredet" id="eredet">';
+ echo '<option value="plusz">'._PLUSZ.'</option>';
+ echo '<option value="órarend">'._ORAREND.'</option>';
+ echo '</select>';
+ if ($ADAT['tipus'] != 'normál') echo '<strong> '.$ADAT['tipus'].' </strong>';
+
+ echo '<input type="submit" value="'._ORA_FELVETELE.'" />';
+ formEnd();
+ }
+
+ function putOrak($Orak, $title, $ADAT) {
+
+ echo '<h1>'.ucfirst($title).' '._ORAI.'</h1>';
+ echo '<ul class="pluszora">';
+
+ for ($i = $ADAT['napiMinOra']; $i <= $ADAT['napiMaxOra']; $i++) {
+ echo '<li>';
+ echo '<span class="oraszam">' . $i . '. ' . _ORA . '</span> ';
+ if (is_array($Orak[$i])) {
+ if (is_array($Orak[$i][0])) {
+ for ($j = 0; $j < count($Orak[$i]); $j++) {
+ echo '<span>' . $Orak[$i][$j]['tankorNev'] . '</span> ';
+ }
+ } else {
+ echo '<span>' . $Orak[$i]['tankorNev'] . '</span>';
+ }
+ }
+ echo '</li>';
+ }
+
+ echo '</ul>';
+ }
+
+ function putLila($ADAT) {
+
+ echo '<h1>'._CSOPORTOS_PLUSZORA.'</h1>';
+
+ formBegin(array('class'=>'pluszLila'));
+
+ echo '<input type="hidden" name="action" value="csoportos" />';
+
+ echo '<input type="hidden" name="dt" value="'.$ADAT['dt'].'" />';
+ echo '<input type="hidden" name="ora" value="'.$ADAT['ora'].'" />';
+
+ echo '<label>'._TANAROK.'</label>';
+
+ echo '<button type="button" id="mindentanar">minden tanár</button>';
+ echo '<button type="button" id="invertal">kijelölés invertálása</button>';
+// echo '<button type="button" id="munkakozosseg">munkaközösség</button>';
+// echo '<button type="button" id="targy">tárgy</button>';
+// echo '<button type="button" id="tankorcsoport">tankörcsoport</button>';
+// echo '<button type="button" id="tankorblokk">tankörblokk</button>';
+ echo '<select name="munkakozossegSelector" id="munkakozossegSelector">';
+ echo '<option value=""> - </option>';
+ for ($i=0; $i<count($ADAT['munkakozossegek']); $i++) {
+ $_D = $ADAT['munkakozossegek'][$i];
+ echo '<option value="'.$_D['mkId'].'">'.$_D['leiras'].' ('.$_D['mkVezNev'].')</option>';
+ }
+ echo '</select >';
+ echo '<button type="button" class="selectorButton" id="selectorPlus" ><span class="icon-plus"></span></button>';
+ echo '<button type="button" class="selectorButton" id="selectorMinus"><span class="icon-minus"></span></button>';
+ echo '<br/>';
+ echo '<select multiple="multiple" size="15" name="tanarIdk[]" id="tanarLista">';
+ for ($i=0; $i<count($ADAT['tanarok']); $i++) {
+ $_D = $ADAT['tanarok'][$i];
+ echo '<option value="'.$_D['tanarId'].'" data-mk="['.implode(',',$ADAT['mkTanar']['tanarMk'][$_D['tanarId']]).']">'.$_D['tanarNev'].'</option>';
+ }
+ echo '</select>';
+ echo '<label>'._FELADAT.'</label>';
+ echo '<select name="feladatTipusId">';
+ foreach ($ADAT['feladatTipus'] as $feladatTipusId => $FA) {
+ echo '<option value="'.$feladatTipusId.'">'.$FA['feladatTipusLeiras'].'</option>';
+ }
+ echo '</select> ';
+ echo '<label>'._LEIRAS.'</label>';
+ echo '<input type="text" name="leiras" placeholder="a feladat részletes leírása" style="width:50%;" />';
+ echo '<input type="submit"> ';
+ _inlineHelp('A gomb megnyomásával a kijelölt tanároknak előírt pluszfeladatot rögzítünk az adott nap ('.($ADAT['dt']).') adott órájára ('.$ADAT['ora'].')');
+ formEnd();
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/haladasi/specialis.phtml b/mayor-orig/www/skin/classic/module-naplo/html/haladasi/specialis.phtml
new file mode 100644
index 00000000..74f47c4e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/haladasi/specialis.phtml
@@ -0,0 +1,181 @@
+<?php
+/*
+ module: naplo
+*/
+
+ function putNapInfo($napAdat, $munkatervek) {
+
+ echo '<table class="napinfo">';
+ echo '<tr><th colspan="'.count($napAdat).'">'.$napAdat[0]['dt'].'</th></tr>';
+ echo '<tr>';
+ for ($i = 0; $i < count($napAdat); $i++) {
+ echo '<td>';
+ echo '<h3>'._MUNKATERV.': '.$munkatervek[$napAdat[$i]['munkatervId']]['munkatervNev'].' ('.$napAdat[$i]['munkatervId'].')</h3>';
+ echo '<p>'._TIPUS.': <strong>'.$napAdat[$i]['tipus'].'</strong></p>';
+ echo '<p>'._ORARENDIHET.': <strong>'.$napAdat[$i]['orarendiHet'].'</strong></p>';
+ echo '<p>'._MEGJEGYZES.'<strong>: '.$napAdat[$i]['megjegyzes'].'</strong></p>';
+ echo '</td>';
+ }
+ echo '</tr>';
+ echo '</table>';
+
+ }
+
+ function napiOrakTorleseForm($napAdat, $napTipusok) {
+
+ $dt = $napAdat[0]['dt'];
+ $tipus = array();
+ for ($i = 0; $i < count($napAdat); $i++) if (!in_array($napAdat[$i]['tipus'], $tipus)) $tipus[] = $napAdat[$i]['tipus'];
+ // Ha egyféle típus van rendelve a naphoz az összes munkatervben...
+ if (count($tipus) == 1) $SEL = array($tipus[0] => ' selected="selected" ');
+ formBegin(array('class'=>'specialis'));
+
+ echo '<input type="hidden" name="action" value="napiOrakTorlese" />'."\n";
+ echo '<input type="hidden" name="dt" value="'.$dt.'" />'."\n";
+ echo '<label for="tipus">'._NAP_TIPUSA.'</label>'."\n";
+ echo '<select name="tipus" id="tipus">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ for ($i = 0; $i < count($napTipusok); $i++) {
+ echo '<option value="'.$napTipusok[$i].'"'.$SEL[$napTipusok[$i]].'>'.$napTipusok[$i].'</option>'."\n";
+ }
+ echo '</select>'."\n";
+ echo '<input type="submit" value="'._ORAK_TORLESE.'" class="confirm" title="'._TORLES_BIZTOS_E.'" />'."\n";
+
+ formEnd();
+ }
+
+ function orakBetolteseForm($napAdat, $Hetek) {
+
+ $dt = $napAdat[0]['dt'];
+ $orarendiHet = array();
+ for ($i = 0; $i < count($napAdat); $i++) if (!in_array($napAdat[$i]['orarendiHet'], $orarendiHet)) $orarendiHet[] = $napAdat[$i]['orarendiHet'];
+ // Ha egyetlen órarendi héthez van rendelve a nap az összes munkatervben...
+ if (count($orarendiHet) == 1) $SEL = array($orarendiHet[0] => ' selected="selected" ');
+ formBegin(array('class'=>'specialis'));
+
+ echo '<input type="hidden" name="action" value="orakBetoltese" />'."\n";
+ echo '<input type="hidden" name="dt" value="'.$dt.'" />'."\n";
+ echo '<label for="het">'._ORARENDIHET.'</label>'."\n";
+ echo '<select name="orarendiHet" id="het">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ for ($i = 0; $i < count($Hetek); $i++) {
+ echo '<option value="'.$Hetek[$i].'"'.$SEL[$Hetek[$i]].'>'.$Hetek[$i].'</option>'."\n";
+ }
+ echo '</select>'."\n";
+ echo '<input type="submit" value="'._ORAK_BETOLTESE.'" class="confirm" title="'._BETOLTES_BIZTOS_E.'" />'."\n";
+
+ formEnd();
+ }
+
+ function specialisNapForm($dt, $szabadOrak, $Hetek) {
+
+ global $aHetNapjai, $napiMinOra, $napiMaxOra;
+
+ formBegin(array('class'=>'specialis'));
+
+ echo '<input type="hidden" name="action" value="specialisNap" />';
+ echo '<input type="hidden" name="dt" value="'.$dt.'" />';
+
+ echo '<table>'."\n";
+
+ echo '<thead>'."\n";
+ echo '<tr><th colspan="5">'._ORAREND_OSSZEALLITASA.": $dt</th></tr>\n";
+ echo '<tr>';
+ echo '<th>'._SZABAD_ORA.'</th>';
+ echo '<th></th>';
+ echo '<th>'._HET.'</th>';
+ echo '<th>'._NAP.'</th>';
+ echo '<th>'._ORA.'</th>';
+ echo '</tr>'."\n";
+ echo '</thead>'."\n";
+
+ echo '<tfoot>'."\n";
+ echo '<tr>';
+ echo '<th colspan="5"><input type="submit" value="'._OK.'" /></th>';
+ echo '</tr>'."\n";
+ echo '</tfoot>'."\n";
+
+ echo '<tbody>'."\n";
+ for ($j = 0; $j < count($szabadOrak); $j++) {
+ echo '<tr>'."\n";
+ echo '<th><input type="hidden" name="celOra[]" value="'.$szabadOrak[$j].'" />'.$szabadOrak[$j].'</th>'."\n";
+ echo '<td>&#8594;</td>'."\n";
+ echo '<td>'."\n";
+ echo '<select name="het[]">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ for ($h = 0; $h < count($Hetek); $h++) {
+ echo '<option value="'.$Hetek[$h].'">'.$Hetek[$h].'</option>'."\n";
+ }
+ echo '</select>'."\n";
+ echo '</td>'."\n";
+ echo '<td>';
+ $dow = date('w',strtotime($dt));
+ if ($dow == 0 ) $dow = 7;
+ $SEL = array($dow => ' selected="selected" ');
+ echo '<select name="nap[]">';
+ echo '<option value=""> - </option>';
+ for ($k = 1; $k <= 7; $k++) {
+ echo '<option value="'.$k.'"'.$SEL[$k].'>'.$aHetNapjai[$k-1].'</option>';
+ }
+ echo '</select>';
+ echo '</td>'."\n";
+ echo '<td>';
+ echo '<select name="ora[]">';
+ echo '<option value=""> - </option>';
+ for ($k = $napiMinOra; $k <= $napiMaxOra; $k++) {
+ if ($szabadOrak[$j] == $k) {
+ echo '<option value="'.$k.'" selected="selected">'.$k.'</option>';
+ } else {
+ echo '<option value="'.$k.'">'.$k.'</option>';
+ }
+ }
+ echo '</select>';
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+ }
+ echo '</tbody>'."\n";
+
+ echo '</table>'."\n";
+
+ formEnd();
+
+ }
+
+ function orakTorleseForm($dt, $szabadOrak) {
+
+ global $napiMinOra, $napiMaxOra;
+
+ formBegin(array('class'=>'specialis'));
+
+ echo '<input type="hidden" name="action" value="orakTorlese" />'."\n";
+ echo '<input type="hidden" name="dt" value="'.$dt.'" />'."\n";
+ echo '<table>'."\n";
+
+ echo '<thead>'."\n";
+ echo '<tr><th colspan="2">'._FOGLALT_SAVOK_TORLESE.': '.$dt.'</th></tr>'."\n";
+ echo '<tr>';
+ echo '<th>'._FOGLALT_ORA.'</th>';
+ echo '<th>'._TORLENDO.'</th>';
+ echo '</tr>'."\n";
+ echo '</thead>'."\n";
+
+ echo '<tfoot>'."\n";
+ echo '<tr>';
+ echo '<th colspan="2"><input type="submit" value="'._TORLES.'" class="confirm" title="'._ORA_TORLES_BIZTOS_E.'" /></th>';
+ echo '</tr>'."\n";
+ echo '</tfoot>'."\n";
+
+ for ($i = $napiMinOra; $i <= $napiMaxOra; $i++) {
+ if (!in_array($i, $szabadOrak)) {
+ echo '<tr>';
+ echo '<th>'.$i.'</th>';
+ echo '<td><input type="checkbox" name="ora[]" value="'.$i.'" /></td>'."\n";
+ echo '</tr>';
+ }
+ }
+ echo '</table>'."\n";
+
+ formEnd();
+
+ }
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/haladasi/stat.phtml b/mayor-orig/www/skin/classic/module-naplo/html/haladasi/stat.phtml
new file mode 100644
index 00000000..64d0bc71
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/haladasi/stat.phtml
@@ -0,0 +1,76 @@
+<?php
+
+
+ function putTankorStat($tankorStat) {
+ $mutatHianyzasStat = (is_array($tankorStat['hianyzasStat'])) ? true : false;
+
+ echo '<table class="stat" cellspacing="1">'."\n";
+ echo '<thead><tr>'."\n";
+ echo '<th>'._TANKORNEV.'</th>'."\n";
+ echo '<th>'._MEGTARTOTT_ORASZAM.'</th>'."\n";
+ echo '<th>'._BECSULT_HATRALEVO_ORASZAM.'</th>'."\n";
+ echo '<th>'._BECSULT_OSSZES_ORASZAM.'</th>'."\n";
+ echo '<th>'._TERVEZETT_ORASZAM.'</th>'."\n";
+ if ($mutatHianyzasStat) echo '<th>'._HIANYZAS_ARANY.'</th>'."\n";
+ echo '<th>'._TANKOR_JEGYEK_SZAMA.'</th>'."\n";
+ echo '</tr></thead>'."\n";
+ echo '<tfoot><th colspan="'.(6+($mutatHianyzasStat)).'"></th></tfoot>'."\n";
+
+ if (is_array($tankorStat['tervezett']))
+ foreach ($tankorStat['tervezett'] as $tankorId => $tervezettAdat) {
+ echo '<tbody>';
+ echo '<tr>'."\n";
+
+ echo '<th>';
+ echo $tervezettAdat[0]['tankorNev'];
+ echo '</th>'."\n";
+ echo '<td>';
+ echo $_megtartott=$tankorStat['megtartott'][$tankorId]['oraSzam'];
+ echo '</td>'."\n";
+ echo '<td>';
+ echo $tankorStat['becsult'][$tankorId]['oraSzam'];
+ echo '</td>'."\n";
+ echo '<td>';
+ echo $tankorStat['becsult'][$tankorId]['oraSzam']+$tankorStat['megtartott'][$tankorId]['oraSzam'];
+ echo '</td>'."\n";
+ echo '<td title="'.$tankorStat['tanitasiHetekSzama'][$tankorId].' '._TANITASI_HET.'">';
+ echo $_tervezett=$tervezettAdat['evesOraszam'];
+ echo '</td>'."\n";
+ if ($mutatHianyzasStat) {
+ $_db = $tankorStat['hianyzasStat'][$tankorId]['db'];
+ if (is_numeric($_db) && $_db>0 && intval($_megtartott)>0 && $_tervezett>0) {
+ $_sz1 = number_format($_db*100/$_megtartott,1);
+ $_sz2 = number_format($_db*100/$_tervezett,1);
+ if ($_sz1>30) $_class = ' class="ertesitendo" ';
+ else $_class = '';
+ } else {
+ $_class = '';
+ }
+ echo "<td $_class>";
+ if (is_numeric($_db) && $_db>0) {
+ echo $_db . ' ' . _DB ;
+ if ($_megtartott>0&&$_tervezett>0) echo " ($_sz1% | $_sz2%)";
+ }
+ echo '</td>'."\n";
+ }
+
+ echo '<td>';
+ echo '<span title="'._JEGYEK_SZAMA.'">'.intval($tankorStat['jegyekSzama'][$tankorId]).'</span> / ';
+ echo '<span title="'._LETSZAM.'">'.intval($tankorStat['letszam'][$tankorId]).'</span> / ';
+ echo '<span title="'._HETI_ORASZAM.'">'.$tankorStat['tervezett'][$tankorId]['hetiOraszam'].'</span> = ';
+ echo '<span title="'._JEGYSZAM_PER_FO.'">'.((intval($tankorStat['letszam'][$tankorId])!=0)?number_format($tankorStat['jegyekSzama'][$tankorId]/$tankorStat['letszam'][$tankorId],2):'-').'</span> / ';
+ echo '<span title="'._HETI_ORASZAM.'">'.$tankorStat['tervezett'][$tankorId]['hetiOraszam'].'</span> = ';
+ echo '<span title="'._ATLAGOS_JEGYSZAM.'">'.((intval($tankorStat['letszam'][$tankorId])!=0 && intval($tankorStat['tervezett'][$tankorId]['hetiOraszam'])!=0)?number_format($tankorStat['jegyekSzama'][$tankorId]/$tankorStat['letszam'][$tankorId]/$tankorStat['tervezett'][$tankorId]['hetiOraszam'],2):'- - . -').'</span>';
+ echo '</td>'."\n";
+
+ echo '</tr>'."\n";
+ echo '</tbody>'."\n";
+ }
+
+
+ echo '</table>'."\n";
+
+ }
+
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/haladasi/tankor.phtml b/mayor-orig/www/skin/classic/module-naplo/html/haladasi/tankor.phtml
new file mode 100644
index 00000000..c5b62199
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/haladasi/tankor.phtml
@@ -0,0 +1,54 @@
+<?php
+
+ function putTankorStat($ADAT) {
+
+
+ $sum = 0;
+ $sum = $ADAT['tankorStat']['éves']['órarend']['normál'][0]['db'];
+ $sum += $ADAT['tankorStat']['éves']['órarend']['normál plusz'][0]['db'];
+ $sum += $ADAT['tankorStat']['éves']['órarend']['normál máskor'][0]['db'];
+
+ $n = 0;
+ $n += $ADAT['tankorStat']['éves']['órarend']['elmarad'][0]['db'];
+ $n += $ADAT['tankorStat']['éves']['órarend']['elmarad máskor'][0]['db'];
+ $n += $ADAT['tankorStat']['éves']['órarend']['felügyelet'][0]['db'];
+ $n += $ADAT['tankorStat']['éves']['órarend']['helyettesítés'][0]['db'];
+
+ echo '<h1>Az órák '.$sum*100/($sum+$n).'%-a volt megtartva.</h1>';
+ echo '<h1>'.$n.' óra maradt el.</h1>';
+ //dump($ADAT);
+ return;
+
+ $O = $ADAT['oraAdat'];
+
+ echo '<style type="text/css">
+ .modGomb {
+ background-color: #eeeeee;
+ padding:4px 1em; margin:1em; background-color: #eeeeee; border-radius: 2px; border-style: solid solid solid none; border-width: 1px 1px 1px 1px; border-color: #aaa;
+ }
+ .oraElmarad {background-color: red; color:white;}
+ .oraMegtartva {background-color: green; color:white;}
+ </style>';
+
+ echo '<div style="padding:1em 0em;float:left; margin-right:2em;background-color: #eeeeee; width:294px; border-radius: 0px 4px 4px 0px; border-style: solid solid solid none; border-width: 1px 1px 1px 0px; border-color: #aaa;">';
+ if (is_array($O)) {
+ foreach($ADAT['oraAdat'] as $k => $v) {
+ echo '<div style="width:90px; text-align:right; display:table-cell;">';
+ echo $k;
+ echo '</div>';
+ echo '<div style="width:200px; text-align:left; display:table-cell; padding-left:1em;">';
+ echo $v;
+ echo '</div><div style="clear:both"></div>';
+ }
+ }
+ echo '</div>';
+echo '<h2>Ez a funkció még nem működik!</h2>';
+ echo '<input type="hidden" name="oraId" value="'.$O['oraId'].'" />';
+ echo '<input type="submit" name="oraElmarad" value="'._ELMARAD.'" id="oraElmarad" class="modGomb oraElmarad" />';
+ echo '<input type="submit" name="oraMegtartva" value="'._MEGTARTVA.'" id="oraMegtartva" class="modGomb oraMegtartva" />';
+
+ echo '<div style="clear: both"></div>';
+
+ }
+
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/haladasi/teremModositas.phtml b/mayor-orig/www/skin/classic/module-naplo/html/haladasi/teremModositas.phtml
new file mode 100644
index 00000000..deaaab15
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/haladasi/teremModositas.phtml
@@ -0,0 +1,49 @@
+<?php
+ /* 2010 */
+
+ function putTeremModositas($ADAT) {
+ formBegin();
+
+ foreach (array('dt','ora','tanarId','tankorId','oraId') as $key) {
+ echo '<input type="hidden" name="'.$key.'" value="'.$ADAT[$key].'" />';
+ }
+ unset($key);
+
+ echo '<table class="terem" align="center">';
+ echo '<tr>';
+ echo '<td>';
+ _putOraAdat($ADAT['oraAdat']);
+ echo '</td>';
+ echo '</tr>';
+ echo '<tr><th>';
+ echo '<select name="ujTeremId">';
+ echo '<option value="'.$ADAT['oraAdat']['teremId'].'">'._EREDETI.' ('.$ADAT['oraAdat']['teremId'].')</option>'; // nulla amúgy sincs
+ foreach($ADAT['szabadTerem'] as $key) {
+ $_SEL = ($key['teremId'] == $ADAT['oraAdat']['teremId']) ? ' selected="selected" ' : '';
+ $_CLASS = ($ADAT['tankorLetszam']>$key['ferohely']) ? ' class="nemferbe" ' : ' ';
+ echo '<option '.$_CLASS.' value="'.$key['teremId'].'">'.$key['leiras'].' '.$key['tipus'].' ('.$key['ferohely'].' '._HELY.') '.'</option>';
+ }
+ echo '</select>';
+ echo '<input type="hidden" name="action" value="teremModosit" />';
+ echo '<input type="submit" name="kuld" value="'._OK.'" />';
+ echo '</th></tr>';
+ echo '</table>';
+
+ formEnd();
+ }
+
+ function _putOraAdat($OA) {
+ /* Példa
+ array(13) { ["oraId"]=> string(5) "36513" ["dt"]=> string(10) "2010-03-25" ["ora"]=> string(1) "6" ["ki"]=> string(2) "81" ["kit"]=> NULL ["tankorId"]=> string(4) "1267" ["teremId"]=> NULL ["leiras"]=> NULL ["tipus"]=> string(7) "normál" ["eredet"]=> string(8) "órarend" ["kiCn"]=> string(16) "Ábrám László" ["kitCn"]=> string(0) "" ["tankorNev"]=> string(25) "7-8. fizika szakkör ALAP" }
+ */
+ echo '<table align="center" class="terem oraAdat" cellspacing="1">';
+ foreach(array('oraId','dt','ora','tankorNev','kiCn','kitCn','teremId') as $key) {
+ echo '<tr>';
+ echo '<th>'.constant('_'.strtoupper($key)).'</th>';
+ echo '<td>'.$OA[$key].'</td>';
+ echo '</tr>';
+ }
+ echo '</table>';
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/hianyzas/diak.phtml b/mayor-orig/www/skin/classic/module-naplo/html/hianyzas/diak.phtml
new file mode 100644
index 00000000..f8355eb3
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/hianyzas/diak.phtml
@@ -0,0 +1,226 @@
+<?php
+
+ function putDiakHianyzasNaptar($ADAT) {
+
+ global $aHetNapjai,$Honapok;
+
+ $HTIPUSOK1 = array('','késés','hiányzás');
+ $HTIPUSOK2 = array('felszerelés hiány','felmentés','egyenruha hiány');
+ // nincs használatban??? // $ITIPUSOK = getEnumField('naplo', 'hianyzas', 'igazolas'); // ez inkább a pre be lenne való?
+
+ $NAPOK = $ADAT['napok'];
+
+ echo '<table class="naptar" cellspacing="0" align="center">'."\n";
+
+ echo '<thead>'."\n";
+ echo '<tr>';
+ echo '<th colspan="7">';
+ //echo '<a href="'.href('index.php?page=naplo&sub=hianyzas&f=tanuloLista&diakId='.$diakId).'">';
+ echo $ADAT['diak']['nev'];
+ if (is_array($ADAT['diak']['kepzes'])) {
+ echo ' ';
+ for ($j=0; $j<count($ADAT['diak']['kepzes'][$ADAT['diakId']]); $j++) {
+ echo '<span class="kepzes">';
+ echo $ADAT['diak']['kepzes'][$ADAT['diakId']][$j]['kepzesNev'];
+ echo '</span>';
+ }
+ }
+ //echo '</a>';
+ echo ' ';
+ echo '<a href="'.href('index.php?page=naplo&sub=hianyzas&f=osztaly&osztalyId='.$ADAT['osztalyId']).'">';
+ echo $ADAT['osztaly']['osztalyJel'];
+ echo ' '.$ADAT['osztaly']['leiras'];
+ echo '</a>';
+ echo '</th>';
+ echo '</tr>';
+ echo '</thead>'."\n";
+
+ echo '<tfoot>'."\n";
+ //echo '<tr>';
+ // echo '<th colspan="7">';
+ // echo $NAPOK[0]['dt'].' '.$NAPOK[count($NAPOK)-1]['dt'];
+ // echo '</th>';
+ //echo '</tr>';
+ if (defined('__STATUS_HATARIDO')) {
+ echo '<tr>';
+ echo '<th colspan="7">';
+ echo _MARNEMIGAZOLHATO.': '.__STATUS_HATARIDO.', ';
+ echo _BEIRHATO.': '. __BEIRAS_HATARIDO;
+ echo '</th>';
+ echo '</tr>';
+ }
+ // igazolás típusának váltása
+ if ( defined('__STATUS_HATARIDO') && (__NAPLOADMIN || __OFO || __VEZETOSEG) ) {
+ echo '<tr>';
+ echo '<td colspan="7">';
+ formBegin();
+ echo '<input type="hidden" name="diakId" value="'.$ADAT['diakId'].'" />';
+ echo '<input type="hidden" name="ho" value="'.$ADAT['ho'].'" />';
+// #echo '<input type="hidden" name="igDt" value="'.$igDt.'" />';
+ echo '<input type="hidden" name="action" value="igazolasTipusValtas" />';
+ echo '<select name="igazolas" class="onChangeSubmit">';
+ for ($i=0; $i<count($ADAT['igazolasTipusok']['engedelyezett']); $i++) {
+ $_SEL = ($ADAT['igazolas'] == $ADAT['igazolasTipusok']['engedelyezett'][$i]) ? ' selected="selected" ':'';
+ echo '<option value="'.$ADAT['igazolasTipusok']['engedelyezett'][$i].'" '.$_SEL.'>';
+ if ($ADAT['igazolasTipusok'][$ADAT['igazolasTipusok']['engedelyezett'][$i]]!='') {
+ echo $ADAT['igazolasTipusok'][$ADAT['igazolasTipusok']['engedelyezett'][$i]];
+ } else {
+ $ADAT['igazolasTipusok']['engedelyezett'][$i].' (-)';
+ }
+ echo '</option>';
+ }
+ echo '</select>';
+ formEnd();
+ echo '</td>';
+ echo '</tr>';
+ }
+ echo '</tfoot>'."\n";
+
+
+ ## első hó fejléce
+ $dow = date('w',strtotime($NAPOK[0]['dt']));
+ $ho = date('m',strtotime($NAPOK[0]['dt']));
+ if ($dow==0) $dow=7;
+ echo '<tbody>'."\n";
+ echo '<tr><th colspan="7" class="fejlec">'.$Honapok[($ho-1)].'</th></tr>'."\n";
+ echo '<tr>';
+ for($nap=0; $nap<7; $nap++) {
+ echo '<th class="fej2">'.$aHetNapjai[$nap].'</th>';
+ }
+ echo '</tr>'."\n";
+ echo '<tr>';
+ for($nap=1; $nap<$dow; $nap++) {
+ echo '<td class="uresnap"></td>';
+ }
+
+ for($i=0; $i<count($NAPOK); $i++) {
+ $dt = $NAPOK[$i]['dt'];
+ $dow = date('w',strtotime($dt));
+ $_ho = date('n',strtotime($dt));
+ if ($dow==0) $dow=7;
+
+ if (strtotime($dt)>time()) $future = true;
+
+ // Hónapváltás
+ if ($_ho!=$ho) {
+ $ho=$_ho;
+ if ($dow!=7) {
+ for($nap=$dow; $nap<=7; $nap++) {
+ echo '<td class="uresnap"></td>';
+ }
+ echo '</tr>';
+ }
+ echo '</tbody>'."\n";
+ echo '<tbody>'."\n";
+ echo '<tr><th colspan="7" class="fejlec">'.$Honapok[($ho-1)].'</th></tr>'."\n";
+ echo '<tr>';
+ for($nap=0; $nap<7; $nap++) {
+ echo '<th class="fejlec">'.$aHetNapjai[$nap].'</th>';
+ }
+ echo '</tr>'."\n";
+ echo '<tr>';
+ for($nap=1; $nap<$dow; $nap++) {
+ echo '<td class="uresnap"></td>';
+ }
+ } // hónapváltás vége
+
+ if ($dow==1) echo '<tr>';
+
+ // Egy nap
+ echo '<td class="egynap">';
+ {
+ if (in_array($NAPOK[$i]['tipus'], array('tanítási nap','speciális tanítási nap'))) {
+ _putHianyzasNap($ADAT,array('dt'=>$NAPOK[$i]['dt']),$ADAT['igazolas'],$future);
+ } else {
+ //if ($NAPOK[$i]['megjegyzes']!='')
+ echo '<div class="spec '.str_replace(' ','_',$NAPOK[$i]['tipus']).'">'.$NAPOK[$i]['megjegyzes'].'</div>';
+ }
+ }
+ echo '</td>'."\n";
+ // -------------------------------------------------
+
+ if ($dow==7) echo '</tr>';
+
+ } // kirakandó dátumok vége
+
+ if ($dow!=7) {
+ for($nap=$dow+1; $nap<=7; $nap++) {
+ echo '<td class="uresnap"></td>';
+ }
+ echo '</tr>'."\n";
+ }
+ echo '</tbody>'."\n";
+
+
+ echo '</table>';
+
+ }
+
+
+ function _putHianyzasNap($ADAT,$NAPADAT,$igazolas,$future) {
+
+ global $napiMinOra, $napiMaxOra;
+
+ $diakId = $ADAT['diakId'];
+ $dt = $NAPADAT['dt'];
+ echo '<table class="tanuloEgyNapja hianyzasNaptar" cellspacing="1" cellpadding="1" border="0">';
+ echo '<tr>';
+ if (defined('__STATUS_HATARIDO') && (__OFO || __VEZETOSEG || __NAPLOADMIN) && strtotime(__STATUS_HATARIDO) < strtotime($dt) && !$future) {
+ echo '<th class="balgomb">';
+ formBegin();
+ echo '<input type="hidden" name="diakId" value="'.$diakId.'" />';
+ echo '<input type="hidden" name="dt" value="'.$dt.'" />';
+ echo '<input type="hidden" name="status" value="igazolatlan" />';
+ echo '<input type="hidden" name="igazolas" value="" />';
+ echo '<input type="hidden" name="action" value="napiHianyzasBeiras" />';
+ echo '<input type="submit" value="H" class="H" />';
+ formEnd();
+ echo '</th>'."\n";
+ echo '<th class="balgomb">';
+ formBegin();
+ echo '<input type="hidden" name="diakId" value="'.$diakId.'" />';
+ echo '<input type="hidden" name="dt" value="'.$dt.'" />';
+ echo '<input type="hidden" name="status" value="igazolt" />';
+ echo '<input type="hidden" name="igazolas" value="'.$igazolas.'" />';
+ echo '<input type="hidden" name="action" value="napiHianyzasBeiras" />';
+ echo '<input type="submit" value="I" class="I" />';
+ formEnd();
+ echo '</th>';
+ } else { // nincs joga igazolni
+ echo '<th colspan="2" class="balgombokhelye"></th>'."\n";
+ }
+ echo '<th class="datum">';
+ echo '&nbsp;'.date('j',strtotime($NAPADAT['dt'])).'&nbsp;';
+ echo '</th>'."\n";
+ echo '<th class="jobbgomb">';
+ if (!$future) {
+ formBegin(array('action'=>href('index.php?page=naplo&sub=hianyzas&f=nap')));
+ echo '<input type="hidden" name="diakId" value="'.$diakId.'" />';
+ echo '<input type="hidden" name="dt" value="'.$NAPADAT['dt'].'" />';
+ echo '<input type="hidden" name="action" value="" />';
+ echo '<input type="submit" value="&rarr;" />';
+ formEnd();
+ }
+ echo '</th>';
+ echo '</tr>';
+ echo '<tr>';
+ echo '<td colspan="4">';
+
+ if ((__OFO || __NAPLOADMIN || __VEZETOSEG)) {
+ $allowed=true;
+ } else $allowed = false;
+ $href= 'index.php?diakId='.$diakId.'&igazolas='.$igazolas.'&page=naplo&sub=hianyzas&f=diak&action=statusModositas';
+
+ if (!$future) _putHianyzasKistabla(
+ $ADAT['hianyzasok'][$ADAT['diakId']],
+ array('dt' => $dt),
+ array('href' => $href, 'allowed' => $allowed, 'napiMinOra' => $napiMinOra, 'napiMaxOra' => $napiMaxOra)
+ );
+
+ echo '</td>';
+ echo '</tr>';
+ echo '</table>'."\n";
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/hianyzas/diakIgazolatlan.phtml b/mayor-orig/www/skin/classic/module-naplo/html/hianyzas/diakIgazolatlan.phtml
new file mode 100644
index 00000000..c2343043
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/hianyzas/diakIgazolatlan.phtml
@@ -0,0 +1,42 @@
+<?php
+
+ function putDiakIgazolatlan($ADAT) {
+
+ echo '<table class="igazolatlan" cellspacing="1">'."\n";
+// echo '<thead>'."\n";
+ echo '<tr class="fej">';
+ echo '<th>'._DATUM.'</th>';
+ echo '<th>'._ORA.'</th>';
+ echo '<th>'._TIPUS.'</th>';
+ echo '<th>'._PERC.'</th>';
+ echo '</tr>'."\n";
+// echo '</thead>'."\n";
+// echo '<tbody>'."\n";
+
+ $hDb = $perc = 0;
+ foreach ($ADAT['igazolatlan'] as $iAdat) {
+
+ if ($iAdat['tipus'] == 'késés') $perc += $iAdat['perc'];
+ else $hDb++;
+ echo '<tr>';
+ echo '<td>'.str_replace('-','.',$iAdat['dt']).'.</td>';
+ echo '<td>'.$iAdat['ora'].'</td>';
+ echo '<td>'.$iAdat['tipus'].'</td>';
+ echo '<td>'.($iAdat['tipus'] == 'késés'?$iAdat['perc']:'').'</td>';
+ echo '</tr>';
+
+ }
+// echo '</tbody>'."\n";
+// echo '<tfoot>'."\n";
+ echo '<tr class="lab">';
+ echo '<th>'._HIANZASOK_SZAMA.':</th>';
+ echo '<td>'.$hDb.'</td>';
+ echo '<th>'._KESESEK_OSSZESEN.':</th>';
+ echo '<td>'.$perc.'</td>';
+ echo '</tr>'."\n";
+// echo '</tfoot>'."\n";
+ echo '</table>'."\n";
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/hianyzas/diakLista.phtml b/mayor-orig/www/skin/classic/module-naplo/html/hianyzas/diakLista.phtml
new file mode 100644
index 00000000..4335f38c
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/hianyzas/diakLista.phtml
@@ -0,0 +1,50 @@
+<?php
+
+ function putDiakHianyzasLista($ADAT) {
+
+ global $aHetNapjai;
+ //re
+ $_N = $ADAT['napok'];
+ for ($i=0; $i<count($_N); $i++) {
+ $NAPOK[$_N[$i]['dt']] = $_N[$i];
+ }
+ unset($_N);
+
+ if (is_array($ADAT['hianyzasok'][$ADAT['diakId']])) {
+ echo '<table class="hianyzasLista" cellspacing="1" cellpadding="1" align="center">';
+ echo '<caption>'.$ADAT['diak']['nev'].'</caption>';
+ foreach ($ADAT['hianyzasok'][$ADAT['diakId']] as $dt => $T) {
+ echo '<tr>';
+ echo '<th colspan="8">';
+ echo str_replace('-','.',$dt) .'. '. $aHetNapjai[date('w',strtotime($dt))-1];
+ echo ' '.$NAPOK[$dt]['megjegyzes'].' ('.$NAPOK[$dt]['orarendiHet'].'. '.__HET.')'; // tipus, megjegyzes, orarendiHet
+ formBegin(array('class'=>'nyil','action'=>href('index.php?page=naplo&sub=hianyzas&f=nap')));
+ echo '<input type="hidden" name="diakId" value="'.$ADAT['diakId'].'" />';
+ echo '<input type="hidden" name="dt" value="'.$dt.'" />';
+ echo '<input type="hidden" name="action" value="nem csinálunk semmit" />';
+ echo '<input type="submit" value="&rarr;" />';
+ formEnd();
+ echo '</th>';
+ echo '</tr>';
+ foreach($T as $ora => $D) {
+ for ($i=0; $i<count($D); $i++) {
+
+ $ORAADAT = getOraAdatById($D[$i]['oraId']); // ezt nem itt!
+
+ echo '<tr>';
+ echo '<td>'.$D[$i]['ora'].'.</td>';
+ echo '<td class="'.ekezettelen($D[$i]['tipus']).'">'.$D[$i]['tipus'].($D[$i]['tipus'] == 'késés'?' ('.$D[$i]['perc'].' '._PERC.')':'').'</td>';
+ echo '<td class="'.ekezettelen($D[$i]['statusz']).'">'.$D[$i]['igazolas'].'</td>';
+ echo '<td>'.$ORAADAT['kiCn'].'</td>';
+ echo '<td>'.$ORAADAT['leiras'].'</td>';
+ echo '<td>'.$ORAADAT['tipus'].'</td>';
+ echo '<td>'.$ORAADAT['tankorNev'].'</td>';
+ echo '</tr>'."\n";
+ }
+ }
+ }
+ echo '</table>';
+ }
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/hianyzas/info.phtml b/mayor-orig/www/skin/classic/module-naplo/html/hianyzas/info.phtml
new file mode 100644
index 00000000..14b7acec
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/hianyzas/info.phtml
@@ -0,0 +1,96 @@
+<?php
+
+ function putDiakHianyzasInfo($ADAT) {
+ if (__ALLOW_3RDPARTY_APPS===true) {
+ echo "\n\n<!-- We are using Google Chart API! Thank You! http://code.google.com/apis/chart/terms.html -->\n\n";
+ reset($ADAT);
+ $i=0;
+ foreach($ADAT as $dt => $D) {
+ $d = $D['hianyzokSulyozva'];
+ if ($d!=-1) $Goo_Data[] = $d;
+ if ($d!=-1) $Goo_Data2[] = $D['hianyzokTanulmanyin'];
+ if ($d!=-1) $Goo_Data3[] = $d - $D['hianyzokTanulmanyin'];
+ if ($mx<$d) $mx = $d;
+ }
+ $Goo_Data = array_reverse($Goo_Data,false);
+ $Goo_Data2 = array_reverse($Goo_Data2,false);
+ $Goo_Data3 = array_reverse($Goo_Data3,false);
+ echo '<div style="text-align: center">';
+# echo '<img src="http://chart.apis.google.com/chart?chco=667766&cht=lc&chs=500x150&chd=t:'.implode(',',$Goo_Data).'&chds=0,'.($mx+1).'&chxt=y&chxl=0:|0|'.($mx+1).'&chtt=Hiányzók+alakulása+(becslés)" alt="Google Chart" />';
+ echo '<img src="http://chart.apis.google.com/chart?chco=00ff00,7777ff,872879&cht=lc&chs=810x180&chm=D,872879,2,0,4&chd=e:'.
+ googEE($Goo_Data,$mx+1,0).','.
+ googEE($Goo_Data2,$mx+1,0).','.
+ googEE($Goo_Data3,$mx+1,0).
+ '&chds=0,'.($mx+1).'&chxt=y&chxl=0:|0|'.($mx+1).'&chtt=Hiányzók+alakulása+a+megadott+intervallumban+(becslés)'.
+ '&chdl=becslés|tanulmányi+versenyzők|különbség'.
+ '&chg=2.7,10,1,1,0,0'.
+ '&scg=20,50,1,5" alt="Google Chart" />';
+ echo '</div>';
+
+echo '
+ <div id="chart_div"></div>
+';
+
+ }
+ reset($ADAT);
+ echo '<table align="center" class="info" cellspacing="1">';
+ echo '<thead>';
+ echo '<tr><th>Nap</th>
+ <th>Hány diák hiányzott? (Becslés)</th>
+ <th>Az órák hány százalékán volt hiányzó?</th>
+ <th>Tanulmányi verseny miatt igazolt<br/>(db diák) - pontos érték</th></tr>'."\n";
+ echo '</thead>';
+ echo '<tfoot><tr><th colspan="4">A statisztika '.date('Y-m-d H:i:s').'-kor készült'.'</th></tr></tfoot>';
+ echo '<tbody>';
+ foreach($ADAT as $dt => $D) {
+ list($y,$m,$d) = explode('-',$dt);
+ $w = date('w',strtotime($dt));
+ echo '<tr class="nap'.$w.'">';
+ echo '<th>'.$y.'.'.intval($m).'.'.intval($d).'.</th>';
+ echo '<td>'.$D['hianyzokSulyozva'].'</td>'."\n";
+ echo '<td>'.$D['oranHianyzasSzazalek'].'%</td>'."\n";
+ echo '<td>'.$D['hianyzokTanulmanyin'].'</td>'."\n";
+ echo '</tr>';
+ }
+ echo '</tbody>';
+ echo '</table>'."\n\n";
+
+ }
+
+
+/**
+ * Encode an array of integers according to Google's Extended Encoding
+ * Scales to largest value in array if $max is not set, truncates lower bound if $min is set
+ * Does NOT set the 'e:' prefix so it can be called when creating multiple data series
+ * @link http://code.google.com/apis/chart/formats.html#extended
+ * @param array $values
+ * @param integer $max
+ * @param integer $min
+ * @return string
+ * @author Marcus Bointon <marcus@synchromedia.co.uk>
+ */
+function googEE($values, $max = -1, $min = 0) {
+ $encoding = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-.';
+ $rangemax = 4095;
+ $chartdata = '';
+ if ($max < 0) {
+ $max = max($values);
+ }
+ //If max is smaller than the largest value, it will go beyond range allowed by the encoding (0..4095)
+ if ($max < max($values)) {
+ $max = max($values);
+ }
+ $range = $max - $min;
+ $scale = $rangemax / $range;
+ foreach ($values as $k => $v){
+ if ($v >= $min && $v <= $max) {
+ $scaledvalue = ($v - $min) * $scale;
+ $chartdata .= $encoding[floor($scaledvalue / 64)].$encoding[$scaledvalue % 64];
+ } else {
+ $chartdata .= '__'; // Value out of max range;
+ }
+ }
+ return($chartdata);
+}
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/hianyzas/nap.phtml b/mayor-orig/www/skin/classic/module-naplo/html/hianyzas/nap.phtml
new file mode 100644
index 00000000..77aa94d3
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/hianyzas/nap.phtml
@@ -0,0 +1,252 @@
+<?php
+
+ function putHianyzok($ADAT) {
+
+ $napiMinOra = $ADAT['napiMinOra'];
+ $napiMaxOra = $ADAT['napiMaxOra'];
+ // make assoc
+ if (is_array($ADAT['hianyzasok']))
+ foreach ($ADAT['hianyzasok'] as $_diakId => $_DN)
+ foreach ($_DN as $_dt => $_DO)
+ foreach($_DO as $ora => $_D)
+ for ($i=0; $i<count($_D); $i++) {
+ $HADAT[$_D[$i]['ora']][$_D[$i]['diakId']][$_D[$i]['tipus']] = $_D[$i];
+ $UJHADAT[$_D[$i]['oraId']][$_D[$i]['diakId']][$_D[$i]['tipus']] = $_D[$i];
+ }
+
+ for ($i=0; $i<count($ADAT['nevsor']['adatok']); $i++) {
+ $D = $ADAT['nevsor']['adatok'][$i];
+ $RESZLETEK[$D['tankorId']] = $D;
+ }
+
+ $HTIPUSOK1 = array('','késés','hiányzás');
+ if (__EGYENRUHA_HIANY_REGISZTRALAS === true) $HTIPUSOK2 = array('egyenruha hiány','felszerelés hiány','felmentés');
+ else $HTIPUSOK2 = array('','felszerelés hiány','felmentés');
+ $ITIPUSOK = getEnumField('naplo', 'hianyzas', 'igazolas'); // ez inkább a pre be lenne való?
+
+ $dt = $ADAT['dt'];
+ $_diakId = $diakId = $ADAT['diakId'];
+
+ $JOGOSULTSAG = $ADAT['jogosultsag'];
+ $JOGADAT = $JOGOSULTSAG[$diakId]['igazolas'];
+
+ formBegin();
+ echo '<table align="center" cellspacing="1" cellpadding="1" class="csoportNevsorHianyzok">'."\n";
+ echo '<thead>';
+ echo '<tr><th colspan="9" class="neve">';
+ echo '<a href="'.href('index.php?page=naplo&sub=hianyzas&f=diak&diakId='.$diakId).'" title="'.$ADAT['diakJogviszony'].'">';
+ echo $ADAT['diak']['nev'];
+ echo '</a>';
+ if (!__DIAK) {
+ echo ' ';
+ echo '<a href="'.href('index.php?page=naplo&sub=hianyzas&f=osztaly&osztalyId='.$ADAT['osztaly']['osztalyId']).'">';
+ echo $ADAT['osztaly']['osztalyJel'];
+ echo ' '.$ADAT['osztaly']['leiras'];
+ echo '</a>';
+ }
+ echo '</th><th>';
+ _putHianyzasKistabla($ADAT['hianyzasok'][$_diakId], array('dt'=>$dt), array('napiMinOra' => $napiMinOra, 'napiMaxOra' => $napiMaxOra));
+ echo '</th></tr>';
+ echo '<tr><th></th><th colspan="2">'._TANKOR.'</th><th>'._J.'</th><th>'._K.'</th><th>'._H.'</th><th>'.EH.'</th><th>'._F.'</th><th>'._FM.'</th><th>'._IGAZOLT.'</th></tr>';
+ echo '</thead>';
+ echo '<tfoot>';
+ echo '<tr><th colspan="11">';
+ echo '<input type="submit" name="gomb" value="'._OK.'" />';
+ echo '<input type="hidden" name="action" value="hianyzokRogzitese" />';
+ echo '<input type="hidden" name="diakId" value="'.$diakId.'" />';
+ echo '<input type="hidden" name="dt" value="'.$dt.'" />';
+ echo '</th></tr>';
+ echo '</tfoot>';
+
+ echo '<tbody>';
+
+ for ($ora = __MIN_ORA; $ora <= __MAX_ORA; $ora++) {
+ $JOG = $JOGOSULTSAG[$diakId]['orak'][$ora];
+ if (!is_array($ADAT['orak'][$dt][$ora]))
+ {
+ $tankorId='';
+ $OA = false;
+ } else {
+
+ while (
+ list($tankorId,$OA) = each($ADAT['orak'][$dt][$ora])
+ ) {
+ $_tankorTipusId = $ADAT['tankorok'][$tankorId][0]['tankorTipusId'];
+ $_TT = $ADAT['tankorTipus'][$_tankorTipusId];
+ $_class = str_replace(' ','_',ekezettelen( $_TT['rovidNev'] )).' '.ekezettelen(str_replace(' ','',$ADAT['diakJogviszony']));
+ $_oraId = $OA['oraId'];
+ echo '<tr class="'.$_class.'">';
+ echo '<td>';
+ echo $ora.'.';
+ echo '</td>';
+ echo '<td colspan="2">';
+ echo '<a href="'.href('index.php?page=naplo&sub=hianyzas&f=ora&oraId='.$OA['oraId']).'" title="'.$ADAT['tankorok'][$tankorId][0]['tankorTipus'].'" >';
+ echo $ADAT['tankorok'][$tankorId][0]['tankorNev'];
+ echo ' '.$_TT['rovidNev'];
+ echo '</a>';
+ echo '</td>';
+
+ if (in_array($OA['tipus'],array('elmarad','elmarad máskor'))) {
+ echo '<th colspan="6">'.$OA['tipus'].'</th>';
+ } else {
+ $oraAlolFelmentve = false;
+ if (in_array($tankorId,array_keys($ADAT['felmentett']))) {
+ for ($i = 0; $i < count($ADAT['felmentett'][$tankorId]); $i++) {
+ if (
+ $ADAT['felmentett'][$tankorId][$i]['felmentesTipus']=='óralátogatás alól'
+ && ($ora == $ADAT['felmentett'][$tankorId][$i]['ora']
+ || is_null($ADAT['felmentett'][$tankorId][$i]['ora'])
+ )
+ ) $oraAlolFelmentve = true;
+ }
+ }
+ if ($_TT['regisztralando'] == 'igen'
+ && !$oraAlolFelmentve
+ && (in_array($ADAT['diakJogviszony'], array('jogviszonyban van','vendégtanuló'))
+ || ($ADAT['diakJogviszony']=='magántanuló' && $_TT['jelleg']=='gyakorlat')
+ )
+ ) {
+ $_igtipus='';
+ /* prepare data */
+ reset($HTIPUSOK1);
+ $__jelen=true;
+ foreach ($HTIPUSOK1 as $j => $_tipus) {
+ if ($UJHADAT[$_oraId][$_diakId][$_tipus]['hianyzasId']!='') $__jelen=false;
+ }
+ /* -- */
+ reset($HTIPUSOK1);
+ foreach ($HTIPUSOK1 as $j => $_tipus) {
+ $_disp='';
+ //$_hid = $HADAT[$ora][$_diakId][$_tipus]['hianyzasId'];
+ $_hid = $UJHADAT[$_oraId][$_diakId][$_tipus]['hianyzasId'];
+ if ($_hid!='') $_igtipus = $_tipus;
+ if ($_tipus=='') $_csstipus='jelen'; else $_csstipus=$_tipus;
+ echo '<td class="'.$_csstipus.'">';
+ if ($JOG['beirhato']==true) {
+ $_radio = ($_hid!='' || ($_tipus=='' && $__jelen)) ?'checked="checked"' : '';
+ if ($_tipus=='késés') {
+ $_perc = intval(($UJHADAT[$_oraId][$_diakId][$_tipus]['perc']));
+ $_kesett = ($_perc>0) ? ' kesett':'';
+ echo '<input class="perc'.$_kesett.'" type="text" maxlength="2" size="1" name="PERC_'.$_oraId.'" value="'.$_perc.'" />';
+ $_disp = 'style="display:none"';
+ }
+ echo '<input type="radio" id="'.$_tipus.'_HIANYZOK1_'.$_oraId.'" name="HIANYZOK1_'.$_oraId.'" value="'.$_diakId.'/'.$dt.'/'.$ora.'/'.$_tipus.'/'.$_hid.'" '. $_radio . ' '.$_disp.'/>';
+ } else {
+ if (($__jelen && $_tipus=='') || $_hid!='') {
+ if ($_hid!='') echo '<input type="hidden" name="HIANYZOK1_'.$_oraId.'" value="'.$_diakId.'/'.$dt.'/'.$ora.'/'.$_tipus.'/'.$_hid.'"/>';
+ if ($_tipus=='késés' && ($_perc = intval(($UJHADAT[$_oraId][$_diakId][$_tipus]['perc']))) != 0) {
+ echo '<span class="perc">'.$_perc.'</span>';
+ } else {
+ _putImg($_tipus,$__jelen);
+ }
+ }
+ }
+ echo '</td>';
+ }
+ if ($JOG['fbeirhato']==true) {
+/*
+ echo '<td colspan="'.count($HTIPUSOK2).'" class="fbetus" >';
+ echo '<select id="HIANYZOK2_'.$_oraId.'" name="HIANYZOK2_'.$_oraId.'">';
+ echo '<option value="'.$_diakId.'/"></option>';
+ foreach ($HTIPUSOK2 as $j => $_tipus) {
+ $_hid = $UJHADAT[$_oraId][$_diakId][$_tipus]['hianyzasId'];
+ $_radio = ($_hid!='') ?'selected="selected"' : '';
+ echo '<option value="'.$_diakId.'/'.$dt.'/'.$ora.'/'.$_tipus.'/'.$_hid.'" '. $_radio .'>'.$_tipus.'</option>';
+ }
+ echo '</select>';
+ echo '</td>';
+*/
+ foreach ($HTIPUSOK2 as $j => $_tipus) {
+ echo '<td title="'.$_tipus.'" class="fbetus">';
+
+ //$_hid = $HADAT[$ORAADAT['oraId']][$_diakId][$_tipus]['hianyzasId'];
+ $_hid = $UJHADAT[$_oraId][$_diakId][$_tipus]['hianyzasId'];
+ if ($_tipus != '') {
+ if ($_hid != '') $chk = ' checked="checked" '; else $chk = '';
+ echo '<input type="checkbox" id="HIANYZOK'.($j+10).'_'.$_oraId.'" name="HIANYZOK'.($j+10).'_'.$_oraId.'" value="'.$_diakId.'/'.$dt.'/'.$ora.'/'.$_tipus.'/'.$_hid.'"'.$chk.' />';
+ }
+ echo '</td>';
+ }
+
+
+ } else {
+ echo '<td colspan="'.count($HTIPUSOK2).'" class="fbetus" >';
+ foreach ($HTIPUSOK2 as $j => $_tipus) {
+ $_hid = $UJHADAT[$_oraId][$_diakId][$_tipus]['hianyzasId'];
+ if ($_hid!='') {
+ echo '<input type="hidden" name="HIANYZOK2_'.$_oraId.'" value="'.$_diakId.'/'.$dt.'/'.$ora.'/'.$_tipus.'/'.$_hid.'" '. $_radio .'/>';
+ echo $_tipus;
+ }
+ }
+ echo '</td>';
+ }
+ echo '<td>';
+ _putIgazolasSelect($UJHADAT[$_oraId][$_diakId][$_igtipus], $ITIPUSOK,$JOG,$JOGADAT,array('diakId'=>$_diakId,'oraId'=>$ORAADAT['oraId'],'hianyzasId'=>$_hid));
+ echo '</td>';
+ } else { // nem kötelező bejárnia
+ if ($ADAT['diakJogviszony'] == 'magántanuló') {
+ echo '<td class="nemkot" colspan="'.(count($HTIPUSOK2)+count($HTIPUSOK2)+count($ITIPUSOK)).'">';
+ echo $ADAT['diakJogviszony'];
+ echo '</td>'."\n";
+ } else {
+ echo '<td class="nemkot" colspan="'.(count($HTIPUSOK2)+count($HTIPUSOK2)+count($ITIPUSOK)).'">';
+ if ($tankorId!='') echo _NEM_REGISZTRALANDO;
+ echo '</td>'."\n";
+ }
+ } // bejárnia kell-e
+ } //oratipusa normál, helyettesites, felugyelet
+ echo '</tr>';
+ } // r516 óta
+ }
+ //$i++;
+ }
+ echo '</tbody>';
+ echo '</table>';
+
+ formEnd();
+
+ }
+
+ function _putIgazolasSelect($ADAT,$TIPUSOK,$JOG,$JOGADAT,$SET) {
+ //"'.$_diakId.'/'.$dt.'/'.$ora.'/'.$_tipus.'/'.$_hid.'"
+ if (is_array($ADAT)) {
+ if ($JOG['igazolhato']===true) {
+ echo '<select name="IGAZOLAS[]">';
+ echo '<option value="'.$SET['diakId'].'////'.$ADAT['hianyzasId'].'">'._IGAZOLATLAN.'</option>';
+ for($i=0; $i<count($TIPUSOK); $i++){
+ $_SEL = ($ADAT['igazolas']==$TIPUSOK[$i]) ? ' selected="selected"':'';
+ if (in_array($TIPUSOK[$i], $JOGADAT['tipusok'])) {
+ echo '<option value="'.$SET['diakId'].'///'.$TIPUSOK[$i].'/'.$ADAT['hianyzasId'].'" '.$_SEL.'>'.$TIPUSOK[$i].'</option>';
+ }
+ }
+ // és a kieg, ha elfogyott volna, de ez még azzal van igazolva:
+ if (!in_array($ADAT['igazolas'],$JOGADAT['tipusok']) && $ADAT['statusz']!='igazolatlan') {
+ echo '<option value="" selected="selected">'.$ADAT['igazolas'].'</option>';
+ }
+ echo '</select>';
+ } else {
+ echo $ADAT['igazolas'];
+ }
+ }
+
+ }
+
+ function _putOraAdat($ORAADAT) {
+ echo '<table align="center" class="oraAdat">';
+ echo '<tr><td>';
+ echo $ORAADAT['dt'].', '.$ORAADAT['ora'].'. ('.$ORAADAT['oraId'].')';
+ echo '</td><td>';
+ echo $ORAADAT['tankorNev'].' - '.$ORAADAT['kiCn'];
+ echo '</td></tr><tr><th colspan="2">';
+ echo $ORAADAT['leiras'];
+ echo '</td></tr>';
+ echo '</table>';
+ }
+
+ function _putImg($tipus,$jelen) {
+ if ($jelen && $tipus=='') echo '<img src="/skin/classic/module-naplo/img/hianyzas/green.gif" alt="x" />';
+ elseif ($tipus=='késés') echo '<img src="/skin/classic/module-naplo/img/hianyzas/yellow.gif" alt="x" />';
+ elseif ($tipus=='hiányzás') echo '<img src="/skin/classic/module-naplo/img/hianyzas/red.gif" alt="x" />';
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/hianyzas/oktstat.phtml b/mayor-orig/www/skin/classic/module-naplo/html/hianyzas/oktstat.phtml
new file mode 100644
index 00000000..373de446
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/hianyzas/oktstat.phtml
@@ -0,0 +1,133 @@
+<?php
+
+ function putOktoberiStatisztika($ADAT) {
+
+ putStat_a04t17($ADAT);
+ putStat_a04t79($ADAT);
+ putStat_a04t83($ADAT);
+
+ }
+ function putSTat_a04t79($ADAT) {
+ $stat = 'a04t79';
+ $D = $ADAT[$stat];
+
+ echo '<div class="oktstatszam">'.$stat.'</div>';
+ echo 'nem kompatibilis nézet'; //--TODO: a tábláazt pont fordítva van!
+
+ if (is_array($ADAT['osszes'][0])) {
+ //if (!is_array($ADAT['osszes'][0])) return false;
+
+ $KEYS = array_keys($ADAT['osszes'][0]);
+
+ echo '<table class="info" align="center">';
+ echo '<thead>';
+ echo '<tr><th colspan="'.count($KEYS).'">Összes</th></tr>'."\n";
+ echo '<tr>';
+ for($i=0; $i<count($KEYS); $i++) {
+ echo '<th>'.$KEYS[$i].'</th>';
+ }
+ echo '</tr>';
+ echo '</thead>';
+ echo '<tfoot>';
+ echo '<tr>';
+ for($i=0; $i<count($KEYS); $i++) {
+ echo '<th>'.$KEYS[$i].'</th>';
+ }
+ echo '</tr>';
+ echo '</tfoot>';
+ echo '<tbody>';
+ for ($j=0;$j<count($ADAT['osszes']); $j++) {
+ echo '<tr>';
+ for($i=0; $i<count($KEYS); $i++) {
+ echo '<td>'.$ADAT['osszes'][$j][$KEYS[$i]].'</td>';
+ }
+ echo '</tr>';
+ }
+ echo '</tbody>';
+
+ echo '</table>';
+
+ }
+
+ if (is_array($ADAT['tankoteles'][0])) {
+ //if (!is_array($ADAT['tankoteles'][0])) return false;
+
+ $KEYS = array_keys($ADAT['tankoteles'][0]);
+
+ echo '<table class="info" align="center">';
+ echo '<thead>';
+ echo '<tr><th colspan="'.count($KEYS).'">Tanköteles</th></tr>'."\n";
+ echo '<tr>';
+ for($i=0; $i<count($KEYS); $i++) {
+ echo '<th>'.$KEYS[$i].'</th>';
+ }
+ echo '</tr>';
+ echo '</thead>';
+ echo '<tfoot>';
+ echo '<tr>';
+ for($i=0; $i<count($KEYS); $i++) {
+ echo '<th>'.$KEYS[$i].'</th>';
+ }
+ echo '</tr>';
+ echo '</tfoot>';
+ echo '<tbody>';
+ for ($j=0;$j<count($ADAT['tankoteles']); $j++) {
+ echo '<tr>';
+ for($i=0; $i<count($KEYS); $i++) {
+ echo '<td>'.$ADAT['tankoteles'][$j][$KEYS[$i]].'</td>';
+ }
+ echo '</tr>';
+ }
+ echo '</tbody>';
+
+ echo '</table>';
+
+ }
+
+ }
+
+
+ function putStat_a04t17($ADAT) {
+
+ $stat = 'a04t17';
+ $D = $ADAT[$stat];
+ echo '<div class="oktstatszam">'.$stat.'</div>';
+
+ echo 'Iskolába lépő gyermekek';
+ echo '<table>';
+ echo '<tr><th colspan="2"></th><th>összesen</th><th>lány</th></tr>';
+ echo '<tr>';
+ echo '<td>2</td>';
+ echo '<td>tanköteles (május 31-ig a 6. életévét betöltötte)</td>';
+ echo '<td>'._sum($D[$stat.'_2']).'</td>';
+ echo '<td>'.$D[$stat.'_2']['lány']['db'].'</td>';
+ echo '</tr>';
+ echo '<tr>';
+ echo '<td>3</td>';
+ echo '<td>július 1. és augusztus 31. között töltötte be a 6. életévét</td>';
+ echo '<td>'._sum($D[$stat.'_3']).'</td>';
+ echo '<td>'.$D[$stat.'_3']['lány']['db'].'</td>';
+ echo '</tr>';
+ echo '<tr>';
+ echo '<td>4</td>';
+ echo '<td>szeptember 1-jén a 6. életévét még nem töltötte be</td>';
+ echo '<td>'._sum($D[$stat.'_4']).'</td>';
+ echo '<td>'.$D[$stat.'_4']['lány']['db'].'</td>';
+ echo '</tr>';
+ echo '</table>'."\n";
+ }
+
+ function putStat_a04t83($ADAT) {
+ $stat = 'a04t83';
+ $D = $ADAT[$stat];
+ echo '<div class="oktstatszam">'.$stat.'</div>';
+ // TODO: emelt szintű oktatásban részt vevő tanulók
+ }
+
+ function _sum($what) {
+
+ return (intval($what['lány']['db']) + intval($what['fiú']['db']) + intval($what['']['db']));
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/hianyzas/ora.phtml b/mayor-orig/www/skin/classic/module-naplo/html/hianyzas/ora.phtml
new file mode 100644
index 00000000..839585de
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/hianyzas/ora.phtml
@@ -0,0 +1,279 @@
+<?php
+
+ function putHianyzok($ORAADAT, $ADAT) {
+
+ global $napiMinOra, $napiMaxOra;
+
+ // make assoc
+ for($i=0; $i<count($ADAT['hianyzok']); $i++) {
+ $_D = $ADAT['hianyzok'][$i];
+ $HADAT[$_D['oraId']][$_D['diakId']][$_D['tipus']] = $_D;
+ }
+
+ $NEVEK = $ADAT['nevsor']['nevek'];
+ $RESZLETEK = $ADAT['nevsor']['adatok'];
+
+ $HTIPUSOK1 = array('','késés','hiányzás');
+ if (__EGYENRUHA_HIANY_REGISZTRALAS === true) $HTIPUSOK2 = array('egyenruha hiány','felszerelés hiány','felmentés');
+ else $HTIPUSOK2 = array('','felszerelés hiány','felmentés');
+ $ITIPUSOK = getEnumField('naplo', 'hianyzas', 'igazolas'); // ez inkább a pre be lenne való?
+
+ $dt = $ORAADAT['dt'];
+ $ora = $ORAADAT['ora'];
+
+ $jovobeli = (strtotime($dt)>time()); // ezt csak itt tiltjuk le, a pre-ben nem!
+
+ if (!is_array($NEVEK) || count($NEVEK)==0)
+ if (!$ADAT['tagokFelvehetok'])
+ return false;
+
+
+ formBegin(array('class'=>"vissza",'action'=>href('index.php?page=naplo&sub=haladasi&f=haladasi')));
+ echo '<input type="hidden" name="igDt" value="'.$ORAADAT['dt'].'" />';
+ echo '<input type="hidden" name="tanarId" value="'.$ORAADAT['ki'].'" />';
+ echo '<input type="submit" value="&larr; '._HALADASI.'" />';
+ formEnd();
+
+ if ($ADAT['tankorAdat']['oratervi'] != 'óratervi') $class = 'delutani';
+ formBegin(array('method' => 'post', 'action' => '','class' => $class));
+
+ echo '<table align="center" cellspacing="1" cellpadding="1" class="csoportNevsorHianyzok">'."\n";
+ echo '<thead class="oraAdat">';
+ echo '<tr><th colspan="11">';
+ _putOraAdat($ORAADAT);
+ echo '</th></tr></thead>';
+ echo '<thead class="fejlec">';
+ echo '<tr><th colspan="11">'.
+ '<span title="'.
+ _JELENLET.': '.$ADAT['tankorAdat']['jelenlet'].'/'.
+ _REGISZTRALANDO.': '.$ADAT['tankorAdat']['regisztralando'].'/'.
+ _HIANYZAS_BELESZAMIT.': '.$ADAT['tankorAdat']['hianyzasBeleszamit'].
+ '">'.$ADAT['tankorAdat']['oratervi'].', '.$ADAT['tankorAdat']['jelleg'].'</span>';
+ echo '</th></tr>';
+ echo '<tr><th>'._ADOTT_NAP.'</th><th colspan="3">'._NEV_OSZTALY.'</th><th>'._J.'</th><th>'._K.'</th><th>'._H.'</th>'.
+ '<th title="'._EGYENRUHA.'">'._EH.'</th>'.'<th title="'._FELSZERELES.'">'._FH.'</th>'.'<th title="'._FELMENTETT.'">'._FM.'</th>'.'<th>'._IGAZOLT.'</th></tr>';
+ echo '</thead>';
+ echo '<tfoot>';
+ echo '<tr><th colspan="11">';
+ echo '<input type="submit" name="gomb" value="'._OK.'" />';
+ echo '<input type="hidden" name="action" value="hianyzokRogzitese" />';
+ echo '<input type="hidden" name="oraId" value="'.$ORAADAT['oraId'].'" />';
+ echo '</th></tr>';
+ echo '</tfoot>';
+
+
+ /* Ha a tagok felvehetők (módosíthatók) - tipikusan ilyen a tanulószoba */
+ if ($ADAT['tagokFelvehetok']===true) {
+ echo '<body>';
+ echo '<tr class="ujTag">';
+ echo '<th>';
+ echo _UJ_TAG;
+ echo '</th>';
+ echo '<td colspan="8" >';
+ echo '<select name="diakId">';
+ echo '<option value=""></option>';
+ for ($i=0; $i<count($ADAT['diakok']); $i++) {
+ $_D = $ADAT['diakok'][$i];
+ echo '<option value="'.$_D['diakId'].'">'.$_D['diakNev'].' ('.$_D['diakId'].')</option>';
+ }
+ echo '</select>';
+ echo '</td>';
+ echo '</tr>';
+ echo '</body>'."\n";
+ }
+ /* -- */
+
+
+
+ echo '<tbody>';
+ $i=0;
+ if (is_array($NEVEK))
+ foreach($NEVEK as $_diakId => $DA) {
+ $JOG = $ADAT['jogosultsag'][$_diakId]['orak'][$ORAADAT['ora']];
+ $JOGADAT = $ADAT['jogosultsag'][$_diakId]['igazolas'];
+ $jogviszony = ekezettelen(str_replace(' ','',$ADAT['diakJogviszony'][$_diakId][$ORAADAT['dt']]['statusz']));
+ $felmentett_class = (in_array($ADAT['tankorAdat']['tankorId'], $ADAT['felmentes'][$_diakId])) ? ' felmentett':'';
+ echo '<tr class="'.$jogviszony.$felmentett_class.'">';
+ echo '<td>';
+ _putHianyzasKistabla($ADAT['napiHianyzasok'][$_diakId], $ORAADAT, array('napiMinOra' => $napiMinOra, 'napiMaxOra' => $napiMaxOra));
+ echo '</td>';
+ echo '<td>';
+ putFace($DA['diakId'],'diak','30');
+ echo '</td>';
+ echo '<th class="c diakNev" data-diakid="'.$_diakId.'">';
+ echo '<span>';
+ printf("%02s. ", $i+1);
+ echo '</span>';
+ echo '</th>';
+ echo '<td colspan="1" title="'.$ADAT['diakJogviszony'][$_diakId][$ORAADAT['dt']]['statusz'].'">';
+ echo '<a href="'.href('index.php?page=naplo&sub=hianyzas&f=diak&diakId='.$_diakId).'">';
+ echo $DA['diakNev'];
+ echo '</a>';
+ echo '</td>';
+ if (
+ $ADAT['tankorAdat']['regisztralando']=='igen'
+ && !in_array($ADAT['tankorAdat']['tankorId'], $ADAT['felmentes'][$_diakId])
+ && (in_array($jogviszony, array('jogviszonybanvan','vendegtanulo'))
+ || ($jogviszony == 'magantanulo' && $ADAT['tankorAdat']['jelleg']=='gyakorlat')
+ )
+ ) {
+ $_igtipus='';
+ /* prepare data */
+ reset($HTIPUSOK1);
+ $__jelen=true;
+ foreach ($HTIPUSOK1 as $j => $_tipus) {
+ if ($HADAT[$ORAADAT['oraId']][$_diakId][$_tipus]['hianyzasId']!='') $__jelen=false;
+ }
+
+ /* -- */
+ reset($HTIPUSOK1);
+ foreach ($HTIPUSOK1 as $j => $_tipus) {
+ $_disp='';
+ $_hid = $HADAT[$ORAADAT['oraId']][$_diakId][$_tipus]['hianyzasId'];
+ if ($_hid!='') $_igtipus = $_tipus;
+ if ($_tipus=='') $_csstipus = 'jelen'; else $_csstipus=$_tipus;
+ echo '<td class="'.$_csstipus.'">';
+ if ($JOG['beirhato']==true && !$jovobeli) {
+ $_radio = ($_hid!='' || ($_tipus=='' && $__jelen)) ?'checked="checked"' : '';
+ //echo $_diakId.'/'.$_tipus.'/'.$_hid;
+ if ($_tipus=='késés') {
+ $_perc = intval(($HADAT[$ORAADAT['oraId']][$_diakId][$_tipus]['perc']));
+ if ($_perc >0) $_kesett = ' kesett'; else $_kesett = '';
+ echo '<input class="perc'.$_kesett.'" type="text" maxlength="2" size="1" name="PERC_'.$i.'" value="'.$_perc.'" />';
+ $_disp = 'style="display:none"';
+ }
+ echo '<input type="radio" id="HIANYZOK1_'.$i.'" name="HIANYZOK1_'.$i.'" value="'.$_diakId.'/'.$dt.'/'.$ora.'/'.$_tipus.'/'.$_hid.'" '. $_radio . ' '.$_disp.'/>';
+
+ } else {
+ if (($__jelen && $_tipus=='') || $_hid!='') {
+ if ($_hid!='') echo '<input type="hidden" name="HIANYZOK1_'.$i.'" value="'.$_diakId.'/'.$dt.'/'.$ora.'/'.$_tipus.'/'.$_hid.'"/>';
+ if ($_tipus=='késés' && ($_perc = intval(($HADAT[$ORAADAT['oraId']][$_diakId][$_tipus]['perc']))) != 0) {
+ echo '<input class="perc'.$_kesett.'" type="text" maxlength="2" size="1" name="PERC_'.$i.'" value="'.$_perc.'" disabled="disabled" />';
+ //echo '<span class="perc">'.$_perc.'</span>';
+ } else {
+ _putImg($_tipus,$__jelen);
+ }
+ }
+ }
+ echo '</td>';
+ }
+ /* === */
+ if ($JOG['fbeirhato']==true && !$jovobeli) {
+/*
+ echo '<td colspan="'.count($HTIPUSOK2).'" class="fbetus">';
+ echo '<select id="HIANYZOK2_'.$i.'" name="HIANYZOK2_'.$i.'">';
+ echo '<option value="'.$_diakId.'/"></option>';
+ foreach ($HTIPUSOK2 as $j => $_tipus) {
+ $_hid = $HADAT[$ORAADAT['oraId']][$_diakId][$_tipus]['hianyzasId'];
+ $_radio = ($_hid!='') ?'selected="selected"' : '';
+ echo '<option value="'.$_diakId.'/'.$dt.'/'.$ora.'/'.$_tipus.'/'.$_hid.'" '. $_radio .'>'.$_tipus.'</option>';
+ }
+ echo '</select>';
+ echo '</td>
+*/
+ foreach ($HTIPUSOK2 as $j => $_tipus) {
+ echo '<td title="'.$_tipus.'" class="fbetus">';
+
+ $_hid = $HADAT[$ORAADAT['oraId']][$_diakId][$_tipus]['hianyzasId'];
+ if ($_tipus != '') {
+ if ($_hid != '') $chk = ' checked="checked" '; else $chk = '';
+ echo '<input type="checkbox" id="HIANYZOK'.($j+10).'_'.$i.'" name="HIANYZOK'.($j+10).'_'.$i.'" value="'.$_diakId.'/'.$dt.'/'.$ora.'/'.$_tipus.'/'.$_hid.'"'.$chk.' />';
+ }
+ echo '</td>';
+ }
+ } else {
+ echo '<td colspan="'.count($HTIPUSOK2).'" class="fbetus">';
+
+ foreach ($HTIPUSOK2 as $j => $_tipus) {
+ $_hid = $HADAT[$ORAADAT['oraId']][$_diakId][$_tipus]['hianyzasId'];
+ if ($_hid!='') {
+ echo '<input type="hidden" name="HIANYZOK2_'.$i.'" value="'.$_diakId.'/'.$dt.'/'.$ora.'/'.$_tipus.'/'.$_hid.'" '. $_radio .'/>';
+ echo $_tipus;
+ }
+ }
+ echo '</td>';
+ }
+ echo '<td>';
+ _putIgazolasSelect($HADAT[$ORAADAT['oraId']][$_diakId][$_igtipus], $ITIPUSOK,$JOG,$JOGADAT,array('diakId'=>$_diakId,'oraId'=>$ORAADAT['oraId'],'hianyzasId'=>$_hid));
+ echo '</td>';
+ } else {
+ echo '<td class="nemkot" colspan="'.(count($HTIPUSOK2)+count($HTIPUSOK2)+count($ITIPUSOK)).'">';
+ // echo _ORARA_NEM_KOTELEZO_BEJARNIA;
+ echo _NEM_REGISZTRALANDO;
+ echo '</td>'."\n";
+ }
+
+ echo '</tr>';
+ $i++;
+ }
+ echo '</tbody>';
+ echo '</table>';
+
+ formEnd();
+
+ }
+
+ function _putIgazolasSelect($ADAT,$TIPUSOK,$JOG,$JOGADAT,$SET) {
+ //"'.$_diakId.'/'.$dt.'/'.$ora.'/'.$_tipus.'/'.$_hid.'"
+ if (is_array($ADAT)) {
+ if ($JOG['igazolhato']===true) {
+ echo '<select name="IGAZOLAS[]">'."\n";
+ echo '<option value="'.$SET['diakId'].'////'.$ADAT['hianyzasId'].'">'._IGAZOLATLAN.'</option>'."\n";
+ for($i=0; $i<count($TIPUSOK); $i++){
+ $_SEL = ($ADAT['igazolas']==$TIPUSOK[$i]) ? ' selected="selected"':'';
+ if (in_array($TIPUSOK[$i], $JOGADAT['tipusok'])) {
+ echo '<option value="'.$SET['diakId'].'///'.$TIPUSOK[$i].'/'.$ADAT['hianyzasId'].'" '.$_SEL.'>'.$TIPUSOK[$i].'</option>'."\n";
+ }
+ }
+ // és a kieg, ha elfogyott volna, de ez még azzal van igazolva:
+ if (!in_array($ADAT['igazolas'],$JOGADAT['tipusok']) && $ADAT['statusz']!='igazolatlan') {
+ echo '<option value="" selected="selected">'.$ADAT['igazolas'].'</option>'."\n";
+ }
+ echo '</select>'."\n";
+ } else {
+ echo $ADAT['igazolas'];
+ }
+ }
+
+ }
+
+ function _putOraAdat($ORAADAT) {
+ echo '<table align="center" class="oraAdat">';
+ echo '<tr><td>';
+ echo '<span title="'.$ORAADAT['oraId'].'">';
+ echo $ORAADAT['dt'].', '.$ORAADAT['ora'].'.'._ORA.'</span>';
+ echo '</td><td>';
+ echo $ORAADAT['tankorNev'].' - '.$ORAADAT['kiCn'];
+ echo '</td></tr><tr>';
+ echo '<th colspan="2">';
+ if ($ORAADAT['tankorTipus'] == 'délutáni') echo nagybetus($ORAADAT['tankorTipus']).' ';
+ echo $ORAADAT['leiras'];
+ echo '</th></tr>';
+ echo '</table>';
+ }
+
+
+ function putOraAdatok($oraAdat) {
+
+ list($evf,$oszt,$targy,$targycsoport,$tipus,$index) = explode('_',$oraAdat['tankor']);
+
+ #echo '<table align="center" class="oraAdatok" style="width:90%" cellpadding="0" cellspacing="0"><tr><td style="text-align: center">';
+ echo '<table align="right" style="border-style: none none dotted none; border-width: 0px 0px 1px 0px; border-color: #999999">';
+ echo '<tr>';
+ echo '<td>'.str_replace('-','.',$oraAdat['dt']).'.</td>';
+ echo '<td>'.$oraAdat['ora'].'. óra</td>';
+ echo "<td> ~ $evf.$oszt $targy, $tipus $targycsoport</td>";
+ echo '<td> ~ '.$oraAdat['tanarCn'].'</td>';
+ echo '</tr>';
+ echo '</table>'."\n";
+ #echo '</td></tr></table>'."\n";
+ #echo '<br/>';
+ }
+
+ function _putImg($tipus,$jelen) {
+ if ($jelen && $tipus=='') echo '<img src="/skin/classic/module-naplo/img/hianyzas/green.gif" alt="x" />';
+ elseif ($tipus=='késés') echo '<img src="/skin/classic/module-naplo/img/hianyzas/yellow.gif" alt="x" />';
+ elseif ($tipus=='hiányzás') echo '<img src="/skin/classic/module-naplo/img/hianyzas/red.gif" alt="x" />';
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/hianyzas/osztaly.phtml b/mayor-orig/www/skin/classic/module-naplo/html/hianyzas/osztaly.phtml
new file mode 100644
index 00000000..e00a7c32
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/hianyzas/osztaly.phtml
@@ -0,0 +1,613 @@
+<?php
+
+ function putOsztalyOsszesito($ADAT, $View) {
+
+ global $_TANEV;
+
+ $_cols = 3;
+
+ formBegin();
+ echo '<table align="center" class="navi"><tr><td>';
+
+
+ echo '<input id="hozott" type="checkbox" name="View[]" value="hozott" ';
+ if (in_array('hozott',$View)) echo 'checked="checked" ';
+ echo '/><label for="hozott">'._HOZOTT.'</label>';
+ echo '<input id="lezart" type="checkbox" name="View[]" value="lezárt" ';
+ if (in_array('lezárt',$View)) echo 'checked="checked" ';
+ echo '/><label for="lezart">'._LEZART.'</label>';
+ echo '<input id="igazolhato" type="checkbox" name="View[]" value="igazolható" ';
+ if (in_array('igazolható',$View)) echo 'checked="checked" ';
+ echo '/><label for="igazolhato">'._IGAZOLHATO.'</label>';
+ echo '<input id="osszes" type="checkbox" name="View[]" value="összes" ';
+ if (in_array('összes',$View)) echo 'checked="checked" ';
+ echo '/><label for="osszes">'._OSSZES.'</label>';
+ echo '<input id="fegyu" type="checkbox" name="View[]" value="fegyelmi utáni" ';
+ if (in_array('fegyelmi utáni',$View)) echo 'checked="checked" ';
+ echo '/><label for="fegyu">'._FEGYELMI_UTANI.'</label>';
+ echo '<input id="fegyfo" type="checkbox" name="View[]" value="fegyelmi fokozatok" ';
+ if (in_array('fegyelmi fokozatok',$View)) echo 'checked="checked" ';
+ echo '/><label for="fegyfo">'._FEGYELMI_FOKOZATOK.'</label>';
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalyId'].'" /> ';
+ echo '<input type="hidden" name="tolDt" value="'.$ADAT['tolDt'].'" /> ';
+ echo '<input type="hidden" name="igDt" value="'.$ADAT['igDt'].'" /> ';
+ echo '<input type="submit" value="'._OK.'" />';
+
+ echo ' '._REFERENCIADT.' ';
+ echo '<select name="referenciaDt" class="onChangeSubmit">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ $SEL = array($ADAT['referenciaDt'] => ' selected="selected" ');
+ for (
+ $dt = _LEGKORABBI_IGAZOLHATO_HIANYZAS;
+ strtotime($dt) < time();
+ $dt = date('Y-m-d',strtotime('+1 day',strtotime($dt)))
+ ) echo '<option value="'.$dt.'"'.$SEL[$dt].'>'.$dt.'</option>'."\n";
+ echo '</select>'."\n";
+
+ echo '</td></tr></table>';
+ formEnd();
+
+ echo '<table class="hianyzas" align="center" cellspacing="1">';
+
+ /* ----------- Fejléc ----------- */
+
+ echo '<thead>'."\n";
+ echo '<tr>';
+ echo '<th rowspan="3" colspan="2" title="'.$ADAT['tolDt'].'-'.$ADAT['igDt'].'">';
+ formBegin();
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalyId'].'" /> ';
+ echo '<input type="hidden" name="tolDt" value="'.$ADAT['tolDt'].'" /> ';
+ echo '<input type="hidden" name="igDt" value="'.$ADAT['igDt'].'" /> ';
+ $SEL = array($ADAT['nevsor'] => ' selected="selected" ');
+ echo '<select name="nevsor" class="onChangeSubmit">';
+ echo '<option value="aktualis"'.$SEL['aktualis'].'>'._AKTUALIS_NEVSOR.'</option>';
+ echo '<option value="teljes"'.$SEL['teljes'].'>'._TELJES_NEVSOR.'</option>';
+ echo '</select>';
+ formEnd();
+ echo '</th>';
+
+ if (in_array('hozott',$View)) {
+ echo '<th colspan="3">'._HOZOTT.'</th>';
+ $_cols+=7;
+ }
+
+ if (in_array('lezárt',$View)) {
+ echo '<th colspan="6">'._LEZART.'</th>';
+ $_cols+=7;
+ }
+
+ if (in_array('igazolható',$View)) {
+ echo '<th colspan="6">'._IGAZOLHATO.'</th>';
+ $_cols+=6;
+ }
+
+ if (in_array('összes',$View)) {
+ echo '<th colspan="9">'._OSSZES.'</th>';
+ $_cols+=7;
+ }
+
+ if (in_array('fegyelmi utáni',$View)) {
+ echo '<th colspan="3">'._FEGYELMI_UTANI.'</th>';
+ $_cols+=3;
+ }
+
+ if (in_array('fegyelmi fokozatok',$View)) {
+ echo '<th colspan="4">'._FEGYELMI_FOKOZATOK.'</th>';
+ $_cols+=4;
+ }
+
+ echo '</tr><tr>';
+
+ if (in_array('hozott',$View)) {
+ echo '<th colspan="3" class="alcim">'._HIANYZAS.'</th>';
+ }
+
+ if (in_array('lezárt',$View)) {
+ echo '<th colspan="3" class="alcim">'._HIANYZAS.'</th>';
+ echo '<th colspan="3" class="alcim">'._KESES.'</th>';
+ }
+
+ if (in_array('igazolható',$View)) {
+ echo '<th colspan="3" class="alcim">'._HIANYZAS.'</th>';
+ echo '<th colspan="3" class="alcim">'._KESES.'</th>';
+ }
+
+ if (in_array('összes',$View)) {
+ echo '<th colspan="3" class="alcim">'._HIANYZAS.'</th>';
+ echo '<th colspan="3" class="alcim">'._KESES.'</th>';
+ echo '<th rowspan="2" class="alcim" title="'._FELSZERELES_HIANY.'">'._FSZ.'</th>';
+ echo '<th rowspan="2" class="alcim" title="'._FELMENTES.'">'._FM.'</th>';
+ echo '<th rowspan="2" class="alcim" title="'._EGYENRUHA_HIANY.'">'._EH.'</th>';
+ }
+
+ if (in_array('fegyelmi utáni',$View)) {
+ echo '<th rowspan="2" class="alcim" title="'._HIANYZAS.'">'._H.'</th>';
+ echo '<th rowspan="2" class="alcim" title="'._KESES.'">'._K.'</th>';
+ echo '<th rowspan="2" class="alcim" title="'._FELSZERELES_HIANY.'">'._FSZ.'</th>';
+ }
+
+ if (in_array('fegyelmi fokozatok',$View)) {
+ echo '<th rowspan="2" class="alcim" title="'._OSSZES_IGAZOLATLAN.'">'._O.'</th>';
+ echo '<th rowspan="2" class="alcim">'._AKTUALIS_FOKOZAT.'</th>';
+ echo '<th rowspan="2" class="alcim">'._LEGMAGASABB_FOKOZAT.'</th>';
+ echo '<th rowspan="2" class="alcim">'._BEIRANDO_FOKOZAT.'</th>';
+ }
+
+ echo '</tr><tr>';
+
+
+
+ if (in_array('hozott',$View)) {
+ echo '<th class="alcim"><img src="skin/classic/module-naplo/img/hianyzas/h.gif" alt="'._IGAZOLATLAN.'" title="'._IGAZOLATLAN.'" /></th>';
+ echo '<th class="alcim"><img src="skin/classic/module-naplo/img/hianyzas/i.gif" alt="'._IGAZOLT.'" title="'._IGAZOLT.'" /></th>';
+ echo '<th class="alcim"><img src="skin/classic/module-naplo/img/hianyzas/sum.gif" alt="'._OSSZES.'" title="'._OSSZES.'" /></th>';
+ }
+
+
+ if (in_array('lezárt',$View)) {
+ echo '<th class="alcim"><img src="skin/classic/module-naplo/img/hianyzas/h.gif" alt="'._IGAZOLATLAN.'" title="'._IGAZOLATLAN.'" /></th>';
+ echo '<th class="alcim"><img src="skin/classic/module-naplo/img/hianyzas/i.gif" alt="'._IGAZOLT.'" title="'._IGAZOLT.'" /></th>';
+ echo '<th class="alcim"><img src="skin/classic/module-naplo/img/hianyzas/sum.gif" alt="'._OSSZES.'" title="'._OSSZES.'" /></th>';
+ echo '<th class="alcim"><img src="skin/classic/module-naplo/img/hianyzas/h.gif" alt="'._IGAZOLATLAN.'" title="'._IGAZOLATLAN.'" /></th>';
+ echo '<th class="alcim"><img src="skin/classic/module-naplo/img/hianyzas/i.gif" alt="'._IGAZOLT.'" title="'._IGAZOLT.'" /></th>';
+ echo '<th class="alcim"><img src="skin/classic/module-naplo/img/hianyzas/sum.gif" alt="'._OSSZES.'" title="'._OSSZES.'" /></th>';
+ }
+
+ if (in_array('igazolható',$View)) {
+ echo '<th class="alcim"><img src="skin/classic/module-naplo/img/hianyzas/h.gif" alt="'._IGAZOLATLAN.'" title="'._IGAZOLATLAN.'" /></th>';
+ echo '<th class="alcim"><img src="skin/classic/module-naplo/img/hianyzas/i.gif" alt="'._IGAZOLT.'" title="'._IGAZOLT.'" /></th>';
+ echo '<th class="alcim"><img src="skin/classic/module-naplo/img/hianyzas/sum.gif" alt="'._OSSZES.'" title="'._OSSZES.'" /></th>';
+ echo '<th class="alcim"><img src="skin/classic/module-naplo/img/hianyzas/h.gif" alt="'._IGAZOLATLAN.'" title="'._IGAZOLATLAN.'" /></th>';
+ echo '<th class="alcim"><img src="skin/classic/module-naplo/img/hianyzas/i.gif" alt="'._IGAZOLT.'" title="'._IGAZOLT.'" /></th>';
+ echo '<th class="alcim"><img src="skin/classic/module-naplo/img/hianyzas/sum.gif" alt="'._OSSZES.'" title="'._OSSZES.'" /></th>';
+ }
+
+ if (in_array('összes',$View)) {
+ echo '<th class="alcim"><img src="skin/classic/module-naplo/img/hianyzas/h.gif" alt="'._IGAZOLATLAN.'" title="'._IGAZOLATLAN.'" /></th>';
+ echo '<th class="alcim"><img src="skin/classic/module-naplo/img/hianyzas/i.gif" alt="'._IGAZOLT.'" title="'._IGAZOLT.'" /></th>';
+ echo '<th class="alcim"><img src="skin/classic/module-naplo/img/hianyzas/sum.gif" alt="'._OSSZES.'" title="'._OSSZES.'" /></th>';
+ echo '<th class="alcim"><img src="skin/classic/module-naplo/img/hianyzas/h.gif" alt="'._IGAZOLATLAN.'" title="'._IGAZOLATLAN.'" /></th>';
+ echo '<th class="alcim"><img src="skin/classic/module-naplo/img/hianyzas/i.gif" alt="'._IGAZOLT.'" title="'._IGAZOLT.'" /></th>';
+ echo '<th class="alcim"><img src="skin/classic/module-naplo/img/hianyzas/sum.gif" alt="'._OSSZES.'" title="'._OSSZES.'" /></th>';
+ }
+
+ if (in_array('fegyelmi utáni',$View)) {
+ }
+
+ if (in_array('fegyelmi fokozatok',$View)) {
+ }
+
+
+ echo '</tr>';
+
+
+ echo '</thead>'."\n";
+
+ /* ----------- Fejléc vége ------------- */
+
+ echo '<tfoot>'."\n";
+ echo '<tr>';
+ echo '<th colspan="2">'._OSSZES.'</th>';
+ if (in_array('hozott',$View)) {
+ echo '<td colspan="3"></td>';
+ }
+ if (in_array('lezárt',$View)) {
+ echo '<td colspan="6"></td>';
+ }
+ if (in_array('igazolható',$View)) {
+ echo '<td colspan="6"></td>';
+ }
+ if (in_array('összes',$View)) {
+ echo '<td class="igazolatlan hianyzas">'.$ADAT['stat']['összes']['hiányzás']['igazolatlan'].'</td>';
+ echo '<td class="igazolt hianyzas">'.$ADAT['stat']['összes']['hiányzás']['igazolt'].'</td>';
+ echo '<td class="osszes hianyzas">'.(intval($ADAT['stat']['összes']['hiányzás']['igazolt'])+intval($ADAT['stat']['összes']['hiányzás']['igazolatlan'])).'</td>';
+ echo '<td class="igazolatlan keses">'.$ADAT['stat']['összes']['késés']['igazolatlan'].'</td>';
+ echo '<td class="igazolt keses">'.$ADAT['stat']['összes']['késés']['igazolt'].'</td>';
+ echo '<td class="osszes keses">'.(intval($ADAT['stat']['összes']['késés']['igazolt'])+intval($ADAT['stat']['összes']['késés']['igazolatlan'])).'</td>';
+ echo '<td class="felszereles">'.$ADAT['stat']['összes']['felszerelés hiány']['igazolatlan'].'</td>';
+ echo '<td class="felmentes">'.$ADAT['stat']['összes']['felmentés']['igazolatlan'].'</td>';
+ echo '<td class="egyenruha">'.$ADAT['stat']['összes']['egyenruha hiány']['igazolatlan'].'</td>';
+ }
+ if (in_array('fegyelmi utáni',$View)) {
+ echo '<td class="igazolatlan hianyzas">'.$ADAT['stat']['összes']['fegyelmi']['hiányzás']['igazolatlan'].'</td>';
+ echo '<td class="igazolatlan keses">'.$ADAT['stat']['összes']['fegyelmi']['késés']['igazolatlan'].'</td>';
+ echo '<td class="felszereles">'.$ADAT['stat']['összes']['fegyelmi']['felszerelés hiány']['igazolatlan'].'</td>';
+ }
+ if (in_array('fegyelmi fokozatok',$View)) {
+ echo '<td class="igazolatlan hianyzas">'.$ADAT['stat']['összes']['összes igazolatlan'].'</td>';
+ echo '<td colspan="3"></td>';
+ }
+ echo '</tr>';
+ if ($ADAT['hianyzasmentesNapokSzama'] != 0) {
+ echo '<tr><th colspan="'.$_cols.'">';
+ echo _HIANYZASMENTESNAPOKSZAMA.': '.$ADAT['hianyzasmentesNapokSzama'];
+ echo '</th></tr>';
+ }
+ echo '</tfoot>'."\n";
+ echo '<tbody>'."\n";
+
+ $i = 1;
+ foreach ($ADAT['stat']['névsor'] as $diakId => $dAdat) {
+ $DH = $ADAT['stat'][$diakId]; // DH=DiákHiányzás: lezárt|összes|fegyelmi
+ // kiemelt változók
+
+ $lhigazolatlan = $DH['lezárt']['hiányzás']['igazolatlan'];
+ $lhigazolt = $DH['lezárt']['hiányzás']['igazolt'];
+ $lkigazolatlan = $DH['lezárt']['késés']['igazolatlan']['db'];
+ $lkigazolatlanIdo = $DH['lezárt']['késés']['igazolatlan']['ido'];
+ // igazolható, igazolatlan hiányzás
+ $ihigazolatlan = $DH['összes']['hiányzás']['igazolatlan'] - $DH['lezárt']['hiányzás']['igazolatlan'];
+ $lkigazolt = $DH['lezárt']['késés']['igazolt']['db'];
+ // igazolható, igazolt hiányzás
+ $ihigazolt = $DH['összes']['hiányzás']['igazolt'] - $DH['lezárt']['hiányzás']['igazolt'];
+ $ikigazolatlan = $DH['összes']['késés']['igazolatlan']['db'] - $DH['lezárt']['késés']['igazolatlan']['db'];
+ $ikigazolatlanIdo = $DH['összes']['késés']['igazolatlan']['ido'] - $DH['lezárt']['késés']['igazolatlan']['ido'];
+ $ikigazolt = $DH['összes']['késés']['igazolt']['db'] - $DH['lezárt']['késés']['igazolt']['db'];
+
+ $ohigazolatlan = $DH['összes']['hiányzás']['igazolatlan'] + $DH['hozott']['igazolatlan']['db'];
+ $ohigazolt=$DH['összes']['hiányzás']['igazolt']+ $DH['hozott']['igazolt']['db'];
+
+ $okigazolatlan = $DH['összes']['késés']['igazolatlan']['db'];
+ $okigazolatlanIdo = $DH['összes']['késés']['igazolatlan']['ido'];
+ $okigazolt=$DH['összes']['késés']['igazolt']['db'];
+ $ofelszereles = $DH['összes']['felszerelés hiány']['igazolatlan'];
+ $ofelmentes = $DH['összes']['felmentés']['igazolatlan'];
+ $oegyenruha = $DH['összes']['egyenruha hiány']['igazolatlan'];
+
+ $fih = $DH['fegyelmi']['hiányzás']['igazolatlan'];
+ $fik = $DH['fegyelmi']['késés']['igazolatlan']['db'];
+ $fikIdo = $DH['fegyelmi']['késés']['igazolatlan']['ido'];
+ $ff = $DH['fegyelmi']['felszerelés hiány']['igazolatlan'];
+ $fe = $DH['fegyelmi']['egyenruha hiány']['igazolatlan'];
+ //---..
+
+ echo '<tr class="'.str_replace(' ','',ekezettelen($dAdat['aktualisStatusz'])).'">';
+ echo '<td class="nev" style="text-align: right;">'.($i++).'</td>';
+
+ echo '<td class="nev" title="'.$dAdat['aktualisStatusz'].'">';
+ echo '<a href="'.href('index.php?page=naplo&sub=hianyzas&f=diak&diakId='.$diakId.'&osztalyId='.$ADAT['osztalyId']).'" >';
+ echo $dAdat['diakNev'];
+ echo '</a>';
+ echo '</td>';
+
+
+
+ if (in_array('hozott',$View)) {
+ # Hozott
+ // Lezárt igazolatlan hiányzás
+ if (intval($ADAT['hozottHianyzas'][$diakId]['igazolatlan']['db']) == 0) $class = 'ulezart';
+ else $class = 'lezart igazolatlan hianyzas';
+ echo '<td class="'.$class.'">'.$ADAT['hozottHianyzas'][$diakId]['igazolatlan']['db'].'</td>';
+
+ // Lezárt igazolt hiányzás
+ if (intval($ADAT['hozottHianyzas'][$diakId]['igazolt']['db']) == 0) $class = 'ulezart';
+ else $class = 'lezart igazolt hianyzas';
+ echo '<td class="'.$class.'">'.$ADAT['hozottHianyzas'][$diakId]['igazolt']['db'].'</td>';
+
+ // Lezárt összes hiányzás
+ $osszeg = intval($ADAT['hozottHianyzas'][$diakId]['igazolatlan']['db']) + intval($ADAT['hozottHianyzas'][$diakId]['igazolt']['db']);
+ if ($osszeg == 0) {
+ $osszeg = '';
+ $class = 'ulezart';
+ } else {
+ $class = 'lezart mind hianyzas';
+ }
+ echo '<td class="'.$class.'">'.$osszeg.'</td>';
+ ## ------
+ }
+
+
+ if (in_array('lezárt',$View)) {
+ # Lezártak
+ // Lezárt igazolatlan hiányzás
+ if (intval($lhigazolatlan) == 0) $class = 'ulezart';
+ else $class = 'lezart igazolatlan hianyzas';
+ echo '<td class="'.$class.'">'.$lhigazolatlan.'</td>';
+
+ // Lezárt igazolt hiányzás
+ if (intval($lhigazolt) == 0) $class = 'ulezart';
+ else $class = 'lezart igazolt hianyzas';
+ echo '<td class="'.$class.'">'.$lhigazolt.'</td>';
+
+ // Lezárt összes hiányzás
+ $osszeg = intval($lhigazolt) + intval($lhigazolatlan);
+ if ($osszeg == 0) {
+ $osszeg = '';
+ $class = 'ulezart';
+ } else {
+ $class = 'lezart mind hianyzas';
+ }
+ echo '<td class="'.$class.'">'.$osszeg.'</td>';
+
+ // Lezárt igazolatlan késés
+ if ($lkigazolatlan == 0) $class = 'ulezart';
+ else $class = 'lezart igazolatlan keses';
+ echo '<td class="'.$class.'" title="'.$lkigazolatlanIdo.'">'.$lkigazolatlan.'</td>';
+
+ // Lezárt igazolt késés
+ if ($lkigazolt == 0) $class = 'ulezart';
+ else $class = 'lezart igazolt keses';
+ echo '<td class="'.$class.'">'.$lkigazolt.'</td>';
+
+ // Lezárt igazolatlan késés
+ $osszeg = intval($lkigazolt) + intval($lkigazolatlan);
+ if ($osszeg == 0) {
+ $osszeg = '';
+ $class = 'ulezart';
+ } else {
+ $class = 'lezart mind keses';
+ }
+ echo '<td class="'.$class.'">'.$osszeg.'</td>';
+ ## ------
+ }
+
+ if (in_array('igazolható',$View)) {
+ ## Lezárt utáni = Igazolható
+
+ // Igazolható igazolatlan hiányzás
+ if ($ihigazolatlan == 0) {
+ $ihigazolatlan = '';
+ $class = 'uigazolhato';
+ } else {
+ $class = 'igazolhato igazolatlan hianyzas';
+ }
+ echo '<td class="'.$class.'">'.$ihigazolatlan.'</td>';
+
+ // Igazolható igazolt hiányzás
+ if ($ihigazolt == 0) {
+ $ihigazolt = '';
+ $class = 'uigazolhato';
+ } else {
+ $class = 'igazolhato igazolt hianyzas';
+ }
+ echo '<td class="'.$class.'">'.$ihigazolt.'</td>';
+
+ // Igazolható összes hiányzás
+ $osszeg = $ihigazolt+$ihigazolatlan;
+ if ($osszeg == 0) {
+ $osszeg = '';
+ $class = 'uigazolhato';
+ } else {
+ $class = 'igazolhato mind hianyzas';
+ }
+ echo '<td class="'.$class.'">'.$osszeg.'</td>';
+
+ // Igazolható igazolatlan késés
+ if ($ikigazolatlan == 0) {
+ $ikigazolatlan = '';
+ $class = 'uigazolhato';
+ } else {
+ $class = 'igazolhato igazolatlan keses';
+ }
+ echo '<td class="'.$class.'" title="'.$ikigazolatlanIdo.'">'.$ikigazolatlan.'</td>';
+
+ // Igazolható igazolt késés
+ if ($ikigazolt == 0) {
+ $ikigazolt = '';
+ $class = 'uigazolhato';
+ } else {
+ $class = 'igazolhato izagolt keses';
+ }
+ echo '<td class="'.$class.'">'.$ikigazolt.'</td>';
+
+ // Igazolható összes késés
+ $osszeg = intval($ikigazolt)+intval($ikigazolatlan);
+ if ($osszeg == 0) {
+ $osszeg = '';
+ $class = 'uigazolhato';
+ } else {
+ $class = 'igazolhato mind keses';
+ }
+ echo '<td class="'.$class.'">'.$osszeg.'</td>';
+ ## ------
+ }
+
+ if (in_array('összes',$View)) {
+ ## Összes
+
+ // Összes igazolatlan hiányzás
+ if ($ohigazolatlan == 0) $class = 'uosszes';
+ else $class = 'osszes igazolatlan hianyzas';
+ echo '<td class="'.$class.'">'.$ohigazolatlan.'</td>';
+
+ // Összes igazolt hiányzás
+ if ($ohigazolt == 0) $class = 'uosszes';
+ else $class = 'osszes igazolt hianyzas';
+ echo '<td class="'.$class.'">'.$ohigazolt.'</td>';
+
+ // Összes hiányzás
+ $osszeg = intval($ohigazolt)+intval($ohigazolatlan);
+ if ($osszeg == 0) {
+ $osszeg = '';
+ $class = 'uosszes';
+ } else {
+ $class = 'osszes mind hianyzas';
+ }
+ echo '<td class="'.$class.'">'.$osszeg.'</td>';
+
+ // Összes igazolatlan késés
+ if ($okigazolatlan == 0) $class = 'uosszes';
+ else $class = 'osszes igazolatlan keses';
+ echo '<td class="'.$class.'" title="'.$okigazolatlanIdo.'">'.$okigazolatlan.'</td>';
+
+ // Összes igazolt késés
+ if ($okigazolt == 0) $class = 'uosszes';
+ else $class = 'osszes igazolt keses';
+ echo '<td class="'.$class.'">'.$okigazolt.'</td>';
+
+ // Összes késés
+ $osszeg = intval($okigazolt) + intval($okigazolatlan);
+ if ($osszeg == 0) {
+ $osszeg = '';
+ $class = 'uosszes';
+ } else {
+ $class = 'osszes mind keses';
+ }
+ echo '<td class="'.$class.'">'.$osszeg.'</td>';
+
+ // Összes felszerelés hiány
+ if ($ofelszereles == 0) $class = 'uosszes';
+ else $class = 'osszes felszereles';
+ echo '<td class="'.$class.'">'.$ofelszereles.'</td>';
+
+ // Összes felmentés hiány
+ if ($ofelmentes == 0) $class = 'uosszes';
+ else $class = 'osszes felmentes';
+ echo '<td class="'.$class.'">'.$ofelmentes.'</td>';
+
+ // Összes egyenruha hiány
+ if ($oegyenruha == 0) $class = 'uosszes';
+ else $class = 'osszes egyenruha';
+ echo '<td class="'.$class.'">'.$oegyenruha.'</td>';
+ ## ------
+ }
+
+ if (in_array('fegyelmi utáni',$View)) {
+ ## Fegyelmi után
+ // Fegyelmi utáni igazolatlan hiányzás
+ if ($fih == 0) $class = 'ufegyelmi';
+ else $class = 'fegyelmi igazolatlan hianyzas';
+ echo '<td class="'.$class.'">'.$fih.'</td>';
+
+ // Fegyelmi utáni igazolatlan késés
+ if ($fik == 0) $class = 'ufegyelmi';
+ else $class = 'fegyelmi igazolatlan keses';
+ echo '<td class="'.$class.'" title="'.$fikIdo.'">'.$fik.'</td>';
+
+ // Fegyelmi utáni felszerelés hiány
+ if ($ff == 0) $class = 'ufegyelmi';
+ else $class = 'fegyelmi felszereles';
+ echo '<td class="'.$class.'">'.$ff.'</td>';
+
+ // Fegyelmi utáni egyenruha hiány
+ if ($fe == 0) $class = 'ufegyelmi';
+ else $class = 'fegyelmi egyenruha';
+ echo '<td class="'.$class.'">'.$fe.'</td>';
+ ## ------
+ }
+ if (in_array('fegyelmi fokozatok',$View)) {
+ ## Fokozatok
+
+ $igazolatlanok_szama = $DH['összes igazolatlan'];
+ if ($igazolatlanok_szama == 0) {
+ $igazolatlanok_szama = '';
+ $class = 'ufokozat';
+ } else {
+ $class = 'fokozat oi igazolatlan';
+ }
+ echo '<td class="'.$class.'">'.$igazolatlanok_szama.'</td>';
+
+ // Jelenlegi fegyelmi fokozat
+ $aktFokozat = intval($DH['fegyelmi']['fokozat']);
+ $maxFokozat = intval($DH['fegyelmi']['maxFokozat']);
+ $hianyzasDb = intval($DH['fegyelmi']['hianyzasDb']);
+ $diakReferenciaDt = $DH['fegyelmi']['referenciaDt'];
+ if ($aktFokozat == 0) $class = 'ufokozat';
+ else $class = 'fokozat';
+ if ($maxFokozat == 0) $_class2 = 'ufokozat';
+ else $_class2 = 'fokozat';
+ if ($ADAT['fokozat2bejegyzesTipus'][$aktFokozat]['hianyzasDb']!='')
+ $title = 'Dt: '.$diakReferenciaDt.' (~'.$ADAT['fokozat2bejegyzesTipus'][$aktFokozat]['hianyzasDb'].' db igazolatlan / '.$hianyzasDb.' db rögzített)';
+ else
+ $title = 'Dt: '.$diakReferenciaDt;
+ echo '<td class="'.$class.'" title="'.$title.'">';
+ echo '<span>'.$ADAT['fokozat2bejegyzesTipus'][$aktFokozat]['bejegyzesTipusNev'];
+ echo '</span>';
+ echo '</td>'; // kapott már + dt
+
+ echo '<td class="'.$_class2.'" title="'.$title.'">';
+ echo '<span>'.$ADAT['fokozat2bejegyzesTipus'][$maxFokozat]['bejegyzesTipusNev'];
+ echo '</span>';
+ echo '</td>'; // kapott már + dt
+
+
+
+ // Adandó fegyelmi fokozat szempontjából érdekes, már lezárt hiányzások és késésekből, felszerelés hiányokból, egyenruha hiányokból "átváltott" hiányzások
+ $fegyelmiIgazolatlanDb = $lhigazolatlan;
+ if (_KESESI_IDOK_OSSZEADODNAK === true) {
+ $fegyelmiIgazolatlanDb += floor($lkigazolatlanIdo / 45);
+ } else {
+ if (intval(_HANY_KESES_IGAZOLATLAN) > 0)
+ $fegyelmiIgazolatlanDb += floor($lkigazolatlan / intval(_HANY_KESES_IGAZOLATLAN));
+ if (intval(_HANY_FSZ_IGAZOLATLAN) > 0)
+ $fegyelmiIgazolatlanDb += floor($ofelszereles / intval(_HANY_FSZ_IGAZOLATLAN));
+ if (intval(_HANY_EH_IGAZOLATLAN) > 0)
+ $fegyelmiIgazolatlanDb += floor($oegyenruha / intval(_HANY_EH_IGAZOLATLAN));
+ }
+ // keressük visszafele az első adandó fokozatot...
+ $fegyelmi = 0;
+ $j = count($ADAT['összes fokozat'])-1;
+ while($ADAT['összes fokozat'][$j]['hianyzasDb'] > $fegyelmiIgazolatlanDb && $j >= 0) $j--;
+// Na de mi van, ha $j == -1 lesz, mert mondjuk az első fokozat 2 igazolatlan esetén adandó és neki még csak egy van?
+ if ($j >= 0) {
+ $megerdemeltFokozat = $ADAT['összes fokozat'][$j]['fokozat'];
+ $megerdemeltBejegyzesTipusId = $ADAT['összes fokozat'][$j]['bejegyzesTipusId'];
+
+ // Fegyelmi utáni igazolatlanok összesítése
+ $fegyelmi = $fih;
+ if (_KESESI_IDOK_OSSZEADODNAK === true) {
+ // a fegyelmikbe beleszámítható az igazolatlanok száma rev2222+
+ $fegyelmi += floor($fikIdo / 45);
+ } else {
+ if (intval(_HANY_KESES_IGAZOLATLAN) > 0)
+ $fegyelmi += floor($fik / intval(_HANY_KESES_IGAZOLATLAN));
+ if (intval(_HANY_FSZ_IGAZOLATLAN) > 0)
+ $fegyelmi += floor($ff / intval(_HANY_FSZ_IGAZOLATLAN));
+ }
+ }
+ # FIX 2009-05-28 konczy
+ # Ha a már lejárt hiányzások és késések és hiányzások darabszámának ($j) megfelelő
+ # fokozat nagyobb, mint a beírt, akkor meg kell jelenítenünk a formot.
+ # - illetve, ha a legutóbbi fegyelmi óta van újabb lezárt igazolatlanja...
+ //// $_talalat = ($j >= 0 && ($fegyelmi > 0 || $megerdemeltFokozat>$aktFokozat));
+ # Nem, az utolsó feltétel nem áll, mert ha nem adunk minden igazolatlan után
+ # valamilyen fegyelmit, akkor maradhat "megtorlatlan" igazolatlan!
+ $_talalat = ($j >= 0 && ($megerdemeltFokozat>$aktFokozat));
+
+ if (($_talalat)&& $_TANEV['statusz']=='aktív') $class = 'fokozat';
+ else $class = 'ufokozat';
+ echo '<td class="'.$class.'">';
+ ## FORM
+ if (
+ ($_talalat) && $_TANEV['statusz']=='aktív'
+ && in_array($dAdat['aktualisStatusz'], array('jogviszonyban van','vendégtanuló'))
+ ) {
+
+ formBegin();
+ echo '<input type="hidden" name="action" value="fegyelmiRogzitese" />'."\n";
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalyId'].'" />'."\n";
+ echo '<input type="hidden" name="diakId" value="'.$diakId.'" />'."\n";
+ echo '<input type="hidden" name="hianyzasDb" value="'.$fegyelmiIgazolatlanDb.'" />'."\n";
+ if ($ADAT['referenciaDt'] == '') echo '<input type="hidden" name="ujReferenciaDt" value="'.$DH['igDt'].'" />';
+ else echo '<input type="hidden" name="ujReferenciaDt" value="'.$ADAT['referenciaDt'].'" />';
+ echo '<select name="bejegyzesTipusId">'."\n";
+ foreach ($ADAT['összes fokozat'] as $f => $fAdat) {
+ // if (in_array($fAdat, $ADAT['jogosult fokozatok'])) $DIS = '';
+ // else $DIS = ' disabled="disabled" ';
+ $DIS_class = (in_array($fAdat, $ADAT['jogosult fokozatok'])) ? '' : 'tiltott';
+
+ if ($megerdemeltBejegyzesTipusId == $fAdat['bejegyzesTipusId']) echo '<option'.$DIS.' value="'.$fAdat['bejegyzesTipusId'].'" selected="selected" class="megerdemelt '.$DIS_class.'">';
+ else echo '<option class="'.$DIS_class.'" value="'.$fAdat['bejegyzesTipusId'].'">';
+ echo $fAdat['bejegyzesTipusNev'].' ('.$fAdat['hianyzasDb'].')';
+ echo '</option>'."\n";
+ }
+ echo '</select>';
+ echo '<input type="submit" value="'._SAVE.'" />';
+ formEnd();
+ } elseif ($fegyelmi > 0) {
+ echo _FEGYELMIVEL_NEM_SULYTOTT_LEZART_IGAZOLATLANOK.': '.$fegyelmi;
+ }
+ echo '</td>'."\n";
+ ## -----
+ }
+
+ echo '</tr>';
+ }
+ #
+ echo '</tbody>'."\n";
+
+ echo '</table>';
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/hianyzas/osztalyNap.phtml b/mayor-orig/www/skin/classic/module-naplo/html/hianyzas/osztalyNap.phtml
new file mode 100644
index 00000000..719a6c96
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/hianyzas/osztalyNap.phtml
@@ -0,0 +1,112 @@
+<?php
+
+ function putOsztalyHianyzok($ADAT) {
+ echo '<table class="hianyzas" style="float:left; margin-left:40px; margin-right:0px;">'."\n";
+
+ echo '<thead>';
+ echo '<tr><th>'._DIAK.'</th><th colspan="2">'._KESES.'</th><th colspan="2">'._HIANYZAS.'</th><th>'._FELSZERELES.'</th><th>'._FELMENTES.'</th><th>'._EGYENRUHA.'</th></tr>';
+ echo '</thead>'."\n";
+
+ echo '<tfoot>';
+ echo '<tr><th colspan="7">'.'</th></tr>'."\n";
+ echo '</tfoot>'."\n";
+ echo '<tbody>';
+ foreach($ADAT['diakok'] as $diakId=>$X) {
+ $D = $ADAT['diakHianyzott'][$diakId];
+ if (is_array($D)) {
+ echo '<tr>';
+ echo '<th>';
+ echo '<a href="'.href('index.php?page=naplo&sub=hianyzas&f=diak&diakId='.$diakId.'&dt='.$ADAT['dt']).'">';
+ echo $ADAT['diakok'][$diakId]['diakNev'];
+ echo '</a>';
+ echo '</th>';
+ echo '<td class="d igazolatlan keses">'._hWalk($D['késés']['igazolatlan']).'</td>';
+ echo '<td class="d igazolt keses">'._hWalk($D['késés']['igazolt']).'</td>';
+ echo '<td class="d igazolatlan hianyzas">'._hWalk($D['hiányzás']['igazolatlan']).'</td>';
+ echo '<td class="d igazolt hianyzas">'._hWalk($D['hiányzás']['igazolt']).'</td>';
+ echo '<td class="d igazolatlan felszereles">'._hWalk($D['felszerelés hiány']['igazolatlan']).'</td>';
+ echo '<td class="d igazolatlan felmentes">'._hWalk($D['felmentés']['igazolatlan']).'</td>';
+ echo '<td class="d igazolatlan egyenruha">'._hWalk($D['egyenruha hiány']['igazolatlan']).'</td>';
+ echo '</tr>'."\n";
+ }
+ }
+ echo '</tbody>'."\n\n";
+ echo '</table>';
+ }
+
+ function _hWalk($X) {
+ if (is_array($X))
+ foreach ($X as $tankorTipus => $V) {
+ $r[] = '<span title="'.$tankorTipus.'">'.$V['db'].'</span>';
+ if ($V['db']!='') $db += $V['db'];
+ }
+ return $db.((count($r)>0) ? ' ('.implode('+', $r).')':'');
+ }
+
+ function putOsztalyHianyzas($ADAT) {
+
+ putOsztalyHianyzok($ADAT);
+
+ echo '<table class="hianyzas">'."\n";
+
+ echo '<thead>';
+ echo '<tr><th>'._ORA.'</th><th>'._TANKOR.'</th><th>'._DIAK.'</th><th colspan="2">'._TIPUS.'</th></tr>';
+ echo '</thead>'."\n";
+
+ echo '<tfoot>';
+ echo '<tr><th colspan="5">'.$ADAT['dt'].'</th></tr>'."\n";
+ echo '</tfoot>'."\n";
+
+ echo '<tbody>';
+
+ foreach ($ADAT['hianyzas'] as $ora => $oraAdat) {
+
+ // Az óra cella magasságának (rowspan) megállapítása
+ $row = 0; foreach ($oraAdat as $tankorId => $hAdat) $row += count($hAdat);
+ // ezzel jelezzük, hogy most nem kell tr a tankör cellája előtt
+ $oraElso = true;
+ // Az óra sorának kezdete
+ echo '<tr>';
+ echo '<th rowspan="'.$row.'">'.$ora.'.</th>';
+
+ foreach ($oraAdat as $tankorId => $hAdat) {
+
+ if (!$oraElso) echo '<tr>';
+ $oraElso = false;
+ echo '<th class="tk" rowspan="'.count($hAdat).'">';
+ echo '<a href="'.href('index.php?page=naplo&sub=hianyzas&f=ora&oraId='.$hAdat[0]['oraId']).'">';
+ echo $ADAT['tankorok'][ $hAdat[0]['tankorId'] ][0]['tankorNev'].' ('.$hAdat[0]['tankorId'].')';
+ echo '</a>';
+ echo '</th>';
+
+ $diakIndex = array(); $elso = true;
+ for ($i = 0; $i < count($hAdat); $i++) $diakIndex[ $hAdat[$i]['diakId'] ][] = $i;
+ foreach ($ADAT['diakok'] as $diakId => $dAdat) {
+// if (isset($diakIndex[$diakId])) {
+ if (is_array($diakIndex[$diakId])) foreach ($diakIndex[$diakId] as $i) {
+// $i = $diakIndex[$diakId];
+ if (!$elso) echo '<tr>'."\n";
+ $elso = false;
+ echo '<td>';
+ echo '<a href="'.href('index.php?page=naplo&sub=hianyzas&f=nap&diakId='.$hAdat[$i]['diakId'].'&dt='.$ADAT['dt']).'">';
+ echo $ADAT['diakok'][ $hAdat[$i]['diakId'] ]['diakNev'].' ('.$hAdat[$i]['diakId'].')';
+ echo '</a>'."\n";
+ echo '</td>'."\n";
+ echo '<td class="d '.ekezettelen($hAdat[$i]['statusz']).' '.ekezettelen($hAdat[$i]['hTipus']).'">'.'</td>'."\n";
+ echo '<td >';
+ if ($hAdat[$i]['hTipus'] != 'felmentés' && $hAdat[$i]['hTipus'] != 'felszerelés hiány' && $hAdat[$i]['hTipus'] != 'egyenruha hiány') echo $hAdat[$i]['statusz'].' ';
+ echo $hAdat[$i]['hTipus'];
+ if ($hAdat[$i]['statusz'] == 'igazolatlan' && $hAdat[$i]['hTipus'] == 'késés' && $hAdat[$i]['perc'] != 0)
+ echo ' ('.$hAdat[$i]['perc'].' '._PERC.')';
+
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+ }
+ }
+ }
+ }
+ echo '</tbody>';
+ echo '</table>'."\n";
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/hibabejelento/admin.phtml b/mayor-orig/www/skin/classic/module-naplo/html/hibabejelento/admin.phtml
new file mode 100644
index 00000000..1672bcb7
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/hibabejelento/admin.phtml
@@ -0,0 +1,150 @@
+<?php
+
+ function putKerelmek($ADAT, $telephelyId, $TELEPHELY) {
+
+ global $KERELEM_TAG;
+
+ echo '<ol class="kerelem">';
+ for ($i = 0; $i < count($ADAT['kerelmek']); $i++) {
+ $_K = $ADAT['kerelmek'][$i];
+ $kerelemId = $_K['kerelemId'];
+ $_napja = round(((strtotime(date('Y-m-d H:i:s')) - strtotime($_K['rogzitesDt']))/(24*60*60)));
+
+ if ($ADAT['kerelmek'][$i]['jovahagyasDt'] != '') $class = ' class="jovahagyott" ';
+ else $class = '';
+
+ echo '<li '.$class.' id="kerelemId'.$ADAT['kerelmek'][$i]['kerelemId'].'">';
+ //echo '<div style="text-align:center; color:white; font-size:30px;">'.$i.'</div>';
+ echo '<fieldset>';
+ echo '<legend>';
+ echo superdate($ADAT['kerelmek'][$i]['rogzitesDt']);
+ echo ' – ';
+ echo $ADAT['kerelmek'][$i]['userAccount'];
+ if ($ADAT['kerelmek'][$i]['kategoria'] !='')
+ echo '<span style="border: solid 1px white; background-color: #678670; padding: 2px 5px; margin: 0px 5px;">'.$ADAT['kerelmek'][$i]['kategoria'].'</span>';
+ // if ($_K['telephelyId'] !='')
+ // echo '<span style="border: solid 1px white; background-color: #678670; padding: 2px 5px; margin: 0px 5px;">'.$_K['telephelyId'].'</span>';
+ if ($_napja>0) echo ' – '.$_napja.' napja';
+ echo '</legend>';
+
+ echo '<div class="szoveg">';
+ echo nl2br(supertext($ADAT['kerelmek'][$i]['szoveg']));
+ echo '</div>';
+
+ echo '</fieldset>';
+
+ if (count($ADAT['valaszok'][$kerelemId])>0) {
+ $_V = $ADAT['valaszok'][$kerelemId];
+ echo '<table class="kerelemValasz" cellpadding="1" cellspacing="1">';
+ for ($j=0; $j<count($_V); $j++) {
+ $_idx = (ord(mb_substr($_V[$j]['userAccount'],0,1))%5); // color index
+ echo '<tr class="c'.$_idx.'">';
+ echo '<th class="dt">'.superdate($_V[$j]['valaszDt']).'</th>';
+ echo '<td class="userAccount">'.$_V[$j]['userAccount'].'</td>';
+ echo '<td>'.supertext($_V[$j]['valasz']).'</td>';
+ echo '</tr>';
+ }
+ echo '</table>';
+ }
+
+ formBegin();
+ echo '<input type="hidden" name="action" value="hibaAdminRogzites" />';
+ echo '<input type="hidden" name="kerelemId" value="'.$ADAT['kerelmek'][$i]['kerelemId'].'" />';
+ echo '<input type="hidden" name="telephelyId" value="'.$telephelyId.'" />';
+
+ echo '<textarea name="valasz" '.$class.' placeholder="Válasz...">';
+ // echo ($ADAT['kerelmek'][$i]['valasz']);
+ echo '</textarea><br />';
+
+
+ echo '<span class="mg">';
+ if (count($KERELEM_TAG)>0) {
+ echo '<select name="kategoria" class="mg">';
+ echo '<option value="">-</option>';
+ for ($j=0; $j<count($KERELEM_TAG); $j++) {
+ $_v = $KERELEM_TAG[$j];
+ $_SEL = ($_v==$ADAT['kerelmek'][$i]['kategoria']) ? 'selected="selected"':'';
+ echo '<option value="'.$_v.'" '.$_SEL.'>'.$_v.'</option>';
+ }
+ echo '</select>';
+ }
+ echo '</span>';
+
+ if (count($TELEPHELY)>=1) {
+ echo '<span class="mg2">';
+ echo '<select class="telephely" name="telephelyId">';
+ echo '<option value=""></option>';
+ for ($ti=0; $ti<count($TELEPHELY); $ti++) {
+ $_T = $TELEPHELY[$ti];
+ $_SEL = ($_K['telephelyId'] == $_T['telephelyId']) ? ' selected="selected" ' : '' ;
+ echo '<option value="'.$_T['telephelyId'].'" '.$_SEL.'>'.$_T['telephelyRovidNev'].'</option>';
+ }
+ echo '</select>';
+ echo '</span>'."\n";
+ }
+
+ echo '<input class="mg" type="submit" name="megjegyzes" value="'._MEGJEGYZES.'" />';
+
+ if (__VEZETOSEG || __NAPLOADMIN) {
+
+ if ($ADAT['kerelmek'][$i]['jovahagyasDt'] != '')
+ echo '<input class="njh" type="submit" title="'.$_K['jovahagyasAccount'].'" name="nemHagyJova" value="'.$ADAT['kerelmek'][$i]['jovahagyasDt'].'" />';
+ else
+ echo '<input class="jh" type="submit" name="jovahagy" value="'._JOVAHAGYAS.'" />';
+ echo '<input class="done" type="submit" name="lezar" value="'._LEZARAS.'" />';
+
+ } else {
+
+ if ($ADAT['kerelmek'][$i]['jovahagyasDt'] != '') echo '<span class="dt">'.$ADAT['kerelmek'][$i]['jovahagyasDt'].'</span>';
+ if ($ADAT['kerelmek'][$i]['lezarasDt'] != '') echo '<span class="dt">'.superdate($ADAT['kerelmek'][$i]['lezarasDt']).'</span>';
+
+
+/* echo '<div class="valasz">';
+ echo nl2br(supertext($ADAT['kerelmek'][$i]['valasz']));
+ echo '</div>';
+
+ echo '<div>';
+ echo '<span class="dt">'.$ADAT['kerelmek'][$i]['rogzitesDt'].'</span>';
+ echo '</div>';
+*/
+ }
+
+
+ formEnd();
+
+ echo '</li>';
+
+ }
+ echo '</ol>';
+
+ }
+
+ function putHibabejelento($telephelyId) {
+
+ global $KERELEM_TAG;
+
+ formBegin(array('class'=>'hiba'));
+ echo '<input type="hidden" name="action" value="hibabejelentes" />';
+ echo '<input type="hidden" name="telephelyId" value="'.$telephelyId.'" />';
+
+ echo '<h1>'._KERELEM.'</h1>';
+ echo '<textarea name="txt" id="" placeholder="Kérelem...">';
+
+ echo '</textarea>';
+
+ echo '<br />';
+
+ if (count($KERELEM_TAG)>0) {
+ echo '<select name="kategoria">';
+ echo '<option value=""></option>';
+ for ($i=0; $i<count($KERELEM_TAG); $i++) {
+ $_v = $KERELEM_TAG[$i];
+ echo '<option value="'.$_v.'">'.$_v.'</option>';
+ }
+ echo '</select>';
+ }
+ echo '<input type="submit" value="'._OK.'" />';
+
+ formEnd();
+ }
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/hibabejelento/hibabejelento.phtml b/mayor-orig/www/skin/classic/module-naplo/html/hibabejelento/hibabejelento.phtml
new file mode 100644
index 00000000..08bec2a3
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/hibabejelento/hibabejelento.phtml
@@ -0,0 +1,32 @@
+<?php
+
+ function putHibabejelento($telephelyId) {
+
+ global $KERELEM_TAG;
+
+ formBegin(array('class'=>'hiba'));
+ echo '<input type="hidden" name="action" value="hibabejelentes" />';
+ echo '<input type="hidden" name="kerelemTelephelyId" value="'.$telephelyId.'" />';
+
+ echo '<h1>'._ESZREVETEL.'</h1>';
+ echo '<textarea name="txt" id="focus" maxlength="255">';
+
+ echo '</textarea>';
+
+ echo '<br />';
+
+ if (count($KERELEM_TAG)>0) {
+ echo '<select name="kategoria">';
+ echo '<option value=""></option>';
+ for ($i=0; $i<count($KERELEM_TAG); $i++) {
+ $_v = $KERELEM_TAG[$i];
+ echo '<option value="'.$_v.'">'.$_v.'</option>';
+ }
+ echo '</select>';
+ }
+ echo '<input type="submit" value="'._OK.'" />';
+
+ formEnd();
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/hirnok/cronFutar.phtml b/mayor-orig/www/skin/classic/module-naplo/html/hirnok/cronFutar.phtml
new file mode 100644
index 00000000..9c547f84
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/hirnok/cronFutar.phtml
@@ -0,0 +1,265 @@
+<?php
+
+ function generateFutarEmailTorzs($ADAT) {
+
+ if (!is_array($ADAT['hirnokFolyam'])) return false;
+
+ for ($h=0; $h<count($ADAT['hirnokFolyam']); $h++) {
+ if (count($ADAT['hirnokFolyam'])>1) { // csak ha nem egyértelmű
+ $RETURN_STR .= '<div class="hirnokSeparator">';
+ // putFace($ADAT['hirnokFolyam'][$h]['hirnokFolyamAdatok']['id'],$ADAT['hirnokFolyam'][$h]['hirnokFolyamAdatok']['tipus'],30);
+ $RETURN_STR .= '<a href="'.href('index.php?page=naplo&sub=hirnok&f=hirnok').'">'.$ADAT['hirnokFolyam'][$h]['hirnokFolyamAdatok']['cn'].'</a>';
+ $RETURN_STR .= '</div>';
+ }
+ foreach ($ADAT['hirnokFolyam'][$h]['hirnokFolyamUzenetek'] as $stamp => $DA) {
+ for ($i=0; $i<count($DA); $i++) {
+ $D = $DA[$i];
+ $RETURN_STR .= '<div class="hirnokDoboz '.$D['hirnokTipus'].'">';
+ $RETURN_STR .= '<div class="hirnokBadgeHolder '.$D['hirnokTipus'].'">';
+ if (function_exists('generateFutarBadge_'.$D['hirnokTipus'])) $RETURN_STR .= call_user_func('generateFutarBadge_'.$D['hirnokTipus'],$D);
+ $RETURN_STR .= '</div>';
+ $RETURN_STR .= '<div class="hirnokDt">';
+ if (function_exists('generateFutarDetail_'.$D['hirnokTipus'])) $RETURN_STR .= call_user_func('generateFutarDetail_'.$D['hirnokTipus'],$D);
+ else $RETURN_STR .= (date('Y.m.d. H:i:s',$stamp));
+ $RETURN_STR .= '</div>';
+ $RETURN_STR .= '<div class="hirnokText '.$D['hirnokTipus'].'">';
+ if (function_exists('generateFutar_'.$D['hirnokTipus'])) $RETURN_STR .= call_user_func('generateFutar_'.$D['hirnokTipus'],$D);
+ // else dump($D);
+ $RETURN_STR .= '</div>';
+ $RETURN_STR .= '<div class="hirnokRight '.$D['hirnokTipus'].'">';
+ if (function_exists('generateFutarRight_'.$D['hirnokTipus'])) $RETURN_STR .= call_user_func('generateFutarRight_'.$D['hirnokTipus'],$D);
+ $RETURN_STR .= '</div>';
+/* $RETURN_STR .= '<div class="hirnokFooter '.$D['hirnokTipus'].'">';
+ if (function_exists('generateFutarFooter_'.$D['hirnokTipus'])) $RETURN_STR .= call_user_func('generateFutarFooter_'.$D['hirnokTipus'],$D);
+ $RETURN_STR .= '</div>';
+*/
+ $RETURN_STR .= '</div>';
+ }
+ }
+ }
+ // vege $RETURN_STR .= '<div class="hirnokSeparator"><a href="'.href('index.php?page=naplo&sub=hirnok&f=hirnok').'"><span class="icon-calendar"></span> '.superdate($ADAT['tolDt']).'<span class="icon-bullhorn"></span></a></div>';
+ return str_replace('</div>','</div>'."\n",$RETURN_STR);
+ }
+ function generateFutarRight_uzeno($D) {
+ return $RETURN_STR;
+ }
+ function generateFutarFooter_uzeno($D) {
+ return $RETURN_STR;
+ }
+ function generateFutar_idoszak($D) {
+ $RETURN_STR .= 'Aktív <b>'.$D['idoszakAdat']['tipus'].'</b> időszak: '.$D['idoszakAdat']['tolDt'].' – '.$D['idoszakAdat']['igDt'];
+ return $RETURN_STR;
+ }
+
+ function generateFutarBadge_jegy($D) {
+ // return '<i class="material-icons">face</i>';
+ }
+
+ function generateFutar_haladasiOra($D) {
+ global $aHetNapjai;
+ $nap = kisbetus($aHetNapjai[date('w',strtotime($D['oraAdat']['dt']))-1]);
+ $RETURN_STR .= 'A '.$D['oraAdat']['tankorCn'].' tankör '.$D['oraAdat']['dt'].' '.$nap.'i '.$D['oraAdat']['ora'].'. óra státusza megváltozott. ';
+ if ($D['oraAdat']['teremId']>0) $RETURN_STR .= 'Terme: '.$D['oraAdat']['teremId'].'. ';
+ $RETURN_STR .= 'Új típusa: <b>'.$D['oraAdat']['tipus'].'</b>! ';
+ if ($D['oraAdat']['ki']>0) $RETURN_STR .= '('.$D['oraAdat']['kiCn'].')';
+ return $RETURN_STR;
+ }
+
+ function generateFutarDetail_uzeno($D) {
+ $IMG = array( // jobb lenne valami shared helyen
+ 'diak' => '<span title="diák" class="icon-child"></span>',
+ 'szulo' => '<span title="szülő" class="icon-adult"></span>',
+ 'tanar' => '<span title="tanár" class="icon-adult"></span>',
+ 'munkakozosseg' => '<span title="munkaközösség tagjai" class="icon-slideshare"></span>',
+ 'tankor' => '<span title="tankör diákjai és tanára" class="icon-myspace"></span>',
+ 'tankorSzulo' => '<span title="tankörbe járók szülei" class="icon-group-alt"></span>',
+ 'osztaly' => '<span title="osztály diákjai és osztályfőnökei" class="icon-group"></span>',
+ 'osztalySzulo' => '<span title="osztályba járók szülei" class="icon-adult"></span>',
+ 'osztalyTanar' => '<span title="osztályban tanítók" class="icon-slideshare"></span>',
+ );
+ $TIPUS_STR = array(
+ 'diak' => 'diák',
+ 'szulo' => 'szülő',
+ 'tanar' => 'tanár',
+ 'munkakozosseg' => 'munkaközösség tagjai',
+ 'tankor' => 'tankör diákjai és tanára',
+ 'tankorSzulo' => 'tankörbe járók szülei',
+ 'osztaly' => 'osztály diákjai és osztályfőnökei',
+ 'osztalySzulo' => 'osztályba járók szülei',
+ 'osztalyTanar' => 'osztályban tanítók',
+ );
+ $_szalId = $D['uzenoAdat']['feladoId'].'_'.$D['uzenoAdat']['feladoTipus'].'_'.$D['uzenoAdat']['cimzettId'].'_'.$D['uzenoAdat']['cimzettTipus'];
+ $_link1 = href('index.php?page=naplo&sub=uzeno&f=uzeno&feladoId='.$D['uzenoAdat']['feladoId'].'&feladoTipus='.$D['uzenoAdat']['feladoTipus']);
+ $_link2 = href('index.php?page=naplo&sub=uzeno&f=uzeno&cimzettId='.$D['uzenoAdat']['cimzettId'].'&feladoTipus='.$D['uzenoAdat']['cimzettTipus']);
+ $RETURN_STR .= '<a href="'.$_link1.'">';
+ if ($D['uzenoAdat']['feladoId']==0) $RETURN_STR .= 'Adminisztrátor';
+ else $RETURN_STR .= $D['feladoNev'];
+ $RETURN_STR .= '</a>';
+ //TESZT $RETURN_STR .= '<span class="icon-caret-right" style="padding: 0px 4px; font-size:8px;"></span>';
+ if ($D['cimzettNev']!='') $RETURN_STR .= '<br/><span><a href="'.$_link2.'">'.$D['cimzettNev'].'</a></span>';
+ $RETURN_STR .= '<br/>';
+ $RETURN_STR .= '<span style="color:#aaa;">';
+ $RETURN_STR .= superdate(date('Y-m-d H:i:s',strtotime($D['uzenoAdat']['dt'])));
+ $RETURN_STR .= '<span style="padding: 0px 2px;">·</span>';
+ if ($D['uzenoAdat']['cimzettId']==0) $RETURN_STR .= '<span class="icon-globe" title="minden"></span>';
+ else $RETURN_STR .= $IMG[$D['uzenoAdat']['cimzettTipus']];
+ $RETURN_STR .= '<span style="padding: 0px 2px;">·</span>';
+ if ($D['uzenoAdat']['cimzettId']==0) $RETURN_STR .= 'minden ';
+ $RETURN_STR .= $TIPUS_STR[$D['uzenoAdat']['cimzettTipus']];
+ $RETURN_STR .= '</span>';
+ return $RETURN_STR;
+
+ }
+
+ function generateFutar_zaroJegy($D) {
+ global $KOVETELMENY;
+
+ $RETURN_STR .= ucfirst($D['targyAdat']['targyNev']);
+ $RETURN_STR .= ' tárgyból ';
+
+ $RETURN_STR .= $D['zaroJegyAdat']['evfolyamJel'].'. évfolyam ';
+ $RETURN_STR .= ''.$D['zaroJegyAdat']['felev'].'. félévére ';
+
+ $RETURN_STR .= '<b>'.($KOVETELMENY[$D['zaroJegyAdat']['jegyTipus']][$D['zaroJegyAdat']['jegy']]['hivatalos']).'</b>';
+ $RETURN_STR .= ' ('.$KOVETELMENY[$D['zaroJegyAdat']['jegyTipus']][$D['zaroJegyAdat']['jegy']]['rovid'].') ';
+ $RETURN_STR .= $D['zaroJegyAdat']['jegyTipus'];
+ $RETURN_STR .= ' típusú osztályzat került beírásra / módosult a bizonyítványban.';
+
+
+ if (is_array($D['oraAdat'])) {
+ $RETURN_STR .= 'Az óra adatai: '.$D['oraAdat']['tankorNev'].' '.
+ $D['oraAdat']['kiCn'].', '.
+ $D['oraAdat']['leiras'].', '.
+ $D['oraAdat']['dt'].' '.
+ $D['oraAdat']['ora'].'. óra.';
+ }
+
+ // dump($D);
+ return $RETURN_STR;
+ }
+ function generateFutar_jegy($D) {
+ global $KOVETELMENY;
+
+ if ($D['jegyAdat']['dt'] != date('Y-m-d',strtotime($D['jegyAdat']['modositasDt']))) {
+
+ $str[] = 'Jegymódosítás! ';
+ $str[] = ucfirst($D['targyAdat']['targyNev']);
+ $str[] = 'tárgyból';
+
+ $str[] = '<b>'.($KOVETELMENY[$D['jegyAdat']['jegyTipus']][$D['jegyAdat']['jegy']]['hivatalos']).'</b>';
+ $str[] = '('.$KOVETELMENY[$D['jegyAdat']['jegyTipus']][$D['jegyAdat']['jegy']]['rovid'].') ';
+ $str[] = $D['jegyAdat']['jegyTipus'];
+ $str[] = 'típusú értékelésre módosult a '.$D['jegyAdat']['dt'].'-n kelt eredeti bejegyzés.';
+ } else {
+ $str[] = ucfirst($D['targyAdat']['targyNev']);
+ $str[] = 'tárgyból';
+
+ $str[] = '<b>'.($KOVETELMENY[$D['jegyAdat']['jegyTipus']][$D['jegyAdat']['jegy']]['hivatalos']).'</b>';
+ $str[] = '(röviden: '.$KOVETELMENY[$D['jegyAdat']['jegyTipus']][$D['jegyAdat']['jegy']]['rovid'].'),';
+ $str[] = $D['jegyAdat']['jegyTipus'];
+ $str[] = 'típusú értékelés került beírásra az osztályozó naplóba.';
+ }
+
+ if (is_array($D['oraAdat'])) {
+ $str[] = 'Az óra adatai: '.$D['oraAdat']['tankorNev'].' '.
+ $D['oraAdat']['kiCn'].', '.
+ $D['oraAdat']['leiras'].', '.
+ $D['oraAdat']['dt'].' '.
+ $D['oraAdat']['ora'].'. óra.';
+ }
+
+ // $RETURN_STR .= $D['jegyAdat']['jegy'];
+ // $RETURN_STR .= $D['jegyAdat']['jegyTipus'];
+ $RETURN_STR .= implode(' ',$str);
+
+ // dump($D);
+ return $RETURN_STR;
+ }
+
+ function generateFutar_dolgozat($D) {
+
+ if (strtotime($D['dolgozatAdat']['tervezettDt'])>strtotime(date('Y-m-d H:i:s'))) {
+ $RETURN_STR .= 'Új dolgozat várható! ';
+ } else {
+ $RETURN_STR .= 'Új dolgozat került rögzítésre. ';
+ }
+ $RETURN_STR .= 'A bejelentés ideje: ';
+ $RETURN_STR .= $D['dolgozatAdat']['bejelentesDt'].', tervezett időpontja: ';
+ $RETURN_STR .= $D['dolgozatAdat']['tervezettDt'].'. ';
+
+ $RETURN_STR .= 'A dolgozat megnevezése: '.$D['dolgozatAdat']['dolgozatNev'].'. ';
+
+ $RETURN_STR .= 'Érintett tankör';
+ if (count($D['dolgozatAdat']['tankor'])>1) $RETURN_STR .= 'ök';
+ $RETURN_STR .= ': ';
+ for($i=0; $i<count($D['dolgozatAdat']['tankor']); $i++) {
+ $RETURN_STR .= ($D['dolgozatAdat']['tankor'][$i]['tankorNev']);
+ if ($i<count($D['dolgozatAdat']['tankor'])-1) $RETURN_STR .= ' ';
+ }
+ // dump( $D );
+ return $RETURN_STR;
+ }
+
+ function generateFutarRight_haladasiBeiratlan($D) {
+ global $UdvozloKep,$skin;
+ if (!is_array($UdvozloKep) || count($UdvozloKep) == 0) $UdvozloKep = array('kutya','pingvin','smiley','garfield','majom');
+ if ($D['db']==0) {
+ $i = rand(0, count($UdvozloKep)-1);
+ $RETURN_STR .= '<img src="skin/classic/module-naplo/img/anim/'.$UdvozloKep[$i].'.gif" alt="anim gif" style="height: 60px;" />';
+ }
+ return $RETURN_STR;
+ }
+
+ function generateFutar_haladasiBeiratlan($D) {
+
+ if ($D['db']==0) {
+ $RETURN_STR .= 'Köszönjük, hogy minden órádat beírtad!';
+ } else {
+ $RETURN_STR .= 'Beíratlan órák száma: '.$D['db'];
+ }
+ return $RETURN_STR;
+ }
+ function generateFutar_uzeno($D) {
+ if ($D['uzenoAdat']['flag']==1) $RETURN_STR .= '<i>– a szöveget a kérésedre elrejtettük –</i>';
+ else $RETURN_STR .= nl2br(makelinksclickable((supertext($D['uzenoAdat']['txt'])))); // egyelőre nem tudunk bővebbet, mert a backend nem szolgáltat infót
+/* $RETURN_STR .= '<div class="hirnokIkonKontener" style="display: relativ; top:0px; right:0px; text-align:right;">';
+ $_szalId = $D['uzenoAdat']['feladoId'].'_'.$D['uzenoAdat']['feladoTipus'].'_'.$D['uzenoAdat']['cimzettId'].'_'.$D['uzenoAdat']['cimzettTipus'];
+ $RETURN_STR .= '<a href="'.href('index.php?page=naplo&sub=uzeno&f=uzeno&szalId='.$_szalId).'">';
+ $RETURN_STR .= '<span class="icon-pencil"></span>';
+ $RETURN_STR .= '</a>';
+
+ if ($D['uzenoAdat']['flag']!=1) {
+ $RETURN_STR .= '<a href="'.href('index.php?page=naplo&sub=uzeno&f=uzeno&action=flagUzenet&flag=1&mId='.$D['uzenoAdat']['mId']).'"><span class="icon-eye-close"></span></a>';
+ } else {
+ $RETURN_STR .= '<a href="'.href('index.php?page=naplo&sub=uzeno&f=uzeno&action=flagUzenet&flag=0&mId='.$D['uzenoAdat']['mId']).'"><span class="icon-eye-open"></span></a>';
+ }
+ if (__UZENOADMIN===true) {
+ $RETURN_STR .= '<a href="'.href('index.php?page=naplo&sub=uzeno&f=uzeno&action=delUzenet&mId='.$D['uzenoAdat']['mId']).'"><span class="icon-trash-alt"></span></a>';
+ }
+ $RETURN_STR .= '</div>';
+*/
+ return $RETURN_STR;
+
+ }
+
+ function generateFutar_bejegyzes($D) {
+ $RETURN_STR .= 'Új '.ucfirst($D['bejegyzesAdat']['bejegyzesTipusNev']).' került rögzítésre. ';
+ if ($D['bejegyzesAdat']['szoveg'] !='') $RETURN_STR .= '<q>'.$D['bejegyzesAdat']['szoveg'].'</q>';
+ $RETURN_STR .= ' - '.$D['tanarAdat']['tanarNev'];
+ return $RETURN_STR;
+ }
+
+ function generateFutar_hianyzas($D) {
+ global $aHetNapjai;
+ $nap = kisbetus($aHetNapjai[date('w',strtotime($D['hianyzasAdat']['dt']))-1]);
+ $RETURN_STR .= $D['hianyzasAdat']['dt'].' '.$nap.' '.$D['hianyzasAdat']['ora'].'. órára (';
+ $RETURN_STR .= $D['oraAdat']['tankorNev'].', '.$D['oraAdat']['kiCn'];
+ $RETURN_STR .= ') ';
+ if (in_array($D['hianyzasAdat']['tipus'],array('késés','hiányzás'))) $RETURN_STR .= $D['hianyzasAdat']['statusz'].' ';
+ if ($D['hianyzasAdat']['tipus']=='késés' && $D['hianyzasAdat']['perc']>0) $RETURN_STR .= ' '.$D['hianyzasAdat']['perc'].' perc ';
+ $RETURN_STR .= '<b>'.$D['hianyzasAdat']['tipus'].'</b> került rögzítésre.';
+ return $RETURN_STR;
+ }
+
+
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/hirnok/hirnok.phtml b/mayor-orig/www/skin/classic/module-naplo/html/hirnok/hirnok.phtml
new file mode 100644
index 00000000..54222591
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/hirnok/hirnok.phtml
@@ -0,0 +1,319 @@
+<?php
+
+ require_once('skin/classic/module-naplo/html/share/face.phtml');
+
+ function putHirnokFolyam($ADAT) {
+
+ if (!is_array($ADAT['hirnokFolyam'])) return false;
+
+ // echo '<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">';
+
+ for ($h=0; $h<count($ADAT['hirnokFolyam']); $h++) {
+ if (count($ADAT['hirnokFolyam'])>=1) {
+ echo '<div class="hirnokSeparator">';
+ putFace($ADAT['hirnokFolyam'][$h]['hirnokFolyamAdatok']['id'],$ADAT['hirnokFolyam'][$h]['hirnokFolyamAdatok']['tipus'],30);
+ echo '<a href="'.href('index.php?page=naplo&sub=hirnok&f=hirnok').'">'.$ADAT['hirnokFolyam'][$h]['hirnokFolyamAdatok']['cn'].'</a>';
+ echo '</div>';
+ }
+ foreach ($ADAT['hirnokFolyam'][$h]['hirnokFolyamUzenetek'] as $stamp => $DA) {
+ for ($i=0; $i<count($DA); $i++) {
+ $D = $DA[$i];
+ echo '<div class="hirnokDoboz '.$D['hirnokTipus'].'">';
+ echo '<div class="hirnokBadgeHolder '.$D['hirnokTipus'].'">';
+ if (function_exists('putHirnokBadge_'.$D['hirnokTipus'])) call_user_func('putHirnokBadge_'.$D['hirnokTipus'],$D);
+ echo '</div>';
+ echo '<div class="hirnokDt">';
+ if (function_exists('putHirnokDetail_'.$D['hirnokTipus'])) call_user_func('putHirnokDetail_'.$D['hirnokTipus'],$D);
+ else echo superdate(date('Y-m-d H:i:s',$stamp));
+ echo '</div>';
+ echo '<div class="hirnokText '.$D['hirnokTipus'].'">';
+ if (function_exists('putHirnok_'.$D['hirnokTipus'])) call_user_func('putHirnok_'.$D['hirnokTipus'],$D);
+ // else dump($D);
+ echo '</div>';
+ echo '<div class="hirnokRight '.$D['hirnokTipus'].'">';
+ if (function_exists('putHirnokRight_'.$D['hirnokTipus'])) call_user_func('putHirnokRight_'.$D['hirnokTipus'],$D);
+ echo '</div>';
+/* echo '<div class="hirnokFooter '.$D['hirnokTipus'].'">';
+ if (function_exists('putHirnokFooter_'.$D['hirnokTipus'])) call_user_func('putHirnokFooter_'.$D['hirnokTipus'],$D);
+ echo '</div>';
+*/
+ echo '</div>';
+ }
+ }
+ }
+ echo '<div class="hirnokSeparator"><a href="'.href('index.php?page=naplo&sub=hirnok&f=hirnok').'"><span class="icon-calendar"></span> '.superdate($ADAT['tolDt']).'<span class="icon-bullhorn"></span></a></div>';
+
+ }
+ function putHirnokBadge_bejegyzes($D) {
+ // hint by rpetya (peter.rakolcza@gmail.com)
+ // $ICO = array('dicséret'=>'icon-smiley-alt','fegyelmi'=>'icon-exclamation-sign','üzenet'=>'icon-envelope');
+ $ICON = array('dicséret'=>'mood','fegyelmi'=>'mood_bad','üzenet'=>'mail');
+ $RGB = array('dicséret'=>'lightgreen','fegyelmi'=>'#e91e63','üzenet'=>'#9c27b0');
+ // echo '<a href="'.href('index.php?page=naplo&sub=bejegyzesek&f=bejegyzesek').'"><span style="background-color: '.$RGB[$D['bejegyzesAdat']['tipus']].'" class="'.$ICO[$D['bejegyzesAdat']['tipus']].'"></span></a>';
+ echo '<a href="'.href('index.php?page=naplo&sub=bejegyzesek&f=bejegyzesek').'"><span style="background-color: '.$RGB[$D['bejegyzesAdat']['tipus']].'" class="material-icons">'.$ICON[$D['bejegyzesAdat']['tipus']].'</span></a>';
+ }
+ function putHirnokBadge_idoszak($D) {
+ echo '<span class="icon-calendar-sign"></span>';
+ }
+ function putHirnokBadge_haladasiBeiratlan($D) {
+
+ if ($D['db']!=0)
+ echo '<a href="'.href('index.php?page=naplo&sub=haladasi&f=haladasi').'"><span class="icon-bullhorn"></span></a>';
+ else
+ echo '<a href="'.href('index.php?page=naplo&sub=haladasi&f=haladasi').'"><span class="icon-ok-sign" style="background-color:lightgreen"></span></a>';
+
+ }
+ function putHirnokBadge_dolgozat($D) {
+ echo '<a href="'.href('index.php?page=naplo&sub=osztalyozo&f=dolgozat').'">';
+ //echo '<span class="icon-calendar-sign"></span>';
+ echo '<span class="material-icons" style="background-color:orange;">lightbulb_outline</span>';
+ echo '</a>';
+ }
+ function putHirnokBadge_jegy($D) {
+ echo '<a href="'.href('index.php?page=naplo&sub=osztalyozo&f=diak').'">';
+ // echo '<span class="icon-pencil"></span>';
+ if (in_array($D['jegyAdat']['jegy'],array(1,2,3,4,5))) echo '<span class="material-icons">looks_'.intval(($D['jegyAdat']['jegy'])).'</span>';
+ else echo '<span class="material-icons">mode_edit</span>';
+ echo '</a>';
+ }
+ function putHirnokBadge_haladasiOra($D) {
+ $ICONS = array('helyettesítés'=>'cached', 'elmarad'=>'grid_off', 'elmarad máskor'=>'call_split','felügyelet'=>'border_clear', 'normál'=>'border_all', 'normál máskor'=>'call_merge','összevonás'=>'group_add');
+ echo '<a href="'.href('index.php?page=naplo&sub=orarend&f=orarend').'">';
+ // echo '<span class="icon-th"></span>';
+ echo '<span class="material-icons">'.$ICONS[$D['oraAdat']['tipus']].'</span>'; // grid_off
+ echo '</a>';
+ }
+ function putHirnokBadge_uzeno($D) {
+ $_szalId = $D['uzenoAdat']['feladoId'].'_'.$D['uzenoAdat']['feladoTipus'].'_'.$D['uzenoAdat']['cimzettId'].'_'.$D['uzenoAdat']['cimzettTipus'];
+ echo '<a href="'.href('index.php?page=naplo&sub=uzeno&f=uzeno&szalId='.$_szalId).'">';
+ // putFace($D['uzenoAdat']['cimzettId'],$D['uzenoAdat']['cimzettTipus'],30);
+ // echo '<span class="icon-envelope"></span>';
+ echo '<span class="material-icons">mail</span>';
+ echo '</a>';
+ //putFace($D['uzenoAdat']['feladoId'],$D['uzenoAdat']['feladoTipus'],30);
+ }
+ function putHirnokRight_uzeno($D) {
+ putFace($D['uzenoAdat']['feladoId'],$D['uzenoAdat']['feladoTipus'],30);
+ }
+ function putHirnokFooter_uzeno($D) {
+ echo '<div class="hidden">';
+ // echo '<span class="icon-globe"></span>';
+ echo '<span class="material-icons">swap_horiz</span>';
+ echo '</div>';
+ }
+
+ function putHirnokBadge_zaroJegy($D) {
+ echo '<a href="'.href('index.php?page=naplo&sub=osztalyozo&f=bizonyitvany').'">';
+ // echo '<span class="icon-pencil-alt"></span>';
+ echo '<span class="material-icons">border_color</span>';
+ echo '</a>';
+ }
+
+ function putHirnok_idoszak($D) {
+ echo 'Aktív <b>'.$D['idoszakAdat']['tipus'].'</b> időszak: '.$D['idoszakAdat']['tolDt'].' – '.$D['idoszakAdat']['igDt'];
+ }
+
+ function putHirnokBadge_hianyzas($D) {
+ $ICON = array('késés'=>'timer','felmentés'=>'accessible','felszerelés hiány'=>'accessibility',
+ 'hiányzás'=>'location_off'); // location_off, grid_off, blur_off
+ echo '<a href="'.href('index.php?page=naplo&sub=hianyzas&f=diak').'">';
+ // echo '<span class="icon-time-alt"></span>';
+ echo '<span class="material-icons">'.$ICON[$D['hianyzasAdat']['tipus']].'</span>';
+ echo '</a>';
+ ;
+ }
+
+ function putHirnok_hianyzas($D) {
+ global $aHetNapjai;
+ $nap = kisbetus($aHetNapjai[date('w',strtotime($D['hianyzasAdat']['dt']))-1]);
+ echo $D['hianyzasAdat']['dt'].' '.$nap.' '.$D['hianyzasAdat']['ora'].'. órára (';
+ echo $D['oraAdat']['tankorNev'].', '.$D['oraAdat']['kiCn'];
+ echo ') ';
+ if (in_array($D['hianyzasAdat']['tipus'],array('késés','hiányzás'))) echo $D['hianyzasAdat']['statusz'].' ';
+ if ($D['hianyzasAdat']['tipus']=='késés' && $D['hianyzasAdat']['perc']>0) echo ' '.$D['hianyzasAdat']['perc'].' perc ';
+ echo '<b>'.$D['hianyzasAdat']['tipus'].'</b> került rögzítésre.';
+ }
+
+ function putHirnok_haladasiOra($D) {
+ global $aHetNapjai;
+ $nap = kisbetus($aHetNapjai[date('w',strtotime($D['oraAdat']['dt']))-1]);
+ echo 'A '.$D['oraAdat']['tankorCn'].' tankör '.$D['oraAdat']['dt'].' '.$nap.'i '.$D['oraAdat']['ora'].'. óra státusza megváltozott. ';
+ if ($D['oraAdat']['teremId']>0) echo 'Terme: '.$D['oraAdat']['teremId'].'. ';
+ echo 'Új típusa: <b>'.$D['oraAdat']['tipus'].'</b>! ';
+ if ($D['oraAdat']['ki']>0) echo '('.$D['oraAdat']['kiCn'].')';
+ }
+
+ function putHirnokDetail_uzeno($D) {
+ $IMG = array( // jobb lenne valami shared helyen
+ 'diak' => '<span title="diák" class="icon-child"></span>',
+ 'szulo' => '<span title="szülő" class="icon-adult"></span>',
+ 'tanar' => '<span title="tanár" class="icon-adult"></span>',
+ 'munkakozosseg' => '<span title="munkaközösség tagjai" class="icon-slideshare"></span>',
+ 'tankor' => '<span title="tankör diákjai és tanára" class="icon-myspace"></span>',
+ 'tankorSzulo' => '<span title="tankörbe járók szülei" class="icon-group-alt"></span>',
+ 'osztaly' => '<span title="osztály diákjai és osztályfőnökei" class="icon-group"></span>',
+ 'osztalySzulo' => '<span title="osztályba járók szülei" class="icon-adult"></span>',
+ 'osztalyTanar' => '<span title="osztályban tanítók" class="icon-slideshare"></span>',
+ );
+ $TIPUS_STR = array(
+ 'diak' => 'diák',
+ 'szulo' => 'szülő',
+ 'tanar' => 'tanár',
+ 'munkakozosseg' => 'munkaközösség tagjai',
+ 'tankor' => 'tankör diákjai és tanára',
+ 'tankorSzulo' => 'tankörbe járók szülei',
+ 'osztaly' => 'osztály diákjai és osztályfőnökei',
+ 'osztalySzulo' => 'osztályba járók szülei',
+ 'osztalyTanar' => 'osztályban tanítók',
+ );
+ $_szalId = $D['uzenoAdat']['feladoId'].'_'.$D['uzenoAdat']['feladoTipus'].'_'.$D['uzenoAdat']['cimzettId'].'_'.$D['uzenoAdat']['cimzettTipus'];
+ $_link1 = href('index.php?page=naplo&sub=uzeno&f=uzeno&feladoId='.$D['uzenoAdat']['feladoId'].'&feladoTipus='.$D['uzenoAdat']['feladoTipus']);
+ $_link2 = href('index.php?page=naplo&sub=uzeno&f=uzeno&cimzettId='.$D['uzenoAdat']['cimzettId'].'&feladoTipus='.$D['uzenoAdat']['cimzettTipus']);
+ echo '<a href="'.$_link1.'">';
+ if ($D['uzenoAdat']['feladoId']==0) echo 'Adminisztrátor';
+ else echo $D['feladoNev'];
+ echo '</a>';
+ //TESZT echo '<span class="icon-caret-right" style="padding: 0px 4px; font-size:8px;"></span>';
+ if ($D['cimzettNev']!='') echo '<br/><span><a href="'.$_link2.'">'.$D['cimzettNev'].'</a></span>';
+ echo '<br/>';
+ echo '<span style="color:#aaa;">';
+ echo superdate(date('Y-m-d H:i:s',strtotime($D['uzenoAdat']['dt'])));
+ echo '<span style="padding: 0px 2px;">·</span>';
+ if ($D['uzenoAdat']['cimzettId']==0) echo '<span class="icon-globe" title="minden"></span>';
+ else echo $IMG[$D['uzenoAdat']['cimzettTipus']];
+ echo '<span style="padding: 0px 2px;">·</span>';
+ if ($D['uzenoAdat']['cimzettId']==0) echo 'minden ';
+ echo $TIPUS_STR[$D['uzenoAdat']['cimzettTipus']];
+ echo '</span>';
+
+ }
+
+ function putHirnok_zaroJegy($D) {
+ global $KOVETELMENY;
+
+ echo ucfirst($D['targyAdat']['targyNev']);
+ echo ' tárgyból ';
+
+ echo $D['zaroJegyAdat']['evfolyamJel'].'. évfolyam ';
+ echo ''.$D['zaroJegyAdat']['felev'].'. félévére ';
+
+ echo '<b>'.($KOVETELMENY[$D['zaroJegyAdat']['jegyTipus']][$D['zaroJegyAdat']['jegy']]['hivatalos']).'</b>';
+ echo ' ('.$KOVETELMENY[$D['zaroJegyAdat']['jegyTipus']][$D['zaroJegyAdat']['jegy']]['rovid'].') ';
+ echo $D['zaroJegyAdat']['jegyTipus'];
+ echo ' típusú osztályzat került beírásra / módosult a bizonyítványban.';
+
+
+ if (is_array($D['oraAdat'])) {
+ echo 'Az óra adatai: '.$D['oraAdat']['tankorNev'].' '.
+ $D['oraAdat']['kiCn'].', '.
+ $D['oraAdat']['leiras'].', '.
+ $D['oraAdat']['dt'].' '.
+ $D['oraAdat']['ora'].'. óra.';
+ }
+
+ // dump($D);
+ }
+ function putHirnok_jegy($D) {
+ global $KOVETELMENY;
+
+ if ($D['jegyAdat']['dt'] != date('Y-m-d',strtotime($D['jegyAdat']['modositasDt']))) {
+
+ $str[] = 'Jegymódosítás! ';
+ $str[] = ucfirst($D['targyAdat']['targyNev']);
+ $str[] = 'tárgyból';
+
+ $str[] = '<b>'.($KOVETELMENY[$D['jegyAdat']['jegyTipus']][$D['jegyAdat']['jegy']]['hivatalos']).'</b>';
+ $str[] = '('.$KOVETELMENY[$D['jegyAdat']['jegyTipus']][$D['jegyAdat']['jegy']]['rovid'].') ';
+ $str[] = $D['jegyAdat']['jegyTipus'];
+ $str[] = 'típusú értékelésre módosult a '.$D['jegyAdat']['dt'].'-n kelt eredeti bejegyzés.';
+ } else {
+ $str[] = '<b>'.ucfirst($D['targyAdat']['targyNev']).'</b>';
+ $str[] = 'tárgyból';
+
+ $str[] = '<b>'.($KOVETELMENY[$D['jegyAdat']['jegyTipus']][$D['jegyAdat']['jegy']]['hivatalos']).'</b>';
+ $str[] = '('.$KOVETELMENY[$D['jegyAdat']['jegyTipus']][$D['jegyAdat']['jegy']]['rovid'].'),';
+ $str[] = $D['jegyAdat']['jegyTipus'];
+ $str[] = 'típusú értékelés került beírásra az osztályozó naplóba.';
+ }
+
+ if (is_array($D['oraAdat'])) {
+ $str[] = 'Az óra adatai: '.$D['oraAdat']['tankorNev'].' '.
+ $D['oraAdat']['kiCn'].', '.
+ $D['oraAdat']['leiras'].', '.
+ $D['oraAdat']['dt'].' '.
+ $D['oraAdat']['ora'].'. óra.';
+ }
+
+ // echo $D['jegyAdat']['jegy'];
+ // echo $D['jegyAdat']['jegyTipus'];
+ echo implode(' ',$str);
+
+ // dump($D);
+ }
+
+ function putHirnok_dolgozat($D) {
+
+ if (strtotime($D['dolgozatAdat']['tervezettDt'])>strtotime(date('Y-m-d H:i:s'))) {
+ echo 'Új dolgozat várható! ';
+ } else {
+ echo 'Új dolgozat került rögzítésre. ';
+ }
+ echo 'A bejelentés ideje: ';
+ echo $D['dolgozatAdat']['bejelentesDt'].', tervezett időpontja: ';
+ echo $D['dolgozatAdat']['tervezettDt'].'. ';
+
+ echo 'A dolgozat megnevezése: '.$D['dolgozatAdat']['dolgozatNev'].'. ';
+
+ echo 'Érintett tankör';
+ if (count($D['dolgozatAdat']['tankor'])>1) echo 'ök';
+ echo ': ';
+ for($i=0; $i<count($D['dolgozatAdat']['tankor']); $i++) {
+ echo ($D['dolgozatAdat']['tankor'][$i]['tankorNev']);
+ if ($i<count($D['dolgozatAdat']['tankor'])-1) echo ' ';
+ }
+ // dump( $D );
+ }
+
+ function putHirnokRight_haladasiBeiratlan($D) {
+ global $UdvozloKep,$skin;
+ if (!is_array($UdvozloKep) || count($UdvozloKep) == 0) $UdvozloKep = array('kutya','pingvin','smiley','garfield','majom');
+ if ($D['db']==0) {
+ $i = rand(0, count($UdvozloKep)-1);
+ echo '<img src="skin/classic/module-naplo/img/anim/'.$UdvozloKep[$i].'.gif" alt="anim gif" style="height: 60px;" />';
+ }
+ }
+
+ function putHirnok_haladasiBeiratlan($D) {
+
+ if ($D['db']==0) {
+ echo 'Köszönjük, hogy minden órádat beírtad!';
+ } else {
+ echo 'Beíratlan órák száma: '.$D['db'];
+ }
+ }
+ function putHirnok_uzeno($D) {
+ if ($D['uzenoAdat']['flag']==1) echo '<i>– a szöveget a kérésedre elrejtettük –</i>';
+ else echo nl2br(makelinksclickable((supertext($D['uzenoAdat']['txt'])))); // egyelőre nem tudunk bővebbet, mert a backend nem szolgáltat infót
+ echo '<div class="hirnokIkonKontener" style="display: relativ; top:0px; right:0px; text-align:right;">';
+ $_szalId = $D['uzenoAdat']['feladoId'].'_'.$D['uzenoAdat']['feladoTipus'].'_'.$D['uzenoAdat']['cimzettId'].'_'.$D['uzenoAdat']['cimzettTipus'];
+ echo '<a href="'.href('index.php?page=naplo&sub=uzeno&f=uzeno&szalId='.$_szalId).'">';
+ echo '<span class="icon-pencil"></span>';
+ echo '</a>';
+ if ($D['uzenoAdat']['flag']!=1) {
+ echo '<a href="'.href('index.php?page=naplo&sub=uzeno&f=uzeno&action=flagUzenet&flag=1&mId='.$D['uzenoAdat']['mId']).'"><span class="icon-eye-close"></span></a>';
+ } else {
+ echo '<a href="'.href('index.php?page=naplo&sub=uzeno&f=uzeno&action=flagUzenet&flag=0&mId='.$D['uzenoAdat']['mId']).'"><span class="icon-eye-open"></span></a>';
+ }
+ if (__UZENOADMIN===true) {
+ echo '<a href="'.href('index.php?page=naplo&sub=uzeno&f=uzeno&action=delUzenet&mId='.$D['uzenoAdat']['mId']).'"><span class="icon-trash-alt"></span></a>';
+ }
+ echo '</div>';
+
+ }
+
+ function putHirnok_bejegyzes($D) {
+ echo 'Új '.ucfirst($D['bejegyzesAdat']['bejegyzesTipusNev']).' került rögzítésre. ';
+ if ($D['bejegyzesAdat']['szoveg'] !='') echo '<q>'.$D['bejegyzesAdat']['szoveg'].'</q>';
+ if ($D['tanarAdat']['tanarNev']!='') echo ' - '.$D['tanarAdat']['tanarNev'];
+ }
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/hirnok/hirnokFeliratkozas.phtml b/mayor-orig/www/skin/classic/module-naplo/html/hirnok/hirnokFeliratkozas.phtml
new file mode 100644
index 00000000..ba5d6b69
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/hirnok/hirnokFeliratkozas.phtml
@@ -0,0 +1,68 @@
+<?php
+
+ function putHirnokFeliratkozas($ADAT) {
+ formBegin();
+ echo '<input type="hidden" name="action" value="hirnokFeliratkozas" />';
+ echo '<table align="center" style="background-color: #eee">';
+ echo '<tr>';
+ echo '<th>-|+</th>';
+ echo '<td><input type="text" placeholder="diakId/tanarId" name="naploId" /></td>';
+ echo '<td>';
+ echo '<select name="naploTipus">';
+ echo '<option value="diak">diák</option>';
+ echo '<option value="tanar">tanár</option>';
+ echo '</select>';
+ echo '</td>';
+
+ echo '<td><input type="text" value="'._USERACCOUNT.'" /></td>';
+ echo '<td><input type="text" value="'._POLICY.'" /></td>';
+ echo '<td><input type="text" placeholder="email" name="email" /></td>';
+ echo '<td><input type="submit"></td>';
+ echo '<th style="background-color: lightgreen">utolsó email dátum</th>';
+ echo '</tr>';
+// foreach ($ADAT['hirnokFeliratkozas'] as $tipus => $HADAT) {
+ $HADAT = $ADAT['hirnokFeliratkozas'];
+ for ($i=0; $i<count($HADAT); $i++) {
+ echo '<tr>';
+ echo '<td><input type="checkbox" name="hirnokFeliratkozasId" value="'.$HADAT[$i]['hirnokFeliratkozasId'].'"></td>';
+ echo '<td>'.$HADAT[$i]['naploId'].'</td>';
+ echo '<td>'.$HADAT[$i]['naploTipus'].'</td>';
+ echo '<td>'.$HADAT[$i]['userAccount'].'</td>';
+ echo '<td>'.$HADAT[$i]['policy'].'</td>';
+ echo '<td>'.$HADAT[$i]['email'].'</td>';
+ echo '<td>'.$HADAT[$i]['feliratkozasDt'].'</td>';
+ echo '<td>'.$HADAT[$i]['utolsoEmailDt'].'</td>';
+ echo '<td>'.$HADAT[$i]['megtekintesDt'].'</td>';
+ echo '</tr>'."\n";
+ }
+// }
+ echo '</table>';
+ formEnd();
+ }
+
+
+ function putHirnokFeliratkozas_user($ADAT) {
+ formBegin();
+ echo '<input type="hidden" name="action" value="hirnokFeliratkozas" />';
+ echo '<table align="center" style="background-color: #eee">';
+ echo '<tr>';
+ echo '<th>-|+</th>';
+ echo '<td><input type="text" placeholder="email" name="email" value="'.$ADAT['email'].'"/></td>';
+ echo '<td><input type="submit"></td>';
+ echo '<th style="background-color: lightgreen">utolsó email dátum</th>';
+ echo '</tr>';
+ $HADAT = $ADAT['hirnokFeliratkozas'];
+ for ($i=0; $i<count($HADAT); $i++) {
+ echo '<tr>';
+ echo '<td><input type="checkbox" name="hirnokFeliratkozasId" value="'.$HADAT[$i]['hirnokFeliratkozasId'].'"></td>';
+ echo '<td>'.$HADAT[$i]['email'].'</td>';
+ echo '<td>'.'</td>';
+ echo '<td>'.$HADAT[$i]['utolsoEmailDt'].'</td>';
+ echo '<td>'.$HADAT[$i]['megtekintesDt'].'</td>';
+ echo '</tr>'."\n";
+ }
+ echo '</table>';
+ formEnd();
+ }
+
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/diak.phtml b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/diak.phtml
new file mode 100644
index 00000000..8a3c18af
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/diak.phtml
@@ -0,0 +1,942 @@
+<?php
+
+ require_once('skin/classic/module-naplo/html/share/file.phtml');
+
+ function putBizonyitvanyTorzslap($ADAT) {
+ echo '<div>';
+ formBegin(array('class'=>'diak'));
+ echo '<fieldset class="bizonyitvanyTorzslap"><legend>'._DIAK_ALAPADATAI.'</legend>'."\n";
+ echo '<div class="face" style="float:right">';
+ putFace($ADAT['diakId'],'diak','100');
+ echo '</div>';
+ echo '<table>';
+ echo '<tr><td>Diák neve</td><td>'.($ADAT['diakAdat']['diakNev']).'</td></tr>';
+ echo '<tr><td>Oktatási:</td><td>'.($ADAT['diakAdat']['oId']).'</td></tr>';
+ echo '<tr><td>Születési hely:</td><td>'.($ADAT['diakAdat']['szuletesiHely']).'</td></tr>';
+ echo '<tr><td>Születési idő:</td><td>'.($ADAT['diakAdat']['szuletesiIdo']).'</td></tr>';
+ echo '<tr><td>Gondviselő neve:</td><td>'.($ADAT['diakAdat']['gondviseloNev']).'</td></tr>';
+ echo '<tr><td>Apa neve:</td><td>'.($ADAT['diakAdat']['apaNev']).'</td></tr>';
+ echo '<tr><td>Anya neve (születéskori):</td><td>'.($ADAT['diakAdat']['anyaNev']).'</td></tr>';
+ echo '</table>';
+ echo '</fieldset>';
+ formEnd();
+ echo '</div>';
+ }
+
+ function putDiakAdatForm($ADAT, $Szulok, $tanev) {
+
+
+ $diakAdat = $ADAT['diakAdat'];
+ $DIAKJOGVISZONY = $ADAT['diakJogviszony'];
+ $OSZTALYOK = $ADAT['osztalyok'];
+ foreach ($diakAdat as $key => $val) {
+ if (is_string($diakAdat[$key])) $diakAdat[$key] = htmlspecialchars($val);
+ }
+
+ $cssClass = array(
+ 'felvételt nyert' => 'felveteltNyert',
+ 'magántanuló' => 'magantanulo',
+ 'vendégtanuló' => 'vendegtanulo',
+ 'jogviszonya lezárva' => 'jogviszonyLezarva',
+ 'jogviszonya felfüggesztve' => 'jogviszonyFelfuggesztve',
+ );
+
+ $cssClass2 = (_MODOSITHAT===true) ? "":" readonly";
+
+ echo '<div class="'.$cssClass[$diakAdat['statusz']].$cssClass2.'" >';
+ for ($i=0; $i<=count($ADAT['diakKepzes'][$ADAT['diakId']]); $i++) {
+ $_DK = $ADAT['diakKepzes'][$ADAT['diakId']][$i];
+ $_title .= $_DK['kepzesNev'].' '.$_DK['tolDt'].'-'.$_DK['igDt'].' ';
+ }
+ echo '<div class="diakStatusz" title="'.$_title.'">';
+ echo '<a href="#osztalyai" style="color:black;">'.$diakAdat['statusz'].'</a>';
+ echo '</div>';
+
+ $POSTTHESE = array('tanev'=>$tanev,'osztalyId'=>$ADAT['osztalyId']);
+
+ putDiakAlapadatok($diakAdat, $POSTTHESE, $DIAKJOGVISZONY, $ADAT['diakKepzes'][$ADAT['diakId']]);
+ if (_MODOSITHAT===true) putDiakKepUpload($diakAdat['diakId'],$POSTTHESE);
+ putDiakSzuletesiAdatok($diakAdat, $POSTTHESE);
+ putDiakElerhetoseg($diakAdat, $POSTTHESE);
+
+ putDiakSzulo($diakAdat, $Szulok, $POSTTHESE);
+ putDiakCim($diakAdat, 'lakhely', $POSTTHESE);
+ putDiakCim($diakAdat, 'tart', $POSTTHESE);
+ putDiakTanulmanyiAdatok($diakAdat, $POSTTHESE, $OSZTALYOK, $ADAT);
+ putDiakSzocialisAdatok($diakAdat, $POSTTHESE);
+
+ echo '</div>';
+ }
+
+ function _postThese($POSTTHESE) {
+ if (is_array($POSTTHESE)) foreach($POSTTHESE as $k => $v) {
+ echo '<input type="hidden" name="'.$k.'" value="'.$v.'" />'."\n";
+ }
+ }
+
+ function putDiakKepUpload($diakId,$POSTTHESE) {
+ formBegin(array('enctype'=>"multipart/form-data",'class'=>'diak'));
+ echo '<fieldset><legend>'._DIAK_FENYKEPE.'</legend>'."\n";
+ _postThese($POSTTHESE);
+ echo '<input type="hidden" name="diakId" value="'.$diakId.'" />';
+ echo '<input type="hidden" name="action" value="diakKepUpload" />';
+ echo '<input type="file" name="upfile" />';
+ echo '<input type="submit" class="diakSubmit" value="ok" />';
+ echo '</fieldset>';
+ formEnd();
+ }
+
+ function putDiakAlapadatok($diakAdat, $POSTTHESE, $DIAKJOGVISZONY, $KEPZES = '') {
+ global $DIAKADAT_DISABLE;
+ if (!is_array($DIAKADAT_DISABLE)) $DIAKADAT_DISABLE = array();
+
+ if (_MODOSITHAT===true)
+ formBegin(array('method'=>'post', 'action'=>href('index.php?page=naplo&sub=intezmeny&f=diak'), 'class'=>'diak onChangeRequest'));
+ else
+ formBegin(array('method'=>'post', 'action'=>href('index.php?page=naplo&sub=intezmeny&f=diak'), 'class'=>'diak'));
+
+ if (_KERELMEZHET===true) echo '<input type="hidden" id="kerelmezhet" name="kerelmezhet" value="1" />';
+ else echo '<input type="hidden" id="kerelmezhet" name="kerelmezhet" value="0" />';
+
+ echo '<input type="hidden" name="action" value="diakAlapadatModositas" />'."\n";
+ echo '<input type="hidden" name="diakId" value="'.$diakAdat['diakId'].'" />'."\n";
+ _postThese($POSTTHESE);
+ echo '<fieldset><legend>'._DIAK_ALAPADATAI.'</legend>'."\n";
+
+ echo '<table class="'.ekezettelen($diakAdat['nem']).'">'."\n";
+ echo '<tr>'."\n";
+ echo '<th>';
+ echo '<label for="viseltCsaladinev">'._NEV.'</label>';
+ echo '</th>'."\n";
+ echo '<td colspan="5">';
+ echo '<input type="text" size="4" name="viseltNevElotag" value="'.$diakAdat['viseltNevElotag'].'" title="'._VISELTNEVELOTAG.'" />';
+ echo '<input type="text" size="20" id="viseltCsaladinev" name="viseltCsaladinev" value="'.$diakAdat['viseltCsaladinev'].'" title="'._VISELTCSALADINEV.'" />';
+ echo '<input type="text" size="20" name="viseltUtonev" value="'.$diakAdat['viseltUtonev'].'" title="'._VISELTUTONEV.'" />';
+ echo '<select name="nem" id="nem">'."\n";
+ $SEL = array($diakAdat['nem'] => ' selected="selected" ');
+ echo '<option value=""> - </option>'."\n";
+ echo '<option value="fiú"'.$SEL['fiú'].'>'._FIU.'</option>'."\n";
+ echo '<option value="lány"'.$SEL['lány'].'>'._LANY.'</option>'."\n";
+ echo '</select>'."\n";
+ if ($diakAdat['nem'] == 'lány') echo '<span class="icon-female"></span>';
+ elseif ($diakAdat['nem'] == 'fiú') echo '<span class="icon-male"></span>';
+ echo '</td>'."\n";
+
+ echo '</tr><tr>';
+
+ echo '<th>'."\n";
+ echo '<label for="oId">'._OID.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<input type="text" size="15" id="oId" name="oId" value="'.$diakAdat['oId'].'" maxlength="11" />';
+ echo '</td>'."\n";
+
+ echo '</tr><tr>';
+ echo '<th>'."\n";
+ echo '<label for="torzslapszam">'._TORZSLAPSZAM.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ $_ro = (in_array('torzslapszam',$DIAKADAT_DISABLE))?'readonly="readonly" tabindex="-1"':'';
+ echo '<input type="text" size="15" id="torzslapszam" name="torzslapszam" value="'.$diakAdat['torzslapszam'].'" maxlength="32" '.$_ro.'/>';
+ echo '</td>'."\n";
+ echo '</tr><tr>';
+
+ echo '<th>';
+ echo '<label for="statusz"><a href="#osztalyai" tabindex="-1">'._STATUSZ.'</a></label>';
+ echo '</th>'."\n";
+ echo '<td colspan="3">';
+ // echo $diakAdat['jogviszonyStatusz'].' ('.$diakAdat['jogviszonyDt'].')';
+ echo '<ul>';
+ for ($i=0; $i<count($DIAKJOGVISZONY); $i++) {
+ echo '<li>'.$DIAKJOGVISZONY[$i]['dt'].': '.$DIAKJOGVISZONY[$i]['statusz'].'</li>';
+ }
+ echo '</ul>';
+
+ if (is_array($KEPZES) && count($KEPZES)>0) {
+ echo '<ul>';
+ for ($i=0; $i<count($KEPZES); $i++) {
+ echo '<li>'.$KEPZES[$i]['kepzesNev'].': '.$KEPZES[$i]['tolDt'].'</li>';
+ }
+ echo '</ul>';
+ }
+
+ echo '</td>'."\n";
+ echo '<th>'."\n";
+ if ($diakAdat['gondozasiSzam']!='')
+ echo '<label for="gondozasiSzam">'._GONDOZASISZAM.':</label> '."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ if ($diakAdat['gondozasiSzam']!='')
+ echo $diakAdat['gondozasiSzam'];
+ echo '</td>'."\n";
+
+ echo '</tr>'."\n";
+
+ echo '<tr>'."\n";
+
+ echo '<th>'."\n";
+ echo '<label for="tajSzam">'._TAJSZAM.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<input type="text" size="15" id="tajSzam" name="tajSzam" value="'.$diakAdat['tajSzam'].'" maxlength="9" />';
+ echo '</td>'."\n";
+
+ echo '</tr>'."\n";
+
+ echo '<tr>'."\n";
+
+ echo '<th>'."\n";
+ echo '<label for="allampolgarsag">'._ALLAMPOLGARSAG.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ $_ro = (in_array('allampolgarsag',$DIAKADAT_DISABLE))?'readonly="readonly" tabindex="-1"':'';
+ echo '<input type="text" id="allampolgarsag" name="allampolgarsag" value="'.$diakAdat['allampolgarsag'].'" '.$_ro.'/>';
+ echo '</td>'."\n";
+
+ echo '<th>'."\n";
+ echo '<label for="adoazonosito">'._ADOAZONOSITO.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ $_ro = (in_array('adoazonosito',$DIAKADAT_DISABLE))?'readonly="readonly" tabindex="-1"':'';
+ echo '<input type="text" size="15" id="adoazonosito" name="adoazonosito" value="'.$diakAdat['adoazonosito'].'" maxlength="10" '.$_ro.'/>';
+ echo '</td>'."\n";
+
+ echo '</tr>'."\n";
+
+ echo '<tr>'."\n";
+ echo '<th>'."\n";
+ echo '<label for="diakigazolvanySzam">'._DIAKIGAZOLVANYSZAM.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ $_ro = (in_array('diakigazolvanyszam',$DIAKADAT_DISABLE))?'readonly="readonly" tabindex="-1"':'';
+ echo '<input type="text" size="15" id="diakigazolvanySzam" name="diakigazolvanySzam" value="'.$diakAdat['diakigazolvanySzam'].'" maxlength="11" '.$_ro.'/>';
+ echo '</td>'."\n";
+
+ echo '<th>'."\n";
+ echo '<label for="szemelyiIgazolvanySzam">'._SZEMELYIIGAZOLVANYSZAM.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ $_ro = (in_array('szemelyiigazolvanyszam',$DIAKADAT_DISABLE))?'readonly="readonly" tabindex="-1"':'';
+ echo '<input type="text" size="15" id="szemelyiIgazolvanySzam" name="szemelyiIgazolvanySzam" value="'.$diakAdat['szemelyiIgazolvanySzam'].'" '.$_ro.'/>';
+ echo '</td>'."\n";
+
+ echo '<th>'."\n";
+ echo '<label for="tartozkodasiOkiratSzam">'._TARTOZKODASIOKIRATSZAM.':</label> '."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ $_ro = (in_array('tartozkodasiokiratszam',$DIAKADAT_DISABLE))?'readonly="readonly" tabindex="-1"':'';
+ echo '<input type="text" size="16" id="tartozkodasiOkiratSzam" name="tartozkodasiOkiratSzam" value="'.$diakAdat['tartozkodasiOkiratSzam'].'" '.$_ro.'/>';
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+ echo '<tr>'."\n";
+ echo '<th><label for="NEKAzonosito">'._NEKAZONOSITO.'<label></th>'."\n";
+ echo '<td colspan="5">';
+ $_ro = (in_array('nekazonosito',$DIAKADAT_DISABLE))?'readonly="readonly" tabindex="-1"':'';
+ echo '<input type="text" size="20" maxlength="16" name="NEKAzonosito" id="NEKAzonosito" value="'.$diakAdat['NEKAzonosito'].'" '.$_ro.'/>';
+ echo '</td>';
+ echo '</tr>';
+ echo '<tr>'."\n";
+ echo '<th><label for="megjegyzes">'._MEGJEGYZES.'<label></th>'."\n";
+ echo '<td colspan="3">';
+ echo '<input type="text" name="megjegyzes" id="megjegyzes" value="'.$diakAdat['megjegyzes'].'" />';
+ echo '</td>';
+ echo '</tr>';
+ echo '</table>'."\n";
+
+ if (_MODOSITHAT===true) echo '<input type="submit" class="diakSubmit" value="'._OK.'" />';
+
+ echo '</fieldset>'."\n";
+ formEnd();
+ }
+
+ function putDiakSzuletesiAdatok($diakAdat, $POSTTHESE) {
+ if (_MODOSITHAT===true)
+ formBegin(array('method'=>'post', 'action'=>href('index.php?page=naplo&sub=intezmeny&f=diak'), 'class'=>'diak onChangeRequest'));
+ else
+ formBegin(array('method'=>'post', 'action'=>href('index.php?page=naplo&sub=intezmeny&f=diak'), 'class'=>'diak'));
+ echo '<input type="hidden" name="action" value="diakSzuletesiAdatModositas" />'."\n";
+ echo '<input type="hidden" name="diakId" value="'.$diakAdat['diakId'].'" />'."\n";
+ _postThese($POSTTHESE);
+ echo '<fieldset><legend>'._DIAK_SZULETESI_ADATAI.'</legend>'."\n";
+ echo '<table>'."\n";
+ echo '<tr>'."\n";
+ echo '<th>';
+ echo '<label for="szuleteskoriCsaladinev">'._SZULETESKORINEV.'</label>';
+ echo '</th>'."\n";
+ echo '<td>';
+ echo '<input type="text" size="4" name="szuleteskoriNevElotag" value="'.$diakAdat['szuleteskoriNevElotag'].'" title="'._SZULETESKORINEVELOTAG.'" />';
+ echo '<input type="text" id="szuleteskoriCsaladinev" name="szuleteskoriCsaladinev" value="'.$diakAdat['szuleteskoriCsaladinev'].'" title="'._SZULETESKORICSALADINEV.'" />';
+ echo '<input type="text" name="szuleteskoriUtonev" value="'.$diakAdat['szuleteskoriUtonev'].'" title="'._SZULETESKORIUTONEV.'" />';
+ echo '</td>'."\n";
+
+ echo '</tr>'."\n";
+
+ echo '<tr>'."\n";
+ echo '<th>'."\n";
+ echo '<label for="szuletesiHely">'._SZULETESIHELY.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<input type="text" id="szuletesiHely" name="szuletesiHely" value="'.$diakAdat['szuletesiHely'].'" />';
+ echo '</td>'."\n";
+
+ echo '<th>'."\n";
+ echo '<label for="szuletesiIdo">'._SZULETESIIDO.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<input class="date" type="text" id="szuletesiIdo" name="szuletesiIdo" value="'.$diakAdat['szuletesiIdo'].'" />';
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+ echo '</table>'."\n";
+
+ if (_MODOSITHAT===true) echo '<input type="submit" class="diakSubmit" value="'._OK.'" />';
+
+ echo '</fieldset>'."\n";
+ formEnd();
+ }
+
+ function putDiakCim($diakAdat, $tipus = 'lakhely', $POSTTHESE) {
+
+ global $ADAT;
+
+ if (_MODOSITHAT===true)
+ formBegin(array('method'=>'post', 'action'=>href('index.php?page=naplo&sub=intezmeny&f=diak'), 'class'=>'diak onChangeRequest'));
+ else
+ formBegin(array('method'=>'post', 'action'=>href('index.php?page=naplo&sub=intezmeny&f=diak'), 'class'=>'diak'));
+ echo '<input type="hidden" name="action" value="diakCimModositas" />'."\n";
+ echo '<input type="hidden" name="tipus" value="'.$tipus.'" />'."\n";
+ echo '<input type="hidden" name="diakId" value="'.$diakAdat['diakId'].'" />'."\n";
+ _postThese($POSTTHESE);
+ echo '<fieldset><legend>'.constant('_DIAK_CIM_'.strtoupper($tipus)).'</legend>'."\n";
+ echo '<table>'."\n";
+ echo '<tr>'."\n";
+ echo '<th>';
+ echo '<label for="'.$tipus.'Orszag">'._ORSZAG.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<input type="text" id="'.$tipus.'Orszag" name="'.$tipus.'Orszag" value="'.$diakAdat[$tipus.'Orszag'].'" />';
+ echo '</td>'."\n";
+
+ echo '<th>';
+ echo '<label for="'.$tipus.'Irsz">'._IRSZ.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<input type="text" id="'.$tipus.'Irsz" name="'.$tipus.'Irsz" value="'.$diakAdat[$tipus.'Irsz'].'" />';
+ echo '</td>'."\n";
+
+ echo '<th>';
+ echo '<label for="'.$tipus.'Helyseg">'._HELYSEG.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<input type="text" id="'.$tipus.'Helyseg" name="'.$tipus.'Helyseg" value="'.$diakAdat[$tipus.'Helyseg'].'" />';
+ echo '</td>'."\n";
+
+ echo '</tr>'."\n";
+
+ echo '<tr>'."\n";
+ echo '<th>';
+ echo '<label for="'.$tipus.'KozteruletNev">'._KOZTERULETNEV.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<input type="text" id="'.$tipus.'KozteruletNev" name="'.$tipus.'KozteruletNev" value="'.$diakAdat[$tipus.'KozteruletNev'].'" />';
+ echo '<select name="'.$tipus.'KozteruletJelleg">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ $SEL = array($diakAdat[$tipus.'KozteruletJelleg'] => ' selected="selected" ');
+ foreach ($ADAT['kozteruletJelleg'] as $jelleg) {
+ echo '<option value="'.$jelleg.'"'.$SEL[$jelleg].'>'.$jelleg.'</option>'."\n";
+ }
+ echo '</select>'."\n";
+ echo '</td>'."\n";
+
+ echo '<th>';
+ echo '<label for="'.$tipus.'Hazszam">'._HAZSZAM.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<input type="text" id="'.$tipus.'Hazszam" name="'.$tipus.'Hazszam" value="'.$diakAdat[$tipus.'Hazszam'].'" title="'._HAZSZAM.'" />';
+ echo '</td>'."\n";
+
+ echo '</tr>'."\n";
+ echo '<tr>'."\n";
+ echo '<th>';
+ echo '<label for="'.$tipus.'Emelet">'._EMELET.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<input type="text" id="'.$tipus.'Emelet" name="'.$tipus.'Emelet" value="'.$diakAdat[$tipus.'Emelet'].'" title="'._EMELET.'" />';
+ echo '</td>'."\n";
+
+ echo '<th>';
+ echo '<label for="'.$tipus.'Ajto">'._AJTO.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<input type="text" id="'.$tipus.'Ajto" name="'.$tipus.'Ajto" value="'.$diakAdat[$tipus.'Ajto'].'" title="'._AJTO.'" />';
+ echo '</td>'."\n";
+
+ echo '</tr>'."\n";
+ echo '</table>'."\n";
+
+ if (_MODOSITHAT===true) echo '<input type="submit" class="diakSubmit" value="'._OK.'" />';
+
+ echo '</fieldset>'."\n";
+ formEnd();
+ }
+
+ function putDiakElerhetoseg($diakAdat, $POSTTHESE) {
+ if (_MODOSITHAT===true)
+ formBegin(array('method'=>'post', 'action'=>href('index.php?page=naplo&sub=intezmeny&f=diak'), 'class'=>'diak onChangeRequest'));
+ else
+ formBegin(array('method'=>'post', 'action'=>href('index.php?page=naplo&sub=intezmeny&f=diak'), 'class'=>'diak'));
+ echo '<input type="hidden" name="action" value="diakElerhetosegModositas" />'."\n";
+ echo '<input type="hidden" name="diakId" value="'.$diakAdat['diakId'].'" />'."\n";
+ _postThese($POSTTHESE);
+ echo '<fieldset><legend>'._DIAK_ELERHETOSEG.'</legend>'."\n";
+ echo '<table>'."\n";
+
+ echo '<tr>'."\n";
+ echo '<th>';
+ echo '<label for="mobil">'._MOBIL.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<span class="icon-phone-alt"></span>';
+ echo '<input type="text" id="mobil" name="mobil" value="'.$diakAdat['mobil'].'" />';
+ echo '</td>'."\n";
+ echo '</tr><tr>';
+ echo '<th>';
+ echo '<label for="email">'._EMAIL.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<span class="icon-envelope"></span>';
+ echo '<input type="text" id="email" name="email" value="'.$diakAdat['email'].'" />';
+ echo '</td>'."\n";
+ echo '</tr><tr>';
+ echo '<th>';
+ echo '<label for="telefon">'._TELEFON.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<span class="icon-phone"></span>';
+ echo '<input type="text" id="telefon" name="telefon" value="'.$diakAdat['telefon'].'" />';
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+
+ echo '</table>'."\n";
+
+ if (_MODOSITHAT===true) echo '<input type="submit" class="diakSubmit" value="'._OK.'" />';
+
+ echo '</fieldset>'."\n";
+ formEnd();
+ }
+
+ function putDiakTanulmanyiAdatok($diakAdat, $POSTTHESE, $OSZTALYOK, $ADAT) {
+
+ $tanev = $POSTTHESE['tanev'];
+
+ if (_MODOSITHAT===true)
+ formBegin(array('method'=>'post', 'action'=>href('index.php?page=naplo&sub=intezmeny&f=diak'), 'class'=>'diak onChangeRequest'));
+ else
+ formBegin(array('method'=>'post', 'action'=>href('index.php?page=naplo&sub=intezmeny&f=diak'), 'class'=>'diak'));
+ echo '<input type="hidden" name="action" value="diakTanulmanyiAdatModositas" />'."\n";
+ echo '<input type="hidden" name="diakId" value="'.$diakAdat['diakId'].'" />'."\n";
+ _postThese($POSTTHESE);
+ echo '<fieldset><legend>'._DIAK_TANULMANYI_ADATOK.'</legend>'."\n";
+//var_dump($diakAdat['mindenOsztaly']);
+ echo '<table>'."\n";
+
+ $voltOsztaly = $Osztaly = array();
+// $Be = $Ki = array();
+ for ($i = 0; $i < count($diakAdat['osztaly']); $i++) {
+ $_osztalyId = ($diakAdat['osztaly'][$i]['osztalyId']);
+ $voltOsztalyIds[] = $_osztalyId;
+ $_O = $OSZTALYOK[$_osztalyId];
+ $Osztaly[] = '<a href="'.href('index.php?page=naplo&sub=intezmeny&f=osztaly&osztalyId='.$_osztalyId).'">'.$diakAdat['osztaly'][$i]['osztalyJel'].' ['.$_O['kezdoTanev'].'/'.$_O['vegzoTanev'].'.'.$_O['jel'].' '.$_O['leiras'].' ('.$_O['osztalyfonokNev']
+ .')] '.$diakAdat['osztaly'][$i]['beDt'].' &rarr; '.($diakAdat['osztaly'][$i]['kiDt']=='' ?'-':$diakAdat['osztaly'][$i]['kiDt'] ).' <span class="naploSorszam">'._NAPLOSORSZAM.': '.$diakAdat['osztaly'][$i]['naploSorszam'].'</a></span>';
+// $Be[] = $diakAdat['osztaly'][$i]['beDt'];
+// $Ki[] = $diakAdat['osztaly'][$i]['kiDt'];
+ }
+ for ($i = 0; $i < count($diakAdat['mindenOsztaly']); $i++) {
+ $_osztalyId = $diakAdat['mindenOsztaly'][$i]['osztalyId'];
+ if (is_array($voltOsztalyIds) && !in_array($_osztalyId, $voltOsztalyIds)) {
+ $_O = $OSZTALYOK[$_osztalyId];
+
+ $VoltOsztaly[] = $diakAdat['mindenOsztaly'][$i]['osztalyJel'].' ['.$_O['kezdoTanev'].'/'.$_O['vegzoTanev'].'.'.$_O['jel'].' '.$_O['leiras'].' ('.$_O['osztalyfonokNev']
+ .')] '.$diakAdat['mindenOsztaly'][$i]['beDt'].' &rarr; '.($diakAdat['mindenOsztaly'][$i]['kiDt']=='' ?'-':$diakAdat['mindenOsztaly'][$i]['kiDt'] ).' <span class="naploSorszam">'._NAPLOSORSZAM.': '.$diakAdat['osztaly'][$i]['naploSorszam'].'</span>';
+// $Be[] = $diakAdat['mindenOsztaly'][$i]['beDt'];
+// $Ki[] = $diakAdat['mindenOsztaly'][$i]['kiDt'];
+ }
+ }
+ echo '<tr>'."\n";
+ echo '<th id="osztalyai">';
+ echo _DIAK_OSZTALYA." (".$tanev.")\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<ul>';
+ for ($i=0; $i<count($Osztaly); $i++) {
+ echo '<li>'.$Osztaly[$i].'</a></li>';
+ }
+ for ($i=0; $i<count($VoltOsztaly); $i++) {
+ echo '<li class="volt">'.$VoltOsztaly[$i].'</li>';
+ }
+ echo '</ul>';
+ echo '</td>'."\n";
+
+// echo '<td>';
+// echo implode('<br />', $Be);
+// echo '</td>'."\n";
+// echo '<td>'."\n";
+// echo implode('<br />', $Ki);
+// echo '</td>'."\n";
+ echo '</tr>'."\n";
+
+ echo '<tr>'."\n";
+ echo '<th>';
+ echo '<label for="jogviszonyKezdete">'._JOGVISZONY_KEZDETE.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+// echo '<input type="text" id="jogviszonyKezdete" name="jogviszonyKezdete" value="'.$diakAdat['jogviszonyKezdete'].'" />';
+ echo $diakAdat['jogviszonyKezdete'];
+ echo '</td>'."\n";
+
+ echo '<th>';
+ echo '<label for="jogviszonyVege">'._JOGVISZONY_VEGE.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+// echo '<input type="text" id="jogviszonyVege" name="jogviszonyVege" value="'.$diakAdat['jogviszonyVege'].'" />';
+ echo $diakAdat['jogviszonyVege'];
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+
+ echo '<tr>'."\n";
+ echo '<th>';
+ echo '<label for="kezdoTanev">'._KEZDO_TANEV.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<input type="text" id="kezdoTanev" name="kezdoTanev" value="'.$diakAdat['kezdoTanev'].'" />';
+ echo '</td>'."\n";
+
+ echo '<th>';
+ echo '<label for="kezdoSzemeszter">'._KEZDO_SZEMESZTER.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<input type="text" id="kezdoSzemeszter" name="kezdoSzemeszter" value="'.$diakAdat['kezdoSzemeszter'].'" />';
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+
+ echo '<tr>'."\n";
+ echo '<th>';
+ echo '<label for="elozoIskolaOMKod">'._ELOZOISKOLAOMKOD.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<input type="text" id="elozoIskolaOMKod" name="elozoIskolaOMKod" value="'.$diakAdat['elozoIskolaOMKod'].'" />';
+ echo '</td>'."\n";
+
+ echo '<th>';
+ echo '<label for="lakohelyiJellemzo">'._LAKOHELYIJELLEMZO.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<select name="lakohelyiJellemzo" id="lakohelyiJellemzo">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ $SEL = array($diakAdat['lakohelyiJellemzo'] => ' selected="selected" ');
+ for ($i = 0; $i < count($ADAT['lakohelyiJellemzo']); $i++)
+ echo '<option value="'.$ADAT['lakohelyiJellemzo'][$i].'"'.$SEL[$ADAT['lakohelyiJellemzo'][$i]].'>'.$ADAT['lakohelyiJellemzo'][$i].'</option>'."\n";
+ echo '</select>'."\n";
+
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+
+ echo '</table>'."\n";
+
+ if (_MODOSITHAT===true) echo '<input type="submit" class="diakSubmit" value="'._OK.'" />';
+
+ echo '</fieldset>'."\n";
+ formEnd();
+
+ }
+
+ function putDiakSzocialisAdatok($diakAdat, $POSTTHESE) {
+
+ global $ADAT;
+
+ if (_MODOSITHAT===true)
+ formBegin(array('method'=>'post', 'action'=>href('index.php?page=naplo&sub=intezmeny&f=diak'), 'class'=>'diak onChangeRequest'));
+ else
+ formBegin(array('method'=>'post', 'action'=>href('index.php?page=naplo&sub=intezmeny&f=diak'), 'class'=>'diak'));
+ echo '<input type="hidden" name="action" value="diakSzocialisAdatModositas" />'."\n";
+ echo '<input type="hidden" name="diakId" value="'.$diakAdat['diakId'].'" />'."\n";
+ _postThese($POSTTHESE);
+ echo '<fieldset><legend>'._DIAK_SZOCIALIS_ADATOK.'</legend>'."\n";
+ echo '<table>'."\n";
+
+// Ez mi????
+// $Osztaly = $Be = $Ki = array();
+// for ($i = 0; $i < count($diakAdat['osztaly']); $i++) {
+// $Osztaly[] = $diakAdat['osztaly'][$i]['osztalyJel'];
+// $Be[] = $diakAdat['osztaly'][$i]['beDt'];
+// $Ki[] = $diakAdat['osztaly'][$i]['kiDt'];
+// }
+ echo '<tr>'."\n";
+ echo '<td class="top" colspan="2">'."\n";
+ echo '<fieldset><legend>'._DIAK_TORVENYES_KEPVISELO.'</legend>'."\n";
+ for ($i = 0; $i < count($ADAT['torvenyesKepviselo']); $i++) {
+ $CHK = (strpos($diakAdat['torvenyesKepviselo'], $ADAT['torvenyesKepviselo'][$i]) !== false)?' checked="checked" ':'';
+ echo '<input type="checkbox" id="torvenyesKepviselo'.$i.'" name="torvenyesKepviselo[]" value="'.$ADAT['torvenyesKepviselo'][$i].'"'.$CHK.' />'."\n";
+ echo '<label for="torvenyesKepviselo'.$i.'">'.$ADAT['torvenyesKepviselo'][$i].'</label><br />'."\n";
+ }
+ echo '</fieldset>'."\n";
+ echo '</td>'."\n";
+ echo '<td rowspan="3" class="top">'."\n";
+ echo '<fieldset><legend>'._DIAK_SZOCIALIS_HELYZET.'</legend>'."\n";
+ for ($i = 0; $i < count($ADAT['szocialisHelyzet']); $i++) {
+ $CHK = (strpos($diakAdat['szocialisHelyzet'], $ADAT['szocialisHelyzet'][$i]) !== false)?' checked="checked" ':'';
+ echo '<input type="checkbox" id="szocialisHelyzet'.$i.'" name="szocialisHelyzet[]" value="'.$ADAT['szocialisHelyzet'][$i].'"'.$CHK.' />'."\n";
+ echo '<label for="szocialisHelyzet'.$i.'">'.$ADAT['szocialisHelyzet'][$i].'</label><br />'."\n";
+ }
+ echo '</fieldset>'."\n";
+ echo '</td>'."\n";
+
+ echo '<td>';
+ echo '</td>'."\n";
+
+ echo '<td class="top" rowspan="3">'."\n";
+ echo '<fieldset><legend>'._DIAK_FOGYATEKOSSAG.'</legend>'."\n";
+ for ($i = 0; $i < count($ADAT['fogyatekossag']); $i++) {
+ $CHK = (strpos($diakAdat['fogyatekossag'], $ADAT['fogyatekossag'][$i]) !== false)?' checked="checked" ':'';
+ echo '<input type="checkbox" id="fogyatekossag'.$i.'" name="fogyatekossag[]" value="'.$ADAT['fogyatekossag'][$i].'"'.$CHK.' />'."\n";
+ echo '<label for="fogyatekossag'.$i.'">'.$ADAT['fogyatekossag'][$i].'</label><br />'."\n";
+ }
+ echo '</fieldset>'."\n";
+ echo '<a href="'.href('index.php?page=naplo&sub=sni&diakId='.$ADAT['diakId']).'">SNI</a>';
+ echo '</td>'."\n";
+
+ echo '<tr>';
+ echo '<th>';
+ echo '<label for="penzugyiStatusz">'._DIAK_PENZUGYI_STATUSZ.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<select name="penzugyiStatusz" id="penzugyiStatusz">'."\n";
+ $SEL = array($diakAdat['penzugyiStatusz'] => ' selected="selected" ');
+ echo '<option value=""> - </option>'."\n";
+ for ($i = 0; $i < count($ADAT['penzugyiStatusz']); $i++)
+ echo '<option value="'.$ADAT['penzugyiStatusz'][$i].'"'.$SEL[$ADAT['penzugyiStatusz'][$i]].'>'.$ADAT['penzugyiStatusz'][$i].'</option>'."\n";
+ echo '</select>'."\n";
+ echo '</td>'."\n";
+ echo '</tr>';
+
+ echo '<tr>';
+ echo '<th>';
+ echo '<label for="gondozasiSzam">'._DIAK_GONDOZASISZAM.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<input type="text" id="gondozasiSzam" name="gondozasiSzam" value="'.$diakAdat['gondozasiSzam'].'" />';
+ echo '</td>'."\n";
+ echo '</tr>';
+
+ echo '</tr>'."\n";
+
+ echo '</table>'."\n";
+
+ if (_MODOSITHAT===true) echo '<input type="submit" class="diakSubmit" value="'._OK.'" />';
+
+ echo '</fieldset>'."\n";
+ formEnd();
+
+ }
+
+
+ function putDiakSzulo($diakAdat, $Szulok, $POSTTHESE) {
+
+ if (_MODOSITHAT===true)
+ formBegin(array('method'=>'post', 'action'=>href('index.php?page=naplo&sub=intezmeny&f=diakSzulo'), 'class'=>'diak onChangeRequest 0onSubmitUpdate'));
+ else
+ formBegin(array('method'=>'post', 'action'=>href('index.php?page=naplo&sub=intezmeny&f=diakSzulo'), 'class'=>'diak onSubmitUpdate'));
+ echo '<fieldset><legend>'._DIAK_SZULO.'</legend>'."\n";
+ echo '<input type="hidden" name="diakId" value="'.$diakAdat['diakId'].'" />'."\n";
+ _postThese($POSTTHESE);
+ echo '<input type="submit" name="anya" value="'._ANYA.': '.$Szulok[$diakAdat['anyaId']]['szuloNev'];
+ if (isset($diakAdat['anyaId'])) echo ' ('.$diakAdat['anyaId'].')';
+ else echo ' - ';
+ echo '" class="onClickUpdate" />';
+ echo '<input type="submit" name="apa" value="'._APA.': '.$Szulok[$diakAdat['apaId']]['szuloNev'];
+ if (isset($diakAdat['apaId'])) echo ' ('.$diakAdat['apaId'].')';
+ else echo ' - ';
+ echo '" class="onClickUpdate" />';
+ echo '<input type="submit" name="gondviselo" value="'._GONDVISELO.': '.$Szulok[$diakAdat['gondviseloId']]['szuloNev'];
+ if (isset($diakAdat['gondviseloId'])) echo ' ('.$diakAdat['gondviseloId'].')';
+ else echo ' - ';
+ echo '" class="onClickUpdate" />';
+ echo '<input type="submit" name="nevelo" value="'._NEVELO.': '.$Szulok[$diakAdat['neveloId']]['szuloNev'];
+ if (isset($diakAdat['neveloId'])) echo ' ('.$diakAdat['neveloId'].')';
+ else echo ' - ';
+ echo '" class="onClickUpdate" />';
+
+ echo '</fieldset>'."\n";
+ formEnd();
+ }
+
+
+ function putUjDiak($ADAT) {
+ formBegin(array('method'=>'post', 'action'=>href('index.php?page=naplo&sub=intezmeny&f=diak'), 'class'=>'diak'));
+ echo '<input type="hidden" name="action" value="ujDiak" />'."\n";
+ echo '<input type="hidden" name="tanev" value="'.$ADAT['tanev'].'" />'."\n";
+ echo '<fieldset><legend>'._UJ_DIAK.'</legend>'."\n";
+ echo '<table>'."\n";
+ echo '<tr>'."\n";
+ echo '<th>';
+ echo '<label for="felvetelTipus">'._BEKERULES_MODJA.'</label>'."\n";
+ echo '</th>';
+ echo '<td>';
+ echo '<select name="felvetelTipus" id="felvetelTipus">'."\n";
+ foreach ($ADAT['bekerulesModja'] as $tipus) {
+ //foreach ($ADAT['zaradek'] as $tipus => $zaradekIndex) {
+ echo '<option value="'.$tipus.'">'.$tipus.'</option>'."\n";
+ }
+ echo '</select>'."\n";
+ echo '</td>';
+ echo '<th>';
+ echo _OSZTALY;
+ echo '</th>';
+ echo '<td>';
+ if (is_array($ADAT['osztaly'])) {
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztaly']['osztalyId'].'" />'."\n";
+ echo $ADAT['osztaly']['kezdoTanev'].'-'.($ADAT['osztaly']['kezdoTanev']+1).'/'.$ADAT['osztaly']['jel'];
+ if (isset($ADAT['osztaly']['osztalyJel'])) echo ' ('.$ADAT['osztaly']['osztalyJel'].')';
+ }
+ echo '</td>';
+ echo '</tr>'."\n";
+ echo '<tr>'."\n";
+ echo '<th>';
+ echo '<label for="viseltCsaladinev" class="kotelezo">'._NEV.'</label>';
+ echo '</th>'."\n";
+ echo '<td>';
+ echo '<input type="text" size="2" name="viseltNevElotag" value="'.$diakAdat['viseltNevElotag'].'" title="'._VISELTNEVELOTAG.'" />';
+ echo '<input type="text" size="12" id="viseltCsaladinev" name="viseltCsaladinev" value="'.$diakAdat['viseltCsaladinev'].'" title="'._VISELTCSALADINEV.'" />';
+ echo '<input type="text" size="20" name="viseltUtonev" value="'.$diakAdat['viseltUtonev'].'" title="'._VISELTUTONEV.'" />';
+ echo '</td>'."\n";
+
+ echo '<th>';
+ echo '<label for="nem">'._NEM.'</label>';
+ echo '</th>'."\n";
+ echo '<td>';
+ echo '<select name="nem" id="nem">'."\n";
+ $SEL = array($diakAdat['nem'] => ' selected="selected" ');
+ echo '<option value=""> - </option>'."\n";
+ echo '<option value="fiú"'.$SEL['fiú'].'>'._FIU.'</option>'."\n";
+ echo '<option value="lány"'.$SEL['lány'].'>'._LANY.'</option>'."\n";
+ echo '</select>'."\n";
+ echo '</td>'."\n";
+
+ echo '<th>'."\n";
+ echo '<label for="allampolgarsag">'._ALLAMPOLGARSAG.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<input type="text" id="allampolgarsag" name="allampolgarsag" value="'.$diakAdat['allampolgarsag'].'" />';
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+
+ echo '<tr>'."\n";
+ echo '<th>'."\n";
+ echo '<label for="tajSzam">'._TAJSZAM.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<input type="text" size="15" id="tajSzam" name="tajSzam" value="'.$diakAdat['tajSzam'].'" />';
+ echo '</td>'."\n";
+
+ echo '<th>'."\n";
+ echo '<label for="oId">'._OID.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<input type="text" size="15" id="oId" name="oId" value="'.$diakAdat['oId'].'" />';
+ echo '</td>'."\n";
+
+ echo '<th>'."\n";
+ echo '<label for="diakigazolvanySzam">'._DIAKIGAZOLVANYSZAM.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<input type="text" size="15" id="diakigazolvanySzam" name="diakigazolvanySzam" value="'.$diakAdat['diakigazolvanySzam'].'" />';
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+
+ echo '<tr>'."\n";
+ echo '<th>'."\n";
+ echo '<label for="jogviszonyKezdete" class="kotelezo">'._JOGVISZONY_KEZDETE.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<input class="date" type="text" id="jogviszonyKezdete" name="jogviszonyKezdete" value="'.date('Y-m-d').'" />';
+ echo '</td>'."\n";
+
+ echo '<th>';
+ echo '<label for="kezdoTanev" class="kotelezo">'._TERVEZETT_KEZDO_TANEV.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<input type="text" id="kezdoTanev" name="kezdoTanev" value="'.$diakAdat['kezdoTanev'].'" />';
+ echo '</td>'."\n";
+
+ echo '<th>';
+ echo '<label for="kezdoSzemeszter" class="kotelezo">'._KEZDO_SZEMESZTER.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<input type="text" id="kezdoSzemeszter" name="kezdoSzemeszter" value="'.$diakAdat['kezdoSzemeszter'].'" />';
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+
+ echo '<tr>'."\n";
+ echo '<th><label for="NEKAzonosito">'._NEKAZONOSITO.'<label></th>'."\n";
+ echo '<td colspan="5">';
+ echo '<input type="text" size="20" maxlength="16" name="NEKAzonosito" id="NEKAzonosito" value="'.$diakAdat['NEKAzonosito'].'" />';
+ echo '</td>';
+ echo '</tr>';
+
+
+ echo '</table>'."\n";
+
+ echo '<input type="submit" style="width:100%;" />';
+
+ echo '</fieldset>'."\n";
+ formEnd();
+ }
+
+ function putDiakJogviszonyValtozas($ADAT) {
+ formBegin(array('method'=>'post', 'class'=>'diak'));
+ echo '<fieldset><legend>'._JOGVISZONY_VALTAS.'</legend>'."\n";
+
+ echo '<h1>'._JOGVISZONY_VALTAS.'</h1>'."\n";
+ echo '<input type="hidden" name="action" value="jogviszonyValtas" />'."\n";
+ echo '<input type="hidden" name="diakId" value="'.$ADAT['diakId'].'" />'."\n";
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalyId'].'" />'."\n";
+ echo '<input type="hidden" name="tanev" value="'.$ADAT['tanev'].'" />'."\n";
+
+ echo '<ul>';
+ for ($i=0; $i<count($ADAT['diakJogviszony']); $i++) {
+ echo '<li>'.$ADAT['diakJogviszony'][$i]['dt'].': '.$ADAT['diakJogviszony'][$i]['statusz'].'</li>';
+ }
+ echo '</ul>';
+
+ echo '<label for="jogviszonyValtasSelect">'._UJ_STATUSZ.'</label>';
+ echo '<select name="statusz" id="jogviszonyValtasSelect">'."\n";
+ echo '<option value=""> -- '._UJ_JOGVISZONY_STATUSZ.' -- </option>'."\n";
+ foreach ($ADAT['valthatoStatusz'] as $key => $statusz) {
+ $_SEL = (count($ADAT['valthatoStatusz']) == 1) ? ' selected="selected"':'';
+ echo '<option value="'.$statusz.'" '.$_SEL.'>'.$statusz.'</option>'."\n";
+ }
+ echo '</select>'."\n";
+ echo '<br/>';
+ echo '<label for="jvd">'._JOGVISZONY_VALTAS_DT.'</label>'."\n";
+ echo '<input class="date" id="jvd" type="text" name="jogviszonyValtasDt" value="'.date('Y-m-d').'" />'."\n";
+ echo '<br/>';
+ echo '<label for="iktatoszam">'._IKTATOSZAM.'</label>'."\n";
+ echo '<input type="text" name="iktatoszam" />'."\n";
+ echo '<br/>';
+
+ echo '<div class="rejtett" id="felfuggesztes">';
+ echo '<label for="felfuggesztesOk">'._FELFUGGESZTES_OK.'</label>';
+ echo '<input type="text" name="felfuggesztesOk" id="felfuggesztesOk" value="" />';
+ echo '<br />'."\n";
+ echo '<label for="felfuggesztesIgDt">'._FELFUGGESZTES_IG_DT.'</label>';
+ echo '<input type="text" name="felfuggesztesIgDt" id="felfuggesztesIgDt" value="" class="date" />';
+ echo '</div>'."\n";
+ echo '<div class="rejtett" id="lezaras">';
+ echo '<select name="lezarasZaradekIndex" id="lezarasZaradek">'."\n";
+ echo '<option value=""> -- '._JOGVISZONY_LEZARAS_ZARADEK.' -- </option>';
+ foreach ($ADAT['jogviszonyLezarasZaradek'] as $zaradekIndex => $zAdat)
+ echo '<option value="'.$zaradekIndex.'">'.$zAdat['szoveg'].'</option>'."\n";
+ echo '</select>'."\n";
+ echo '<span id="igazolatlan" class="rejtett">';
+ echo '<label for="lezarasIgazolatlan">'._LEZARAS_IGAZOLATLAN_ORAK_SZAMA.'</label>'."\n";
+ echo '<input type="text" name="lezarasIgazolatlanOrakSzama" id="lezarasIgazolatlan" value="" />';
+ echo '</span>'."\n";
+ echo '<span id="iskola" class="rejtett">';
+ echo '<label for="lezarasIskola">'._LEZARAS_ISKOLA.'</label>'."\n";
+ echo '<input type="text" name="lezarasIskola" id="lezarasIskola" value="" />';
+ echo '</span>'."\n";
+ echo '</div>'."\n";
+
+ echo '<input type="submit" value="'._MODOSITAS.'" title="'._BIZTOS_MODOSITJA.'" class="confirm" />'."\n";
+
+ echo '</fieldset>';
+ formEnd();
+
+
+ /* ----------------------- */
+
+
+ formBegin(array('method'=>'post', 'class'=>'diak hozottHianyzas'));
+ echo '<fieldset><legend>'._HOZOTT_HIANYZASOK.'</legend>'."\n";
+
+ echo '<h1>'._HOZOTT_HIANYZASOK.'</h1>';
+
+ if (is_array($ADAT['hozottHianyzas']) && count($ADAT['hozottHianyzas'])>0) {
+ echo '<ul>';
+ foreach ($ADAT['hozottHianyzas'] as $statusz => $db) {
+ echo '<li>'.$statusz.': '.$db['db'].'</li>';
+ }
+ echo '</ul>';
+ } else {
+ echo '<input type="hidden" name="action" value="diakHozottHianyzas" />'."\n";
+ echo '<input type="hidden" name="diakId" value="'.$ADAT['diakId'].'" />'."\n";
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalyId'].'" />'."\n";
+ echo '<input type="hidden" name="tanev" value="'.$ADAT['tanev'].'" />'."\n";
+
+ echo _IGAZOLT.'<input type="text" name="hozottHianyzasIgazolt" />';
+ echo '<br/>';
+ echo _IGAZOLATLAN.'<input type="text" name="hozottHianyzasIgazolatlan" />';
+ echo '<input type="submit" />';
+
+ }
+/*
+| diakId | int(10) unsigned | NO | MUL | NULL | |
+| statusz | enum('igazolt','igazolatlan') | YES | | NULL | |
+| dbHianyzas | tinyint(3) unsigned | YES | | NULL | |
+| dt | date | YES | | NULL | |
+*/
+
+ echo '</fieldset>'."\n";
+ formEnd();
+ }
+
+ function putDiakExportForm($ADAT) {
+ echo "\n\n";
+ formBegin(array('method'=>'post', 'action'=>href('index.php?page=naplo&sub=export&f=diakExport'), 'class'=>'diak'));
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalyId'].'" />'."\n";
+ echo '<input type="submit" value="'._EXPORT.'" class="onClickUpdate2" />'."\n";
+ formEnd();
+
+ }
+
+ function putDiakNyomtatForm($osztalyId,$diakId) {
+ echo "\n\n";
+ formBegin(array('method'=>'post', 'action'=>href('index.php?page=naplo&sub=nyomtatas&f=diakAdatlap'), 'class'=>'diak'));
+ if (isset($diakId)) echo '<input type="hidden" name="diakId" value="'.$diakId.'" />'."\n";
+ else echo '<input type="hidden" name="osztalyId" value="'.$osztalyId.'" />'."\n";
+ echo '<input type="submit" value="'._PRINT.'" class="onClickUpdate2" />'."\n";
+ formEnd();
+ }
+
+
+ function putDiaktorol($ADAT) {
+ formBegin(array('method'=>'post', 'class'=>'diak'));
+
+ echo '<fieldset><legend>'._JOGVISZONY_TOROL.'</legend>'."\n";
+ echo '<h1>'._JOGVISZONY_TOROL.'</h1>'."\n";
+ echo '<input type="hidden" name="action" value="diakTorol" />'."\n";
+ echo '<input type="hidden" name="diakId" value="'.$ADAT['diakId'].'" />'."\n";
+ echo '<input type="submit" value="'._TOROL.'" title="'._BIZTOS_TORLI.'" class="confirm" />'."\n";
+ echo '</fieldset>';
+
+ formEnd();
+ }
+
+ function putSuliXRESTForm($ADAT) {
+ formBegin(array('method'=>'post', 'class'=>'diak rest'));
+ echo '<fieldset><legend>'._FELHASZNALOI_AZONOSITO.'</legend>'."\n";
+
+ echo '<h1>'._FELHASZNALOI_AZONOSITO.'</h1>';
+
+ echo '<input type="hidden" name="action" value="sulixREST" />';
+ echo '<input type="hidden" name="diakId" value="'.$ADAT['diakId'].'" />';
+
+ echo '<input title="'._BIZTOSAN_LETREHOZ_E.'" class="confirm" id="createAccount" type="submit" name="createAccount" value="'._AZONOSITO_LETREHOZASA.'" />'."\n";
+ echo '<input title="'._BIZTOSAN_TOROL_E.'" class="confirm" id="deleteAccount" type="submit" name="deleteAccount" value="'._AZONOSITO_TORLESE.'" />'."\n";
+
+ echo '</fieldset>'."\n";
+ formEnd();
+
+ }
+
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/diakExport.phtml b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/diakExport.phtml
new file mode 100644
index 00000000..51665213
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/diakExport.phtml
@@ -0,0 +1,93 @@
+<?php
+
+ function putDiakExportForm($ADAT) {
+
+ global $skin, $exportFormatum;
+
+ if ($skin != 'ajax') formBegin(array('action'=>href('index.php?page=naplo&sub=intezmeny&f=diakExport'), 'class'=>'diak'));
+ echo '<input type="hidden" name="action" value="diakExport" />'."\n";
+
+ foreach ($exportFormatum as $formatum => $mezok) {
+ $format = ekezettelen($formatum);
+ echo '<input type="button" name="'.$format.'" value="'.$formatum.'" class="onClickMezoSelect" />'."\n";
+ echo '<input type="hidden" name="'.$format.'Lista" id="'.$format.'Lista" value="'.implode(',', $mezok).'" />'."\n";
+ }
+
+ if (isset($ADAT['osztalyId'])) echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalyId'].'" />'."\n";
+ if (isset($ADAT['dt'])) echo '<input type="hidden" name="dt" value="'.$ADAT['dt'].'" />'."\n";
+
+ echo '<fieldset><legend>'._EXPORT.'</legend>'."\n";
+ echo '<table>'."\n";
+
+/*
+ echo '<tr>';
+ echo '<th>';
+ echo '<label for="szulovel">'._SZULO_ADATOKKAL.'</label>';
+ echo '<input type="checkbox" id="szulovel" name="tabla[]" value="szulo" />';
+ echo '</th>'."\n";
+ echo '<th>';
+ echo '<label for="osztallyal">'._OSZTALY_ADATOKKAL.'</label>';
+ echo '<input type="checkbox" id="osztallyal" name="tabla[]" value="osztaly" />';
+ echo '</th>'."\n";
+ echo '</tr>'."\n";
+*/
+
+ if (strstr($_SERVER["HTTP_USER_AGENT"], 'Linux')) $CHK = array('csv' => ' checked="checked" ');
+ else $CHK = array('xml' => ' checked="checked" ');
+
+ echo '<tr>'."\n";
+ echo '<th>'._FORMATUM.'</th>'."\n";
+ echo '<td>';
+ echo '<input type="radio" name="formatum" value="csv" id="csv"'.$CHK['csv'].' />'."\n";
+ echo '<label for="csv">'._CSV.'</label><br />'."\n";
+ echo '</td>';
+ echo '<td>';
+ echo '<input type="radio" name="formatum" value="xml" id="xml"'.$CHK['xml'].' />'."\n";
+ echo '<label for="xml">'._XML.'</label>'."\n";
+ echo '</td>'."\n";
+// echo '<td>';
+// echo '<input type="radio" name="formatum" value="pdf" id="pdf"'.$CHK['pdf'].' />'."\n";
+// echo '<label for="pdf">'._PDF.'</label>'."\n";
+// echo '</td>'."\n";
+ echo '</tr>'."\n";
+
+ echo '<tr>';
+ echo '<th>';
+ echo '<input type="submit" value="'._OK.'" />'."\n";
+ echo '</th>';
+ echo '</tr>';
+
+
+ if (is_array($ADAT['export'])) {
+ echo '<tr>';
+ echo '<td colspan="20">'."\n";
+ putExportMezok($ADAT['mezok']);
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+ }
+
+
+ echo '</table>'."\n";
+ echo '</fieldset>';
+ if ($skin != 'ajax') formEnd();
+ }
+
+ function putExportMezok($Mezok) {
+
+ echo '<table>'."\n";
+
+ echo '<thead>'."\n";
+ foreach ($Mezok as $attr => $attrNev) {
+ echo '<tr>'."\n";
+ echo '<td>';
+ echo '<input type="checkbox" name="mezok[]" id="'.$attr.'" checked="checked" value="'.$attr.'" />'."\n";
+ echo '<label for="'.$attr.'">'.$attrNev.'</label>'."\n";
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+ }
+ echo '</thead>'."\n";
+ echo '</table>'."\n";
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/diakFelmentes.phtml b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/diakFelmentes.phtml
new file mode 100644
index 00000000..884c6923
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/diakFelmentes.phtml
@@ -0,0 +1,225 @@
+<?php
+
+ global $ADAT;
+
+
+ function putDiakFelmentesForm($ADAT) {
+
+ echo '<div class="FM FM1">';
+ echo '<h2>1. '._FELMENTES_TARGY_ERTEKELES_ALOL.'</h2>';
+ formBegin();
+
+ echo '<label for="T1targy">'._TARGY.'</label>'; _putDiakTargy($ADAT['diakTargy'],'T1targy');
+
+ echo '<select name="t1altipus" id="t1altipus">';
+ echo '<option value="1">'._EGESZ_EVRE.'</option>';
+ echo '<option value="2">'._RESZBEN.'</option>';
+ echo '</select>'."\n";
+ echo '<label for="T1tol">'._TOL_DT.'</label>'; _putTolIgDt($ADAT['dt'],null,array('tolDt'=>true),'T1tol');
+
+ echo '<div class="rejtett" id="T1b">';
+ echo '<label>'._ZARADEK.'</label>';
+ echo '<input type="text" name="zaradekTxt1" value="" />'._ZARADEK1;
+ echo '<input type="text" name="zaradekTxt2" value="" />'._ZARADEK2;
+
+ echo '</div>'."\n";
+
+ echo '<label>'._IKTATOSZAM.':</label>';
+ echo '<input type="text" name="iktatoszam" value="" />';
+
+ echo '<input type="hidden" name="action" value="tipus1" />';
+ echo '<input type="hidden" name="dt" value="'.$ADAT['dt'].'" />';
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalyId'].'" />';
+ echo '<input type="hidden" name="diakId" value="'.$ADAT['diakId'].'" />';
+
+ _putSubmit();
+ formEnd();
+ echo '</div>'."\n";
+
+
+ echo '<div class="FM FM2">';
+ echo '<h2>2. '._FELMENTES_TANKOR_ORALATOGATASA_ALOL.'</h2>';
+ formBegin();
+ echo '<input type="hidden" name="action" value="tipus2" />';
+ echo '<input type="hidden" name="dt" value="'.$ADAT['dt'].'" />';
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalyId'].'" />';
+ echo '<input type="hidden" name="diakId" value="'.$ADAT['diakId'].'" />';
+
+ echo '<label for="T2ovi">'._OVIKOTELES.'</label>';
+ echo '<input type="checkbox" id="T2ovi" name="ovi" value="1" /><br/>';
+
+ echo '<label for="T2tankor">'._TANKOR.'</label>';
+ _putDiakTankor($ADAT['diakTankor'], 'T2tankor');
+
+ echo '<label for="T2tol">'._TOL_DT.'</label>';
+ _putTolIgDt($ADAT['dt'],null,array('tolDt'=>true, 'igDt'=>true),'T2tol');
+ echo '<br/><label>'._NAPORAOPT.'</label>';
+ _putHetNapjai();
+ _putOrak();
+
+ echo '<br/><label for="T2forceDel">'._TORLESKENYSZERITES.'</label>';
+ echo '<input type="checkbox" id="T2forceDel" name="forceDel" value="1" />';
+
+ echo '<br/><label for="T2skipZaradek">'._ZARADEKNELKUL.'</label>';
+ echo '<input type="checkbox" id="T2skipZaradek" name="skipZaradek" value="1" />';
+
+ echo '<br/><label>'._IKTATOSZAM.':</label>';
+ echo '<input type="text" name="iktatoszam" value="" />';
+
+ _putSubmit();
+ formEnd();
+ echo '</div>'."\n";
+
+ echo '<div class="FM FM3">';
+ echo '<h2>3. '._FELMENTES_TARGY_TANULASA_ALOL.'</h2>';
+ echo '<div>'._TIPUS3.'</div>'."\n";
+ formBegin();
+ echo '<input type="hidden" name="action" value="tipus3" />';
+ echo '<input type="hidden" name="dt" value="'.$ADAT['dt'].'" />';
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalyId'].'" />';
+ echo '<input type="hidden" name="diakId" value="'.$ADAT['diakId'].'" />';
+ echo '<label for="T3targy">'._TARGY.'</label>'; _putDiakTargy($ADAT['diakTargy'],'T3targy'); echo '<br/>';
+ echo '<label for="T3tol">'._TOL_DT.'</label>'; _putTolIgDt($ADAT['dt'],null,array('tolDt'=>true),'T3tol');
+
+ echo '<br/><label>'._IKTATOSZAM.':</label>';
+ echo '<input type="text" name="iktatoszam" value="" />';
+
+ _putSubmit();
+ formEnd();
+ echo '</div>';
+
+ if (count($ADAT['diakZaradek'])>0) _putZaradek($ADAT['diakZaradek']);
+ if (count($ADAT['tankorDiakFelmentes'])>0) {
+
+ echo '<div class="FM FMTAN">';
+ formBegin();
+ echo '<h2>'._ROGZITETT_FELMENTESEK.'</h2>';
+
+ _putTankorDiakFelmentes($ADAT['tankorDiakFelmentes'],$ADAT['diakTankor']);
+
+ echo '<input type="hidden" name="action" value="tankorDiakFelmentesTorol" />';
+ echo '<input type="hidden" name="dt" value="'.$ADAT['dt'].'" />';
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalyId'].'" />';
+ echo '<input type="hidden" name="diakId" value="'.$ADAT['diakId'].'" />';
+
+ _putSubmit('A kijelölt felmentéseket '.$ADAT['dt'].'-i hatállyal (-1nap) lezárjuk (végdátumot erre módosítjuk), ezzel a felmentés megszűnik. A tranzakcióhoz módosító záradék is készül.' );
+
+ formEnd();
+ echo '</div>';
+ }
+
+
+ }
+
+ function putDiakFelmentesAdatok($ADAT) {
+ echo '<div class="FM FMTAN">';
+ echo '<h2>'._ROGZITETT_FELMENTESEK.'</h2>';
+ _putTankorDiakFelmentes($ADAT['tankorDiakFelmentes'],$ADAT['diakTankor'],true);
+ echo '</div>';
+ }
+
+ function _putDiakTargy($DIAKTARGY,$varId) {
+ if (count($DIAKTARGY)>0) {
+ echo '<select id="'.$varId.'" name="targyId">';
+ for($i=0; $i<count($DIAKTARGY); $i++) {
+ echo '<option value="'.$DIAKTARGY[$i]['targyId'].'">'.$DIAKTARGY[$i]['targyNev'].'</option>';
+ }
+ echo '</select>';
+ }
+ }
+ function _putDiakTankor($DATA,$varId) {
+ if (count($DATA)>0) {
+ echo '<select id="'.$varId.'" name="tankorId">';
+ for($i=0; $i<count($DATA); $i++) {
+ echo '<option value="'.$DATA[$i]['tankorId'].'">'.$DATA[$i]['tankorNev'].' ('.$DATA[$i]['tankorId'].')</option>';
+ }
+ echo '</select>';
+ }
+ }
+
+ function _putTolIgDt($tolDt,$igDt=null,$ALLOW=array('tolDt','igDt'),$tolId) {
+
+ if ($ALLOW['tolDt']) echo '<input type="text" id="'.$tolId.'" name="tolDt" value="'.$tolDt.'" readonly="readonly" title="a dátum a referenciadátummal együtt mozog" />';
+ if ($ALLOW['igDt']) echo '<input type="text" name="igDt" />';
+
+ }
+
+
+ function _putSubmit($DESC = '') {
+ echo '<div class="submit">';
+ echo '<span>'.$DESC.'</span><br/>';
+ echo '<input type="submit" />';
+ echo '<input type="reset" />';
+ echo '</div>';
+ }
+
+
+ function _putHetNapjai() {
+ global $aHetNapjai;
+ if (count($aHetNapjai)>0) {
+ echo '<select name="nap">';
+ echo '<option value=""></option>';
+ for($i=0; $i<count($aHetNapjai); $i++) {
+ echo '<option value="'.($i+1).'">'.$aHetNapjai[$i].'</option>';
+ }
+ echo '</select>';
+ }
+ }
+ function _putOrak() {
+ echo '<select name="ora">';
+ echo '<option value=""></option>';
+ for($i=0; $i<20; $i++) {
+ echo '<option value="'.($i).'">'.$i.'</option>';
+ }
+ echo '</select>';
+ }
+
+ function _putZaradek($Z) {
+
+ echo '<div class="FM FMZAR">';
+ echo '<h2>'._ROGZITETT_ZARADEKOK.'</h2>';
+
+ echo '<table cellspacing="1">';
+ echo '<tr><th>Dátum</th><th>Sorszám</th><th>Záradék szövege</th><th>Dokumentumok</th><th>Id</th><th>'._IKTATOSZAM.'</th>'."\n";
+ for ($i=0; $i<count($Z); $i++) {
+ echo '<tr>';
+ echo '<td>'.$Z[$i]['dt'].'</td>';
+ echo '<td>'.$Z[$i]['sorszam'].'</td>';
+ echo '<td>'.$Z[$i]['szoveg'].'</td>';
+ echo '<td>'.$Z[$i]['dokumentum'].'</td>';
+ echo '<td>'.$Z[$i]['zaradekId'].'</td>';
+ echo '<td>'.$Z[$i]['iktatoszam'].'</td>';
+ echo '</tr>';
+ }
+ echo '</table>'."\n";
+ echo '</div>';
+ }
+
+ function _putTankorDiakFelmentes($F,$TANKOR, $readonly=false) {
+
+ global $aHetNapjai;
+
+ echo '<table cellspacing="1">';
+ echo '<tr><th></th><th>Tankör</th><th>Felmentés típus</th><th>'._IKTATOSZAM.'</th><th>Tól</th><th>Ig</th><th colspan="2"></th><th>Id</th>'."\n";
+ for ($i=0; $i<count($F); $i++) {
+ echo '<tr>';
+ echo '<td>';
+ if ($readonly===false) echo '<input type="checkbox" name="DELFM[]" value="'.$F[$i]['tankorDiakFelmentesId'].'" />';
+ echo '</td>';
+ for ($j=0; $j<count($TANKOR); $j++) if ($TANKOR[$j]['tankorId']==$F[$i]['tankorId']) break;
+ echo '<td>'.$TANKOR[$j]['tankorNev'].'</td>';
+ echo '<td>'.$F[$i]['felmentesTipus'].'</td>';
+ echo '<td>'.$F[$i]['iktatoszam'].'</td>';
+ echo '<td>'.$F[$i]['beDt'].'</td>';
+ echo '<td>'.$F[$i]['kiDt'].'</td>';
+ echo '<td>'.(is_numeric($F[$i]['nap']) ? $aHetNapjai[$F[$i]['nap']-1]:'').'</td>';
+ echo '<td>'.$F[$i]['ora'].'</td>';
+ echo '<td>'.$F[$i]['tankorDiakFelmentesId'].'</td>';
+
+ echo '</tr>';
+ }
+ echo '</table>'."\n";
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/diakStatusz.phtml b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/diakStatusz.phtml
new file mode 100644
index 00000000..8d282c62
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/diakStatusz.phtml
@@ -0,0 +1,97 @@
+<?php
+
+ function putDiakJogviszonyForm($ADAT) {
+
+ global $Zaradek;
+
+ echo '<div class="dj">'."\n";
+ formBegin();
+ echo '<input type="hidden" name="action" value="diakAdatModositas" />'."\n";
+ echo '<input type="hidden" name="tanev" value="'.$ADAT['tanev'].'" />'."\n";
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalyId'].'" />'."\n";
+ echo '<input type="hidden" name="diakId" value="'.$ADAT['diakId'].'" />'."\n";
+ echo '<label for="jogviszonyKezdete">'._JOGVISZONY_KEZDETE.'</label>';
+ echo '<input type="text" id="jogviszonyKezdete" name="jogviszonyKezdete" value="'.$ADAT['diakAdat']['jogviszonyKezdete'].'" class="date" />';
+ echo '<label for="jogviszonyVege">'._JOGVISZONY_VEGE.'</label>';
+ echo '<input type="text" id="jogviszonyVege" name="jogviszonyVege" value="'.$ADAT['diakAdat']['jogviszonyVege'].'" class="date" />';
+ echo '<p>'._JELENLEGI_STATUSZ.': '.$ADAT['diakAdat']['statusz'].'</p>';
+ echo '<input type="submit" value="'._OK.'" title="'._BIZTOS_MODOSIT.'" class="confirm" />'."\n";
+ formEnd();
+
+ echo '<hr />';
+
+ echo '<p>'._JOGVISZONYVALTOZASOK.'</p>';
+ echo '<ul>'."\n";
+ foreach ($ADAT['diakStatusz'] as $i => $djAdat) {
+ echo '<li>';
+
+ formBegin(array('class'=>'statusz'));
+ echo '<input type="submit" value="'._TOROL.'" title="'._BIZTOS_TOROL.'" class="confirm" />'."\n";
+ echo '<p><span class="dt">'.$djAdat['dt'].': '.$djAdat['statusz'].'</span></p>'."\n";
+ echo '<input type="hidden" name="action" value="diakJogviszonyTorles" />'."\n";
+ echo '<input type="hidden" name="tanev" value="'.$ADAT['tanev'].'" />'."\n";
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalyId'].'" />'."\n";
+ echo '<input type="hidden" name="diakId" value="'.$ADAT['diakId'].'" />'."\n";
+ echo '<input type="hidden" name="dt" value="'.$djAdat['dt'].'" />'."\n";
+ echo '<input type="hidden" name="statusz" value="'.$djAdat['statusz'].'" />'."\n";
+ if (is_array($djAdat['zaradek'])) echo '<input type="hidden" name="zaradekId" value="'.$djAdat['zaradek']['zaradekId'].'" />'."\n";
+ formEnd();
+
+ formbegin(array('class'=>'zaradek'));
+ echo '<input type="hidden" name="action" value="diakZaradek" />'."\n";
+ echo '<input type="hidden" name="tanev" value="'.$ADAT['tanev'].'" />'."\n";
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalyId'].'" />'."\n";
+ echo '<input type="hidden" name="diakId" value="'.$ADAT['diakId'].'" />'."\n";
+ echo '<input type="hidden" name="dt" value="'.$djAdat['dt'].'" />'."\n";
+ echo '<input type="hidden" name="zaradekId" value="'.$djAdat['zaradek']['zaradekId'].'" />'."\n";
+ echo '<h2>'._JELENLEGI_ZARADEK.'</h2><p>';
+ if (is_array($djAdat['zaradek'])) echo $djAdat['zaradek']['szoveg'].' ['.$djAdat['zaradek']['sorszam'].'/'.$djAdat['zaradek']['zaradekId'].']';
+ else echo _NINCS;
+ echo '</p>'."\n";
+ echo '<input type="submit" value="'._MEHET.'" style="display: none;" />'."\n";
+ echo '<h2>'._UJ_MODOSITOTT_ZARADEK.'</h2>'."\n";;
+ echo '<select name="zaradekIndex" class="zaradek" id="s'.$i.'">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ foreach ($ADAT['statusz2zaradek'][ $djAdat['statusz'] ] as $zaradekIndex) {
+ echo '<option value="'.$zaradekIndex.'">'.$Zaradek[$zaradekIndex]['szoveg'].'</option>'."\n";
+ }
+ echo '</select>'."\n";
+ echo '<div></div>';
+ formEnd();
+
+ echo '</li>'."\n";
+ }
+ echo '</ul>'."\n";
+
+ echo '<hr />';
+
+ echo '<p>'._KIMARADT_JOGVISZONY_ZARADEKOK.'</p>';
+ echo '<ul>'."\n";
+ foreach ($ADAT['diakZaradekok'] as $dt => $dtAdat) {
+ foreach ($dtAdat as $j => $dzAdat) {
+ if (in_array($dzAdat['zaradekIndex'], $ADAT['jogviszonyZaradekok'])) {
+ echo '<li>';
+ echo $dzAdat['dt'].': ['.$dzAdat['sorszam'].'/'.$dzAdat['zaradekId'].']'.$dzAdat['szoveg'].' ('.$dzAdat['dokumentum'].')';
+ echo '</li>'."\n";
+ }
+ }
+ }
+ echo '</ul>'."\n";
+ echo '</div>'."\n"; // class="dj"
+
+ }
+
+ function putHibasJogviszony($ADAT) {
+
+ if (count($ADAT['hibas']['tobbszoros']) == 0) return;
+ echo '<h2>'._HIBAS_JOGVISZONYU_DIAKOK.'</h2>';
+ echo '<h3>'._TOBBSZOROS_JOGVISZONY.'</h3>'; // egy stártusz egymás követlenül után többször is szerepel
+
+ foreach ($ADAT['hibas']['tobbszoros'] as $i => $diakId) {
+ echo '<a href="'.href('index.php?page=naplo&sub=intezmeny&f=diakStatusz&diakId='.$diakId).'">';
+ echo $diakId;
+ echo '</a>, ';
+ }
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/diakSzulo.phtml b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/diakSzulo.phtml
new file mode 100644
index 00000000..78bd4f5f
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/diakSzulo.phtml
@@ -0,0 +1,300 @@
+<?php
+
+
+ function putDiakSzulo($diakAdat, $Szulok, $tipus, $ADAT) {
+
+ global $skin;
+ $ktJelleg = $ADAT['kozteruletJelleg'];
+
+ // ajax esetén nem rakja ki a <form> elemet!!
+ formBegin(array('action'=>href('index.php?page=naplo&sub=intezmeny&f=diakSzulo'),'class'=>"diak"));
+ if ($skin == 'ajax') {
+ $class = 'onClickUpdate';
+ }
+ echo '<input type="hidden" name="action" value="diakSzuloModositas" />'."\n";
+ echo '<input type="hidden" name="tipus" value="'.$tipus.'" />'."\n";
+ echo '<input type="hidden" name="diakId" value="'.$diakAdat['diakId'].'" />'."\n";
+ echo '<input type="hidden" name="szuloId" value="'.$diakAdat[$tipus.'Id'].'" />'."\n";
+ echo '<fieldset><legend>'._DIAK_SZULO.'</legend>'."\n";
+
+ $SEL = array($tipus => ' kiemelt');
+ echo '<input type="submit" name="semmi" value="" class="" style="display: none;" />';
+ echo '<input type="submit" name="anya" value="'._ANYA.': '.$Szulok[$diakAdat['anyaId']]['szuloNev'].' ('.$diakAdat['anyaId'].')" class="'.$class.$SEL['anya'].'" />';
+ echo '<input type="submit" name="apa" value="'._APA.': '.$Szulok[$diakAdat['apaId']]['szuloNev'].' ('.$diakAdat['apaId'].')" class="'.$class.$SEL['apa'].'" />';
+ echo '<input type="submit" name="gondviselo" value="'._GONDVISELO.': '.$Szulok[$diakAdat['gondviseloId']]['szuloNev'].' ('.$diakAdat['gondviseloId'].')" class="'.$class.$SEL['gondviselo'].'" />';
+ echo '<input type="submit" name="nevelo" value="'._NEVELO.': '.$Szulok[$diakAdat['neveloId']]['szuloNev'].' ('.$diakAdat['neveloId'].')" class="'.$class.$SEL['nevelo'].'" />';
+
+ if ($tipus != '') {
+
+ echo '<table border="0" class="reszletek">'."\n";
+
+ if ($diakAdat[$tipus.'Id'] != '') {
+ $szAdat = $Szulok[$diakAdat[$tipus.'Id']];
+ echo '<tr>'."\n";
+ echo '<td colspan="6">';
+ echo '<h1>'._SZULO_ADAT_MODOSITAS.'</h1>';
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+ } else {
+ $szAdat = array();
+ // Új szülő hozzárendelése
+ echo '<tr>'."\n";
+ echo '<td colspan="6">';
+ echo '<input type="hidden" name="ajaxOption" class="ajaxOption" value="onChangeRequestStop" />';
+ echo '<h1>'._SZULO_HOZZARENDELESE.'</h1>';
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+ echo '<tr>'."\n";
+ echo '<td colspan="6" style="text-align: center;">';
+ echo '<select name="ujSzuloId" class="onChangeUpdate">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ foreach ($Szulok['szuloIds'] as $index => $szuloId) {
+ if (
+ $Szulok[$szuloId]['nem']=='' ||
+ ($tipus=='anya' && $Szulok[$szuloId]['nem']=='lány') ||
+ ($tipus=='apa' && $Szulok[$szuloId]['nem']=='fiú') ||
+ !in_array($tipus,array('anya','apa'))
+ )
+ echo '<option value="'.$szuloId.'">'.$Szulok[$szuloId]['szuloNev'].' ('.$szuloId.')</option>'."\n";
+ }
+ echo '</select>'."\n";
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+ echo '<tr>'."\n";
+ echo '<td colspan="6">';
+ echo '<hr />';
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+
+ echo '<tr>'."\n";
+ echo '<td colspan="6">';
+ echo '<h1>'._UJ_SZULO.'</h1>';
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+ }
+
+ echo '<tr>'."\n";
+ echo '<th colspan="1">';
+ echo '<label for="Csaladinev">'._NEV.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td colspan="1">';
+ echo '<input type="text" size="4" name="nevElotag" value="'.$szAdat['nevElotag'].'" title="'._NEVELOTAG.'" />';
+ echo '<input type="text" id="Csaladinev" name="csaladinev" value="'.$szAdat['csaladinev'].'" title="'._CSALADINEV.'" />';
+ echo '<input type="text" name="utonev" value="'.$szAdat['utonev'].'" title="'._UTONEV.'" />';
+ echo '</td>'."\n";
+ echo '<th colspan="1">';
+ echo '<label for="szuloNem">'._NEM.'</label>';
+ echo '</th>'."\n";
+ echo '<td colspan="1">';
+ if ($szAdat['nem']!='') $_SEL[$szAdat['nem']] = ' selected="selected" ';
+ elseif ($tipus=='anya') $_SEL['lány'] = ' selected="selected" ';
+ elseif ($tipus=='apa') $_SEL['fiú'] = ' selected="selected" ';
+ echo '<select name="nem" id="szuloNem">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ echo '<option value="fiú"'.$_SEL['fiú'].'>'._FIU.'</option>'."\n";
+ echo '<option value="lány"'.$_SEL['lány'].'>'._LANY.'</option>'."\n";
+ echo '</select>'."\n";
+ echo '</td>'."\n";
+ echo '<th>';
+ echo '<label for="foglalkozas">'._FOGLALKOZAS.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>';
+ echo '<input type="text" name="foglalkozas" id="foglalkozas" value="'.$szAdat['foglalkozas'].'" title="'._FOGLALKOZAS.'" />';
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+ echo '<tr>'."\n";
+ echo '<th colspan="1">';
+ echo '<label for="szuloSzuleteskoriCsaladinev">'._SZULETESKORINEV.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td colspan="1">';
+ echo '<input type="text" size="4" name="szuleteskoriNevElotag" value="'.$szAdat['szuleteskoriNevElotag'].'" title="'._SZULETESKORINEVELOTAG.'" />';
+ echo '<input type="text" id="szuloSzuleteskoriCsaladinev" name="szuleteskoriCsaladinev" value="'.$szAdat['szuleteskoriCsaladinev'].'" title="'._SZULETESKORICSALADINEV.'" />';
+ echo '<input type="text" name="szuleteskoriUtonev" value="'.$szAdat['szuleteskoriUtonev'].'" title="'._SZULETESKORIUTONEV.'" />';
+ echo '</td>'."\n";
+ echo '<th>';
+ echo '<label for="szuletesiEv">'._SZULETESIEV.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>';
+ echo '<input type="text" size="4" name="szuletesiEv" id="szuletesiEv" value="'.$szAdat['szuletesiEv'].'" title="'._SZULETESIEV.'" />';
+ echo '</td>'."\n";
+ echo '<th>';
+ echo '<label for="munkahely">'._MUNKAHELY.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>';
+ echo '<input type="text" name="munkahely" id="munkahely" value="'.$szAdat['munkahely'].'" title="'._MUNKAHELY.'" />';
+ echo '</td>'."\n";
+ echo '</tr>';
+ echo '<tr>'."\n";
+ echo '<th colspan="1">';
+ echo '<label for="userAccount">';
+ echo _SZULOACCOUNT;
+ echo '</label>'."\n";
+ echo '</th>';
+ echo '<td colspan="1">';
+ if (__NAPLOADMIN) {
+ $inNev=(($szAdat['nevElotag']!='')?$szAdat['nevElotag'].' ':'').$szAdat['csaladinev'].' '.$szAdat['utonev'];
+ if ($szAdat['userAccount']=='') {
+ $inUsername=$szAdat['csaladinev'].'.';
+ $inUsername .= (mb_strpos($szAdat['utonev'],' ')!=0)?mb_substr($szAdat['utonev'], 0, mb_strpos($szAdat['utonev'],' '), 'UTF-8'):$szAdat['utonev'];
+ if ($inUsername == '.') $inUsername = '';
+ } else {
+ $inUsername=$szAdat['userAccount'];
+ }
+ $inJelszo = sprintf('%u', crc32($szAdat['csaladinev']));
+ $inEmail = $szAdat['email'];
+ $inTel = $szAdat['mobil'];
+ // kódold
+ echo '<input type="text" id="userAccount" name="userAccount" value="'.$szAdat['userAccount'].'" />';
+ if ($szAdat['userAccount']=='') echo '<a title="'.$inUsername.'" class="gotoCreateAccount" href="'.href("index.php?page=session&f=createAccount&toPolicy=parent&userCn=$inNev&userPassword=$inJelszo&email=$inEmail&tel=$inTel&userAccount=$inUsername", array('policy','lang','sessionID')).'" target="_blank">@</a> ';
+ echo ' ('.$inJelszo.')';
+ } else
+ echo '<input readonly="readonly" type="text" id="userAccount" name="userAccount" value="'.$szAdat['userAccount'].'" />';
+ echo '</td>';
+ echo '<th colspan="1">';
+ echo '<label for="szStatusz">'._SZULOSTATUSZTIPUSOK.'</label>';
+ echo '</th>';
+ echo '<td colspan="3">';
+ $_SEL[$szAdat['statusz']] = ' selected="selected" ';
+ echo '<select name="statusz" id="szStatusz">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ for ($i = 0; $i < count($ADAT['statuszTipusok']); $i++) {
+ echo '<option value="'.$ADAT['statuszTipusok'][$i].'"'.$_SEL[$ADAT['statuszTipusok'][$i]].'>'.$ADAT['statuszTipusok'][$i].'</option>'."\n";
+ }
+ echo '</select>'."\n";
+ echo '</td>';
+ echo '</tr>'."\n";
+ echo '<tr>'."\n";
+ echo '<td colspan="6">'."\n";
+ echo '<fieldset><legend>'._LAKHELY.'</legend>'."\n";
+
+ echo '<table>'."\n";
+ echo '<tr>'."\n";
+ echo '<th>';
+ echo '<label for="orszag">'._ORSZAG.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>';
+ echo '<input type="text" id="orszag" name="cimOrszag" value="'.$szAdat['cimOrszag'].'" />';
+ echo '</td>'."\n";
+ echo '<th>';
+ echo '<label for="cimIrsz">'._IRSZ.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>';
+ echo '<input type="text" id="cimIrsz" name="cimIrsz" value="'.$szAdat['cimIrsz'].'" />';
+ echo '</td>'."\n";
+ echo '<th>';
+ echo '<label for="cimHelyseg">'._HELYSEG.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>';
+ echo '<input type="text" id="cimHelyseg" name="cimHelyseg" value="'.$szAdat['cimHelyseg'].'" />';
+ echo '</td>'."\n";
+ echo '</tr>';
+
+ echo '<tr>'."\n";
+ echo '<th>';
+ echo '<label for="cimKozteruletNev">'._KOZTERULETNEV.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>';
+ echo '<input type="text" id="cimKozteruletNev" name="cimKozteruletNev" value="'.$szAdat['cimKozteruletNev'].'" />';
+ echo '<select name="cimKozteruletJelleg">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ $SEL = array($szAdat['cimKozteruletJelleg'] => ' selected="selected" ');
+ foreach ($ktJelleg as $jelleg) {
+ echo '<option value="'.$jelleg.'"'.$SEL[$jelleg].'>'.$jelleg.'</option>'."\n";
+ }
+ echo '</select>'."\n";
+ echo '</td>'."\n";
+ echo '<th>';
+ echo '<label for="cimHazszam">'._HAZSZAM.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>';
+ echo '<input type="text" id="cimHazszam" name="cimHazszam" value="'.$szAdat['cimHazszam'].'" title="'._HAZSZAM.'" />';
+ echo '</td>'."\n";
+ echo '</tr>';
+
+ echo '<tr>'."\n";
+ echo '<th>';
+ echo '<label for="cimEmelet">'._EMELET.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>';
+ echo '<input type="text" id="cimEmelet" name="cimEmelet" value="'.$szAdat['cimEmelet'].'" title="'._EMELET.'" />';
+ echo '</td>'."\n";
+ echo '<th>';
+ echo '<label for="cimAjto">'._AJTO.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>';
+ echo '<input type="text" id="cimAjto" name="cimAjto" value="'.$szAdat['cimAjto'].'" title="'._AJTO.'" />';
+ echo '</td>'."\n";
+ echo '</tr>';
+ echo '</table>'."\n";
+
+ echo '</filedset>'."\n";
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+ echo '<tr>'."\n";
+
+ echo '<th>';
+ echo '<label for="szuloMobil">'._MOBIL.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<span class="icon-phone-alt"></span>';
+ echo '<input type="text" id="szuloMobil" name="mobil" value="'.$szAdat['mobil'].'" />';
+ echo '</td>'."\n";
+
+ echo '<th>';
+ echo '<label for="szuloEmail">'._EMAIL.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td colspan="1">'."\n";
+ echo '<span class="icon-envelope"></span>';
+ echo '<input type="text" id="szuloEmail" name="email" value="'.$szAdat['email'].'" />';
+ echo '</td>'."\n";
+
+ echo '<th>';
+ echo '<label for="szuloTelefon">'._TELEFON.'</label>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<span class="icon-phone"></span>';
+ echo '<input type="text" id="szuloTelefon" name="telefon" value="'.$szAdat['telefon'].'" />';
+ echo '</td>'."\n";
+
+ echo '</tr>';
+ echo '<tr>'."\n";
+ echo '<td colspan="6" style="text-align: center;">';
+ if ($diakAdat[$tipus.'Id'] == '') {
+ echo '<input type="submit" name="modositas" value="'._FELVESZ.'" class="onClickUpdate" />';
+ echo '<input type="hidden" name="subaction" value="felvesz" />';
+ } else {
+ echo '<input type="submit" name="modositas" value="'._MODOSITAS.'" class="onClickUpdate" />';
+ echo '<input type="hidden" name="subaction" value="modosit" />';
+ }
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+
+ if ($diakAdat[$tipus.'Id'] != '') {
+ // Hozzárendelés törlése
+ echo '<tr>'."\n";
+ echo '<td colspan="6">';
+ echo '<h1>'._SZULO_HOZZARENDELES_TORLESE.'</h1>';
+ echo '</td>'."\n";
+ echo '<tr>'."\n";
+ echo '</tr>'."\n";
+ echo '<td colspan="6" style="text-align: center;">';
+ echo '<input type="submit" name="torles" value="'._SZULO_HOZZARENDELES_TORLESE.'" class="onClickUpdate" />';
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+ }
+ echo '</table>'."\n";
+ } // isset($tipus)
+
+ echo '</fieldset>'."\n";
+
+ if ($skin != 'ajax') {
+ echo '<input type="hidden" name="szuloId" value="'.$szAdat['szuloId'].'" />'."\n";
+ for ($i = 0; $i < count($ADAT['szuloDiakjai']); $i++) {
+ echo '<button type="submit" name="diakId" value="'.$ADAT['szuloDiakjai'][$i]['diakId'].'" >'.$ADAT['szuloDiakjai'][$i]['diakNev'].'</button>';
+ }
+ }
+ formEnd();
+ }
+
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/diakTankor.phtml b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/diakTankor.phtml
new file mode 100644
index 00000000..bca9028f
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/diakTankor.phtml
@@ -0,0 +1,84 @@
+<?php
+
+ function putDiakTankorForm($ADAT) {
+
+ formBegin(array('method'=>'post', 'action'=>''));
+ echo '<input type="hidden" name="action" value="do" />';
+ echo '<input type="hidden" name="diakId" value="'.$ADAT['diakId'].'" />';
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalyId'].'" />';
+ echo '<input type="hidden" name="refDt" value="'.$ADAT['refDt'].'" />';
+ echo '<input type="hidden" name="tanev" value="'.$ADAT['tanev'].'" />';
+ for ($i=0; $i<count($ADAT['tankorok']['diake']); $i++) {
+ $BENNE[$ADAT['tankorok']['diake'][$i]['tankorId']] = true;
+ }
+
+ echo '<table align="center">'; /* container */
+ echo '<tr><td style="vertical-align: top">';
+ if ($ADAT['diakOsszOraszam']>0) {
+ echo '<table class="tankor">';
+ echo '<thead><tr><th colspan="2">'._TANKOR_ORASZAMOK.'</th></tr></thead>';
+ echo '<tfoot><tr><th>'._OSSZESEN.'</th><th> '.$ADAT['diakOsszOraszam']."</th></tr></tfoot>\n";
+ echo '<tbody>';
+ foreach($ADAT['diakTankorOraszam'] as $tankorTipus => $oraszam) {
+ echo '<tr><td>'.$tankorTipus.'</td><td>'.$oraszam.'</td></tr>';
+ }
+ echo '</tbody></table>';
+ }
+ echo '</td><td style="vertical-align: top">'."\n";
+ echo '<table class="tankor">';
+ echo '<tfoot><tr><td colspan="7">';
+ if (__MODOSITHATO) {
+ echo '<label for="forceDel">'._HIANYZASOK_JEGYEK_TOROLHETOK.'</label>';
+ echo '<input type="checkbox" name="forceDel" id="forceDel" value="1" /><br />';
+ echo '<input type="submit" value="'._OK.'" />';
+ }
+// else echo _LEZART;
+ echo '</tfoot></th></tr>';
+
+/* Osztályonként */
+ for ($j=0; $j<count($ADAT['osztalyok']); $j++) {
+ $_osztalyId = $ADAT['osztalyok'][$j]['osztalyId'];
+ $_osztalyJel = $ADAT['osztalyok'][$j]['osztalyJel'];
+ echo '<tr><th colspan="7">'._OSZTALYTANKOROK.' '.$_osztalyJel.'</th></tr>';
+ for ($i=0; $i<count($ADAT['tankorok']['osztalye'][$_osztalyId]); $i++) {
+ _row($ADAT['tankorok']['osztalye'][$_osztalyId][$i],$BENNE,$i.$j.'1');
+ }
+ }
+/* Diáké */
+ echo '<tr><th colspan="7">'._DIAKTANKOROK.'</th></tr>';
+ for ($i=0; $i<count($ADAT['tankorok']['diake']); $i++) {
+ _row( $ADAT['tankorok']['diake'][$i] ,$BENNE,$i.$j.'2');
+ }
+ echo '</table>';
+ formEnd();
+ echo '</td></tr></table>'; /* container */
+ }
+
+ function _row($D,$BENNE,$id) {
+
+ $_benne = ($BENNE[$D['tankorId']]) ? true: false;
+ $_class = ($_benne) ? ' class="benne" ':'';
+ $_chk = ($_benne) ? ' checked="checked" ':'';
+ $_dsb = (__MODOSITHATO) ? '': ' disabled="disabled" readonly="readonly" ';
+ echo '<tr'.$_class.'>';
+ if (!$_benne)
+ echo '<td><input type="checkbox" id="C'.$id.'" name="UJtankorId[]" value="'.$D['tankorId'].'" '.$_chk.$_dsb.'/></td><td></td>'."\n";
+ else
+ echo '<td></td><td><input type="checkbox" id="C'.$id.'" name="DELtankorId[]" value="'.$D['tankorId'].'" '.$_dsb.'/></td>'."\n";
+ echo '<td>'.$D['tankorId'].'</td>'."\n";
+ echo '<td><label for="C'.$id.'">'.$D['tankorNev'].'</label></td>'."\n";
+ echo '<td>'; /* tervezett heti oraszam */
+ echo $D['tankorTipus'].' ';
+ if ($D['hetiOraszam']>0) echo number_format($D['hetiOraszam'],1);
+ echo '</td>';
+ echo '<td>';
+ for ($k=0; $k<count($D['tanarok']); $k++) echo $D['tanarok'][$k]['tanarNev'].' ';
+ echo '</td>'."\n";
+ echo '<td>';
+ if ($D['felveheto']==1) echo 'o'; //else echo '&bull;';
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/diakTankorJelentkezes.phtml b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/diakTankorJelentkezes.phtml
new file mode 100644
index 00000000..b55f2684
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/diakTankorJelentkezes.phtml
@@ -0,0 +1,167 @@
+<?php
+
+ function putDiakTankorJelentkezesForm($ADAT) {
+ global $TBLOKKOK,$TID2TBLOKK;
+ $TBLOKKOK = $ADAT['tankorBlokkok'];
+
+ // $ARR[tankorId]=tankorBlokk
+ for ($i=0; $i<count($ADAT['tankorok']['valaszthato']); $i++) {
+ for ($j=0; $j<count($ADAT['tankorok']['valaszthato'][$i]['blokkIdk']); $j++) {
+ $_tankorId = $ADAT['tankorok']['valaszthato'][$i]['tankorId'];
+ $_blokkId = $ADAT['tankorok']['valaszthato'][$i]['blokkIdk'][$j];
+ if (!@in_array($_blokkId, $TID2TBLOKK[$_tankorId])) $TID2TBLOKK[$_tankorId][] = $_blokkId;
+ }
+ }
+
+
+ formBegin();
+ echo '<input type="hidden" name="action" value="do" />';
+ echo '<input type="hidden" name="diakId" value="'.$ADAT['diakId'].'" />';
+ echo '<input type="hidden" name="refDt" value="'.$ADAT['refDt'].'" />';
+ echo '<input type="hidden" name="tanev" value="'.$ADAT['tanev'].'" />';
+ echo '<input type="hidden" name="szemeszterId" value="'.$ADAT['szemeszterId'].'" />';
+
+ for ($i=0; $i<count($ADAT['tankorok']['diake']); $i++) {
+ $_tankorId = $ADAT['tankorok']['diake'][$i]['tankorId'];
+ $BENNE[$_tankorId] = true;
+ for ($j=0; $j<count($TID2TBLOKK[$_tankorId]); $j++) {
+ $TBENNE[$TID2TBLOKK[$_tankorId][$j]] = $_tankorId;
+ }
+ }
+ echo '<table align="center"><tr><td>'; /* konténer */
+ echo '<tr><td style="vertical-align:top">';
+ /* Összesítő, tájékoztató táblázat */
+/*
+ echo '<table class="tankor" align="center">';
+ echo '<thead>';
+ echo '<tr><th colspan="2">'._KEPZES_ORASZAM.'</th></tr>';
+ echo '</thead>';
+ echo '<tfoot><tr><td colspan="2"></td></tr></tfoot>';
+ if (is_array($ADAT['diakKepzes'])) foreach($ADAT['diakKepzes'] as $diakId => $DO) {
+ for($i=0; $i<count($DO); $i++) {
+ $_kepzesId = $DO[$i]['kepzesId'];
+ $ORASZAMOK = $ADAT['kepzesOraszam'][$_kepzesId];
+ echo '<tbody>';
+ echo '<tr><th colspan="2">'.$DO[$i]['kepzesNev'].'/'.$DO[$i]['tanev'].'</th></tr>';
+ echo '<tr><td class="k">'.
+ _KOTELEZOEN_VALASZTHATO.'</td><td>'.intval($ORASZAMOK['kötelezően választható']['sum']).' '._ORA.'</td>';
+ echo '<tr><td class="k">'.
+ _SZABADON_VALASZTHATO.'</td><td>'.intval($ORASZAMOK['szabadon választható']['sum']).' '._ORA.
+ '</td></tr>';
+ echo '</tbody>';
+ }
+ }
+
+ echo '<tbody>';
+ echo '<tr><th colspan="2">'._VALASZTOTT.'</th></tr>';
+ echo '<tr><td>'.
+ _VALASZTOTT.'</td><td>'.intval(0).' '._ORA.
+ '</td></tr>';
+ echo '</tbody>';
+
+ echo '</table>'."\n";
+*/
+ echo '</td><td style="vertical-align: top">'; /* konténer */
+ echo '<table class="tankor" align="center" >';
+ echo '<thead>';
+ echo '<tr><th colspan="9">'._VALASZTHATO.'</th></tr>';
+ echo '<tr class="small"><th colspan="2">'._JELENTKEZ.'</th><th>'._ID.'</th><th>'._BLOKK.'</th><th>'._ORASZAM.'</th><th>'._TANKOR.'</th><th>'._LETSZAM.'</th><th>'._KERETLETSZAM.'</th><th>'.ucfirst(_TANAR).'</th></tr>';
+ echo '</thead>';
+ echo '<tfoot><tr><td colspan="9">';
+ //if (__) echo '<input type="submit" value="'._OK.'" />';
+ //else echo _LEZART;
+ if (__TARGYVALASZTAS===false) echo _NINCSTV;
+ elseif (__MINCONTROL===false) echo _ELOTV;
+ else echo _TV;
+
+ echo '</td></tr>';
+ echo '</tfoot>'."\n";
+
+ if ( (!__DIAK && !__NAPLOADMIN && !__VEZETOSEG) ||
+ (__TARGYVALASZTAS!==true || !isset($ADAT['diakId'])) ) { $GVal = false; $GMutat = false;}
+ else {$GVal = true; $GMutat = true;}
+
+// for ($j=0; $j<count($ADAT['osztalyok']); $j++) {
+// $_osztalyId = $ADAT['osztalyok'][$j]['osztalyId'];
+ echo '<tbody>';
+ for ($i=0; $i<count($ADAT['tankorok']['valaszthato']); $i++) {
+ $_tankorId = $ADAT['tankorok']['valaszthato'][$i]['tankorId'];
+ $_blokkIdk = $ADAT['tankorok']['valaszthato'][$i]['blokkIdk'];
+ $_valaszthato=$GVal;
+
+ for ($k=0; $k<count($_blokkIdk); $k++) {
+ if ($TBENNE[$_blokkIdk[$k]]!='' && $TBENNE[$_blokkIdk[$k]]!=$_tankorId) $_valaszthato=false;
+ }
+ _row($ADAT['tankorok']['valaszthato'][$i],$BENNE,$i.$j.'1', $_valaszthato, $GMutat, $_oraszam);
+ }
+
+/*
+// Ha meg akarnánk mutatni az összes felvett tankörét:
+
+ echo '<tr><th colspan="9">'._OSSZESFELVETT.'</th></tr>';
+ for ($i=0; $i<count($ADAT['tankorok']['diake']); $i++) {
+ _row( $ADAT['tankorok']['diake'][$i] ,$BENNE,$i.$j.'2',false,false);
+ }
+*/
+ echo '</tbody>';
+// }
+ echo '</table>';
+ echo '</td></tr></table>'; /* konténer */
+ formEnd();
+
+ }
+
+ function _row($D,$BENNE,$id,$MODOSITHATO,$showbutton=true) {
+
+ global $TBLOKKOK,$TID2TBLOKK;
+
+ $_benne = ($BENNE[$D['tankorId']]) ? true: false;
+ $_class = ($_benne) ? 'benne ':'';
+ $_chk = ($_benne) ? ' checked="checked" ':'';
+ $_dsb = ($MODOSITHATO && $D['max']>$D['letszam']) ? '': ' disabled="disabled" readonly="readonly" ';
+ $_dsbLE = ($MODOSITHATO && (__MINCONTROL===false || (__MINCONTROL===true && $D['min']<$D['letszam'])) ) ? '': ' disabled="disabled" readonly="readonly" ';
+
+ if ($D['min']<$D['letszam'] && $D['max']>$D['letszam']) $_letszamClass = 'lok';
+ elseif ($D['min']==$D['letszam']) $_letszamClass = 'lok lokbottom';
+ elseif ($D['max']==$D['letszam']) $_letszamClass = 'lok loktop';
+ elseif ($D['min']>$D['letszam']) $_letszamClass = 'lkeves';
+ elseif ($D['min']<$D['letszam']) $_letszamClass = 'lsok';
+
+ for ($i=0; $i<count($D['blokkIdk']); $i++) {
+ $_class .= " B".$D['blokkIdk'][$i];
+ }
+ echo "\n\n".'<tr class="'.$_class.'">';
+ if (!$_benne) {
+ echo '<td>';
+ if ($showbutton) echo '<input type="submit" class="felvesz" id="C'.$id.'" name="UJtankorId'.$D['tankorId'].'" value="'._FELVESZ.'" '.$_chk.$_dsb.'/>';
+ else echo '&nbsp;'; // for IE
+ echo '</td><td>&nbsp;</td>';
+ } else {
+ echo '<td>&nbsp;</td><td>';
+ if ($showbutton) echo '<input type="submit" class="lead" id="C'.$id.'" name="DELtankorId'.$D['tankorId'].'" value="'._LEAD.'" '.$_dsbLE.'/>';
+ else echo '&nbsp;'; // for IE
+ echo '</td>';
+ }
+ echo '<td>'.( (is_array($D['blokkIdk']))?implode('|',$D['blokkIdk']).'/':'' ).$D['tankorId'].'</td>';
+ echo '<td>';
+ for ($i=0; $i<count($D['blokkIdk']); $i++) {
+ echo $TBLOKKOK['blokkNevek'][$D['blokkIdk'][$i]];
+ if ($i<count($D['blokkIdk'])-1) echo ', ';
+ }
+ if (count($D['blokkIdk'])==0)
+ echo '&nbsp;';
+ echo '</td>';
+ echo '<td class="szam">'.$D['oraszam'].'</label></td>';
+ echo '<td>'.$D['tankorNev'].'</td>';
+ //echo '<td><input type="radio" name="B|'.$D['blokkIdk'][0].'" value="'.$D['tankorId'].'" /></td>';
+ echo '<td class="szam">'.$D['letszam'].'</td>';
+ echo '<td class="'.$_letszamClass.'" style="text-align: center">'.$D['min'].'-'.$D['max'].'</td>';
+ echo '<td>';
+ for ($k=0; $k<count($D['tanarok']); $k++) { echo $D['tanarok'][$k]['tanarNev']; if ($k<count($D['tanarok'])-1) echo ', ';}
+ if (count($D['tanarok'])==0) echo '&nbsp;';
+ echo '</td>';
+ echo '</tr>'."\n";
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/felmentes.phtml b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/felmentes.phtml
new file mode 100644
index 00000000..b4e5e234
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/felmentes.phtml
@@ -0,0 +1,261 @@
+<?php
+
+ function putFelmentes($ADAT) {
+ echo '<div class="FM FM1">';
+ echo '<h2>'._FELMENTESEK.'</h2>';
+ formBegin();
+ echo '<table cellspacing="1">';
+ for ($i=0; $i<count($ADAT['felmentes']); $i++) {
+ $D = $ADAT['felmentes'][$i];
+ echo '<tr>';
+ echo '<td>';
+ echo '<a href="'.href('index.php?page=naplo&sub=intezmeny&f=diakFelmentes&diakId='.$D['diakId']).'">';
+ echo $ADAT['diakAdat'][$D['diakId']]['diakNev'];
+ echo ' ('.$ADAT['diakAdat'][$D['diakId']]['diakId'].')';
+ echo '</a>';
+ echo '</td>';
+ echo '<td>';
+ echo ($D['felmentesTipus']);
+ echo '</td>';
+ echo '<td>';
+ echo ($D['tankorId']);
+ echo '</td>';
+ echo '<td>';
+ echo $D['beDt'];
+ echo '</td>';
+ echo '<td>';
+ echo $D['kiDt'];
+ echo '</td>';
+ echo '<td>';
+ echo $D['nap'].'/'.$D['ora'];
+ echo '</td>';
+ echo '<td>';
+ echo $D['iktatoszam'];
+ echo '</td>';
+ echo '</tr>';
+ }
+ echo '</table>';
+ formEnd();
+ }
+
+
+ function putDiakFelmentesForm($ADAT) {
+
+ echo '<div class="FM FM1">';
+ echo '<h2>1. '._FELMENTES_TARGY_ERTEKELES_ALOL.'</h2>';
+ formBegin();
+
+ echo '<label for="T1targy">'._TARGY.'</label>'; _putDiakTargy($ADAT['diakTargy'],'T1targy');
+
+ echo '<select name="t1altipus" id="t1altipus">';
+ echo '<option value="1">'._EGESZ_EVRE.'</option>';
+ echo '<option value="2">'._RESZBEN.'</option>';
+ echo '</select>'."\n";
+ echo '<label for="T1tol">'._TOL_DT.'</label>'; _putTolIgDt($ADAT['dt'],null,array('tolDt'=>true),'T1tol');
+
+ echo '<div class="rejtett" id="T1b">';
+ echo '<label>'._ZARADEK.'</label>';
+ echo '<input type="text" name="zaradekTxt1" value="" />'._ZARADEK1;
+ echo '<input type="text" name="zaradekTxt2" value="" />'._ZARADEK2;
+
+ echo '</div>'."\n";
+
+ echo '<label>'._IKTATOSZAM.':</label>';
+ echo '<input type="text" name="iktatoszam" value="" />';
+
+ echo '<input type="hidden" name="action" value="tipus1" />';
+ echo '<input type="hidden" name="dt" value="'.$ADAT['dt'].'" />';
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalyId'].'" />';
+ echo '<input type="hidden" name="diakId" value="'.$ADAT['diakId'].'" />';
+
+ _putSubmit();
+ formEnd();
+ echo '</div>'."\n";
+
+
+ echo '<div class="FM FM2">';
+ echo '<h2>2. '._FELMENTES_TANKOR_ORALATOGATASA_ALOL.'</h2>';
+ formBegin();
+ echo '<input type="hidden" name="action" value="tipus2" />';
+ echo '<input type="hidden" name="dt" value="'.$ADAT['dt'].'" />';
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalyId'].'" />';
+ echo '<input type="hidden" name="diakId" value="'.$ADAT['diakId'].'" />';
+
+ echo '<label for="T2ovi">'._OVIKOTELES.'</label>';
+ echo '<input type="checkbox" id="T2ovi" name="ovi" value="1" /><br/>';
+
+ echo '<label for="T2tankor">'._TANKOR.'</label>';
+ _putDiakTankor($ADAT['diakTankor'], 'T2tankor');
+
+ echo '<label for="T2tol">'._TOL_DT.'</label>';
+ _putTolIgDt($ADAT['dt'],null,array('tolDt'=>true, 'igDt'=>true),'T2tol');
+ echo '<br/><label>'._NAPORAOPT.'</label>';
+ _putHetNapjai();
+ _putOrak();
+
+ echo '<br/><label for="T2forceDel">'._TORLESKENYSZERITES.'</label>';
+ echo '<input type="checkbox" id="T2forceDel" name="forceDel" value="1" />';
+
+ echo '<br/><label for="T2skipZaradek">'._ZARADEKNELKUL.'</label>';
+ echo '<input type="checkbox" id="T2skipZaradek" name="skipZaradek" value="1" />';
+
+ echo '<br/><label>'._IKTATOSZAM.':</label>';
+ echo '<input type="text" name="iktatoszam" value="" />';
+
+ _putSubmit();
+ formEnd();
+ echo '</div>'."\n";
+
+ echo '<div class="FM FM3">';
+ echo '<h2>3. '._FELMENTES_TARGY_TANULASA_ALOL.'</h2>';
+ echo '<div>'._TIPUS3.'</div>'."\n";
+ formBegin();
+ echo '<input type="hidden" name="action" value="tipus3" />';
+ echo '<input type="hidden" name="dt" value="'.$ADAT['dt'].'" />';
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalyId'].'" />';
+ echo '<input type="hidden" name="diakId" value="'.$ADAT['diakId'].'" />';
+ echo '<label for="T3targy">'._TARGY.'</label>'; _putDiakTargy($ADAT['diakTargy'],'T3targy'); echo '<br/>';
+ echo '<label for="T3tol">'._TOL_DT.'</label>'; _putTolIgDt($ADAT['dt'],null,array('tolDt'=>true),'T3tol');
+
+ echo '<br/><label>'._IKTATOSZAM.':</label>';
+ echo '<input type="text" name="iktatoszam" value="" />';
+
+ _putSubmit();
+ formEnd();
+ echo '</div>';
+
+ if (count($ADAT['diakZaradek'])>0) _putZaradek($ADAT['diakZaradek']);
+ if (count($ADAT['tankorDiakFelmentes'])>0) {
+
+ echo '<div class="FM FMTAN">';
+ formBegin();
+ echo '<h2>'._ROGZITETT_FELMENTESEK.'</h2>';
+
+ _putTankorDiakFelmentes($ADAT['tankorDiakFelmentes'],$ADAT['diakTankor']);
+
+ echo '<input type="hidden" name="action" value="tankorDiakFelmentesTorol" />';
+ echo '<input type="hidden" name="dt" value="'.$ADAT['dt'].'" />';
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalyId'].'" />';
+ echo '<input type="hidden" name="diakId" value="'.$ADAT['diakId'].'" />';
+
+ _putSubmit('A kijelölt felmentéseket '.$ADAT['dt'].'-i hatállyal (-1nap) lezárjuk (végdátumot erre módosítjuk), ezzel a felmentés megszűnik. A tranzakcióhoz módosító záradék is készül.' );
+
+ formEnd();
+ echo '</div>';
+ }
+
+
+ }
+
+ function putDiakFelmentesAdatok($ADAT) {
+ echo '<div class="FM FMTAN">';
+ echo '<h2>'._ROGZITETT_FELMENTESEK.'</h2>';
+ _putTankorDiakFelmentes($ADAT['tankorDiakFelmentes'],$ADAT['diakTankor'],true);
+ echo '</div>';
+ }
+
+ function _putDiakTargy($DIAKTARGY,$varId) {
+ if (count($DIAKTARGY)>0) {
+ echo '<select id="'.$varId.'" name="targyId">';
+ for($i=0; $i<count($DIAKTARGY); $i++) {
+ echo '<option value="'.$DIAKTARGY[$i]['targyId'].'">'.$DIAKTARGY[$i]['targyNev'].'</option>';
+ }
+ echo '</select>';
+ }
+ }
+ function _putDiakTankor($DATA,$varId) {
+ if (count($DATA)>0) {
+ echo '<select id="'.$varId.'" name="tankorId">';
+ for($i=0; $i<count($DATA); $i++) {
+ echo '<option value="'.$DATA[$i]['tankorId'].'">'.$DATA[$i]['tankorNev'].'</option>';
+ }
+ echo '</select>';
+ }
+ }
+
+ function _putTolIgDt($tolDt,$igDt=null,$ALLOW=array('tolDt','igDt'),$tolId) {
+
+ if ($ALLOW['tolDt']) echo '<input type="text" id="'.$tolId.'" name="tolDt" value="'.$tolDt.'" readonly="readonly" title="a dátum a referenciadátummal együtt mozog" />';
+ if ($ALLOW['igDt']) echo '<input type="text" name="igDt" />';
+
+ }
+
+
+ function _putSubmit($DESC = '') {
+ echo '<div class="submit">';
+ echo '<span>'.$DESC.'</span><br/>';
+ echo '<input type="submit" />';
+ echo '<input type="reset" />';
+ echo '</div>';
+ }
+
+
+ function _putHetNapjai() {
+ global $aHetNapjai;
+ if (count($aHetNapjai)>0) {
+ echo '<select name="nap">';
+ echo '<option value=""></option>';
+ for($i=0; $i<count($aHetNapjai); $i++) {
+ echo '<option value="'.($i+1).'">'.$aHetNapjai[$i].'</option>';
+ }
+ echo '</select>';
+ }
+ }
+ function _putOrak() {
+ echo '<select name="ora">';
+ echo '<option value=""></option>';
+ for($i=0; $i<20; $i++) {
+ echo '<option value="'.($i).'">'.$i.'</option>';
+ }
+ echo '</select>';
+ }
+
+ function _putZaradek($Z) {
+
+ echo '<div class="FM FMZAR">';
+ echo '<h2>'._ROGZITETT_ZARADEKOK.'</h2>';
+
+ echo '<table cellspacing="1">';
+ echo '<tr><th>Dátum</th><th>Sorszám</th><th>Záradék szövege</th><th>Dokumentumok</th><th>Id</th><th>'._IKTATOSZAM.'</th>'."\n";
+ for ($i=0; $i<count($Z); $i++) {
+ echo '<tr>';
+ echo '<td>'.$Z[$i]['dt'].'</td>';
+ echo '<td>'.$Z[$i]['sorszam'].'</td>';
+ echo '<td>'.$Z[$i]['szoveg'].'</td>';
+ echo '<td>'.$Z[$i]['dokumentum'].'</td>';
+ echo '<td>'.$Z[$i]['zaradekId'].'</td>';
+ echo '<td>'.$Z[$i]['iktatoszam'].'</td>';
+ echo '</tr>';
+ }
+ echo '</table>'."\n";
+ echo '</div>';
+ }
+
+ function _putTankorDiakFelmentes($F,$TANKOR, $readonly=false) {
+
+ global $aHetNapjai;
+
+ echo '<table cellspacing="1">';
+ echo '<tr><th></th><th>Tankör</th><th>Felmentés típus</th><th>'._IKTATOSZAM.'</th><th>Tól</th><th>Ig</th><th colspan="2"></th><th>Id</th>'."\n";
+ for ($i=0; $i<count($F); $i++) {
+ echo '<tr>';
+ echo '<td>';
+ if ($readonly===false) echo '<input type="checkbox" name="DELFM[]" value="'.$F[$i]['tankorDiakFelmentesId'].'" />';
+ echo '</td>';
+ for ($j=0; $j<count($TANKOR); $j++) if ($TANKOR[$j]['tankorId']==$F[$i]['tankorId']) break;
+ echo '<td>'.$TANKOR[$j]['tankorNev'].'</td>';
+ echo '<td>'.$F[$i]['felmentesTipus'].'</td>';
+ echo '<td>'.$F[$i]['iktatoszam'].'</td>';
+ echo '<td>'.$F[$i]['beDt'].'</td>';
+ echo '<td>'.$F[$i]['kiDt'].'</td>';
+ echo '<td>'.(is_numeric($F[$i]['nap']) ? $aHetNapjai[$F[$i]['nap']-1]:'').'</td>';
+ echo '<td>'.$F[$i]['ora'].'</td>';
+ echo '<td>'.$F[$i]['tankorDiakFelmentesId'].'</td>';
+
+ echo '</tr>';
+ }
+ echo '</table>'."\n";
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/kepesitesek.phtml b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/kepesitesek.phtml
new file mode 100644
index 00000000..9274c725
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/kepesitesek.phtml
@@ -0,0 +1,121 @@
+<?php
+
+ function putUjKepesites($ADAT) {
+
+ formBegin(array('class'=>'kepesites'));
+
+ echo '<input type="hidden" name="action" value="ujKepesites" />';
+
+ echo '<h2>Alapadatok</h2>';
+ echo '<label for="kepesitesNev">Képesítés megnevezése:</label>';
+ echo '<input type="text" name="kepesitesNev" id="kepesitesNev" value="" />';
+ echo '<br />';
+
+ echo '<label for="vegzettseg">Végzettség:</label>';
+ echo '<select name="vegzettseg" id="vegzettseg">';
+ foreach ($ADAT['vegzettsegek'] as $idx => $vegzettseg) {
+ echo '<option value="'.$vegzettseg.'">'.$vegzettseg.'</option>';
+ }
+ echo '</select>';
+
+ echo '<label for="fokozat">Fokozat:</label>';
+ echo '<select name="fokozat">';
+ foreach ($ADAT['fokozatok'] as $idx => $fokozat) {
+ echo '<option value="'.$fokozat.'">'.$fokozat.'</option>';
+ }
+ echo '</select>';
+
+ echo '<label for="specializacio">Specializáció</label>';
+ echo '<select name="specializacio">';
+ foreach ($ADAT['specializaciok'] as $idx => $specializacio) {
+ echo '<option value="'.$specializacio.'">'.$specializacio.'</option>';
+ }
+ echo '</select>';
+ echo '<input type="submit" value="Módosít" />';
+ echo '<br />';
+
+ formEnd();
+
+ }
+
+ function putKepesitesAdat($ADAT) {
+
+ formBegin(array('class'=>'kepesites','id'=>'kepesitesForm'));
+
+ echo '<input type="hidden" name="action" value="kepesitesModositas" />';
+ echo '<input type="hidden" name="kepesitesId" value="'.$ADAT['kepesitesId'].'" />';
+
+ echo '<h2>Alapadatok</h2>';
+ echo '<label for="kepesitesNev">Képesítés megnevezése:</label>';
+ echo '<input type="text" name="kepesitesNev" id="kepesitesNev" value="'.$ADAT['kepesitesAdat']['kepesitesNev'].'" />';
+ echo '<br />';
+
+ echo '<label>Képesités azonosítója:</label>'.$ADAT['kepesitesAdat']['kepesitesId'];
+ echo '<label for="vegzettseg">Végzettség:</label>';
+ echo '<select name="vegzettseg" id="vegzettseg">';
+ foreach ($ADAT['vegzettsegek'] as $idx => $vegzettseg) {
+ $SEL = ($vegzettseg==$ADAT['kepesitesAdat']['vegzettseg']?' selected="selected" ':'');
+ echo '<option value="'.$vegzettseg.'"'.$SEL.'>'.$vegzettseg.'</option>';
+ }
+ echo '</select>';
+
+ echo '<label for="fokozat">Fokozat:</label>';
+ echo '<select name="fokozat">';
+ foreach ($ADAT['fokozatok'] as $idx => $fokozat) {
+ $SEL = ($fokozat==$ADAT['kepesitesAdat']['fokozat']?' selected="selected" ':'');
+ echo '<option value="'.$fokozat.'"'.$SEL.'>'.$fokozat.'</option>';
+ }
+ echo '</select>';
+
+ echo '<label for="specializacio">Specializáció</label>';
+ echo '<select name="specializacio">';
+ foreach ($ADAT['specializaciok'] as $idx => $specializacio) {
+ $SEL = ($specializacio==$ADAT['kepesitesAdat']['specializacio']?' selected="selected" ':'');
+ echo '<option value="'.$specializacio.'"'.$SEL.'>'.$specializacio.'</option>';
+ }
+ echo '</select>';
+ echo '<input type="submit" value="Módosít" />';
+ echo '<br />';
+
+ echo '<h2>Hozzárendelt tárgyak:</h2>';
+ echo '<ul>';
+// foreach ($ADAT['kepesitesAdat']['targyak'] as $idx => $tAdat) {
+ foreach ($ADAT['kepesitesAdat']['targyak'] as $idx => $tAdat) {
+ echo '<li>';
+ echo $tAdat['targyNev'].' ('.$tAdat['targyId'].')';
+ echo ' '.$tAdat['targyJelleg'];
+ echo '<span id="delTargy-'.$tAdat['targyId'].'" data-kepesitesid="'.$ADAT['kepesitesId'].'" data-targyid="'.$tAdat['targyId'].'" class="icon-remove-circle delTargy"></span>';
+ echo '</li>';
+ }
+ echo '</ul>';
+ echo '<select name="targyId">';
+ echo '<option value=""> - </option>';
+ foreach ($ADAT['targyak'] as $idx => $tAdat) {
+ echo '<option value="'.$tAdat['targyId'].'">'.$tAdat['targyNev'].' ('.$tAdat['targyId'].')</option>';
+ }
+ echo '</select>';
+ echo '<input type="submit" value="Tárgy hozzárendelése" />';
+ echo '<br />';
+
+ echo '<h2>Hozzárendelt tanárok:</h2>';
+ echo '<ul>';
+ foreach ($ADAT['kepesitesAdat']['tanarok'] as $idx => $tAdat) {
+ echo '<li>'.$tAdat['tanarNev'].' ('.$tAdat['tanarId'].')<span id="delTanar-'.$tAdat['tanarId'].'" data-kepesitesid="'.$ADAT['kepesitesId'].'" data-tanarid="'.$tAdat['tanarId'].'" class="icon-remove-circle delTanar"></span></li>';
+ }
+ echo '</ul>';
+ echo '<select name="tanarId">';
+ echo '<option value=""> - </option>';
+ foreach ($ADAT['tanarok'] as $idx => $tAdat) {
+ echo '<option value="'.$tAdat['tanarId'].'">'.$tAdat['tanarNev'].' ('.$tAdat['tanarId'].')</option>';
+ }
+ echo '</select>';
+ echo '<input type="submit" value="Tanár hozzárendelése" />';
+ echo '<br />';
+
+
+//dump($ADAT['kepesitesAdat']);
+ formEnd();
+
+ }
+
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/kepzes.phtml b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/kepzes.phtml
new file mode 100644
index 00000000..d3a79358
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/kepzes.phtml
@@ -0,0 +1,143 @@
+<?php
+
+ function ujKepzesForm($ADAT) {
+
+ formBegin(array('class'=>'kepzes'));
+ echo '<input type="hidden" name="action" value="ujKepzes" />'."\n";
+
+ echo '<h1>'._UJ_KEPZES.'</h1>'."\n";
+
+ echo '<label for="kepzesNev">'._KEPZES_NEVE.'</label>'."\n";
+ echo '<input id="kepzesNev" type="text" name="kepzesNev" value="" />'."\n";
+
+ echo '<label for="tolTanev">'._BEVEZETES_EVE.'</label>'."\n";
+ echo '<select id="tolTanev" name="tolTanev">'."\n";
+ $aktTanev = date('Y'); $SEL = array($aktTanev => ' selected="selected" ');
+ for ($tanev = $aktTanev-10; $tanev < $aktTanev+11; $tanev++) {
+ echo '<option value="'.$tanev.'"'.$SEL[$tanev].'>'.$tanev.'</option>'."\n";
+ }
+ echo '</select>'."\n";
+ echo '<br />';
+ echo '<label for="osztalyJellegId">'._OSZTALY_JELLEG.'</label>'."\n";
+ echo '<select id="osztalyJellegId" name="osztalyJellegId">'."\n";
+ $SEL = array($ADAT['kepzesAdat']['osztalyJellegId'] => ' selected="selected" ');
+ echo '<option>'.$ADAT['osztalyJellegId'].'</option>';
+ foreach($ADAT['osztalyJelleg'] as $_k => $_v) {
+ if ($_v['osztalyJellegEles']==1) echo '<option value="'.$_v['osztalyJellegId'].'"'.$SEL[$_v['osztalyJellegId']].'>'.$_v['osztalyJellegNev'].' {'.$_v['osztalyJellegId'].'}</option>'."\n";
+ }
+ echo '</select>'."\n";
+
+ echo '<p><input type="submit" value="'._OK.'" /></p>'."\n";
+
+ formEnd();
+
+ }
+
+ function kepzesElesForm($ADAT) {
+
+ if (($kepzesEles = $ADAT['kepzesAdat']['kepzesEles'])==1) {
+ $_class="kepzes hibernalt";
+ $_TXT = _KEPZES_HIBERNAL;
+ $_GOMB_TXT = _HIBERNAL;
+ } else {
+ $_class="kepzes eles";
+ $_TXT = _KEPZES_ELESIT;
+ $_GOMB_TXT = _ELESIT;
+ }
+
+ formBegin(array('class'=>$_class));
+ echo '<input type="hidden" name="action" value="kepzesEles" />'."\n";
+ echo '<input type="hidden" name="kepzesId" value="'.$ADAT['kepzesAdat']['kepzesId'].'" />'."\n";
+ echo '<input type="hidden" name="kepzesEles" value="'.$ADAT['kepzesAdat']['kepzesEles'].'" />'."\n";
+ echo '<h1>'.$_TXT.'</h1>'."\n";
+ echo '<p><input type="submit" value="'.$_GOMB_TXT.'" /></p>'."\n";
+ formEnd();
+
+ }
+
+ function putKepzesForm($ADAT) {
+
+ if (($kepzesEles = $ADAT['kepzesAdat']['kepzesEles'])==1) {
+ $_class="kepzes eles";
+ } else {
+ $_class="kepzes hibernalt";
+ }
+
+ formBegin(array('class'=>$_class));
+ echo '<input type="hidden" name="action" value="kepzesModositas" />'."\n";
+ echo '<input type="hidden" name="kepzesId" value="'.$ADAT['kepzesAdat']['kepzesId'].'" />'."\n";
+
+ echo '<h1>'._KEPZES_ADATAI.'</h1>'."\n";
+
+ echo '<label for="kepzesNev">'._KEPZES_NEVE.'</label>'."\n";
+ echo '<input id="kepzesNev" type="text" name="kepzesNev" value="'.$ADAT['kepzesAdat']['kepzesNev'].'" />'."\n";
+
+ echo '<label for="tolTanev">'._BEVEZETES_EVE.'</label>'."\n";
+ echo '<select id="tolTanev" name="tolTanev">'."\n";
+ $aktTanev = date('Y'); $SEL = array($ADAT['kepzesAdat']['tanev'] => ' selected="selected" ');
+ for ($tanev = $aktTanev-10; $tanev < $aktTanev+11; $tanev++) {
+ echo '<option value="'.$tanev.'"'.$SEL[$tanev].'>'.$tanev.'</option>'."\n";
+ }
+ echo '</select>'."\n";
+ echo '<br />';
+
+ echo '<label for="osztalyJellegId">'._OSZTALY_JELLEG.'</label>'."\n";
+ echo '<select id="osztalyJellegId" name="osztalyJellegId">'."\n";
+ $SEL = array($ADAT['kepzesAdat']['osztalyJellegId'] => ' selected="selected" ');
+ echo '<option>'.$ADAT['osztalyJellegId'].'</option>';
+ foreach($ADAT['osztalyJelleg'] as $_k => $_v) {
+ if ($_v['osztalyJellegEles']==1) echo '<option value="'.$_v['osztalyJellegId'].'"'.$SEL[$_v['osztalyJellegId']].'>'.$_v['osztalyJellegNev'].' {'.$_v['osztalyJellegId'].'}</option>'."\n";
+ }
+ echo '</select>'."\n";
+ echo '<br />';
+
+ echo '<div>';
+ echo '<span class="minih">'._MAR_RESZTVEVO_OSZTALYOK.'</span>';
+ echo '<select class="osztalySel" name="delOsztalyId[]" multiple="multiple">';
+ for ($i=0; $i<count($ADAT['kepzesAdat']['osztalyIds']); $i++) {
+ $OA = $ADAT['osztalyok'][ $ADAT['kepzesAdat']['osztalyIds'][$i] ];
+ echo '<option value="'.$OA['osztalyId'].'">';
+ echo $OA['osztalyJel'].' ';
+ echo $OA['leiras'];
+ echo ' {'.$OA['osztalyJellegId'].'}';
+ echo '</option>';
+ }
+ echo '</select>'."\n";
+ echo '</div>';
+
+ echo '<div><span class="icon-retweet"></span></div>';
+
+ echo '<div>';
+ echo '<span class="minih">'._OSZTALYOK.'</span>';
+ echo '<select class="osztalySel" name="osztalyId[]" multiple="multiple">'."\n";
+ echo '<optgroup label="társítható osztályok">';
+ foreach ($ADAT['osztalyok'] as $osztalyId => $oAdat) {
+ if (!in_array($osztalyId, $ADAT['kepzesAdat']['osztalyIds'])) {
+ if ($ADAT['kepzesAdat']['osztalyJellegId']==$oAdat['osztalyJellegId']) {
+ echo '<option value="'.$osztalyId.'">';
+ echo $oAdat['osztalyJel'].' '.$oAdat['leiras'].' {'.$oAdat['osztalyJellegId'].'}';
+ echo '</option>'."\n";
+ }
+ }
+ }
+ echo '</optgroup>';
+ echo '<optgroup label="további osztályok">';
+ foreach ($ADAT['osztalyok'] as $osztalyId => $oAdat) {
+ if ($ADAT['kepzesAdat']['osztalyJellegId']!=$oAdat['osztalyJellegId']) {
+ echo '<option disabled="disabled" value="'.$osztalyId.'">';
+ echo $oAdat['osztalyJel'].' '.$oAdat['leiras'].' {'.$oAdat['osztalyJellegId'].'}';
+ echo '</option>'."\n";
+ }
+ }
+ echo '</optgroup>';
+ echo '</select>'."\n";
+ echo '</div>';
+
+
+ echo '<p><input type="submit" value="'._OK.'" /></p>'."\n";
+
+ formEnd();
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/kepzesOraterv.phtml b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/kepzesOraterv.phtml
new file mode 100644
index 00000000..fb10c6c4
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/kepzesOraterv.phtml
@@ -0,0 +1,271 @@
+<?php
+
+ function _format($szam) {
+ return (substr($szam,strpos($szam,'.'),3)=='.00') ? intval($szam):$szam;
+ }
+
+ function putKepzesInfo($ADAT) {
+
+ dump($ADAT['kepzesAdat']);
+
+ echo $ADAT['kepzesAdat']['kepzesNev'];
+ //echo $ADAT['kepzesAdat']['tanev']; // indulo
+ if (count($ADAT['kepzesAdat']['osztalyIds'])>0) {
+
+ echo '<ul>';
+ for ($i=0; $i<count($ADAT['kepzesAdat']['osztalyIds']); $i++) {
+ $_osztalyId = $ADAT['kepzesAdat']['osztalyIds'][$i];
+ echo '<li>';
+ echo $ADAT['osztalyok'][$_osztalyId]['osztalyJel'];
+ echo $ADAT['osztalyok'][$_osztalyId]['leiras'];
+ echo $ADAT['osztalyok'][$_osztalyId]['kezdoTanev'].'-';
+ echo $ADAT['osztalyok'][$_osztalyId]['vegzoTanev'];
+ echo $ADAT['osztalyok'][$_osztalyId]['kezdoEvfolyamSorszam'];
+ echo '['.$_osztalyId.']';
+ echo '</li>';
+ }
+ echo '</ul>';
+ }
+ }
+
+ function putOratervMasolas($ADAT) {
+
+ formBegin(array('id'=>'oratervMasolas'));
+
+ echo '<h1>Képzés óratervének átvétele</h1>';
+ echo '<input type="hidden" name="action" value="oratervMasolas" />';
+ echo '<input type="hidden" name="kepzesId" value="'.$ADAT['kepzesId'].'" />';
+
+ echo '<select name="masolandoKepzesId">';
+ foreach ($ADAT['hasonloKepzesek'] as $idx => $kAdat) if ($kAdat['kepzesId'] != $ADAT['kepzesId']) {
+
+ echo '<option value="'.$kAdat['kepzesId'].'">'.$kAdat['kepzesNev'].' ('.$kAdat['tanev'].') ['.$kAdat['kepzesId'].']</option>';
+
+ }
+ echo '</select>';
+ echo '<input title="Biztosan átveszi a kiválasztott képzés óratervét?" class="confirm" type="submit" value="óraterv átvétele..." />';
+ formEnd();
+
+ }
+
+ function putKepzesOraterv($ADAT) {
+
+ $kepzesId = $ADAT['kepzesId'];
+
+ $EVFOLYAMJELEK = $ADAT['kepzesAdat']['osztalyEvfolyamJelek'];
+ if (!is_array($EVFOLYAMJELEK)) {
+ return true;
+ }
+
+
+ /* KÉPZÉS ÓRASZÁMOK POST
+ ---------------- ----
+ *kepzesId
+ *evfolyamJel
+ kotelezoOraszam KO_[kepzesId]_[evfolyamJel]
+ maximalisOraszam MO_[kepzesId]_[evfolyamJel]
+ */
+ formBegin(array('name'=>'kepzesOraterv','class'=>'kepzesOraterv'));
+ echo '<input type="hidden" name="kepzesId" value="'.$kepzesId.'" />';
+ echo '<input type="hidden" name="action" value="do" />';
+ echo '<table align="center" cellspacing="1">';
+
+ echo '<thead>';
+ //FEJLÉC
+ echo '<tr class="evfolyamJel"><th>'._EVFOLYAMJEL.'</th>';
+ foreach($EVFOLYAMJELEK as $i => $_evfolyamJel) {
+ echo '<th>'.$_evfolyamJel.'.</th>';
+ }
+ echo '<th rowspan="2">';
+ echo '<span id="felevValtas"><span class="felev1" title="váltás a 2. félévre...">1.&nbsp;félév</span><span class="felev2" title="váltás az 1. félévre...">2.&nbsp;félév</span> <span class="icon-refresh"></span></span><br /><br />';
+ echo '<span id="oraszamKovetelmeny"><span class="oraszam" title="váltás a követelményekre...">óraszám</span><span class="kovetelmeny" title="váltás az óraszámokra">követelmény</span> <span class="icon-refresh"></span></span>';
+ echo '</th>';
+ echo '</tr>';
+ // ÉVFOLYAMONKÉNTI ÓRASZÁMOK
+ echo '<tr><th>'._KOTELEZO_ORASZAM.'-'._MAXIMALIS_ORASZAM.'</th>';
+ foreach($EVFOLYAMJELEK as $i => $_evfolyamJel) {
+ echo '<td>';
+ echo '<input type="text" size="3" maxlength="5" name="KO_'.$_evfolyamJel.'" title="'._KOTELEZO_ORASZAM.'" value="'.$ADAT['oraszam'][$_evfolyamJel]['kotelezoOraszam'].'" />'; // KO = kötelező óraszám
+ echo '-<input type="text" size="3" maxlength="5" name="MO_'.$_evfolyamJel.'" title="'._MAXIMALIS_ORASZAM.'" value="'.$ADAT['oraszam'][$_evfolyamJel]['maximalisOraszam'].'" />'; // MO = maximális óraszám
+ echo '</td>';
+ }
+ echo '</tr>';
+
+ echo '</thead>'."\n";
+
+ echo '<tfoot>';
+ //LÁBLEC
+ echo '<tr><th class="evfolyamJel">'._EVFOLYAMJEL.'</th>';
+ foreach($EVFOLYAMJELEK as $i => $_evfolyamJel) {
+ echo '<th>'.$_evfolyamJel.'.</th>';
+ }
+ echo '<th>&nbsp;</th>';
+ echo '</tr>';
+ echo '<tr><td>Még hiányzó / Max választható</th>';
+ foreach($EVFOLYAMJELEK as $i => $_evfolyamJel) {
+ $min = $ADAT['oraszam'][$_evfolyamJel]['kotelezoOraszam']; //--TODO $i->$evfolyamJel
+ $max = $ADAT['oraszam'][$_evfolyamJel]['maximalisOraszam'];
+ $sum=0;
+ reset($ADAT['oraterv']);
+ if (is_array($ADAT['oraterv'])) foreach($ADAT['oraterv'] as $tipus=>$DT) foreach($DT as $targyId => $D) {
+ $sum+=($D[$_evfolyamJel][1][0]['hetiOraszam']+$D[$_evfolyamJel][2][0]['hetiOraszam']) / 2;
+ }
+ $_class = ($min<=$sum && $sum<=$max) ? 'class="ok"':$_class = ($max-$sum<0) ? 'class="alert"' : '';;
+ echo '<td '.$_class.'>';
+ echo ($min-$sum) . "&laquo;". ($max - $sum);
+ echo '</td>';
+ }
+ echo '<th>&nbsp;</th>';
+ echo '</tr>';
+ // EGY UJ:
+ echo '<tr class="ures">';
+ echo '<th>';
+ _put_targy_select($ADAT['targyak'],$ADAT['kepzesOraterv.tipus'],'UJ_targyTipusId','targyId','targyNev',null);
+ //_put_targy_select($ADAT['targyak'],$ADAT['kepzesOraterv.tipus'],'UJ_targyId','targyId','targyNev',$targyId);
+ echo '</th>';
+ foreach($EVFOLYAMJELEK as $i => $_evfolyamJel) {
+ echo '<td>';
+ //$i;
+ echo '<div>';
+ echo '<input type="text" size="3" maxlength="4" name="UJ_O_'.$_evfolyamJel.'_1" />';
+ _put_simple_select($ADAT['kepzesOraterv.kovetelmeny'],'UJ_K_'.$_evfolyamJel.'_1',null);
+ echo '<br/>';
+ echo '<input type="text" size="3" maxlength="4" name="UJ_O_'.$_evfolyamJel.'_2" />';
+ _put_simple_select($ADAT['kepzesOraterv.kovetelmeny'],'UJ_K_'.$_evfolyamJel.'_2',null);
+ echo '<br/>';
+ echo '</div>';
+ echo '</td>';
+ }
+ echo '<th>';
+ echo '<input type="submit" />';
+ echo '</th>';
+ echo '</tr>';
+ // -- idáig EGY UJ
+ echo '</tfoot>'."\n";
+
+
+ // KÉPZÉS ÓRATERV
+ /* --------------
+ *kepzesOratervId
+ kepzesId
+ targyId
+ evfolyamJel
+ szemeszter
+ hetiOraszam
+ kovetelmeny enum('jegy','négyszintű (szöveges minősítés)','százalékos','aláírás','háromszintű','egyedi felsorolás','szöveges szempontrendszer','nincs') DEFAULT null
+ tipus enum('első nyelv','második nyelv','kötelezően választható','szabadon választható','mintatantervi')
+ */
+ flush();
+ echo '<tbody>';
+
+ $ADAT['targyak'][] = array('targyId'=>''); // a tárgy-típusok esetén nincs targyId - ezt is vegyük ide bele
+ if (is_array($ADAT['oraterv']))
+ foreach($ADAT['oraterv'] as $tipus => $X)
+// foreach($X as $targyId => $DI) {
+ foreach($ADAT['targyak'] as $idx => $tAdat) // a névsor miatt a $ADAT['targyak']-on megyünk végig
+ if (is_array($X[$tAdat['targyId']])) { // megnézzük, hogy az adott targyTipusban szerepel-e
+ $targyId = $tAdat['targyId']; // kiolvassuk a targyId-t (hogy a korábbi kódot ne kelljen átírni)
+// $D = $DI;
+ $D = $X[$targyId]; // beállítjuk $D-t
+
+ // TOMEG:
+ $targyIdEsc = _escape($tipus).'_'.$targyId;
+ $_class = ($tipus!='mintatantervi') ? 'class="nm"' : '';
+ echo '<tr class="rogzitett">';
+ echo '<th '.$_class.'>';
+ echo '<span title="'.$tAdat['targyJelleg'].' '.$tAdat['evkoziKovetelmeny'].' '.$tAdat['zaroKovetelmeny'].'">';
+ echo $tAdat['targyNev'];
+ echo ' ('._unescape($targyIdEsc).')';
+ echo '</span>';
+ echo '</th>';
+ foreach($EVFOLYAMJELEK as $i => $_evfolyamJel) {
+ $up1 = ($D[$_evfolyamJel][1][0]['kovetelmeny']!='');
+ $up2 = ($D[$_evfolyamJel][2][0]['kovetelmeny']!='');
+ $_class = ($D[$_evfolyamJel][1][0]['hetiOraszam']+$D[$_evfolyamJel][2][0]['hetiOraszam'] > 0) ? ' class="nn" ' : '';
+ echo '<td'.$_class.'>';
+ echo '<div class="felev1">';/* első félévi */
+ echo '<input class="oraszam" type="text" size="3" maxlength="4" name="T_'.$targyIdEsc.'_O_'.$_evfolyamJel.'_1" value="'._format($D[$_evfolyamJel][1][0]['hetiOraszam']).'" />';
+ echo '<span class="oraszam">'._format($D[$_evfolyamJel][1][0]['hetiOraszam']).'</span>';
+
+ _put_simple_select($ADAT['kepzesOraterv.kovetelmeny'],'T_'.$targyIdEsc.'_K_'.$_evfolyamJel.'_1',$D[$_evfolyamJel][1][0]['kovetelmeny']);
+ echo '<span class="kovetelmeny">'.$D[$_evfolyamJel][1][0]['kovetelmeny'].'</span>';
+ echo '</div>';
+
+ echo '<div class="felev2">';/* második félévi */
+ echo '<input type="text" size="3" maxlength="4" name="T_'.$targyIdEsc.'_O_'.$_evfolyamJel.'_2" value="'._format($D[$_evfolyamJel][2][0]['hetiOraszam']).'" />';
+ echo '<span class="oraszam">'._format($D[$_evfolyamJel][2][0]['hetiOraszam']).'</span>';
+
+ _put_simple_select($ADAT['kepzesOraterv.kovetelmeny'],'T_'.$targyIdEsc.'_K_'.$_evfolyamJel.'_2',$D[$_evfolyamJel][2][0]['kovetelmeny']);
+ echo '<span class="kovetelmeny">'.$D[$_evfolyamJel][2][0]['kovetelmeny'].'</span>';
+ echo '<br/>'; // placeholder
+ echo '</div>';
+/*
+ echo '<span>';
+ echo _format($D[$_evfolyamJel][1][0]['hetiOraszam'])." ";
+ echo $D[$_evfolyamJel][1][0]['kovetelmeny'];
+ echo '<br/>';
+ echo _format($D[$_evfolyamJel][2][0]['hetiOraszam']).' ';
+ echo $D[$_evfolyamJel][2][0]['kovetelmeny'];
+ echo '</span>';
+*/
+ echo '</td>';
+ }
+ echo '<th>';
+ echo '<input type="submit" value="'._OK.'" class="felvesz" />';
+ echo '<input type="submit" name="torol_'._escape($tipus).'_'.$targyId.'" value="X" class="torol" />';
+
+ echo '</th>';
+ echo '</tr>'."\n";
+ // -- idáig TOMEG
+ flush();
+ }
+ echo '</tbody>';
+ echo '</table>'."\n";
+ formEnd();
+
+ }
+
+ function _put_simple_select($VALUES,$name,$selected) {
+
+ echo '<select name="'.$name.'">';
+ echo '<option value=""></option>';
+ for($i=0; $i<count($VALUES); $i++) {
+ $_SEL = ($selected==$VALUES[$i]) ? 'selected="selected"':'';
+ echo '<option value="'.$VALUES[$i].'" '.$_SEL.'>';
+ echo $VALUES[$i];
+ echo '</option>'."\n";
+ }
+ echo '</select>'."\n";
+ }
+
+ function _put_targy_select($VALUES1,$VALUES2,$name,$keyname,$valuename,$selected) { // immáron speciális, feleslegessé vált a key, value
+
+// global $FOGLALT;
+// if (in_array( $key, $FOGLALT )) echo $key;
+
+ echo '<select id="targySel" name="'.$name.'">';
+ echo '<option value="0">'._VALASSZ.'</option>';
+ echo '<optgroup label="'._TARGYAK.'">';
+ for($i=0; $i<count($VALUES1); $i++) {
+ $key= $VALUES1[$i][$keyname];
+ $value= $VALUES1[$i][$valuename];
+ $_SEL = ($selected==$key) ? 'selected="selected" ':'';
+ echo '<option value="'._escape('mintatantervi').'_'.$key.'" '.$_SEL.' data-kovetelmeny="'.$VALUES1[$i]['zaroKovetelmeny'].'" >';
+ echo $value;
+ if ($VALUES1[$i]['targyJelleg']!='') echo ' ('.$VALUES1[$i]['targyJelleg'].')';
+ echo '</option>';
+ }
+ echo '</optgroup>';
+ echo '<optgroup label="'._EGYEB.'">';
+ for($i=0; $i<count($VALUES2); $i++) {
+ $key=$value=$VALUES2[$i];
+ $_SEL = ($selected==$key) ? 'selected="selected" ':'';
+ echo '<option value="'._escape($key).'_" '.$_SEL.'>';
+ echo $value;
+ echo '</option>';
+ }
+ echo '</optgroup>';
+ echo '</select>';
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/munkakozosseg.phtml b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/munkakozosseg.phtml
new file mode 100644
index 00000000..b35f799e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/munkakozosseg.phtml
@@ -0,0 +1,316 @@
+<?php
+
+/*
+* Munkaközösség
+*/
+
+ function putUjMunkakozossegForm($TANAROK) {
+ formBegin(array('id'=>'ujMkForm','class'=>'uj mk'));
+ echo '<div>';
+ echo '<h2>Új munkaközösség felvétele</h2>';
+
+ echo '<input type="hidden" name="action" value="ujMunkakozosseg" />'."\n";
+ echo '<label for="leiras">'. _MUNKAKOZOSSEGNEV . ': </label>';
+ echo '<input type="text" id="leiras" name="leiras" value="" />'."\n";
+
+ echo '<label for="mkVezId">'. _MUNKAKOZOSSEGVEZETO . ': </label>';
+ echo '<select id="mkVezId" name="mkVezId">';
+ echo '<option value=""></option>';
+ for($i=0; $i<count($TANAROK); $i++) {
+ echo '<option value="'.$TANAROK[$i]['tanarId'].'">'.$TANAROK[$i]['tanarNev'].'</option>';
+ }
+ echo '</select>'."\n";
+ echo '<input type="submit" value="'._OK.'" />';
+ echo '</div>';
+ formEnd();
+ }
+
+ function putMunkakozossegForm($MKADAT,$TANAROK,$TANAROK_INMK) {
+
+ formBegin(array('id'=>'MkForm', 'class'=>'mk'));
+
+ echo '<h2>Munkaközösség</h2>';
+
+ echo '<input type="hidden" name="action" value="modMunkakozosseg" />'."\n";
+ echo '<input type="hidden" name="mkId" value="'.$MKADAT['mkId'].'" />'."\n";
+ echo '<label for="leiras">'. _MUNKAKOZOSSEGNEV . ': </label>';
+ echo '<input type="text" id="leiras" name="leiras" value="'.$MKADAT['leiras'].'" />'."\n";
+
+ echo '<label for="mkVezId">'. _MUNKAKOZOSSEGVEZETO . ': </label>';
+ echo '<select id="mkVezId" name="mkVezId">';
+ echo '<option value=""></option>';
+ for($i=0; $i<count($TANAROK); $i++) {
+ $_SEL = ($MKADAT['mkVezId']==$TANAROK[$i]['tanarId']) ? ' selected="selected"' : '';
+ echo '<option value="'.$TANAROK[$i]['tanarId'].'" '.$_SEL.'>'.$TANAROK[$i]['tanarNev'].'</option>'."\n";
+ }
+ echo '</select>'."\n";
+
+ echo '<br/>';
+
+ echo '<div class="tagok">';
+ echo '<div class="header"><label for="mkTagok">'. _MUNKAKOZOSSEGTAGOK . ': </label></div>';
+ echo '<select id="mkTagok" name="mkTagok[]" multiple="multiple" size="10">';
+ for($i=0; $i<count($TANAROK_INMK); $i++) {
+ echo '<option value="'.$TANAROK_INMK[$i]['tanarId'].'" '.$_SEL.'>'.$TANAROK_INMK[$i]['tanarNev'].'</option>'."\n";
+ }
+ echo '</select>'."\n";
+ echo '</div>';
+
+ echo '<div class="submit"><button type="submit"><span class="icon-arrow-left"></span></button></div>';
+
+ echo '<div class="tagok">';
+ echo '<div class="header"><label for="mkUjTagok">'. _UJTAGOK . ': </label></div>';
+ echo '<select id="mkUjTagok" name="mkUjTagok[]" multiple="multiple" size="10">';
+ for($i=0; $i<count($TANAROK); $i++) {
+ echo '<option value="'.$TANAROK[$i]['tanarId'].'" '.$_SEL.'>'.$TANAROK[$i]['tanarNev'].'</option>'."\n";
+ }
+ echo '</select>'."\n";
+ echo '</div>';
+
+ echo '<input type="submit" value="'._OK.'" />';
+ echo '<div style="text-align:center; width:100%;">';
+ for($i=0; $i<count($TANAROK_INMK); $i++) {
+ //echo '<img value="'.$TANAROK_INMK[$i]['tanarId'].'" '.$_SEL.'>'.$TANAROK_INMK[$i]['tanarNev'].'</option>'."\n";
+ putFace($TANAROK_INMK[$i]['tanarId'],'tanar',32);
+ }
+ echo '</div>';
+
+ formEnd();
+
+ }
+
+
+
+
+
+
+
+
+
+ function putMunkakozossegTorolForm($mkId) {
+
+ formBegin(array('id'=>'mkTorolForm', 'class'=>'mk torol'));
+ echo '<h2>A munkaközösség törlése</h2>';
+
+ echo '<input type="hidden" name="action" value="munkakozossegTorol" />'."\n";
+ echo '<input type="hidden" name="mkId" value="'.$mkId.'" />'."\n";
+
+ echo '<label for "mktorolg">'._VEGLEGES_TORLES.': </label>';
+ echo '<input type="submit" id="mktorolg" class="confirm" title="Biztos töröljük a munkaközösséget és tárgyait?" value="'._DELETE.'" />';
+
+ formEnd();
+ }
+
+
+
+
+
+
+ function putUjTargyForm($mkId, $ADAT) {
+ formBegin(array('id'=>"ujTargyForm", 'class'=>"uj mk"));
+
+ echo '<h2>Új tárgy felvétele a munkaközösséghez</h2>';
+
+ echo '<input type="hidden" name="action" value="ujTargy" />'."\n";
+ echo '<input type="hidden" name="mkId" value="'.$mkId.'" />'."\n";
+ echo '<label for="targyleiras">'._TARGYNEV . ': </label>';
+ echo '<input type="text" id="targyleiras" name="targyleiras" value="" />'."\n";
+
+ _putTargyJellegSelect($ADAT); // not selected
+
+ echo '<input type="submit" value="'._OK.'" />';
+
+ formEnd();
+ }
+
+ function putTargyValtoztatForm($ADAT) {
+
+ formBegin(array('id'=>'targyValtoztatForm', 'class'=>'mk'));
+
+ echo '<h2>Tárgy változtatása: <span>'.$ADAT['targyAdat']['targyNev'].'</span></h2>';
+
+ echo '<input type="hidden" name="action" value="targyValtoztat" />'."\n";
+ echo '<input type="hidden" name="mkId" value="'.$ADAT['targyAdat']['mkId'].'" />'."\n";
+ echo '<input type="hidden" name="targyId" value="'.$ADAT['targyAdat']['targyId'].'" />'."\n";
+ //echo '<label for="targyleiras">'._TARGYNEV . ': </label>';
+ echo '<ul><li>';
+ echo _TARGY_JELLEG.': ';
+ _putTargyJellegSelect($ADAT); // not selected
+ echo '</li><li>';
+ echo _EVKOZI_KOVETELMENY.': ';
+ _putTargyKovetelmenySelect($ADAT,'evkozi');
+ echo '</li><li>';
+ echo _ZARO_KOVETELMENY.': ';
+ _putTargyKovetelmenySelect($ADAT,'zaro');
+ echo '</li><li>';
+ echo _TARGY_ROVID_NEVE.': <input type="text" maxlength="64" size="64" name="targyRovidNev" value="'.$ADAT['targyAdat']['targyRovidNev'].'" />'."\n";
+ echo '</li><li>';
+ echo _KIRTARGY.': ';
+ putKirTargySelect($ADAT['kirTargyak'],$ADAT['targyAdat']['kirTargyId']);
+ echo '</li></ul>';
+ echo '<input type="submit" value="'._OK.'" />';
+ formEnd();
+ }
+
+ function _putTargyJellegSelect($ADAT) {
+ echo '<select name="targyJelleg">';
+ echo '<option value=""></option>';
+ for($i=0; $i<count($ADAT['targyJellegENUM']); $i++) {
+ $_SEL = ($ADAT['targyAdat']['targyJelleg']==$ADAT['targyJellegENUM'][$i]) ? ' selected="selected" ' : '';
+ echo '<option value="'.$ADAT['targyJellegENUM'][$i].'" '.$_SEL.'>'.$ADAT['targyJellegENUM'][$i].'</option>';
+ }
+ echo '</select>';
+ }
+ function _putTargyKovetelmenySelect($ADAT,$melyik) {
+ $kov = $melyik.'Kovetelmeny';
+ echo '<select name="'.$kov.'">';
+ echo '<option value=""></option>';
+ for($i=0; $i<count($ADAT['targy.'.$kov]); $i++) {
+ $_SEL = ($ADAT['targyAdat'][$kov]==$ADAT['targy.'.$kov][$i]) ? ' selected="selected" ' : '';
+ echo '<option value="'.$ADAT['targy.'.$kov][$i].'" '.$_SEL.'>'.$ADAT['targy.'.$kov][$i].'</option>';
+ }
+ echo '</select>';
+ }
+
+ function putTargyTorolForm($targyId,$mkId) {
+ formBegin(array('id'=>"targyTorolForm", 'class'=>"mk torol"));
+
+ echo '<h2>A kijelölt tárgy törlése</h2>';
+
+ echo '<input type="hidden" name="action" value="targyTorol" />'."\n";
+ echo '<input type="hidden" name="mkId" value="'.$mkId.'" />'."\n";
+ echo '<input type="hidden" name="targyId" value="'.$targyId.'" />'."\n";
+
+ echo '<label for="targytorolg">'._VEGLEGES_TORLES.': </label>';
+ echo '<input type="submit" id="targytorolg" value="'._DELETE.'" />';
+
+ formEnd();
+ }
+
+
+ function putKirTargySelect($ADAT,$kirTargyId) {
+
+ echo '<select name="kirTargyId" id="kirTargyId">';
+ echo '<option value=""></option>';
+ for ($i=0; $i<count($ADAT); $i++) {
+ $_SEL = ($ADAT[$i]['kirTargyId'] == $kirTargyId) ? ' selected="selected" ' : '';
+ echo '<option value="'.$ADAT[$i]['kirTargyId'].'" '.$_SEL.'>'.$ADAT[$i]['kirTargyNev'].'</option>'."\n";
+ }
+ echo '</select>'."\n";
+ echo _KIRTARGY_MEGJ;
+ }
+
+ function putTargyAtnevezes($ADAT) {
+
+ formBegin(array('id'=>'targyAtnevezes','class'=>'mk'));
+
+ echo '<h2>'._TARGY_ATNEVEZES.'</h2>';
+
+ echo '<div class="leiras">'._ATNEVEZES_HELP.'</div>';
+
+ echo '<input type="hidden" name="action" value="targyAtnevezes" />'."\n";
+ echo '<input type="hidden" name="mkId" value="'.$ADAT['mkId'].'" />'."\n";
+ echo '<input type="hidden" name="targyId" value="'.$ADAT['targyId'].'" />'."\n";
+
+ echo '<label for="ujTargyNev">'._UJ_TARGY_NEV.'</label>';
+ echo '<input type="text" id="ujTargyNev" name="ujTargyNev" value="" />'."\n";
+
+ echo '<input type="submit" id="targyBeolvaszt" value="'._OK.'" />';
+
+ formEnd();
+ }
+
+ function putTargyMkValtas($ADAT) {
+
+ formBegin(array('id'=>'targyMkValtas','class'=>'mk'));
+
+ echo '<h2>'._TARGY_MK_VALTAS.'</h2>';
+
+ echo '<div class="leiras">'._MK_VALTAS_HELP.'</div>';
+
+ echo '<input type="hidden" name="action" value="targyMkValtas" />'."\n";
+ echo '<input type="hidden" name="mkId" value="'.$ADAT['mkId'].'" />'."\n";
+ echo '<input type="hidden" name="targyId" value="'.$ADAT['targyId'].'" />'."\n";
+
+ echo '<label for="befogadoMkId">'._BEFOGADO_MK.'</label>';
+ echo '<select id="befogadoMkId" name="befogadoMkId">';
+ echo '<option value=""> - </option>';
+ foreach ($ADAT['munkakozossegek'] as $mAdat) {
+ if ($ADAT['mkId'] != $mAdat['mkId']) echo '<option value="'.$mAdat['mkId'].'">'.$mAdat['mkNev'].' ('.$mAdat['mkId'].')'.'</option>';
+ }
+ echo '</select>';
+ echo '<input type="submit" id="targyBeolvaszt" value="'._OK.'" />';
+
+ formEnd();
+ }
+
+ function putTargyBeolvasztasForm($ADAT) {
+
+ global $TANKOR_TIPUS;
+
+ formBegin(array('id'=>'targyBeolvasztas','class'=>'mk'));
+
+ echo '<h2>'._TARGY_BEOLVASZTASA.'</h2>';
+
+ echo '<div class="leiras">'._BEOLVASZTAS_HELP.'</div>';
+
+ echo '<input type="hidden" name="action" value="targyBeolvasztas" />'."\n";
+ echo '<input type="hidden" name="mkId" value="'.$ADAT['mkId'].'" />'."\n";
+ echo '<input type="hidden" name="targyId" value="'.$ADAT['targyId'].'" />'."\n";
+
+ echo '<label for="befogadoTargyId">'._BEFOGADO_TARGY.'</label>';
+ echo '<select id="befogadoTargyId" name="befogadoTargyId">';
+ echo '<option value=""> - </option>';
+ foreach ($ADAT['targyak'] as $tAdat) {
+ if ($ADAT['targyId'] != $tAdat['targyId']) echo '<option value="'.$tAdat['targyId'].'">'.$tAdat['targyNev'].' ('.$tAdat['targyId'].')'.'</option>';
+ }
+ echo '</select>';
+ echo '<label for="tankorJeloles">'._TANKOR_JELOLES.'</label>';
+ echo '<select id="tankorJeloles" name="tankorJeloles">';
+ echo '<option value=""> - </option>';
+ foreach ($TANKOR_TIPUS as $nev => $jel) {
+ echo '<option value="'.$jel.'">'.$nev.' ('.$jel.')</option>';
+ }
+ echo '</select>';
+ echo '<input type="submit" id="targyBeolvaszt" value="'._OK.'" />';
+
+ formEnd();
+ }
+
+ function putTargyTargyForm($ADAT) {
+
+ formBegin(array('id'=>'targyTargy','class'=>'mk'));
+
+ echo '<h2>'._TARGY_KAPCSOLATOK.'</h2>';
+
+ echo '<div class="leiras">'._TARGYTARGY_HELP.'</div>';
+
+ echo '<input type="hidden" name="action" value="targyTargy" />'."\n";
+ echo '<input type="hidden" name="mkId" value="'.$ADAT['mkId'].'" />'."\n";
+ echo '<input type="hidden" name="targyId" value="'.$ADAT['targyId'].'" />'."\n";
+
+ echo '<label for="alTargyId">'._ALTARGY.'</label>';
+ echo '<select id="alTargyId" name="alTargyId">';
+ echo '<option value=""> - </option>';
+/* for ( $i=0; $i<count($ADAT['targyTargy'][$ADAT['targyId']]); $i++) {
+ $T = $ADAT['targyTargy'][$ADAT['targyId']][$i];
+ $tAdat = $ADAT['targyAdat'][$T['targyId']];
+ //if ($ADAT['targyId'] != $tAdat['targyId'])
+ echo '<option value="'.$T['targyId'].'">'.$tAdat['targyNev'].' ('.$T['targyId'].')'.'</option>';
+ }
+*/
+ if (is_array($ADAT['targyak'])) foreach ($ADAT['targyak'] as $tAdat) {
+ $_plusz = (in_array($tAdat['targyId'],$ADAT['targyTargy']['FOal'][$ADAT['targyId']])) ? '+':'';
+ if ($ADAT['targyId'] != $tAdat['targyId']) echo '<option value="'.$tAdat['targyId'].'">'.$_plusz.$tAdat['targyNev'].' ('.$tAdat['targyId'].')'.'</option>';
+ }
+
+ echo '</select>';
+
+ echo '<input type="submit" id="targyTargy" value="'._OK.'" />';
+
+ formEnd();
+ }
+
+
+
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/osztaly.phtml b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/osztaly.phtml
new file mode 100644
index 00000000..b61dd550
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/osztaly.phtml
@@ -0,0 +1,424 @@
+<?php
+
+require_once('skin/classic/module-naplo/html/share/file.phtml');
+
+function putUjOsztalyForm($ADAT) {
+
+ $Tanev = $ADAT['tanevek']; $tanev = $ADAT['tanev'];
+
+ formBegin(array('class'=>'osztalyForm uj'));
+
+ echo '<h1>'._UJOSZTALY.'</h1>';
+ echo '<input type="hidden" name="action" value="ujOsztaly" />'."\n";
+ echo '<input type="hidden" name="tanev" value="'.$tanev.'" />'."\n";
+
+ echo '<div id="divOsztalyJelleg">';
+
+ echo '<label for="osztalyJellegId">'._OSZTALYJELLEG.'</label>';
+ putOsztalyJellegek($ADAT['osztalyJellegek'],$ADAT['osztalyAdat']['osztalyJellegId']);
+
+ echo '</div>';
+
+ echo '<div id="divKezdoTanev" style="display: none;">';
+ echo '<label for="kezdoTanev">'._KEZDOTANEV . ':</label>';
+ echo '<select tabindex="2" id="kezdoTanev" name="kezdoTanev">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ for ($i = 0; $i < count($Tanev); $i++) {
+ echo '<option value="'.$Tanev[$i].'">'.$Tanev[$i].'/'.($Tanev[$i]+1).'</option>'."\n";
+ }
+ echo '</select>'."\n";
+ echo '</div>';
+
+ echo '<div id="divVegzoTanev" style="display: none;">';
+ echo '<label for="vegzoTanev">'._VEGZOSTANEV . ':</label>';
+ echo '<select tabindex="3" id="vegzoTanev" name="vegzoTanev">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ for ($i = 0; $i < count($Tanev); $i++) {
+ echo '<option value="'.$Tanev[$i].'">'.$Tanev[$i].'/'.($Tanev[$i]+1).'</option>'."\n";
+ }
+ echo '</select><br />'."\n";
+ echo '</div>';
+
+ echo '<div id="divJel" style="display: none;">';
+ echo '<label for="jel">Osztaly jele induláskor</label>';
+ echo '<span id="kezdoEvfolyamJel"></span>.&nbsp;';
+ echo '<input tabindex="4" type="text" id="jel" name="jel" size="2" value="" />'."\n";
+ echo '</div>';
+
+ echo '<div id="divKezdoEvfolyamSorszam">';
+ echo '</div>';
+
+
+ echo '<div id="divLeirasTelephely">';
+ echo '<label for="leiras">'._LEIRAS . ':</label>';
+ echo '<input tabindex="6" type="text" id="leiras" name="leiras" value="" />'."\n";
+
+ echo '<label for="telephely">'._TELEPHELY . ':</label>';
+ echo '<select tabindex="6" id="telephely" name="telephelyId">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ for ($i = 0; $i < count($ADAT['telephely']); $i++) {
+ echo '<option value="'.$ADAT['telephely'][$i]['telephelyId'].'">'.$ADAT['telephely'][$i]['telephelyNev'].'</option>'."\n";
+ }
+ echo '</select><br />'."\n";
+
+ echo '</div>';
+
+ echo '<br/><input type="submit" value="'._OK.'" />';
+
+ formEnd();
+}
+
+/*
+// Már nem léptetünk osztályt...
+function putOsztalyLeptetes($ADAT) {
+ formBegin(array('class'=>'osztalyForm'));
+ echo '<h1>'._OSZTALY_LEPTETES.'</h1>'."\n";
+ echo '<input type="hidden" name="action" value="nyekOsztalyLeptetes" />'."\n";
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalyAdat']['osztalyId'].'" />'."\n";
+ echo '<input type="hidden" name="tanev" value="'.$ADAT['tanev'].'" />'."\n";
+ echo '<input type="hidden" name="telephelyId" value="'.$ADAT['osztalyAdat']['telephelyId'].'" />'."\n";
+
+ echo '<label for="osztalyJel">'._OSZTALY_UJ_JELE.'</label>: &nbsp;&nbsp;&nbsp';
+// echo $ADAT['osztalyAdat']['kezdoEvfolyam'].'. <input type="text" name="osztalyJel" id="osztalyJel" size="10" />';
+
+ echo '<label for="vegzoTanev">'._VEGZOSTANEV . ':</label>';
+ echo '<select id="vegzoTanev" name="vegzoTanev">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ for ($i = 0; $i < count($ADAT['tanevek']); $i++) {
+ echo '<option value="'.$ADAT['tanevek'][$i].'">'.$ADAT['tanevek'][$i].'/'.($ADAT['tanevek'][$i]+1).'</option>'."\n";
+ }
+ echo '</select>'."\n";
+ echo '<input type="submit" value="'._OK.'" />';
+ formEnd();
+
+}
+*/
+
+function putOsztalyAdatokForm($ADAT) {
+
+ formBegin(array('class'=>'osztalyForm'));
+ echo '<h1>'._OSZTALY_ADATAI.' ('.$ADAT['osztalyAdat']['osztalyId'].')</h1>'."\n";
+ echo '<input type="hidden" name="action" value="osztalyAdatModositas" />'."\n";
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalyAdat']['osztalyId'].'" />'."\n";
+ echo '<input type="hidden" name="tanev" value="'.$ADAT['tanev'].'" />'."\n";
+ echo '<input type="hidden" name="telephelyId" value="'.$ADAT['osztalyAdat']['telephelyId'].'" />'."\n";
+
+ echo _KEZDOTANEV.'/'._VEGZOSTANEV.': <span class="data">'.$ADAT['osztalyAdat']['kezdoTanev'].'/'.($ADAT['osztalyAdat']['kezdoTanev']+1).' - '.$ADAT['osztalyAdat']['vegzoTanev'].'/'.($ADAT['osztalyAdat']['vegzoTanev']+1).'</span>';
+
+ echo '<ul>';
+ for ($_ev = $ADAT['osztalyAdat']['kezdoTanev']; $_ev<=$ADAT['osztalyAdat']['vegzoTanev']; $_ev++) {
+ echo '<li>'.$_ev."/".($_ev+1).' - '.$ADAT['osztalyJelek'][$_ev].'</li>';
+ }
+ echo '</ul>';
+
+ echo '<label for="kepzesId">'._KEPZES.'</label>'."\n";
+ $KepzesStr = array();
+ for ($i = 0; $i < count($ADAT['kepzesek']); $i++) {
+ if (is_array($ADAT['osztalyAdat']['kepzesIds']) && in_array($ADAT['kepzesek'][$i]['kepzesId'], $ADAT['osztalyAdat']['kepzesIds']))
+ $KepzesStr[] = $ADAT['kepzesek'][$i]['kepzesNev'].' - '.$ADAT['kepzesek'][$i]['tanev'].' ('.$ADAT['kepzesek'][$i]['kepzesId'].')';
+ }
+ if (is_array($KepzesStr) && count($KepzesStr) > 0) echo '<span class="data">'.implode(' / ', $KepzesStr).'</span><br />';
+ else echo '<span class="data">&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;&nbsp;&nbsp;&nbsp;</span><br />';
+
+ echo '<hr />';
+ echo '<label for="leiras">'._LEIRAS.'</label>'."\n";
+ echo '<input type="text" id="leiras" name="leiras" value="'.$ADAT['osztalyAdat']['leiras'].'" />'."\n";
+
+ echo '<br/><label for="telephely">'._TELEPHELY.'</label>'."\n";
+ echo '<select id="telephely" name="telephelyId">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ $SEL = array($ADAT['osztalyAdat']['telephelyId'] => ' selected="selected" ');
+ for ($i = 0; $i < count($ADAT['telephely']); $i++) {
+ echo '<option value="'.$ADAT['telephely'][$i]['telephelyId'].'"'.$SEL[$ADAT['telephely'][$i]['telephelyId']].'>'.$ADAT['telephely'][$i]['telephelyRovidNev'].'</option>'."\n";
+ }
+ echo '</select>'."\n";
+
+ echo '<br/><label for="osztalyJellegId">'._OSZTALYJELLEG.'</label> ';
+ putOsztalyJellegek($ADAT['osztalyJellegek'],$ADAT['osztalyAdat']['osztalyJellegId']);
+ echo '<br/><label for="kezdoEvfolyamSorszam">'._KEZDO_EVFOLYAM_SORSZAMA.'</label> ';
+ echo '<select name="kezdoEvfolyamSorszam">';
+ for ($i=1; $i <= count($ADAT['osztalyAdat']['evfolyamJelek'])-$ADAT['osztalyAdat']['vegzoTanev']+$ADAT['osztalyAdat']['kezdoTanev']; $i++) {
+ $SEL = ($i == $ADAT['osztalyAdat']['kezdoEvfolyamSorszam'])?' selected="selected" ':'';
+ echo '<option value="'.$i.'"'.$SEL.'>'.$i.'</option>';
+ }
+ echo '</select>';
+ echo '<hr />';
+
+ echo '<table cellspacing="1" cellpadding="0">'."\n";
+ echo '<tr><th colspan="3">'._OSZTALYFONOKOK.'</th></tr>'."\n";
+ echo '<tr><th>'._TANARNEVE.'</th><th>'._BEDT.'</th><th>'._KIDT.'</th></tr>'."\n";
+
+ if (is_array($ADAT['osztalyAdat']['osztalyfonokok'])) {
+ for ($i = 0; $i < count($ADAT['osztalyAdat']['osztalyfonokok']); $i++) {
+ $O = $ADAT['osztalyAdat']['osztalyfonokok'][$i];
+ echo '<tr>';
+ echo '<td>';
+ // echo $ADAT['osztalyAdat']['osztalyfonokok'][$i]['tanarNev'];
+ echo $O['tanarNev'];
+ if ($ADAT['osztalyAdat']['osztalyfonokok'][$i]['kiDt'] == '') {
+ echo '<input type="hidden" name="ofoTanarId[]" value="'.$O['tanarId'].'" />'."\n";
+ echo '<input type="hidden" name="ofoBeDt[]" value="'.$O['beDt'].'" />'."\n";
+ }
+ echo '</td>';
+ echo '<td>'.$ADAT['osztalyAdat']['osztalyfonokok'][$i]['beDt'].'</td>';
+ if ($ADAT['osztalyAdat']['osztalyfonokok'][$i]['kiDt'] == '') {
+ echo '<td><input type="text" class="date" name="ofoKiDt[]" value="" placeholder="dátum" /></td>';
+ } else {
+ echo '<td>'.$ADAT['osztalyAdat']['osztalyfonokok'][$i]['kiDt'].'</td>';
+ }
+ echo '</tr>'."\n";
+ }
+ }
+
+ echo '<tr><td>';
+ echo '<select name="tanarId">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ for ($i = 0; $i < count($ADAT['tanarok']); $i++) {
+ echo '<option value="'.$ADAT['tanarok'][$i]['tanarId'].'">'.$ADAT['tanarok'][$i]['tanarNev'].'</option>'."\n";
+ }
+ echo '</select>'."\n";
+ echo '</td><td>';
+ echo '<input class="date" type="text" name="beDt" value="" placeholder="dátum" />'."\n";
+ echo '</td><td>';
+# kiDt jobb ha nincs # echo '<input class="date" type="text" name="kiDt" value="" />'."\n";
+ echo '</td></tr>'."\n";
+
+ echo '<tr><th colspan="3"><input type="submit" value="'._OK.'" /></th></tr>'."\n";
+ echo '</table>'."\n";
+ formEnd();
+
+
+
+
+ formBegin(array('class'=>'osztalyForm'));
+ echo '<input type="hidden" name="action" value="osztalyJelVegzesModositas" />'."\n";
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalyAdat']['osztalyId'].'" />'."\n";
+ echo '<input type="hidden" name="telephelyId" value="'.$ADAT['telephelyId'].'" />'."\n";
+ echo '<input type="hidden" name="tanev" value="'.$ADAT['tanev'].'" />'."\n";
+ echo '<h1>'._MODOSITAS.'</h1>';
+
+ echo '<label for="ujOsztalyJel">'._UJOSZTALYJEL.'</label>';
+ echo '<input type="text" id="ujOsztalyJel" name="ujOsztalyJel" value="" /></label>';
+
+ echo '<label for="ujKezdoTanev">'._KEZDOTANEV.'</label>';
+ echo '<select name="ujKezdoTanev" id="ujKezdoTanev">';
+ for ($kezd=$ADAT['osztalyAdat']['kezdoTanev']-12; $kezd<=$ADAT['osztalyAdat']['vegzoTanev']; $kezd++) {
+ $_SEL = ( $kezd == $ADAT['osztalyAdat']['kezdoTanev'] ) ? ' selected="selected" ':'';
+ echo '<option value="'.$kezd.'" '.$_SEL.'>'.$kezd.'/'.($kezd+1).'</option>';
+ }
+ echo '</select>';
+
+ echo '<label for="ujVegzoTanev">'._VEGZOSTANEV.'</label>';
+ echo '<select name="ujVegzoTanev" id="ujVegzoTanev">';
+ for ($veg=$ADAT['osztalyAdat']['kezdoTanev']; $veg<=$ADAT['osztalyAdat']['kezdoTanev']+12; $veg++) {
+ $_SEL = ( $veg == $ADAT['osztalyAdat']['vegzoTanev'] ) ? ' selected="selected" ':'';
+ echo '<option value="'.$veg.'" '.$_SEL.'>'.$veg.'/'.($veg+1).'</option>';
+ }
+ echo '</select>';
+ echo '<input type="submit" value="'._OK.'" />'."\n";
+
+ formEnd();
+
+
+
+}
+
+function osztalyTorlesForm($osztalyId) {
+
+ global $tanev;
+
+ formBegin(array('class'=>'osztalyForm'));
+
+ echo '<h1>'._OSZTALY_TORLESE.'</h1>'."\n";
+
+ echo '<input type="hidden" name="action" value="osztalyTorles" />'."\n";
+ echo '<input type="hidden" name="osztalyId" value="'.$osztalyId.'" />'."\n";
+ echo '<input type="hidden" name="tanev" value="'.$tanev.'" />'."\n";
+ echo '<input type="hidden" name="telephelyId" value="'.$ADAT['osztalyAdat']['telephelyId'].'" />'."\n";
+ echo '<input type="submit" value="'._TOROL.'" title="'._OSZTALY_TORLES_TITLE.'" class="confirm" />'."\n";
+
+ formEnd();
+}
+
+function putOsztalyNevsor($ADAT) {
+
+ formBegin(array('class'=>'osztalyForm'));
+
+ echo '<h1>'._OSZTALYNEVSOR.'</h1>'."\n";
+
+ echo '<input type="hidden" name="action" value="osztalyNevsor" />'."\n";
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalyId'].'" />'."\n";
+ echo '<input type="hidden" name="telephelyId" value="'.$ADAT['osztalyAdat']['telephelyId'].'" />'."\n";
+ echo '<input type="hidden" name="tanev" value="'.$ADAT['tanev'].'" />'."\n";
+ if (is_array($ADAT['osztalyAdat']['kepzes'])) for ($j = 0; $j < count($ADAT['osztalyAdat']['kepzes']); $j++) {
+ echo '<input type="hidden" name="kepzesIds[]" value="'.$ADAT['osztalyAdat']['kepzes'][$j]['kepzesId'].'" />'."\n";
+ }
+
+
+ echo '<ol>';
+
+ foreach ($ADAT['osztalyNevsor'] as $diakId => $value) {
+
+ echo '<li>';
+ // Képzés
+ echo '<div class="kepzes">'; $CHK = array();
+ if (is_array($ADAT['diakKepzes'][$diakId]))
+ foreach ($ADAT['diakKepzes'][$diakId] as $index => $kAdat) {
+ $kepzesId = $kAdat['kepzesId'];
+ if (in_date_interval($ADAT['dt'], $kAdat['tolDt'], $kAdat['igDt'])) {
+ $CHK[ $kepzesId ] = ' checked="checked" ';
+ if (!in_array($kepzesId, $ADAT['osztalyAdat']['kepzesIds'])) {
+ echo '<span class="chk mas">';
+ echo '<input type="checkbox" id="k-'.intval($_loop).'" name="diakKepzes[]" value="'."$diakId/$kepzesId".'" checked="checked" />'."\n";
+ echo '<label for="k-'.intval($_loop++).'" class="chk" >'.$kAdat['kepzesNev'].' ('.$kepzesId.')</label>';
+ echo '</span>';
+ }
+ }
+ }
+ if (is_array($ADAT['osztalyAdat']['kepzes'])) {
+ for ($j = 0; $j < count($ADAT['osztalyAdat']['kepzes']); $j++) {
+ $kepzesId = $ADAT['osztalyAdat']['kepzes'][$j]['kepzesId'];
+ $_class = ($CHK[$kepzesId]!='')? 'chk':'';
+ echo '<span class="'.$_class.'">';
+ echo '<input type="checkbox" id="k-'.intval($_loop).'" name="diakKepzes[]" value="'."$diakId/$kepzesId".'"'.$CHK[$kepzesId].' />'."\n";
+ echo '<label for="k-'.intval($_loop++).'" class="'.$_class.'" >'.$ADAT['osztalyAdat']['kepzes'][$j]['kepzesNev'].' ('.$kepzesId.')</label>';
+ echo '</span>';
+ if ($CHK[$kepzesId]!='') $_KEPZESDB[$kepzesId]++;
+ }
+ }
+
+ echo '<div class="hideShowContainer">';
+ echo '<span class="onClickHideShow icon-chevron-down"></span>'; // &dArr;
+ if (is_array($ADAT['diakKepzes'][$diakId])) {
+ echo '<ul class="openable" style="display: none">';
+ echo '<li class="close onClickHideShow">[X] '._BEZAR.'</li>';
+ foreach ($ADAT['diakKepzes'][$diakId] as $index => $kAdat) {
+ echo '<li>';
+ echo $kAdat['kepzesNev'].': ';
+ echo '<span class="datum">';
+ echo $kAdat['tolDt'].' - ';
+ if (is_null($kAdat['igDt'])) echo '????-??-??';
+ else echo $kAdat['igDt'];
+ echo '</span>';
+ echo '</li>';
+ }
+ echo '</ul>';
+ }
+ echo '</div>'."\n";
+
+ echo '</div>'."\n";
+
+ echo '<span class="diakNev" data-diakid="'.$value['diakId'].'">'.$value['diakNev'].'</span>';
+ $tmp = array();
+ if (is_array($value['osztalyDiak'])) foreach ($value['osztalyDiak'] as $dts) $tmp[] = $dts['beDt'].'-'.(($dts['kiDt'] == '' || $dts['kiDt'] == '0000-00-00') ? '?' : $dts['kiDt']);
+ echo '<span class="diakNev datumok">('.implode(', ', $tmp).')</span>';
+
+ echo '</li>'."\n";
+ }
+ echo '</ol>';
+ echo '<div class="datum">'._REFERENCIA_DATUM.': <input class="date" readonly="readonly" type="text" name="dt" value="'.$ADAT['dt'].'" maxlength="10" size="10" /></div>'."\n";
+ echo '<div style="text-align:center"><input type="submit" value="'._OK.'" /></div>'."\n";
+
+ if (count($ADAT['kepzesek'])>0) {
+ echo '<table>';
+ echo '<tr><th>'._KEPZES.'</th><th>'._LETSZAM.'</th></tr>';
+ for ($i = 0; $i < count($ADAT['kepzesek']); $i++) {
+ if (is_array($ADAT['osztalyAdat']['kepzesIds']) && in_array($ADAT['kepzesek'][$i]['kepzesId'], $ADAT['osztalyAdat']['kepzesIds'])) {
+ echo '<tr>';
+ echo '<td>'.$ADAT['kepzesek'][$i]['kepzesNev'].' - '.$ADAT['kepzesek'][$i]['tanev'].' ('.$ADAT['kepzesek'][$i]['kepzesId'].')'.'</td>';
+ echo '<td id="kepzesLetszam_'.$ADAT['kepzesek'][$i]['kepzesId'].'">'.$_KEPZESDB[ $ADAT['kepzesek'][$i]['kepzesId'] ].'</td>';
+ echo '</tr>';
+ }
+ }
+ echo '</table>';
+ }
+
+ formEnd();
+
+ echo '<div style="width: 100%; text-align:center; margin:0px; padding-top:20px;">';
+ echo '<h1>';
+ echo ($ADAT['osztalyAdat']['osztalyJel']);
+ echo '</h1>';
+ echo '<h2>'.($ADAT['osztalyAdat']['leiras']).'</h2>';
+ foreach ($ADAT['osztalyNevsor'] as $diakId => $value) {
+ putFace($diakId,'diak',80);
+ }
+ echo '</div>';
+
+
+}
+
+function putUjTagForm($ADAT) {
+
+ formBegin(array('class'=>'osztalyForm'));
+
+ echo '<h1>'._UJ_TAG.'</h1>'."\n";
+
+ echo '<input type="hidden" name="action" value="ujTag" />'."\n";
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalyId'].'" />'."\n";
+ echo '<input type="hidden" name="telephelyId" value="'.$ADAT['osztalyAdat']['telephelyId'].'" />'."\n";
+ echo '<input type="hidden" name="tanev" value="'.$ADAT['tanev'].'" />'."\n";
+
+ echo '<select name="diakId">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ for ($i = 0; $i < count($ADAT['diakok']); $i++) {
+ echo '<option value="'.$ADAT['diakok'][$i]['diakId'].'">'.$ADAT['diakok'][$i]['diakNev'].' ('.$ADAT['diakok'][$i]['diakId'].')</option>'."\n";
+ }
+ echo '</select>'."\n";
+ echo '<input class="date" type="text" name="beDt" value="'.date('Y-m-d').'" size="10" maxlength="10" />'."\n";
+ echo '<input class="date" type="text" name="kiDt" value="" size="10" maxlength="10" />'."\n";
+
+ echo '<input type="submit" value="'._OK.'" />'."\n";
+
+ formEnd();
+
+}
+
+function putTagTorlesForm($ADAT) {
+
+ formBegin(array('class'=>'osztalyForm'));
+
+ echo '<h1>'._TAG_TORLES.'</h1>'."\n";
+
+ echo '<input type="hidden" name="action" value="tagTorles" />'."\n";
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalyId'].'" />'."\n";
+ echo '<input type="hidden" name="telephelyId" value="'.$ADAT['osztalyAdat']['telephelyId'].'" />'."\n";
+ echo '<input type="hidden" name="tanev" value="'.$ADAT['tanev'].'" />'."\n";
+
+ echo '<select name="diakId">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ foreach ($ADAT['osztalyNevsor'] as $diakId => $dAdat) {
+ echo '<option value="'.$diakId.'">'.$dAdat['diakNev'].' ('.$diakId.')</option>'."\n";
+ }
+ echo '</select>'."\n";
+ echo '<input class="date" type="text" name="tolDt" value="'.date('Y-m-d').'" size="10" maxlength="10" />'."\n";
+ echo '<input class="date" type="text" name="igDt" value="" size="10" maxlength="10" />'."\n";
+
+ echo '<input type="submit" value="'._OK.'" />'."\n";
+
+ formEnd();
+
+}
+
+function putOsztalyJellegek($ADAT,$osztalyJellegId) {
+
+ echo '<select tabindex="1" name="osztalyJellegId" id="osztalyJellegId">';
+ echo '<option value=""> - </option>';
+ foreach ($ADAT as $_ojId => $oAdat) {
+ $evfolyamJelek = explode(',', $oAdat['evfolyamJelek']);
+ if ($_ojId == $osztalyJellegId) {
+ $_SEL = ' selected="selected" ';
+ } else {
+ $_SEL = '';
+ if ($oAdat['osztalyJellegEles']==0) continue;
+ }
+ //$_eles = ($oAdat['osztalyJellegEles']==1) ? '':'- ';
+
+ echo '<option value="'.$_ojId.'" '.$_SEL.' data-evfolyamjelek=\''.json_encode($evfolyamJelek).'\'>'.$_eles.$oAdat['osztalyJellegNev'].' ['.$_ojId.']</option>'."\n";
+ }
+ echo '</select>'."\n";
+
+}
+
+
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/tanar.phtml b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/tanar.phtml
new file mode 100644
index 00000000..c1c526fb
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/tanar.phtml
@@ -0,0 +1,411 @@
+<?php
+
+ require_once('skin/classic/module-naplo/html/share/file.phtml');
+
+ function putTanarAdatForm($ADAT) {
+
+// if (
+// $tanarAdat['jogviszonyVege'] != ''
+// && strtotime($tanarAdat['jogviszonyVege']) < time()
+// ) $disabled = ' disabled="disabled" ';
+// else $disabled = '';
+
+ putTanarAlapadatok($ADAT);
+ putTanarSzuletesiAdatok($ADAT);
+ putKepUpload($ADAT['tanarId']);
+// putTanarCim($tanarAdat, 'lakhely');
+// putTanarCim($tanarAdat, 'tart');
+// putTanarElerhetoseg($tanarAdat);
+// putTanarSzulo($tanarAdat, $Szulok);
+ putTanarJogviszonyAdatok($ADAT);
+ putTanarKepesites($ADAT);
+ }
+
+ function putTanarAlapadatok($ADAT) {
+
+ formBegin(array('action'=>href('index.php?page=naplo&sub=intezmeny&f=tanar'), 'class'=>"tanar onChangeRequest"));
+
+ echo '<input type="hidden" name="action" value="tanarAlapadatModositas" />'."\n";
+ echo '<input type="hidden" name="tanarId" value="'.$ADAT['tanarAdat']['tanarId'].'" />'."\n";
+ echo '<fieldset><legend>'._TANAR_ALAPADATAI.'</legend>'."\n";
+ echo '<table>'."\n";
+ echo '<tr>'."\n";
+ echo '<th>';
+ echo '<label for="viseltCsaladinev">'._NEV.'</label>';
+ echo '</th>'."\n";
+ echo '<td>';
+ echo '<input type="text" size="4" name="viseltNevElotag" value="'.$ADAT['tanarAdat']['viseltNevElotag'].'" title="'._VISELTNEVELOTAG.'" />';
+ echo '<input type="text" size="12" id="viseltCsaladinev" name="viseltCsaladinev" value="'.$ADAT['tanarAdat']['viseltCsaladinev'].'" title="'._VISELTCSALADINEV.'" />';
+ echo '<input type="text" size="12" name="viseltUtonev" value="'.$ADAT['tanarAdat']['viseltUtonev'].'" title="'._VISELTUTONEV.'" />';
+ echo '</td>'."\n";
+/*
+ echo '<th>';
+ echo '<label for="nem">'._NEM.'</label>';
+ echo '</th>'."\n";
+ echo '<td>';
+ echo '<select name="nem" id="nem">'."\n";
+ $SEL = array($ADAT['tanarAdat']['nem'] => ' selected="selected" ');
+ echo '<option value=""> - </option>'."\n";
+ echo '<option value="fiú"'.$SEL['fiú'].'>'._FIU.'</option>'."\n";
+ echo '<option value="lány"'.$SEL['lány'].'>'._LANY.'</option>'."\n";
+ echo '</select>'."\n";
+ echo '</td>'."\n";
+
+ echo '<th>'."\n";
+ echo '<label for="allampolgarsag">'._ALLAMPOLGARSAG.'</lable>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<input type="text" id="allampolgarsag" name="allampolgarsag" value="'.$ADAT['tanarAdat']['allampolgarsag'].'" />';
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+
+ echo '<tr>'."\n";
+ echo '<th>'."\n";
+ echo '<label for="tajSzam">'._TAJSZAM.'</lable>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<input type="text" size="15" id="tajSzam" name="tajSzam" value="'.$ADAT['tanarAdat']['tajSzam'].'" />';
+ echo '</td>'."\n";
+*/
+ echo '<th>'."\n";
+ echo '<label for="oId">'._OID.'</lable>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<input type="text" size="15" id="oId" name="oId" value="'.$ADAT['tanarAdat']['oId'].'" />';
+ echo '</td>'."\n";
+
+ echo '<th>'."\n";
+ echo '<label for="NEKAzonosito">'._NEKAZONOSITO.'</lable>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<input type="text" size="20" id="NEKAzonosito" name="NEKAzonosito" value="'.$ADAT['tanarAdat']['NEKAzonosito'].'" />';
+ echo '</td>'."\n";
+
+/*
+ echo '<th>'."\n";
+ echo '<label for="diakigazolvanySzam">'._DIAKIGAZOLVANYSZAM.'</lable>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<input type="text" size="15" id="diakigazolvanySzam" name="diakigazolvanySzam" value="'.$ADAT['tanarAdat']['diakigazolvanySzam'].'" />';
+ echo '</td>'."\n";
+*/
+ echo '</tr>'."\n";
+ echo '<tr>';
+ echo '<th>'."\n";
+ echo '<label for="email">'._TITULUS.'</lable>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<input type="text" size="32" id="titulus" name="titulus" value="'.$ADAT['tanarAdat']['titulus'].'" />';
+ echo '</td>'."\n";
+
+ echo '<th>'."\n";
+ echo '<label for="email">'._TITULUSROVID.'</lable>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<input type="text" size="10" id="titulusRovid" name="titulusRovid" value="'.$ADAT['tanarAdat']['titulusRovid'].'" />';
+ echo '</td>'."\n";
+ echo '</tr>';
+ echo '<tr>';
+ echo '<th>'."\n";
+ echo '<label for="email">'._EMAIL.'</lable>'."\n";
+ echo '</th>'."\n";
+ echo '<td colspan="4">'."\n";
+ echo '<input type="text" size="64" id="email" name="email" value="'.$ADAT['tanarAdat']['email'].'" />';
+ echo '</td>'."\n";
+ echo '</tr>';
+ echo '</table>'."\n";
+
+ echo '<input type="submit" />';
+
+ echo '</fieldset>'."\n";
+ formEnd();
+ }
+
+ function putTanarSzuletesiAdatok($ADAT) {
+ formBegin(array('action'=>href('index.php?page=naplo&sub=intezmeny&f=tanar'), 'class'=>"tanar onChangeRequest"));
+
+ echo '<input type="hidden" name="action" value="tanarSzuletesiAdatModositas" />'."\n";
+ echo '<input type="hidden" name="tanarId" value="'.$ADAT['tanarAdat']['tanarId'].'" />'."\n";
+ echo '<fieldset><legend>'._TANAR_SZULETESI_ADATAI.'</legend>'."\n";
+ echo '<table>'."\n";
+ echo '<tr>'."\n";
+ echo '<th>';
+ echo '<label for="szuleteskoriCsaladinev">'._SZULETESKORINEV.'</label>';
+ echo '</th>'."\n";
+ echo '<td>';
+ echo '<input type="text" size="4" name="szuleteskoriNevElotag" value="'.$ADAT['tanarAdat']['szuleteskoriNevElotag'].'" title="'._SZULETESKORINEVELOTAG.'" />';
+ echo '<input type="text" id="szuleteskoriCsaladinev" name="szuleteskoriCsaladinev" value="'.$ADAT['tanarAdat']['szuleteskoriCsaladinev'].'" title="'._SZULETESKORICSALADINEV.'" />';
+ echo '<input type="text" name="szuleteskoriUtonev" value="'.$ADAT['tanarAdat']['szuleteskoriUtonev'].'" title="'._SZULETESKORIUTONEV.'" />';
+ echo '</td>'."\n";
+
+ echo '</tr>'."\n";
+
+ echo '<tr>'."\n";
+ echo '<th>'."\n";
+ echo '<label for="szuletesiHely">'._SZULETESIHELY.'</lable>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<input type="text" id="szuletesiHely" name="szuletesiHely" value="'.$ADAT['tanarAdat']['szuletesiHely'].'" />';
+ echo '</td>'."\n";
+
+ echo '<th>'."\n";
+ echo '<label for="szuletesiIdo">'._SZULETESIIDO.'</lable>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<input class="date" type="text" id="szuletesiIdo" name="szuletesiIdo" value="'.$ADAT['tanarAdat']['szuletesiIdo'].'" />';
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+ echo '</table>'."\n";
+ echo '</fieldset>'."\n";
+ formEnd();
+
+ }
+
+ function putTanarJogviszonyAdatok($ADAT) {
+ formBegin(array('action'=>href('index.php?page=naplo&sub=intezmeny&f=tanar'), 'class'=>"tanar onChangeRequest"));
+
+ echo '<input type="hidden" name="action" value="tanarJogviszonyModositas" />'."\n";
+ echo '<input type="hidden" name="tanarId" value="'.$ADAT['tanarAdat']['tanarId'].'" />'."\n";
+ echo '<fieldset><legend>'._TANAR_JOGVISZONYA.'</legend>'."\n";
+ echo '<table>'."\n";
+ echo '<tr>'."\n";
+ echo '<th>';
+ echo '<label for="beDt">'._BEDT.'</label>';
+ echo '</th>'."\n";
+ echo '<td>';
+ echo '<input class="date" type="text" size="10" id="beDt" name="beDt" value="'.$ADAT['tanarAdat']['beDt'].'" title="'._BEDT.'" />';
+ echo '</td>'."\n";
+ echo '<th>';
+ echo '<label for="kiDt">'._KIDT.'</label>';
+ echo '</th>'."\n";
+ echo '<td>';
+ echo '<input class="date" type="text" size="10" id="kiDt" name="kiDt" value="'.$ADAT['tanarAdat']['kiDt'].'" title="'._KIDT.'" />';
+ echo ' '; _inlineHelp(_KIDT_HELP);
+ echo '</td>'."\n";
+ echo '</tr><tr>';
+ echo '<th>';
+ echo '<label for="hetiMunkaora">'._HETI_MUNKAORA.'</label>';
+ echo '</th>';
+ echo '<td style="white-space: nowrap;">';
+ echo '<table style="background-color:#eee; display: inline-table;">';
+ echo '<tr><th>55%</th><th>65%</th><th>80%</th><th>100%</th></tr>'."\n";
+ echo '<tr>';
+ echo '<td><input type="text" size="4" id="hetiLekotottMinOraszam" name="hetiLekotottMinOraszam" value="'.$ADAT['tanarAdat']['hetiLekotottMinOraszam'].'" title="'._HETILEKOTOTTMINORASZAM.'" /></td>';
+ echo '<td><input type="text" size="4" id="hetiLekotottMaxOraszam" name="hetiLekotottMaxOraszam" value="'.$ADAT['tanarAdat']['hetiLekotottMaxOraszam'].'" title="'._HETILEKOTOTTMAXORASZAM.'" /></td>';
+ echo '<td><input type="text" size="4" id="hetiKotottMaxOraszam" name="hetiKotottMaxOraszam" value="'.$ADAT['tanarAdat']['hetiKotottMaxOraszam'].'" title="'._HETIKOTOTTMAXORASZAM.'" /></td>';
+ echo '<td><input type="text" size="4" id="hetiMunkaora" name="hetiMunkaora" value="'.$ADAT['tanarAdat']['hetiMunkaora'].'" title="'._HETIMUNKAORA.'" /></td>';
+ echo '</tr>';
+ echo '</table> ';
+ _inlineHelp(_HETI_MUNKAORA_HELP);
+ echo '</td>';
+ echo '<th><label for="hetiMunkaora">'._HETI_KOTELEZOORASZAM.'</label>';
+ echo '</th>';
+ echo '<td>';
+ echo '<input type="text" size="4" id="hetiKotelezoOraszam" name="hetiKotelezoOraszam" value="'.$ADAT['tanarAdat']['hetiKotelezoOraszam'].'" title="'._HETIKOTELEZOORASZAM.'" /> ';
+ echo _ORA.' ';
+ _inlineHelp(_HETI_KOTELEZOORASZAM_HELP);
+ echo '</td>';
+ echo '</tr><tr>';
+ echo '<th><label for="statusz">'._STATUSZ.'</label>';
+ echo '</th>';
+ echo '<td>';
+ echo '<select name="statusz" id="statusz">';
+ echo '<option value=""> - </option>';
+ foreach ($ADAT['statuszok'] as $idx => $statusz) {
+ $SEL = ($ADAT['tanarAdat']['statusz'] == $statusz?' selected="selected" ':'');
+ if ($statusz == 'jogviszonya lezárva' && $SEL=='') echo '<option value="'.$statusz.'" id="jogviszonyaLezarva" disabled="disabled">'.$statusz.'</option>';
+ else echo '<option value="'.$statusz.'"'.$SEL.'>'.$statusz.'</option>';
+ }
+ echo '</select>';
+ echo ' '; _inlineHelp(_STATUSZ_HELP);
+ echo '</td>';
+ echo '<th><label for="besorolas">Besorolás</label></th>';
+ echo '<td>';
+ echo '<select name="besorolas" id="besorolas">';
+ echo '<option value=""> - </option>';
+ foreach ($ADAT['besorolasok'] as $idx => $besorolas) {
+ $SEL = ($besorolas==$ADAT['tanarAdat']['besorolas']?' selected="selected" ':'');
+ echo '<option value="'.$besorolas.'"'.$SEL.'>'.$besorolas.'</option>';
+ }
+ echo '</select>';
+ echo '</td>';
+ echo '</tr>'."\n";
+ echo '<tr><th><a href="'.href('index.php?page=naplo&sub=intezmeny&f=tovabbkepzes').'">'._TOVABBKEPZES_FORDULO_DT.'</a></th>';
+ echo '<td>';
+ echo '<input type="text" class="date datum" name="tovabbkepzesForduloDt" value="'.$ADAT['tanarAdat']['tovabbkepzesForduloDt'].'" />';
+ echo ' ';
+ _inlineHelp(_TOVABBKEPZES_FORDULO_DT_HELP);
+ echo '</td>';
+ echo '</tr>';
+ echo '</table>'."\n";
+
+
+ echo '</fieldset>'."\n";
+ formEnd();
+
+ }
+
+ function putTanarKepesites($ADAT) {
+
+ formBegin(array('action'=>href('index.php?page=naplo&sub=intezmeny&f=tanar'), 'class'=>"tanar"));
+
+ echo '<input type="hidden" name="action" value="tanarKepesitesModositas" />'."\n";
+ echo '<input type="hidden" name="tanarId" value="'.$ADAT['tanarAdat']['tanarId'].'" />'."\n";
+ echo '<fieldset><legend>'._TANAR_KEPESITESE.'</legend>'."\n";
+ echo '<table id="kepesites">'."\n";
+ echo '<tr><th>végzettség</th><th>fokozat</th><th>specializáció</th><th>képesítés megnevezése</th></tr>';
+ echo '<tbody>';
+ if (is_array($ADAT['tanarAdat']['kepesites']) && count($ADAT['tanarAdat']['kepesites'])>0)
+ foreach ($ADAT['tanarAdat']['kepesites'] as $idx => $kAdat) {
+ echo '<tr>';
+ echo '<td>'.$kAdat['vegzettseg'].'</td>';
+ echo '<td>'.$kAdat['fokozat'].'</td>';
+ echo '<td>'.$kAdat['specializacio'].'</td>';
+ echo '<td>'.$kAdat['kepesitesNev'].' ('.$kAdat['kepesitesId'].')</td>';
+ echo '</tr>';
+ }
+ echo '</tbody>';
+
+ echo '<tr id="hozzarendel"><th colspan="4">';
+ echo '<label for="addKepesites">Képesítés hozzárendelése</label>';
+ echo '<select name="addKepesitesId" id="addKepesites">';
+ echo '<option value=""> - </option>';
+ foreach ($ADAT['kepesitesek'] as $idx => $kAdat) {
+ echo '<option value="'.$kAdat['kepesitesId'].'">'.$kAdat['kepesitesNev'].' ('.$kAdat['kepesitesId'].') - '.$kAdat['vegzettseg'].' '.$kAdat['fokozat'].'</option>';
+ }
+ echo '</select>';
+ echo '<input type="submit" value="'._OK.'" />';
+ echo '</th></tr>';
+
+ echo '<tr id="uj"><td colspan="4" class="slideUj"><span class="icon-plus-sign"></span> Új képesítés <span class="icon-chevron-down"></span></td></tr>';
+
+ echo '<tr id="ujKepesites">';
+ echo '<td>';
+ echo '<select name="vegzettseg">';
+ foreach ($ADAT['vegzettsegek'] as $idx => $vegzettseg)
+ echo '<option value="'.$vegzettseg.'">'.$vegzettseg.'</option>';
+ echo '</select>';
+ echo ' '; _inlineHelp(_VEGZETTSEG_HELP);
+ echo '</td>';
+ echo '<td>';
+ echo '<select name="fokozat">';
+ foreach ($ADAT['fokozatok'] as $idx => $fokozat)
+ echo '<option value="'.$fokozat.'">'.$fokozat.'</option>';
+ echo '</select>';
+ echo ' '; _inlineHelp(_FOKOZAT_HELP);
+ echo '</td>';
+ echo '<td>';
+ echo '<select name="specializacio">';
+ foreach ($ADAT['specializaciok'] as $idx => $specializacio)
+ echo '<option value="'.$specializacio.'">'.$specializacio.'</option>';
+ echo '</select>';
+ echo ' '; _inlineHelp(_SPECIALIZACIO_HELP);
+ echo '</td>';
+ echo '<td id="kepesitesNev">';
+ echo '<input type="text" name="kepesitesNev" value="" />';
+ echo ' '; _inlineHelp(_KEPESITESNEV_HELP);
+ echo '<input type="submit" value="'._OK.'" style="margin-right: -50px;" />';
+ echo '</td>';
+ echo '</tr>';
+
+
+
+ echo '</table>'."\n";
+
+ echo '</fieldset>'."\n";
+ formEnd();
+
+ }
+
+ function putUjTanar() {
+ formBegin(array('action'=>href('index.php?page=naplo&sub=intezmeny&f=tanar'), 'class'=>"tanar"));
+
+ echo '<input type="hidden" name="action" value="ujTanar" />'."\n";
+ echo '<fieldset><legend>'._UJ_TANAR.'</legend>'."\n";
+ echo '<table>'."\n";
+ echo '<tr>'."\n";
+ echo '<th>';
+ echo '<label for="viseltCsaladinev" class="kotelezo">'._NEV.'</label>';
+ echo '</th>'."\n";
+ echo '<td>';
+ echo '<input type="text" size="4" name="viseltNevElotag" value="'.$ADAT['tanarAdat']['viseltNevElotag'].'" title="'._VISELTNEVELOTAG.'" />';
+ echo '<input type="text" size="12" id="viseltCsaladinev" name="viseltCsaladinev" value="'.$ADAT['tanarAdat']['viseltCsaladinev'].'" title="'._VISELTCSALADINEV.'" />';
+ echo '<input type="text" size="12" name="viseltUtonev" value="'.$ADAT['tanarAdat']['viseltUtonev'].'" title="'._VISELTUTONEV.'" />';
+ echo '</td>'."\n";
+
+/*
+ echo '<th>';
+ echo '<label for="nem">'._NEM.'</label>';
+ echo '</th>'."\n";
+ echo '<td>';
+ echo '<select name="nem" id="nem">'."\n";
+ $SEL = array($ADAT['tanarAdat']['nem'] => ' selected="selected" ');
+ echo '<option value=""> - </option>'."\n";
+ echo '<option value="fiú"'.$SEL['fiú'].'>'._FIU.'</option>'."\n";
+ echo '<option value="lány"'.$SEL['lány'].'>'._LANY.'</option>'."\n";
+ echo '</select>'."\n";
+ echo '</td>'."\n";
+
+ echo '<th>'."\n";
+ echo '<label for="allampolgarsag">'._ALLAMPOLGARSAG.'</lable>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<input type="text" id="allampolgarsag" name="allampolgarsag" value="'.$ADAT['tanarAdat']['allampolgarsag'].'" />';
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+
+ echo '<tr>'."\n";
+ echo '<th>'."\n";
+ echo '<label for="tajSzam">'._TAJSZAM.'</lable>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<input type="text" size="15" id="tajSzam" name="tajSzam" value="'.$ADAT['tanarAdat']['tajSzam'].'" />';
+ echo '</td>'."\n";
+*/
+ echo '<th>'."\n";
+ echo '<label for="oId">'._OID.'</lable>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<input type="text" size="15" id="oId" name="oId" value="'.$ADAT['tanarAdat']['oId'].'" />';
+ echo '</td>'."\n";
+
+ echo '<th>'."\n";
+ echo '<label for="NEKAzonosito">'._NEKAZONOSITO.'</lable>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<input type="text" size="20" id="NEKAzonosito" name="NEKAzonosito" value="'.$ADAT['tanarAdat']['NEKAzonosito'].'" />';
+ echo '</td>'."\n";
+
+ echo '<th>'."\n";
+ echo '<label for="beDt">'._BEDT.'</lable>'."\n";
+ echo '</th>'."\n";
+ echo '<td>'."\n";
+ echo '<input type="text" size="15" id="beDt" name="beDt" value="'.date('Y-m-d').'" />';
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+
+ echo '</table>'."\n";
+
+ echo '<input type="submit" />';
+
+ echo '</fieldset>'."\n";
+ formEnd();
+
+ }
+
+ function putKepUpload($tanarId) {
+ formBegin(array('enctype'=>"multipart/form-data",'class'=>'tanar'));
+ echo '<fieldset><legend>'._FENYKEPE.'</legend>'."\n";
+ echo '<div style="float:right; background-color: #eee;">'.
+ putFace($tanarId,'tanar',"100",false);
+ echo '</div>';
+ echo '<input type="hidden" name="tanarId" value="'.$tanarId.'" />';
+ echo '<input type="hidden" name="action" value="kepUpload" />';
+ echo '<input type="file" name="upfile" />';
+ echo '<input type="submit" class="tanarSubmit" value="ok" />';
+ echo '</fieldset>';
+ formEnd();
+ }
+
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/tankor.phtml b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/tankor.phtml
new file mode 100644
index 00000000..22e807f5
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/tankor.phtml
@@ -0,0 +1,370 @@
+<?php
+
+ function putTankornevForm($ADAT) {
+
+ formBegin(array('class'=>'tankor'));
+ echo '<h2>'._TANKORNEV_MODOSITAS.'</h2>';
+
+ echo '<div style="padding:15px 15px 0px 15px; float:left; font-size: 60px; line-height:60px;"><span class="icon-pencil-alt"></span></div>';
+ echo '<p>'._TANKORNEV_MODOSITAS_HELP.'</p>';
+
+ echo '<input type="hidden" name="action" value="setTankorNev" />'."\n";
+ echo '<input type="hidden" name="tankorId" value="'.$ADAT['tankorId'].'" />'."\n";
+ echo '<input type="hidden" name="tanev" value="'.$ADAT['tanev'].'" />'."\n";
+
+ echo '<p>';
+ echo '<label for="ujTargy">'._TAGOK_ALAPJAN.': </label>';
+
+ echo '<input type="checkbox" id="setTankorNevTagokAlapjan" name="setTankorNevTagokAlapjan" value="true" checked="checked" />';
+ echo '<input type="submit" name="nevValtoztatas" value="Tankörnév frissítés" />';
+
+ echo '</p>';
+ formEnd();
+
+ }
+
+
+ function putUjTankorForm($MK,$TARGY,$TANAR,$OSZTALY,$SZEMESZTER,$TOPOST,$ADAT) {
+
+ global $TANKOR_TIPUS;
+ /* $TOPOST['tankoradat'] */
+
+ $TT=array();
+ for ($i=0; $i<count($TOPOST['tankortanar']); $i++) {
+ $TT[] = $TOPOST['tankortanar'][$i]['tanarNev'];
+ }
+
+ if (!is_array($TARGY)) return false;
+ $SZEMCHECK = array();
+ for ($i=0; $i<count($TOPOST['szemeszterek']); $i++) {
+ $SZEMCHECK[] = $TOPOST['szemeszterek'][$i]['tanev'].'/'.$TOPOST['szemeszterek'][$i]['szemeszter'];
+ $SZEMORASZAM[$TOPOST['szemeszterek'][$i]['tanev'].'/'.$TOPOST['szemeszterek'][$i]['szemeszter']]=
+ $TOPOST['szemeszterek'][$i]['oraszam'];
+ }
+ $OSZTCHECK=array();
+
+ for ($i=0; $i<count($TOPOST['osztalyok']); $i++) {
+ $OSZTCHECK[] = $TOPOST['osztalyok'][$i]['osztalyId'];
+ }
+
+ if ( isset($TOPOST['tankorId']) && $TOPOST['tankorId']!='')
+ $_formClass = 'meglevo ';
+ else
+ $_formClass = '';
+
+
+ formBegin(array('class'=>$_formClass.'tankor', 'method'=>'post', 'action'=>''));
+ echo '<input type="hidden" name="action" value="ujTankor" />'."\n";
+ echo '<input type="hidden" name="tankorId" value="'.$TOPOST['tankorId'].'" />'."\n";
+ foreach($TOPOST as $_t => $_v)
+ echo '<input type="hidden" name="'.$_t.'" value="'.$_v.'" />'."\n";
+ echo '<h2>'._TANKOR.' ';
+ echo $MK['leiras'].'/'.$TARGY['targyNev'];
+ if ($TARGY['targyJelleg']!='') echo ' ('.$TARGY['targyJelleg'].')';
+ echo ' '.implode(', ',$TT);
+ echo '</h2>'."\n";
+
+
+ echo '<table>';
+ echo '<tr>'."\n";
+ echo '<th>'._ELNEVEZES.'</th>';
+ echo '<td>';
+ echo $ADAT['tanev'];
+ echo '</td>';
+ echo '<td>';
+ /*
+ 12.abcd angol nyelv II-ALAP óra
+ évfolyam(ok), osztály, tárgy, (extra tankorJel), elnevezés (tankorNevCimke)
+ */
+ // találjuk ki az elnevezést!
+ if ($TOPOST['tankorId']!='') {
+ $tankorNev = $TOPOST['tankoradat']['tankorNev'];
+ foreach ($TANKOR_TIPUS as $_k=>$_v) {
+ // ha a név utolsó egyésége megegyezik a jelöléssel...
+ if (substr($tankorNev, -strlen($_v)) == $_v) { $_tipus = $_v; break; }
+ }
+ } elseif ($TOPOST['tankoradat']['tipus']!='') {
+ $_tipus=$TOPOST['tankoradat']['tipus'];
+ }
+ echo '<select name="tipus">';
+ foreach ($TANKOR_TIPUS as $_k=>$_v) {
+ $_SEL = ($_v==$_tipus) ? ' selected="selected"':'';
+ echo '<option value="'.$_v.'"'.$_SEL.'>'.$_k.' - '.$_v.'</option>';
+ }
+ echo '</select>';
+ if (defined('__AKG_TANKORNEV') && __AKG_TANKORNEV === true) {
+ echo '<input type="checkbox" name="tankorNevMegorzes" value="true" />';
+ }
+ echo '</td>';
+ echo '</tr>';
+ echo '<tr>'."\n";
+ echo '</table>';
+
+ echo '<h2>'._ALTALANOS.'</h2>'."\n";
+
+ echo '<table>';
+ echo '<tr>'."\n";
+ echo '<th>'._TIPUS.'</th>';
+ echo '<td>';
+ echo '<label for="tipus">'.'</label>';
+
+ echo '<select name="tankorTipusId">';
+ foreach ($ADAT['tankorTipusok'] as $_k=>$_v) {
+ $_SEL = ($_k==$TOPOST['tankoradat']['tankorTipusId']) ? ' selected="selected"':'';
+ echo '<option value="'.$_k.'"'.$_SEL.'>';
+ echo $_k.": ";
+ echo $_v['rovidNev'].": ";
+ echo $_v['leiras'];
+ echo '</option>';
+ }
+ echo '</select>';
+ echo '<br/>';
+ echo 'Megváltoztassam a tankörhöz tartozó összes - már rögzített - hiányzás típusát
+ <br/>ebben a tanévben('.$ADAT['tanev'].')?';
+ echo '<input type="checkbox" name="forceTankorTipusValtas" value="1" />';
+ echo '<input type="submit" />';
+
+ echo '</td>';
+if (count($TOPOST['tankorcsoport']['idk'])>1) {
+ echo '<td rowspan="5" class="tankorCsoportok">';
+ echo '<div class="header">'._TANKORCSOPORTOK.'</div>';
+ echo '<ul>';
+ for ($i=0; $i<count($TOPOST['tankorcsoport']['idk']); $i++){
+ $_TA = $TOPOST['tankorcsoport']['adat'][$TOPOST['tankorcsoport']['idk'][$i]][0];
+ if ($_TA['tankorId']!=$ADAT['tankorId'])
+ echo '<li><a href="'.href('index.php?page=naplo&sub=intezmeny&f=tankor&tankorId='.$_TA['tankorId']).'">'.($_TA['tankorNev']).'</a></li>';
+ else
+ echo '<li>'.$_TA['tankorNev'].'</li>';
+ }
+ echo '</ul>';
+ echo '</td>'."\n";
+}
+ echo '</tr><tr>';
+
+ echo '<th>'._VALASZTHATO.'</th>'."\n";
+
+ echo '<td>';
+ if (isset($TOPOST['tankoradat']['felveheto'])) $_CHK[$TOPOST['tankoradat']['felveheto']] = ' checked="checked"';
+ else $_CHK[0] = ' checked="checked"';
+
+ echo '<span class="dob">';
+ echo '<input type="radio" id="szabValI" name="felveheto" value="1" '.$_CHK[1].' />';
+ echo '<label for="szabValI">'._IGEN.'</label>';
+ echo '</span>';
+
+ echo '<span class="dob">';
+ echo '<input type="radio" id="szabValN" name="felveheto" value="0" '.$_CHK[0].' />';
+ echo '<label for="szabValN">'._NEM.'</label>';
+ echo '</span>'."\n";
+
+ echo '<label for="min">'._MIN_LSZ.'</label>';
+ echo '<select id="min" name="min">';
+ for ($i=0; $i<100; $i++) {
+ $_SEL = ($TOPOST['tankoradat']['min'] ==$i) ? ' selected="selected" ': '';
+ echo '<option value="'.$i.'"'.$_SEL.'>'.$i.'</option>';
+ }
+ echo '</select>'."\n";
+ echo '<label for="min">'._MAX_LSZ.'</label>';
+ echo '<select id="max" name="max">';
+ for ($i=0; $i<100; $i++) {
+ $_SEL = ($TOPOST['tankoradat']['max'] ==$i) ? ' selected="selected" ': '';
+ echo '<option value="'.$i.'"'.$_SEL.'>'.$i.'</option>';
+ }
+ echo '</select>'."\n";
+ echo '</td>';
+ echo '</tr><tr>';
+ echo '<th>'._EVKOZI_KOVETELMENY.'</th>';
+
+ echo '<td>';
+
+ if (isset($TOPOST['tankoradat']['kovetelmeny'])) {
+ $_CHK[$TOPOST['tankoradat']['kovetelmeny']] = ' checked="checked"';
+ $_CLASS[$TOPOST['tankoradat']['kovetelmeny']]=' class="sel"';
+ } else {
+ $_CHK['jegy'] = ' checked="checked"';
+ }
+
+ foreach ( $ADAT['tankor.kovetelmeny'] AS $i => $kovetelmeny) {
+ echo '<div '.$_CLASS[$kovetelmeny].'>';
+ echo '<input type="radio" id="kov'.$kovetelmeny.'" name="kovetelmeny" value="'.$kovetelmeny.'" '.$_CHK[$kovetelmeny].' />';
+ echo '<label for="kov'.$kovetelmeny.'">'.$kovetelmeny.'</label>';
+ echo '</div>';
+ }
+
+/* echo '<label for="kovJegy">'._JEGY.'</label>';
+ echo '<input type="radio" id="kovJegy" name="kovetelmeny" value="jegy" '.$_CHK['jegy'].' />';
+ echo '<label for="kovAi">'._ALAIRAS.'</label>';
+ echo '<input type="radio" id="kovAi" name="kovetelmeny" value="aláírás" '.$_CHK['aláírás'].' />';
+*/ echo '</td>';
+
+ echo '</tr>';
+/* REV 2185++ - tól nem kell, nem lehet. A típus determinál
+ echo '<tr>';
+
+ echo '<th>'._JELENLET.'</th>';
+
+ echo '<td>';
+ if (isset($TOPOST['tankoradat']['jelenlet'])) $_CHK[$TOPOST['tankoradat']['jelenlet']] = ' checked="checked"';
+ else $_CHK['kötelező'] = ' checked="checked"';
+ echo '<label for="jelKot">'._KOTELEZO.'</label>';
+ echo '<input type="radio" id="jelKot" name="jelenlet" value="kötelező" '.$_CHK['kötelező'].' />';
+ echo '<label for="jelNemKot">'._NEMKOTELEZO.'</label>';
+ echo '<input type="radio" id="jelNemKot" name="jelenlet" value="nem kötelező" '.$_CHK['nem kötelező'].' />';
+ echo '</td>';
+
+ echo '</tr>';
+*/
+ echo '</table>';
+ echo '<input type="hidden" id="jelKot" name="jelenlet" value="kötelező" />';
+
+ $_CHK = array();
+
+ echo '<h2>'._SZEMESZTEREK.'</h2>';
+ echo '<table class="szemeszter" cellspacing="1" cellpadding="1">';
+ echo '<tr><th>'._SZEMESZTER.'</th>';
+ for ($i=0; $i<count($SZEMESZTER); $i++) {
+ echo '<th class="sz'.($i%2).'">';
+ echo $SZEMESZTER[$i]['tanev'].' '.$SZEMESZTER[$i]['szemeszter'];
+ echo '</th>'."\n";
+ }
+ echo '</tr>'."\n";
+
+ echo '<tr><th></th>';
+ for ($i=0; $i<count($SZEMESZTER); $i++) {
+ echo '<td class="sz'.($i%2).'">';
+ $_RO = ($SZEMESZTER[$i]['statusz']=='lezárt') ? ' readonly="readonly" onclick="return false;" class="lezart" ':'';
+ $_CHK = (is_array($SZEMCHECK) && in_array($SZEMESZTER[$i]['tanev'].'/'.$SZEMESZTER[$i]['szemeszter'],$SZEMCHECK))? ' checked="checked"':'';
+ $_ID = 'c'.$SZEMESZTER[$i]['tanev'].'/'.$SZEMESZTER[$i]['szemeszter'];
+ echo '<input id="'.$_ID.'" type="checkbox" name="szemeszterek[]" value="'.$SZEMESZTER[$i]['szemeszterId'].'"'.$_CHK.$_RO.' />';
+ echo '</td>'."\n";
+ }
+ echo '</tr>';
+
+ echo '</tr><tr><th>'._HETI_ORASZAM.'</th>';
+ for ($i=0; $i<count($SZEMESZTER); $i++) {
+ echo '<td class="sz'.($i%2).'">';
+ $_RO = ($SZEMESZTER[$i]['statusz']=='lezárt') ? ' readonly="readonly" class="lezart" ':'';
+ $_val = $SZEMORASZAM[$SZEMESZTER[$i]['tanev'].'/'.$SZEMESZTER[$i]['szemeszter']];
+ $_ID = 't'.$SZEMESZTER[$i]['tanev'].'/'.$SZEMESZTER[$i]['szemeszter'];
+ echo '<input id="'.$_ID.'" type="text" size="2" maxlength="4" name="SZ'.$SZEMESZTER[$i]['szemeszterId'].'" value="'.$_val.'" '.$_RO.'/>';
+ echo '</td>'."\n";
+ }
+ echo '</tr>';
+ echo '</table>'."\n\n";
+
+ echo '<h2>'._RESZTVEVO_OSZTALYOK.'</h2>';
+ echo '<table>';
+ echo '<tr><th>'._OSZTALYJELE.'</th><th></th><th>'._LEIRAS.'</th></tr>'."\n";
+ for ($i=0; $i<count($OSZTALY); $i++) {
+ if (is_array($ADAT['tankorOsztalyok']) && in_array($OSZTALY[$i]['osztalyId'],$ADAT['tankorOsztalyok'])) $_class="vanTag"; else $_class="";
+
+ echo '<tr class="'.$_class.'">';
+ echo '<th><label for="o'.$i.'">'.$OSZTALY[$i]['osztalyJel'].'</label></th>';
+ echo '<td>';
+ $_CHK = (is_array($TOPOST['osztalyok']) && in_array($OSZTALY[$i]['osztalyId'],$OSZTCHECK))? ' checked="checked"':'';
+ echo '<input type="checkbox" id="o'.$i.'" name="osztalyok[]" value="'.$OSZTALY[$i]['osztalyId'].'"'.$_CHK.' />';
+ echo '</td>'."\n";
+ echo '<td>';
+ echo '<label for="o'.$i.'">';
+ echo $OSZTALY[$i]['kezdoTanev'].'/'.$OSZTALY[$i]['vegzoTanev'];
+ echo '.'.$OSZTALY[$i]['jel'];
+ echo ' ('.$OSZTALY[$i]['leiras'].')';
+ echo '</label>';
+
+
+ echo '</td>'."\n";
+
+ echo '</tr>';
+ }
+ echo '</table>';
+
+ if ($TOPOST['tankorId']=='') { // engedélyezzüz a tanár felvételét
+
+ echo '<h2>'._MEGJELOLTIDOSZAKBANTANAR.'</h2>';
+ echo '<select name="tanarId">';
+ echo '<option value=""></option>';
+ for($i=0; $i<count($TANAR); $i++) {
+ echo '<option value="'.$TANAR[$i]['tanarId'].'">'.$TANAR[$i]['tanarNev'].'</option>';
+ }
+ echo '</select>';
+ }
+
+
+ echo '<input type="submit" />';
+
+ formEnd();
+
+ }
+
+ function putTankorLezarForm($tankorId, $mkId, $targyId, $tanev = __TANEV) {
+
+ formBegin(array('class'=>'tankor'));
+ echo '<h2>'._TANKOR_LEZARAS.'</h2>';
+
+ echo '<p>'._TANKOR_LEZARAS_HELP.'</p>';
+ echo '<p><label for="biztosLezar">Biztos benne?</label>';
+ echo '<input type="checkbox" id="biztosLezar" name="biztosLezar" value="1" />'."</p>\n";
+ echo '<input type="hidden" name="action" value="tankorLezar" />'."\n";
+ echo '<input type="hidden" name="tankorId" value="'.$tankorId.'" />'."\n";
+ echo '<input type="hidden" name="mkId" value="'.$mkId.'" />'."\n";
+ echo '<input type="hidden" name="targyId" value="'.$targyId.'" />'."\n";
+ echo '<input type="hidden" name="tanev" value="'.$tanev.'" />'."\n";
+
+ echo '<p>';
+ echo '<label for="lezardt">'._LEZARAS_DT.': </label>';
+ echo '<input type="text" id="lezarDt" name="lezarDt" class="date" value="'.date('Y-m-d').'" />';
+ echo '<input type="submit" id="lezarg" value="'._LEZAR.'" />';
+ echo '</p>';
+ formEnd();
+ }
+
+
+ function putTankorTorolForm($tankorId, $mkId, $targyId, $tanev = __TANEV) {
+
+ formBegin(array('class'=>'tankor'));
+ echo '<h2>'._TANKOR_TORLES.'</h2>';
+
+ echo '<p>'._TANKOR_TORLES_HELP;
+
+ echo '<input type="checkbox" name="biztosTorol" value="1" />'."</p>\n";
+ echo '<input type="hidden" name="action" value="tankorTorol" />'."\n";
+ echo '<input type="hidden" name="tankorId" value="'.$tankorId.'" />'."\n";
+ echo '<input type="hidden" name="mkId" value="'.$mkId.'" />'."\n";
+ echo '<input type="hidden" name="targyId" value="'.$targyId.'" />'."\n";
+ echo '<input type="hidden" name="tanev" value="'.$tanev.'" />'."\n";
+ echo '<p>';
+ echo '<label for="targytorolg">'._VEGLEGES_TORLES.': </label>';
+ echo '<input type="submit" id="torolg" value="'._DELETE.'" />';
+ echo '</p>';
+ formEnd();
+ }
+
+ function putTankorTargyForm($ADAT) {
+
+ formBegin(array('class'=>'tankor'));
+ echo '<h2>'._TANKOR_TARGY_MODOSITAS.'</h2>';
+
+ echo '<p>'._TANKOR_TARGY_HELP.'</p>';
+
+ echo '<input type="hidden" name="action" value="tankorTargyModositas" />'."\n";
+ echo '<input type="hidden" name="tankorId" value="'.$ADAT['tankorId'].'" />'."\n";
+ echo '<input type="hidden" name="mkId" value="'.$ADAT['mkId'].'" />'."\n";
+ echo '<input type="hidden" name="targyId" value="'.$ADAT['targyId'].'" />'."\n";
+ echo '<input type="hidden" name="tanev" value="'.$ADAT['tanev'].'" />'."\n";
+
+ echo '<p>';
+ echo '<label for="ujTargy">'._UJ_TARGY.': </label>';
+ echo '<select id="ujTargy" name="ujTargyId" class="">';
+ echo '<option value=""> - </option>';
+ foreach ($ADAT['targyak'] as $tAdat) {
+ if ($tAdat['targyId'] != $ADAT['targyId'])
+ echo '<option value="'.$tAdat['targyId'].'">'.$tAdat['targyNev'].' ('.$tAdat['targyId'].')</option>';
+ }
+ echo '</select>';
+ echo '<input type="submit" id="targyMod" value="'._OK.'" />';
+ echo '</p>';
+ formEnd();
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/tankorDiak.phtml b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/tankorDiak.phtml
new file mode 100644
index 00000000..272d6908
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/tankorDiak.phtml
@@ -0,0 +1,310 @@
+<?php
+
+ function putTankorDiakTablazat($ADAT) {
+
+ $tankorId = $ADAT['tankorId'];
+ $TT = array();
+ for ($i = 0; $i < count($ADAT['tankor']['tanarai']); $i++) {
+ $TT[] = $ADAT['tankor']['tanarai'][$i]['tanarNev'];
+ }
+
+ formBegin(array('method'=>'post', 'action'=>'', 'class'=>'tankor'));
+ echo '<h2>'.ucfirst(_TANAR).': '.implode(', ',$TT).'</h2>';
+
+ echo '<h2>'._DIAKOK.'</h2>';
+
+ if ($ADAT['tankor']['diakjai']['nevek']!==false) {
+
+ echo '<table cellpadding="1" cellspacing="1">';
+ __tableHeadFoot();
+ echo '<tbody>';
+ $i=1;
+ if (is_array($ADAT['tankor']['diakjai']['nevek']))
+ foreach ($ADAT['tankor']['diakjai']['nevek'] as $diakId=>$DIAK) {
+ $_D = $ADAT['tankor']['diakjai']['adatok'][$diakId];
+ $_db = count($_D);
+ $_CHK = (is_array($ADAT['diakSelected']) && in_array($diakId,$ADAT['diakSelected'])) ? 'checked="checked"':'';
+ echo '<tr>';
+ echo '<td rowspan="'.$_db.'">';
+ echo '</td>';
+ echo '<td rowspan="'.$_db.'">';
+ echo $i++;
+ echo '. '.$DIAK['diakNev'];
+ echo ' ';
+ $_osztalyId=$ADAT['diakOsztaly'][$diakId][0];
+ if (isset($ADAT['osztaly'][$_osztalyId]['osztalyJel'])) echo '('.$ADAT['osztaly'][$_osztalyId]['osztalyJel'].')';
+ echo '</td>';
+ echo '<td>';
+ echo $_D[0]['beDt'];
+ echo '</td>';
+ echo '<td>';
+ echo $_D[0]['kiDt'];
+ echo '</td>';
+ echo '<td rowspan="'.$_db.'">';
+ for ($k=0; $k<count($ADAT['diakKepzes'][$diakId]); $k++) {
+ echo '<span class="kepzes'.($ADAT['diakKepzes'][$diakId][$k]['kepzesId']%2).'">';
+ echo $ADAT['diakKepzes'][$diakId][$k]['kepzesNev'];
+ echo '</span>';
+ }
+ echo '</td>';
+ echo '</tr>';
+ for ($k=1; $k<count($_D); $k++){
+ echo '<tr>';
+ echo '<td>';
+ echo $_D[$k]['beDt'];
+ echo '</td>';
+ echo '<td>';
+ echo $_D[$k]['kiDt'];
+ echo '</td>';
+ echo '</tr>';
+ }
+ }
+ echo '</tbody>';
+ echo '</table>';
+
+ }
+
+
+ formEnd();
+
+ }
+
+ function __tableHeadFoot() {
+ echo '<thead>';
+ echo '<tr><th></th><th>'._NEV.'</th><th>'._METTOL.'</th><th>'._MEDDIG.'</th><th>'._NEME.'</th><th>'._KEPZES.'</th></tr>'."\n";
+ echo '</thead>';
+ echo '<tfoot>';
+ echo '<tr><th></th><th>'._NEV.'</th><th>'._METTOL.'</th><th>'._MEDDIG.'</th><th>'._NEME.'</th><th>'._KEPZES.'</th></tr>'."\n";
+ echo '</tfoot>';
+ }
+
+ function putTankorDiakForm($ADAT) {
+
+ $tankorId = $ADAT['tankorId'];
+ $TT = array();
+ for ($i = 0; $i < count($ADAT['tankor']['tanarai']); $i++) {
+ $TT[] = $ADAT['tankor']['tanarai'][$i]['tanarNev'];
+ }
+
+ formBegin(array('method'=>'post', 'id'=>'tankorDiak', 'class'=>'tankor', 'action'=>''));
+
+ if (count($TT)>0) echo '<h2>'.ucfirst(_TANAR).': '.implode(', ',$TT).'</h2>';
+
+ echo '<h2>'._DIAKOK.'</h2>';
+
+ if ($ADAT['tankor']['diakjai']['nevek']!==false) {
+
+ echo '<input type="hidden" name="action" value="tankorDiakMod" />'."\n";
+ echo '<input type="hidden" name="tanev" value="'.$ADAT['tanev'].'" />'."\n";
+ echo '<input type="hidden" name="tankorId" value="'.$tankorId.'" />'."\n";
+# echo '<input type="hidden" name="mkId" value="'.$ADAT['mkId'].'" />'."\n";
+# echo '<input type="hidden" name="beDt" value="'.$ADAT['beDt'].'" />'."\n";
+# echo '<input type="hidden" name="kiDt" value="'.$ADAT['kiDt'].'" />'."\n";
+ echo '<table cellpadding="1" cellspacing="1" class="bentlevo">';
+ __tableHeadFoot();
+ echo '<tbody>';
+ $i=1;
+
+ if (is_array($ADAT['tankor']['diakjai']['nevek']))
+ foreach ($ADAT['tankor']['diakjai']['nevek'] as $diakId=>$DIAK) {
+ $_D = $ADAT['tankor']['diakjai']['adatok'][$diakId];
+ $_db = count($_D);
+ $_CHK = (is_array($ADAT['diakSelected']) && in_array($diakId,$ADAT['diakSelected'])) ? 'checked="checked"':'';
+ echo '<tr>';
+ echo '<td rowspan="'.$_db.'">';
+ echo '<input type="hidden" name="diakok[]" value="'.$diakId.'" />';
+ echo '<input type="checkbox" name="diaktorol[]" value="'.$diakId.'" '.$_CHK.'/>';
+ echo '</td>';
+ echo '<td rowspan="'.$_db.'" class="diakNev" data-diakid="'.$diakId.'">';
+ echo $i++;
+ echo '. '.$DIAK['diakNev'];
+ echo ' ';
+ $_osztalyId=$ADAT['diakOsztaly'][$diakId][0];
+ if (isset($ADAT['osztaly'][$_osztalyId]['osztalyJel'])) echo '('.$ADAT['osztaly'][$_osztalyId]['osztalyJel'].')';
+ echo '</td>';
+ echo '<td>';
+ echo $_D[0]['beDt'];
+ echo '</td>';
+ echo '<td>';
+ echo $_D[0]['kiDt'];
+ echo '</td>';
+ echo '<td class="'.ekezettelen($ADAT['diakAdat'][$diakId]['nem']).'">';
+ echo ($ADAT['diakAdat'][$diakId]['nem']);
+ echo '</td>';
+
+ echo '<td>';
+ for ($k=0; $k<count($ADAT['diakKepzes'][$diakId]); $k++) {
+ echo '<span class="kepzes'.($ADAT['diakKepzes'][$diakId][$k]['kepzesId']%2).'">';
+ echo $ADAT['diakKepzes'][$diakId][$k]['kepzesNev'];
+ echo '</span>';
+ }
+ echo '</td>';
+ echo '</tr>';
+ }
+ echo '</tbody>';
+ echo '</table>';
+
+ echo '<input type="hidden" name="refDt" value="'.$ADAT['refDt'].'" /> '.$ADAT['refDt'].' - ';
+ echo '<input class="date" type="text" name="kiDt" value="'.$ADAT['kiDt'].'" />';
+ if ($ADAT['voltUtkozes'] === true && __NAPLOADMIN) echo '<input id="utkozes" type="checkbox" name="utkozes" value="true" /><label for="utkozes">'._FORCE.'</label>';
+ echo '<input type="submit" id="tankorDiakMod" value="'._BUTTON_OK.'" class="confirm" title="'._BIZTOS_TANKORNEVSOR.'" />';
+ formEnd();
+ }
+ }
+
+ function putUjDiakForm($ADAT) {
+
+ $tankorId = $ADAT['tankorId'];
+
+ formBegin(array('method'=>'post', 'id'=>'ujDiak', 'class'=>'tankor', 'action'=>''));
+
+ echo '<h2>'._UJDIAK.'</h2>';
+
+ echo '<input type="hidden" name="action" value="tankorUjDiak" />'."\n";
+ echo '<input type="hidden" name="tanev" value="'.$ADAT['tanev'].'" />'."\n";
+ echo '<input type="hidden" name="tankorId" value="'.$tankorId.'" />'."\n";
+ //echo '<input type="hidden" name="jelenlet" value="kötelező" />'."\n";
+ //echo '<input type="hidden" name="kovetelmeny" value="jegy" />'."\n";
+
+ echo '<select name="diakId">';
+ foreach($ADAT['diakok'] as $_osztalyId => $DADAT) {
+ echo '<optgroup label="'.$ADAT['osztaly'][$_osztalyId]['osztalyJel'].'">';
+ for($i=0; $i<count($DADAT); $i++) {
+ echo '<option value="'.$DADAT[$i]['diakId'].'">'.$DADAT[$i]['diakNev'].' ('.$DADAT[$i]['diakId'].')</option>';
+ }
+ echo '</optgroup>';
+ }
+ echo '</select>';
+ echo '<label for="tolDt">'._BEDT.': </label>';
+ echo '<input class="date" type="text" id="refDt" name="refDt" value="'. $ADAT['refDt'] .'" />';
+ echo '<label for="igDt">'._KIDT.': </label>';
+ echo '<input class="date" type="text" id="igDt" name="igDt" value="" />';
+
+ echo '<input type="submit" id="ujDiak" value="'._OK.'" />';
+
+ formEnd();
+
+ }
+
+ function putUjDiakForm2($ADAT) {
+ $tankorId = $ADAT['tankorId'];
+
+ formBegin(array('method'=>'post', 'id'=>'ujDiak', 'class'=>'tankor', 'action'=>''));
+
+ echo '<h2>'._UJDIAK.'</h2>';
+
+ echo '<input type="hidden" name="action" value="tankorUjDiakMulti" />'."\n";
+ echo '<input type="hidden" name="tanev" value="'.$ADAT['tanev'].'" />'."\n";
+ echo '<input type="hidden" name="tankorId" value="'.$tankorId.'" />'."\n";
+ //echo '<input type="hidden" name="jelenlet" value="kötelező" />'."\n";
+ //echo '<input type="hidden" name="kovetelmeny" value="jegy" />'."\n";
+ $j=0;
+ $SORT = array();
+ foreach($ADAT['diakok'] as $_osztalyId => $___D) {
+ if (isset($ADAT['osztaly'][$_osztalyId]['osztalyJel']))
+ $SORT[$ADAT['osztaly'][$_osztalyId]['osztalyJel']]=$_osztalyId;
+ else // Vendégtanulók miatt...
+ $SORT[constant('_'.strtoupper($_osztalyId))] = $_osztalyId;
+ }
+
+
+ ksort($SORT);
+ foreach($SORT as $_oJel => $_osztalyId) {
+ $DADAT = $ADAT['diakok'][$_osztalyId];
+
+ echo '<table style="float:left;" cellpadding="0" cellspacing="1">';
+ echo '<tr><th colspan="2">'.$_oJel.'</th></tr>';
+ echo '<tr>';
+ echo '<th class="setAll">'.$_oJel.'</th>'."\n";
+ echo '<td style="vertical-align: top">';
+ //**
+ echo '<table cellpadding="1" cellspacing="1" class="egyosztaly">';
+ for($i=0; $i<count($DADAT); $i++) {
+ $_diakId= $DADAT[$i]['diakId'];
+ $_neme = ($ADAT['diakAdat'][$_diakId]['nem']);
+ echo '<tr class="'.ekezettelen(str_replace(' ','',$DADAT[$i]['statusz'])).'">';
+ echo '<td><input type="checkbox" id="diakId__'.$j.'" name="diakId[]" value="'.$DADAT[$i]['diakId'].'" class="'.ekezettelen($_neme).'" /></td>';
+ echo '<td>'.($i+1).'.</td>';
+ echo '<td>';
+ echo '<label for="diakId__'.$j.'" title="'.$DADAT[$i]['statusz'].'">'.$DADAT[$i]['diakNev'].' ('.$DADAT[$i]['diakId'].')</label>';
+ // képzései:
+ echo '</td>';
+ echo '<td class="'.ekezettelen($_neme).' setAll'.ucfirst(ekezettelen($_neme)).'" >';
+ //echo '<label for="diakId__'.$j.'">'.$_neme.'</label>';
+ echo $_neme;
+ echo '</td>';
+ echo '<td>';
+ for ($k=0; $k<count($ADAT['diakKepzes'][$_diakId]); $k++) {
+ echo '<span class="kepzes'.($ADAT['diakKepzes'][$_diakId][$k]['kepzesId']%2).'" title="['.$ADAT['diakKepzes'][$_diakId][$k]['tanev'].']">';
+ echo $ADAT['diakKepzes'][$_diakId][$k]['kepzesNev'];
+
+ echo '</span>';
+ }
+ echo '</td>';
+ // --
+ echo '</tr>'."\n";
+ $j++;
+ }
+ echo '</table>';
+ //**
+
+ echo '</td>';
+ echo '</tr>';
+ echo '</table>';
+
+ }
+ echo '<div style="clear:both"></div>';
+ echo '<label for="refDt">'._BEDT.': </label>';
+ echo '<input class="date" type="text" id="refDt" name="refDt" value="'.$ADAT['refDt'].'" />';
+ echo '<label for="igDt">'._KIDT.': </label>';
+ echo '<input class="date" type="text" id="igDt" name="igDt" value="" />';
+
+ echo '<input type="submit" id="ujDiakOk" value="'._OK.'" />';
+
+ formEnd();
+
+ }
+
+ function __n($D1,$D2) {
+ $kip = date('z',strtotime($D1));
+ $kop = date('z',strtotime($D2));
+ list($bY,$bM,$bD) = explode('-',$D1);
+ list($kY,$kM,$kD) = explode('-',$D2);
+ $px = $kop-$kip+($kY-$bY)*365-1;
+ return $px;
+ }
+
+ /* EZT TESSÉK SZÉPEN MEGÍRNI :) */
+ function _put_grafikon($ADAT,$TANEV) {
+
+ // el kellene még tolni a kezdes és zárás ismeretében!
+ $tanevN = __n($TANEV['kezdesDt'], $TANEV['zarasDt']);
+ // legyen 1 pixel, 1 nap
+ $pxx=0;
+ echo '<div style="width:370px; height:5px; background-color: lightgrey; border: solid 1px blue" alt="jelenlet grafikon">';
+
+ if (($px=__n($TANEV['kezdesDt'],$ADAT[0]['beDt']))>0) {
+ echo '<img src="/skin/classic/module-naplo/img/tankorok/gray-pixel.gif" style="width:'.$px.'px; height:5px; background-color: navy; border-right: solid 1px red;" alt="">';
+ $pxx+=$px;
+ } elseif ($px<0) { // hackit
+ $ADAT[0]['beDt']=$TANEV['kezdesDt'];
+ }
+ for($i=0; $i<count($ADAT); $i++) {
+ if (!is_null($ADAT[$i]['kiDt'])) {
+ $px = __n($ADAT[$i]['beDt'],$ADAT[$i]['kiDt']);
+ } else {
+ $px = 365-$pxx-1;
+ }
+ $pxx+=$px;
+ echo '<img src="/skin/classic/module-naplo/img/tankorok/gold_box.gif" style="width:'.$px.'px; height:5px; background-color: navy; border-right: solid 1px blue;" alt="">';
+ if (is_array($ADAT[$i+1])) {
+ $px = __n($ADAT[$i]['kiDt'],$ADAT[$i+1]['beDt']);
+ echo '<img src="/skin/classic/module-naplo/img/tankorok/gray-pixel.gif" style="width:'.$px.'px; height:5px; background-color: navy; border-right: solid 1px red;" alt="">';
+ $pxx+=$px;
+ }
+ }
+ echo '</div>';
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/tankorLetszam.phtml b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/tankorLetszam.phtml
new file mode 100644
index 00000000..c7a935e8
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/tankorLetszam.phtml
@@ -0,0 +1,83 @@
+<?php
+
+ function putTankorLetszam($ADAT) {
+
+ echo '<table align="center" class="tankorLetszam" cellspacing="1">';
+ echo '<tr><th>'._TANKOR.'</th><th>'._TIPUS.'</th>';
+ echo '<th colspan="2">';
+ echo _LETSZAM;
+
+ formBegin();
+ $_CHK = ($ADAT['osztalyonkent']=='1') ? ' checked="checked" ':'';
+ echo '<input type="checkbox" name="osztalyonkent" value="1" '.$_CHK.' />';
+ _putLimit($ADAT['tankorLetszamLimit']);
+ echo '<input type="submit" />';
+ echo '<input type="hidden" name="mkId" value="'.$_POST['mkId'].'" />';
+ echo '<input type="hidden" name="targyId" value="'.$_POST['targyId'].'" />';
+ formEnd();
+ echo '</th>';
+ echo '<th>'._TANAROK.'</th></tr>'."\n";
+ for($i=0; $i<count($ADAT['tankorok']); $i++) {
+ $_D = $ADAT['tankorok'][$i];
+ if (!is_numeric($ADAT['tankorLetszamLimit']) || $ADAT['tankorLetszamLimit']>=$_D['letszam']) {
+ echo '<tr>';
+ echo '<td>';
+ echo '<a href="'.href('index.php?page=naplo&sub=intezmeny&f=tankor&tankorId='.$_D['tankorId']).'">';
+ echo $_D['tankorNev'];
+ echo ' ('.$_D['tankorId'].')';
+ echo '</a>';
+ echo '</td>';
+ echo '<td>';
+ echo $_D['tankorTipus'];
+ echo '</td>';
+ echo '<td class="letszam">';
+ echo '<a href="'.href('index.php?page=naplo&sub=intezmeny&f=tankorDiak&tankorId='.$_D['tankorId']).'">';
+ echo $_D['letszam'];
+ echo '</a>';
+ echo '</td>';
+ echo '<td class="letszam">';
+
+ if (is_array($_D['letszamOsztaly']))
+ foreach(
+ $_D['letszamOsztaly'] as $osztalyJel => $db
+ ) {
+ echo '<span style="color: white; background-color: #565650; padding:0px 5px;margin:0px 5px;">';
+ echo $osztalyJel.':';
+ echo $db;
+ echo '</span>';
+ }
+
+ echo '</td>';
+ echo '<td class="tanar">';
+ for ($j=0; $j<count($_D['tanarai']); $j++) {
+ echo $_D['tanarai'][$j]['tanarNev'];
+ if ($j<count($_D['tanarai'])-1) echo ', ';
+ }
+ echo '</td>';
+/*
+ echo '<td class="osztaly">';
+ for ($j=0; $j<count($_D['osztalyai']); $j++) {
+ echo $ADAT['osztaly'][$_D['osztalyai'][$j]]['osztalyJel'];
+ if ($j<count($_D['osztalyai'])-1) echo ', ';
+ }
+ echo '</td>';
+*/ echo '</tr>';
+ echo '</tr>'."\n";
+ }
+ }
+ echo '</table>';
+
+ }
+
+ function _putLimit($limit) {
+
+ echo '<select name="tankorLetszamLimit">';
+ echo '<option value=""></option>';
+ for ($i=0; $i<=40; $i++) {
+ $_SEL = ($limit!==$i) ? '': ' selected = "selected" ';
+ echo '<option value="'.$i.'" '.$_SEL.'>'.$i.'</option>';
+ }
+ echo '</select>';
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/tankorSzemeszter.phtml b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/tankorSzemeszter.phtml
new file mode 100644
index 00000000..a98009fb
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/tankorSzemeszter.phtml
@@ -0,0 +1,101 @@
+<?php
+
+ function putTankorSzemeszterForm($ADAT) {
+
+ $tanev = $ADAT['tanev'];
+
+ // szemeszterek száma tanévenként
+ for ($i = 0; $i < count($ADAT['szemeszterek']); $i++) $Tanevek[$ADAT['szemeszterek'][$i]['tanev']]++;
+ formBegin(array('class'=>'tankorSzemeszter'));
+ echo '<input type="hidden" name="action" value="tankorSzemeszter" />'."\n";
+ echo '<input type="hidden" name="tanev" value="'.$tanev.'" />'."\n";
+//hö?
+ if (isset($_POST['tanarId'])) echo '<input type="hidden" name="tanarId" value="'.$_POST['tanarId'].'" />'."\n";
+ if (isset($_POST['osztalyId'])) echo '<input type="hidden" name="osztalyId" value="'.$_POST['osztalyId'].'" />'."\n";
+ if (isset($_POST['mkId'])) echo '<input type="hidden" name="mkId" value="'.$_POST['mkId'].'" />'."\n";
+
+ echo '<table align="center">'."\n";
+
+ echo '<tr>'."\n";
+ echo '<th rowspan="2" class="bigleft">'._TANKOR.' ('.$tanev.')</th>'."\n";
+ for ($i = 0; $i < count($ADAT['szemeszterek']); $i++) {
+ if ($szTanev != $ADAT['szemeszterek'][$i]['tanev']) {
+ $szTanev = $ADAT['szemeszterek'][$i]['tanev'];
+ $colspan = $Tanevek[$szTanev];
+ $_class=array();
+ $_class[] = ekezettelen($ADAT['szemeszterek'][$i]['statusz']);
+ if ($tanev == $szTanev) $_class[] = 'aktualis';
+ echo '<th class="'.implode(' ',$_class).'" colspan="'.$colspan.'">';
+ echo $szTanev;
+ echo '</th>'."\n";
+ }
+ }
+ echo '</tr>'."\n";
+ echo '<tr>'."\n";
+ for ($i = 0; $i < count($ADAT['szemeszterek']); $i++) {
+ $_class=array();
+ $_class[] = ekezettelen($ADAT['szemeszterek'][$i]['statusz']);
+ if ($tanev == $ADAT['szemeszterek'][$i]['tanev']) $_class[] = 'aktualis';
+ echo '<th class="'.implode(' ',$_class).'">'.$ADAT['szemeszterek'][$i]['szemeszter'].'</th>'."\n";
+ }
+ echo '</tr>'."\n";
+
+ for ($i = 0; $i < count($ADAT['tankorok']); $i++) {
+
+ $tankorId = $ADAT['tankorok'][$i]['tankorId'];
+ echo '<tr>'."\n";
+
+ echo '<th title="'.substr($title,0,-2).'">';
+ echo '<a href="'.href('index.php?page=naplo&sub=intezmeny&f=tankorDiak&tankorId='.$ADAT['tankorok'][$i]['tankorId'].'&tanev='.$tanev).'">';
+ echo $ADAT['tankorok'][$i]['tankorNev'].' ('.$ADAT['tankorok'][$i]['tankorId'].')';
+ echo '</a>';
+ echo '<span class="tan">';
+ for ($j=0; $j<count($ADAT['tankorTanarok'][$tankorId]); $j++) {
+ echo '<br/>'.$ADAT['tankorTanarok'][$tankorId][$j]['tanarNev'].' ';
+ echo $ADAT['tankorTanarok'][$tankorId][$j]['minBeDt'].'--';
+ echo $ADAT['tankorTanarok'][$tankorId][$j]['maxKiDt'];
+ }
+ echo '</span>';
+ echo '</th>'."\n";
+ for ($j = 0; $j < count($ADAT['szemeszterek']); $j++) {
+ $szTanev = $ADAT['szemeszterek'][$j]['tanev'];
+ $szSzemeszter = $ADAT['szemeszterek'][$j]['szemeszter'];
+
+
+ $_class=array();
+ $_class[] = ekezettelen($ADAT['szemeszterek'][$j]['statusz']);
+ if ($tanev == $ADAT['szemeszterek'][$j]['tanev']) $_class[] = 'aktualis';
+ echo '<td class="'.implode(' ',$_class).'">';
+
+ if ($ADAT['szemeszterek'][$j]['statusz'] == 'lezárt') $disabled = ' disabled="disabled" ';
+ else $disabled = '';
+ $value = "$tankorId/$szTanev/$szSzemeszter";
+ $name = 'O_'.$tankorId.'_'.$szTanev.'_'.$szSzemeszter;
+ if (is_array($ADAT['tankorSzemeszter'][$tankorId][$szTanev][$szSzemeszter])) {
+ $szAdat = $ADAT['tankorSzemeszter'][$tankorId][$szTanev][$szSzemeszter];
+ $tankorNev = $szAdat['tankorNev'];
+ $title = $tankorNev;
+ echo '<input type="checkbox" name="T[]" value="'.$value.'" title="'.$title.'" checked="checked" '.$disabled.' />'."\n";
+ echo '<input size="1" maxlength="4" type="text" name="'.$name.'" value="'.$szAdat['oraszam'].'" '.$disabled.' />'."\n";
+ } else {
+ echo '<input type="checkbox" name="T[]" value="'.$value.'" title="" '.$disabled.' />'."\n";
+ echo '<input size="1" maxlength="4" type="text" name="'.$name.'" value="" '.$disabled.' />'."\n";
+ }
+
+ echo '</td>'."\n";
+ }
+ echo '</tr>'."\n";
+ }
+
+ echo '<tr>'."\n";
+ echo '<th colspan="'.(count($ADAT['szemeszterek'])+1).'"><input type="submit" value="'._OK.'" /></th>'."\n";
+ echo '</tr>'."\n";
+
+ echo '</table>'."\n";
+
+ formEnd();
+
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/tankorTanar.phtml b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/tankorTanar.phtml
new file mode 100644
index 00000000..78a9f417
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/tankorTanar.phtml
@@ -0,0 +1,103 @@
+<?php
+
+ function putTankorTanarForm($ADAT) {
+
+ if (!isset($ADAT['tankorok'])) return false;
+
+ formBegin(array('method'=>'post', 'id'=>'tankorTanarAssoc', 'class'=>'tankor', 'action'=>''));
+
+ //echo '<h2>'._TANTARGYFELOSZTAS.'</h2>';
+
+ echo '<input type="hidden" name="action" value="tankorTanarAssoc" />'."\n";
+ echo '<input type="hidden" name="tanev" value="'.$ADAT['tanev'].'" />'."\n";
+ echo '<input type="hidden" name="mkId" value="'.$ADAT['mkId'].'" />'."\n";
+ echo '<input type="hidden" name="refDt" value="'.$ADAT['refDt'].'" />'."\n";
+ echo '<input type="hidden" name="tankorId" value="'.$ADAT['tankorId'].'" />'."\n";
+# echo '<input type="hidden" name="kiDt" value="'.$ADAT['kiDt'].'" />'."\n";
+
+ echo '<table class="felosztas">';
+ echo '<tr><th>'._TANKOR.'</th><th>'._ORASZAM.'</th><th>'._AKTUALIS_TANAR.'<th colspan="1">'._VALASZTOTT_TANAR.'</th><th>'._IDOSZAK.'</th></tr>'."\n";
+ echo '<tr>';
+ for($i = 0; $i < count($ADAT['tankorok']); $i++) {
+ $_D = $ADAT['tankorok'][$i];
+ echo '<tr>';
+ echo '<td>';
+ echo '<a href="'.href('index.php?page=naplo&sub=intezmeny&f=tankorTanar&tankorId='.$_D['tankorId'].'&mkId='.$ADAT['mkId'].'&refDt='.$ADAT['refDt'].'&tanev='.$ADAT['tanev']).'">';
+ echo $_D['tankorNev']. ' ('.$_D['tankorId'].')';
+ echo '</a>'."\n";
+ echo '</td>';
+ echo '<td>';
+ echo '<a href="'.href('index.php?page=naplo&sub=intezmeny&f=tankor&tankorId='.$_D['tankorId']).'">';
+ echo sprintf('%01.1f',$_D['oraszam']);
+ echo '</a>';
+ echo '</td>';
+ echo '<td>';
+ echo '<ul>';
+ for($j = 0; $j < count($_D['tanarok']); $j++) {
+ echo '<li>';
+ echo $_D['tanarok'][$j]['tanarNev'];
+ echo '</li>'."\n";
+ }
+// for ($j=0; $j<count($ADAT['tankorTanarok'][$_D['tankorId']]); $j++) {
+// echo '<li>';
+// echo $ADAT['tankorTanarok'][$_D['tankorId']][$j]['tanarNev'];
+// echo ' ('.$ADAT['tankorTanarok'][$_D['tankorId']][$j]['minBeDt'].'--';
+// echo $ADAT['tankorTanarok'][$_D['tankorId']][$j]['maxKiDt'].')';
+// echo '</li>';
+// }
+ echo '</ul>';
+ echo '</td>';
+ // -- ELEJE nem jó, ha sok tankör adatait együtt módosítjuk! --
+ if (count($ADAT['tankorok']) == 1) {
+ echo '<td>';
+ echo '<input type="hidden" name="tankorok[]" value="'.$_D['tankorId'].'" />';
+ _putTanarSelect('TA'.$_D['tankorId'], $ADAT['tanarok'], $_D['tanarok']);
+ echo '</td>';
+ echo '<td>';
+ echo '<ul>';
+ for ($j=0; $j<count($ADAT['tankorTanarBejegyzesek'][$_D['tankorId']]); $j++) {
+ $_kulcs = $_D['tankorId'].'|'.$ADAT['tankorTanarBejegyzesek'][$_D['tankorId']][$j]['tanarId'].'|'.$ADAT['tankorTanarBejegyzesek'][$_D['tankorId']][$j]['beDt'].'|'.$ADAT['tankorTanarBejegyzesek'][$_D['tankorId']][$j]['kiDt']; // tankorId|tanarId|beDt|kiDt
+ echo '<li>';
+ echo $ADAT['tankorTanarBejegyzesek'][$_D['tankorId']][$j]['tanarNev'];
+ echo ': '.str_replace('-','.',$ADAT['tankorTanarBejegyzesek'][$_D['tankorId']][$j]['beDt']).'. &ndash; ';
+ if ($ADAT['tankorTanarBejegyzesek'][$_D['tankorId']][$j]['kiDt']=='') {
+ echo '<a href="'.href('index.php?page=naplo&sub=intezmeny&f=tankorTanar&action=tankorTanarJavit&kuuk='.$ADAT['kuuk'].'&tankorId='.$_D['tankorId'].'&tt='.$_kulcs).'"><span class="icon-wrench-alt"></span></a>';
+ } else {
+ echo str_replace('-','.',$ADAT['tankorTanarBejegyzesek'][$_D['tankorId']][$j]['kiDt']).'.';
+ }
+ echo '<a href="'.href('index.php?page=naplo&sub=intezmeny&f=tankorTanar&action=tankorTanarTorol&kuuk='.$ADAT['kuuk'].'&tankorId='.$_D['tankorId'].'&tt='.$_kulcs).'"><span class="icon-remove-circle"></span></a>';
+ echo '</li>';
+ }
+ echo '</ul>';
+ echo '</td>';
+ }
+ // -- VÉGE nem jó, ha sok tankör adatait együtt módosítjuk! --
+ echo '</tr>';
+ }
+ echo '</table>';
+ // -- ELEJE nem jó, ha sok tankör adatait együtt módosítjuk! --
+ if (count($ADAT['tankorok']) == 1) {
+ echo '<label for="igDt">'.$ADAT['refDt'].' - </label><input class="date" type="text" id="igDt" name="igDt" value="" /> ';
+ echo '<input type="submit" id="tankortanarassoc" value=" '._OK.' " />';
+ }
+ // -- VÉGE nem jó, ha sok tankör adatait együtt módosítjuk! --
+ formEnd();
+
+ }
+
+ function _putTanarSelect($name, $TANAROK, $TANITOK) {
+ for ($i = 0; $i < count($TANITOK); $i++) {
+ $TAN[] = $TANITOK[$i]['tanarId'];
+ $_class = "vantanara";
+ }
+ echo '<select name="'.$name.'[]" multiple="multiple" size="10" class="'.$_class.'">';
+ echo '<option value=""> - </option>';
+ for ($i = 0; $i < count($TANAROK); $i++) {
+ $_SEL = (is_array($TAN) && in_array($TANAROK[$i]['tanarId'], $TAN)) ? ' selected="selected" ' : '';
+ echo '<option value="'.$TANAROK[$i]['tanarId'].'"'.$_SEL.'>'.$TANAROK[$i]['tanarNev'].'</option>';
+ }
+ echo '</select>';
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/tankorTanarHozzarendeles.phtml b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/tankorTanarHozzarendeles.phtml
new file mode 100644
index 00000000..aa9747fc
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/tankorTanarHozzarendeles.phtml
@@ -0,0 +1,147 @@
+<?php
+
+ function putStatuszSor($ADAT) {
+
+ //TESZT echo '<img src="skin/classic/module-naplo/img/io/kreta.svg" style="height:24px; background-color:#30a8cb;">';
+
+ echo '<div id="statusz">';
+
+ echo '<span class="iicon-filter"></span>';
+
+ echo '<div id="limit">';
+ echo 'Elfogadható óraszám: '
+ .'<i>«kötelező óraszám»</i>'
+ .'<span class="icon-minus-sign" id="minusz"> 2'
+ .'<ul class="limit">'
+ .'<li class="setLimit">0</li><li class="setLimit">1</li><li class="setLimit selected">2</li><li class="setLimit">3</li><li class="setLimit">4</li>'
+ .'<li class="setLimit">5</li><li class="setLimit">6</li><li class="setLimit">7</li><li class="setLimit">8</li><li class="setLimit">9</li>'
+ .'</ul>'
+ .'</span>'
+ .' – '
+ .'<i>«kötelező óraszám»</i>'
+ .'<span class="icon-plus-sign" id="plusz"> 2'
+ .'<ul class="limit">'
+ .'<li class="setLimit">0</li><li class="setLimit">1</li><li class="setLimit selected">2</li><li class="setLimit">3</li><li class="setLimit">4</li>'
+ .'<li class="setLimit">5</li><li class="setLimit">6</li><li class="setLimit">7</li><li class="setLimit">8</li><li class="setLimit">9</li>'
+ .'</ul>'
+ .'</span>';
+ echo '</div>';
+
+ echo '<div id="stat">';
+ echo 'Tankörök száma: ';
+ echo '<span id="tankorDbKesz">'.$ADAT['tankorStat']['kesz'].'</span>/';
+ echo '<span id="tankorDbOsszes">'.$ADAT['tankorStat']['osszes'].'</span> = ';
+ echo '<span id="tankorDbSzazalek">'.number_format($ADAT['tankorStat']['kesz'] / $ADAT['tankorStat']['osszes'] * 100,1,',','').'%</span>';
+ echo '</div>';
+
+ echo '<div id="filter">';
+ echo '<span class="icon-search"></span>'
+ .' <span id="szuro" '.'data-szuro=\''.json_encode($ADAT['szuro']).'\' '.'>Szűrés</span> '
+ .'<span class="icon-chevron-right"></span>';
+ echo '</div>';
+
+
+
+ echo '</div>';
+
+ }
+
+ function putTankorTanarMatrix($ADAT) {
+
+ $COLORS = array(1=>'#198198',2=>'#298298',3=>'green',4=>'#ffaaaa',5=>'#aabbcc',6=>'#bbccaa',7=>'#ccaabb',8=>'#aaccbb',9=>'#aaccee','9Ny'=>'#ffccee',10=>'#ffaacc',11=>'#eeffbb',12=>'#ccddff');
+ $TANKOROK = $ADAT['tankorok'];
+ $TANAROK = $ADAT['tanarok'];
+ for ($i=0; $i<count($TANKOROK); $i++) {
+ $_T = $TANKOROK[$i];
+ $TARGYTANKOR[$_T['targyId']][] = $_T;
+ }
+
+ formBegin(array('id'=>'tantargyFelosztasForm'));
+ echo '<div style="100%;overflow-x:auto;overflow-y:auto" class="tanarTankor">';
+ echo '<table id="tt" cellpadding="1" cellspacing="1">';
+ echo '<thead>';
+ echo '<tr>';
+ echo '<th class="toggleKesz"><span id="keszTankorDb">'.$ADAT['keszTankorDb'].'</span> db kész/<span id="osszTankorDb">'.count($TANKOROK).'</span> db tankör</th>';
+ echo '<th rowspan="3" class="oraszam">Óraszám</th>';
+ $first = true;
+ foreach ($TARGYTANKOR as $_targyId => $_TA) {
+ if ($first) { $class=' class="first targy" '; $first=false; }
+ else { $class=' class="targy" '; }
+ echo '<th id="thTargy-'.$_targyId.'" colspan="'.count($_TA).'" data-targyid="'.$_targyId.'" data-colspan="'.count($_TA).'"'.$class.'>';
+ echo $ADAT['targyAdat'][$_targyId]['targyNev'];
+ echo '</th>';
+ }
+ echo '</tr>';
+ echo '<tr>';
+ echo '<th><span id="keszTanarDb">0</span> db kész/<span id="osszTanarDb">'.count($TANAROK).'</span> db tanár</th>';
+ $first = true;
+ foreach ($TARGYTANKOR as $_targyId => $TANKORSOR)
+ for ($i=0; $i<count($TANKORSOR); $i++) {
+ $_tankorAdat = $TANKORSOR[$i];
+ if ($first) { $class='first tankor'; $first=false; }
+ else { $class='tankor'; }
+ if (is_array($_tankorAdat['tanarIds'])) {
+ if (count($_tankorAdat['tanarIds']) > 1) $class .= ' tobb';
+ elseif (count($_tankorAdat['tanarIds']) == 1) $class .= ' kesz';
+ }
+ $class .= ' tdTargy-'.$_targyId;
+ if (!$_tankorAdat['bontasOk']) $class .= ' bontasHiba';
+ $color = $COLORS[substr($_tankorAdat['tankorNev'],0,strpos($_tankorAdat['tankorNev'],'.') )];
+ echo '<td id="col_'.$_tankorAdat['tankorId'].'" class="'.$class.'" style="background-color:'.$color.'"
+ data-tankorid="'.$_tankorAdat['tankorId'].'"
+ data-targyid="'.$_tankorAdat['targyId'].'"
+ data-tanardb="'.count($_tankorAdat['tanarIds']).'"
+ data-oraszam="'.number_format($_tankorAdat['hetiOraszam'],2,',','').'"
+ title="tankör óraszam: '.$_tankorAdat['tervezettOraszamok'][1]['tszOraszam'].', '.$_tankorAdat['tervezettOraszamok'][2]['tszOraszam']."\n"
+ .'bontás óraszam: '.$_tankorAdat['tervezettOraszamok'][1]['btOraszam'].', '.$_tankorAdat['tervezettOraszamok'][2]['btOraszam'].'"
+ >';
+ echo str_replace($ADAT['targyAdat'][$_tankorAdat['targyId']]['targyNev'].' ','',$_tankorAdat['tankorNev']);
+ echo '</td>';
+ }
+ echo '</tr>';
+ echo '</thead>'."\n";
+
+ for ($i=0; $i<count($TANAROK); $i++) { $_tanarAdat = $TANAROK[$i];
+ if ($i==0) $class='first tanar';
+ else $class='tanar';
+ foreach ($_tanarAdat['targyIds'] as $_targyId) $class .= ' targy'.$_targyId;
+ echo '<tr class="'.$class.'">';
+ echo '<th id="row_'.$_tanarAdat['tanarId'].'" data-tanarid="'.$_tanarAdat['tanarId'].'" class="tanarNev">';
+ echo $_tanarAdat['tanarNev'];
+ echo '('.$_tanarAdat['tanarId'].')'; // DEBUG TODO, legyen inkább a beépülő jobb sáv
+ echo '</th>';
+ echo '<td class="lekotott">';
+ echo '<span class="lekotott">'.number_format($_tanarAdat['lekotottOraszam'],2,',','').'</span>/';
+ echo '<span class="kotelezo">'.number_format($_tanarAdat['hetiKotelezoOraszam'],1,',','').'</span>';
+ echo '</td>';
+ $first = true;
+ foreach ($TARGYTANKOR as $_targyId => $TANKORSOR) {
+ for ($j=0; $j<count($TANKORSOR); $j++) {
+ $_tankorAdat = $TANKORSOR[$j];
+ if ($first) { $class='first tantan'; $first=false; }
+ else { $class='tantan'; }
+ $class .= ' col-'.$_tankorAdat['tankorId'].' row-'.$_tanarAdat['tanarId'];
+ if (in_array($_tankorAdat['targyId'], $_tanarAdat['targyIds'])) {
+ echo '<td id="cell_'.$_tanarAdat['tanarId'].'_'.$_tankorAdat['tankorId'].'" class="'.$class.'">';
+ $_CHK = in_array($_tanarAdat['tanarId'],$_tankorAdat['tanarIds']) ? 'checked="checked" ':'';
+ echo '<input type="checkbox" class="chkTT" name="tanarTankor[]" value="'.$_tanarAdat['tanarId'].'_'.$_tankorAdat['tankorId'].'" '.$_CHK.'/>';
+ echo '</td>';
+ } else {
+ echo '<td class="disable '. $class.'"></td>';
+ }
+ }}
+ echo '</tr>'."\n";
+ }
+ echo '</table>'."\n";
+ echo '</div>'."\n";
+ formEnd();
+ }
+
+ function _inarray($tanarId,$tankorTanar) {
+ for ($i=0;$i<count($tankorTanar);$i++) {
+ if ($tankorTanar[$i]['tanarId']== $tanarId) return true;
+ }
+ return false;
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/terem.phtml b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/terem.phtml
new file mode 100644
index 00000000..73cbede6
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/terem.phtml
@@ -0,0 +1,93 @@
+<?php
+
+ function putTeremLista($ADAT) {
+
+ echo '<div class="terem">'."\n";
+
+ echo '<table cellpassing="1" cellspacing="1">'."\n";
+
+ echo '<thead><tr>';
+ echo '<th>'._TEREMID.'</th>';
+ echo '<th>'._LEIRAS.'</th>';
+ echo '<th>'._FEROHELY.'</th>';
+ echo '<th>'._TIPUS.'</th>';
+ echo '<th>'._TELEPHELY.'</th>';
+ echo '</tr></thead>'."\n";
+ echo '<tfoot><tr></tr></tfoot>'."\n";
+ echo '<tbody>';
+ foreach ($ADAT['teremAdat'] as $teremId => $tAdat) {
+ echo '<tr>';
+ echo '<td>'.$tAdat['teremId'].'</td>';
+ echo '<td><a href="'.href('index.php?page=naplo&sub=intezmeny&f=terem&teremId='.$tAdat['teremId'].'&telephelyId='.$ADAT['telephelyId']).'">'.$tAdat['leiras'].'</a></td>';
+ echo '<td>'.$tAdat['ferohely'].'</td>';
+ echo '<td>'.$tAdat['tipus'].'</td>';
+ echo '<td>'.$ADAT['telephelyAdat'][ $tAdat['telephelyId'] ]['telephelyRovidNev'].'</td>';
+ echo '</tr>'."\n";
+ }
+ echo '</tbody>'."\n";
+
+ echo '</table>'."\n";
+
+ echo '</div>'."\n";
+
+ }
+
+ function putTeremForm($ADAT) {
+
+ $tAdat = $ADAT['teremAdat'][ $ADAT['teremId'] ];
+
+ formBegin(array('class'=>'terem','action'=>href('index.php?page=naplo&sub=intezmeny&f=terem')));
+
+ if ($ADAT['teremId']=='') {
+ echo '<input type="hidden" name="action" value="ujTerem" />'."\n";
+ echo '<input type="hidden" name="teremId" value="" />'."\n";
+ echo '<h1>'._UJ_TEREM.'</h1>';
+ } else {
+ echo '<input type="hidden" name="action" value="teremAdatModositas" />'."\n";
+ echo '<input type="hidden" name="teremId" value="'.$ADAT['teremId'].'" />'."\n";
+ echo '<h1>'.$tAdat['leiras'].'</h1>';
+ }
+
+
+ echo '<div class="tipus">'."\n";
+ echo '<label for="tipus">'._TIPUS.'</label>'."\n";
+ echo '<select name="tipus" id="tipus" >'."\n";
+ $tipusok = explode(',', $tAdat['tipus']);
+ foreach ($tipusok as $tipus) $SEL[$tipus] = ' selected="selected" ';
+ foreach ($ADAT['teremTipusok'] as $tipus) echo '<option value="'.$tipus.'"'.$SEL[$tipus].'>'.$tipus.'</option>'."\n";
+ echo '</select>'."\n";
+ echo '</div>'."\n";
+
+ echo '<div style="background-color: #eeeeee; text-align:left;">';
+
+ echo '<label for="teremId">'._TEREMID.'</label>'."\n";
+ echo '<span id="teremId">'.$ADAT['teremId'].'</span><br />';
+
+ echo '<label for="leiras">'._LEIRAS.'</label>'."\n";
+ echo '<input type="text" size="64" name="leiras" id="leiras" value="'.$tAdat['leiras'].'" /><br />'."\n";
+
+ echo '<label for="ferohely">'._FEROHELY.'</label>'."\n";
+ echo '<select name="ferohely" id="ferohely">'."\n";
+ $SEL = array($tAdat['ferohely'] => ' selected="selected" ');
+ echo '<option value=""> - </option>'."\n";
+ for ($i = 1; $i<1001; $i++) echo '<option value="'.$i.'"'.$SEL[$i].'>'.$i.'</option>'."\n";
+ echo '</select><br />'."\n";
+
+ echo '<label for="telephely">'._TELEPHELY.'</label>'."\n";
+ echo '<select name="telephelyId" id="telephely">'."\n";
+ $SEL = array($tAdat['telephelyId'] => ' selected="selected" ');
+ echo '<option value=""> - </option>'."\n";
+ foreach ($ADAT['telephelyAdat'] as $telephelyId => $tAdat) {
+ echo '<option style="color: black" value="'.$telephelyId.'"'.$SEL[$telephelyId].'>'.$ADAT['telephelyAdat'][$telephelyId]['telephelyRovidNev'].'</option>'."\n";
+ }
+ echo '</select><br />'."\n";
+
+ echo '</div>';
+ echo '<input type="submit" value="'._OK.'" />'."\n";
+
+ formEnd();
+
+ }
+
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/tovabbkepzes.phtml b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/tovabbkepzes.phtml
new file mode 100644
index 00000000..cafddee2
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/tovabbkepzes.phtml
@@ -0,0 +1,479 @@
+<?php
+
+ putTovabbkepzesNavi();
+ function putTovabbkepzesNavi() {
+
+ echo '<div id="tovabbkepzesNavi">';
+
+ echo '<button type="button" data-nav="" class="icon-repeat-alt">'.'</button>';
+ echo '<button type="button" data-nav="tovabbkepzesTerv">'._TOVABBKEPZES_TERV.'</button>';
+ echo '<button type="button" data-nav="tanarTovabbkepzesek">'._TANAROK_TOVABBKEPZESEI.'</button>';
+ echo '<button type="button" data-nav="tanarTovabbkepzesForduloDt">'._TANAR.'</button>';
+ echo '<button type="button" data-nav="ujTovabbkepzes">'._TOVABBKEPZESEK.'</button>';
+
+ echo '</div>';
+
+ }
+
+ function putTovabbkepzesTerv($ADAT) {
+
+ if (count($ADAT['lehetsegesTovabbkepzesek'])==0) return false;
+
+ $TOVABBKEPZESEK = reindex($ADAT['tovabbkepzesek'],array('tovabbkepzesId'));
+ $TANAROK = reindex($ADAT['tanarok'],array('tanarId'));
+ $TE_STATUSZ = array('','terv','jóváhagyott','elutasított','megszűnt','megszakadt','teljesített');
+ $TE_STATUSZ_INDIKATOR = array(
+ '' =>'<span class="icon-pause-alt" style="color:#777;"></span>',
+ 'terv' => '<span class="icon-ok-circle" style="color:cornflowerblue"></span>',
+ 'jóváhagyott' => '<span class="icon-ok-sign" style="color:green"></span>',
+ 'elutasított' => '<span class="icon-minus-sign" style="color:red"></span>',
+ 'megszakadt' => '<span class="icon-remove-sign" style="color:black"></span>',
+ 'megszűnt' => '<span class="icon-remove-sign" style="color:black"></span>',
+ 'teljesített' => '<span class="icon-star-alt" style="color:orange"></span>');
+
+ $TE = reindex($ADAT['tovabbkepzesTerv'],array('tovabbkepzesId','tanarId','tanev'));
+ formBegin(array('id'=>'tovabbkepzesTerv'));
+ echo '<h1>';
+ echo _TOVABBKEPZES_TERV.' – '.$ADAT['tanev'];
+ if (__TANAR) echo ' – '._USERCN;
+ if (__NAPLOADMIN || __VEZETOSEG || __TITKARSAG) echo ' – <a href="'.href('index.php?page=naplo&sub=nyomtatas&f=beiskolazasiTerv&tanev='.$ADAT['tanev']).'" class="icon-print" style="color:black"></a>';
+ echo '</h1>';
+ echo '<input type="hidden" name="action" value="ujTovabbkepzesTE" />';
+ echo '<input type="hidden" name="tanev" value="'.$ADAT['tanev'].'" />';
+ // Így is lehet, de inkább listázzuk ki az összes lehetséges továbbképzést
+ /*
+ echo '<select name="ujTovabbkepzesTanar">';
+ for ($i=0;$i<count($ADAT['lehetsegesTovabbkepzesek']); $i++) {
+ $_D = $ADAT['lehetsegesTovabbkepzesek'][$i];
+ echo '<option value="'.$_D['tovabbkepzesId'].'_'.$_D['tanarId'].'">'.$TOVABBKEPZESEK[$_D['tovabbkepzesId']][0]['tovabbkepzesNev'].' '.$TANAROK[$_D['tanarId']][0]['tanarNev'].'</option>';
+ }
+ echo '</select>';
+ */
+ echo '<table align="center" id="tovabbkepzesTerv" class="tovabbkepzes" cellspacing="1">';
+ echo '<thead>';
+ echo '<tr>';
+ echo '<th colspan="3">'._TOVABBKEPZES.'</th>';
+ echo '<th>'._TOVABBKEPZES_FORDULO_DT.'</th>';
+ echo '<th>'._RESZOSSZEG.'</th>';
+ echo '<th>'._TAMOGATAS.'</th>';
+ echo '<th>'._MEGJEGYZES.'</th>';
+ echo '<th colspan="2">'._STATUSZ.'</th>';
+ echo '</tr>';
+ echo '</thead>';
+ if (__MODOSITHAT) {
+ echo '<tfoot>';
+ echo '<tr><th colspan="4">'._TAMOGATASI_KERET.': <input type="text" class="currency" id="keretOsszeg" name="keretOsszeg" value="'.intval($ADAT['keretOsszeg']).'" /> Ft.-</th>';
+ echo '<td class="osszeg"><input type="text" class="sumCurrency" id="sumOsszeg_ok" disabled="disabled" value="0" /> Ft.-</td>';
+ echo '<td class="osszeg"><input type="text" class="sumCurrency" id="sumTamogatas_ok" disabled="disabled" value="0" /> Ft.-</td>';
+ echo '<th colspan="1" id="tamogatasInfo"></th>';
+ echo '<th colspan="2"><input type="submit" value="OK" /></th>';
+ echo '</th></tr></tfoot>';
+ }
+ echo '<tbody>';
+ for ($i=0;$i<count($ADAT['lehetsegesTovabbkepzesek']); $i++) {
+ $_D = $ADAT['lehetsegesTovabbkepzesek'][$i];
+ $_D_TE = $TE[$_D['tovabbkepzesId']][$_D['tanarId']][$ADAT['tanev']][0];
+ $_kulcs = $_D['tovabbkepzesId'].'_'.$_D['tanarId'].'_'.$ADAT['tanev'];
+ $_readOnly = (isset($_D_TE) && !in_array($_D_TE['tovabbkepzesStatusz'],array('terv'))) ? 'readonly="readonly"' : '';
+ if (!__MODOSITHAT && (!(__TANAR && $_D['tanarId']==__USERTANARID))) continue;;
+ echo '<tr class="tovabbkepzesTESor '.$_D_TE['tovabbkepzesStatusz'].'"
+ data-reszosszeg="'.$_D_TE['reszosszeg'].'"
+ data-tamogatas="'.$_D_TE['tamogatas'].'"
+ data-tanarnev="'.$TANAROK[$_D['tanarId']][0]['tanarNev'].'"
+ >';
+ echo '<th>';
+ echo '<input type="hidden" name="TE[]" value="'.$_kulcs.'" />';
+ echo $TE_STATUSZ_INDIKATOR[$_D_TE["tovabbkepzesStatusz"]];
+ echo '</th>';
+ echo '<td>';
+ echo $TOVABBKEPZESEK[$_D['tovabbkepzesId']][0]['tovabbkepzesNev'].' ';
+ echo '</td>';
+ echo '<td data-tanarid='.$_D['tanarId'].' class="tanarNev">'.$TANAROK[$_D['tanarId']][0]['tanarNev'].'</td>';
+
+ echo '<td>';
+ echo $TANAROK[$_D['tanarId']][0]['tovabbkepzesForduloDt'];
+ echo '</td>';
+
+ echo '<td class="osszeg">';
+ echo '<input type="text" '.$_readOnly.' class="currency" id="reszosszeg_'.$_kulcs.'" name="reszosszeg_'.$_kulcs.'" value="'.intval($_D_TE['reszosszeg']).'" data-inputtype="reszosszeg" data-kulcs="'.$_kulcs.'" data-tovabbkepzesstatusz="'.$_D_TE['tovabbkepzesStatusz'].'" /> Ft.-';
+ echo '</td>';
+ echo '<td class="osszeg">';
+ echo '<input type="text" '.$_readOnly.' class="currency" id="tamogatas_'.$_kulcs.'" name="tamogatas_'.$_kulcs.'" value="'.intval($_D_TE['tamogatas']).'" data-inputtype="tamogatas" data-kulcs="'.$_kulcs.'" data-tovabbkepzesstatusz="'.$_D_TE['tovabbkepzesStatusz'].'" /> Ft.-';
+ echo '</td>';
+ /* más kontrollok is elképzelhetők, pl input gombok
+ echo '<td>';
+ echo '<input type="submit" name="terv_'.$_kulcs.'" value="tervbe vesz" />';
+ echo '<input type="submit" name="jovahagy_'.$_kulcs.'" value="jóváhagy" />';
+ echo '<input type="submit" name="elutasit_'.$_kulcs.'" value="elutasít" />';
+ echo '<input type="submit" name="megszuntet_'.$_kulcs.'" value="megszűntet" />';
+ echo '</td>';
+ */
+ echo '<td style="text-align:center;">';
+ echo '<span style="cursor:zoom-in; padding:0px 30px;" class="tovabbkepzesMegjegyzes icon-list-alt" data-kulcs="'.$_kulcs.'" data-tovabbkepzesid="'.$_D['tovabbkepzesId'].'" data-tanarid="'.$_D['tanarId'].'" data-tanev="'.$ADAT['tanev'].'" ></span>';
+ echo '<div id="tovabbkepzesMegjegyzes_'.$_kulcs.'" style="display:none">';
+ echo '<table>';
+ echo '<tr><th>'._TAVOLLET.'</th><td><textarea style="display:none;" maxlength="254" cols="80" name="tavollet_'.$_kulcs.'">'.$_D_TE['tavollet'].'</textarea></td></tr>';
+ echo '<tr><th>'._HELYETTESITES_RENDJE.'</th><td><textarea style="display:none;" maxlength="254" cols="80" name="helyettesitesRendje_'.$_kulcs.'" />'.$_D_TE['helyettesitesRendje'].'</textarea></td></tr>';
+ echo '<tr><th>'._PRIORITAS.'</th><td><textarea style="display:none;" maxlength="254" cols="80" name="prioritas_'.$_kulcs.'">'.$_D_TE['prioritas'].'</textarea></td></tr>';
+ echo '</table>';
+ echo '</div>';
+ echo '</td>';
+ echo '<td>';
+ if (__MODOSITHAT===true) {
+ echo '<select name="TE_statusz_'.$_kulcs.'">';
+ for ($j=0; $j<count($TE_STATUSZ); $j++) {
+ $_SEL = ($TE_STATUSZ[$j]==$_D_TE['tovabbkepzesStatusz']) ? 'selected="selected"':'';
+ echo '<option name="'.$TE_STATUSZ[$j].'" '.$_SEL.'>'.$TE_STATUSZ[$j].'</option>';
+ }
+ echo '</select>';
+ } else {
+ echo $_D_TE['tovabbkepzesStatusz'];
+ }
+ echo '</td>';
+ echo '<th style="background-color:#888;">';
+ //$_kulcs = $_D['tovabbkepzesId'].'_'.$_D['tanarId'].'_'.$ADAT['tanev'];
+ echo '<a href="'.href('index.php?page=naplo&sub=nyomtatas&f=tovabbkepzesHatarozat&tanarId='.$_D['tanarId'].'&tanev='.$ADAT['tanev'].'&tovabbkepzesId='.$_D['tovabbkepzesId']).'" class="icon-print" style="color:white;"></a>';
+ echo '</th>';
+
+ echo '</tr>'."\n";
+ }
+ echo '</tbody>';
+ echo '</table>';
+ // extra: jovahagyasDt, teljesitesDt
+
+ if (count($ADAT['lehetsegesTovabbkepzesek'])>0) {
+ echo '<div id="grafikonTamogatas" style="width: 300px; height: 300px; display:table-cell"></div>';
+ echo '<div id="grafikonOsszegEloszlas" style="width: 550px; height: 300px; display:table-cell"></div>';
+ echo '<div style="clear:both"></div>';
+ }
+
+ formEnd();
+
+ }
+
+ function putTanarokTovabbkepzesAdatai($ADAT) {
+
+// $tovabbkepzesStatusz = array('terv','jóváhagyott','elutasított','megszűnt','megszakadt','teljesített');
+ $tovabbkepzesStatusz = array('teljesített','jóváhagyott','terv');
+
+ formBegin(array('id'=>'tanarTovabbkepzesForduloDt'));
+ echo '<input type="hidden" name="action" value="modTanarTovabbkepzesForduloDt" />';
+ echo '<input type="hidden" name="tanev" value="'.$ADAT['tanev'].'" />';
+ echo '<table align="center" id="tanarAdatok" class="tovabbkepzes" cellspacing="1">';
+ echo '<thead>';
+ echo '<tr>';
+ echo '<th colspan="1">';
+ _inlineHelp('A teljesített, jóváhagyott és tervezett továbbképzések összegét a státuszaiknak megfelelő színnel jelezzük az aktuális hét éves ciklusban. A nem akkreditált képzésnél maximum 30 órát számítunk!');
+ echo '</th>';
+ echo '<th colspan="3">'._TANAR.' ';
+ _inlineHelp('A táblázatban a tanárokra vonatkozó státuszok olvashatók. Ha egy tanár továbbképzés forduló dátuma a következő két évben várható és nem éri el a 120 órányi továbbképzést, figyelmeztető felkiáltó jellel jelezzük.');
+ echo '</th>';
+ echo '<th>'._HETI_KOTELEZO_ORASZAM.'</th>';
+ echo '<th>'._HETI_MUNKAORA.'</th>';
+ echo '<th>'._STATUSZ.'</th>';
+ echo '<th>';
+ _inlineHelp('A hétéves ciklus végének számít.');
+ echo ' '._TOVABBKEPZES_FORDULO_DT.' ';
+ echo '</th>';
+ echo '</tr>';
+ echo '</thead>';
+ echo '<tfoot>';
+ echo '<tr>';
+ echo '<th colspan="8"><input type="submit" value="OK" /></th>';
+ echo '</th></tr></tfoot>';
+ echo '<tbody>';
+ for ($i=0;$i<count($ADAT['tanarok']); $i++) {
+ $_D = $ADAT['tanarok'][$i];
+ $_TTC = $ADAT['tanarTovabbkepzesCiklus'][$_D['tanarId']];
+ $_forduloEv = date('Y',strtotime($_D['tovabbkepzesForduloDt']));
+ $_timeframeAlert = ($_forduloEv<=date('Y')+2);
+ $_evdiff = ($_forduloEv-date('Y'));
+ $_sum = 0;
+ $_class = ($_timeframeAlert) ? 'alert':'';
+ echo '<tr>';
+ echo '<th class="tovabbkepzesCiklus '.$_class.'" ';
+ foreach($tovabbkepzesStatusz as $_status) {
+ echo 'data-'.$_status.'="'.$_TTC[$_status][0]['sumOraszam'].'" ';
+ }
+ echo '>';
+ echo '<div>';
+ foreach($tovabbkepzesStatusz as $_status) {
+ if (($_c = intval($_TTC[$_status][0]['sumOraszam']))>0)
+ echo '<span title="'.$_status.'" class="'.ekezettelen($_status).'" style="width:'.$_c.'px">'.$_c.'</span>';
+ $_sum += $_c;
+ }
+ echo '</div>';
+ echo '<span class="forduloEv left">'.($_forduloEv-8).'/'.($_forduloEv-7).'</span>';
+ echo '<span class="forduloEv right">'.($_forduloEv-1).'/'.($_forduloEv).'</span>';
+ echo '</th>';
+ echo '<th>';
+ if ($_timeframeAlert) {
+ if ($_sum<120) {
+ if ($_evdiff>=0) $_class='alert'.$_evdiff;
+ else $_class='alert';
+ echo '<span class="icon-warning-sign '.$_class.'"></span>';
+ } else {
+ echo '<span class="icon-ok kesz"></span>';
+ }
+ } else {
+ if (is_array($ADAT['tovabbkepzesFolyamat'][$_D['tanarId']]))
+ echo '<span class="icon-play folyamatban"></span>';
+ else
+ echo '<span class="icon-pause varakozik"></span>';
+ }
+ echo '</th>';
+ echo '<td class="oraszam">';
+ echo $_sum;
+ echo '</td>';
+ echo '<td class="tanarNev" data-tanarid="'.$_D['tanarId'].'">'.$_D['tanarNev'].'</td>';
+ echo '<td class="oraszam">'.$_D['hetiKotelezoOraszam'].'</td>';
+ echo '<td class="oraszam">'.$_D['hetiMunkaora'].'</td>';
+ echo '<td>'.$_D['statusz'].'</td>';
+ echo '<td>';
+ echo '<select "tovabbkepzesForduloDt_'.$_D['tanarId'].'" data-tanarid="'.$_D['tanarId'].'" >';
+ echo '<option value=""></option>';
+ for ($y=1990;$y<=2030;$y++) {
+ $_SEL = ($y==date('Y',strtotime($_D['tovabbkepzesForduloDt']))) ? ' selected="selected" ':'';
+ echo '<option value="'.$y.'-08-31" '.$_SEL.'>'.$y.'</option>';
+ }
+ echo '</select>';
+ echo '<input type="text" class="datum" name="tovabbkepzesForduloDtTXT_'.$_D['tanarId'].'" value="'.$_D['tovabbkepzesForduloDt'].'" data-tanarid="'.$_D['tanarId'].'" readonly="readonly" />';
+ echo '</td>';
+ echo '</tr>';
+ }
+ echo '</tbody>';
+ echo '</table>';
+ formEnd();
+
+ }
+
+
+ function putTovabbkepzesek($ADAT) {
+ /* tovabbkepzesTanar:
+ `tovabbkepzesId` smallint(5) unsigned NOT NULL,
+ `tanarId` int(10) unsigned NOT NULL,
+ `tolDt` date NOT NULL,
+ `igDt` date DEFAULT NULL,
+ `tanusitvanyDt` date DEFAULT NULL,
+ `tanusitvanySzam` varchar(255) COLLATE utf8_hungarian_ci DEFAULT NULL,
+ */
+ if (count($ADAT['tovabbkepzesek'])==0) return false;
+
+ $TOVABBKEPZESEK = reindex($ADAT['tovabbkepzesek'],array('tovabbkepzesId'));
+ $TANAROK = reindex($ADAT['tanarok'],array('tanarId'));
+
+
+ /* Listázzuk a továbbképzések hozzárendelését egy tanárhoz, illetve új hozzárendelést is tehessünk */
+
+ formBegin(array('id'=>'tanarTovabbkepzesek'));
+ echo '<h1>'._TANAROK_TOVABBKEPZESEI.'</h1>';
+ echo '<input type="hidden" name="action" value="ujTovabbkepzesTanar" />';
+ echo '<input type="hidden" name="tanev" value="'.$ADAT['tanev'].'" />';
+ // legyen itt egy táblázat
+ echo '<table class="tovabbkepzes" align="center" cellspacing="1">';
+ echo '<thead>';
+ echo '<tr>';
+ echo '<th>'.'</th>';
+ echo '<th>'._TANAR.'</th>';
+ echo '<th colspan="2">'._TOVABBKEPZES.'</th>';
+ echo '<th>'._TOLDT.'</th>';
+ echo '<th>'._IGDT.'</th>';
+ echo '<th>'._TANUSITVANYDT.'</th>';
+ echo '<th>'._TANUSITVANYSZAM.'</th>';
+ echo '<th>'.'</th>';
+ echo '</tr>';
+ echo '</thead>';
+ if (__MODOSITHAT) { // a táblázat első sora egy inputokból álló sor
+ echo '<tfoot>';
+ echo '<tr><th colspan="10">';
+ echo '<input type="submit" value="OK" />';
+ echo '</tr>';
+ echo '</tfoot>';
+ echo '<tbody>';
+ echo '<tr>';
+ echo '<th><span class="icon-pencil-alt"></span></th>';
+ echo '<td>';
+ echo '<select style="width:120px" name="tanarId">';
+ echo '<option value=""></option>';
+ for ($i=0;$i<count($ADAT['tanarok']); $i++) {
+ $_D = $ADAT['tanarok'][$i];
+ echo '<option value="'.$_D['tanarId'].'">'.$_D['tanarNev'].'</option>';
+ }
+ echo '</select>';
+ echo '</td>';
+ echo '<td colspan="2">';
+ echo '<select name="tovabbkepzesId" class="tovabbkepzesNev">';
+ echo '<option value=""></option>';
+ for ($i=0;$i<count($ADAT['tovabbkepzesek']); $i++) {
+ $_D = $ADAT['tovabbkepzesek'][$i];
+ echo '<option value="'.$_D['tovabbkepzesId'].'">'.$_D['tovabbkepzesNev'].' '.$_D['oraszam'].'ó</option>';
+ }
+ echo '</select>';
+ echo '</td>';
+
+ echo '<td><input type="text" class="datum date" name="tolDt" /></td>';
+ echo '<td><input type="text" class="datum date" name="igDt" /></td>';
+ echo '<td><!--<input type="text" class="datum date" name="tanusitvanyDt" />--></td>';
+ echo '<td><!--<input type="text" class="" name="tanusitvanySzam" />--></td>';
+ echo '<th><input type="submit" value="+" /></th>';
+ echo '</tr>';
+ echo '</tbody>';
+ } // módosíthat
+ echo '<tbody>';
+ for ($i=0;$i<count($ADAT['tovabbkepzesTanar']);$i++) {
+ $_D = $ADAT['tovabbkepzesTanar'][$i];
+ $_kulcs = $_D['tovabbkepzesId'].'_'.$_D['tanarId'];
+ $_readonly = ($_D['tanusitvanyDt']!='0000-00-00' && $_D['tanusitvanyDt']!='') ? ' readonly="readonly" ':'';
+ echo '<tr class="tovabbkepzesTanarSor"
+ data-oraszam="'.intval($TOVABBKEPZESEK[$_D['tovabbkepzesId']][0]['oraszam']).'"
+ data-tanarnev="'.$TANAROK[$_D['tanarId']][0]['tanarNev'].'"
+ data-toldt="'.$_D['tolDt'].'"
+ data-igdt="'.$_D['igDt'].'">';
+ echo '<td>';
+ echo $_D['tovabbkepzesId'];
+ echo '<input type="hidden" name="tovabbkepzesTanar[]" value="'.$_kulcs.'" />';
+ echo '</td>';
+ echo '<td class="tanarNev" data-tanarid="'.$_D['tanarId'].'" >'.$TANAROK[$_D['tanarId']][0]['tanarNev'].'</td>';
+ echo '<td>'.$TOVABBKEPZESEK[$_D['tovabbkepzesId']][0]['tovabbkepzesNev'].'</td>';
+ echo '<td style="text-align:right;">'.$TOVABBKEPZESEK[$_D['tovabbkepzesId']][0]['oraszam'].'</td>';
+ echo '<td><input type="text" class="date" '.$_readonly.' name="tolDt_'.$_kulcs.'" value="'.$_D['tolDt'].'" /></td>';
+ echo '<td><input type="text" class="date" '.$_readonly.' name="igDt_'.$_kulcs.'" value="'.$_D['igDt'].'" /></td>';
+ echo '<td><input type="text" class="date" name="tanusitvanyDt_'.$_kulcs.'" value="'.$_D['tanusitvanyDt'].'" /></td>';
+ echo '<td><input type="text" class="" name="tanusitvanySzam_'.$_kulcs.'" value="'.$_D['tanusitvanySzam'].'" /></td>';
+ echo '<th>';
+ if (__MODOSITHAT) echo '<input type="submit" class="" name="tovabbkepzesTorles_'.$_kulcs.'" value="-" />';
+ echo '</th>';
+ echo '</tr>';
+ if ($_D['tolDt']!='0000-00-00' && $_D['tolDt']!='') $dbSor++;
+ }
+ echo '</tbody>';
+ echo '</table>';
+
+ if (($dbSor)>0) { // esettleg darabszám alapjn növelhetjük a méretet
+ if ($dbSor<20) $_height=40*$dbSor + 70;
+ else $_height = 600;
+ echo "<div id=\"timeline\" style=\"height: ".$_height."px; width:95%; margin:40px;\"></div>";
+ }
+ //echo '<div class="separator"></div>';
+ formEnd();
+
+ }
+
+ function putUjTovabbkepzes($ADAT) {
+
+ $KAT = array('diploma','szakvizsga','akkreditált','egyéb');
+
+ echo '<div id="ujTovabbkepzes">';
+ echo '<h1>'._TOVABBKEPZESEK.'</h1>';
+
+ formBegin();
+ echo '<h2>'._UJ_TOVABBKEPZES.'</h2>';
+ echo '<input type="hidden" name="action" value="ujTovabbkepzes" />';
+ echo '<input type="hidden" name="tanev" value="'.$ADAT['tanev'].'" />';
+
+ echo '<table>';
+
+ echo '<tfoot><tr>';
+ echo '<th colspan="2">'.'<input type="submit" value="OK" /></th>';
+ echo '</tr></tfoot>';
+
+ echo '<tbody>';
+ echo '<tr>';
+ echo '<th>';
+ echo _INTEZMENY;
+ echo '</th>';
+ echo '<td>';
+ echo '<select name="tovabbkepzoIntezmenyId">';
+ echo '<option value=""></option>';
+ for ($i=0; $i<count($ADAT['tovabbkepzoIntezmenyek']); $i++) {
+ $_D = $ADAT['tovabbkepzoIntezmenyek'][$i];
+ echo '<option value="'.$_D['tovabbkepzoIntezmenyId'].'">'.$_D['intezmenyRovidNev'].'-'.$_D['intezmenyNev'].'</option>';
+ }
+ echo '</select> ';
+ //_inlineHelp(_TOVABBPEZOINTEZMENY_HELP);
+ echo ' <span class="icon-plus-sign ujIntezmeny"></span>';
+// _inlineHelp(_TOVABBPEZOINTEZMENY_HELP);
+
+ echo '</td></tr>';
+ echo '<tr>';
+ echo '<th>'._TOVABBKEPZES_NEV.'</th>';
+ echo '<td><input type="text" name="tovabbkepzesNev" style="width:350px;"/></td>';
+
+ echo '</tr>';
+ echo '<tr>';
+ echo '<th>'._ORASZAM.'</th>';
+ echo '<td>'.'<input type="text" name="oraszam" /></td>';
+
+ echo '</tr>';
+ echo '<tr>';
+ echo '<th>'._AKKREDITALT.'</th>';
+ echo '<td>';
+ // '<input type="checkbox" name="akkreditalt" value="1" />';
+ echo '<select name="kategoria_'.$_kulcs.'">';
+ for ($j=0;$j<count($KAT); $j++) {
+ echo '<option value="'.$KAT[$j].'">'.$KAT[$j].'</option>';
+ }
+ echo '</select>';
+ echo '</td>';
+ echo '</tr>';
+ echo '</tbody>';
+ echo '</table>';
+
+ formEnd();
+
+
+ if (count($ADAT['tovabbkepzesek'])>0) {
+
+ formBegin(array('id'=>'tovabbkepzesek'));
+ echo '<h2>'._FELVETT_TOVABBKEPZESEK.'</h2>';
+ echo '<input type="hidden" name="action" value="modTovabbkepzes" />';
+ echo '<table align="center" class="tovabbkepzes" cellspacing="1">';
+ echo '<thead><tr>';
+ echo '<th>'._TOVABBKEPZES_NEV.'</th>';
+ echo '<th>'._ORASZAM.'</th>';
+ echo '<th>'._AKKREDITALT.'</th>';
+ echo '<th>'._INTEZMENY.'</th>';
+ echo '<th></th>';
+ echo '</tr></thead>';
+ echo '<tbody>';
+ for ($i=0; $i<count($ADAT['tovabbkepzesek']); $i++) {
+ $_D = $ADAT['tovabbkepzesek'][$i];
+ $_kulcs = $_D['tovabbkepzesId'];
+ echo '<tr>';
+ echo '<td>';
+ echo '<input type="hidden" name="tovabbkepzesId[]" value="'.$_D['tovabbkepzesId'].'" />';
+ echo '<input style="width:100%" type="text" name="tovabbkepzesNev_'.$_kulcs.'" value="'.$_D['tovabbkepzesNev'].'"/>';
+ echo '</td>';
+ echo '<td class="oraszam">';
+ echo '<input type="text" name="oraszam_'.$_kulcs.'" value="'.$_D['oraszam'].'" / > óra';
+ echo '</td>';
+ echo '<td>';
+ //echo '<input type="checkbox" name="akkreditalt_'.$_kulcs'" value="" /> ';
+ echo '<select name="kategoria_'.$_kulcs.'">';
+ for ($j=0;$j<count($KAT); $j++) {
+ $_SEL = ($KAT[$j]==$_D['kategoria']) ? ' selected="selected" ':'';
+ echo '<option name="'.$KAT[$j].'" '.$_SEL.'>'.$KAT[$j].'</option>';
+ }
+ echo '</select>';
+ if ($_D['akkreditalt']==1) echo ' '._AKKREDITALT;
+ echo '</td>';
+ echo '<td>';
+ echo $_D['intezmenyRovidNev'];
+ echo ' ('.$_D['tovabbkepzoIntezmenyId'].')';
+ echo '</td>';
+
+ echo '<td>';
+ echo '<input type="submit" value="OK" />';
+ echo '</td>';
+ echo '</tr>';
+ }
+ echo '</tbody>';
+ echo '</table>';
+ formEnd();
+ }
+
+ echo '</div>';
+
+ }
+
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/valtas.phtml b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/valtas.phtml
new file mode 100644
index 00000000..75e6f446
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/valtas.phtml
@@ -0,0 +1,85 @@
+<?php
+
+function putTanarLista($ADAT) {
+
+ echo '<table class="tanarLista" align="center" cellpadding="1" cellspacing="1">';
+ echo '<tr>';
+ for($i=0; $i<count($ADAT['tanarok']); $i++) {
+ $T = $ADAT['tanarok'][$i];
+ echo '<td>';
+ putFace($T['tanarId'],'tanar',30);
+ echo '</td><td>';
+ echo '<span class="tanarNev" data-tanarid="'.$T['tanarId'].'">'.$T['tanarNev'].'</span>';
+ if ($T['titulus']!='') echo '<div class="titulus">'.$T['titulus'].'</div>';
+ $osztalyai = ($ADAT['tanarOsztaly'][$T['tanarId']]);
+ for ($j=0; $j<count($osztalyai); $j++) {
+ $_osztalyId = $osztalyai[$j];
+ echo '<br/><div class="osztalyfonok" style="color:#aaa; font-size:smaller">osztályfőnök '.$ADAT['osztalyok'][$_osztalyId]['osztalyJel'];
+ echo ' ('.$ADAT['osztalyok'][$_osztalyId]['leiras'].')</div>';
+ }
+ $munkakozossegei = ($ADAT['tanarMunkakozosseg'][$T['tanarId']]); // vezetett
+ for ($j=0; $j<count($munkakozossegei); $j++) {
+ $_mkId = $munkakozossegei[$j];
+ echo '<div class="munkakozossegVezeto" style="color:#aaa; font-size:smaller">';
+ echo $munkakozossegei[$j]['munkakozossegNev']. ' munkaközösség-vezető';
+ echo '</div>';
+ }
+ echo '</td>';
+ if (($i+1) % 3 == 0 && $i!=count($ADAT['tanarok'])-1) echo '</tr><tr>';
+ }
+ echo '</tr>';
+ echo '</table>';
+}
+
+/*
+function putIntezmenyValaszto($Intezmenyek) {
+
+ formBegin();
+
+ echo '<input type="hidden" name="action" value="intezmenyValasztas" />'."\n";
+
+ echo '<select name="intezmeny">'."\n";
+ $SEL = array(__INTEZMENY => ' selected="selected"');
+
+ for ($i = 0; $i < count($Intezmenyek); $i++) {
+
+ $rovidnev = $Intezmenyek[$i]['rovidNev'];
+ if ($Intezmenyek[$i]['alapertelmezett'] == 1)
+ echo '<option value="'.$rovidnev.'" class="default"'.$SEL[$rovidnev].'>';
+ else
+ echo '<option value="'.$rovidnev.'"'.$SEL[$rovidnev].'>';
+
+ echo $Intezmenyek[$i]['nev'].' ('.$Intezmenyek[$i]['OMKod'].')';
+ echo '</option>'."\n";
+
+ }
+
+ echo '</select>'."\n";
+
+ echo '<input type="submit" value="'._OK.'" />'."\n";
+
+ formEnd();
+
+}
+
+function putTanevValaszto($Tanevek) {
+
+ formBegin();
+
+ echo '<input type="hidden" name="action" value="tanevValasztas" />'."\n";
+
+ echo '<select name="tanev">'."\n";
+ $SEL = array(__TANEV => ' selected="selected"');
+ for ($i = 0; $i < count($Tanevek); $i++) {
+ echo '<option value="'.$Tanevek[$i].'"'.$SEL[$Tanevek[$i]].'>';
+ echo $Tanevek[$i];
+ echo '</option>'."\n";
+ }
+ echo '</select>'."\n";
+
+ echo '<input type="submit" value="'._OK.'" />'."\n";
+
+ formEnd();
+}
+*/
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/verseny.phtml b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/verseny.phtml
new file mode 100644
index 00000000..2dcd0d84
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/verseny.phtml
@@ -0,0 +1,41 @@
+<?php
+
+function putVersenyek() {
+
+ echo '<h1>'._VERSENYEK.'</h1>';
+
+ formBegin();
+
+ echo '<input type="hidden" name="action" value="no-action" />'."\n";
+
+ echo '<input type="submit" value="'._OK.'" />'."\n";
+
+ formEnd();
+
+}
+
+function putUjVerseny($ADAT) {
+
+ formBegin();
+
+ echo _TARGY;
+ echo '<select name="targyId">';
+
+ echo '<option value=""></option>';
+ for($i=0; $i<count($ADAT); $i++) {
+ $targyId = $ADAT[$i]['targyId'];
+ $targyNev = $ADAT[$i]['targyNev'];
+ echo '<option value="'.$targyId.'">'.$targyNev.'</option>';
+ }
+
+ echo '</select>';
+
+ echo _VERSENYNEV;
+ echo '<input type="text" name="versenyNev" />';
+ echo '<input type="submit" value="'._OK.'" />'."\n";
+
+ formEnd();
+
+}
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/zaradek.phtml b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/zaradek.phtml
new file mode 100644
index 00000000..9382738e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/intezmeny/zaradek.phtml
@@ -0,0 +1,78 @@
+<?php
+
+ function putZaradekForm($ADAT) {
+ formBegin(array('class'=>'zaradek'));
+
+ echo '<input type="hidden" name="diakId" value="'.$ADAT['diakId'].'" />'."\n";
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalyId'].'" />'."\n";
+ echo '<input type="hidden" name="dt" value="'.$ADAT['dt'].'" />'."\n";
+ echo '<input type="hidden" name="zaradekIndex" value="'.$ADAT['zaradekIndex'].'" />'."\n";
+ echo '<input type="hidden" name="action" value="zaradekRogzites" />'."\n";
+
+ $tmp = explode('%', $ADAT['zaradek']['szoveg']);
+ $szoveg = '<p>';
+ for ($i = 0; $i < count($tmp); $i++) {
+ if ($i % 2 == 0) {
+ $szoveg .= $tmp[$i];
+ } else {
+ $szoveg .= '<span id="param'.intval(($i+1)/2).'span">'.$tmp[$i].'</span>';
+ }
+ }
+ $szoveg .= '</p>';
+
+ echo $szoveg;
+ echo '<table>';
+ for ($i = 0; $i < count($ADAT['params']); $i++) {
+ echo '<tr>';
+ echo '<th><label for="param'.$i.'">'.$ADAT['params'][$i].'</label></th>'."\n";
+ echo '<td><input type="text" name="values[]" value="" id="param'.($i+1).'" class="onChangeReplaceSpan" /></td>'."\n";
+ echo '</tr>';
+ }
+ echo '<tr><th>'._IKTATOSZAM.'</th><td>';
+ echo '<input type="text" name="iktatoszam" />';
+ echo '</td></tr>';
+ echo '</table>';
+
+ echo '<div><input type="submit" value="'._OK.'" /></div>'."\n";
+
+ formEnd();
+ }
+
+ function putDiakZaradekok($ADAT) {
+
+ formBegin(array('class'=>'diakZaradek'));
+ echo '<input type="hidden" name="diakId" value="'.$ADAT['diakId'].'" />';
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalyId'].'" />';
+ echo '<input type="hidden" name="action" value="zaradekTorles" />';
+ echo '<table>'."\n";
+
+ echo '<thead><tr>';
+ echo '<th>'._DATUM.'</th>';
+ echo '<th>'._SORSZAM.'</th>';
+ echo '<th>'._SZOVEG.'</th>';
+ echo '<th colspan="2">'._DOKUMENTUM.'</th>';
+ echo '</tr></thead>'."\n";
+ echo '<tfoot></tfoot>'."\n";
+ echo '<tbody>';
+ for ($i = 0; $i < count($ADAT['diakZaradekok']); $i++) {
+ echo '<tr>';
+ echo '<td>'.$ADAT['diakZaradekok'][$i]['dt'].'</td>';
+ echo '<td class="jobbra">'.$ADAT['diakZaradekok'][$i]['sorszam'].'</td>';
+ echo '<td>'.$ADAT['diakZaradekok'][$i]['szoveg'].'</td>';
+ echo '<td>'.$ADAT['diakZaradekok'][$i]['dokumentum'].'</td>';
+
+ echo '<td>';
+ if (__NAPLOADMIN) {
+ echo '<input class="confirm delZaradek" title="BIZTOS_TOROL_E" type="submit" value="X" name="del-'.$ADAT['diakZaradekok'][$i]['zaradekId'].'" />';
+ }
+ echo '</td>';
+
+ echo '</tr>'."\n";
+ }
+ echo '</tbody>'."\n";
+ echo '</table>'."\n";
+ formEnd();
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/koszi/esemenyAdmin.phtml b/mayor-orig/www/skin/classic/module-naplo/html/koszi/esemenyAdmin.phtml
new file mode 100644
index 00000000..b1483200
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/koszi/esemenyAdmin.phtml
@@ -0,0 +1,246 @@
+<?php
+
+ function putUjKosziEsemeny($ADAT) {
+
+ echo '<fieldset class="koszi"><legend>Új esemény</legend>';
+
+ formBegin();
+
+ echo '<input type="hidden" name="action" value="ujKosziEsemeny">';
+
+ echo _TIPUS;
+ echo '<select name="kosziEsemenyTipus">';
+ for ($i=0; $i<count($ADAT['kosziEsemenyTipusok']); $i++) {
+ $K = $ADAT['kosziEsemenyTipusok'][$i];
+ echo '<option value="'.$K.'">'.$K.'</option>'."\n";
+ }
+ echo '</select>';
+
+
+ echo '<br/>';
+ echo _NEV;
+ echo '<input type="text" name="kosziEsemenyNev" />';
+
+
+ echo '<br/>';
+ echo _LEIRAS;
+ echo '<input type="text" name="kosziEsemenyLeiras" size="88"/>';
+
+
+
+// echo _INTERVALLUM (igen/nem);
+
+ echo '<input type="submit" value="felvesz" />';
+
+ formEnd();
+ echo '</fieldset>'."\n";
+
+ }
+
+ function putKosziEsemenyek($ADAT) {
+
+ echo '<fieldset class="koszi"><legend>Köszi esemény minták</legend>';
+
+ formBegin();
+
+ echo '<select name="kosziEsemenyId">';
+ echo '<option value=""></option>';
+ for ($i=0; $i<count($ADAT['kosziEsemenyek']); $i++) {
+ $K = $ADAT['kosziEsemenyek'][$i];
+ $_SEL = ($ADAT['kosziEsemenyId'] == $K['kosziEsemenyId']) ? ' selected="selected" ':'';
+ echo '<option value="'.$K['kosziEsemenyId'].'" '.$_SEL.'>'.$K['kosziEsemenyNev'].' ('.$K['kosziEsemenyLeiras'].')</option>'."\n";
+ }
+ echo '</select>';
+ echo '<input type="submit" value="adatok »" />';
+
+ formEnd();
+ echo '</fieldset>';
+ }
+
+ function putKosziPont($ADAT) {
+
+ echo '<fieldset class="koszi"><legend>Kapható pontok</legend>';
+
+ echo '<table class="koszi">';
+ echo '<tr><th>'._PONTTIPUS.'</th><th>'._HELYEZES.'</th><th>'._PONT.'</th>'."\n";
+ for ($i=0; $i<count($ADAT['kosziPont']); $i++) {
+ $K = $ADAT['kosziPont'][$i];
+
+ echo '<tr>';
+ echo '<td>'.$K['kosziPontTipus'].'</td>';
+ echo '<td>'.$K['kosziHelyezes'].'</td>';
+ echo '<td>'.$K['kosziPont'].'</td>';
+ echo '</tr>';
+ }
+ echo '</table>'."\n";
+
+ echo '</fieldset>';
+
+
+
+ echo '<fieldset class="koszi"><legend>Új ponttípus</legend>';
+
+ formBegin();
+
+ echo '<input type="hidden" name="action" value="ujPont" />';
+ echo '<input type="hidden" name="kosziEsemenyId" value="'.$ADAT['kosziEsemenyId'].'" />';
+
+ echo '<select name="kosziPontTipus">';
+ for ($i=0; $i<count($ADAT['kosziPontTipusok']); $i++) {
+ $K = $ADAT['kosziPontTipusok'][$i];
+// $_SEL = ($ADAT['kosziEsemenyId'] == $K['kosziId']) ? ' selected="selected" ':'';
+ echo '<option value="'.$K.'" '.$_SEL.'>'.$K.'</option>'."\n";
+ }
+ echo '</select>';
+ echo '<select name="kosziHelyezes">';
+ echo '<optgroup label="helyezés">';
+ echo '<option></option>';
+ for ($i=1; $i<99; $i++) {
+ echo '<option value="'.$i.'" '.'>'.$i.'</option>'."\n";
+ }
+ echo '</optgroup>';
+ echo '</select>';
+ echo '<select name="kosziPont"><optgroup label="pont">';
+ for ($i=0; $i<99; $i++) {
+ echo '<option value="'.$i.'" '.'>'.$i.'</option>'."\n";
+ }
+ echo '</optgroup></select>';
+
+ echo '<input type="submit" value="rögzít" />';
+
+ formEnd();
+
+ echo '</fieldset>';
+
+ }
+
+
+ /* TANÉV */
+
+ function putKoszi($ADAT) {
+
+ echo '<fieldset class="koszi"><legend>Köszi események a tanévben</legend>';
+
+ formBegin();
+
+ echo '<input type="hidden" name="action" value="delKoszi" />';
+ echo '<input type="hidden" name="kosziEsemenyId" value="'.$ADAT['kosziEsemenyId'].'" />';
+
+ if (count($ADAT['koszi'])==0) {
+ echo '<div class="empty">'._NINCS.'</div>';
+ } else {
+ echo '<table class="koszi">';
+ echo '<tr><th>'._DATUM.'</th><th>'._FELEV.'</th><th>'._IGAZOLOK.'</th>'."\n";
+ for ($i=0; $i<count($ADAT['koszi']); $i++) {
+ $K = $ADAT['koszi'][$i];
+ echo '<tr>';
+ echo '<td>'.$K['dt'].'</td>';
+ echo '<td>'.$K['felev'].'</td>';
+ echo '<td>'.$K['igazolo'].'</td>';
+ echo '<td><input type="checkbox" name="kosziId[]" value="'.$K['kosziId'].'" /></td>';
+ echo '</tr>';
+ }
+ echo '</table>'."\n";
+ }
+
+ echo '<input type="submit" value="a kijelöltek végleges törlése" />';
+
+ formEnd();
+
+ echo '</fieldset>';
+
+
+
+ }
+
+ function putUjKoszi($ADAT) {
+
+ echo '<fieldset class="koszi"><legend>'._UJ_ESEMENY.'</legend>';
+
+ formBegin();
+
+ echo '<input type="hidden" name="action" value="ujKoszi">';
+ echo '<input type="hidden" name="kosziEsemenyId" value="'.$ADAT['kosziEsemenyId'].'" />';
+
+ echo '<table class="koszi" style="width:100%">';
+ echo '<tr><th>'._DATUM.'</th><th>'._JELENTKEZES.'</th><th colspan="3">'._IGAZOLOK.'</th>'."\n";
+
+ echo '<tr>';
+ echo '<td>';
+ echo '<input type="text" value="" name="dt" class="date" />';
+ echo '<br/>Félév:<select name="felev"><option value=""></option><option value="1">1</option><option value="2">2</option></select>';
+
+ echo '</td>';
+ echo '<td>';
+ echo '<input type="text" value="" name="tolDt" class="datetime" />-';
+ echo '<input type="text" value="" name="igDt" class="datetime" />';
+ echo '</td>';
+
+ echo '<td>';
+ // típus, aki igazolhat: diák osztályfőnöke
+ //echo '<input type="checkbox" name="igazolo[]" value="diák" />diák';
+ echo '<ul>';
+ echo '<li><input type="checkbox" name="igazolo[]" value="dök" />diákönkörmányzat</li>';
+ echo '<li><input type="checkbox" name="igazolo[]" value="tanár" />tanár</li>';
+ echo '<li><input type="checkbox" name="igazolo[]" value="osztályfőnök" />osztályfőnök</li>';
+ echo '</ul>';
+ echo '</td>';
+
+/* echo '<td>';
+ echo '<select name="osztalyfonokId[]" multiple="multiple">';
+ for ($i=0; $i<count($ADAT['osztalyok']); $i++) {
+ $K = $ADAT['osztalyok'][$i];
+ echo '<option value="'.($K['osztalyfonok']['tanarId']).'">';
+ echo $K['osztalyJel'].' - ';
+ echo $K['osztalyfonok']['tanarNev'];
+ echo '</option>';
+ }
+ echo '</select>';
+ echo '</td>';
+ echo '<td>';
+ echo '<select name="tanarId[]" multiple="multiple">';
+ for ($i=0; $i<count($ADAT['tanarok']); $i++) {
+ $K = $ADAT['tanarok'][$i];
+ echo '<option value="'.($K['tanarId']).'">';
+ echo $K['tanarNev'];
+ echo '</option>';
+ }
+ echo '</select>';
+ echo '</td>';
+ echo '<td>';
+ echo '<select name="diakId[]" multiple="multiple">';
+ for ($i=0; $i<count($ADAT['diakok']); $i++) {
+ $K = $ADAT['diakok'][$i];
+ echo '<option value="'.($K['diakId']).'">';
+ echo $K['diakNev'];
+ echo '</option>';
+ }
+ echo '</select>';
+ echo '</td>';
+*/
+
+ echo '<td>';
+ echo '<select name="targyId">';
+ echo '<option value=""> - tanár esetén, tárgyra szűkítés - </option>';
+ for ($i=0; $i<count($ADAT['targyak']); $i++) {
+ $K = $ADAT['targyak'][$i];
+ echo '<option value="'.($K['targyId']).'">';
+ echo $K['targyNev'];
+ echo '</option>';
+ }
+ echo '</select>';
+ echo '</td>';
+
+ echo '</tr>';
+
+ echo '</table>'."\n";
+
+ echo '<input type="submit" value="rögzít" />';
+
+ formEnd();
+
+ echo '</fieldset>';
+ }
+
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/koszi/koszi.phtml b/mayor-orig/www/skin/classic/module-naplo/html/koszi/koszi.phtml
new file mode 100644
index 00000000..2b580a8b
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/koszi/koszi.phtml
@@ -0,0 +1,277 @@
+<?php
+
+ function putKosziDiakLista($ADAT) {
+
+
+ if (count($ADAT['kosziDiakLista'])==0) return;
+
+ $KET = array('iskolai rendezvény','DÖK rendezvény','tanulmányi verseny','sportverseny','foglalkozás','tevékenység','hiányzás');
+
+ echo '<fieldset class="koszi"><legend>Ezekre az eseményekre jelentkeztél</legend>';
+
+ echo '<table class="koszi" align="center" cellspacing="1">';
+ echo '<tr class="head"><th>'._MIKOR.'</th><th colspan="3">'._ESEMENY.'</th><th>'._PONT.'</th>';
+//<th>'._PONT.'</th>'."\n";
+ for ($i=0; $i<count($ADAT['kosziDiakLista']); $i++) {
+ $K = $ADAT['kosziDiakLista'][$i];
+ if ($K['jovahagyva']==1) {
+ $pontsum += $K['pont'];
+ $_class = ' class="jovahagyva" ';
+ } else {
+ $_class='';
+ }
+ $l=array_keys($KET,$K['kosziEsemenyTipus']);
+
+ echo '<tr '.$_class.'>';
+ echo '<td>'.date('Y.m.d. H:i',strtotime($K['rogzitesDt'])).'</td>';
+ echo '<td><span class="tag tag'.$l[0].'">'.$K['kosziEsemenyTipus'].'</span></td>';
+ echo '<td>'.$K['kosziEsemenyNev'].'</td>';
+ echo '<td>'.$K['kosziEsemenyLeiras'].'</td>';
+ echo '<td class="r">'.($K['pont']).'</td>';
+ echo '</tr>';
+ }
+ echo '<tr class="foot"><th colspan="4" class="r">'._IDEN_ENNYIT.':</th><th class="r">'.$pontsum.'</th>';
+ echo '</table>'."\n";
+
+ echo '</fieldset>';
+
+
+ }
+
+
+ function putKosziLista($ADAT) {
+
+/*
+mysql> desc kosziDiak;
++--------------+------------------+------+-----+---------------------+-------+
+| Field | Type | Null | Key | Default | Extra |
++--------------+------------------+------+-----+---------------------+-------+
+| kosziId | int(10) unsigned | NO | PRI | NULL | |
+| diakId | int(10) unsigned | NO | PRI | NULL | |
+| rogzitesDt | timestamp | NO | | CURRENT_TIMESTAMP | |
+| jovahagyasDt | timestamp | NO | | 0000-00-00 00:00:00 | |
+| kosziPontId | int(10) unsigned | NO | MUL | NULL | |
+| pont | int(10) unsigned | NO | | NULL | |
++--------------+------------------+------+-----+---------------------+-------+
+*/
+
+
+ echo '<fieldset class="koszi"><legend>Jelentkezz!</legend>';
+ echo '<div class="koszi">';
+
+ formBegin();
+
+ echo '<input type="hidden" name="action" value="ujKosziDiak" />';
+ echo '<input type="hidden" name="kosziEsemenyId" value="'.$ADAT['kosziEsemenyId'].'" />';
+
+ echo '<select name="kosziId" class="onChangeSubmit">';
+ echo '<option value="" class="placeholder">Válassz!</option>';
+ for ($i=0; $i<count($ADAT['koszi']); $i++) {
+ $K = $ADAT['koszi'][$i];
+ $_SEL = ($ADAT['kosziId'] == $K['kosziId']) ? ' selected="selected" ':'';
+ $_leiras = $K['kosziEsemenyNev'].' '.$K['kosziEsemenyLeiras'].' '.$K['dt']. ' - '.$K['kosziEsemenyTipus'];
+ echo '<option value="'.$K['kosziId'].'" '.$_SEL.'>'.$_leiras.'</option>'."\n";
+ }
+ echo '</select>';
+ if ($ADAT['kosziId']!='') {
+ echo '<select name="kosziPontId">';
+ echo '<option value="" class="placeholder">Válassz!</option>';
+ for ($i=0; $i<count($ADAT['kosziPont']); $i++) {
+ $K = $ADAT['kosziPont'][$i];
+ $_leiras = $K['kosziPontTipus'].' ('.$K['kosziPont'].'pont)';
+ if ($K['kosziHelyezes']>0) $_leiras .= ' '.$K['kosziHelyezes'].'. helyezés';
+ echo '<option value="'.$K['kosziPontId'].'">'.$_leiras.'</option>'."\n";
+ }
+ echo '</select>';
+ }
+
+ echo '<input type="submit" value="köszi!" />';
+
+ formEnd();
+
+ echo '</div>';
+ echo '</fieldset>';
+
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+// ------------
+
+
+
+ function putKosziPont($ADAT) {
+
+ echo '<fieldset class="koszi"><legend>Kapható pontok</legend>';
+
+ echo '<table class="koszi">';
+ echo '<tr><th>'._PONTTIPUS.'</th><th>'._HELYEZES.'</th><th>'._PONT.'</th>'."\n";
+ for ($i=0; $i<count($ADAT['kosziPont']); $i++) {
+ $K = $ADAT['kosziPont'][$i];
+
+ echo '<tr>';
+ echo '<td>'.$K['kosziPontTipus'].'</td>';
+ echo '<td>'.$K['kosziHelyezes'].'</td>';
+ echo '<td>'.$K['kosziPont'].'</td>';
+ echo '</tr>';
+ }
+ echo '</table>'."\n";
+
+ echo '</fieldset>';
+
+
+
+ echo '<fieldset class="koszi"><legend>Új ponttípus</legend>';
+
+ formBegin();
+
+ echo '<input type="hidden" name="action" value="ujPont" />';
+ echo '<input type="hidden" name="kosziEsemenyId" value="'.$ADAT['kosziEsemenyId'].'" />';
+
+ echo '<select name="kosziPontTipus">';
+ for ($i=0; $i<count($ADAT['kosziPontTipusok']); $i++) {
+ $K = $ADAT['kosziPontTipusok'][$i];
+// $_SEL = ($ADAT['kosziEsemenyId'] == $K['kosziId']) ? ' selected="selected" ':'';
+ echo '<option value="'.$K.'" '.$_SEL.'>'.$K.'</option>'."\n";
+ }
+ echo '</select>';
+ echo '<select name="kosziHelyezes">';
+ echo '<optgroup label="helyezés">';
+ echo '<option></option>';
+ for ($i=1; $i<99; $i++) {
+ echo '<option value="'.$i.'" '.'>'.$i.'</option>'."\n";
+ }
+ echo '</optgroup>';
+ echo '</select>';
+ echo '<select name="kosziPont"><optgroup label="pont">';
+ for ($i=0; $i<99; $i++) {
+ echo '<option value="'.$i.'" '.'>'.$i.'</option>'."\n";
+ }
+ echo '</optgroup></select>';
+
+ echo '<input type="submit" value="rögzít" />';
+
+ formEnd();
+
+ echo '</fieldset>';
+
+ }
+
+
+ /* TANÉV */
+
+ function putKoszi($ADAT) {
+
+ echo '<fieldset class="koszi"><legend>Köszi események a tanévben</legend>';
+
+ formBegin();
+
+ echo '<input type="hidden" name="action" value="delKoszi" />';
+ echo '<input type="hidden" name="kosziEsemenyId" value="'.$ADAT['kosziEsemenyId'].'" />';
+
+ if (count($ADAT['koszi'])==0) {
+ echo '<div class="empty">'._NINCS.'</div>';
+ } else {
+ echo '<table class="koszi">';
+ echo '<tr><th>'._DATUM.'</th><th>'._FELEV.'</th><th>'._IGAZOLOK.'</th>'."\n";
+ for ($i=0; $i<count($ADAT['koszi']); $i++) {
+ $K = $ADAT['koszi'][$i];
+ echo '<tr>';
+ echo '<td>'.$K['dt'].'</td>';
+ echo '<td>'.$K['felev'].'</td>';
+ echo '<td>'.$K['igazolo'].'</td>';
+ echo '<td><input type="checkbox" name="kosziId[]" value="'.$K['kosziId'].'" /></td>';
+ echo '</tr>';
+ }
+ echo '</table>'."\n";
+ }
+
+ echo '<input type="submit" value="a kijelöltek végleges törlése" />';
+
+ formEnd();
+
+ echo '</fieldset>';
+
+
+
+ }
+
+ function putUjKoszi($ADAT) {
+
+ echo '<fieldset class="koszi"><legend>Köszi események a tanévben</legend>';
+
+ formBegin();
+
+ echo '<input type="hidden" name="action" value="ujKoszi">';
+ echo '<input type="hidden" name="kosziEsemenyId" value="'.$ADAT['kosziEsemenyId'].'" />';
+
+ echo '<table class="koszi">';
+ echo '<tr><th>'._DATUM.'</th><th>'._FELEV.'</th><th colspan="3">'._IGAZOLOK.'</th>'."\n";
+
+ echo '<tr>';
+ echo '<td><input type="text" value="" name="dt" class="date" /></td>';
+ echo '<td><select name="felev"><option value=""></option><option value="1">1</option><option value="2">2</option></select></td>';
+/*
+ echo '<td>';
+ echo '<input type="checkbox" name="igazolo[]" value="diák" />diák';
+ echo '<input type="checkbox" name="igazolo[]" value="tanár" />tanár';
+ echo '<input type="checkbox" name="igazolo[]" value="osztályfőnök" />osztályfőnök';
+ echo '</td>';
+*/
+ echo '<td>';
+ echo '<select name="osztalyfonokId[]" multiple="multiple">';
+ for ($i=0; $i<count($ADAT['osztalyok']); $i++) {
+ $K = $ADAT['osztalyok'][$i];
+ echo '<option value="'.($K['osztalyfonok']['tanarId']).'">';
+ echo $K['osztalyJel'].' - ';
+ echo $K['osztalyfonok']['tanarNev'];
+ echo '</option>';
+ }
+ echo '</select>';
+ echo '</td>';
+ echo '<td>';
+ echo '<select name="tanarId[]" multiple="multiple">';
+ for ($i=0; $i<count($ADAT['tanarok']); $i++) {
+ $K = $ADAT['tanarok'][$i];
+ echo '<option value="'.($K['tanarId']).'">';
+ echo $K['tanarNev'];
+ echo '</option>';
+ }
+ echo '</select>';
+ echo '</td>';
+ echo '<td>';
+ echo '<select name="diakId[]" multiple="multiple">';
+ for ($i=0; $i<count($ADAT['diakok']); $i++) {
+ $K = $ADAT['diakok'][$i];
+ echo '<option value="'.($K['diakId']).'">';
+ echo $K['diakNev'];
+ echo '</option>';
+ }
+ echo '</select>';
+ echo '</td>';
+ echo '</tr>';
+
+ echo '</table>'."\n";
+
+ echo '<input type="submit" value="rögzít" />';
+
+
+ formEnd();
+
+ echo '</fieldset>';
+
+ }
+
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/koszi/kosziAdmin.phtml b/mayor-orig/www/skin/classic/module-naplo/html/koszi/kosziAdmin.phtml
new file mode 100644
index 00000000..4b02f29e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/koszi/kosziAdmin.phtml
@@ -0,0 +1,331 @@
+<?php
+
+
+
+ function putKosziIgazolandoLista($ADAT) {
+
+ if (!is_array($ADAT['kosziIgazolando']) || count($ADAT['kosziIgazolando'])==0) return;
+
+ $KET = array('iskolai rendezvény','DÖK rendezvény','tanulmányi verseny','sportverseny','foglalkozás','tevékenység','hiányzás');
+
+ echo '<fieldset class="koszi"><legend>'._IGAZOLANDO.'</legend>';
+
+ echo '<table class="koszi" align="center" cellspacing="1">';
+ echo '<tr class="head"><th>'._MIKOR.'</th><th colspan="3">'._ESEMENY.'</th><th>'._PONT.'</th><th>'._NEV.'</th>';
+ echo '<th>'._TEENDO.'</th>'."\n";
+ for ($i=0; $i<count($ADAT['kosziIgazolando']); $i++) {
+ $K = $ADAT['kosziIgazolando'][$i];
+ $_class = ($K['jovahagyva']==1) ? ' class="jovahagyva" ' : '';
+
+ $l=array_keys($KET,$K['kosziEsemenyTipus']);
+ echo '<tr '.$_class.'>';
+ echo '<td>'.$K['rogzitesDt'].'</td>';
+ echo '<td><span class="tag tag'.$l[0].'">'.$K['kosziEsemenyTipus'].'</span></td>';
+ echo '<td>'.$K['kosziEsemenyNev'].'</td>';
+ echo '<td>'.$K['kosziEsemenyLeiras'].'</td>';
+ echo '<td>'.$K['pont'].'</td>';
+ echo '<td>'.$ADAT['diak'][$K['diakId']]['diakNev'].'</td>';
+ echo '<th>';
+//print_r($K);
+ formBegin();
+ echo '<input type="hidden" name="action" value="igazol" />';
+ echo '<input type="hidden" name="kosziId" value="'.$K['kosziId'].'" />';
+ echo '<input type="hidden" name="diakId" value="'.$K['diakId'].'" />';
+ echo '<input type="submit" name="accept" value="'._JOVAHAGY.'" class="accept" />';
+ echo '<input type="submit" name="decline" value="'._ELUTASIT.'" class="decline" />';
+ formEnd();
+ echo '</th>';
+
+ echo '</tr>';
+ }
+ echo '</table>'."\n";
+
+ echo '</fieldset>';
+
+
+ }
+
+
+
+
+//-.-------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+ function putKosziDiakLista($ADAT) {
+
+
+ if (count($ADAT['kosziDiakLista'])==0) return;
+
+ $KET = array('iskolai rendezvény','DÖK rendezvény','tanulmányi verseny','sportverseny','foglalkozás','tevékenység','hiányzás');
+
+ echo '<fieldset class="koszi"><legend>Ezekre az eseményekre jelentkeztél</legend>';
+
+ echo '<table class="koszi" align="center">';
+ echo '<tr class="head"><th>'._MIKOR.'</th><th colspan="3">'._ESEMENY.'</th><th>'._PONT.'</th>';
+//<th>'._PONT.'</th>'."\n";
+ for ($i=0; $i<count($ADAT['kosziDiakLista']); $i++) {
+ $K = $ADAT['kosziDiakLista'][$i];
+ $_class = ($K['jovahagyva']==1) ? ' class="jovahagyva" ' : '';
+
+ $l=array_keys($KET,$K['kosziEsemenyTipus']);
+
+ echo '<tr '.$_class.'>';
+ echo '<td>'.$K['rogzitesDt'].'</td>';
+ echo '<td><span class="tag tag'.$l[0].'">'.$K['kosziEsemenyTipus'].'</span></td>';
+ echo '<td>'.$K['kosziEsemenyNev'].'</td>';
+ echo '<td>'.$K['kosziEsemenyLeiras'].'</td>';
+ echo '<td class="r">'.($pontsum+=$K['pont']).'</td>';
+ echo '</tr>';
+ }
+ echo '<tr class="foot"><th colspan="4" class="r">'._IDEN_ENNYIT.':</th><th class="r">'.$pontsum.'</th>';
+ echo '</table>'."\n";
+
+ echo '</fieldset>';
+
+
+ }
+
+
+ function putKosziLista($ADAT) {
+
+/*
+mysql> desc kosziDiak;
++--------------+------------------+------+-----+---------------------+-------+
+| Field | Type | Null | Key | Default | Extra |
++--------------+------------------+------+-----+---------------------+-------+
+| kosziId | int(10) unsigned | NO | PRI | NULL | |
+| diakId | int(10) unsigned | NO | PRI | NULL | |
+| rogzitesDt | timestamp | NO | | CURRENT_TIMESTAMP | |
+| jovahagyasDt | timestamp | NO | | 0000-00-00 00:00:00 | |
+| kosziPontId | int(10) unsigned | NO | MUL | NULL | |
+| pont | int(10) unsigned | NO | | NULL | |
++--------------+------------------+------+-----+---------------------+-------+
+*/
+
+
+ echo '<fieldset class="koszi"><legend>Jelentkezz ezekre az eseményekre!</legend>';
+ echo '<div class="koszi">';
+
+ formBegin();
+
+ echo '<input type="hidden" name="action" value="ujKosziDiak" />';
+ echo '<input type="hidden" name="kosziEsemenyId" value="'.$ADAT['kosziEsemenyId'].'" />';
+
+ echo '<select name="kosziId" class="onChangeSubmit">';
+ echo '<option value="" class="placeholder">Válassz!</option>';
+ for ($i=0; $i<count($ADAT['koszi']); $i++) {
+ $K = $ADAT['koszi'][$i];
+ $_SEL = ($ADAT['kosziId'] == $K['kosziId']) ? ' selected="selected" ':'';
+ $_leiras = $K['kosziEsemenyNev'].' '.$K['kosziEsemenyLeiras'].' '.$K['dt']. ' - '.$K['kosziEsemenyTipus'];
+ echo '<option value="'.$K['kosziId'].'" '.$_SEL.'>'.$_leiras.'</option>'."\n";
+ }
+ echo '</select>';
+ if ($ADAT['kosziId']!='') {
+ echo '<select name="kosziPontId">';
+ echo '<option value="" class="placeholder">Válassz!</option>';
+ for ($i=0; $i<count($ADAT['kosziPont']); $i++) {
+ $K = $ADAT['kosziPont'][$i];
+ $_leiras = $K['kosziPontTipus'].' ('.$K['kosziPont'].'pont)';
+ if ($K['kosziHelyezes']>0) $_leiras .= ' '.$K['kosziHelyezes'].'. helyezés';
+ echo '<option value="'.$K['kosziPontId'].'">'.$_leiras.'</option>'."\n";
+ }
+ echo '</select>';
+ }
+
+ echo '<input type="submit" value="köszi!" />';
+
+ formEnd();
+
+ echo '</div>';
+ echo '</fieldset>';
+
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+// ------------
+
+
+
+ function putKosziPont($ADAT) {
+
+ echo '<fieldset class="koszi"><legend>Kapható pontok</legend>';
+
+ echo '<table class="koszi">';
+ echo '<tr><th>'._PONTTIPUS.'</th><th>'._HELYEZES.'</th><th>'._PONT.'</th>'."\n";
+ for ($i=0; $i<count($ADAT['kosziPont']); $i++) {
+ $K = $ADAT['kosziPont'][$i];
+
+ echo '<tr>';
+ echo '<td>'.$K['kosziPontTipus'].'</td>';
+ echo '<td>'.$K['kosziHelyezes'].'</td>';
+ echo '<td>'.$K['kosziPont'].'</td>';
+ echo '</tr>';
+ }
+ echo '</table>'."\n";
+
+ echo '</fieldset>';
+
+
+
+ echo '<fieldset class="koszi"><legend>Új ponttípus</legend>';
+
+ formBegin();
+
+ echo '<input type="hidden" name="action" value="ujPont" />';
+ echo '<input type="hidden" name="kosziEsemenyId" value="'.$ADAT['kosziEsemenyId'].'" />';
+
+ echo '<select name="kosziPontTipus">';
+ for ($i=0; $i<count($ADAT['kosziPontTipusok']); $i++) {
+ $K = $ADAT['kosziPontTipusok'][$i];
+// $_SEL = ($ADAT['kosziEsemenyId'] == $K['kosziId']) ? ' selected="selected" ':'';
+ echo '<option value="'.$K.'" '.$_SEL.'>'.$K.'</option>'."\n";
+ }
+ echo '</select>';
+ echo '<select name="kosziHelyezes">';
+ echo '<optgroup label="helyezés">';
+ echo '<option></option>';
+ for ($i=1; $i<99; $i++) {
+ echo '<option value="'.$i.'" '.'>'.$i.'</option>'."\n";
+ }
+ echo '</optgroup>';
+ echo '</select>';
+ echo '<select name="kosziPont"><optgroup label="pont">';
+ for ($i=0; $i<99; $i++) {
+ echo '<option value="'.$i.'" '.'>'.$i.'</option>'."\n";
+ }
+ echo '</optgroup></select>';
+
+ echo '<input type="submit" value="rögzít" />';
+
+ formEnd();
+
+ echo '</fieldset>';
+
+ }
+
+
+ /* TANÉV */
+
+ function putKoszi($ADAT) {
+
+ echo '<fieldset class="koszi"><legend>Köszi események a tanévben</legend>';
+
+ formBegin();
+
+ echo '<input type="hidden" name="action" value="delKoszi" />';
+ echo '<input type="hidden" name="kosziEsemenyId" value="'.$ADAT['kosziEsemenyId'].'" />';
+
+ if (count($ADAT['koszi'])==0) {
+ echo '<div class="empty">'._NINCS.'</div>';
+ } else {
+ echo '<table class="koszi">';
+ echo '<tr><th>'._DATUM.'</th><th>'._FELEV.'</th><th>'._IGAZOLOK.'</th>'."\n";
+ for ($i=0; $i<count($ADAT['koszi']); $i++) {
+ $K = $ADAT['koszi'][$i];
+ echo '<tr>';
+ echo '<td>'.$K['dt'].'</td>';
+ echo '<td>'.$K['felev'].'</td>';
+ echo '<td>'.$K['igazolo'].'</td>';
+ echo '<td><input type="checkbox" name="kosziId[]" value="'.$K['kosziId'].'" /></td>';
+ echo '</tr>';
+ }
+ echo '</table>'."\n";
+ }
+
+ echo '<input type="submit" value="a kijelöltek végleges törlése" />';
+
+ formEnd();
+
+ echo '</fieldset>';
+
+
+
+ }
+
+ function putUjKoszi($ADAT) {
+
+ echo '<fieldset class="koszi"><legend>Köszi események a tanévben</legend>';
+
+ formBegin();
+
+ echo '<input type="hidden" name="action" value="ujKoszi">';
+ echo '<input type="hidden" name="kosziEsemenyId" value="'.$ADAT['kosziEsemenyId'].'" />';
+
+ echo '<table class="koszi">';
+ echo '<tr><th>'._DATUM.'</th><th>'._FELEV.'</th><th colspan="3">'._IGAZOLOK.'</th>'."\n";
+
+ echo '<tr>';
+ echo '<td><input type="text" value="" name="dt" class="date" /></td>';
+ echo '<td><select name="felev"><option value=""></option><option value="1">1</option><option value="2">2</option></select></td>';
+/*
+ echo '<td>';
+ echo '<input type="checkbox" name="igazolo[]" value="diák" />diák';
+ echo '<input type="checkbox" name="igazolo[]" value="tanár" />tanár';
+ echo '<input type="checkbox" name="igazolo[]" value="osztályfőnök" />osztályfőnök';
+ echo '</td>';
+*/
+ echo '<td>';
+ echo '<select name="osztalyfonokId[]" multiple="multiple">';
+ for ($i=0; $i<count($ADAT['osztalyok']); $i++) {
+ $K = $ADAT['osztalyok'][$i];
+ echo '<option value="'.($K['osztalyfonok']['tanarId']).'">';
+ echo $K['osztalyJel'].' - ';
+ echo $K['osztalyfonok']['tanarNev'];
+ echo '</option>';
+ }
+ echo '</select>';
+ echo '</td>';
+ echo '<td>';
+ echo '<select name="tanarId[]" multiple="multiple">';
+ for ($i=0; $i<count($ADAT['tanarok']); $i++) {
+ $K = $ADAT['tanarok'][$i];
+ echo '<option value="'.($K['tanarId']).'">';
+ echo $K['tanarNev'];
+ echo '</option>';
+ }
+ echo '</select>';
+ echo '</td>';
+ echo '<td>';
+ echo '<select name="diakId[]" multiple="multiple">';
+ for ($i=0; $i<count($ADAT['diakok']); $i++) {
+ $K = $ADAT['diakok'][$i];
+ echo '<option value="'.($K['diakId']).'">';
+ echo $K['diakNev'];
+ echo '</option>';
+ }
+ echo '</select>';
+ echo '</td>';
+ echo '</tr>';
+
+ echo '</table>'."\n";
+
+ echo '<input type="submit" value="rögzít" />';
+
+
+ formEnd();
+
+ echo '</fieldset>';
+
+ }
+
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/naplo.phtml b/mayor-orig/www/skin/classic/module-naplo/html/naplo.phtml
new file mode 100644
index 00000000..e5d42bfc
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/naplo.phtml
@@ -0,0 +1,33 @@
+<?php
+
+ function putBeirasiAdatok($ADAT) {
+
+ /* DASHBOARD */
+
+ global $UdvozloKep,$skin;
+
+ if (!is_array($UdvozloKep) || count($UdvozloKep) == 0) $UdvozloKep = array('kutya','pingvin','smiley','garfield','majom');
+ echo '<div class="beirasAdatok">';
+ if ($ADAT['beiratlan'] == 0) {
+ if ($skin!='ajax') { // :(
+ $i = rand(0, count($UdvozloKep)-1);
+ echo '<img src="skin/classic/module-naplo/img/anim/'.$UdvozloKep[$i].'.gif" alt="anim gif" />';
+ }
+ echo _MINDEN_BEIRVA;
+ if (__JATEK_INSTALLED===true) {
+ echo '<p style="text-align:center"><a href="'.href('index.php?page=jatek&f=2048').'"><img src="/skin/classic/module-jatek/img/2048.png" alt="2048" /></a></p>';
+ }
+ } else {
+ echo '<span><a href="'.href('index.php?page=naplo&sub=haladasi&f=haladasi').'">'._BEIRATLAN_ORAK_SZAMA.': '.$ADAT['beiratlan'].'</a></span>';
+ }
+ echo '</div>';
+
+ }
+
+ function putBeirasiAdatokDiak() {
+ if (__JATEK_INSTALLED===true) {
+ echo '<p style="text-align:center"><a href="'.href('index.php?page=jatek&f=2048').'"><img src="/skin/classic/module-jatek/img/2048.png" alt="2048" /></a></p>';
+ }
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/nyomtatas/diakTankorJelentkezes.phtml b/mayor-orig/www/skin/classic/module-naplo/html/nyomtatas/diakTankorJelentkezes.phtml
new file mode 100644
index 00000000..ae808368
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/nyomtatas/diakTankorJelentkezes.phtml
@@ -0,0 +1,31 @@
+<?php
+
+ function putNyomtatasiBeallitasok($ADAT) {
+
+ formBegin(array('class'=>'nyomtat'));
+
+ echo '<input type="hidden" name="action" value="pdfGeneralas" />'."\n";
+ echo '<input type="hidden" name="szemeszterId" value="'.$ADAT['szemeszterAdat']['szemeszterId'].'" />'."\n";
+
+ echo '<h3>'._OSZTALYOK.'</h3>'."\n";
+
+ foreach ($ADAT['osztalyok'] as $osztalyId => $osztalyAdat) {
+
+ echo '<input type="checkbox" name="osztalyId[]" id="osztalyId'.$osztalyId.'" value="'.$osztalyId.'" />';
+ echo '<label for="osztalyId'.$osztalyId.'">';
+ echo $osztalyAdat['osztalyJel'];
+ echo '</label>'."\n";
+
+ }
+
+ echo '<br />';
+ echo '<label for="hatarido">'._LEADASI_HATARIDO.'</label>';
+ echo '<input type="text" name="leadasiHatarido" value="" id="hatarido" class="date" />'."\n";
+
+ echo '<br />';
+ echo '<input type="submit" value="'._OK.'" />'."\n";
+
+ formEnd();
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/nyomtatas/helyettesitesinaplo.phtml b/mayor-orig/www/skin/classic/module-naplo/html/nyomtatas/helyettesitesinaplo.phtml
new file mode 100644
index 00000000..8f83fe6e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/nyomtatas/helyettesitesinaplo.phtml
@@ -0,0 +1,17 @@
+<?php
+
+ function putDownloadForm($tolDt, $igDt) {
+
+ formBegin(array('class'=>'letolt'));
+
+ echo '<input type="hidden" name="action" value="naploGeneralas" />'."\n";
+ echo '<input type="hidden" name="tolDt" value="'.$tolDt.'" />'."\n";
+ echo '<input type="hidden" name="igDt" value="'.$igDt.'" />'."\n";
+
+ echo '<input type="submit" value="'._DOWNLOAD.'" />'."\n";
+
+ formEnd();
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/nyomtatas/osztalyozonaplo.phtml b/mayor-orig/www/skin/classic/module-naplo/html/nyomtatas/osztalyozonaplo.phtml
new file mode 100644
index 00000000..312b77d8
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/nyomtatas/osztalyozonaplo.phtml
@@ -0,0 +1,9 @@
+<?php
+
+ function putLetoltesLink($ADAT) {
+
+ echo '<a href="'.href($ADAT['letoltes']).'" class="letoltes">'._LETOLTES.'</a>';
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/nyomtatas/tankorNaplohozRendeles.phtml b/mayor-orig/www/skin/classic/module-naplo/html/nyomtatas/tankorNaplohozRendeles.phtml
new file mode 100644
index 00000000..b92337ce
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/nyomtatas/tankorNaplohozRendeles.phtml
@@ -0,0 +1,127 @@
+<?php
+/*
+ module: naplo
+*/
+
+ function putOsztalyTankorei($osztalyId, $ADAT) {
+
+ formBegin();
+ echo '<input type="hidden" name="action" value="tankorNaplohozRendeles" />';
+ echo '<input type="hidden" name="osztalyId" value="'.$osztalyId.'" />';
+
+ echo '<table class="tankorBealliras" align="center" cellspacing="1">';
+
+ echo '<thead>';
+ echo '<tr>';
+ echo '<th>'._TANKOR.'</th>';
+ echo '<th>'._JELOLT.'</th>';
+ echo '<th>'._NAPLO.'</th>';
+ echo '</tr>';
+ echo '</thead>';
+
+ echo '<tfoot>';
+ echo '<tr>';
+ echo '<th colspan="3">';
+ echo _JELOLT_TANKOROK_SZAMA.': '.count($ADAT['naploTankorei'][$osztalyId]);
+ echo '</th>';
+ echo '</tr>';
+ echo '<tr>';
+ echo '<th colspan="3">';
+ echo '<input type="submit" value="'._OK.'" />';
+ echo '</th>';
+ echo '</tr>';
+ echo '</tfoot>';
+
+ echo '<tbody>';
+ for ($i = 0; $i < count($ADAT['osztalyTankorei'][$osztalyId]); $i++) {
+ $tankorId = $ADAT['osztalyTankorei'][$osztalyId][$i];
+ $naplo = $ADAT['tankorNaploja'][$tankorId];
+ $tankorNev = $ADAT['tankorNeve'][$tankorId];
+ echo '<tr>';
+ echo '<th>'.$tankorNev.':'.$tankorId.'</th>';
+ if (isset($osztalyId)) {
+ echo '<td>';
+
+ if ($naplo == $osztalyId) $CHK = ' checked="checked" ';
+ else $CHK = '';
+
+ echo '<input type="checkbox" name="T[]" value="'."$tankorId/$osztalyId".'"'.$CHK.' />';
+
+ echo '</td>';
+ }
+ echo '<td>'.$ADAT['osztalyJele'][$naplo].'</td>';
+ echo '</tr>';
+ }
+ echo '</tbody>';
+ echo '</table>';
+ formEnd();
+
+ }
+
+ function putHozzarendelesekTorlese() {
+ formBegin();
+ echo '<div id="torlesForm">'."\n";
+ echo '<input type="hidden" name="action" value="hozzarendelesekTorlese" />'."\n";
+ echo '<input type="submit" value="'._HOZZARENDELES_ALAPHELYZETBE_ALLITASA.'">'."\n";
+ echo '</div>'."\n";
+ formEnd();
+ }
+
+ function putHianyzoTankorok($ADAT) {
+
+ echo '<table class="tankorBealliras" align="center" cellspacing="1">';
+
+ $Hianyzo = array();
+ for ($i = 0; $i < count($ADAT['tankorIds']); $i++) {
+ $tankorId = $ADAT['tankorIds'][$i];
+ if ($ADAT['tankorNaploja'][$tankorId] == '') $Hianyzo[] = $tankorId;
+ }
+
+ echo '<thead>';
+ echo '<tr>';
+ echo '<th>'._TANKOR.'</th>';
+ echo '</tr>';
+ echo '</thead>';
+
+ echo '<tfoot>';
+ echo '<tr>';
+ echo '<th colspan="1">';
+ echo _HIANYZO_TANKOROK_SZAMA.': '.count($Hianyzo);
+ echo '</th>';
+ echo '</tr>';
+ echo '</tfoot>';
+
+ echo '<tbody>';
+ for ($i = 0; $i < count($Hianyzo); $i++) {
+ $tankorId = $Hianyzo[$i];
+ echo '<tr>';
+// echo '<th>'.($i+1).'</th>';
+ echo '<th>'.$ADAT['tankorNeve'][$tankorId].'</th>';
+ echo '</tr>';
+ }
+ echo '</tbody>';
+ echo '</table>';
+ }
+
+ function putEloszlas($ADAT) {
+
+ if (!isset($osztalyId)) {
+ echo '<table class="tankorBealliras" align="center" cellspacing="1">';
+ echo '<thead>';
+ echo '<tr><th>'._OSZTALY.'</th><th>'._DB.'</th></tr>';
+ echo '</thead>';
+ echo '<tfoot>';
+ echo '<tr><th colspan="2"></th></tr>';
+ echo '</tfoot>';
+ echo '<tbody>';
+ for ($i = 0; $i < count($ADAT['osztalyok']); $i++) {
+ echo '<tr>';
+ echo '<th>'.$ADAT['osztalyok'][$i]['osztalyJel'].'</th>';
+ echo '<td>'.count($ADAT['naploTankorei'][ $ADAT['osztalyok'][$i]['osztalyId'] ]).'</td>';
+ echo '</tr>';
+ }
+ echo '</tbody>';
+ echo '</table>';
+ }
+
+ }
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/orarend/ascExport.phtml b/mayor-orig/www/skin/classic/module-naplo/html/orarend/ascExport.phtml
new file mode 100644
index 00000000..0fee8df7
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/orarend/ascExport.phtml
@@ -0,0 +1,142 @@
+<?php
+
+ function putExportForm($ADAT) {
+
+
+ formBegin(array('class'=>'export ok'));
+
+ echo '<h1>'._EXPORTALAS.'</h1>'."\n";
+
+ echo '<input type="hidden" name="action" value="ascExport" />'."\n";
+ echo '<input type="hidden" name="tanev" value="'.$ADAT['tanev'].'" />'."\n";
+ echo '<input type="hidden" name="dt" value="'.$ADAT['dt'].'" />'."\n";
+
+ if (count($ADAT['orarendiHet']) > 0) {
+ echo '<fieldset><legend>'._EXPORTALANDO_HET.'</legend>'."\n";
+ for ($i = 0; $i < count($ADAT['orarendiHet']); $i++) {
+ if ($ADAT['orarendiHet'][$i] == $ADAT['exportalandoHet'])
+ echo '<input id="het'.$i.'" type="radio" name="orarendiHet" value="'.$ADAT['orarendiHet'][$i].'" checked="checked" />'."\n";
+ else
+ echo '<input id="het'.$i.'" type="radio" name="orarendiHet" value="'.$ADAT['orarendiHet'][$i].'" />'."\n";
+ echo '<label for="het'.$i.'">'.$ADAT['orarendiHet'][$i].'</label>';
+ }
+ echo '</fieldset>'."\n";
+ }
+ echo '<br />';
+ if ($ADAT['szeminariumkent']==true) {
+ echo '<input type="checkbox" id="szeminariumkent" name="szeminariumkent" value="true" checked="checked" />';
+ } else {
+ echo '<input type="checkbox" id="szeminariumkent" name="szeminariumkent" value="true" />';
+ }
+ echo '<label for="szeminariumkent">'._EXPORT_SZEMINARIUMKENT_DIAKOKKAL.'</label>'."\n";
+
+ echo '<br />';
+ echo '<input type="checkbox" id="szakkorokkel" name="szakkorokkel" value="true" />';
+ echo '<label for="szakkorokkel">'._EXPORT_SZAKKOROKKEL.'</label>'."\n";
+
+ echo '<br />';
+ echo '<input id="blokkokNelkul" type="checkbox" name="blokkokNelkul" value="true" />';
+ echo '<label for="blokkokNelkul">'._BLOKKOK_NELKUL.'</label>'."\n";
+
+ echo '<br />';
+ echo '<input id="targyBontas" type="checkbox" name="targyBontas" value="true" />';
+ echo '<label for="targyBontas">'._TARGYAK_BONTASAVAL.'</label>'."\n";
+
+ echo '<br /><input type="submit" value="'._EXPORT.'" />'."\n";
+
+ echo '<br />'."\n";
+ echo '<a href="'
+ .href('index.php?page=session&f=download&download=true&dir=naplo/orarend/orarendBetolto&file=fromAsc.xml')
+ .'">'
+ .'<img src="skin/classic/module-session/img/download.gif" alt="Download" />'
+ ._EXPORT_SABLON_LETOLTESE
+ .'</a>'."\n";
+
+ if (defined('__LOADURL')) echo '<a href="'.__LOADURL.'" id="loadUrl" >'._DOWNLOAD.'</a>'."\n"; // Ha sikerült az export, akkor letöltés indítás
+ formEnd();
+ }
+
+
+ function putTobbszorosOraForm($ADAT) {
+
+ formBegin(array('class'=>'tobbszoros export'));
+
+ echo '<h1>'._TOBBSZOROS_ORAK.'</h1>'."\n";
+
+ echo '<input type="hidden" name="action" value="tobbszorosOra" />'."\n";
+ echo '<input type="hidden" name="tanev" value="'.$ADAT['tanev'].'" />'."\n";
+ echo '<input type="hidden" name="dt" value="'.$ADAT['dt'].'" />'."\n";
+
+// echo '<fieldset><legend>'._TOBBSZOROS_ORAK.'</legend>';
+ echo '<select name="bontasId">'."\n";
+ if (is_array($ADAT['tankorBlokk']['exportOraszam']))
+ echo '<option value=""> '._BONTANDO_TANKOR_BLOKK.' </option>'."\n";
+ echo '<optgroup label="'._BLOKKOK.'">';
+ foreach ($ADAT['tankorBlokk']['exportOraszam'] as $bId => $oraszam) if ($oraszam > 0) {
+ $blokkNev = $ADAT['tankorBlokk']['blokkNevek'][$bId];
+ echo '<option value="b-'.$bId.'">'."$blokkNev ($bId) -- $oraszam "._ORA.'</option>'."\n";
+ }
+ echo '</optgroup>'."\n";
+ echo '<optgroup label="'._TANKOROK.'">';
+ for ($i = 0; $i < count($ADAT['tankorok']); $i++) {
+ $tankorId = $ADAT['tankorok'][$i]['tankorId'];
+ $tankorNev = $ADAT['tankorok'][$i]['tankorNev'];
+ $hetiOraszam = $ADAT['tankorok'][$i]['hetiOraszam'];
+ echo '<option value="t-'.$tankorId.'">'."$tankorNev ($tankorId) -- $hetiOraszam "._ORA.'</option>'."\n";
+ }
+ echo '</optgroup>'."\n";
+ echo '</select>'."\n";
+ echo '<label for="oraBontas">'._ORABONTAS.'</label>'."\n";
+ echo '<input id="oraBontas" type="text" name="oraBontas" value="" />'."\n";
+// echo '</fieldset>'."\n";
+
+ if (count($ADAT['bontas']) > 0) {
+ echo '<br />';
+ echo '<label for="torlendoBontas">'._TORLENDO_BONTAS.'</label><br />';
+ echo '<select id="torlendoBontas" name="torlendoBontas[]" multiple="multiple">'."\n";
+ foreach ($ADAT['bontas'] as $bontasId => $bontas) {
+ list($tipus, $id) = explode('-', $bontasId);
+ if ($tipus == 't') {
+ $tankorIndex = $ADAT['tankorIndex'][$id];
+ $bontasNev = $ADAT['tankorok'][$tankorIndex]['tankorNev'];
+ } elseif ($tipus == 'b') {
+ $bontasNev = $ADAT['tankorBlokk']['blokkNevek'][$id];
+ }
+ echo '<option value="'.$bontasId.'">'.$bontasNev.' ('.$bontasId.') -- '.$bontas.' '._ORA.'</option>'."\n";
+ }
+ echo '</select>'."\n";
+ }
+ echo '<br /><input type="submit" value="'._OK.'" />'."\n";
+
+ formEnd();
+ }
+
+ function putBlokkOraszamForm($ADAT) {
+
+ formBegin(array('class'=>'blokk export'));
+
+ echo '<h1>'._ORARENDI_BLOKKOK.'</h1>'."\n";
+
+ echo '<input type="hidden" name="action" value="blokkOraszam" />'."\n";
+ echo '<input type="hidden" name="tanev" value="'.$ADAT['tanev'].'" />'."\n";
+ echo '<input type="hidden" name="dt" value="'.$ADAT['dt'].'" />'."\n";
+
+ echo '<ul class="blokk">';
+ foreach ($ADAT['tankorBlokk']['blokkNevek'] as $bId => $bNev) {
+ echo '<li>';
+ echo ' <select name="blokkOraszam[]">'."\n";
+ $SEL = array(floatval($ADAT['tankorBlokk']['exportOraszam'][$bId]) => ' selected="selected" ');
+ for ($i = 0; $i <= ceil($ADAT['tankorBlokk']['maxOraszam'][$bId]); $i = $i + 0.5) {
+ echo '<option value="'."$bId:$i".'" '.$SEL[$i].'>'.$i.' (exportálva '.ceil($i).' kártya/hét)'.'</option>'."\n";
+ }
+ echo '</select>';
+ echo $bNev.' ('.$bId.')';
+ echo '</li>'."\n";
+ }
+ echo '</ul>'."\n";
+ echo '<input type="submit" value="'._OK.'" />'."\n";
+
+ formEnd();
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/orarend/helyettesites.phtml b/mayor-orig/www/skin/classic/module-naplo/html/orarend/helyettesites.phtml
new file mode 100644
index 00000000..1f2668aa
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/orarend/helyettesites.phtml
@@ -0,0 +1,90 @@
+<?php
+
+ function putHelyettesitesTablazat($ADAT) {
+
+ if (count($ADAT['orak']['indexed'])==0) return false;
+
+ $TANAROK = $ADAT['tanarok'];
+ $TANKOROK = $ADAT['tankorok'];
+ echo '<h1 style="text-align: center">'.'</h1>';
+ // -----------------------------------------------
+ // FEJLÉC
+ // -----------------------------------------------
+ echo '<p><table align="center" class="helyettesitesek" >';
+ echo '<thead>'."\n";
+ echo '<tr >';
+ echo '<th colspan="5">Az órarendihez képest változó óra</th>';
+ echo '<th rowspan="2">A helyettesítés<br />jellege</th>';
+ echo '<th rowspan="2" style="background-color: #88aaa0">';
+ //echo '<a href="index.php?page=naplo&sub=orarend&f=helyettesit&dt='.$dt.'&lang='.$lang.'&order=3">';
+ echo 'Az órát tartó<br />tanár neve';
+ //if ($orderid==3) echo '<img src="/hu/img/start/arrow-down.jpg" alt="rendezés" />';
+ //echo '</a>';
+ echo '</th>';
+ echo '</tr>';
+ echo '<tr style="background-color: #99aab0;">';
+ echo '<th>óra</th>';
+ echo '<th>';
+ //echo '<a href="index.php?page=naplo&sub=orarend&f=helyettesit&dt='.$dt.'&lang='.$lang.'&order=1">';
+ echo 'osztály';
+ //if ($orderid==1) echo '<img src="/hu/img/start/arrow-down.jpg" alt="rendezés" />';
+ //echo '</a>';
+ echo '</th>';
+ echo '<th>tantárgy</th>';
+ echo '<th>';
+ //echo '<a href="index.php?page=naplo&sub=orarend&f=helyettesit&dt='.$dt.'&lang='.$lang.'&order=2">';
+ echo 'hiányzó';
+ //if ($orderid==2) echo '<img src="/hu/img/start/arrow-down.jpg" alt="rendezés" />';
+ //echo '</a>';
+ echo '</th>';
+ echo '<th>terem</th>';
+ echo '</tr>';
+ echo '</thead>';
+ echo '<tfoot>';
+ echo '<tr><th colspan="7">'.date('Y-m-d H:i:s').'</th></tr>';
+ echo '</tfoot>';
+ //----------------------------------------------------------
+ echo '<tbody>';
+ for($i=0; $i<count($ADAT['orak']['indexed']); $i++) {
+ $sor = $ADAT['orak']['indexed'][$i];
+ if ($sor['tipus']=='összevonás') {
+ $_kidn= $sor['ki'];
+ $_dt = $sor['dt'];
+ $_ora = $sor['ora'];
+ } else {
+ }
+ // hack out ki=kit saját magával összevont óra!
+ if ($sor['ki'] != $sor['kit'] && $sor['feladatTipusId']=='') {
+ echo '<tr class="'.$sor['eredet'].'">';
+ echo '<td align="center">'.$sor['ora'].'.</td>';
+ echo '<td align="center" colspan="2" >'.$TANKOROK[$sor['tankorId']]['tankorNev'].'&nbsp;&nbsp;</td>';
+ echo '<td >&nbsp;'.$TANAROK[$sor['kit']]['tanarNev'].'</td>';
+ echo '<td align="center">'.$ADAT['termek'][$sor['teremId']]['leiras'].'</td>';
+ echo '<td align="center">';
+ if ($sor['eredet']=='plusz')
+ if (in_array($sor['tipus'],array('elmarad','elmarad máskor')))
+ echo 'elmarad (plusz)';
+ else
+ echo 'megtartva (plusz) '.$sor['tipus'];
+ else
+ echo $sor['tipus'];
+ echo '</td>';
+ if ($sor['ki'] == '') {
+ echo '<th height="35">-</th>';
+ } else {
+ echo '<td height="35">';
+ echo '&nbsp;'.$TANAROK[$sor['ki']]['tanarNev'];
+ if ($sor['terem']!=$_terem) echo ' ('.$_terem.')';
+ echo '</td>';
+ }
+ echo '</tr>';
+ } // end of hackout
+
+ }
+ echo '</tbody>';
+ echo '</table>';
+
+ }
+
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/orarend/orarend.phtml b/mayor-orig/www/skin/classic/module-naplo/html/orarend/orarend.phtml
new file mode 100644
index 00000000..0a0174bb
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/orarend/orarend.phtml
@@ -0,0 +1,411 @@
+<?php
+
+ function csengetesiRend($csengetesiRendTipus, $telephelyId, $nap, $ora, $ADAT) {
+ $most = false;
+ if ($ADAT[$csengetesiRendTipus][$telephelyId][$nap][$ora]!='') $n = $nap;
+ elseif ($ADAT[$csengetesiRendTipus][$telephelyId][''][$ora]!='') $n = '';
+ else return array('kiir'=>'','most'=>false);
+ $b1 = explode(':',$ADAT[$csengetesiRendTipus][$telephelyId][$n][$ora][0]['tolTime']);
+ $r = intval($b1[0]).':'.$b1[1];
+ $b2 = explode(':',$ADAT[$csengetesiRendTipus][$telephelyId][$n][$ora][0]['igTime']);
+ $r .= '-'.intval($b2[0]).':'.$b2[1];
+ if ( ((date('H')*60+date('i')) >= ($b1[0]*60+$b1[1])) && ((date('H')*60+date('i')) <= ($b2[0]*60+$b2[1])) ) $most = true;
+ $R['kiir'] = $r;
+ $R['most'] = $most;
+ $R['dataTol'] = str_replace(':','',$ADAT[$csengetesiRendTipus][$telephelyId][$n][$ora][0]['tolTime']);
+ $R['dataIg'] = str_replace(':','',$ADAT[$csengetesiRendTipus][$telephelyId][$n][$ora][0]['igTime']);
+ return $R;
+ }
+
+ function putOrarend($ADAT) {
+ global $aHetNapjai,$skin;
+
+ /* Képzés-Mátrix */
+ //dump($ADAT['kepzesOraterv']);
+ if (is_array($ADAT['kepzesOraterv']) && count($ADAT['kepzesOraterv'])>0) {
+ $kepzes_figyel = true;
+ $KEPZES_MATRIX[2]=$ADAT['kepzesOraterv']['első nyelv']['sum'];
+ $KEPZES_MATRIX[3]=$ADAT['kepzesOraterv']['második nyelv']['sum'];
+ $KEPZES_MATRIX[1]=$ADAT['kepzesOraterv']['mintatantervi']['sum']
+ +$ADAT['kepzesOraterv']['kötelezően választható']['sum']
+ +$ADAT['kepzesOraterv']['szabadon választható']['sum']
+ ;
+ //dump($KEPZES_MATRIX);
+ } else $kepzes_figyel = false;
+ // ----------------
+ $multiTelephely = (count($ADAT['orarend']['telephelyIdk'])>1);
+ if ($multiTelephely) { echo '<!-- telephely debug info --'; var_dump($ADAT['orarend']['telephelyIdk']); echo '// -->'; }
+ for ($i=0; $i<count($ADAT['diakFelmentes']); $i++) {
+ $_D = $ADAT['diakFelmentes'][$i];
+ $FM[$_D['tankorId']][] = $_D;
+ }
+
+ // a lekérdezett órák között az órarendben szereplő órarendihetek
+ for ($nap=1; $nap<=$ADAT['hetiMaxNap']; $nap++) {
+ if (in_array($ADAT['orarend']['napok'][$nap]['tipus'],
+ array('tanítási nap','speciális tanítási nap'))) {$ERINTETTHETEK[$ADAT['orarend']['napok'][$nap]['het']] = true;
+ }
+ }
+ // --
+ // a haladási naplóban szereplő órarendi hetek
+ // ???
+ // --
+ // ==============================================================
+
+// if (is_array($ADAT['orarend']['assoc'])) {
+ if (TRUE) {
+ $T = $ADAT['orarend']['assoc'];
+ echo '<h2 class="toPrint">'.$ADAT['toPrint'].'</h2>';
+ echo '<table cellspacing="1" class="orarend '.$ADAT['orarendTipus'].'" align="center">'."\n";
+ echo '<thead>';
+ echo '<tr>';
+ if (is_array($ERINTETTHETEK)) {
+ echo '<th class="het">'.implode(',',array_keys($ERINTETTHETEK)).'.'._HET.'<br/><span style="font-size:xx-small">'.$ADAT['orarend']['db'].' '._ORA.'</span>'.'</th>';
+ } else {
+ echo '<th></th>';
+ }
+ for ($nap=1; $nap<=$ADAT['hetiMaxNap']; $nap++) {
+ // if ($skin=='pda'
+ // && in_array($ADAT['orarend']['napok'][$nap]['tipus'], array('tanítási nap','speciális tanítási nap'))
+ // && $ADAT['orarend']['napok'][$nap]['dt'] != date('Y-m-d')) continue;;
+ //
+
+ $_ma_class = ($nap==date('w') && $ADAT['orarend']['napok'][$nap]['dt']==date('Y-m-d')) ? 'ma': '';
+
+ $_th_class = ($ADAT['orarend']['napok'][$nap]['megjegyzes']=='') ? '': ' spec ';
+ $_th_class .= $_ma_class;
+ $_th_class .= (in_array($ADAT['orarend']['napok'][$nap]['csengetesiRendTipus'],array('','normál'))) ? '': ' spec '.ekezettelen($ADAT['orarend']['napok'][$nap]['csengetesiRendTipus']);
+
+ echo '<th class="'.$_th_class.'" data-napindex="'.$nap.'">';
+ $aznapErintettNap = array();
+ for ($b=0; $b<count($ADAT['napok'][$nap]); $b++) {
+ if ($ADAT['napok'][$nap][$b]['megjegyzes']!='') $aznapErintettNap['megjegyzes'][] = $ADAT['napok'][$nap][$b]['megjegyzes'];
+ }
+ if (!in_array($ADAT['orarend']['napok'][$nap]['csengetesiRendTipus'],array('normál',''))) $aznapErintettNap['megjegyzes'][] = $ADAT['orarend']['napok'][$nap]['csengetesiRendTipus'].' csengetés';
+
+ echo '<span class="napLeiras" title="'.$ADAT['orarend']['napok'][$nap]['dt'].'/'.$ADAT['orarend']['napok'][$nap]['het'].'">';
+ echo (count($aznapErintettNap['megjegyzes'])==0) ? $aHetNapjai[($nap-1)] : implode('; ',array_unique($aznapErintettNap['megjegyzes']));
+ echo '</span>';
+
+ if ($ADAT['orarend']['napok'][$nap]['dt']!='') {
+ echo '<div class="orarendTools">';
+ if (_POLICY=='public') {
+ echo ''.$ADAT['orarend']['napok'][$nap]['dt'].'/'.$ADAT['orarend']['napok'][$nap]['het'].'';
+ } else {
+ echo '<span class="icon-info-sign napAdat" data-napdt="'.$ADAT['orarend']['napok'][$nap]['dt'].'" title="'.$ADAT['orarend']['napok'][$nap]['dt'].'/'.$ADAT['orarend']['napok'][$nap]['het'].'"></span>';
+ }
+ if (_POLICY=='private' && in_array(__JEGYZETSZEREPTIPUS,array('diak','tanar'))) echo '<span class="icon-file-edit-alt jegyzet jegyzetAdat" data-jegyzetdt="'.$ADAT['orarend']['napok'][$nap]['dt'].'" data-jegyzetid="-1" title="új jegyzet"></span>';
+ if (_POLICY=='private' && __TANAR===true) {
+ if ($ADAT['kivalasztott'][0] == 'tankor') {
+ $_href = 'index.php?page=naplo&sub=osztalyozo&f=dolgozat&tankorId='.$ADAT['kivalasztott'][1];
+ } else {
+ $_href = 'index.php?page=naplo&sub=osztalyozo&f=dolgozat';
+ }
+ echo '<a href="'.href($_href).'"><span class="icon-idea-alt dolgozat" title="új dolgozat"></span></a>'; // dolgozat
+ }
+ echo '<span class="icon-remove-sign bezar" title="elrejt"></span>';
+ echo '</div>';
+ } else {
+ echo '<div class="orarendTools">'.$aHetNapjai[($nap-1)].'</div>'; // default
+ }
+
+ echo '</th>';
+ }
+ echo '</tr>';
+ echo '</thead>'."\n";
+
+ if (__ALLOWSET===true) {
+ $_footclass = ($ADAT['publikusOrarend']) ? 'publikus' : 'nempublikus';
+ echo '<tfoot class="'.$_footclass.'">';
+ echo '<tr><th colspan="'.($ADAT['hetiMaxNap']+1).'">';
+ if ($ADAT['publikusOrarend']) {
+ echo 'Ez az órarend publikus.';
+ } else {
+ formBegin();
+ echo '<input type="submit" name="gomb" value="legyen publikus" />';
+ echo '<input type="hidden" name="action" value="setPublic" />';
+ formEnd();
+ }
+ echo '</th>';
+ echo '</tr>';
+ echo '</tfoot>'."\n";
+ }
+ echo '<tbody>'."\n";
+// echo '<caption>'.$het.'. heti órarend</caption>';
+ if (count($ADAT['dolgozat']['tervezett'])>0 || count($ADAT['jegyzet'])>0) { $_jegyzetSorCss = ''; } else { $_jegyzetSorStyle = 'display:none;'; }
+ echo '<tr id="orarendJegyzetSor" class="orarendJegyzetSor" style="'.$_jegyzetSorStyle.'">';
+ echo '<th>';
+ echo 'dolgozatok, jegyzetek';
+ // echo '<span class="icon-info-sign"></span>';
+ echo '</th>';
+ for ($nap=1;$nap<=$ADAT['hetiMaxNap'];$nap++) {
+ $dt = $ADAT['NAPOK'][$nap-1];
+ $_ma_class = ($nap==date('w') && $ADAT['orarend']['napok'][$nap]['dt']==date('Y-m-d')) ? 'ma': '';
+ echo '<td class="jegyzetContainer" data-dt="'.$dt.'" data-napindex="'.$nap.'" class="'.$_ma_class.'">';
+ //dump($ADAT['dolgozat']['tervezett'][$dt]);
+ for ($d=0; $d<count($ADAT['dolgozat']['tervezett'][$dt]); $d++) {
+ $_dolgozatId = $ADAT['dolgozat']['tervezett'][$dt][$d];
+ echo '<div class="dolgozat dolgozatAdat" data-dolgozatid="'.$_dolgozatId.'">';
+ for ($t=0; $t<count($ADAT['dolgozat'][$_dolgozatId]['tankor']); $t++) {
+ echo $ADAT['dolgozat'][$_dolgozatId]['tankor'][$t]['tankorNev'].' ';
+ $TANKOR_DOLGOZAT[$ADAT['dolgozat'][$_dolgozatId]['tankor'][$t]['tankorId']][$dt] = $_dolgozatId;
+ }
+ echo '<br/>'.$ADAT['dolgozat'][$_dolgozatId]['dolgozatNev'];
+ echo '</div>';
+ // if (count($ADAT['dolgozat']['tervezett'][$dt])>$d+1) echo '<hr/>';
+ }
+ for ($d=0; $d<count($ADAT['jegyzet']); $d++) {
+ if ($ADAT['jegyzet'][$d]['dt']==$dt) {
+ $_JEGYZET = $ADAT['jegyzet'][$d];
+ $_jegyzetId = $_JEGYZET['jegyzetId'];
+ $_sajatJegyzet = ($_JEGYZET['userId'] === __JEGYZETSZEREPID && $_JEGYZET['userTipus']===__JEGYZETSZEREPTIPUS);
+ $_sajatJegyzetClass = $_sajatJegyzet ? '':'mase';
+ echo '<div class="jegyzet jegyzetAdat publikus'.$_JEGYZET['publikus'].' '.$_sajatJegyzetClass.'" data-jegyzetid="'.$_jegyzetId.'">';
+ // echo 'Jegyzet:';
+ echo makelinksclickable(supertext($_JEGYZET['jegyzetLeiras']));
+ if($_JEGYZET['userId']!=__JEGYZETSZEREPID || $_JEGYZET['userTipus']!=__JEGYZETSZEREPTIPUS) {
+ echo '<br/><i>@'.supertext($_JEGYZET['nev']).'</i>';
+ }
+ for ($_t=0; $_t<count($_JEGYZET['tankorok']); $_t++) {
+ $TANKOR_JEGYZET[$_JEGYZET['tankorok'][$_t]][$dt] = $_jegyzetId;
+ } // erre még nincs felkészítve a jegyzet.get
+ echo '</div>';
+ }
+ }
+ echo '</td>';
+ }
+ echo '</tr>';
+
+ for($ora=$ADAT['napiMinOra']; $ora<=$ADAT['napiMaxOra']; $ora++) {
+ echo '<tr>';
+ echo '<th data-oraindex="'.$ora.'">';
+ echo $ora;
+ /* az órarendben szereplő órákat vesszük csak figyelembe, a haladásit - egyelőre - nem */
+ //if (!$multiTelephely) // mindig az "elsőt" vesszük figyelembe!!!
+ $_telephelyId = $ADAT['orarend']['telephelyIdk'][0];
+ for ($nap=1;$nap<=7;$nap++) {
+ $_csengetesiRendTipus = $ADAT['orarend']['napok'][$nap]['csengetesiRendTipus'];
+ $_display = ($nap!= date('w') ? 'style="display:none;"':'');
+ $_CSR = csengetesiRend($_csengetesiRendTipus,$_telephelyId,$nap,$ora,$ADAT['csengetesiRend']);
+ $_csrclass = ($_CSR['most']===true) ? 'most':'';
+ echo '<div class="csr_'.$nap.' '.$_csrclass.'" '.$_display.' data-tol="'.$_CSR['dataTol'].'" data-ig="'.$_CSR['dataIg'].'">';
+ echo $_CSR['kiir'];
+ echo '</div>';
+ }
+ echo '</th>';
+ for ($nap=1; $nap<=$ADAT['hetiMaxNap']; $nap++) {
+ //$dt = $ADAT['orarend']['napok'][$nap]['dt'];
+ $dt = $ADAT['NAPOK'][$nap-1];
+ if ($skin=='pda'
+ && in_array($ADAT['orarend']['napok'][$nap]['tipus'], array('tanítási nap','speciális tanítási nap'))
+ && $dt != date('Y-m-d')) continue;;
+
+ $_eppTartClass = ($_CSR['most']===true && $nap==date('w')) ? 'eppTart':'';
+ $_ma_class = ($nap==date('w')) ? 'ma': '';
+
+ echo '<td class="csr '.$_eppTartClass.' '.$_ma_class.'" id="tdid_'.$het.'_'.$nap.'_'.$ora.'" data-napindex="'.$nap.'" data-oraindex="'.$ora.'">';
+ $het = 0;
+ $ORARENDI = array();
+ for($i=0; $i<count($T[$nap][$ora]['orak']); $i++) {
+ $_T = $T[$nap][$ora]['orak'][$i];
+ // itt a MAI naphoz viszonyítjuk, holott lehet hogy inkább a refDt-hez kéne. Megfontolandó.
+ $_frissClass = (_datediff(date('Y-m-d'),$_T['tolDt'],date('Y-m-d'))<5) ? ' friss animated shake ':'';
+ $ORARENDI[] = $_T['tankorId'];
+ //
+ $het = $_T['het'];
+ $_ORA = $ADAT['haladasi']['orak'][$dt][$ora][$_T['tankorId']];
+ $_valosTeremId = (is_null($_ORA['teremId']))? $_T['teremId']:$_ORA['teremId'];
+ $_tankorTipus = $ADAT['tankorok'][$_T['tankorId']][0]['tankorTipus'];
+ $_tankorTipusId = $ADAT['tankorok'][$_T['tankorId']][0]['tankorTipusId'];
+ $_oraMostVan = (in_array($_ORA['oraId'],$ADAT['orakMost']));
+ //
+ if ($kepzes_figyel
+ &&$ADAT['tankorTipus'][$_tankorTipusId]['oratervi'] == 'óratervi'
+ && $ADAT['tankorTipus'][$_tankorTipusId]['jelenlet'] == 'kötelező') {
+ if ($_tankorTipusId>3) $_tankorTipusId=1;
+ $KEPZES_MATRIX[$_tankorTipusId]--;
+ }
+ // Az órarendből a jelek:
+ $_targyJel = $_T['targyJel'];
+ $_osztalyJel = $_T['osztalyJel'];
+ // figyelem, itt jön a kiírás, a _putOra fv helyett:
+ $_tipusClass = str_replace(' ','_',$_ORA['tipus']);
+ $_oraMostVanClass = ($_oraMostVan) ? ' oraMostVan':'';
+ if ($_T['jelleg']=='osztályfüggetlen') {
+ $_tipusClass .= ' osztályfüggetlen';
+ }
+ $_oraAdat = (isset($_ORA['oo']) && _POLICY!='public') ? 'oraAdat' : ''; // haladási
+ $_hianyzasAdat = $ADAT['hianyzas'][$_ORA['oraId']][0];
+ $_hianyzasClass = (is_array($_hianyzasAdat) && $_hianyzasAdat['hTipus']=='hiányzás') ? ' nemVoltBent ':'';
+ echo '<div class="'.$_tipusClass.$_frissClass.$_oraMostVanClass.$_hianyzasClass.' '.$_oraAdat.'" data-oraid="'.$_ORA['oraId'].'" title="'.$_ORA['tipus'].'" >';
+
+ if (is_array($_hianyzasAdat)) {
+ echo '<span class="hianyzasTicker '.ekezettelen($_hianyzasAdat['hTipus']).' '.ekezettelen($_hianyzasAdat['statusz']).' '.ekezettelen($_hianyzasAdat['igazolas']).'">';
+ if ($_hianyzasAdat['hTipus']=='hiányzás')
+ echo '<span class="icon-hearing-impaired"></span>';
+ // echo '<span class="icon-bookmark"></span>';
+ if ($_hianyzasAdat['hTipus']=='késés') echo $_hianyzasAdat['perc'];
+ if ($_hianyzasAdat['hTipus']=='felszerelés hiány') echo 'fsz';
+ if ($_hianyzasAdat['hTipus']=='egyenruha hiány') echo 'eh';
+ if ($_hianyzasAdat['hTipus']=='felmentés') echo 'fm';
+ echo '</span>';
+ }
+
+ if (is_array($FM[$_T['tankorId']]) && count($FM[$_T['tankorId']])>0) {
+ $_FM = $FM[$_T['tankorId']];
+ for ($fm_i=0; $fm_i<count($_FM); $fm_i++) {
+ $__FM = $_FM[$fm_i];
+ if ($__FM['nap'] == $nap && ($__FM['ora']==$ora || is_null($__FM['ora'])) ) echo '<span style="float:left; background-color: lightgreen; border-radius:50%; padding:2px; font-size:smaller; color:white; border: solid 1px lime;">FM</span>';
+ }
+ }
+ if ($TANKOR_DOLGOZAT[$_T['tankorId']][$dt]>0) echo '<span style="color:orange;" class="icon-idea-alt" title="bejelentett dolgozat dolgozatAdat" data-dolgozatid="'.$TANKOR_DOLGOZAT[$_T['tankorId']][$dt].'"></span>';
+ if ($TANKOR_JEGYZET[$_T['tankorId']][$dt]>0) echo '<span style="color:lightgreen;" class="icon-file-edit-alt" title="jegyzet"></span>';
+ $_teremKiir = ($_T['teremId'] != $_valosTeremId) ? '<del>'.$ADAT['termek'][$_T['teremId']]['leiras'].'</del><ins>'.$ADAT['termek'][$_valosTeremId]['leiras'].'</ins>' : $ADAT['termek'][$_T['teremId']]['leiras'];
+ $_ferohely = $ADAT['termek'][$_valosTeremId]['ferohely'];
+ $_letszam = $ADAT['tankorLetszamok'][$_T['tankorId']];
+ if ($_T['tankorId']!='') {
+ echo '<span title="'.$_targyJel.' '.$_osztalyJel.' ('.$ADAT['tankorok'][$_T['tankorId']][0]['tankorId'].') '.$_tankorTipus.'" >';
+ echo $ADAT['tankorok'][$_T['tankorId']][0]['tankorNev'];
+ echo '</span>';
+ } else {
+ echo "$_targyjel : $_osztalyJel : ";
+ }
+ echo ', ';
+ echo '<span title="'.$_ferohely.'/'.$_letszam.'" class="t'.( ($_ferohely!=0 && $_ferohely<$_letszam) ? 0 : 1).'">'.$_teremKiir.'</span>';
+ echo '<br/>';
+ if ($_ORA['kit']!='') {
+ echo '<span class="helyett">';
+ echo $ADAT['tanarok'][$_T['tanarId']]['tanarNev'];
+ echo '</span>';
+ if ($_ORA['ki']!='') echo ' '.$ADAT['tanarok'][$_ORA['ki']]['tanarNev'];
+ } else {
+ echo $ADAT['tanarok'][$_T['tanarId']]['tanarNev'];
+ }
+
+ if (isset($_ORA['oo'])) {
+ if ($_ORA['leiras']!='') echo '<sup title="adminisztrálva">&#9679;</sup>';
+ else echo '<sup title="betöltve">&#9675;</sup>'; // &deg;
+ }
+ if (in_array($_tankorTipus,array('délutáni','tanórán kívüli'))) {
+ echo ' &sup1';
+ }
+
+ echo '</div>';
+ if (count($T[$nap][$ora]['orak'])>$i+1)
+ //echo '<hr />';
+ echo '<div style="height:1px; width:80%; margin:auto; background-color: #ccc;"></div>';
+ }
+ /* !!! Az orarendTankor összerendezőhöz állnak csak rendelkezésre ezek a fals adatok, és csak tanárnál...
+ --> lásd még: share/orarend.php
+ if (count($T[$nap][$ora]['orak'])==0) {
+ $het = $ADAT['orarend']['napok'][$nap]['het'];
+ if (count($ADAT['orarend']['orarendiOra'][$het][$nap][$ora])>0) {
+ $X = $ADAT['orarend']['orarendiOra'][$het][$nap][$ora];
+ for ($i=0; $i<count($X); $i++) {
+ echo '<div class="unfinished">';
+ echo $X[$i]['targyJel'].' : ';
+ echo $X[$i]['osztalyJel'].' : ';
+ echo $X[$i]['teremId'];
+ echo '</div>';
+ }
+ }
+ }
+ */
+ /* és ide jönnek a pluszok */
+ $j=0;
+ if (is_array($ADAT['haladasi']['orak'][$dt][$ora])) {
+ foreach ($ADAT['haladasi']['orak'][$dt][$ora] as $_tankorId => $__T) {
+ if (!is_array($ORARENDI) || !in_array($_tankorId,$ORARENDI)) {
+ if ($j!=0) echo '<hr/>'; $j++;
+ $_ORA = $ADAT['haladasi']['orak'][$dt][$ora];
+ _putOra($_ORA,$_tankorId,$TANKOR_DOLGOZAT);
+ }
+ }
+ }
+ echo '</td>'."\n";
+ }
+ echo '</tr>'."\n";
+ }
+ echo '</tbody>';
+ echo '<tbody>';
+ if ($kepzes_figyel) {
+ echo '<tr><td colspan="6" style="font-weight:normal;height:14px; background-color:#6495ED; color:white;">';
+ //echo '<div style="margin:auto; border-top:0px; border-bottom: solid 1px #555555; border-left: solid 1px #555555; border-right: solid 1px #555555; background-color:#C71585; color:white;">';
+ if ($KEPZES_MATRIX[1]!=0) echo 'Képzéshez viszonyított óraszám hiány: '.$KEPZES_MATRIX[1].' ';
+ if ($KEPZES_MATRIX[2]!=0) echo 'Első nyelv: '.$KEPZES_MATRIX[2].' ';
+ if ($KEPZES_MATRIX[3]!=0) echo 'Második nyelv: '.$KEPZES_MATRIX[3].' ';
+ //echo '</div>';
+ echo '</td></tr>';
+ }
+ echo '</tbody>';
+ echo '</table>'."\n\n<!-- EOT -->\n\n";
+
+// } // foreach
+
+ } else {
+ putOrarendPlain($ADAT);
+ }
+
+
+ }
+
+ function putOrarendPlain($ADAT) {
+ if (is_array($ADAT['orarend']['orarendiOra'])) {
+ foreach($ADAT['orarend']['orarendiOra'] as $het => $T) {
+ echo '<table class="orarend" align="center">'."\n";
+ echo '<caption>'.$het.'. heti órarend</caption>';
+ for($ora=$ADAT['napiMinOra']; $ora<=$ADAT['napiMaxOra']; $ora++) { // FIXME (getMinOra, getMaxOra konstansok!???)
+ echo '<tr>';
+ echo '<th>'.$ora.'</th>';
+ for ($nap=1; $nap<=$ADAT['hetiMaxNap']; $nap++) { // FIXME (getMaxNap)
+ echo '<td>';
+ $X = $ADAT['orarend']['orarendiOra'][$het][$nap][$ora];
+
+ for ($i=0; $i<count($X); $i++) {
+ echo '<div class="unfinished">';
+ echo $X[$i]['targyJel'].' : ';
+ echo $X[$i]['osztalyJel'].' : ';
+ echo $X[$i]['teremId'];
+ echo '</div>';
+ }
+ echo '</td>'."\n";
+ }
+ echo '</tr>'."\n";
+ }
+ echo '</table>'."\n\n<!-- EOT -->\n\n";
+ }
+ }
+ }
+
+ function _putOra($ORA,$_tankorId,$TANKOR_DOLGOZAT) {
+ global $ADAT;
+ if ($_tankorId=='') return false;
+ $_ORA = $ORA[$_tankorId];
+ $_tipusClass = str_replace(' ','_',$_ORA['tipus']);
+ $_eredetClass = $_ORA['eredet'];
+ echo '<div class="'.$_tipusClass.' '.$_eredetClass.'" title="'.$_ORA['tipus'].'" >';
+ if ($TANKOR_DOLGOZAT[$_tankorId][$_ORA['dt']]>0) echo '<span style="color:orange;" class="icon-idea-alt"></span>';
+ echo '<span title="'.$_targyJel.' '.$_osztalyJel.' ('.$ADAT['tankorok'][$_T['tankorId']][0]['tankorId'].')" >';
+ echo $ADAT['tankorok'][$_ORA['tankorId']][0]['tankorNev'];
+ echo '</span>';
+
+ echo ', '.$ADAT['termek'][$_ORA['teremId']]['leiras'];
+
+ echo '<br/>';
+
+ echo '<span class="helyett">';
+ echo $ADAT['tanarok'][$_T['tanarId']]['tanarNev'];
+ echo '</span>';
+ if ($_ORA['ki']!='') echo ' '.$ADAT['tanarok'][$_ORA['ki']]['tanarNev'];
+
+ if (isset($_ORA['oo'])) echo ' &deg;'; // else tervezett
+
+ echo '</div>';
+
+ }
+
+ function _datediff($dt1,$dt2) {
+ return round(abs(strtotime($dt1)-strtotime($dt2))/86400);
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/orarend/orarendBetolto.phtml b/mayor-orig/www/skin/classic/module-naplo/html/orarend/orarendBetolto.phtml
new file mode 100644
index 00000000..d6f037b0
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/orarend/orarendBetolto.phtml
@@ -0,0 +1,60 @@
+<?php
+
+ function putFileValaszto($ADAT) {
+
+ formBegin(array('class'=>'file'));
+
+ echo '<input type="hidden" name="action" value="fileBetoltes" />'."\n";
+ echo '<input type="hidden" name="tanev" value="'.$ADAT['tanev'].'" />'."\n";
+ echo '<input type="hidden" name="tolDt" value="'.$ADAT['tolDt'].'" />'."\n";
+ echo '<input type="hidden" name="igDt" value="'.$ADAT['igDt'].'" />'."\n";
+ echo '<input type="hidden" name="orarendiHet" value="'.$ADAT['orarendiHet'].'" />'."\n";
+
+ echo '<label for="fileName">'._FILENAME.'</label>'."\n";
+ echo '<input type="text" id="fileName" name="fileName" value="'.$ADAT['fileName'].'" /><br />';
+ echo '<input type="checkbox" checked="checked" name="lezaras" value="true" id="lezaras" /><label for="lezaras">'._LEZARAS.'</label><br />';
+ echo '<select name="conv">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ $SEL = array($ADAT['conv'] => ' selected="selected" ');
+ for ($i = 0; $i < count($ADAT['convert']); $i++) {
+ echo '<option value="'.$ADAT['convert'][$i].'"'.$SEL[ $ADAT['convert'][$i] ].'>'.$ADAT['convert'][$i].'</option>'."\n";
+ }
+ echo '</select>'."\n";
+
+ if ($ADAT['showForceOption']) {
+ echo '<br /><input id="force" type="checkbox" name="force" value="true" /><label for="force">'._FORCE.'</label>'."\n";
+ }
+
+ echo '<input type="submit" value="'._OK.'" />'."\n";
+
+ echo '<br />'."\n";
+ echo '<a href="'
+ .href('index.php?page=session&f=download&download=true&dir=naplo/orarend/orarendBetolto&file=fromAsc.xml')
+ .'">'
+ .'<img src="skin/classic/module-session/img/download.gif" alt="Download" />'
+ ._EXPORT_SABLON_LETOLTESE
+ .'</a>'."\n";
+
+ formEnd();
+ }
+
+ function putAdat($ORAK) {
+
+ echo '<table border="1">';
+
+ for ($i = 0; $i < count($ORAK); $i++) {
+ echo '<tr>';
+ for ($j = 0; $j < count($ORAK[$i]); $j++) {
+ echo '<td>';
+ echo $ORAK[$i][$j];
+ echo '</td>';
+ }
+
+ echo '</tr>';
+ }
+
+ echo '</table>';
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/orarend/orarendEllenorzes.phtml b/mayor-orig/www/skin/classic/module-naplo/html/orarend/orarendEllenorzes.phtml
new file mode 100644
index 00000000..cb44176f
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/orarend/orarendEllenorzes.phtml
@@ -0,0 +1,88 @@
+<?php
+
+ function putEredmeny($ADAT) {
+
+ global $aHetNapjai;
+
+ formBegin(array('class'=>'orarend'));
+
+ echo '<ol>';
+
+ echo '<li>';
+ echo '<h1>'._ORARENDIORA_TANKOR_ELLENORZES.'</h1>';
+ if (count($ADAT['check']['orarendiOraTankor']) > 0) {
+ echo '<ol class="kritikus">';
+ for ($i = 0; $i < count($ADAT['check']['orarendiOraTankor']); $i++) {
+ $A = $ADAT['check']['orarendiOraTankor'][$i];
+ echo '<li>';
+ echo $ADAT['tanarok'][ $A['tanarId'] ]['tanarNev'].' '.$A['het'],'. '._HET.' '.$aHetNapjai[ $A['nap']-1 ].' '.$A['ora'].'. '._ORA.': ';
+ echo '<strong>'.$A['osztalyJel'].' '.$A['targyJel'].'</strong>';
+ echo ' ('._ERVENYES.': '.$A['tolDt'].' - '.$A['igDt'].')';
+ echo '</li>';
+ }
+ echo '</ol>';
+ } else {
+ echo _OK;
+ }
+ echo '</li>'."\n";
+
+ echo '<li>';
+ echo '<h1>'._TANKOR_ORASZAM_ELLENORZES.'</h1>'."\n";
+ if (count($ADAT['check']['tankorOraszam']) > 0) {
+ echo '<ol>';
+ for ($i = 0; $i < count($ADAT['check']['tankorOraszam']); $i++) {
+ $A = $ADAT['check']['tankorOraszam'][$i];
+ echo '<li>';
+ echo $A['tankorNev'].' ('.$A['tankorId'].'): <strong>'.$A['tankorHetiOraszam'].' != '.$A['orarendHetiOraszam'].'</strong>';
+ echo '</li>';
+ }
+ echo '</ol>';
+ } else {
+ echo _OK;
+ }
+ echo '</li>'."\n";
+
+ echo '<li>';
+ echo '<h1>'._HIANYZO_TERMEK.'</h1>'."\n";
+ if (count($ADAT['check']['hianyzoTermek']) > 0) {
+ echo '<ol>';
+ for ($i = 0; $i < count($ADAT['check']['hianyzoTermek']); $i++) {
+ $A = $ADAT['check']['hianyzoTermek'][$i];
+ echo '<li>';
+ echo $A['tanarNev'].' '.$A['het'],'. '._HET.' '.$aHetNapjai[ $A['nap']-1 ].' '.$A['ora'].'. '._ORA.': ';
+ echo '<strong>'.$A['osztalyJel'].' '.$A['targyJel'].'</strong>';
+ echo '</li>';
+ }
+ echo '</ol>';
+ } else {
+ echo _OK;
+ }
+ echo '</li>'."\n";
+
+ echo '<li>';
+ echo '<h1>'._TEREMUTKOZES.'</h1>'."\n";
+ if (count($ADAT['check']['teremUtkozes']) > 0) {
+ echo '<ol>';
+ for ($i = 0; $i < count($ADAT['check']['teremUtkozes']); $i++) {
+ $A = $ADAT['check']['teremUtkozes'][$i];
+ echo '<li>';
+ echo $A['het'],'. '._HET.' '.$aHetNapjai[ $A['nap']-1 ].' '.$A['ora'].'. '._ORA.': ';
+ echo '<strong>'.$A['teremId'].'</strong>';
+ echo '</li>';
+ }
+ echo '</ol>';
+ } else {
+ echo _OK;
+ }
+ echo '</li>'."\n";
+
+ echo '</ol>';
+
+//echo '<hr><pre>';
+//var_dump($ADAT['check']['teremUtkozes']);
+//echo '</pre>';
+ formEnd();
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/orarend/orarendLoad.phtml b/mayor-orig/www/skin/classic/module-naplo/html/orarend/orarendLoad.phtml
new file mode 100644
index 00000000..04a59fb4
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/orarend/orarendLoad.phtml
@@ -0,0 +1,26 @@
+<?php
+
+ function putJelIdForm($ADAT) {
+
+ formBegin();
+ echo '<input type="hidden" name="action" value="jelid" />';
+ for ($i=0; $i<count($ADAT['missing']); $i++) {
+ echo $ADAT['missing'][$i];
+
+ echo '<select name="jelid[]">';
+ echo '<option value=""></option>';
+ for ($j=0; $j<count($ADAT['tanarok']); $j++) {
+ echo '<option value="'.$ADAT['missing'][$i].'_'.$ADAT['tanarok'][$j]['tanarId'].'">'.$ADAT['tanarok'][$j]['tanarNev'].'</option>';
+ }
+ echo '</select>'."\n";
+
+ echo '<br/>';
+
+ }
+ echo '<input type="submit" />';
+
+ formEnd();
+ }
+
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/orarend/orarendModosito.phtml b/mayor-orig/www/skin/classic/module-naplo/html/orarend/orarendModosito.phtml
new file mode 100644
index 00000000..bd9b13c1
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/orarend/orarendModosito.phtml
@@ -0,0 +1,309 @@
+<?php
+
+ function putOrarend($ADAT) {
+
+ echo '<div id="infoBox1"></div>';
+ echo '<div id="infoBox2"></div>';
+
+ global $aHetNapjai;
+ $TANKOROK = $ADAT['felvehetoTankorok'];
+ $BLOKKOK = $ADAT['felvehetoBlokkok'];
+ if (is_array($ADAT['felvehetoTankorok']) && count($ADAT['felvehetoTankorok']) > 0) {
+
+ $T = $ADAT['orarend']['assoc'];
+ echo '<h2 class="toPrint">'.$ADAT['toPrint'].'</h2>';
+ formBegin();
+
+ if (count($ADAT['vanHaladasi'])>0) {
+ $_class = ($ADAT['haladasiModositando']!=0) ? 'haladasiModositando':'';
+ echo '<div class="haladasi '.$_class.'">';
+# echo '<span class="icon-pencil-alt"></span> az órarendi módosítások a (már betöltött) haladási naplóval együtt módosítható';
+ echo '<span class="icon-pencil-alt"></span> az új - órarendbe felveendő - órák a már betöltött haladási naplóba is bekerülhetnek?';
+ $_CHK = ($ADAT['haladasiModositando']!=0) ? 'checked="checked"':'';
+ echo '<input type="checkbox" id="haladasiModositando" name="haladasiModositando" value="1" '.$_CHK.' />';
+ echo ' (a törlés és teremmódosítás nem vonatkozik a már betöltött órákra)';
+ echo '</div>';
+ }
+ echo '<input type="hidden" name="action" value="do" />';
+ echo '<input type="hidden" name="tanarId" value="'.$ADAT['tanarId'].'" />';
+ echo '<input type="hidden" name="refTolDt" value="'.$ADAT['refTolDt'].'" />';
+ echo '<input type="hidden" name="refIgDt" value="'.$ADAT['refIgDt'].'" />';
+ echo '<input type="hidden" name="tolDt" value="'.$ADAT['tolDt'].'" />';
+
+ echo '<table id="orarend" class="orarend" align="center" cellspacing="1">'."\n";
+ echo '<thead>';
+ echo '<tr><th></th>';
+ for ($nap=1; $nap<=$ADAT['hetiMaxNap']; $nap++) {
+ $dt = $ADAT['orarend']['napok'][$nap]['dt'];
+ //$_th_class = ($ADAT['orarend']['napok'][$nap]['megjegyzes']=='') ? '': 'spec';
+ $_th_class = ($ADAT['vanHaladasi'][$dt]['db']>0) ? 'spec': '';
+ echo '<th class="'.$_th_class.'">';
+ if (count($ADAT['vanHaladasi'][$dt]['db'])>0) echo '<span class="icon-record" style="color: #E91E63" title="Már van betöltve haladási napló!"></span> ';
+ echo '<span>'.str_replace('-','.',$ADAT['orarend']['napok'][$nap]['dt']).'. ('.$ADAT['orarend']['napok'][$nap]['het'].')</span> ';
+ echo ($ADAT['orarend']['napok'][$nap]['megjegyzes']=='') ? $aHetNapjai[($nap-1)] : $ADAT['orarend']['napok'][$nap]['megjegyzes'];
+ echo '</th>';
+ }
+ echo '</tr>';
+ echo '</thead>'."\n";
+
+ echo '<tbody>'."\n";
+// echo '<caption>'.$het.'. heti órarend</caption>';
+ for($ora=$ADAT['napiMinOra']; $ora<=$ADAT['napiMaxOra']; $ora++) {
+ echo '<tr>';
+ echo '<th>'.$ora.'</th>';
+ for ($nap=1; $nap<=$ADAT['hetiMaxNap']; $nap++) {
+ $CELLATANKORIDK=array();
+ $dt = $ADAT['orarend']['napok'][$nap]['dt'];
+ $het = $ADAT['orarend']['napok'][$nap]['het'];
+ echo '<td id="tdid.'.$het.'.'.$nap.'.'.$ora.'_'.$ser++.'">';
+// $het = 0;
+ $ORARENDI = $__tanarIdk = array();
+ for($i=0; $i<count($T[$nap][$ora]['orak']); $i++) {
+ $_T = $T[$nap][$ora]['orak'][$i];
+ $CELLATANKORIDK[] = $_T['tankorId'];
+ $ORARENDI[] = $_T['tankorId'];
+ $__tanarIdk[] = $_T['tanarId'];
+ //
+ //$het = $_T['het'];
+// $_ORA = $ADAT['haladasi']['orak'][$dt][$ora][$_T['tankorId']];
+ $_tankorTipus = $ADAT['tankorok'][$_T['tankorId']][0]['tankorTipus'];
+ // Az órarendből a jelek:
+ $_targyJel = $_T['targyJel'];
+ $_osztalyJel = $_T['osztalyJel'];
+ // figyelem, itt jön a kiírás, a _putOra fv helyett:
+ $_tipusClass = str_replace(' ','_',$_ORA['tipus']);
+ // -------------------------------------
+ /* Megjelenítési rétegé */
+ $_class = ($_T['teremId']=='') ? ' nincsTerem draggable':' draggable';
+ echo '<div id="draggable'.(++$sdokrand).'" class="'.$_tipusClass.$_class.'" title="'.$_ORA['tipus'].'" id="D'.$het.'.'.$nap.'.'.$ora.'.'.$_T['tanarId'].'">';
+
+// Fejlesztés alatt, itt lehet majd felvenni az órát, ha már van órarend
+// Igaziból lehet, hogy ezt az órarend felületen célszerűbb lenne megcsinálni
+if ($ADAT['vanHaladasi'][$dt]>0) {
+ echo '<span style=" float:left; color:white; padding: 4px; ">';
+ if (isset($ADAT['haladasi']['orak'][$dt][$ora][$_T['tankorId']]['oraId'])) {
+ echo '<span class="icon-ok-sign oraAdat" data-oraid="'.intval($ADAT['haladasi']['orak'][$dt][$ora][$_T['tankorId']]['oraId']).'" title="ez az óra szerepel a haladási naplóban!"></span>';
+ } else {
+ echo '<span class="icon-minus-sign" title="ez az óra nem szerepel a haladási naplóban!"></span>';
+ // dt-ora-ki,tankorId,teremId,tipus,eredet,feladatTipusId,munkaido
+ }
+ echo '</span >';
+}
+ $_ferohely = $ADAT['termek'][$_T['teremId']]['ferohely'];
+ $_letszam = $ADAT['tankorLetszamok'][$_T['tankorId']];
+ if ($_T['tankorId']!='') {
+ // HACK - találjuk ki, hogy mi a kulcsa a kártyának
+ for ($_k=0; $_k<count($ADAT['orarend']['orarendiOra'][$het][$nap][$ora]); $_k++) {
+ $_tmp = $ADAT['orarend']['orarendiOra'][$het][$nap][$ora][$_k];
+ if ($_tmp['tanarId']==$_T['tanarId']) {
+ $_kulcsTolDt = $_tmp['tolDt'];
+ }
+ } unset($_tmp);
+ // -------
+ if ($_kulcsTolDt!='') echo '<input type="checkbox" class="minusz" name="ORARENDMINUSZ[]" value="'.$het.'.'.$nap.'.'.$ora.'.'.$_T['tanarId'].'.'.$dt.'.'.$_kulcsTolDt.'" title="'._TOROL.'" />'."\n";
+ echo '<span title="'.$_targyJel.' '.$_osztalyJel.' ('.$ADAT['tankorok'][$_T['tankorId']][0]['tankorId'].') '.$_tankorTipus.'" >';
+ echo $ADAT['tankorok'][$_T['tankorId']][0]['tankorNev'];
+ echo '</span>';
+ //echo '<input type="checkbox" name="CSERE[]" value="'.$het.'.'.$nap.'.'.$ora.'.'.$_T['tanarId'].'" title="'._CSEREL.'" />'."\n";
+ } else {
+ echo "$_targyjel : $_osztalyJel : ";
+ }
+ echo ', ';
+ echo '<span title="'.$_ferohely.'/'.$_letszam.'" class="t'.( ($_ferohely!=0 && $_ferohely<$_letszam) ? 0 : 1).'">'.$ADAT['termek'][$_T['teremId']]['leiras'].'</span>';
+ _putTerem(array('name'=>'T_'.$het.'_'.$nap.'_'.$ora.'_'.$_T['tanarId'].'_'.$_kulcsTolDt, 'teremId'=>$_T['teremId']),$ADAT['termek']);
+ echo '<br/>';
+ if ($_ORA['kit']!='') {
+ echo '<span class="helyett">';
+ echo $ADAT['tanarok'][$_T['tanarId']]['tanarNev'];
+ echo '</span>';
+ if ($_ORA['ki']!='') echo ' '.$ADAT['tanarok'][$_ORA['ki']]['tanarNev'];
+ } else {
+ echo $ADAT['tanarok'][$_T['tanarId']]['tanarNev'];
+ }
+
+ echo '</div>';
+ /* Egy egység */
+
+
+
+ // -------------------------------------
+
+ if (count($T[$nap][$ora]['orak'])>$i+1) echo '<hr/>';
+
+
+ }
+ if (isset($ADAT['haladasi']['orak'][$dt][$ora])) {
+ foreach($ADAT['haladasi']['orak'][$dt][$ora] as $__tankorId => $_O) {
+ if (!in_array($__tankorId,$CELLATANKORIDK)) {
+ //$_O = $ADAT['haladasi']['orak'][$dt][$ora][$_T['tankorId']];
+ echo '<div class="haladasiOra oraAdat '.($_O['tipus']).'" data-oraid="'.$_O['oraId'].'">';
+ echo '<span class="icon-time" style="margin:3px 3px;color:white; float:left;"></span>';
+ if (!in_array($_O['tipus'],array('elmarad','elmarad_máskor')))
+ echo '<input type="checkbox" name="HALADASIORATOROL[]" value="'.$_O['oraId'].'" />';
+ echo $ADAT['tankorok'][ $__tankorId ][0]['tankorNev'];
+ // array(13) { ["oraId"]=> string(5) "37936" ["dt"]=> string(10) "2016-01-08" ["ora"]=> string(2) "10" ["ki"]=> string(2) "81" ["kit"]=> NULL ["tankorId"]=> string(4) "3086" ["teremId"]=> NULL ["leiras"]=> string(0) "" ["tipus"]=> string(6) "egyéb" ["eredet"]=> string(8) "órarend" ["feladatTipusId"]=> NULL ["munkaido"]=> string(10) "lekötött" ["oo"]=> bool(false)
+ echo '<br/>'.$_O['tipus'];
+ echo ' '.$_O['eredet'];
+ if ($_O['teremId']!='') echo ' '.$ADAT['termek'][$_O['teremId']]['leiras'];
+ if ($_O['leiras']!='') echo '<br/>'.$_O['leiras'];
+ echo '</div>';
+ }
+ }
+ }
+ if (count($T[$nap][$ora]['orak'])==0 || !in_array($ADAT['tanarId'],$__tanarIdk)) {
+ _putPluszOra($het,$nap,$ora,$TANKOROK,$BLOKKOK);
+ //echo '<input type="checkbox" name="CSERE[]" value="'.$het.'.'.$nap.'.'.$ora.'.'.$_T['tanarId'].'" />';
+ }
+ //echo '<div class="draggable" style="height:10px; font-size:1px;">&nbsp;</div>';
+
+/* ============== */
+for ($oi=0; $oi<count($ADAT['orarendioraTankor']['orarendiOra'][$het][$nap][$ora]); $oi++) {
+ $_TANKOROSSZE = $ADAT['orarendioraTankor']['orarendiOra'][$het][$nap][$ora][$oi];
+
+ if (is_null($_TANKOROSSZE['tankorId'])) {
+ echo '<div style="background-color: orange;">';
+
+ echo '<div style="background-color: red; border-bottom:solid 1px white;">'._LEBEGO_ORA.'</div>';
+ $__tanarId = $_TANKOROSSZE['tanarId'];
+ $__targyJel = $_TANKOROSSZE['targyJel'];
+ $__osztalyJel = $_TANKOROSSZE['osztalyJel'];
+ $__teremId = $_TANKOROSSZE['teremId'];
+ $__tolDt = $_TANKOROSSZE['tolDt'];
+
+ echo _TANAR.': '.$__tanarId.'<br/>';
+ echo _TARGYJEL.': '.$__targyJel.'<br/>';
+ echo _OSZTALYJEL.': '.$__osztalyJel.'<br/>';
+ //echo _TEREMID.': '.$__teremId.'<br/>';
+ echo _TOLDT.': '.$__tolDt.'<br/>';
+
+ //PRIMARY KEY (`het`,`nap`,`ora`,`tanarId`,`tolDt`),
+ echo '<input type="checkbox" name="ORARENDIORATOROL[]" value="'.$het.'%'.$nap.'%'.$ora.'%'.$__tanarId.'%'.$__tolDt.'" />';
+ echo _TOROL;
+
+ // és a hozzárendelt tankör:
+ echo '<div>';
+ echo '<select name="ORARENDIORAFELVESZ[]" class="orarendTankor" id="'."${het}:${nap}:${ora}_${__tanarId}_${__osztalyJel}_${__targyJel}".'">';
+ echo '<option value="">'._TANKOR_HOZZARENDELES.'</option>';
+// foreach($TANKOROK as $_tankorId => $_TANKOR) {
+ for ($oj=0; $oj<count($TANKOROK); $oj++) {
+ $__tankorId = $TANKOROK[$oj]['tankorId'];
+ $__TANKOR = $TANKOROK[$oj];
+ // figyelem, nem ugyanazon tömb $i. elemét hasonlítjuk össze! , vizsgáljuk!!!!!!!
+ // de a feltételben szerepelnie kell, így nem probléma. --FIXME
+ //$_SEL = ($_tankorId==$ADAT['assoc'][$nap][$ora]['orak'][$i]['tankorId']) ? ' selected="selected" ': '';
+ //if ($_tankorId==$ADAT['assoc'][$nap][$ora]['orak'][$i]['tankorId']) {
+ // $X[] = $_tankorId;
+ //}
+ echo '<option value="'.$__tanarId.'%'.$__osztalyJel.'%'.$__targyJel.'%'.$__tankorId.'"'.$__SEL.'>';
+ echo $__TANKOR['tankorNev'];
+ echo "($__tankorId)";
+ //if (is_array($X) && in_array($_tankorId,$X)) echo '+';
+ echo '</option>'."\n";
+ }
+ echo '</select>';
+ echo '</div>';
+
+
+ echo '</div>'."\n";
+ }
+}
+//--------------------------------------
+
+
+
+
+
+
+
+
+
+
+ echo '</td>'."\n";
+ }
+ echo '</tr>'."\n";
+ }
+ echo '</tbody>';
+ echo '</table>'."\n\n<!-- EOT -->\n\n";
+// } // foreach
+
+ echo '<div class="button"><input type="submit" value="ok" /></div>';
+
+ if (count($ADAT['hibasOrak'])>0) {
+ echo '<div id="hibasOrak">';
+ for ($i=0; $i<count($ADAT['hibasOrak']); $i++) {
+ $__tanarId = $ADAT['hibasOrak'][$i]['tanarId'];
+ $__tankorId = $ADAT['hibasOrak'][$i]['tankorId'];
+ $__osztalyJel = $ADAT['hibasOrak'][$i]['osztalyJel'];
+ $__targyJel = $ADAT['hibasOrak'][$i]['targyJel'];
+ $__tolDt = $ADAT['hibasOrak'][$i]['tolDt'];
+ $__igDt = $ADAT['hibasOrak'][$i]['igDt'];
+ $__het = $ADAT['hibasOrak'][$i]['het'];
+ $__nap = $ADAT['hibasOrak'][$i]['nap'];
+ $__ora = $ADAT['hibasOrak'][$i]['ora'];
+ echo '<div class="hibas ora">';
+
+ echo '<input type="checkbox" name="ORARENDIORATOROL[]" value="'.$__het.'%'.$__nap.'%'.$__ora.'%'.$__tanarId.'%'.$__tolDt.'" checked="checked"/>';
+
+ echo $ADAT['tankorok'][$__tankorId][0]['tankorNev'].'<br/>';
+ echo $ADAT['tanarok'][$__tanarId]['tanarNev'];
+ echo '<div class="details">';
+ echo $__het.'/'.$__nap.'/'.$__ora.'<br/>';
+ echo $__tolDt.' '.$__igDt.'<br/>';
+ echo _TARGYJEL.': '.$__targyJel.'<br/>';
+ echo _OSZTALYJEL.': '.$__osztalyJel.'';
+ //echo _TEREMID.': '.$__teremId.'<br/>';
+ echo '</div>';
+ echo '</div>';
+ }
+ echo '</div>';
+
+ }
+ formEnd();
+
+ } else {
+// putOrarendPlain($ADAT);
+ }
+
+
+ }
+
+ function putOrarendPlain($ADAT) {
+ }
+
+ function _putPluszOra($het,$nap,$ora,$TANKOROK,$BLOKKOK) {
+
+ echo '<select name="ORARENDPLUSZ[]">';
+ echo '<option value="">'."$het-$nap-$ora".'</option>';
+ echo '<optgroup class="tankor" label="'._TANKOR.'">';
+ for ($i=0; $i<count($TANKOROK); $i++) {
+ $key = "T.$het.$nap.$ora.".($_id = $TANKOROK[$i]['tankorId']);
+ $value = $TANKOROK[$i]['tankorNev'].' ('.$_id.')';
+ echo '<option value="'.$key.'">'.$value.'</option>'."\n";
+ }
+ echo '</optgroup><optgroup class="blokk" label="'._BLOKK.'">';
+ for ($i=0; $i<count($BLOKKOK); $i++) {
+ $key = "B.$het.$nap.$ora.".($_id = $BLOKKOK[$i]['blokkId']);
+ $value = $BLOKKOK[$i]['blokkNev'].' ('.$_id.')';
+ echo '<option value="'.$key.'">'.$value.'</option>'."\n";
+ }
+ echo '</optgroup>'."\n";
+ echo '</select>';
+ }
+
+
+ function _putTerem($ADAT = array('name'=>'T_0_0_0','teremId'=>null), $TERMEK) {
+ echo '<select class="terem'.(($ADAT['teremId']=='') ? '" nincs"':'').'" name="'.$ADAT['name'].'">';
+ echo '<option value="NULL" >'.'</option>'."\n";
+ foreach ($TERMEK as $_teremId => $_T) { // leiras|ferohely|tipus|telephely
+ $_SEL = ($ADAT['teremId']==$_T['teremId']) ? ' selected="selected" ' : '';
+ if ($_T['tipus'] == $_T['leiras']) $_leiras = $_T['tipus']; else $_leiras = $_T['leiras'].' ('.$_T['tipus'].')';
+ if ($ADAT['teremId']==$_T['teremId']) {
+ echo '<option class="orig" value="" '.$_SEL.'>***'.$_T['leiras'].' ['.$_T['ferohely'].'] '.$_T['tipus'].'</option>'."\n";
+ } else {
+ echo '<option value="'.$_T['teremId'].'" '.$_SEL.'>'. $_leiras .' ['.$_T['ferohely'].']'.'</option>'."\n";
+ }
+ }
+ echo '</select>';
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/orarend/orarendTankor.phtml b/mayor-orig/www/skin/classic/module-naplo/html/orarend/orarendTankor.phtml
new file mode 100644
index 00000000..08144c53
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/orarend/orarendTankor.phtml
@@ -0,0 +1,88 @@
+<?php
+
+ function putOrarend($ADAT,$TANKOROK,$tanarId) {
+
+ if (is_array($ADAT['orarendiOra'])) {
+
+ foreach($ADAT['orarendiOra'] as $het => $T) {
+ foreach($T as $nap => $REST) {
+ $NAP_SZAM2HET[$nap]=$het;
+ }
+ }
+
+ formBegin();
+ echo '<input type="hidden" name="action" value="orarendiOraTankorAssoc" />';
+ echo '<input type="hidden" name="tanarId" value="'.$tanarId.'" />';
+ echo '<input type="hidden" name="tolDt" value="'.$_POST['tolDt'].'" />';
+ echo '<input type="hidden" name="igDt" value="'.$_POST['igDt'].'" />';
+// echo '<input type="hidden" name="het" value="'.$het.'" />';
+ echo '<table class="orarend" align="center">'."\n";
+ for($ora=$ADAT['napiMinOra']; $ora<=$ADAT['napiMaxOra']; $ora++) {
+ echo '<tr>';
+ echo '<th>'.$ora.'</th>';
+ for ($nap=1; $nap<=$ADAT['hetiMaxNap']; $nap++) {
+ $het = $NAP_SZAM2HET[$nap];
+ $T = $ADAT['orarendiOra'][$het];
+ echo '<td style="width:18%">';
+ if (count($T[$nap][$ora])>=2) {
+ echo 'HIBA! -'.$T[$nap][$ora].' - adott napon több órája is van!';
+ } else {
+ for($i=0; $i<count($T[$nap][$ora]); $i++) {
+ if ($ADAT['napok'][$nap]['tipus']=='tanítási nap'
+// && (
+// is_array($ADAT['assoc'][$nap][$ora]['orak'][$i])
+// || is_array($ADAT['orarendiOra'][$het][$nap][$ora])
+// )
+ ) {
+ // Az órarendből a jelek:
+ $_targyJel = $T[$nap][$ora][$i]['targyJel'];
+ $_osztalyJel = $T[$nap][$ora][$i]['osztalyJel'];
+ $_teremId = ($T[$nap][$ora][$i]['teremId']=='')?'-':$T[$nap][$ora][$i]['teremId'];
+ echo '<pre style="text-align: left">';
+ echo "targyJel: $_targyJel\n";
+ echo "osztalyJel: $_osztalyJel\n";
+ echo "teremId: $_teremId\n";
+ echo "het/nap/ora: $het/$nap/$ora\n</pre>";
+
+ // és a hozzárendelt tankör:
+ echo '<select name="ORARENDKEY[]">';
+ echo '<option value="">'.'</option>';
+ foreach($TANKOROK as $_tankorId => $_TANKOR) {
+ // figyelem, nem ugyanazon tömb $i. elemét hasonlítjuk össze! , vizsgáljuk!!!!!!!
+ // de a feltételben szerepelnie kell, így nem probléma. --FIXME
+ $_SEL = ($_tankorId==$ADAT['assoc'][$nap][$ora]['orak'][$i]['tankorId']) ? ' selected="selected" ': '';
+ if ($_tankorId==$ADAT['assoc'][$nap][$ora]['orak'][$i]['tankorId']) {
+ $X[] = $_tankorId;
+ }
+ echo '<option value="'.$tanarId.'%'.$_osztalyJel.'%'.$_targyJel.'%'.$_tankorId.'"'.$_SEL.'>';
+ echo $_TANKOR[0]['tankorNev'];
+ echo "($_tankorId)";
+ $_blokkStr = array();
+ if (is_array($_TANKOR[0]['blokkAdat'])) {
+ for ($j=0; $j<count($_TANKOR[0]['blokkAdat']); $j++) {
+ $_blokkStr[] = $_TANKOR[0]['blokkAdat'][$j]['blokkNev'];
+ }
+ echo ' ['.implode(', ',$_blokkStr).'] ';
+ }
+ if (is_array($X) && in_array($_tankorId,$X)) echo '+';
+ echo '</option>'."\n";
+ }
+ echo '</select>';
+ echo '<input type="hidden" name="ORARENDKULCSOK[]" value="'.$tanarId.'%'.$_osztalyJel.'%'.$_targyJel.'" />';
+ } // if
+ } // for
+ } // else
+ echo '</td>'."\n";
+ }
+ echo '</tr>'."\n";
+ }
+ echo '</table>'."\n\n<!-- EOT -->\n\n";
+ echo '<div align="center"><input type="submit" class="sub" /></div>';
+ formEnd();
+ } else {
+ echo '<h2>Adj meg keresési feltételt!</h2>';
+ }
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/orarend/orarendTeremModositas.phtml b/mayor-orig/www/skin/classic/module-naplo/html/orarend/orarendTeremModositas.phtml
new file mode 100644
index 00000000..9efa700e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/orarend/orarendTeremModositas.phtml
@@ -0,0 +1,107 @@
+<?php
+
+ function putOrarendiOraValaszto($ADAT) {
+
+ global $aHetNapjai;
+
+ formBegin(array('class'=>'terem'));
+ echo '<input type="hidden" name="tanev" value="'.$ADAT['tanev'].'" />'."\n";
+ echo '<input type="hidden" name="dt" value="'.$ADAT['dt'].'" />'."\n";
+ echo '<input type="hidden" name="action" value="orarendTeremModositas" />'."\n";
+
+ echo '<h1>'._ORARENDI_ORA_KIVALASZTASA.'</h1>'."\n";
+
+ $SEL = array($ADAT['tanarId'] => ' selected="selected" ');
+ echo '<label for="tanarId">'._TANAR.'</label>'."\n";
+ echo '<select name="tanarId" id="tanarId">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ foreach ($ADAT['tanarok'] as $tanarId => $tAdat) {
+ echo '<option value="'.$tanarId.'"'.$SEL[$tanarId].'>'.$tAdat['tanarNev'].'</option>'."\n";
+ }
+ echo '</select>'."\n";
+
+ echo '<br />';
+ $SEL = array($ADAT['het'] => ' selected="selected" ');
+ echo '<label for="het">'._HET.'</label>'."\n";
+ echo '<select id="het" name="het">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ for ($i = 0; $i < count($ADAT['orarendiHetek']); $i++) {
+ $het = $ADAT['orarendiHetek'][$i];
+ echo '<option value="'.$het.'"'.$SEL[$het].'>'.$het.'</option>'."\n";
+ }
+ echo '</select>'."\n";
+
+ $SEL = array($ADAT['nap'] => ' selected="selected" ');
+ echo '<label for="nap">'._NAP.'</label>'."\n";
+ echo '<select id="nap" name="nap">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ foreach ($aHetNapjai as $i => $napNev) {
+ $nap = $i+1;
+ echo '<option value="'.$nap.'"'.$SEL[$nap].'>'.$napNev.'</option>'."\n";
+ }
+ echo '</select>'."\n";
+
+ $SEL = array($ADAT['ora'] => ' selected="selected" ');
+ echo '<label for="ora">'._ORA.'</label>'."\n";
+ echo '<select id="ora" name="ora">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ for ($i = 0; $i < count($ADAT['orak']); $i++) {
+ $ora = $ADAT['orak'][$i];
+ echo '<option value="'.$ora.'"'.$SEL[$ora].'>'.$ora.'</option>'."\n";
+ }
+ echo '</select>'."\n";
+
+ echo '<br /><input type="submit" value="'._OK.'" />'."\n";
+ formEnd();
+ }
+
+ function putTeremModosito($ADAT) {
+
+ formBegin(array('class'=>'terem'));
+
+ echo '<input type="hidden" name="tanev" value="'.$ADAT['tanev'].'" />'."\n";
+ echo '<input type="hidden" name="dt" value="'.$ADAT['dt'].'" />'."\n";
+
+ echo '<input type="hidden" name="het" value="'.$ADAT['het'].'" />'."\n";
+ echo '<input type="hidden" name="nap" value="'.$ADAT['nap'].'" />'."\n";
+ echo '<input type="hidden" name="ora" value="'.$ADAT['ora'].'" />'."\n";
+ echo '<input type="hidden" name="tanarId" value="'.$ADAT['tanarId'].'" />'."\n";
+
+ echo '<input type="hidden" name="action" value="orarendTeremModositas" />'."\n";
+
+
+ echo '<h1>'._TEREM_MODOSITAS.'</h1>'."\n";
+
+ if (is_array($ADAT['orarendiOra']) && count($ADAT['orarendiOra'])>=1) {
+
+ echo '<strong>'.$ADAT['tankorok'][ $ADAT['tankorIndex'][ $ADAT['orarendiOra']['tankorId'] ] ]['tankorNev']
+ .' ('.$ADAT['orarendiOra']['tankorId'].') </strong>';
+ echo ' ['.$ADAT['orarendiOra']['osztalyJel'].', '.$ADAT['orarendiOra']['targyJel'].'] ';
+
+ $SEL = array($ADAT['orarendiOra']['teremId'] => ' selected="selected" ');
+ echo '<br /><select name="teremId" id="teremId">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ foreach ($ADAT['termek'] as $teremId => $teremAdat) {
+ if ($teremId == $ADAT['orarendiOra']['teremId']) {
+ echo '<option value="'.$teremId.'" selected="selected" class="aktualis"> *** '.$teremAdat['leiras'].' ('.$teremId.') *** </option>'."\n";
+ } elseif (is_array($ADAT['foglaltTermek'][$teremId])) {
+ $foglaltAdat = $ADAT['foglaltTermek'][$teremId];
+ echo '<option value="'.$teremId.'"'.$SEL[$teremId].' class="foglalt">';
+ echo $teremAdat['leiras'].' ('.$teremId.')';
+ echo ' - '.$ADAT['tanarok'][ $foglaltAdat['tanarId'] ]['tanarNev'];
+ echo ', '.$ADAT['tankorok'][ $ADAT['tankorIndex'][$foglaltAdat['tankorId']] ]['tankorNev'].' ('.$foglaltAdat['tankorId'].')';
+ echo '</option>'."\n";
+ } else {
+ echo '<option value="'.$teremId.'"'.$SEL[$teremId].' class="szabad">'.$teremAdat['leiras'].' ('.$teremId.')</option>'."\n";
+ }
+ }
+ echo '</select>'."\n";
+ echo '<br /><input type="submit" value="'._OK.'" />'."\n";
+ } else {
+ echo _NINCS_ORAJA;
+ }
+ formEnd();
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/orarend/szabadTerem.phtml b/mayor-orig/www/skin/classic/module-naplo/html/orarend/szabadTerem.phtml
new file mode 100644
index 00000000..13f15022
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/orarend/szabadTerem.phtml
@@ -0,0 +1,63 @@
+<?php
+
+ function putOrarend($ADAT) {
+
+ global $aHetNapjai;
+
+ if (is_array($ADAT['szabadTermek'])) {
+ $T = $ADAT['szabadTermek'];
+ $minOra=1;$maxOra=0;
+ $NAPOK = array();
+ foreach($T as $dt => $ORA) {
+ if(!in_array($dt,$NAPOK)) $NAPOK[] = $dt;
+ foreach ($ORA as $ora => $TERMEK) {
+ $X[$ora][$dt] = $TERMEK;
+ if ($maxOra<$ora) $maxOra = $ora;
+ if ($minOra>$ora) $minOra = $ora;
+ }
+ }
+ echo '<h2 class="toPrint">'.$ADAT['toPrint'].'</h2>';
+
+ echo '<table class="orarend" align="center">'."\n";
+ echo '<thead>';
+ echo '<tr><th></th>';
+ foreach ($NAPOK as $dt) { // FIXME (getMaxNap)
+ $nap = date('w',strtotime($dt));
+ $_th_class = ($ADAT['orarend']['napok'][$nap]['megjegyzes']=='') ? '': 'spec';
+ echo '<th class="'.$_th_class.'">';
+ //echo '<span title="'.$ADAT['orarend']['napok'][$nap]['dt'].'/'.$ADAT['orarend']['napok'][$nap]['het'].'">';
+ echo $aHetNapjai[($nap-1)];
+ echo ' '.$dt;
+ echo '</th>';
+ }
+ echo '</tr>';
+ echo '</thead>'."\n";
+
+ echo '<tbody>'."\n";
+ for($ora=$minOra; $ora<=$maxOra; $ora++) {
+ echo '<tr>';
+ echo '<th>'.$ora.'</th>';
+ foreach ($NAPOK as $dt) {
+ echo '<td>';
+ for($i=0; $i<count($X[$ora][$dt]); $i++) {
+ $_teremId = $X[$ora][$dt][$i];
+ if ($_teremId!='') {
+ echo '<span title="'.$_targyJel.' '.$_osztalyJel.' ('.$ADAT['tankorok'][$_T['tankorId']][0]['tankorId'].')" >';
+ echo $ADAT['termek'][$_teremId]['leiras'];
+ echo '</span>';
+ if ($i<count($X[$ora][$dt])-1) echo ', ';
+ }
+ }
+ echo '</td>'."\n";
+ }
+ echo '</tr>'."\n";
+ }
+ echo '</tbody>';
+ echo '</table>'."\n\n<!-- EOT -->\n\n";
+ }
+
+
+ }
+
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/orarend/tanarOrarend.phtml b/mayor-orig/www/skin/classic/module-naplo/html/orarend/tanarOrarend.phtml
new file mode 100644
index 00000000..c0968a52
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/orarend/tanarOrarend.phtml
@@ -0,0 +1,38 @@
+<?php
+
+ function putTanarOrarend($Tanarok, $Orak, $napiMinOra, $napiMaxOra, $orarendiHet, $felev, $tolDt) {
+
+ formBegin(array('class'=>'orarend'));
+ echo '<input type="hidden" name="orarendiHet" value="'.$orarendiHet.'" />'."\n";
+ echo '<input type="hidden" name="felev" value="'.$felev.'" />'."\n";
+ echo '<input type="hidden" name="tolDt" value="'.$tolDt.'" />'."\n";
+ echo '<input type="submit" name="csv" value="CSV" />'."\n";
+ echo '<input type="submit" name="xls" value="XLS" />'."\n";
+ echo '<input type="submit" name="txt" value="TXT" />'."\n";
+ echo '<input type="submit" name="html" value="HTML" />'."\n";
+ formEnd();
+
+/*
+ echo '<table>'."\n";
+ for ($i = 0; $i < count($Tanarok); $i++) {
+
+ echo '<tr>'-"\n";
+ $tanarId = $Tanarok[$i]['tanarId'];
+ $tanarNev = $Tanarok[$i]['tanarNev'];
+
+ echo '<th>'.$tanarNev.'</th>'."\n";
+ for ($nap = 1; $nap < 6; $nap++) {
+ for ($ora = $napiMinOra; $ora <= $napiMaxOra; $ora++) {
+ $Ora = $Orak[$tanarId][$nap][$ora];
+ echo '<td>'.$Ora['osztalyJel'].'<br />'.$Ora['targyJel'].'</td>'."\n";
+ }
+ }
+ echo '</tr>'."\n";
+ }
+ echo '</table>'."\n";
+*/
+
+ }
+
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/orarend/termez.phtml b/mayor-orig/www/skin/classic/module-naplo/html/orarend/termez.phtml
new file mode 100644
index 00000000..4d00f428
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/orarend/termez.phtml
@@ -0,0 +1,86 @@
+<?php
+
+ function putTermezo($ADAT) {
+
+ formBegin();
+ echo '<input type="submit" value="▁ ▂ ▃ ▄ ▅ ▆ ▇ do the magic thing! ♠ ♣ ♥ ♦" class="magic" />';
+ echo '<input type="hidden" name="action" value="magic" />';
+ formEnd();
+
+
+ formBegin();
+ echo '<input type="hidden" name="action" value="beallitasokModositasa" />';
+
+ $P = $ADAT['teremPreferencia'];
+ echo '<table class="teremPreferencia" align="center" cellspacing="1">';
+ echo '<thead><tr><th>'._SORREND.'</th><th>'._TANAR.'</th><th>'._TARGY.'</th><th>'._TEREM_SORREND.'</th><th></th></tr>';
+ for ($i=0; $i<count($P); $i++) {
+ $_t = $P[$i];
+ $_order = $P[$i]['teremPreferenciaId'];
+ $_tanarId=$P[$i]['tanarId'];
+ $_targyId=$P[$i]['targyId'];
+ $_termek=explode(',',$P[$i]['teremStr']);
+
+ echo '<tr>';
+ echo '<td>';
+ $href = href('index.php?page=naplo&sub=orarend&f=termez&action=run&tolDt='.$ADAT['tolDt'].'&runTeremPreferenciaId='.$_order,array('sessionID','lang','policy'));
+ echo ' <a class="run" href="'.$href.'"><span class="icon-play-alt"></span></a>';
+ echo '<input type="text" name="teremPreferenciaId_'.$_order.'" value="'.$_order.'" />';
+ echo '</td>';
+ echo '<td>'.$ADAT['tanar'][$_tanarId]['tanarNev'] .' ('.$_tanarId.')</td>';
+ echo '<td>';
+ if ($_targyId>0) echo $ADAT['targy'][$_targyId][0]['targyNev']. ' ('.$_targyId.')';
+ echo '</td>';
+ echo '<td class="terem">';
+ echo str_replace(',',', ',$P[$i]['teremStr']);
+ /*
+ echo '<select multiple="multiple">';
+ for ($t=0; $t<count($_termek); $t++) {
+ echo '<option>';
+ echo $_termek[$t];
+ echo '</option>';
+ }
+ echo '</select>';
+ */
+ echo '</td>';
+ echo '<td>';
+ $href = href('index.php?page=naplo&sub=orarend&f=termez&action=del&delTeremPreferenciaId='.$_order,array('sessionID','lang','policy'));
+ echo ' <a class="del" href="'.$href.'"><span class="icon-trash-alt"></span></a>';
+ echo '</td>';
+ echo '</tr>';
+ }
+ echo '<tr>';
+ echo '<td>';
+ echo '<input type="text" name="ujTeremPreferenciaId" />';
+ echo '</td>';
+ echo '<td>';
+ echo '<select name="ujTanarId">';
+ foreach($ADAT['tanar'] as $__tanarId => $__tanarAdat) {
+ echo '<option value="'.$__tanarId.'">';
+ echo $__tanarAdat['tanarNev']. ' ('.$__tanarAdat['tanarId'].')';
+ echo '</option>';
+ }
+ echo '</select>';
+ echo '</td>';
+ echo '<td>';
+ echo '<select name="ujTargyId">';
+ echo '<option value="NULL">-</option>';
+ foreach($ADAT['targy'] as $__targyId => $__targyAdat) {
+ echo '<option value="'.$__targyId.'">';
+ echo $__targyAdat[0]['targyNev']. ' ('.$__targyId.')';
+ echo '</option>';
+ }
+ echo '</select>';
+ echo '</td>';
+ echo '<td>';
+ echo '<input type="text" name="ujTeremStr" value="" /> (termek vesszővel)';
+ echo '</td>';
+ echo '</tr>';
+ echo '</table>';
+ echo '<input type="submit" value="szabályrendszer módosítása" />';
+
+ formEnd();
+
+ }
+
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/bizelomenetel.phtml b/mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/bizelomenetel.phtml
new file mode 100644
index 00000000..204f1265
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/bizelomenetel.phtml
@@ -0,0 +1,139 @@
+<?php
+/*
+ Module: naplo
+ Last-rev: 2011.01.
+ Description:
+ minden jegye jelenjen meg az adott képzés évfolyamain.
+ eldöntendő: egy tárgy jegyét melyik képzésen kapta?
+*/
+
+die('HIBA');
+
+ function putDiakTanulmanyiElomenetel($diakId, $ADAT) {
+
+ global $Honapok, $KOVETELMENY, $bizonyitvanyMegjegyzesek;
+
+ $kepzesId = $ADAT['kepzesId'];
+ for ($i=0; $i<count($ADAT['diakKepzes']); $i++) {
+ if ($kepzesId == $ADAT['diakKepzes'][$i]['kepzesId'] || $kepzesId=='') {
+ $KEPZ = $ADAT['diakKepzes'][$i];
+ $kepzesId = $ADAT['diakKepzes'][$i]['kepzesId']; // felülírjuk, ha nincs megadva
+ }
+ }
+
+ if (!is_array($KEPZ)) return false;
+
+ $colspan=1;
+ for ($e=$KEPZ['kezdoEvfolyam']; $e<=($KEPZ['zaroEvfolyam']); $e++) $colspan++;
+
+ echo '<table class="tanuloBizonyitvany" align="center" cellpadding="0" cellspacing="0" >'."\n";
+ echo '<thead>';
+ echo '<tr>';
+ echo '<th class="nev" colspan="'.$colspan.'">'.$ADAT['diakAdat']['viseltNevElotag'].' '.$ADAT['diakAdat']['viseltCsaladinev'].' '.$ADAT['diakAdat']['viseltUtonev'].'</th>';
+ echo '</tr>';
+ if (is_array($ADAT['diakKepzes'])) {
+ echo '<tr>';
+ echo '<th class="nev" colspan="'.$colspan.'">';
+ foreach($ADAT['diakKepzes'] as $index => $kepzesAdat) {
+ echo '<span title="['.$kepzesAdat['kepzesId'].']v'.$kepzesAdat['tanev'].' '.$kepzesAdat['kezdoEvfolyam'].'-'.$kepzesAdat['zaroEvfolyam'].'">'.$kepzesAdat['kepzesNev'].'</span>';
+ if ($i++>0) echo ' ';
+ }
+ echo '</th>';
+ echo '</tr>';
+ }
+ echo '<tr class="evf">';
+ echo '<th rowspan="1">'._EVFOLYAM.'</th>';
+// echo '</tr>';
+// echo '<tr class="evf">';
+ for ($evfolyam=$KEPZ['kezdoEvfolyam']; $evfolyam<=($KEPZ['zaroEvfolyam']); $evfolyam++)
+ echo '<th>'.$evfolyam.'</th>';
+ echo '</tr>';
+ echo '</thead>';
+
+ echo '<tfoot>';
+ echo '<tr>';
+ echo '<th colspan="'.$colspan.'">';
+ echo $ADAT['intezmeny']['cimHelyseg'].', ';
+ $ho = date('m');
+ echo date('Y').'. '.kisbetus($Honapok[--$ho]).' '.date('d').'.';
+ echo '</th>';
+ echo '</tr>';
+ echo '</tfoot>';
+
+ echo '<tbody class="hideShowContainer">';
+
+ foreach ($ADAT['targyak'] as $targyId => $targyAdat) {
+ $TARGYORATERV = $ADAT['kepzesOraterv'][$kepzesId][$targyId];
+ if (is_array($TARGYORATERV)) $mutat = 'óratervi';
+ elseif (is_array($ADAT['zaroJegy'][$diakId][$targyId])) $mutat = 'nem óratervi'; /* mégis van-e ilyen zárójegye? ekkor ez nem óratervi */
+ else $mutat = false;
+ if ($mutat!==false) {
+ echo '<tr>';
+ echo '<th>';
+ $_title = $targyAdat['targyJelleg'].' ['.$targyId.']';
+ $_targyJelleg = ($targyAdat['targyJelleg']!='' && $targyAdat['targyJelleg']!=$ADAT['targyak'][$targyId]['targyNev'])?'<br/>('.$targyAdat['targyJelleg'].')':'';
+ echo '<span title="'.$_title.'">'.$ADAT['targyak'][$targyId]['targyNev'].$_targyJelleg.'</span>';
+ echo '</th>';
+ /* Bizonyítvány kiírás */
+ for ($evfolyam=$KEPZ['kezdoEvfolyam']; $evfolyam<=($KEPZ['zaroEvfolyam']); $evfolyam++) {
+ $_teljesitendo = ($TARGYORATERV[$evfolyam][1]['kovetelmeny']!='' || $TARGYORATERV[$evfolyam][2]['hetiOraszam']!='');
+ $_class = ($_teljesitendo===true) ? 'biz' : '';
+ $_class .= ($mutat == 'nem óratervi' && is_array($ADAT['zaroJegy'][$diakId][$targyId][$evfolyam])) ? ' nbiz' : '';
+ $_class .= (is_array($ADAT['zaroJegy'][$diakId][$targyId][$evfolyam])) ? ' vanjegy':'';
+
+ echo '<td class="'.$_class.'">';
+ if (is_array($ADAT['zaroJegy'][$diakId][$targyId][$evfolyam])) {
+ foreach( $ADAT['zaroJegy'][$diakId][$targyId][$evfolyam] as $szemeszter => $zaroJegyek ) {
+ $_jegyAdat = $zaroJegyek;
+ for ($j=0; $j<count($_jegyAdat); $j++) {
+ if ( count($ADAT['zaroJegy'][$diakId][$targyId][$evfolyam][1])>=1 && count($ADAT['zaroJegy'][$diakId][$targyId][$evfolyam][2])==0)
+ $csakFelevi=true;
+ else
+ $csakFelevi=false;
+ $jegyAdat = $_jegyAdat[$j];
+ $_targyOraterv = $TARGYORATERV[$jegyAdat['evfolyam']][$jegyAdat['szemeszter']];
+ $_title = $jegyAdat['evfolyam'].'. évfolyam';
+ $_elsofelev = ($szemeszter==1 && !$csakFelevi) ? ' class="openable szem1" style="display:none;" ' : '' ;
+ if ($_targyOraterv['kovetelmeny'] != $jegyAdat['jegyTipus']) $_title .= ' nem óraterv szerinti';
+ echo '<span title="'.$_title.'" '.$_elsofelev.' >';
+ //echo $jegyAdat['szemeszter'].'.';
+ if ($csakFelevi) echo '<span title="félévi osztályzat!">[';
+ echo $KOVETELMENY[$jegyAdat['jegyTipus']][$jegyAdat['jegy']]['hivatalos'].'&nbsp;'.$bizonyitvanyMegjegyzesek[$jegyAdat['megjegyzes']];
+ if ($csakFelevi) echo ']</span>';
+ echo '</span>';
+
+ /* Ha ez vizsga volt???
+ if (is_array($ADAT['zaroJegyVizsga'][$jegyAdat['zaroJegyId']])) {
+ $_kiir = '('.$ADAT['zaroJegyVizsga'][$jegyAdat['zaroJegyId']]['tipus'].', évfolyam:'.$ADAT['zaroJegyVizsga'][$jegyAdat['zaroJegyId']]['evfolyam'].')- '.($ADAT['zaroJegyVizsga'][$jegyAdat['zaroJegyId']]['szoveg']);
+ echo '<span title="'.$_kiir.'">&ordm;</span>';
+ $MEGJ[] = $_kiir;
+ }*/
+ }
+ $_kiir = '';
+ if ($j+1 < count($_jegyAdat)) echo '<br/>';
+ }
+ } else {
+ if ($TARGYORATERV[$evfolyam][2]['hetiOraszam']!='') echo '-';
+ }
+ echo '</td>';
+ }
+ /* ------------------ */
+ echo '</tr>';
+ }
+ }
+ echo '<tr><th colspan="'.$colspan.'">';
+ echo '<input type="button" class="onClickHideShow" value="Minden félévet mutass!" />';
+ echo '</th></tr>';
+
+ echo '</tbody>';
+// if (count($MEGJ)>0) {
+// echo '<tbody><tr><th colspan="'.$colspan.'">';
+ //foreach ($MEGJ as $megj) echo $megj;
+// echo '<input type="button" class="onClickHideShow" value="mindet mutat" />';
+// echo '</th></tr></tbody>';
+// }
+ echo '</table>'."\n";
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/bizonyitvany.phtml b/mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/bizonyitvany.phtml
new file mode 100644
index 00000000..e63b1e52
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/bizonyitvany.phtml
@@ -0,0 +1,426 @@
+<?php
+
+ function putDiakTanulmanyiOsszesito($diakId, $ADAT) {
+
+ global $Honapok, $KOVETELMENY, $bizonyitvanyMegjegyzesek;
+
+ echo '<table class="tanuloBizonyitvany" align="center" cellpadding="0" cellspacing="0">'."\n";
+ echo '<thead>';
+ echo '<tr>';
+ echo '<th class="nev" colspan="'.(count($ADAT['bizonyitvany']['szemeszterek'])+1).'">'.$ADAT['diakAdat']['viseltNevElotag'].' '.$ADAT['diakAdat']['viseltCsaladinev'].' '.$ADAT['diakAdat']['viseltUtonev'].'</th>';
+ echo '</tr>';
+ echo '<tr>';
+ echo '<th class="leiras" colspan="'.(count($ADAT['bizonyitvany']['szemeszterek'])+1).'">'._HIVATALOS_DT_SZERINT_CSOPORTOSITOTT.'</th>';
+ echo '</tr>';
+ echo '<tr>';
+ echo '<th class="cim" colspan="'.(count($ADAT['bizonyitvany']['szemeszterek'])+1).'">'._TANULMANYI_OSSZESITOJE.'</th>';
+ echo '</tr>';
+ if (is_array($ADAT['diakKepzes'])) {
+ echo '<tr>';
+ echo '<th class="nev" colspan="'.(count($ADAT['bizonyitvany']['szemeszterek'])+1).'">';
+ foreach($ADAT['diakKepzes'] as $index => $kepzesAdat) {
+ echo '<span title="['.$kepzesAdat['kepzesId'].']v'.$kepzesAdat['tanev'].'">'.$kepzesAdat['kepzesNev'].'</span> ';
+ }
+ echo '</th>';
+ echo '</tr>';
+ }
+ echo '<tr>';
+ echo '<th rowspan="2">'._TARGY.'</th>';
+ foreach ($ADAT['bizonyitvany']['tanevSzemeszterei'] as $tanev => $tAdat) echo '<th colspan="'.count($tAdat).'">'.$tanev.'</th>';
+ echo '</tr>';
+ echo '<tr>';
+ foreach ($ADAT['bizonyitvany']['tanevSzemeszterei'] as $tanev => $tAdat)
+ for ($i = 0; $i < count($tAdat); $i++) echo '<th>'.$tAdat[$i].'</th>';
+ echo '</tr>';
+ echo '</thead>';
+ echo '<tfoot>';
+ echo '<tr>';
+ echo '<td colspan="'.(count($ADAT['bizonyitvany']['szemeszterek'])+1).'">';
+ echo $ADAT['intezmeny']['cimHelyseg'].', ';
+ $ho = date('m');
+ echo date('Y').'. '.kisbetus($Honapok[--$ho]).' '.date('d').'.';
+ echo '</td>';
+ echo '</tr>';
+ echo '</tfoot>';
+
+ echo '<tbody class="magatartasSzorgalom">';
+ echo '<tr>';
+ echo '<th class="magatartas">'._MAGATARTAS.'</th>';
+ foreach ($ADAT['bizonyitvany']['szemeszterek'] as $i => $szAdat) {
+ echo '<td class="biz magatartas">';
+ foreach ($ADAT['magatartasIdk'] as $_targyId) {
+ $_jegyAdat = $ADAT['bizonyitvany']['jegyek'][$_targyId][$szAdat['tanev']][$szAdat['szemeszter']];
+ for ($i=0; $i<count($_jegyAdat); $i++) {
+ $__jegyAdat = $_jegyAdat[$i];
+ echo $KOVETELMENY[$__jegyAdat['jegyTipus']][$__jegyAdat['jegy']]['hivatalos'].'&nbsp;';
+ }
+ }
+ echo '</td>';
+ }
+ echo '</tr>';
+ echo '<tr>';
+ echo '<th class="szorgalom">'._SZORGALOM.'</th>';
+ foreach ($ADAT['bizonyitvany']['szemeszterek'] as $i => $szAdat) {
+ echo '<td class="biz szorgalom">';
+ foreach ($ADAT['szorgalomIdk'] as $_targyId) {
+ $_jegyAdat = $ADAT['bizonyitvany']['jegyek'][$_targyId][$szAdat['tanev']][$szAdat['szemeszter']];
+ for ($i=0; $i<count($_jegyAdat); $i++) {
+ $__jegyAdat = $_jegyAdat[$i];
+ echo $KOVETELMENY[$__jegyAdat['jegyTipus']][$__jegyAdat['jegy']]['hivatalos'].'&nbsp;';
+ }
+ }
+ echo '</td>';
+ }
+ echo '</tr>';
+ echo '</tbody>';
+
+ echo '<tbody>';
+
+ echo '<tr class="fejlec">';
+ echo '<th>'._TARGY.'</th>';
+ echo '<th colspan="'.(count($ADAT['bizonyitvany']['szemeszterek'])+1).'">'._JEGY.'</th>';
+ echo '</tr>';
+
+ foreach ($ADAT['bizonyitvany']['jegyek'] as $targyId => $targyAdat) {
+
+ if (!in_array($targyId, array_merge($ADAT['magatartasIdk'],$ADAT['szorgalomIdk'])) ) {
+ $TARGYORATERV = $ADAT['kepzesOraterv'][$targyId];
+ echo '<tr>';
+ echo '<th>';
+ echo $ADAT['targyak'][$targyId]['targyNev'];
+// echo $ADAT['targyak'][$targyId]['targyId'];
+ echo '</th>';
+ /* Bizonyítvány kiírás */
+ foreach ($ADAT['bizonyitvany']['szemeszterek'] as $i => $szAdat) {
+
+ $_jegyAdat = $ADAT['bizonyitvany']['jegyek'][$targyId][$szAdat['tanev']][$szAdat['szemeszter']];
+ echo '<td class="biz">';
+ for ($j=0; $j<count($_jegyAdat); $j++) {
+ $jegyAdat = $_jegyAdat[$j];
+ if (__DIAK !== true || _OSZTALYZATOK_ELREJTESE !== true || time() > strtotime($jegyAdat['hivatalosDt'])) {
+ $_targyOraterv = $TARGYORATERV[$jegyAdat['evfolyam']][$jegyAdat['szemeszter']][0]; // TODO: evfolyamJel
+ $_title = $jegyAdat['evfolyam'].'. évfolyam';
+ if ($jegyAdat['evfolyamJel']!='') $_title .= ' ('.$jegyAdat['evfolyamJel'].'. évfolyamjel)' ;
+ if ($_targyOraterv['kovetelmeny'] != $jegyAdat['jegyTipus']) {
+ $_title .= ' nem óraterv szerinti';
+ $_class = ' style="font-style:italic; color: #ffffff;" ';
+ } else {
+ $_class = '';
+ }
+ echo '<span title="'.$_title.'" '.$_class.'>';
+ echo $KOVETELMENY[$jegyAdat['jegyTipus']][$jegyAdat['jegy']]['hivatalos'].'&nbsp;'.$bizonyitvanyMegjegyzesek[$jegyAdat['megjegyzes']];
+ echo '</span>';
+
+ /* Ha ez vizsga volt, jegyezzük meg */
+ if (is_array($ADAT['zaroJegyVizsga'][$jegyAdat['zaroJegyId']])) {
+ $_kiir = '('.$ADAT['zaroJegyVizsga'][$jegyAdat['zaroJegyId']]['tipus']
+ .', évfolyam:'.$ADAT['zaroJegyVizsga'][$jegyAdat['zaroJegyId']]['evfolyam']
+ .', évfolyamJel:'.$ADAT['zaroJegyVizsga'][$jegyAdat['zaroJegyId']]['evfolyamJel'].')- '.($ADAT['zaroJegyVizsga'][$jegyAdat['zaroJegyId']]['szoveg']);
+ echo '<span title="'.$_kiir.'">&ordm;</span>';
+ $MEGJ[] = $_kiir;
+ }
+ $_kiir = '';
+ if ($j+1 < count($_jegyAdat)) echo '<br/>';
+ }
+ }
+
+ echo '</td>';
+ }
+ echo '</tr>';
+ }
+ }
+ echo '</tbody>';
+ if (count($MEGJ)>0) {
+ echo '<tbody><tr><th colspan="'.(count($ADAT['bizonyitvany']['szemeszterek'])+1).'">';
+ foreach ($MEGJ as $megj) echo $megj."<br />\n";
+ echo '</th></tr></tbody>';
+ }
+ echo '</table>'."\n";
+ }
+
+
+
+
+ function putDiakBizonyitvany($diakId, $ADAT) {
+
+ global $Honapok, $KOVETELMENY, $bizonyitvanyMegjegyzesek, $bizonyitvanyJegyzetek, $osztaly, $attrs;
+
+ echo '<table class="tanuloBizonyitvany" align="center" cellpadding="0" cellspacing="0">'."\n";
+
+ echo '<thead>'."\n";
+ echo '<tr>';
+ echo '<th class="nev" colspan="2">'.$ADAT['diakAdat']['viseltNevElotag'].' '.$ADAT['diakAdat']['viseltCsaladinev'].' '.$ADAT['diakAdat']['viseltUtonev'].'</th>';
+ echo '</tr>'."\n";
+ echo '<tr>';
+ echo '<th class="leiras" colspan="2">'._AZ_OSZTALYZATOK_HIVATALOS_DT_SZERINTI.'</th>';
+ echo '</tr>';
+ echo '<tr>';
+ echo '<th class="cim" colspan="2">'._ERTESITOJE.'</th>';
+ echo '</tr>'."\n";
+ echo '<tr>';
+ echo '<th colspan="2">';
+ echo _AZ.' '.$ADAT['intezmeny']['nev'].' ';
+ for ($i=0; $i<count($ADAT['diakAdat']['osztaly']); $i++) {
+ if ($i!=0) echo ' és';
+ echo $ADAT['diakAdat']['osztaly'][$i]['osztalyJel'];
+ }
+ echo ' '._OSZTALYABAN.'<br />';
+ echo ' '.$ADAT['szemeszterAdat']['tanev'].'-'.($ADAT['szemeszterAdat']['tanev']+1).' '._TANEV.' '.$ADAT['szemeszterAdat']['szemeszter'].'. '._SZEMESZTERBEN.' '._ELERT_EREDMENYEROL;
+ echo '</th>';
+ echo '</tr>'."\n";
+ echo '</thead>'."\n";
+
+ echo '<tfoot>'."\n";
+ echo '<tr>';
+ echo '<td colspan="2">';
+ echo $ADAT['intezmeny']['cimHelyseg'].', ';
+ $ev = substr($ADAT['szemeszterAdat']['zarasDt'], 0, 4);
+ $ho = substr($ADAT['szemeszterAdat']['zarasDt'], 5, 2);
+ $nap = substr($ADAT['szemeszterAdat']['zarasDt'], 8, 2);
+ echo $ev.'. '.kisbetus($Honapok[--$ho]).' '.$nap.'.';
+ echo '</td>';
+ echo '</tr>'."\n";
+ echo '<tr>';
+ echo '<td colspan="2">';
+ echo '<table class="sign">';
+ echo '<tr>';
+ echo '<td class="vonal">&nbsp</td>';
+ echo '<td>'._PH.'</td>';
+ echo '<td class="vonal">&nbsp</td>';
+ echo '</tr><tr>';
+ echo '<td>'._OSZTALYFONOK.'</td>';
+ echo '<td>&nbsp;</td>';
+ echo '<td>'._SZULO.'</td>';
+ echo '</tr>';
+ echo '</table>';
+ echo '</td>';
+ echo '</tr>'."\n";
+
+ echo '</tfoot>'."\n";
+
+ echo '<tbody class="magatartasSzorgalom">'."\n";
+ echo '<tr>';
+ echo '<th class="magatartas">'._MAGATARTAS.'</th>';
+ echo '<td class="biz magatartas">';
+
+ foreach ($ADAT['magatartasIdk'] as $_targyId) {
+ $_jegyAdat = $ADAT['bizonyitvany']['jegyek'][$_targyId];
+ for ($i=0; $i<count($_jegyAdat); $i++) {
+ $__jegyAdat = $_jegyAdat[$i];
+ echo $KOVETELMENY[$__jegyAdat['jegyTipus']][$__jegyAdat['jegy']]['hivatalos'].'&nbsp;';
+ }
+ }
+
+ echo '</td>';
+ echo '</tr>'."\n";
+ echo '<tr>';
+ echo '<th class="szorgalom">'._SZORGALOM.'</th>';
+ echo '<td class="biz szorgalom">';
+
+ foreach ($ADAT['szorgalomIdk'] as $_targyId) {
+ $_jegyAdat = $ADAT['bizonyitvany']['jegyek'][$_targyId];
+ for ($i=0; $i<count($_jegyAdat); $i++) {
+ $__jegyAdat = $_jegyAdat[$i];
+ echo $KOVETELMENY[$__jegyAdat['jegyTipus']][$__jegyAdat['jegy']]['hivatalos'].'&nbsp;';
+ }
+ }
+
+ echo '</td>';
+ echo '</tr>'."\n";
+ echo '</tbody>'."\n";
+
+ echo '<tbody>'."\n";
+
+ echo '<tr class="fejlec">';
+ echo '<th>'._TARGY.'</th>';
+ echo '<th>'._JEGY.'</th>';
+ if (defined('TANITASI_HETEK_SZAMA')) echo '<th>'._ORASZAM.'</th>';
+ echo '</tr>'."\n";
+ if (is_array($ADAT['bizonyitvany']['targyak']))
+ foreach ($ADAT['bizonyitvany']['targyak'] as $targyId => $targyAdat) {
+ $bizAdat = $ADAT['bizonyitvany']['jegyek'][$targyId];
+ if (!in_array($targyId, array_merge($ADAT['magatartasIdk'],$ADAT['szorgalomIdk']))) { // itt szűrendő ki a magatartás - szorgalom
+ $targyNev = $ADAT['targyak'][$targyId]['targyNev'];
+ // innen is lehetne // $targyNev = $targyAdat['targyNev'];
+ echo '<tr>';
+ echo '<th>';
+ echo $targyNev;
+ echo '</th>';
+
+ echo '<td class="biz">';
+
+ for ($_ji=0; $_ji<count($bizAdat); $_ji++) {
+ $jegyAdat = $bizAdat[$_ji];
+ /* Bizonyítvány kiírás */
+ if (__DIAK !== true || _OSZTALYZATOK_ELREJTESE !== true || time() > strtotime($jegyAdat['hivatalosDt'])) {
+ if ($_ji!=0) echo ', ';
+ echo $KOVETELMENY[$jegyAdat['jegyTipus']][$jegyAdat['jegy']]['hivatalos'];
+ echo ' '.$bizonyitvanyMegjegyzesek[$jegyAdat['megjegyzes']];
+ if (is_array($ADAT['zaroJegyVizsga'][$jegyAdat['zaroJegyId']])) {
+ echo '<span title="'.($ADAT['zaroJegyVizsga'][$jegyAdat['zaroJegyId']]['tipus']).'">&ordm;</span>';
+ }
+ if ($jegyAdat['megjegyzes'] != '') {
+ $jegyzetStr .= str_replace('%1%', $targyNev, $bizonyitvanyJegyzetek[$jegyAdat['megjegyzes']]).'<br />';
+ }
+ }
+ }
+ echo '</td>'."\n";
+
+ if (defined('TANITASI_HETEK_SZAMA')) {
+ // Óraszámok
+ echo '<td class="oraszam">';
+ echo $ADAT['bizonyitvany']['targyOraszam'][$targyId]['evesOraszam'];
+ echo '</td>';
+ }
+ /* ------------------- */
+ echo '</tr>'."\n";
+ }
+ }
+ echo '</tbody>'."\n";
+
+ if (__ZARO_SZEMESZTER) {
+ $class = 'hianyzas';
+ $txt = '';
+ } else {
+ $class = 'hianyzas nemNyomtatando';
+ $txt = '<br /><span class="megj">'._IGAZOLATLAN_SZAM_MEGJEGYZES.'</span>';
+ }
+ echo '<tbody class="'.$class.'">';
+ echo '<tr class="fejlec">';
+ echo '<th colspan="2">'._MULASZTOTT_ORAK_SZAMA.$txt.'</th>';
+ echo '<th>'._MULASZTOTT_ELMELET_GYAKORLAT.'</th>';
+ echo '</tr>'."\n";
+
+ echo '<tr>';
+ echo '<th>'._IGAZOLT.'</th>';
+ echo '<td class="biz">';
+ echo intval($ADAT['hianyzas']['igazolt']);
+ echo '</td>';
+ echo '<td class="oraszam">';
+ echo intval($ADAT['hianyzas']['elmélet']['igazolt']);
+ echo '-';
+ echo intval($ADAT['hianyzas']['gyakorlat']['igazolt']);
+ echo '</td>';
+ echo '</tr>'."\n";
+
+ echo '<tr>';
+ echo '<th>'._IGAZOLATLAN.'</th>';
+ echo '<td class="biz">';
+ echo intval($ADAT['hianyzas']['igazolatlan']);
+ echo '</td>';
+ echo '<td class="oraszam">';
+ echo intval($ADAT['hianyzas']['elmélet']['igazolatlan']);
+ echo '-';
+ echo intval($ADAT['hianyzas']['gyakorlat']['igazolatlan']);
+ echo '</td>';
+
+ echo '</tr>'."\n";
+
+ echo '<tr>';
+ echo '<th>'._KESESPERC.'</th>';
+ echo '<td class="biz">';
+ echo floor(($ADAT['hianyzas']['elmélet']['kesesPercOsszeg'] + $ADAT['hianyzas']['gyakorlat']['kesesPercOsszeg']) / 45)
+ .' ('.intval($ADAT['hianyzas']['elmélet']['kesesPercOsszeg'] + $ADAT['hianyzas']['gyakorlat']['kesesPercOsszeg']).' '._PERC.')';
+ echo '</td>';
+ echo '<td class="oraszam">';
+ echo floor($ADAT['hianyzas']['elmélet']['kesesPercOsszeg'] / 45).' ('.intval($ADAT['hianyzas']['elmélet']['kesesPercOsszeg']).' '._PERC.')';
+ echo '-';
+ echo floor($ADAT['hianyzas']['gyakorlat']['kesesPercOsszeg'] / 45).' ('.intval($ADAT['hianyzas']['gyakorlat']['kesesPercOsszeg']).' '._PERC.')';
+ echo '</td>';
+ echo '</tr>'."\n";
+
+ echo '</tbody>'."\n";
+ echo '<tbody class="jegyzet">'."\n";
+ echo '<tr>';
+ echo '<td colspan="2">';
+ echo $jegyzetStr;
+ echo '</td>';
+ echo '</tr>'."\n";
+ echo '</tbody>'."\n";
+
+ echo '</table>'."\n";
+
+ }
+
+////////////////////////////////!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+ function putZaroJegyModosito($diakId, $ADAT) {
+
+ global $KOVETELMENY;
+ global $_EVFOLYAMJEL_BETUVEL;
+ require_once('skin/classic/module-naplo/html/share/jegy.phtml');
+
+ formBegin(array('class'=>'modosit'));
+
+ echo '<h1>'._JEGYMODOSITAS.' (csak speciális esetben!)</h1>';
+ echo '<input type="hidden" name="action" value="zaroJegyModositas" />'."\n";
+ echo '<input type="hidden" name="diakId" value="'.$diakId.'" />'."\n";
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalyId'].'" />'."\n";
+ //EZNEMJO echo '<input type="hidden" name="osztalyId" value="'.$ADAT['diakAdat']['osztaly'][0]['osztalyId'].'" />'."\n";
+ echo '<input type="hidden" name="szemeszterId" value="'.$ADAT['szemeszterAdat']['szemeszterId'].'" />'."\n";
+ echo '<input type="hidden" name="targySorrend" value="'.$ADAT['targySorrend'].'" />'."\n";
+
+
+ echo '<table class="jegy" cellspacing="1" cellpadding="1">';
+
+ echo '<tfoot><tr><th colspan="2">';
+ echo '<input type="submit" class="confirm" title="'._BIZTOS_E.'" value="'._OK.'" />'."\n";
+ echo '</th></tr></tfoot>';
+
+ echo '<tbody><tr>';
+ echo '<th>'._TARGY.'</th>';
+ echo '<td>';
+ // tárgy kiválasztása
+ echo '<select name="targyId">'."\n";
+ echo '<option value="">-</option>'."\n";
+ foreach ($ADAT['targyak'] as $targyId => $targyAdat) {
+ echo '<option value="'.$targyId.'">'.$targyAdat['targyNev'].' ('.$targyAdat['zaroKovetelmeny'].') ['.$targyId.']</option>'."\n";
+ }
+ echo '</select>'."\n";
+ echo '</td>';
+ echo '</tr>';
+
+ echo '<tr>';
+ echo '<th>'._EVFOLYAM.'</th>';
+ echo '<td>';
+
+ // évfolyam kiválasztás:
+ if (count($ADAT['diakEvfolyamJel'])>0) {
+ echo '<select name="evfolyam">';
+ // foreach ($ADAT['diakEvfolyamJel'] as $_evfolyamJel) echo '<option value="'.$_evfolyamJel.'">'.$_evfolyamJel.'</option>';
+ foreach($_EVFOLYAMJEL_BETUVEL as $_evfolyamJel => $_betuvel) {
+ $_SEL = (in_array($_evfolyamJel,$ADAT['diakEvfolyamJel'])) ? 'selected="selected"':'';
+ echo '<option value="'.$_evfolyamJel.'" '.$_SEL.'>'.$_evfolyamJel.' - '.$_betuvel.'</option>';
+ }
+ echo '</select>';
+ } else { // csak egy van (vagy egy se ... :(
+ echo ($evfolyamJel = $ADAT['diakEvfolyamJel'][0]).". ".((_EVFOLYAM));
+ }
+ echo '</td>';
+ echo '</tr>';
+
+
+ echo '<tr>';
+ echo '<th>'._JEGY.'</th>';
+ echo '<td>';
+
+ // jegy kiválsztása
+ $JEGYSELECT = array(
+ 'variable' => 'zaroJegy',
+ 'zaroJegyTipusok' => $ADAT['zaroJegyTipusok'],
+ 'diakId' => $diakId,
+// 'evfolyam' => $evfolyam, // nem biztos hogy van evfolyamunk, lehet hogy a select-ben definiált
+ 'targyId' => null, // nincs targyId-nk. Ez az előző select kimenete
+ 'tanev'=>$ADAT['szemeszterAdat']['tanev'],
+ 'szemeszter'=>$ADAT['szemeszterAdat']['szemeszter'],
+ );
+ putJegySelect($JEGYSELECT); // használjuk a shared könyvtár függvényeit
+
+ echo '</td></tr></tbody>';
+
+ echo '</table>';
+ formEnd();
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/diak.phtml b/mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/diak.phtml
new file mode 100644
index 00000000..2851b4b5
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/diak.phtml
@@ -0,0 +1,235 @@
+<?php
+/*
+ Module: naplo
+*/
+ require_once('skin/classic/module-naplo/html/share/jegy.phtml');
+
+ function putTanuloJegyek($diakId, $diakNev, $Jegyek, $tolDt = '', $igDt = '', $ADAT) {
+
+ global $_TANEV, $Honapok, $Osztalyzatok, $bizonyitvanyMegjegyzesek, $KOVETELMENY, $SULYOZAS;
+ $_SULYTOMB = explode(':',$ADAT['sulyozas']);
+
+ if ($tolDt == '') $tolDt=$_TANEV['kezdesDt'];
+ if ($igDt == '') $igDt=$_TANEV['zarasDt'];
+ $aktDt = $kDt = date('Y-m-01',strtotime($tolDt));
+ $vDt = date('Y-m-01',strtotime($igDt));
+
+ $Targyak = $Jegyek['targyak'];
+ $Dolgozatok = $Jegyek['dolgozat'];
+ $hianyzoDolgozatok = $Jegyek['hianyzoDolgozatok'];
+ // ----------------------------------------
+ while (strtotime($aktDt) <= strtotime($vDt)) {
+ list($ev,$ho,$nap) = explode('-',$aktDt);
+ $HO[] = array(
+ 'év' => $ev,
+ 'hó' => $ho
+ );
+ $HO['count']++;
+ $aktDt = date('Y-m-01',strtotime('next month',strtotime($aktDt)));
+ }
+
+ formBegin();
+ echo '<table class="osztalyozo" align="center" cellpadding="0" cellspacing="1">'."\n";
+
+ echo '<thead>'."\n";
+ echo '<tr>'."\n";
+ if (__SHOW_FACES_TF) {
+ echo '<th id="virtualJegyEasterEgg">';
+ //putFace($diakId,'diak');
+ echo '</th>';
+ $_sub=-1;
+ } else $_sub=0;
+ echo '<th class="nev diakNev" data-diakid="'.$diakId.'" colspan="'.($HO['count']+count($_TANEV['szemeszter'])-1+$_sub).'">';
+ echo $diakNev.' '.$_osztalystr;
+ echo '</th>'."\n";
+
+ if (__ATLAG_MUTATAS !== false) {
+ if (__DEFAULT_SULYOZAS == $ADAT['sulyozas']) $_class="defaultSulyozas";
+ echo '<th class="'.$_class.'">';
+ echo '<input type="hidden" name="diakId" value="'.$diakId.'" />';
+ $SEL = array($ADAT['sulyozas'] => ' selected="selected"');
+ echo '<select name="sulyozas" id="sulyozas" class="XXXonChangeSubmit">';
+ echo '<option value=""></option>';
+ if (is_array($SULYOZAS) && count($SULYOZAS) > 0) {
+ for ($i = 0; $i < count($SULYOZAS); $i++)
+ echo '<option value="'.$SULYOZAS[$i].'"'.$SEL[$SULYOZAS[$i]].'>'.$SULYOZAS[$i].'</option>';
+ } else {
+ // ide nem jöhetünk. vizsgáljuk meg feljebb
+ echo '<option value="1:1:1:1:1"'.$SEL['1:1:1:1:1'].'>'.'1:1:1:1:1</option>';
+ echo '<option value="1:1:1:2:2"'.$SEL['1:1:1:2:2'].'>'.'1:1:1:2:2</option>';
+ echo '<option value="1:2:2:4:4"'.$SEL['1:2:2:4:4'].'>'.'1:2:2:4:4</option>';
+ echo '<option value="1:1:2:2:4"'.$SEL['1:1:2:2:4'].'>'.'1:1:2:2:4'.'</option>';
+ }
+ echo '</select>';
+
+ echo '</th>';
+ }
+
+ echo '<th class="biz" colspan="2">'._BIZONYITVANY.'</th>'."\n";
+ echo '</tr>'."\n";
+ echo '<tr>'."\n";
+ echo '<th rowspan="2">'._TARGY.'</th>'."\n";
+ for ($i = 0; $i < $HO['count']; $i++) {
+ echo '<td class="ho">';
+ echo '<span class="roman">'.decimal_to_roman($HO[$i]['hó']).'.</span>';
+ echo '<span class="literal">'.$Honapok[$HO[$i]['hó']-1].'</span>';
+ echo '</td>'."\n";
+ }
+ if (__ATLAG_MUTATAS !== false) echo '<th>'._ATLAG.'</th>'."\n";
+ foreach ($_TANEV['szemeszter'] as $idx => $szemeszterAdat) {
+ echo '<th class="biz">'.$szemeszterAdat['szemeszter'].'</th>'."\n";
+ }
+ echo '</tr>'."\n";
+ echo '</thead>'."\n";
+
+ echo '<tfoot>'."\n";
+ echo '<tr>'."\n";
+ echo '<th colspan="'.($HO['count']+2).'">';
+ echo '<span class="jegy0"></span>';
+ echo '<span class="jegy1">'._KIS_JEGY.'</span>';
+ echo '<span class="jegy2">'._NORMAL_JEGY.'</span>';
+ echo '<span class="jegy3">'._DOLGOZAT.'</span>';
+ echo '<span class="jegy4">'._TEMAZARO.'</span>';
+ echo '<span class="jegy5">'._VIZSGAJEGY.'</span>';
+ echo '</th>'."\n";
+ echo '<th colspan="2">&nbsp;</th>'."\n";
+ echo '</tr>'."\n";
+ echo '</tfoot>'."\n";
+
+ echo '<tbody>'."\n";
+// foreach ($Targyak as $targyId => $targyAdat) {
+ for ($t=0; $t<count($ADAT['diakTargy']); $t++) {
+ $targyId = $ADAT['diakTargy'][$t]['targyId'];
+ $targyNev= $ADAT['diakTargy'][$t]['targyNev'];
+ $targyAdat = $Targyak[$targyId];
+
+ if (in_array($ADAT['diakTargy'][$t]['evkoziKovetelmeny'],array('','nincs')) && in_array($ADAT['diakTargy'][$t]['zaroKovetelmeny'],array('','nincs'))) continue;
+ $_title = $ADAT['diakTargy'][$t]['evkoziKovetelmeny'].'/'.$ADAT['diakTargy'][$t]['zaroKovetelmeny'].'['.$targyId.']';
+
+ echo '<tr>'."\n";
+ echo '<th class="t" title="'.$_title.'">';
+ if (count($ADAT['targyTankor'][$targyId]) == 1) {
+ echo '<a href="'.href('index.php?page=naplo&sub=osztalyozo&f=tankor&tankorId='.$ADAT['targyTankor'][$targyId][0]['tankorId']).'">'.$targyNev.'</a>';
+ } else
+ echo $targyNev;
+ /* VIRTUAL */
+ echo ' <select class="eeHidden" style="display:none"><option value="1">kis</option><option value="2">normál</option><option value="3">dolgozat</option><option value="4">témazáró</option><option value="5">vizsga</option></select>';
+ putJegySelect(array(
+ 'class'=>'eeHidden',
+ 'style'=>'display:none',
+ 'jegySelectTipus'=>'jegy',
+ 'targyId'=>$targyId,
+ 'jegyTipus'=>$ADAT['diakTargy'][$t]['evkoziKovetelmeny']
+ ));
+ echo '<span class="addVirtualJegy eeHidden icon-plus-sign" style="display:none"></span>';
+ // ----------
+ echo '</th>'."\n";
+ for ($j = 0; $j < $HO['count']; $j++) {
+ echo '<td>';
+ $honapJegyei = $targyAdat[$HO[$j]['év']][$HO[$j]['hó']];
+ for ($k = 0; $k < count($honapJegyei); $k++) {
+ $jegyAdat = $Jegyek['jegyek'][$honapJegyei[$k]];
+ if ($KOVETELMENY[$jegyAdat['jegyTipus']]['átlagolható']===true) {
+ $JEGYATLAG[$j][$jegyAdat['jegyTipus']]['normal'][] = $jegyAdat['jegy']; // kulcsok szerinti átlag
+ $JEGYATLAG[$j][$jegyAdat['jegyTipus']]['jegyAdat'][] = $jegyAdat;
+ }
+ $href = href('index.php?page=naplo&sub=osztalyozo&f=jegy&jegyId='.$jegyAdat['jegyId']);
+ $_jegyShow = $KOVETELMENY[$jegyAdat['jegyTipus']][$jegyAdat['jegy']]['rovid'];
+ if ($jegyAdat['tipus'] < 3) $title = $jegyAdat['tankorNev'].' ('.$jegyAdat['dt'].') '.$jegyAdat['megjegyzes'];
+ else $title = $Dolgozatok[$jegyAdat['dolgozatId']]['dolgozatNev'].' ('.$jegyAdat['dt'].')'.' - '.$jegyAdat['tankorNev'].' '.$jegyAdat['megjegyzes'];
+ echo '<a onclick="return false;" class="jegyAdat jegy jegy'.$jegyAdat['tipus'].'" href="'.$href.'" title="'.htmlspecialchars($title).'"
+ data-targyid="'.$targyId.'"
+ data-jegyid="'.$jegyAdat['jegyId'].'"
+ data-jegy="'.$jegyAdat['jegy'].'" data-jegytipus="'.$jegyAdat['jegyTipus'].'" data-tipus="'.$jegyAdat['tipus'].'">';
+ echo ($_jegyShow!='') ? $_jegyShow.'' : '?';
+ if ($jegyAdat['dt']!=date('Y-m-d',strtotime($jegyAdat['modositasDt']))) echo '<sup title="Módosítva: '.$jegyAdat['modositasDt'].'">*</sup>';
+ echo ' </a>';
+ }
+ if (is_array($hianyzoDolgozatok[$targyId][$HO[$j]['év']][$HO[$j]['hó']])) {
+ $honapDolgozatai = $hianyzoDolgozatok[$targyId][$HO[$j]['év']][$HO[$j]['hó']];
+ for ($k = 0; $k < count($honapDolgozatai); $k++) {
+ $dolgozatAdat = $Dolgozatok[$honapDolgozatai[$k]];
+ $href = href('index.php?page=naplo&sub=osztalyozo&f=dolgozat&dolgozatId='.$dolgozatAdat['dolgozatId']);
+ $title = $dolgozatAdat['dolgozatNev'].' ('.$dolgozatAdat['bejelentesDt'].')';
+ echo '<a class="jegy4" href="'.$href.'" title="'.htmlspecialchars($title).'" data-dolgozatid="'.$dolgozatAdat['dolgozatId'].'"> – </a>';
+ }
+ }
+ echo '</td>'."\n";
+ }
+ if (__ATLAG_MUTATAS !== false) {
+ echo '<th class="atlag" id="targyAtlag_'.$targyId.'" data-targyid="'.$targyId.'">'.(($ADAT['sulyozas']!='')?$targyAdat['atlag']:'').'</th>'."\n";
+ }
+
+ /* Bizonyítvány kiírás */
+ // Ehelyett használható lenne a share putJegySelect() is! --TODO 2016-2017
+ foreach ($_TANEV['szemeszter'] as $idx => $szemeszterAdat) {
+ $tanev = $szemeszterAdat['tanev'];
+ $szemeszter = $szemeszterAdat['szemeszter'];
+ $_BIZ = $ADAT['zaroJegyek'][$diakId][$targyId][$tanev][$szemeszter];
+ echo '<td class="biz">'."\n";
+ for ($ji=0; $ji<count($_BIZ); $ji++) {
+ $zaroJegy = $_BIZ[$ji]['jegy'];
+ $megjegyzes = $_BIZ[$ji]['megjegyzes'];
+ $jegyTipus= $_BIZ[$ji]['jegyTipus'];
+ $jegy= $_BIZ[$ji]['jegy'];
+ if ($KOVETELMENY[$jegyTipus]['átlagolható']===true) {
+ $ZJATLAG[$tanev][$szemeszter][] = $jegy;
+ }
+ if (__DIAK !== true || _OSZTALYZATOK_ELREJTESE !== true || time() > strtotime($szemeszterAdat['zarasDt'])) {
+ $_sikertelenClass = (in_array( $jegy, $KOVETELMENY[$jegyTipus]['sikertelen']))? ' class="sikertelen" ': '';
+ echo '<span title="évfolyam:'.$_BIZ[$ji]['evfolyam'].' jel:'.$_BIZ[$ji]['evfolyamJel'].'" '.$_sikertelenClass.' >';
+ echo $KOVETELMENY[$jegyTipus][$jegy]['hivatalos'];
+ echo ' '.$bizonyitvanyMegjegyzesek[$megjegyzes];
+ echo '</span>';
+ }
+ }
+ echo '</td>'."\n";
+ }
+
+ /* ------------------- */
+
+ echo '</tr>'."\n";
+ }
+ //----------
+ echo '<tr><th style="text-align:right;">'._ATLAG.':</th>';
+ for ($j = 0; $j < $HO['count']; $j++) {
+ echo '<th>';
+ foreach (array('féljegy','jegy') as $atlagolhatoJegyTipus) {
+ // if (count($JEGYATLAG[$j][$atlagolhatoJegyTipus]['normal'])>0) {
+ // echo $s[$j] = number_format( (array_sum($JEGYATLAG[$j][$atlagolhatoJegyTipus]['normal']) / count($JEGYATLAG[$j][$atlagolhatoJegyTipus]['normal'])),2);
+ // if (intval($s[$j-1])!=0 && ($s[$j-1]-$s[$j])<-0.2) echo ' <span style="color:lightgreen" class="icon-chevron-up"></span>';
+ // elseif (intval($s[$j]!=0) && ($s[$j-1]-$s[$j])>0.2) echo ' <span style="color:red" class="icon-chevron-down"></span>';
+ // }
+ if (count($JEGYATLAG[$j][$atlagolhatoJegyTipus]['jegyAdat'])>0) {
+ $_J = $JEGYATLAG[$j][$atlagolhatoJegyTipus]['jegyAdat'];
+ $_haviSulyoz = 0;
+ $_haviOszto = 0;
+ for ($x=0; $x<count($JEGYATLAG[$j][$atlagolhatoJegyTipus]['jegyAdat']); $x++) {
+ $_haviSulyoz += $_J[$x]['jegy'] * $_SULYTOMB[($_J[$x]['tipus']-1)];
+ $_haviOszto += $_SULYTOMB[($_J[$x]['tipus']-1)];
+ }
+ if ($_haviOszto>0) {
+ echo $s[$j] = number_format( ($_haviSulyoz/$_haviOszto), 2, ',','.');
+ if (intval($s[$j-1])!=0 && ($s[$j-1]-$s[$j])<-0.2) echo ' <span style="color:lightgreen" class="icon-chevron-up"></span>';
+ elseif (intval($s[$j]!=0) && ($s[$j-1]-$s[$j])>0.2) echo ' <span style="color:red" class="icon-chevron-down"></span>';
+ }
+ }
+ }
+ echo '</th>';
+ }
+ echo '<th></th>';
+ foreach ($_TANEV['szemeszter'] as $idx => $szemeszterAdat) {
+ echo '<th>';
+ if (count($ZJATLAG[$szemeszterAdat['tanev']][$szemeszterAdat['szemeszter']])>0) {
+ echo number_format(array_sum($ZJATLAG[$szemeszterAdat['tanev']][$szemeszterAdat['szemeszter']]) / count($ZJATLAG[$szemeszterAdat['tanev']][$szemeszterAdat['szemeszter']]),2,',','.');
+ }
+ echo '</th>';
+ }
+ echo '</tr>';
+ // -------
+ echo '</tbody>'."\n";
+
+ echo '</table>'."\n";
+ formEnd();
+ }
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/dolgozat.phtml b/mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/dolgozat.phtml
new file mode 100644
index 00000000..0432cd91
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/dolgozat.phtml
@@ -0,0 +1,304 @@
+<?php
+/*
+ module: naplo
+ function putDolgozatLista($DOLGOZAT)
+ function putDolgozat($DOLGOZAT,$TANAR_NEVSOR)
+*/
+
+ function putDolgozatLista($Dolgozat) {
+
+ global $tanarId, $diakId, $tankorId, $osztalyId;
+ global $aHetNapjai;
+
+ echo '<table class="dolgozatLista" align="center" cellspacing="1">';
+
+ echo '<thead><tr>';
+ echo '<th colspan="5">'._DOLGOZATOK.'</th>';
+ echo '</tr>';
+ echo '<tr>';
+ echo '<th colspan="2">'._DOLGOZAT.'</th>';
+ echo '<th>'._TANKOR.'</th>';
+ echo '<th>'._BEJELENTES.'</th>';
+ echo '<th>'._TERVEZETT.'</th>';
+ echo '</tr></thead><tfoot><tr><th colspan="5"></th></tfoot>';
+
+ echo '<tbody>';
+ $kuszob=false;
+
+ if (count($Dolgozat['dolgozatIds']) > 0) {
+ for ($i = count($Dolgozat['dolgozatIds'])-1; $i >= 0; $i--) {
+ $dolgozatId = $Dolgozat['dolgozatIds'][$i];
+ if (!$kuszob && strtotime($Dolgozat[$dolgozatId]['tervezettDt'])<=time()) {
+ echo '<tr><th class="kuszob" colspan="5">'.'</th></tr>';
+ $kuszob=true;
+ }
+ echo '<tr>';
+ echo '<th>';
+ if (__MODOSITHAT) {
+ // ide jön a form action=dolgozatTorles
+ echo 'x';
+ } else {
+ echo ($i+1).'.';
+ }
+ echo '</th>';
+ echo '<td>';
+ echo '<a href="'.href('index.php?page=naplo&sub=osztalyozo&f=dolgozat&dolgozatId='."$dolgozatId&tanarId=$tanarId&osztalyId=$osztalyId&diakId=$diakId&tankorId=$tankorId").'">';
+ if ($Dolgozat[$dolgozatId]['dolgozatNev'] != '') echo $Dolgozat[$dolgozatId]['dolgozatNev'];
+ else echo _NINCS_KITOLTVE;
+ echo '</a>';
+ echo '</td>';
+ echo '<td>';
+
+ $Tankorok = $Dolgozat[$dolgozatId]['tankor'];
+ $TankorLista = array();
+ for ($t = 0; $t < count($Tankorok); $t++) $TankorLista[] = $Tankorok[$t]['tankorNev'];
+ echo implode('<br />',$TankorLista);
+
+ echo '</td>';
+ echo '<td>';
+ $_dt = $Dolgozat[$dolgozatId]['bejelentesDt'];
+ $_dow = date('w', strtotime($_dt));
+ echo str_replace('-', '. ', $_dt).'. ';
+ echo $aHetNapjai[($_dow - 1)];
+ echo '</td>';
+ echo '<td>';
+ $_dt = $Dolgozat[$dolgozatId]['tervezettDt'];
+ if ($_dt != '0000-00-00' && $_dt != '') {
+ $_dow = date('w', strtotime($_dt));
+ echo str_replace('-', '. ', $_dt).'. ';
+ echo $aHetNapjai[($_dow - 1)];
+ }
+ echo '</td>';
+ echo '</tr>';
+ flush();
+ }
+ } else {
+ echo '<tr>';
+ echo '<td colspan="5" class="nincsdolgozat">'._NINCS_DOLGOZAT.'</td>';
+ echo '</tr>';
+ }
+ echo '</tbody>';
+ echo '</table>';
+ }
+
+ function putDolgozat($Dolgozat, $valaszthatoTankorok, $Tanarok, $ADAT) {
+
+ global $_TANEV, $KOVETELMENY;
+
+ if (__MODOSITHAT) $disabled = '';
+ else $disabled=' disabled="disabled" ';
+
+ $kepMutat = $ADAT['kepMutat'];
+
+ // -------------- A dolgozat adatai -------------- //
+
+ formBegin();
+ echo '<input type="hidden" name="action" value="dolgozatModositas" />';
+ echo '<input type="hidden" name="dolgozatId" value="'.$Dolgozat['dolgozatId'].'" />';
+ echo '<table align="center" class="dolgozatAdatok" cellspacing="1">';
+ echo '<thead>';
+ echo '<tr>';
+ echo '<th colspan="4">'._DOLGOZAT_ADATAI.'</th>';
+ echo '</tr>';
+ echo '</thead>';
+
+ echo '<tfoot>';
+ echo '<tr>';
+ echo '<th colspan="4">';
+ if (__MODOSITHAT) echo '<input type="submit" value="'._OK.'" />';
+ if (__TOROLHET) echo '<input type="submit" name="dolgozatTorles" value="'._DOLGOZAT_TOROL.'" class="confirm" title="'._BIZTOS_DOLGOZAT_TOROL.'" />';
+ echo '</th>';
+ echo '</tr>';
+ echo '</tfoot>';
+
+ echo '<tbody class="hideShowContainer">';
+ echo '<tr>';
+ echo '<th>'._MEGNEVEZES.'</th>';
+ echo '<td colspan="3"><input class="hosszu" type="text" name="dolgozatNev" value="'.$Dolgozat['dolgozatNev'].'" '.$disabled.' /></td>';
+ echo '</tr><tr>';
+ echo '<th>'._BEJELENTES.'</th>';
+ echo '<td>'.$Dolgozat['bejelentesDt'].'</td>';
+ echo '<th>'._TERVEZETT.'</th>';
+ echo '<td>';
+ echo '<input type="text" class="date" name="tervezett-dt" value="'.$Dolgozat['tervezettDt'].'" '.$disabled.' />';
+ echo '<span title="'._BEJELENTETT_DOLGOZATOK.'" class="onClickHideShow openable">&uarr;</span>';
+ echo '<span title="'._BEJELENTETT_DOLGOZATOK.'" class="onClickHideShow openable" style="display: none;">&darr;</span>';
+ echo'</td>';
+ echo '</tr>';
+ echo '<tr class="openable" style="display: ;">'."\n";
+ echo '<th>'._BEJELENTETT_DOLGOZATOK.'</th>';
+ echo '<td colspan="3">';
+ echo '<ul class="openableee">';
+ foreach ($Dolgozat['utkozoDolgozatok']['tervezett'] as $dt => $dAdat) {
+ foreach ($dAdat as $index => $did) {
+ echo '<li>';
+ echo '<a href="'.href('index.php?page=naplo&sub=osztalyozo&f=dolgozat&dolgozatId='.$did).'">';
+ echo $Dolgozat['utkozoDolgozatok'][$did]['tervezettDt'];
+ echo ' - ';
+ echo $Dolgozat['utkozoDolgozatok'][$did]['dolgozatNev'];
+ echo ' ('.$Dolgozat['utkozoDolgozatok'][$did]['tankor'][0]['tankorNev'].')';
+ echo '</a>';
+ echo '</li>'."\n";
+ }
+ }
+ echo '</ul>';
+ echo '</td>';
+ echo '</tr>'."\n";
+ echo '</tbody>';
+ echo '</table>';
+ formEnd();
+
+ echo '<table align="center" class="dolgozatAdatok" cellspacing="1">';
+
+ echo '<thead>'."\n";
+ echo '<tr><th>'._TANKOROK.'</th></tr>'."\n";
+ echo '</thead>'."\n";
+
+ echo '<tfoot><tr><td></td></tr></tfoot>'."\n";
+
+ echo '<tbody>'."\n";
+ echo '<tr>'."\n";
+
+ // tankör választás
+ echo '<td>'."\n";
+ formBegin();
+ echo '<input type="hidden" name="action" value="dolgozatTankorHozzarendeles" />'."\n";
+ echo '<input type="hidden" name="dolgozatId" value="'.$Dolgozat['dolgozatId'].'" />'."\n";
+ echo '<select name="tankorIds[]" multiple="multiple" class="multiple"'.$disabled.'>'."\n";
+ for ($i = 0;$i < count($valaszthatoTankorok); $i++) {
+ if (in_array($valaszthatoTankorok[$i]['tankorId'], $Dolgozat['tankorIds']))
+ echo '<option value="'.$valaszthatoTankorok[$i]['tankorId'].'" selected="selected">';
+ else
+ echo '<option value="'.$valaszthatoTankorok[$i]['tankorId'].'">';
+ echo $valaszthatoTankorok[$i]['tankorNev'];
+ echo '</option>'."\n";
+ }
+ echo '</select><br />'."\n";
+ if (__MODOSITHAT) echo '<input type="submit" value="'._OK.'" />'."\n";
+ formEnd();
+ echo '</td>'."\n";
+
+ echo '</tr>'."\n";
+ echo '</tbody>'."\n";
+
+ echo '</table>'."\n";
+
+ // -------------- A dolgozat jegyei -------------- //
+
+ if (__NAPLOADMIN || __VEZETOSEG || __TANAR) {
+
+ $colspan = count($Dolgozat['tankor'])*2;
+ $_colspan=2;
+ if ($kepMutat) {
+ $colspan+=(count($Dolgozat['tankor']));
+ $_colspan++;
+ }
+ formBegin();
+
+ echo '<input type="hidden" name="action" value="dolgozatJegyekTorlese" />'."\n";
+ echo '<input type="hidden" name="dolgozatId" value="'.$Dolgozat['dolgozatId'].'" />'."\n";
+ echo '<table align="center" class="dolgozatJegyek" cellspacing="1">';
+
+ echo '<thead>';
+ echo '<tr>';
+ echo '<th colspan="'.$colspan.'">'._JEGYEK.'</th>';
+ echo '</tr>';
+ echo '<tr>';
+ $maxDiakSzam = 0;
+ for ($j = 0; $j < count($Dolgozat['tankor']); $j++) {
+ if ($maxDiakSzam < ($_count = count($Dolgozat['tankor'][$j]['diakok']['idk'])))
+ $maxDiakSzam = $_count;
+ echo '<th colspan="'.$_colspan.'">';
+ echo '<a href="'.href('index.php?page=naplo&sub=osztalyozo&f=tankor&tankorId='.$Dolgozat['tankor'][$j]['tankorId']).'">';
+ echo $Dolgozat['tankor'][$j]['tankorNev'];
+ echo '</a>';
+ echo '</th>';
+ }
+ echo '</tr>';
+ echo '<tr>';
+
+ for ($j = 0; $j < count($Dolgozat['tankor']); $j++) {
+ if ($kepMutat) echo '<th></th>';
+ echo '<th>'._NEV.'</th>';
+ echo '<th>'._JEGY.'</th>';
+ }
+ echo '</tr>';
+ echo '</thead>';
+
+ echo '<tfoot>';
+ echo '<tr>';
+ for ($j = 0; $j < count($Dolgozat['tankor']); $j++) {
+ $tankorAdat = $Dolgozat['tankor'][$j];
+ $tankorId = $tankorAdat['tankorId'];
+ echo '<th colspan="'.$_colspan.'">';
+ echo '<input type="submit" name="tankorId'.$tankorId.'" value="'._TOROL.'" class="confirm" title="'._BIZTOS_TOROLE.'" />'."\n";
+ echo '</th>';
+ }
+ echo '</tr>';
+
+ echo '</tfoot>';
+
+ echo '<tbody>'."\n";
+ for ($i = 1; $i <= $maxDiakSzam; $i++) {
+ echo '<tr>'."\n";
+
+ for ($j = 0; $j < count($Dolgozat['tankor']); $j++) {
+ $tankorAdat = $Dolgozat['tankor'][$j];
+ $tankorId = $tankorAdat['tankorId'];
+ if (is_array($Dolgozat['tankor'][$j]['diakok']['nevek'])) {
+ reset($Dolgozat['tankor'][$j]['diakok']['nevek']);
+ for ($d = 0; $d < $i; $d++)
+ list($diakId, $diakAdat) = each($Dolgozat['tankor'][$j]['diakok']['nevek']);
+ $diakNev = $diakAdat['diakNev'];
+ } else { $diakNev = ''; }
+
+ if ($kepMutat) {
+ echo '<td class="diakNev" data-diakid="'.$diakId.'">';
+ putFace($diakId,'diak');
+ echo '</td>';
+ }
+ echo '<th><a href="'.href('index.php?page=naplo&sub=osztalyozo&f=diak&diakId='.$diakId).'">'.$diakNev.'</a></th>'."\n";
+ echo '<td>';
+ if (is_array($tankorAdat['jegyek'][$diakId])) {
+ for ($k = 0; $k < count($tankorAdat['jegyek'][$diakId]);$k++) {
+ $jegy = $tankorAdat['jegyek'][$diakId][$k];
+ if ($KOVETELMENY[ $jegy['jegyTipus'] ]['átlagolható']===true) $ATLAG[$jegy['jegyTipus']][] = $jegy['jegy'];
+ $href = href('index.php?page=naplo&sub=osztalyozo&f=jegy&jegyId='.$jegy['jegyId']);
+ $title = $jegy['dt'].' '.$jegy['megjegyzes'];
+ echo '<a href="'.$href.'" class="jegy'.$jegy['tipus'].'" title="'.htmlspecialchars($title).'">';
+ echo $KOVETELMENY[ $jegy['jegyTipus'] ][ $jegy['jegy'] ]['rovid'].' ';
+ echo '</a>';
+ }
+ }
+ echo '</td>'."\n";
+ }
+ echo '</tr>'."\n";
+ }
+ if (is_array($ATLAG) && count($ATLAG)>0) {
+ foreach ($ATLAG as $jegyTipus => $A) {
+ echo '<tr class="atlag">';
+ echo '<th colspan="2">';
+ echo $jegyTipus;
+ echo '</th>';
+ echo '<td>'.number_format(array_sum($ATLAG[$jegyTipus])/count($ATLAG[$jegyTipus]),2).'</td>';
+ echo '</tr>';
+ }
+ }
+ echo '</tbody>'."\n";
+ echo '</table>'."\n";
+ formEnd();
+
+ } // csak admin, tanár és igazgató láthatja az összes jegyet!
+ }
+
+ function putDolgozatBejelento($tankorId) {
+
+ formBegin(array('class'=>'dolgozat'));
+ echo '<input type="hidden" name="action" value="dolgozatBejelentes" />';
+ echo '<input type="hidden" name="tankorId" value="'.$tankorId.'" />';
+ echo '<input type="submit" value="'._DOLGOZAT_BEJELENTES.'" />';
+ formEnd();
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/jegy.phtml b/mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/jegy.phtml
new file mode 100644
index 00000000..b24e8b43
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/jegy.phtml
@@ -0,0 +1,164 @@
+<?php
+/*
+ Module: naplo
+*/
+
+ function putJegyInfo($jegy, $Orak, $Dolgozatok, $ADAT) {
+
+ global $jegyTipusok, $aHetNapjai, $skin;
+ global $KOVETELMENY;
+
+ if (_MODOSITHAT) $DIS=''; else $DIS=' disabled="disabled"';
+ $kepMutat = $ADAT['kepMutat'];
+
+ $colspan=5;
+ $_colspan=1;
+ if ($kepMutat) {
+ $colspan++;
+ $_colspan++;
+ }
+
+ formBegin(array('method' => 'post', 'id' => 'jegyMod', 'action' => href('index.php?page=naplo&sub=osztalyozo&f=jegy')), array('skipFormTag'=>$skin == 'ajax','print'=>true));
+ echo '<input type="hidden" name="action" value="jegyModositas" />'."\n";
+ echo '<input type="hidden" id="jegyId" name="jegyId" value="'.$jegy['jegyId'].'" />'."\n";
+ echo '<table align="center" cellspacing="1" cellpadding="0" class="jegyInfo">'."\n";
+
+ echo '<thead>'."\n";
+ echo '<tr>'."\n";
+ echo '<th colspan="'.$colspan.'">';
+
+ echo '<a href="'.href('index.php?page=naplo&sub=osztalyozo&f=diak&diakId='.$jegy['diakId']).'">';
+ echo $jegy['diakNev'];
+ echo '</a>';
+
+ echo '</th>'."\n";
+ echo '</tr>'."\n";
+ echo '</thead>'."\n";
+
+ echo '<tfoot>'."\n";
+ echo '<tr>'."\n";
+ echo '<th colspan="'.$colspan.'">'."\n";
+ if (_MODOSITHAT) {
+ echo '<input type="submit" class="modosit" id="jegyModositas" value="'._ROGZIT.'" />'."\n";
+ echo '<input type="submit" id="jegyTorles" name="jegyTorles" class="confirm onClickUpdateAction torol" value="'._TOROL.'" title="'._BIZTOSE.'" />'."\n";
+ }
+ echo '</th>'."\n";
+ echo '</tr>'."\n";
+ echo '</tfoot>'."\n";
+
+ echo '<tbody>'."\n";
+ echo '<tr>'."\n";
+ echo '<th>';
+ putFace($jegy['diakId'],'diak');
+ echo '</th>'."\n";
+ echo '<td colspan="2">'."\n";
+ echo '<a href="'.str_replace('ajax', '', href('index.php?page=naplo&sub=osztalyozo&f=tankor&tankorId='.$jegy['tankorId'])).'">';
+ $tanarLista = '';
+ for ($i = 0; $i < count($jegy['tanár']['idk']); $i++) $tanarLista .= $jegy['tanár'][$i]['tanarNev'].', ';
+ echo $jegy['tankör'][0]['tankorNev'].' ('.substr($tanarLista, 0, -2).')';
+ echo '</a>'."\n";
+ echo '<br/>'.$jegy['dt'].' ('.$aHetNapjai[(date('w',strtotime($jegy['dt']))+6) % 7].')'."\n";
+ if ($jegy['modositasDt']!='0000-00-00 00:00:00')
+ echo '<br/>'.$jegy['modositasDt'].' ('.$aHetNapjai[(date('w',strtotime($jegy['modositasDt']))+6) % 7].')'."\n";
+ echo '</td>'."\n";
+
+ echo '</tr>'."\n";
+ echo '<tr>'."\n";
+
+ echo '<th></th>';
+ echo '<td>'."\n";
+ $SEL = array($jegy['jegy'] => ' selected="selected" ');
+ $_ok = false;
+ echo '<select id="jegyValaszto" name="jegy"'.$DIS.'>'."\n";
+ foreach ($KOVETELMENY as $jegyTipus => $jAdat) {
+ if ($jegyTipus == $jegy['jegyTipus'] || (__JEGYTIPUS_VALTHATO === true && in_array($jegyTipus, $ADAT['jegyTipusok']))) {
+ echo '<optgroup label="'.$jegyTipus.'">';
+ if ($jegyTipus == $jegy['jegyTipus']) $SEL = array($jegy['jegy'] => ' selected="selected" ');
+ else $SEL = array();
+ for ($i = 0; $i < count($KOVETELMENY[$jegyTipus]['értékek']); $i++) {
+ $j = $KOVETELMENY[$jegyTipus]['értékek'][$i];
+ $_jegyShow = $KOVETELMENY[$jegyTipus][$j]['rovid'];
+ echo '<option value="'."$jegyTipus:$j".'" '.$SEL[$j].'>'.$_jegyShow.'</option>'."\n";
+ if ($SEL[$j]!='') $_ok = true;
+ }
+ echo '</optgroup>'."\n";
+ }
+ }
+ if ($_ok===false)
+ echo '<option value="'.$jegy['jegy'].'" selected="selected" >'.$jegy['jegy'].$jegy['jegyTipus'].' (!hibás!)</option>'."\n";
+ echo '</select>'."\n";
+ echo '</td>'."\n";
+ echo '<td>'."\n";
+ $SEL = array($jegy['tipus'] => ' selected="selected"');
+ echo '<select id="jegyTipus" name="tipus"'.$DIS.'>'."\n";
+ echo '<option value="0">'.$jegyTipusok[0].'</option>'."\n";
+ if ($jegy['dolgozatId'] == '') {
+ echo '<option value="1"'.$SEL[1].'>'.$jegyTipusok[1].'</option>'."\n";
+ echo '<option value="2"'.$SEL[2].'>'.$jegyTipusok[2].'</option>'."\n";
+ } else {
+ echo '<option value="3"'.$SEL[3].'>'.$jegyTipusok[3].'</option>'."\n";
+ echo '<option value="4"'.$SEL[4].'>'.$jegyTipusok[4].'</option>'."\n";
+ echo '<option value="5"'.$SEL[5].'>'.$jegyTipusok[5].'</option>'."\n";
+ }
+ echo '</select>'."\n";
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+
+ echo '<tr>'."\n";
+ echo '<th>'._MEGJEGYZES.'</th>'."\n";
+ echo '<td colspan="2">'."\n";
+ echo '<input type="text" name="megjegyzes" value="'.$jegy['megjegyzes'].'" '.$DIS.'/>'."\n";
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+
+ echo '</tbody>'."\n";
+
+ // -------- Óra hozzárendelés -------- //
+
+ echo '<tbody>'."\n";
+ echo '<tr>'."\n";
+ echo '<th>'._HOZZARENDELT_ORA.'</th>'."\n";
+ echo '<td colspan="2">'."\n";
+ $SEL = array($jegy['oraId'] => ' selected="selected"');
+ echo '<select name="oraId"'.$DIS.'>'."\n";
+ echo '<option value="NULL">'._NINCS.'</option>';
+ for ($i = 0;$i < count($Orak); $i++) {
+ echo '<option value="'.$Orak[$i]['oraId'].'" '.$SEL[$Orak[$i]['oraId']].'>';
+ echo $Orak[$i]['dt'].' ('.$aHetNapjai[(date('w',strtotime($Orak[$i]['dt']))+6) % 7].') '
+ .$Orak[$i]['ora'].'. '._ORA;
+ echo ': '.$Orak[$i]['leiras'];
+ echo '</option>'."\n";
+ }
+ echo '</select>'."\n";
+ echo '</td>'."\n";
+
+ echo '</tr>'."\n";
+ echo '</tbody>'."\n";
+
+ // -------- Ha dolgozat jegy - a dolgozat adatai -------- //
+
+ if ($jegy['tipus'] > 2) {
+ echo '<tbody>'."\n";
+ echo '<tr>'."\n";
+ echo '<th><a href="'.str_replace('ajax', '', href('index.php?page=naplo&sub=osztalyozo&f=dolgozat&dolgozatId='.$jegy['dolgozatId'])).'">'.ucfirst(_DOLGOZAT).'</a></th>'."\n";
+ echo '<td colspan="2">'."\n";
+ $SEL = array($jegy['dolgozatId'] => ' selected="selected"');
+ echo '<select name="dolgozatId"'.$DIS.'>';
+ for ($i = 0;$i < count($Dolgozatok['dolgozatIds']);$i++) {
+ $dolgozatId = $Dolgozatok['dolgozatIds'][$i];
+ echo '<option value="'.$dolgozatId.'" '.$SEL[$dolgozatId].'>';
+ echo $Dolgozatok[$dolgozatId]['dolgozatNev'];
+ echo '</option>'."\n";
+ }
+ echo '</select>'."\n";
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+ echo '</tbody>'."\n";
+
+ }
+ echo '</table>';
+
+ if ($skin != 'ajax') formEnd();
+
+ }
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/stat.phtml b/mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/stat.phtml
new file mode 100644
index 00000000..a27675a0
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/stat.phtml
@@ -0,0 +1,659 @@
+<?php
+
+ require_once('skin/classic/module-naplo/html/share/jegy.phtml');
+
+ function putIskolaStatisztika($ADAT) {
+
+ echo '<table class="iskolaStatisztika" align="center" cellspacing="1">';
+ echo '<thead>';
+ echo '<tr>';
+ echo '<th>'._SZEMPONT.'</th>';
+ for ($i = 0; $i < count($ADAT['osztaly']); $i++) {
+ echo '<th>';
+ if ($ADAT['osztaly'][$i]['osztalyJel'] != '') echo $ADAT['osztaly'][$i]['osztalyJel'];
+ else echo $ADAT['osztaly'][$i]['kezdoTanev'].'/'.$ADAT['osztaly'][$i]['jel'];
+ echo '</th>';
+ }
+ echo '<th>'._OSSZESITES.'</th>';
+ echo '</tr>';
+ echo '</thead>';
+
+ echo '<tfoot>';
+ echo '</tfoot>';
+
+ echo '<tbody class="hianyzas">';
+ echo '<tr>';
+ echo '<th>'._IGAZOLT.'</th>';
+ for ($i = 0; $i < count($ADAT['osztaly']); $i++) {
+ $SUM['igazolt'] += $ADAT['hianyzas'][ $ADAT['osztaly'][$i]['osztalyId'] ]['igazolt'];
+ echo '<td>'.($ADAT['hianyzas'][ $ADAT['osztaly'][$i]['osztalyId'] ]['igazolt']).'</td>';
+ }
+ echo '<th class="ossz">';
+ echo $SUM['igazolt'].'/';
+ echo $ADAT['hianyzas']['']['igazolt'];
+ echo '</th>';
+ echo '</tr>';
+
+ echo '<tr>';
+ echo '<th>'._IGAZOLATLAN.'</th>';
+ for ($i = 0; $i < count($ADAT['osztaly']); $i++) {
+//2013NKT if (_KESESI_IDOK_OSSZEADODNAK === true) {
+ $title = $ADAT['hianyzas'][ $ADAT['osztaly'][$i]['osztalyId'] ]['igazolatlan'].'+'
+ .intval($ADAT['hianyzas'][ $ADAT['osztaly'][$i]['osztalyId'] ]['igazolatlanKesesbol']);
+ $SUM['igazolatlan']+= $ADAT['hianyzas'][ $ADAT['osztaly'][$i]['osztalyId'] ]['osszesIgazolatlan'];
+ echo '<td title="'.$title.'">'.$ADAT['hianyzas'][ $ADAT['osztaly'][$i]['osztalyId'] ]['osszesIgazolatlan'].'</td>';
+//2013NKT } else {
+//2013NKT echo '<td>'.$ADAT['hianyzas'][ $ADAT['osztaly'][$i]['osztalyId'] ]['igazolatlan'].'</td>';
+//2013NKT }
+ }
+ echo '<th class="ossz">';
+ echo $SUM['igazolatlan']."/";
+ echo $ADAT['hianyzas']['']['igazolatlan'];
+ echo '</th>';
+ echo '</tr>';
+ echo '</tbody>'."\n";
+
+ echo '<tbody>';
+
+ echo '<tr>';
+ echo '<th>'._KITUNO.'</th>';
+ for ($i = 0; $i < count($ADAT['osztaly']); $i++) {
+ echo '<td>'.$ADAT['jegyek'][ $ADAT['osztaly'][$i]['osztalyId'] ]['kituno'].'</td>';
+ }
+ echo '<th class="ossz">'.$ADAT['jegyek']['intezmeny']['kituno'].'</th>';
+ echo '</tr>';
+
+ echo '<tr>';
+ echo '<th>'._JELES.'</th>';
+ for ($i = 0; $i < count($ADAT['osztaly']); $i++) {
+ echo '<td>'.$ADAT['jegyek'][ $ADAT['osztaly'][$i]['osztalyId'] ]['jeles'].'</td>';
+ }
+ echo '<th class="ossz">'.$ADAT['jegyek']['intezmeny']['jeles'].'</th>';
+ echo '</tr>';
+
+ echo '<tr>';
+ echo '<th>'._BUKOTT.'</th>';
+ for ($i = 0; $i < count($ADAT['osztaly']); $i++) {
+ echo '<td>'.$ADAT['jegyek'][ $ADAT['osztaly'][$i]['osztalyId'] ]['bukott'].'</td>';
+ }
+ echo '<th class="ossz">'.$ADAT['jegyek']['intezmeny']['bukott'].'</th>';
+ echo '</tr>';
+
+ echo '<tr>';
+ echo '<th>'._BUKAS.'</th>';
+ for ($i = 0; $i < count($ADAT['osztaly']); $i++) {
+ echo '<td>'.$ADAT['jegyek'][ $ADAT['osztaly'][$i]['osztalyId'] ]['bukas'].'</td>';
+ }
+ echo '<th class="ossz">'.$ADAT['jegyek']['intezmeny']['bukas'].'</th>';
+ echo '</tr>';
+
+ echo '</tbody>';
+ echo '<tbody class="atlag">';
+
+ echo '<tr class="ossz">';
+ echo '<th>'._ÁTLAG.'</th>';
+ for ($i = 0; $i < count($ADAT['osztaly']); $i++) {
+ if (isset($ADAT['jegyek'][ $ADAT['osztaly'][$i]['osztalyId'] ]['atlag'])) {
+ echo '<td>'.number_format($ADAT['jegyek'][ $ADAT['osztaly'][$i]['osztalyId'] ]['atlag'], 2, ',', ' ').'</td>';
+ } else {
+ echo '<td></td>';
+ }
+ }
+ echo '<th class="ossz">'.number_format($ADAT['jegyek']['intezmeny']['atlag'], 2, ',', ' ').'</th>';
+ echo '</tr>';
+
+ if (is_array($ADAT['targyak'])) {
+ foreach ($ADAT['targyak'] as $i => $targyAdat) {
+ echo '<tr>';
+ echo '<th>'.$targyAdat['targyNev'].'</th>';
+ $_c = 0;$_sum=0;
+ for ($i = 0; $i < count($ADAT['osztaly']); $i++) {
+ if ($ADAT['tantargyiAtlagok'][ $targyAdat['targyId'] ][ $ADAT['osztaly'][$i]['osztalyId'] ] != 0) {
+ $_sum += $ADAT['tantargyiAtlagok'][ $targyAdat['targyId'] ][ $ADAT['osztaly'][$i]['osztalyId'] ];
+ $_c++;
+ echo '<td>'.number_format($ADAT['tantargyiAtlagok'][ $targyAdat['targyId'] ][ $ADAT['osztaly'][$i]['osztalyId'] ], 2, ',', ' ').'</td>';
+ } else {
+ echo '<td></td>';
+ }
+ }
+ echo '<th class="ossz">';
+ echo '<span title="átlag">';
+ $_avg_iskolai = '<span title="osztályzatok átlaga">'.number_format($ADAT['tantargyiAtlagok'][ $targyAdat['targyId'] ]['iskola'] , 2, ',', ' ').'</span>';
+ if ($_c!=0) {
+ $_avg = ($_sum/($_c));
+ $_txt_avg = '<span title="átlagok átlaga">'.number_format($_avg,2,',',' ').'</span>';
+ if ($ADAT['tantargyiAtlagok'][ $targyAdat['targyId'] ]['iskola']!=$_avg) {
+ echo $_txt_avg . '('.$_avg_iskolai.')';
+ } else {
+ echo $_avg_iskolai;
+ }
+ } else {
+ echo $_avg_iskolai;
+ }
+ echo '</span>';
+ echo ' / ';
+ echo '<span title="bukás">'.intval($ADAT['jegyek']['intezmeny']['targy'][ $targyAdat['targyId'] ]).'</span>';
+ echo '</th>';
+ echo '</tr>';
+ }
+ //echo '<tr><th>__</th></tr>';
+ }
+
+ echo '</tbody>';
+
+ echo '<tbody>';
+ echo '</tbody>';
+
+ echo '</table>';
+
+ }
+
+
+ function putOsztalyBizonyitvany($ADAT) {
+
+ global $aHetNapjai, $Honapok, $bizonyitvanyMegjegyzesek;
+ global $KOVETELMENY, $ZaradekIndex, $_EVFOLYAMJEL_BETUVEL;
+// global $targySorrend;
+ $MAGSZORGIDK = array_merge($ADAT['magatartasTargyIdk'],$ADAT['szorgalomTargyIdk']);
+
+ $colSpan = count($ADAT['targyak']);
+
+ // Bizonyítvány-hoz tartozó változók beállítása
+ $plusCols = 6 + 2;
+ $colSpan += $plusCols; // további column-nal bővül a táblázat
+ $rowSpan = 3;
+
+ // ------------------------
+ // Design
+ $img1 = 'skin/classic/module-naplo/img/osztalyozo/node-minus.gif';
+ $img2 = 'skin/classic/module-naplo/img/osztalyozo/node-plus.gif';
+
+// putNyomtatasForm($ADAT);
+
+ formBegin(array('name'=>'beir', 'method'=>'post', 'action'=>''));
+
+ echo '<input type="hidden" name="action" value="jegyLezaras" />';
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztaly']['osztalyId'].'" />';
+ echo '<input type="hidden" name="szemeszterId" value="'.$ADAT['szemeszterAdat']['szemeszterId'].'" />';
+ echo '<input type="hidden" name="targySorrend" value="'.$targySorrend.'" />';
+ echo '<input type="hidden" name="actionID" value="'.substr(uniqid("", true),0,23).'" />';
+
+ echo '<table class="osztalyozo hideShowContainer" align="center" cellspacing="1" >';
+ echo '<thead>';
+ echo '<tr>';
+ echo '<th class="beallitasok">';
+ //echo '<img class="onClickHideShow" src="skin/classic/module-naplo/img/toggle.png" alt="+/-" />';
+ //echo '<div class="onClickHideShow icon-zoom-in" alt="+/-"></div>';
+ //echo '<div style="background-color: #213876; border-bottom: solid 1px blue;">
+ echo '<span class="icon-adjust toggleBeallitasok" style="float:right; padding:2px;"></span>';
+ _putBeallitasCheckbox('targyak',$ADAT['beallitasok']);
+ _putBeallitasCheckbox('oraszamok',$ADAT['beallitasok']);
+ _putBeallitasCheckbox('zaradek',$ADAT['beallitasok']);
+ echo '</th>';
+ echo '<th class="nev" colspan="'.($colSpan-1).'">';
+ echo _BIZONYITVANY;
+ echo ': '.$ADAT['osztaly']['osztalyJel'].' ('.$ADAT['osztaly']['kezdoTanev'].'-'.($ADAT['osztaly']['vegzoTanev']+1).') - '.$ADAT['osztaly']['osztalyfonok']['tanarNev'];
+ echo '</th>'."\n";
+ echo '</tr><tr>';
+
+ echo '<th rowspan="'.$rowSpan.'">'._NEV.'</th>';
+ // Tárgyanként
+ $id = 0;
+ for ($j = 0; $j < count($ADAT['targyak']); $j++) if (
+ !in_array($ADAT['targyak'][$j]['targyId'], $MAGSZORGIDK)
+ && (isset($ADAT['tantargyiAtlagok'][$ADAT['targyak'][$j]['targyId']])
+ || $ADAT['targyboljegy'][$ADAT['targyak'][$j]['targyId']] === true
+ || __SHOWSTATZARASMINDENTARGY)
+ ) {
+ $_class = '';
+ $_data = '';
+ // FŐTÁRGY
+ if (is_array($ADAT['targyTargy']['FOal'][$ADAT['targyak'][$j]['targyId']])) {
+ $_class = "foTargy";
+ $_data = 'data-targyid="'
+ .$ADAT['targyak'][$j]['targyId']
+ .'" data-altargyidk="[&'
+ .implode('&',$ADAT['targyTargy']['FOal'][$ADAT['targyak'][$j]['targyId']])
+ .'&]"';
+ }
+ // ALTÁRGY
+ if (is_array($ADAT['targyTargy']['alFO'][$ADAT['targyak'][$j]['targyId']])) {
+ $_class = "alTargy";
+ $_data = 'data-targyid="'
+ .$ADAT['targyak'][$j]['targyId']
+ .'" data-fotargyidk="[&'
+ .implode('&',$ADAT['targyTargy']['alFO'][$ADAT['targyak'][$j]['targyId']])
+ .'&]"';
+
+ }
+ echo '<td id="targy'.$id.'" '.$_data.' rowspan="'.$rowSpan.'" class="openable tglTargy t'.$id.' '.$_class.'" title="'.$ADAT['targyak'][$j]['targyId'].'">';
+ echo $ADAT['targyak'][$j]['targyNev'];
+ echo '</td>';
+ $id++;
+ }
+ echo '<th rowspan="'.$rowSpan.'">';
+ echo _ATLAG;
+ echo '</th>';
+
+ // magatartás, szorgalom
+ echo '<th colspan="'.($plusCols-2).'">'.$ADAT['szemeszterAdat']['tanev'].'/'.$ADAT['szemeszterAdat']['szemeszter'].'</th>';
+ echo '<td class="openable bizZaradek" style="display:none" rowspan="3">'._ZARADEK.' <span class="icon-file-edit" title="az első lehetőséget kiválasztja" ></span></td>';
+ echo '</tr>';
+ echo '<tr>';
+ echo '<th colspan="4">';
+ echo _MULASZTAS;
+ echo '</th>';
+ echo '<th rowspan="2">'._MAGATARTAS.'</th>';
+ echo '<th rowspan="2">'._SZORGALOM.'</th>';
+ echo '</tr>';
+ echo '<tr>';
+ echo '<th>'._IGAZOLATLAN.'</th>';
+ echo '<th>'._IGAZOLT.'</th>';
+ echo '<th rowspan="2">'._FELSZ.'</th>';
+ echo '<th rowspan="2">'._KESES.'</th>';
+ echo '</tr>';
+ echo '</thead>';
+
+ echo '<tfoot>';
+
+ echo '<tr>';
+ echo '<th>'.ucfirst(_TANAR).'</th>';
+ // Tárgyanként
+ $id = 0;
+ for ($j = 0; $j < count($ADAT['targyak']); $j++) if (
+ !in_array($ADAT['targyak'][$j]['targyId'], $MAGSZORGIDK)
+ && (isset($ADAT['tantargyiAtlagok'][$ADAT['targyak'][$j]['targyId']])
+ || $ADAT['targyboljegy'][$ADAT['targyak'][$j]['targyId']] === true
+ || __SHOWSTATZARASMINDENTARGY)
+ ) {
+ echo '<td id="tanar'.$id.'" rowspan="'.$rowSpan.'" class="openable tglTargy t'.$id.'">';
+ if (is_array($ADAT['tanarok'][ $ADAT['targyak'][$j]['targyId'] ])) {
+ for ($t=0; $t<($tdb=count($ADAT['tanarok'][ $ADAT['targyak'][$j]['targyId'] ])); $t++) {
+ echo $ADAT['tanarok'][ $ADAT['targyak'][$j]['targyId'] ][$t]['tanarNev'];
+ if ($t<$tdb-1) echo ',<br/>';
+ }
+ }
+ echo '</td>';
+ $id++;
+ }
+ echo '<th colspan="'.($plusCols-1).'">&nbsp;</th>';
+ echo '</tr>';
+
+ echo '</tfoot>';
+
+ // ---------- Tanulónként a jegyek ------------- //
+
+ echo '<tbody>';
+
+ for ($i = 0; $i < count($ADAT['diakok']); $i++) {
+
+ $_class = array(); // reset
+ $D = $ADAT['diakok'][$i];
+ $diakId = $D['diakId'];
+ $DA = $ADAT['diakAdat'][$diakId];
+ $jegyek = $ADAT['jegyek'][$diakId];
+ $hianyzas = $ADAT['hianyzas'][$diakId];
+ $atlag = $ADAT['atlag'][$diakId];
+ $msz_beirhato = ($D['aktualisStatusz'] != 'magántanuló')
+ && (!isset($D['kiDt']) || is_null($D['kiDt']) || (strtotime($D['kiDt'])>=time()));
+
+ $zaraskoriTag = in_array($diakId, $ADAT['zaraskoriDiakIds']);
+
+ if (!$zaraskoriTag) echo '<tr class="elment">'; else echo '<tr>';
+
+ $_class[] = ekezettelen(str_replace(' ', '', $D['aktualisStatusz']));
+ if ($DA['bukott']===true) $_class[] = 'bukott';
+ elseif ($DA['jeles']===true) $_class[] = 'jeles';
+ elseif ($DA['kituno']===true) $_class[] = 'kituno';
+
+ echo '<th class="'.implode(' ',$_class).'">';
+ if ($D['diakNaploSorszam']!='') echo '<div class="naploSorszam">'.$D['diakNaploSorszam'].'</div>';
+ echo '<div style="display: table-cell;"><a href="'.href('index.php?page=naplo&sub=osztalyozo&f=diak&diakId='.$diakId).'" title="'.$D['aktualisStatusz'].'">';
+ echo $D['diakNev'];
+ echo '</a></div>';
+ echo '</th>';
+
+ // Tárgyanként végigmenve
+ $id = 0;
+ for ($j = 0; $j < count($ADAT['targyak']); $j++) if (
+ !in_array($ADAT['targyak'][$j]['targyId'], $MAGSZORGIDK)
+ && (isset($ADAT['tantargyiAtlagok'][$ADAT['targyak'][$j]['targyId']])
+ || $ADAT['targyboljegy'][$ADAT['targyak'][$j]['targyId']] === true
+ || __SHOWSTATZARASMINDENTARGY)
+ ) {
+ $_targyId=$ADAT['targyak'][$j]['targyId'];
+ $jegyAdat = $jegyek[$ADAT['targyak'][$j]['targyId']]; // EZ INDEXELT TÖMB! Több jegy is lehet!
+ $_vanosztalyzat=false;
+ echo '<td class="jegyek openable tglTargy t'.$id.'" id="jegy'.$i.'a'.$id.'">';
+ for ($k=0; $k<count($jegyAdat); $k++) {
+ $_jegyAdat = $jegyAdat[$k];
+ if ($_jegyAdat['felev'] != $ADAT['szemeszterAdat']['szemeszter']) { // ilyen elvileg már nem lehet; - de lehet félévkor záruló tárgyak!
+ echo '<span title="'.$_jegyAdat['felev'].'. '._FELEV.'" class="masikFelev">';
+ echo $KOVETELMENY[$_jegyAdat['jegyTipus']][$_jegyAdat['jegy']]['hivatalos'];
+ echo ' '.$bizonyitvanyMegjegyzesek[$_jegyAdat['megjegyzes']];
+ echo '</span>';
+ } else {
+ echo '<div class="zaroJegyAdat" data-zarojegyid="'.$_jegyAdat['zaroJegyId'].'">';
+ echo $KOVETELMENY[$_jegyAdat['jegyTipus']][$_jegyAdat['jegy']]['hivatalos'];
+ echo ' '.$bizonyitvanyMegjegyzesek[$_jegyAdat['megjegyzes']];
+ if (in_array($_jegyAdat['jegyTipus'], array('jegy','féljegy'))) {
+ if ( ($_jegyAdat['jegy']-$ADAT['evkoziJegyAtlag'][$diakId][$_targyId][0]['jegyAtlag'])>0.5)
+ echo '<span title="'.$ADAT['evkoziJegyAtlag'][$diakId][$_targyId][0]['jegyAtlag'].'">*</span>';
+ elseif ( ($_jegyAdat['jegy']-$ADAT['evkoziJegyAtlag'][$diakId][$_targyId][0]['jegyAtlag'])<-0.5)
+ echo '<span title="'.$ADAT['evkoziJegyAtlag'][$diakId][$_targyId][0]['jegyAtlag'].'">!</span>';
+
+ }
+ if (0<($_evesOraszam=$ADAT['targyOraszam'][$diakId][$_jegyAdat['targyId']]['evesOraszam']))
+ echo '<div class="osz">'.($_evesOraszam).'</div>';
+ $_vanosztalyzat=true;
+ echo '</div>';
+ }
+ }
+
+ if ($_vanosztalyzat===false && $ADAT['evkoziJegyAtlag'][$diakId][$_targyId][0]['jegyAtlag']!='') echo '<span title="volt jegye">÷</span>';
+ echo '</td>';
+ $id++;
+ }
+
+ if (isset($ADAT['atlagok'][$diakId])) {
+ $atlag = number_format($ADAT['atlagok'][$diakId], 2, ',', '');
+ $_class[] = 'atlag ';
+ } else {
+ $atlag = '';
+ }
+ // Tanuló átlaga:
+ echo '<th class="'.implode(' ',$_class).'">'.$atlag;
+
+ echo '</th>';
+
+ // Tanuló hiányzásai
+ echo '<th class="ni">';
+ echo intval($hianyzas['igazolatlan']);
+ echo '</th>';
+ echo '<th class="i">';
+ echo intval($hianyzas['igazolt']);
+ echo '</th>';
+
+ echo '<th>';
+ echo ($ADAT['hianyzas'][$diakId]['felszerelesHianyDb']);
+ echo '</th><th>';
+ echo intval($ADAT['hianyzas'][$diakId]['kesesDb']);
+ echo '/'.intval($ADAT['hianyzas'][$diakId]['kesesPercOsszeg']).'\'';
+ echo '</th>';
+
+ echo '<td class="biz">';
+
+ $_magatartasTargyId = $ADAT['magatartasTargyIdk'][0];
+ if (_BEIRHATO && $msz_beirhato && $zaraskoriTag) {
+
+ if (!isset($jegyek[ $_magatartasTargyId ][0]['targyId']))
+ $jegyek[ $_magatartasTargyId ][0]['targyId'] = $_magatartasTargyId;
+ $J = $jegyek[ $_magatartasTargyId ][0];
+ $_JEGY_S = array(
+ 'jegySelectTipus' => 'zaroJegy',
+ 'variable' => 'zaroJegy',
+ 'diakId' => $diakId,
+ 'targyId'=> $_magatartasTargyId,
+ 'tanev'=> $ADAT['szemeszterAdat']['tanev'],
+ 'szemeszter' => $ADAT['szemeszterAdat']['szemeszter'],
+ 'evfolyam'=> $J['evfolyam'],
+ 'evfolyamJel'=> $J['evfolyamJel'],
+ 'zaroJegyId' => $J['zaroJegyId'],
+ 'jegy' => $J['jegy'],
+ 'jegyTipus' => $ADAT['targyAdat'][ $_magatartasTargyId ]['zaroKovetelmeny'], // fixen
+ 'megjegyzes' => $J['megjegyzes'],
+ 'tabindex' => ($i+count($ADAT['diakok']))
+ );
+ putJegySelect($_JEGY_S);
+
+ } else {
+ echo $KOVETELMENY['magatartás'][$jegyek[ $_magatartasTargyId ][0]['jegy']]['hivatalos'];
+ }
+ echo '</td>'."\n";
+
+ echo '<td class="biz">';
+
+ $_szorgalomTargyId = $ADAT['szorgalomTargyIdk'][0];
+
+ if (_BEIRHATO && $msz_beirhato && $zaraskoriTag) {
+ if (!isset($jegyek[$_szorgalomTargyId][0]['targyId'])) $jegyek[$_szorgalomTargyId][0]['targyId'] = $_szorgalomTargyId;
+ $J = $jegyek[$_szorgalomTargyId][0];
+ $_JEGY_S = array(
+ 'jegySelectTipus' => 'zaroJegy',
+ 'variable' => 'zaroJegy',
+ 'diakId' => $diakId,
+ 'targyId'=> $_szorgalomTargyId,
+ 'tanev'=> $ADAT['szemeszterAdat']['tanev'],
+ 'szemeszter' => $ADAT['szemeszterAdat']['szemeszter'],
+ 'evfolyam'=> $J['evfolyam'],
+ 'evfolyamJel'=> $J['evfolyamJel'],
+ 'zaroJegyId' => $J['zaroJegyId'],
+ 'jegy' => $J['jegy'],
+ 'jegyTipus' => $ADAT['targyAdat'][ ($_szorgalomTargyId) ]['zaroKovetelmeny'], // fixen
+ 'megjegyzes' => $J['megjegyzes'],
+ 'tabindex' => ($i+count($ADAT['diakok']))
+ );
+
+ putJegySelect($_JEGY_S);
+
+ } else {
+ echo $KOVETELMENY['szorgalom'][$jegyek[ $_szorgalomTargyId ][0]['jegy']]['hivatalos'];
+ }
+ echo '</td>'."\n";
+
+ // Záradékok
+ echo '<td class="bizZaradek openable" style="display:none">';
+ if (_BEIRHATO && $msz_beirhato && $zaraskoriTag) {
+ if ($DA['bukott']) $adhatoZaradekok = array_values($ZaradekIndex['konferencia bukás']);
+ else $adhatoZaradekok = array_values($ZaradekIndex['konferencia']);
+ echo '<select name="zaradekAdat[]"><option value=""> - </option>'."\n";
+ if (is_array($ADAT['zaradekok'][$diakId])) {
+ echo '<option value="" selected="selected">'.$ADAT['zaradekok'][$diakId]['szoveg'].'</option>'."\n";
+ }
+ // itt okosítható az algoritmus a következőképp:
+ // ha bukás van, a javítóviszgást kéne ajánlani,
+ // ha végző évfolyam, akkor a befejezte ajánlani,
+ // ha nem osztályozható egy tárgyból, akkor azt (de készségtárgyak?)
+ foreach ($adhatoZaradekok as $zaradekIndex) {
+ $zAdat = $ADAT['adhatoZaradekok'][$zaradekIndex];
+ if ($DA['bukott']) {
+ $csere = array('%évfolyam%'=>$ADAT['evfolyamJel'],'%évfolyam betűvel%'=>$_EVFOLYAMJEL_BETUVEL[ $ADAT['evfolyamJel'] ],'%tantárgy%'=>implode(', ',$DA['bukottTargy']));
+ } else {
+ $csere = array('%évfolyam%'=>$ADAT['kovetkezoEvfolyamJel'],'%évfolyam betűvel%'=>$_EVFOLYAMJEL_BETUVEL[ $ADAT['kovetkezoEvfolyamJel'] ],'%tantárgy%'=>$DA['zaradekStr']);
+ }
+ $torzsSzoveg = $zAdat['szoveg'].' ['.$zAdat['sorszam'].'/'.$zaradekIndex.']';
+ echo '<option value="'.$diakId.'/'.$zaradekIndex.'/'.$ADAT['zaradekok'][$diakId]['zaradekId'].'/'.implode('=',$DA['bukottTargy']).'">';
+ echo str_replace(array_keys($csere), array_values($csere), $torzsSzoveg );
+ echo '</option>'."\n";
+ }
+ echo '</select>';
+ } else {
+ echo $ADAT['zaradekok'][$diakId]['szoveg'];
+ }
+ echo '</td>'."\n";
+
+ echo '</tr>';
+
+ }
+
+ // Tantárgyi átlagok
+ echo '<tr>';
+ echo '<th colspan="'.$_colSpan.'" class="dolgozat">'._ATLAG.'</th>';
+ $id=0;
+ for ($j = 0; $j < count($ADAT['targyak']); $j++) if (
+ !in_array($ADAT['targyak'][$j]['targyId'], $MAGSZORGIDK)
+ && (isset($ADAT['tantargyiAtlagok'][$ADAT['targyak'][$j]['targyId']])
+ || $ADAT['targyboljegy'][$ADAT['targyak'][$j]['targyId']] === true
+ || __SHOWSTATZARASMINDENTARGY)
+ ) {
+ echo '<th id="atlag'.$id.'" class="openable tglTargy" title="'.$ADAT['targyak'][$j]['targyNev'].'">';
+// if (isset($ADAT['tantargyiAtlagok'][$ADAT['targyak'][$j]['targyId']])) {
+ $atlag = number_format($ADAT['tantargyiAtlagok'][$ADAT['targyak'][$j]['targyId']], 2, ',', '');
+ echo $atlag;
+// } else { $atlag=0; }
+ echo '</th>'."\n";
+ $id++;
+ }
+ echo '<th class="dolgozat">';
+ echo '<span title="'._OSZTALYATLAGA.'">'.number_format($ADAT['atlagok']['osztaly'], 2, ',', '.').'</span>';
+ echo '/';
+ echo '<span title="'._OSSZES_JEGY_ATLAGA.'">'.number_format($ADAT['tantargyiAtlagok']['osztaly'], 2, ',', '.').'</span>';
+ echo '</th>';
+
+ // Félévi átlagok
+ echo '<th colspan="'.($plusCols-2).'" class="atlag">';
+ if (_BEIRHATO) echo '<input type="submit" class="felev1" name="tipus" value="'._BEIR.'" />';
+ echo '</th>';
+
+ echo '</tr>';
+ // Tárgyi eloszlás
+// ------------------------------------------------------------------------------------------------------------
+// ------------------------------------------------------------------------------------------------------------
+// ------------------------------------------------------------------------------------------------------------
+// ------------------------------------------------------------------------------------------------------------
+ foreach ($KOVETELMENY['jegy']['értékek'] as $_jegy) {
+ echo '<tr>';
+ echo '<th colspan="'.$_colSpan.'">'.$KOVETELMENY['jegy'][$_jegy]['hivatalos'].'</th>';
+ for ($j = 0; $j < count($ADAT['targyak']); $j++) if (
+ !in_array($ADAT['targyak'][$j]['targyId'], $MAGSZORGIDK)
+ && (isset($ADAT['tantargyiAtlagok'][$ADAT['targyak'][$j]['targyId']])
+ || $ADAT['targyboljegy'][$ADAT['targyak'][$j]['targyId']] === true
+ || __SHOWSTATZARASMINDENTARGY)
+ ) {
+ $_targyId = $ADAT['targyak'][$j]['targyId'];
+ echo '<td class="targyEloszlas openable tglTargy">';
+ echo $ADAT['jegyEloszlas'][$_targyId][$_jegy];
+ echo '</td>';
+ }
+ echo '<th>';
+ echo $ADAT['jegyEloszlas']['osszes'][$_jegy];
+ echo '</th>';
+ echo '</tr>';
+ }
+// ------------------------------------------------------------------------------------------------------------
+// ------------------------------------------------------------------------------------------------------------
+// ------------------------------------------------------------------------------------------------------------
+// ------------------------------------------------------------------------------------------------------------
+
+ echo '</tbody>';
+ echo '</table>';
+
+ formEnd();
+
+ putOsztalyStatisztika($ADAT);
+
+ }
+
+ function putOsztalyStatisztika($ADAT) {
+
+// echo '<h2>'._OSZTALYSTATISZTIKA.'</h2>';
+
+ echo '<table class="bizstat floatleft">';
+ echo '<caption>'._BIZONYITVANY.'</caption>';
+ echo '<tr>';
+ echo '<th>'. _DICSERETES .'</th>';
+ echo '<td>'.$ADAT['stat']['dicséret'].'</td>';
+ echo '</tr>';
+ echo '<tr>';
+ echo '<th>'. _FIGYELMEZTETOS .'</th>';
+ echo '<td>'.$ADAT['stat']['figyelmeztető'].'</td>';
+ echo '</tr>';
+// echo '<tr>';
+// echo '<th>'. _NYELVVIZSGAS .'</th>';
+// echo '<td>'.$STAT['nyelvvizsga'].'</td>';
+// echo '</tr>';
+
+ echo '<tr>';
+ echo '<th>'. _KITUNO .'</th>';
+ echo '<td>'.$ADAT['stat']['kituno'].'</td>';
+ echo '</tr>';
+ echo '<tr>';
+ echo '<th>'. _JELES .'</th>';
+ echo '<td>'.$ADAT['stat']['jeles'].'</td>';
+ echo '</tr>';
+ echo '<tr>';
+ echo '<th>'. _BUKASOK .'</th>';
+ echo '<td>'.$ADAT['stat']['bukas'].'</td>';
+ echo '</tr>';
+ echo '<tr class="ossz">';
+ echo '<th>'. _BUKOTTAK .'</th>';
+ echo '<td>'.$ADAT['stat']['bukott'].'</td>';
+ echo '</tr>';
+ //+ részletezés
+ echo '<tr>';
+ echo '<th>1 '._TARGYBOL.'</th>';
+ echo '<td>'.$ADAT['stat']['dbBukott'][1].'</td>';
+ echo '</tr>';
+ echo '<tr>';
+ echo '<th>2 '._TARGYBOL.'</th>';
+ echo '<td>'.$ADAT['stat']['dbBukott'][2].'</td>';
+ echo '</tr>';
+ echo '<tr>';
+ echo '<th>3+ '._TARGYBOL.'</th>';
+ echo '<td>'.$ADAT['stat']['dbBukott'][3].'</td>';
+ echo '</tr>';
+
+ echo '</table>';
+
+ // $HIANYZASOK['átlag'][$felev]['igazolt|igazolatlan']
+ // $HIANYZASOK['összesen'][$felev]['igazolt|igazolatlan' = $status]
+ // $HIANYZASOK['ötnél több igazolatlan'][$felev|'összesen']
+ // $HIANYZASOK['tíznél több igazolatlan'][$felev|'összesen']
+ // $HIANYZASOK['nincs igazolatlanja'][$felev]
+ echo '<table class="bizstat">';
+ echo '<caption>'.ucfirst(_HIANYZASOK).'</caption>';
+
+ echo '<tr>';
+ echo '<th>'._IGAZOLT.' '._OSSZESEN.'</th>';
+ echo '<td>'.number_format($ADAT['stat']['igazolt'],0,',','.').'</td>';
+ echo '</tr>';
+ echo '<tr>';
+ echo '<th>'._IGAZOLATLAN.' '._OSSZESEN.'</th>';
+ echo '<td>'.number_format($ADAT['stat']['igazolatlan'],0,',','.').'</td>';
+ echo '</tr>';
+ echo '<tr class="ossz">';
+ echo '<th>'._HIANYZAS.' '._OSSZESEN.'</th>';
+ echo '<td>'.number_format((($ADAT['stat']['igazolt']+$ADAT['stat']['igazolatlan'])),0,',','.').'</td>';
+ echo '</tr>';
+
+ $letszam = count($ADAT['zaraskoriDiakIds']);
+ if ($letszam != 0) {
+ echo '<tr>';
+ echo '<th>'._IGAZOLT.' '._ATLAGOSAN.'</th>';
+ echo '<td>'.number_format($ADAT['stat']['igazolt']/$letszam,2,',','.').'</td>';
+ echo '</tr>';
+ echo '<tr>';
+ echo '<th>'._IGAZOLATLAN.' '._ATLAGOSAN.'</th>';
+ echo '<td>'.number_format($ADAT['stat']['igazolatlan']/$letszam,2,',','.').'</td>';
+ echo '</tr>';
+ echo '<tr class="ossz">';
+ echo '<th>'._HIANYZAS.' '._ATLAGOSAN.'</th>';
+ echo '<td>'.number_format(($ADAT['stat']['igazolt']+$ADAT['stat']['igazolatlan'])/$letszam,2,',','.').'</td>';
+ echo '</tr>';
+
+ echo '<tr>';
+ echo '<th>'._NINCS.' '._IGAZOLATLANJA.'</th>';
+ echo '<td>'.$ADAT['stat']['nincs'].'</td>';
+ echo '</tr>';
+ echo '<tr>';
+ echo '<th>'._OT.' '._VAGY.' '._OTNEL.' '._TOBB.' '._IGAZOLATLAN.'</th>';
+ echo '<td>'.$ADAT['stat']['otnel tobb'].'</td>';
+ echo '</tr>';
+ echo '<tr>';
+ echo '<th>'._TIZ.' '._VAGY.' '._TIZNEL.' '._TOBB.' '._IGAZOLATLAN.'</th>';
+ echo '<td>'.$ADAT['stat']['tiznel tobb'].'</td>';
+ echo '</tr>';
+ echo '<tr class="ossz">';
+ echo '<th>'._LETSZAM.'</th>';
+ echo '<td>'.$letszam.'</td>';
+ echo '</tr>';
+ }
+ echo '</table>'."\n";
+
+ }
+
+ function _putBeallitasCheckbox($var,$ADAT) {
+ $CHK = ($ADAT[$var]==true) ? ' checked="checked" ':'';
+ echo '<div><input '.$CHK.' type="checkbox" name="beallitasok_'.$var.'" id="beallitasok_'.$var.'" value="1" /><label for="beallitasok_'.$var.'">'.constant('_'.strtoupper($var)).'</label></div>';
+ }
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/szempontRendszer.phtml b/mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/szempontRendszer.phtml
new file mode 100644
index 00000000..b01a7d16
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/szempontRendszer.phtml
@@ -0,0 +1,75 @@
+<?php
+
+ function putUjSzempontRendszerForm($ADAT) {
+
+ formBegin(array('class'=>"szr"));
+
+ echo '<input type="hidden" name="action" value="ujSzempontRendszer" />'."\n";
+ echo '<input type="hidden" name="targyId" value="'.$ADAT['targyId'].'" />'."\n";
+ echo '<input type="hidden" name="kepzesId" value="'.$ADAT['kepzesId'].'" />'."\n";
+ echo '<input type="hidden" name="evfolyamJel" value="'.$ADAT['evfolyamJel'].'" />'."\n";
+ echo '<input type="hidden" name="szemeszterId" value="'.$ADAT['szemeszterId'].'" />'."\n";
+
+ echo '<br /><textarea name="txt" id="txt"></textarea>'."\n";
+
+ echo '<input type="submit" value="'._OK.'" />'."\n";
+
+ formEnd();
+
+ }
+
+ function putSzempontRendszer($ADAT) {
+
+ formBegin(array('class'=>'szr'));
+ echo '<ol>'."\n";
+ foreach ($ADAT['szempontRendszer']['szempont'] as $szempontId => $szAdat) {
+ echo '<li>'."\n";
+ echo $szAdat['szempont'];
+ if (is_array($ADAT['szempontRendszer']['minosites'][$szempontId])) {
+ echo '<ul>'."\n";
+ for ($i = 0; $i < count($ADAT['szempontRendszer']['minosites'][$szempontId]); $i++) {
+ echo '<li>';
+ echo $ADAT['szempontRendszer']['minosites'][$szempontId][$i]['minosites'];
+ echo '</li>'."\n";
+ }
+ echo '</ul>'."\n";
+ }
+ echo '</li>'."\n";
+ }
+ echo '</ol>'."\n";
+ echo '<input type="hidden" name="szemeszterId" value="'.$ADAT['szemeszterId'].'" />'."\n";
+ echo '<input type="hidden" name="szrId" value="'.$ADAT['szempontRendszer']['szrId'].'" />'."\n";
+ echo '<input type="hidden" name="targyId" value="'.$ADAT['targyId'].'" />'."\n";
+ echo '<input type="hidden" name="kepzesId" value="'.$ADAT['kepzesId'].'" />'."\n";
+ echo '<input type="hidden" name="evfolyamJel" value="'.$ADAT['evfolyamJel'].'" />'."\n";
+ echo '<input type="hidden" name="action" value="szempontRendszerTorles" />'."\n";
+ echo '<input type="submit" value="'._TOROL.'" class="confirm" title="'._BIZTOS_TOROL.'" />'."\n";
+ formEnd();
+ }
+
+ function putSzempontRendszerLista($ADAT) {
+
+ echo '<table class="lista">'."\n";
+
+ echo '<tr><th>'._ID.'</th><th>'._SZEMESZTER.'</th><th>'._TARGY.'</th><th>'._TARGYTIPUS.'</th><th>'._KEPZES.'</th></tr>';
+
+ for ($i = 0; $i < count($ADAT['szempontRendszerek']); $i++) {
+ $A = $ADAT['szempontRendszerek'][$i];
+ echo '<tr>';
+ echo '<td>'.$A['szrId'].'</td>';
+ echo '<td>'.$A['tanev'].'/'.$A['szemeszter'].'</td>';
+ echo '<td>';
+ if (isset($A['targyId'])) echo $A['targyNev'].' ('.$A['targyId'].')';
+ echo '</td>';
+ echo '<td>'.$A['targyTipus'].'</td>';
+ echo '<td>';
+ if (isset($A['kepzesId'])) echo $A['kepzesNev'].' - '.$A['kepzesTanev'].' ('.$A['kepzesId'].')';
+ echo '</td>';
+ echo '</tr>';
+ }
+
+ echo '</table>'."\n";
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/szovegesErtekeles.phtml b/mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/szovegesErtekeles.phtml
new file mode 100644
index 00000000..b81c5ca5
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/szovegesErtekeles.phtml
@@ -0,0 +1,70 @@
+<?php
+
+ function putErtekeloForm($ADAT) {
+
+ if (isset($ADAT['szemeszterId'])) $class=' zaro';
+ formBegin(array('class'=>"ertekeles$class"));
+
+ echo '<input type="hidden" name="action" value="ujErtekeles" />'."\n";
+ echo '<input type="hidden" name="kepzesId" value="'.$ADAT['kepzesId'].'" />'."\n";
+ echo '<input type="hidden" name="evfolyam" value="'.$ADAT['evfolyam'].'" />'."\n";
+ echo '<input type="hidden" name="dt" value="'.$ADAT['dt'].'" />'."\n";
+ echo '<input type="hidden" name="tanarId" value="'.$ADAT['tanarId'].'" />'."\n";
+ echo '<input type="hidden" name="tankorId" value="'.$ADAT['tankorId'].'" />'."\n";
+ echo '<input type="hidden" name="targyId" value="'.$ADAT['targyId'].'" />'."\n";
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalyId'].'" />'."\n";
+ echo '<input type="hidden" name="diakId" value="'.$ADAT['diakId'].'" />'."\n";
+ echo '<input type="hidden" name="szemeszterId" value="'.$ADAT['szemeszterId'].'" />'."\n";
+ echo '<input type="hidden" name="szrId" value="'.$ADAT['szempontRendszer']['szrId'].'" />'."\n";
+
+//echo '<pre>'; var_dump($ADAT); echo '</pre>';
+
+ echo '<h1>';
+ echo $ADAT['diakTargyak'][ $ADAT['targyId'] ]['targyNev'];
+ if ($class == ' zaro') echo ' - '._SZEMESZTER_ERTEKELES;
+ echo '</h1>'."\n";
+ if (isset($ADAT['szovegesErtekeles']['szeId'])) echo '<h2>'._LEGUTOBBI_ERTEKELES.': '.$ADAT['szovegesErtekeles']['dt'].'</h2>';
+ else echo '<h2>'._MEG_NEM_ERTEKELT.'</h2>'."\n";
+
+ echo '<ol>'."\n";
+ foreach ($ADAT['szempontRendszer']['szempont'] as $szempontId => $szAdat) {
+ echo '<li>'."\n";
+ echo $szAdat['szempont']."\n";
+ echo '<ul>'."\n";
+ for ($i = 0; $i < count($ADAT['szempontRendszer']['minosites'][$szempontId]); $i++) {
+ $mAdat = $ADAT['szempontRendszer']['minosites'][$szempontId][$i];
+ if (
+ is_array($ADAT['szovegesErtekeles']['minosites'])
+ && in_array($mAdat['minositesId'], $ADAT['szovegesErtekeles']['minosites'])
+ ) $CHK = ' checked="checked" ';
+ else $CHK = '';
+ echo '<li>'."\n";
+ echo '<input id="m'.$mAdat['minositesId'].'" type="checkbox" name="minosites[]" value="'.$mAdat['minositesId'].'"'.$CHK.' />'."\n";
+ echo '<label for="m'.$mAdat['minositesId'].'">'.$mAdat['minosites'].'</label>'."\n";
+ echo '</li>'."\n";
+ }
+ if (__MODOSITHAT) {
+ echo '<li>'."\n";
+ echo '<input type="hidden" name="szempontId[]" value="'.$szempontId.'" />'."\n";
+ echo '<input type="text" name="egyediMinosites[]" value="'.$ADAT['szovegesErtekeles']['egyediMinosites'][$szempontId]['egyediMinosites'].'" />'."\n";
+ echo '</li>'."\n";
+ } elseif ($ADAT['szovegesErtekeles']['egyediMinosites'][$szempontId]['egyediMinosites'] != '') {
+ echo '<li>'."\n";
+ echo '<span class="egyediMinosites">'.$ADAT['szovegesErtekeles']['egyediMinosites'][$szempontId]['egyediMinosites'].'</span>'."\n";
+ echo '</li>'."\n";
+ }
+ echo '</ul>'."\n";
+ echo '</li>'."\n";
+ }
+ echo '</ol>'."\n";
+
+ if (__MODOSITHAT) echo '<input type="submit" class="szoveges" value="'._OK.'" />'."\n";
+
+ formEnd();
+
+//echo '<pre>';
+//var_dump($ADAT['szovegesErtekeles']);
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/tankor.phtml b/mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/tankor.phtml
new file mode 100644
index 00000000..cbac5b68
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/tankor.phtml
@@ -0,0 +1,550 @@
+<?php
+/*
+ Module: naplo
+*/
+
+ require_once('skin/classic/module-naplo/html/share/jegy.phtml');
+
+ function putTankorJegyek($tankorId, $Diakok, $Jegyek, $Orak, $Dolgozatok, $sulyozas = __DEFAULT_SULYOZAS, $tolDt = '', $igDt = '', $nevsor, $ADAT) {
+
+ global $ADAT; // ????????????????
+ global $aHetNapjai, $Honapok, $Osztalyzatok, $diakId, $tanarId, $osztalyId, $_TANEV;
+ global $bizonyitvanyMegjegyzesek, $tanevIdoszak, $SULYOZAS;
+ global $KOVETELMENY;
+
+ $kepMutat=$ADAT['kepMutat'];
+
+ $aktDt = $kDt = date('Y-m-01',strtotime($tolDt));
+ $vDt = date('Y-m-01',strtotime($igDt));
+
+ $SULYOK = explode(':',$ADAT['sulyozas']);
+
+ // Keressük meg az első érintett szemesztert...
+ reset($_TANEV['szemeszter']); $szAdat = current($_TANEV['szemeszter']);
+ while (strtotime($szAdat['zarasDt']) < strtotime($kDt)) $szAdat = next($_TANEV['szemeszter']);
+ $szemeszter = $szAdat['szemeszter'];
+
+ $tanev = $_TANEV['tanev'];
+
+ $targyId = $Jegyek['tankörök'][$tankorId]['targyId'];
+ $_zarojegyGomb = false;
+ $evkoziKovetelmeny = $ADAT['tankorAdat']['kovetelmeny'];
+ $zaroKovetelmeny = $ADAT['tankorAdat']['zaroKovetelmeny'];
+ $tankorJelleg = $ADAT['tankorAdat2'][$tankorId][0]['jelleg']; // első szemeszter
+
+ // A jegybeíráshoz külön oszlop lesz + bizonyítvány 2 oszlop
+ $_colSpan = count($_TANEV['szemeszter']);
+ $colSpan = 3 + $_colSpan;
+ $rowSpan = 2; // első és második félév kiírása miatt...
+
+ if ($kepMutat) {
+ $_colSpan++;
+ $colSpan++;
+ }
+
+ while (strtotime($aktDt) <= strtotime($vDt)) {
+ list($ev,$ho,$nap) = explode('-',$aktDt);
+ $HO[] = array(
+ 'szemeszter' => $szemeszter,
+ 'év' => $ev,
+ 'hó' => $ho,
+ 'colspan' => 1+count($Jegyek['dolgozatok']['dátum szerint'][$szemeszter][$ev][$ho])
+ );
+ $HO['count']++;
+ $colSpan += 1+count($Jegyek['dolgozatok']['dátum szerint'][$szemeszter][$ev][$ho]);
+ $aktDt = date('Y-m-01',strtotime('+1 month',strtotime($aktDt)));
+ if (strtotime($aktDt) > strtotime($szAdat['zarasDt'])) {
+ $szAdat = next($_TANEV['szemeszter']); $szemeszter = $szAdat['szemeszter'];
+ if ($szAdat !== false) {
+ $HO[] = array(
+ 'szemeszter' => $szemeszter,
+ 'év' => $ev,
+ 'hó' => $ho,
+ 'colspan' => 1+count($Jegyek['dolgozatok']['dátum szerint'][$szemeszter][$ev][$ho])
+ );
+ $HO['count']++;
+ $colSpan += 1+count($Jegyek['dolgozatok']['dátum szerint'][$szemeszter][$ev][$ho]);
+ }
+ }
+ }
+
+ // svgClose(array('id'=>'closeLayer','alt'=>_CLOSE,'title'=>_CLOSE,'size'=>20));
+ formBegin(array('style'=>'display:none;','name'=>'jegyAdat', 'id'=>'jegyAdat', 'method'=>'post', 'action'=>href('index.php?page=naplo&sub=osztalyozo&f=jegy'), 'class'=>'onSubmitUpdate'));
+ echo '<input type="hidden" id="jegyId" value="" name="jegyId" />';
+ formEnd();
+
+ formBegin(array('name' => 'beir', 'method' => 'post', 'action' => ''));
+ echo '<input type="hidden" name="action" value="jegyBeiras" />'."\n";
+ echo '<input type="hidden" name="tankorId" value="'.$tankorId.'" />'."\n";
+ echo '<input type="hidden" name="diakId" value="'.$diakId.'" />'."\n";
+ echo '<input type="hidden" name="tanarId" value="'.$tanarId.'" />'."\n";
+ echo '<input type="hidden" name="osztalyId" value="'.$osztalyId.'" />'."\n";
+ echo '<input type="hidden" name="actionId" value="'.substr(uniqid( '', true),0,23).'" />'."\n";
+ echo '<input type="hidden" name="tolDt" value="'.$tolDt.'" />'."\n";
+ echo '<input type="hidden" name="igDt" value="'.$igDt.'" />'."\n";
+
+ echo '<table class="osztalyozo" align="center" cellspacing="1">'."\n";
+ echo '<thead>'."\n";
+ echo '<tr>'."\n";
+
+ echo '<th class="nev" colspan="'.($colSpan+1).'">'."\n";
+ echo $Jegyek['tankörök'][$tankorId]['tankorNev'];
+ //_inlineHelp('');
+ echo ' ('.implode(', ',$Jegyek['tanárok']['tanarNevek']).')';
+ echo '</th>'."\n";
+ echo '</tr><tr>';
+
+ echo '<th colspan="'.($_colSpan+1).'" rowspan="'.$rowSpan.'">';
+ $SEL = array($nevsor => ' selected="selected" ');
+ echo '<select name="nevsor" class="onChangeSubmit">';
+ echo '<option value="aktualis"'.$SEL['aktualis'].'>'._AKTUALIS_NEVSOR.'</option>';
+ echo '<option value="teljes"'.$SEL['teljes'].'>'._TELJES_NEVSOR.'</option>';
+ echo '</select>';
+ if ($kepMutat!='') $_CHK='checked="checked"'; else $_CHK='';
+ echo '<input type="checkbox" class="onChangeSubmit" name="kepMutat" value="1" '.$_CHK.' />';
+
+ echo '</th>';
+ // Hónaponként végigmenve
+ $szemeszter = 0;
+ for ($j=0;$j<$HO['count'];$j++) {
+ if ($szemeszter != $HO[$j]['szemeszter']) {
+ if (isset($db)) {
+ echo $db.'">'.decimal_to_roman($szemeszter).'. '._FELEV.'</td>'."\n";
+ }
+ if ($szemeszter != 0) echo '<td class="ujSzemeszter" colspan="';
+ else echo '<td colspan="';
+ $szemeszter = $HO[$j]['szemeszter'];
+ $db = 0;
+ }
+ $db += $HO[$j]['colspan'];
+ }
+ echo $db.'">'.decimal_to_roman($szemeszter).'. '._FELEV.'</td>';
+
+ if ($sulyozas == __DEFAULT_SULYOZAS) $_sulyClass = "defaultSulyozas";
+
+ echo '<th rowspan="'.$rowSpan.'" class="'.$_sulyClass.'">';
+ echo _ATLAG.'<br />';
+ $SEL = array($sulyozas => ' selected="selected"');
+ echo '<select name="sulyozas" class="onChangeSubmit sulyozas">';
+ if (is_array($SULYOZAS) && count($SULYOZAS) > 0) {
+ for ($i = 0; $i < count($SULYOZAS); $i++)
+ echo '<option value="'.$SULYOZAS[$i].'"'.$SEL[$SULYOZAS[$i]].'>'.$SULYOZAS[$i].'</option>';
+ } else {
+ echo '<option value="1:1:1:1:1"'.$SEL['1:1:1:1:1'].'>'._EGYSZERU_ATLAG.'</option>';
+ echo '<option value="1:1:1:2:2"'.$SEL['1:1:1:2:2'].'>'._TEMAZAROVAL_SULYOZOTT.'</option>';
+ echo '<option value="1:2:2:4:4"'.$SEL['1:2:2:4:4'].'>'._KISJEGY_TEMAZARO.'</option>';
+ echo '<option value="1:1:2:2:4"'.$SEL['1:1:2:2:4'].'>'.'1:1:2:2:4'.'</option>';
+ }
+ echo '</select>';
+ echo '</th>';
+
+ // bizonyítvány
+ echo '<th colspan="'.count($_TANEV['szemeszter']).'">'._BIZONYITVANY.'</th>';
+
+ echo '</tr>';
+ echo '<tr>';
+ $szemeszter = 0;
+ for ($j=0;$j<$HO['count'];$j++) {
+ if ($szemeszter != $HO[$j]['szemeszter']) {
+ if ($szemeszter != 0) echo '<td class="ho ujSzemeszter" colspan="'.$HO[$j]['colspan'].'">';
+ else echo '<td class="ho" colspan="'.$HO[$j]['colspan'].'">';
+ $szemeszter = $HO[$j]['szemeszter'];
+ } else {
+ echo '<td class="ho" colspan="'.$HO[$j]['colspan'].'">';
+ }
+// echo $Honapok[$HO[$j]['hó']-1];
+// echo '<td class="ho">';
+ echo '<span class="roman">'.decimal_to_roman($HO[$j]['hó']).'.</span>';
+ echo '<span class="literal">'.$Honapok[$HO[$j]['hó']-1].'</span>';
+// echo '</td>'."\n";
+
+ echo '</td>';
+
+ }
+ foreach ($_TANEV['szemeszter'] as $szemeszter => $szAdat) {
+ echo '<th class="felevLezar" data-szemeszter="'.$szemeszter.'">'.decimal_to_roman($szemeszter).'. '._FELEV.'</th>';
+ }
+ echo '</tr>';
+ echo '</thead>';
+
+ echo '<tfoot>';
+
+ echo '<tr>';
+ echo '<th colspan="'.($colSpan+1).'">';
+
+ if (__EVKOZI_JEGYET_ADHAT) {
+
+ echo '<label for="megjegyzes">'._MEGJEGYZES.'</label>';
+ echo '<input type="text" name="megjegyzes" id="megjegyzes" value="" />';
+ echo '<br />'."\n";
+
+ echo '<select name="oraId">'."\n";
+ echo '<option value="">'._ORAHOZ_RENDELES.'</option>'."\n";
+ for ($i = 0; $i < count($Orak); $i++) {
+ $napNev = $aHetNapjai[(date('w',strtotime($Orak[$i]['dt']))+6)%7];
+ echo '<option value="'.$Orak[$i]['oraId'].'">'.$Orak[$i]['dt']." ($napNev) ".$Orak[$i]['ora'].'. '._ORA.'</option>'."\n";
+ }
+ echo '</select>'."\n";
+ echo '<input type="submit" class="jegy1" name="jegy1" value="'._KIS_JEGY.'" />'."\n";
+ echo '<input type="submit" class="jegy2" name="jegy2" value="'._NORMAL_JEGY.'" />'."\n";
+ echo '<input type="submit" class="jegy3 check" name="jegy3" value="'._DOLGOZAT.'" />'."\n";
+ echo '<input type="submit" class="jegy4 check" name="jegy4" value="'._TEMAZARO.'" />'."\n";
+ echo '<input type="submit" class="jegy5 check" name="jegy5" value="'._VIZSGAJEGY.'" />'."\n";
+
+ echo '<select name="dolgozatId" id="did" title="'._VALASSZ_DOLGOZATOT.'">'."\n";
+ echo '<option value="">'._DOLGOZATHOZ_RENDELES.'</option>'."\n";
+ echo '<option value="uj">'._UJ_DOLGOZAT.'</option>'."\n";
+ for ($i = 0; $i < count($Dolgozatok['dolgozatIds']); $i++) {
+ $dolgozatId = $Dolgozatok['dolgozatIds'][$i];
+ // $Dolgozatok[$dolgozatId] ===>>> megjegyzés|bejelentés|tervezett|tankör(array)[]['leírás'|'cn']
+ echo '<option value="'.$dolgozatId.'">'.$Dolgozatok[$dolgozatId]['dolgozatNev'].'</option>'."\n";
+ }
+ echo '</select>'."\n";
+ }
+ echo '</th>';
+ echo '</tr>';
+
+ echo '</tfoot>';
+
+
+ // ---------- Tanulónként a jegyek ------------- //
+
+ echo '<tbody>';
+ $db = 0;
+ if (is_array($Diakok['nevek'])) foreach ($Diakok['nevek'] as $diakId => $DIAKADAT) {
+
+ $JEGYET_KAP = (
+ in_array($ADAT['diakJogviszony'][$diakId][date('Y-m-d')]['statusz'],array('jogviszonyban van','vendégtanuló'))
+ ||
+ ($ADAT['diakJogviszony'][$diakId][date('Y-m-d')]['statusz']=='magántanuló' && $tankorJelleg == 'gyakorlat')
+ );
+ $__JEGYEK = array();
+ //$diakKovetelmeny = $Diakok['adatok'][$diakId][count($Diakok['adatok'][$diakId])-1]['kovetelmeny']; (ezt nem használjuk!!!)
+ echo '<tr class="'.str_replace(' ', '', ekezettelen($ADAT['diakJogviszony'][$diakId][date('Y-m-d')]['statusz'])).'">';
+
+ echo '<th class="diakNev c" data-diakid="'.$diakId.'">';
+ echo '<span class="sorszam">'.(++$db).'.</span>';
+ echo '</th>';
+
+ if ($kepMutat) {
+ echo '<th class="face">';
+ putFace($diakId,'diak',30);
+ echo '</th>';
+ }
+
+ echo '<th class="diakNev diakNevTxt" '.((!__EVKOZI_JEGYET_ADHAT) ? 'colspan="2"':'').'>';
+ echo '<a href="'.href('index.php?page=naplo&sub=osztalyozo&f=diak&diakId='.$diakId).'">';
+ echo '<span title="['.$diakId.'] '._KOVETELMENY.': '.$ADAT['tankorAdat']['kovetelmeny'].', '._EVFOLYAMA.': '.$ADAT['diakEvfolyamJel']['aktualis'][$diakId].'">';
+ echo $DIAKADAT['diakNev'];
+ echo '</span>';
+ echo '</a>';
+ if ($ADAT['diakEvfolyamJel']['aktualis'][$diakId]=='' && function_exists('putAlertImage')) putAlertImage('Nem határozható meg az évfolyama! Vendégtanuló, vagy már nem tagja a megfelelő osztálynak?');
+ echo '</th>';
+ if (__EVKOZI_JEGYET_ADHAT ) {
+ echo '<th>';
+ if (
+ (!is_array($ADAT['diakFelmentes'][$diakId]) || !in_array($tankorId,$ADAT['diakFelmentes'][$diakId])) && $JEGYET_KAP===true
+ ) {
+
+ // Ez még nem használható! DE NAGYON JÓ LENNE ÁM - 2016 --TODO
+ /*
+ $_JEGY = array('jegySelectTipus'=>'jegy',
+ 'evfolyam'=>$evfolyam,
+ 'diakId'=>$diakId,
+ 'targyId'=>$targyId,
+ 'jegyTipus'=>$evkoziKovetelmeny
+ );
+ putJegySelect($_JEGY);
+ */
+ echo '<select name="jegy[]" tabindex="'.($db+1).'">';
+ echo '<option value="">-</option>';
+ for ($o=0;$o<count($KOVETELMENY[$evkoziKovetelmeny]['értékek']);$o++) {
+ $_osztalyzat = $KOVETELMENY[$evkoziKovetelmeny]['értékek'][$o];
+ echo '<option value="'.$diakId.'|'.$evkoziKovetelmeny.'|'.$_osztalyzat.'">'.$KOVETELMENY[$evkoziKovetelmeny][$_osztalyzat]['rovid'].'</option>';
+ }
+ echo '</select>'."\n";
+
+ } else {
+ echo '-';
+ }
+ echo '</th>'."\n";
+ }
+ // Hónaponként végigmenve
+ $elozoHo = 0;
+ for ($j = 0; $j < $HO['count']; $j++) {
+
+ $_szemeszter = $HO[$j]['szemeszter'];
+ $elozoHo = $_ho;
+ $_ho = $HO[$j]['hó'];
+ $_ev = $HO[$j]['év'];
+ $_JEGYEK = $Jegyek[$diakId][$_szemeszter][$_ev][$_ho]['jegyek'];
+ $_DOGA = $Jegyek[$diakId][$_szemeszter][$_ev][$_ho]['dolgozat'];
+
+ if ($elozoHo == $_ho) echo '<td class="jegyek ujSzemeszter">';
+ else echo '<td class="jegyek">';
+ for ($k = 0; $k < count($_JEGYEK); $k++) {
+ $title = '';
+ $href = href('index.php?page=naplo&sub=osztalyozo&f=jegy&jegyId='.$_JEGYEK[$k]['jegyId']);
+ if ($_JEGYEK[$k]['tankorId'] == $tankorId) {
+ $class = 'jegy'.$_JEGYEK[$k]['tipus'];
+ $__JEGYEK['sajat'][] = $_JEGYEK[$k];
+ } else {
+ $class = 'jegy'.$_JEGYEK[$k]['tipus'].'mase';
+ $__JEGYEK['mase'][] = $_JEGYEK[$k];
+ }
+ $title .= str_replace('-', '.', $_JEGYEK[$k]['dt'])
+ . ' - '.$Jegyek['tankörök'][$_JEGYEK[$k]['tankorId']]['tankorNev']
+ . ' (';
+ for ($t = 0; $t < count($Jegyek['tankörök'][$_JEGYEK[$k]['tankorId']]['tanárok']); $t++) {
+ $title .= $Jegyek['tankörök'][$_JEGYEK[$k]['tankorId']]['tanárok'][$t]['tanarNev'] . ', ';
+ }
+ $title = substr($title,0,-2) . ') ' . $_JEGYEK[$k]['megjegyzes'];
+ echo '<a id="jegy-'.$_JEGYEK[$k]['jegyId'].'" title="'.htmlspecialchars($title).'" href="'.$href.'" class="onClickUpdateWindow '.$class.'">';
+ echo (($_jegyShow=$KOVETELMENY[$_JEGYEK[$k]['jegyTipus']][$_JEGYEK[$k]['jegy']]['rovid'])!='') ? $_jegyShow:'?';
+
+ if ($_JEGYEK[$k]['modositasDt']!='0000-00-00 00:00:00' && $_JEGYEK[$k]['dt']!=date('Y-m-d',strtotime($_JEGYEK[$k]['modositasDt']))) echo '<sup>*</sup>';
+ echo '</a> ';
+ }
+ echo '</td>';
+
+ for ($k = 0; $k < count($Jegyek['dolgozatok']['dátum szerint'][$_szemeszter][$_ev][$_ho]); $k++) {
+ $did = $Jegyek['dolgozatok']['dátum szerint'][$_szemeszter][$_ev][$_ho][$k];
+ if (in_array($tankorId, $Jegyek['dolgozatok'][$did]['tankorIds'])) echo '<td id="td-'.$diakId.'-'.$did.'" class="dolgozat d'.$did.'">';
+ else echo '<td id="td-'.$diakId.'-'.$did.'" class="dolgozatMase d'.$did.'">';
+ for ($l = 0; $l < count($_DOGA[$did]); $l++) {
+ $href = href('index.php?page=naplo&sub=osztalyozo&f=jegy&jegyId='.$_DOGA[$did][$l]['jegyId']);
+ if ($_DOGA[$did][$l]['tankorId'] == $tankorId) {
+ $class = 'jegy'.$_DOGA[$did][$l]['tipus'];
+ $__JEGYEK['sajat'][] = $_DOGA[$did][$l];
+ } else {
+ $class = 'jegy'.$_DOGA[$did][$l]['tipus'].'mase';
+ $__JEGYEK['mase'][] = $_DOGA[$did][$l];
+ }
+ $title = $Dolgozatok[$did]['dolgozatNev'].' - '.str_replace('-', '.', $_DOGA[$did][$l]['dt'])
+ . ' - '.$Jegyek['tankörök'][$_DOGA[$did][$l]['tankorId']]['tankorNev']
+ . ' (';
+ for ($t = 0; $t < count($Jegyek['tankörök'][$_DOGA[$did][$l]['tankorId']]['tanárok']); $t++) {
+ $title .= $Jegyek['tankörök'][$_DOGA[$did][$l]['tankorId']]['tanárok'][$t]['tanarNev'] . ', ';
+ }
+ $title = substr($title,0,-2) . ') ' . $_DOGA[$did][$l]['megjegyzes'];
+ echo '<a id="jegy-'.$_DOGA[$did][$l]['jegyId'].'" title="'.htmlspecialchars($title).'" href="'.$href.'" class="onClickUpdateWindow '.$class.'">';
+ echo $KOVETELMENY[$_DOGA[$did][$l]['jegyTipus']][$_DOGA[$did][$l]['jegy']]['rovid'];
+ if ($_DOGA[$did][$l]['modositasDt']!='0000-00-00 00:00:00' && $_DOGA[$did][$l]['dt']!=date('Y-m-d',strtotime($_DOGA[$did][$l]['modositasDt']))) echo '<sup>*</sup>';
+ echo '</a> ';
+ }
+ echo '</td>';
+ }
+
+ }
+
+ if ($Jegyek[$diakId]['átlag'] != 0) {
+ $atlag = number_format($Jegyek[$diakId]['átlag'],2,',','');
+ $class = 'atlag';
+ } else {
+ $atlag = '';
+ $class = '';
+ }
+
+ echo '<th class="'.$class.'">';
+ $atlag_title = '';
+
+ $_jegyOsszeg = 0;
+ $_szlo = $_sumsuly = 0;
+ for ($i=0; $i<count($__JEGYEK['sajat']); $i++) {
+ $_szlo += ($__JEGYEK['sajat'][$i]['jegy']) * $SULYOK[$__JEGYEK['sajat'][$i]['tipus']-1];
+ $_sumsuly += $SULYOK[$__JEGYEK['sajat'][$i]['tipus']-1];
+ if ($KOVETELMENY[$__JEGYEK['sajat'][$i]['jegyTipus']]['összeadható']===true) $_osszegMutat = true;
+ if ($KOVETELMENY[$__JEGYEK['sajat'][$i]['jegyTipus']]['átlagolható']===true) $_atlagMutat = true;
+ }
+ if ($_sumsuly!=0) $atlag_title .= number_format($_szlo/$_sumsuly,2,',','');
+ $_jegyOsszeg += $_szlo;
+
+ $_szlo=$_sumsuly = 0;
+ for ($i=0; $i<count($__JEGYEK['mase']); $i++) {
+ $_jegyOsszeg += $_szlo += ($__JEGYEK['mase'][$i]['jegy']) * $SULYOK[$__JEGYEK['mase'][$i]['tipus']-1];
+ $_sumsuly += $SULYOK[$__JEGYEK['mase'][$i]['tipus']-1];
+ if ($KOVETELMENY[$__JEGYEK['mase'][$i]['jegyTipus']]['összeadható']===true) $_osszegMutat = true;
+ if ($KOVETELMENY[$__JEGYEK['mase'][$i]['jegyTipus']]['átlagolható']===true) $_atlagMutat = true;
+ }
+ if ($_sumsuly!=0) $atlag_title .= ' ('.number_format($_szlo/$_sumsuly,2,',','').')';
+ $_jegyOszseg += $_szlo;
+
+ // összeget vagy átlagot mutassunk?
+ if ($_atlagMutat === true) echo '<span title="'.$atlag_title.'" data-atlag="'.$diakId.':'.str_replace(',','.',$atlag).'">'.$atlag.'</span>';
+ if ($_osszegMutat=== true) echo '<span> ∑:'.$_jegyOsszeg.'</span>';
+ echo '</th>';
+
+ $oszlopSzam = 0;
+
+ foreach ($_TANEV['szemeszter'] as $szemeszter => $szAdatok) {
+ $ZAROJEGYET_KAP = (
+ in_array($ADAT['diakJogviszony'][$diakId][$szAdatok['zarasDt']]['statusz'],array('jogviszonyban van','vendégtanuló'))
+ ||
+ ($ADAT['diakJogviszony'][$diakId][$szAdatok['zarasDt']]['statusz']=='magántanuló' && $tankorJelleg == 'gyakorlat')
+ );
+
+ $felev = $szemeszter;
+ // Az adott szemeszter szeritni évfolyama (igen, akár ez is változhat év közben: pl nyelvi előkészítős osztályba megy át normál osztályból)
+ $evfolyam = $ADAT['diakEvfolyam'][$szemeszter][$diakId];
+ $evfolyamJel = $ADAT['diakEvfolyamJel'][$szemeszter][$diakId];
+ if (isset($ADAT['diakKepzesKovetelmeny'][$szemeszter][$diakId][$targyId][$evfolyamJel][$szemeszter])) {
+ $_info = " a képzésből";
+ $diakZaroKovetelmeny = $ADAT['diakKepzesKovetelmeny'][$szemeszter][$diakId][$targyId][$evfolyamJel][$szemeszter][0]['kovetelmeny'];
+ } else {
+ $_info = "";
+ $diakZaroKovetelmeny = $zaroKovetelmeny;
+ }
+ $oszlopSzam++;
+ echo '<td class="biz">';
+ if ( __ZAROJEGYET_ADHAT===true) {
+ $_zarojegyGomb = true;
+ $jIg = count($ADAT['zaroJegyek'][$diakId][$evfolyamJel][$felev]); // evfolyamJel
+ if ($jIg==0) $jIg=1;
+ $vanJegySelect=false;
+ $lezartJegy=false;
+ for ($j=0; $j<($jIg); $j++) {
+ // prepare data
+ $_ZJEGY = $ADAT['zaroJegyek'][$diakId][$evfolyamJel][$felev][$j]; // evfolyamJel
+ $_ZJEGY['dt'] = $_ZJEGY['modositasDt']; //!!! HACK -- ez tök jó, de mi a hack?
+ //??? $vizsgaJegy = ($ADAT['vizsgaJegyek'][$diakId][$evfolyam][$felev][0]['tipus']!=''); // == osztályozó vizsga // különbözeti stb
+ // Ha netán a tanár lezár rendesen és utóbb vizsgajegyet is írnak be, akkor a rendes jegyet még kell tudni törölni...
+ $ii = 0;
+ while (
+ ($ii < count($ADAT['vizsgaJegyek'][$diakId][$evfolyamJel][$felev])) // evfolyamJel
+ && $ADAT['vizsgaJegyek'][$diakId][$evfolyamJel][$felev][$ii]['zaroJegyId'] != $_ZJEGY['zaroJegyId'] // evfolyamJel
+ ) $ii++;
+ $vizsgaJegy = $ii < count($ADAT['vizsgaJegyek'][$diakId][$evfolyamJel][$felev]); // evfolyamJel
+ // ---
+ if ($lezartJegy===false && $vizsgaJegy==true) $lezartJegy=true;
+ // FIGYELEM!, ha itt módosítász, ellenőrizd a cikluson kívül is jó marad-e a jegySelect
+ $_JEGY_S = array(
+ 'info' => $diakZaroKovetelmeny.$_info,
+ 'jegySelectTipus' => 'zaroJegy',
+ 'variable' => 'zaroJegy',
+ 'diakId' => $diakId,
+ 'targyId'=> $targyId,
+ 'evfolyam'=> $_ZJEGY['evfolyam'],
+ 'evfolyamJel'=> $_ZJEGY['evfolyamJel'], // evfolyamJel
+ 'tanev'=> $tanev,
+ 'szemeszter' => $szemeszter,
+ 'zaroJegyId' => $_ZJEGY['zaroJegyId'],
+ 'jegy' => $_ZJEGY['jegy'],
+ 'jegyTipus' => (($_ZJEGY['jegyTipus']=='') ? $diakZaroKovetelmeny : $_ZJEGY['jegyTipus']),
+ 'zaroJegyTipusok' => array_unique( array( $diakZaroKovetelmeny, (($_ZJEGY['jegyTipus']=='') ? $diakZaroKovetelmeny : $_ZJEGY['jegyTipus']), 'nem értékelhető' )),
+ 'megjegyzes' => $_ZJEGY['megjegyzes'],
+ 'dt' => $_ZJEGY['dt'], // !!!!!!!!!!!!!!!!
+ 'hivatalosDt' => $_ZJEGY['hivatalosDt'],
+ 'modositasDt' => $_ZJEGY['modositasDt'],
+ 'tabindex' => ($db+$oszlopSzam*count($Diakok['idk'])),
+ 'tankorId' => $tankorId // szöveges értékelés...
+ );
+ if ($_ZJEGY['evfolyam']=='') // már kitaláltuk az évfolyamot mindenféle furmánnyal (lásd -pre)
+ $_JEGY_S['evfolyam'] = $evfolyam;
+ if ($_ZJEGY['evfolyamJel']=='') // már kitaláltuk az évfolyamot mindenféle furmánnyal (lásd -pre)
+ $_JEGY_S['evfolyamJel'] = $evfolyamJel; // evfolyamJel
+
+ if (($ZAROJEGYET_KAP === true || __NAPLOADMIN===true) && $lezartJegy===false && ( !defined('__IDOSZAK_SZEMESZTER') || (
+ $szemeszter==__IDOSZAK_SZEMESZTER && (
+ in_date_interval($_ZJEGY['dt'],__IDOSZAK_TOLDT,__IDOSZAK_IGDT)
+ || $_ZJEGY['zaroJegyId']==''
+ )
+ ))) {
+ if (($evfolyamJel=='' && $evfolyam=='')) {
+ echo 'Nem határozható meg az évfolyama, így valószínűleg nem adható zárójegy! [#1]';
+ } else {
+ putJegySelect($_JEGY_S);
+ }
+ $vanJegySelect = true;
+ } elseif ($_ZJEGY['zaroJegyId']!='') {
+ echo '<div class="zaroJegyAdat" data-zarojegyid="'.$_ZJEGY['zaroJegyId'].'">';
+ echo $KOVETELMENY[$_ZJEGY['jegyTipus']][$_ZJEGY['jegy']]['hivatalos'];
+ if ($_ZJEGY['megjegyzes']!='') echo ' '.$bizonyitvanyMegjegyzesek[$_ZJEGY['megjegyzes']];
+ if ($vizsgaJegy==true) echo '<sup>(v)</sup>';
+ echo '</div>';
+ } elseif ($vizsgaJegy!==false) {
+ echo 'Vizsgáznia kell!'; // ???
+ }
+
+ }
+ if ($lezartJegy===false) {
+ if ( (!defined('__IDOSZAK_SZEMESZTER') || $szemeszter==__IDOSZAK_SZEMESZTER) && $vanJegySelect===false) {
+ foreach ( array('zaroJegyId','jegy','megjegyzes','dt', 'hivatalosDt', 'modositasDt') as $val) unset($_JEGY_S[$val]);
+ $_JEGY_S['jegyTipus'] = $zaroKovetelmeny;
+ if ($evfolyamJel=='' && $evfolyam=='') {
+ echo 'Nem határozható meg az évfolyama, így valószínűleg nem adható zárójegy!';
+ } elseif ($ZAROJEGYET_KAP===true) {
+ putJegySelect($_JEGY_S);
+ } else {
+ echo '-';
+ }
+ }
+ }
+ } else {
+ for ($j=0; $j<count($ADAT['zaroJegyek'][$diakId][$evfolyamJel][$szemeszter]); $j++) {
+ $_zaroJegy = $ADAT['zaroJegyek'][$diakId][$evfolyamJel][$szemeszter][$j];
+ echo $KOVETELMENY[$_zaroJegy['jegyTipus']][$_zaroJegy['jegy']]['hivatalos'];
+ echo ' '.$bizonyitvanyMegjegyzesek[$_zaroJegy['megjegyzes']];
+ }
+
+ }
+
+ echo '</td>'."\n";
+ }
+ echo '</tr>';
+
+ }
+
+ // Dolgozat átlagok
+ echo '<tr>';
+ echo '<th colspan="'.($_colSpan+1).'" class="dolgozat">'._ATLAG.'</th>';
+ $elozoHo = 0;
+ for ($j = 0; $j < $HO['count']; $j++) {
+
+ $_szemeszter = $HO[$j]['szemeszter'];
+ $elozoHo = $_ho;
+ $_ho = $HO[$j]['hó'];
+ $_ev = $HO[$j]['év'];
+
+ // Normál jegyek alatt...
+ if ($_ho == $elozoHo) echo '<th class="ujSzemeszter" />'; else echo '<th />';
+ for ($k=0;$k<count($Jegyek['dolgozatok']['dátum szerint'][$_szemeszter][$_ev][$_ho]);$k++) {
+ echo '<th class="atlag">';
+ $did = $Jegyek['dolgozatok']['dátum szerint'][$_szemeszter][$_ev][$_ho][$k];
+ echo '<a id="avg-d'.$did.'" href="'.href('index.php?page=naplo&sub=osztalyozo&f=dolgozat&dolgozatId='.$did.'&tanarId='.$tanarId.'&osztalyId='.$osztalyId).'">';
+ if ($KOVETELMENY[$Jegyek['dolgozatok'][$did]['jegyTipus']]['átlagolható']) echo number_format($Jegyek['dolgozatok'][$did]['átlag'],2,',','');
+ else echo '-';
+ echo '</a>';
+ echo '</th>';
+ }
+
+ }
+ // Osztályátlag
+ echo '<th class="dolgozat">';
+ if ($Jegyek['átlag'] != 0) echo number_format($Jegyek['átlag'],2,',','');
+ else echo _ATLAG;
+ echo '</th>';
+
+ // Félévi átlagok
+ echo '<th class="atlag" colspan="2">';
+ if ($_zarojegyGomb==true) {
+ echo '<input type="hidden" class="onClickDisableValue" name="bizBeiroGomb2" value="" />';
+ echo '<input type="submit" class="felev onClickDisable" name="bizBeiroGomb" value="'._BEIR.'" />';
+ }
+ echo '</th>';
+
+ echo '</tr>';
+
+ echo '</tbody>';
+
+ echo '</table>';
+ formEnd();
+
+ }
+
+
+ function putTankorjegyStatisztika($ADAT) {
+ //dump( $ADAT);
+ //echo '<div style="background-color: red; width:100px; height:100px"></div>';
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/targySorrend.phtml b/mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/targySorrend.phtml
new file mode 100644
index 00000000..3de4e501
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/targySorrend.phtml
@@ -0,0 +1,45 @@
+<?php
+
+ function putTargySorrendForm($osztalyId, $sorrendNev, $Targyak) {
+
+ formBegin(array('method'=>'post', 'action'=>'', 'id'=>'sorrend', 'class'=>'sorrend'));
+
+ echo '<h1>'._SORREND.'</h1>';
+
+ echo '<input type="hidden" name="action" id="action" value="sorrendValtas" />'."\n";
+ echo '<input type="hidden" name="sorrendNev" value="'.$sorrendNev.'" />'."\n";
+ echo '<input type="hidden" name="osztalyId" value="'.$osztalyId.'" />'."\n";
+
+ $SEL = array($_POST['targyId'] => ' selected="selected" ');
+ echo '<select id="targySelect" name="targyId[]" multiple="multiple">'."\n";
+ for ($i = 0; $i < count($Targyak); $i++) {
+
+ echo '<option value="'.$Targyak[$i]['targyId'].'"'.$SEL[$Targyak[$i]['targyId']].'>'.$Targyak[$i]['targyNev'].'</option>'."\n";
+
+ }
+ echo '</select>'."\n";
+
+ echo '<ul id="targyUl" style="display: none;">'."\n";
+ for ($i = 0; $i < count($Targyak); $i++) {
+
+ echo '<li>';
+ echo '<span class="handle">&nbsp;^&nbsp;</span>';
+ echo $Targyak[$i]['targyNev'];
+ echo '<input type="hidden" name="targyIds[]" value="'.$Targyak[$i]['targyId'].'" />';
+ echo '</li>'."\n";
+
+ }
+ echo '</ul>'."\n";
+
+ echo '<input type="submit" value="'._OK.'" id="submit" style="display: none;" />'."\n";
+
+ echo '<div id="mozgat">'."\n";
+ echo '<input type="submit" name="fel" value="'._FEL.'" />'."\n";
+ echo '<input type="submit" name="le" value="'._LE.'" />'."\n";
+ echo '</div>'."\n";
+
+ formEnd();
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/vizsga.phtml b/mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/vizsga.phtml
new file mode 100644
index 00000000..8ad356e5
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/vizsga.phtml
@@ -0,0 +1,144 @@
+<?php
+
+ function putVizsgaJelentkezesForm($ADAT) {
+
+ formBegin(array('class'=>'jelentkezes'));
+
+ echo '<h1>'._VIZSGAJELENTKEZES.'</h1>'."\n";
+
+ echo '<input type="hidden" name="diakId" value="'.$ADAT['diakId'].'" />'."\n";
+ echo '<input type="hidden" name="targyId" value="'.$ADAT['targyId'].'" />'."\n";
+ echo '<input type="hidden" name="evfolyamJel" value="'.$ADAT['evfolyamJel'].'" />'."\n";
+ echo '<input type="hidden" name="felev" value="'.$ADAT['felev'].'" />'."\n";
+ echo '<input type="hidden" name="action" value="vizsgajelentkezes" />'."\n";
+
+ echo '<label for="jelentkezesDt">'._JELENTKEZES.'</label>'."\n";
+ echo '<input type="text" name="jelentkezesDt" class="date" value="" id="jelentkezesDt" />'."\n";
+ echo '<label for="tipus">'._VIZSGATIPUS.'</label>'."\n";
+ echo '<select name="tipus" id="tipus">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ for ($i = 0; $i < count($ADAT['vizsgatipusok']); $i++) {
+ echo '<option value="'.$ADAT['vizsgatipusok'][$i].'"'.$SEL[ $ADAT['vizsgatipusok'][$i] ].'>'.$ADAT['vizsgatipusok'][$i].'</option>'."\n";
+ }
+ echo '</select>'."\n";
+
+ echo '<input type="submit" value="'._OK.'" />'."\n";
+
+ formEnd();
+
+ }
+
+ function putVizsgalista($ADAT) {
+
+ global $KOVETELMENY;
+
+ formBegin(array('class'=>'lista'));
+
+ echo '<h1>'._VIZSGALISTA.'</h1>'."\n";
+
+ echo '<input type="hidden" name="diakId" value="'.$ADAT['diakId'].'" />'."\n";
+ echo '<input type="hidden" name="targyId" value="'.$ADAT['targyId'].'" />'."\n";
+ echo '<input type="hidden" name="evfolyamJel" value="'.$ADAT['evfolyamJel'].'" />'."\n";
+ echo '<input type="hidden" name="felev" value="'.$ADAT['felev'].'" />'."\n";
+ echo '<input type="hidden" name="action" value="vizsgaKezeles" />'."\n";
+
+ echo '<table>'."\n";
+ echo '<thead>';
+ echo '<tr><th></th><th>'._DIAK.'</th><th>'._TARGY.'</th><th>'._EVFOLYAMJEL.'</th><th>'._JELENTKEZES.'</th><th colspan="2">'._VIZSGA.'</th><th colspan="2">'._ERTEKELES_HALASZTAS.'</th></tr>'."\n";
+ echo '</thead>';
+ echo '<tfoot><tr><th colspan="9"><input type="submit" value="'._OK.'" /></th></tr></tfoot>';
+ echo '<tbody>';
+ for ($i = 0; $i < count($ADAT['vizsga']); $i++) {
+
+ extract($ADAT['vizsga'][$i]);
+ echo '<tr class="'.ekezettelen($ADAT['vizsga'][$i]['tipus']).'">';
+ echo '<td>';
+ if (__NAPLOADMIN===true) {
+ echo '<a class="confirm" title="'._BIZTOSAN_TOROL_E.'" href="'.href('index.php?page=naplo&sub=osztalyozo&f=vizsga&action=vizsgaTorlese&vizsgaId='.$ADAT['vizsga'][$i]['vizsgaId'].'&diakId='.$ADAT['diakId'].'&targyId='.$ADAT['targyId'].'&evfolyamJel='.$ADAT['evfolyamJel']).'">';
+ //echo $ADAT['vizsga'][$i]['vizsgaId'];
+ echo 'X';
+ echo '</a>';
+ }
+ echo '</td>';
+ echo '<td class="diakNev" data-diakid="'.$diakId.'">'.$ADAT['diakok'][ $diakId ]['diakNev'].'</td>';
+ echo '<td>'.$ADAT['targyak'][$targyId]['targyNev'].'</td>';
+ echo '<td>'.(($evfolyamJel!='')?$evfolyamJel:$evfolyam).'/'.$felev.'</td>';
+ echo '<td>'.$jelentkezesDt.'</td>';
+ echo '<td title="'.$tipus.'">'.nagybetus(substr($tipus,0,1)).'</td>';
+ if (isset($vizsgaDt)) {
+ if (strtotime($vizsgaDt)>time()) {
+ $halasztClass = ''; $ertekelClass = ' rejtett';
+ } else {
+ $halasztClass = ' rejtett'; $ertekelClass = '';
+ }
+
+ echo '<td>';
+ echo $vizsgaDt;
+ echo '</td>';
+ if (isset($zaradekId)) {
+ echo '<td class="szoveg">';
+ echo $szoveg;
+ echo '</td><td class="jegy zaroJegyAdat" data-zarojegyid="'.$zaroJegyId.'">';
+ if (isset($zaroJegyId)) {
+ echo '<span>'._EREDMENY.': '.$jegyTipus.' &rarr;</span>';
+ echo '<span class="jegy">';
+ echo $KOVETELMENY[$jegyTipus][$jegy]['hivatalos'];
+ if ($KOVETELMENY[$jegyTipus][$jegy]['hivatalos'] != $KOVETELMENY[$jegyTipus][$jegy]['rovid'])
+ echo ' ('.$KOVETELMENY[$jegyTipus][$jegy]['rovid'].')';
+ echo '</span>';
+ }
+ echo '</td>';
+ } else {
+ echo '<td class="kiemelt hideShowContainer" colspan="2">';
+ echo '<input type="hidden" name="erthalVizsgaIds[]" value="'.$vizsgaId.'" />'."\n";
+ echo '<div class="halaszt openable'.$halasztClass.'">';
+ echo '<span class="onClickHideShow ertekeles">&rang;&rang;&rang; '._ERTEKELES.' &rang;&rang;&rang;</span>';
+ echo '<label for="halasztas'.$vizsgaId.'">'._HALASZTAS.':</label>';
+ echo '<input type="text" name="halasztasDts[]" value="" class="date halasztasDt" id="halasztas'.$vizsgaId.'" />';
+ echo '</div><div class="ertekel openable'.$ertekelClass.'">';
+ echo '<span class="onClickHideShow halasztas">&rang;&rang;&rang; '._HALASZTAS.' &rang;&rang;&rang;</span>';
+ echo '<label for="ertekeles'.$vizsgaId.'">'._ERTEKELES.':</label>';
+ echo '<select name="jegyTipus[]" class="jegyTipus">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ foreach ($ADAT['zarojegytipusok'] as $key => $jegyTipus) {
+ echo '<option value="'.$jegyTipus.'">'.$jegyTipus.'</option>'."\n";
+ }
+ echo '</select>'."\n";
+
+ echo '<select name="jegyAdat[]" class="jegyAdat" id="ertekeles'.$vizsgaId.'" title="'.$ADAT['tanev'].'/'.$felev.' - '.$evfolyamJel.'">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ foreach ($ADAT['zarojegytipusok'] as $key => $jegyTipus) {
+ echo '<optgroup label="'.$jegyTipus.'">';
+ foreach ($KOVETELMENY[$jegyTipus]['értékek'] as $idx => $value) {
+ if (in_array($value,$KOVETELMENY[$jegyTipus]['sikertelen'])) $_postfix=' !'; else $_postfix='';
+// echo '<option value="zaroJegyId=|diakId='.$diakId.'|targyId='.$targyId.'|evfolyam='.$evfolyam.'|tanev='.$ADAT['tanev'].'|felev='.$felev.'|jegy='.$value.'|jegyTipus='.$jegyTipus.'|megjegyzes=">'.$KOVETELMENY[$jegyTipus][$value]['rovid'].'</option>'."\n";
+ echo '<option value="jegy='.$value.'|jegyTipus='.$jegyTipus.'|megjegyzes=">'.$KOVETELMENY[$jegyTipus][$value]['rovid'].$_postfix.'</option>'."\n";
+ }
+ echo '</optgroup>';
+ }
+ echo '</select>'."\n";
+ echo '</div>';
+ echo '</td>';
+ }
+ } else {
+ echo '<td class="kiemelt">';
+ echo '<input type="hidden" name="vizsgaDtVizsgaIds[]" value="'.$vizsgaId.'" />'."\n";
+ echo '<input type="text" class="date" name="vizsgaDts[]" value="" />'."\n";
+ echo '</td>';
+ echo '<td colspan="2"></td>';
+ }
+ echo '</tr>'."\n";
+ }
+ echo '</tbody>'."\n";
+ echo '</table>'."\n";
+
+ formEnd();
+
+ echo '<div class="hideShowContainer">';
+ echo '<h4 class="onClickHideShow"><span class="icon-braille"></span>Debug információ</h4>';
+ echo '<div class="openable" style="display:none">';
+ dump($KOVETELMENY);
+ echo '</div>';
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/vizsgaJelentkezes.phtml b/mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/vizsgaJelentkezes.phtml
new file mode 100644
index 00000000..d27c0c92
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/vizsgaJelentkezes.phtml
@@ -0,0 +1,16 @@
+<?php
+
+ function putVizsgaJelentkezes($ADAT) {
+
+ formBegin(array('class'=>'jelentkezes'));
+ echo '<label for="idoszak">'._VIZSGAIDOSZAK.'</label>'."\n";
+ echo '<select id="idoszak" name="idoszakId">'."\n";
+ $SEL = array($ADAT['kovetkezoIdoszakIndex'] => ' selected="selected" ');
+ foreach ($ADAT['vizsgaIdoszak'] as $index => $vAdat) {
+ echo '<option value="'.$vAdat['idoszakId'].'"'.$SEL[$index].'>'.substr($vAdat['tolDt'],0,10).' - '.substr($vAdat['igDt'],0,10).'</option>'."\n";
+ }
+ echo '</select>'."\n";
+ formEnd();
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/zaroJegyCheck.phtml b/mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/zaroJegyCheck.phtml
new file mode 100644
index 00000000..95a99b81
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/osztalyozo/zaroJegyCheck.phtml
@@ -0,0 +1,50 @@
+<?php
+ function putZaroJegyCheck($ADAT) {
+
+ echo 'Osztály évfolyama:';
+ echo $ADAT['evfolyam'];
+ echo '<br/>Osztály évfolyamjele:';
+ echo $ADAT['evfolyamJel'];
+ echo '<br/>Osztály adatai:';
+ echo '<pre>';
+ var_dump($ADAT['osztalyok']);
+ echo '</pre>';
+
+ $ZJ = $ADAT['zaroJegyek'];
+ formBegin();
+ echo '<input type="hidden" name="action" value="modosit" />';
+ echo '<input type="hidden" name="szemeszterId" value="'.$ADAT['szemeszterId'].'" />';
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalyId'].'" />';
+ echo '<table border="1" align="center">';
+ echo '<tr><th>zaroJegyId</th><th>diakId</th><th>targyId</th><th>jegy+tipus</th><th>evfolyam</th><th>evfolyamJel</th><th>felev</th><th>modositasDt</th><th>hivatalosDt</th></tr>';
+ for ($i=0; $i<count($ZJ); $i++) {
+ echo '<tr>';
+ echo '<td>';
+ echo $ZJ[$i]['zaroJegyId'];
+ echo '</td>';
+ echo '<td>'.$ZJ[$i]['diakId'].'</td>';
+ echo '<td>'.$ZJ[$i]['targyId'].'</td>';
+ echo '<td>'.$ZJ[$i]['jegy'].$ZJ['jegyTipus'].'</td>';
+ echo '<td>'.$ZJ[$i]['evfolyam'].'</td>';
+ echo '<td>';
+ if ($ADAT['evfolyamJel']!=$ZJ[$i]['evfolyamJel']) {
+ echo '"'.$ZJ[$i]['evfolyamJel'].'"';
+ echo '<span class="icon-adjust" style="color:red"></span>';
+ echo $ADAT['evfolyamJel'];
+ echo '<input type="checkbox" name="zaroJegyId[]" value="'.$ZJ[$i]['zaroJegyId'].'" checked="checked" />';
+ } else {
+ echo $ZJ[$i]['evfolyamJel'];
+ echo '<span class="icon-ok-sign" style="color:green"></span>';
+ }
+ echo '</td>';
+ echo '<td>'.$ZJ[$i]['felev'].'</td>';
+ echo '<td>'.$ZJ[$i]['modositasDt'].'</td>';
+ echo '<td>'.$ZJ[$i]['hivatalosDt'].'</td>';
+ echo '</tr>';
+ }
+ echo '</table>';
+ echo '<h3>A gombnyomás a fenti táblázat zárójegyeinél megváltoztatja az évfolyamJelet!';
+ echo '<input type="submit" value="MEHET?" title="Biztos?" ></h3>';
+ formEnd();
+ }
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/share/email.phtml b/mayor-orig/www/skin/classic/module-naplo/html/share/email.phtml
new file mode 100644
index 00000000..f4a91402
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/share/email.phtml
@@ -0,0 +1,42 @@
+<?php
+
+ function emailHead($includeCSS=array()) {
+
+ $html = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><!--[if IE]><html xmlns="http://www.w3.org/1999/xhtml" class="ie"><![endif]--><!--[if !IE]><!--><html style="margin: 0;padding: 0;" xmlns="http://www.w3.org/1999/xhtml"><!--<![endif]-->
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title></title>';
+
+ // BASE CSS
+ $html .= '<style type="text/css">
+body { margin: 0; padding: 0; font-family: Verdana, Arial, Helvetica, sans-serif; }
+table { border-collapse: collapse; table-layout: fixed;}
+* { line-height: inherit;}
+ </style>';
+
+ // BEEPULO CSS-EK INLINE
+ if (is_array($includeCSS) && count($includeCSS)>0) {
+ for ($i=0; $i<count($includeCSS); $i++) {
+ $html .= '<style type="text/css">';
+ $html .= file_get_contents($includeCSS[$i]);
+ $html .= '</style>';
+ }
+ }
+
+ $html .= '</head><body>';
+
+ // DEFAULT EMAIL FEJLEC
+ $html .= '<div class="emailFejlec">MaYoR Hírnök</div>';
+
+ return $html;
+ }
+
+ function emailFoot() {
+
+ $html = '<div style="text-align:center; padding:30px; font-size:x-small; color: #888;">MaYoR elektronikus napló (GPL)</div>
+ </body></html>';
+ return $html;
+
+ }
+
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/share/face.phtml b/mayor-orig/www/skin/classic/module-naplo/html/share/face.phtml
new file mode 100644
index 00000000..209652db
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/share/face.phtml
@@ -0,0 +1,71 @@
+<?php
+ function putFace($Id,$tipus,$height='50',$return=true) {
+
+ $ICON = array(
+ '' =>'<span class="icon-star-empty"></span>',
+ 'diak' => '<span class="icon-child"></span>',
+ 'szulo' => '<span class="icon-adult"></span>',
+ 'tanar' => '<span class="icon-adult"></span>',
+ 'munkakozosseg' => '<span class="icon-slideshare"></span>',
+ 'tankor' => '<span class="icon-myspace"></span>',
+ 'tankorSzulo' => '<span class="icon-group-alt"></span>',
+ 'osztaly' => '<span class="icon-group"></span>',
+ 'osztalySzulo' => '<span class="icon-adult"></span>',
+ 'osztalyTanar' => '<span class="icon-slideshare"></span>',
+ );
+
+ if ($height<=0) {
+ $height = '50';
+ $c = "size_n";
+ } else {
+ $c = "size_s";
+ }
+ $subdir='';
+ $extraHtmlAttrs = '';
+ $extraClass = '';
+ if (in_array($tipus,array('diak','diák'))) {
+ $subdir=__TANEV;
+ $extraClass='diakNev';
+ $extraHtmlAttrs = 'data-diakid="'.$Id.'"';
+ } elseif (in_array($tipus,array('tanar','tanár'))) {
+ $subdir=ekezettelen($tipus);
+ $extraClass='tanarNev';
+ $extraHtmlAttrs = 'data-tanarid="'.$Id.'"';
+ } elseif ($tipus=='tankor') {
+ $extraClass = 'tankorAdat';
+ $extraHtmlAttrs = 'data-tankorid="'.$Id.'"';
+ } elseif (in_array($tipus,array('osztaly','osztalySzulo','osztalyTanar'))) {
+ $extraClass = 'osztalyAdat';
+ $extraHtmlAttrs = 'data-osztalyid="'.$Id.'"';
+ } else {
+
+ }
+
+ $extraClass .= ' '.__SHOW_FACES_TYPE.' ';
+
+ if ($subdir!='') {
+ foreach (array('jpg') as $ext) {
+ $img = $Id.'.'.$ext;
+ if (@file_exists(_DOWNLOADDIR.'/'._POLICY.'/naplo/face/'.$subdir.'/'.$img)) {
+ $file = 'index.php?policy='._POLICY.'&sessionID='._SESSIONID.'&page=session&f=download&download='.sha1($Id).'&dir=naplo/face/'.$subdir.'&file='.$img;
+ $s = '<div class="arckep--container '.$tipus.' '.$extraClass.'" '.$extraHtmlAttrs.' style="width: '.$height.'px;height: '.$height.'px;"><img src="'.$file.'" alt="'.$Id.'" '.$extraHtmlAttrs.' /></div>';
+ if ($return===true) {
+ echo $s;
+ return;
+ } else {
+ return $s;
+ }
+ }
+ }
+ }
+ // nincs kép
+ if (__SHOW_FACES_TYPE!='classic') {
+ $s = '<div class="arckepContainer '.$tipus.' '.$c.' '.$extraClass.'" '.$extraHtmlAttrs.'>';
+ //$s .= $Id;
+ $s .= $ICON[$tipus];
+ $s .= '</div>';
+ }
+ if ($return===true) echo $s; else return $s;
+
+ }
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/share/file.phtml b/mayor-orig/www/skin/classic/module-naplo/html/share/file.phtml
new file mode 100644
index 00000000..1bb2f616
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/share/file.phtml
@@ -0,0 +1,92 @@
+<?php
+
+ function putFileSelectForm($dbtable, $post = array()) {
+
+ formBegin(array('class'=>'updateTable'));
+ // A form címe
+ if (defined('_FILESELECTTITLE')) echo '<h1>'._FILESELECTTITLE.'</h1>';
+ // A továbbadandó POST adatok
+ for ($i = 0; $i < count($post); $i++) {
+ /* Ez itt nem ellenőrzött! --TODO */
+ echo '<input type="hidden" name="'.$post[$i].'" value="'.$_POST[$post[$i]].'" />'."\n";
+ }
+ echo '<input type="hidden" name="dbtable" value="'.$dbtable.'">'."\n";
+ echo '<input type="checkbox" name="skipOnDup" value="true" /> Meglevő rekord találatkor kihagyjuk a rekord frissítést';
+ echo '<label for="file">'._FILENEV.':</label>'."\n";
+ echo '<input type="text" id="file" name="fileName" />'."\n";
+ echo '<input type="submit" value="'._OK.'" />'."\n";
+ formEnd();
+
+ }
+
+ function putFieldSelectForm($fileName, $T, $attrs, $dbtable, $post = array()) {
+
+ formBegin(array('class'=>'updateTable'));
+ $_CHK = (_SKIP_ON_DUP === true) ? ' checked="checked" ': '';
+ echo '<input type="checkbox" id="skipOnDup" name="skipOnDup" value="true" '.$_CHK.' /><label for="skipOnDup">Meglevő rekord találatkor kihagyjuk a rekord frissítést</label>';
+
+ // A formhoz definiált magyarázó szöveg
+ if (defined('_FIELDSELECTMESSAGE')) {
+ echo '<p>'._FIELDSELECTMESSAGE.'</p>';
+ }
+ // A továbbadandó POST adatok
+ for ($i = 0; $i < count($post); $i++) {
+ echo '<input type="hidden" name="'.$post[$i].'" value="'.$_POST[$post[$i]].'" />'."\n";
+ }
+
+ // A rovatfej vizsgálata
+ $rovatfej = ''; $RovatfejAttrs = array();
+ for($j=0; $j<count($T[0]); $j++) {
+ if (isset($attrs[$T[0][$j]])) {
+ $RovatfejAttrs[$j] = $T[0][$j];
+ $rovatfej = ' checked="checked"';
+ } elseif (($a = array_search($T[0][$j],$attrs)) !== false) {
+ $RovatfejAttrs[$j] = $a;
+ $rovatfej = ' checked="checked"';
+ } else {
+ $RovatfejAttrs[$j] = '';
+ }
+ }
+ echo '<input type="hidden" name="fileName" value="'.$fileName.'" />';
+ echo '<input type="hidden" name="dbtable" value="'.$dbtable.'" />';
+
+ echo '<input type="checkbox" name="rovatfej" value="true" id="rovatfej"'.$rovatfej.' />';
+ echo '<label for="rovatfej">'._VAN_ROVATFEJ.'</label>'."\n";
+ echo '<input type="submit" value="'._OK.'" />';
+
+ echo '<table class="importData">';
+ echo '<tr>';
+ for($j=0; $j<count($T[0]); $j++) {
+ echo '<th>';
+
+ echo 'kulcs mező? <input type="checkbox" name="KULCS_MEZOK[]" value="'.$j.'" /><br />'."\n";
+
+ echo '<select name="MEZO_LISTA[]">'."\n";
+ reset ($attrs);
+ $SEL = array($RovatfejAttrs[$j] => ' selected="selected" ');
+ echo '<option value="">-</option>'."\n";
+ while(list($a,$txt) = each($attrs)) {
+ echo '<option value="'.$a.'"'.$SEL[$a].'>'.$txt.'</option>'."\n";
+ }
+ echo '</select>'."\n";
+
+ echo '</th>';
+ }
+ echo '</tr>';
+ // Az első x sor kiírása:
+ for($i=0; $i<count($T); $i++) {
+ echo '<tr>';
+ for($j=0; $j<count($T[$i]); $j++) {
+ echo '<td>';
+ echo $T[$i][$j];
+ echo '</td>';
+ }
+ echo '</tr>';
+ }
+ echo '</table>'."\n";
+
+ echo '<input type="submit" value="'._OK.'" />';
+ formEnd();
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/share/hianyzas.phtml b/mayor-orig/www/skin/classic/module-naplo/html/share/hianyzas.phtml
new file mode 100644
index 00000000..eefa53d2
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/share/hianyzas.phtml
@@ -0,0 +1,71 @@
+<?php
+
+ function _putHianyzasKistabla($napiHianyzasok, $oraAdat, $SET = array('allowed' => false, 'href' => '', 'napiMinOra' => null, 'napiMaxOra' => null)) {
+
+ if (is_null($SET['napiMinOra'])) return false;
+ // a meghívó függvénynek kell gondoskodnia az ALLOWED beállításról. Mi már csak ezt használjuk global egy napra!
+ if (isset($SET['allowed']) && $SET['allowed'] && $SET['href']!='') {
+ $OK = true;
+ $href = $SET['href'];
+ } else $OK = false;
+
+ echo '<table class="hianyzasNaptar" cellspacing="0" cellpadding="1" align="center"><tr>';
+ $_SOR = '';
+ for ($__ora = $SET['napiMinOra'];$__ora <= $SET['napiMaxOra']; $__ora++) {
+ $__D = $napiHianyzasok[$oraAdat['dt']][$__ora];
+ $__classES = array();
+ $__kiir='';
+ $__hrefClass = '';
+ $igazolhatoHianyzasId='';
+ if (count($__D)>0) {
+ $__tipus='';
+ /* A több óra támogatást támogatását módosítani kellene... */
+ for ( $i=0; $i<count($__D); $i++) {
+ $__perc = $__D[$i]['perc'];
+ $__statusz = $__D[$i]['statusz'];
+ $__tipus = $__D[$i]['tipus'];
+ $__hid = $__D[$i]['hianyzasId'];
+ $__oraId = $__D[$i]['oraId'];
+ $__rogzitoTanarId = $__D[$i]['rogzitoTanarId'];
+ $__kiir2beg=$__kiir2end='';
+ if ($__statusz != '') {
+ $__classES[] = str_replace(' ','_',ekezettelen($__tipus));
+ if ($__tipus=='felmentés') $__kiir.='f';
+ elseif( $__tipus=='felszerelés hiány') $__kiir.='F';
+ elseif( $__tipus=='egyenruha hiány') $__kiir.='e';
+ else {
+ if(is_numeric($__perc) && $__perc>0) {
+ $__kiir2beg = '<span title="'.$__perc.'\'">';
+ $__kiir2end = '</span>';
+ }
+ }
+ } else {
+ $__kiir .= '&nbsp;';
+ }
+ if ($__hrefClass=='' && !in_array($__tipus,array('felmentés','felszerelés hiány','egyenruha hiány'))) {
+ $__hrefClass=$__statusz;
+ $igazolhatoHianyzasId = $__hid;
+ }
+ }
+ if ($__rogzitoTanarId == __USERTANARID) $__kiir .= '×';
+ if ($__kiir=='') $__kiir = '-';
+ } else {
+ $__statusz=$__tipus=$__hid=$__oraId='';
+ $__kiir = '&nbsp;';
+ }
+ $__class = ' class="hianyzasNaptar '.implode(' ',$__classES).'"';
+
+ echo '<th class="hianyzasNaptar" style="color: white;">';
+ if ($OK === true) {
+ $_href = href($href.'&hianyzasId='.$igazolhatoHianyzasId.'&dt='.$oraAdat['dt'].'&ora='.$__ora);
+ echo '<a href="'.$_href.'" class="'.$__hrefClass.'">'.$__ora.'</a>';
+ } else
+ echo '<span class="'.$__hrefClass.'">'.$__ora.'</span>';
+ echo '</th>';
+ $_SOR .= '<td'.$__class.'>'.$__kiir2beg.$__kiir.$__kiir2end.'</td>';
+ }
+ echo '</tr><tr>'.$_SOR;
+ echo '</tr></table>';
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/share/jegy.phtml b/mayor-orig/www/skin/classic/module-naplo/html/share/jegy.phtml
new file mode 100644
index 00000000..955683dc
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/share/jegy.phtml
@@ -0,0 +1,92 @@
+<?php
+
+ function putJegySelect($ADAT,$responseFormat='echo') { // responseFormat = echo|return
+ /*
+ _jegySelectTipus = zaroJegy || ...
+ _jegySelectTipus = jegy (nincs tesztelve)
+ */
+ global $KOVETELMENY;
+ extract($ADAT,EXTR_PREFIX_ALL,'');
+ if ($_tabindex != '') $tabindex_str = 'tabindex="'.$_tabindex.'" '; else $tabindex_str = '';
+ // mire vonatkozik a select
+ if ($_jegySelectTipus == 'zaroJegy') {
+ $idTipus = 'zaroJegyId'; // intezmeny
+ $megjelenes = 'hivatalos';
+ }else{
+ $idTipus = 'jegyId'; // tanev
+ $megjelenes = 'rovid';
+ }
+ // prepare variables
+ $PRE = array($idTipus,'diakId','targyId','evfolyam','evfolyamJel','tanev','szemeszter');
+ for ($i=0; $i<count($PRE); $i++) {
+ $_x = '_'.$PRE[$i];
+ $VARS[] = $PRE[$i].'='.$$_x;
+ }
+ // HTML
+ $_title = ($ADAT['evfolyamJel']!='') ? $ADAT['evfolyamJel'].'. évfolyamon' : '';
+ $_title .= ($ADAT['hivatalosDt']!='') ? ' hivatalosan:'.$ADAT['hivatalosDt'] : '';
+ $_title .= ($ADAT['modositasDt']!='') ? ' módosítva:'.$ADAT['modositasDt'] : '';
+ $_title .= ($ADAT['info']!='') ? ' '.$ADAT['info'] : '';
+ //$readonly = ' readonly="readonly" disabled="disabled" ';
+ $readonly='';
+ if ($_jegyTipus != '' && count($_zaroJegyTipusok)==0) {
+ $content .= '<select name="'.$_variable.'[]" '.$tabindex_str.' title="'.$_title.'" '.$readonly.' class="'.$_class.'" style="'.$_style.'">';
+ $content .= '<option value="'.implode('|',$VARS).'|delete=true">-</option>';
+ for ($o = 0; $o < count($KOVETELMENY[$_jegyTipus]['értékek']); $o++) {
+ $_osztalyzat = $KOVETELMENY[$_jegyTipus]['értékek'][$o];
+ $_SEL = ($_megjegyzes=='' && $_osztalyzat == $_jegy) ? 'selected="selected"':'';
+ $_megj = null;
+ $content .= '<option value="'.implode('|',$VARS)."|jegy=$_osztalyzat|jegyTipus=$_jegyTipus|megjegyzes=$_megj".'" '.$_SEL.'>';
+ $content .= $KOVETELMENY[$_jegyTipus][$_osztalyzat][$megjelenes];
+ $content .= '</option>';
+ // + megjegyzés szerinti jegyek
+ if ($KOVETELMENY[$_jegyTipus][$_osztalyzat]['megjegyzes']!='') {
+ $_megj = $KOVETELMENY[$_jegyTipus][$_osztalyzat]['megjegyzes'];
+ $_SEL = (($_megjegyzes==$_megj) && ($_osztalyzat == $_jegy)) ? 'selected="selected"':'';
+ $content .= '<option value="'.implode('|',$VARS)."|jegy=$_osztalyzat|jegyTipus=$_jegyTipus|megjegyzes=$_megj".' data-jegy="'.$_osztalyzat.'" '.$_SEL.' >';
+ $content .= $KOVETELMENY[$_jegyTipus][$_osztalyzat][$megjelenes];
+ $content .= ' '.$_megj;
+ $content .= '</option>';
+ }
+ }
+ $content .= '</select>';
+ } elseif (count($_zaroJegyTipusok)>=1) { // ha engedélyezett (van megadott érvényes jegyTipus)
+ $content .= '<select name="'.$_variable.'[]" '.$tabindex_str.' class="jegyAdat" title="'.$_title.'" '.$readonly.' class="'.$_class.'" style="'.$_style.'">';
+ $content .= '<option value="'.implode('|',$VARS).'|delete=true">-</option>';
+ foreach ($_zaroJegyTipusok as $_junk => $__jegyTipus) {
+ $content .= '<optgroup label="'.$__jegyTipus.'">';
+ if (is_array($KOVETELMENY[$__jegyTipus]['értékek']))
+ foreach ($KOVETELMENY[$__jegyTipus]['értékek'] as $idx => $_osztalyzat) {
+ $_SEL = (($_megjegyzes=='') && ($_osztalyzat == $_jegy) && ($_jegyTipus == $__jegyTipus)) ? 'selected="selected"':'';
+ $content .= '<option '.$_SEL.' value="zaroJegyId='.$_zaroJegyId.'|diakId='.$_diakId.'|targyId='.$_targyId.'|evfolyam='.$_evfolyam.'|evfolyamJel='.$_evfolyamJel.'|tanev='.$_tanev.'|szemeszter='.$_szemeszter.'|jegy='.$_osztalyzat.'|jegyTipus='.$__jegyTipus.'|megjegyzes=" data-jegy="'.$_osztalyzat.'" >'.$KOVETELMENY[$__jegyTipus][$_osztalyzat]['hivatalos'].'</option>';
+ // + megjegyzés szerinti jegyek
+ if ($KOVETELMENY[$__jegyTipus][$_osztalyzat]['megjegyzes']!='') {
+ $_megj = $KOVETELMENY[$__jegyTipus][$_osztalyzat]['megjegyzes'];
+ $_SEL = (($_megjegyzes==$_megj) && ($_osztalyzat == $_jegy) && ($_jegyTipus == $__jegyTipus)) ? 'selected="selected"':'';
+ $content .= '<option '.$_SEL.' value="zaroJegyId='.$_zaroJegyId.'|diakId='.$_diakId.'|targyId='.$_targyId.'|evfolyam='.$_evfolyam.'|evfolyamJel='.$_evfolyamJel.'|tanev='.$_tanev.'|szemeszter='.$_szemeszter.'|jegy='.$_osztalyzat.'|jegyTipus='.$__jegyTipus.'|megjegyzes='.$_megj.'">';
+ $content .= $KOVETELMENY[$__jegyTipus][$_osztalyzat]['hivatalos'];
+ $content .= ' '.$_megj;
+ $content .= '</option>';
+ }
+
+ }
+ $content .= '</optgroup>';
+ }
+ //hack, nem szép: $content .= '<optgroup label="info"><option disabled="disabled">'.$_title.'</option></optgroup>';
+ $content .= '</select>';
+ if ($ADAT['jegyTipus']=='szöveges szempontrendszer') {
+ $content .= '<a href="'.
+ href(
+ 'index.php?page=naplo&sub=osztalyozo&f=szovegesErtekeles&diakId='.$_diakId
+ .'&tanev='.$_tanev.'&szemeszter='.$_szemeszter.'&evfolyam='.$_evfolyam.'&evfolyamJel='.$_evfolyamJel.'&tankorId='.$_tankorId
+ )
+ .'" class="onClickUpdateWindow szoveges" title="'._SZOVEGES_MINOSITES.'">☰</a>';
+ }
+ } else { // ha nincs megadva jegyTipus, sajnos nem írható be jegy
+ $content .= 'A tárgyhoz nincs rögzítve a jegyTipus!';
+ }
+ if ($responseFormat=='return') return $content;
+ else echo $content;
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/share/orarend.phtml b/mayor-orig/www/skin/classic/module-naplo/html/share/orarend.phtml
new file mode 100644
index 00000000..522b5a51
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/share/orarend.phtml
@@ -0,0 +1,48 @@
+<?php
+ /*
+ $ADAT['meta'] = ['dbNap']
+ $ADAT['oszlopFej'][$index]
+ $ADAT['oszlopLab'][$index]
+ $ADAT['sorFej']
+ $ADAT['tabla']
+ */
+
+ function putOrarendTablazat($ADAT) {
+
+ echo '<table border="0" align="center" class="orarend">';
+ /* Header */
+ echo '<thead>';
+ echo '<tr>';
+ for ($nap=0; $nap<=$ADAT['meta']['dbNap']; $nap++) {
+ echo '<th>';
+ if (function_exists('_putOrarendHead')) _putOrarendHead($ADAT['oszlopFej'][$nap]);
+ echo '</th>';
+ }
+ echo '</tr>';
+ echo '</thead>'."\n";
+ /* Footer */
+ echo '<tfoot>';
+ echo '<tr>';
+ for ($nap=0; $nap<=$ADAT['meta']['dbNap']; $nap++) {
+ echo '<th>';
+ if (function_exists('_putOrarendFoot')) _putOrarendHead($ADAT['oszlopLab'][$nap]);
+ echo '</th>';
+ }
+ echo '</tr>';
+ echo '</tfoot>'."\n";
+
+ /* Table body */
+ for ($ora = 0; $ora<16; $ora++) {
+ echo '<tr>';
+ echo '<th>'.$ora.'</th>';
+ for ($nap=1; $nap<=$ADAT['meta']['dbNap']; $nap++) {
+ echo '<td>';
+ if ($ADAT[$ora][$nap]['modosithato'] === true && function_exists('_egyOraMod')) _egyOraMod();
+ echo '</td>';
+ }
+ echo '</tr>'."\n";
+ }
+ echo '</table>';
+
+ }
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/sni/diakAllapot.phtml b/mayor-orig/www/skin/classic/module-naplo/html/sni/diakAllapot.phtml
new file mode 100644
index 00000000..3e0957f6
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/sni/diakAllapot.phtml
@@ -0,0 +1,165 @@
+<?php
+
+ function putDiakAllapot($ADAT) {
+
+ if (__MENTOR || __NAPLOADMIN || __VEZETOSEG) echo '<div class="sni mentor">'."\n";
+ else echo '<div class="sni">'."\n";
+
+ formBegin(array('method'=>'post','action'=>'','class'=>'sni'));
+
+ echo '<input type="hidden" name="action" value="sniDiakAdatRogzites" />'."\n";
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalyId'].'" />'."\n";
+ echo '<input type="hidden" name="diakId" value="'.$ADAT['diakId'].'" />'."\n";
+
+ echo '<label for="kulsoInfo">'._KULSOINFO.'</label><br />'."\n";
+ echo '<textarea title="'._KULSOINFO.'" cols="100" rows="10" id="kulsoInfo" name="kulsoInfo">'."\n";
+ echo $ADAT['sniDiakAdat']['kulsoInfo'];
+ echo '</textarea><br />'."\n";
+
+ echo '<label for="mentor">'._MENTOR.'</label>'."\n";
+ $SEL = array($ADAT['sniDiakAdat']['mentorTanarId'] => ' selected="selected" ');
+ echo '<select id="mentor" name="mentorTanarId">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ for ($i = 0; $i < count($ADAT['tanarok']); $i++) {
+ if (in_array($ADAT['tanarok'][$i]['tanarId'], $ADAT['tanarIds']))
+ echo '<option value="'.$ADAT['tanarok'][$i]['tanarId'].'"'.$SEL[$ADAT['tanarok'][$i]['tanarId']].'>'.$ADAT['tanarok'][$i]['tanarNev'].' ('.$ADAT['tanarok'][$i]['tanarId'].')</option>'."\n";
+ }
+ echo '</select>';
+
+ echo '<fieldset><legend>'._DIAGNOZIS.'</legend>'."\n";
+ echo '<table><tr><td>'."\n";
+ for ($i = 0; $i < count($ADAT['fogyatekossag']); $i++) {
+ $value = $ADAT['fogyatekossag'][$i];
+ if (strpos($ADAT['diakAdat'][$ADAT['diakId']]['fogyatekossag'], $value) !== false) $CHK = 'checked="checked" '; else $CHK = '';
+ echo '<input type="checkbox" name="fogyatekossag[]" id="fogyatekossag" value="'.$value.'" '.$CHK.'/> '.$value.'<br />';
+ if ($i == 5 || $i == 12 ) echo '</td><td>'."\n";
+ }
+ echo '</td></tr></table>'."\n";
+ echo '</fieldset>'."\n";
+
+ if (__NAPLOADMIN || __VEZETOSEG || __MENTOR)
+ echo '<p style="text-align: center"><input type="submit" value="'._OK.'" /></p>'."\n";
+
+ formEnd();
+
+ // Két állapot űrlapot rakunk ki - kezdő és vég állapot - itt 1. és 2. szemeszter
+ for ($szemeszter = 1; $szemeszter < 3; $szemeszter++) {
+
+ formBegin(array('method'=>'post','action'=>'','class'=>'sni hideShowContainer'));
+
+ echo '<h2 class="onClickHideShow">'.constant('_SZEMESZTER'.$szemeszter).'</h2>';
+ echo '<div class="openable" style="display:none;">';
+
+ echo '<input type="hidden" name="action" value="allapotRogzites" />'."\n";
+ echo '<input type="hidden" name="szemeszter" value="'.$szemeszter.'" />'."\n";
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalyId'].'" />'."\n";
+ echo '<input type="hidden" name="diakId" value="'.$ADAT['diakId'].'" />'."\n";
+
+ foreach ($ADAT['fields'] as $attr => $values) {
+ if (in_array($attr, array('matematika','szovegertes'))) $class='utolso'; else $class='';
+ echo '<fieldset class="'.$class.'">';
+ echo '<legend>'.constant('_'.nagybetus($attr)).'</legend>'."\n";
+ for ($i = 0; $i < count($values); $i++) {
+ if (in_array($attr, array('olvasasHibak','irasHibak','matematika'))) {
+ if (strpos($ADAT['diakAllapot'][$szemeszter][$attr], $values[$i]) !== false) $CHK = 'checked="checked" '; else $CHK = '';
+ echo '<input type="checkbox" name="'.$attr.'[]" id="'.$attr.$szemeszter.$i.'" value="'.$values[$i].'" '.$CHK.'/>';
+ } else {
+ if ($ADAT['diakAllapot'][$szemeszter][$attr] == $values[$i]) $CHK = 'checked="checked" '; else $CHK = '';
+ echo '<input type="radio" name="'.$attr.'" id="'.$attr.$szemeszter.$i.'" value="'.$values[$i].'" '.$CHK.'/>';
+ }
+ echo ' <label for="'.$attr.$szemeszter.$i.'">'.constant('_'.nagybetus($attr).'_'.nagybetus(ekezettelen(str_replace(' ','_',str_replace(',','',str_replace('/','_',$values[$i]))))))."</label><br />\n";
+ }
+ echo '</fieldset>'."\n";
+ }
+
+ echo '<label for="szemelyes'.$szemeszter.'">'._SZEMELYES_KOMPETENCIAK.'</label>'."\n";
+ echo '<textarea title="'._SZEMELYES_KOMPETENCIAK.'" cols="90" rows="7" id="szemelyes'.$szemeszter.'" name="szemelyesKompetenciak">'."\n";
+ echo $ADAT['diakAllapot'][$szemeszter]['szemelyesKompetenciak'];
+ echo '</textarea><br />'."\n";
+
+ echo '<label for="tarsas'.$szemeszter.'">'._TARSAS_KOMPETENCIAK.'</label>'."\n";
+ echo '<textarea title="'._TARSAS_KOMPETENCIAK.'" cols="90" rows="7" id="tarsas'.$szemeszter.'" name="tarsasKompetenciak">'."\n";
+ echo $ADAT['diakAllapot'][$szemeszter]['tarsasKompetenciak'];
+ echo '</textarea><br />'."\n";
+
+ echo '<label for="kognitiv'.$szemeszter.'">'._KOGNITIV_KEPESSEGEK.'</label>'."\n";
+ echo '<textarea title="'._KOGNITIV_KEPESSEGEK.'" cols="90" rows="7" id="kognitiv'.$szemeszter.'" name="kognitivKepessegek">'."\n";
+ echo $ADAT['diakAllapot'][$szemeszter]['kognitivKepessegek'];
+ echo '</textarea><br />'."\n";
+
+ echo '<label for="eljaras'.$szemeszter.'">'._ELJARAS_MEROESZKOZ.'</label><br />'."\n";
+ echo '<input title="'._ELJARAS_MEROESZKOZ.'" type="text" maxlength="100" size="60" id="eljaras'.$szemeszter.'" name="eljarasEszkozok" value="'.$ADAT['diakAllapot'][$szemeszter]['eljarasEszkozok'].'" /><br />'."\n";
+
+ echo '<label for="vizsgaltTerulet'.$szemeszter.'">'._VIZSGALT_TERULET.'</label><br />'."\n";
+ echo '<input title="'._VIZSGALT_TERULET.'" type="text" maxlength="100" size="60" id="vizsgaltTerulet'.$szemeszter.'" name="vizsgaltTerulet" value="'.$ADAT['diakAllapot'][$szemeszter]['vizsgaltTerulet'].'" /><br />'."\n";
+
+ echo '<label for="gyengesegek'.$szemeszter.'">'._FEJLESZTENDO_TERULET_KOMPETENCIA.'</label><br />'."\n";
+ echo '<ul>';
+ $ADAT['diakAllapot'][$szemeszter]['gyengeség'][] = array('leiras' => '', 'prioritas' => 0);
+ foreach ($ADAT['diakAllapot'][$szemeszter]['gyengeség'] as $key => $gyAdat) {
+ echo '<li>';
+ echo '<input title="'._FEJLESZTENDO_TERULET_KOMPETENCIA.'" type="text" maxlength="150" size="60" id="gyengeseg'.$szemeszter.$key.'" name="gyengesegLeiras[]" value="'.$gyAdat['leiras'].'" />'."\n";
+
+ $SEL = array($gyAdat['prioritas'] => ' selected="selected" ');
+ echo '<select id="gyengesegPrioritas'.$szemeszter.$key.'" name="gyengesegPrioritas[]">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ for ($i = 0; $i < 100; $i++) echo '<option value="'.$i.'"'.$SEL[$i].'>'.$i.'</option>'."\n";
+ echo '</select>'."\n";
+
+ echo '</li>'."\n";
+ }
+ echo '</ul>'."\n";
+//--------
+
+ echo '<label for="erossegek'.$szemeszter.'">'._EROSSEGEK.'</label><br />'."\n";
+ echo '<ul>';
+ $ADAT['diakAllapot'][$szemeszter]['erősség'][] = array('leiras' => '', 'prioritas' => 0);
+ foreach ($ADAT['diakAllapot'][$szemeszter]['erősség'] as $key => $eAdat) {
+ echo '<li>';
+ echo '<input title="'._EROSSEGEK.'" type="text" maxlength="150" size="60" id="erosseg'.$szemeszter.$key.'" name="erossegLeiras[]" value="'.$eAdat['leiras'].'" />'."\n";
+
+ $SEL = array($eAdat['prioritas'] => ' selected="selected" ');
+ echo '<select id="erossegPrioritas'.$szemeszter.$key.'" name="erossegPrioritas[]">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ for ($i = 0; $i < 100; $i++) echo '<option value="'.$i.'"'.$SEL[$i].'>'.$i.'</option>'."\n";
+ echo '</select>'."\n";
+
+ echo '</li>'."\n";
+ }
+ echo '</ul>'."\n";
+//--------
+
+
+ echo '<label for="problemaMegfogalmazasa'.$szemeszter.'">'._PROBLEMA_MEGFOGALMAZASA.'</label>'."\n";
+ echo '<textarea title="'._PROBLEMA_MEGFOGALMAZASA.'" cols="90" rows="2" id="problemaMegfogalmazasa'.$szemeszter.'" name="problemaMegfogalmazasa">'."\n";
+ echo $ADAT['diakAllapot'][$szemeszter]['problemaMegfogalmazasa'];
+ echo '</textarea><br />'."\n";
+
+ echo '<label for="vizsgalatDt'.$szemeszter.'">'._VIZSGALAT_DATUMA.'</label>'."\n";
+ echo '<input type="text" maxlength="10" size="10" class="date" id="vizsgalatDt'.$szemeszter.'" name="vizsgalatDt" value="'.$ADAT['diakAllapot'][$szemeszter]['vizsgalatDt'].'" />'."\n";
+
+ echo '<br /><label for="vizsgalo'.$szemeszter.'">'._VIZSGALATOT_VEGZO.'</label>'."\n";
+ $SEL = array($ADAT['diakAllapot'][$szemeszter]['vizsgalatTanarId'] => ' selected="selected" ');
+ echo '<select id="vizsgalo'.$szemeszter.'" name="vizsgalatTanarId">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ for ($i = 0; $i < count($ADAT['tanarok']); $i++) {
+ if (in_array($ADAT['tanarok'][$i]['tanarId'], $ADAT['tanarIds']))
+ echo '<option value="'.$ADAT['tanarok'][$i]['tanarId'].'"'.$SEL[$ADAT['tanarok'][$i]['tanarId']].'>'.$ADAT['tanarok'][$i]['tanarNev'].' ('.$ADAT['tanarok'][$i]['tanarId'].')</option>'."\n";
+ }
+ echo '</select><br />'."\n";
+
+ if (__NAPLOADMIN || __VEZETOSEG || __MENTOR)
+ echo '<p style="text-align: center"><input type="submit" value="'._OK.'" /></p>'."\n";
+
+ echo '</div>';
+
+ formEnd();
+
+ }
+
+ echo '</div>';
+
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/sni/fejlesztesiTerv.phtml b/mayor-orig/www/skin/classic/module-naplo/html/sni/fejlesztesiTerv.phtml
new file mode 100644
index 00000000..9c7a149d
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/sni/fejlesztesiTerv.phtml
@@ -0,0 +1,94 @@
+<?php
+
+ function putHaviOsszesites($ADAT) {
+
+ global $Honapok;
+
+
+ if (__NAPLOADMIN || __VEZETOSEG || __MENTOR) echo '<div class="sni mentor">'."\n";
+ else echo '<div class="sni">'."\n";
+
+ echo '<h1>';
+ echo $Honapok[(date('m',strtotime($ADAT['dt']))-1)];
+ echo '</h1>';
+
+ formBegin(array('method'=>'post','action'=>''));
+
+ echo '<input type="hidden" name="action" value="haviOsszegzesRogzitese" />'."\n";
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalyId'].'" />'."\n";
+ echo '<input type="hidden" name="diakId" value="'.$ADAT['diakId'].'" />'."\n";
+ echo '<input type="hidden" name="dt" value="'.$ADAT['dt'].'" />'."\n";
+
+ echo '<table><tr><td>'."\n";
+
+ echo '<label for="gyengesegek">'._GYENGESEGEK.'</label><br />'."\n";
+ echo '<textarea tabindex="10" title="'._GYENGESEGEK.'" cols="40" rows="3" id="gyengesegek" name="gyengesegek">'."\n";
+ echo $ADAT['sniHaviOsszegzes']['gyengesegek'];
+ echo '</textarea><br />'."\n";
+
+ echo '<label for="celok">'._CELOK.'</label><br />'."\n";
+ echo '<textarea tabindex="12" title="'._CELOK.'" cols="40" rows="2" id="celok" name="celok">'."\n";
+ echo $ADAT['sniHaviOsszegzes']['celok'];
+ echo '</textarea><br />'."\n";
+
+ echo '<label for="eszkozok">'._ESZKOZOK.'</label><br />'."\n";
+ echo '<textarea tabindex="14" title="'._ESZKOZOK.'" cols="40" rows="2" id="eszkozok" name="eszkozokModszerek">'."\n";
+ echo $ADAT['sniHaviOsszegzes']['eszkozokModszerek'];
+ echo '</textarea><br />'."\n";
+
+ echo '<label for="ertekeles">'._ERTEKELES.'</label><br />'."\n";
+ echo '<textarea tabindex="16" title="'._ERTEKELES.'" cols="40" rows="2" id="ertekeles" name="ertekeles">'."\n";
+ echo $ADAT['sniHaviOsszegzes']['ertekeles'];
+ echo '</textarea><br />'."\n";
+
+ echo '</td><td>'."\n";
+
+ echo '<label for="erossegek">'._EROSSEGEK.'</label><br />'."\n";
+ echo '<textarea tabindex="11" title="'._EROSSEGEK.'" cols="40" rows="3" id="erossegek" name="erossegek">'."\n";
+ echo $ADAT['sniHaviOsszegzes']['erossegek'];
+ echo '</textarea><br />'."\n";
+
+ echo '<label for="feladatok">'._FELADATOK.'</label><br />'."\n";
+ echo '<textarea tabindex="13" title="'._FELADATOK.'" cols="40" rows="2" id="feladatok" name="fejlesztesiFeladatok">'."\n";
+ echo $ADAT['sniHaviOsszegzes']['fejlesztesiFeladatok'];
+ echo '</textarea><br />'."\n";
+
+ echo '<label for="utemezes">'._UTEMEZES.'</label><br />'."\n";
+ echo '<textarea tabindex="15" title="'._UTEMEZES.'" cols="40" rows="2" id="utemezes" name="utemezes">'."\n";
+ echo $ADAT['sniHaviOsszegzes']['utemezes'];
+ echo '</textarea><br />'."\n";
+
+ echo '<label for="eredmeny">'._EREDMENY.'</label><br />'."\n";
+ echo '<textarea tabindex="17" title="'._EREDMENY.'" cols="40" rows="2" id="eredmeny" name="eredmeny">'."\n";
+ echo $ADAT['sniHaviOsszegzes']['eredmeny'];
+ echo '</textarea><br />'."\n";
+
+ echo '</td></tr></table>'."\n";
+
+ echo '<label for="felelos">'._FELELOS.'</label><br />'."\n";
+ echo '<select tabindex="18" id="felelos" name="felelos[]" multiple="multiple" class="multi" size="10">'."\n";
+ for ($i = 0; $i < count($ADAT['tanarok']); $i++)
+ if (in_array($ADAT['tanarok'][$i]['tanarId'], $ADAT['tanarIds'])) {
+ if (in_array($ADAT['tanarok'][$i]['tanarId'], $ADAT['sniHaviOsszegzes']['felelos']))
+ echo '<option value="'.$ADAT['tanarok'][$i]['tanarId'].'" selected="selected">'.$ADAT['tanarok'][$i]['tanarNev'].' ('.$ADAT['tanarok'][$i]['tanarId'].')</option>'."\n";
+ else
+ echo '<option value="'.$ADAT['tanarok'][$i]['tanarId'].'">'.$ADAT['tanarok'][$i]['tanarNev'].' ('.$ADAT['tanarok'][$i]['tanarId'].')</option>'."\n";
+ }
+ echo '</select><br />'."\n";
+
+ echo '<label for="valtozas">'._VALTOZAS.'</label><br />'."\n";
+ $SEL = array($ADAT['sniHaviOsszegzes']['valtozas'] => ' selected="selected" ');
+ echo '<select tabindex="19" id="valtozas" name="valtozas">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ for ($i = 1; $i <= 100; $i++) echo '<option value="'.$i.'"'.$SEL[$i].'>'.$i.'%</option>'."\n";
+ echo '</select>'."\n";
+
+ if (__NAPLOADMIN || __VEZETOSEG || __MENTOR)
+ echo '<p style="text-align: center"><input tabindex="25" type="submit" value="'._OK.'" /></p>'."\n";
+
+ formEnd();
+ echo '</div>'."\n";
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/sni/tantargyiFeljegyzesek.phtml b/mayor-orig/www/skin/classic/module-naplo/html/sni/tantargyiFeljegyzesek.phtml
new file mode 100644
index 00000000..e160758d
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/sni/tantargyiFeljegyzesek.phtml
@@ -0,0 +1,110 @@
+<?php
+
+ function putTankorFeljegyzesek($ADAT) {
+
+ global $_TANEV;
+
+ echo '<ul class="sni">'."\n";
+
+ for ($t = strtotime($ADAT['igDt']); $t >= $ADAT['tolTime']; $t = strtotime("-7 days", $t)) {
+
+ $dt = date('Y-m-d', $t);
+ $dtStr = dateToString($dt);
+ $igDtStr = dateToString(date('Y-m-d', strtotime("+6 days", $t)));
+
+ $mod = (
+ $_TANEV['statusz'] == 'aktív'
+ && (
+ __NAPLOADMIN
+ || (__TANARA && $t >= strtotime(_HALADASI_HATARIDO))
+ )
+ );
+ if ($mod) echo '<li class="mod">'."\n";
+ else echo '<li>'."\n";
+
+ formBegin(array('method'=>'post','action'=>''));
+
+ echo '<input type="hidden" name="action" value="tantargyiFeljegyzesRogzites" />'."\n";
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalyId'].'" />'."\n";
+ echo '<input type="hidden" name="diakId" value="'.$ADAT['diakId'].'" />'."\n";
+ echo '<input type="hidden" name="dt" value="'.$ADAT['dt'].'" />'."\n";
+ echo '<input type="hidden" name="tankorId" value="'.$ADAT['tankorId'].'" />'."\n";
+
+ echo '<input type="hidden" name="feljegyzesTankorId" value="'.$ADAT['tankorId'].'" />'."\n";
+ echo '<input type="hidden" name="feljegyzesDt" value="'.$dt.'" />'."\n";
+
+ echo '<label for="mj'.$dt.'">'.$dtStr.' - '.$igDtStr.'</label><br />'."\n";
+ if ($mod) {
+ echo '<textarea id="mj'.$dt.'" name="megjegyzes" cols="90" rows="5" title="'.$dt.'">'."\n";
+ echo $ADAT['sniTantargyiFeljegyzes'][$dt];
+ echo '</textarea>'."\n";
+ } else {
+ echo '<p>'.nl2br($ADAT['sniTantargyiFeljegyzes'][$dt]).'</p>';
+ }
+
+ if ($mod) echo '<input type="submit" value="'._OK.'" />';
+ formEnd();
+
+ echo '</li>'."\n";
+ }
+ echo '</ul>'."\n";
+
+
+ }
+
+ function putDiakHetiFeljegyzesek($ADAT) {
+
+ global $_TANEV;
+
+ $dtStr = dateToString($ADAT['dt']);
+ $time = strtotime($ADAT['dt']);
+ $igDtStr = dateToString(date('Y-m-d', strtotime("+6 days", $time)));
+
+ echo '<h2 class="sni">'.$dtStr.' - '.$igDtStr.'</h2>'."\n";
+ echo '<ul class="sni">'."\n";
+
+ foreach ($ADAT['tankorIds'] as $tankorId) {
+
+ $mod = (
+ $_TANEV['statusz'] == 'aktív'
+ && (
+ __NAPLOADMIN
+ || ($ADAT['tankorTanaraE'][$tankorId] && $time >= strtotime(_HALADASI_HATARIDO))
+ )
+ );
+
+ if ($mod) echo '<li class="mod">'."\n";
+ else echo '<li>'."\n";
+
+ formBegin(array('method'=>'post','action'=>''));
+
+ echo '<input type="hidden" name="action" value="tantargyiFeljegyzesRogzites" />'."\n";
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalyId'].'" />'."\n";
+ echo '<input type="hidden" name="diakId" value="'.$ADAT['diakId'].'" />'."\n";
+ echo '<input type="hidden" name="dt" value="'.$ADAT['dt'].'" />'."\n";
+ echo '<input type="hidden" name="tankorId" value="'.$ADAT['tankorId'].'" />'."\n";
+
+ echo '<input type="hidden" name="feljegyzesTankorId" value="'.$tankorId.'" />'."\n";
+ echo '<input type="hidden" name="feljegyzesDt" value="'.$ADAT['dt'].'" />'."\n";
+
+ echo '<label for="tk'.$tankorId.'">'.$ADAT['tankorAdat'][$tankorId]['tankorNev'].'</label><br />'."\n";
+ if ($mod) {
+ echo '<textarea id="tk'.$tankorId.'" name="megjegyzes" cols="90" rows="5" title="'.$dt.'">'."\n";
+ echo $ADAT['sniTantargyiFeljegyzes'][$tankorId];
+ echo '</textarea>'."\n";
+ } else {
+ echo '<p>'.nl2br($ADAT['sniTantargyiFeljegyzes'][$tankorId]).'</p>';
+ }
+
+ if ($mod) echo '<input type="submit" value="'._OK.'" />';
+ formEnd();
+
+ echo '</li>'."\n";
+
+ }
+
+ echo '</ul>'."\n";
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/stat/lemorzsolodas.phtml b/mayor-orig/www/skin/classic/module-naplo/html/stat/lemorzsolodas.phtml
new file mode 100644
index 00000000..26c5124c
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/stat/lemorzsolodas.phtml
@@ -0,0 +1,59 @@
+<?php
+
+ function putLemorzsolodas($ADAT) {
+
+ //dump($ADAT['lemorzsolodas']);
+
+ echo '<h1>Két egymás követő félév alatt átlagosan >=1,1 romlás</h1>';
+ _putTabla($ADAT['lemorzsolodas']['ronto']);
+
+ echo '<h1>A fél/év végén a tanulmányi átlaga < 3,0</h1>';
+ _putTabla($ADAT['lemorzsolodas']['rosszTanulo']);
+
+ echo '<h1>A fél/év végén a tanulmányi átlaga < 2,5</h1>';
+ _putTabla($ADAT['lemorzsolodas']['nagyonRosszTanulo']);
+
+ echo '<h1>Egy vagy több tárgyból bukik</h1>';
+ _putTabla($ADAT['lemorzsolodas']['bukott']);
+
+ echo '<h1>Magatartása rossz</h1>';
+ _putTabla($ADAT['lemorzsolodas']['rosszMagatartasu']);
+
+ echo '<h1>Szorgalma hanyag</h1>';
+ _putTabla($ADAT['lemorzsolodas']['hanyagSzorgalmu']);
+
+ echo '<h1>50 órát elérő igazolatlan hiányzás</h1>';
+ _putTabla($ADAT['lemorzsolodas']['igazolatlanHianyzo_50']);
+
+ echo '<h1>100 órát elérő igazolt hiányzás</h1>';
+ _putTabla($ADAT['lemorzsolodas']['igazoltanHianyzo_100']);
+
+ echo '<h1>magántanulóvá vált</h1>';
+ _putTabla($ADAT['lemorzsolodas']['magantanuloLett']);
+
+ }
+
+ function _putTabla($ADAT) {
+ // dump($ADAT);
+ echo 'Összesen: '.count($ADAT);
+ if (count($ADAT)==0) return false;
+ echo '<table class="lemorzsolodas" border="1">';
+ echo '<tr>';
+ foreach($ADAT[0] as $k => $d) {
+ echo '<th>'.$k.'</td>';
+ }
+ echo '</tr>';
+ for ($i=0; $i<count($ADAT); $i++) {
+ $D = $ADAT[$i];
+ echo '<tr>';
+ foreach($D as $k => $d) {
+ if ($k=='diakNev') echo '<td class="diakNev" data-diakid="'.$D['diakId'].'">'.$D['diakNev'].'</td>';
+ else echo '<td>'.$d.'</td>';
+ }
+ echo '</tr>';
+ }
+ echo '</table>';
+
+ }
+
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/stat/letszam.phtml b/mayor-orig/www/skin/classic/module-naplo/html/stat/letszam.phtml
new file mode 100644
index 00000000..78ebd262
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/stat/letszam.phtml
@@ -0,0 +1,54 @@
+<?php
+
+ function putLetszamStat( $ADAT = array() )
+ {
+ if (count($ADAT)==0) return ;
+ if (!is_array($ADAT['osztalyok'])) return;
+
+ echo '<table class="letszamStat" align="center">';
+ echo '<thead>';
+ echo '<tr>';
+ echo '<th rowspan="2">'._SZULEV.'</th>';
+ foreach($ADAT['osztalyok'] as $OSZT) {
+ $osztalyId = $OSZT['osztalyId'];
+ $osztalyJel = $OSZT['osztalyJel'];
+ echo '<th colspan="2">'.$osztalyJel.'</th>';
+ }
+ echo '</tr>';
+ echo '<tr>';
+ foreach($ADAT['osztalyok'] as $OSZT) {
+ echo '<td>Σ</td><td>♀</td>';
+ }
+ echo '</tr>';
+
+ echo '</thead>';
+ echo '<tfoot>';
+ echo '<tr>';
+ echo '<th colspan="'.(count($ADAT['osztalyok'])*2+1).'">('.$ADAT['tanev'].') '.$ADAT['dt'].'</th>';
+ echo '</tr>';
+ echo '</tfoot>';
+
+ echo '<tbody>';
+ foreach ($ADAT['eletkor'] as $szuletesiEv => $D) {
+ echo '<tr>';
+ echo '<th>'.$szuletesiEv.'</th>';
+
+ foreach($ADAT['osztalyok'] as $OSZT) {
+ $osztalyId = $OSZT['osztalyId'];
+ $osztalyJel = $OSZT['osztalyJel'];
+ if (count($D[$osztalyId]) > 0) {
+ echo '<td>'.(($D[$osztalyId]['fiú'][0]['dbDiak'] + $D[$osztalyId]['lány'][0]['dbDiak'])).'</td>';
+ echo '<td class="l">'.(intval($D[$osztalyId]['lány'][0]['dbDiak'])).'</td>';
+ } else {
+ echo '<td></td><td></td>';
+ }
+ }
+ echo '</tr>'."\n";
+ }
+
+ echo '</tbody>'."\n";
+ echo '</table>';
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/stat/tantargyFelosztas.phtml b/mayor-orig/www/skin/classic/module-naplo/html/stat/tantargyFelosztas.phtml
new file mode 100644
index 00000000..bf662e4b
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/stat/tantargyFelosztas.phtml
@@ -0,0 +1,414 @@
+<?php
+
+ function putStat($ADAT) {
+
+ echo '<h1>A '.__TANEV.'/'.(__TANEV+1).' tanév tantárgyfelosztási statisztikája</h1>';
+ echo '<table id="tfStat">';
+ // Intézményi alapadatok
+ echo '<tbody id="alap">';
+ echo '<tr><th>Intézmény neve<br/>OM<br />Címe</th>';
+ foreach ($ADAT['intezmeny'] as $intezmeny => $iAdat) {
+ echo '<td colspan="6">'
+ .$iAdat['intezmenyAdat']['nev'].'<br />'
+ .$iAdat['intezmenyAdat']['OMKod'].'<br />'
+ .$iAdat['intezmenyAdat']['cimHelyseg'].' '.$iAdat['intezmenyAdat']['cimIrsz'].', '.$iAdat['intezmenyAdat']['cimKozteruletNev'].' '.$iAdat['intezmenyAdat']['cimKozteruletJelleg'].' '.$iAdat['intezmenyAdat']['cimHazszam'];
+ echo '</td>';
+ }
+ echo '</tr>';
+ echo '</tbody>';
+
+ // Pedagógus létszám
+ echo '<tbody id="tanarLetszam">';
+ echo '<tr><th class="slide">Pedagógus létszám <span class="icon-chevron-down"></span></th>';
+ foreach ($ADAT['intezmeny'] as $intezmeny => $iAdat) {
+ echo '<td colspan="2" class="number">'.intval($iAdat['tanarLetszam']['statusz']['határozatlan idejű']+$iAdat['tanarLetszam']['statusz']['határozott idejű']).'</td>';
+ echo '<td class="gap" colspan="4"></td>';
+ }
+ echo '</tr>';
+ echo '<tr class="hide"><th></th>';
+ foreach ($ADAT['intezmeny'] as $intezmeny => $iAdat) {
+ echo '<th colspan="2">Gyakornok<br />Pedagógus I.<br/>Pedagógus II.<br/>Mesterpedagógus</br>Kutatótanár</td>';
+ echo '<td class="number">'.$iAdat['tanarLetszam']['besorolas']['Gyakornok'].'<br/>'
+ .$iAdat['tanarLetszam']['besorolas']['Pedagógus I.'].'<br/>'
+ .$iAdat['tanarLetszam']['besorolas']['Pedagógus II.'].'<br/>'
+ .$iAdat['tanarLetszam']['besorolas']['Mesterpedagógus'].'<br/>'
+ .$iAdat['tanarLetszam']['besorolas']['Kutatótanár']
+ .'</td>';
+ echo '<th colspan="2">Határozatlan idejű<br/>Határozott idejű<br />Tartósan távol</th>';
+ echo '<td class="number">'
+ .intval($iAdat['tanarLetszam']['statusz']['határozatlan idejű']).'<br/>'
+ .intval($iAdat['tanarLetszam']['statusz']['határozott idejű']).'<br/>'
+ .intval($iAdat['tanarLetszam']['statusz']['tartósan távol']).'<br/>'
+ .'</td>';
+ }
+ echo '</tr>';
+ echo '</tbody>';
+
+ // Finanszírozott pedagógus létszám (a költségvetési törvény szerint)
+ echo '<tbody id="tanarLetszam">';
+ echo '<tr><th class="slide" rowspan="2"><span class="icon-chevron-down"></span>Finanszírozott <br/>pedagógus létszám</th>';
+ foreach ($ADAT['intezmeny'] as $intezmeny => $iAdat) {
+ echo '<th colspan="2">Összesen</th><th colspan="2" rowspan="2">Diák létszám</th><th colspan="2" rowspan="2">Mutató</th>';
+ }
+ echo '</tr>';
+ echo '<tr>';
+ foreach ($ADAT['intezmeny'] as $intezmeny => $iAdat) {
+ $pLetszam = 0;
+ foreach ($ADAT['finanszírozott pedagógus létszám'] as $osztalyTipus => $mutato)
+ $pLetszam += round(intval($iAdat['diakLetszam'][$osztalyTipus])/$mutato);
+ echo '<td class="number" colspan="2">'.$pLetszam.'</td>';
+ }
+ echo '</tr>';
+ foreach ($ADAT['finanszírozott pedagógus létszám'] as $osztalyTipus => $mutato) {
+ echo '<tr class="hide"><th title="'.$mutato.' tanuló / 1 pedagógus">'.$osztalyTipus.'</th>';
+ foreach ($ADAT['intezmeny'] as $intezmeny => $iAdat) {
+ echo '<td class="number" colspan="2">'.round(intval($iAdat['diakLetszam'][$osztalyTipus])/$mutato).'</td>';
+ echo '<td class="number" colspan="2">'.$iAdat['diakLetszam'][$osztalyTipus].'</td>';
+ echo '<td class="number" colspan="2">'.$mutato.'</td>';
+ }
+ echo '</tr>';
+ }
+ echo '</tbody>';
+
+ // Diák létszám adatok
+ echo '<tbody id="diakLetszam">';
+ echo '<tr><th class="slide" rowspan="2">Diák létszám <span class="icon-chevron-down"></span></th>';
+ foreach ($ADAT['intezmeny'] as $intezmeny => $iAdat) echo '<th colspan="2">Összes</th><th colspan="2">Fiú</th><th colspan="2">Lány</th>';
+ echo '</tr>';
+ foreach ($ADAT['intezmeny'] as $intezmeny => $iAdat) {
+ if (
+ intval($iAdat['diakLetszam']['statusz']['jogviszonyban van']+$iAdat['diakLetszam']['statusz']['magántanuló'])
+ <> intval($iAdat['diakLetszam']['statusz']['fiú']['jogviszonyban van']+$iAdat['diakLetszam']['statusz']['fiú']['magántanuló'])
+ +intval($iAdat['diakLetszam']['statusz']['lány']['jogviszonyban van']+$iAdat['diakLetszam']['statusz']['lány']['magántanuló'])
+ ) $class=' alert';
+ else $class='';
+ echo '<td colspan="2" class="number'.$class.'">'.intval($iAdat['diakLetszam']['statusz']['jogviszonyban van']+$iAdat['diakLetszam']['statusz']['magántanuló']).'</td>'
+ .'<td colspan="2" class="number'.$class.'">'.intval($iAdat['diakLetszam']['statusz']['fiú']['jogviszonyban van']+$iAdat['diakLetszam']['statusz']['fiú']['magántanuló']).'</td>'
+ .'<td colspan="2" class="number'.$class.'">'.intval($iAdat['diakLetszam']['statusz']['lány']['jogviszonyban van']+$iAdat['diakLetszam']['statusz']['lány']['magántanuló']).'</td>';
+ //echo '<td class="gap"></td>';
+ }
+ echo '<tr class="hide"><th>jogviszonyban van<br />magántanuló<br />vendégtanuló<br />jogviszonya szünetel</th>';
+ foreach ($ADAT['intezmeny'] as $intezmeny => $iAdat) {
+ if (intval($iAdat['diakLetszam']['statusz']['jogviszonyban van']) <> intval($iAdat['diakLetszam']['statusz']['fiú']['jogviszonyban van']+$iAdat['diakLetszam']['statusz']['lány']['jogviszonyban van']))
+ $jvClass=' class="alert"';
+ if (intval($iAdat['diakLetszam']['statusz']['magántanuló']) <> intval($iAdat['diakLetszam']['statusz']['fiú']['magántanuló']+$iAdat['diakLetszam']['statusz']['lány']['magántanuló']))
+ $mClass=' class="alert"';
+ if (intval($iAdat['diakLetszam']['statusz']['vendégtanuló']) <> intval($iAdat['diakLetszam']['statusz']['fiú']['vendégtanuló']+$iAdat['diakLetszam']['statusz']['lány']['vendégtanuló']))
+ $vClass=' class="alert"';
+ if (intval($iAdat['diakLetszam']['statusz']['jogviszonya felfüggesztve']) <> intval($iAdat['diakLetszam']['statusz']['fiú']['jogviszonya felfüggesztve']+$iAdat['diakLetszam']['statusz']['lány']['jogviszonya felfüggesztve']))
+ $jfClass=' class="alert"';
+ echo '<td colspan="2" class="number">'
+ .'<span'.$jvClass.'>'.$iAdat['diakLetszam']['statusz']['jogviszonyban van'].'</span><br />'
+ .'<span'.$mClass.'>'.$iAdat['diakLetszam']['statusz']['magántanuló'].'</span><br />'
+ .'<span'.$vClass.'>'.$iAdat['diakLetszam']['statusz']['vendégtanuló'].'</span><br />'
+ .'<span'.$jfClass.'>'.$iAdat['diakLetszam']['statusz']['jogviszonya felfüggesztve'].'</span>'.
+ '</td>';
+ echo '<td colspan="2" class="number">'
+ .'<span'.$jvClass.'>'.$iAdat['diakLetszam']['statusz']['fiú']['jogviszonyban van'].'</span><br />'
+ .'<span'.$mClass.'>'.$iAdat['diakLetszam']['statusz']['fiú']['magántanuló'].'</span><br />'
+ .'<span'.$vClass.'>'.$iAdat['diakLetszam']['statusz']['fiú']['vendégtanuló'].'</span><br />'
+ .'<span'.$jfClass.'>'.$iAdat['diakLetszam']['statusz']['fiú']['jogviszonya felfüggesztve'].'</span>'.
+ '</td>';
+ echo '<td colspan="2" class="number">'
+ .'<span'.$jvClass.'>'.$iAdat['diakLetszam']['statusz']['lány']['jogviszonyban van'].'</span><br />'
+ .'<span'.$mClass.'>'.$iAdat['diakLetszam']['statusz']['lány']['magántanuló'].'</span><br />'
+ .'<span'.$vClass.'>'.$iAdat['diakLetszam']['statusz']['lány']['vendégtanuló'].'</span><br />'
+ .'<span'.$jfClass.'>'.$iAdat['diakLetszam']['statusz']['lány']['jogviszonya felfüggesztve'].'</span>'.
+ '</td>';
+ //echo '<td class="gap"></td>';
+ }
+ echo '</tr>';
+ echo '<tr class="hide"><th>Évfolyam létszámok</th>';
+ echo '</tr>';
+ foreach ($ADAT['evfolyamJelek'] as $idx => $evfolyamJel) {
+ $letezoEvfolyam = false;
+ foreach ($ADAT['intezmeny'] as $intezmeny => $iAdat) {
+ if (is_array($iAdat['diakLetszam']['evfolyamJel'][$evfolyamJel])) {
+ if (!$letezoEvfolyam) {
+ echo '<tr class="hide"><th>'.$evfolyamJel.'</th>';
+ $letezoEvfolyam = true;
+ }
+ if ($letezoEvfolyam) {
+ echo '<td colspan="2" class="number">'.$iAdat['diakLetszam']['evfolyamJel'][$evfolyamJel]['összes'].'</td>';
+ echo '<td colspan="2" class="number">'.$iAdat['diakLetszam']['evfolyamJel'][$evfolyamJel]['fiú'].'</td>';
+ echo '<td colspan="2" class="number">'.$iAdat['diakLetszam']['evfolyamJel'][$evfolyamJel]['lány'].'</td>';
+ //echo '<td class="gap"></td>';
+ }
+ }
+ }
+ if ($letezoEvfolyam) echo '</tr>';
+ }
+ echo '</tbody>';
+
+ // Óraszámok
+ echo '<tbody id="oraszamok">';
+ echo '<tr><th rowspan="2" class="slide">Óraszámok <span class="icon-chevron-down"></span></th>';
+ foreach ($ADAT['intezmeny'] as $intezmeny => $iAdat) {
+ echo '<th>Összes</th><th rowspan="2" colspan="3"></th><th>Óratervi</th><th>Tanórán kívüli</th>';
+ }
+ echo '</tr><tr>';
+ foreach ($ADAT['intezmeny'] as $intezmeny => $iAdat) {
+ echo ''
+ .'<td class="number">'.number_format($iAdat['oraszamok']['összes'],2,',','').'</td>'
+ .'<td class="number">'.number_format($iAdat['oraszamok']['óratervi'],2,',','').'</td>'
+ .'<td class="number">'.number_format($iAdat['oraszamok']['tanórán kívüli'],1,',','').'</td>'
+ ;
+ }
+ echo '</tr>';
+ echo '<tr class="hide"><th>Tantárgyanként</th>';
+ foreach ($ADAT['intezmeny'] as $intezmeny => $iAdat) {
+ echo '<td class="number">';
+ foreach ($iAdat['targyAdat'] as $targyId => $tAdat) {
+ if (isset($iAdat['targyOraszamok']['összes'][$targyId])) {
+ echo number_format($iAdat['targyOraszamok']['összes'][$targyId],1,',','').'<br />';
+ }
+ }
+ echo '</td>';
+ echo '<th colspan="3">';
+ foreach ($iAdat['targyAdat'] as $targyId => $tAdat) {
+ if (isset($iAdat['targyOraszamok']['összes'][$targyId])) {
+ echo $tAdat['targyNev'].'<br />';
+ }
+ }
+ echo '</th>';
+ foreach (array('óratervi','tanórán kívüli') as $oratervi) {
+ echo '<td class="number">';
+ foreach ($iAdat['targyAdat'] as $targyId => $tAdat) {
+ if (isset($iAdat['targyOraszamok']['összes'][$targyId])) {
+ echo number_format($iAdat['targyOraszamok'][$oratervi][$targyId],1,',','').'<br />';
+ }}
+ echo '</td>';
+ }
+ }
+ echo '</tr>';
+ echo '<tr class="hide"><th>Osztályonként</th>';
+ foreach ($ADAT['intezmeny'] as $intezmeny => $iAdat) {
+ echo '<td class="number">';
+ foreach ($iAdat['osztalyIds'] as $osztalyId) {
+ if (isset($iAdat['osztalyOraszamok']['összes'][$osztalyId])) {
+ echo number_format($iAdat['osztalyOraszamok']['összes'][$osztalyId],1,',','').'<br />';
+ }
+ }
+ echo '</td>';
+
+ echo '<th colspan="3">';
+ foreach ($iAdat['osztalyIds'] as $osztalyId) {
+ if (isset($iAdat['osztalyOraszamok']['összes'][$osztalyId])) {
+ echo $iAdat['osztalyAdat'][$osztalyId]['osztalyJel'].'<br />';
+ }
+ }
+ echo '</th>';
+ foreach (array('óratervi','tanórán kívüli') as $oratervi) {
+ echo '<td class="number">';
+ foreach ($iAdat['osztalyIds'] as $osztalyId) {
+ if (isset($iAdat['osztalyOraszamok']['összes'][$osztalyId])) {
+ echo number_format($iAdat['osztalyOraszamok'][$oratervi][$osztalyId],1,',','').'<br />';
+ }}
+ echo '</td>';
+ }
+ }
+ echo '<tr class="hide"><th>Évfolyamonként</th>';
+ foreach ($ADAT['intezmeny'] as $intezmeny => $iAdat) {
+ echo '<td class="number">';
+ foreach ($ADAT['evfolyamJelek'] as $evfolyamJel) {
+ if (isset($iAdat['evfolyamOraszamok']['összes'][$evfolyamJel])) {
+ echo number_format($iAdat['evfolyamOraszamok']['összes'][$evfolyamJel],1,',','').'<br />';
+ }
+ }
+ echo '</td>';
+
+ echo '<th colspan="3">';
+ foreach ($ADAT['evfolyamJelek'] as $evfolyamJel) {
+ if (isset($iAdat['evfolyamOraszamok']['összes'][$evfolyamJel])) {
+ echo $evfolyamJel.'<br />';
+ }
+ }
+ echo '</th>';
+ foreach (array('óratervi','tanórán kívüli') as $oratervi) {
+ echo '<td class="number">';
+ foreach ($ADAT['evfolyamJelek'] as $evfolyamJel) {
+ if (isset($iAdat['evfolyamOraszamok']['összes'][$evfolyamJel])) {
+ echo number_format($iAdat['evfolyamOraszamok'][$oratervi][$evfolyamJel],1,',','').'<br />';
+ }}
+ echo '</td>';
+ }
+ }
+ echo '</tr>';
+ echo '</tbody>';
+
+ // időkeret
+ echo '<tbody id="idokeret">';
+ echo '<tr><th class="slide" rowspan="2">Heti időkeret <span class="icon-chevron-down"></span></th>';
+ foreach ($ADAT['intezmeny'] as $intezmeny => $iAdat) {
+ echo '<th>összesen</th>'
+ .'<th>enge-<br/>délye-<br/>zett</th>'
+ .'<th>tehetség-<br/>gondozás, <br/>felzárkóztatás</th>'
+ .'<th>hittan többlet <br/>órakerete <br/>egyházi <br/>intéz-<br/>ményben</th>'
+ .'<th>6 és 8 <br/>évfolyamos <br/>gimnáziumok <br/> többlet <br/>óraszáma</th>'
+ .'<th>nemzetiségi <br/>oktatás-<br/>nevelés <br/>többlet <br/>óraszáma</th>'
+ ;
+ }
+ echo '</tr><tr>';
+ foreach ($ADAT['intezmeny'] as $intezmeny => $iAdat) {
+ echo '<td class="number">'.$iAdat['osztalyIdokeret']['összesen']['összes'].'</td>'
+ .'<td class="number">'.$iAdat['osztalyIdokeret']['összesen']['engedélyezett'].'</td>'
+ .'<td class="number">'.$iAdat['osztalyIdokeret']['összesen']['tehetséggondozás-felzárkóztatás'].'</td>'
+ .'<td class="number">'.$iAdat['osztalyIdokeret']['összesen']['egyházi'].'</td>'
+ .'<td class="number">'.$iAdat['osztalyIdokeret']['összesen']['gimnázium'].'</td>'
+ .'<td class="number">'.$iAdat['osztalyIdokeret']['összesen']['nemzetiségi'].'</td>'
+ ;
+ }
+ echo '</tr>';
+ echo '<tr class="hide"><th>'
+ .'Általános iskola alsó tagozat<br/>'
+ .'Általános&nbsp;iskola&nbsp;felső&nbsp;tagozat<br/>'
+ .'Általános iskola<br/>'
+ .'Gimnázium 1-8. évfolyam<br/>'
+ .'Gimnázium&nbsp;9-12.&nbsp;évfolyam<br/>'
+ .'Gimnázium</th>';
+ foreach ($ADAT['intezmeny'] as $intezmeny => $iAdat) {
+ echo '<td class="number">'
+ .$iAdat['osztalyIdokeret']['alsó']['összes'].'<br/>'
+ .$iAdat['osztalyIdokeret']['felső']['összes'].'<br/>'
+ .$iAdat['osztalyIdokeret']['általános']['összes'].'<br/>'
+ .$iAdat['osztalyIdokeret']['gimnázium18']['összes'].'<br/>'
+ .$iAdat['osztalyIdokeret']['gimnázium92']['összes'].'<br/>'
+ .$iAdat['osztalyIdokeret']['gimnázium']['összes'].'<br/>'
+ .'</td>'
+ .'<td class="number">'
+ .$iAdat['osztalyIdokeret']['alsó']['engedélyezett'].'<br/>'
+ .$iAdat['osztalyIdokeret']['felső']['engedélyezett'].'<br/>'
+ .$iAdat['osztalyIdokeret']['általános']['engedélyezett'].'<br/>'
+ .$iAdat['osztalyIdokeret']['gimnázium18']['engedélyezett'].'<br/>'
+ .$iAdat['osztalyIdokeret']['gimnázium92']['engedélyezett'].'<br/>'
+ .$iAdat['osztalyIdokeret']['gimnázium']['engedélyezett'].'<br/>'
+ .'</td>'
+ .'<td class="number">'
+ .$iAdat['osztalyIdokeret']['alsó']['tehetséggondozás-felzárkóztatás'].'<br/>'
+ .$iAdat['osztalyIdokeret']['felső']['tehetséggondozás-felzárkóztatás'].'<br/>'
+ .$iAdat['osztalyIdokeret']['általános']['tehetséggondozás-felzárkóztatás'].'<br/>'
+ .$iAdat['osztalyIdokeret']['gimnázium18']['tehetséggondozás-felzárkóztatás'].'<br/>'
+ .$iAdat['osztalyIdokeret']['gimnázium92']['tehetséggondozás-felzárkóztatás'].'<br/>'
+ .$iAdat['osztalyIdokeret']['gimnázium']['tehetséggondozás-felzárkóztatás'].'<br/>'
+ .'</td>'
+ .'<td class="number">'
+ .$iAdat['osztalyIdokeret']['alsó']['egyházi'].'<br/>'
+ .$iAdat['osztalyIdokeret']['felső']['egyházi'].'<br/>'
+ .$iAdat['osztalyIdokeret']['általános']['egyházi'].'<br/>'
+ .$iAdat['osztalyIdokeret']['gimnázium18']['egyházi'].'<br/>'
+ .$iAdat['osztalyIdokeret']['gimnázium92']['egyházi'].'<br/>'
+ .$iAdat['osztalyIdokeret']['gimnázium']['egyházi'].'<br/>'
+ .'</td>'
+ .'<td class="number">'
+ .$iAdat['osztalyIdokeret']['alsó']['gimnázium'].'<br/>'
+ .$iAdat['osztalyIdokeret']['felső']['gimnázium'].'<br/>'
+ .$iAdat['osztalyIdokeret']['általános']['gimnázium'].'<br/>'
+ .$iAdat['osztalyIdokeret']['gimnázium18']['gimnázium'].'<br/>'
+ .$iAdat['osztalyIdokeret']['gimnázium92']['gimnázium'].'<br/>'
+ .$iAdat['osztalyIdokeret']['gimnázium']['gimnázium'].'<br/>'
+ .'</td>'
+ .'<td class="number">'
+ .$iAdat['osztalyIdokeret']['alsó']['nemzetiségi'].'<br/>'
+ .$iAdat['osztalyIdokeret']['felső']['nemzetiségi'].'<br/>'
+ .$iAdat['osztalyIdokeret']['általános']['nemzetiségi'].'<br/>'
+ .$iAdat['osztalyIdokeret']['gimnázium18']['nemzetiségi'].'<br/>'
+ .$iAdat['osztalyIdokeret']['gimnázium92']['nemzetiségi'].'<br/>'
+ .$iAdat['osztalyIdokeret']['gimnázium']['nemzetiségi'].'<br/>'
+ .'</td>'
+ ;
+ }
+ echo '</tr>';
+ echo '<tr class="hide"><th>Osztályonként</th>';
+ foreach ($ADAT['intezmeny'] as $intezmeny => $iAdat) {
+ echo '<th>';
+ foreach ($iAdat['osztalyAdat'] as $osztalyId => $oAdat) echo $oAdat['osztalyJel'].'<br/>';
+ echo '</th>';
+ echo '<td class="number">';
+ foreach ($iAdat['osztalyAdat'] as $osztalyId => $oAdat) echo $iAdat['osztalyIdokeret'][$osztalyId]['engedélyezett'].'<br/>';
+ echo '</td>';
+ echo '<td class="number">';
+ foreach ($iAdat['osztalyAdat'] as $osztalyId => $oAdat) echo $iAdat['osztalyIdokeret'][$osztalyId]['tehetséggondozás-felzárkóztatás'].'<br/>';
+ echo '</td>';
+ echo '<td class="number">';
+ foreach ($iAdat['osztalyAdat'] as $osztalyId => $oAdat) echo $iAdat['osztalyIdokeret'][$osztalyId]['egyházi'].'<br/>';
+ echo '</td>';
+ echo '<td class="number">';
+ foreach ($iAdat['osztalyAdat'] as $osztalyId => $oAdat) echo $iAdat['osztalyIdokeret'][$osztalyId]['gimnázium'].'<br/>';
+ echo '</td>';
+ echo '<td class="number">';
+ foreach ($iAdat['osztalyAdat'] as $osztalyId => $oAdat) echo $iAdat['osztalyIdokeret'][$osztalyId]['nemzetiségi'].'<br/>';
+ echo '</td>';
+ }
+ echo '</tr>';
+ echo '</tbody>';
+
+ echo '</tbody id="tankorLetszamStat"><tr><th rowspan="2" class="slide">Csoport statisztika <span class="icon-chevron-down"></span></th>';
+ foreach ($ADAT['intezmeny'] as $intezmeny => $iAdat) {
+ echo '<th>Csoportok száma</th><th colspan="2" rowspan="2"></th><th>minimális csoportlétszám</th><th>maximális csoportlétszám</th><th>átlagos csoportlétszám</th>';
+ $osszDb = 0; $osszMax = 0; $osszSum = 0; unset($osszMin);
+ foreach ($iAdat['targyAdat'] as $targyId => $tAdat) {
+ if (isset($iAdat['tankorLetszamStat'][$targyId]['sum'])) {
+ $osszDb += $iAdat['tankorLetszamStat'][$targyId]['db'];
+ $osszSum += $iAdat['tankorLetszamStat'][$targyId]['sum'];
+ if ($osszMax < $iAdat['tankorLetszamStat'][$targyId]['max']) $osszMax = $iAdat['tankorLetszamStat'][$targyId]['max'];
+ if (!isset($osszMin) || $iAdat['tankorLetszamStat'][$targyId]['min']<$osszMin)
+ $osszMin = $iAdat['tankorLetszamStat'][$targyId]['min'];
+ }
+ }
+ $ADAT['intezmeny'][$intezmeny]['tankorLetszamStat']['összes'] =
+ array('db'=>$osszDb, 'min'=>$osszMin, 'max'=>$osszMax, 'átlag'=>number_format($osszSum/$osszDb,1,',',''));
+ }
+ echo '</tr>';
+ echo '<tr>';
+ foreach ($ADAT['intezmeny'] as $intezmeny => $iAdat) {
+ echo '<td class="number">'.$iAdat['tankorLetszamStat']['összes']['db'].'</td>'
+ .'<td class="number">'.$iAdat['tankorLetszamStat']['összes']['min'].'</td>'
+ .'<td class="number">'.$iAdat['tankorLetszamStat']['összes']['max'].'</td>'
+ .'<td class="number">'.$iAdat['tankorLetszamStat']['összes']['átlag'].'</td>';
+ }
+ echo '</tr>';
+ echo '<tr class="hide"><th>Tantárgyanként</th>';
+ foreach ($ADAT['intezmeny'] as $intezmeny => $iAdat) {
+ echo '<td class="number">';
+ foreach ($iAdat['targyAdat'] as $targyId => $tAdat) {;
+ if (isset($iAdat['tankorLetszamStat'][$targyId]['sum'])) {
+ echo $iAdat['tankorLetszamStat'][$targyId]['db'].'<br />';
+ }
+ }
+ echo '</td>';
+ echo '<th colspan="2">';
+ foreach ($iAdat['targyAdat'] as $targyId => $tAdat) {
+ if (isset($iAdat['tankorLetszamStat'][$targyId]['sum'])) {
+ echo str_replace(' ','&nbsp;', $tAdat['targyNev']).'<br />';
+ }
+ }
+ echo '</th>';
+ echo '<td class="number">';
+ foreach ($iAdat['targyAdat'] as $targyId => $tAdat) {
+ if (isset($iAdat['tankorLetszamStat'][$targyId]['sum'])) {
+ echo $iAdat['tankorLetszamStat'][$targyId]['min'].'<br />';
+ }
+ }
+ echo '</td>';
+ echo '<td class="number">';
+ foreach ($iAdat['targyAdat'] as $targyId => $tAdat) {
+ if (isset($iAdat['tankorLetszamStat'][$targyId]['sum'])) {
+ echo $iAdat['tankorLetszamStat'][$targyId]['max'].'<br />';
+ }
+ }
+ echo '</td>';
+ echo '<td class="number">';
+ foreach ($iAdat['targyAdat'] as $targyId => $tAdat) {
+ if (isset($iAdat['tankorLetszamStat'][$targyId]['sum'])) {
+ echo number_format($iAdat['tankorLetszamStat'][$targyId]['sum']/$iAdat['tankorLetszamStat'][$targyId]['db'],1,',','').'<br />';
+ }
+ }
+ echo '</td>';
+ }
+ echo '</tr>';
+ echo '</tbody>';
+
+ echo '</table>';
+ }
+
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/tanev/checkStatus.phtml b/mayor-orig/www/skin/classic/module-naplo/html/tanev/checkStatus.phtml
new file mode 100644
index 00000000..95a59a90
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/tanev/checkStatus.phtml
@@ -0,0 +1,34 @@
+<?php
+
+ function putCheckStatus($ADAT) {
+
+ echo '<div style="margin-left:100px;">';
+
+ echo '<div>'._DT.':'.$ADAT['vizsgaltDt'].'</div>';
+ echo '<div>'._NAPOK_SZAMA.':'.$ADAT['napokSzama'].'</div>';
+ echo '<div>'._ORAK_SZAMA .':'.$ADAT['orakSzama'].'</div>';
+
+
+ echo '<div>'._HIANYZO_TANKOR;
+ echo '<ul>';
+ for ($i=0; $i<count($ADAT['hianyzoTankor']); $i++) {
+ $_D = $ADAT['hianyzoTankor'][$i];
+ echo '<li>';
+ var_dump($_D);
+ echo '</li>';
+ }
+ echo '</ul>'.'</div>';
+
+ echo '<div>'._HIANYZO_ORA;
+ echo '<ul>';
+ for ($i=0; $i<count($ADAT['hianyzoOra']); $i++) {
+ $_D = $ADAT['hianyzoOra'][$i];
+ echo '<li>';
+ var_dump($_D);
+ echo '</li>';
+ }
+ echo '</ul>'.'</div>';
+ echo '</div>';
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/tanev/diakTanarai.phtml b/mayor-orig/www/skin/classic/module-naplo/html/tanev/diakTanarai.phtml
new file mode 100644
index 00000000..0436e1f8
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/tanev/diakTanarai.phtml
@@ -0,0 +1,62 @@
+<?php
+
+ function putDiakTanarLista($ADAT) {
+
+ echo '<table class="lista">'."\n";
+
+ echo '<thead>'."\n";
+ echo '<tr>'."\n";
+ echo '<th>'._DIAK.' ('.count($ADAT['diak']).' '._FO.')</th>';
+ echo '<th>'._OSZTALY.'</th>';
+ echo '<th>'._TANAR.'</th>';
+ echo '</tr>'."\n";
+ echo '</thead>'."\n";
+
+ $db = 0;
+ for ($i = 0; $i < count($ADAT['diak']); $i++) {
+
+ $diakId = $ADAT['diak'][$i]['diakId'];
+ $tanarNev = array();
+ for ($j = 0; $j < count($ADAT['diak'][$i]['tankorIds']); $j++) {
+ $tankorId = $ADAT['diak'][$i]['tankorIds'][$j];
+ for ($k = 0; $k < count($ADAT['tankorTanar'][$tankorId]); $k++) {
+
+ if (!in_array($ADAT['tankorTanar'][$tankorId][$k]['tanarNev'], $tanarNev))
+ $tanarNev[] = $ADAT['tankorTanar'][$tankorId][$k]['tanarNev'];
+ }
+ }
+
+ if (count($tanarNev) > 0) {
+ $db++;
+ echo '<tr>'."\n";
+ echo '<td class="nev">'.$db.'. '.$ADAT['diak'][$i]['diakNev'].'</td>'."\n";
+ echo '<td class="osztaly">'.$ADAT['osztaly'][ $ADAT['diak'][$i]['osztalyId'] ]['osztalyJel'].'</td>'."\n";
+
+ echo '<td class="tanar">';
+ echo (count($tanarNev) == 0) ? '-' : implode(', ', $tanarNev);
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+ }
+ }
+ echo '</table>'."\n";
+
+ }
+
+ function putOsztalyValaszto($ADAT) {
+
+ formBegin(array('class'=>'osztaly'));
+ echo '<input type="hidden" name="action" value="osztalyValasztas" />'."\n";
+ echo '<input type="hidden" name="targyId" value="'.$ADAT['targyId'].'" />'."\n";
+ foreach ($ADAT['osztaly'] as $osztalyId => $oAdat) {
+ $CHK = (in_array($osztalyId, $ADAT['osztalyId']))?' checked="checked"':'';
+ echo '<input type="checkbox" id="osztaly'.$osztalyId.'" name="osztalyIds[]" value="'.$osztalyId.'"'.$CHK.' />'."\n";
+ echo '<label for="osztaly'.$osztalyId.'">'.$oAdat['osztalyJel'].'</label>'."\n";
+ }
+
+ echo '<input type="submit" value="'._OK.'" />'."\n";
+
+ formEnd();
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/tanev/fogadoOra.phtml b/mayor-orig/www/skin/classic/module-naplo/html/tanev/fogadoOra.phtml
new file mode 100644
index 00000000..0ec32a97
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/tanev/fogadoOra.phtml
@@ -0,0 +1,317 @@
+<?php
+
+// include_once('skin/classic/module-naplo/html/share/face.phtml');
+
+ function putFogadoOraLista($Lista, $Tanarok, $Szulok) {
+
+ formBegin(array('class'=>'fogado'));
+ foreach ($Tanarok as $tanarId => $tAdat) if ($Lista['adatok'][$tanarId]['tol'] != '') {
+
+ $tol = $Lista['adatok'][$tanarId]['tol'];
+ $ig = $Lista['adatok'][$tanarId]['ig'];
+
+ echo '<table>'."\n";
+
+ echo '<thead>';
+ echo '<tr>';
+ echo '<th colspan="3">'.$tAdat['tanarNev'].'</th>';
+ echo '</tr>'."\n";
+ echo '<tr>';
+ echo '<th colspan="3">';
+ echo substr($tol, 0, 10).' ';
+ if ($Lista['adatok'][$tanarId]['teremId'] != '') {
+ echo $Lista['adatok'][$tanarId]['leiras'];
+ echo ' ('.$Lista['adatok'][$tanarId]['teremId'].') ';
+ echo _TEREM;
+ }
+ echo '</th>';
+ echo '</tr>'."\n";
+ echo '<tr>';
+ echo '<th>'._TOL.'</th>';
+ echo '<th>'._SZULONEV.'</th>';
+ echo '<th>'._DIAKNEV.'</th>';
+ echo '</tr>'."\n";
+ echo '</thead>';
+
+ echo '<tfoot><tr><th colspan="3"></th></tr></tfoot>';
+
+ echo '<tbody>';
+ $i = 0;
+ for ($t = strtotime($tol); $t < strtotime($ig); $t = strtotime('+'._VIZITHOSSZ. ' minutes', $t)) {
+
+ $aktTol = date('Y-m-d H:i:s', $t);
+ if ($Lista['jelentkezesek'][$tanarId][$i]['tol'] == $aktTol) {
+ $A = $Lista['jelentkezesek'][$tanarId][$i];
+ $i++;
+ } else { $A = array(); }
+
+ $diakNevek = array();
+ for ($j = 0; $j < count($Szulok['diakjai'][$A['szuloId']]); $j++)
+ $diakNevek[] = $Szulok['diakjai'][$A['szuloId']][$j]['diakNev'];
+
+ echo '<tr>';
+ echo '<td>';
+ echo substr($aktTol,11,-3);
+ echo '</td>';
+ echo '<td>';
+ echo $Szulok[$A['szuloId']]['szuloNev'];
+
+ echo '</td>';
+ echo '<td>';
+ echo implode(',', $diakNevek);
+ echo '</td>';
+ echo '</tr>'."\n";
+ }
+ echo '</tbody>';
+
+ echo '</table>'."\n";
+
+ }
+ formEnd();
+
+ }
+
+ function putFogadoOsszes($FogadoOsszes, $Tanarok) {
+
+ formBegin(array('class'=>'fogado'));
+ echo '<input type="hidden" name="action" value="listaLekerdezese" />'."\n";
+ echo '<input type="hidden" name="tanarId" value="" />'."\n";
+ echo '<table>'."\n";
+ echo '<thead>';
+ echo '<tr>';
+ echo '<th>';
+ echo _TANARNEV;
+ echo '</th>'."\n";
+ echo '<th>';
+ echo _DATUM;
+ echo '</th>'."\n";
+ echo '<th>';
+ echo _TOL;
+ echo '</th>'."\n";
+ echo '<th>';
+ echo _IG;
+ echo '</th>'."\n";
+ echo '<th>';
+ echo _TEREM;
+ echo '</th>'."\n";
+ echo '</tr>';
+ echo '</thead>';
+ echo '<tfoot><tr><th colspan="5">';
+ echo '<input type="submit" value="'._RESZLETES_LISTA.'" />';
+ echo '</th></tr></tfoot>'."\n";
+ echo '<tbody>';
+ if (is_array($FogadoOsszes)) foreach ($FogadoOsszes as $tId => $tAdat) {
+ echo '<tr>';
+ echo '<th>';
+ echo '<a href="'.href('index.php?page=naplo&sub=tanev&f=fogadoOra&tanarId='.$tAdat['tanarId']).'">';
+ echo $Tanarok[$tAdat['tanarId']]['tanarNev'];
+ echo '</a>';
+ echo '</th>';
+ echo '<td>'.substr($tAdat['tol'],0,10).'</td>';
+ echo '<td>'.substr($tAdat['tol'],11,5).'</td>';
+ echo '<td>'.substr($tAdat['ig'],11,5).'</td>';
+ echo '<td>'.$tAdat['teremId'].'</td>';
+ echo '</tr>'."\n";
+ }
+ echo '</tbody>';
+ echo '</table>'."\n";
+ formEnd();
+ }
+
+ function kovetkezoFogadoIdopont($FogadoDt) {
+
+ formBegin(array('class'=>'fogado'));
+ echo '<input type="hidden" name="action" value="kovetkezoFogado" />'."\n";
+
+ echo '<h1>'._KOVETKEZO_FOGADO_ORA.'</h1>'."\n";
+ echo '<div>';
+ echo '<input class="date" type="text" name="tolDt" value="'.$FogadoDt['dates'][0].'" />'."\n";
+ $SEL = array(substr($FogadoDt['tol'][0],11,5) => ' selected="selected" ');
+ echo '<select name="tolTime">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ for ($o = 0; $o < 24; $o++)
+// for ($p = 0; $p < 60; $p += _VIZITHOSSZ) {
+ for ($p = 0; $p < 60; $p += 1) { // Ha pl 8-perces vizithossz van, akkor a második órában óra 4 perckor kellene kezdeni a fogadóórát...
+ $time = str_pad($o, 2, '0', STR_PAD_LEFT).':'.str_pad($p, 2, '0', STR_PAD_LEFT);
+ echo '<option value="'.$time.'"'.$SEL[$time].'>'.$time.'</option>'."\n";
+ }
+ echo '</select>';
+ $SEL = array(substr($FogadoDt['ig'][0],11,5) => ' selected="selected" ');
+ echo '<select name="igTime">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ for ($o = 0; $o < 24; $o++)
+ for ($p = 0; $p < 60; $p += _VIZITHOSSZ) {
+ $time = str_pad($o, 2, '0', STR_PAD_LEFT).':'.str_pad($p, 2, '0', STR_PAD_LEFT);
+ echo '<option value="'.$time.'"'.$SEL[$time].'>'.$time.'</option>'."\n";
+ }
+ echo '</select>'."\n";
+ echo '<input type="submit" value="'._OK.'" title="'._BIZTOS_UJ_IDOPONT_E.'" class="confirm" />'."\n";
+ echo '</div>';
+ formEnd();
+
+ }
+
+ function tanarFogadoIdopontModosito($tanarFogado, $Termek) {
+
+ formBegin(array('class'=>'fogado'));
+ echo '<input type="hidden" name="action" value="tanarFogado" />'."\n";
+ echo '<input type="hidden" name="tanarId" value="'.$tanarFogado['tanarId'].'" />'."\n";
+
+ echo '<h1>'._TANAR_FOGADOORAJA.'</h1>'."\n";
+ echo '<div>';
+ echo '<input type="text" name="tolDt" value="'.substr($tanarFogado['tol'],0,10).'" />'."\n";
+ $SEL = array(substr($tanarFogado['tol'],11,5) => ' selected="selected" ');
+ echo '<select name="tolTime">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ for ($o = 0; $o < 24; $o++)
+// for ($p = 0; $p < 60; $p += _VIZITHOSSZ) {
+ for ($p = 0; $p < 60; $p += 1) {
+ $time = str_pad($o, 2, '0', STR_PAD_LEFT).':'.str_pad($p, 2, '0', STR_PAD_LEFT);
+ echo '<option value="'.$time.'"'.$SEL[$time].'>'.$time.'</option>'."\n";
+ }
+ echo '</select>';
+ $SEL = array(substr($tanarFogado['ig'],11,5) => ' selected="selected" ');
+ echo '<select name="igTime">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ for ($o = 0; $o < 24; $o++)
+ for ($p = 0; $p < 60; $p += _VIZITHOSSZ) {
+ $time = str_pad($o, 2, '0', STR_PAD_LEFT).':'.str_pad($p, 2, '0', STR_PAD_LEFT);
+ echo '<option value="'.$time.'"'.$SEL[$time].'>'.$time.'</option>'."\n";
+ }
+ echo '</select>'."\n";
+ $SEL = array($tanarFogado['teremId'] => ' selected="selected" ');
+ echo '<select name="teremId">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ for ($i = 0; $i < count($Termek); $i++) {
+ echo '<option value="'.$Termek[$i]['teremId'].'"'.$SEL[$Termek[$i]['teremId']].'>'.$Termek[$i]['leiras'].'</option>'."\n";
+ }
+ echo '</select>'."\n";
+ echo '<input type="submit" value="'._OK.'" />'."\n";
+ echo '</div>';
+ formEnd();
+
+ }
+
+ function tanarFogadoIdopont($TF, $Termek, $Szulok) {
+
+ formBegin(array('class'=>'fogado'));
+ echo '<table cellspacing="1">'."\n";
+ echo '<thead>'."\n";
+ echo '<tr>';
+ echo '<th colspan="3" class="cim">'._JELENTKEZESEK.'</th>';
+ echo '</tr>'."\n";
+ echo '<tr>';
+ echo '<th colspan="1">'.substr($TF['adatok']['tol'],0,10).'</th>';
+ echo '<th colspan="1">'._SZULONEV.'</th>';
+ echo '<th colspan="1">'._DIAKNEV.'</th>';
+ echo '</tr>';
+ echo '</thead>'."\n";
+ echo '<tfoot><tr><th colspan="3">'.'</th></tr></tfoot>';
+ echo '<tbody>';
+
+ for ($t = strtotime($TF['adatok']['tol']); $t < strtotime($TF['adatok']['ig']); $t = strtotime('+'._VIZITHOSSZ.' minutes', $t)) {
+ $szuloId = $TF['jelentkezesek'][date('Y-m-d H:i:s', $t)]['szuloId'];
+ $DIAKJAI= array();
+ for ($i = 0; $i < count($Szulok['diakjai'][$szuloId]); $i++) {
+ $DIAKJAI[] = $Szulok['diakjai'][$szuloId][$i];
+ }
+ echo '<tr>';
+ echo '<th>'.date('H:i', $t).'</th>';
+ echo '<td>';
+ echo $Szulok[$szuloId]['szuloNev'];
+ echo '</td>';
+ echo '<td>';
+ for ($i=0; $i<count($DIAKJAI); $i++) {
+ $_D=$DIAKJAI[$i];
+ echo '<div class="diak">';
+ putFace($_D['diakId'],'diak');
+ echo '<br/><span class="diakNev">'.$_D['diakNev'].'</span>';
+ echo '</div>';
+ }
+ echo '</td>';
+ echo '</tr>'."\n";
+ }
+ echo '</tbody>'."\n";
+ echo '</table>'."\n";
+ formEnd();
+ }
+
+ function putFogadoOraJelentkezes($szuloId, $diakTanarai, $Alkalmak, $szuloJelentkezes, $TermekAsszoc) {
+
+ if (__FOGADOORA_JELENTKEZES) $DIS = '';
+ else $DIS = ' disabled="disabled" ';
+
+ formBegin(array('class'=>'fogado'));
+ echo '<input type="hidden" name="action" value="fogadoOraJelentkezes" />'."\n";
+ echo '<input type="hidden" name="szuloId" value="'.$szuloId.'" />'."\n";
+ echo '<table>'."\n";
+ echo '<thead>'."\n";
+ echo '<tr>';
+ echo '<th colspan="4">'._TANARADAT.'</th>';
+ $sor = '<tr><th colspan="2">'._NEV.'</th><th>'._TEREM.'</th><th>'._TOROL.'</th>';
+ $sum = 4;
+ foreach($Alkalmak['napok'] as $nap => $napAdat) {
+ list($tolOra,$tolPerc) = explode(':', $napAdat['tol']);
+ list($igOra,$igPerc) = explode(':', $napAdat['ig']);
+ $Alkalmak['napok'][$nap]['colspan'] = $colspan = ceil(((60*$igOra+$igPerc) - (60*$tolOra+$tolPerc)) / _VIZITHOSSZ);
+ $sum += $colspan;
+ echo '<th colspan="'.$colspan.'">'.$nap.'</th>';
+ for ($t = strtotime($napAdat['tol']); $t < strtotime($napAdat['ig']); $t = strtotime('+'._VIZITHOSSZ.' minutes',$t)) {
+ $sor .= '<td>';
+ $sor .= date('H:i',$t);
+ $sor .= '</td>';
+ }
+ }
+ $sor .= '</tr>'."\n";
+ echo '</tr>'."\n";
+ echo $sor;
+ echo '</thead>';
+ echo '<tfoot><tr><th colspan="'.$sum.'">';
+ if (__FOGADOORA_JELENTKEZES) echo '<input type="submit" value="'._OK.'" />'."\n";
+ echo '</th></tr></tfoot>';
+ echo '<tbody>';
+ for ($i = 0; $i < count($diakTanarai); $i++) {
+ $tanarId = $diakTanarai[$i]['tanarId'];
+ echo '<tr>';
+ echo '<th>'.$diakTanarai[$i]['tanarNev'].'</th>';
+ echo '<th>';
+ putFace($diakTanarai[$i]['tanarId'],'tanar');
+ echo '</th>';
+
+ echo '<th>'.$TermekAsszoc[ $Alkalmak['tanarTerme'][$diakTanarai[$i]['tanarId']] ]['leiras'].'</th>';
+ echo '<td class="torol">';
+ echo '<input type="radio" name="jel'.$i.'" value="'.$tanarId.'/"'.$DIS.' />';
+ echo '</td>';
+ foreach($Alkalmak['napok'] as $nap => $napAdat) {
+ for ($t = strtotime($napAdat['tol']); $t < strtotime($napAdat['ig']); $t = strtotime('+'._VIZITHOSSZ.' minutes',$t)) {
+ $datetime = $nap.' '.date('H:i', $t).':00';
+ if ($szuloJelentkezes[$tanarId]['tol'] == $datetime) $_class = ' class="ok" ';
+ elseif (isset($diakTanarai[$i]['foglalt']['jelentkezesek'][$datetime])) $_class=' class="foglalt" ';
+ else $_class='';
+ echo '<td'.$_class.'>';
+ if (
+ $Alkalmak[$tanarId]['tol'] <= $nap.' '.date('H:i:s', $t)
+ && $Alkalmak[$tanarId]['ig'] > $nap.' '.date('H:i:s', $t)
+ ) {
+
+ if ($szuloJelentkezes[$tanarId]['tol'] == $datetime)
+ echo '<input type="radio" name="jel'.$i.'" value="'.$tanarId.'/'.$datetime.'" checked="checked"'.$DIS.' />';
+ elseif (isset($diakTanarai[$i]['foglalt']['jelentkezesek'][$datetime]))
+ echo '-';
+ else
+ echo '<input type="radio" name="jel'.$i.'" value="'.$tanarId.'/'.$datetime.'"'.$DIS.' />';
+ }
+ echo '</td>';
+ }
+ }
+ echo '</tr>';
+
+ }
+ echo '</tbody>';
+ echo '</table>'."\n";
+ formEnd();
+
+ }
+
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/tanev/munkaterv.phtml b/mayor-orig/www/skin/classic/module-naplo/html/tanev/munkaterv.phtml
new file mode 100644
index 00000000..6be97179
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/tanev/munkaterv.phtml
@@ -0,0 +1,370 @@
+<?php
+/*
+ Module: naplo
+*/
+
+// function putNapokForm($Napok, $napTipusok, $action, $Hetek = array()) {
+ function putNapokForm($ADAT) {
+
+ global $Honapok, $_TANEV;
+
+ $Napok = $ADAT['Napok']; $napTipusok = $ADAT['napTipusok']; $action = $ADAT['action']; $Hetek = $ADAT['Hetek'];
+ if (!is_array($Hetek)) $Hetek = array();
+
+ $ho = date('n',strtotime($Napok[0]['dt']));
+ $dow = date('w',strtotime($Napok[0]['dt']));
+
+ formBegin(array('class' => 'munkaterv'));
+
+ echo '<h2>'._EVES_MUNKATERV.' - '.$ADAT['munkaterv'][ $ADAT['munkatervId'] ]['munkatervNev'].' ('.$ADAT['munkatervId'].')</h2>'."\n";
+
+ echo '<input type="hidden" name="action" value="'.$action.'" />'."\n";
+ echo '<input type="hidden" name="munkatervId" value="'.$ADAT['munkatervId'].'" />'."\n";
+ if ($action == 'honapValasztas') echo '<input type="hidden" name="ho" value="'.$ho.'" />'."\n";
+ echo '<table class="munkaterv" align="center">'."\n";
+ echo '<thead>';
+ echo '<tr>';
+ echo '<th colspan="7">';
+ if (
+ (
+ ($_TANEV['statusz'] == 'aktív' && __NAPLOADMIN)
+ || (__VEZETOSEG && __FOLYO_TANEV)
+ )
+ && $action == 'honapValasztas'
+ ) echo '<input type="submit" value="'._MODOSIT.'" />';
+ echo $Honapok[$ho-1];
+ echo '</th>';
+ echo '</tr>'."\n";
+ echo '<tr>';
+ echo '</thead>';
+ echo '<tfoot>';
+ echo '<tr>';
+ if ($action == 'munkatervModositas') echo '<th colspan="7"><input type="submit" value="'._OK.'" /></th>';
+ else echo '<th colspan="7" />';
+ echo '</tr>';
+ echo '</tfoot>';
+ for ($i = 1; $i < $dow; $i++) {
+ echo '<td>&nbsp;</td>';
+ }
+ for ($i = 0; $i < count($Napok); $i++) {
+ if ($ho != $_ho = date('n', strtotime($Napok[$i]['dt']))) {
+ $ho = $_ho;
+
+ $dow = date('w',strtotime($Napok[$i]['dt']));
+ if ($dow == 0) $dow = 7;
+ for ($j = $dow; $j < 8; $j++) {
+ echo '<td>&nbsp;</td>';
+ }
+ echo '</tr>'."\n";
+ echo '</table>'."\n";
+ formEnd();
+
+ formBegin();
+ echo '<input type="hidden" name="action" value="'.$action.'" />'."\n";
+ echo '<input type="hidden" name="munkatervId" value="'.$ADAT['munkatervId'].'" />'."\n";
+ if ($action == 'honapValasztas') echo '<input type="hidden" name="ho" value="'.$ho.'" />'."\n";
+ echo '<table class="munkaterv" align="center">'."\n";
+ echo '<thead'."\n";
+ echo '<tr>';
+ echo '<th colspan="7">';
+ if (
+ (
+ ($_TANEV['statusz'] == 'aktív' && __NAPLOADMIN)
+ || (__VEZETOSEG && __FOLYO_TANEV)
+ )
+ && $action == 'honapValasztas'
+ ) echo '<input type="submit" value="'._MODOSIT.'" />';
+ echo $Honapok[$ho-1];
+ echo '</th>';
+ echo '</tr>';
+ echo '</thead>'."\n";
+ echo '<tfoot<tr><th colspan="7" /></tr></tfoot>'."\n";
+ echo '<tr>'."\n";
+ for ($j=1;$j<$dow;$j++) {
+ echo '<td>&nbsp;</td>';
+ }
+ } elseif (date('w',strtotime($Napok[$i]['dt']))==1) echo '<tr>';
+
+ // A szemeszterek határának jelölése
+ foreach ($_TANEV['szemeszter'] as $szemeszter => $szAdat) {
+ if ($szAdat['zarasDt'] == $Napok[$i]['dt']) {
+ $fDb = 8;
+ break;
+ }
+ }
+// if ($fDb > 0) $fDb--;
+ if ($fDb == 8) { $fDb--; $class = str_replace(' ', '', ekezettelen($Napok[$i]['tipus']));
+ } elseif ($fDb == 7) { $fDb--; $class = 'felevZarasDt '.str_replace(' ', '', ekezettelen($Napok[$i]['tipus']));
+ } elseif ($fDb > 0) { $fDb--; $class = 'felevZaras '.str_replace(' ', '', ekezettelen($Napok[$i]['tipus']));
+ } else { $class = str_replace(' ', '', ekezettelen($Napok[$i]['tipus'])); }
+
+ echo '<td class="'.$class.'">'."\n";
+
+ echo $Napok[$i]['dt'];
+ echo '<br />'."\n";
+ if ($action == 'munkatervModositas') {
+ echo '<input type="hidden" name="dt[]" value="'.$Napok[$i]['dt'].'" />'."\n";
+ $SEL = array($Napok[$i]['tipus'] => ' selected="selected"');
+ echo '<select name="tipus[]">';
+ for ($n = 0; $n < count($napTipusok); $n++) {
+ echo '<option value="'.$napTipusok[$n].'"'.$SEL[$napTipusok[$n]].'>'.$napTipusok[$n].'</option>'."\n";
+ }
+ echo '</select><br />'."\n";
+ echo '<input class="megjegyzes" type="text" name="megjegyzes[]" value="'.$Napok[$i]['megjegyzes'].'" />'."\n";
+ echo '<br />'."\n";
+ $SEL = array($Napok[$i]['orarendiHet'] => ' selected="selected" ');
+ echo '<select name="orarendiHet[]">'."\n";
+ if ($Napok[$i]['tipus'] != 'tanítási nap') echo '<option value="0"> - </option>'."\n";
+ for ($h = 0; $h < count($Hetek); $h++) {
+ echo '<option value="'.$Hetek[$h].'"'.$SEL[$Hetek[$h]].'>'.$Hetek[$h].'. '._ORARENDI_HET.'</option>'."\n";
+ }
+ echo '</select>'."\n";
+ echo '<br />'."\n";
+ $SEL = array($Napok[$i]['csengetesiRendTipus'] => ' selected="selected" ');
+ echo '<select name="csengetesiRendTipus[]">'."\n";
+ // if ($Napok[$i]['tipus'] != 'tanítási nap') echo '<option value="nincs"> - </option>'."\n";
+ for ($h = 0; $h < count($ADAT['fields']['csengetesiRendTipus']); $h++) {
+ echo '<option value="'.$ADAT['fields']['csengetesiRendTipus'][$h].'"'.$SEL[ $ADAT['fields']['csengetesiRendTipus'][$h] ].'>'.$ADAT['fields']['csengetesiRendTipus'][$h].' csengetés</option>'."\n";
+ }
+ echo '</select>'."\n";
+ } else {
+ echo $Napok[$i]['tipus'];
+ if (isset($Napok[$i]['megjegyzes']) && $Napok[$i]['megjegyzes'] != '') {
+ echo '<br />'."\n";
+ echo '<span>'.$Napok[$i]['megjegyzes'].'</span>';
+ }
+ if ($Napok[$i]['tipus'] == 'tanítási nap') {
+ echo '<br />'."\n";
+ echo '<span class="orarendiHet'.$Napok[$i]['orarendiHet'].'">'.$Napok[$i]['orarendiHet'].'. '._ORARENDI_HET.'</span>';
+ }
+ echo '<br />'."\n";
+ echo '<span>'.$Napok[$i]['csengetesiRendTipus'].' csengetés</span>';
+ }
+ echo '</td>'."\n";
+
+ if (date('w',strtotime($Napok[$i]['dt']))==0) echo '</tr>';
+ }
+
+ if (0 != $dow=date('w',strtotime($Napok[$i-1]['dt']))) {
+ for ($i=$dow+1;$i<8;$i++) {
+ echo '<td>&nbsp;</td>';
+ }
+ echo '</tr>'."\n";
+ }
+ echo '</table>'."\n";
+ formEnd();
+ }
+
+ function putNapokSzama($ADAT) {
+
+ $NapokSzama = $ADAT['NapokSzama']; $napTipusok = $ADAT['napTipusok'];
+
+ echo '<h2>'._NAPOK_SZAMA.' - '.$ADAT['munkaterv'][ $ADAT['munkatervId'] ]['munkatervNev'].' ('.$ADAT['munkatervId'].')</h2>';
+ echo '<table class="osszesites" align="center">';
+ echo '<tr>';
+ echo '<th></th>';
+ for ($i = 0; $i < count($napTipusok); $i++) {
+ echo '<th class="'.ekezettelen($napTipus[$i]).'">'.$napTipusok[$i].'</th>';
+ }
+ echo '<th class="osszesMunkanap">'._OSSZES_MUNKANAP.'</th>';
+ echo '</tr><tr>';
+ echo '<th>'._TENYLEGES.'</th>';
+ for ($i = 0; $i < count($napTipusok); $i++) {
+ echo '<td class="'.ekezettelen($napTipusok[$i]).'">'.intval($NapokSzama[$napTipusok[$i]]).'</td>';
+ }
+ echo '<td class="osszesMunkanap">'.intval($NapokSzama['tanítási nap']+$NapokSzama['speciális tanítási nap']+$NapokSzama['tanítás nélküli munkanap']).'</td>';
+ echo '</tr>';
+ echo '<tr class="eloirt">';
+ echo '<th>'._ELOIRT.'</th>';
+ echo '<td colspan="2">'.$ADAT['munkaterv'][ $ADAT['munkatervId'] ]['tanitasiNap'].'</td>';
+ echo '<td>'.$ADAT['munkaterv'][ $ADAT['munkatervId'] ]['tanitasNelkuliMunkanap'].'</td>';
+ echo '<td></td>';
+ echo '<td class="osszesMunkanap">'.($ADAT['munkaterv'][ $ADAT['munkatervId'] ]['tanitasiNap']+$ADAT['munkaterv'][ $ADAT['munkatervId'] ]['tanitasNelkuliMunkanap']).'</td>';
+ echo '</tr>';
+ echo '</table>';
+
+ echo '<p>'._VEGZOS_ZARAS_DT.': '. dateToString($ADAT['munkaterv'][ $ADAT['munkatervId'] ]['vegzosZarasDt']). '</p>';
+
+ }
+
+ function putNapokInit($ADAT, $Set = array('hide' => true)) {
+
+ $Hetek = $ADAT['Hetek'];
+ formBegin(array('class'=>'openable init', 'id' => 'napokInit', 'style' => ($Set['hide']?'display: none;':''), 'action' => ''));
+ echo '<h2>'._NAPOKINIT.'</h2>'."\n";
+ echo '<input type="hidden" name="action" value="napokInit" />'."\n";
+
+// if (is_array($Hetek) && count($Hetek) != 0) {
+// echo '<label for="hetek">'._ORARENDI_HET.'</label>'."\n";
+// echo '<p>';
+// for ($i = 0; $i < count($Hetek); $i++) {
+// echo '<input type="checkbox" name="Hetek[]" value="'.$Hetek[$i].'" />';
+// echo $Hetek[$i].'&nbsp;&nbsp;';
+// }
+// echo '</p>';
+// } else {
+ echo '<p>'._MAGYARAZAT.'</p>';
+ echo '<label for="orarendiHetekSzama">'._ORARENDIHETEKSZAMA.'</label>'."\n";
+ echo '<select id="orarendiHetekSzama" name="hetDb">';
+ for ($i = 1; $i < 10; $i++) {
+ echo '<option value="'.$i.'">'.$i.'</option>';
+ }
+ echo '</select>';
+
+ echo '<label for="tnsz">'._TANITASI_NAPOK_SZAMA.'</label>';
+ echo '<select id="tnsz" name="tanitasiNap">';
+ $SEL = array($ADAT['munkaterv'][1]['tanitasiNap'] => ' selected="selected" ');
+ for ($i = 1; $i < 200; $i++) {
+ echo '<option value="'.$i.'"'.$SEL[$i].'>'.$i.'</option>';
+ }
+ echo '</select>';
+
+ echo '<label for="tnmsz">'._TANITAS_NELKULI_MUNKANAPOK_SZAMA.'</label>';
+ echo '<select id="tnmsz" name="tanitasNelkuliMunkanap">';
+ $SEL = array($ADAT['munkaterv'][1]['tanitasNelkuliMunkanap'] => ' selected="selected" ');
+ for ($i = 1; $i < 20; $i++) {
+ echo '<option value="'.$i.'"'.$SEL[$i].'>'.$i.'</option>';
+ }
+ echo '</select>';
+
+ echo '<label for="vzdt">'._VEGZOS_ZARAS_DT.'</label>';
+ echo '<input type="text" class="date" id="vzdt" name="vegzosZarasDt" value="'.$ADAT['munkaterv'][1]['vegzosZarasDt'].'" />';
+// }
+ echo '<br /><input type="submit" value="'._OK.'" />'."\n";
+ formEnd();
+
+ }
+
+ function putHetHozzarendelo($ADAT, $Set = array('hide' => true)) {
+
+ global $_TANEV;
+
+ formBegin(array('class'=>'openable init', 'id' => 'hetHozzarendeles', 'style' => ($Set['hide']?'display: none;':'')));
+ echo '<h2>'._HETHOZZARENDELES.'</h2>';
+ echo '<input type="hidden" name="action" value="hetHozzarendeles" />'."\n";
+ echo '<input type="hidden" name="munkatervId" value="'.$ADAT['munkatervId'].'" />'."\n";
+ echo '<p>'._HH_MAGYARAZAT.'</p>';
+ echo '<label for="orarendiHetekSzama">'._ORARENDIHETEKSZAMA.'</label>'."\n";
+ echo '<select id="orarendiHetekSzama" name="hetDb">';
+ for ($i = 1; $i < 10; $i++) {
+ echo '<option value="'.$i.'">'.$i.'</option>';
+ }
+ echo '</select>';
+
+ echo '<label for="tolDt">'._DATUM.'</label>';
+ echo '<input type="text" class="date" id="tolDt" name="tolDt" value="'.$_TANEV['kezdesDt'].'" /> - ';
+ echo '<input type="text" class="date" name="igDt" value="'.$_TANEV['zarasDt'].'" />';
+ echo '<input type="submit" value="'._OK.'" />'."\n";
+ formEnd();
+
+ }
+
+ function putUjMunkaterv($ADAT, $Set = array('hide' => true)) {
+
+ global $_TANEV;
+
+ formBegin(array('class'=>'openable init', 'id' => 'ujMunkaterv', 'style' => ($Set['hide']?'display: none;':'')));
+ echo '<h2>'._UJ_MUNKATERV.'</h2>';
+ echo '<input type="hidden" name="action" value="ujMunkaterv" />'."\n";
+ echo '<p>'._UM_MAGYARAZAT.'</p>';
+
+ echo '<label for="munkatervNev">'._MUNKATERV_NEVE.'</label>';
+ echo '<input type="text" id="munkatervNev" name="munkatervNev" value="" />';
+
+ echo '<label for="tnsz">'._TANITASI_NAPOK_SZAMA.'</label>';
+ echo '<select id="tnsz" name="tanitasiNap">';
+ $SEL = array($ADAT['munkaterv'][1]['tanitasiNap'] => ' selected="selected" ');
+ for ($i = 1; $i < 200; $i++) {
+ echo '<option value="'.$i.'"'.$SEL[$i].'>'.$i.'</option>';
+ }
+ echo '</select>';
+
+ echo '<label for="tnmsz">'._TANITAS_NELKULI_MUNKANAPOK_SZAMA.'</label>';
+ echo '<select id="tnmsz" name="tanitasNelkuliMunkanap">';
+ $SEL = array($ADAT['munkaterv'][1]['tanitasNelkuliMunkanap'] => ' selected="selected" ');
+ for ($i = 1; $i < 20; $i++) {
+ echo '<option value="'.$i.'"'.$SEL[$i].'>'.$i.'</option>';
+ }
+ echo '</select>';
+
+ echo '<label for="vzdt">'._VEGZOS_ZARAS_DT.'</label>';
+ echo '<input type="text" class="date" id="vzdt" name="vegzosZarasDt" value="'.$ADAT['munkaterv'][1]['vegzosZarasDt'].'" />';
+/*
+ echo '<label for="orarendiHetekSzama">'._ORARENDIHETEKSZAMA.'</label>'."\n";
+ echo '<select id="orarendiHetekSzama" name="hetDb">';
+ for ($i = 1; $i < 10; $i++) {
+ echo '<option value="'.$i.'">'.$i.'</option>';
+ }
+ echo '</select>';
+
+ echo '<label for="tolDt">'._DATUM.'</label>';
+ echo '<input type="text" class="date" id="tolDt" name="tolDt" value="'.$_TANEV['kezdesDt'].'" /> - ';
+ echo '<input type="text" class="date" name="igDt" value="'.$_TANEV['zarasDt'].'" />';
+*/
+ echo '<input type="submit" value="'._OK.'" />'."\n";
+ formEnd();
+
+ }
+
+ function putMunkatervOsztaly($ADAT, $Set = array('hide' => true)) {
+
+ global $_TANEV;
+
+ formBegin(array('class'=>'openable init', 'id' => 'munkatervOsztaly', 'style' => ($Set['hide']?'display: none;':'')));
+ echo '<h2>'._MUNKATERV_OSZTALY.'</h2>';
+ echo '<input type="hidden" name="action" value="munkatervOsztaly" />'."\n";
+ echo '<input type="hidden" name="munkatervId" value="'.$ADAT['munkatervId'].'" />'."\n";
+ echo '<p>'._MO_MAGYARAZAT.'</p>';
+
+ echo '<ul>';
+ for ($i = 0; $i < count($ADAT['osztaly']); $i++) {
+ $O = $ADAT['osztaly'][$i];
+ echo '<li>';
+ echo '<input type="hidden" name="osztalyId[]" value="'.$O['osztalyId'].'">';
+ echo '<strong>'.$O['osztalyJel'].'</strong> ('.$O['leiras'].')';
+ echo '<input type="submit" value="'._OK.'" />'."\n";
+ echo '<select name="ujMunkatervId[]">';
+ echo '<option value=""> - </option>'."\n";
+ $SEL = array($O['munkatervId'] => ' selected="selected" ');
+ foreach ($ADAT['munkaterv'] as $mId => $mAdat) {
+ echo '<option value="'.$mId.'"'.$SEL[$mId].'>'.$mAdat['munkatervNev'].' ('.$mId.')</option>'."\n";
+ }
+ echo '</select>';
+ echo '</li>';
+ }
+ echo '</ul>';
+ formEnd();
+
+ }
+
+ function putAdminForm($ADAT, $Hetek = array(), $NapokSzama=null, $napTipusok=null) {
+
+ global $action, $initResult;
+
+ if ($action != '') $SEL = $action;
+ elseif (__MUNKATERV_OK || $initResult === true) $SEL = 'napokSzama';
+ else $SEL = 'napokInit';
+
+ echo '<div class="admin hideShowContainer">';
+
+ echo '<div id="showNapokInit" class="onClickShow'.($SEL=='napokInit'?' selected':'').'">'._NAPOKINIT.'</div>';
+ if (__MUNKATERV_OK || $initResult === true) {
+ echo '<div id="showNapokSzama" class="onClickShow'.($SEL=='napokSzama'?' selected':'').'">'._NAPOK_SZAMA.'</div>';
+ echo '<div id="showHetHozzarendeles" class="onClickShow'.($SEL=='hetHozzarendeles'?' selected':'').'">'._HETHOZZARENDELES.'</div>';
+ echo '<div id="showUjMunkaterv" class="onClickShow'.($SEL=='ujMunkaterv'?' selected':'').'">'._ELTERO_MUNKATERVEK.'</div>';
+ echo '<div id="showMunkatervOsztaly" class="onClickShow'.($SEL=='munkatervOsztaly'?' selected':'').'">'._MUNKATERV_OSZTALY.'</div>';
+ }
+
+ echo '<div class="openable" id="napokSzama"'.($SEL!='napokSzama'?' style="display: none;"':'').'>';
+ putNapokSzama($ADAT);
+ echo '</div>';
+ putNapokInit($ADAT, array('hide' => ($SEL!='napokInit')));
+ putHetHozzarendelo($ADAT, array('hide' => ($SEL!='hetHozzarendeles')));
+ putUjMunkaterv($ADAT, array('hide' => ($SEL!='ujMunkaterv')));
+ putMunkatervOsztaly($ADAT, array('hide' => ($SEL!='munkatervOsztaly')));
+ echo '<div>&nbsp;</div>';
+ echo '</div>';
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/tanev/tankorBlokk.phtml b/mayor-orig/www/skin/classic/module-naplo/html/tanev/tankorBlokk.phtml
new file mode 100644
index 00000000..0577e5a7
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/tanev/tankorBlokk.phtml
@@ -0,0 +1,200 @@
+<?php
+
+ function putTargySzuro($ADAT) {
+
+ formBegin(array('class'=>"szuro csoport"));
+ echo '<input type="hidden" name="action" value="targySzures" />'."\n";
+ echo '<input type="hidden" name="tanev" value="'.$ADAT['tanev'].'" />'."\n";
+ if (is_array($ADAT['osztalySzuro']) && count($ADAT['osztalySzuro']) == 1)
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalySzuro'][0].'" />'."\n";
+
+ echo '<table>';
+
+ echo '<tr>';
+ echo '<th>'._TARGY_SZURES.'</th>';
+ echo '</tr>'."\n";
+
+ echo '<tr>';
+ echo '<td>';
+ echo '<select name="targyId[]" multiple="multiple">';
+ for ($i = 0; $i < count($ADAT['targyak']); $i++) {
+ if (in_array($ADAT['targyak'][$i]['targyId'], $ADAT['targySzuro']))
+ echo '<option value="'.$ADAT['targyak'][$i]['targyId'].'" selected="selected">'.$ADAT['targyak'][$i]['targyNev'].'</option>'."\n";
+ else
+ echo '<option value="'.$ADAT['targyak'][$i]['targyId'].'">'.$ADAT['targyak'][$i]['targyNev'].'</option>'."\n";
+ }
+ echo '</select>'."\n";
+ echo '</td>';
+ echo '</tr>'."\n";
+
+ if (count($ADAT['osztalySzuro']) != 1) {
+ echo '<tr>';
+ echo '<th>'._EVFOLYAM_SZURES.'</th>';
+ echo '</tr>'."\n";
+ echo '<tr>';
+ echo '<td>';
+ for ($i = 0; $i < count($ADAT['evfolyamJelek']); $i++) {
+ if (in_array($ADAT['evfolyamJelek'][$i], $ADAT['evfolyamJelSzuro']))
+ echo '<input id="evf'.$i.'" type="checkbox" name="evfolyamJel[]" value="'.$ADAT['evfolyamJelek'][$i].'" checked="checked" /> ';
+ else
+ echo '<input id="evf'.$i.'" type="checkbox" name="evfolyamJel[]" value="'.$ADAT['evfolyamJelek'][$i].'" /> ';
+ echo '<label for="evf'.$i.'">'.$ADAT['evfolyamJelek'][$i].'.</label> ';
+ if ($i % 4 == 3) echo '<br />';
+ }
+ echo '</td>';
+ echo '</tr>'."\n";
+ }
+
+ echo '<tr>';
+ echo '<td>';
+ echo '<input type="submit" value="'._OK.'" />'."\n";
+ echo '</td>';
+ echo '</tr>'."\n";
+
+ echo '</table>'."\n";
+
+ formEnd();
+
+ }
+
+ function putUjTankorBlokk($ADAT) {
+
+ formBegin(array('class'=>'csoport'));
+ echo '<input type="hidden" name="action" value="ujTankorBlokk" />'."\n";
+ echo '<input type="hidden" name="tanev" value="'.$ADAT['tanev'].'" />'."\n";
+
+ // Kiválasztott tárgyak és évfolyamok
+ for ($i = 0; $i < count($ADAT['targySzuro']); $i++) echo '<input type="hidden" name="targyId[]" value="'.$ADAT['targySzuro'][$i].'" />'."\n";
+ for ($i = 0; $i < count($ADAT['evfolyamJelSzuro']); $i++) echo '<input type="hidden" name="evfolyamJel[]" value="'.$ADAT['evfolyamJelSzuro'][$i].'" />'."\n";
+ if (is_array($ADAT['osztalySzuro']) && count($ADAT['osztalySzuro']) == 1)
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalySzuro'][0].'" />'."\n";
+
+ echo '<table>';
+
+ echo '<tr>';
+ echo '<th colspan="2">';
+ echo _UJ_TANKOR_BLOKK;
+ echo '</th>';
+ echo '</tr>'."\n";
+
+ echo '<tr>';
+ echo '<th>';
+ echo _BLOKKNEV;
+ echo '</th>';
+ echo '<th>';
+ echo _TANKOROK.' ('.count($ADAT['tankorIdk']).')';
+ echo '</th>';
+ echo '</tr>'."\n";
+
+ echo '<tr>';
+ echo '<td>';
+ echo '<input type="text" name="blokkNev" value="" /><br />';
+ echo '<label for="exportOraszam">'._EXPORT_ORASZAM.':</label> ';
+ echo '<input size="1" maxlength="4" type="text" name="exportOraszam" id="exportOraszam" value="" /><br />';
+ echo '<input type="submit" value="'._OK.'" />'; echo '</td>';
+ echo '<td>';
+ echo '<select name="tankorId[]" multiple="multiple" size="10">';
+ foreach ($ADAT['szurtTankorIdk'] as $key => $tankorId)
+ if ($ADAT['tankorOraszam'][$tankorId] - $ADAT['tankorExportOraszam'][$tankorId] > 0)
+ echo '<option value="'.$tankorId.'">'.$ADAT['tankorAdat'][$tankorId]['tankorNev'].' ('.$tankorId.') - '
+ .number_format($ADAT['tankorOraszam'][$tankorId],1).' / '.number_format($ADAT['tankorExportOraszam'][$tankorId],1)
+ .' ['.$ADAT['tankorTanar'][$tankorId][0]['tanarNev'].' - ('.$ADAT['tankorTanar'][$tankorId][0]['tanarId'].')]'
+ .'</option>'."\n";
+ echo '</select>'."\n";
+ echo '</td>';
+ echo '</tr>'."\n";
+
+ echo '</table>';
+ formEnd();
+
+ }
+
+ function putTankorBlokkok($ADAT) {
+
+ $BLOKKOK = $ADAT['tankorBlokkok'];
+ if (!is_array($BLOKKOK['blokkNevek'])) return false;
+ echo '<table class="modosit">';
+
+ echo '<tr>';
+ echo '<th>';
+ echo _TANKOR_BLOKK_MODOSITAS;
+ echo '</th>';
+ echo '</tr>'."\n";
+
+ foreach ($BLOKKOK['blokkNevek'] as $blokkId => $blokkNev) {
+ $BA = $BLOKKOK['idk'][$blokkId];
+
+ $kirakjuk = false;
+ // blokk szűrése a tankörök alapján (tehát tárgy és évfolyam alapján)
+ for ($i = 0; $i < count($BA); $i++) {
+ if (in_array($BA[$i], $ADAT['szurtTankorIdk'])) {
+ $kirakjuk = true;
+ break;
+ }
+ }
+
+ if ($kirakjuk) {
+
+ echo '<tr><td>';
+
+ formBegin(array('class'=>'csoport'));
+ echo '<input type="hidden" name="action" value="modTankorBlokk" />'."\n";
+ echo '<input type="hidden" name="blokkId" value="'.$blokkId.'" />'."\n";
+ echo '<input type="hidden" name="tanev" value="'.$ADAT['tanev'].'" />'."\n";
+
+ // Kiválasztott tárgyak és évfolyamok
+ for ($i = 0; $i < count($ADAT['targySzuro']); $i++) echo '<input type="hidden" name="targyId[]" value="'.$ADAT['targySzuro'][$i].'" />'."\n";
+ for ($i = 0; $i < count($ADAT['evfolyamJelSzuro']); $i++) echo '<input type="hidden" name="evfolyamJel[]" value="'.$ADAT['evfolyamJelSzuro'][$i].'" />'."\n";
+ if (is_array($ADAT['osztalySzuro']) && count($ADAT['osztalySzuro']) == 1)
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalySzuro'][0].'" />'."\n";
+
+ echo '<table>';
+
+ echo '<tr>';
+ echo '<th>';
+ echo _BLOKKNEV. ' ('.$blokkId.')';
+ echo '</th>';
+ echo '<th>';
+ echo _TANKOROK. ' (' . count($BA).')';
+ echo '</th>';
+ echo '</tr>'."\n";
+ echo '<tr>';
+ echo '<td>';
+ echo '<input type="text" name="blokkNev" value="'.htmlspecialchars($blokkNev, ENT_QUOTES, "UTF-8").'" /><br />';
+ echo '<label for="exportOraszam'.$blokkId.'">'._EXPORT_ORASZAM.':</label> ';
+ echo '<input size="1" maxlength="4" type="text" name="exportOraszam" id="exportOraszam'.$blokkId.'" value="'.number_format($BLOKKOK['exportOraszam'][$blokkId], 1, '.', ' ').'" /><br />';
+ echo '<input type="submit" value="'._OK.'" />';
+ echo '<input type="submit" name="del" value="'._DEL.'" />';
+ echo '</td>';
+ echo '<td>';
+ echo '<select name="tankorIds[]" multiple="multiple" size="5">';
+ foreach ($BA as $key => $tankorId)
+ echo '<option value="'.$tankorId.'" selected="selected">'
+ .$ADAT['tankorAdat'][$tankorId]['tankorNev'].' ('.$tankorId.') - '
+ .number_format($ADAT['tankorOraszam'][$tankorId],1).' / '.number_format($ADAT['tankorExportOraszam'][$tankorId],1)
+ .' ['.$ADAT['tankorTanar'][$tankorId][0]['tanarNev'].' - ('.$ADAT['tankorTanar'][$tankorId][0]['tanarId'].')]'
+ .'</option>'."\n";
+ foreach ($ADAT['tankorAdat'] as $tankorId => $tankorAdat)
+ if (
+ !in_array($tankorId,$BA)
+ && $ADAT['tankorOraszam'][$tankorId] - $ADAT['tankorExportOraszam'][$tankorId] > 0
+ ) echo '<option value="'.$tankorId.'" >'.$tankorAdat['tankorNev'].' ('.$tankorId.') - '
+ .number_format($ADAT['tankorOraszam'][$tankorId],2).' / '.intval($ADAT['tankorExportOraszam'][$tankorId])
+ .' ['.$ADAT['tankorTanar'][$tankorId][0]['tanarNev'].' - ('.$ADAT['tankorTanar'][$tankorId][0]['tanarId'].')]'
+ .'</option>'."\n";
+ echo '</select>'."\n";
+ echo '</td>';
+ echo '</tr>'."\n";
+
+ echo '</table>';
+ formEnd();
+
+ echo '</td></tr>'."\n";
+ } // if
+ } // foreach
+
+ echo '</table>'."\n";
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/tanev/tankorCsoport.phtml b/mayor-orig/www/skin/classic/module-naplo/html/tanev/tankorCsoport.phtml
new file mode 100644
index 00000000..e6bd23f8
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/tanev/tankorCsoport.phtml
@@ -0,0 +1,122 @@
+<?php
+
+ function putUjTankorCsoport($tankorAdat, $szTankorIds, $osztalyId) {
+
+ formBegin(array('class'=>'csoport'));
+ echo '<input type="hidden" name="action" value="ujTankorCsoport" />'."\n";
+ echo '<input type="hidden" name="osztalyId" value="'.$osztalyId.'" />'."\n";
+
+ echo '<table>';
+
+ echo '<tr>';
+ echo '<th colspan="2">';
+ echo _UJ_TANKOR_CSOPORT;
+ echo '</th>';
+ echo '</tr>'."\n";
+
+ echo '<tr>';
+ echo '<th>';
+ echo _CSOPORTNEV;
+ echo '</th>';
+ echo '<th>';
+ echo _TANKOROK;
+ echo '</th>';
+ echo '</tr>'."\n";
+
+ echo '<tr>';
+ echo '<td>';
+ echo '<input type="text" name="csoportNev" value="" /><br />';
+ echo '<input type="submit" value="'._OK.'" />'; echo '</td>';
+ echo '<td>';
+ echo '<select name="tankorId[]" multiple="multiple" size="5">';
+ foreach ($szTankorIds as $key => $tankorId)
+ echo '<option value="'.$tankorId.'">'.$tankorAdat[$tankorId]['tankorNev'].' ('.$tankorId.')</option>'."\n";
+ echo '</select>'."\n";
+ echo '</td>';
+ echo '</tr>'."\n";
+
+ echo '</table>';
+ formEnd();
+
+ }
+
+ function putCsoportok($Csoportok, $tankorAdat, $szTankorIds, $osztalyId) {
+
+ echo '<table class="modosit">';
+
+ echo '<tr>';
+ echo '<th>';
+ echo _TANKOR_CSOPORT_MODOSITAS;
+ echo '</th>';
+ echo '</tr>'."\n";
+
+
+ foreach ($Csoportok as $csoportId => $csoportAdat) {
+ echo '<tr><td>';
+
+ formBegin(array('class'=>'csoport'));
+ echo '<input type="hidden" name="action" value="tankorCsoportModositas" />'."\n";
+ echo '<input type="hidden" name="csoportId" value="'.$csoportId.'" />'."\n";
+ echo '<input type="hidden" name="osztalyId" value="'.$osztalyId.'" />'."\n";
+
+ echo '<table>';
+
+
+ echo '<tr>';
+ echo '<th>';
+ echo _CSOPORTNEV;
+ echo '</th>';
+ echo '<th>';
+ echo '<input type="submit" name="tankorCsoportTorles" class="torol confirm" title="'._BIZTOS_TOROL_E.'" value="'._TOROL.'" />';
+ echo _TANKOROK;
+ echo '</th>';
+ echo '</tr>'."\n";
+
+ echo '<tr>';
+ echo '<td>';
+ echo '<input type="text" name="csoportNev" value="'.$csoportAdat['csoportNev'].'" /><br />';
+ echo '<input type="submit" value="'._OK.'" /><br />';
+ echo '</td>';
+ echo '<td>';
+ echo '<select name="tankorId[]" multiple="multiple" size="5">';
+ foreach ($csoportAdat['tankorok'] as $key => $tankorId)
+ echo '<option value="'.$tankorId.'" selected="selected">'.$tankorAdat[$tankorId]['tankorNev'].' ('.$tankorId.')</option>'."\n";
+ foreach ($szTankorIds as $key => $tankorId)
+ echo '<option value="'.$tankorId.'">'.$tankorAdat[$tankorId]['tankorNev'].' ('.$tankorId.')</option>'."\n";
+ echo '</select>'."\n";
+ echo '</td>';
+ echo '</tr>'."\n";
+
+ echo '</table>';
+ formEnd();
+
+ echo '</td></tr>'."\n";
+ }
+
+ echo '</table>'."\n";
+
+ }
+
+ function putTankorCsoportKereso($osztalyId) {
+
+ formBegin(array('class'=>'csoportKereses'));
+
+ echo '<input type="hidden" name="action" value="tankorCsoportokKeresese" />'."\n";
+ echo '<input type="hidden" name="osztalyId" value="'.$osztalyId.'" />'."\n";
+
+ echo '<table>'."\n";
+ echo '<tr>';
+ echo '<th>'._TANKORCSOPORTOK_KERESESE.'</th>';
+ echo '</tr>'."\n";
+ echo '<tr>'."\n";
+ echo '<td>';
+ echo '<input type="submit" value="'._OK.'" />';
+ echo '</td>';
+ echo '</tr>'."\n";
+ echo '</table>'."\n";
+
+ formEnd();
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/tanev/targyBontas.phtml b/mayor-orig/www/skin/classic/module-naplo/html/tanev/targyBontas.phtml
new file mode 100644
index 00000000..07f83e8a
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/tanev/targyBontas.phtml
@@ -0,0 +1,296 @@
+<?php
+
+ function putTargyBontasInit() {
+
+ formBegin(array('id'=>'targyBontasInit'));
+ echo '<input type="hidden" name="action" value="targyBontasInit" />'."\n";
+ echo '<input type="submit" name="btn" value="'._INICIALIZALAS.'" />'."\n";
+ formEnd();
+ }
+
+ function putFilter($ADAT) {
+
+ formBegin(array('id'=>'szures'));
+ echo '<input type="hidden" name="telephelyId" value="'.$ADAT['telephelyId'].'" />'."\n";
+// echo '<input type="hidden" name="evfolyamJel" value="'.$ADAT['evfolyamJel'].'" />'."\n";
+ echo '<input type="hidden" name="action" value="szures" />'."\n";
+
+/*
+ echo '<div id="evfolyamJel">Évfolyam: ';
+ foreach ($ADAT['evfolyamJelek'] as $ej) {
+ $evfolyamJel = $ej['evfolyamJel'];
+ if ($ADAT['evfolyamJel']==$evfolyamJel) {
+ $CHK = ' checked="checked" '; $extraClass = ' checked';
+ $extraStyle = '';
+ } else {
+ $CHK = $extraClass = '';
+ if ($ADAT['evfolyamJel'] != '') $extraStyle = ' style="width: 0px; min-width: 0px;" ';
+ }
+ echo '<div class="evfolyamJel'.$extraClass.'"'.$extraStyle.'>';
+ echo '<input type="radio" name="evfolyamJel" value="'.$evfolyamJel.'" id="ej-'.$evfolyamJel.'" style="display: none;"'.$CHK.'/>';
+ //echo '<label for="ej-'.$evfolyamJel.'">'.$evfolyamJel.'</label>';
+ echo $evfolyamJel;
+ echo '</div>';
+ }
+ echo '</div>';
+*/
+
+ echo '<input id="filterOk" type="submit" value="'._OK.'" />'."\n";
+ echo '<div id="osztaly">';
+ $evfolyamJel = '';
+ foreach ($ADAT['filter']['osztalyAdat'] as $oAdat) {
+ $oCHK = (in_array($oAdat['osztalyId'], $ADAT['osztalyIds']))?' checked="checked" ':'';
+ if ($evfolyamJel != $oAdat['evfolyamJel']) {
+ if ($evfolyamJel!='') echo '</div>';
+ $evfolyamJel = $oAdat['evfolyamJel'];
+ // új évfolyamjel - új sor
+ if ($ADAT['evfolyamJel']==$evfolyamJel) {
+ $eCHK = ' checked="checked" '; $extraClass = ' checked'; $extraStyle = '';
+ } else {
+ $eCHK = $extraClass = '';
+ if ($ADAT['evfolyamJel'] != '') $extraStyle = ' style="display: none;" ';
+ }
+ echo '<div class="osztEvf" id="osztEvf-'.str_replace('/','-',$evfolyamJel).'"'.$extraStyle.'>';
+ echo '<div class="evfolyamJel'.$extraClass.'">';
+ echo '<input type="radio" name="evfolyamJel" value="'.$evfolyamJel.'" id="ej-'.str_replace('/','-',$evfolyamJel).'" style="display: none;"'.$eCHK.'/>';
+ echo $evfolyamJel;
+ echo '</div>';
+ }
+ if ($oCHK=='') $class='selectOsztaly';
+ else $class='selectOsztaly checked';
+ if ($oAdat['bontasOk']) $class .= ' bontasOk';
+ echo '<span class="'.$class.'">';
+ echo '<input type="checkbox" name="osztalyIds[]" value="'.$oAdat['osztalyId'].'" id="osztaly-'.$oAdat['osztalyId'].'" style="display: none;"'.$oCHK.'/>';
+ echo $oAdat['osztalyJel'].' ('.$oAdat['osztalyfonokNev'].')'."\n";
+ echo '</span>';
+ }
+ echo '</div>';
+ echo '</div>';
+
+ echo '<div id="kepzes">';
+ foreach ($ADAT['filter']['kepzesAdat'] as $kepzesId => $kAdat) {
+ $oClass='kSelect';
+ foreach ($kAdat as $oAdat) $oClass .= ' ko-'.$oAdat['osztalyId'];
+ $CHK = (in_array($kepzesId, $ADAT['kepzesIds']))?' checked="checked" ':'';
+ if ($CHK=='') echo '<div class="'.$oClass.'" data-db="0" style="display: none;">';
+ else echo '<div class="'.$oClass.'" data-db="0">';
+ echo '<input type="checkbox" name="kepzesIds[]" value="'.$kepzesId.'" id="kepzes-'.$kepzesId.'"'.$CHK.'/>'."\n";
+ echo '<label for="kepzes-'.$kepzesId.'">'.$kAdat[0]['kepzesNev'].' '.$kAdat[0]['tanev'].' ('.$kepzesId.')</label>';
+ echo '</div>';
+ }
+ echo '</div>';
+ formEnd();
+ }
+
+ function putTargyBontas($ADAT) {
+
+ formBegin(array('id'=>'bontasForm'));
+
+ echo '<input type="hidden" name="action" value="bontas" />'."\n";
+ echo '<input type="hidden" name="telephelyId" value="'.$ADAT['telephelyId'].'" />'."\n";
+ echo '<input type="hidden" name="evfolyamJel" value="'.$ADAT['evfolyamJel'].'" />'."\n";
+ foreach ($ADAT['osztalyIds'] as $osztalyId) echo '<input type="hidden" name="osztalyIds[]" value="'.$osztalyId.'" />'."\n";
+ foreach ($ADAT['kepzesIds'] as $kepzesId) echo '<input type="hidden" name="kepzesIds[]" value="'.$kepzesId.'" />'."\n";
+
+ echo '<div id="targyak" tabindex="1">';
+ echo '<div id="targyakUp" tabindex="1"><span class="icon-chevron-up"></span></div>';
+ echo '<div id="targyakDown"><span class="icon-chevron-down"></span></div>';
+ echo '<h1><span class="icon-remove-circle"></span>Tárgyak</h1>';
+ echo '<ul id="targyakUl">';
+ foreach ($ADAT['targyAdat'] as $targyId => $tAdat) {
+ echo '<li class="selectTargy" id="targy-'.$targyId.'" data-targyid="'.$targyId.'" data-targynev="'.$tAdat['targyNev'].'" data-targyjelleg="'.$tAdat['targyJelleg'].'">';
+ echo $tAdat['targyNev'].' ('.$targyId.')';
+ echo '</li>';
+ }
+ echo '</ul>';
+ echo '</div>';
+
+ echo '<table class="bontas">';
+
+ $stat = array('ko' => 0, 'bontas' => 0, 'koKesz' => 0, 'bontasKesz' => 0);
+ foreach ($ADAT['oraterv'] as $targyTipus => $tipusAdat) {
+ foreach ($tipusAdat as $targyId => $targyAdat) {
+ foreach ($targyAdat as $hetiOraszam => $oraszamAdat) {
+ foreach($oraszamAdat as $btStr => $btAdat) {
+ $tbodyId = str_replace('.','p', $targyTipus[0].'-'.intval($targyId).'-'.$hetiOraszam.'-'.$btStr);
+ echo '<tbody id="'.$tbodyId.'">';
+ $elsoSor = true; $sorDb = count($btAdat);
+ foreach ($btAdat as $rAdat) {
+$stat['ko']++;
+ $trId = 'tr-'.$rAdat['osztalyId'].'-'.$rAdat['kepzesOratervId'];
+ $targyTipusE = ($targyTipus!='mintatantervi');
+
+ // kész van-e minden bontás-tankör hozzárendelés ebben a sorban?
+ $bontasArray = $ADAT['osztalyTargyBontas'][ $rAdat['osztalyId'] ][ $rAdat['kepzesOratervId'] ];
+ if (is_array($bontasArray)) {
+ $mindenBontasOk = true;
+ foreach ($bontasArray as $bontas) {
+ $stat['bontas']++;
+ if ($hetiOraszam-$bontas['hetiOraszam']==0) $stat['bontasKesz']++;
+ else $mindenBontasOk = false;
+ }
+ } else $mindenBontasOk = false;
+
+ echo '<tr '.($mindenBontasOk?'class="kesz" ':'').'id="'.$trId.'"
+ data-db="0"
+ data-hetiOraszam="'.$hetiOraszam.'"
+ data-keys="'.$rAdat['osztalyId'].'-'.$rAdat['kepzesOratervId'].'"
+ data-key="'.$rAdat['osztalyId'].'-'.$rAdat['kepzesOratervId'].'">';
+ echo '<td class="slide">'.(!$elsoSor?'<span class="slideUp icon-chevron-up"></span>':'<span class="slideUpAll icon-caret-up"></span>').'</td>';
+
+ echo ($targyTipusE?'<th class="targyTipus">'.$targyTipus:'<th>'.$rAdat['targyNev'].' ('.$targyId.')').'</th>';
+ echo '<td>'.$hetiOraszam.'</td>';
+ echo '<td>'.$ADAT['osztalyAdat'][ $rAdat['osztalyId'] ]['osztalyJel'].' '
+ .$ADAT['kepzesAdat'][ $rAdat['kepzesId'] ]['kepzesNev']
+ .'<span class="felev'.$rAdat['szemeszter'].'">'.$rAdat['szemeszter'].'. félév</span>'
+ .'</td>';
+ echo '<td id="bTd-'.$rAdat['osztalyId'].'-'.$rAdat['kepzesOratervId'].'">';
+ $db = 0;
+ if (is_array($bontasArray)) foreach ($bontasArray as $bontas) {
+
+ if ($hetiOraszam-$bontas['hetiOraszam']==0) $class=" ok";
+ elseif ($hetiOraszam-$bontas['hetiOraszam']<0) $class=" fail";
+ else $class='';
+ echo '<div class="bontas'.$class.'" id="bontas-'.$bontas['bontasId'].'"
+ data-tankororaszam=\''.(is_array($bontas['tankor-oraszam'])?json_encode($bontas['tankor-oraszam']):'[]').'\'
+ data-hetioraszam="'.floatval($bontas['hetiOraszam']).'"
+ data-targyid="'.$bontas['targyId'].'"
+ data-keys="'.$bontas['bontasId'].'"
+ data-key="'.$bontas['bontasId'].'">';
+ echo '<span class="bontasDb">'.(++$db).'</span>. '.$ADAT['targyAdat'][ $bontas['targyId'] ]['targyNev'].' csoport ('.$bontas['bontasId'].')';
+ echo '<span class="delBontas icon-remove-circle"></span>';
+ echo '<ul class="tankor-oraszam">';
+ if (is_array($bontas['tankor-oraszam'])) foreach ($bontas['tankor-oraszam'] as $toAdat) {
+ echo '<li class="tankorAdat" data-tankorid="'.$toAdat['tankorId'].'">['.floatval($toAdat['hetiOraszam']).'] '.$ADAT['tankorAdat'][ $toAdat['tankorId'] ]['tankorNevTargyNelkul'].' ('.$toAdat['tankorId'].')</li>';
+ }
+ echo '<li class="marad">'.($hetiOraszam-$bontas['hetiOraszam']).'</li>';
+ echo '</ul>';
+ echo '</div>';
+
+ }
+ echo '</td>';
+ echo '<td><span class="'.($targyTipusE?'addBontasTargy':'addBontas').' icon-plus" style="paddding: 20px;"></span></td>';
+//echo '<td>';
+//dump($bontasArray);
+//echo (++$sor).'. ';
+//echo $btStr.' ('.$rAdat['kepzesOratervId'].')';
+//echo '<br/>'.$tbodyId.' - '.$trId;
+//echo '</td>';
+ echo '</tr>';
+ if ($mindenBontasOk) $stat['koKesz']++;
+ $elsoSor = false;
+ }
+ echo '</tbody>';
+ }
+ }
+ }
+ }
+
+
+ echo '</table>';
+
+
+ echo '<div id="stat">';
+ echo '<table>';
+ echo '<tr>';
+ echo '<td id="oratervenKivuli" title="Óratervtől eltérő tankörök száma (Nem frissül, csak az oldal újratöltésekor!)">';
+ echo count($ADAT['oratervenKivuliTankorok']).'<span class="icon-arrow-down"></span>';
+ echo '<ul>';
+ foreach ($ADAT['oratervenKivuliTankorok'] as $idx => $okAdat) {
+ if ($idx<30) {
+ echo '<li>';
+ echo $okAdat['tankorNev'].' ('.$okAdat['tankorId'].') <span class="diff">['.(is_null($okAdat['diff'])?'-':$okAdat['diff']).']</span>';
+ echo '</li>';
+ }
+ }
+ if ($idx >= 30) echo '<li>...</li>';
+ echo '</ul>';
+ echo '</td>';
+
+ echo '<td title="Óratervi bejegyzés">';
+ echo '<span id="statKoKesz">'.$stat['koKesz'].'</span>/<span id="statKo">'.$stat['ko'].'</span>';
+ echo '</td>';
+
+ echo '<td title="Felvett bontás">';
+ echo '<span id="statBontasKesz">'.$stat['bontasKesz'].'</span>/<span id="statBontas">'.$stat['bontas'].'</span>';
+ echo '</td>';
+
+ echo '<td title="Kész rekordok elrejtése">';
+ echo '<input type="checkbox" id="keszRejt" value="" />';
+ echo '</td>';
+
+ echo '</tr>';
+
+
+
+
+/*
+ echo '<tr><th id="oratervenKivuli">Óratervtől eltérő tankörök száma:';
+ echo '<ul>';
+ foreach ($ADAT['oratervenKivuliTankorok'] as $idx => $okAdat) {
+ if ($idx<30) {
+ echo '<li>';
+ echo $okAdat['tankorNev'].' ('.$okAdat['tankorId'].') <span class="diff">['.(is_null($okAdat['diff'])?'-':$okAdat['diff']).']</span>';
+ echo '</li>';
+ }
+ }
+ if ($idx >= 30) echo '<li>...</li>';
+ echo '</ul>';
+ echo '</th><td>'.count($ADAT['oratervenKivuliTankorok']).'<br/>(nem frissül)</td></tr>';
+ echo '<tr><th>Óratervi bejegyzés:</th><td><span id="statKoKesz">'.$stat['koKesz'].'</span>/<span id="statKo">'.$stat['ko'].'</span></td></tr>';
+ echo '<tr><th>Felvett bontás:</th><td><span id="statBontasKesz">'.$stat['bontasKesz'].'</span>/<span id="statBontas">'.$stat['bontas'].'</span></td></tr>';
+ echo '<tr><td colspan="2"><input type="checkbox" id="keszRejt" value="" />';
+ echo '<label for="keszRejt">Kész rekordok elrejtése</label></td></tr>';
+*/
+ echo '</table>';
+ echo '</div>';
+
+
+
+
+
+
+
+
+
+/*
+ echo '<span style="color:red;" class="icon-remove-circle"></span> ';
+ echo '<span style="color:red;" class="icon-plus-sign"></span> ';
+ echo '<span style="color:red;" class="icon-minus-sign"></span> ';
+ echo '<span style="color:red;" class="icon-error"></span> ';
+ echo '<br />';
+ echo '<span style="color:red;" class="icon-plus"></span> ';
+ echo '<span style="color:red;" class="icon-minus"></span> ';
+ echo '<span style="color:red;" class="icon-remove"></span> ';
+ echo '<br />';
+ echo '<span style="color:red;" class="icon-resize-vertical"></span> ';
+ echo '<span style="color:red;" class="icon-resize-full"></span> ';
+ echo '<span style="color:red;" class="icon-resize-small"></span> ';
+ echo '<br />';
+ echo '<span style="color:red;" class="icon-arrow-up"></span> ';
+ echo '<span style="color:red;" class="icon-arrow-down"></span> ';
+ echo '<br />';
+ echo '<span style="color:red;" class="icon-chevron-up"></span> ';
+ echo '<span style="color:red;" class="icon-chevron-down"></span> ';
+ echo '<br />';
+ echo '<span style="color:red;" class="icon-circle-arrow-up"></span> ';
+ echo '<span style="color:red;" class="icon-circle-arrow-down"></span> ';
+ echo '<br />';
+ echo '<span style="color:red;" class="icon-caret-up"></span> ';
+ echo '<span style="color:red;" class="icon-caret-down"></span> ';
+ echo '<br />';
+
+ echo '<span style="color:red;" class="icon-cog"></span> ';
+ echo '<span style="color:red;" class="icon-fork"></span> ';
+ echo '<span style="color:red;" class="icon-return-key"></span> ';
+ echo '<span style="color:red;" class="icon-stop"></span> ';
+ echo '<span style="color:red;" class="icon-move"></span> ';
+ echo '<br />';
+*/
+
+ formEnd();
+
+ }
+
+
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/tanev/targyOraszam.phtml b/mayor-orig/www/skin/classic/module-naplo/html/tanev/targyOraszam.phtml
new file mode 100644
index 00000000..5f3027e2
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/tanev/targyOraszam.phtml
@@ -0,0 +1,25 @@
+<?php
+
+ function putTargyOraszam($ADAT) {
+
+ echo '<table align="center" class="targyOraszam">';
+ echo '<tr><th>'._TARGY.'</th><th>'._ORASZAM.'</th></tr>'."\n";
+ foreach($ADAT['targyOraszam'] as $targyNev => $_D) {
+
+ $sum += $_D['db'];
+
+ echo '<tr>';
+ echo '<td>';
+ echo $targyNev;
+ echo '</td><td class="oraszam">';
+ echo round($_D['db'],2);
+ echo '</td>';
+ echo '</tr>';
+ echo '</tr>'."\n";
+ }
+ echo '<tr><th colspan="2">'.$sum.'</th></tr>'."\n";
+ echo '</table>';
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/tanev/vegzosOrarendLezaras.phtml b/mayor-orig/www/skin/classic/module-naplo/html/tanev/vegzosOrarendLezaras.phtml
new file mode 100644
index 00000000..d4940066
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/tanev/vegzosOrarendLezaras.phtml
@@ -0,0 +1,32 @@
+<?php
+
+ function putLezarandoOsztalyValaszto($ADAT) {
+
+ formBegin(array('class'=>'vegzos'));
+ echo '<input type="hidden" name="action" value="orarendLezaras" />'."\n";
+ echo '<input type="hidden" name="dt" value="'.$ADAT['dt'].'" />'."\n";
+
+ echo '<h1>'._LEZARANDO_OSZTALYOK_KIVALASZTASA.'</h1>';
+ echo '<ul>'."\n";
+ for ($i = 0; $i < count($ADAT['osztalyok']); $i++) {
+
+ if ($ADAT['osztalyok'][$i]['vegzoTanev'] == __TANEV) {
+ if (in_array($ADAT['osztalyok'][$i]['osztalyId'], $ADAT['lezarandoOsztaly'])) $CHK = ' checked="checked" ';
+ else $CHK = '';
+ echo '<li>';
+ echo '<input id="chk'.$i.'" type="checkbox" name="lezarandoOsztaly[]" value="'.$ADAT['osztalyok'][$i]['osztalyId'].'" '.$CHK.'/>'."\n";
+ echo '<label for="chk'.$i.'">';
+ echo $ADAT['osztalyok'][$i]['osztalyJel'];
+ echo '</label>';
+ echo '</li>'."\n";
+ }
+
+ }
+ echo '</ul>'."\n";
+ echo '<input type="submit" value="'._OK.'" />'."\n";
+ formEnd();
+
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/tanev/vegzosTankorLezaras.phtml b/mayor-orig/www/skin/classic/module-naplo/html/tanev/vegzosTankorLezaras.phtml
new file mode 100644
index 00000000..2e9138bb
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/tanev/vegzosTankorLezaras.phtml
@@ -0,0 +1,36 @@
+<?php
+
+ function putLezarandoOsztalyValaszto($ADAT) {
+
+ formBegin(array('class'=>'vegzos'));
+
+ echo '<input type="hidden" name="action" value="lezaras" />'."\n";
+
+ echo '<h2>'.$ADAT['tanev'].'</h2>';
+ echo '<ul>'."\n";
+ for ($i = 0; $i < count($ADAT['osztalyok']); $i++) {
+
+ if ($ADAT['osztalyok'][$i]['vegzoTanev'] == __TANEV && $ADAT['osztalyok'][$i]['kezdoTanev']<=__TANEV) {
+ if (in_array($ADAT['osztalyok'][$i]['osztalyId'], $ADAT['lezarandoOsztaly'])) $CHK = ' checked="checked" ';
+ else $CHK = '';
+ echo '<li>';
+ echo '<input id="chk'.$i.'" type="checkbox" name="lezarandoOsztaly[]" value="'.$ADAT['osztalyok'][$i]['osztalyId'].'" '.$CHK.'/>'."\n";
+ echo '<label for="chk'.$i.'">';
+ echo $ADAT['osztalyok'][$i]['osztalyJel'];
+ echo ' - '.($ADAT['osztalyok'][$i]['leiras']);
+ echo ' - '.($ADAT['osztalyok'][$i]['osztalyfonok']['tanarNev']);
+ echo '</label>';
+ echo '</li>'."\n";
+ }
+
+ }
+ echo '</ul>'."\n";
+ echo '<input type="text" readonly="readonly" name="dt" value="'.$ADAT['dt'].'" />'."\n";
+
+ echo '<input type="submit" value="'._OK.'" />'."\n";
+
+ formEnd();
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/tanmenet/tanmenetInfo.phtml b/mayor-orig/www/skin/classic/module-naplo/html/tanmenet/tanmenetInfo.phtml
new file mode 100644
index 00000000..31cb5450
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/tanmenet/tanmenetInfo.phtml
@@ -0,0 +1,67 @@
+<?php
+
+ function putTanmenetInfo($ADAT) {
+
+ global $skin;
+
+ echo '<fieldset class="alapadatok"><legend>'._ALAPADATOK.'</legend>'."\n";
+ if ($skin != 'ajax')
+ formBegin(array('class'=>'tanmenet'));
+
+ echo '<input type="hidden" name="tanmenetId" id="informTanmenetId" value="'.$ADAT['tanmenetId'].'" />'."\n";
+
+ echo '<p><span>'.$ADAT['tanmenetAdat']['evfolyamJel'].'.</span> '._EVFOLYAMJEL.' - <span>'
+ .$ADAT['tanmenetAdat']['targyNev'].'</span> - <span>'
+ .$ADAT['tanmenetAdat']['oraszam'].'</span> '._TANORA.'</p>'."\n";
+
+ echo '<p>'._TANMENETNEV.': <span>'.$ADAT['tanmenetAdat']['tanmenetNev'].'</span></p>'."\n";
+
+ echo '<p>'._KESZITETTE.': <span>'.$ADAT['tanmenetAdat']['tanarNev'].'</span> - '.'<span>'.dateToString($ADAT['tanmenetAdat']['dt']).'</span></p>'."\n";
+
+ echo '<p>'._ALLAPOT.': <span>'.$ADAT['tanmenetAdat']['statusz'].'</span></p>';
+
+ echo '</fieldset>'."\n";
+
+ /* -------------------------------- */
+ echo '<fieldset class="alapadatokfieldset '.ekezettelen($ADAT['tanmenetAdat']['statusz']).'"><legend><a href="'.href('index.php?page=naplo&sub=tanmenet&f=tanmenetTankor&tanarId='.$ADAT['tanarId'].'&targyId='.$ADAT['targyId']).'">'._HOZZARENDELT_TANKOROK.'</a></legend>';
+ echo __TANEV.':';
+ echo '<ul>'."\n";
+ for ($i = 0; $i < count($ADAT['tanmenetAdat']['tankor']); $i++) {
+ echo '<li><span class="tankorAdat" data-tankorid="'.$ADAT['tanmenetAdat']['tankor'][$i]['tankorId'].'">'
+ .$ADAT['tanmenetAdat']['tankor'][$i]['tankorNev'].' ('.$ADAT['tanmenetAdat']['tankor'][$i]['tankorId'].')</span></li>'."\n";
+ }
+ echo '</ul>'."\n";
+ if (count($ADAT['tanmenetAdat']['tankorNemAktualis'])>0) {
+ echo _MAS_TANEV.':';
+ echo '<ul>'."\n";
+ for ($i = 0; $i < count($ADAT['tanmenetAdat']['tankorNemAktualis']); $i++) {
+ echo '<li><span class="tankorAdat" data-tankorid="'.$ADAT['tanmenetAdat']['tankorNemAktualis'][$i]['tankorId'].'">'
+ .$ADAT['tanmenetAdat']['tankorNemAktualis'][$i]['tankorNev'].' ('.$ADAT['tanmenetAdat']['tankorNemAktualis'][$i]['tankorId'].')</span></li>'."\n";
+ }
+ echo '</ul>'."\n";
+ }
+ echo '</fieldset>'."\n";
+
+ /* -------------------------------- */
+
+
+ echo '<fieldset class="tema"><legend>'._TEMAKOROK.'</legend>'."\n";
+ $oraszam = 0;
+ echo '<ul id="temakor">'."\n";
+ for ($i = 0; $i < count($ADAT['tanmenetAdat']['temakor']); $i++) {
+ echo '<li>';
+ echo '<span class="oraszam">'.($oraszam+1).'-'.($oraszam = $oraszam + $ADAT['tanmenetAdat']['temakor'][$i]['oraszam']);
+ echo '. '._TANORA.': ';
+ echo '</span>';
+ echo '<div class="megnevezes">'.nl2br(htmlspecialchars($ADAT['tanmenetAdat']['temakor'][$i]['temakorMegnevezes'])).'</div>'."\n";
+ echo '</li>'."\n";
+ }
+ echo '</ul>';
+ echo '</fieldset>'."\n";
+
+ if ($skin != 'ajax') formEnd();
+
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/tanmenet/tanmenetJovahagyas.phtml b/mayor-orig/www/skin/classic/module-naplo/html/tanmenet/tanmenetJovahagyas.phtml
new file mode 100644
index 00000000..8670839a
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/tanmenet/tanmenetJovahagyas.phtml
@@ -0,0 +1,61 @@
+<?php
+
+ function _tanarNev($x) {
+ for ($i=0; $i<count($x); $i++) {
+ $T[] = '<span class="tanarNev" data-tanarId="'.$x[$i]['tanarId'].'">'.$x[$i]['tanarNev'].'</span>';
+ }
+ return implode(', ',$T);
+ }
+
+ function putTanmenetJovahagyas($ADAT) {
+
+ if (!is_array($ADAT['tankorok'])) return false;
+ echo '<table id="tanmenet">';
+ foreach ($ADAT['tankorok'] as $tkAdat) {
+
+ $tankorId = $tkAdat['tankorId'];
+ $tanmenetId = $ADAT['tankorTanmenet'][$tankorId];
+ $tmAdat = $ADAT['tanmenetAdat'][$tanmenetId];
+ $tmLeiras = ($tanmenetId == '')?'':($tmAdat['tanmenetNev'].' - ('.$tanmenetId.') - '.$ADAT['tanarok'][$tmAdat['tanarId']]['tanarNev']);
+ $class = ekezettelen($tmAdat['statusz']);
+ $href=href("index.php?page=naplo&sub=tanmenet&f=tanmenetInfo&tanmenetId=".$tanmenetId);
+
+ echo '<tr class="'.$class.'">';
+ echo '<th class="tankorAdat" data-tankorid="'.$tankorId.'">'.$tkAdat['tankorNev'].' ('.$tkAdat['tankorId'].')</th>';
+ echo '<td>'._tanarNev($tkAdat['tanarok']).'</td>';
+ echo '<td>';
+ if ($tanmenetId != '') echo '<a class="onClickUpdateWindow" title="tanmenet részletei..." href="'.$href.'">'.$tmLeiras.'</a>';
+ echo '</td>';
+
+ echo '<td>';
+ if ($tanmenetId != '') {
+ if (__JOVAHAGYHAT) {
+ formBegin(array('class'=>'tanmenet'));
+ echo '<input type="hidden" name="action" value="tanmenetModositas" />';
+ echo '<input type="hidden" name="mkId" value="'.$ADAT['mkId'].'" />';
+ echo '<input type="hidden" name="tanarId" value="'.$ADAT['tanarId'].'" />';
+ echo '<input type="hidden" name="osztalyId" value="'.$ADAT['osztalyId'].'" />';
+ echo '<input type="hidden" name="tanmenetId" value="'.$tanmenetId.'" />';
+ foreach (array('új','kész','jóváhagyott','publikus') as $statusz) {
+ $CHK = ($statusz == $tmAdat['statusz'])?' checked="checked" ':'';
+ echo '<input type="radio" name="statusz" value="'. $statusz.'"'.$CHK.' id="'.$tankorId.$statusz.'" />';
+ echo '<label for="'.$tankorId.$statusz.'">'.$statusz.'</label>';
+ }
+ echo '<input type="submit" value="'._OK.'" />';
+ formEnd();
+ } else {
+ echo $tmAdat['statusz'];
+ }
+ }
+ echo '</td>';
+
+
+ echo '</tr>';
+
+ }
+ echo '</table>';
+
+
+ }
+
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/tanmenet/tanmenetLeadas.phtml b/mayor-orig/www/skin/classic/module-naplo/html/tanmenet/tanmenetLeadas.phtml
new file mode 100644
index 00000000..d862b093
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/tanmenet/tanmenetLeadas.phtml
@@ -0,0 +1,38 @@
+<?php
+
+ function putTanmenetLeadas($ADAT) {
+
+ echo '<table class="tanmenet">'."\n";
+
+ echo '<tr>';
+ echo '<th rowspan="2">'._TANAR.'</th>';
+ echo '<th>'._JOVAHAGYOTT.'</th>'."\n";
+ echo '<th>'._NEM_JOVAHAGYOTT.'</th>'."\n";
+ echo '<th>'._FELKESZ.'</th>'."\n";
+ echo '<th>'._HIANYZO.'</th>'."\n";
+ echo '</tr>'."\n";
+ echo '<tr>';
+ echo '<th colspan="4">'._TANMENET.'</th>';
+ echo '</tr>'."\n";
+
+ for ($i = 0; $i < count($ADAT['tanarok']); $i++) {
+ echo '<tr>';
+
+ echo '<th class="tanarNev">';
+ echo '<a href="'.href('index.php?page=naplo&sub=tanmenet&f=tanmenetTankor&tanarId='.$ADAT['tanarok'][$i]['tanarId']).'">';
+ echo $ADAT['tanarok'][$i]['tanarNev'];
+ echo '</a>';
+ echo '</th>'."\n";
+ echo '<td'.(($ADAT['tanarok'][$i]['db']['jóváhagyott'] == 0)?'':' class="jovahagyott"').'>'.$ADAT['tanarok'][$i]['db']['jóváhagyott'].'</td>';
+ echo '<td'.(($ADAT['tanarok'][$i]['db']['kész'] == 0)?'':' class="nincsJovahagyva"').'>'.$ADAT['tanarok'][$i]['db']['kész'].'</td>';
+ echo '<td'.(($ADAT['tanarok'][$i]['db']['új'] == 0)?'':' class="felkesz"').'>'.$ADAT['tanarok'][$i]['db']['új'].'</td>';
+ echo '<td'.(($ADAT['tanarok'][$i]['db']['hiányzik'] == 0)?'':' class="hianyzik"').'>'.$ADAT['tanarok'][$i]['db']['hiányzik'].'</td>';
+
+ echo '</tr>'."\n";
+ }
+
+ echo '</table>'."\n";
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/tanmenet/tanmenetModositas.phtml b/mayor-orig/www/skin/classic/module-naplo/html/tanmenet/tanmenetModositas.phtml
new file mode 100644
index 00000000..628562b3
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/tanmenet/tanmenetModositas.phtml
@@ -0,0 +1,136 @@
+<?php
+
+ function putTanmenetModositasForm($ADAT) {
+
+ echo '<fieldset class="alapadatokfieldset '.ekezettelen($ADAT['tanmenetAdat']['statusz']).'"><legend>'._ALAPADATOK.'</legend>'."\n";
+ formBegin(array('class'=>'alapadatok'));
+ echo '<input type="hidden" name="action" value="tanmenetAdatModositas" />'."\n";
+ echo '<input type="hidden" name="tanmenetId" value="'.$ADAT['tanmenetId'].'" />'."\n";
+ echo '<input type="hidden" name="tanarId" value="'.$ADAT['tanarId'].'" />'."\n";
+ echo '<input type="hidden" name="targyId" value="'.$ADAT['targyId'].'" />'."\n";
+
+
+ $SEL = array($ADAT['tanmenetAdat']['evfolyamJel'] => ' selected="selected" ');
+ echo '<select name="evfolyamJel" id="evfolyamJel">'."\n";
+ for ($i = 0; $i < count($ADAT['evfolyamJelek']); $i++) {
+ echo '<option value="'.$ADAT['evfolyamJelek'][$i].'"'.$SEL[$ADAT['evfolyamJelek'][$i]].'>'.$ADAT['evfolyamJelek'][$i].'</option>'."\n";
+ }
+ echo '</select> '."\n";
+ echo '<label for="evfolyamJel">'._EVFOLYAMJEL.' </label>';
+
+ echo ' - '.$ADAT['tanmenetAdat']['targyNev'].' - ';
+
+ $SEL = array($ADAT['tanmenetAdat']['oraszam'] => ' selected="selected" ');
+ echo ' <select name="oraszam" id="tanmenetOraszam">'."\n";
+ for ($i = 1; $i < 1001; $i++) {
+ echo '<option value="'.$i.'"'.$SEL[$i].'>'.$i.'</option>'."\n";
+ }
+ echo '</select> '."\n";
+ echo '<label for="tanmenetOraszam">'._TANORA.': </label>';
+ echo '<br />';
+
+ echo '<label for="tanmenetNev">'._TANMENETNEV.': </label>';
+ echo '<input type="text" id="tanmenetNev" value="'.$ADAT['tanmenetAdat']['tanmenetNev'].'" name="tanmenetNev" />'."\n";
+ echo '<br />';
+
+ echo '<label>'._KESZITETTE.': </label>';
+ echo $ADAT['tanmenetAdat']['tanarNev'].' ('.$ADAT['tanmenetAdat']['tanarId'].') - ';
+ echo dateToString($ADAT['tanmenetAdat']['dt']);
+ echo '<br />';
+
+
+
+ echo '<label for="statusz">'._ALLAPOT.'</label> '."\n";
+ if (count($ADAT['statusz']) > 0) {
+ echo '<select name="statusz" id="statusz">';
+ $SEL = array($ADAT['tanmenetAdat']['statusz'] => ' selected="selected" ');
+ foreach ($ADAT['statusz'] as $statusz) {
+ echo '<option value="'.$statusz.'"'.$SEL[$statusz].'>'.$statusz.'</option>';
+ }
+ echo '</select>';
+ } else {
+ echo $ADAT['tanmenetAdat']['statusz'];
+ echo '<input type="hidden" name="statusz" value="'.$ADAT['tanmenetAdat']['statusz'].'" /><br />';
+ }
+ echo '<br />';
+
+ if (__NAPLOADMIN || __KESZITO) {
+ echo '<input type="checkbox" name="tanmenetTorol" value="1" />'._TOROL."\n";
+ }
+ echo '<input type="submit" value="'._OK.'" />'."\n";
+ formEnd();
+ echo '</fieldset>'."\n";
+ /* -------------------------------- */
+ echo '<fieldset class="alapadatokfieldset '.ekezettelen($ADAT['tanmenetAdat']['statusz']).'"><legend><a href="'.href('index.php?page=naplo&sub=tanmenet&f=tanmenetTankor&tanarId='.$ADAT['tanarId'].'&targyId='.$ADAT['targyId']).'">'._HOZZARENDELT_TANKOROK.'</a></legend>'."\n";
+ echo __TANEV.':';
+ echo '<ul>'."\n";
+ for ($i = 0; $i < count($ADAT['tanmenetAdat']['tankor']); $i++) {
+ echo '<li><span class="tankorAdat" data-tankorid="'.$ADAT['tanmenetAdat']['tankor'][$i]['tankorId'].'">'
+ .$ADAT['tanmenetAdat']['tankor'][$i]['tankorNev'].' ('.$ADAT['tanmenetAdat']['tankor'][$i]['tankorId'].')</span></li>'."\n";
+ }
+ echo '</ul>'."\n";
+ if (count($ADAT['tanmenetAdat']['tankorNemAktualis'])>0) {
+ echo _MAS_TANEV.':';
+ echo '<ul>'."\n";
+ for ($i = 0; $i < count($ADAT['tanmenetAdat']['tankorNemAktualis']); $i++) {
+ echo '<li><span class="tankorAdat" data-tankorid="'.$ADAT['tanmenetAdat']['tankorNemAktualis'][$i]['tankorId'].'">'
+ .$ADAT['tanmenetAdat']['tankorNemAktualis'][$i]['tankorNev'].' ('.$ADAT['tanmenetAdat']['tankorNemAktualis'][$i]['tankorId'].')</span></li>'."\n";
+ }
+ echo '</ul>'."\n";
+ }
+ echo '</fieldset>'."\n";
+ /* -------------------------------- */
+
+ $_D = (__MODOSITHAT===true)?'':' disabled="disabled" ';
+ echo '<fieldset class="temakorokfieldset '.ekezettelen($ADAT['tanmenetAdat']['statusz']).'"><legend>'._TEMAKOROK.'</legend>'."\n";
+ $FORM = array('action'=>href('index.php?page=naplo&sub=tanmenet&f=tanmenetModositas'), 'name'=>'tanmenetMod', 'class'=>'tanmenet onChangeRequest');
+ formBegin($FORM);
+
+
+ echo '<input type="hidden" name="action" value="tanmenetTemakorModositas" />'."\n";
+ echo '<input type="hidden" name="tanmenetId" value="'.$ADAT['tanmenetId'].'" />'."\n";
+
+ echo '<ul id="temakor">'."\n";
+ for ($i = 0; $i < count($ADAT['tanmenetAdat']['temakor']); $i++) {
+ echo '<li class="sortable">';
+
+ echo '<span class="handle"><img src="skin/classic/module-naplo/img/tanmenet/updown.png" alt="updown" /></span>'."\n";
+ echo '<img class="close" src="skin/classic/module-naplo/img/tanmenet/close.png" alt="close" />'."\n";
+ echo '<span class="oraszam">&nbsp;&nbsp;</span>';
+
+ $SEL = array($ADAT['tanmenetAdat']['temakor'][$i]['oraszam'] => ' selected="selected" ');
+ echo '<select name="oraszam[]" class="temakorOraszam"'.$_D.'>'."\n";
+ for ($o = 0; $o <= $ADAT['tanmenetAdat']['oraszam']; $o++) echo '<option value="'. $o.'"'.$SEL[$o].'>'.$o.'</option>'."\n";
+ echo '</select>'."\n";
+// echo '<input type="text" name="temakorMegnevezes[]" value="'.$ADAT['tanmenetAdat']['temakor'][$i]['temakorMegnevezes'].'" />'."\n";
+ echo '<textarea name="temakorMegnevezes[]"'.$_D.'>';
+ echo $ADAT['tanmenetAdat']['temakor'][$i]['temakorMegnevezes'];
+ echo '</textarea>';
+ echo '</li>'."\n";
+ }
+ if (__MODOSITHAT===true) {
+ echo '<li>';
+ echo '<span class="handle">&nbsp;&nbsp;</span>';
+ echo '<img class="close" src="skin/classic/module-naplo/img/tanmenet/close.png" alt="close" />'."\n";
+ echo '<span class="oraszam">&nbsp;-&nbsp;</span>';
+
+ echo '<select name="oraszam[]" class="uj">'."\n";
+ for ($o = 0; $o <= $ADAT['tanmenetAdat']['oraszam']; $o++) {
+ echo '<option value="'. $o.'">'.$o.'</option>'."\n";
+ }
+ echo '</select>'."\n";
+// echo '<input type="text" name="temakorMegnevezes[]" value="" class="uj" />'."\n";
+ echo '<textarea name="temakorMegnevezes[]" class="uj"></textarea>';
+ echo '</li>';
+ echo '</ul>';
+
+ echo '<input type="submit" value="'._OK.'" />'."\n";
+ }
+
+ formEnd();
+ echo '</fieldset>'."\n";
+
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/tanmenet/tanmenetTankor.phtml b/mayor-orig/www/skin/classic/module-naplo/html/tanmenet/tanmenetTankor.phtml
new file mode 100644
index 00000000..ea58a28f
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/tanmenet/tanmenetTankor.phtml
@@ -0,0 +1,65 @@
+<?php
+
+ function putTankorLista($ADAT) {
+
+ echo '<div style="display: none;" id="infodiv">
+ <div id="infodivheader"><span id="infodivclose">X</span>'._TANMENET_RESZLETEI.'</div>';
+ formBegin(array('action'=>href('index.php?page=naplo&sub=tanmenet&f=tanmenetInfo'), 'class'=>"onSubmitUpdate", 'id'=>"inform"));
+ echo '<input type="text" name="tanmenetId" id="informTanmenetId" value="" />'."\n";
+ formEnd();
+ echo '</div>'."\n";
+
+ echo '<table class="tanmenet">';
+ echo '<tr>';
+ echo '<th>'._TANKORNEV.'</th>';
+ echo '<th>'._TANMENET.'</th>';
+ echo '</tr>'."\n";
+ foreach ($ADAT['tankorok'] as $key => $tAdat) {
+ $sClass = kisbetus(ekezettelen($ADAT['tanmenetAdat'][ $ADAT['tankorTanmenet'][$tAdat['tankorId']] ]['statusz']));
+ echo '<tr class="'.$sClass.'">';
+ echo '<td class="nev tankorAdat" data-tankorid="'.$tAdat['tankorId'].'">'.$tAdat['tankorNev'].' ('.$tAdat['tankorId'].')'.'</td>'."\n";
+
+ echo '<td class="tanmenet">';
+ formBegin(array('class'=>'tanmenet'));
+ echo '<input type="hidden" name="tanarId" value="'.$ADAT['tanarId'].'" />'."\n";
+ echo '<input type="hidden" name="tankorId" value="'.$tAdat['tankorId'].'" />'."\n";
+ echo '<input type="hidden" name="action" value="hozzarendeles" />'."\n";
+ echo '<select name="tanmenetId" class="onChangeUpdateGomb '.$sClass.'">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ $gomb = 'info'; // módosítható, vagy csak megnézhető a tanmenet?
+ foreach ($ADAT['tanmenetek'][ $tAdat['targyId'] ] as $key => $tanmenetAdat) {
+ $class = kisbetus(ekezettelen($tanmenetAdat['statusz']));
+ if ($ADAT['tankorTanmenet'][$tAdat['tankorId']] == $tanmenetAdat['tanmenetId']) {
+ echo '<option value="'.$tanmenetAdat['tanmenetId'].'" selected="selected" class="'.$class.'">';
+ echo $tanmenetAdat['tanmenetNev'].' - '.$tanmenetAdat['tanarNev'].' ('.$tanmenetAdat['tanmenetId'].') - '.$tanmenetAdat['statusz'];
+ echo '</option>'."\n";
+ if ($tanmenetAdat['modosithato']) $gomb = 'modosit';
+ } else {
+ echo '<option value="'.$tanmenetAdat['tanmenetId'].'" class="'.$class.'">'
+ .$tanmenetAdat['tanmenetNev'].' - '.$tanmenetAdat['tanarNev'].' ('.$tanmenetAdat['tanmenetId'].') - '.$tanmenetAdat['statusz']
+ .'</option>'."\n";
+ }
+ }
+ echo '</select>'."\n";
+ echo '<div class="submitContainer">';
+ echo '<input type="submit" name="info" class="info" value="'._INFO.'" />'."\n";
+ echo '<input type="submit" name="modosit" class="modosit" value="'._MODOSIT.'" />'."\n";
+ if (__MODOSITHAT) {
+ echo '<input type="submit" name="hozzarendeles" value="'._HOZZARENDELES.'" />'."\n";
+ if (__TANAR) {
+ echo '<input type="submit" name="masolas" value="'._UJ_A_KIVALASZTOTT_ALAPJAN.'" />'."\n";
+ echo '<input type="submit" name="uj" value="'._UJ_LETREHOZASA.'" />'."\n";
+ }
+ }
+ echo '</div>';
+ formEnd();
+ echo '</td>';
+
+ echo '</tr>'."\n";
+
+ }
+ echo '</table>'."\n";
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/tanmenet/ujTanmenet.phtml b/mayor-orig/www/skin/classic/module-naplo/html/tanmenet/ujTanmenet.phtml
new file mode 100644
index 00000000..5616edda
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/tanmenet/ujTanmenet.phtml
@@ -0,0 +1,31 @@
+<?php
+
+ function putUjTanevForm($ADAT) {
+
+ echo '<div id="ujTanmenet"><div class="tanmenetHeader">'._UJ_TANMENET.'</div>';
+
+ formBegin(array('class'=>'tanmenet'));
+
+ echo '<input type="hidden" name="action" value="ujTanmenet">'."\n";
+ echo '<input type="hidden" name="tankorId" value="'.$ADAT['tankorId'].'">'."\n";
+ echo '<input type="hidden" name="targyId" value="'.$ADAT['targyId'].'">'."\n";
+ echo '<input type="hidden" name="evfolyamJel" value="'.$ADAT['evfolyamJel'].'">'."\n";
+
+ echo '<label for="tanmenetNev">'._TANMENETNEV.'</label><br />'."\n";
+ echo '<input type="text" name="tanmenetNev" id="tanmenetNev" value="" /><br />'."\n";
+
+ echo '<label for="oraszam">'._EVES_ORASZAM.'</label>'."\n";
+ echo '<select name="oraszam" id="oraszam">'."\n";
+ for ($i=1; $i < 1001; $i++) {
+ echo '<option value="'.$i.'">'.$i.'</option>'."\n";
+ }
+ echo '</select><br />'."\n";
+
+ echo '<input type="submit" value="'._OK.'" />'."\n";
+
+ formEnd();
+ echo '</div>';
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/uzeno/postas.phtml b/mayor-orig/www/skin/classic/module-naplo/html/uzeno/postas.phtml
new file mode 100644
index 00000000..65a45fae
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/uzeno/postas.phtml
@@ -0,0 +1,81 @@
+<?php
+
+ /* mert nem egységes a kapott eredmény */
+ function _convert(&$ADAT) {
+ foreach ( array('tankorSzulo') as $_i => $_t ) {
+ for ($i=0; $i<count($ADAT['r'][$_t]); $i++) {
+ if ($ADAT['r'][$_t][$i]['tankorNev']!='') $ADAT['r'][$_t][$i][$_t.'Nev'] = $ADAT['r'][$_t][$i]['tankorNev'];
+ }
+ }
+ foreach ( array('osztaly','osztalySzulo','osztalyTanar') as $_i => $_t ) {
+ for ($i=0; $i<count($ADAT['r'][$_t]); $i++) {
+ if ($ADAT['r'][$_t][$i][$_t.'Nev']=='')
+ $ADAT['r'][$_t][$i][$_t.'Nev'] = $ADAT['r'][$_t][$i]['osztalyJel'].' '.$ADAT['r'][$_t][$i]['leiras'];
+ }
+ }
+ }
+
+ function putUzenoPostazo($ADAT) {
+
+ _convert($ADAT);
+ $reassoc = array('tankorSzulo'=>'tankor','osztalySzulo'=>'osztaly', 'osztalyTanar'=>'osztaly');
+ $allowedZero = array('diak','szulo','tanar');
+
+ echo '<input type="hidden" name="mayorToken" class="mayorToken" value="'.$_SESSION['mayorToken'].'" />'; // rendhagyó eset, mert az egész tartalmat lecseréli az onLoadUpdate, és a form-tól kezdjük...
+ echo '<input type="hidden" name="kuuk" value="'.$ADAT['kuuk'].'" />';
+ echo '<input type="hidden" name="tanev" value="'.$ADAT['tanev'].'" />';
+ echo '<table class="ujUzenet" align="center">';
+ echo '<tr><th>'._UJ_UZENET;
+ if (__UZENOADMIN ===true && $ADAT['user']['feladoTipus']!='admin') {
+ echo ' <select id="asWho" name="asWho" class="onChangeUpdate">';
+ $_SEL = ($ADAT['asWho']!='asAdmin') ? 'selected="selected"' : '';
+ echo '<option value="asAdmin">'._ADMINKENT.'</option>';
+ echo '<option value="asIs" '. $_SEL .'>'.constant('_'.strtoupper($ADAT['user']['feladoTipus']).'KENT').'</option>';
+ echo '</select>';
+ }
+ echo '</th></tr>';
+
+ echo '<tr><td>';
+ echo _CIMZETT.': ';
+// echo '<span style="" id="uzenoSearchIcon"><img src="/skin/classic/module-naplo/img/toolSearch.png" alt="ዖ" style="height:15px; width:15px;" align="middle" class="searchIcon"/>'.'</span>';
+ echo '<span style="font-size:15px; cursor:pointer" id="uzenoSearchIcon">⌕</span>';
+ echo '<input style="display:none" type="text" name="pattern" id="pattern" class="onChangeUpdate" placeholder="'._NEV.'" />';
+ echo '<button style="display:none" type="button">'._KERES.'</button>';
+ if (is_array($ADAT['r'])) {
+ echo '<input type="hidden" name="diakokkal" value="1" /> ';
+ echo '<select name="cimzett" id="cimzett">';
+ echo '<option value="">'._VALASSZ.'</option>';
+ foreach($ADAT['r'] as $tipus => $V) {
+ if (is_array($V)) {
+ /* Ha nincs Id, próbáljuk meg kiegészítő megjegyzés (Szulo,Tanar) nélkül */
+ $keyName = ($reassoc[$tipus]!='' && $V[0][$tipus.'Id']=='') ? $reassoc[$tipus].'Id' : $tipus.'Id';
+ $valueName= $tipus.'Nev';
+ $kiir = @constant('_T'.strtoupper($tipus));
+ echo '<optgroup label="'.$kiir.'" class="'.$tipus.'">';
+ //if (in_array($tipus,$allowedZero)) echo '<option value="'.$tipus.'|0">'._MINDEN.' '.$kiir.'</option>';
+ for ($i=0; $i<count($V); $i++) {
+ $_dis = ($V[$i][$keyName]!=='') ? '' : 'disabled="disabled"'; /* !== */
+ $_val = ($V[$i][$valueName]!='') ? $V[$i][$valueName].' ('.$V[$i][$keyName].')' : constant('_TP'.strtoupper($tipus));
+ if ($_val!='') {
+ if (!($V[$i][$keyName]==__MEID && $tipus==__SZEREP)) {
+ echo '<option value="'.$tipus.'|'.$V[$i][$keyName].'" '.$_dis.'>'.$_val.'</option>';
+ }
+ }
+ if ($i%10==0) echo "\n";
+ }
+ echo '</optgroup>';
+ }
+ }
+ echo '</select>';
+ }
+ echo '<span id="shTipus"></span>';
+ echo '</td></tr>';
+ echo '<tr><td>';
+ echo '<textarea name="txt" id="postazoTxt" style="display:" ></textarea>';
+ echo '<input type="hidden" name="postazoHash" id="postazoHash" value="" />';
+ echo '<button type="submit" id="postazoButton" name="gomb" value="OK" class="DOA" style="display:">'._KULD.'</button>';
+ echo '</td></tr></table>';
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/html/uzeno/uzeno.phtml b/mayor-orig/www/skin/classic/module-naplo/html/uzeno/uzeno.phtml
new file mode 100644
index 00000000..24304570
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/html/uzeno/uzeno.phtml
@@ -0,0 +1,434 @@
+<?php
+
+ /* WHOAMI: __SZEREP.__MEID */
+ global $IMG;
+ $IMG = array(
+ 'diak' => '<span class="icon-child"></span>',
+ 'szulo' => '<span class="icon-adult"></span>',
+ 'tanar' => '<span class="icon-adult"></span>',
+ 'munkakozosseg' => '<span class="icon-slideshare"></span>',
+ 'tankor' => '<span class="icon-myspace"></span>',
+ 'tankorSzulo' => '<span class="icon-group-alt"></span>',
+ 'osztaly' => '<span class="icon-group"></span>',
+ 'osztalySzulo' => '<span class="icon-adult"></span>',
+ 'osztalyTanar' => '<span class="icon-slideshare"></span>',
+ );
+
+ $TATA = array();
+
+ function fillTata($ADAT) {
+
+ global $TATA;
+ foreach ( array('tankor','tankorSzulo') as $_i => $_t ) {
+ for ($i=0; $i<count($ADAT['tagsagok'][$_t]); $i++) {
+ $TATA[$_t][$ADAT['tagsagok'][$_t][$i]['tankorId']] = $ADAT['tagsagok'][$_t][$i]['tankorNev'];
+ }
+ }
+ for ($i=0; $i<count($ADAT['tagsagok']['diak']); $i++) {
+ $TATA['diak'][$ADAT['tagsagok']['diak'][$i]['diakId']] = $ADAT['tagsagok']['diak'][$i]['diakNev'].' ('.$ADAT['tagsagok']['diak'][$i]['diakId'].')';
+
+ }
+ for ($i=0; $i<count($ADAT['tagsagok']['tanar']); $i++) {
+ $TATA['tanar'][$ADAT['tagsagok']['tanar'][$i]['tanarId']] = $ADAT['tagsagok']['tanar'][$i]['tanarNev'];
+ }
+ for ($i=0; $i<count($ADAT['tagsagok']['szulo']); $i++) {
+ $_szuloId = $ADAT['tagsagok']['szulo'][$i]['szuloId'];
+ $TATA['szulo'][$_szuloId] = $ADAT['tagsagok']['szulo'][$i]['szuloNev'];
+ for ($j=0; $j<count($ADAT['szuloDiakjai'][$_szuloId]); $j++) {
+ $TATA['szulo'][$_szuloId].= ' ('.$ADAT['szuloDiakjai'][$_szuloId][$j]['diakNev'].')';
+ }
+ }
+ for ($i=0; $i<count($ADAT['tagsagok']['munkakozosseg']); $i++) {
+ $TATA['munkakozosseg'][$ADAT['tagsagok']['munkakozosseg'][$i]['munkakozossegId']] = $ADAT['tagsagok']['munkakozosseg'][$i]['munkakozossegNev'];
+ }
+ foreach ( array('osztaly','osztalySzulo','osztalyTanar') as $_i => $_t ) {
+ for ($i=0; $i<count($ADAT['tagsagok'][$_t]); $i++) {
+ $TATA[$_t][$ADAT['tagsagok'][$_t][$i]['osztalyId']] = $ADAT['tagsagok'][$_t][$i]['osztalyJel'];
+ }
+ }
+ }
+
+ function putUzeno($ADAT) {
+
+ if ($ADAT['uzenetek']===false) return false;
+
+ global $TATA,$skin,$IMG;
+ if (!is_array($TATA) || count($TATA)==0) fillTata($ADAT);
+
+ $kepMutat = $ADAT['kepMutat'];
+ $colspan=5;
+ $_colspan=1;
+
+ if ($ADAT['cimzettId']!='') $filterClear = '<br/><a class="more" href="'.href('index.php?page=naplo&sub=uzeno&f=uzeno&cimzettId=&cimzettTipus=&mId='.$ADAT['mId']).'">'._CLEARFILTER.'</a>';
+ if ($ADAT['feladoId']!='') $filter2Clear = '<br/><a class="more" href="'.href('index.php?page=naplo&sub=uzeno&f=uzeno&feladoId=&feladoTipus=&mId='.$ADAT['mId']).'">'._CLEARFILTER.'</a>';
+
+ if ($ADAT['szalId']!='') {
+ putUzenetSzal($ADAT);
+ } elseif ($ADAT['mId']!='') {
+ putEgyUzenet($ADAT);
+ } else {
+
+ echo '<table class="uzeno" border="0" align="center" cellspacing="1">';
+// echo '<thead><tr><th class="dt" colspan="'.$_colspan.'">'._DATUM.', '._FELADO.$filter2Clear.'</th>
+// <th colspan="'.($_colspan+1).'" class="cimzett">'._CIMZETT.$filterClear.'</th><th>'._SZOVEG.'</th><th></th></tr></thead>';
+ echo '<thead><tr><th colspan="5"><a href="'.href('index.php?page=naplo&sub=uzeno&f=uzeno').'">'.'Üzenő'.'</a></th></tr>';
+ echo '<tfoot><tr><th colspan="'.$colspan.'">';
+ if ($skin=='ajax' && $ADAT['limits']!='') {
+ $href = href('index.php?page=naplo&sub=uzeno&f=uzeno');
+ echo _LEGFRISSEBB.' '.count($ADAT['uzenetek']).', ';
+ echo '<a href="'.$href.'" >'._MINDMUTAT.'</a>';
+ } else {
+ echo _OSSZESEN.': '.intval($ADAT['limits']['max']);
+ }
+ echo '</th></tr></tfoot>';
+
+ echo '<tbody>';
+ for ($i=0; $i<count($ADAT['uzenetek']); $i++) {
+ $D = $ADAT['uzenetek'][$i];
+ $_class = array();
+ $_class[] = ($D['flag']==1) ? 'olvasott':'uj';
+ $_class[] = $D['cimzettTipus'];
+ if ($D['cimzettId']==0) $_class[] = 'asterix';
+ echo '<tr class="'.implode(' ',$_class).'">';
+
+ echo '<td class="felado">';
+ if ($kepMutat && ($_f = putFace($D['feladoId'],$D['feladoTipus'],false,false))) {
+ echo '<div class="face" style="margin-right:4px; display:table-cell;">'.$_f.'</div>';
+ }
+ echo '<div class="nev--container">';
+ echo '<a href="'.href('index.php?page=naplo&sub=uzeno&f=uzeno&feladoId='.$D['feladoId'].'&feladoTipus='.$D['feladoTipus']).'">';
+ echo _szerepNev($D['feladoTipus'], $D['feladoId'] );
+ echo '</a><br/>';
+ echo '<span class="dt">'._dt($D['dt']).'</span>';
+ echo '</div>';
+ echo '</td>';
+ echo '<th style="text-align: center; color:white;">';
+ echo (($D['cimzettId']==0)?'<span class="icon-globe"></span>':$IMG[$D['cimzettTipus']]);
+ echo '</th>';
+ echo '<td class="cimzett">';
+/*
+ if ($kepMutat && ($_f=putFace($D['cimzettId'],$D['cimzettTipus'],false,false))) {
+ echo '<div class="face" style="display:table-cell">';
+ echo $_f;
+ echo '</div>';
+ }
+*/ echo '<div class="nev--container">';
+ //echo '<a href="'.href('index.php?page=naplo&sub=uzeno&f=uzeno&cimzettId='.$D['cimzettId'].'&cimzettTipus='.$D['cimzettTipus'],array('sessionID','policy','lang')).'">';
+ echo _szerepNev($D['cimzettTipus'],$D['cimzettId']);
+ //echo '</a>';
+ echo '</div>';
+ echo '</td>';
+
+ echo '<td class="uzenet">';
+ $href = href('index.php?page=naplo&sub=uzeno&f=uzeno&feladoId='.$D['feladoId'].'&feladoTipus='.$D['feladoTipus'].'&mId='.$D['mId'],array('sessionID','lang','policy'));
+ $href_szal = href('index.php?page=naplo&sub=uzeno&f=uzeno&szalId='.$D['feladoId'].'_'.$D['feladoTipus'].'_'.$D['cimzettId'].'_'.$D['cimzettTipus'].'&mId='.$D['mId'],array('sessionID','lang','policy'));
+
+ // $D['txt'] = '<a href="'.$href_szal.'">'.nl2br(htmlspecialchars($D['txt'])).'</a>';
+ $D['txt'] = makelinksclickable(nl2br(supertext($D['txt'])));
+ echo (mb_substr($D['txt'],0,2000,'UTF-8'));
+ if (mb_strlen($D['txt'],'UTF-8')>2000) {
+ echo ' <a class="more" href="'.$href.'">...</a>';
+ } else {
+ //echo ' <a class="more" href="'.$href.'"><span class="icon-return-key"></span></a>';
+ }
+
+ echo '</td>';
+
+ echo '<td class="uzenoEszkozok">';
+ if (__UZENOADMIN) {
+ } elseif ($D['flag']!=1) {
+ $href = href('index.php?page=naplo&sub=uzeno&f=uzeno&action=flagUzenet&flag='.(1).'&mId='.$D['mId'],array('sessionID','lang','policy'));
+ echo ' <a href="'.$href.'"><span class="icon-check"></span></a><br/>';
+ }
+
+ echo ' <a href="'.$href_szal.'"><span class="icon-share-alt"></span></a><br/>';
+ $href = href('index.php?page=naplo&sub=uzeno&f=uzeno&action=delUzenet&mId='.$D['mId'],array('sessionID','lang','policy'));
+ echo ' <a class="del" href="'.$href.'"><span class="icon-trash-alt"></span></a>';
+
+ echo '</td>';
+ echo '</tr>'."\n";
+ }
+ echo '</tbody>';
+ if ($skin=='ajax') {
+ echo '<tbody><tr><th style="height: 30px;vertical-align:middle;" colspan="'.$colspan.'">';
+ if ($ADAT['limits']['max']>$i) echo '<div class="_dotHolder"><a href="'.href('index.php?page=naplo&sub=uzeno&f=uzeno').'"><div class="_dot"></div> <div class="_dot"></div> <div class="_dot"></div></a></div>';
+ echo '</th></tr></tbody>';
+ }
+ echo '</table>';
+
+ if ($skin!='ajax') {
+ _putLapozo($ADAT['limits'],'index.php?page=naplo&sub=uzeno&f=uzeno&feladoTipus='.$ADAT['feladoTipus'].'&feladoId='.$ADAT['feladoId'].'&cimzettTipus='.$ADAT['cimzettTipus'].'&cimzettId='.$ADAT['cimzettId']);
+ } else {
+ }
+
+ }
+
+ }
+
+ function putUzeno_DEPRECATED($ADAT) {
+
+ if ($ADAT['uzenetek']===false) return false;
+
+ global $TATA,$skin,$IMG;
+ if (!is_array($TATA) || count($TATA)==0) fillTata($ADAT);
+
+ $kepMutat = $ADAT['kepMutat'];
+// $kepMutat=false;
+ $colspan=5;
+ $_colspan=1;
+/* if ($kepMutat) {
+ $colspan+=2;
+ $_colspan++;
+ }
+*/ // Üzenetek
+ if ($ADAT['szalId']!='') putUzenetSzal($ADAT);
+ elseif ($ADAT['mId']!='') putEgyUzenet($ADAT);
+ else {
+
+ if ($ADAT['cimzettId']!='') $filterClear = '<br/><a class="more" href="'.href('index.php?page=naplo&sub=uzeno&f=uzeno&cimzettId=&cimzettTipus=&mId='.$ADAT['mId']).'">'._CLEARFILTER.'</a>';
+ if ($ADAT['feladoId']!='') $filter2Clear = '<br/><a class="more" href="'.href('index.php?page=naplo&sub=uzeno&f=uzeno&feladoId=&feladoTipus=&mId='.$ADAT['mId']).'">'._CLEARFILTER.'</a>';
+
+ echo '<table class="uzeno" border="0" align="center" cellspacing="1">';
+ echo '<thead><tr><th class="dt" colspan="'.$_colspan.'">'._DATUM.', '._FELADO.$filter2Clear.'</th>
+ <th colspan="'.($_colspan+1).'" class="cimzett">'._CIMZETT.$filterClear.'</th><th>'._SZOVEG.'</th><th></th></tr></thead>';
+ echo '<tfoot><tr><th colspan="'.$colspan.'">';
+ if ($skin=='ajax' && $ADAT['limits']!='') {
+ $href = href('index.php?page=naplo&sub=uzeno&f=uzeno');
+ echo _LEGFRISSEBB.' '.count($ADAT['uzenetek']).', ';
+ echo '<a href="'.$href.'" >'._MINDMUTAT.'</a>';
+ } else {
+ echo _OSSZESEN.': '.intval($ADAT['limits']['max']);
+ }
+ echo '</th></tr></tfoot>';
+
+ echo '<tbody>';
+ for ($i=0; $i<count($ADAT['uzenetek']); $i++) {
+ $D = $ADAT['uzenetek'][$i];
+ $_class = array();
+ $_class[] = ($D['flag']==1) ? 'olvasott':'uj';
+ $_class[] = $D['cimzettTipus'];
+ if ($D['cimzettId']==0) $_class[] = 'asterix';
+ echo '<tr class="'.implode(' ',$_class).'">';
+ echo '<td class="felado">';
+ if ($kepMutat && ($_f = putFace($D['feladoId'],$D['feladoTipus'],false,false))) {
+ echo '<div class="face" style="margin-right:4px; display:table-cell;">'.$_f.'</div>';
+ }
+ echo '<div class="nev--container">';
+ echo '<a href="'.href('index.php?page=naplo&sub=uzeno&f=uzeno&feladoId='.$D['feladoId'].'&feladoTipus='.$D['feladoTipus']).'">';
+ echo _szerepNev($D['feladoTipus'], $D['feladoId'] );
+ echo '</a><br/>';
+ echo '<span class="dt">'._dt($D['dt']).'</span>';
+ echo '</div>';
+ echo '</td>';
+ echo '<th style="text-align: center; color:white;">';
+ echo (($D['cimzettId']==0)?'<span class="icon-globe"></span>':$IMG[$D['cimzettTipus']]);
+ echo '</th>';
+ echo '<td class="cimzett">';
+ if ($kepMutat && ($_f=putFace($D['cimzettId'],$D['cimzettTipus'],false,false))) {
+ echo '<div class="face" style="display:table-cell">';
+ echo $_f;
+ echo '</div>';
+ }
+ echo '<div class="nev--container">';
+ //echo '<a href="'.href('index.php?page=naplo&sub=uzeno&f=uzeno&cimzettId='.$D['cimzettId'].'&cimzettTipus='.$D['cimzettTipus'],array('sessionID','policy','lang')).'">';
+ echo _szerepNev($D['cimzettTipus'],$D['cimzettId']);
+ //echo '</a>';
+ echo '</div>';
+ echo '</td>';
+
+ echo '<td class="uzenet">';
+ $href = href('index.php?page=naplo&sub=uzeno&f=uzeno&feladoId='.$D['feladoId'].'&feladoTipus='.$D['feladoTipus'].'&mId='.$D['mId'],array('sessionID','lang','policy'));
+ $href_szal = href('index.php?page=naplo&sub=uzeno&f=uzeno&szalId='.$D['feladoId'].'_'.$D['feladoTipus'].'_'.$D['cimzettId'].'_'.$D['cimzettTipus'].'&mId='.$D['mId'],array('sessionID','lang','policy'));
+
+ $D['txt'] = '<a href="'.$href_szal.'">'.nl2br(htmlspecialchars($D['txt'])).'</a>';
+ echo (mb_substr($D['txt'],0,2000,'UTF-8'));
+ if (mb_strlen($D['txt'],'UTF-8')>2000) {
+ echo ' <a class="more" href="'.$href.'">...</a>';
+ } else {
+ //echo ' <a class="more" href="'.$href.'"><span class="icon-return-key"></span></a>';
+ }
+
+ echo '</td>';
+
+ echo '<td>';
+ if (__UZENOADMIN) {
+ $href = href('index.php?page=naplo&sub=uzeno&f=uzeno&action=delUzenet&mId='.$D['mId'],array('sessionID','lang','policy'));
+ echo ' <a class="del" href="'.$href.'"><span class="icon-trash-alt"></span></a>';
+ } elseif ($D['flag']!=1) {
+ $href = href('index.php?page=naplo&sub=uzeno&f=uzeno&action=flagUzenet&flag='.(1).'&mId='.$D['mId'],array('sessionID','lang','policy'));
+ echo ' <a href="'.$href.'"><span class="icon-check"></span></a>';
+ }
+ echo '</td>';
+ echo '</tr>'."\n";
+ }
+ echo '</tbody>';
+ echo '</table>';
+
+ if ($skin!='ajax') _putLapozo($ADAT['limits'],'index.php?page=naplo&sub=uzeno&f=uzeno&feladoTipus='.$ADAT['feladoTipus'].'&feladoId='.$ADAT['feladoId'].'&cimzettTipus='.$ADAT['cimzettTipus'].'&cimzettId='.$ADAT['cimzettId']);
+
+ }
+
+ }
+
+
+
+
+ function _szerepNev($tipus,$id) {
+ global $TATA;
+ if ($id==0 && defined('_TP'.strtoupper($tipus))) return '&laquo;'.constant('_TP'.strtoupper($tipus)).'&raquo;';
+ elseif($id==0 and $tipus=='') return '&laquo;admin&raquo;';
+ else return ($TATA[$tipus][$id]!='') ? $TATA[$tipus][$id] : '-n/a-' ;
+ }
+
+ function putUzenoUzenet($ADAT) {
+
+ if (__SZEREP=='') return;
+
+ global $TATA;
+ if (!is_array($TATA) || count($TATA)==0) fillTata($ADAT);
+ $feladoId = (__SZEREP=='admin')? 0:setUzenoFeladoId();
+ $KEYS = array_keys($ADAT['tagsagok']);
+// if (is_null($ADAT['replyTipus'])) $ADAT['replyTipus']=$KEYS[0];
+
+ if ($ADAT['feladoId']=='' || $ADAT['mId']>0) {
+
+ formBegin(array('method'=>'post','action'=>href('index.php?page=naplo&sub=uzeno&f=postas&mId='.$ADAT['mId']), 'id'=>'uzenoKereso', 'class'=>'onLoadUpdate'));
+ formEnd();
+
+ } else { /* RÉGI UI */
+
+ }
+
+ }
+
+ function putUzenetSzal($ADAT) {
+ global $IMG;
+ $U=$ADAT['uzenetek'];
+
+ list($s1,$s2,$s3,$s4) = explode('_',$ADAT['szalId']);
+
+ echo '<table id="uzenetek" class="uzenetSzal '.$s4.'" align="center" cellspacing="1">';
+ echo '<thead><tr><th>'._DATUM.'</th><th colspan="2">'._FELADO.'</th><th>'._UZENET.'</th></tr></thead>';
+ echo '<tfoot><tr><th>'.'</th><th colspan="2">'.'</th><th>'.'</th></tr></tfoot>';
+ echo '<tbody>';
+ for ($i=0; $i<count($U); $i++) {
+ $D = $U[$i];
+ $_meclass = (__MEID==$D['feladoId'] && __SZEREP==$D['feladoTipus'])? 'uzenetSajat':'uzenetPartner';
+ echo '<tr class="'.$_meclass.' '.$D['feladoTipus'].'" id="mId_'.$D['mId'].'">';
+ echo '<td class="uzenetDt">';
+ //echo $U[$i]['mId'];
+ echo _dt($U[$i]['dt']);
+ echo '</td>';
+ echo '<th style="color:white; width:20px;">';
+ echo (($D['cimzettId']==0)?'<span class="icon-globe"></span>':$IMG[$D['feladoTipus']]);
+ echo '</th>';
+ echo '<td class="uzenetSzerep">';
+ echo '<a href="'.href('index.php?page=naplo&sub=uzeno&f=uzeno&cimzettId='.$D['feladoId'].'&cimzettTipus='.$D['feladoTipus'].'&mId='.$D['mId'],array('sessionID','lang','policy')).'">';
+ echo _szerepNev($D['feladoTipus'], $D['feladoId'] );
+ echo '</a>';
+ echo '</td><td class="uzenet">';
+ echo '<div>'.makelinksclickable(nl2br(supertext($U[$i]['txt']))).'</div>';
+ echo '</td></tr>';
+ }
+ echo '</tbody></table>';
+ }
+
+ function putEgyUzenet($ADAT) {
+
+ global $IMG;
+ //--FIXME
+ for ($i=0; $i<count($ADAT['uzenetek']); $i++) {
+ if ($ADAT['uzenetek'][$i]['mId']==$ADAT['mId']) {
+ $D = $ADAT['uzenetek'][$i];
+ break;
+ }
+ }
+ echo '<table border="0" cellspacing="1" align="center" class="uzeno egyUzenet">';
+ echo '<thead><tr><th>';
+ $href = href('index.php?page=naplo&sub=uzeno&f=uzeno&mId=',array('sessionID','lang','policy'));
+ //echo '<a class="more" href="'.$href.'"><span class="icon-inbox-box"></span></a>';
+
+ $_class = array('more');
+ if ($D['flag']==1) {
+ $_class[] = 'uj';
+ $_flag=0;
+ } else {
+ $_flag=1;
+ $_class[] = 'olvasott';
+ }
+ $href = href('index.php?page=naplo&sub=uzeno&f=uzeno&action=flagUzenet&flag='.($_flag).'&mId='.$D['mId'],array('sessionID','lang','policy'));
+ echo ' <a class="'.implode(' ',$_class).'" href="'.$href.'"><span class="icon-check"></span></a>';
+ echo '</th><th>'._DATUM.'</th><th>'._FELADO.'</th><th colspan="2">'._CIMZETT.'</th></tr></thead>';
+ echo '<tbody>';
+
+ $_class = array();
+ $_class[] = $D['cimzettTipus'];
+ echo '<tr class="'.implode(' ',$_class).'">';
+ echo '<td colspan="2">'._dt($D['dt']).'</td>';
+ echo '<td>';
+ echo '<a href="'.href('index.php?page=naplo&sub=uzeno&f=uzeno&cimzettId='.$D['feladoId'].'&cimzettTipus='.$D['feladoTipus'].'&mId='.$D['mId'],array('sessionID','lang','policy')).'">';
+ echo _szerepNev($D['feladoTipus'], $D['feladoId'] );
+ echo '</a>';
+ echo '</td>';
+ echo '<th>'.(($D['cimzettId']==0)?'<span class="icon-globe"></span>':$IMG[$D['cimzettTipus']]).'</th>';
+ echo '<td>';
+ echo '<a href="'.href('index.php?page=naplo&sub=uzeno&f=uzeno&cimzettId='.$D['cimzettId'].'&cimzettTipus='.$D['cimzettTipus'].'&mId='.$D['mId'],array('sessionID','lang','policy')).'">';
+ echo _szerepNev($D['cimzettTipus'],$D['cimzettId']);
+ echo '</a>';
+ echo '</td>';
+ echo '</tr>';
+ echo '<tr>';
+ echo '<td colspan="5" class="content">';
+ echo makelinksclickable(nl2br(supertext($U[$i]['txt']))); // echo nl2br(htmlspecialchars($D['txt']));
+ echo '</td>';
+ echo '</tr>'."\n";
+
+ echo '</tbody>';
+ echo '</table>';
+
+ }
+
+ function _putLapozo($LIMITS,$base='index.php?page=naplo&sub=uzeno&f=uzeno') {
+
+ $limit = intval($LIMITS['limit']);
+ $darab = intval($LIMITS['max']);
+ $mutato = intval($LIMITS['mutato']);
+ $tol = ($mutato-5);
+ $ig = ($mutato+5);
+ if ($tol<1) $tol=1;
+ if ($limit==0) $limit=1;
+ if ($ig>ceil($darab/$limit)) $ig=ceil($darab/$limit);
+ echo '<table class="lapozo" align="center" cellspacing="0" cellpadding="0">';
+ echo '<tr><td>';
+ echo '<table align="right" cellspacing="1" cellpadding="1">';
+ echo '<tr>';
+ echo '<th class="title">'._LAPOZO.'</th>';
+ if ($tol>1) {
+ echo '<td class="nav"><a href="'.href($base.'&mutato=1').'">1</a></td>';
+ echo '<td class="nav"><a href="'.href($base.'&mutato='.($tol-1)).'">&lt;</a></td>';
+ }
+ for ($i=$tol; $i<=$ig; $i++) {
+ if ($i==$mutato) echo '<td class="aktiv">';
+ else echo '<td>';
+ echo '<a href="'.href($base.'&mutato='.$i).'">';
+ echo $i;
+ echo '</a>';
+ echo '</td>';
+ }
+ if ($ig<ceil($darab/$limit)) {
+ echo '<td class="nav"><a href="'.href($base.'&mutato='.$i).'">&gt;</a></td>';
+ echo '<td class="nav"><a href="'.href($base.'&mutato='.ceil($darab/$limit)).'">'.ceil($darab/$limit).'</a></td>';
+ }
+ echo '</tr>';
+ echo '</table>';
+ echo '</td></tr>';
+ echo '</table>'."\n";
+
+ }
+
+ function _dt($dt) {
+ return superdate($dt); // date('Y.m.d. H:i',strtotime($dt));
+ }
+
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-naplo/img/anim/garfield.gif b/mayor-orig/www/skin/classic/module-naplo/img/anim/garfield.gif
new file mode 100644
index 00000000..fb86107d
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/img/anim/garfield.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/module-naplo/img/anim/kutya.gif b/mayor-orig/www/skin/classic/module-naplo/img/anim/kutya.gif
new file mode 100644
index 00000000..fafc80cf
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/img/anim/kutya.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/module-naplo/img/anim/majom.gif b/mayor-orig/www/skin/classic/module-naplo/img/anim/majom.gif
new file mode 100644
index 00000000..b755ec47
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/img/anim/majom.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/module-naplo/img/anim/nyuszi.gif b/mayor-orig/www/skin/classic/module-naplo/img/anim/nyuszi.gif
new file mode 100644
index 00000000..a6aec1eb
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/img/anim/nyuszi.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/module-naplo/img/anim/pingvin.gif b/mayor-orig/www/skin/classic/module-naplo/img/anim/pingvin.gif
new file mode 100644
index 00000000..f594b832
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/img/anim/pingvin.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/module-naplo/img/anim/smiley.gif b/mayor-orig/www/skin/classic/module-naplo/img/anim/smiley.gif
new file mode 100644
index 00000000..cc8d1d84
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/img/anim/smiley.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/module-naplo/img/anim/tux-hard.gif b/mayor-orig/www/skin/classic/module-naplo/img/anim/tux-hard.gif
new file mode 100644
index 00000000..849f1eeb
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/img/anim/tux-hard.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/module-naplo/img/cr.png b/mayor-orig/www/skin/classic/module-naplo/img/cr.png
new file mode 100644
index 00000000..af1327bd
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/img/cr.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/module-naplo/img/fel.gif b/mayor-orig/www/skin/classic/module-naplo/img/fel.gif
new file mode 100644
index 00000000..75f4ecc0
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/img/fel.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/module-naplo/img/flipper/adatok.gif b/mayor-orig/www/skin/classic/module-naplo/img/flipper/adatok.gif
new file mode 100644
index 00000000..ea7c271a
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/img/flipper/adatok.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/module-naplo/img/flipper/nevsor.gif b/mayor-orig/www/skin/classic/module-naplo/img/flipper/nevsor.gif
new file mode 100644
index 00000000..cbb71a41
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/img/flipper/nevsor.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/module-naplo/img/helyettesites/csere.gif b/mayor-orig/www/skin/classic/module-naplo/img/helyettesites/csere.gif
new file mode 100644
index 00000000..f8473beb
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/img/helyettesites/csere.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/module-naplo/img/helyettesites/kez.gif b/mayor-orig/www/skin/classic/module-naplo/img/helyettesites/kez.gif
new file mode 100644
index 00000000..c10fb1e6
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/img/helyettesites/kez.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/module-naplo/img/helyettesites/mozgat.gif b/mayor-orig/www/skin/classic/module-naplo/img/helyettesites/mozgat.gif
new file mode 100644
index 00000000..9944bf0f
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/img/helyettesites/mozgat.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/module-naplo/img/helyettesites/ora.gif b/mayor-orig/www/skin/classic/module-naplo/img/helyettesites/ora.gif
new file mode 100644
index 00000000..83150a51
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/img/helyettesites/ora.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/module-naplo/img/hianyzas/change.png b/mayor-orig/www/skin/classic/module-naplo/img/hianyzas/change.png
new file mode 100644
index 00000000..3d2ede90
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/img/hianyzas/change.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/module-naplo/img/hianyzas/felkjel.gif b/mayor-orig/www/skin/classic/module-naplo/img/hianyzas/felkjel.gif
new file mode 100644
index 00000000..aef9774c
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/img/hianyzas/felkjel.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/module-naplo/img/hianyzas/green.gif b/mayor-orig/www/skin/classic/module-naplo/img/hianyzas/green.gif
new file mode 100644
index 00000000..b7ff93ad
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/img/hianyzas/green.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/module-naplo/img/hianyzas/h.gif b/mayor-orig/www/skin/classic/module-naplo/img/hianyzas/h.gif
new file mode 100644
index 00000000..114e8915
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/img/hianyzas/h.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/module-naplo/img/hianyzas/i.gif b/mayor-orig/www/skin/classic/module-naplo/img/hianyzas/i.gif
new file mode 100644
index 00000000..1ebdce34
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/img/hianyzas/i.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/module-naplo/img/hianyzas/pin.gif b/mayor-orig/www/skin/classic/module-naplo/img/hianyzas/pin.gif
new file mode 100644
index 00000000..2b7ace0f
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/img/hianyzas/pin.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/module-naplo/img/hianyzas/red-pin.gif b/mayor-orig/www/skin/classic/module-naplo/img/hianyzas/red-pin.gif
new file mode 100644
index 00000000..cbfe111a
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/img/hianyzas/red-pin.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/module-naplo/img/hianyzas/red.gif b/mayor-orig/www/skin/classic/module-naplo/img/hianyzas/red.gif
new file mode 100644
index 00000000..ff9599e7
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/img/hianyzas/red.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/module-naplo/img/hianyzas/sum.gif b/mayor-orig/www/skin/classic/module-naplo/img/hianyzas/sum.gif
new file mode 100644
index 00000000..92d701f3
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/img/hianyzas/sum.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/module-naplo/img/hianyzas/ter-pin.gif b/mayor-orig/www/skin/classic/module-naplo/img/hianyzas/ter-pin.gif
new file mode 100644
index 00000000..7f98aab5
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/img/hianyzas/ter-pin.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/module-naplo/img/hianyzas/yellow-pin.gif b/mayor-orig/www/skin/classic/module-naplo/img/hianyzas/yellow-pin.gif
new file mode 100644
index 00000000..53b28ec8
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/img/hianyzas/yellow-pin.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/module-naplo/img/hianyzas/yellow.gif b/mayor-orig/www/skin/classic/module-naplo/img/hianyzas/yellow.gif
new file mode 100644
index 00000000..414d28eb
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/img/hianyzas/yellow.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/module-naplo/img/hibabejelento/buggie.gif b/mayor-orig/www/skin/classic/module-naplo/img/hibabejelento/buggie.gif
new file mode 100644
index 00000000..c5248ef9
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/img/hibabejelento/buggie.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/module-naplo/img/hibabejelento/buggie.svg b/mayor-orig/www/skin/classic/module-naplo/img/hibabejelento/buggie.svg
new file mode 100644
index 00000000..b108abfd
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/img/hibabejelento/buggie.svg
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+
+<svg width="95" height="125" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <defs>
+ <linearGradient id="linearGradient3703">
+ <stop stop-color="#e4bc98" offset="0" id="stop3705"/>
+ <stop stop-color="#f6daaa" stop-opacity="0" offset="1" id="stop3707"/>
+ </linearGradient>
+ <linearGradient id="linearGradient3666">
+ <stop stop-color="#363433" offset="0" id="stop3668"/>
+ <stop stop-color="#363433" stop-opacity="0" offset="1" id="stop3670"/>
+ </linearGradient>
+ <linearGradient id="linearGradient3652">
+ <stop stop-color="#ffffff" offset="0" id="stop3654"/>
+ <stop stop-color="#ffffff" stop-opacity="0" offset="1" id="stop3656"/>
+ </linearGradient>
+ <linearGradient id="linearGradient3642">
+ <stop stop-color="#f6daaa" offset="0" id="stop3644"/>
+ <stop stop-color="#e4bc98" offset="1" id="stop3646"/>
+ </linearGradient>
+ <linearGradient xlink:href="#linearGradient3642" id="linearGradient3648" y2="0.938928" x2="0.098695" y1="0.78993" x1="0.214359"/>
+ <linearGradient xlink:href="#linearGradient3666" id="linearGradient3672" y2="0.216444" x2="0.233001" y1="0.231275" x1="0.398698"/>
+ <radialGradient gradientTransform="matrix(0.58653594,0.29353285,-1.1940084,2.3858619,93.617419,-112.22316)" gradientUnits="userSpaceOnUse" xlink:href="#linearGradient3703" id="radialGradient3711" fy="66.878647" fx="31.249113" r="9.789615" cy="66.878647" cx="31.249113"/>
+ <radialGradient gradientTransform="matrix(1.5765759,0,0,1.5765759,-45.978021,-40.844055)" gradientUnits="userSpaceOnUse" xlink:href="#linearGradient3652" id="radialGradient3919" fy="69.120766" fx="79.978813" r="5.29661" cy="69.120766" cx="79.978813"/>
+ </defs>
+ <g>
+ <title>background</title>
+ <rect fill="none" id="canvas_background" height="402" width="582" y="-1" x="-1"/>
+ </g>
+ <g>
+ <title>Layer 1</title>
+ <path fill="#363433" fill-rule="nonzero" id="path3724" d="m34.9375,94.75c-22.3905,0 -24.33147,21.92107 -24.5,26.25l47.1875,0c0.09187,-5.02716 -0.7998,-26.25 -22.6875,-26.25z"/>
+ <path fill="#f6daaa" fill-rule="nonzero" stroke="#363433" stroke-width="1.3" stroke-linecap="square" stroke-miterlimit="4" stroke-dashoffset="0" id="path3606" d="m74.74841,58.1303c0.20483,12.12976 -14.84358,-5.27591 -12.91049,-12.57945c1.27386,-1.25011 2.55721,-2.33632 4.75797,-2.47831c1.81085,0.16982 6.66383,8.11652 8.15252,15.05776z"/>
+ <path fill="none" stroke="#6d6e6e" stroke-width="0.5" stroke-linecap="square" stroke-miterlimit="4" stroke-dashoffset="0" id="path3772" d="m42.7897,47.0984c8.40407,-21.50266 4.65092,-41.92225 -2.9253,-43.92934"/>
+ <path fill="url(#linearGradient3648)" fill-rule="nonzero" stroke="#363433" stroke-width="1.3" stroke-linecap="square" stroke-miterlimit="4" stroke-dashoffset="0" id="path3610" d="m42.27357,46.70948c-12.01865,1.50366 -14.09724,11.97922 -13.07601,15.79052c3.37953,12.00565 4.96558,20.16235 5.07316,33.86106c2.04869,2.16869 7.75781,4.61889 11.28013,1.09657c-1.08005,-8.15419 5.71912,-10.48873 16.02224,-9.73252c12.25622,0.89956 28.07204,-2.00196 28.07204,-13.63877c-0.96547,-7.33324 -9.43194,-12.77123 -22.5768,-20.32575"/>
+ <path fill="none" stroke="#6d6e6e" stroke-width="0.5" stroke-linecap="square" stroke-miterlimit="4" stroke-dashoffset="0" id="path3774" d="m45.50502,45.13214c-0.44856,-9.9526 22.13369,-28.29049 29.96215,-19.00724"/>
+ <path fill="#f6daaa" fill-rule="nonzero" id="path3608" d="m37.20869,52.43644c12.43221,-15.31097 23.77944,-17.22818 32.1769,8.14354"/>
+ <path fill="url(#radialGradient3919)" id="path3917" d="m77.1875,60.3125c-3.16571,1.19139 -5.40625,4.23013 -5.40625,7.8125c0,4.61186 3.70064,8.34375 8.3125,8.34375c3.78316,0 6.97468,-2.51971 8,-5.96875c-1.11342,-2.12732 -2.92816,-4.16211 -5.40625,-6.21875c-1.57493,-1.30708 -3.42947,-2.61519 -5.5,-3.96875z"/>
+ <path fill="#363433" fill-rule="nonzero" stroke-width="0.5" id="path3660" d="m43.125,84.9375c-0.50127,0 -1.07976,0.91806 -0.1875,0.84375c4.50247,-0.37497 8.84544,-0.2821 12.59375,2.34375l0.34375,-0.0625l0.46875,-0.59375l0.10101,-0.15798c-4.10239,-2.61364 -8.62852,-2.84634 -13.31976,-2.37327z"/>
+ <path fill="#ffffff" fill-rule="nonzero" stroke="url(#linearGradient3672)" stroke-width="0.75" stroke-linecap="square" stroke-miterlimit="4" stroke-dashoffset="0" id="path3664" d="m48.50123,66.24609c-0.90941,-0.90941 -6.10115,-17.07646 2.80895,-19.61584c5.70887,-1.62704 12.54666,10.92054 12.54666,16.15147c0,5.23093 -10.67631,7.73704 -15.35561,3.46437z"/>
+ <path fill="#343231" id="path3674" d="m57.086191,54.095706a3.946284,5.619599 0 1 1 -7.892584,-1.480423a3.946284,5.619599 0 1 1 7.892584,1.480423z"/>
+ <path fill="#ffffff" id="path3676" d="m53.894518,51.971913a1.093935,1.832152 0 1 1 -2.18787,-1.057158a1.093935,1.832152 0 1 1 2.18787,1.057158z"/>
+ <path fill="#ffffff" id="path3678" d="m52.346494,56.612357a-0.620422,0.519077 0 1 1 1.240844,-0.419561a-0.620422,0.519077 0 1 1 -1.240844,0.419561z"/>
+ <path fill="url(#radialGradient3711)" fill-rule="nonzero" stroke-width="0.75" id="path3680" d="m42.875,47.28125l-0.3125,0.03125c-0.55437,0.4743 -0.58559,0.2956 -0.53125,0.0625c-0.10627,0.01494 -0.20794,0.04613 -0.3125,0.0625c-0.10727,0.12235 -0.23167,0.25375 -0.40625,0.46875l-0.3125,0.375l-0.3125,0.125l0.3125,-0.375c0.25028,-0.30823 0.34061,-0.44524 0.375,-0.53125c-0.08386,0.01462 -0.16727,0.01571 -0.25,0.03125c-0.31082,0.20871 -0.57292,0.43266 -0.21875,0.0625c-4.93692,0.98924 -7.85,3.60896 -9.5,6.46875c-1.79758,3.11558 -2.0296,6.58607 -1.59375,8.25c0.0019,0.0073 -0.0019,0.02405 0,0.03125c3.3491,11.90194 4.95982,20.14511 5.09375,33.65625c0.93551,0.92986 2.68669,2.00812 4.59375,2.40625c1.25809,0.26265 2.52269,0.24158 3.6875,-0.21875c0.69523,-0.71024 1.18012,-1.7638 1.6875,-2.9375c0.18979,-3.03752 1.6676,-5.26313 4.125,-6.5625c0.01177,-0.0062 0.01944,-0.02506 0.03125,-0.03125l-6.15625,-41.375z"/>
+ <path fill="#413f3e" id="path3776" d="m41.03292,2.942534a1.564799,1.564799 0 1 1 -3.129599,0a1.564799,1.564799 0 1 1 3.129599,0z"/>
+ <path fill="#413f3e" id="path3778" d="m77.049869,26.181411a1.564799,1.564799 0 1 1 -3.129599,0a1.564799,1.564799 0 1 1 3.129599,0z"/>
+ <path fill="#ffffff" id="path3848" d="m33.87537,95.28126c-11.57618,-0.31415 -19.04482,11.3854 -18.2099,11.80571c1.38697,0.30582 2.87114,-2.98591 8.693,-7.89252c2.63932,-2.22439 9.62232,-2.97599 9.52,-3.75697c-0.0018,-0.05349 -0.00006,-0.10397 -0.0031,-0.15622z"/>
+ <path fill="#e67e71" fill-rule="nonzero" id="path3735" d="m33.96875,98.59375c-12.30493,5.40077 -16.01019,13.99935 -16.125,22.40625l38.46875,0c-0.0033,-6.52287 -0.38099,-15.15798 -9.8125,-21.90625c-2.23336,1.96545 -5.12015,2.2846 -7.53125,1.78125c-1.947,-0.40647 -3.6793,-1.25647 -5,-2.28125z"/>
+ <path fill="#363433" fill-rule="nonzero" id="path3953" d="m69.39063,60.59375c-1.62614,-6.45473 -3.92993,-11.22015 -6.42188,-14.4375c-2.49195,-3.21735 -5.22022,-4.99518 -8.09375,-5.40625c-2.87353,-0.41107 -5.83506,0.52056 -8.84375,2.5c-3.00869,1.97944 -6.8092,6.28795 -8.82812,9.1875c3.33781,-3.31844 6.48148,-6.45037 9.35937,-8.34375c2.87789,-1.89338 5.62051,-2.71097 8.1875,-2.34375c2.56699,0.36722 5.0203,1.9195 7.40625,5c2.38595,3.0805 4.9899,7.59699 7.23438,13.84375z"/>
+ </g>
+</svg> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/img/io/kreta.svg b/mayor-orig/www/skin/classic/module-naplo/img/io/kreta.svg
new file mode 100644
index 00000000..e111fa54
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/img/io/kreta.svg
@@ -0,0 +1,21 @@
+<svg width="900" height="400" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid meet">
+ <metadata>Created by potrace 1.10, written by Peter Selinger 2001-2011</metadata>
+
+ <g>
+ <title>background</title>
+ <rect fill="none" id="canvas_background" height="402" width="902" y="-1" x="-1"/>
+ </g>
+ <g>
+ <title>Layer 1</title>
+ <g id="svg_1" fill="#000000" transform="translate(0,399) scale(0.10000000149011612,-0.10000000149011612) ">
+ <path fill="#30a8cb" id="svg_2" d="m4080,3903c0,-12 14,-42 30,-66c17,-25 30,-48 30,-52c0,-3 22,-52 49,-108c169,-353 221,-466 221,-482c0,-18 35,-27 86,-23l39,3l97,190c54,105 100,197 103,205c4,8 13,26 20,40c7,14 21,41 31,60c9,19 21,42 25,50c5,8 19,35 32,60c12,25 35,64 51,88c16,23 26,45 23,48c-3,3 -193,7 -421,7l-416,2l0,-22zm644,-114c8,-32 4,-45 -39,-125c-26,-49 -54,-102 -62,-119c-14,-30 -22,-45 -70,-137c-16,-30 -35,-50 -55,-59c-30,-12 -32,-11 -60,21c-15,19 -28,38 -28,42c0,4 -27,63 -59,130c-33,68 -69,153 -82,190c-34,103 -41,100 225,96l221,-3l9,-36z"/>
+ <path fill="#30a8cb" id="svg_3" d="m834,2928c-6,-10 -10,-1908 -4,-1909c3,0 88,-1 189,-1l185,-1l-3,360l-3,360l39,39c21,21 51,55 66,75c37,49 65,56 79,21c19,-48 68,-146 104,-207c19,-33 38,-70 44,-82c5,-11 14,-24 19,-28c6,-3 11,-13 11,-22c0,-9 6,-24 14,-32c7,-9 29,-45 48,-81c20,-36 45,-81 56,-100c11,-19 30,-53 42,-75c12,-22 35,-62 50,-90c15,-27 38,-69 50,-92l22,-43l172,0c94,0 195,-3 224,-6c47,-6 52,-5 52,13c0,11 -15,40 -33,64c-18,24 -37,51 -40,59c-4,8 -16,29 -27,45c-11,17 -24,39 -29,50c-5,11 -21,37 -35,58c-14,21 -26,40 -26,44c0,3 -33,60 -73,127c-40,66 -76,128 -80,136c-4,8 -16,29 -27,45c-11,17 -24,41 -30,54c-6,13 -21,38 -33,55c-26,36 -43,64 -55,91c-15,32 -152,257 -173,284c-27,34 -24,44 24,93c44,46 100,108 338,373c79,88 176,193 216,234c92,93 94,106 12,97c-34,-3 -148,-6 -254,-6l-192,0l-114,-127c-63,-71 -118,-133 -124,-139c-5,-7 -35,-38 -65,-70c-70,-74 -167,-188 -204,-237c-15,-21 -36,-46 -47,-56c-20,-18 -20,-19 6,-25c14,-4 31,-3 38,1c40,24 129,98 152,126c15,17 73,81 129,142c276,299 272,296 395,293c45,-1 84,-4 86,-7c10,-17 -30,-90 -80,-144c-31,-34 -77,-86 -103,-115c-26,-30 -66,-75 -89,-100c-168,-187 -173,-194 -189,-248c-9,-33 -13,-67 -9,-86c10,-44 75,-175 113,-227c18,-24 32,-47 32,-51c0,-8 61,-112 78,-133c5,-7 23,-37 39,-67c16,-30 36,-66 44,-80c20,-33 129,-215 151,-255c32,-55 76,-150 79,-170c6,-37 -9,-45 -81,-45c-75,0 -120,12 -120,33c0,7 -13,26 -30,42c-16,16 -30,34 -30,41c0,7 -6,19 -12,26c-7,7 -33,51 -56,98c-24,47 -62,117 -85,155c-22,39 -57,100 -76,137c-65,121 -120,203 -165,247c-36,36 -51,43 -87,45c-37,2 -51,-4 -100,-40c-54,-41 -100,-99 -119,-149c-5,-13 -10,-140 -11,-282c-1,-285 -7,-320 -53,-342c-43,-20 -116,-4 -133,29c-10,20 -13,194 -12,819l1,794l21,33c21,32 26,34 77,34c83,0 87,-10 95,-259c4,-130 9,-173 24,-206c21,-48 36,-61 47,-43c10,16 23,590 13,601c-8,11 -359,15 -365,5z"/>
+ <path fill="#30a8cb" id="svg_4" d="m2414,2928c-6,-10 -6,-1900 0,-1906c3,-2 87,-4 188,-4l183,0l1,383l1,384l84,3c103,4 126,-2 134,-31c8,-27 10,-33 84,-191c34,-70 61,-132 61,-136c0,-4 19,-45 43,-91c23,-46 65,-136 92,-199c27,-63 53,-118 58,-121c4,-3 63,-4 130,-1c67,2 152,0 190,-5c53,-8 70,-7 79,4c8,10 7,18 -4,31c-13,15 -138,265 -138,276c0,2 -22,51 -49,108c-99,208 -131,279 -131,287c0,4 -13,27 -30,49c-16,23 -30,48 -30,56c0,7 17,22 38,31c63,30 138,92 184,152c91,122 112,188 112,348c0,154 -23,228 -106,340c-62,85 -157,160 -240,191c-105,38 -166,43 -551,46c-209,2 -381,0 -383,-4zm764,-93c34,-4 65,-11 68,-16c3,-5 14,-9 25,-9c25,0 115,-45 153,-77c46,-38 131,-147 145,-184c7,-19 20,-51 29,-72c14,-33 14,-55 5,-156c-10,-111 -12,-122 -51,-187c-22,-38 -81,-111 -131,-161c-50,-51 -98,-107 -107,-124c-15,-30 -15,-36 2,-93c9,-34 21,-65 25,-71c4,-5 23,-48 42,-95c20,-47 60,-137 90,-200c105,-223 112,-245 81,-270c-23,-20 -97,-16 -135,6c-33,19 -78,98 -163,289c-13,28 -44,93 -69,145c-25,52 -55,116 -65,141c-26,61 -117,154 -161,162c-131,27 -231,-31 -251,-146c-4,-23 -8,-151 -9,-285c-3,-293 -6,-307 -77,-318c-65,-9 -96,4 -111,46c-16,49 -16,1569 0,1620c16,47 30,54 112,60c102,7 480,4 553,-5z"/>
+ <path fill="#30a8cb" id="svg_5" d="m2835,2626c-113,-44 -126,-69 -128,-254c0,-78 4,-154 10,-177c13,-45 72,-105 102,-105c11,0 23,-5 26,-10c10,-16 309,-4 370,15c59,18 112,62 153,128c27,43 30,55 28,130c-1,64 -6,92 -24,127c-31,60 -91,108 -169,137c-56,20 -81,23 -201,22c-77,-1 -150,-6 -167,-13zm212,-76l151,0l44,-33c127,-97 117,-253 -23,-339c-21,-13 -64,-17 -229,-19l-204,-3l1,200c1,109 2,201 2,203c1,2 25,1 54,-3c28,-3 120,-6 204,-6z"/>
+ <path fill="#30a8cb" id="svg_6" d="m3853,2927c-2,-4 -4,-435 -4,-958l1,-950l626,0c344,0 628,2 631,4c8,9 5,359 -3,366c-5,3 -202,4 -439,1c-236,-4 -433,-5 -437,-3c-3,2 -6,101 -5,221l2,217l30,-3c82,-7 682,-17 694,-11c22,10 23,379 1,379c-34,1 -648,-3 -685,-4l-40,-1l0,183l0,184l449,1l448,2l1,184c0,103 -4,186 -9,188c-21,7 -1256,7 -1261,0zm1105,-94c28,-5 37,-14 59,-58l26,-53l-28,-34c-15,-18 -39,-37 -54,-41c-14,-4 -158,-7 -320,-7c-192,0 -313,-3 -347,-11c-62,-14 -120,-58 -140,-105c-16,-39 -20,-268 -5,-307c13,-34 76,-93 109,-102c15,-4 146,-10 292,-14c240,-5 268,-8 294,-25c27,-19 28,-23 23,-75c-3,-30 -12,-61 -20,-68c-26,-26 -90,-33 -325,-33c-187,0 -240,-3 -270,-16c-46,-19 -92,-62 -92,-85c0,-10 -4,-21 -10,-24c-6,-4 -10,-74 -10,-177l0,-171l37,-48c20,-27 50,-54 67,-61c22,-9 128,-13 381,-15l350,-2l23,-26c30,-35 31,-116 2,-145c-17,-17 -34,-20 -112,-20c-51,-1 -275,-1 -498,-1l-405,-1l-22,27c-13,14 -23,31 -24,38c0,7 0,318 0,692c1,374 1,689 0,700c0,11 0,61 1,110c2,100 22,150 63,158c33,6 917,6 955,0z"/>
+ <path fill="#30a8cb" id="svg_7" d="m5255,2929c-2,-3 -5,-88 -6,-190l-2,-184l269,-1l269,-1l1,-768l0,-769l183,0l183,0l2,769l1,769l262,-3c144,-1 266,0 270,2c4,3 6,89 3,191l-5,187l-713,2c-393,1 -715,-1 -717,-4zm1276,-100c30,-8 39,-16 53,-52c22,-58 21,-69 -14,-102l-31,-29l-167,-6c-183,-7 -202,-12 -259,-72c-31,-32 -32,-36 -40,-153c-4,-67 -7,-366 -6,-665c2,-554 0,-600 -35,-627c-9,-7 -37,-13 -64,-13c-63,0 -84,21 -93,92c-3,29 -8,330 -10,668c-2,338 -6,627 -8,643c-3,15 -5,31 -6,35c0,5 -25,25 -55,46l-54,37l-178,6c-176,5 -177,5 -200,32c-37,40 -40,69 -15,117c21,39 26,42 74,48c29,4 265,6 525,5c260,-1 476,1 479,5c7,7 36,3 104,-15z"/>
+ <path fill="#30a8cb" id="svg_8" d="m7262,2927c-7,-7 -44,-79 -83,-158c-38,-79 -74,-151 -79,-159c-10,-17 -180,-351 -363,-710c-376,-741 -403,-793 -429,-829c-21,-27 -23,-58 -6,-63c7,-3 37,0 68,5c30,5 119,7 197,4l143,-4l123,246c68,135 132,262 142,281c10,19 23,44 29,55c114,221 256,512 256,525c0,10 9,29 21,44c17,21 24,24 35,15c8,-6 14,-19 14,-28c0,-9 4,-21 8,-26c5,-6 17,-32 27,-60c10,-27 41,-99 70,-160c29,-60 65,-137 80,-170c15,-33 52,-112 81,-175c30,-63 67,-142 83,-175c15,-33 41,-89 58,-125c54,-113 90,-194 97,-217c9,-28 -2,-26 176,-24c80,1 166,-2 192,-7c25,-5 52,-6 59,-2c8,6 -17,67 -90,216c-57,115 -109,223 -116,239c-7,17 -41,89 -75,160c-34,72 -74,157 -90,190c-15,33 -49,105 -75,160c-26,55 -61,129 -77,165c-17,36 -35,72 -39,80c-5,8 -12,22 -15,30c-3,8 -26,58 -51,110c-24,52 -58,124 -75,160c-16,36 -34,72 -39,80c-5,8 -12,22 -15,30c-3,8 -18,42 -33,75c-16,33 -40,86 -55,117c-14,31 -30,68 -36,82c-7,19 -17,26 -37,26c-16,0 -37,3 -49,6c-11,3 -25,-1 -32,-9zm80,-174c8,-10 32,-54 53,-98c20,-44 44,-91 52,-105c8,-14 22,-43 32,-65c40,-87 146,-309 160,-335c27,-49 41,-79 41,-89c0,-6 36,-85 80,-175c44,-91 80,-169 80,-174c0,-5 16,-36 35,-68c19,-32 35,-62 35,-68c0,-5 9,-28 19,-50c11,-23 25,-52 30,-66c6,-14 15,-32 21,-40c5,-8 30,-60 56,-115c33,-69 47,-114 48,-145l1,-45l-55,-3c-30,-2 -72,1 -92,7c-31,10 -41,21 -68,74c-17,34 -38,73 -45,87c-26,49 -140,293 -274,590c-99,217 -139,282 -202,326c-26,18 -44,24 -59,19c-30,-10 -88,-63 -115,-105c-26,-41 -126,-229 -197,-370c-219,-435 -291,-568 -324,-599c-36,-33 -37,-33 -110,-29c-41,3 -76,7 -79,10c-8,8 16,68 71,184c30,62 54,115 54,120c0,4 6,15 14,23c11,13 125,233 368,716c8,17 24,48 36,70c67,133 122,249 122,261c0,7 6,17 14,21c7,4 23,28 35,53c32,68 86,167 100,184c18,21 44,20 63,-1z"/>
+ <path fill="#30a8cb" id="svg_9" d="m4435,730c-14,-22 -25,-43 -25,-47c0,-8 -112,-231 -234,-468c-37,-72 -74,-138 -83,-147c-8,-10 -13,-24 -10,-32c5,-13 16,-14 54,-8c61,9 677,9 718,0c60,-13 59,1 -2,123c-32,63 -84,170 -116,239c-32,69 -78,166 -103,217c-24,50 -44,96 -44,101c0,5 -9,21 -21,36c-17,21 -29,26 -65,26c-40,0 -46,-3 -69,-40zm100,-144c20,-20 135,-244 135,-263c0,-4 6,-14 13,-22c16,-19 53,-113 62,-157c10,-53 0,-55 -251,-54c-125,0 -231,3 -235,6c-20,12 -7,76 27,141c20,37 42,78 48,91c6,13 29,58 51,101c103,200 105,202 150,157z"/>
+ </g>
+ </g>
+</svg>
diff --git a/mayor-orig/www/skin/classic/module-naplo/img/le.gif b/mayor-orig/www/skin/classic/module-naplo/img/le.gif
new file mode 100644
index 00000000..6ca503c6
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/img/le.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/module-naplo/img/print.png b/mayor-orig/www/skin/classic/module-naplo/img/print.png
new file mode 100644
index 00000000..76cda839
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/img/print.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/module-naplo/img/tankorok/gold_box.gif b/mayor-orig/www/skin/classic/module-naplo/img/tankorok/gold_box.gif
new file mode 100644
index 00000000..f0dc944c
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/img/tankorok/gold_box.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/module-naplo/img/tankorok/gray-pixel.gif b/mayor-orig/www/skin/classic/module-naplo/img/tankorok/gray-pixel.gif
new file mode 100644
index 00000000..5e9893fe
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/img/tankorok/gray-pixel.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/module-naplo/img/tanmenet/close.png b/mayor-orig/www/skin/classic/module-naplo/img/tanmenet/close.png
new file mode 100644
index 00000000..abbf64ca
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/img/tanmenet/close.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/module-naplo/img/tanmenet/updown.png b/mayor-orig/www/skin/classic/module-naplo/img/tanmenet/updown.png
new file mode 100644
index 00000000..9205820e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/img/tanmenet/updown.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/module-naplo/img/toggle.png b/mayor-orig/www/skin/classic/module-naplo/img/toggle.png
new file mode 100644
index 00000000..b4f54d39
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/img/toggle.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/module-naplo/img/toolSubmit.gif b/mayor-orig/www/skin/classic/module-naplo/img/toolSubmit.gif
new file mode 100644
index 00000000..d120f8f4
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/img/toolSubmit.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/admin/regisztracio.jquery.min.js b/mayor-orig/www/skin/classic/module-naplo/javascript/admin/regisztracio.jquery.min.js
new file mode 100644
index 00000000..ff60f853
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/admin/regisztracio.jquery.min.js
@@ -0,0 +1,7 @@
+
+// Nekem ez Chromium alatt nem működik... De miért nem?
+
+ $(function() {
+// $('#regForm').submit();
+ });
+
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/admin/regisztracio.js b/mayor-orig/www/skin/classic/module-naplo/javascript/admin/regisztracio.js
new file mode 100644
index 00000000..d7f35a6e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/admin/regisztracio.js
@@ -0,0 +1,7 @@
+
+ Event.observe(window, 'load', myPSFLoader, false);
+
+ function myPSFLoader(evt) {
+ // A regisztrációs form elküldése
+ $('regForm').submit();
+ }
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/admin/szemeszterek.jquery.min.js b/mayor-orig/www/skin/classic/module-naplo/javascript/admin/szemeszterek.jquery.min.js
new file mode 100644
index 00000000..21b3f78e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/admin/szemeszterek.jquery.min.js
@@ -0,0 +1,43 @@
+
+$(function() {
+
+ var startDateTextBox = $('#tolDt');
+ var endDateTextBox = $('#igDt');
+
+ startDateTextBox.datetimepicker('option', 'onSelect',
+ function (selectedDateTime) {
+ endDateTextBox.datetimepicker('option', 'minDate', startDateTextBox.datetimepicker('getDate') );
+ }
+ );
+ startDateTextBox.datetimepicker('option', 'onClose',
+ function(dateText, inst) {
+ if (endDateTextBox.val() != '') {
+ var testStartDate = startDateTextBox.datetimepicker('getDate');
+ var testEndDate = endDateTextBox.datetimepicker('getDate');
+ if (testStartDate > testEndDate)
+ endDateTextBox.datetimepicker('setDate', testStartDate);
+ } else {
+ endDateTextBox.val(dateText);
+ }
+ }
+ );
+ endDateTextBox.datetimepicker('option', 'onSelect',
+ function (selectedDateTime) {
+ startDateTextBox.datetimepicker('option', 'maxDate', endDateTextBox.datetimepicker('getDate') );
+ }
+ );
+ endDateTextBox.datetimepicker('option', 'onClose',
+ function(dateText, inst) {
+ if (startDateTextBox.val() != '') {
+ var testStartDate = startDateTextBox.datetimepicker('getDate');
+ var testEndDate = endDateTextBox.datetimepicker('getDate');
+ if (testStartDate > testEndDate)
+ startDateTextBox.datetimepicker('setDate', testEndDate);
+ } else {
+ startDateTextBox.val(dateText);
+ }
+ }
+ );
+
+});
+
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/ertekeles/ertekeles.js b/mayor-orig/www/skin/classic/module-naplo/javascript/ertekeles/ertekeles.js
new file mode 100644
index 00000000..d25c0def
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/ertekeles/ertekeles.js
@@ -0,0 +1,56 @@
+
+ Event.observe(window, 'load', myPSFLoader, false);
+
+ hideOlOl = function() {
+ $$('ol ol.negativ, ol ol.semleges, ol ol.pozitiv').each(
+ function(elem, index) {
+// Effect.BlindUp($(elem));
+ elem.hide();
+ }
+ );
+ }
+
+ blindUp = function(elem) {
+ //$$('ol ol.negativ, ol ol.semleges, ol ol.pozitiv').each(
+ $(elem).up('li').select('ol').each(
+ function(elem, index) {
+//alert('ITT');
+ if ($(elem).visible()) Effect.BlindUp($(elem), { duration: 0.5 });
+// elem.hide();
+ }
+ );
+ }
+
+ function sleep(milliseconds) {
+ var start = new Date().getTime();
+ while ((new Date().getTime() - start) < milliseconds) {}
+ }
+
+ function myPSFLoader(evt) {
+ hideOlOl();
+
+ Event.observe(document.body, 'click', function(event) {
+ var element = $(Event.element(event));
+
+ if (element.hasClassName('gomb')) {
+
+ blindUp(element);
+ if (element.hasClassName('negativ')) classNev='negativ';
+ else if (element.hasClassName('semleges')) classNev='semleges';
+ else if (element.hasClassName('pozitiv')) classNev='pozitiv';
+ $A(element.up('li').select('ol')).each(
+ function(elem, index) {
+ if ($(elem).hasClassName(classNev)) {
+ if (!$(elem).visible()) {
+ Effect.BlindDown($(elem), { duration: 0.5 });
+ $(elem).down('input').checked=true;
+ }
+ }
+ //$(elem).show();
+
+ }
+ );
+ }
+ })
+
+ }
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/esemeny/esemenyDiak.jquery.min.js b/mayor-orig/www/skin/classic/module-naplo/javascript/esemeny/esemenyDiak.jquery.min.js
new file mode 100644
index 00000000..a3bd3b7e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/esemeny/esemenyDiak.jquery.min.js
@@ -0,0 +1,101 @@
+
+
+ $(function() {
+ $('body').bind('keydown', myKeyDown);
+ $('input.plusz').bind('click', function(event) {
+ var element = $(event.target);
+ var container = element.parents('table');
+ var openable = container.find('.openable').hide();
+ var onclickshow = container.find('.plusz').removeClass('selected');
+ var id = element[0].id;
+ if (id && id.substring(0,4) == 'show') {
+ var openable = '#'+id.charAt(4).toLowerCase()+ id.substring(5);
+ $(openable).show();
+ setTimeout(function() { // várni kell, hogy láthatóvá váljon a select, csak utána lehet fokuszt adni rá
+ $(openable+' select').focus();
+ }, 1);
+ }
+ element.addClass('selected');
+
+ });
+ $('input.add').bind('click', function(event) {
+ var selectElement = $(event.target).prev('select');
+ selectDiak(selectElement);
+ });
+ $("select.diakok option").bind('dblclick', function(event) {
+ var selectElement = $(event.target).closest('select');
+ selectDiak(selectElement);
+ });
+ $('#nevsor').click(function(event) {
+ elem = $(event.target);
+ if (elem.hasClass('removeLine')) {
+ elem.closest('tr').remove();
+ } else if (elem.hasClass('icon-remove-sign')) {
+ if (!confirm(elem.prop('title'))) {
+ event.preventDefault();
+ } else {
+ // töröl
+ $('#postDiakId').attr('name','torolDiakId').val(elem.find('input').val());
+ elem.closest('form').submit();
+ }
+ } else if (elem.hasClass('icon-ok-sign')) {
+ // jóváhagyást elutasít
+ $('#postDiakId').attr('name','elutasitDiakId').val(elem.closest('tr').find('input').val());
+ elem.closest('form').submit();
+ } else if (elem.hasClass('icon-minus-sign')) {
+ // jóváhagy
+ $('#postDiakId').attr('name','jovahagyDiakId').val(elem.closest('tr').find('input').val());
+ elem.closest('form').submit();
+ }
+ });
+ $('#nevsor td.osztaly').bind('click', function(event) {
+ elem = $(event.target);
+ _class = elem.text().replace('.','');
+ $('#nevsor tr').not('.'+_class).toggle();
+ });
+ });
+
+ myKeyDown = function(event) {
+
+ var element = $(event.target);
+ var charKeyCode = event.keyCode ? event.keyCode : event.which;
+ var shiftKey = event.shiftKey ? event.shiftKey : ((charKeyCode == 16) ? true : false);
+ var altKey = event.altKey ? event.altKey : ((charKeyCode == 18) ? true : false);
+ var ctrlKey = event.ctrlKey ? event.ctrlKey : ((charKeyCode == 17) ? true : false);
+
+ if (charKeyCode==13) { // Enter
+ if (element.hasClass('diakok')) {
+ selectDiak(element);
+ event.preventDefault();
+ }
+ } else if (charKeyCode==27) { // Esc
+ $('form#nevsorForm .openable').hide();
+ $('form#nevsorForm #oEmpty').show();
+ } else if (charKeyCode==9) { // Tab
+ if (element.hasClass('diakok')) {
+ if ($('#osztalyok input.selected').nextAll('input:first').length) {
+ $('#osztalyok input.selected').nextAll('input:first').click();
+ } else {
+ $('#osztalyok input:first').click();
+ }
+ }
+ }
+ }
+
+ function selectDiak(selectElement) {
+
+ selectElement.find('option:selected').each(function(index, elem) {
+ if (!$("#nevsor input[value='" + $(elem).val() + "']").length) {
+ var sor='<tr class="ujDiak">'
+ +'<td class="sorsz"><input type="hidden" name="ujDiakId[]" value="'+$(elem).val()+'" /></td>'
+ +'<td><span class="icon-remove-sign removeLine"></span></td>'
+ +'<td class="nev">'+$(elem).text()+'</td>'
+ +'<td class="jelDt"></td>'
+ +'<td class="jovDt" colspan="2"></td>'
+ +'<tr>';
+ $(sor).insertBefore($('#submitRow'));
+// $(sor).appendTo($('#nevsor'));
+ }
+ });
+ }
+
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/esemeny/jelentkezes.jquery.min.js b/mayor-orig/www/skin/classic/module-naplo/javascript/esemeny/jelentkezes.jquery.min.js
new file mode 100644
index 00000000..b184d5dd
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/esemeny/jelentkezes.jquery.min.js
@@ -0,0 +1,7 @@
+$(function() {
+
+ $('form.esemeny th').click(function(event) {
+ $('form.esemeny tr').not('.aktualis').not(':first').toggle();
+ });
+
+});
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/esemeny/ujEsemeny.jquery.min.js b/mayor-orig/www/skin/classic/module-naplo/javascript/esemeny/ujEsemeny.jquery.min.js
new file mode 100644
index 00000000..3ba14772
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/esemeny/ujEsemeny.jquery.min.js
@@ -0,0 +1,89 @@
+/*
+ TODO: összes osztály kijelölése kattintásra
+*/
+
+
+ $(function() {
+ $('body').bind('keydown', myKeyDown);
+ $('body').bind('click',function(event) {
+ var element = $(event.target);
+ if (
+ $('#tanarLista').is(':visible')
+ && element.closest('#tanarLista').length == 0
+ && element.attr('id') != 'plusz'
+ ) {
+ $('#tanarLista').hide();
+ }
+ });
+ $('#osztalyLista li input').bind('change', function(event) {
+ var element = $(event.target);
+ if (element.is(':visible')) {
+ element.closest('li').toggleClass('uj');
+ }
+ });
+ $("#tanarok option").bind('dblclick', function(event) {
+ var elem = $(event.target);
+ if (!$("#esemenyTanar option[value='" + elem.val() + "']").length) {
+ $(elem).clone().addClass('uj').appendTo( $('#esemenyTanar'));
+ }
+ });
+ $('#esemenyTanar').bind('dblclick', function(event) {
+ $('#tanarLista').show();
+ $('#tanarok').focus();
+ });
+ $('#plusz').bind('click', function(event) {
+ if ($('#tanarLista').is(':visible')) {
+ selectTanar();
+ $('#tanarLista').hide();
+ $('#submitButton').focus();
+ } else {
+ $('#tanarLista').show();
+ $('#tanarok').focus();
+ }
+ });
+ $('#minusz').bind('click', function(event) {
+ $('#esemenyTanar option:selected').remove();
+ });
+ $('#add').bind('click', function(event) {
+ if ($('#tanarLista').is(':visible')) {
+ selectTanar();
+// $('#tanarLista').hide();
+// $('#submitButton').focus();
+ }
+ }); $('#closeTanarLista').bind('click', function(event) {
+ $('#tanarLista').hide();
+ });
+ $('#submitButton').bind('click',function(event) {
+ $('#esemenyTanar option').prop('selected','selected');
+ });
+ });
+
+ myKeyDown = function(event) {
+
+ var element = $(event.target);
+ var charKeyCode = event.keyCode ? event.keyCode : event.which;
+ var shiftKey = event.shiftKey ? event.shiftKey : ((charKeyCode == 16) ? true : false);
+ var altKey = event.altKey ? event.altKey : ((charKeyCode == 18) ? true : false);
+ var ctrlKey = event.ctrlKey ? event.ctrlKey : ((charKeyCode == 17) ? true : false);
+
+ if (charKeyCode==13) { // Enter
+ if (element.attr('id') == 'tanarok') {
+ selectTanar();
+ }
+ } else if (charKeyCode==27) { // Esc
+ $('#tanarLista').hide();
+ } else if (charKeyCode==46) { // Del
+ if (element.attr('id') == 'esemenyTanar') {
+ $('#esemenyTanar option:selected').remove();
+ }
+ }
+ }
+
+ selectTanar = function() {
+ $('#tanarok option:selected').each(function(index, elem) {
+ if (!$("#esemenyTanar option[value='" + $(elem).val() + "']").length) {
+ $(elem).clone().addClass('uj').appendTo( $('#esemenyTanar'));
+ }
+ });
+ }
+
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/export/diakExport.jquery.min.js b/mayor-orig/www/skin/classic/module-naplo/javascript/export/diakExport.jquery.min.js
new file mode 100644
index 00000000..bda10a84
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/export/diakExport.jquery.min.js
@@ -0,0 +1,177 @@
+
+$(function() {
+
+ kivalaszt = function(event) {
+ $('select#kivalasztott > option').prop('selected','selected');
+ }
+ mezoKivalasztas = function(event) {
+ optionAthelyezes('szabad','kivalasztott');
+ }
+ mezoTorles = function(event) {
+ optionAthelyezes('kivalasztott','szabad');
+ }
+ optionAthelyezes = function(fromId, toId) {
+ var toSel = $('#'+toId);
+ if (toSel.prop('selectedIndex') == -1) {
+ $('#'+fromId+' option:selected').prop('selected','').prependTo(toSel);
+ } else {
+ $('#'+fromId+' option:selected').prop('selected','').insertAfter($('#'+toId+' option:selected').first());
+ }
+ }
+ $('.onClickMezoSelect').bind('click', function(event) {
+ element = $(event.target);
+ // Az összes elem kiválasztása...
+ kivalaszt();
+ // ... és átrakása a szabad mezők közé
+ optionAthelyezes('kivalasztott','szabad');
+ // A kiválasztandó elemek kijelölése
+ idList = $('#'+element.attr('name')+'Lista').val().split(',');
+ // és áthelyezése egyesével (a megfelelő sorrend miatt!!)
+ for (j=0; j<idList.length; j++) {
+ $('#szabad option').each(function(index) {
+ if ($(this).val() == idList[j]) {
+ $(this).prop('selected', 'selected');
+ optionAthelyezes('szabad','kivalasztott');
+ return false;
+ }
+ });
+ }
+ });
+ includeCSS(
+ "skin/classic/share/javascript/jquery-dataTables/css/jquery.dataTables.css",
+ "skin/classic/share/javascript/jquery-dataTables/css/ColReorder.css"
+ );
+ $.getScript("skin/classic/share/javascript/jquery-dataTables/jquery.dataTables.min.js").done(function() {
+ $.getScript("skin/classic/share/javascript/jquery-dataTables/jquery.dataTables.columnFilter.js").done(function() {
+ $.getScript("skin/classic/share/javascript/jquery-dataTables/ColReorder.min.js").done(function() {
+
+ $('#diakTabla').dataTable({
+ "oLanguage": {
+ "sSearch" : "Keresés",
+ "sLengthMenu": "Mutasson _MENU_ rekordot oldalanként",
+ "sZeroRecords": "Nincs találat!",
+ "sInfo": "Találatok _START_-tól _END_-ig az összesen _TOTAL_ rekordból",
+ "sInfoEmpty": "0-tól 0-ig a 0 rekordból",
+ "sInfoFiltered": "(szűrés nélül _MAX_ db rekord)",
+ "oPaginate": {
+ "sNext": "Következő oldal",
+ "sPrevious": "Előző oldal"
+ }
+ },
+ "sDom": 'Rlfrtip'
+ }).columnFilter();
+ });
+ })
+ });
+ $('#valaszt').bind('click', mezoKivalasztas);
+ $('#torol').bind('click', mezoTorles);
+ $('#exportOptions').bind('submit', kivalaszt);
+
+});
+
+/*
+includeJS('skin/classic/share/javascript/TableFilter/tablefilter_all_min.js');
+includeJS('skin/classic/share/javascript/TableFilter/sortabletable.js');
+includeJS('skin/classic/share/javascript/TableFilter/tfAdapter.sortabletable.js');
+Event.observe(window, 'load', myPSFLoader, false);
+
+function myPSFLoader(evt) {
+
+
+ // Mezőkiválasztó gombok kezelése
+ var FieldSelectObject = Class.create();
+ FieldSelectObject.prototype = {
+ initialize: function(element) {
+ this.element = $(element);
+ this.element.observe('click',this.fieldSelect.bindAsEventListener(this));
+ },
+
+ fieldSelect: function(evt, extraInfo) {
+
+ // Az összes elem kiválasztása...
+ kivalaszt();
+ // ... és átrakása a szabad mezők közé
+ optionAthelyezes('kivalasztott','szabad');
+ // A kiválasztandó elemek kijelölése
+ this.list = $F($(this.element.getAttribute('name')+'Lista'));
+ this.idList = this.list.split(',');
+ this.options = $('szabad').options;
+ // és áthelyezése egyesével (a megfelelő sorrend miatt!!)
+ for (j=0; j<this.idList.length; j++) {
+ for (i=0; i<this.options.length; i++) {
+ attr = this.options[i].value;
+ this.options[i].selected = (attr == this.idList[j]);
+ }
+ optionAthelyezes('szabad','kivalasztott');
+ }
+
+ Event.stop(evt);
+ }
+ }
+
+ var onClickMezoSelectElements = new Array();
+ $$('.onClickMezoSelect').each(
+ function (elem, index) {
+ onClickMezoSelectElements.push(new FieldSelectObject(elem));
+ }
+ );
+
+ // A szűrés
+ if ($('diakTabla') != null) {
+ var lastRowIndex = tf_Tag(tf_Id('diakTabla'),"tr").length;
+ var table1Filters = {
+ base_path: 'skin/classic/share/javascript/TableFilter/',
+ single_search_filter: false,
+ sort: true,
+ sort_config: {sort_types: []},
+ alternate_rows: true,
+ on_keyup : true,
+ highlight_keywords : true,
+ mark_active_columns: true,
+ paging: false,
+ rows_counter: true,
+ rows_counter_text: 'Találatok száma: ',
+ input_watermark: 'Keresés...',
+ filters_row_index: 1,
+ remember_grid_values: true,
+ rows_always_visible: [lastRowIndex]
+//sort_config: {sort_types: ['Number','Number','String','String','String']},
+//sort_config: {sort_types: cellTypes},
+//extensions: {
+// name:['ColumnsResizer'],
+// src:['TFExt_ColsResizer/TFExt_ColsResizer.js'],
+// description:['Columns Resizing'],
+// initialize:[function(o){o.SetColsResizer();}]
+//},
+//col_resizer_all_cells: true,
+//editable: false,
+//selectable: true,
+//ezEditTable_config: {
+// default_selection: 'both',
+//}
+// col_1: "select",
+// col_2: "select",
+// btn: true
+ }
+ if (typeof(selIndex) !== 'undefined') for (i = 0; i < selIndex.length; i++) eval('table1Filters.col_'+selIndex[i]+' = "select";');
+ eval('table1Filters.col_'+cellTypes.length+' = "none";');
+ if (typeof(cellTypes) !== 'undefined') table1Filters.sort_config.sort_types = cellTypes;
+ var tf01 = setFilterGrid("diakTabla",1,table1Filters);
+ } // van diakTabla
+
+ Event.observe('valaszt', 'click', mezoKivalasztas);
+ Event.observe('torol', 'click', mezoTorles);
+ Event.observe('exportOptions', 'submit', kivalaszt);
+}
+
+
+/*
+// A filter cseréje!
+tf01.RemoveGrid();
+var table1Filters = {
+ single_search_filter: true,
+ sort: true,
+}
+tf01 = new TF("diakTabla",1,table1Filters);
+tf01.AddGrid();
+*/
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/export/diakExport.js b/mayor-orig/www/skin/classic/module-naplo/javascript/export/diakExport.js
new file mode 100644
index 00000000..bca1334e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/export/diakExport.js
@@ -0,0 +1,141 @@
+includeJS('skin/classic/share/javascript/TableFilter/tablefilter_all_min.js');
+includeJS('skin/classic/share/javascript/TableFilter/sortabletable.js');
+includeJS('skin/classic/share/javascript/TableFilter/tfAdapter.sortabletable.js');
+Event.observe(window, 'load', myPSFLoader, false);
+
+function myPSFLoader(evt) {
+
+ kivalaszt = function(event) {
+ $$('#kivalasztott option').each(
+ function(elem, index) {
+ elem.selected=true;
+ }
+ );
+ }
+ mezoKivalasztas = function(event) {
+ optionAthelyezes('szabad','kivalasztott');
+ }
+ mezoTorles = function(event) {
+ optionAthelyezes('kivalasztott','szabad');
+ }
+ optionAthelyezes = function(fromId, toId) {
+ var fromSel = $(fromId);
+ var toSel = $(toId);
+ // Áthelyezés
+ for (i = 0; i < fromSel.length; i++) {
+ if (fromSel.options[i].selected) {
+ var val = fromSel.options[i].value;
+ var txt = fromSel.options[i].innerHTML;
+ if (toSel.selectedIndex == -1) {
+ toSel.insert({bottom: new Element('option', {value: val}).update(txt)});
+ } else {
+ toSel.options[ toSel.selectedIndex ].insert({before: new Element('option', {value: val}).update(txt)});
+ }
+ }
+ }
+ // Törlés
+ for (i = fromSel.length-1; i >= 0; i--) {
+ if (fromSel.options[i].selected) {
+ fromSel.options[i].remove();
+ }
+ }
+ }
+
+
+ // Mezőkiválasztó gombok kezelése
+ var FieldSelectObject = Class.create();
+ FieldSelectObject.prototype = {
+ initialize: function(element) {
+ this.element = $(element);
+ this.element.observe('click',this.fieldSelect.bindAsEventListener(this));
+ },
+
+ fieldSelect: function(evt, extraInfo) {
+
+ // Az összes elem kiválasztása...
+ kivalaszt();
+ // ... és átrakása a szabad mezők közé
+ optionAthelyezes('kivalasztott','szabad');
+ // A kiválasztandó elemek kijelölése
+ this.list = $F($(this.element.getAttribute('name')+'Lista'));
+ this.idList = this.list.split(',');
+ this.options = $('szabad').options;
+ // és áthelyezése egyesével (a megfelelő sorrend miatt!!)
+ for (j=0; j<this.idList.length; j++) {
+ for (i=0; i<this.options.length; i++) {
+ attr = this.options[i].value;
+ this.options[i].selected = (attr == this.idList[j]);
+ }
+ optionAthelyezes('szabad','kivalasztott');
+ }
+
+ Event.stop(evt);
+ }
+ }
+
+ var onClickMezoSelectElements = new Array();
+ $$('.onClickMezoSelect').each(
+ function (elem, index) {
+ onClickMezoSelectElements.push(new FieldSelectObject(elem));
+ }
+ );
+
+ // A szűrés
+ if ($('diakTabla') != null) {
+ var lastRowIndex = tf_Tag(tf_Id('diakTabla'),"tr").length;
+ var table1Filters = {
+ base_path: 'skin/classic/share/javascript/TableFilter/',
+ single_search_filter: false,
+ sort: true,
+ sort_config: {sort_types: []},
+ alternate_rows: true,
+ on_keyup : true,
+ highlight_keywords : true,
+ mark_active_columns: true,
+ paging: false,
+ rows_counter: true,
+ rows_counter_text: 'Találatok száma: ',
+ input_watermark: 'Keresés...',
+ filters_row_index: 1,
+ remember_grid_values: true,
+ rows_always_visible: [lastRowIndex]
+//sort_config: {sort_types: ['Number','Number','String','String','String']},
+//sort_config: {sort_types: cellTypes},
+//extensions: {
+// name:['ColumnsResizer'],
+// src:['TFExt_ColsResizer/TFExt_ColsResizer.js'],
+// description:['Columns Resizing'],
+// initialize:[function(o){o.SetColsResizer();}]
+//},
+//col_resizer_all_cells: true,
+//editable: false,
+//selectable: true,
+//ezEditTable_config: {
+// default_selection: 'both',
+//}
+// col_1: "select",
+// col_2: "select",
+// btn: true
+ }
+ if (typeof(selIndex) !== 'undefined') for (i = 0; i < selIndex.length; i++) eval('table1Filters.col_'+selIndex[i]+' = "select";');
+ eval('table1Filters.col_'+cellTypes.length+' = "none";');
+ if (typeof(cellTypes) !== 'undefined') table1Filters.sort_config.sort_types = cellTypes;
+ var tf01 = setFilterGrid("diakTabla",1,table1Filters);
+ } // van diakTabla
+
+ Event.observe('valaszt', 'click', mezoKivalasztas);
+ Event.observe('torol', 'click', mezoTorles);
+ Event.observe('exportOptions', 'submit', kivalaszt);
+}
+
+
+/*
+// A filter cseréje!
+tf01.RemoveGrid();
+var table1Filters = {
+ single_search_filter: true,
+ sort: true,
+}
+tf01 = new TF("diakTabla",1,table1Filters);
+tf01.AddGrid();
+*/
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/haladasi/elszamolas.jquery.min.js b/mayor-orig/www/skin/classic/module-naplo/javascript/haladasi/elszamolas.jquery.min.js
new file mode 100644
index 00000000..efcdd115
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/haladasi/elszamolas.jquery.min.js
@@ -0,0 +1,42 @@
+$(function() {
+
+ $('table.elszamolas tr td.lekotott').hover(function(e) {
+ $(this).parent('tr').find('th.sum.lekotott').addClass('highlight');
+ },function(e) {
+ $(this).parent('tr').find('th.sum.lekotott').removeClass('highlight');
+ }
+ );
+
+ $('table.elszamolas tr td.fennmarado').hover(function(e) {
+ $(this).parent('tr').find('th.sum.fennmarado').addClass('highlight');
+ },function(e) {
+ $(this).parent('tr').find('th.sum.fennmarado').removeClass('highlight');
+ }
+ );
+
+ $('table.elszamolas tr th.sum.lekotott').hover(function(e) {
+ $(this).parent('tr').find('td.lekotott').addClass('highlight');
+ },function(e) {
+ $(this).parent('tr').find('td.lekotott').removeClass('highlight');
+ }
+ );
+ $('table.elszamolas tr th.sum.fennmarado').hover(function(e) {
+ $(this).parent('tr').find('td.fennmarado').addClass('highlight');
+ },function(e) {
+ $(this).parent('tr').find('td.fennmarado').removeClass('highlight');
+ }
+ );
+
+ $('table.elszamolas tbody tr').hover(function() {
+ //var szazalek = $(this).data('sum');
+ var szazalek = $(this).data('percent');
+ if (szazalek>100) szazalek=100;
+ var cssClass = $(this).attr('class');
+ $('#munkaoraBar').css('width',szazalek+'%');
+ $('#munkaoraBar').addClass(cssClass);
+ },function() {
+ $('#munkaoraBar').css('width','0%');
+ $('#munkaoraBar').removeClass();
+ });
+
+}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/haladasi/haladasi.jquery.min.js b/mayor-orig/www/skin/classic/module-naplo/javascript/haladasi/haladasi.jquery.min.js
new file mode 100644
index 00000000..e6d629c0
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/haladasi/haladasi.jquery.min.js
@@ -0,0 +1,78 @@
+showUpdateLayer = function() {
+ takaroElem = $('#takaro');
+ if (takaroElem) takaroElem.show();
+ $('#updateWindow').show();
+ $('updateForm').prop('tabindex',1);
+ $('updateForm').focus();
+}
+
+$(function() { /* onload */
+/* $('#rejtMutat').click(function(event) {
+ var element = $(event.target);
+ $('.ujOra').fadeToggle('fast');
+ });
+*/
+ $('.rejtMutat').click(function(event) {
+ $(event.target).closest('tbody').find('.ujOra').fadeToggle('fast');
+ });
+ $('.torol').change(function(event) {
+ /* rogton torolt class-uva tesszuk, akkor is, ha az ajaxRequestError van ... (lásd generikus callback) */
+ var element = $(event.target);
+ element.parents('tr').addClass('torolt');
+ element.parents('tr').find('.l').empty();
+ });
+ $('body').click(function(event) {
+ var x = $(event.target);
+ if (x.hasClass('gomb DOA'))
+ x.prop('disabled', false);
+ });
+/*
+ $('body').change(function(event) {
+ var x = $(event.target); // itt kezelhetnénk a haladasi tankorvaltasbol adodo dolgot
+ });
+*/
+ $('body').keypress(function(event) {
+ var element = $(event.target);
+ var charKeyCode = event.keyCode ? event.keyCode : event.which;
+ var shiftKey = event.shiftKey ? event.shiftKey : ((charKeyCode == 16) ? true : false);
+ var altKey = event.altKey ? event.altKey : ((charKeyCode == 18) ? true : false);
+ var ctrlKey = event.ctrlKey ? event.ctrlKey : ((charKeyCode == 17) ? true : false);
+
+ if(event.target.type=='text' && element.hasClass('data')) {
+ if (charKeyCode==13) {
+ event.preventDefault();
+ element.parents('tr').nextAll(':not(.ujOra)').first().find('input[type=text]').focus();
+ }
+ }
+ });
+
+// beépülő teszt! - később!
+
+/*
+ $('#nav2 li.icons').append('<span id="naploAlertIcon1" class="icon-bullhorn"></span>');
+ $('#naploAlertIcon1').on('click', function() {
+ //var params = $.parseParams(window.location.toString().split('?')[1] || '' );
+ //var page=params.page?params.page:'';
+ //var sub=params.sub?params.sub:'';
+ //var f=params.f?params.f:'';
+ url = location.toString().replace(/sub=([^&]*)/,'sub=haladasi').replace(/f=([^&]*)/,'f=haladasi');
+// window.location = url;
+ $().redirect( url, { tanarId: "70", csakUres:"1" } );
+ });
+*/
+
+});
+
+processJSON = function(json) {
+ console.log(json.toDo);
+
+ var elementId = "#ORAID_"+json.oraId.toString();
+ if (json.toDo=='oraElmarad') {
+ $(elementId).addClass('elmarad');
+ } else if (json.toDo == 'oraMegtartva') {
+ $(elementId).removeClass();
+ }
+ $('#updateWindow').toggle();
+ $('#takaro').toggle();
+
+}
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/haladasi/helyettesites.jquery.min.js b/mayor-orig/www/skin/classic/module-naplo/javascript/haladasi/helyettesites.jquery.min.js
new file mode 100644
index 00000000..9be7f906
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/haladasi/helyettesites.jquery.min.js
@@ -0,0 +1,27 @@
+
+showUpdateLayer = function() {
+ takaroElem = $('#takaro');
+ if (takaroElem) takaroElem.show();
+ $('#updateWindow').show();
+ $('updateForm').prop('tabindex',1);
+ $('updateForm').focus();
+ $('#updateHeader').text('Haladási napló'); // sic
+}
+
+$(function() {
+ $('.rejtMutat').click(function(event) {
+ $(event.target).closest('tbody').find('.ujOra').fadeToggle('fast');
+ });
+/* $('.torol').change(function(event) {
+ // rogton torolt class-uva tesszuk, akkor is, ha az ajaxRequestError van ... (lásd generikus callback)
+ var element = $(event.target);
+ element.parents('tr').addClass('torolt');
+ element.parents('tr').find('.l').empty();
+ });
+ $('body').click(function(event) {
+ var x = $(event.target);
+ if (x.hasClass('gomb DOA'))
+ x.prop('disabled', false);
+ });
+*/
+});
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/haladasi/pluszora.jquery.min.js b/mayor-orig/www/skin/classic/module-naplo/javascript/haladasi/pluszora.jquery.min.js
new file mode 100644
index 00000000..d3efaded
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/haladasi/pluszora.jquery.min.js
@@ -0,0 +1,42 @@
+$(function() {
+
+ $('#mindentanar').click(function() {
+ $('#tanarLista option').prop('selected', true);
+ });
+ $('#invertal').click(function() {
+ $('#tanarLista option').each(function() {
+ $(this).prop('selected',!$(this).prop('selected'));
+ });
+ });
+
+ $('#munkakozossegSelector').on('change',function() {
+ mkId = Number.parseInt($(this).val());
+ $('#tanarLista option').each(function() {
+ mkArr = ($(this).data('mk'));
+ if ($.inArray(mkId,mkArr)>=0) {
+ $(this).prop('selected',true);
+ }
+ });
+ });
+ $('#selectorMinus').on('click',function() {
+ $this = $('#munkakozossegSelector');
+ mkId = Number.parseInt($this.val());
+ $('#tanarLista option').each(function() {
+ mkArr = ($(this).data('mk'));
+ if ($.inArray(mkId,mkArr)>=0) {
+ $(this).prop('selected',false);
+ }
+ });
+ });
+ $('#selectorPlus').on('click',function() {
+ $this = $('#munkakozossegSelector');
+ mkId = Number.parseInt($this.val());
+ $('#tanarLista option').each(function() {
+ mkArr = ($(this).data('mk'));
+ if ($.inArray(mkId,mkArr)>=0) {
+ $(this).prop('selected',true);
+ }
+ });
+ });
+
+}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/hianyzas/info.jquery.min.js b/mayor-orig/www/skin/classic/module-naplo/javascript/hianyzas/info.jquery.min.js
new file mode 100644
index 00000000..156ac76b
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/hianyzas/info.jquery.min.js
@@ -0,0 +1,11 @@
+
+
+$(function() {
+ google.charts.load('current', {packages: ['corechart','line']});
+ google.charts.setOnLoadCallback(drawHianyzasStatChart);
+
+ function drawHianyzasStatChart() {
+
+ }
+
+});
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/hianyzas/nap.jquery.min.js b/mayor-orig/www/skin/classic/module-naplo/javascript/hianyzas/nap.jquery.min.js
new file mode 100644
index 00000000..a73bc34b
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/hianyzas/nap.jquery.min.js
@@ -0,0 +1,19 @@
+
+$(function() {
+ $('table input[type=text].perc').each(
+ function (index) {
+ $(this).bind('change', function(event) {
+ var element = $(event.target);
+ element.next('input').prop('checked',(element.val() != '0'));
+ if (element.val() != '0') {
+ element.addClass('kesett');
+ }
+ });
+ }
+ );
+ $('td.jelen input[type=radio],td.hiányzás input[type=radio]').change( function(event) {
+ var elem=$(event.target);
+ var percName = 'PERC_'+elem.attr('id').split('_')[1];
+ elem.closest('tr').find('input[name='+percName+']').val(0).removeClass('kesett');
+ });
+});
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/hianyzas/nap.js b/mayor-orig/www/skin/classic/module-naplo/javascript/hianyzas/nap.js
new file mode 100644
index 00000000..948d6d74
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/hianyzas/nap.js
@@ -0,0 +1,13 @@
+
+Event.observe(window, 'load', myPSFLoader, false);
+
+function myPSFLoader(evt) {
+ $$('table input[type=text].perc').each(
+ function (elem, index) {
+ Event.observe(elem, 'change', function(event) {
+ var element = $(Event.element(event));
+ element.previous('input').checked=(element.value != '0');
+ }); // Event.observe
+ }
+ );
+}
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/hianyzas/ora.jquery.min.js b/mayor-orig/www/skin/classic/module-naplo/javascript/hianyzas/ora.jquery.min.js
new file mode 100644
index 00000000..1d1e313c
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/hianyzas/ora.jquery.min.js
@@ -0,0 +1,27 @@
+
+$(function() {
+ $('table input[type=text].perc').each(
+ function (index) {
+ $(this).bind('change', function(event) {
+ var element = $(event.target);
+ element.next('input').prop('checked',(element.val() != '0'));
+ if (element.val() != '0') {
+ element.addClass('kesett');
+ }
+ });
+ }
+ );
+ $('td.jelen input[type=radio],td.hiányzás input[type=radio]').change( function(event) {
+ var elem=$(event.target);
+ var percName = 'PERC_'+elem.attr('id').split('_')[1];
+ elem.closest('tr').find('input[name='+percName+']').val(0).removeClass('kesett');
+ });
+/*
+ $('tr.magantanulo').click( function(event) {
+ $('tr.magantanulo').fadeToggle();
+ });
+*/
+ $('tr.felmentett').click( function(event) {
+ $('tr.felmentett').fadeToggle();
+ });
+});
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/hianyzas/ora.js b/mayor-orig/www/skin/classic/module-naplo/javascript/hianyzas/ora.js
new file mode 100644
index 00000000..948d6d74
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/hianyzas/ora.js
@@ -0,0 +1,13 @@
+
+Event.observe(window, 'load', myPSFLoader, false);
+
+function myPSFLoader(evt) {
+ $$('table input[type=text].perc').each(
+ function (elem, index) {
+ Event.observe(elem, 'change', function(event) {
+ var element = $(Event.element(event));
+ element.previous('input').checked=(element.value != '0');
+ }); // Event.observe
+ }
+ );
+}
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/diak.jquery.min.js b/mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/diak.jquery.min.js
new file mode 100644
index 00000000..5cd89589
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/diak.jquery.min.js
@@ -0,0 +1,192 @@
+$(function() {
+
+ // A gotoCreateAccount elemre kattintva a userAccount értéket a href-hez illesztjük...
+ $('body').bind('click', function(event) {
+ element = $(event.target);
+ if (element.hasClass('gotoCreateAccount')) {
+ var userAccount = element.prev('input').val();
+ if (userAccount == '') {
+ userAccount = element.attr('title');
+ element.prev('input').val(userAccount);
+ ajaxRequest(element.closest('form'));
+ }
+ }
+ if (element.hasClass('edit')) {
+ showUpdateLayer(event);
+ }
+ });
+
+ /* Jogviszonyváltozás kezelése - záradékok és egyéb paraméterek megjelenítése */
+ $('.rejtett').hide();
+ $('#jogviszonyValtasSelect').bind('change', function(event) {
+ element = $(event.target);
+ statusz = element.val();
+ $('.rejtett').hide();
+
+ if (statusz == 'jogviszonya lezárva') {
+ $('#lezaras').show();
+ if ($('#lezarasZaradek').val() == 41) $('#igazolatlan').show();
+ else if ($('#lezarasZaradek').val == 45) $('#iskola').show();
+ } else if (statusz == 'jogviszonya felfüggesztve') $('#felfuggesztes').show();
+ });
+ $('#lezarasZaradek').bind('change', function(event) {
+ element = $(event.target);
+ var zaradekIndex = element.val();
+ if (zaradekIndex == 41) $('#igazolatlan').show();
+ else $('#igazolatlan').hide();
+ if (zaradekIndex == 45) $('#iskola').show();
+ else $('#iskola').hide();
+ });
+
+ /* A prototype activate() metódusának kiváltása */
+ activateField = function(id) {
+ $('#'+id).focus().select().mouseup(function(event){
+ event.preventDefault();
+ });
+ };
+
+ /*
+ Az oktatási azonosító
+ 11 jegyű, az első jegye 7, a 11. jegye ellenőrző kód: sum(i*xi) % 11, ahol a 10-es maradék nem megengedett
+
+ 9. számú melléklet a 79/2006. (IV. 5.) Korm. rendelethez
+ A hallgatói és az oktatói azonosító szám képzésének szabálya
+ 1. Az azonosító szám tizenegy jegyű szám.
+ 2. Az azonosító szám képzése:
+ a) az 1. számjegy konstans 7-es szám,
+ b) a 2-10. számjegyek összessége egy garantáltan egyedi,
+ véletlenszerűen generált szám,
+ c) a 11. számjegy az 1-10. számjegyek felhasználásával, matematikai
+ módszerekkel képzett ellenőrző szám.
+ 3. Az azonosító szám 11. számjegyét úgy kell képezni, hogy a 2. a)-b)
+ pontok szerint képzett 10 számjegy mindegyikét szorozni kell azzal a
+ sorszámmal, ahányadik helyet foglalja el az azonosító számon belül.
+ (Első számjegy szorozva eggyel, második számjegy szorozva kettővel és
+ így tovább.)
+ Az így kapott szorzatok összegét el kell osztani 11-gyel, és az osztás
+ maradéka a 11. számjeggyel lesz egyenlő.
+
+ A 2. b) pont szerinti sorszám nem adható ki, ha a 11-gyel való osztás
+ maradéka egyenlő tízzel.
+ */
+ $('#oId').bind('change', function(event) {
+
+ element = $(event.target);
+ oId = element.val();
+
+ var oIdString = String(oId);
+ if (oIdString.length != 11) {
+ alert('Hibás oktatási azonosító! (nem 11 jegyű)');
+ setTimeout('activateField(\'oId\')',100);
+ return false;
+ }
+ if (oIdString.substring(0,1) != '7') {
+ alert('Hibás oktatási azonosító! (első jegy nem 7-es)');
+ setTimeout('activateField(\'oId\')',100);
+ return false;
+ }
+ var chk = 0;
+ for (i = 0; i < 10; i++) {
+ chk += (i+1)*oIdString.substring(i,i+1);
+ }
+ chk = chk % 11;
+ if (chk == 10) {
+ alert('Hibás oktatási azonosító! (a 11-el vett osztási maradék nem lehet 10)');
+ setTimeout('activateField(\'oId\')',100);
+ return false;
+ }
+ if (chk != +oIdString.substring(10)) {
+ alert('Hibás oktatási azonosító! (Az ellenőrző összeg nem egyezik az utolsó számjeggyel)');
+ setTimeout('activateField(\'oId\')',100);
+ return false;
+ }
+ return true;
+ });
+ /*
+ Adóazonosító
+ 10 jegyű,
+ az 1. jegy 8
+ !! - a 2-6. számjegyek a személy születési időpontja és az 1867. január 1. között eltelt napok száma,
+ a 10. jegye ellenőrző kód: sum(i*xi) % 11, ahol a 10-es maradék nem megengedett
+ */
+ if ($('#adoazonosito')) $('#adoazonosito').bind('change', function(event) {
+
+ element = $(event.target);
+ aa = element.val();
+
+ var aaString = String(aa);
+ if (aaString.length != 10) {
+ alert('Hibás adóazonosító! (nem 10 jegyű)');
+ setTimeout('activateField(\'adoazonosito\')',100);
+ return false;
+ }
+ if (aaString.substring(0,1) != '8') {
+ alert('Hibás adóazonosító! (első jegy nem 8-as - magánszemély)');
+ setTimeout('activateField(\'adoazonosito\')',100);
+ return false;
+ }
+ var chk = 0;
+ for (i = 0; i < 9; i++) {
+ chk += (i+1)*aaString.substring(i,i+1);
+ }
+ chk = chk % 11;
+ if (chk == 10) {
+ alert('Hibás adóazonosító! (a 11-el vett osztási maradék nem lehet 10)');
+ setTimeout('activateField(\'adoazonosito\')',100);
+ return false;
+ }
+ if (chk != +aaString.substring(9)) {
+ alert('Hibás adóazonosító! (Az ellenőrző összeg nem egyezik az utolsó számjeggyel)');
+ setTimeout('activateField(\'adoazonosito\')',100);
+ return false;
+ }
+ return true;
+ });
+
+ /*
+ A TAJ
+ 9 jegyű, az első 8 egy folyamatos sorszám, a 9. CDV kód: sum(1-4)(3*x(2i-1)+7*x(2i)) % 10
+ */
+ $('#tajSzam').bind('change', function(event) {
+
+ element = $(event.target);
+ tajSzam = element.val();
+
+ var tajString = String(tajSzam);
+ if (tajString.length != 9) {
+ alert('Hibás Társadalombiztosítási Azonosító Jel! (nem 9 jegyű)');
+ setTimeout('activateField(\'tajSzam\')',100);
+ return false;
+ }
+ var chk = 0;
+ for (i = 0; i < 4; i++) {
+ chk += 3*tajString.substring(2*i,2*i+1)+7*tajString.substring(2*i+1,2*i+2);
+ }
+ chk = chk % 10;
+ if (chk != +tajString.substring(8)) {
+ alert('Hibás Tásradalombiztosítási Azonosító Jel! (Az ellenőrző összeg nem egyezik az utolsó számjeggyel)');
+ setTimeout('activateField(\'tajSzam\')',100);
+ return false;
+ }
+ return true;
+ });
+
+ /*
+ A Diákigazolvány szám
+ 10 jegyű
+ */
+ $('#diakigazolvanySzam').bind('change', function(event) {
+
+ element = $(event.target);
+ dSzam = element.val();
+
+ var dString = String(dSzam);
+ if (dString.length < 10) {
+ alert('Hibás Diákigazolvány szám! (kisebb, mint 10 jegyű)');
+ setTimeout('activateField(\'diakigazolvanySzam\')',100);
+ return false;
+ }
+ return true;
+ });
+
+});
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/diakFelmentes.jquery.min.js b/mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/diakFelmentes.jquery.min.js
new file mode 100644
index 00000000..778d0c33
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/diakFelmentes.jquery.min.js
@@ -0,0 +1,9 @@
+$(function() {
+
+ $('.rejtett').hide();
+ $('#t1altipus').change(function() {
+ if ($('#t1altipus').val() =='2') $('#T1b').show();
+ else $('#T1b').hide();
+ });
+
+}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/diakStatusz.jquery.min.js b/mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/diakStatusz.jquery.min.js
new file mode 100644
index 00000000..47108be0
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/diakStatusz.jquery.min.js
@@ -0,0 +1,31 @@
+
+$(function() {
+ $('select.zaradek').change(function(event) {
+ element = $(event.target);
+ if (element.val() == '') {
+ element.closest('form').find('input[type=submit]').hide();
+ element.next('div').html('');
+ } else {
+ var zArray = element.prop('options')[element.prop('selectedIndex')].innerHTML.split('%');
+ var zTxt = '<p>';
+ var tableTxt = '<table>';
+ for (i=0;i<zArray.length;i++) {
+ if (i % 2 == 0) {
+ zTxt = zTxt + zArray[i];
+ } else {
+ zTxt = zTxt + '<span id="'+element.attr('id')+i+'span'+'">'+zArray[i]+'</span>';
+ tableTxt = tableTxt + '<tr><th><label for="'+element.attr('id')+i+'">'+zArray[i]+'</label></th>';
+ tableTxt = tableTxt + '<td><input type="text" name="values[]" value="" id="'+element.attr('id')+i+'" class="onChangeReplaceSpan" /></td></tr>';
+ }
+ }
+ tableTxt = tableTxt + '</table>';
+ zTxt = '<p>' + zTxt + '</p>' + tableTxt;
+ element.next('div').html(zTxt);
+ element.next('div').find('table input[type=text]').change(function(event) {
+ var element = $(event.target);
+ $('#'+element.attr('id')+'span').innerHTML=element.val().escapeHTML();
+ });
+ element.closest('form').find('input[type=submit]').show();
+ }
+ });
+});
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/diakSzulo.jquery.min.js b/mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/diakSzulo.jquery.min.js
new file mode 100644
index 00000000..35e83089
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/diakSzulo.jquery.min.js
@@ -0,0 +1,18 @@
+
+$(function() {
+ $('#szuletesiEv').change(function(event) {
+ var element = $(event.target);
+ var dSzam = element.val();
+ var dString = String(dSzam);
+ if (dString.length != 4) {
+ alert('Hibás évszám! (nem 4 jegyű)');
+// setTimeout('document.getElementById(\'szuletesiEv\').activate()',1000);
+ setTimeout('$(\'#szuletesiEv\').focus().select()',100);
+
+ return false;
+ }
+ return true;
+
+ });
+});
+
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/diakTankorJelentkezes.jquery.min.js b/mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/diakTankorJelentkezes.jquery.min.js
new file mode 100644
index 00000000..abb82689
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/diakTankorJelentkezes.jquery.min.js
@@ -0,0 +1,56 @@
+$(function() {
+ $('table.tankor tr').hover(function(event) {
+ var element = $(event.target);
+ element.closest('tr').addClass('ez');
+ $($(this).attr('class').split(' ')).each(function() {
+ if (this != '') {
+ $('table.tankor tr.'+this+':not(.benne):not(.ez)').addClass('utkozik');
+ }
+ });
+ },function(event) {
+ $('table.tankor tr').removeClass('utkozik').removeClass('ez');
+ });
+});
+
+/*
+
+Event.observe(window, 'load', myPSFLoader, false);
+
+
+function myPSFLoader(evt) {
+
+ $$('table.tankor tr').each(
+ function (elem, index) {
+
+ if (elem.getAttribute('class') != null) {
+ Event.observe(elem, 'mouseover', function(event) {
+
+ var element = $(Event.element(event));
+ var trElement = element.up('tr');
+ var classNames = $w(trElement.className.split('benne').join(' '));
+ if (classNames.length > 0) {
+ var tdElements = $$('tr.'+classNames.join(' td, tr.')+' td');
+ for (i=0; i<tdElements.length; i++) {
+ if (tdElements[i].up('tr') != trElement) tdElements[i].addClassName('utkozik');
+ }
+ }
+
+ });
+ Event.observe(elem, 'mouseout', function(event) {
+
+ var element = $(Event.element(event));
+// var classNames = $w(element.up('tr').className);
+ var trElement = element.up('tr');
+ var classNames = $w(trElement.className.split('benne').join(' '));
+ if (classNames.length > 0) {
+ var tdElements = $$('tr.'+classNames.join(' td, tr.')+' td');
+ for (i=0; i<tdElements.length; i++) tdElements[i].removeClassName('utkozik');
+ }
+ });
+
+ }
+
+ }
+ );
+}
+*/ \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/kepesitesek.jquery.min.js b/mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/kepesitesek.jquery.min.js
new file mode 100644
index 00000000..75cd36c3
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/kepesitesek.jquery.min.js
@@ -0,0 +1,64 @@
+
+ processJSONDelTargy = function(msg, element) {
+
+ console.log(msg);
+ element.closest('li').remove();
+
+ }
+ processJSONDelTanar = processJSONDelTargy;
+
+$(function() {
+
+ var params = $.parseParams(window.location.toString().split('?')[1] || '' );
+ var sessionID=params.sessionID?params.sessionID:'';
+
+ $('body').click(function(event) {
+
+ element = $(event.target);
+
+ if (element.hasClass('delTargy')) {
+ targyId = element.data('targyid');
+ kepesitesId = element.data('kepesitesid');
+
+ postData = { 'action':'delTargy', 'targyId':targyId, 'kepesitesId':kepesitesId }
+ saltName = $('#kepesitesForm input.salt').prop('name');
+ saltValue = $('#kepesitesForm input.salt').val();
+ postData[saltName] = saltValue;
+
+ $.ajax({
+ type: "POST",
+ url: "index.php?page=naplo&sub=intezmeny&f=kepesitesek&policy=private&skin=ajax&sessionID="+sessionID,
+ data: postData,
+ dataType: 'json'
+ }).done(function( msg, status, jqXHR ) {
+ updateSalt(jqXHR.getResponseHeader('Etag'));
+ processJSONDelTargy(msg, element);
+ });
+
+
+ } else if (element.hasClass('delTanar')) {
+ tanarId = element.data('tanarid');
+ kepesitesId = element.data('kepesitesid');
+
+ postData = { 'action':'delTanar', 'tanarId':tanarId, 'kepesitesId':kepesitesId }
+ saltName = $('#kepesitesForm input.salt').prop('name');
+ saltValue = $('#kepesitesForm input.salt').val();
+ postData[saltName] = saltValue;
+
+ $.ajax({
+ type: "POST",
+ url: "index.php?page=naplo&sub=intezmeny&f=kepesitesek&policy=private&skin=ajax&sessionID="+sessionID,
+ data: postData,
+ dataType: 'json'
+ }).done(function( msg, status, jqXHR ) {
+ updateSalt(jqXHR.getResponseHeader('Etag'));
+ processJSONDelTanar(msg, element);
+ });
+
+
+ }
+
+ });
+
+
+}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/kepzesOraterv.jquery.min.js b/mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/kepzesOraterv.jquery.min.js
new file mode 100644
index 00000000..6abc9f50
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/kepzesOraterv.jquery.min.js
@@ -0,0 +1,48 @@
+
+$(function() {
+
+
+ $('#targySel').change(function(event) {
+
+ element = $(event.target);
+ kovetelmeny = element.find('option:selected').data('kovetelmeny');
+ element.closest('th').nextAll('td').find('select option[value="'+kovetelmeny+'"]').prop('selected',true);
+
+ });
+ $('body').click(function(event) {
+ element = $(event.target);
+ if (element.closest('span#felevValtas').length == 1) {
+ if (element.hasClass('felev1')) {
+ $('form.kepzesOraterv table tr.rogzitett .felev1').hide();
+ $('form.kepzesOraterv table tr.rogzitett .felev2').slideDown('slow');
+ $('form.kepzesOraterv table thead .felev1').hide();
+ $('form.kepzesOraterv table thead .felev2').slideDown('slow');
+ } else if (element.hasClass('felev2')) {
+ $('form.kepzesOraterv table tr.rogzitett .felev2').hide();
+ $('form.kepzesOraterv table tr.rogzitett .felev1').slideDown('slow');
+ $('form.kepzesOraterv table thead .felev2').hide();
+ $('form.kepzesOraterv table thead .felev1').slideDown('slow');
+ }
+ } else if (element.closest('span#oraszamKovetelmeny').length == 1) {
+ if (element.hasClass('oraszam')) {
+ $('form.kepzesOraterv table tr.rogzitett span.oraszam').hide();
+ $('form.kepzesOraterv table tr.rogzitett span.kovetelmeny').slideDown('slow');
+ $('form.kepzesOraterv table thead span.oraszam').hide();
+ $('form.kepzesOraterv table thead span.kovetelmeny').slideDown('slow');
+ } else if (element.hasClass('kovetelmeny')) {
+ $('form.kepzesOraterv table tr.rogzitett span.kovetelmeny').hide();
+ $('form.kepzesOraterv table tr.rogzitett span.oraszam').slideDown('slow');
+ $('form.kepzesOraterv table thead span.kovetelmeny').hide();
+ $('form.kepzesOraterv table thead span.oraszam').slideDown('slow');
+ }
+ } else if (element.closest('tr.rogzitett').length == 1) {
+ element.closest('tr').find('td span').hide();
+ element.closest('tr').removeClass('rogzitett').addClass('szerkeszt');
+ element.closest('tr').find('td div').slideDown();
+/*
+ element.closest('tr').find('input').show();
+ element.closest('tr').find('select').show();
+*/ }
+ });
+
+}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/osztaly.jquery.min.js b/mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/osztaly.jquery.min.js
new file mode 100644
index 00000000..fe003893
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/osztaly.jquery.min.js
@@ -0,0 +1,57 @@
+
+$(function () {
+
+ var evfolyamJelek = [];
+ $('body').change(function(event) {
+
+ element = $(event.target);
+
+ if (element.attr('id')=='osztalyJellegId') {
+ if (element.val() != '') {
+ element.closest('div').nextAll('div').slideUp();
+ $('#divKezdoTanev').slideDown().focus();
+ element.data('evfolyamjelek',element.find('option:selected').data('evfolyamjelek'));
+ evfolyamJelek = $('#osztalyJellegId').data('evfolyamjelek');
+ $('span#kezdoEvfolyamJel').html(evfolyamJelek[0]);
+ }
+ } else if (element.attr('id')=='kezdoTanev') {
+ if (element.val() != '') {
+ $('#vegzoTanev option:selected').prop('selected',false);
+ $('#vegzoTanev').find('option').prop('disabled',true).hide();
+ $('#vegzoTanev').find('option:first-child').prop('disabled',false).show();
+ vtOptions = $('#vegzoTanev').find('option').get();
+ i=0;
+ while (i<vtOptions.length && $(vtOptions[i]).val() != element.val()) i++;
+ for (j=i; j<vtOptions.length && j < i+evfolyamJelek.length; j++) $(vtOptions[j]).prop('disabled',false).show();
+ $('#divVegzoTanev').slideDown().focus();
+ }
+ } else if (element.attr('id') == 'vegzoTanev') {
+
+ ulStr = 'Kezdés évfolyama: <ul id="evfolyamJelek">';
+ maxKS = evfolyamJelek.length-($('#vegzoTanev').val()-$('#kezdoTanev').val());
+ osztalyJel = $('#jel').val();
+ for (i=0; i<evfolyamJelek.length; i++) {
+ if (i<$('#vegzoTanev').val()-$('#kezdoTanev').val()+1) ulStr += '<li class="kivalasztott">';
+ else ulStr += '<li>';
+ ulStr += evfolyamJelek[i]+'.&nbsp;<span class="osztalyJel">'+(osztalyJel==''?'?':osztalyJel)+'</span>';
+ if (i < maxKS) ulStr += '<br /><input type="radio" name="kezdoEvfolyamSorszam" value="'+(i+1)+'" '+(i==0?' checked="checked" ':'')+'/>';
+ ulStr += '</li>';
+ }
+ ulStr += '</ul>';
+ $('#divKezdoEvfolyamSorszam').html(ulStr);
+ $('#divJel').slideDown().focus();
+ $('#divKezdoEvfolyamSorszam').slideDown();
+ } else if (element.closest('ul').attr('id') == 'evfolyamJelek') {
+ element.closest('ul').find('li').removeClass('kivalasztott');
+ e = element.closest('li'); i=0;
+ while (i<$('#vegzoTanev').val()-$('#kezdoTanev').val()+1) {
+ e.addClass('kivalasztott');
+ e = e.next('li');
+ i++;
+ }
+ } else if (element.attr('id') == 'jel') {
+ $('#divKezdoEvfolyamSorszam li span.osztalyJel').html(element.val());
+ $('#divLeirasTelephely').slideDown();
+ }
+ });
+});
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/tanar.jquery.min.js b/mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/tanar.jquery.min.js
new file mode 100644
index 00000000..a23b0c80
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/tanar.jquery.min.js
@@ -0,0 +1,41 @@
+
+
+$(function() {
+
+ $('body').click(function(event) {
+
+ element = $(event.target);
+ if (element.hasClass('slideUj')) {
+ $('tr#ujKepesites').slideToggle('slow');
+ }
+
+ });
+
+ $('select#statusz').change(function(event) {
+ element = $(event.target);
+ if (element.val() != 'jogviszonya lezárva') {
+ if (IsDate($('input#kiDt').val())) {
+ curdate = new Date();
+ date = new Date($('input#kiDt').val());
+ if (date<curdate) {
+ $('input#kiDt').val('');
+ $('input#kiDt').change();
+ }
+ }
+ }
+ });
+
+ $('input#kiDt').change(function(event) {
+ element = $(event.target);
+ if (IsDate(element.val())) {
+ curdate = new Date();
+ date = new Date(element.val());
+ if (date<curdate) {
+ $('select#statusz option#jogviszonyaLezarva').prop('selected',true).prop('disabled',false);
+ $('select#statusz').change();
+ }
+ } else {
+ }
+ });
+
+}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/tankor.jquery.min.js b/mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/tankor.jquery.min.js
new file mode 100644
index 00000000..29c0713b
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/tankor.jquery.min.js
@@ -0,0 +1,8 @@
+
+$(function() {
+ $('table.szemeszter input[type=text]').on('change', function(event) {
+ element = $(event.target);
+ // le kell védeni a / jelet a selector-ban!
+ $('#c'+element.attr('id').substring(1).replace('/','\\/')).prop('checked', (element.val() != ''));
+ });
+});
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/tankorDiak.jquery.min.js b/mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/tankorDiak.jquery.min.js
new file mode 100644
index 00000000..2f549ff8
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/tankorDiak.jquery.min.js
@@ -0,0 +1,23 @@
+
+$(function() {
+
+ $('body').on('click', function(event) {
+
+ element = $(event.target);
+ if (element.hasClass('setAll')) {
+ tableElement = element.next('td').find('table input[type=checkbox]').click();
+ }
+ if (element.hasClass('setAllFiu')) {
+ //tableElement = $('.egyosztaly input[type=checkbox].fiu').click();
+ //tableElement = element.up('.egyosztaly input[type=checkbox].fiu').click();
+ //console.log(element.prev('table'));
+ tableElement = $('.egyosztaly input[type=checkbox].fiu').click();
+ }
+ if (element.hasClass('setAllLany')) {
+ tableElement = $('.egyosztaly input[type=checkbox].lany').click();
+ }
+
+ });
+
+});
+
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/tankorTanarHozzarendeles.jquery.min.js b/mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/tankorTanarHozzarendeles.jquery.min.js
new file mode 100644
index 00000000..3a5df16f
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/tankorTanarHozzarendeles.jquery.min.js
@@ -0,0 +1,594 @@
+$(function() {
+
+ displayJSONerror = function(json) {
+ alert(JSON.stringify(json));
+ }
+
+ checkOraszam = function(plusz, minusz) {
+ $('table#tt td.lekotott').each(function(index) {
+ checkTanarOraszam($(this), plusz, minusz, false);
+ });
+ $('table#tt span#keszTanarDb').html($('table#tt tr.ok').length);
+ }
+
+ checkTanarOraszam = function(lekotottTd, plusz, minusz, dbFrissit) {
+ lekotott = parseFloat(lekotottTd.find('span.lekotott').html().replace(',','.'));
+ kotelezo = parseFloat(lekotottTd.find('span.kotelezo').html().replace(',','.'));
+ if (lekotott<kotelezo-minusz) lekotottTd.closest('tr').removeClass('ok').removeClass('plusz').addClass('minusz');
+ else if (lekotott>kotelezo+plusz) lekotottTd.closest('tr').removeClass('ok').removeClass('minusz').addClass('plusz');
+ else lekotottTd.closest('tr').removeClass('minusz').removeClass('plusz').addClass('ok');
+
+ if (dbFrissit) $('table#tt span#keszTanarDb').html($('table#tt tr.ok').length);
+ }
+
+ ajaxGetTankorAdat_tth = function(tankorId) {
+ postData = { 'tankorId':tankorId, 'mayorToken': $('body').data('mayortoken') }
+
+ $.ajax({
+ type: "POST",
+ url: "index.php?page=naplo&sub=tools&f=getTankorAdat&policy=private&skin=ajax&sessionID="+$('body').data('sessionID'),
+ data: postData,
+ dataType: 'json'
+ }).done(function( msg, status, jqXHR ) {
+ processJSONTankorAdat_tth(msg);
+ updateSalt(jqXHR.getResponseHeader('Etag'));
+ }).fail(function( jqXHR, textStatus, errorThrown ) {
+ //console.log('fail');
+ //console.log(jqXHR);
+ updateSalt(jqXHR.getResponseHeader('Etag'));
+ });
+ }
+
+ processJSONTankorMod = function( msg ) {
+ // console.log(JSON.stringify(msg));
+ $('#updateWindowSide').data('target').html(msg.tankorNevTargyNelkul);
+ processJSONTankorAdat( msg );
+ }
+
+ processJSONTankorAdat_tth = function( msg ) {
+ //console.log(JSON.stringify(msg));
+
+ $('#updateWindowSideContent').html('');
+ $('#updateWindowSideTitle').html('Tantárgyfelosztás - Tankör');
+ $('<p class="tankorNev">' +msg.tankorNevReszei.evfOszt+' '
+ +msg.tankorNevReszei.targyNev
+ +(msg.tankorNevReszei.tankorJel!=''&&msg.tankorNevReszei.tankorJel!=null?msg.tankorNevReszei.tankorJel+' ':'')
+ +' <span class="tankorNevExtra">'+msg.tankorNevReszei.tankorNevExtra+'</span>'
+ +'<input id="tankorNevExtra" type="text" name="tankorNevExtra" value="'+msg.tankorNevReszei.tankorNevExtra+'" />'
+ +' ('+msg.tankorId+')</p>').appendTo('#updateWindowSideContent');
+ $('<p class="tankorModosit">Módosít!</p>').appendTo('#updateWindowSideContent');
+ // adatok
+ ulStr = '<ul>'
+ +'<li>Évközi követelmény: '+msg.kovetelmeny+'</li>'
+ +'<li>Létszám korlát: '+msg.min+'-'+msg.max+'</li>'
+ +'<li>Tankör-típus: '+msg.rovidNev+' ('+msg.tankorTipusId+')</li>'
+ +'</ul>';
+ $(ulStr).appendTo('#updateWindowSideContent');
+ // osztályok
+ ulStr = '<ul id="tankorOsztaly">';
+ pStr = '<div class="slideToggleContainer" id="pTankorOsztaly">Osztályai: <span class="tankorData slideToggle">';
+ for (i=0; i<msg.osztalyok.length; i++) {
+ ulStr += '<li>'
+ +'<input type="checkbox" name="osztalyId[]" value="'+msg.osztalyok[i].osztalyId+'" id="oTankorId-'+msg.osztalyok[i].osztalyId+'" ';
+ if ($.inArray(msg.osztalyok[i].osztalyId, msg.osztalyIds)>-1) {
+ ulStr += 'checked="checked" ';
+ pStr += msg.osztalyok[i].osztalyJel+' ('+msg.osztalyok[i].osztalyId+') ';
+ }
+ ulStr += '/> '
+ +'<label for="oTankorId-'+msg.osztalyok[i].osztalyId+'">'+msg.osztalyok[i].osztalyJel+' ('+msg.osztalyok[i].osztalyId+')</label></li>';
+ }
+ ulStr += '</ul>';
+ pStr += '</span><span class="icon-chevron-down slideToggle"></span>'+ulStr+'</div>';
+ $(pStr).appendTo('#updateWindowSideContent');
+ // szemeszterek, óraszámok
+ ulStr = '<ul id="tankorSzemeszter">';
+ for (i=0; i<msg.tankorSzemeszter.length; i++) {
+ ulStr += '<li>'+msg.tankorSzemeszter[i].tanev+'/'+msg.tankorSzemeszter[i].szemeszter
+ +'<input maxlength="5" type="text" name="sz-'+msg.tankorSzemeszter[i].tanev+'-'+msg.tankorSzemeszter[i].szemeszter+'" value="'+msg.tankorSzemeszter[i].oraszam+'" />'
+ +'</li>';
+ }
+ ulStr += '</ul>';
+ pStr = '<div class="slideToggleContainer" id="pTankorSzemeszter">Óraszám: <span class="tankorData slideToggle">'+msg.oraszam+' ('+msg.tanev+'/'+msg.szemeszter+')</span>'
+ +'<span class="icon-chevron-down slideToggle"></span>'
+ +ulStr
+ +'</div>';
+ $(pStr).appendTo('#updateWindowSideContent');
+
+ $('#updateWindowSideSub').removeClass('nyitva');
+ if (!$('#updateWindowSide').hasClass('nyitva')) {
+ $('#updateWindowSide').addClass('nyitva');
+ }
+
+ }
+
+ processJSONChk = function(msg, element, tanarId, tankorId) {
+ // console.log(JSON.stringify(msg));
+ tankorTd = $('td#col_'+tankorId);
+ if (element.prop('checked')) {
+ oraPerFo = (parseFloat(tankorTd.data('oraszam').replace(',','.'))/parseInt(tankorTd.data('tanardb')));
+ $('table#tt td.col-'+tankorId+' input:checked').each(function(index) {
+ if ($(this).val() != element.val()) {
+ lSpan = $(this).closest('tr').find('span.lekotott');
+ lekot = parseFloat(lSpan.html().replace(',','.'))-oraPerFo;
+ lSpan.html(lekot.toString().replace('.',','));
+ }
+ });
+ if (!tankorTd.hasClass('kesz')) {
+ tankorTd.addClass('kesz');
+ db = parseInt($('table#tt span#keszTankorDb').html());
+ $('table#tt span#keszTankorDb').html(++db);
+ } else { tankorTd.removeClass('kesz').addClass('tobb') }
+ tankorTd.data('tanardb', parseInt(tankorTd.data('tanardb'))+1);
+ oraPerFo = (parseFloat(tankorTd.data('oraszam').replace(',','.'))/parseInt(tankorTd.data('tanardb')));
+ plusz=parseInt($('div#statusz span#plusz').html());
+ minusz=parseInt($('div#statusz span#minusz').html());
+ $('table#tt td.col-'+tankorId+' input:checked').each(function(index) {
+ {
+ lSpan = $(this).closest('tr').find('span.lekotott');
+ lekot = parseFloat(lSpan.html().replace(',','.'))+oraPerFo;
+ lSpan.html(lekot.toString().replace('.',','));
+ checkTanarOraszam(lSpan.closest('td'), plusz, minusz, true);
+ }
+ });
+ } else {
+ oraPerFo = (parseFloat(tankorTd.data('oraszam').replace(',','.'))/parseInt(tankorTd.data('tanardb')));
+ lSpan = element.closest('tr').find('span.lekotott');
+ lekot = parseFloat(lSpan.html().replace(',','.'))-oraPerFo;
+ lSpan.html(lekot.toString().replace('.',','));
+ $('table#tt td.col-'+tankorId+' input:checked').each(function(index) {
+ {
+ lSpan = $(this).closest('tr').find('span.lekotott');
+ lekot = parseFloat(lSpan.html().replace(',','.'))-oraPerFo;
+ lSpan.html(lekot.toString().replace('.',','));
+ }
+ });
+ if ($('table#tt td.col-'+tankorId+' input:checked').length == 0) {
+ tankorTd.removeClass('kesz');
+ db = parseInt($('table#tt span#keszTankorDb').html());
+ $('table#tt span#keszTankorDb').html(--db);
+ } else if ($('table#tt td.col-'+tankorId+' input:checked').length == 1) tankorTd.removeClass('tobb').addClass('kesz');
+ tankorTd.data('tanardb', parseInt(tankorTd.data('tanardb'))-1);
+ oraPerFo = (parseFloat(tankorTd.data('oraszam').replace(',','.'))/parseInt(tankorTd.data('tanardb')));
+ plusz=parseInt($('div#statusz span#plusz').html());
+ minusz=parseInt($('div#statusz span#minusz').html());
+ checkTanarOraszam(element.closest('tr').find('td.lekotott'), plusz, minusz, true);
+ $('table#tt td.col-'+tankorId+' input:checked').each(function(index) {
+ if ($(this).val() != element.val()) {
+ lSpan = $(this).closest('tr').find('span.lekotott');
+ lekot = parseFloat(lSpan.html().replace(',','.'))+oraPerFo;
+ lSpan.html(lekot.toString().replace('.',','));
+ }
+ checkTanarOraszam($(this).closest('tr').find('td.lekotott'), plusz, minusz, true);
+ });
+ }
+ $('#cell_'+tanarId+'_'+tankorId).animate({backgroundColor: '#00ff00'}, 100).animate({backgroundColor: '#eeeeee'}, 1000);
+ }
+
+
+
+//////////////////////////////////ITT VOLT AZ ELEJE
+ // TODO - ezt kivenni
+ var params = $.parseParams(window.location.toString().split('?')[1] || '' );
+ var sessionID=params.sessionID?params.sessionID:'';
+ $('body').data('sessionID',sessionID); // ez nem lenne szukseges. lasd meg data-sessionid
+
+ checkOraszam(2,2);
+
+ $('body').click(function(event) {
+
+ element = $(event.target);
+ saltName = $('#updateForm input.salt').prop('name');
+ saltValue = $('#updateForm input.salt').val();
+
+ if (element.attr('id')=='szuro') {
+ $('#updateWindowSideTitle').html('Szűrés');
+
+ dStr = '<form method="post" action="">';
+ dStr += '<input type="hidden" class="salt" name="'+saltName+'" value="'+saltValue+'" />';
+ dStr += '<input type="hidden" class="mayorToken" name="mayorToken" value="'+ ($('body').data('mayortoken')) +'" />';
+
+ // Osztályok
+ ulStr = '<ul>'; spanStr = '';
+ for (i=0; i<$('#szuro').data('szuro').osztalyok.length; i++) {
+ oAdat = $('#szuro').data('szuro').osztalyok[i];
+ ulStr += '<li>'
+ +'<input class="szOsztaly" id="szOsztalyId-'+oAdat['osztalyId']+'" type="checkbox" name="osztalyIds[]" value="'+oAdat['osztalyId']+'"';
+ if ($.inArray(parseInt(oAdat['osztalyId']), $('#szuro').data('szuro').osztalyIds)>-1) {
+ ulStr += ' checked="checked" ';
+ spanStr += '<span id="selOsztalyId-'+oAdat['osztalyId']+'"> '+oAdat['osztalyJel']+' ('+oAdat['osztalyId']+')</span>';
+ }
+ ulStr += '/><label for="szOsztalyId-'+oAdat['osztalyId']+'">'+oAdat['osztalyJel']+' ('+oAdat['osztalyId']+')</label></li>';
+ }
+ ulStr += '</ul>';
+ dStr += '<div id="szOsztaly" class="slideContainer">'
+ +'<span class="slider icon-chevron-down"></span>'
+ +'<span class="icon-minus-sign unset"></span> '
+ +'<strong class="slider">Osztályok:</strong> '+spanStr;
+ dStr += ulStr;
+ dStr += '</div>';
+
+ // Munkaközösségek
+ ulStr = '<ul>'; spanStr = '';
+ for (i=0; i<$('#szuro').data('szuro').munkakozossegek.length; i++) {
+ oAdat = $('#szuro').data('szuro').munkakozossegek[i];
+ ulStr += '<li>'
+ +'<input class="szMk" id="szMkId-'+oAdat['mkId']+'" type="checkbox" name="mkIds[]" value="'+oAdat['mkId']+'"';
+ if ($.inArray(parseInt(oAdat['mkId']), $('#szuro').data('szuro').mkIds)>-1) {
+ ulStr += ' checked="checked" ';
+ spanStr += '<br/><span id="selMkId-'+oAdat['mkId']+'"> '+oAdat['mkNev']+' ('+oAdat['mkId']+')</span>';
+ }
+ ulStr += '/><label for="szMkId-'+oAdat['mkId']+'">'+oAdat['mkNev']+' ('+oAdat['mkId']+')</label></li>';
+ }
+ ulStr += '</ul>';
+ dStr += '<div id="szMk" class="slideContainer">'
+ +'<span class="slider icon-chevron-down"></span>'
+ +'<span class="icon-minus-sign unset"></span> '
+ +'<strong class="slider">Munkaközösségek:</strong> '+spanStr;
+ dStr += ulStr;
+ dStr += '</div>';
+
+ // Tárgyak
+ ulStr = '<ul>'; spanStr = '';
+ for (i=0; i<$('#szuro').data('szuro').targyak.length; i++) {
+ oAdat = $('#szuro').data('szuro').targyak[i];
+ ulStr += '<li>'
+ +'<input class="szTargy" id="szTargyId-'+oAdat['targyId']+'" type="checkbox" name="targyIds[]" value="'+oAdat['targyId']+'"';
+ if ($.inArray(parseInt(oAdat['targyId']), $('#szuro').data('szuro').targyIds)>-1) {
+ ulStr += ' checked="checked" ';
+ spanStr += '<br/><span id="selTargyId-'+oAdat['targyId']+'"> '+oAdat['targyNev']+' ('+oAdat['targyId']+')</span>';
+ }
+ ulStr += '/><label for="szTargyId-'+oAdat['targyId']+'">'+oAdat['targyNev']+' ('+oAdat['targyId']+')</label></li>';
+ }
+ ulStr += '</ul>';
+ dStr += '<div id="szTargy" class="slideContainer">'
+ +'<span class="slider icon-chevron-down"></span>'
+ +'<span class="icon-minus-sign unset"></span> '
+ +'<strong class="slider">Tárgyak:</strong> '+spanStr;
+ dStr += ulStr;
+ dStr += '</div>';
+
+ // Tanárok
+ ulStr = '<ul>'; spanStr = '';
+ ulStr += '<li class="tanarNelkuli">'
+ +'<input class="szTanar" id="szTanarNelkuliTankorok" type="checkbox" name="tanarNelkuliTankorok" value="true"';
+ if ( $('#szuro').data('szuro').tanarNelkuliTankorok ) {
+ ulStr += ' checked="checked" ';
+ spanStr += '<br/><span id="selTanarId-0">Tanár nélküli tankörök</span>';
+ }
+ ulStr += '/><label for="szTanarNelkuliTankorok">Tanár nélküli tankörök</label></li>';
+
+ for (i=0; i<$('#szuro').data('szuro').tanarok.length; i++) {
+ oAdat = $('#szuro').data('szuro').tanarok[i];
+ ulStr += '<li>'
+ +'<input class="szTanar" id="szTanarId-'+oAdat['tanarId']+'" type="checkbox" name="tanarIds[]" value="'+oAdat['tanarId']+'"';
+ if ($.inArray(parseInt(oAdat['tanarId']), $('#szuro').data('szuro').tanarIds)>-1) {
+ ulStr += ' checked="checked" ';
+ spanStr += '<br/><span id="selTanarId-'+oAdat['tanarId']+'"> '+oAdat['tanarNev']+' ('+oAdat['tanarId']+')</span>';
+ }
+ ulStr += '/><label for="szTanarId-'+oAdat['tanarId']+'">'+oAdat['tanarNev']+' ('+oAdat['tanarId']+')</label></li>';
+ }
+ ulStr += '</ul>';
+ dStr += '<div id="szTanar" class="slideContainer">'
+ +'<span class="slider icon-chevron-down"></span>'
+ +'<span class="icon-minus-sign unset"></span> '
+ +'<strong class="slider">Tanárok:</strong> '+spanStr;
+ dStr += ulStr;
+ dStr += '</div>';
+
+
+
+ dStr += '<input type="submit" value="Szűrés" />';
+ dStr += '</form>';
+ $('#updateWindowSideContent').html('');
+ $(dStr).appendTo('#updateWindowSideContent');
+
+ $('#updateWindowSideSub').removeClass('nyitva');
+ $('#updateWindowSide').addClass('nyitva');
+
+ } else if (element.hasClass('slideContainer') || element.hasClass('slideToggleContainer')) {
+ element.find('ul').slideToggle(75);
+ element.find('span.slider').toggleClass('icon-chevron-down').toggleClass('icon-chevron-up');
+ } else if (element.hasClass('slider') || element.hasClass('slideToggle')) {
+ element.closest('div').find('ul').slideToggle(75);
+ element.closest('div').find('span.slider').toggleClass('icon-chevron-down').toggleClass('icon-chevron-up');
+ } else if (element.hasClass('tankor')) {
+ // console.log(element);
+ $('#updateWindowSide').data('target',element);
+ ajaxGetTankorAdat_tth(element.data('tankorid'));
+ } else if (element.hasClass('tankorNevExtra')) {
+ element.next('input#tankorNevExtra').show();
+ element.hide();
+ } else if (element.hasClass('tankorModosit')) {
+ postData = { 'tankorId':$('#updateWindowSide').data('target').data('tankorid'),'osztalyIds': [], 'tankorSzemeszter': [], 'tankorNevExtra': $('#updateWindowSide input#tankorNevExtra').val() }
+ $('#updateWindowSide ul#tankorOsztaly input:checked').each(function(index){postData.osztalyIds.push($(this).val());})
+ $('#updateWindowSide ul#tankorSzemeszter input[type=text]').each(function(index){
+ if ($(this).val() != '') {
+ tmp = $(this).attr('name').split('-');
+ postData.tankorSzemeszter.push({'tanev':tmp[1], 'szemeszter': tmp[2], 'oraszam': $(this).val() });
+ }
+ });
+
+ $.ajax({
+ type: "POST",
+ url: "index.php?page=naplo&sub=tools&f=tankorMod&policy=private&skin=ajax&sessionID="+sessionID,
+ data: postData,
+ dataType: 'json'
+ }).done(function( msg, status, jqXHR ) {
+ processJSONTankorMod(msg);
+ updateSalt(jqXHR.getResponseHeader('Etag'));
+ }).fail(function( jqXHR, textStatus, errorThrown ) {
+ updateSalt(jqXHR.getResponseHeader('Etag'));
+ // console.log('fail');
+ // console.log(jqXHR);
+ });
+ } else if (element.hasClass('tantan') && !element.hasClass('disable')) {
+ chkElement = element.find('input[type=checkbox]');
+ chkElement.click();
+ } else if (element.attr('id') == 'plusz' || element.attr('id') == 'minusz') {
+ element.find('ul.limit').slideToggle(85);
+ } else if (element.hasClass('setLimit')) {
+ spanElement = element.closest('span');
+ ulElement = element.closest('ul.limit');
+ ulElement.slideUp().detach();
+ spanElement.html(' '+element.html());
+ ulElement.appendTo(spanElement);
+ plusz=parseInt($('div#statusz span#plusz').html());
+ minusz=parseInt($('div#statusz span#minusz').html());
+ checkOraszam(plusz, minusz);
+ } else if (element.hasClass('targy')) {
+ targyId = element.data('targyid');
+ szurtTargyId = $('table#tt').data('szurtTargyId');
+ if (szurtTargyId == targyId) {
+ // szűrés megszüntetése
+ $('table#tt tr.tanar').not('.targy'+szurtTargyId).removeClass('szurt');
+ $('table#tt').data('szurtTargyId','');
+ } else {
+ // szűrni kell
+ if (szurtTargyId != '') {
+ // egy másik szűrés volt eddig - megszűntettjük
+ $('table#tt tr.tanar').not('.targy'+szurtTargyId).removeClass('szurt');
+ }
+ $('table#tt tr.tanar').not('.targy'+targyId).addClass('szurt');
+ $('table#tt').data('szurtTargyId',targyId);
+ }
+ // szűrés miatt az első látható cella eltűnhet, módosulhat
+ if ($('tr.tanar.first').hasClass('szurt')) {
+ trElements = $('tr.tanar.first').nextAll('tr.tanar').not('.szurt').get();
+ if (trElements.length>0) {
+ $('tr.tanar.first').removeClass('first');
+ $(trElements[0]).addClass('first');
+ } else {
+ // ha nincs lefele látható sor, akkor felfelé keresünk...
+ trElements = $('tr.tanar.first').prevAll('tr.tanar').not('.szurt').get();
+ if (trElements.length>0) {
+ $('tr.tanar.first').removeClass('first');
+ $(trElements[0]).addClass('first').removeClass('csukott');
+ $(trElements[0]).nextAll('tr').removeClass('csukott');
+ }
+ }
+ }
+ } else if (element.hasClass('unset')) {
+ element.closest('div').find('input[type=checkbox]:checked').click();
+ } else if (element.hasClass('toggleKesz')) {
+/* ez meg nem mukodik
+ $('table#tt td.tankor.kesz').each(function(index) {
+ className = 'col-'+$(this).data('tankorid');
+ $('table#tt td.tantan.'+className).toggleClass('szurt');
+ $(this).toggleClass('szurt');
+ thTargy = $('table#tt th#thTargy-'+$(this).data('targyid'));
+ colSpan = $('table#tt td.tdTargy-'+$(this).data('targyid')).not('.szurt').length;
+ thTargy.prop('colspan',colSpan);
+ if (colSpan==0) thTargy.addClass('szurt');
+ else thTargy.removeClass('szurt');
+ });
+*/
+ }
+
+ });
+
+ $('body').change(function(event) {
+
+ element = $(event.target);
+
+ if (element.hasClass('szOsztaly')) {
+ if (element.prop('checked')) {
+ $('#szuro').data('szuro').osztalyIds.push( element.val() );
+ $('<span id="selOsztalyId-'+element.val()+'"> '+element.next('label').html()+'</span>').insertAfter('div#szOsztaly strong');
+ } else {
+ $('div#szOsztaly span#selOsztalyId-'+element.val()).prev('br').remove();
+ $('div#szOsztaly span#selOsztalyId-'+element.val()).remove();
+ tmp = $('#szuro').data('szuro').osztalyIds;
+ $('#szuro').data('szuro').osztalyIds = [];
+ for (i=0; i<tmp.length; i++) if (tmp[i] != element.val()) $('#szuro').data('szuro').osztalyIds.push(tmp[i]);
+ }
+ } else if (element.hasClass('szMk')) {
+ if (element.prop('checked')) {
+ $('#szuro').data('szuro').mkIds.push( element.val() );
+ $('<br /><span id="selMkId-'+element.val()+'"> '+element.next('label').html()+'</span>').insertAfter('div#szMk strong');
+ } else {
+ $('div#szMk span#selMkId-'+element.val()).prev('br').remove();
+ $('div#szMk span#selMkId-'+element.val()).remove();
+ tmp = $('#szuro').data('szuro').mkIds;
+ $('#szuro').data('szuro').mkIds = [];
+ for (i=0; i<tmp.length; i++) if (tmp[i] != element.val()) $('#szuro').data('szuro').mkIds.push(tmp[i]);
+ }
+ } else if (element.hasClass('szTanar')) {
+ if (element.prop('checked')) {
+ $('#szuro').data('szuro').tanarIds.push( element.val() );
+ $('<br /><span id="selTanarId-'+element.val()+'"> '+element.next('label').html()+'</span>').insertAfter('div#szTanar strong');
+ } else {
+ $('div#szTanar span#selTanarId-'+element.val()).prev('br').remove();
+ $('div#szTanar span#selTanarId-'+element.val()).remove();
+ tmp = $('#szuro').data('szuro').tanarIds;
+ $('#szuro').data('szuro').tanarIds = [];
+ for (i=0; i<tmp.length; i++) if (tmp[i] != element.val()) $('#szuro').data('szuro').tanarIds.push(tmp[i]);
+ }
+ } else if (element.hasClass('szTargy')) {
+ if (element.prop('checked')) {
+ $('#szuro').data('szuro').targyIds.push( element.val() );
+ $('<br /><span id="selTargyId-'+element.val()+'"> '+element.next('label').html()+'</span>').insertAfter('div#szTargy strong');
+ } else {
+ $('div#szTargy span#selTargyId-'+element.val()).prev('br').remove();
+ $('div#szTargy span#selTargyId-'+element.val()).remove();
+ tmp = $('#szuro').data('szuro').targyIds;
+ $('#szuro').data('szuro').targyIds = [];
+ for (i=0; i<tmp.length; i++) if (tmp[i] != element.val()) $('#szuro').data('szuro').targyIds.push(tmp[i]);
+ }
+ } else if (element.closest('div').hasClass('slideToggleContainer')) {
+ element.closest('div').find('span.tankorData').addClass('changed');
+ $('#updateWindowSideContent p.tankorModosit').slideDown();
+ } else if (element.attr('id')=='tankorNevExtra') {
+ if (!element.prev('span.tankorNevExtra').hasClass('changed')) {
+ element.prev('span.tankorNevExtra').addClass('changed');
+ $('#updateWindowSideContent p.tankorModosit').slideDown();
+ }
+ } else if (element.hasClass('chkTT')) {
+ saltName = $('#updateForm input.salt').prop('name');
+ saltValue = $('#updateForm input.salt').val();
+ var chkData = element.val().split('_');
+ var tanarId = chkData[0];
+ var tankorId = chkData[1];
+ if(element.prop('checked')) ajaxAction='tankorTanarFelvesz';
+ else ajaxAction='tankorTanarTorol';
+
+ var postData = { 'action':ajaxAction ,'tankorId':tankorId, 'tanarId':tanarId, 'sessionID':sessionID, 'mayorToken': ($('body').data('mayortoken')) };
+ postData[saltName] = saltValue;
+
+ $('#cell_'+tanarId+'_'+tankorId).animate({backgroundColor: '#aaaaaa'}, 10);
+ // TODO: a requestet meg kellene várnunk! ??
+ $.ajax({
+ type: "POST",
+ url: "?page=naplo&sub=intezmeny&f=tankorTanarHozzarendeles&policy=private&skin=ajax&sessionID="+sessionID,
+ data: postData,
+ dataType: 'json'
+ }).done(function( msg, status, jqXHR ) {
+ processJSONChk(msg, element, tanarId, tankorId);
+ updateSalt(jqXHR.getResponseHeader('Etag'));
+ }).fail(function(jqXHR, textStatus) {
+ displayJSONerror(jqXHR.responseJSON);
+ updateSalt(jqXHR.getResponseHeader('Etag'));
+ $('#cell_'+tanarId+'_'+tankorId + ' > input').attr('checked',false);
+ $('#cell_'+tanarId+'_'+tankorId).animate({backgroundColor: '#ff0000'}, 100).animate({backgroundColor: '#eeeeee'}, 1000);
+ });
+
+ }
+
+ });
+
+ $('body').focusout(function(event) {
+ var element = $(event.target);
+ if (element.attr('id')=='tankorNevExtra') {
+ element.prev('span.tankorNevExtra').html( element.val() ).show();
+ element.hide();
+ }
+ });
+
+ $('#updateWindowSide').on('keydown', 'ul#tankorSzemeszter li:last-child input', function(event) {
+
+ var charKeyCode = event.keyCode ? event.keyCode : event.which;
+ var shiftKey = event.shiftKey ? event.shiftKey : ((charKeyCode == 16) ? true : false);
+ var altKey = event.altKey ? event.altKey : ((charKeyCode == 18) ? true : false);
+ var ctrlKey = event.ctrlKey ? event.ctrlKey : ((charKeyCode == 17) ? true : false);
+ element = $(event.target);
+
+ if (charKeyCode == 9) {
+ event.preventDefault();
+ tmp = element.attr('name').split('-');
+ tanev = 1+parseInt(tmp[1]);
+ for (szemeszter = 1; szemeszter<3; szemeszter++) {
+ $('<li>'+tanev+'/'+szemeszter
+ +'<input maxlength="5" type="text" name="sz-'+tanev+'-'+szemeszter+'" value="" />'
+ +'</li>').appendTo('ul#tankorSzemeszter');
+ }
+ element.closest('li').next('li').find('input').focus();
+ }
+
+ });
+ $('#updateWindowSide').on('keydown', 'ul#tankorSzemeszter li:first-child input', function(event) {
+
+ var charKeyCode = event.keyCode ? event.keyCode : event.which;
+ var shiftKey = event.shiftKey ? event.shiftKey : ((charKeyCode == 16) ? true : false);
+ var altKey = event.altKey ? event.altKey : ((charKeyCode == 18) ? true : false);
+ var ctrlKey = event.ctrlKey ? event.ctrlKey : ((charKeyCode == 17) ? true : false);
+ element = $(event.target);
+
+ if (charKeyCode == 9 && shiftKey) {
+ event.preventDefault();
+ tmp = element.attr('name').split('-');
+ tanev = parseInt(tmp[1])-1;
+ for (szemeszter = 1; szemeszter<3; szemeszter++) {
+ $('<li>'+tanev+'/'+szemeszter
+ +'<input maxlength="5" type="text" name="sz-'+tanev+'-'+szemeszter+'" value="" />'
+ +'</li>').prependTo('ul#tankorSzemeszter');
+ }
+ element.closest('li').prev('li').find('input').focus();
+ }
+
+ });
+
+
+ $('body').keydown(function(event) {
+
+ var charKeyCode = event.keyCode ? event.keyCode : event.which;
+ var shiftKey = event.shiftKey ? event.shiftKey : ((charKeyCode == 16) ? true : false);
+ var altKey = event.altKey ? event.altKey : ((charKeyCode == 18) ? true : false);
+ var ctrlKey = event.ctrlKey ? event.ctrlKey : ((charKeyCode == 17) ? true : false);
+ element = $(event.target);
+
+ if (!$('#updateWindowSide').hasClass('nyitva')) {
+ if (charKeyCode == 37) { // balra
+ event.preventDefault();
+ firstTh = $('table#tt th.first.targy');
+ firstColspan = firstTh.attr('colspan');
+ if (firstColspan < firstTh.data('colspan')) {
+ firstTh.attr('colspan', ++firstColspan);
+ } else {
+ if (firstTh.prev('th.targy').length > 0) {
+ firstTh.removeClass('first');
+ firstTh.prev('th.targy').addClass('first').show();
+ }
+ }
+ firstTd = $('table#tt td.first');
+ if ($('table#tt td.first.tankor').prev('td.tankor').length>0) {
+ firstTd.removeClass('first');
+ firstTd.prev('td').addClass('first').show();
+ }
+ } else if (charKeyCode == 39) { // jobb
+ event.preventDefault();
+ firstTh = $('table#tt th.first.targy');
+ firstColspan = firstTh.attr('colspan');
+ if (firstColspan > 1) {
+ firstTh.attr('colspan', firstColspan-1);
+ } else {
+ if (firstTh.next('th.targy').length > 0) {
+ firstTh.removeClass('first').hide();
+ firstTh.next('th.targy').addClass('first');
+ }
+ }
+ firstTd = $('table#tt td.first');
+ if ($('table#tt td.first.tankor').next('td.tankor').length>0) {
+ firstTd.removeClass('first').hide();
+ firstTd.next('td').addClass('first');
+ }
+ } else if (charKeyCode == 40) { // le
+ event.preventDefault();
+ firstTr = $('table#tt tr.first.tanar');
+ nextTrs = firstTr.nextAll('tr').not('.szurt').get();
+ if (nextTrs.length>0) {
+ firstTr.removeClass('first');
+ $(nextTrs[0]).prevAll('tr.tanar').addClass('csukott');
+ $(nextTrs[0]).addClass('first');
+ }
+ } else if (charKeyCode == 38) { // fel
+ event.preventDefault();
+ firstTr = $('table#tt tr.first.tanar');
+ prevTrs = firstTr.prevAll('tr').not('.szurt').get();
+ if (prevTrs.length>0) {
+ firstTr.removeClass('first');
+ $(prevTrs[0]).addClass('first').removeClass('csukott');
+ $(prevTrs[0]).nextAll('tr.tanar').removeClass('csukott');
+ }
+ }} // updateWindowSide - !nyitva
+ });
+
+}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/tovabbkepzes.jquery.min.js b/mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/tovabbkepzes.jquery.min.js
new file mode 100644
index 00000000..db9f0830
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/tovabbkepzes.jquery.min.js
@@ -0,0 +1,210 @@
+$(function() {
+
+ var sumOsszeg=0;
+ var sumTamogatas=0;
+ var sumOsszeg_ok=0;
+ var sumTamogatas_ok=0;
+
+ checkTamogatasInput();
+ $('#ujTovabbkepzes span.ujIntezmeny').click(function() {
+ var h = 'Intézmény rövidneve: <input type="text" name="intezmenyRovidNev" /> ';
+ h += 'Intézmény neve: <input type="text" name="intezmenyNev" style="width:200px;"/>';
+ $(this).after(h);
+ $('#ujTovabbkepzes span.ujIntezmeny').remove();
+ $('#ujTovabbkepzes select').hide();
+ });
+
+ $('#tovabbkepzesTerv input[type=text].currency').change(function() {
+ element = $(event.target);
+ checkTamogatasInput();
+ });
+
+ $('#tanarTovabbkepzesForduloDt select').click(function() {
+ $(this).closest('form').find('input').removeClass('ajaxDone').removeClass('ajaxError');
+ });
+ $('#tanarTovabbkepzesForduloDt select').change(function() {
+ $(this).next('input').val($(this).val());
+ ajaxSetTanarAdat(
+ $(this).data('tanarid'),
+ $(this).val(),
+ $(this).closest('form').find('input.salt').attr('name'),
+ $(this).closest('form').find('input.salt').val()
+ );
+ console.log($(this).closest("tr").find('th').html('<button type="submit"><span class="icon-repeat" style="font-size:10px;"></span></button>'));
+ });
+
+ $('#tovabbkepzesNavi button').click(function() {
+ idToOpen = $(this).data('nav');
+ if (idToOpen=='') $('#tovabbkepzesNavi').siblings('form').fadeIn();
+ else {
+ $('#tovabbkepzesNavi').siblings('form').fadeOut();
+ $('#'+idToOpen).fadeIn();
+ }
+ });
+
+/* $('#tanarTovabbkepzesForduloDt th.tovabbkepzesCiklus').each(function(i) {
+ //enum('terv','jóváhagyott','elutasított','megszűnt','megszakadt','teljesített') ;
+ $this = $(this);
+ terv = (parseFloat($(this).data('terv'))||0);
+ teljesitett = (parseFloat($(this).data('teljesített'))||0);
+ jovahagyott = (parseFloat($(this).data('jóváhagyott'))||0);
+ $this.find('span.terv').css({'width':terv+'px'});
+ $this.find('span.teljesitett').css({'width':teljesitett+'px'});
+ $this.find('span.jovahagyott').css({'width':jovahagyott+'px'});
+ });
+*/
+
+ google.load("visualization", "1.1", {callback:drawCharts,language:'hu',packages:["corechart","timeline"]});
+ /* -------------------------------------------------------------- */
+ function drawIdovonal() {
+ var container = document.getElementById('timeline');
+ var chart = new google.visualization.Timeline(container);
+ var dataTable = new google.visualization.DataTable();
+ dataTable.addColumn({ type: 'string', id: 'tovabbkepzes' });
+ dataTable.addColumn({ type: 'string', id: 'oraszam' });
+ dataTable.addColumn({ type: 'date', id: 'tolDt' });
+ dataTable.addColumn({ type: 'date', id: 'igDt' });
+
+ $('table.tovabbkepzes tbody tr.tovabbkepzesTanarSor').each(function(i) {
+ if ($(this).data('igdt')!='0000-00-00') {
+ var tanarNev = $(this).data('tanarnev');
+ var oraszam = $(this).data('oraszam') + " óra";
+ var tolDt = new Date( $(this).data('toldt') );
+ var igDt = new Date( $(this).data('igdt') );
+ dataTable.addRows([ [tanarNev, oraszam, tolDt, igDt] ]);
+ }
+ });
+ chart.draw(dataTable);
+ }
+ /* -------------------------------------------------------------- */
+ function drawPie1() {
+ var data = google.visualization.arrayToDataTable([
+ ['Task', 'Támogatás'],
+ ['Nem támogatott', sumOsszeg-sumTamogatas],
+ ['Támogatott', sumTamogatas]
+ ]);
+
+ var options = {
+ title: 'Támogatás',
+ slices: { 0: { color: 'red'}, 1: { color: 'green'} },
+ legend: {position: 'bottom', textStyle: {color: 'black', fontSize: 10}}
+ };
+ var chart = new google.visualization.PieChart(document.getElementById('grafikonTamogatas'));
+ chart.draw(data, options);
+ }
+ function drawPie2() {
+
+ var dataTable = new google.visualization.DataTable();
+ dataTable.addColumn('string', 'tanár');
+ dataTable.addColumn('number', 'támogatás');
+ $('table.tovabbkepzes tbody tr.tovabbkepzesTESor').each(function(i) {
+ if ($(this).data('igdt')!='0000-00-00') {
+ var tanarNev = $(this).data('tanarnev');
+ var reszosszeg = Number($(this).data('reszosszeg'));
+ var tamogatas = $(this).data('tamogatas');
+ dataTable.addRows([ [ tanarNev, reszosszeg ] ]);
+ }
+ });
+ var options = {
+ title: 'Továbbképzések eloszlása összeg szerint',
+ pieSliceText: '',
+ legend: {position: 'labeled', textStyle: {color: 'black', fontSize: 10}}
+ };
+ var chart = new google.visualization.PieChart(document.getElementById('grafikonOsszegEloszlas'));
+ chart.draw(dataTable, options);
+ }
+ /* -------------------------------------------------------------- */
+ function checkTamogatasInput() {
+ sumOsszeg=0;
+ sumTamogatas=0;
+ sumOsszeg_ok=0;
+ sumTamogatas_ok=0;
+ $('#tovabbkepzesTerv tbody input[type=text].currency').each(function(index) {
+ element = $(this);
+ if (element.data('inputtype') == 'tamogatas') {
+ if (Number($('#reszosszeg_'+element.data('kulcs')).val()) < Number(element.val())) {
+ element.addClass('hiba');
+ } else {
+ element.removeClass('hiba');
+ }
+ if ($.inArray(element.data('tovabbkepzesstatusz'),['terv','jóváhagyott','teljesített'])>=0) {
+ sumTamogatas_ok += Number(element.val());
+ }
+ sumTamogatas += Number(element.val());
+ } else {
+ if ($.inArray(element.data('tovabbkepzesstatusz'),['terv','jóváhagyott','teljesített'])>=0)
+ sumOsszeg_ok += Number(element.val());
+ sumOsszeg += Number(element.val());
+ }
+ });
+ $('#sumOsszeg').val(sumOsszeg);
+ $('#sumTamogatas').val(sumTamogatas);
+ $('#sumOsszeg_ok').val(sumOsszeg_ok);
+ $('#sumTamogatas_ok').val(sumTamogatas_ok);
+
+ var keretOsszeg = Number($('#keretOsszeg').val());
+ if (keretOsszeg<sumTamogatas_ok) {
+ $('#sumTamogatas_ok').addClass('hiba');
+ $('#tamogatasInfo').html('<span style="color:red">'+(keretOsszeg-sumTamogatas_ok)+' Ft.-</span>');
+ } else {
+ $('#sumTamogatas_ok').removeClass('hiba');
+ if ((keretOsszeg-sumTamogatas_ok)==0) $('#tamogatasInfo').html('');
+ else $('#tamogatasInfo').html('<span style="color:green">'+(keretOsszeg-sumTamogatas_ok)+' Ft.-</span>');
+ }
+ }
+ /* -------------------------------------------------------------- */
+
+ function drawCharts() {
+ drawIdovonal();
+ if ($('#grafikonTamogatas').length>0) drawPie1();
+ if ($('#grafikonOsszegEloszlas').length>0) drawPie2();
+ }
+
+ var clickedMegjegyzes = false;
+ $('span.tovabbkepzesMegjegyzes').click(function() {
+ clickedMegjegyzes = $(this).parent('td');
+ $('#updateForm').html($('#tovabbkepzesMegjegyzes_'+$(this).data('kulcs')+""));
+ $('#updateForm *').show();
+ $('#takaro').show();
+ $('#updateWindow').show();
+ });
+
+ hideUpdateLayer = function() {
+ $('#updateForm div').hide();
+ clickedMegjegyzes.append($('#updateForm div'));
+ };
+
+});
+
+
+
+ajaxSetTanarAdat = function(tanarId,forduloDt,salt_name,salt_value) {
+ postData = {'tanarId':tanarId,
+ 'forduloDt':forduloDt,
+ 'sessionID': $('body').data('sessionid'),
+ 'action':'modTanarTovabbkepzesForduloDt' }
+ postData[salt_name] = salt_value;
+ $.ajax({
+ type: "POST",
+ url: "index.php?page=naplo&sub=intezmeny&f=tovabbkepzes&policy=private&skin=ajax&sessionID="+$('body').data('sessionid'),
+ data: postData,
+ dataType: 'json'
+ }).done(function( msg, status, jqXHR ) {
+ updateSalt(jqXHR.getResponseHeader('Etag'));
+ processJSONTovabbkepzes(msg);
+ }).fail(function( jqXHR, textStatus, errorThrown ) {
+ //console.log(errorThrown);
+ //console.log(jqXHR.responseJSON);
+ //displayJSONerror(jqXHR.responseJSON);
+ updateSalt(jqXHR.getResponseHeader('Etag'));
+ triggerError(tanarId);
+ });
+}
+
+processJSONTovabbkepzes = function (ADAT) {
+ $('input[data-tanarid='+(ADAT.tanarId)+']').addClass('ajaxDone');
+}
+
+triggerError = function (tanarId) {
+ $('input[data-tanarid='+(tanarId)+']').addClass('ajaxError');
+}
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/zaradek.jquery.min.js b/mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/zaradek.jquery.min.js
new file mode 100644
index 00000000..7831c469
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/intezmeny/zaradek.jquery.min.js
@@ -0,0 +1,13 @@
+
+function htmlEncode(value){
+ //create a in-memory div, set it's inner text(which jQuery automatically encodes)
+ //then grab the encoded contents back out. The div never exists on the page.
+ return $('<div/>').text(value).html();
+}
+
+$(function() {
+ $('form.zaradek table input[type=text]').change(function(event) {
+ var element = $(event.target);
+ $('#'+element.attr('id')+'span').html(htmlEncode(element.val()));
+ });
+});
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/naplo.jquery.min.js b/mayor-orig/www/skin/classic/module-naplo/javascript/naplo.jquery.min.js
new file mode 100644
index 00000000..e382ac00
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/naplo.jquery.min.js
@@ -0,0 +1,1234 @@
+var debug=false;
+$(function() {
+
+ $('body').bind('submit', mayorNaploSubmitSearch);
+
+ $('.toolBarClear').click(function(event) {
+ var element = $(event.target);
+ element.closest('table').find('select').prop('selectedIndex',0);
+ element.closest('table').find('form').submit();
+ });
+
+ $('.btnSelectNext').on('click',function(event) {
+ var selectTool = $(this).prev('select'); // közvetlenül az előtte levő elem (select)
+ $(selectTool).find('option:selected').removeAttr('selected').next('option').attr('selected', 'selected');
+ $(selectTool).change();
+ });
+ $('.btnSelectPrev').on('click',function(event) {
+ var selectTool = $(this).next('select'); // közvetlenül a mögötte levő elem (select)
+ $(selectTool).find('option:selected').removeAttr('selected').prev('option').attr('selected', 'selected');
+ $(selectTool).change();
+ });
+
+ $('#toolBarHamburgerVezerlo').click(function(event) {
+ $('#toolBarHamburgerLista').toggle();
+ });
+
+// if ($('#diakSelectLista option').length == 0){
+ $('#diakSelectPattern').closest('form').submit( function(event) {
+ var $form = $(this);
+ if ($('#diakSelectLista').val()=="") {
+ $form.data('submitted',false);
+ return false;
+ }
+ });
+ $('#diakSelectIcon').click( function(event) {
+ $('#diakSelectPattern').toggle().focus();
+ //$('#diakSelectIcon').toggle();
+ $('#diakSelectLista').toggle().prop('selectedIndex',0);
+ });
+ $('#diakSelectPattern').change( function(event) {
+ var pattern = $('#diakSelectPattern').val();
+ // we need to catch ENTER!
+ var params = $.parseParams(window.location.toString().split('?')[1] || '' );
+ var sessionID=params.sessionID?params.sessionID:'';
+ $.ajax({
+ type: "POST",
+ url: "?page=naplo&sub=tools&f=kereso&policy=private&skin=ajax&sessionID="+sessionID,
+ data: { 'pattern': pattern, 'tipus':'diak', 'sessionID':sessionID },
+ dataType: 'json'
+ }).done(function( msg ) {
+ var listItems = $('#diakSelectLista');
+ var D = msg[0]['diakok']; // vajon miért így kell erre hivatkozni?
+ if (D.length>0) {
+ listItems.find('option').remove();
+ listItems.find('optgroup').remove();
+ listItems.append('<option value=""></option>');
+ for (i=0; i<D.length; i++) {
+ listItems.append('<option value="'+D[i]['diakId']+'">'+D[i]['diakNev']+'</option>');
+ }
+ $('#diakSelectPattern').hide();
+ $('#diakSelectIcon').show();
+ $('#diakSelectLista').show().focus();
+ if (D.length==1) {
+ //$("#diakSelectLista").val($("#diakSelectLista option:last").attr('selected',true));
+ $("#diakSelectLista option:last").attr('selected',true);
+ $('#diakSelectTool').submit();
+ }
+ }
+ });
+ });
+// }
+
+
+
+/*
+ $(document).on('click', '.oraErtekel', function(event) {
+ element = $(event.target);
+ var elementData = element.data();
+ var ID = '';
+ if ( elementData.hasOwnProperty('oraid')==true ) {
+ ajaxSetOraLike(element.data('oraid'),element.data('jovolt'));
+ }
+ });
+*/
+ $(document).on('click', '.jegyAdat', function(event) {
+ element = $(event.target);
+ var elementData = element.data();
+ var ID = '';
+ if ( elementData.hasOwnProperty('jegyid')==true ) {
+ ajaxGetJegyAdat(element.data('jegyid'));
+ }
+ });
+
+ $(document).on('click', '.zaroJegyAdat', function(event) {
+ element = $(event.target);
+ var elementData = element.data();
+ var ID = '';
+ if ( elementData.hasOwnProperty('zarojegyid')==true ) {
+ ajaxGetZaroJegyAdat(element.data('zarojegyid'));
+ }
+ });
+
+ $(document).on('click', '.tankorAdat', function(event) {
+ element = $(event.target);
+ var elementData = element.data();
+ var ID = '';
+ if ( elementData.hasOwnProperty('tankorid')==true ) {
+ ID = element.data('tankorid');
+ } else if ( $(this).data().hasOwnProperty('tankorid')==true ) {
+ ID = $(this).data('tankorid');
+ }
+ if (ID!='') ajaxGetTankorAdat(ID);
+
+ });
+
+ $(document).on('click', '.osztalyAdat', function(event) {
+ element = $(event.target);
+ var elementData = element.data();
+ var ID = '';
+ if ( elementData.hasOwnProperty('osztalyid')==true ) {
+ ID = (element.data('osztalyid'));
+ } else if ( $(this).data().hasOwnProperty('osztalyid')==true ) {
+ ID = $(this).data('osztalyid');
+ }
+ if (ID!='') ajaxGetOsztalyAdat(ID);
+ });
+
+ mayorNaploEventHandlers();
+
+});
+
+mayorNaploSubmitSearch = function (event) {
+
+ var element = $(event.target);
+ if (element.attr('id') == 'mayorSearch') {
+ var pattern = $('#mayorSearch input[type=text]').val();
+ var postData = { 'tipus':'diak','pattern': pattern, 'strict':1, 'mayorToken': ($('body').data('mayortoken')) };
+ $.ajax({
+ type: "POST",
+ url: "index.php?page=naplo&sub=tools&f=kereso&policy=private&skin=ajax&sessionID="+$('body').data('sessionid'),
+ data: postData,
+ dataType: 'json'
+ }).done(function( msg, status, jqXHR ) {
+ processJSONKeresoDiakAdat(msg);
+ updateSalt(jqXHR.getResponseHeader('Etag'));
+ mayorNaploEventHandlers();
+ }).fail(function( jqXHR, textStatus, errorThrown ) {
+ //console.log(jqXHR);
+ });
+
+ var postData = { 'tipus':'tanar','pattern': pattern, 'strict':1, 'mayorToken': ($('body').data('mayortoken')) };
+ $.ajax({
+ type: "POST",
+ url: "index.php?page=naplo&sub=tools&f=kereso&policy=private&skin=ajax&sessionID="+$('body').data('sessionid'),
+ data: postData,
+ dataType: 'json'
+ }).done(function( msg, status, jqXHR ) {
+ processJSONKeresoTanarAdat(msg);
+ updateSalt(jqXHR.getResponseHeader('Etag'));
+ mayorNaploEventHandlers();
+ }).fail(function( jqXHR, textStatus, errorThrown ) {
+ //console.log(jqXHR);
+ });
+
+ var postData = { 'tipus':'szulo','pattern': pattern, 'strict':1, 'mayorToken': ($('body').data('mayortoken')) };
+ $.ajax({
+ type: "POST",
+ url: "index.php?page=naplo&sub=tools&f=kereso&policy=private&skin=ajax&sessionID="+$('body').data('sessionid'),
+ data: postData,
+ dataType: 'json'
+ }).done(function( msg, status, jqXHR ) {
+ processJSONKeresoSzuloAdat(msg);
+ updateSalt(jqXHR.getResponseHeader('Etag'));
+ mayorNaploEventHandlers();
+ }).fail(function( jqXHR, textStatus, errorThrown ) {
+ //console.log(jqXHR);
+ });
+
+
+
+ }
+
+}
+
+processJSONKeresoDiakAdat = function( ADAT ) {
+// console.log(JSON.stringify(ADAT));
+// $('#updateWindowSide').addClass('nyitva');
+// $('#updateWindowSideTitle').html(diakAdat['diakNev']);
+// $('#mayorSearch').remove();
+ var content = '';
+ if (ADAT['diakok'].length>0) {
+ for (i=0; i<ADAT['diakok'].length; i++) {
+ var a = ADAT['diakok'][i];
+ //content += '<div style="display:block;">';
+ content += '<a class="diakNev" data-diakid="'+a['diakId']+'" href="" onclick="return false;">'+a['diakNev']
+ if (a['osztalyJel']!=null) content += ' ('+a['osztalyJel']+')';
+ content +='</a>';
+ //content += '<span class="icon-envelope"></span>';
+ //content += '</div>';
+ }
+ $('#mayorSearch').append(content);
+ }
+}
+processJSONKeresoTanarAdat = function( ADAT ) {
+ var content = '';
+ if (ADAT['tanarok'].length>0) {
+ for (i=0; i<ADAT['tanarok'].length; i++) {
+ var a = ADAT['tanarok'][i];
+ content += '<a class="tanarNev" data-tanarid="'+a['tanarId']+'" href="" onclick="return false;">'+a['tanarNev']+'</a>';
+ }
+ $('#mayorSearch').append(content);
+ }
+}
+processJSONKeresoSzuloAdat = function( ADAT ) {
+ var content = '';
+ if (ADAT['szulok'].length>0) {
+ for (i=0; i<ADAT['szulok'].length; i++) {
+ var a = ADAT['szulok'][i];
+ content += '<a class="szuloNev" data-szuloid="'+a['szuloId']+'" href="" onclick="return false;">'+a['szuloNev']+'</a>';
+ }
+ $('#mayorSearch').append(content);
+ }
+
+}
+
+
+ajaxGetDiakAdat = function(diakId) {
+ postData = { 'diakId':diakId, 'mayorToken': ($('body').data('mayortoken')) }
+ $.ajax({
+ type: "POST",
+ url: "index.php?page=naplo&sub=tools&f=getDiakAdat&policy=private&skin=ajax&sessionID="+$('body').data('sessionid'),
+ data: postData,
+ dataType: 'json'
+ }).done(function( msg, status, jqXHR ) {
+ processJSONDiakAdat(msg);
+ updateSalt(jqXHR.getResponseHeader('Etag'));
+ mayorNaploEventHandlers();
+ }).fail(function( jqXHR, textStatus, errorThrown ) {
+ //console.log(jqXHR);
+ });
+}
+
+ajaxGetSzuloAdat = function(szuloId) {
+ postData = { 'szuloId':szuloId, 'mayorToken': ($('body').data('mayortoken')) }
+ $.ajax({
+ type: "POST",
+ url: "index.php?page=naplo&sub=tools&f=getSzuloAdat&policy=private&skin=ajax&sessionID="+$('body').data('sessionid'),
+ data: postData,
+ dataType: 'json'
+ }).done(function( msg, status, jqXHR ) {
+ processJSONSzuloAdat(msg);
+ updateSalt(jqXHR.getResponseHeader('Etag'));
+ mayorNaploEventHandlers();
+ }).fail(function( jqXHR, textStatus, errorThrown ) {
+ //console.log(jqXHR);
+ });
+}
+
+ajaxGetTanarAdat = function(tanarId) {
+ postData = { 'tanarId':tanarId, 'mayorToken': ($('body').data('mayortoken')) }
+ $.ajax({
+ type: "POST",
+ url: "index.php?page=naplo&sub=tools&f=getTanarAdat&policy=private&skin=ajax&sessionID="+$('body').data('sessionid'),
+ data: postData,
+ dataType: 'json'
+ }).done(function( msg, status, jqXHR ) {
+ processJSONTanarAdat(msg);
+ updateSalt(jqXHR.getResponseHeader('Etag'));
+ mayorNaploEventHandlers();
+ }).fail(function( jqXHR, textStatus, errorThrown ) {
+ //console.log('hiba történt!'+textStatus);
+ //console.log(jqXHR);
+ });
+}
+
+ajaxGetTankorAdat = function(tankorId) {
+ postData = { 'tankorId':tankorId, 'mayorToken': ($('body').data('mayortoken')) }
+ $.ajax({
+ type: "POST",
+ url: "index.php?page=naplo&sub=tools&f=getTankorAdat&policy=private&skin=ajax&sessionID="+$('body').data('sessionid'),
+ data: postData,
+ dataType: 'json'
+ }).done(function( msg, status, jqXHR ) {
+ processJSONTankorAdat(msg);
+ updateSalt(jqXHR.getResponseHeader('Etag'));
+ mayorNaploEventHandlers();
+ }).fail(function( jqXHR, textStatus, errorThrown ) {
+ //console.log('hiba történt!'+textStatus);
+ //console.log(jqXHR);
+ });
+}
+ajaxGetOsztalyAdat = function(osztalyId) {
+ postData = { 'osztalyId':osztalyId, 'mayorToken': ($('body').data('mayortoken')) }
+ $.ajax({
+ type: "POST",
+ url: "index.php?page=naplo&sub=tools&f=getOsztalyAdat&policy=private&skin=ajax&sessionID="+$('body').data('sessionid'),
+ data: postData,
+ dataType: 'json'
+ }).done(function( msg, status, jqXHR ) {
+ processJSONOsztalyAdat(msg);
+ updateSalt(jqXHR.getResponseHeader('Etag'));
+ mayorNaploEventHandlers();
+ }).fail(function( jqXHR, textStatus, errorThrown ) {
+ //console.log('hiba történt!'+textStatus);
+ //console.log(jqXHR);
+ });
+}
+
+ajaxGetDolgozatAdat = function(dolgozatId) {
+ postData = { 'dolgozatId': dolgozatId, 'mayorToken': ($('body').data('mayortoken')) }
+ $.ajax({ type: "POST",
+ url: "index.php?page=naplo&sub=tools&f=dolgozatAdat&policy=private&skin=ajax&sessionID="+$('body').data('sessionid'),
+ data: postData,
+ dataType: 'json'
+ }).done(function( msg, status, jqXHR ) {
+ processJSONDolgozatAdat(msg);
+ updateSalt(jqXHR.getResponseHeader('Etag'));
+ mayorNaploEventHandlers();
+ }).fail(function( jqXHR, textStatus, errorThrown ) {
+ alert('Valami hiba történt');
+ //console.log('hiba történt!'+textStatus);
+ //console.log(jqXHR);
+ });
+}
+
+ajaxGetJegyAdat = function(jegyId) {
+ postData = { 'jegyId':jegyId, 'mayorToken': ($('body').data('mayortoken')) }
+ $.ajax({
+ type: "POST",
+ url: "index.php?page=naplo&sub=tools&f=getJegyAdat&policy=private&skin=ajax&sessionID="+$('body').data('sessionid'),
+ data: postData,
+ dataType: 'json'
+ }).done(function( msg, status, jqXHR ) {
+ processJSONJegyAdat(msg);
+ updateSalt(jqXHR.getResponseHeader('Etag'));
+ mayorNaploEventHandlers();
+ }).fail(function( jqXHR, textStatus, errorThrown ) {
+ //console.log(jqXHR);
+ });
+}
+ajaxGetZaroJegyAdat = function(zaroJegyId) {
+ postData = { 'zaroJegyId':zaroJegyId, 'mayorToken': ($('body').data('mayortoken')) }
+ $.ajax({
+ type: "POST",
+ url: "index.php?page=naplo&sub=tools&f=getZaroJegyAdat&policy=private&skin=ajax&sessionID="+$('body').data('sessionid'),
+ data: postData,
+ dataType: 'json'
+ }).done(function( msg, status, jqXHR ) {
+ processJSONZaroJegyAdat(msg);
+ updateSalt(jqXHR.getResponseHeader('Etag'));
+ mayorNaploEventHandlers();
+ }).fail(function( jqXHR, textStatus, errorThrown ) {
+ //console.log(jqXHR);
+ });
+}
+
+
+ajaxGetOraAdat = function(oraId) {
+
+ postData = { 'oraId':oraId, 'mayorToken': ($('body').data('mayortoken')) }
+ $.ajax({
+ type: "POST",
+ url: "index.php?page=naplo&sub=tools&f=getOraAdat&policy=private&skin=ajax&sessionID="+$('body').data('sessionid'),
+ data: postData,
+ dataType: 'json'
+ }).done(function( msg, status, jqXHR ) {
+ processJSONOraAdat(msg);
+ updateSalt(jqXHR.getResponseHeader('Etag'));
+ mayorNaploEventHandlers();
+ }).fail(function( jqXHR, textStatus, errorThrown ) {
+ //console.log('hiba történt!'+textStatus);
+ //console.log(jqXHR);
+ });
+}
+ajaxGetNapAdat = function(napDt) {
+ postData = { 'napDt': napDt, 'mayorToken': ($('body').data('mayortoken')) }
+ $.ajax({
+ type: "POST",
+ url: "index.php?page=naplo&sub=tools&f=napAdat&policy=private&skin=ajax&sessionID="+$('body').data('sessionid'),
+ data: postData,
+ dataType: 'json'
+ }).done(function( msg, status, jqXHR ) {
+ processJSONNapAdat(msg);
+ updateSalt(jqXHR.getResponseHeader('Etag'));
+ mayorNaploEventHandlers();
+ }).fail(function( jqXHR, textStatus, errorThrown ) {
+ //console.log('hiba történt!'+textStatus);
+ //console.log(jqXHR);
+ });
+}
+
+ajaxGetJegyzetAdat = function(jegyzetId,refJegyzetDt) {
+ postData = { 'jegyzetId':jegyzetId, 'refJegyzetDt':refJegyzetDt, 'mayorToken': ($('body').data('mayortoken')) }
+ $.ajax({
+ type: "POST",
+ url: "index.php?page=naplo&sub=tools&f=jegyzetAdat&policy=private&skin=ajax&sessionID="+$('body').data('sessionid'),
+ data: postData,
+ dataType: 'json'
+ }).done(function( msg, status, jqXHR ) {
+ processJSONJegyzetAdat(msg);
+ updateSalt(jqXHR.getResponseHeader('Etag'));
+ mayorNaploEventHandlers();
+ }).fail(function( jqXHR, textStatus, errorThrown ) {
+ //console.log('hiba történt!'+textStatus); console.log(jqXHR);
+ updateSalt(jqXHR.getResponseHeader('Etag'));
+ });
+}
+
+ajaxSetOraAdat = function(adat) {
+ postData = adat;
+ $.ajax({
+ type: "POST",
+ url: "index.php?page=naplo&sub=tools&f=getOraAdat&policy=private&skin=ajax&sessionID="+$('body').data('sessionid'),
+ data: postData,
+ dataType: 'json'
+ }).done(function( msg, status, jqXHR ) {
+ processJSONOraAdat(msg);
+// updateOraAdat(msg.adat);
+ updateSalt(jqXHR.getResponseHeader('Etag'));
+ mayorNaploEventHandlers();
+ }).fail(function( jqXHR, textStatus, errorThrown ) {
+ //console.log('hiba történt!'+textStatus); console.log(jqXHR);
+ updateSalt(jqXHR.getResponseHeader('Etag'));
+ alert('Sajnos valami hiba történt! Próbáld újra! '+textStatus);
+ });
+}
+
+ajaxSetJegyzetAdat = function(adat) {
+ postData = adat;
+ $.ajax({
+ type: "POST",
+ url: "index.php?page=naplo&sub=tools&f=jegyzetAdat&policy=private&skin=ajax&sessionID="+$('body').data('sessionid'),
+ data: postData,
+ dataType: 'json'
+ }).done(function( msg, status, jqXHR ) {
+ processJSONJegyzetAdat(msg);
+ updateJegyzet(msg.adat);
+ updateSalt(jqXHR.getResponseHeader('Etag'));
+ mayorNaploEventHandlers();
+ }).fail(function( jqXHR, textStatus, errorThrown ) {
+ //console.log('hiba történt!'+textStatus); console.log(jqXHR);
+ updateSalt(jqXHR.getResponseHeader('Etag'));
+ alert('Sajnos valami hiba történt! Próbáld újra! '+textStatus);
+ });
+}
+
+ajaxDelJegyzet = function(adat) {
+ postData = adat;
+ $.ajax({
+ type: "POST",
+ url: "index.php?page=naplo&sub=tools&f=jegyzetAdat&policy=private&skin=ajax&sessionID="+$('body').data('sessionid'),
+ data: postData,
+ dataType: 'json'
+ }).done(function( msg, status, jqXHR ) {
+ removeJegyzet(msg);
+ updateSalt(jqXHR.getResponseHeader('Etag'));
+ mayorNaploEventHandlers();
+ }).fail(function( jqXHR, textStatus, errorThrown ) {
+ //console.log('hiba történt!'+textStatus); console.log(jqXHR);
+ updateSalt(jqXHR.getResponseHeader('Etag'));
+ alert('Sajnos valami hiba történt! Próbáld újra! '+textStatus);
+ });
+}
+
+// --------------------------------------------------------------
+
+processJSONDiakAdat = function( diakAdat ) {
+
+ //if (diakAdat.visibleData != true) return false;
+ var content = '';
+ content += '<div id="mayorNaviIconHolder">';
+ content += '<div class="mayorNaviIcon"><a href="'+href({'page':'naplo','sub':'orarend','f':'orarend','diakId':diakAdat['diakId']})+'"><span class="icon-th"></span><br/>Órarend</a></div>';
+ content += '<div class="mayorNaviIcon"><a href="'+href({'page':'naplo','sub':'intezmeny','f':'diakTankor','diakId':diakAdat['diakId']})+'"><span class="icon-group-alt"></span><br/>Tankörök</a></div>';
+ content += '<div class="mayorNaviIcon"><a href="'+href({'page':'naplo','sub':'hianyzas','f':'diak','diakId':diakAdat['diakId']})+'"><span class="icon-calendar-sign"></span><br/>Hiányzások</a></div>';
+ content += '<div class="mayorNaviIcon"><a href="'+href({'page':'naplo','sub':'osztalyozo','f':'diak','diakId':diakAdat['diakId']})+'"><span class="icon-pencil-alt"></span><br/>Jegyek</a></div>';
+// content += '<div class="mayorNaviIcon"><a href="'+href({'page':'naplo','sub':'uzeno','f':'uzeno','diakId':diakAdat['diakId']})+'"><span class="icon-envelope"></span><br/>Üzenő</a></div>';
+ content += '<div class="mayorNaviIcon"><a href="'+href({'page':'naplo','sub':'hirnok','f':'hirnok','diakId':diakAdat['diakId']})+'"><span class="icon-bullhorn"></span><br/>Hírnök</a></div>';
+ content += '</div>';
+
+ if (diakAdat['diakOsztaly']!=undefined) {
+ content += '<h3><a href="'+ href({'page':'naplo','sub':'intezmeny','f':'osztaly','diakId':diakAdat['diakId']}) +'">Osztály ('+diakAdat['tanev']+')</a></h3>';
+ content += '<ul>';
+ if (diakAdat['diakJogviszony']!=undefined)
+ for (i=0; i<diakAdat['diakOsztaly'].length; i++) {
+ var _osztalyAdat = diakAdat['osztalyAdat'][diakAdat['diakOsztaly'][i]['osztalyId']];
+ content += '<li>'
+ + '<a href="'+ href({'page':'naplo','sub':'intezmeny','f':'osztaly','osztalyId':_osztalyAdat['osztalyId']}) +'">'
+ + (_osztalyAdat['osztalyJel']) + " "
+// + _osztalyAdat['kezdoTanev'] + '-' + _osztalyAdat['vegzoTanev'] + '/' + _osztalyAdat['jel']
+// + ' (' + _osztalyAdat['osztalyId'] + ') '
+ + diakAdat['diakOsztaly'][i]['beDt'] + ' - '
+ + ((diakAdat['diakOsztaly'][i]['kiDt'] == null) ? '...':diakAdat['diakOsztaly'][i]['kiDt'])
+ + '</a></li>';
+ }
+ content += '</ul>';
+ }
+ if (diakAdat['diakKepzes']!=undefined)
+ if (diakAdat['diakKepzes'].length>0) {
+ content += '<h3>Képzések</h3>';
+ content += '<ul>';
+ for (i=0; i<(diakAdat['diakKepzes'].length); i++) {
+ content += '<li>'+diakAdat['diakKepzes'][i]['kepzesNev']+ ' ' + diakAdat['diakKepzes'][i]['tolDt']+'–'+diakAdat['diakKepzes'][i]['igDt']+'</li>';
+ }
+ content += '</ul>';
+ }
+
+ content += '<h3><a href="'+ href({'page':'naplo','sub':'intezmeny','f':'diakStatusz','diakId':diakAdat['diakId']}) +'">Jogviszony</a></h3>';
+ content += '<ul>';
+ if (diakAdat['diakJogviszony']!=undefined)
+ for (i=0; i<diakAdat['diakJogviszony'].length; i++) {
+ content += '<li>' +diakAdat['diakJogviszony'][i]['statusz'] + ', ' + diakAdat['diakJogviszony'][i]['dt'] + '</li>';
+ }
+ content += '</ul>';
+
+ if (diakAdat['diakFelmentes']!=undefined)
+ if (diakAdat['diakFelmentes'].length>0) {
+ content += "<h3>Felmentések ("+diakAdat['tanev']+")</h3>";
+ content += '<ul>';
+ for (i=0; i<diakAdat['diakFelmentes'].length; i++) {
+ var d = diakAdat['diakFelmentes'][i];
+ content += '<li>'
+ + d['felmentesTipus'] + " "
+ + diakAdat['diakTankorAssoc'][d['tankorId']]['tankorNev'] + "<br/>"
+ + d['beDt'] + ' - ' + d['kiDt'] + " "
+ + "nap: "+d['nap'] + " "
+ + "óra: "+d['ora'] + " "
+ + '</li>';
+ }
+ content += '</ul>';
+ }
+ content += '<h3><a href="'+ href({'page':'naplo','sub':'intezmeny','f':'diakTankor','diakId':diakAdat['diakId']}) +'">Tankörök ('+diakAdat['tanev']+')</a></h3>';
+ content += '<ul>';
+ if (diakAdat['diakTankor']!=undefined)
+ for (i=0; i<diakAdat['diakTankor'].length; i++) {
+ content += '<li class="tankorAdat" data-tankorid="'+diakAdat['diakTankor'][i]['tankorId']+'">' +diakAdat['diakTankor'][i]['tankorNev'] + ' (' + diakAdat['diakTankor'][i]['kovetelmeny'] + ')</li>';
+ }
+ content += '</ul>';
+ content += '<h3><a href="'+ href({'page':'naplo','sub':'intezmeny','f':'diak','diakId':diakAdat['diakId']}) +'">Egyéb</a></h3>';
+ content += '<ul>';
+ if (diakAdat['szuletesiHely'] != null) content += '<li>Született: ' +diakAdat['szuletesiHely'] + ', ' + diakAdat['szuletesiIdo'] +' <span class="diakEletkor">'+ diakAdat['diakEletkor'] + '</span></li>';
+ if (diakAdat['torzslapszam'] != null) content += '<li>Törzslapszám: ' +diakAdat['torzslapszam'] + '</li>';
+ if (diakAdat['mobil'] != null) content += '<li>Telefon: ' +diakAdat['mobil'] + '</li>';
+ if (diakAdat['email'] != null) content += '<li>E-mail: ' +diakAdat['email'] + '</li>';
+ content += '<li>Lakik: ' +diakAdat['lakhelyIrsz'] + ' '
+ +diakAdat['lakhelyHelyseg'] + ', '
+ +diakAdat['lakhelyKozteruletNev'] + ' '
+ +diakAdat['lakhelyKozteruletJelleg'] + ' '
+ +diakAdat['lakhelyHazszam']
+ + '</li>';
+ if (diakAdat['megjegyzes'] != null) content += '<li>Megjegyzés: ' + diakAdat['megjegyzes'] +'</li>';
+ content += '</ul>';
+ content += "<h3>Szülei</h3>";
+ content += '<ul>';
+ if (diakAdat['diakSzulo']!=undefined)
+ for (i=0; i<diakAdat['diakSzulo'].length; i++) {
+ var d = diakAdat['diakSzulo'][i];
+ content += '<li>';
+ //content += '<a href="'+ href({'page':'naplo','sub':'intezmeny','f':'diakSzulo','diakId':diakAdat['diakId'],'szuloId':d['szuloId']}) +'">';
+ content += '<span class="szuloNev" data-szuloid="'+d['szuloId']+'">';
+ content += d['szuloNev'];
+ content += '</span>';
+// if (d['szuleteskoriNev']!=null) content += ' ('+d['szuleteskoriNev']+')';
+ content += '</li>';
+ }
+ content += '</ul>';
+
+ content += '<span style="display:none" id="mayorsidewindowtype" data-mayorsidewindowtype="diak"></span>';
+ if ( $('#updateWindowSide').hasClass('nyitva') ==true && $('#mayorsidewindowtype').data('mayorsidewindowtype')!='diak' ) {
+ $('#updateWindowSideSubTitle').html('<a href="'+href({'page':'naplo','sub':'intezmeny','f':'diak','diakId':diakAdat['diakId']})+'">'+diakAdat['diakNev']+'</a>');
+ $('#updateWindowSideSubContent').html(content);
+ $('#updateWindowSideSub').addClass('nyitva');
+ } else {
+ $('#updateWindowSideTitle').html('<a href="'+href({'page':'naplo','sub':'intezmeny','f':'diak','diakId':diakAdat['diakId']})+'">'+diakAdat['diakNev']+'</a>');
+ $('#updateWindowSideContent').html(content);
+ $('#updateWindowSide').addClass('nyitva');
+ }
+
+
+}
+
+processJSONTanarAdat = function( adat ) {
+// console.log(JSON.stringify(adat));
+ var content = '';
+ content += '<div id="mayorNaviIconHolder">';
+ content += '<div class="mayorNaviIcon"><a href="'+href({'page':'naplo','sub':'orarend','f':'orarend','tanarId':adat['tanarId']})+'"><span class="icon-th"></span><br/>Órarend</a></div>';
+ if (adat.layerPolicy>0) {
+ content += '<div class="mayorNaviIcon"><a href="'+href({'page':'naplo','sub':'haladasi','f':'haladasi','tanarId':adat['tanarId']})+'"><span class="icon-file-edit-alt"></span><br/>Haladási</a></div>';
+ content += '<div class="mayorNaviIcon"><a href="'+href({'page':'naplo','sub':'hianyzas','f':'ora','tanarId':adat['tanarId']})+'"><span class="icon-calendar-sign"></span><br/>Hiányzások</a></div>';
+ content += '<div class="mayorNaviIcon"><a href="'+href({'page':'naplo','sub':'osztalyozo','f':'tankor','tanarId':adat['tanarId']})+'"><span class="icon-pencil-alt"></span><br/>Osztályozó</a></div>';
+ content += '<div class="mayorNaviIcon"><a href="'+href({'page':'naplo','sub':'hirnok','f':'hirnok','tanarId':adat['tanarId']})+'"><span class="icon-bullhorn"></span><br/>Hírnök</a></div>';
+ } else {
+ content += '<div class="mayorNaviIcon"><a href="'+href({'page':'naplo','sub':'uzeno','f':'uzeno','tanarId':adat['tanarId']})+'"><span class="icon-envelope"></span><br/>Üzenő</a></div>';
+
+ }
+ content += '</div>';
+//
+// content += '<h3><a href="'+ href({'page':'naplo','sub':'intezmeny','f':'osztaly','diakId':adat['diakId']}) +'">Osztály ('+adat['tanev']+')</a></h3>';
+
+// content += '<h3>Mai órák</h3>';
+// content += adat['maiOrak']['html'];
+
+/*
+ content += '<h3>Óraterhelés</h3>';
+// oraTerheles":{"56":{"munkaido":{"heti":40,"kotott":32,"lekotott":26},"ossz":{"heti":"13","napi":"4"},"kotottEloirt":{"heti":"13","napi":"4"},"kotott":{"heti":"13","napi":"4"},"lekotott":{"heti":"13","napi":"4"}}}}
+ var OT = adat['oraTerheles'][adat['tanarId']];
+ content += '<ul>';
+ content += '<li>Heti munkaidő referencia: '+ OT['munkaido']['heti'] + '-' + OT['munkaido']['kotott'] + '-' + OT['munkaido']['lekotott'];
+ content += '</li><li>Össz: '+ OT['ossz']['heti'] + '|' + OT['ossz']['napi'];
+ content += '</li><li>Kötött: '+ OT['kotott']['heti'] + '|' + OT['kotott']['napi'];
+ content += '</li><li>Kötött-előírt: '+ OT['kotottEloirt']['heti'] + '|' + OT['kotottEloirt']['napi'];
+ content += '</li><li>Lekötött: '+ OT['lekotott']['heti'] + '|' + OT['lekotott']['napi'];
+ content += '</li>';
+ content += '</ul>';
+*/
+
+ if(adat.layerPolicy>0) {
+ if (adat.tanarTankor!=undefined) {
+ content += '<h3>Tanár tankörei</h3>';
+ content += '<ul>';
+ for (i=0; i<adat.tanarTankor.length; i++) {
+ content += '<li><span class="tankorAdat" data-tankorid="'+adat.tanarTankor[i]['tankorId']+'">'
+ +adat.tanarTankor[i].tankorNev+'</span></li>';
+ }
+ content += '</ul>';
+ }
+
+ content += '<h3>Egyéb adatok</h3>';
+ content += '<ul>';
+ if (adat['beDt']!='') content += '<li>Munkaviszony: '+adat['beDt']+ (adat['kiDt']==null?'':' – '+adat['kiDt']) +'</li>';
+ if (adat['hetiMunkaora']!='') content += '<li>Heti munkaóra: '+adat['hetiMunkaora']+'</li>';
+ if (adat['hetiKotelezoOraszam']!='') content += '<li>Heti kötelező óraszám: '+adat['hetiKotelezoOraszam']+'</li>';
+ if (adat['statusz']!='') content += '<li>Státusz: '+adat['statusz']+'</li>';
+ if (adat['besorolas']!='') content += '<li>Besorolás: '+adat['besorolas']+'</li>';
+ if (adat['tovabbkepzesForduloDt']!='') content += '<li>Továbbképzés forduló dátum: '+adat['tovabbkepzesForduloDt']+'</li>';
+ content += '</ul>';
+ }
+ content += '<span style="display:none" id="mayorsidewindowtype" data-mayorsidewindowtype="tanar"></span>';
+ if ( $('#updateWindowSide').hasClass('nyitva') ==true && $('#mayorsidewindowtype').data('mayorsidewindowtype')!='tanar' ) {
+ $('#updateWindowSideSubTitle').html('<a href="'+href({'page':'naplo','sub':'intezmeny','f':'tanar','tanarId':adat['tanarId']})+'">'+adat['tanarNev']+'</a>');
+ $('#updateWindowSideSubContent').html(content);
+ $('#updateWindowSideSub').addClass('nyitva');
+ } else {
+ $('#updateWindowSideTitle').html('<a href="'+href({'page':'naplo','sub':'intezmeny','f':'tanar','tanarId':adat['tanarId']})+'">'+adat['tanarNev']+'</a>');
+ $('#updateWindowSideContent').html(content);
+ $('#updateWindowSide').addClass('nyitva');
+ }
+
+}
+
+processJSONOraAdat = function(adat) {
+
+ var content = '';
+ var dolgozatAdat;
+
+ content += '<div id="mayorNaviIconHolder">';
+ content += '<div class="mayorNaviIcon"><a href="'+href({'page':'naplo','sub':'haladasi','f':'haladasi','tanarId':adat['oraAdat']['ki'],'tankorId':adat['oraAdat']['tankorId']})+'"><span class="icon-file-edit-alt"></span><br/>Haladási</a></div>';
+ content += '<div class="mayorNaviIcon"><a href="'+href({'page':'naplo','sub':'hianyzas','f':'ora','oraId':adat['oraId']})+'"><span class="icon-calendar-sign"></span><br/>Hiányzások</a></div>';
+ content += '</div>';
+
+ content += '<h3>A haladási óra adatai</h3>';
+ content += '<ul>';
+ content += '<li>Típus: ' + adat['oraAdat']['tipus'] +'</li>';
+ content += '<li>Tankör: ' + adat['oraAdat']['tankorNev']+'</li>';
+ if (adat['oraAdat']['kiCn']!='') content += '<li><span class="tanarNev" data-tanarid="'+adat['oraAdat']['ki']+'" >Tanár: ' + adat['oraAdat']['kiCn'] +'</span></li>';
+// if (adat['oraAdat']['kiCn']!='') content += '<li><span>Tanár: ' + adat['oraAdat']['kiCn'] +'</li>';
+ if (adat['oraAdat']['kitCn']!='') content += '<li>Helyettesítendő: ' + adat['oraAdat']['kitCn'] +'</li>';
+ content += '<li>Terem: ' + (adat['oraAdat']['teremId']==null?'–':adat['oraAdat']['teremId']) +'</li>';
+ content += '<li>Leírás: ' + mayorLeiras(adat['oraAdat']['leiras']) +'</li>';
+ content += '</ul>';
+
+ if (adat['oraBeirhato']) content += adat['oraForm'];
+
+// content += '<h3>Óra kapcsolatai</h3>';
+// content += '<ul><li>Beírt mulasztások száma: '+'n/a'+'</li>';
+// content += '<li>Beírt jegyek száma: '+'n/a'+'</li>';
+// content += '</ul>';
+
+ if (adat['dolgozat']['dolgozatIds'].length>0) {
+ content += '<h3>Dolgozatok</h3>';
+ content += '<ul>';
+ for (i=0; i<adat['dolgozat'].dolgozatIds.length; i++) {
+ dolgozatAdat = adat['dolgozat'][adat['dolgozat'].dolgozatIds[i]];
+ content += '<li class="dolgozatAdat" data-dolgozatid="'+dolgozatAdat['dolgozatId']+'">'+dolgozatAdat['tervezettDt']+': '+ dolgozatAdat.dolgozatNev + '</li>';
+ // bejelentesDt, tervettDt, tankor...
+ }
+ content += '</ul>';
+ }
+
+ if (adat['elozoOrak']!=undefined && adat['elozoOrak'].length>0) {
+ content += '<h3>Előző órák</h3>';
+ content += '<ul>';
+ for (i=0; i<adat['elozoOrak'].length; i++) {
+ content += '<li class="oraAdat" data-oraid="'+adat['elozoOrak'][i]['oraId']+'">'
+ + adat['elozoOrak'][i]['dt'] + ' '
+ + adat['elozoOrak'][i]['ora'] + '. óra '
+ + mayorLeiras(adat['elozoOrak'][i]['leiras'])
+ + '</li>';
+ }
+ content += '</ul>';
+ }
+
+// content += '<div class="oraErtekel" data-oraid="1" data-jovolt="1">+++++</div>';
+// content += '<div class="oraErtekel" data-oraid="1" data-jovolt="0">-----</div>';
+
+ content += '<span style="display:none" id="mayorsidewindowtype" data-mayorsidewindowtype="oraAdat"></span>';
+ if ( $('#updateWindowSide').hasClass('nyitva') ==true && $('#mayorsidewindowtype').data('mayorsidewindowtype')!='oraAdat' ) {
+ $('#updateWindowSideSubContent').html(content);
+ $('#updateWindowSideSubTitle').html('<a href="'+href({'page':'naplo','sub':'hianyzas','f':'ora','oraId':adat['oraId']})+'">Haladási napló</a>');
+ $('#updateWindowSideSub').addClass('nyitva');
+ } else {
+ $('#updateWindowSideContent').html(content);
+ $('#updateWindowSideTitle').html('<a href="'+href({'page':'naplo','sub':'hianyzas','f':'ora','oraId':adat['oraId']})+'">Haladási napló órája</a>');
+ $('#updateWindowSide').addClass('nyitva');
+ }
+
+}
+
+processJSONJegyAdat = function(adat) {
+
+ var content = '';
+
+ content += '<div id="mayorNaviIconHolder">';
+ content += '<div class="mayorNaviIcon"><a href="'+href({'page':'naplo','sub':'osztalyozo','f':'jegy','jegyId':adat['jegyId']})+'"><span class="icon-pencil-alt"></span><br/>Jegy</a></div>';
+ content += '</div>';
+
+ content += '<h3>A jegy adatai</h3>';
+ content += '<ul>';
+ content += '<li>Értékelés (rövid): ' + adat['jegyAdat']['rovid'] +'</li>';
+ content += '<li>Hivatalos értékelés: ' + adat['jegyAdat']['hivatalos'] +'</li>';
+ content += '<li>Diák: <span class="diakNev" data-diakid="'+adat['jegyAdat']['diakId']+'">' + adat['diakNev'] +'</span></li>';
+ content += '<li>Diák azonosító: ' + adat['jegyAdat']['diakId'] +'</li>';
+ content += '<li>Tárgy: ' + adat['targyNev'] + ' (' + adat['jegyAdat']['targyId'] +')</li>';
+ content += '<li>Jegy típus: ' + adat['jegyAdat']['jegyTipus'] +'</li>';
+ content += '<li>Jegy érték: ' + adat['jegyAdat']['jegy'] +'</li>';
+ if (adat['jegyAdat']['oraId']>0) content += '<li>Kapcsolódó óra: <span class="oraAdat" data-oraid="'+adat['jegyAdat']['oraId']+'">'+ adat['jegyAdat']['oraId'] +'</span></li>';
+ if (adat['jegyAdat']['dolgozatId']>0) content += '<li>Kapcsolódó dolgozat: <span class="dolgozatAdat" data-dolgozatid="'+adat['jegyAdat']['dolgozatId']+'">'+ adat['jegyAdat']['dolgozatId'] +'</span></li>';
+ content += '<li>Megjegyzés: ' + adat['jegyAdat']['megjegyzes'] +'</li>';
+ content += '<li>Beírás dátuma: ' + adat['jegyAdat']['dt'] +'</li>';
+ if (adat['jegyAdat']['modositasDt']!='0000-00-00 00:00:00') content += '<li>Utolsó módosítás: ' + adat['jegyAdat']['modositasDt'] +'</li>';
+
+// if (adat['oraAdat']['kiCn']!='') content += '<li>Tanár: ' + adat['oraAdat']['kiCn'] +'</li>';
+// if (adat['oraAdat']['kitCn']!='') content += '<li>Helyettesítendő: ' + adat['oraAdat']['kitCn'] +'</li>';
+ content += '</ul>';
+
+ // content += adat['jegySelect'];
+
+ content += '<span style="display:none" id="mayorsidewindowtype" data-mayorsidewindowtype="jegyAdat"></span>';
+ if ( $('#updateWindowSide').hasClass('nyitva') ==true && $('#mayorsidewindowtype').data('mayorsidewindowtype')!='jegyAdat' ) {
+ $('#updateWindowSideSubContent').html(content);
+ $('#updateWindowSideSubTitle').html('Jegy adatai');
+ $('#updateWindowSideSub').addClass('nyitva');
+ } else {
+ $('#updateWindowSideContent').html(content);
+ $('#updateWindowSideTitle').html('Jegy adatai');
+ $('#updateWindowSide').addClass('nyitva');
+ }
+}
+
+processJSONZaroJegyAdat = function(adat) {
+
+ var content = '';
+ content += '<h3>A zárójegy adatai</h3>';
+ content += '<ul>';
+ content += '<li>Hivatalos értékelés: ' + adat['zaroJegyAdat']['hivatalos'] +'</li>';
+ content += '<li>Értékelés (rövid): ' + adat['zaroJegyAdat']['rovid'] +'</li>';
+ content += '<li>Diák: <span class="diakNev" data-diakid="'+adat['zaroJegyAdat']['diakId']+'">' + adat['diakNev'] +'</span></li>';
+ content += '<li>Diák azonosító: ' + adat['zaroJegyAdat']['diakId'] +'</li>';
+ content += '<li>Tárgy: ' + adat['targyNev'] + ' ' + adat['zaroJegyAdat']['targyId'] +'</li>';
+ content += '<li>Évfolyamjel: ' + adat['zaroJegyAdat']['evfolyamJel'] +'</li>';
+ content += '<li>Félév: ' + adat['zaroJegyAdat']['felev'] +'</li>';
+ content += '<li>Jegy típus: ' + adat['zaroJegyAdat']['jegyTipus'] +'</li>';
+ content += '<li>Jegy érték: ' + adat['zaroJegyAdat']['jegy'] +'</li>';
+ content += '<li>Megjegyzés: ' + adat['zaroJegyAdat']['megjegyzes'] +'</li>';
+ content += '<li>Módosítás dátuma: ' + adat['zaroJegyAdat']['modositasDt'] +'</li>';
+ content += '<li>Hivatalos dátum: ' + adat['zaroJegyAdat']['hivatalosDt'] +'</li>';
+ content += '</ul>';
+
+ if (adat['fotargy']==true) {
+ content += '<h3>Főtárgy</h3>';
+ }
+ if (adat['altargy']==true) {
+ content += '<h3>Altárgy</h3>';
+ }
+
+ // content += adat['jegySelect'];
+ // console.log(adat);
+ content += '<span style="display:none" id="mayorsidewindowtype" data-mayorsidewindowtype="zaroJegyAdat"></span>';
+ if ( $('#updateWindowSide').hasClass('nyitva') ==true && $('#mayorsidewindowtype').data('mayorsidewindowtype')!='zaroJegyAdat' ) {
+ $('#updateWindowSideSubContent').html(content);
+ $('#updateWindowSideSubTitle').html('Osztályzat, zárójegy');
+ $('#updateWindowSideSub').addClass('nyitva');
+ } else {
+ $('#updateWindowSideContent').html(content);
+ $('#updateWindowSideTitle').html('Osztályzat, zárójegy');
+ $('#updateWindowSide').addClass('nyitva');
+ }
+}
+
+processJSONOsztalyAdat = function(adat) {
+
+ if (adat.visibleData != true) return false;
+ var content = '';
+
+ content += '<div id="mayorNaviIconHolder">';
+ content += '<div class="mayorNaviIcon"><a href="'+href({'page':'naplo','sub':'orarend','f':'orarend','osztalyId':adat['osztalyId']})+'"><span class="icon-th"></span><br/>Órarend</a></div>';
+ content += '<div class="mayorNaviIcon"><a href="'+href({'page':'naplo','sub':'haladasi','f':'haladasi','osztalyId':adat['osztalyId']})+'"><span class="icon-file-edit-alt"></span><br/>Haladási</a></div>';
+ content += '</div>';
+
+ content += '<span style="display:none" id="mayorsidewindowtype" data-mayorsidewindowtype="osztaly"></span>';
+ if ( $('#updateWindowSide').hasClass('nyitva') ==true && $('#mayorsidewindowtype').data('mayorsidewindowtype')!='osztaly' ) {
+ $('#updateWindowSideSubTitle').html(adat['nev']);
+ $('#updateWindowSideSubContent').html(content);
+ $('#updateWindowSideSub').addClass('nyitva');
+ } else {
+ $('#updateWindowSideTitle').html(adat['nev']);
+ $('#updateWindowSideContent').html(content);
+ $('#updateWindowSide').addClass('nyitva');
+ }
+
+}
+
+processJSONTankorAdat = function(adat) {
+
+ if (adat.visibleData != true) return false;
+ var content = '';
+
+ content += '<div id="mayorNaviIconHolder">';
+ content += '<div class="mayorNaviIcon"><a href="'+href({'page':'naplo','sub':'orarend','f':'orarend','tankorId':adat['tankorId']})+'"><span class="icon-th"></span><br/>Órarend</a></div>';
+ content += '<div class="mayorNaviIcon"><a href="'+href({'page':'naplo','sub':'haladasi','f':'haladasi','tankorId':adat['tankorId']})+'"><span class="icon-file-edit-alt"></span><br/>Haladási</a></div>';
+// content += '<div class="mayorNaviIcon"><a href="'+href({'page':'naplo','sub':'intezmeny','f':'tanarTankor','diakId':tanarAdat['diakId']})+'"><span class="icon-group-alt"></span><br/>Tankörök</a></div>';
+ content += '<div class="mayorNaviIcon"><a href="'+href({'page':'naplo','sub':'osztalyozo','f':'tankor','tankorId':adat['tankorId']})+'"><span class="icon-pencil-alt"></span><br/>Osztályozó</a></div>';
+ content += '<div class="mayorNaviIcon"><a href="'+href({'page':'naplo','sub':'tanmenet','f':'tanmenetInfo','tanmenetId':adat['tanmenetId']})+'"><span class="icon-calendar-sign"></span><br/>Tanmenet</a></div>';
+ content += '<div class="mayorNaviIcon"><a href="'+href({'page':'naplo','sub':'uzeno','f':'uzeno','tankorId':adat['tankorId']})+'"><span class="icon-envelope"></span><br/>Üzenő</a></div>';
+
+ content += '</div>';
+
+
+ if (adat.tankorTanar!=undefined) {
+ content += '<h3>Tanárok</h3>';
+ content += '<ul>';
+ for (i=0; i<adat.tankorTanar.length; i++) {
+ content += '<li><span class="tanarNev" data-tanarid="'+adat.tankorTanar[i]['tanarId']+'">'+adat.tankorTanar[i].tanarNev+'</span> ('+adat.tankorTanar[i]['minBeDt']+'–'+adat.tankorTanar[i]['maxKiDt']+')</li>';
+ }
+ content += '</ul>';
+ }
+
+ content += '<h3>'+adat['leiras']+'</h3>';
+ content += '<ul>';
+ content += '<li>névsor: '+adat['nevsor']+'</li>';
+ content += '<li>választható: '+adat['felveheto']+' ('+adat['min']+'-'+adat['max']+')</li>';
+ content += '<li>jelenlét: '+adat['jelenlet']+'</li>';
+ content += '<li>hiányzás regisztrálandó: '+adat['regisztralando']+'</li>';
+ content += '<li>hiányzás beleszámít: '+adat['hianyzasBeleszamit']+'</li>';
+ content += '<li>óraszám: '+adat['oraszam']+'</li>';
+ content += '</ul>';
+
+ if (adat.tankorBlokk.length>0) {
+ content += '<h3>Tankörblokk ('+adat.tankorBlokk.length+')</h3>';
+ content += '<ul>';
+ for (i=0; i<adat.tankorBlokk.length; i++) {
+ content += '<li>'+adat.tankorBlokk[i].blokkNev+'</li>';
+ }
+ content += '</ul>';
+ }
+ if (adat.tanmenetId>0) {
+ content += '<h3>Tanmenet ('+adat.tanmenetId+')</h3>';
+ content += '<ul>';
+ content += '<li>név: <a href="'+href({'page':'naplo','sub':'tanmenet','f':'tanmenetInfo','tanmenetId':adat['tanmenetId']})+'">'+adat.tanmenetAdat.tanmenetNev+'</a></li>';
+ content += '<li>évfolyam jel: '+adat.tanmenetAdat.evfolyamJel+'</li>';
+ content += '<li>tárgy: '+adat.tanmenetAdat.targyNev+'</li>';
+ content += '<li>óraszám: '+adat.tanmenetAdat.oraszam+'</li>';
+ content += '<li>státusz: '+adat.tanmenetAdat.statusz+'</li>';
+// for (i=0; i<adat.tanmenetAdat.length; i++) {
+// content += '<li>'+adat.tanmenetAdat[i]+'</li>';
+// }
+ content += '</ul>';
+ }
+
+
+ content += '<h3>Osztályok</h3>';
+ content += '<ul>';
+ if (adat.osztalyIds!=undefined) {
+ for (i=0; i<adat.osztalyIds.length; i++) {
+ osztalyId = adat.osztalyIds[i];
+ for (j=0; j<adat.osztalyok.length; j++) {
+ var index = adat.osztalyok[j].osztalyId
+ if (index == osztalyId) osztalyAdat = adat.osztalyok[j];
+ }
+ content += '<li><a href="'+ href({'page':'naplo','sub':'intezmeny','f':'osztaly','osztalyId':osztalyId}) +'">'+osztalyAdat.osztalyJel+' ('+osztalyAdat.leiras+') '+osztalyAdat.osztalyfonokNev+'</a></li>';
+ }
+ }
+ content += '</ul>';
+
+ content += '<h3><a href="'+href({'page':'naplo','sub':'intezmeny','f':'tankorDiak','tankorId':adat['tankorId']})+'">Névsor</a> ('+adat.tankorDiak.idk.length+')</h3>';
+ content += '<ul>';
+ if (adat.tankorDiak.idk!=undefined) {
+ var _diakId = 0;
+ for (i=0; i<adat.tankorDiak.idk.length; i++) {
+ _diakId = adat.tankorDiak.idk[i];
+ diakNev = adat.tankorDiak.nevek[_diakId].diakNev;
+// content += '<li><a href="'+ href({'page':'naplo','sub':'intezmeny','f':'osztaly','diakId':diakId}) +'">'+osztalyAdat.osztalyJel+' ('+osztalyAdat.leiras+') '+osztalyAdat.osztalyfonokNev+'</a></li>';
+ content += '<li><span class="diakNev diakAdat" data-diakid="'+ _diakId +'">'+ diakNev +'</span></li>';
+ }
+ }
+ content += '</ul>';
+
+ content += '<span style="display:none" id="mayorsidewindowtype" data-mayorsidewindowtype="tankor"></span>';
+ if ( $('#updateWindowSide').hasClass('nyitva') ==true && $('#mayorsidewindowtype').data('mayorsidewindowtype')!='tankor' ) {
+ $('#updateWindowSideSubTitle').html(adat['tankorNev']);
+ $('#updateWindowSideSubContent').html(content);
+ $('#updateWindowSideSub').addClass('nyitva');
+ } else {
+ $('#updateWindowSideTitle').html(adat['tankorNev']);
+ $('#updateWindowSideContent').html(content);
+ $('#updateWindowSide').addClass('nyitva');
+ }
+
+}
+
+
+processJSONSzuloAdat = function( adat ) {
+
+ var content = '';
+
+// content += '<div id="mayorNaviIconHolder">';
+// content += '</div>';
+
+ content += "<h3>Elérhetőségek</h3>";
+ content += '<ul>';
+ content += '<li>Felhasználónév: '+adat['userAccount']+'</li>';
+ content += '<li>Email: '+adat['email']+'</li>';
+ content += '<li>Mobiltelefon: '+adat['mobil']+'</li>';
+ content += '<li>Foglalkozás: '+adat['foglalkozas']+'</li>';
+ content += '<li>Munkahely: '+adat['munkahely']+'</li>';
+ content += '<li>Lakik: '
+ +adat['cimIrsz'] + ' '
+ +adat['cimHelyseg'] + ', '
+ +adat['cimKozteruletNev'] + ' '
+ +adat['cimKozteruletJelleg'] + ' '
+ +adat['cimHazszam']
+ + '</li>';
+
+ content += '</ul>';
+
+ content += "<h3>Szülő adatai</h3>";
+ content += '<ul>';
+ content += '<li>Státusz: '+adat['statusz']+'</li>';
+ content += '<li>Születési adatok: '+'-'+'</li>';
+ content += '</ul>';
+
+
+ content += "<h3>Gyermekei</h3>";
+ content += '<ul>';
+ if (adat['szuloGyermekei']!=undefined)
+ for (i=0; i<adat['szuloGyermekei'].length; i++) {
+ var d = adat['szuloGyermekei'][i];
+ content += '<li>';
+ content += '<a href="'+ href({'page':'naplo','sub':'intezmeny','f':'diak','diakId':d['diakId']}) +'">';
+ content += d['diakNev'];
+ content += '</a>';
+ content += '</li>';
+ }
+
+ content += '</ul>';
+
+ content += '<span style="display:none" id="mayorsidewindowtype" data-mayorsidewindowtype="szulo"></span>';
+ content = content.replace(/undefined/g, "-"); // testing
+
+ if ( $('#updateWindowSide').hasClass('nyitva') ==true && $('#mayorsidewindowtype').data('mayorsidewindowtype')!='szulo' ) {
+ //$('#updateWindowSideSubTitle').html(adat['szuloNev']);
+ $('#updateWindowSideSubTitle').html('<a href="'+href({'page':'naplo','sub':'intezmeny','f':'diakSzulo','szuloId':adat['szuloId']})+'">'+adat['szuloNev']+'</a>');
+ $('#updateWindowSideSubContent').html(content);
+ $('#updateWindowSideSub').addClass('nyitva');
+ } else {
+ $('#updateWindowSideTitle').html('<a href="'+href({'page':'naplo','sub':'intezmeny','f':'diakSzulo','szuloId':adat['szuloId']})+'">'+adat['szuloNev']+'</a>');
+ //$('#updateWindowSideTitle').html(adat['szuloNev']);
+ $('#updateWindowSideContent').html(content);
+ $('#updateWindowSide').addClass('nyitva');
+ }
+
+}
+
+
+processJSONJegyzetAdat = function(adat) {
+
+ if (adat.visibleData != true) return false;
+ var content = '';
+ content += '<p>'+adat['jegyzetForm']+'</p>';
+
+ content += '<span style="display:none" id="mayorsidewindowtype" data-mayorsidewindowtype="jegyzet"></span>';
+ if ( $('#updateWindowSide').hasClass('nyitva') ==true && $('#mayorsidewindowtype').data('mayorsidewindowtype')!='jegyzet' ) {
+ $('#updateWindowSideSubTitle').html(adat['leiras']);
+ $('#updateWindowSideSubContent').html(content);
+ $('#updateWindowSideSub').addClass('nyitva');
+ } else {
+ $('#updateWindowSideTitle').html(adat['leiras']);
+ $('#updateWindowSideContent').html(content);
+ $('#updateWindowSide').addClass('nyitva');
+ }
+
+}
+
+processJSONNapAdat = function(adat) {
+
+// if (adat.visibleData != true) return false;
+ var content = '';
+
+ content += '<ul>'
+ content += '<li>Tanítási nap: '+adat['tanitasiNapAdat'][adat['dt']]['napszam']+'</li>';
+
+ for (i=0; i<adat.napAdat.length; i++) {
+ content += '<li>';
+ content += adat.napAdat[i]['munkatervId']+'. munkaterv szerint:';
+ content += '<ul>';
+ content += '<li>nap típus: '+adat.napAdat[i]['tipus']+'</li>';
+ content += '<li>csengetési rend: '+adat.napAdat[i]['csengetesiRendTipus']+'</li>';
+ content += '<li>megjegyzés: '+adat.napAdat[i]['megjegyzes']+'</li>';
+ content += '</ul>';
+ content += '</li>';
+ }
+ content += '</ul>';
+
+
+ content += '<span style="display:none" id="mayorsidewindowtype" data-mayorsidewindowtype="napAdat"></span>';
+ if ( $('#updateWindowSide').hasClass('nyitva') ==true && $('#mayorsidewindowtype').data('mayorsidewindowtype')!='napAdat' ) {
+ $('#updateWindowSideSubTitle').html(adat['leiras']);
+ $('#updateWindowSideSubContent').html(content);
+ $('#updateWindowSideSub').addClass('nyitva');
+ } else {
+ $('#updateWindowSideTitle').html(adat['leiras']);
+ $('#updateWindowSideContent').html(content);
+ $('#updateWindowSide').addClass('nyitva');
+ }
+
+}
+
+processJSONDolgozatAdat = function(adat) {
+
+// if (adat.visibleData != true) return false;
+ var content = '';
+ var tankorAdat;
+ content += '<div id="mayorNaviIconHolder">';
+ content += '<div class="mayorNaviIcon"><a href="'+href({'page':'naplo','sub':'osztalyozo','f':'dolgozat','dolgozatId':adat['dolgozatId']})+'"><span class="icon-idea-alt"></span><br/>Dolgozat adatok</a></div>';
+ content += '<div class="mayorNaviIcon"><a href="'+href({'page':'naplo','sub':'osztalyozo','f':'tankor'})+'"><span class="icon-pencil-alt"></span><br/>Jegyek</a></div>';
+ content += '</div>';
+
+
+ content += '<ul>'
+ content += '<li>Leírás: <i>'+adat['dolgozatAdat']['dolgozatNev']+'</i></li>';
+ content += '<li>Bejelentés: '+adat['dolgozatAdat']['bejelentesDt']+'</li>';
+ content += '<li>Tervezett: '+adat['dolgozatAdat']['tervezettDt']+'</li>';
+ content += '</ul>';
+
+ content += '<h3>Tankörök</h3>';
+ content += '<ul>';
+ for (i=0; i<adat['dolgozatAdat']['tankorok'].length; i++) {
+ tankorAdat = adat['dolgozatAdat']['tankorok'][i][0];
+ content += '<li class="tankorAdat" data-tankorid="'+tankorAdat['tankorId']+'">' +tankorAdat['tankorNev']+'</li>';
+ }
+ content += '</ul>';
+
+ content += '<h3>Érdemjegy statisztika</h3>';
+ content += '<ul>'
+ content += '<li>Beírt jegy: '+adat['dolgozatAdat']['jegyStatisztika']['db']+'</li>';
+ content += '<li>Átlag: '+adat['dolgozatAdat']['jegyStatisztika']['atlag']+'</li>';
+ content += '</ul>';
+
+ content += '<span style="display:none" id="mayorsidewindowtype" data-mayorsidewindowtype="dolgozatAdat"></span>';
+ if ( $('#updateWindowSide').hasClass('nyitva') ==true && $('#mayorsidewindowtype').data('mayorsidewindowtype')!='dolgozatAdat' ) {
+ $('#updateWindowSideSubTitle').html(adat['leiras']);
+ $('#updateWindowSideSubContent').html(content);
+ $('#updateWindowSideSub').addClass('nyitva');
+ } else {
+ $('#updateWindowSideTitle').html(adat['leiras']);
+ $('#updateWindowSideContent').html(content);
+ $('#updateWindowSide').addClass('nyitva');
+ }
+
+}
+
+
+// -----------------------------------------------------------------
+mayorNaploEventHandlers = function() {
+
+ $('.jegyzetAdat').off('click').on('click', function(event) {
+ // credits: rpetya (rakolcza.peter@gmail.com)
+ element = $(event.target);
+ var elementData = element.data();
+ var ID = '';
+ var refJegyzetDt = '';
+ if ( elementData.hasOwnProperty('jegyzetid')==true ) {
+ ID = (element.data('jegyzetid'));
+ refJegyzetDt = (element.data('jegyzetdt'));
+ } else if ( $(this).data().hasOwnProperty('jegyzetid')==true ) {
+ ID = $(this).data('jegyzetid');
+ refJegyzetDt = $(this).data('jegyzetdt');
+ }
+ //event.stopPropagation();
+ if (ID!='') ajaxGetJegyzetAdat(ID,refJegyzetDt);
+ });
+
+ $('.setOraAdat').off('click').on('click', function(event) {
+ ajaxSetOraAdat($(this).parents('form').serialize());
+ });
+ $('.setJegyzetAdat').off('click').on('click', function(event) {
+ ajaxSetJegyzetAdat($(this).parents('form').serialize());
+ });
+
+ $('.delJegyzet').off('click').on('click', function(event) {
+ ajaxDelJegyzet($(this).parents('form').serialize());
+ });
+
+ $('.oraAdat').off('click').on('click', function(event) {
+ element = $(event.target);
+ var elementData = element.data();
+ var ID = '';
+ if ( elementData.hasOwnProperty('oraid')==true ) {
+ ID = (element.data('oraid'));
+ } else if ( $(this).data().hasOwnProperty('oraid')==true ) {
+ ID = $(this).data('oraid');
+ }
+ if (ID!='') ajaxGetOraAdat(ID);
+ $('.oraAdat').removeClass('activeElement');
+ $(this).addClass('activeElement');
+ });
+
+ $('.dolgozatAdat').off('click').on('click', function(event) {
+ element = $(event.target);
+ var elementData = element.data();
+ var ID = '';
+ if ( elementData.hasOwnProperty('dolgozatid')==true ) {
+ ID = (element.data('dolgozatid'));
+ } else if ( $(this).data().hasOwnProperty('dolgozatid')==true ) {
+ ID = $(this).data('dolgozatid');
+ }
+ if (ID!='') ajaxGetDolgozatAdat(ID);
+ });
+
+ $('.napAdat').off('click').on('click', function(event) {
+ element = $(event.target);
+ var elementData = element.data();
+ var ID = '';
+ if ( elementData.hasOwnProperty('napdt')==true ) {
+ ajaxGetNapAdat(element.data('napdt'));
+ }
+ });
+
+ $('.diakNev').off('click').on('click', function(event) {
+ element = $(event.target);
+ var elementData = element.data();
+ var ID = '';
+ if ( elementData.hasOwnProperty('diakid')==true ) {
+ ID = element.data('diakid');
+ } else if ( $(this).data().hasOwnProperty('diakid')==true ) {
+ ID = $(this).data('diakid');
+ }
+ if (ID!='') ajaxGetDiakAdat(ID);
+ });
+
+ $('.tanarNev').off('click').on('click', function(event) {
+
+ element = $(event.target);
+ var elementData = element.data();
+ var ID = '';
+ if ( elementData.hasOwnProperty('tanarid')==true ) {
+ ID = element.data('tanarid');
+ } else if ( $(this).data().hasOwnProperty('tanarid')==true ) {
+ ID = $(this).data('tanarid');
+ }
+ if (ID!='') ajaxGetTanarAdat(ID);
+ });
+
+ $('.szuloNev').off('click').on('click', function(event) {
+ element = $(event.target);
+ var elementData = element.data();
+ var ID = '';
+ if ( elementData.hasOwnProperty('szuloid')==true ) {
+ ajaxGetSzuloAdat(element.data('szuloid'));
+ }
+ });
+
+} // mayorNaploEventHandlers
+// -----------------------------------------------------------------
+
+updateJegyzet = function(adat) {
+
+ $('#orarendJegyzetSor').show();
+ var jegyzetId = parseInt(adat['jegyzetId']);
+ $('.jegyzetContainer[data-dt!="'+adat['dt']+'"] div.jegyzetAdat[data-jegyzetid='+jegyzetId+']').remove();
+ $('div.jegyzetAdat[data-jegyzetid='+jegyzetId+']').remove();
+ var result = $('div.jegyzetAdat[data-jegyzetid="'+(jegyzetId)+'"]').text(adat.jegyzetLeiras);
+ if (result.length==0) {
+ var o = '<div class="jegyzet jegyzetAdat publikus'+adat['publikus']+'" data-jegyzetid="'+jegyzetId+'"></div>';
+ $('.jegyzetContainer[data-dt="'+adat['dt']+'"]').append(o);
+ $('div.jegyzetAdat[data-jegyzetid="'+jegyzetId+'"]').text(adat.jegyzetLeiras);
+ }
+ // minden nyitva levőt bezár -- TODO -- altalanos
+ $('#updateWindowSideSub').removeClass('nyitva');
+ $('#updateWindowSide').removeClass('nyitva');
+ if ($.isFunction(hideUpdateWindowSide)) hideUpdateWindowSide();
+ if ($.isFunction(hideUpdateWindowSideSub)) hideUpdateWindowSideSub();
+}
+
+removeJegyzet = function(adat) {
+ var jegyzetId = parseInt(adat['jegyzetId']);
+ $('div.jegyzetAdat[data-jegyzetid='+jegyzetId+']').remove();
+ // minden nyitva levőt bezár -- TODO -- altalanos
+ $('#updateWindowSideSub').removeClass('nyitva');
+ $('#updateWindowSide').removeClass('nyitva');
+ if ($.isFunction(hideUpdateWindowSide)) hideUpdateWindowSide();
+ if ($.isFunction(hideUpdateWindowSideSub)) hideUpdateWindowSideSub();
+}
+
+hideUpdateWindowSide = function() {
+ $('.oraAdat').removeClass('activeElement');
+}
+
+mayorLeiras = function(str) {
+ if (str==undefined || str=='' || str == false) {
+ return '<i>–</i>';
+ } else {
+ return '<i>' + $('<div/>').text(str).html() + '</i>';
+ }
+}
+
+mayorLoaderStop = function() { // overwrite orig
+ mayorNaploEventHandlers();
+ mayorLoaderCounter--;
+ if (mayorLoaderCounter==0) {
+ $('#poz li:first').removeClass('mayorLoader');
+ }
+}
+
+ajaxSetOraLike = function(oraId, jovolt) {}
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/orarend/orarend.jquery.min.js b/mayor-orig/www/skin/classic/module-naplo/javascript/orarend/orarend.jquery.min.js
new file mode 100644
index 00000000..0a0875cb
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/orarend/orarend.jquery.min.js
@@ -0,0 +1,81 @@
+$(function() {
+
+ function isMobile() { // --TODO -- global namespace
+ try{ document.createEvent("TouchEvent"); return true; }
+ catch(e){ return false; }
+ }
+
+ var origHtmlStr = $('table.orarend thead th.het').html();
+
+ $('table.orarend thead tr th').on('click',function() { // tool kezeles mobilon
+ if ($(this).data('napindex')>0 && isMobile() == true) {
+ $(this).find('table.orarend span.napLeiras').toggle();
+ $(this).find('table.orarend div.orarendTools').toggle();
+ }
+ });
+
+
+ if ($('table.orarend tr th.ma').length>0 && $('html').width()<500) {
+ for (var i=1; i<=6; i++) $('table.orarend *[data-napindex="'+i+'"]').not('.ma').hide();
+ $('table.orarend thead th.het').html('<div class="icon-repeat-alt" style="font-size:20px"></div>');
+ }
+
+
+ $('table.orarend tbody tr.orarendJegyzetSor th').on('click', function() {
+ $('table.orarend tbody tr.orarendJegyzetSor').hide();
+ $('table.orarend thead th.het').html('<div class="icon-repeat-alt" style="font-size:20px"></div>');
+ });
+
+ $('table.orarend tr th span.bezar').click(function() {
+ // event.stopPropagation();
+ var napindex = ($(this).parents('th').data('napindex'));
+ if (napindex==undefined) {
+ //for (var i=1; i<=6; i++) $('table.orarend *[data-napindex="'+i+'"]').not('.ma').toggle('right');
+ for (var i=1; i<=6; i++) $('table.orarend *[data-napindex="'+i+'"]').show('right');
+ $('table.orarend thead th.het').html(origHtmlStr);
+ } else {
+ $('table.orarend *[data-napindex="'+napindex+'"]').hide('left');
+ $('table.orarend thead th.het').html('<div class="icon-repeat-alt" style="font-size:20px"></div>');
+ }
+ });
+ $('table.orarend tr th.het').click(function(event) {
+ event.stopPropagation();
+ for (var i=1; i<=6; i++) $('table.orarend *[data-napindex="'+i+'"]').show('right');
+ $('table.orarend thead th.het').html(origHtmlStr);
+ $('table.orarend tbody tr.orarendJegyzetSor').show();
+ });
+ // $(window).resize(orarendResizer); // missing
+ $('.most').parent('th').addClass('most');
+ $('table.orarend td.csr').bind('mouseenter', function(event) {
+ var el = $(event.target);
+ var iid = '';
+ var thiselement = null;
+ if (el.is('td') && el.attr('id')!='') {
+ iid = el.attr('id')
+ thiselement = el;
+ } else if (el.parents('td').attr('id')!='') {
+ iid = el.parents('td').attr('id');
+ thiselement = el.parents('td');
+ }
+ if (iid!='undefined' && iid!='') {
+ var nap = iid.split('_')[2];
+ for (var i=1; i<=7; i++) {
+ if (nap==i) {
+ $('.csr_'+i).show();
+ $('.csr_'+i).parent('th').removeClass('most');
+ $('.most').parent('th').addClass('most');
+ }
+ else $('.csr_'+i).hide();
+ }
+ }
+ // hover
+ var napindex = thiselement.data('napindex');
+ $('table.orarend thead tr th[data-napindex="'+napindex+'"]').addClass('hover');
+ var oraindex = thiselement.data('oraindex');
+ $('table.orarend tbody tr th[data-oraindex="'+oraindex+'"]').addClass('hover');
+ });
+ $('table.orarend td.csr').bind('mouseleave', function(event) {
+ $('table.orarend thead tr th').removeClass('hover');
+ $('table.orarend tbody tr th').removeClass('hover');
+ });
+});
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/orarend/orarendModosito.jquery.min.js b/mayor-orig/www/skin/classic/module-naplo/javascript/orarend/orarendModosito.jquery.min.js
new file mode 100644
index 00000000..ceca5176
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/orarend/orarendModosito.jquery.min.js
@@ -0,0 +1,12 @@
+$(function() {
+ $('#haladasiModositando').bind('click', function(event) {
+ $target = $(event.target);
+ $target.parent('div').toggleClass('haladasiModositando');
+ //alert('Ez a funkció egy új fejlesztés!');
+ //console.log($target);
+ });
+
+ $('table.orarend tbody tr td input[type=checkbox]').click(function() {
+ $(this).closest('div').toggleClass('torlesreJelolve');
+ });
+});
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/orarend/orarendModosito.js b/mayor-orig/www/skin/classic/module-naplo/javascript/orarend/orarendModosito.js
new file mode 100644
index 00000000..25ab35a1
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/orarend/orarendModosito.js
@@ -0,0 +1,80 @@
+/*
+Event.observe(window, 'load', myPSFLoader, false);
+
+function myPSFLoader(evt) {
+
+ doOnChange = function(event) {
+ var element = $(Event.element(event));
+ if (element.hasClassName('orarendTankor')) {
+ var idArray = element.getAttribute('id').split('_');
+ var id = idArray[1]+'_'+idArray[2]+'_'+idArray[3];
+ var orarendTankor = element.up('table').getElementsBySelector('select.orarendTankor');
+ var ertek = $F(element);
+ $A(orarendTankor).each(
+ function (elem, index) {
+ if (elem.getAttribute('id').include(id)) {
+ elem.setValue(ertek);
+ }
+ }
+ );
+
+ }
+ }
+
+ Event.observe(document.body, 'mayor:change', doOnChange);
+
+ Event.observe(document.body, 'change', doOnChange);
+
+// Sortable.create('test', { tag:'div', overlap:'horizontal',constraint:false });
+ Sortable.create('orarend', { tag:'div', only:'draggable' ,
+ tree: true,
+ treeTag: 'div',
+ overlap:'vertical',
+ dropOnEmpty:true,
+ constraint:false,
+ onEnd: function(){
+ alert('onEnd');
+ },
+ onChange:function(e){
+// $('infoBox').update( Form.Element.getValue( e.down('input')) );
+
+ e.addClassName('moved');
+
+ e.down('input').checked=false;
+ e.down('input').hide();
+
+// e.down('input').value='test';
+
+ // ez az eredeti helye (het.nap.ora.tanarId)
+ $('infoBox1').update( (e.down('input').value) );
+ // ez az új helye
+ $('infoBox2').update( e.up('td').getAttribute('id') );
+
+ } });
+
+// new Draggable('draggable', { revert: true });
+// Droppables.add('droppable', { accept: 'draggable' });
+
+// Sortable.create(
+// 'sortable',
+// {onUpdate:function(){$('debug').update(++callsToOnUpdate+' call(s) to onUpdate')}}
+// );
+
+// $('targySelect').disable();
+// $('targySelect').hide(); $('mozgat').hide();
+// $('action').value='ujSorrend';
+// $('targyUl').show(); $('submit').show();
+
+
+// Sortable.create(
+// "draggable",
+// {dropOnEmpty:true,handle:'handle',containment:["draggable"],constraint:false,onChange:function(){}}
+// );
+
+
+// $('serialize').observe('click', function(event) {
+// alert(Sortable.serialize('sortable'));
+// });
+
+}
+*/ \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/orarend/termez.jquery.min.js b/mayor-orig/www/skin/classic/module-naplo/javascript/orarend/termez.jquery.min.js
new file mode 100644
index 00000000..a19bd03e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/orarend/termez.jquery.min.js
@@ -0,0 +1,5 @@
+$(function() {
+ $('.magic').bind('click', function(event) {
+ $('.magic').val('Várj, ne nyomj meg még1*! :) épp varázsolunk...');
+ });
+});
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/osztalyozo/diak.jquery.min.js b/mayor-orig/www/skin/classic/module-naplo/javascript/osztalyozo/diak.jquery.min.js
new file mode 100644
index 00000000..b4a58912
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/osztalyozo/diak.jquery.min.js
@@ -0,0 +1,93 @@
+$(function() {
+
+ $('#virtualJegyEasterEgg').click(function() { $('.virtual').remove(); $('.eeHidden').fadeToggle(); atlagSzamol(); });
+ $('.addVirtualJegy').click(function() {
+ var x = $(this).prev().val().split('|');
+ var tipus = $(this).prev().prev().val();
+ var jegy = 0;
+ for(var i = x.length; i--;) {
+ var z = x[i].split('=');
+ if (z[0]=='targyId') { targyId = z[1]; }
+ if (z[0]=='jegy') { jegy = z[1]; }
+ }
+ if (jegy>0)
+ $(this).parent().next('td').append('<a class="eeHidden virtual jegy jegy'+tipus+'" title="" data-targyid="'+targyId+'" data-jegy="'+jegy+'" data-jegytipus="féljegy" data-tipus="'+tipus+'"> '+parseFloat(jegy).toFixed(2)+'</a>');
+ atlagSzamol();
+ });
+
+ $('#sulyozas').on('change',function() {
+ atlagSzamol();
+ });
+
+ $('.jegy1').hover(function(event) {
+ $('.jegy1').addClass('jegyKiemel');
+ }, function(event) {
+ $('.jegy1').removeClass('jegyKiemel');
+ });
+ $('.jegy2').hover(function(event) {
+ $('.jegy2').addClass('jegyKiemel');
+ }, function(event) {
+ $('.jegy2').removeClass('jegyKiemel');
+ });
+ $('.jegy3').hover(function(event) {
+ $('.jegy3').addClass('jegyKiemel');
+ }, function(event) {
+ $('.jegy3').removeClass('jegyKiemel');
+ });
+ $('.jegy4').hover(function(event) {
+ $('.jegy4').addClass('jegyKiemel');
+ }, function(event) {
+ $('.jegy4').removeClass('jegyKiemel');
+ });
+ $('.jegy5').hover(function(event) {
+ $('.jegy5').addClass('jegyKiemel');
+ }, function(event) {
+ $('.jegy5').removeClass('jegyKiemel');
+ });
+
+ $('tfoot .jegy0').click(function(event) {jegyToggleByTipus(0);});
+ $('tfoot .jegy1').click(function(event) {jegyToggleByTipus(1);});
+ $('tfoot .jegy2').click(function(event) {jegyToggleByTipus(2);});
+ $('tfoot .jegy3').click(function(event) {jegyToggleByTipus(3);});
+ $('tfoot .jegy4').click(function(event) {jegyToggleByTipus(4);});
+ $('tfoot .jegy5').click(function(event) {jegyToggleByTipus(5);});
+
+});
+
+function jegyToggleByTipus(tipus) {
+ if (tipus==0) $('tfoot .jegy0').removeClass('icon-refresh');
+ else $('tfoot .jegy0').removeClass('icon-search-alt').addClass('icon-refresh');
+ $.each([ 1,2,3,4,5 ], function( index, value ) {
+ if (tipus!=0 && tipus!=value) {
+ $('tbody .jegy'+value).fadeOut();
+ } else {
+ $('tbody .jegy'+value).fadeIn();
+ }
+ });
+}
+
+function atlagSzamol() {
+ $('.atlag').each(function(i) {
+ targyAtlagSzamol($(this).data('targyid'));
+ });
+}
+
+function targyAtlagSzamol(targyid) {
+
+ var SULYOZAS = $('#sulyozas').val().split(':');
+ var jegyszam = 0;
+ var jegyosszeg = 0;
+ countThese = $('.jegy');
+ for(var i = countThese.length; i--;) {
+ elem = $(countThese[i]);
+ if (elem!='undefined') {
+ if (elem.data('targyid')==targyid) {
+ jegyszam += parseInt(SULYOZAS[elem.data('tipus')-1]);
+ jegyosszeg += parseFloat(elem.data('jegy'))*SULYOZAS[elem.data('tipus')-1] ;
+ $('#targyAtlag_'+elem.data('targyid')).html(''+(jegyosszeg/jegyszam).toFixed(2));
+ }
+ }
+ }
+ // if (jegyszam!=0) console.log('eredmeny:' + (jegyosszeg/jegyszam));
+ return true;
+}
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/osztalyozo/stat.jquery.min.js b/mayor-orig/www/skin/classic/module-naplo/javascript/osztalyozo/stat.jquery.min.js
new file mode 100644
index 00000000..31dcb64c
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/osztalyozo/stat.jquery.min.js
@@ -0,0 +1,49 @@
+$(function() {
+ $('#beallitasok_zaradek').click(function() {
+ $('.bizZaradek').fadeToggle();
+ });
+ $('#beallitasok_targyak').click(function() {
+ $('.tglTargy').fadeToggle();
+ });
+ $('#beallitasok_oraszamok').click(function() {
+ $('.osz').fadeToggle();
+ });
+ $('#beallitasok_statisztika').click(function() {
+ $('.bizstat').fadeToggle();
+ });
+
+ $('thead tr td.bizZaradek').click(function() {
+ var tmp = $('.bizZaradek select');
+ for (i=0; i<tmp.length; i++) {
+ tmp[i].selectedIndex=1;
+ }
+ });
+
+ $('.toggleBeallitasok').click(function() {
+ $('#beallitasok_zaradek').trigger('click');
+ $('#beallitasok_targyak').trigger('click');
+ $('#beallitasok_oraszamok').trigger('click');
+ $('#beallitasok_statisztika').trigger('click');
+ });
+
+ // Ha a tárgyakat is manipulálnánk valahogy:
+ $('thead tr td.tglTargy').click(function(event) {
+ var targyIndex = event.target.id.substr(5);
+ //$('.t'+targyIndex).fadeToggle();
+ $('.t'+targyIndex).toggleClass('szuk');
+ });
+
+ // inicializálás (onLoad)
+ if ($('#beallitasok_zaradek').attr('checked')) {
+ $('.bizZaradek').show();
+ }
+ if ($('#beallitasok_targyak').attr('checked')) {
+ $('.tglTargy').show();
+ }
+ if ($('#beallitasok_oraszamok').attr('checked')) {
+ $('.osz').show();
+ }
+ if ($('#beallitasok_statisztika').attr('checked')) {
+ $('.bizstat').show();
+ }
+});
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/osztalyozo/tankor.jquery.min.js b/mayor-orig/www/skin/classic/module-naplo/javascript/osztalyozo/tankor.jquery.min.js
new file mode 100644
index 00000000..893f73b3
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/osztalyozo/tankor.jquery.min.js
@@ -0,0 +1,132 @@
+
+// Event.observe(window, 'load', myPSFLoader, false);
+
+$(function() {
+ var eDid = $('#did');
+ $('.check').bind('click',function(event) {
+ if (eDid.val() == '') {
+ alert(eDid.prop('title'));
+ event.preventDefault();
+ }
+ });
+ $('body').bind('keyup', function(event) {
+ var element = $(event.target);
+ var charKeyCode = event.keyCode ? event.keyCode : event.which;
+ if ($('#updateWindow').is(':visible')) { // csak akkor érdekes, ha ott van az ablak
+ if(!element.is('input') && !element.is('textarea') && !element.is('select')) { // input elem esetén ne legyen semmi
+ if (charKeyCode==46) { // Del gomb
+ $('#jegyTorles').click();
+ }
+ }
+ }
+ });
+ $('.felevLezar').bind('click', function(event) {
+ var element = $(event.target);
+// console.log(element.data('szemeszter'));
+// console.log($.find('.atlag'));
+ });
+
+});
+
+showUpdateLayer = function(options) {
+ if (options.submitClass != 'onSubmitUpdate') { // A már megnyitott form frissítésekor ne méretezzünk át!
+ if (options.submitClass == 'onClickUpdateWindow szoveges') {
+ $('#updateWindow').css({'height':'90%', 'top': '60px'});
+ } else {
+ $('#updateWindow').css({'height':'500px', 'top':'200px'});
+ }
+ }
+ takaroElem = $('#takaro');
+ if (takaroElem) takaroElem.show();
+ $('#updateWindow').show();
+ $('#updateForm').prop('tabindex',1);
+ $('#updateForm').focus();
+}
+
+processJSON = function(json) {
+ if (json.action == 'jegyModositas') {
+ var tdElement = $('#td-'+json.data.diakId+'-'+json.data.dolgozatId);
+ var aElement = $('#jegy-'+json.data.jegyId);
+ if (typeof aElement.closest('td').attr('id') !== 'undefined') {
+ var oldDid = (aElement.closest('td').attr('id').split('-'))[2];
+ }
+
+ if (tdElement) tdElement.append(aElement); // áthelyzés a megfelelő dolgozat alá
+ aElement.removeClass('jegy1');
+ aElement.removeClass('jegy2');
+ aElement.removeClass('jegy3');
+ aElement.removeClass('jegy4');
+ aElement.removeClass('jegy5');
+ aElement.addClass('jegy'+json.data.tipus);
+ aElement.html(json.data.jegyStr); // jegy módosítása
+
+ if (json.data.dolgozatId != oldDid) updateDolgozatAtlag(oldDid); // eredeti dolgozat átlaga
+ updateDolgozatAtlag(json.data.dolgozatId); // új dolgozat átlaga
+
+ $('#updateWindow').hide();
+ $('#takaro').hide();
+ } else if (json.action == 'jegyTorles') {
+ var aElement = $('#jegy-'+json.data.jegyId);
+ aElement.remove();
+ $('#updateWindow').hide();
+ $('#takaro').hide();
+ } else {
+ alert('processJSON: ismeretlen visszatérési érték!');
+ }
+}
+
+updateDolgozatAtlag = function(did) {
+ var sum=0, db=0;
+ $('td.d'+did+' a').each(function(index) {
+ sum = sum + parseInt($(this).text()); db++;
+ if ($(this).html().indexOf('/')>-1) sum = sum + 0.5;
+ });
+ avg=(sum/db);
+ avgElement = $('#avg-d'+did);
+ if (avgElement) avgElement.html(avg.toFixed(2));
+}
+
+
+// -- ELAVULT -- de hiányzik a mozgatás!!//
+
+function myPSFLoader(evt) {
+
+ // Csoportos jegy beírásakor ellenőrizzük, hogy ki lett-e választva dolgozat
+ var CheckDolgozatObject = Class.create();
+ CheckDolgozatObject.prototype = {
+ initialize: function(element) {
+ this.element = $(element);
+ this.eDid = $('did');
+ this.element.observe('click',this.checkDolgozat.bindAsEventListener(this));
+ },
+
+ checkDolgozat: function(evt, extraInfo) {
+
+ if (this.eDid.value == '') {
+ alert(this.eDid.getAttribute('title'));
+ Event.stop(evt);
+ }
+
+ }
+ }
+
+ var checkDolgozatElements = new Array();
+ $$('.check').each(
+ function (elem, index) {
+ checkDolgozatElements.push(new CheckDolgozatObject(elem));
+ }
+ );
+
+ Event.observe(document.body, 'keyup', function(event) {
+ var element = $(Event.element(event));
+ var charKeyCode = event.keyCode ? event.keyCode : event.which;
+ // input elem esetén ne legyen semmi
+ if(!element.match('input') && !element.match('textarea') && !element.match('select')) {
+ if (charKeyCode==46 && $('updateWindow').visible()) { // Del gomb
+ $('jegyTorles').click();
+ }
+ }
+ });
+
+// var mydrag = new Draggable('updateWindow', { scroll: window, handle: $('updateHeader') });
+}
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/osztalyozo/targySorrend.jquery.min.js b/mayor-orig/www/skin/classic/module-naplo/javascript/osztalyozo/targySorrend.jquery.min.js
new file mode 100644
index 00000000..9380d30b
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/osztalyozo/targySorrend.jquery.min.js
@@ -0,0 +1,16 @@
+
+$(function() {
+
+ $('#targySelect').prop("disabled","disabled").hide();
+ $('#mozgat').hide();
+ $('#action').prop("value",'ujSorrend');
+ $('#submit').show();
+ $("#targyUl").show().disableSelection().sortable({ axis: "y", handle: ".handle",
+ start: function(event, ui) {
+ $(event.target).find('li').css('background-color','');
+ ui.item.css('background-color','#ffaaaa');
+ },
+ });
+
+});
+
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/osztalyozo/vizsga.jquery.min.js b/mayor-orig/www/skin/classic/module-naplo/javascript/osztalyozo/vizsga.jquery.min.js
new file mode 100644
index 00000000..f3845729
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/osztalyozo/vizsga.jquery.min.js
@@ -0,0 +1,50 @@
+
+hideOptions = function(event) {
+ element = $(event.target);
+ if (element.hasClass('jegyTipus')) {
+ var jegyek = element.next('select');
+ if (element.context.selectedIndex == 0) {
+ jegyek.find('*').prop('disabled',false).show();
+ } else {
+ $(jegyek).val([]);
+ $(jegyek).find('*').prop('disabled','disabled').hide();
+ $(jegyek).find('option:first').prop('disabled',false).show()
+ var selector='optgroup[label="'+element.val()+'"]';
+ jegyek.find(selector).prop('disabled',false).show().find('option').prop('disabled',false).show();
+ }
+ }
+ if (element.hasClass('jegyAdat')) {
+ var tipusok = $(element.parents('.hideShowContainer')[0]).find('.jegyTipus')[0];
+ var jegyTipus = $(element[0].options[element[0].selectedIndex]).parents('optgroup')[0].label;
+ index = 0;
+ while (tipusok.options[index].value != jegyTipus && index < tipusok.options.length && index < 100) index++;
+ if (index < tipusok.options.length) tipusok.selectedIndex=index;
+ else tipusok.selecedIndex=0;
+ }
+}
+
+$(function() {
+ // Halasztás elrejtése
+ $('div.rejtett').hide();
+ $('body').bind('click', function(event) {
+ element = $(event.target);
+
+ // értékeléskor...
+ if (element.hasClass('ertekeles')) {
+ // ... a halasztasDt üresreállítása
+ $(element.parents(".hideShowContainer")[0]).find('input.halasztasDt').prop('value','');
+ }
+ // halasztáskor...
+
+ if (element.hasClass('halasztas')) {
+ // ... a jegytípus/jegy kiválasztást megszüntetjük
+ // $(element.parents('.hideShowContainer')[0]).find('.jegyTipus')[0].selectedIndex=0;
+ // $(element.parents('.hideShowContainer')[0]).find('.jegyAdat')[0].selectedIndex=0;
+ $(element.parents('.hideShowContainer')[0]).find('select').prop('selectedIndex',-1).val([]);
+ $(element.parents('.hideShowContainer')[0]).find('optgroup, option').prop('disabled',false).show();
+ }
+
+ });
+ $('body').bind('change', hideOptions);
+ $('body').bind('mayor:change', hideOptions);
+});
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/stat/tantargyFelosztas.jquery.min.js b/mayor-orig/www/skin/classic/module-naplo/javascript/stat/tantargyFelosztas.jquery.min.js
new file mode 100644
index 00000000..b6b664c5
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/stat/tantargyFelosztas.jquery.min.js
@@ -0,0 +1,15 @@
+
+$(function() {
+
+ $('body').click(function(event) {
+
+ element = $(event.target);
+
+ if (element.closest('th').hasClass('slide')) {
+ element.closest('tbody').find('tr.hide').slideToggle();
+ element.closest('th').find('span').toggleClass('icon-chevron-up').toggleClass('icon-chevron-down');
+ }
+
+ });
+
+});
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/tanev/targyBontas.jquery.min.js b/mayor-orig/www/skin/classic/module-naplo/javascript/tanev/targyBontas.jquery.min.js
new file mode 100644
index 00000000..fd03b778
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/tanev/targyBontas.jquery.min.js
@@ -0,0 +1,823 @@
+
+ updateTbody = function(tbodyElement) {
+ /*
+ * Feltételezzük, hogy egy látható, slideUpAll nélküli nyitó sorral kezdődik a tbody
+ */
+ tbodyElement = $(tbodyElement);
+ firstTr = tbodyElement.find('tr:first');
+ nextTrDb = firstTr.nextAll('tr').length;
+ // első sorban csak slideUpAll, vagy Down lehet
+ firstTr.find('.slideUp').remove();
+ if (nextTrDb > 0) {
+ firstTr.find('td.slide').append('<span class="slideUpAll icon-caret-up"></span>');
+ if (firstTr.data('db') == nextTrDb) { // Az összes sor az első sor alatt van --> eddig is volt Down, kell UpAll, de rejtve
+ firstTr.find('.slideUpAll').hide();
+ }
+ } // vannak további sorok
+ }
+
+ ajaxGetTankorAdat = function(tankorId) {
+ postData = { 'tankorId':tankorId }
+
+ $.ajax({
+ type: "POST",
+ url: "index.php?page=naplo&sub=tools&f=getTankorAdat&policy=private&skin=ajax&sessionID="+$('body').data('sessionID'),
+ data: postData,
+ dataType: 'json'
+ }).done(function( msg, status, jqXHR ) {
+ processJSONTankorAdat(msg);
+ }).fail(function( jqXHR, textStatus, errorThrown ) {
+ //console.log('fail');
+ //console.log(jqXHR);
+ });
+
+ }
+
+ processJSONAddBontas = function( msg ) {
+ //console.log(JSON.stringify(msg));
+
+ // utolsó érintett tr
+ lastTr = $('#tr-'+msg.bontas[msg.bontas.length-1].osztalyId+'-'+msg.bontas[msg.bontas.length-1].kepzesOratervId);
+ // A tartalmazó tbody id-je...
+ tbodyId = lastTr.closest('tbody').attr('id');
+ // eddigi bontásszám
+ bontasDb = lastTr.find('div.bontas').length;
+ // Ha nem az utolsó a tbody-n belül, akkor az őt követő tr-eket külön tbody-ba helyezzük
+ nextLastTr = lastTr.nextAll('tr');
+ if (nextLastTr.length > 0) {
+ tbodyAfter = $('<tbody>').attr('id', tbodyId+'-'+bontasDb).insertAfter($('#'+tbodyId));
+ nextLastTr.appendTo(tbodyAfter);
+ updateTbody(tbodyAfter);
+ }
+ keszKoDbCsokken = (lastTr.hasClass('kesz'));
+ // div beszúrása
+ for (i=0; i<msg.bontas.length; i++) {
+ selector = $('#bTd-'+msg.bontas[i].osztalyId+'-'+msg.bontas[i].kepzesOratervId);
+ selector.append(
+ '<div class="bontas" id="bontas-'+msg.bontas[i].bontasId+'"><span class="bontasDb">'+(bontasDb+1)+'</span>. '
+ +msg.targyNev+' csoport ('+msg.bontas[i].bontasId+')<span class="delBontas icon-remove-circle"></span>'
+ +'<ul class="tankor-oraszam">'
+ +'<li class="marad">'
+ +parseFloat(selector.closest('tr').data('hetioraszam'))
+ +'</li>'
+ +'</ul></div>');
+ $('#bontas-'+msg.bontas[i].bontasId).data('tankororaszam', []);
+ $('#bontas-'+msg.bontas[i].bontasId).data('hetioraszam', 0);
+ $('#bontas-'+msg.bontas[i].bontasId).data('targyid', msg.bontas[i].targyId);
+ $('#bontas-'+msg.bontas[i].bontasId).data('key', msg.bontas[i].bontasId);
+ $('#bontas-'+msg.bontas[i].bontasId).data('keys', msg.bontas[i].bontasId);
+ // az érintett sorok most biztos nem "kész"-ek, mert van egy tankörök nélküli bontásuk
+ selector.closest('tr').removeClass('kesz');
+ }
+ // A stat adatok módosítása
+ $('#statBontas').html( parseInt($('#statBontas').html())+parseInt(msg.bontas.length) );
+ if (keszKoDbCsokken) $('#statKoKesz').html( parseInt($('#statKoKesz').html())-msg.bontas.length );
+ // a felső bontás keys paraméterének beállítása
+ keys = $('#bontas-'+msg.bontas[0].bontasId).data('key');
+ for (i=1; i<msg.bontas.length; i++) {
+ keys += ','+$('#bontas-'+msg.bontas[i].bontasId).data('key');
+ }
+ $('#bontas-'+msg.bontas[0].bontasId).data('keys', keys)
+ // ha kell, akkor a módosított sorok áthelyezése új tbody-ba
+ firstTr = $('#tr-'+msg.bontas[0].osztalyId+'-'+msg.bontas[0].kepzesOratervId);
+ prevFirstTr = firstTr.prevAll('tr');
+ if (prevFirstTr.length > 0) {
+ tbodyModified = $('<tbody>').attr('id', tbodyId+'-'+(bontasDb+1)).insertAfter($('#'+tbodyId));
+ for (i=0; i<msg.bontas.length; i++) {
+ $('#tr-'+msg.bontas[i].osztalyId+'-'+msg.bontas[i].kepzesOratervId).appendTo(tbodyModified);
+ }
+ updateTbody(tbodyModified);
+ } else {
+ firstTr.find('.slideUpAll').hide();
+ }
+ }
+
+ processJSONDelBontas = function( msg ) {
+ //console.log(JSON.stringify(msg));
+ if (msg.result == 'success') {
+
+ // utolsó érintett tr
+ lastTr = $('#bontas-'+msg.bontasIds[msg.bontasIds.length-1]).closest('tr');
+ // A tartalmazó tbody id-je...
+ tbodyId = lastTr.closest('tbody').attr('id');
+ // eddigi bontásszám
+ bontasDb = lastTr.find('div.bontas').length;
+ // Ha nem az utolsó a tbody-n belül, akkor az őt követő tr-eket külön tbody-ba helyezzük
+ nextLastTr = lastTr.nextAll('tr');
+ if (nextLastTr.length > 0) {
+ tbodyAfter = $('<tbody>').attr('id', tbodyId+'-'+bontasDb).insertAfter($('#'+tbodyId));
+ nextLastTr.appendTo(tbodyAfter);
+ updateTbody(tbodyAfter);
+ }
+
+ // ha kell, akkor a módosított sorok áthelyezése új tbody-ba
+ firstTr = $('#bontas-'+msg.bontasIds[0]).closest('tr');
+ prevFirstTr = firstTr.prevAll('tr');
+ if (prevFirstTr.length > 0) {
+ tbodyModified = $('<tbody>').attr('id', tbodyId+'-'+(bontasDb-1)).insertAfter($('#'+tbodyId));
+ for (i=0; i<msg.bontasIds.length; i++) {
+ $('#bontas-'+msg.bontasIds[i]).closest('tr').appendTo(tbodyModified);
+ }
+ updateTbody(tbodyModified);
+ } else {
+ firstTr.find('.slideUpAll').hide();
+ }
+
+ // div törlése
+ keszBontasDbCsokken = ($('#bontas-'+msg.bontasIds[0]).data('hetioraszam') == lastTr.data('hetioraszam'));
+ for (i=0; i<msg.bontasIds.length; i++) {
+ $('#bontas-'+msg.bontasIds[i]).nextAll('div.bontas').find('span.bontasDb').each(function(index) {
+ $(this).html($(this).html()-1);
+ });
+ $('#bontas-'+msg.bontasIds[i]).remove();
+ }
+ // stat adatok módosítása
+ $('#statBontas').html( parseInt($('#statBontas').html())-parseInt(msg.bontasIds.length) );
+ if (keszBontasDbCsokken) $('#statBontasKesz').html( parseInt($('#statBontasKesz').html())-parseInt(msg.bontasIds.length) );
+ // Egy felesleges bontás törlésével "kész"-szé válhatott a sor
+ if (!lastTr.hasClass('kesz')) {
+ var kesz = (lastTr.find('div.bontas').length > 0);
+ if (kesz) lastTr.find('div.bontas').each(function(index) {
+ if ($(this).data('hetioraszam') != lastTr.data('hetioraszam')) kesz = false;
+ });
+ if (kesz) {
+ lastTr.closest('tbody').find('tr').addClass('kesz');
+ $('#statKoKesz').html( parseInt($('#statKoKesz').html())+lastTr.closest('tbody').find('tr').length );
+ if ($('#keszRejt').is(':checked')) lastTr.closest('tbody').hide();
+ }
+ }
+
+
+ }
+ }
+
+ processJSONTankorLista = function( msg, element ) {
+ //console.log(JSON.stringify(msg));
+
+ // a blokk tárgy típusa
+ ttTdElement = element.closest('tr').find('th.targyTipus');
+ if (ttTdElement.length==0) targyTipus = 'mintatantervi';
+ else targyTipus = ttTdElement.html();
+ // a képzésOraterv bejegyzés heti óraszáma
+ koHetiOraszam = parseFloat(element.closest('tr').data('hetioraszam'));
+ // a bontás össz-óraszáma és tankorId-i
+ to = element.data('tankororaszam');
+ bontasOraszam = 0;
+ bontasTankorIds = [];
+ if ($.isArray(to)) {
+ for (i=0; i<to.length; i++) {
+ bontasOraszam += parseFloat(to[i].hetiOraszam);
+ bontasTankorIds[i] = ''+to[i].tankorId; // hogy string legyen mindenképp!!
+ }
+ }
+ bontasSzabadOraszam = koHetiOraszam - bontasOraszam;
+ // szemeszterek
+ vanSzemeszter = [(element.closest('tbody').find('.felev1').length>0), (element.closest('tbody').find('.felev2').length>0)];
+
+ ulKiemeltElement = $('<ul>').addClass('kiemelt').addClass('tankorLista');
+ ulElement = $('<ul>').addClass('tankorLista');
+ for (i=0; i<msg.tankorok.length; i++) {
+ /*
+ - ha a bontás óraszám == kepzesOraterv oraszámmal - nem lehet új tankört hozzárendelni (class="ok")
+ - ha bontas óraszám > kepzesOraterv óraszám, akkor az hiba! - (class="fail")
+ - ha bontas óraszám < kepzesOraterv óraszám, akkor --> tankör-list, tankörönként:
+ - hozzárendelt már - akkor nem lehet újra kiválasztani (class="hozzarendelt")
+ - van targyTipushoz már óraszáma --> csak az az óraszám lehet
+ - ha ez több, mint a bontás szabad óraszáma, akkor nem lehet hozzárendelni
+ - ha nem több, akkor pontosan ezt az óraszámot rendelhetjük hozzá
+ - nincs tárgytípushoz óraszáma, de a tankörnek már nincs fennmaradó -> nem lehet hozzárendelni
+ - nincs tárgytípushoz és van szabad órája: hozzá-óraszám = min(tankörSzabad[szemeszter?], bontasSzabad[szemeszter?])
+ */
+ tAdat = msg.tankorok[i];
+ // kezdőértékek
+ classStr='tankorBontas';
+ maxOraszam = 0;
+ vanTargyTipusOraszam = tankorOraszamElfogyott = tankorOraszamSokFail = oraszamFix = false;
+ // hozzá van-e már rendelve
+ hozzarendelt = ($.inArray(tAdat.tankorId, bontasTankorIds) > -1);
+ oStr = '';
+ // fontos lenne, hogy csak a szükséges szemesztereken menjen végig a ciklus!!
+ for (szemeszter=0; szemeszter<2; szemeszter++) { // 0 indexű! hogy js alatt tömb lehessen
+ if (!vanSzemeszter[szemeszter]) continue;
+ oraszam = parseFloat(msg.tankorok[i].oraszam[szemeszter]);
+ oStr += '['+oraszam+'/';
+ sum=0;
+ for (t=0; t<msg.tankorok[i].bontasOraszam[szemeszter].length; t++) {
+ hetiOraszam = parseFloat(msg.tankorok[i].bontasOraszam[szemeszter][t].hetiOraszam);
+ sum+=parseFloat(hetiOraszam);
+ if (msg.tankorok[i].bontasOraszam[szemeszter][t].tipus==targyTipus) {
+ vanTargyTipusOraszam = true;
+ maxOraszam = hetiOraszam;
+ oStr += '<strong>'+hetiOraszam+'</strong>';
+ } else {
+ oStr+=hetiOraszam;
+ }
+ if (t < msg.tankorok[i].bontasOraszam[szemeszter].length-1) oStr += '+';
+ }
+ oStr += (sum==0?'0]':']');
+ tankorSzabadOraszam = oraszam - sum;
+ if (hozzarendelt) {
+ oraszamFix = true;
+ classStr='tiltott hozzarendelt';
+ maxOraszam = 0;
+ } else if (vanTargyTipusOraszam) {
+ oraszamFix = true;
+ if (maxOraszam > bontasSzabadOraszam) { // ha túl sok a tankör tárgyTipushoz kötött óraszáma
+ classStr="tiltott";
+ maxOraszam = 0;
+ } else {
+ classStr="osszevonasTilt"
+ }
+ } else if (tankorSzabadOraszam == 0) {
+ oraszamFix = true;
+ classStr='tiltott';
+ tankorOraszamElfogyott = true;
+ maxOraszam = 0;
+ } else if (tankorSzabadOraszam < 0) {
+ oraszamFix = true;
+ classStr='tiltott hibas';
+ tankorOraszamSokFail = true;
+ maxOraszam = 0;
+ } else if (bontasSzabadOraszam<=0) {
+ oraszamFix = true;
+ classStr="tiltott";
+ maxOraszam = 0;
+ } else if (maxOraszam == 0) { // pl. az első szemeszter vizsgálatakor - a második szemeszter esetén már lehet pozitív
+ maxOraszam = Math.min(tankorSzabadOraszam, bontasSzabadOraszam);
+ } else { // ha az első szemesztert is figyelembe kell venni...
+ maxOraszam = Math.min(maxOraszam, tankorSzabadOraszam, bontasSzabadOraszam);
+ }
+ }
+ oStr2 = '<div class="jobbra"><strong>';
+ if (!oraszamFix) oStr2 += '<span class="icon-caret-up plusz"></span><span class="icon-caret-down minusz"></span>';
+ oStr2 += '<span class="data">'+maxOraszam.toFixed(2)+'</span></strong></div>';
+ liElement = $('<li class="'+classStr+'">'+oStr2+tAdat.tankorNev+' ('+tAdat.tankorId+') - '+oStr+'</li>').data({'tankorId':tAdat.tankorId, 'hetiOraszam': maxOraszam, 'maxOraszam': maxOraszam}).attr('id','tankor-'+tAdat.tankorId);
+ if (tAdat.kiemelt) liElement.appendTo(ulKiemeltElement);
+ else liElement.appendTo(ulElement);
+
+ }
+ $('#updateWindowSideContent').html('');
+ $('<p class="bontasAdat">Tárgy típus: '+targyTipus+'; heti óraszám: '+koHetiOraszam+'/'+bontasOraszam+'</p>').appendTo($('#updateWindowSideContent'));
+ if (bontasOraszam==0) $('<div id="addTankor"><span class="icon-plus-sign"></span> Új tankör&nbsp;&nbsp;&nbsp;<span class="icon-chevron-down"></span></div>').appendTo($('#updateWindowSideContent'));
+ else $('<div id="disableAddTankor"><span class="icon-plus-sign"></span> Új tankör&nbsp;&nbsp;&nbsp;<span class="icon-chevron-down"></span></div>').appendTo($('#updateWindowSideContent'));
+ ulKiemeltElement.appendTo($('#updateWindowSideContent'));
+ ulElement.appendTo($('#updateWindowSideContent'));
+ $('#updateWindowSide h1 div').html('Tankörök');
+ $('#updateWindowSide').data('target', element);
+ $('#updateWindowSide').addClass('nyitva');
+ }
+
+ processJSONTankorMod = function( msg ) {
+ //console.log(JSON.stringify(msg));
+ txt = $('#updateWindowSide').data('target').html();
+ s1 = txt.substr(0, txt.indexOf('] ')+2);
+ s2 = txt.substr(txt.indexOf(' ('));
+ $('#updateWindowSide').data('target').html(s1+msg.tankorNevTargyNelkul+s2);
+ //console.log(s1+msg.tankorNevTargyNelkul+s2);
+ processJSONTankorAdat( msg );
+ }
+
+ processJSONBontasTankor = function( msg ) {
+ //console.log(JSON.stringify(msg));
+
+ hetiOraszam = parseFloat(msg.hetiOraszam);
+ tankorId = msg.tankorId;
+ tankorNev = msg.tankorNev;
+ for (i=0; i<msg.bontasIds.length; i++) {
+ bontasId = msg.bontasIds[i];
+ element = $('#bontas-'+bontasId);
+ liElement = $('<li>['+hetiOraszam+'] '+tankorNev+' ('+tankorId+')</li>');
+ liElement.data('tankorid',tankorId).addClass('tankorAdat').insertBefore(element.find('li.marad'));
+ element.data('tankororaszam').push({'tankorId': tankorId, 'hetiOraszam': hetiOraszam});
+ element.data('hetioraszam', hetiOraszam+element.data('hetioraszam'));
+ marad = element.closest('tr').data('hetioraszam')-element.data('hetioraszam');
+ element.find('li.marad').html(marad);
+ if (marad<0) classStr='bontas fail';
+ else if (marad==0) classStr='bontas ok';
+ else classStr='bontas';
+ element.attr('class',classStr);
+ }
+ // Az új tankör hozzáadásával "kész"-szé válhatott a sor - (element: az utolsó bontás div-je)
+ { // eddig biztos nem volt kész a sor - mert tudtunk hozzárendelni bontást...
+ var sorKesz = true; // biztos van legalább egy bontás - hisz hozzárendeltünk egy tankört
+ trElement = element.closest('tr');
+ trElement.find('div.bontas').each(function(index) {
+ if ($(this).data('hetioraszam') != trElement.data('hetioraszam')) sorKesz = false;
+ });
+ if (element.data('hetioraszam')==trElement.data('hetioraszam')) { // a bontások kész lettek
+ $('#statBontasKesz').html( parseInt($('#statBontasKesz').html())+msg.bontasIds.length );
+ }
+ if (sorKesz) {
+ // stat adatok állítása
+ $('#statKoKesz').html( parseInt($('#statKoKesz').html())+msg.bontasIds.length );
+ trElement.closest('tbody').find('tr').addClass('kesz');
+ if ($('#keszRejt').is(':checked')) trElement.closest('tbody').hide();
+ }
+ }
+ }
+
+ processJSONUjTankor = function(msg) {
+ //console.log(JSON.stringify(msg));
+ // A tankört hozzá is rendeltük a bontáshoz
+ processJSONBontasTankor( msg );
+ // Tankör adatainak megjelenítése
+ ajaxGetTankorAdat(msg.tankorId);
+ }
+
+ processJSONTankorAdat = function( msg ) {
+ //console.log(JSON.stringify(msg));
+
+ $('#updateWindowSideContent').html('');
+ $('#updateWindowSideTitle').html('Tankör adatai');
+ //$('<p class="tankorNev">'+msg.tankorNev+' ('+msg.tankorId+')</p>').appendTo('#updateWindowSideContent');
+ $('<p class="tankorNev">' +msg.tankorNevReszei.evfOszt+' '
+ +msg.tankorNevReszei.targyNev
+ +(msg.tankorNevReszei.tankorJel!=''&&msg.tankorNevReszei.tankorJel!=null?msg.tankorNevReszei.tankorJel+' ':'')
+ +' <span class="tankorNevExtra">'+msg.tankorNevReszei.tankorNevExtra+'</span>'
+ +'<input id="tankorNevExtra" type="text" name="tankorNevExtra" value="'+msg.tankorNevReszei.tankorNevExtra+'" />'
+ +' ('+msg.tankorId+')</p>').appendTo('#updateWindowSideContent');
+ $('<p class="tankorModosit">Módosít!</p>').appendTo('#updateWindowSideContent');
+ // adatok
+ ulStr = '<ul>'
+ +'<li>Évközi követelmény: '+msg.kovetelmeny+'</li>'
+ +'<li>Létszám korlát: '+msg.min+'-'+msg.max+'</li>'
+ +'<li>Tankör-típus: '+msg.rovidNev+' ('+msg.tankorTipusId+')</li>'
+ +'</ul>';
+ $(ulStr).appendTo('#updateWindowSideContent');
+ // osztályok
+ ulStr = '<ul id="tankorOsztaly">';
+ pStr = '<div class="slideToggleContainer" id="pTankorOsztaly">Osztályai: <span class="tankorData slideToggle">';
+ for (i=0; i<msg.osztalyok.length; i++) {
+ ulStr += '<li>'
+ +'<input type="checkbox" name="osztalyId[]" value="'+msg.osztalyok[i].osztalyId+'" id="oTankorId-'+msg.osztalyok[i].osztalyId+'" ';
+ if ($.inArray(msg.osztalyok[i].osztalyId, msg.osztalyIds)>-1) {
+ ulStr += 'checked="checked" ';
+ pStr += msg.osztalyok[i].osztalyJel+' ('+msg.osztalyok[i].osztalyId+') ';
+ }
+ ulStr += '/> '
+ +'<label for="oTankorId-'+msg.osztalyok[i].osztalyId+'">'+msg.osztalyok[i].osztalyJel+' ('+msg.osztalyok[i].osztalyId+')</label></li>';
+ }
+ ulStr += '</ul>';
+ pStr += '</span><span class="icon-chevron-down slideToggle"></span>'+ulStr+'</div>';
+ $(pStr).appendTo('#updateWindowSideContent');
+ // szemeszterek, óraszámok
+ ulStr = '<ul id="tankorSzemeszter">';
+ for (i=0; i<msg.tankorSzemeszter.length; i++) {
+ ulStr += '<li>'+msg.tankorSzemeszter[i].tanev+'/'+msg.tankorSzemeszter[i].szemeszter
+ +'<input maxlength="5" type="text" name="sz-'+msg.tankorSzemeszter[i].tanev+'-'+msg.tankorSzemeszter[i].szemeszter+'" value="'+msg.tankorSzemeszter[i].oraszam+'" />'
+ +'</li>';
+ }
+ ulStr += '</ul>';
+ pStr = '<div class="slideToggleContainer" id="pTankorSzemeszter">Óraszám: <span class="tankorData slideToggle">'+msg.oraszam+' ('+msg.tanev+'/'+msg.szemeszter+')</span>'
+ +'<span class="icon-chevron-down slideToggle"></span>'
+ +ulStr
+ +'</div>';
+ $(pStr).appendTo('#updateWindowSideContent');
+
+// $('<p>'+JSON.stringify(msg)+'</p>').appendTo($('#updateWindowSideContent'));
+ if (!$('#updateWindowSide').hasClass('nyitva')) $('#updateWindowSide').addClass('nyitva')
+ }
+
+ slideUp = function(element) {
+ // A fedett sorok számát eltároljuk, majd 0-ra állítjuk
+ trElement = element.closest('tr');
+ bontasArray = trElement.find('div.bontas').get();
+ prevTrElement = trElement.prevAll('tr').filter(':visible:first');
+ prevBontasArray = prevTrElement.find('div.bontas').get();
+
+ // shadow elvétele, slideUp, Down törlése - vizuális elemek
+ if (trElement.data('db') < 6) trElement.removeClass('shadow'+trElement.data('db'));
+ else trElement.removeClass('shadow5');
+ trElement.slideUp(100);
+ trElement.find('.slideDown').remove();
+ // db adatok módosítása
+ origDb = prevTrElement.data('db');
+ prevTrElement.data('db',origDb+trElement.data('db')+1);
+ trElement.data('db',0);
+ // A fedett sorok kulcsait eltároljuk, majd a sor kulcsára cseréljük
+ origKeys = prevTrElement.data('keys');
+ prevTrElement.data('keys', origKeys+','+trElement.data('keys'));
+ trElement.data('keys', trElement.data('key'));
+ // bontások kulcsadatainak módosítása
+ for (i=0; i<bontasArray.length; i++) {
+ origKeys = $(prevBontasArray[i]).data('keys');
+ $(prevBontasArray[i]).data('keys', origKeys+','+$(bontasArray[i]).data('keys'));
+ $(bontasArray[i]).data('keys', $(bontasArray[i]).data('key'));
+ }
+ // prev - shadow elvétele
+ if (origDb < 6) prevTrElement.removeClass('shadow'+origDb);
+ else prevTrElement.removeClass('shadow5');
+ // prev - ha most került alá sor, akkor kirakjuk a lenyitót
+ if (origDb == 0) prevTrElement.find('td.slide').append('<span class="slideDown icon-chevron-down"></span>');
+ // prev - shadow
+ if (prevTrElement.data('db')<6) prevTrElement.addClass('shadow'+prevTrElement.data('db'));
+ else prevTrElement.addClass('shadow5');
+ // prev - ha minde becsukva, akkor nem kell slideUpAll
+ if (prevTrElement.data('db') == prevTrElement.nextAll('tr').length) prevTrElement.find('.slideUpAll').hide();
+
+ }
+
+ slideDown = function(element) {
+ trElement = element.closest('tr');
+ bontasArray = trElement.find('div.bontas').get();
+ // becsuk
+ trElement.nextAll('tr').filter(':hidden').slideDown();
+ // shadow leszedése
+ if (trElement.data('db') < 6) trElement.removeClass('shadow'+trElement.data('db'));
+ else trElement.removeClass('shadow5');
+ // adatok alaphelyzetbe
+ trElement.data('db',0);
+ trElement.data('keys', trElement.data('key'));
+ for (i=0; i<bontasArray.length; i++) $(bontasArray[i]).data('keys', $(bontasArray[i]).data('key'));
+ element.closest('tbody').find('tr:first .slideUpAll').show();
+ // Down eltüntetése
+ element.remove();
+ }
+
+ initBontas = function() {
+
+ if ($('table.bontas').length == 0) {
+ $('form#szures').slideDown(1000);
+ } else {
+ $($('table.bontas .slideUp').get().reverse()).each(function(index) {
+ slideUp($(this));
+ });
+ }
+ }
+
+
+$(function() {
+
+ $('table.bontas tr').data('db',0);
+ var params = $.parseParams(window.location.toString().split('?')[1] || '' );
+ var sessionID=params.sessionID?params.sessionID:'';
+ $('body').data('sessionID',sessionID);
+ // A tárgyak div inicializálása
+ var height = $('div#targyak').height();
+ var width = $('div#targyak').width();
+ var targyakTop =parseInt($('div#targyak').css('top'));
+ $('div#targyakUp').css({'width':width-12});
+ $('div#targyakDown').css({'width':width-12,'top':height+targyakTop-30});
+
+ initBontas();
+
+ $('#keszRejt').change(function(event) {
+ var element = $(event.target);
+ if (element.is(':checked')) {
+ $('table.bontas tr.kesz:first-child').closest('tbody').hide();
+ } else {
+ $('table.bontas tr.kesz:first-child').closest('tbody').show();
+ }
+ });
+
+ $('body').change(function(event) {
+ var element = $(event.target);
+ if (element.closest('div').hasClass('slideToggleContainer')) {
+ element.closest('div').find('span.tankorData').addClass('changed');
+ $('#updateWindowSideContent p.tankorModosit').slideDown();
+ } else if (element.attr('id')=='tankorNevExtra') {
+ if (!element.prev('span.tankorNevExtra').hasClass('changed')) {
+ element.prev('span.tankorNevExtra').addClass('changed');
+ $('#updateWindowSideContent p.tankorModosit').slideDown();
+ }
+ }
+ });
+
+ $('body').focusout(function(event) {
+ var element = $(event.target);
+ if (element.attr('id')=='tankorNevExtra') {
+ element.prev('span.tankorNevExtra').html( element.val() ).show();
+ element.hide();
+ }
+ });
+
+ $('#updateWindowSide').on('keydown', 'ul#tankorSzemeszter li:last-child input', function(event) {
+
+ var charKeyCode = event.keyCode ? event.keyCode : event.which;
+ var shiftKey = event.shiftKey ? event.shiftKey : ((charKeyCode == 16) ? true : false);
+ var altKey = event.altKey ? event.altKey : ((charKeyCode == 18) ? true : false);
+ var ctrlKey = event.ctrlKey ? event.ctrlKey : ((charKeyCode == 17) ? true : false);
+ element = $(event.target);
+
+ if (charKeyCode == 9) {
+ event.preventDefault();
+ tmp = element.attr('name').split('-');
+ tanev = 1+parseInt(tmp[1]);
+ for (szemeszter = 1; szemeszter<3; szemeszter++) {
+ $('<li>'+tanev+'/'+szemeszter
+ +'<input maxlength="5" type="text" name="sz-'+tanev+'-'+szemeszter+'" value="" />'
+ +'</li>').appendTo('ul#tankorSzemeszter');
+ }
+ element.closest('li').next('li').find('input').focus();
+ }
+
+ });
+
+ $('#updateWindowSide').on('keydown', 'ul#tankorSzemeszter li:first-child input', function(event) {
+
+ var charKeyCode = event.keyCode ? event.keyCode : event.which;
+ var shiftKey = event.shiftKey ? event.shiftKey : ((charKeyCode == 16) ? true : false);
+ var altKey = event.altKey ? event.altKey : ((charKeyCode == 18) ? true : false);
+ var ctrlKey = event.ctrlKey ? event.ctrlKey : ((charKeyCode == 17) ? true : false);
+ element = $(event.target);
+
+ if (charKeyCode == 9 && shiftKey) {
+ event.preventDefault();
+ tmp = element.attr('name').split('-');
+ tanev = parseInt(tmp[1])-1;
+ for (szemeszter = 1; szemeszter<3; szemeszter++) {
+ $('<li>'+tanev+'/'+szemeszter
+ +'<input maxlength="5" type="text" name="sz-'+tanev+'-'+szemeszter+'" value="" />'
+ +'</li>').prependTo('ul#tankorSzemeszter');
+ }
+ element.closest('li').prev('li').find('input').focus();
+ }
+
+ });
+
+
+ $('body').click(function(event) {
+ var element = $(event.target);
+
+ if (!element.hasClass('addBontasTargy')) {
+ $('div#targyak').hide();
+ $('table.bontas tr.aktiv').removeClass('aktiv');
+ }
+ if (element.hasClass('slideUp')) {
+ slideUp(element);
+ } else if (element.hasClass('slideUpAll')) {
+ $(element.closest('tbody').find('.slideUp:visible').get().reverse()).each(function(index) {
+ slideUp($(this));
+ });
+ } else if (element.hasClass('slideDown')) {
+ slideDown(element);
+ } else if (element.hasClass('addBontas')) {
+
+ postData = { 'action':'addBontas', 'keys':element.closest('tr').data('keys')}
+ saltName = $('#bontasForm input.salt').prop('name');
+ saltValue = $('#bontasForm input.salt').val();
+ postData[saltName] = saltValue;
+
+ $.ajax({
+ type: "POST",
+ url: "index.php?page=naplo&sub=tanev&f=targyBontas&policy=private&skin=ajax&sessionID="+sessionID,
+ data: postData,
+ dataType: 'json'
+ }).done(function( msg, status, jqXHR ) {
+ updateSalt(jqXHR.getResponseHeader('Etag'));
+ processJSONAddBontas(msg);
+ });
+
+ } else if (element.hasClass('addBontasTargy')) {
+ // Az érintett sor kulcsát eltároljuk - hogy tudjuk hova kell visszatérni
+ $('div#targyak').data('keys',element.closest('tr').data('keys'));
+ //tt
+ eOffset=element.offset();
+ //tt
+ $('#targyak').css({'left':eOffset.left+25}).show();
+ element.closest('tr').addClass('aktiv');
+
+ // $('#targyak ul#targyakUl').appendTo('#updateWindowSideContent').focus();
+ // $('#updateWindowSide').addClass('nyitva');
+ $('#targyak').show().focus();
+ } else if (element.hasClass('selectTargy')) {
+
+ postData = { 'action':'addBontasTargy', 'keys':$('div#targyak').data('keys'), 'targyId':element.data('targyid') }
+ saltName = $('#bontasForm input.salt').prop('name');
+ saltValue = $('#bontasForm input.salt').val();
+ postData[saltName] = saltValue;
+
+ $.ajax({
+ type: "POST",
+ url: "index.php?page=naplo&sub=tanev&f=targyBontas&policy=private&skin=ajax&sessionID="+sessionID,
+ data: postData,
+ dataType: 'json'
+ }).done(function( msg, status, jqXHR ) {
+ updateSalt(jqXHR.getResponseHeader('Etag'));
+ processJSONAddBontas(msg);
+ });
+
+ } else if (element.hasClass('delBontas')) {
+
+ postData = { 'action':'delBontas', 'keys':element.closest('div.bontas').data('keys')}
+ saltName = $('#bontasForm input.salt').prop('name');
+ saltValue = $('#bontasForm input.salt').val();
+ postData[saltName] = saltValue;
+
+ $.ajax({
+ type: "POST",
+ url: "index.php?page=naplo&sub=tanev&f=targyBontas&policy=private&skin=ajax&sessionID="+sessionID,
+ data: postData,
+ dataType: 'json'
+ }).done(function( msg, status, jqXHR ) {
+ updateSalt(jqXHR.getResponseHeader('Etag'));
+ processJSONDelBontas(msg);
+ });
+
+ } else if (element.hasClass('bontas')) {
+
+ if (element.hasClass('ok')) {
+ alert('A csoport összes órája tankörhöz van már rendelve!');
+ } else if (element.hasClass('fail')) {
+ alert('Hiba! A bontás összóraszáma nagyobb a képzés-óratervben megadottnál!');
+ } {
+
+ postData = { 'targyId':element.data('targyid'), 'bontasIds':element.data('keys').toString().split(',') }
+
+ $.ajax({
+ type: "POST",
+ url: "index.php?page=naplo&sub=tools&f=tankorLista&policy=private&skin=ajax&sessionID="+sessionID,
+ data: postData,
+ dataType: 'json'
+ }).done(function( msg, status, jqXHR ) {
+ processJSONTankorLista(msg, element);
+ }).fail(function( jqXHR, textStatus, errorThrown ) {
+ //console.log('fail');
+ //console.log(jqXHR);
+ });
+ }
+
+ } else if (element.hasClass('tankorBontas') && !element.hasClass('tiltott')) {
+
+
+ postData = { 'action':'bontasTankor', 'keys':$('#updateWindowSide').data('target').data('keys'),
+ 'tankorId': element.data('tankorId'), 'hetiOraszam':element.data('hetiOraszam') }
+ saltName = $('#bontasForm input.salt').prop('name');
+ saltValue = $('#bontasForm input.salt').val();
+ postData[saltName] = saltValue;
+
+ $.ajax({
+ type: "POST",
+ url: "index.php?page=naplo&sub=tanev&f=targyBontas&policy=private&skin=ajax&sessionID="+sessionID,
+ data: postData,
+ dataType: 'json'
+ }).done(function( msg, status, jqXHR ) {
+ updateSalt(jqXHR.getResponseHeader('Etag'));
+ processJSONBontasTankor(msg);
+ $('#updateWindowSide').removeClass('nyitva')
+ $('#updateWindowSideContent').html('');
+ });
+
+ } else if (element.hasClass('osszevonasTilt')) {
+ element.removeClass('osszevonasTilt').addClass('osszevonasEnged').addClass('tankorBontas');
+ } else if (element.hasClass('plusz')) {
+ if (!element.closest('li').hasClass('tiltott')) {
+ data = element.closest('li').data();
+ if (data.hetiOraszam < data.maxOraszam) {
+ element.closest('li').data('hetiOraszam', data.hetiOraszam+0.25);
+ element.closest('div').find('span.data').html(element.closest('li').data('hetiOraszam').toFixed(2));
+ }
+ }
+ } else if (element.hasClass('minusz')) {
+ if (!element.closest('li').hasClass('tiltott')) {
+ data = element.closest('li').data();
+ if (data.hetiOraszam > 0.25) {
+ element.closest('li').data('hetiOraszam', data.hetiOraszam-0.25);
+ element.closest('div').find('span.data').html(element.closest('li').data('hetiOraszam').toFixed(2));
+ }
+ }
+ } else if (element.attr('id') == 'addTankor') {
+
+ postData = { 'action':'ujTankor', 'bontasIds':$('#updateWindowSide').data('target').data('keys').toString().split(',') }
+
+ $.ajax({
+ type: "POST",
+ url: "index.php?page=naplo&sub=tools&f=ujTankor&policy=private&skin=ajax&sessionID="+sessionID,
+ data: postData,
+ dataType: 'json'
+ }).done(function( msg, status, jqXHR ) {
+ //console.log('ok');
+ processJSONUjTankor(msg);
+ }).fail(function( jqXHR, textStatus, errorThrown ) {
+ //console.log('fail');
+ //console.log(jqXHR);
+ });
+
+ } else if (element.hasClass('tankorAdat')) {
+
+ $('#updateWindowSide').data('target',element);
+ ajaxGetTankorAdat(element.data('tankorid'));
+ } else if (element.hasClass('tankorModosit')) {
+
+ postData = { 'tankorId':$('#updateWindowSide').data('target').data('tankorid'),'osztalyIds': [], 'tankorSzemeszter': [], 'tankorNevExtra': $('#updateWindowSide input#tankorNevExtra').val() }
+ $('#updateWindowSide ul#tankorOsztaly input:checked').each(function(index){postData.osztalyIds.push($(this).val());})
+ $('#updateWindowSide ul#tankorSzemeszter input[type=text]').each(function(index){
+ if ($(this).val() != '') {
+ tmp = $(this).attr('name').split('-');
+ postData.tankorSzemeszter.push({'tanev':tmp[1], 'szemeszter': tmp[2], 'oraszam': $(this).val() });
+ }
+ });
+
+//console.log(postData.tankorSzemeszter);
+
+ $.ajax({
+ type: "POST",
+ url: "index.php?page=naplo&sub=tools&f=tankorMod&policy=private&skin=ajax&sessionID="+sessionID,
+ data: postData,
+ dataType: 'json'
+ }).done(function( msg, status, jqXHR ) {
+ processJSONTankorMod(msg);
+ }).fail(function( jqXHR, textStatus, errorThrown ) {
+ //console.log('fail');
+ //console.log(jqXHR);
+ });
+ } else if (element.hasClass('tankorNevExtra')) {
+
+ element.next('input#tankorNevExtra').show();
+ element.hide();
+
+ } else if (element.hasClass('slideToggleContainer')) {
+
+ element.find('ul').slideToggle();
+ } else if (element.hasClass('slideToggle')) {
+ element.closest('div').find('ul').slideToggle();
+ } else if (element.hasClass('evfolyamJel')) {
+ if (element.find('input').is(':checked')) {
+ $('div#osztaly div.osztEvf').show();
+ $('div#osztaly div.evfolyamJel input').prop('checked',false);
+ $('div#osztaly span.selectOsztaly input').prop('checked',false);
+ $('div#kepzes div.kSelect input').prop('checked',false);
+ $('div#osztaly div.evfolyamJel').removeClass('checked');
+ $('div#osztaly span.selectOsztaly').removeClass('checked');
+ $('div#kepzes div.kSelect').hide();
+ } else {
+ element.addClass('checked');
+ element.find('input').prop('checked',true);
+ $('div#osztaly div.osztEvf').hide();
+ $('div#osztEvf-'+element.find('input').val().replace('/','-')).show();
+ }
+ } else if (element.hasClass('selectOsztaly')) {
+ isChecked = element.find('input').prop('checked');
+ element.find('input').prop('checked', !isChecked);
+ element.toggleClass('checked');
+ evfDiv = element.closest('div.osztEvf').find('div.evfolyamJel');
+ kepzesDiv=$('div#kepzes div.ko-'+element.find('input').val());
+ if (!isChecked) {
+ kepzesDiv.show();
+ kepzesDiv.find('input').prop('checked',true);
+ kepzesDiv.each(function(index) {
+ db = $(this).data('db');
+ $(this).data('db', db+1);
+ });
+ if (!evfDiv.hasClass('checked')) {
+ evfDiv.addClass('checked');
+ evfDiv.find('input').prop('checked',true);
+ $('div#osztaly div.osztEvf').hide();
+ $('div#osztEvf-'+evfDiv.find('input').val().replace('/','-')).show();
+ }
+ } else {
+ kepzesDiv.each(function(index) {
+ db = $(this).data('db');
+ $(this).data('db', db-1);
+ if ($(this).data('db') == 0) {
+ $(this).find('input').prop('checked',false);
+ $(this).hide();
+ }
+ });
+ }
+ } else if (element.closest('td').attr('id') == 'oratervenKivuli') {
+ element.closest('td').find('ul').slideToggle();
+ }
+
+ });
+
+
+ // tárgyak scrollozása
+ $('div#targyak').mousemove(function(event) {
+ var h = $('ul#targyakUl').height()+13;
+ var offset = $($(this)).offset();
+ var position = (event.pageY-offset.top)/$(this).height();
+ if (position < 0.25) {
+ $('div#targyakDown').hide();
+ if ($('div#targyak').scrollTop() == 0) {
+ $('div#targyakUp').hide();
+ $(this).stop();
+ } else {
+ $('div#targyakUp').show();
+ $(this).stop().animate({ scrollTop: 0 }, 5000);
+ }
+ } else if (position > 0.75) {
+ $('div#targyakUp').hide();
+ if ($('div#targyak').scrollTop() == h) {
+ $('div#targyakDown').hide();
+ $(this).stop();
+ } else {
+ $('div#targyakDown').show();
+ $(this).stop().animate({ scrollTop: h }, 5000);
+ }
+ } else {
+ $('div#targyakUp').hide();
+ $('div#targyakDown').hide();
+ $(this).stop();
+ }
+ });
+
+
+});
+
+
+
+
+
+
+
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/tanmenet/tanmenetJovahagyas.jquery.min.js b/mayor-orig/www/skin/classic/module-naplo/javascript/tanmenet/tanmenetJovahagyas.jquery.min.js
new file mode 100644
index 00000000..7556f12b
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/tanmenet/tanmenetJovahagyas.jquery.min.js
@@ -0,0 +1,18 @@
+
+showUpdateLayer = function() {
+ $('#updateWindow').show();
+ $('updateForm').prop('tabindex',1);
+ $('updateForm').focus();
+}
+hideUpdateLayer = function() {
+ $('#tanmenet tr').removeClass('aktiv');
+}
+
+$(function() {
+
+ $('#tanmenet tr a').click(function(event) {
+ var element = $(event.target).closest('tr');
+ $('#tanmenet tr').removeClass('aktiv');
+ element.addClass('aktiv');
+ });
+}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/tanmenet/tanmenetModositas.jquery.min.js b/mayor-orig/www/skin/classic/module-naplo/javascript/tanmenet/tanmenetModositas.jquery.min.js
new file mode 100644
index 00000000..68151721
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/tanmenet/tanmenetModositas.jquery.min.js
@@ -0,0 +1,126 @@
+
+$(function() {
+ initTemakorLista();
+ // mozgatás
+ $('#temakor').sortable({ axis: 'y', containment: "#temakor", handle: "span.handle", items: ".sortable", scroll: false,
+ placeholder: "sortable-placeholder" ,
+ cursor:'move',
+ opacity:0.2,
+ stop: function(event, ui) { initTemakorLista(); $('form[name=tanmenetMod]').trigger('change'); }
+ } );
+ // törlés
+ $('body').click(function(event) {
+ var element = $(event.target);
+ if (element.hasClass('close')) {
+ element.closest('li').remove();
+ initTemakorLista();
+ $('form[name=tanmenetMod]').trigger('change');
+ }
+ });
+ // óraszám vagy szöveg módosítás
+ $('body').change(doOnTemakorChange);
+ // a textarea kinyitása és visszacsukása
+ $('#temakor textarea').focus(function(event) {
+ $(event.target).css({ 'background-color': '#eed', 'height': '100px' });
+ }).blur(function(event) {
+ $(event.target).css({ 'background-color': '#fff', 'height': '50px' });
+ });
+
+});
+
+
+initTemakorLista = function() {
+
+ var oraszam = 0;
+ var maxoraszam = parseInt($('#tanmenetOraszam').val());
+ // Az eddigi összóraszám meghatározása
+ var osszoraszam = 0;
+ $('span.handle').each(
+ function(index, elem) {
+ selectElem = $(elem).closest('li').find('select'); textElem = $(elem).closest('li').find('textarea');
+ if (selectElem.val() != '0' && textElem.val() != '') osszoraszam = osszoraszam+parseInt(selectElem.val());
+ }
+ );
+ var szabadoraszam = maxoraszam-osszoraszam;
+ if (szabadoraszam<0) szabadoraszam=0;
+
+ // Az egyes témakörök sorainak beállítása
+ $('span.handle').each(
+ function(index, elem) {
+
+ elem = $(elem); selectElem = elem.closest('li').find('select');
+ textElem = elem.closest('li').find('textarea'); oraszamSpan = elem.closest('li').find('span.oraszam');
+ if (selectElem.val() != '0' && textElem.val() != '') { // Már kitöltött témakör esetén
+ // Mivel nem tudjuk, hogy korábban milyen osztályba volt sorolva ezért mindkét osztályból eltávolítjuk
+ oraszamSpan.removeClass('jo'); // jo: még belefér az óraszámba
+ oraszamSpan.removeClass('nagy'); // nagy: már nem fér bele az óraszámba
+ // A témakör által lefoglalt órák kiírása
+ oraszamSpan.html( (oraszam+1) );
+ oraszam = oraszam+parseInt( selectElem.val() );
+ oraszamSpan.append('-'+oraszam);
+ // osztályokba sorolás
+ if (oraszam > maxoraszam) oraszamSpan.addClass('nagy'); // már nem fér bele a tanmenet óraszámába
+ else oraszamSpan.addClass('jo'); // még belefér a tanmenet óraszámába
+ // Az oraszám-select érvényes óraszámokra való leszűkítése
+ value = parseInt(selectElem.val());
+ selectElem[0].options.length = 0;
+ for (k=0; k<value+szabadoraszam+1; k++) {
+ selectElem[0].options[k] = new Option(k, k, (k==value), (k==value));
+ }
+ } else { // Az üres, utolsó bejegyzés beállítása
+ if (oraszam < maxoraszam) { // ha van még szabad óra
+ // A hátralévő, szabad órák kiírása
+ oraszamSpan.html( (oraszam+1) );
+ oraszamSpan.append( '-'+maxoraszam );
+ textElem.prop('disabled', false); // Az esetleg korábban letiltott textarea elem engedélyezése
+ } else {
+ oraszamSpan.html('-'); // nincs már szabad óra
+ textElem.prop('disable', true); // textarea elem letiltása - nem lehet felvenni újabb témakört
+ }
+ // A fennmaradt szabad óraszámhoz igazítás
+ selectElem[0].options.length = 0;
+ for (k=0; k<szabadoraszam+1; k++) {
+ selectElem[0].options[k] = new Option(k, k, (k==0), (k==0));
+ }
+ }
+ }
+ );
+
+}
+
+//
+// Ha változik valamelyik témakör szövege, vagy óraszáma, akkor fut le ez a függvény
+//
+doOnTemakorChange = function(event) {
+
+ var element = $(event.target);
+ // Óraszzámváltozáskor újrainicializáljuk a listát...
+ if (element.hasClass('temakorOraszam')) {
+ initTemakorLista();
+ }
+ // Új témakör felvételekor
+ if (element.hasClass('uj')) {
+ spanElement = element.closest('li').find('span.oraszam');
+ selectElement = spanElement.next('select');
+ textElement = selectElement.next('textarea');
+ if (selectElement.val() != '0' && textElement.val() != '') { // Ha érvényes bejegyzés keletkezett
+ // Létrehozunk egy új, üres témakör-beviteli lehetőséget
+ newLi = element.closest('li').clone();
+ // Az eddigi 'uj' mostantól már nem új...
+ selectElement.removeClass('uj');
+ textElement.removeClass('uj');
+ // hanem egy érvényes témakör -aminek óraszámát figyelembe kell venni
+ selectElement.addClass('temakorOraszam');
+ // és a bejegyzést mozgathatóvá, rendezhetővé kell tenni
+ element.closest('li').addClass('sortable');
+ // Az új elemet felvesszük a lista végére
+ element.closest('ul').append(newLi);
+ $(newLi).find('select').focus();
+ // inicializáljuk a listát - hisz lett egy új érvényes óraszámunk
+ initTemakorLista();
+ }
+ }
+
+}
+
+
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/tanmenet/tanmenetTankor.jquery.min.js b/mayor-orig/www/skin/classic/module-naplo/javascript/tanmenet/tanmenetTankor.jquery.min.js
new file mode 100644
index 00000000..b91e46e8
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/tanmenet/tanmenetTankor.jquery.min.js
@@ -0,0 +1,93 @@
+
+$(function() {
+
+ $('input.info').click(function(event) {
+
+ var elem = $(event.target);
+ var elemInform = $('#inform');
+ $('#informTanmenetId').val( elem.closest('td').find('select').val() );
+ if ($('#informTanmenetId').val() != '') {
+ updateForm(elemInform, elem);
+ elemInform.closest('div').show().draggable({ handle: '#infodivheader' }
+ );
+ } else {
+ alert('Válassz tanmenetet');
+ }
+ return false;
+
+ });
+ $('#infodivclose').click(function() { $('#infodiv').hide(); });
+ $('form.tanmenet select').change(function(event) {
+ var elem = $(event.target);
+ elem.removeClass('uj kesz jovahagyott publikus elavult');
+ elem.addClass(elem.find('option:selected').prop('class'));
+ });
+/* Ezt nem értem mit is akart csinálni...
+ $('.onChangeUpdateGomb').change(
+ var elem = $(event.target);
+// var optionElem = $(elem.options[ elem.selectedIndex ]);
+// var statusz = optionElem.getAttribute('class');
+ var elemInform = $('#inform');
+ $('#informTanmenetId').val(elem.val());
+ updateForm(elemInform, elem);
+ return false;
+ );
+*/
+
+});
+
+
+/*
+Event.observe(window, 'load', myPSFLoader, false);
+
+ doShowInfo = function(event) {
+
+ var elem = $(Event.element(event));
+
+ if (elem.hasClassName('info')) {
+ var elemInform = $('inform');
+ $('informTanmenetId').value = $F(elem.previous('select'));
+ if ($('informTanmenetId').value != '') {
+ updateForm(elemInform, elem);
+Effect.Grow('infodiv');
+// elemInform.up('div').show();
+ } else {
+ alert('Válassz tanmenetet');
+ }
+ Event.stop(event);
+ }
+
+ }
+
+ doHideInfo = function(event) {
+
+ var elemInform = $('inform');
+ Effect.Shrink('infodiv');
+// elemInform.up('div').hide();
+
+ }
+
+ doOnTanmenetChange = function(event) {
+ var elem = $(Event.element(event));
+
+ if (elem.hasClassName('onChangeUpdateGomb')) {
+ var optionElem = $(elem.options[ elem.selectedIndex ]);
+ var statusz = optionElem.getAttribute('class');
+ var elemInform = $('inform');
+ $('informTanmenetId').value = $F(elem);
+ updateForm(elemInform, elem);
+
+ }
+ }
+
+function myPSFLoader(evt) {
+
+ Event.observe(document.body, 'click', doShowInfo);
+ Event.observe('infodivclose', 'click', doHideInfo);
+
+ Event.observe(document.body, 'mayor:change', doOnTanmenetChange);
+ Event.observe(document.body, 'change', doOnTanmenetChange);
+var mydrag = new Draggable('infodiv', { scroll: window, handle: $('infodivheader') });
+
+}
+*/ \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/uzeno/postas.jquery.min.js b/mayor-orig/www/skin/classic/module-naplo/javascript/uzeno/postas.jquery.min.js
new file mode 100644
index 00000000..acbca5ae
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/uzeno/postas.jquery.min.js
@@ -0,0 +1,63 @@
+$(document).ready(function() {
+// $('#postazoButton').hide();
+ $('body').bind('keyup', function(evt) {
+ var keyupTarget = $(evt.target);
+ if (keyupTarget.attr('id')=='postazoTxt') {
+ var checklength = keyupTarget.val().length;
+ if(checklength && $('#cimzett').val()!=''){
+ $("#postazoButton").show();
+ } else {
+// $("#postazoButton").hide();
+ }
+ }
+ if (keyupTarget.attr('id')=='pattern') {
+ $('#pattern').parent().find('button').show('fast');
+ }
+ });
+ $('#uzenoKereso').change(function(event) {
+ var element = $(event.target);
+ if( element.attr('id') == 'cimzett') {
+ if( element.val()!='' && $('#postazoTxt').val().length>0 ) {
+ $('#postazoButton').show();
+ } else {
+// $('#postazoButton').hide();
+ }
+ }
+// element.closest('table').find('select').prop('selectedIndex',0);
+// element.closest('table').find('form').submit();
+ });
+
+ $('body').bind('click', function(evt) {
+ var uzenoClickedId = $(evt.target).attr('id');
+ switch(uzenoClickedId) {
+ case 'uzenoSearchIcon':
+ $('#pattern').toggle('fast').focus();
+ break;
+ case 'pattern':
+// $('#postazoButton').hide();
+// $('#txt').hide();
+// $('#cimzett').selectedIndex=0;
+// $('#cimzett').attr('disabled','disabled');
+ break;
+ case 'postazoButton':
+ $('#postazoButton').disabled=true;
+ $('#postazoHash').val('submit');
+ break;
+ case 'cimzett':
+// $('shTipus').update($F('cimzett'));
+// $('#cimzett').attr('title',$F('cimzett'));
+ break;
+ case 'uzenoTxt':
+ break;
+ case 'postazoTxt':
+ if ($("#cimzett option").length==2) {
+ var v = ($("#cimzett option:eq(1)")).attr('selected','selected');
+ $('#postazoButton').show();
+ }
+ break;
+ default:
+ break;
+ }
+ });
+
+});
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/uzeno/postas.js b/mayor-orig/www/skin/classic/module-naplo/javascript/uzeno/postas.js
new file mode 100644
index 00000000..edfefcee
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/uzeno/postas.js
@@ -0,0 +1,54 @@
+
+Event.observe(document.body, 'mayor:change', uzenoCheck);
+Event.observe(document.body, 'change', uzenoCheck);
+
+function uzenoCheck(evt) {
+
+ Event.observe('postazoButton', 'click', disableButton);
+
+ var element = $(Event.element(evt));
+ var thisid = (element.getAttribute('id'));
+ switch(thisid) {
+ case 'pattern':
+ $('postazoButton').hide();
+ $('postazoTxt').hide();
+ $('cimzett').selectedIndex=0;
+ $('cimzett').disable();
+ break;
+ case 'postazoButton': // ezt nem kapja el, nem change esemény
+ $('postazoButton').disabled=true;
+ $('postazoHash').setValue('submit');
+ break;
+ case 'cimzett':
+// $('shTipus').update($F('cimzett'));
+ $('cimzett').setAttribute('title',$F('cimzett'));
+ break;
+ case 'postazoTxt':
+ break;
+ default:
+ break;
+ }
+
+ if ($('cimzett').selectedIndex!=0 && $('cimzett').value!='') {
+ $('postazoButton').show();
+ $('postazoTxt').show().focus();
+ } else {
+ $('postazoButton').hide();
+ $('postazoTxt').hide();
+ }
+
+ //Element.addClassName($('uzenoPostazo'), 'csoport');
+
+}
+
+function disableButton(evt) {
+ var element = $(Event.element(evt));
+ if ($('postazoTxt').value!='') {
+ var element = $(Event.element(evt));
+ $('postazoHash').setValue('submit');
+ $('postazoButton').disabled=true;
+ element.up('form').submit();
+ } else {
+ Event.stop(evt);
+ }
+} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/uzeno/uzeno.jquery.min.js b/mayor-orig/www/skin/classic/module-naplo/javascript/uzeno/uzeno.jquery.min.js
new file mode 100644
index 00000000..5a9d7121
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/uzeno/uzeno.jquery.min.js
@@ -0,0 +1,23 @@
+
+$(document).ready(function() {
+ $.holdReady(true);
+ var r = Math.floor(Math.random()*100);
+ $.getScript("skin/classic/module-naplo/javascript/uzeno/postas.jquery.min.js?rand="+r).done(function() {
+ $.holdReady(false);
+ });
+ $('#postazoButton').show();
+
+// disabled by konczy
+// $('.uzenet').click(function(event) {
+// var mId = $(this).parent('tr').attr('id');
+// $('#uzenetek').find('tbody tr:not(#'+mId+')').fadeToggle(200);
+// });
+
+});
+
+function checkCR(evt) {
+ var evt = (evt) ? evt : ((event) ? event : null);
+ var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
+ if ((evt.keyCode == 13) && (node.type=="text") && (node.id=="pattern")) {return false;}
+}
+document.onkeypress = checkCR;
diff --git a/mayor-orig/www/skin/classic/module-naplo/javascript/uzeno/uzeno.js b/mayor-orig/www/skin/classic/module-naplo/javascript/uzeno/uzeno.js
new file mode 100644
index 00000000..982aad8d
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-naplo/javascript/uzeno/uzeno.js
@@ -0,0 +1,33 @@
+
+Event.observe(window, 'load', uzenoPSFLoader);
+
+function uzenoPSFLoader(evt) {
+
+ var r = Math.floor(Math.random()*100);
+ includeJS('skin/classic/module-naplo/javascript/uzeno/postas.js?'+r);
+
+/*
+ $('cimzettTipus').observe('change', function(event) {
+
+ var someNodeList = $(Event.element(event)).getElementsByTagName('option');
+
+ $A(someNodeList).each(function(node){
+ if (node.selected==true) $(node.value+'Id').show();
+ else $(node.value+'Id').hide();
+ });
+
+ });
+*/
+ function checkCR(evt) {
+ var evt = (evt) ? evt : ((event) ? event : null);
+ var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
+ if ((evt.keyCode == 13) && (node.type=="text")) {return false;}
+ }
+ document.onkeypress = checkCR;
+/*
+var a = document.createElement('script');
+a.setAttribute('type', 'text/javascript');
+a.setAttribute('src', 'skin/classic/module-naplo/javascript/uzeno/postas.js');
+a.insert(document.head);
+*/
+}
diff --git a/mayor-orig/www/skin/classic/module-password/css/password.css b/mayor-orig/www/skin/classic/module-password/css/password.css
new file mode 100644
index 00000000..b1550dbb
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-password/css/password.css
@@ -0,0 +1,19 @@
+
+h1.changePassword {
+ text-align: center;
+}
+
+table.changePassword {
+ border: solid 1px rgb(85, 85, 80);
+ background-color: #eeeeee;
+ width:350px;
+}
+table.changePassword thead tr th {
+ height:30px;
+ background-color: rgb(102, 102, 144);
+ color:white;
+ border-bottom: solid 1px white;
+}
+table.changePassword tr td { padding: 2px 10px; height:20px;}
+table.changePassword tr td input { font-size:14px; }
+table.changePassword tfoot tr th { background-color: rgb(136, 136, 128); }
diff --git a/mayor-orig/www/skin/classic/module-password/html/changeMyPassword.phtml b/mayor-orig/www/skin/classic/module-password/html/changeMyPassword.phtml
new file mode 100644
index 00000000..20680e8e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-password/html/changeMyPassword.phtml
@@ -0,0 +1,76 @@
+<?php
+
+ function putChangePasswordForm($userAccount, $toPolicy) {
+
+ global $POLICIES, $AUTH;
+
+ echo '<h1 class="changePassword">'._CHANGE_PASSWORD.'</h1>'."\n";
+ formBegin(array(
+ 'action'=>location('index.php?page=password&f=changeMyPassword'),
+ 'id'=>'changeMyPassword'
+ ));
+ echo '<input type="hidden" name="action" value="changePassword" />';
+
+ echo '<table cellspacing="0" cellpadding="1" align="center" class="changePassword">'."\n";
+ echo '<thead>'."\n";
+ echo '<tr>'."\n";
+ echo '<th colspan="2">'."\n";
+ echo _CHANGE_PASSWORD;
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+ echo '</thead>'."\n";
+ echo '<tfoot>'."\n";
+ echo '<tr>'."\n";
+ echo '<th colspan="2">'."\n";
+ echo '<input type="submit" tabindex="5" name="button" value=" '. _OK .' " class="submit" />'."\n";
+ echo '</th>'."\n";
+ echo '</tr>'."\n";
+ echo '</tfoot>'."\n";
+ echo '<tbody>'."\n";
+ echo '<tr>'."\n";
+ echo '<td>'."\n";
+ echo _USERNAME;
+ echo '</td>'."\n";
+ echo '<td>'."\n";
+ echo '<input id="userAccount" type="hidden" name="userAccount" value="'.$userAccount.'" maxlength="32" />'."\n";
+ echo $userAccount;
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+
+ echo '<tr>'."\n";
+ echo '<td>'."\n";
+ echo '<input type="hidden" name="toPolicy" value="'.$toPolicy.'" />';
+ echo constant('_'.strtoupper($toPolicy).'_PASSWORD');
+ echo '</td>'."\n";
+ echo '<td>'."\n";
+ echo '<input id="userPassword" type="password" accesskey="p" tabindex="2" name="userPassword" value="" maxlength="20" />'."\n";
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+
+ echo '<tr>'."\n";
+ echo '<td>'."\n";
+ echo _NEW_PASSWORD;
+ echo '</td>'."\n";
+ echo '<td>'."\n";
+ echo '<input id="newPassword" type="password" accesskey="n" tabindex="3" name="newPassword" value="" maxlength="20" />';
+ // echo '<span style="float:right;" id="complexity-bar" class="progress-bar progress-bar-danger" role="progressbar" style="width: 0%;"></span>';
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+
+ echo '<tr>'."\n";
+ echo '<td>'."\n";
+ echo _VERIFICATION;
+ echo '</td>'."\n";
+ echo '<td>'."\n";
+ echo '<input id="verification" type="password" accesskey="v" tabindex="4" name="verification" value="" maxlength="20" />'."\n";
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+
+ echo '</tbody>'."\n";
+ echo '</table>'."\n";
+
+ formEnd();
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-password/html/changePassword.phtml b/mayor-orig/www/skin/classic/module-password/html/changePassword.phtml
new file mode 100644
index 00000000..87f34b3c
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-password/html/changePassword.phtml
@@ -0,0 +1,89 @@
+<?php
+
+ function putChangePasswordForm($userAccount, $toPolicy, $forcePolicy = false) {
+
+ global $POLICIES, $AUTH;
+
+ echo '<h1 class="changePassword">'._CHANGE_PASSWORD.'</h1>'."\n";
+ formBegin(array('action'=>location('index.php?page=password&f=changePassword')));
+
+ echo '<input type="hidden" name="action" value="changePassword" />';
+
+ echo '<table cellspacing="0" cellpadding="1" align="center" class="changePassword">'."\n";
+ echo '<thead>'."\n";
+ if ($forcePolicy) {
+ echo '<tr>'."\n";
+ echo '<th colspan="3">'."\n";
+ echo constant('_'.strtoupper($toPolicy).'_PASSWORD');
+ echo '<input type="hidden" name="toPolicy" value="'.$toPolicy.'" />'."\n";
+ echo '</th>'."\n";
+ echo '</tr>'."\n";
+ }
+ echo '</thead>'."\n";
+ echo '<tfoot>'."\n";
+ echo '<tr>'."\n";
+ echo '<th colspan="3">'."\n";
+ echo '<input type="submit" tabindex="3" name="button" value=" '. _OK .' "
+ onclick="document.loginablak.button.disabled=true;
+ document.loginablak.button.value=\' Várj... \';
+ document.loginablak.submit()" class="submit" />'."\n";
+ echo '</th>'."\n";
+ echo '</tr>'."\n";
+ echo '</tfoot>'."\n";
+ echo '<tbody>'."\n";
+ echo '<tr>'."\n";
+ echo '<td>'."\n";
+ echo _USERNAME;
+ echo '</td>'."\n";
+ echo '<td>'."\n";
+ echo '<input id="userAccount" type="text" accesskey="l" tabindex="1" name="userAccount" value="'.$userAccount.'" maxlength="32" />'."\n";
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+
+ if (!$forcePolicy) { // rögzített policy esetén nem kell jelszót megadni
+ echo '<tr>'."\n";
+ echo '<td>'."\n";
+ echo '<select class="pp" name="toPolicy">'."\n";
+ $SEL = array($toPolicy => ' selected="selected" ');
+ for ($i=0; $i<count($POLICIES); $i++) {
+ $_policy = $POLICIES[$i];
+ if ($AUTH[$_policy]['authentication'] != 'none') {
+ echo '<option value="'.$_policy.'" '.$SEL[$_policy].'>';
+ echo constant('_'.strtoupper($_policy).'_PASSWORD');
+ echo '</option>'."\n";
+ }
+ }
+ echo '</select>'."\n";
+ echo '</td>'."\n";
+ echo '<td>'."\n";
+ echo '<input id="userPassword" type="password" accesskey="p" tabindex="2" name="userPassword" value="" maxlength="20" />'."\n";
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+ }
+
+ echo '<tr>'."\n";
+ echo '<td>'."\n";
+ echo _NEW_PASSWORD;
+ echo '</td>'."\n";
+ echo '<td>'."\n";
+ echo '<input id="newPassword" type="password" accesskey="n" tabindex="3" name="newPassword" value="" maxlength="20" />'."\n";
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+
+ echo '<tr>'."\n";
+ echo '<td>'."\n";
+ echo _VERIFICATION;
+ echo '</td>'."\n";
+ echo '<td>'."\n";
+ echo '<input id="verification" type="password" accesskey="v" tabindex="3" name="verification" value="" maxlength="20" />'."\n";
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+
+ echo '</tbody>'."\n";
+ echo '</table>'."\n";
+
+ formEnd();
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-password/html/resetPassword.phtml b/mayor-orig/www/skin/classic/module-password/html/resetPassword.phtml
new file mode 100644
index 00000000..038effb6
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-password/html/resetPassword.phtml
@@ -0,0 +1,79 @@
+<?php
+
+ function putResetPasswordForm($ADAT) {
+
+ global $POLICIES, $AUTH;
+
+ $toPolicy = $ADAT['policy'];
+ $userAccount = $ADAT['userAccount'];
+
+ echo '<h1 class="changePassword">'._RESET_PASSWORD.'</h1>'."\n";
+
+ formBegin(array('action'=>location('index.php?page=password&f=resetPassword')));
+ echo '<input type="hidden" name="action" value="resetPassword" />';
+ echo '<input type="hidden" name="selector" value="'.$ADAT['selector'].'" />';
+ echo '<input type="hidden" name="validator" value="'.$ADAT['validator'].'" />';
+
+ echo '<table cellspacing="0" cellpadding="1" align="center" class="changePassword">'."\n";
+ echo '<thead>'."\n";
+ echo '<tr>'."\n";
+ echo '<th colspan="3">'."\n";
+ echo constant('_'.strtoupper($toPolicy).'_PASSWORD');
+ echo '<input type="hidden" name="toPolicy" value="'.$toPolicy.'" />'."\n";
+ echo '</th>'."\n";
+ echo '</tr>'."\n";
+ echo '</thead>'."\n";
+ echo '<tfoot>'."\n";
+ echo '<tr>'."\n";
+ echo '<th colspan="3">'."\n";
+ echo '<input type="submit" tabindex="3" name="button" value=" '. _OK .' "
+ class="submit" />'."\n";
+ echo '</th>'."\n";
+ echo '</tr>'."\n";
+ echo '</tfoot>'."\n";
+ echo '<tbody>'."\n";
+/*
+ echo '<tr>'."\n";
+ echo '<td>'."\n";
+ echo _USERNAME;
+ echo '</td>'."\n";
+ echo '<td>'."\n";
+ echo '<input id="userAccount" type="text" readonly="readonly" tabindex="1" name="userAccount" value="'.$userCn.'" maxlength="32" />'."\n";
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+*/
+ echo '<tr>'."\n";
+ echo '<td>'."\n";
+ echo _USERNAME;
+ echo '</td>'."\n";
+ echo '<td>'."\n";
+ echo '<input id="userAccount" type="text" readonly="readonly" tabindex="1" name="userAccount" value="'.$userAccount.'" maxlength="32" />'."\n";
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+
+ echo '<tr>'."\n";
+ echo '<td>'."\n";
+ echo _NEW_PASSWORD;
+ echo '</td>'."\n";
+ echo '<td>'."\n";
+ echo '<input id="newPassword" type="password" accesskey="n" tabindex="3" name="newPassword" value="" maxlength="20" />'."\n";
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+
+ echo '<tr>'."\n";
+ echo '<td>'."\n";
+ echo _VERIFICATION;
+ echo '</td>'."\n";
+ echo '<td>'."\n";
+ echo '<input id="verification" type="password" accesskey="v" tabindex="3" name="verification" value="" maxlength="20" />'."\n";
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+
+ echo '</tbody>'."\n";
+ echo '</table>'."\n";
+
+ formEnd();
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-password/javascript/changeMyPassword.jquery.min.js b/mayor-orig/www/skin/classic/module-password/javascript/changeMyPassword.jquery.min.js
new file mode 100644
index 00000000..e672f080
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-password/javascript/changeMyPassword.jquery.min.js
@@ -0,0 +1,27 @@
+// $(function() {
+// var myPasswordComplex = false;
+// $('#changeMyPassword').submit(function() {
+// if (myPasswordComplex && ($('#newPassword').val() == $('#verification').val())) this.submit();
+// else return false;
+// });
+// var defaultComplexity = {
+// minimumChars:7,
+// strengthScaleFactor:0.5
+// };
+// $("#newPassword").complexify(defaultComplexity, function (valid, complexity)
+// {
+// //console.log("Password complexity: " + complexity + " " + valid);
+// var progressBar = $('#complexity-bar');
+// //progressBar.toggleClass('progress-bar-success', valid);
+// //progressBar.toggleClass('progress-bar-danger', !valid);
+// //progressBar.css({'width': complexity + '%'});
+// $('#complexity-bar').text(Math.round(complexity) + '%');
+// myPasswordComplex = valid;
+// });
+// });
+//
+// // complexify plugin
+// !function(a){a.fn.extend({complexify:function(b,c){function h(a,b){for(var c=a.length-1;c>=0;c--)if(b[0]<=a.charCodeAt(c)&&a.charCodeAt(c)<=b[1])return b[1]-b[0]+1;return 0}function i(c){if("strict"===b.banMode){for(var d=0;d<b.bannedPasswords.length;d++)if(-1!==c.toLowerCase().indexOf(b.bannedPasswords[d].toLowerCase()))return!0;return!1}return a.inArray(c,b.bannedPasswords)>-1?!0:!1}function j(){var g=a(this).val(),j=0,k=!1;if(i(g))j=1;else for(var l=f.length-1;l>=0;l--)j+=h(g,f[l]);j=Math.log(Math.pow(j,g.length))*(1/b.strengthScaleFactor),k=j>d&&g.length>=b.minimumChars,j=100*(j/e),j=j>100?100:j,c.call(this,k,j)}var d=49,e=120,f=[[32,32],[48,57],[65,90],[97,122],[33,47],[58,64],[91,96],[123,126],[128,255],[256,383],[384,591],[592,687],[688,767],[768,879],[880,1023],[1024,1279],[1328,1423],[1424,1535],[1536,1791],[1792,1871],[1920,1983],[2304,2431],[2432,2559],[2560,2687],[2688,2815],[2816,2943],[2944,3071],[3072,3199],[3200,3327],[3328,3455],[3456,3583],[3584,3711],[3712,3839],[3840,4095],[4096,4255],[4256,4351],[4352,4607],[4608,4991],[5024,5119],[5120,5759],[5760,5791],[5792,5887],[6016,6143],[6144,6319],[7680,7935],[7936,8191],[8192,8303],[8304,8351],[8352,8399],[8400,8447],[8448,8527],[8528,8591],[8592,8703],[8704,8959],[8960,9215],[9216,9279],[9280,9311],[9312,9471],[9472,9599],[9600,9631],[9632,9727],[9728,9983],[9984,10175],[10240,10495],[11904,12031],[12032,12255],[12272,12287],[12288,12351],[12352,12447],[12448,12543],[12544,12591],[12592,12687],[12688,12703],[12704,12735],[12800,13055],[13056,13311],[13312,19893],[19968,40959],[40960,42127],[42128,42191],[44032,55203],[55296,56191],[56192,56319],[56320,57343],[57344,63743],[63744,64255],[64256,64335],[64336,65023],[65056,65071],[65072,65103],[65104,65135],[65136,65278],[65279,65279],[65280,65519],[65520,65533]],g={minimumChars:8,strengthScaleFactor:1,bannedPasswords:window.COMPLEXIFY_BANLIST||[],banMode:"strict"};return a.isFunction(b)&&!c&&(c=b,b={}),b=a.extend(g,b),this.each(function(){a(this).val()&&j.apply(this)}),this.each(function(){a(this).bind("keyup focus input propertychange mouseup",j)})}})}(jQuery);
+//
+// -- disabled
+ \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-session/css/accountInfo.css b/mayor-orig/www/skin/classic/module-session/css/accountInfo.css
new file mode 100644
index 00000000..9259e788
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-session/css/accountInfo.css
@@ -0,0 +1,100 @@
+
+ table.personalSettings {
+ background-color: rgb(220,220,220);
+ color: white;
+ margin-top: 20px;
+ }
+
+ table.personalSettings thead th {
+ background-color: rgb(60,20,100);
+ padding: 5px 40px 5px 40px;
+ }
+
+ table.personalSettings thead th.policy {
+ background-color: rgb(225,125,25);
+ }
+
+ table.personalSettings tfoot th {
+ background-color: rgb(60,20,100);
+ }
+
+ table.personalSettings tbody td {
+ background-color: rgb(200,200,210);
+ }
+
+ table.personalSettings tbody th {
+ width: 100px;
+ background-color: rgb(120,120,140);
+ }
+
+/* ------------------------- */
+
+
+ table.changePassword {
+ margin-top: 20px;
+ background-color: rgb(220,220,220);
+ color: white;
+ }
+
+ table.changePassword thead th {
+ background-color: rgb(60,20,100);
+ padding: 5px 40px 5px 40px;
+ }
+
+ table.changePassword tfoot th {
+ background-color: rgb(60,20,100);
+ }
+
+ table.changePassword tbody td {
+ background-color: rgb(200,200,210);
+ }
+
+ table.changePassword tbody th {
+ width: 100px;
+ background-color: rgb(120,120,140);
+ }
+
+/* WALL */
+
+ div#wall {
+ text-align:center;
+ }
+
+ div#wall table {
+ margin: 20px auto;
+ background-color: rgb(220,220,220);
+ color: white;
+ }
+
+ div#wall table thead th {
+ background-color: rgb(60,20,100);
+ padding: 5px 40px 5px 40px;
+ }
+
+ div#wall table tfoot th {
+ background-color: rgb(60,20,100);
+ }
+
+ div#wall table tbody td {
+ background-color: rgb(200,200,210);
+ }
+
+ div#wall table tbody th {
+ width: 100px;
+ background-color: rgb(120,120,140);
+ }
+
+ div.wall {
+ margin:20px auto;
+ border: solid 2px #887780;
+ background-color: #eedde0;
+ color: black;
+ width:400px;
+ padding:5px;
+ }
+ div.centro { text-align: center; }
+ div.wall { text-align: left; }
+ div.wall h1 { font-size:larger; margin:0px; padding-bottom: 5px;}
+ div.wall h2 { font-size:smaller; margin:0px; padding:0px; text-align: right;}
+ div.wall img { border: none; top:5px; right:5px; float:right; }
+
diff --git a/mayor-orig/www/skin/classic/module-session/css/admin/knownNodes.css b/mayor-orig/www/skin/classic/module-session/css/admin/knownNodes.css
new file mode 100644
index 00000000..f61a0b60
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-session/css/admin/knownNodes.css
@@ -0,0 +1,14 @@
+
+form#search { background-color: #eee; padding: 5px; text-align: center; margin: 10px auto; width: 400px; }
+form#search h3 { border-bottom: 1px solid #600; padding: 2px 10px; margin: 10px 40px; }
+form#search label { margin-right: 5px; }
+form#search input { margin-left: 10px; }
+
+table#nodes { background-color: white; border: solid 1px #ddd; border-spacing: 0px; margin: auto; }
+table#nodes td, table#nodes th { border: solid 1px #ddd; padding: 2px 5px; }
+table#nodes tr.fejlesztoi td { background-color: #060; color: white; }
+table#nodes tr.fenntarto td { background-color: #006; color: white; }
+table#nodes tr.controller td { background-color: #600; color: white; }
+table#nodes tr.backup td { background-color: #630; color: white; }
+table#nodes td input.pong { background-color: #282; color: white; }
+table#nodes td input.delete { background-color: #d00; color: white; }
diff --git a/mayor-orig/www/skin/classic/module-session/css/admin/registration.css b/mayor-orig/www/skin/classic/module-session/css/admin/registration.css
new file mode 100644
index 00000000..d951061d
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-session/css/admin/registration.css
@@ -0,0 +1,54 @@
+
+
+ form.reg { background-color: #d2dfe9; margin:40px; text-align: center; border: 5px solid #c2cfd9; background-color: #68a; border-color: #79b; }
+ form#modForm.reg { background-color: #8b9; border-color: #6a8; }
+
+ form.reg > div.adatok, div#bal > div { border: solid 1px white; background-color: #428fa9; color: white; background-color: #246;}
+ form#modForm.reg > div.adatok, form#modForm.reg div#bal > div { background-color: #4a6; color: #600; }
+
+ form.reg div#bal { float: left; }
+ form.reg div.leiras { background-color: #ddd; color: #246; text-align: left; width: 600px; padding: 5px 20px; margin: 0px auto 15px auto; }
+ form.reg div#bal div.leiras { width: 400px; height: 400px; overflow: auto; background-color: #ddd; color: #246; padding: 10px; margin: 0px 20px 10px 0px; text-align: justify; }
+ form#modForm.reg div#bal div.leiras { background-color: #ddd; color: #264; }
+ form.reg div.leiras.offline { font-size: 14px; text-align: left; height:410px;}
+ form.reg div.leiras.offline ol li { padding: 0.3em; }
+
+ form.reg div.tamogatas { background-color: #446; width: 380px; padding: 20px; text-align: center; color: white; }
+ form.reg div.tamogatas input[type=submit] { width: 60%; margin:1em;}
+ form.reg div.tamogatas input[type=text] { width: 60%;}
+ form.reg div.tamogatas select { text-align: right; }
+ form.reg div.tamogatas p.hibaeseten { background-color: white; color: black; padding: 5px; }
+
+ form.reg div.adatok { height: 600px; text-align: left; padding: 10px; margin-bottom: 10px; overflow-y: scroll; }
+ form.reg h3 { text-align: center;background-color: #eee; border-bottom: solid 1px #ff0066; padding: 5px; margin: 0px 0px 2em 0px; color: #246; }
+ form.reg div.adatok label { display: inline-block; text-align: right; padding-right: 5px; width: 250px; }
+
+ form.reg div.adatok input[type=text] { width: 400px; margin-top: 10px; background-color: #ccc; border: solid 1px white;}
+ form.reg div.adatok input[type=text].kotelezo { background-color: white; }
+
+
+ div.validRegisztracio {
+ text-align:center;
+ background-color: lightgreen;
+ margin:40px;
+ height:5em;
+ font-size:large;
+ line-height:5em;
+ vertical-align:middle;
+ color:white;
+ }
+ div.validRegisztracio span { padding-right:10px; }
+
+ div.notValidRegisztracio {
+ text-align:center;
+ background-color: #EE9090;
+ margin:40px;
+ height:5em;
+ font-size:large;
+ line-height:5em;
+ vertical-align:middle;
+ color:white;
+ }
+ div.notValidRegisztracio span { padding-right:10px; }
+
+ h2 { margin-left:40px; } \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-session/css/createAccount.css b/mayor-orig/www/skin/classic/module-session/css/createAccount.css
new file mode 100644
index 00000000..6c1e19ca
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-session/css/createAccount.css
@@ -0,0 +1,24 @@
+@media screen,print {
+
+ table.new input { border: solid 1px black; }
+
+ table.searchresult { background-color: #aaaaaa; margin-bottom:20px; }
+ table.searchresult thead th { background-color: #d6bddb; height:2em; border-bottom: solid 2px purple; }
+ table.searchresult tfoot th { background-color: purple; }
+ table.searchresult th { background-color: #ffffff; }
+ table.searchresult a { color: black; text-decoration: none; }
+ table.searchresult a:hover { text-decoration: underline; }
+
+ table.new { background-color: #aaaaaa; margin-bottom:20px; margin-top:30px;}
+ table.new thead th { background-color: #ccccee; height:2em; border-bottom: solid 2px purple; }
+ table.new thead td { text-align: center; background-color: #ccccee; height:2em; border-bottom: solid 2px purple; }
+ table.new th { background-color: #ffffff; }
+ table.new td { background-color: #ffffff; }
+ table.new td input { }
+
+ .paros { background-color: #eeeeee; }
+ .paratlan { background-color: #dddddd; }
+
+ table.new input.hiba { outline: solid 1px red; }
+
+} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-session/css/createGroup.css b/mayor-orig/www/skin/classic/module-session/css/createGroup.css
new file mode 100644
index 00000000..78e0b4fc
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-session/css/createGroup.css
@@ -0,0 +1,13 @@
+@media screen,print {
+
+ table.new { background-color: #aaaaaa; margin-bottom:20px;}
+ table.new thead th { background-color: #ccccee; height:2em; border-bottom: solid 2px purple; }
+ table.new thead td { text-align: center; background-color: #ccccee; height:2em; border-bottom: solid 2px purple; }
+ table.new th { background-color: #ffffff; }
+ table.new td { background-color: #ffffff; }
+ table.new td input { width:95%; }
+
+ .paros { background-color: #eeeeee; }
+ .paratlan { background-color: #dddddd; }
+
+} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-session/css/download.css b/mayor-orig/www/skin/classic/module-session/css/download.css
new file mode 100644
index 00000000..fddc58c3
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-session/css/download.css
@@ -0,0 +1,9 @@
+
+ div.download { text-align: center; }
+ div.download h1 { border: black dotted; border-width: 1px 0px; font-size: 14px; width: 60%; margin: 0px auto; }
+ div.download table { margin: 10px auto; background-color: rgb(80,40,40); text-align: left; }
+ div.download table th { padding: 10px; background-color: rgb(200,100,10); color: white; text-align: right; }
+ div.download table td { background-color: rgb(220,220,200); padding: 10px 40px; }
+ div.download table td a { text-decoration: none; color: red; }
+ div.download table td a:hover { text-decoration: underline; }
+ div.download p { background-color: rgb(200,200,160); padding: 20px; width: 60%; margin: 0px auto; }
diff --git a/mayor-orig/www/skin/classic/module-session/css/facebookConnect.css b/mayor-orig/www/skin/classic/module-session/css/facebookConnect.css
new file mode 100644
index 00000000..c8abdba2
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-session/css/facebookConnect.css
@@ -0,0 +1,25 @@
+div#fbConnect {
+ max-width: 500px;
+ text-align: center;
+ margin: 40px auto;
+ height: 5em;
+ font-size: large;
+ line-height: 5em;
+ vertical-align: middle;
+ color: #FFF;
+}
+div#fbConnect.valid {
+ background-color: #90EE90;
+}
+div#fbConnect.notvalid {
+ background-color: orange;
+}
+div#fbConnect.notActive {
+ background-color: red;
+}
+div#fbConnect.grant {
+ background-color: #3b5998;
+}
+div#fbConnect span {
+ padding-right:4px;
+} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-session/css/googleapi.css b/mayor-orig/www/skin/classic/module-session/css/googleapi.css
new file mode 100644
index 00000000..c5cae8c8
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-session/css/googleapi.css
@@ -0,0 +1,24 @@
+div#googleapi {
+ max-width: 500px;
+ text-align: center;
+ margin: 40px auto;
+ height: 5em;
+ font-size: large;
+ line-height: 5em;
+ vertical-align: middle;
+ color: #FFF;
+}
+div#googleapi.valid {
+ background-color: #90EE90;}
+div#googleapi.notvalid {
+ background-color: orange;
+}
+div#googleapi.notActive {
+ background-color: red;
+}
+div#googleapi.grant {
+ background-color: cornflowerblue;
+}
+div#googleapi span {
+ padding-right:4px;
+} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-session/css/groupInfo.css b/mayor-orig/www/skin/classic/module-session/css/groupInfo.css
new file mode 100644
index 00000000..c8f16d61
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-session/css/groupInfo.css
@@ -0,0 +1,96 @@
+
+ table.personalSettings {
+ background-color: rgb(220,220,220);
+ color: white;
+ margin-top: 20px;
+ }
+
+ table.personalSettings thead th {
+ background-color: rgb(60,20,100);
+ padding: 5px 40px 5px 40px;
+ }
+
+ table.personalSettings tfoot th {
+ background-color: rgb(60,20,100);
+ }
+
+ table.personalSettings tbody td {
+ background-color: rgb(200,200,210);
+ }
+
+ table.personalSettings tbody th {
+ width: 100px;
+ background-color: rgb(120,120,140);
+ }
+
+/* ------------------------- */
+
+
+ table.changePassword {
+ margin-top: 20px;
+ background-color: rgb(220,220,220);
+ color: white;
+ }
+
+ table.changePassword thead th {
+ background-color: rgb(60,20,100);
+ padding: 5px 40px 5px 40px;
+ }
+
+ table.changePassword tfoot th {
+ background-color: rgb(60,20,100);
+ }
+
+ table.changePassword tbody td {
+ background-color: rgb(200,200,210);
+ }
+
+ table.changePassword tbody th {
+ width: 100px;
+ background-color: rgb(120,120,140);
+ }
+
+/* WALL */
+
+ div#wall {
+ text-align:center;
+ }
+
+ div#wall table {
+ margin: 20px auto;
+ background-color: rgb(220,220,220);
+ color: white;
+ }
+
+ div#wall table thead th {
+ background-color: rgb(60,20,100);
+ padding: 5px 40px 5px 40px;
+ }
+
+ div#wall table tfoot th {
+ background-color: rgb(60,20,100);
+ }
+
+ div#wall table tbody td {
+ background-color: rgb(200,200,210);
+ }
+
+ div#wall table tbody th {
+ width: 100px;
+ background-color: rgb(120,120,140);
+ }
+
+ div.wall {
+ margin:20px auto;
+ border: solid 2px #887780;
+ background-color: #eedde0;
+ color: black;
+ width:400px;
+ padding:5px;
+ }
+ div.centro { text-align: center; }
+ div.wall { text-align: left; }
+ div.wall h1 { font-size:larger; margin:0px; padding-bottom: 5px;}
+ div.wall h2 { font-size:smaller; margin:0px; padding:0px; text-align: right;}
+ div.wall img { border: none; top:5px; right:5px; float:right; }
+
diff --git a/mayor-orig/www/skin/classic/module-session/css/search/searchAccount.css b/mayor-orig/www/skin/classic/module-session/css/search/searchAccount.css
new file mode 100644
index 00000000..5a41b2e9
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-session/css/search/searchAccount.css
@@ -0,0 +1,31 @@
+@media screen,print {
+
+ input { border: solid 1px black; }
+
+ table.searchresult { background-color: #aaaaaa; margin-bottom:20px; }
+ table.searchresult thead th { background-color: #d6bddb; height:2em; border-bottom: solid 2px purple; }
+ table.searchresult thead th.policy { background-color: rgb(225,125,25); color: white; }
+ table.searchresult tfoot th { background-color: purple; }
+ table.searchresult th { background-color: #ffffff; }
+ table.searchresult a { color: black; text-decoration: none; }
+ table.searchresult a:hover { text-decoration: underline; }
+ table.searchresult td form { display: inline; }
+ table.searchresult td form input { margin: 0px 2px; }
+ table.searchresult td form input:hover { background-color: red; }
+
+ table.newgroup, table.newuser { background-color: #aaaaaa; margin-bottom:20px;}
+ table.newgroup thead th, table.newuser thead th { background-color: #ccccee; height:2em; border-bottom: solid 2px purple; }
+ table.newgroup th, table.newuser th { background-color: #ffffff; }
+ table.newgroup td, table.newuser td { background-color: #ffffff; }
+ table.newgroup td input, table.newuser td input { width:95%; }
+
+ .paros { background-color: #eeeeee; }
+ .paratlan { background-color: #dddddd; }
+
+ table.search { background-color: #aaaaaa; margin-bottom:20px;}
+ table.search thead th { background-color: #ccccee; height:2em; border-bottom: solid 2px purple; }
+ table.search th { background-color: white; }
+ table.search td { background-color: white; }
+ table.search tfoot td { background-color: purple; }
+
+} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-session/css/search/searchGroup.css b/mayor-orig/www/skin/classic/module-session/css/search/searchGroup.css
new file mode 100644
index 00000000..4a912bb1
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-session/css/search/searchGroup.css
@@ -0,0 +1,44 @@
+@media screen,print {
+ /*
+ Module: useradmin
+ */
+
+ table.search { background-color: #aaaaaa; margin-bottom:20px; }
+ table.search thead th {
+ background-color: #ccccee; height:2em;
+ border-bottom: solid 2px purple;
+ }
+ table.search th { background-color: white; }
+ table.search td { background-color: white; }
+ table.search tfoot td { background-color: purple; }
+
+ input { border: solid 1px black; }
+
+ table.searchresult { background-color: #aaaaaa;
+ margin-bottom:20px;
+ }
+ table.searchresult thead th { background-color: #d6bddb; height:2em;
+ border-bottom: solid 2px purple;
+ }
+ table.searchresult tfoot th { background-color: purple; }
+ table.searchresult th { background-color: #ffffff; }
+ table.searchresult a { color: black; text-decoration: none; }
+ table.searchresult a:hover { text-decoration: underline; }
+
+ table.newgroup, table.newuser { background-color: #aaaaaa; margin-bottom:20px;}
+ table.newgroup thead th, table.newuser thead th {
+ background-color: #ccccee; height:2em;
+ border-bottom: solid 2px purple;
+ }
+ table.newgroup th, table.newuser th { background-color: #ffffff; }
+ table.newgroup td, table.newuser td { background-color: #ffffff; }
+ table.newgroup td input, table.newuser td input { width:95%; }
+
+ .paros {
+ background-color: #eeeeee;
+ }
+ .paratlan {
+ background-color: #dddddd;
+ }
+
+} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-session/css/sessionAdmin.css b/mayor-orig/www/skin/classic/module-session/css/sessionAdmin.css
new file mode 100644
index 00000000..d1cc5d1a
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-session/css/sessionAdmin.css
@@ -0,0 +1,8 @@
+
+ table.lista { background-color: #aaa; margin: auto; }
+ table.lista thead th, table.lista tfoot th { background-color: rgb(100,40,20); color: white; padding: 2px 5px; }
+ table.lista tbody th, table.lista tbody td { background-color: white; padding: 2px 5px; }
+ table.lista tbody tr:nth-child(even) th, table.lista tbody tr:nth-child(even) td { background-color: #eee; }
+ table.lista tbody tr:hover th, table.lista tbody tr:hover td { background-color: #999; color:white; }
+
+ \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-session/html/accountInfo.phtml b/mayor-orig/www/skin/classic/module-session/html/accountInfo.phtml
new file mode 100644
index 00000000..35c992f0
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-session/html/accountInfo.phtml
@@ -0,0 +1,253 @@
+<?php
+/*
+ Module: base/session
+*/
+
+ function putUserSettingsForm($ADAT) {
+ global $SKINSSHOW;
+ formBegin();
+ echo '<input type="hidden" name="action" value="userSettingsModify" />';
+ echo '<table align="center">';
+ echo '<tr>';
+ echo '<th>'._USERDEFAULTSKIN.'</th>';
+ echo '<td>';
+ echo '<select name="changeSkinTo">';
+ echo '<option value=""></option>';
+ foreach($SKINSSHOW as $_skin) {
+ $_SEL = ($_skin == $ADAT['skin']) ? ' selected="selected" ' : '';
+ echo '<option value="'.$_skin.'" '.$_SEL.'>'.$_skin.'</option>';
+ }
+ echo '</select>';
+ echo '</td>';
+ echo '</tr>';
+ echo '<tr><th colspan="2"><input type="submit" value="'._OK.'" /></th></tr>';
+ echo '</table>';
+ formEnd();
+ }
+
+ function putAttr($name, $values, $anAttrDef, $toPolicy = _POLICY) {
+
+ global $AUTH;
+
+ if ($anAttrDef['type'] == 'text') putTextAttr($name, $values, $anAttrDef);
+ elseif ($anAttrDef['type'] == 'int') putTextAttr($name, $values, $anAttrDef);
+ elseif ($anAttrDef['type'] == 'select') putSelectAttr($name, $values, $anAttrDef);
+ elseif ($anAttrDef['type'] == 'radio') putRadioAttr($name, $values, $anAttrDef);
+ elseif ($anAttrDef['type'] == 'timestamp') putTimestampAttr($name, $values, $anAttrDef);
+ elseif ($anAttrDef['type'] == 'image') putImageAttr($name, $userAccount, $anAttrDef);
+ else echo 'Ismeretlen atribútum típus: '.$name.' ('.$anAttrDef[$name]['type'].')';
+
+ }
+
+ function putTextAttr($name, $values, $anAttrDef) {
+ echo '<table class="attr">';
+ echo '<tr>';
+ echo '<th rowspan="'.$values['count'].'">'.$anAttrDef['desc'].'</th>';
+ echo '<td>';
+ for ($i=0;$i<max($values['count'],1);$i++) {
+ if (!isset($values[$i])) $values[$i] = '';
+ if ($anAttrDef['rights'][_ACCESS_AS]=='r')
+ echo $values[$i];
+ elseif ($anAttrDef['rights'][_ACCESS_AS]=='w')
+ echo '<input type="text" name="'.$name.'" value="'.$values[$i].'" />'."<br/>\n";
+ }
+ echo '</td>';
+ echo '</tr>';
+
+ echo '</table>'."\n";
+
+ }
+
+ function putIntAttr($name, $values, $anAttrDef) {
+ putTextAttr($name, $values, $anAttrDef);
+ }
+
+ function putSelectAttr($name, $values, $anAttrDef) {
+
+ echo '<table class="attr">';
+ echo '<tr>';
+ echo '<th>'.$anAttrDef['desc'].' ('.intval($values['count']).'):</th>';
+ echo '<td>';
+ if ($values['count'] > 0) {
+ echo '<select name="del-'.$name.'[]" multiple="multiple">';
+ for ($i=0; $i<$values['count']; $i++) {
+ if (is_array($values[$i]))
+ echo '<option value="'.$values[$i]['value'].'">'.(($values[$i]['txt']!='')?$values[$i]['txt']:$values[$i]['value']).'</option>';
+ else
+ echo '<option value="'.$values[$i].'">'.$values[$i].'</option>';
+ }
+ echo '</select>';
+ } elseif (!isset($values['count']) && count($values) > 0) {
+ echo '<select name="del-'.$name.'[]" multiple="multiple">';
+ for ($i=0; $i < count($values); $i++) {
+ echo '<option value="'.$values[$i]['value'].'">'.(($values[$i]['txt']!='')?$values[$i]['txt']:$values[$i]['value']).'</option>';
+ }
+ echo '</select>';
+ }
+ echo '</td>';
+ echo '</tr>';
+ if ($anAttrDef['rights'][_ACCESS_AS]=='w') {
+ echo '<tr>';
+ echo '<th>'._NEW.':</th>';
+ echo '<td>';
+ if (is_array($values['new'])) {
+ echo '<select name="new-'.$name.'[]">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ for ($i = 0; $i < count($values['new']); $i++) {
+ $_txt = (($values['new'][$i]['txt']!='')?$values['new'][$i]['txt']:$values['new'][$i]['value']);
+ echo '<option value="'.$values['new'][$i]['value'].'">'.$_txt.'</option>'."\n";
+ }
+ echo '</select>'."\n";
+ } else {
+ echo '<input type="text" name="new-'.$name.'[]" value="" />';
+ }
+ echo '</td>';
+ echo '</tr>';
+ }
+ echo '</table>'."\n";
+ }
+
+ function putRadioAttr($name, $values, $anAttrDef) {
+
+ if (!isset($values[0])) $values[0] = '';
+
+ echo '<table class="attr">';
+ echo '<tr>';
+ echo '<th>'.$anAttrDef['desc'].':</th>'."\n";
+ echo '<td>'."\n";
+
+ for ($i=0;$i<count($anAttrDef['options']);$i++) {
+ if ($values[0] == $anAttrDef['options'][$i]) {
+ echo '<input type="radio" name="'.$name.'" value="'.$anAttrDef['options'][$i].'" checked="checked" />';
+ } else {
+ echo '<input type="radio" name="'.$name.'" value="'.$anAttrDef['options'][$i].'" />';
+ }
+ echo $anAttrDef['options'][$i];
+ }
+ echo '</td>';
+
+ echo '</tr>';
+ echo '</table>';
+ }
+
+ function putTimestampAttr($name, $values, $anAttrDef) {
+
+ if (!isset($values[0])) $values[0] = '';
+ $Y = substr($values[0],0,4);
+ $m = substr($values[0],4,2);
+ $d = substr($values[0],6,2);
+
+ echo '<table class="attr">';
+ echo '<tr>';
+ echo '<th>'.$anAttrDef['desc'].':</th>';
+ echo '<td>';
+
+ if ($anAttrDef['rights'][_ACCESS_AS]=='r') { echo "$Y-$m-$d"; } else {
+
+ echo '<select name="'.$name.'[]">';
+ echo '<option value="">'._YEAR.'</option>';
+ for($i=1950; $i<2050; $i++) {
+ if ($i==$Y) {$_SEL = 'selected="selected"';} else {$_SEL = '';}
+ echo '<option value="'.$i.'" '.$_SEL.'>' .$i. '</option>'."\n";
+ }
+ echo '</select>'."\n";
+ echo '<select name="'.$name.'[]">';
+ echo '<option value="">'._MONTH.'</option>';
+ for($i=1; $i<=12; $i++) {
+ if ($i<10) $i='0'.$i;
+ if ($i==$m) $_SEL = 'selected="selected"'; else $_SEL = '';
+ echo '<option value="'.$i.'" '.$_SEL.'>'.$i.'</option>';
+ }
+ echo '</select>'."\n";
+ echo '<select name="'.$name.'[]">';
+ echo '<option value="">'._DAY.'</option>';
+ for($i=1; $i<=31; $i++) {
+ if ($i<10) $i='0'.$i;
+ if ($i==$d) $_SEL = 'selected="selected"'; else $_SEL = '';
+ echo '<option value="'.$i.'" '.$_SEL.'>'.$i.'</option>';
+ }
+ echo '</select>'."\n";
+ }
+
+ echo '</td>';
+ echo '</tr>';
+ echo '</table>';
+ }
+
+ function putImageAttr($name, $dn, $anAttrDef) {
+
+ echo '<table class="attr"><tr>';
+ echo '<th><img src="img/'.$name.'.php?dn='.$dn.'" alt="kép" /></th>';
+ echo '<td>'._NEWPHOTO.':<br />';
+ echo '<input type="file" name="'.$name.'" />';
+ echo '</td>';
+ echo '</tr></table>';
+
+ }
+
+ function putAccountInfoForm($userInfo, $accountInfo, $attrDef, $toPolicy = _POLICY) {
+
+ formBegin(array('enctype'=>'multipart/form-data'));
+ echo '<input type="hidden" name="action" value="changeSettings" />';
+ echo '<input type="hidden" name="toPolicy" value="'.$toPolicy.'" />';
+ echo '<input type="hidden" name="userAccount" value="'.$userInfo['userAccount'][0].'" />';
+ echo '<table class="personalSettings" align="center" cellspacing="1">';
+ echo '<thead>';
+ if ($toPolicy != _POLICY) echo '<tr><th class="policy">'.$toPolicy.'</th></tr>'."\n";
+ echo '<tr><th>'.$userInfo['userCn'][0].'</th></tr>';
+ echo '<tr><th>'.$userInfo['userAccount'][0].'</th></tr>';
+ echo '</thead>';
+ echo '<tfoot>';
+ echo '<tr><th><input type="submit" name="change" value="'._OK.'" /></th></tr>';
+ echo '</tfoot>';
+ echo '<tbody>'."\n";
+ $emptyAttrs = '';
+ if (is_array($accountInfo)) {
+ reset($accountInfo);
+ foreach ($accountInfo as $name => $value) {
+ if (!isset($value[0]) || $value['count'] == 0) $emptyAttrs .= "$name:";
+ if ($name != 'userAccount') {
+ echo '<tr><td>'; putAttr($name, $value, $attrDef[$name], $toPolicy); echo '</td></tr>'."\n";
+ }
+ }
+ }
+ echo '</tbody>';
+ echo '</table>';
+ if ($emptyAttrs != '') $emptyAttrs = substr($emptyAttrs,0,-1);
+ echo '<input type="hidden" name="emptyAttrs" value="'.$emptyAttrs.'" />';
+ formEnd();
+
+ }
+
+ function putGroupInfoForm($groupCn, $groupInfo, $attrDef, $toPolicy = _POLICY) {
+ formBegin(array('enctype'=>'multipart/form-data'));
+
+ echo '<input type="hidden" name="action" value="changeSettings" />';
+ echo '<input type="hidden" name="toPolicy" value="'.$toPolicy.'" />';
+ echo '<input type="hidden" name="groupCn" value="'.$groupCn.'" />';
+ echo '<table class="personalSettings" align="center" cellspacing="1">';
+ echo '<thead>';
+ echo '<tr><th>'.$groupCn.'</th></tr>';
+// echo '<tr><th>'.$userInfo['userAccount'][0].'</th></tr>';
+ echo '</thead>';
+ echo '<tfoot>';
+ echo '<tr><th><input type="submit" name="change" value="'._OK.'" /></th></tr>';
+ echo '</tfoot>';
+ echo '<tbody>'."\n";
+ $emptyAttrs = '';
+ if (is_array($groupInfo))
+ foreach ($groupInfo as $name => $value) {
+ if (!isset($value[0]) || $value['count'] == 0) $emptyAttrs .= "$name:";
+ if ($name != 'groupCn') {
+ echo '<tr><td>'; putAttr($name, $value, $attrDef[$name], $toPolicy); echo '</td></tr>'."\n";
+ }
+ }
+ echo '</tbody>';
+ echo '</table>';
+ if ($emptyAttrs != '') $emptyAttrs = substr($emptyAttrs,0,-1);
+ echo '<input type="hidden" name="emptyAttrs" value="'.$emptyAttrs.'" />';
+ formEnd();
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-session/html/admin/knownNodes.phtml b/mayor-orig/www/skin/classic/module-session/html/admin/knownNodes.phtml
new file mode 100644
index 00000000..5a759aba
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-session/html/admin/knownNodes.phtml
@@ -0,0 +1,70 @@
+<?php
+
+ function putGetNodeData() {
+ formBegin(array('id'=>'search'));
+
+ echo '<h3>'._UJ_VEGPONT.'</h3>';
+ echo '<input type="hidden" name="action" value="getPublicDataByNodeId" />';
+ echo '<label for="nodeId">'._NODEID.'</label>';
+ _inlineHelp(_SUGO_NODEID);
+ echo '<input id="nodeId" type="text" name="nodeId" value="" />';
+ echo '<input type="submit" value="'._LEKERDEZES.'" />';
+
+ formEnd();
+ }
+
+ function putKnownNodes($ADAT) {
+
+ echo '<table id="nodes">';
+ echo '<thead>';
+ echo '<tr>';
+ echo '<th>'._NODEID.'</th>';
+ echo '<th>'._NEV.'</th>';
+ echo '<th>'._HELYSEG.'</th>';
+ echo '<th>'._NODETIPUS.'</th>';
+ echo '<th>'.'Ping/Rev.'.'</th>';
+ echo '</tr>';
+ echo '</thead>';
+ echo '<tfoot>';
+ echo '<tr>';
+ echo '<th>'._NODEID.'</th>';
+ echo '<th>'._NEV.'</th>';
+ echo '<th>'._HELYSEG.'</th>';
+ echo '<th>'._NODETIPUS.'</th>';
+ echo '<th>'.'Ping/Rev.'.'</th>';
+ echo '</tr>';
+ echo '</tfoot>';
+ echo '<tbody>';
+ foreach ($ADAT['nodes'] as $index => $nAdat) {
+ $class = ekezettelen($nAdat['nodeTipus']);
+ echo '<tr class="'.$class.'">';
+ echo '<td>'.$nAdat['nodeId'].'</td>';
+ echo '<td>'.$nAdat['nev'].'</td>';
+ echo '<td>'.$nAdat['cimHelyseg'].'</td>';
+ echo '<td>'.$nAdat['nodeTipus'].'</td>';
+ echo '<td>';
+ formBegin();
+ echo '<input type="hidden" name="action" value="rpcPing" />';
+ echo '<input type="hidden" name="nodeId" value="'.$nAdat['nodeId'].'" />';
+ if (isset($ADAT['nodeVersion']) && $nAdat['nodeId'] == $ADAT['nodeId']) {
+ echo '<input class="pong" type="submit" value="'.$ADAT['nodeVersion'].'" />';
+ } else {
+ echo '<input type="submit" value="ping" />';
+ }
+ formEnd();
+ echo '</td>';
+ echo '<td>';
+ formBegin();
+ echo '<input type="hidden" name="action" value="removeNode" />';
+ echo '<input type="hidden" name="nodeId" value="'.$nAdat['nodeId'].'" />';
+ echo '<input class="delete confirm" title="'._BIZTOS_TOROL_E.'" type="submit" value="X" />';
+ formEnd();
+ echo '</td>';
+ echo '</tr>';
+ }
+ echo '</tbody>';
+ echo '</table>';
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-session/html/admin/registration.phtml b/mayor-orig/www/skin/classic/module-session/html/admin/registration.phtml
new file mode 100644
index 00000000..094a77d9
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-session/html/admin/registration.phtml
@@ -0,0 +1,270 @@
+<?php
+
+ function validRegisztracio($valid, $nodeId) {
+
+ if ($valid==1) {
+ echo '<div class="validRegisztracio"><span class="icon-ok-circle"></span>A mayor.hu sikeresen validálta a szervert (nodeId: '.$nodeId.')!</div>';
+ } else {
+ echo '<div class="notValidRegisztracio"><span class="icon-remove-circle"></span>A mayor.hu nem ismeri ezt a szervert (nodeId: '.$nodeId.')!</div>';
+ }
+
+ }
+
+ function putCheckOldReg($ADAT) {
+
+ formBegin(array('method'=>'post','action'=>'','id'=>'regForm','class'=>'reg'));
+ echo '<input type="hidden" name="action" value="checkOldRegByPublicKey" />';
+ echo '<input type="hidden" name="publicKey" value="'.$ADAT['my']['publicKey'].'" />';
+
+ echo '<h3>'._KORABBAN_REGISZTRALT.'</h3>';
+ echo '<div class="leiras">';
+ echo '<p>'.str_replace("\n\n",'</p><p>',_REG_HELYREALLITAS_LEIRAS).'</p>';
+ echo '</div>';
+ echo '<input type="submit" value="'._REGISZTRACIO_HELYREALLITAS.'" />';
+
+ formEnd();
+
+ }
+
+ function putRegisztracio($ADAT) {
+
+ formBegin(array('method'=>'post','action'=>'','id'=>'regForm','class'=>'reg'));
+ echo '<input type="hidden" name="action" value="sendRegRequest" />';
+
+ echo '<div id="bal">';
+ echo '<div class="leiras">';
+ include('static/hu_HU/session/admin/registration/readme.html');
+ echo '</div>'; // leiras
+
+ echo '<div class="tamogatas">'."\n";
+ echo '<label for="dij">'.str_replace(' ','&nbsp;',_TAMOGATASI_OSSZEG).'</label>'."\n";
+ echo '<select name="dij" id="dij">'."\n";
+ foreach ($ADAT['OSSZEG'] as $dij) {
+ echo '<option value="'.$dij.'">'.$dij.' Ft/hó</option>'."\n";
+ }
+ echo '</select> + ÁFA'."<br/>\n";
+
+ echo '<label for="utemezes">'.str_replace(' ','&nbsp;',_UTEMEZES).'</label>';
+ echo '<select name="utemezes" id="utemezes">'."<br/>\n";
+ foreach (array('','féléves','éves') as $value) {
+ echo '<option value="'.$value.'">'.$value.'</option>'."\n";
+ }
+ echo '</select>'."<br/>\n";
+ echo '<label for="egyeb">'.str_replace(' ','&nbsp;',_EGYEB_TAMOGATAS).'</label>';
+ echo '<input id="egyeb" type="text" name="egyebTamogatas" value="" />'."<br/>\n";
+ if (_REGISZTRALT !== true) echo '<input type="submit" value="'._REGISZTRACIO.'" />'."\n";
+ echo '<p class="hibaeseten">'._HIBA_ESETEN.'</p>'."\n";
+ echo '</div>'."\n"; // tamogatar
+ echo '</div>'; // #bal
+
+ echo '<div class="adatok">';
+
+ echo '<h3>'._INTEZMENY_ADATAI.'</h3>';
+ foreach ($ADAT['MEZOK'] as $key => $mAdat) {
+ $value = $ADAT['my'][$key];
+ if (isset($mAdat) && $mAdat['display']!==false) {
+
+ if ($mAdat['kotelezo']===true) $class = 'kotelezo'; else $class = '';
+ if ($mAdat['readonly']===true) $_ro = ' readonly="readonly" '; else $_ro = '';
+ if (defined('_'.nagybetus($key))) $str = constant('_'.nagybetus($key)); else $str = $key;
+
+ echo '<div>';
+ echo '<label for="'.$key.'">'.$str.'</label>';
+ if (is_array($mAdat['options'])) {
+ echo '<select name="'.$key.'" id="'.$key.'" class="'.$class.'">';
+ for($i=0; $i<count($mAdat['options']); $i++) {
+ $__jelleg = $mAdat['options'][$i];
+ $_SEL = ($__jelleg==$value) ? ' selected="selected" ' : '';
+ echo '<option value="'.$__jelleg.'"'.$_SEL.'>'.$__jelleg.'</option>';
+ }
+ echo '</select>';
+ } elseif ($mAdat['type']=='textarea') {
+ echo '<textarea style="width:100%;height:40px;" id="'.$key.'" type="text" name="'.$key.'" value="'.$value.'" class="'.$class.'" '.$_ro.'>';
+ echo $value;
+ echo '</textarea>';
+ } else {
+ echo '<input id="'.$key.'" type="text" name="'.$key.'" value="'.$value.'" class="'.$class.'" '.$_ro.'/>';
+ }
+ echo '</div>'."\n";
+
+ } else {
+ if ($mAdat['type']!='none') {
+ echo '<input type="hidden" name="'.$key.'" value="'.$value.'" />';
+ }
+ }
+ }
+ echo '</div>'."\n";
+
+
+
+
+
+ echo '<input type="submit" value="'._REGISZTRACIO.'" />'."\n";
+ echo '</div>';
+
+ formEnd();
+
+ }
+
+
+
+
+
+
+ function putRegisztracioMod($ADAT) {
+
+ if (defined('_DEVEL') && _DEVEL===true) {
+ $host = 'https://localhost';
+ } else {
+ $host = 'http://www.mayor.hu';
+ }
+ $ADAT['intezmeny']['naploUrl'] = $naploUrl = substr($_SERVER["HTTP_REFERER"], 0, strpos($_SERVER["HTTP_REFERER"], 'index.php?'));
+ formBegin(array('id'=>"modForm", 'class'=>"reg", 'action'=>"", 'method'=>"post"));
+ echo '<input type="hidden" name="action" value="modRegAdat" />';
+
+ echo '<div id="bal">';
+ echo '<div class="leiras">';
+ include('static/hu_HU/session/admin/registration/readme.html');
+ echo '</div>'; //.leiras
+
+ echo '<div class="tamogatas">'."\n";
+ echo '<label for="dij">'.str_replace(' ','&nbsp;',_TAMOGATASI_OSSZEG).'</label>'."\n";
+ echo '<select name="dij" id="dij">'."\n";
+ if ($ADAT['regAdat']['nodeData']['dij'] != '') {
+ $SEL = array($ADAT['regAdat']['nodeData']['dij'] => ' selected="selected" ');
+ if (!in_array($ADAT['regAdat']['nodeData']['dij'], $ADAT['OSSZEG'])) $ADAT['OSSZEG'][] = $ADAT['regAdat']['nodeData']['dij'];
+ } else {
+ $SEL = array(5000 => ' selected="selected" '); // default
+ }
+ foreach ($ADAT['OSSZEG'] as $dij) {
+ echo '<option value="'.$dij.'"'.$SEL[$dij].'>'.$dij.' Ft/hó</option>'."\n";
+ }
+ echo '</select> + ÁFA'."<br/>\n";
+
+ echo '<label for="utemezes">'.str_replace(' ','&nbsp;',_UTEMEZES).'</label>';
+ echo '<select name="utemezes" id="utemezes">'."<br/>\n";
+ foreach (array('','féléves','éves') as $value) {
+ $_SEL = ($value==$ADAT['regAdat']['nodeData']['utemezes'])? ' selected="selected" ':'';
+ echo '<option value="'.$value.'"'.$_SEL.'>'.$value.'</option>'."\n";
+ }
+ echo '</select>'."<br/>\n";
+ echo '<label for="egyeb">'.str_replace(' ','&nbsp;',_EGYEB_TAMOGATAS).'</label>';
+ echo '<input id="egyeb" type="text" name="egyebTamogatas" value="'.$ADAT['regAdat']['nodeData']['egyebTamogatas'].'" />'."<br/>\n";
+ if (_REGISZTRALT !== true) echo '<input type="submit" value="'._MODOSITAS.'" />'."\n";
+ echo '<p class="hibaeseten">'._HIBA_ESETEN.'</p>'."\n";
+ echo '</div>'."\n";
+
+
+ echo '</div>'; // #bal
+
+
+
+ echo '<div class="adatok">';
+ foreach ($ADAT['intezmeny'] as $key => $value) {
+ echo '<input type="hidden" name="'.$key.'" value="'.$value.'" />'."\n";
+ }
+ echo '<input type="hidden" name="naploUrl" value="'.$naploUrl.'" />'."\n";
+
+
+ echo '<h3>'._INTEZMENY_ADATAI.'</h3>';
+ foreach ($ADAT['MEZOK'] as $key => $mAdat) {
+ $value = $ADAT['regAdat']['nodeData'][$key];
+ if (isset($mAdat)) {
+ if ($mAdat['display']!==false) {
+ if ($mAdat['kotelezo']===true) $class = 'kotelezo'; else $class = '';
+ if ($mAdat['readonly']===true) $_ro = ' readonly="readonly" '; else $_ro = '';
+ if (defined('_'.nagybetus($key))) $str = constant('_'.nagybetus($key)); else $str = $key;
+ if ($key == 'publicKey') {
+ echo '<input type="hidden" name="'.$key.'" value="'.$value.'" />'."\n";
+ } else {
+ echo '<div>';
+ echo '<label for="'.$key.'">'.$str.'</label>';
+ if (is_array($mAdat['options'])) {
+ echo '<select name="'.$key.'" id="'.$key.'" class="'.$class.'">';
+ for($i=0; $i<count($mAdat['options']); $i++) {
+ $__jelleg = $mAdat['options'][$i];
+ $_SEL = ($__jelleg==$value) ? ' selected="selected" ' : '';
+ echo '<option value="'.$__jelleg.'"'.$_SEL.'>'.$__jelleg.'</option>';
+ }
+ echo '</select>';
+ } elseif ($mAdat['type']=='textarea') {
+ echo '<textarea style="width:100%;height:40px;" id="'.$key.'" type="text" name="'.$key.'" value="'.$value.'" class="'.$class.'" '.$_ro.'>';
+ echo $value;
+ echo '</textarea>';
+ } else {
+ echo '<input id="'.$key.'" type="text" name="'.$key.'" value="'.$value.'" class="'.$class.'" '.$_ro.'/>';
+ }
+ echo '</div>'."\n";
+ }
+ } else {
+ if ($mAdat['type'] != 'none')
+ echo '<input type="hidden" name="'.$key.'" value="'.$value.'" />'."\n";
+ }
+ }
+ }
+ echo '</div>'."\n";
+
+
+
+
+
+ echo '<input type="submit" value="'._MODOSITAS.'" />'."\n";
+ echo '</div>';
+
+ formEnd();
+ }
+
+
+
+
+
+ function putPublicKey($publicKey) {
+ echo '<h2 style="margin-left: 180px;">Saját publikus kulcs</h2>';
+ echo '<div style="margin-left: 180px; text-align:center">';
+ echo '<textarea style="width:60%; height:200px;">'.$publicKey.'</textarea>';
+ echo '</div>';
+
+ }
+
+ function putSzomszedok($ADAT) {
+
+ $attr = array('OMKod','nev','mayorTipus','naploUrl');
+ $mayorTipus = array(
+ 'fejlesztői' => '<span class="icon-wrench-alt" style="color:orange"></span>',
+ 'fenntartó' => '<span class="icon-compass-alt" style="color:red"></span>',
+ 'intézmény' => '<span class="icon-paper-clip-alt" style="color:cornflowerblue"></span>',
+ 'backup' => '<span class="icon-cog-alt" style="color:#888"></span>',
+ 'boss' => '<span class="icon-star-alt" style="color:lila"></span>'
+ );
+ echo '<h2>MaYoR-partnerek</h2>';
+
+ echo '<table align="center">';
+ echo '<thead>';
+ echo '<tr>';
+ foreach ($attr as $v) {
+ echo '<th>'.$v.'</th>';
+ }
+ echo '</tr>';
+ echo '</thead>';
+ echo '<tbody>';
+ for ($i=0;$i<count($ADAT);$i++) {
+ $_D = $ADAT[$i];
+ echo '<tr>';
+ foreach ($_D as $k=>$v) {
+ if ($k=='publicKey') continue;
+ if ($k=='mayorTipus') echo '<th>'.$mayorTipus[$v].'</th>';
+ if (in_array($k,$attr)) {
+ //echo '<th>'.$k.'</th>';
+ echo '<td>';
+ echo $v;
+ echo '</td>';
+ }
+ }
+ echo '</tr>';
+ }
+ echo '</tbody>';
+ echo '</table>';
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-session/html/createAccount.phtml b/mayor-orig/www/skin/classic/module-session/html/createAccount.phtml
new file mode 100644
index 00000000..a1255ca5
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-session/html/createAccount.phtml
@@ -0,0 +1,107 @@
+<?php
+/*
+ Module: base/session
+*/
+
+ function putCreateAccountForm($toPolicy = _POLICY, $DEFAULTS = array()) {
+
+ global $attrDef, $AUTH, $POLICIES;
+
+ formBegin(array('enctype'=>'multipart/form-data','id'=>'createAccount'));
+
+ echo '<input type="hidden" name="action" value="newUser" />';
+
+ echo '<table class="new" align="center" cellspacing="1">'."\n";
+ echo '<thead>'."\n";
+ echo '<tr>';
+ echo '<th colspan="2">'._CREATE_ACCOUNT.'</th>';
+ echo '</tr>';
+ if (_POLICY=='private') {
+ echo '<tr>';
+ echo '<td colspan="2">';
+ $SEL = array($toPolicy => ' selected="selected" ');
+ echo '<select name="toPolicy" class="onChangeSubmit">'."\n";
+ for ($i = 0; $i < count($POLICIES); $i++) {
+ echo '<option value="'.$POLICIES[$i].'"'.$SEL[$POLICIES[$i]].'>'.$POLICIES[$i].'</option>'."\n";
+ }
+ echo '</select>';
+ echo '</td>'."\n";
+ echo '</tr>';
+ }
+ echo '</thead>'."\n";
+ echo '<tfoot>';
+ echo '<tr>';
+ echo '<th colspan="2">';
+ echo '<input name="new" type="submit" value="'._OK.'" />';
+ echo '<input name="action" type="hidden" value="createAccount" />';
+ echo '</th>';
+ echo '</tr>';
+ echo '</tfoot>'."\n";
+ echo '<tbody>'."\n";
+ echo '<tr>';
+ echo '<th>'.$attrDef['userCn']['desc'].':</th>';
+ echo '<td><input type="text" name="userCn" id="focus" value="'.$DEFAULTS['userCn'].'" /></td>';
+ echo '</tr><tr>';
+ echo '<th>'.$attrDef['userAccount']['desc'].':</th>';
+ echo '<td><input type="text" name="userAccount" value="'.$DEFAULTS['userAccount'].'" /></td>';
+ echo '</tr>';
+
+ $CONTAINERS = $AUTH[$toPolicy][$AUTH[$toPolicy]['backend'].'Containers'];
+ if (isset($CONTAINERS) and is_array($CONTAINERS) and count($CONTAINERS) > 0) {
+ echo '<tr>';
+ echo '<th>'._ACCOUNT_CONTAINER.'</th>';
+ echo '<td>';
+ echo '<select name="container">';
+ echo '<option value=""> - </option>'."\n";
+ for ($i=0;$i<count($CONTAINERS);$i++) {
+ echo '<option value="'.$CONTAINERS[$i].'">'.$CONTAINERS[$i].'</option>';
+ }
+ echo '</select>';
+ echo '</td>';
+ echo '</tr>'."\n";
+ }
+
+ echo '<tr>'."\n";
+ echo '<th>'.$attrDef['userPassword']['desc'].':</th>';
+ echo '<td><input type="password" name="userPassword" value="'.$DEFAULTS['userPassword'].'" /></td>';
+ echo '</tr><tr>'."\n";
+ echo '<th>'._VERIFICATION.':</th>';
+ echo '<td><input type="password" name="verification" value="'.$DEFAULTS['userPassword'].'" /></td>';
+ echo '</tr>'."\n";
+
+ if (isset($AUTH[$toPolicy]['categories']) and is_array($AUTH[$toPolicy]['categories']) and count($AUTH[$toPolicy]['categories']) > 0) {
+ echo '<tr>';
+ echo '<th style="width: 130px;">'._ACCOUNT_CATEGORY.'</th>';
+ echo '<td style="width: 270px;">';
+ echo '<select name="category">';
+ echo '<option value=""> - </option>'."\n";
+ for ($i=0;$i<count($AUTH[$toPolicy]['categories']);$i++) {
+ echo '<option value="'.$AUTH[$toPolicy]['categories'][$i].'">'.$AUTH[$toPolicy]['categories'][$i].'</option>';
+ }
+ echo '</select>';
+ echo '</td>';
+ echo '</tr>'."\n";
+ }
+
+ if (is_array($AUTH[$toPolicy]['accountAttrs'])) foreach ($AUTH[$toPolicy]['accountAttrs'] as $key => $attr) {
+ echo '<tr>';
+ echo '<th>'.$attrDef[$attr]['desc'].':</th>';
+ echo '<td><input type="text" name="'.$attr.'" value="'.$DEFAULTS[$attr].'" /></td>';
+ echo '</tr>'."\n";
+ }
+
+ if (_POLICY=='private') {
+ echo '<tr>';
+ echo '<th>'._DATAFILE.':</th>';
+ echo '<td><input type="file" name="file" /></td>';
+ echo '</tr>';
+ }
+
+ echo '</tbody>';
+ echo '</table>';
+ formEnd();
+
+ }
+
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-session/html/createGroup.phtml b/mayor-orig/www/skin/classic/module-session/html/createGroup.phtml
new file mode 100644
index 00000000..b50c52f9
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-session/html/createGroup.phtml
@@ -0,0 +1,90 @@
+<?php
+/*
+ Module: base/session
+*/
+
+ function putCreateGroupForm($toPolicy = _POLICY) {
+
+ global $attrDef, $AUTH, $POLICIES;
+
+ formBegin(array('enctype'=>'multipart/form-data'));
+ echo '<input type="hidden" name="action" value="newUser" />';
+
+ echo '<table class="new" align="center" cellspacing="1">';
+ echo '<thead>';
+ echo '<tr>';
+ echo '<th colspan="2">'._CREATE_GROUP.'</th>';
+ echo '</tr>';
+ echo '<tr>';
+ echo '<td colspan="2">';
+ $SEL = array($toPolicy => ' selected="selected" ');
+ echo '<select name="toPolicy" class="onChangeSubmit">'."\n";
+ for ($i = 0; $i < count($POLICIES); $i++) {
+ echo '<option value="'.$POLICIES[$i].'"'.$SEL[$POLICIES[$i]].'>'.$POLICIES[$i].'</option>'."\n";
+ }
+ echo '</select>';
+ echo '</td>'."\n";
+ echo '</tr>'."\n";
+ echo '</thead>';
+ echo '<tfoot>';
+ echo '<tr>';
+ echo '<th colspan="2">';
+ echo '<input name="new" type="submit" value="'._OK.'" />';
+ echo '<input name="action" type="hidden" value="createGroup" />';
+ echo '</th>';
+ echo '</tr>';
+ echo '</tfoot>';
+ echo '<tbody>';
+ echo '<tr>';
+ echo '<th>'.$attrDef['groupCn']['desc'].':</th>';
+ echo '<td><input type="text" name="groupCn" value="" id="focus" /></td>';
+ echo '</tr>';
+ $CONTAINERS = $AUTH[$toPolicy][$AUTH[$toPolicy]['backend'].'Containers'];
+ if (isset($CONTAINERS) and is_array($CONTAINERS) and count($CONTAINERS) > 0) {
+ echo '<tr>';
+ echo '<th>'._GROUP_CONTAINER.':</th>';
+ echo '<td>';
+ echo '<select name="container">';
+ echo '<option value=""> - </option>'."\n";
+ for ($i=0;$i<count($CONTAINERS);$i++) {
+ echo '<option value="'.$CONTAINERS[$i].'">'.$CONTAINERS[$i].'</option>'."\n";
+ }
+ echo '</select>';
+ echo '</td>';
+ echo '</tr>'."\n";
+ }
+
+ echo '<tr>';
+ echo '<th>'.$attrDef['groupDesc']['desc'].':</th>';
+ echo '<td><input type="text" name="groupDesc" value="" /></td>';
+ echo '</tr><tr>';
+ echo '<th style="width: 130px;">'._GROUP_CATEGORY.'</th>';
+ echo '<td style="width: 270px;">';
+ echo '<select name="category">';
+ echo '<option value=""> - </option>'."\n";
+ for ($i=0;$i<count($AUTH[_POLICY]['categories']);$i++) {
+ echo '<option value="'.$AUTH[_POLICY]['categories'][$i].'">'.$AUTH[_POLICY]['categories'][$i].'</option>';
+ }
+ echo '</select>';
+ echo '</td>';
+ echo '</tr>';
+
+ if (is_array($AUTH[$toPolicy]['groupAttrs'])) foreach ($AUTH[$toPolicy]['groupAttrs'] as $key => $attr) {
+ echo '<tr>';
+ echo '<th>'.$attrDef[$attr]['desc'].':</th>';
+ echo '<td><input type="text" name="'.$attr.'" value="'.$DEFAULTS[$attr].'" /></td>';
+ echo '</tr>'."\n";
+ }
+
+/* echo '<tr>';
+ echo '<th>'._DATAFILE.':</th>';
+ echo '<td><input type="file" name="file" /></td>';
+ echo '</tr>';
+*/ echo '</tbody>';
+ echo '</table>';
+ formEnd();
+
+ }
+
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-session/html/download.phtml b/mayor-orig/www/skin/classic/module-session/html/download.phtml
new file mode 100644
index 00000000..79f74f8e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-session/html/download.phtml
@@ -0,0 +1,32 @@
+<?php
+
+ function putDownloadForm($ADAT) {
+
+ echo '<div class="download">'."\n";
+ echo '<h1>'._DOWNLOAD.'</h1>'."\n";
+
+ $href = href('index.php?page=session&f=download&dir='.$ADAT['dir'].'&file='.$ADAT['file'].'&download=true');
+ echo '<table>'."\n";
+ echo '<tr>';
+ echo '<th>'._FILE.'</th>'."\n";
+ echo '<td>';
+ echo '<a id="loadUrl" href="'.$href.'">';
+ echo substr($ADAT['path'],strlen(_DOWNLOADDIR.'/'._POLICY.'/'));
+ echo '</a>';
+ echo '</td>'."\n";
+ echo '</tr>';
+ echo '<tr>';
+ echo '<th>'._SIZE.'</th>'."\n";
+ echo '<td>'.$ADAT['size'].' byte</td>'."\n";
+ echo '</tr>';
+ echo '<tr>';
+ echo '<th>'._MIMETYPE.'</th>'."\n";
+ echo '<td>'.$ADAT['mime'].'</td>'."\n";
+ echo '</tr>';
+ echo '</table>';
+
+ echo '<p>'._DESCRIPTION.'</p>';
+ echo '</div>'."\n";
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-session/html/facebookConnect.phtml b/mayor-orig/www/skin/classic/module-session/html/facebookConnect.phtml
new file mode 100644
index 00000000..0e9f3aad
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-session/html/facebookConnect.phtml
@@ -0,0 +1,53 @@
+<?php
+
+function putFacebookConnectStatusz($ADAT) {
+
+ if (__FBCONNECT_ENABLED==false) {
+ echo '<div id="fbConnect" class="notActive"><span class="icon-remove-circle"></span>';
+ echo 'A Facebook azonosítás ki van kapcsolva. Kérj segítséget a rendszerüzemeltetőtől!';
+ echo '</div>';
+ return false;
+ }
+
+// var_dump($ADAT);
+// var_dump(_USERACCOUNT);
+// var_dump(_POLICY);
+
+ // fbUserIdStatusz = ready, associated, already_associated
+ if ($ADAT['fbUserIdStatusz'] == 1) {
+ echo '<div id="fbConnect" class="valid"><span class="icon-ok-circle"></span>';
+ echo '<img src="//graph.facebook.com/'.$ADAT['fbUserId'].'/picture?type=large" style="float:left; height:100%">';
+
+ echo 'Már kész, minden rendben!';
+ formBegin();
+ echo '<input type="hidden" name="action" value="revokeFbAuth" />';
+ echo '<input type="submit" value="visszavonás" />';
+ formEnd();
+ echo '</div>';
+ } elseif ($ADAT['fbUserIdStatusz'] == 2) {
+ echo '<div id="fbConnect" class="notvalid"><span class="icon-iphone-home"></span>';
+ echo 'Már más facebook userhez van hozzárendelve az azonosítód!';
+ echo '<input type="hidden" name="action" value="" />';
+ echo '</div>';
+ } elseif ($ADAT['fbUserIdStatusz'] == 3) {
+ echo '<div id="fbConnect" class="notvalid"><span class="icon-iphone-home"></span>';
+ echo 'Ehhez a facebook azonosítóhoz már hozzá van rendelve egy másik MaYoR account!';
+ echo '</div>';
+ } else {
+ echo '<div id="fbConnect" class="grant"><span class="icon-facebook"></span>';
+ echo 'Engedélyezed?';
+ echo '<span id="mglFBconnect"></span>';
+ formBegin(array('id'=>'grantFbAuth'));
+ echo '<input type="hidden" name="action" value="grantFbAuth" />';
+ echo '<input type="submit" value="facebook connect engedélyezés" />';
+ formEnd();
+ echo '</div>';
+ }
+ formBegin(array('style'=>'text-align:center'));
+ echo '<input type="hidden" name="action" value="refresh" />';
+ echo '<input type="submit" value="frissítés" />';
+ formEnd();
+
+}
+
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-session/html/googleapi.phtml b/mayor-orig/www/skin/classic/module-session/html/googleapi.phtml
new file mode 100644
index 00000000..4d1109bc
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-session/html/googleapi.phtml
@@ -0,0 +1,45 @@
+<?php
+
+function putGoogleapiStatusz($ADAT) {
+
+// var_dump($ADAT);
+// var_dump(_USERACCOUNT);
+// var_dump(_POLICY);
+
+ if (__GOOGLEAPI_ENABLED==false) {
+ echo '<div id="googleapi" class="notActive"><span class="icon-remove-circle"></span>';
+ echo 'A Google azonosítás ki van kapcsolva. Kérj segítséget a rendszerüzemeltetőtől!';
+ echo '</div>';
+ return false;
+ }
+
+
+ if ($ADAT['googleapiStatusz'] == 1) {
+ echo '<div id="googleapi" class="valid"><span class="icon-ok-circle"></span>';
+ echo '<img src="'.$ADAT['payload']['picture'].'" style = "float:left; height:100%;" />';
+ echo 'Összekötve';
+ formBegin();
+ echo '<input type="hidden" name="action" value="googleapiRevoke" />';
+ echo '<input type="submit" value="visszavonás" />';
+ formEnd();
+ echo '</div>';
+ } else {
+ echo '<div id="googleapi" class="grant"><span class="icon-googleplus"></span>';
+ echo 'Engedélyezed?';
+ formBegin();
+ echo '<input type="hidden" name="action" value="googleGrant" >';
+ echo '<button type="button" id="googleLoginBtn" class="api"><span class="icon-googleplus"></span> Összeköt</button>';
+ formEnd();
+ echo '</div>';
+ }
+
+
+
+ formBegin(array('style'=>'text-align:center'));
+ echo '<input type="hidden" name="action" value="refresh" />';
+ echo '<input type="submit" value="frissítés" />';
+ formEnd();
+
+}
+
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-session/html/groupInfo.phtml b/mayor-orig/www/skin/classic/module-session/html/groupInfo.phtml
new file mode 100644
index 00000000..32a3c661
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-session/html/groupInfo.phtml
@@ -0,0 +1,5 @@
+<?php
+
+ require('skin/classic/module-session/html/accountInfo.phtml');
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-session/html/search/searchAccount.phtml b/mayor-orig/www/skin/classic/module-session/html/search/searchAccount.phtml
new file mode 100644
index 00000000..4cead225
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-session/html/search/searchAccount.phtml
@@ -0,0 +1,126 @@
+<?php
+/*
+ Module: base/session
+*/
+
+ function putSearchAccountForm($attr, $pattern, $searchAttrList) {
+
+ global $attrDef, $AUTH;
+
+ formBegin(array('class'=>'usersearch'));
+
+ echo '<input type="hidden" name="action" value="searchAccount" />';
+ echo '<table class="search" align="center" cellspacing="1">';
+ echo '<thead>';
+ echo '<tr><th colspan="3">'._SEARCH.'</th></tr>';
+ echo '</thead>';
+ echo '<tfoot><tr><td colspan="3"></td></tr></tfoot>';
+
+ echo '<tbody><tr>';
+ echo '<th style="width: 150px;">';
+ echo '<select name="attr">';
+ for ($i=0;$i<count($searchAttrList);$i++) {
+ if ($attr == $searchAttrList[$i]) {
+ echo '<option value="'.$searchAttrList[$i].'" selected="true">'.$attrDef[$searchAttrList[$i]]['desc'].'</option>';
+ } else {
+ echo '<option value="'.$searchAttrList[$i].'">'.$attrDef[$searchAttrList[$i]]['desc'].'</option>';
+ }
+ }
+ echo '</select>:</th>';
+ echo '<td>';
+ echo '<input type="text" name="pattern" value="'.$pattern.'" id="focus" />';
+ if (_POLICY == 'private' && __ADMIN) {
+ global $POLICIES;
+ $SEL = array($toPolicy => ' selected="selected" ');
+ echo '<select name="toPolicy">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ for ($i = 0; $i < count($POLICIES); $i++) {
+ echo '<option value="'.$POLICIES[$i].'"'.$SEL[$POLICIES[$i]].'>'.$POLICIES[$i].'</option>'."\n";
+ }
+ echo '</select>'."\n";
+ }
+ echo '</td>';
+ echo '<td style="width: 50px;">';
+ echo '<input type="submit" value="'._OK.'" />';
+ echo '</td>';
+ echo '</tr></tbody>';
+ echo '</table>';
+
+ formEnd();
+
+ }
+
+ function putSearchResultBox($searchResult, $toPolicy) {
+
+ global $AUTH;
+
+ $count = $searchResult['count'];
+ echo '<table class="searchresult" align="center" cellspacing="1">';
+ echo '<thead>';
+ if ($toPolicy != _POLICY) echo '<tr><th colspan="4" class="policy">'.$toPolicy.'</th></tr>'."\n";
+ echo '<tr>';
+ echo '<th>'._ATTR_USERCN.'</th>';
+ echo '<th>'._CATEGORY.'</th>';
+ echo '<th>'._ATTR_MAIL.'</th>';
+ echo '<th>'._ACTION.'</th>';
+ echo '</tr>';
+ echo '</thead><tfoot><tr><th colspan="4"></th></tr></tfoot>';
+ echo '<tbody>';
+ if ($count == 0) {
+ echo '<tr><td colspan="5">'._NOTFOUND.'</td></tr>';
+ } else {
+ for ($i = 0; $i < $count; $i++) {
+ if ($i % 2 ==1) {
+ $class = 'paratlan';
+ } else {
+ $class = 'paros';
+ }
+ echo "\n".'<tr class="'.$class.'">';
+ echo '<td>';
+ if (__ADMIN)
+ echo '<a href="'.href('index.php?page=session&f=accountInfo&userAccount='.$searchResult[$i]['userAccount'][0].'&toPolicy='.$toPolicy)
+ . '" title="'.$searchResult[$i]['userAccount'][0].'">'.$searchResult[$i]['userCn'][0].'</a>';
+ else
+ echo $searchResult[$i]['userCn'][0];
+ echo '</td>';
+ echo '<td>';
+ for ($j=0; $j < $searchResult[$i]['category']['count']; $j++) {
+ echo $searchResult[$i]['category'][$j].' ';
+ }
+ echo '</td>';
+ echo '<td>';
+ for ($j = 0; $j < $searchResult[$i]['mail']['count']; $j++) {
+ echo '<a href="mailto:'.$searchResult[$i]['mail'][$j].'">'.$searchResult[$i]['mail'][$j].'</a><br />';
+ }
+ echo '</td>';
+ echo '<td>';
+ if (__ADMIN) {
+ formBegin(array('name'=>'f'.$i));
+ echo '<input type="hidden" name="action" value="deleteAccount" />';
+ echo '<input type="hidden" name="userAccount" value="'.$searchResult[$i]['userAccount'][0].'" />';
+ echo '<input type="hidden" name="toPolicy" value="'.$toPolicy.'" />';
+ echo '<input type="submit" value="'._DELETE.'" title="'._ARE_YOU_SURE.' ('.$searchResult[$i]['userAccount'][0].')'.'" class="confirm" />';
+ formEnd();
+ }
+ if (
+ __ADMIN or
+ (in_array('diák',$searchResult[$i]['category']) and __DIAKADMIN)
+ ) {
+ formBegin(array('name'=>'f'.$i, 'action'=>href('index.php?page=password&f=changePassword')));
+ echo '<input type="hidden" name="noModify" value="1" />';
+ echo '<input type="hidden" name="userAccount" value="'.$searchResult[$i]['userAccount'][0].'" />';
+ echo '<input type="hidden" name="toPolicy" value="'.$toPolicy.'" />';
+ echo '<input type="submit" value="'._CHANGE_PASSWORD.'" title="'._CHANGE_PASSWORD.'" />';
+ formEnd();
+ }
+
+ echo '</td>';
+ echo '</tr>';
+ }
+ }
+ echo '</tbody>';
+ echo '</table>';
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-session/html/search/searchGroup.phtml b/mayor-orig/www/skin/classic/module-session/html/search/searchGroup.phtml
new file mode 100644
index 00000000..824a6627
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-session/html/search/searchGroup.phtml
@@ -0,0 +1,103 @@
+<?php
+/*
+ Module: base/session
+*/
+
+ function putSearchGroupForm($attr, $pattern, $searchAttrList, $toPolicy) {
+
+ global $attrDef;
+
+ formBegin(array('class'=>'search'));
+ echo '<input type="hidden" name="action" value="searchGroup" />';
+ echo '<table class="search" align="center" cellspacing="1">';
+ echo '<thead>';
+ echo '<tr><th colspan="3">'._SEARCH.'</th></tr>';
+ echo '</thead>';
+ echo '<tfoot><tr><td colspan="3"></td></tr></tfoot>';
+
+ echo '<tbody><tr>';
+ echo '<th style="width: 180px;">';
+ echo '<select name="attr">';
+ for ($i=0;$i<count($searchAttrList);$i++) {
+ if ($attr == $searchAttrList[$i]) {
+ echo '<option value="'.$searchAttrList[$i].'" selected="true">'.$attrDef[$searchAttrList[$i]]['desc'].'</option>';
+ } else {
+ echo '<option value="'.$searchAttrList[$i].'">'.$attrDef[$searchAttrList[$i]]['desc'].'</option>';
+ }
+ }
+ echo '</select>:</th>';
+ echo '<td>';
+ echo '<input type="text" name="pattern" value="'.$pattern.'" id="focus" />';
+ if (_POLICY == 'private' && __ADMIN) {
+ global $POLICIES;
+ $SEL = array($toPolicy => ' selected="selected" ');
+ echo '<select name="toPolicy">'."\n";
+ echo '<option value=""> - </option>'."\n";
+ for ($i = 0; $i < count($POLICIES); $i++) {
+ echo '<option value="'.$POLICIES[$i].'"'.$SEL[$POLICIES[$i]].'>'.$POLICIES[$i].'</option>'."\n";
+ }
+ echo '</select>'."\n";
+ }
+ echo '</td>';
+ echo '<td style="width: 50px;">';
+ echo '<input type="submit" value="'._OK.'" />';
+ echo '</td>';
+ echo '</tr></tbody>';
+ echo '</table>';
+ //echo '</form>';
+ formEnd();
+
+ }
+
+ function putSearchResultBox($searchResult, $toPolicy) {
+
+ global $AUTH;
+
+ $count = $searchResult['count'];
+ echo '<table class="searchresult" align="center" cellspacing="1">';
+ echo '<thead>';
+ echo '<tr>';
+ echo '<th>'._ATTR_GROUPCN.'</th>';
+ echo '<th>'._ATTR_GROUPDESC.'</th>';
+ echo '<th>'._ACTION.'</th>';
+ echo '</tr>';
+ echo '</thead><tfoot><tr><th colspan="4"></th></tr></tfoot>';
+ echo '<tbody>';
+ if ($count == 0) {
+ echo '<tr><td colspan="5">'._NOTFOUND.'</td></tr>';
+ } else {
+ for ($i=0;$i<$count;$i++) {
+ if ($i % 2 ==1) {
+ $class = 'paratlan';
+ } else {
+ $class = 'paros';
+ }
+ echo "\n".'<tr class="'.$class.'">';
+ echo '<td>';
+ if (__ADMIN)
+ echo '<a href="'.href('index.php?page=session&f=groupInfo&groupCn='.$searchResult[$i]['groupCn'][0]).'&toPolicy='.$toPolicy.'">'.$searchResult[$i]['groupCn'][0].'</a>';
+ else
+ echo $searchResult[$i]['groupCn'][0];
+ echo '</td>';
+ echo '<td>';
+ echo $searchResult[$i]['groupDesc'][0];
+ echo '</td>';
+ echo '<td>';
+ if (__ADMIN) {
+ formBegin(array('name'=>'f'.$i, action=>href('index.php?page=session&sub=search&f=searchGroup') ));
+ echo '<input type="hidden" name="action" value="deleteGroup" />';
+ echo '<input type="hidden" name="toPolicy" value="'.$toPolicy.'" />';
+ echo '<input type="hidden" name="groupCn" value="'.$searchResult[$i]['groupCn'][0].'" />';
+ echo '<input type="submit" value="'._DELETE.'" title="'._ARE_YOU_SURE.'" class="confirm" />';
+ formEnd();
+ }
+ echo '</td>';
+ echo '</tr>';
+ }
+ }
+ echo '</tbody>';
+ echo '</table>';
+
+ }
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-session/html/sessionAdmin.phtml b/mayor-orig/www/skin/classic/module-session/html/sessionAdmin.phtml
new file mode 100644
index 00000000..bfb1cc1e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-session/html/sessionAdmin.phtml
@@ -0,0 +1,57 @@
+<?php
+
+ function putSessionList($ADAT) {
+
+ echo '<table class="lista">'."\n";
+
+ echo '<thead>'."\n";
+ echo '<tr>';
+ echo '<th colspan="2">'._ACCOUNT.'</th>';
+ echo '<th>'._CN.'</th>';
+ echo '<th>'._POLICI.'</th>';
+ echo '<th>'._LOGINDT.'</th>';
+ echo '<th>'._ACTIVITY.'</th>';
+ echo '<th>'._IP.'</th>';
+ echo '<th>'._SESSION.'</th>';
+ echo '</tr>'."\n";
+ echo '</thead>'."\n";
+ echo '<tfoot>'."\n";
+ echo '<tr>';
+ echo '<th colspan="2">'._ACCOUNT.'</th>';
+ echo '<th>'._CN.'</th>';
+ echo '<th>'._POLICI.'</th>';
+ echo '<th>'._LOGINDT.'</th>';
+ echo '<th>'._ACTIVITY.'</th>';
+ echo '<th>'._IP.'</th>';
+ echo '<th>'._SESSION.'</th>';
+ echo '</tr>'."\n";
+ echo '</tfoot>'."\n";
+ echo '<tbody>'."\n";
+ foreach ($ADAT['session'] as $sAdat) {
+ echo '<tr>';
+ echo '<th>';
+//var_dump($sAdat);
+ formBegin();
+ echo '<input type="hidden" name="action" value="deleteSession" />'."\n";
+ echo '<input type="hidden" name="delSessionID" value="'.$sAdat['sessionID'].'" />'."\n";
+ echo '<input type="hidden" name="delPolicy" value="'.$sAdat['policy'].'" />'."\n";
+ echo '<input type="submit" class="confirm" title="'._BIZTOS_TOROL.'" name="del" value="'._DELETE.'" />'."\n";
+ formEnd();
+ echo '</th>';
+ echo '<th>'.$sAdat['userAccount'].'</th>';
+ echo '<td>'.$sAdat['userCn'].'</td>';
+ echo '<td>'.$sAdat['policy'].'</td>';
+ echo '<td>'.$sAdat['dt'].'</td>';
+ echo '<td>'.$sAdat['activity'].'</td>';
+ echo '<td>'.$sAdat['ip'].'</td>';
+ echo '<td>'.$sAdat['sessionID'].'</td>';
+ echo '</tr>'."\n";
+ }
+ echo '</tbody>'."\n";
+
+ echo '</table>'."\n";
+
+ }
+
+
+?>
diff --git a/mayor-orig/www/skin/classic/module-session/img/download.gif b/mayor-orig/www/skin/classic/module-session/img/download.gif
new file mode 100644
index 00000000..818700f2
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-session/img/download.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/module-session/javascript/createAccount.jquery.min.js b/mayor-orig/www/skin/classic/module-session/javascript/createAccount.jquery.min.js
new file mode 100644
index 00000000..1fa17a9c
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-session/javascript/createAccount.jquery.min.js
@@ -0,0 +1,13 @@
+$(document).ready(function() {
+ $('#createAccount input[type=submit]').attr("disabled", "disabled");
+ $('#createAccount').change(function(){
+ $('input').removeClass('hiba');
+ if ($('#createAccount input[name="userCn"]').val() == "") $('#createAccount input[name="userCn"]').addClass('hiba');
+ if ($('#createAccount input[name="userAccount"]').val() == "") $('#createAccount input[name="userAccount"]').addClass('hiba');
+ if ($('#createAccount input[name="userPassword"]').val() != $('#createAccount input[name="verification"]').val()) $('#createAccount input[name="verification"]').addClass('hiba');
+// ideiglegenes bekapcsolva
+ if ($('#createAccount input[name="mail"]').val() == "") $('#createAccount input[name="mail"]').addClass('hiba');
+ if ($('#createAccount input.hiba').length == 0)
+ $('#createAccount input[type=submit]').removeAttr("disabled");
+ });
+}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-session/javascript/facebookConnect.jquery.min.js b/mayor-orig/www/skin/classic/module-session/javascript/facebookConnect.jquery.min.js
new file mode 100644
index 00000000..94010747
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-session/javascript/facebookConnect.jquery.min.js
@@ -0,0 +1,31 @@
+$(document).ready(function() {
+ $('#grantFbAuth').submit(function() { // facebook
+ FB.getLoginStatus(function(response) {
+ if (response.status === 'connected') {
+ mayor_facebookconnect_redirect();
+ } else if (response.status === 'not_authorized') {
+ FB.login(function(loginResponse) {
+ if (loginResponse.status=='connected') {
+ mayor_facebookconnect_redirect();
+ }
+ });
+ } else {
+ FB.login(function(loginResponse) {
+ if (loginResponse.status=='connected') {
+ mayor_facebookconnect_redirect();
+ }
+ });
+ }
+ },true);
+ return false;
+ });
+
+ var mayor_facebookconnect_redirect = function() {
+ var origUrl = $(location).attr('href');
+ var pos = origUrl.indexOf("?");
+ if (pos != -1) url = origUrl+'&action=grantFbAuth';
+ else url = origUrl+'?action=grantFbAuth';
+ window.location = url;
+ }
+
+}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/module-session/javascript/googleapi.jquery.min.js b/mayor-orig/www/skin/classic/module-session/javascript/googleapi.jquery.min.js
new file mode 100644
index 00000000..3c54f109
--- /dev/null
+++ b/mayor-orig/www/skin/classic/module-session/javascript/googleapi.jquery.min.js
@@ -0,0 +1,30 @@
+$(document).ready(function() {
+ if (typeof(GOOGLEAPI_CLIENT_ID)!=='undefined' && GOOGLEAPI_CLIENT_ID!='') {
+ gapi.load('auth2', function(){
+ auth2 = gapi.auth2.init({
+ client_id: GOOGLEAPI_CLIENT_ID,
+ cookiepolicy: 'single_host_origin',
+ });
+ googleapiCheck(document.getElementById('googleapiCheckBtn'));
+ googleapiCheck(document.getElementById('googleapiGrantBtn'));
+ googleapiCheck(document.getElementById('googleapiRevokeBtn'));
+ });
+
+ function googleapiCheck(element) {
+ auth2.attachClickHandler(element, {},
+ function(googleUser) {
+ // console.log(googleUser.getBasicProfile());
+ var id_token = googleUser.getAuthResponse().id_token;
+ var origUrl = $(location).attr('href');
+ var pos = origUrl.indexOf("?");
+ if (pos != -1) url = origUrl+'&id_token='+id_token;
+ else url = origUrl+'?id_token='+id_token;
+ if (element.id == 'googleapiGrantBtn') url += '&action=googleapiGrant';
+ if (element.id == 'googleapiRevokeBtn') url += '&action=googleapiRevoke';
+ window.location = url;
+ }, function(error) {
+ // alert(JSON.stringify(error, undefined, 2));
+ });
+ }
+ }
+});
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/aac.png b/mayor-orig/www/skin/classic/share/img/filetypes/aac.png
new file mode 100644
index 00000000..47887157
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/aac.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/ai.png b/mayor-orig/www/skin/classic/share/img/filetypes/ai.png
new file mode 100644
index 00000000..9fe69635
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/ai.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/aiff.png b/mayor-orig/www/skin/classic/share/img/filetypes/aiff.png
new file mode 100644
index 00000000..b55326bc
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/aiff.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/avi.png b/mayor-orig/www/skin/classic/share/img/filetypes/avi.png
new file mode 100644
index 00000000..a7c57c4d
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/avi.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/bmp.png b/mayor-orig/www/skin/classic/share/img/filetypes/bmp.png
new file mode 100644
index 00000000..63f18177
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/bmp.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/c.png b/mayor-orig/www/skin/classic/share/img/filetypes/c.png
new file mode 100644
index 00000000..5171293c
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/c.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/css.png b/mayor-orig/www/skin/classic/share/img/filetypes/css.png
new file mode 100644
index 00000000..05c112b3
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/css.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/dat.png b/mayor-orig/www/skin/classic/share/img/filetypes/dat.png
new file mode 100644
index 00000000..f803fca8
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/dat.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/dmg.png b/mayor-orig/www/skin/classic/share/img/filetypes/dmg.png
new file mode 100644
index 00000000..5f67ec90
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/dmg.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/doc.png b/mayor-orig/www/skin/classic/share/img/filetypes/doc.png
new file mode 100644
index 00000000..a42f3914
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/doc.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/dotx.png b/mayor-orig/www/skin/classic/share/img/filetypes/dotx.png
new file mode 100644
index 00000000..b067bfaf
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/dotx.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/dwg.png b/mayor-orig/www/skin/classic/share/img/filetypes/dwg.png
new file mode 100644
index 00000000..698eb4c6
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/dwg.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/dxf.png b/mayor-orig/www/skin/classic/share/img/filetypes/dxf.png
new file mode 100644
index 00000000..ca30be92
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/dxf.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/eps.png b/mayor-orig/www/skin/classic/share/img/filetypes/eps.png
new file mode 100644
index 00000000..649a9d9a
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/eps.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/exe.png b/mayor-orig/www/skin/classic/share/img/filetypes/exe.png
new file mode 100644
index 00000000..ddfa770b
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/exe.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/flv.png b/mayor-orig/www/skin/classic/share/img/filetypes/flv.png
new file mode 100644
index 00000000..a02bcd9b
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/flv.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/gif.png b/mayor-orig/www/skin/classic/share/img/filetypes/gif.png
new file mode 100644
index 00000000..2b84c9dc
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/gif.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/h.png b/mayor-orig/www/skin/classic/share/img/filetypes/h.png
new file mode 100644
index 00000000..f2bcdbf9
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/h.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/hpp.png b/mayor-orig/www/skin/classic/share/img/filetypes/hpp.png
new file mode 100644
index 00000000..f725fc80
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/hpp.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/html.png b/mayor-orig/www/skin/classic/share/img/filetypes/html.png
new file mode 100644
index 00000000..a1f66927
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/html.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/ics.png b/mayor-orig/www/skin/classic/share/img/filetypes/ics.png
new file mode 100644
index 00000000..04d149a7
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/ics.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/iso.png b/mayor-orig/www/skin/classic/share/img/filetypes/iso.png
new file mode 100644
index 00000000..4daccd2e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/iso.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/java.png b/mayor-orig/www/skin/classic/share/img/filetypes/java.png
new file mode 100644
index 00000000..423bdebe
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/java.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/jpg.png b/mayor-orig/www/skin/classic/share/img/filetypes/jpg.png
new file mode 100644
index 00000000..0e7ace35
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/jpg.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/key.png b/mayor-orig/www/skin/classic/share/img/filetypes/key.png
new file mode 100644
index 00000000..8fd2e797
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/key.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/mid.png b/mayor-orig/www/skin/classic/share/img/filetypes/mid.png
new file mode 100644
index 00000000..542b9d0d
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/mid.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/mp3.png b/mayor-orig/www/skin/classic/share/img/filetypes/mp3.png
new file mode 100644
index 00000000..bcc30dfe
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/mp3.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/mp4.png b/mayor-orig/www/skin/classic/share/img/filetypes/mp4.png
new file mode 100644
index 00000000..9c96f2b3
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/mp4.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/mpg.png b/mayor-orig/www/skin/classic/share/img/filetypes/mpg.png
new file mode 100644
index 00000000..dfd65968
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/mpg.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/odf.png b/mayor-orig/www/skin/classic/share/img/filetypes/odf.png
new file mode 100644
index 00000000..8ac8ee4b
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/odf.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/odt.png b/mayor-orig/www/skin/classic/share/img/filetypes/odt.png
new file mode 100644
index 00000000..585120af
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/odt.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/otp.png b/mayor-orig/www/skin/classic/share/img/filetypes/otp.png
new file mode 100644
index 00000000..79f2da0d
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/otp.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/ots.png b/mayor-orig/www/skin/classic/share/img/filetypes/ots.png
new file mode 100644
index 00000000..192b7920
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/ots.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/ott.png b/mayor-orig/www/skin/classic/share/img/filetypes/ott.png
new file mode 100644
index 00000000..cc6aaeb7
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/ott.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/pdf.png b/mayor-orig/www/skin/classic/share/img/filetypes/pdf.png
new file mode 100644
index 00000000..b2efd2cc
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/pdf.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/php.png b/mayor-orig/www/skin/classic/share/img/filetypes/php.png
new file mode 100644
index 00000000..20677a7b
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/php.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/png.png b/mayor-orig/www/skin/classic/share/img/filetypes/png.png
new file mode 100644
index 00000000..b698be69
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/png.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/ppt.png b/mayor-orig/www/skin/classic/share/img/filetypes/ppt.png
new file mode 100644
index 00000000..39601ae9
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/ppt.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/psd.png b/mayor-orig/www/skin/classic/share/img/filetypes/psd.png
new file mode 100644
index 00000000..fb347ca7
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/psd.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/py.png b/mayor-orig/www/skin/classic/share/img/filetypes/py.png
new file mode 100644
index 00000000..79dbbaff
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/py.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/qt.png b/mayor-orig/www/skin/classic/share/img/filetypes/qt.png
new file mode 100644
index 00000000..cd9a08f4
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/qt.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/rar.png b/mayor-orig/www/skin/classic/share/img/filetypes/rar.png
new file mode 100644
index 00000000..723f7198
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/rar.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/rb.png b/mayor-orig/www/skin/classic/share/img/filetypes/rb.png
new file mode 100644
index 00000000..33a8f23f
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/rb.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/rtf.png b/mayor-orig/www/skin/classic/share/img/filetypes/rtf.png
new file mode 100644
index 00000000..552cddbb
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/rtf.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/sql.png b/mayor-orig/www/skin/classic/share/img/filetypes/sql.png
new file mode 100644
index 00000000..3546e705
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/sql.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/tga.png b/mayor-orig/www/skin/classic/share/img/filetypes/tga.png
new file mode 100644
index 00000000..544d1469
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/tga.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/tgz.png b/mayor-orig/www/skin/classic/share/img/filetypes/tgz.png
new file mode 100644
index 00000000..b25f50de
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/tgz.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/tiff.png b/mayor-orig/www/skin/classic/share/img/filetypes/tiff.png
new file mode 100644
index 00000000..4ea16f79
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/tiff.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/txt.png b/mayor-orig/www/skin/classic/share/img/filetypes/txt.png
new file mode 100644
index 00000000..62527117
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/txt.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/wav.png b/mayor-orig/www/skin/classic/share/img/filetypes/wav.png
new file mode 100644
index 00000000..80287a9b
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/wav.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/xls.png b/mayor-orig/www/skin/classic/share/img/filetypes/xls.png
new file mode 100644
index 00000000..997a0ff1
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/xls.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/xlsx.png b/mayor-orig/www/skin/classic/share/img/filetypes/xlsx.png
new file mode 100644
index 00000000..350252f7
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/xlsx.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/xml.png b/mayor-orig/www/skin/classic/share/img/filetypes/xml.png
new file mode 100644
index 00000000..a2a9a84c
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/xml.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/yml.png b/mayor-orig/www/skin/classic/share/img/filetypes/yml.png
new file mode 100644
index 00000000..758ea706
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/yml.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/img/filetypes/zip.png b/mayor-orig/www/skin/classic/share/img/filetypes/zip.png
new file mode 100644
index 00000000..15850ff1
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/img/filetypes/zip.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/MIT-LICENSE b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/MIT-LICENSE
new file mode 100644
index 00000000..d4f8dbdc
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/MIT-LICENSE
@@ -0,0 +1,20 @@
+All portions Copyright (c) 2007 Tim Harper
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/README b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/README
new file mode 100644
index 00000000..4e3e4a58
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/README
@@ -0,0 +1,10 @@
+::CalendarDateSelect::
+Author: Tim Harper ( 'tim_see_harperATgmail._see_om'.gsub('_see_', 'c').gsub('AT', '@') )
+
+::Examples::
+see demo here -- http://restatesman.com/static/calendar
+
+::Project Site::
+http://code.google.com/p/calendardateselect/
+
+It works! \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/blank_iframe.html b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/blank_iframe.html
new file mode 100644
index 00000000..a4296bbb
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/blank_iframe.html
@@ -0,0 +1,2 @@
+<!-- Nothing here -->
+<html><head></head><body></body></html> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/images/calendar_date_select/calendar.gif b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/images/calendar_date_select/calendar.gif
new file mode 100644
index 00000000..6b7b7ca9
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/images/calendar_date_select/calendar.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/calendar_date_select.js b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/calendar_date_select.js
new file mode 100644
index 00000000..b25297e3
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/calendar_date_select.js
@@ -0,0 +1,430 @@
+// CalendarDateSelect version 1.10.2 - a prototype based date picker
+// Questions, comments, bugs? - email the Author - Tim Harper <"timseeharper@gmail.seeom".gsub("see", "c")>
+if (typeof Prototype == 'undefined') alert("CalendarDateSelect Error: Prototype could not be found. Please make sure that your application's layout includes prototype.js (.g. <%= javascript_include_tag :defaults %>) *before* it includes calendar_date_select.js (.g. <%= calendar_date_select_includes %>).");
+if (Prototype.Version < "1.6") alert("Prototype 1.6.0 is required. If using earlier version of prototype, please use calendar_date_select version 1.8.3");
+
+Element.addMethods({
+ purgeChildren: function(element) { $A(element.childNodes).each(function(e){$(e).remove();}); },
+ build: function(element, type, options, style) {
+ var newElement = Element.build(type, options, style);
+ element.appendChild(newElement);
+ return newElement;
+ }
+});
+
+Element.build = function(type, options, style)
+{
+ var e = $(document.createElement(type));
+ $H(options).each(function(pair) { eval("e." + pair.key + " = pair.value" ); });
+ if (style)
+ $H(style).each(function(pair) { eval("e.style." + pair.key + " = pair.value" ); });
+ return e;
+};
+nil = null;
+
+Date.one_day = 24*60*60*1000;
+Date.weekdays = $w("S M T W T F S");
+Date.first_day_of_week = 0;
+Date.months = $w("January February March April May June July August September October November December" );
+Date.padded2 = function(hour) { var padded2 = parseInt(hour, 10); if (hour < 10) padded2 = "0" + padded2; return padded2; }
+Date.prototype.getPaddedMinutes = function() { return Date.padded2(this.getMinutes()); }
+Date.prototype.getAMPMHour = function() { var hour = this.getHours(); return (hour == 0) ? 12 : (hour > 12 ? hour - 12 : hour ) }
+Date.prototype.getAMPM = function() { return (this.getHours() < 12) ? "AM" : "PM"; }
+Date.prototype.stripTime = function() { return new Date(this.getFullYear(), this.getMonth(), this.getDate());};
+Date.prototype.daysDistance = function(compare_date) { return Math.round((compare_date - this) / Date.one_day); };
+Date.prototype.toFormattedString = function(include_time){
+ var hour, str;
+ str = Date.months[this.getMonth()] + " " + this.getDate() + ", " + this.getFullYear();
+
+ if (include_time) { hour = this.getHours(); str += " " + this.getAMPMHour() + ":" + this.getPaddedMinutes() + " " + this.getAMPM() }
+ return str;
+}
+Date.parseFormattedString = function(string) { return new Date(string);}
+Math.floor_to_interval = function(n, i) { return Math.floor(n/i) * i;}
+window.f_height = function() { return( [window.innerHeight ? window.innerHeight : null, document.documentElement ? document.documentElement.clientHeight : null, document.body ? document.body.clientHeight : null].select(function(x){return x>0}).first()||0); }
+window.f_scrollTop = function() { return ([window.pageYOffset ? window.pageYOffset : null, document.documentElement ? document.documentElement.scrollTop : null, document.body ? document.body.scrollTop : null].select(function(x){return x>0}).first()||0 ); }
+
+_translations = {
+ "OK": "OK",
+ "Now": "Now",
+ "Today": "Today"
+}
+SelectBox = Class.create();
+SelectBox.prototype = {
+ initialize: function(parent_element, values, html_options, style_options) {
+ this.element = $(parent_element).build("select", html_options, style_options);
+ this.populate(values);
+ },
+ populate: function(values) {
+ this.element.purgeChildren();
+ var that = this; $A(values).each(function(pair) { if (typeof(pair)!="object") {pair = [pair, pair]}; that.element.build("option", { value: pair[1], innerHTML: pair[0]}) });
+ },
+ setValue: function(value) {
+ var e = this.element;
+ var matched = false;
+ $R(0, e.options.length - 1 ).each(function(i) { if(e.options[i].value==value.toString()) {e.selectedIndex = i; matched = true;}; } );
+ return matched;
+ },
+ getValue: function() { return $F(this.element)}
+}
+CalendarDateSelect = Class.create();
+CalendarDateSelect.prototype = {
+ initialize: function(target_element, options) {
+ this.target_element = $(target_element); // make sure it's an element, not a string
+ if (!this.target_element) { alert("Target element " + target_element + " not found!"); return false;}
+ if (this.target_element.tagName != "INPUT") this.target_element = this.target_element.down("INPUT")
+
+ this.target_element.calendar_date_select = this;
+ this.last_click_at = 0;
+ // initialize the date control
+ this.options = $H({
+ embedded: false,
+ popup: nil,
+ time: false,
+ buttons: true,
+ year_range: 10,
+ close_on_click: nil,
+ minute_interval: 5,
+ popup_by: this.target_element,
+ month_year: "dropdowns",
+ onchange: this.target_element.onchange,
+ valid_date_check: nil
+ }).merge(options || {});
+ this.use_time = this.options.get("time");
+ this.parseDate();
+ this.callback("before_show")
+ this.initCalendarDiv();
+ if(!this.options.get("embedded")) {
+ this.positionCalendarDiv()
+ // set the click handler to check if a user has clicked away from the document
+ Event.observe(document, "mousedown", this.closeIfClickedOut_handler = this.closeIfClickedOut.bindAsEventListener(this));
+ Event.observe(document, "keypress", this.keyPress_handler = this.keyPress.bindAsEventListener(this));
+ }
+ this.callback("after_show")
+ },
+ positionCalendarDiv: function() {
+ var above = false;
+ var c_pos = this.calendar_div.cumulativeOffset(), c_left = c_pos[0], c_top = c_pos[1], c_dim = this.calendar_div.getDimensions(), c_height = c_dim.height, c_width = c_dim.width;
+ var w_top = window.f_scrollTop(), w_height = window.f_height();
+ var e_dim = $(this.options.get("popup_by")).cumulativeOffset(), e_top = e_dim[1], e_left = e_dim[0], e_height = $(this.options.get("popup_by")).getDimensions().height, e_bottom = e_top + e_height;
+
+ if ( (( e_bottom + c_height ) > (w_top + w_height)) && ( e_bottom - c_height > w_top )) above = true;
+ var left_px = e_left.toString() + "px", top_px = (above ? (e_top - c_height ) : ( e_top + e_height )).toString() + "px";
+
+ this.calendar_div.style.left = left_px; this.calendar_div.style.top = top_px;
+
+ this.calendar_div.setStyle({visibility:""});
+
+ // draw an iframe behind the calendar -- ugly hack to make IE 6 happy
+ if(navigator.appName=="Microsoft Internet Explorer") this.iframe = $(document.body).build("iframe", {src: "javascript:false", className: "ie6_blocker"}, { left: left_px, top: top_px, height: c_height.toString()+"px", width: c_width.toString()+"px", border: "0px"})
+ },
+ initCalendarDiv: function() {
+ if (this.options.get("embedded")) {
+ var parent = this.target_element.parentNode;
+ var style = {}
+ } else {
+ var parent = document.body
+ var style = { position:"absolute", visibility: "hidden", left:0, top:0 }
+ }
+ this.calendar_div = $(parent).build('div', {className: "calendar_date_select"}, style);
+
+ var that = this;
+ // create the divs
+ $w("top header body buttons footer bottom").each(function(name) {
+ eval("var " + name + "_div = that." + name + "_div = that.calendar_div.build('div', { className: 'cds_"+name+"' }, { clear: 'left'} ); ");
+ });
+
+ this.initHeaderDiv();
+ this.initButtonsDiv();
+ this.initCalendarGrid();
+ this.updateFooter("&#160;");
+
+ this.refresh();
+ this.setUseTime(this.use_time);
+ },
+ initHeaderDiv: function() {
+ var header_div = this.header_div;
+ this.close_button = header_div.build("a", { innerHTML: "x", href:"#", onclick:function () { this.close(); return false; }.bindAsEventListener(this), className: "close" });
+ this.next_month_button = header_div.build("a", { innerHTML: "&gt;", href:"#", onclick:function () { this.navMonth(this.date.getMonth() + 1 ); return false; }.bindAsEventListener(this), className: "next" });
+ this.prev_month_button = header_div.build("a", { innerHTML: "&lt;", href:"#", onclick:function () { this.navMonth(this.date.getMonth() - 1 ); return false; }.bindAsEventListener(this), className: "prev" });
+
+ if (this.options.get("month_year")=="dropdowns") {
+ this.month_select = new SelectBox(header_div, $R(0,11).map(function(m){return [Date.months[m], m]}), {className: "month", onchange: function () { this.navMonth(this.month_select.getValue()) }.bindAsEventListener(this)});
+ this.year_select = new SelectBox(header_div, [], {className: "year", onchange: function () { this.navYear(this.year_select.getValue()) }.bindAsEventListener(this)});
+ this.populateYearRange();
+ } else {
+ this.month_year_label = header_div.build("span")
+ }
+ },
+ initCalendarGrid: function() {
+ var body_div = this.body_div;
+ this.calendar_day_grid = [];
+ var days_table = body_div.build("table", { cellPadding: "0px", cellSpacing: "0px", width: "100%" })
+ // make the weekdays!
+ var weekdays_row = days_table.build("thead").build("tr");
+ Date.weekdays.each( function(weekday) {
+ weekdays_row.build("th", {innerHTML: weekday});
+ });
+
+ var days_tbody = days_table.build("tbody")
+ // Make the days!
+ var row_number = 0, weekday;
+ for(var cell_index = 0; cell_index<42; cell_index++)
+ {
+ weekday = (cell_index+Date.first_day_of_week ) % 7;
+ if ( cell_index % 7==0 ) days_row = days_tbody.build("tr", {className: 'row_'+row_number++});
+ (this.calendar_day_grid[cell_index] = days_row.build("td", {
+ calendar_date_select: this,
+ onmouseover: function () { this.calendar_date_select.dayHover(this); },
+ onmouseout: function () { this.calendar_date_select.dayHoverOut(this) },
+ onclick: function() { this.calendar_date_select.updateSelectedDate(this, true); },
+ className: (weekday==0) || (weekday==6) ? " weekend" : "" //clear the class
+ },
+ { cursor: "pointer" }
+ )).build("div");
+ this.calendar_day_grid[cell_index];
+ }
+ },
+ initButtonsDiv: function()
+ {
+ var buttons_div = this.buttons_div;
+ if (this.options.get("time"))
+ {
+ var blank_time = $A(this.options.get("time")=="mixed" ? [[" - ", ""]] : []);
+ buttons_div.build("span", {innerHTML:"@", className: "at_sign"});
+
+ var t = new Date();
+ this.hour_select = new SelectBox(buttons_div,
+ blank_time.concat($R(0,23).map(function(x) {t.setHours(x); return $A([t.getAMPMHour()+ " " + t.getAMPM(),x])} )),
+ {
+ calendar_date_select: this,
+ onchange: function() { this.calendar_date_select.updateSelectedDate( { hour: this.value });},
+ className: "hour"
+ }
+ );
+ buttons_div.build("span", {innerHTML:":", className: "seperator"});
+ var that = this;
+ this.minute_select = new SelectBox(buttons_div,
+ blank_time.concat($R(0,59).select(function(x){return (x % that.options.get('minute_interval')==0)}).map(function(x){ return $A([ Date.padded2(x), x]); } ) ),
+ {
+ calendar_date_select: this,
+ onchange: function() { this.calendar_date_select.updateSelectedDate( {minute: this.value }) },
+ className: "minute"
+ }
+ );
+
+ } else if (! this.options.get("buttons")) buttons_div.remove();
+
+ if (this.options.get("buttons")) {
+ buttons_div.build("span", {innerHTML: "&#160;"});
+ if (this.options.get("time")=="mixed" || !this.options.get("time")) b = buttons_div.build("a", {
+ innerHTML: _translations["Today"],
+ href: "#",
+ onclick: function() {this.today(false); return false;}.bindAsEventListener(this)
+ });
+
+ if (this.options.get("time")=="mixed") buttons_div.build("span", {innerHTML: " | ", className:"button_seperator"})
+
+ if (this.options.get("time")) b = buttons_div.build("a", {
+ innerHTML: _translations["Now"],
+ href: "#",
+ onclick: function() {this.today(true); return false}.bindAsEventListener(this)
+ });
+
+ if (!this.options.get("embedded"))
+ {
+ buttons_div.build("span", {innerHTML: "&#160;"});
+ buttons_div.build("a", { innerHTML: _translations["OK"], href: "#", onclick: function() {this.close(); return false;}.bindAsEventListener(this) });
+ }
+ }
+ },
+ refresh: function ()
+ {
+ this.refreshMonthYear();
+ this.refreshCalendarGrid();
+
+ this.setSelectedClass();
+ this.updateFooter();
+ },
+ refreshCalendarGrid: function () {
+ this.beginning_date = new Date(this.date).stripTime();
+ this.beginning_date.setDate(1);
+ this.beginning_date.setHours(12); // Prevent daylight savings time boundaries from showing a duplicate day
+ var pre_days = this.beginning_date.getDay() // draw some days before the fact
+ if (pre_days < 3) pre_days += 7;
+ this.beginning_date.setDate(1 - pre_days + Date.first_day_of_week);
+
+ var iterator = new Date(this.beginning_date);
+
+ var today = new Date().stripTime();
+ var this_month = this.date.getMonth();
+ vdc = this.options.get("valid_date_check");
+ for (var cell_index = 0;cell_index<42; cell_index++)
+ {
+ day = iterator.getDate(); month = iterator.getMonth();
+ cell = this.calendar_day_grid[cell_index];
+ Element.remove(cell.childNodes[0]); div = cell.build("div", {innerHTML:day});
+ if (month!=this_month) div.className = "other";
+ cell.day = day; cell.month = month; cell.year = iterator.getFullYear();
+ if (vdc) { if (vdc(iterator.stripTime())) cell.removeClassName("disabled"); else cell.addClassName("disabled") };
+ iterator.setDate( day + 1);
+ }
+
+ if (this.today_cell) this.today_cell.removeClassName("today");
+
+ if ( $R( 0, 41 ).include(days_until = this.beginning_date.stripTime().daysDistance(today)) ) {
+ this.today_cell = this.calendar_day_grid[days_until];
+ this.today_cell.addClassName("today");
+ }
+ },
+ refreshMonthYear: function() {
+ var m = this.date.getMonth();
+ var y = this.date.getFullYear();
+ // set the month
+ if (this.options.get("month_year") == "dropdowns")
+ {
+ this.month_select.setValue(m, false);
+
+ var e = this.year_select.element;
+ if (this.flexibleYearRange() && (!(this.year_select.setValue(y, false)) || e.selectedIndex <= 1 || e.selectedIndex >= e.options.length - 2 )) this.populateYearRange();
+
+ this.year_select.setValue(y);
+
+ } else {
+ this.month_year_label.update( Date.months[m] + " " + y.toString() );
+ }
+ },
+ populateYearRange: function() {
+ this.year_select.populate(this.yearRange().toArray());
+ },
+ yearRange: function() {
+ if (!this.flexibleYearRange())
+ return $R(this.options.get("year_range")[0], this.options.get("year_range")[1]);
+
+ var y = this.date.getFullYear();
+ return $R(y - this.options.get("year_range"), y + this.options.get("year_range"));
+ },
+ flexibleYearRange: function() { return (typeof(this.options.get("year_range")) == "number"); },
+ validYear: function(year) { if (this.flexibleYearRange()) { return true;} else { return this.yearRange().include(year);} },
+ dayHover: function(element) {
+ var hover_date = new Date(this.selected_date);
+ hover_date.setYear(element.year); hover_date.setMonth(element.month); hover_date.setDate(element.day);
+ this.updateFooter(hover_date.toFormattedString(this.use_time));
+ },
+ dayHoverOut: function(element) { this.updateFooter(); },
+ clearSelectedClass: function() {if (this.selected_cell) this.selected_cell.removeClassName("selected");},
+ setSelectedClass: function() {
+ if (!this.selection_made) return;
+ this.clearSelectedClass()
+ if ($R(0,42).include( days_until = this.beginning_date.stripTime().daysDistance(this.selected_date.stripTime()) )) {
+ this.selected_cell = this.calendar_day_grid[days_until];
+ this.selected_cell.addClassName("selected");
+ }
+ },
+ reparse: function() { this.parseDate(); this.refresh(); },
+ dateString: function() {
+ return (this.selection_made) ? this.selected_date.toFormattedString(this.use_time) : "&#160;";
+ },
+ parseDate: function()
+ {
+ var value = $F(this.target_element).strip()
+ this.selection_made = (value != "");
+ this.date = value=="" ? NaN : Date.parseFormattedString(this.options.get("date") || value);
+ if (isNaN(this.date)) this.date = new Date();
+ if (!this.validYear(this.date.getFullYear())) this.date.setYear( (this.date.getFullYear() < this.yearRange().start) ? this.yearRange().start : this.yearRange().end);
+ this.selected_date = new Date(this.date);
+ this.use_time = /[0-9]:[0-9]{2}/.exec(value) ? true : false;
+ this.date.setDate(1);
+ },
+ updateFooter:function(text) { if (!text) text = this.dateString(); this.footer_div.purgeChildren(); this.footer_div.build("span", {innerHTML: text }); },
+ updateSelectedDate:function(partsOrElement, via_click) {
+ var parts = $H(partsOrElement);
+ if ((this.target_element.disabled || this.target_element.readOnly) && this.options.get("popup") != "force") return false;
+ if (parts.get("day")) {
+ var t_selected_date = this.selected_date, vdc = this.options.get("valid_date_check");
+ for (var x = 0; x<=3; x++) t_selected_date.setDate(parts.get("day"));
+ t_selected_date.setYear(parts.get("year"));
+ t_selected_date.setMonth(parts.get("month"));
+
+ if (vdc && ! vdc(t_selected_date.stripTime())) { return false; }
+ this.selected_date = t_selected_date;
+ this.selection_made = true;
+ }
+
+ if (!isNaN(parts.get("hour"))) this.selected_date.setHours(parts.get("hour"));
+ if (!isNaN(parts.get("minute"))) this.selected_date.setMinutes( Math.floor_to_interval(parts.get("minute"), this.options.get("minute_interval")) );
+ if (parts.get("hour") === "" || parts.get("minute") === "")
+ this.setUseTime(false);
+ else if (!isNaN(parts.get("hour")) || !isNaN(parts.get("minute")))
+ this.setUseTime(true);
+
+ this.updateFooter();
+ this.setSelectedClass();
+
+ if (this.selection_made) this.updateValue();
+ if (this.closeOnClick()) { this.close(); }
+ if (via_click && !this.options.get("embedded")) {
+ if ((new Date() - this.last_click_at) < 333) this.close();
+ this.last_click_at = new Date();
+ }
+ },
+ closeOnClick: function() {
+ if (this.options.get("embedded")) return false;
+ if (this.options.get("close_on_click")===nil )
+ return (this.options.get("time")) ? false : true
+ else
+ return (this.options.get("close_on_click"))
+ },
+ navMonth: function(month) { (target_date = new Date(this.date)).setMonth(month); return (this.navTo(target_date)); },
+ navYear: function(year) { (target_date = new Date(this.date)).setYear(year); return (this.navTo(target_date)); },
+ navTo: function(date) {
+ if (!this.validYear(date.getFullYear())) return false;
+ this.date = date;
+ this.date.setDate(1);
+ this.refresh();
+ this.callback("after_navigate", this.date);
+ return true;
+ },
+ setUseTime: function(turn_on) {
+ this.use_time = this.options.get("time") && (this.options.get("time")=="mixed" ? turn_on : true) // force use_time to true if time==true && time!="mixed"
+ if (this.use_time && this.selected_date) { // only set hour/minute if a date is already selected
+ var minute = Math.floor_to_interval(this.selected_date.getMinutes(), this.options.get("minute_interval"));
+ var hour = this.selected_date.getHours();
+
+ this.hour_select.setValue(hour);
+ this.minute_select.setValue(minute)
+ } else if (this.options.get("time")=="mixed") {
+ this.hour_select.setValue(""); this.minute_select.setValue("");
+ }
+ },
+ updateValue: function() {
+ var last_value = this.target_element.value;
+ this.target_element.value = this.dateString();
+ if (last_value!=this.target_element.value) this.callback("onchange");
+ },
+ today: function(now) {
+ var d = new Date(); this.date = new Date();
+ var o = $H({ day: d.getDate(), month: d.getMonth(), year: d.getFullYear(), hour: d.getHours(), minute: d.getMinutes()});
+ if ( ! now ) o = o.merge({hour: "", minute:""});
+ this.updateSelectedDate(o, true);
+ this.refresh();
+ },
+ close: function() {
+ if (this.closed) return false;
+ this.callback("before_close");
+ this.target_element.calendar_date_select = nil;
+ Event.stopObserving(document, "mousedown", this.closeIfClickedOut_handler);
+ Event.stopObserving(document, "keypress", this.keyPress_handler);
+ this.calendar_div.remove(); this.closed = true;
+ if (this.iframe) this.iframe.remove();
+ if (this.target_element.type!="hidden") this.target_element.focus();
+ this.callback("after_close");
+ },
+ closeIfClickedOut: function(e) {
+ if (! $(Event.element(e)).descendantOf(this.calendar_div) ) this.close();
+ },
+ keyPress: function(e) {
+ if (e.keyCode==Event.KEY_ESC) this.close();
+ },
+ callback: function(name, param) { if (this.options.get(name)) { this.options.get(name).bind(this.target_element)(param); } }
+} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/format_american.js b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/format_american.js
new file mode 100644
index 00000000..cbaca01a
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/format_american.js
@@ -0,0 +1,34 @@
+// American Format: 12/31/2000 5:00 pm
+// Thanks, Wes Hays
+Date.prototype.toFormattedString = function(include_time){
+ str = Date.padded2(this.getMonth() + 1) + '/' +Date.padded2(this.getDate()) + '/' + this.getFullYear();
+
+ if (include_time) { hour=this.getHours(); str += " " + this.getAMPMHour() + ":" + this.getPaddedMinutes() + " " + this.getAMPM() }
+ return str;
+}
+
+Date.parseFormattedString = function (string) {
+ // Test these with and without the time
+ // 11/11/1111 12pm
+ // 11/11/1111 1pm
+ // 1/11/1111 10:10pm
+ // 11/1/1111 01pm
+ // 1/1/1111 01:11pm
+ // 1/1/1111 1:11pm
+ var regexp = "(([0-1]?[0-9])\/[0-3]?[0-9]\/[0-9]{4}) *([0-9]{1,2}(:[0-9]{2})? *(am|pm))?";
+ var d = string.match(new RegExp(regexp, "i"));
+ if (d==null) {
+ return Date.parse(string); // Give javascript a chance to parse it.
+ }
+
+ mdy = d[1].split('/');
+ hrs = 0;
+ mts = 0;
+ if(d[3] != null) {
+ hrs = parseInt(d[3].split('')[0], 10);
+ if(d[5].toLowerCase() == 'pm') { hrs += 12; } // Add 12 more to hrs
+ mts = d[4].split(':')[1];
+ }
+
+ return new Date(mdy[2], parseInt(mdy[0], 10)-1, mdy[1], hrs, mts, 0);
+}
diff --git a/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/format_db.js b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/format_db.js
new file mode 100644
index 00000000..a3f10d44
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/format_db.js
@@ -0,0 +1,27 @@
+// DB No Seconds Format: 2007-12-05 12:00
+
+Date.padded2 = function(hour) { padded2 = hour.toString(); if ((parseInt(hour) < 10) || (parseInt(hour) == null)) padded2="0" + padded2; return padded2; }
+Date.prototype.getAMPMHour = function() { hour=Date.padded2(this.getHours()); return (hour == null) ? 00 : (hour > 24 ? hour - 24 : hour ) }
+Date.prototype.getAMPM = function() { return (this.getHours() < 12) ? "" : ""; }
+
+Date.prototype.toFormattedString = function(include_time){
+ str = this.getFullYear() + "-" + (this.getMonth() + 1) + "-" + Date.padded2(this.getDate());
+ if (include_time) { hour=this.getHours(); str += " " + this.getAMPMHour() + ":" + this.getPaddedMinutes() }
+ return str;
+}
+
+Date.parseFormattedString = function (string) {
+ var regexp = '([0-9]{4})-(([0-9]{1,2})-(([0-9]{1,2})( ([0-9]{1,2}):([0-9]{2})? *)?)?)?';
+ var d = string.match(new RegExp(regexp, "i"));
+ if (d==null) return Date.parse(string); // at least give javascript a crack at it.
+ var offset = 0;
+ var date = new Date(d[1], 0, 1);
+ if (d[3]) { date.setMonth(d[3] - 1); }
+ if (d[5]) { date.setDate(d[5]); }
+ if (d[7]) {
+ date.setHours(parseInt(d[7], 10));
+ }
+ if (d[8]) { date.setMinutes(d[8]); }
+ if (d[10]) { date.setSeconds(d[10]); }
+ return date;
+}
diff --git a/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/format_euro_24hr.js b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/format_euro_24hr.js
new file mode 100644
index 00000000..7249fcb9
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/format_euro_24hr.js
@@ -0,0 +1,7 @@
+// Formats date and time as "01 January 2000 17:00"
+Date.prototype.toFormattedString = function(include_time)
+{
+ str = Date.padded2(this.getDate()) + " " + Date.months[this.getMonth()] + " " + this.getFullYear();
+ if (include_time) { str += " " + this.getHours() + ":" + this.getPaddedMinutes() }
+ return str;
+} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/format_finnish.js b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/format_finnish.js
new file mode 100644
index 00000000..ef86c26b
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/format_finnish.js
@@ -0,0 +1,24 @@
+Date.padded2 = function(hour) { padded2 = hour.toString(); if ((parseInt(hour) < 10) || (parseInt(hour) == null)) padded2="0" + padded2; return padded2; }
+Date.prototype.getAMPMHour = function() { hour=Date.padded2(this.getHours()); return (hour == null) ? 00 : (hour > 24 ? hour - 24 : hour ) }
+Date.prototype.getAMPM = function() { return (this.getHours() < 12) ? "" : ""; }
+
+Date.prototype.toFormattedString = function(include_time){
+ str = this.getDate() + "." + (this.getMonth() + 1) + "." + this.getFullYear();
+ if (include_time) { hour=this.getHours(); str += " " + this.getAMPMHour() + ":" + this.getPaddedMinutes() }
+ return str;
+}
+Date.parseFormattedString = function (string) {
+ var regexp = '([0-9]{1,2})\.(([0-9]{1,2})\.(([0-9]{4})( ([0-9]{1,2}):([0-9]{2})? *)?)?)?';
+ var d = string.match(new RegExp(regexp, "i"));
+ if (d==null) return Date.parse(string); // at least give javascript a crack at it.
+ var offset = 0;
+ var date = new Date(d[5], 0, 1);
+ if (d[3]) { date.setMonth(d[3] - 1); }
+ if (d[5]) { date.setDate(d[1]); }
+ if (d[7]) {
+ date.setHours(parseInt(d[7], 10));
+ }
+ if (d[8]) { date.setMinutes(d[8]); }
+ if (d[10]) { date.setSeconds(d[10]); }
+ return date;
+}
diff --git a/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/format_hyphen_ampm.js b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/format_hyphen_ampm.js
new file mode 100644
index 00000000..528eb618
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/format_hyphen_ampm.js
@@ -0,0 +1,36 @@
+Date.prototype.toFormattedString = function(include_time){
+ str = this.getFullYear() + "-" + Date.padded2(this.getMonth() + 1) + "-" +Date.padded2(this.getDate());
+
+if (include_time) { hour=this.getHours(); str += " " + this.getAMPMHour() + ":" + this.getPaddedMinutes() + " " + this.getAMPM() }
+return str;
+}
+
+Date.parseFormattedString = function (string) {
+ var regexp = "([0-9]{4})(-([0-9]{2})(-([0-9]{2})" +
+ "( ([0-9]{1,2}):([0-9]{2})? *(pm|am)" +
+ "?)?)?)?";
+ var d = string.match(new RegExp(regexp, "i"));
+ if (d==null) return Date.parse(string); // at least give javascript a crack at it.
+ var offset = 0;
+ var date = new Date(d[1], 0, 1);
+ if (d[3]) { date.setMonth(d[3] - 1); }
+ if (d[5]) { date.setDate(d[5]); }
+ if (d[7]) {
+ hours = parseInt(d[7], 10);
+ offset=0;
+ is_pm = (d[9].toLowerCase()=="pm")
+ if (is_pm && hours <= 11) hours+=12;
+ if (!is_pm && hours == 12) hours=0;
+ date.setHours(hours);
+
+ }
+ if (d[8]) { date.setMinutes(d[8]); }
+ if (d[10]) { date.setSeconds(d[10]); }
+ if (d[12]) { date.setMilliseconds(Number("0." + d[12]) * 1000); }
+ if (d[14]) {
+ offset = (Number(d[16]) * 60) + Number(d[17]);
+ offset *= ((d[15] == '-') ? 1 : -1);
+ }
+
+ return date;
+} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/format_iso_date.js b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/format_iso_date.js
new file mode 100644
index 00000000..ea7aa735
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/format_iso_date.js
@@ -0,0 +1,46 @@
+Date.prototype.toFormattedString = function(include_time) {
+ var hour;
+ var str = this.getFullYear() + "-" + Date.padded2(this.getMonth() + 1) + "-" +Date.padded2(this.getDate());
+ if (include_time) {
+ hour = this.getHours();
+ str += " " + this.getHours() + ":" + this.getPaddedMinutes();
+ }
+ return str;
+};
+
+Date.parseFormattedString = function (string) {
+
+ var regexp = "([0-9]{4})(-([0-9]{2})(-([0-9]{2})" +
+ "( ([0-9]{1,2}):([0-9]{2})?" +
+ "?)?)?)?";
+
+ var d = string.match(new RegExp(regexp, "i"));
+ if (d === null) {
+ return Date.parse(string); // at least give javascript a crack at it.
+ }
+ var offset = 0;
+ var date = new Date(d[1], 0, 1);
+ if (d[3]) {
+ date.setMonth(d[3] - 1);
+ }
+ if (d[5]) {
+ date.setDate(d[5]);
+ }
+ if (d[7]) {
+ date.setHours(d[7]);
+ }
+ if (d[8]) {
+ date.setMinutes(d[8]);
+ }
+ if (d[0]) {
+ date.setSeconds(d[0]);
+ }
+ if (d[2]) {
+ date.setMilliseconds(Number("0." + d[2]));
+ }
+ if (d[4]) {
+ offset = (Number(d[6])) + Number(d[8]);
+ offset = ((d[5] == '-') ? 1 : -1);
+ }
+ return date;
+};
diff --git a/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/format_italian.js b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/format_italian.js
new file mode 100644
index 00000000..249fcb59
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/format_italian.js
@@ -0,0 +1,24 @@
+// Italian Format: 31/12/2000 23:00
+// Thanks, Bigonazzi!
+
+Date.prototype.toFormattedString = function(include_time){
+ str = this.getDate() + "/" + (this.getMonth() + 1) + "/" + this.getFullYear();
+ if (include_time) { hour=this.getHours(); str += " " + this.getAMPMHour() + ":" + this.getPaddedMinutes() }
+ return str;
+}
+
+Date.parseFormattedString = function (string) {
+ var regexp = '([0-9]{1,2})/(([0-9]{1,2})/(([0-9]{4})( ([0-9]{1,2}):([0-9]{2})? *)?)?)?';
+ var d = string.match(new RegExp(regexp, "i"));
+ if (d==null) return Date.parse(string); // at least give javascript a crack at it.
+ var offset = 0;
+ var date = new Date(d[5], 0, 1);
+ if (d[3]) { date.setMonth(d[3] - 1); }
+ if (d[5]) { date.setDate(d[1]); }
+ if (d[7]) {
+ date.setHours(parseInt(d[7], 10));
+ }
+ if (d[8]) { date.setMinutes(d[8]); }
+ if (d[10]) { date.setSeconds(d[10]); }
+ return date;
+}
diff --git a/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/format_mayor.js b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/format_mayor.js
new file mode 100644
index 00000000..dffba7d9
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/format_mayor.js
@@ -0,0 +1,42 @@
+Date.prototype.toFormattedString = function(include_time){
+ str = this.getFullYear() + "-" + Date.padded2(this.getMonth() + 1) + "-" +Date.padded2(this.getDate());
+ if (include_time) { str += " " + this.getHours() + ":" + this.getPaddedMinutes() }
+ return str;
+}
+
+Date.parseFormattedString = function (string) {
+
+ var regexp = "([0-9]{4})(-([0-9]{2})(-([0-9]{2})" +
+ "( ([0-9]{1,2}):([0-9]{2})?" +
+ "?)?)?)?";
+
+ var d = string.match(new RegExp(regexp, "i"));
+ if (d === null) {
+ return Date.parse(string); // at least give javascript a crack at it.
+ }
+ var offset = 0;
+ var date = new Date(d[1], 0, 1);
+ if (d[3]) {
+ date.setMonth(d[3] - 1);
+ }
+ if (d[5]) {
+ date.setDate(d[5]);
+ }
+ if (d[7]) {
+ date.setHours(d[7]);
+ }
+ if (d[8]) {
+ date.setMinutes(d[8]);
+ }
+ if (d[0]) {
+ date.setSeconds(d[0]);
+ }
+ if (d[2]) {
+ date.setMilliseconds(Number("0." + d[2]));
+ }
+ if (d[4]) {
+ offset = (Number(d[6])) + Number(d[8]);
+ offset = ((d[5] == '-') ? 1 : -1);
+ }
+ return date;
+};
diff --git a/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/locale/fi.js b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/locale/fi.js
new file mode 100644
index 00000000..443c9103
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/locale/fi.js
@@ -0,0 +1,10 @@
+Date.weekdays = $w("Ma Ti Ke To Pe La Su");
+Date.months = $w("Tammikuu Helmikuu Maaliskuu Huhtikuu Toukokuu Keskuu Heinkuu Elokuu Syyskuu Lokakuu Marraskuu Joulukuu" );
+
+Date.first_day_of_week = 1
+
+_translations = {
+ "OK": "OK",
+ "Now": "Nyt",
+ "Today": "Tnn"
+} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/locale/hu.js b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/locale/hu.js
new file mode 100644
index 00000000..6b36f701
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/locale/hu.js
@@ -0,0 +1,10 @@
+Date.weekdays = $w("H K Sz Cs P Szo V");
+Date.months = $w("Január Február Március Április Május Június Július Augusztus Szeptember Október November December" );
+
+Date.first_day_of_week = 1
+
+_translations = {
+ "OK": "OK",
+ "Now": "Most",
+ "Today": "Ma"
+} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/locale/jp.js b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/locale/jp.js
new file mode 100644
index 00000000..7cca6fd5
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/locale/jp.js
@@ -0,0 +1,10 @@
+Date.weekdays = $w("一 二 三 四 五 六 七");
+Date.months = $w("一 二 三 四 五 六 七 八 九 十 十一 十二" );
+
+Date.first_day_of_week = 1
+
+_translations = {
+ "OK": "确定",
+ "Now": "现在",
+ "Today": "今天"
+} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/locale/pl.js b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/locale/pl.js
new file mode 100644
index 00000000..af1b78a1
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/javascripts/calendar_date_select/locale/pl.js
@@ -0,0 +1,10 @@
+Date.weekdays = $w('P W Ś C P S N');
+Date.months = $w('Styczeń Luty Marzec Kwiecień Maj Czerwiec Lipiec Sierpień Wrzesień Październik Listopad Grudzień');
+
+Date.first_day_of_week = 1
+
+_translations = {
+ "OK": "OK",
+ "Now": "Teraz",
+ "Today": "Dziś"
+} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/stylesheets/calendar_date_select/blue.css b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/stylesheets/calendar_date_select/blue.css
new file mode 100644
index 00000000..31a5cbde
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/stylesheets/calendar_date_select/blue.css
@@ -0,0 +1,130 @@
+.calendar_date_select {
+ color:white;
+ border:#777 1px solid;
+ display:block;
+ width:195px;
+ z-index: 1000;
+}
+/* this is a fun ie6 hack to get drop downs to stay behind the popup window. This should always be just underneath .calendar_date_select */
+iframe.ie6_blocker {
+ position: absolute;
+ z-index: 999;
+}
+
+.calendar_date_select thead th {
+ font-weight:bold;
+ background-color: #000;
+ border-top:1px solid #777;
+ border-bottom:2px solid #334;
+ color: white !important;
+}
+
+.calendar_date_select .cds_buttons {
+ text-align:center;
+ padding:5px 0px;
+ background-color: #000055;
+}
+
+.calendar_date_select .cds_footer {
+ background-color: black;
+ padding:3px;
+ font-size:12px;
+ text-align:center;
+}
+
+.calendar_date_select table {
+ margin: 0px;
+ padding: 0px;
+}
+
+
+.calendar_date_select .cds_header {
+ background-color: #ccc;
+ border-bottom: 2px solid #aaa;
+ text-align:center;
+}
+
+.calendar_date_select .cds_header span {
+ font-size:15px;
+ color: black;
+ font-weight: bold;
+}
+
+.calendar_date_select select { font-size:11px;}
+
+.calendar_date_select .cds_header a:hover {
+ color: white;
+}
+.calendar_date_select .cds_header a {
+ width:22px;
+ height:20px;
+ text-decoration: none;
+ font-size:14px;
+ color:black !important;
+}
+
+.calendar_date_select .cds_header a.prev {
+ float:left;
+}
+
+.calendar_date_select .cds_header a.next {
+ float:right;
+}
+
+.calendar_date_select .cds_header a.close {
+ float:right;
+ display:none;
+}
+
+
+.calendar_date_select .cds_header select.month {
+ width:90px;
+}
+
+.calendar_date_select .cds_header select.year {
+ width:61px;
+}
+
+.calendar_date_select .cds_buttons a {
+ color: white;
+ font-size: 9px;
+}
+
+.calendar_date_select td {
+ background-color: #000066;
+ font-size:12px;
+ width: 24px;
+ height: 21px;
+ text-align:center;
+ vertical-align: middle;
+}
+.calendar_date_select td.weekend {
+ background-color: #00005a;
+}
+
+.calendar_date_select td div.other {
+ color: #4C5593;
+}
+
+.calendar_date_select tbody td {
+ border-bottom: 1px solid #000044;
+}
+.calendar_date_select td.selected {
+ background-color:white;
+ color:black;
+}
+
+.calendar_date_select td:hover {
+ background-color:#ccc;
+}
+
+.calendar_date_select td.disabled div {
+ color: #000044;
+}
+.calendar_date_select td.today {
+ border: 1px dashed blue;
+}
+
+.fieldWithErrors .calendar_date_select {
+ border: 2px solid red;
+}
diff --git a/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/stylesheets/calendar_date_select/default.css b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/stylesheets/calendar_date_select/default.css
new file mode 100644
index 00000000..c7183838
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/stylesheets/calendar_date_select/default.css
@@ -0,0 +1,135 @@
+.calendar_date_select {
+ color:white;
+ border:#777 1px solid;
+ display:block;
+ width:195px;
+ z-index: 1000;
+}
+/* this is a fun ie6 hack to get drop downs to stay behind the popup window. This should always be just underneath .calendar_date_select */
+iframe.ie6_blocker {
+ position: absolute;
+ z-index: 999;
+}
+
+.calendar_date_select thead th {
+ font-weight:bold;
+ background-color: #aaa;
+ border-top:1px solid #777;
+ border-bottom:1px solid #777;
+ color: white !important;
+}
+
+.calendar_date_select .cds_buttons {
+ text-align:center;
+ padding:5px 0px;
+ background-color: #555;
+}
+
+.calendar_date_select .cds_footer {
+ background-color: black;
+ padding:3px;
+ font-size:12px;
+ text-align:center;
+}
+
+.calendar_date_select table {
+ margin: 0px;
+ padding: 0px;
+}
+
+
+.calendar_date_select .cds_header {
+ background-color: #ccc;
+ border-bottom: 2px solid #aaa;
+ text-align:center;
+}
+
+.calendar_date_select .cds_header span {
+ font-size:15px;
+ color: black;
+ font-weight: bold;
+}
+
+.calendar_date_select select { font-size:11px;}
+
+.calendar_date_select .cds_header a:hover {
+ color: white;
+}
+.calendar_date_select .cds_header a {
+ width:22px;
+ height:20px;
+ text-decoration: none;
+ font-size:14px;
+ color:black !important;
+}
+
+.calendar_date_select .cds_header a.prev {
+ float:left;
+}
+.calendar_date_select .cds_header a.next {
+ float:right;
+}
+
+.calendar_date_select .cds_header a.close {
+ float:right;
+ display:none;
+}
+
+.calendar_date_select .cds_header select.month {
+ width:90px;
+}
+
+.calendar_date_select .cds_header select.year {
+ width:61px;
+}
+.calendar_date_select .cds_buttons a {
+ color: white;
+ font-size: 9px;
+}
+
+.calendar_date_select td {
+ font-size:12px;
+ width: 24px;
+ height: 21px;
+ text-align:center;
+ vertical-align: middle;
+ background-color: #fff;
+}
+.calendar_date_select td.weekend {
+ background-color: #eee;
+ border-left:1px solid #ddd;
+ border-right:1px solid #ddd;
+}
+
+.calendar_date_select td div {
+ color: #000;
+}
+.calendar_date_select td div.other {
+ color: #ccc;
+}
+.calendar_date_select td.selected div {
+ color:white;
+}
+
+.calendar_date_select tbody td {
+ border-bottom: 1px solid #ddd;
+}
+.calendar_date_select td.selected {
+ background-color:#777;
+}
+
+.calendar_date_select td:hover {
+ background-color:#ccc;
+}
+
+.calendar_date_select td.today {
+ border: 1px dashed #999;
+}
+
+.calendar_date_select td.disabled div {
+ color: #e6e6e6;
+}
+
+.fieldWithErrors .calendar_date_select {
+ border: 2px solid red;
+}
diff --git a/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/stylesheets/calendar_date_select/plain.css b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/stylesheets/calendar_date_select/plain.css
new file mode 100644
index 00000000..f5e57dd2
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/stylesheets/calendar_date_select/plain.css
@@ -0,0 +1,128 @@
+.calendar_date_select {
+ border:#777 1px solid;
+ display:block;
+ width:195px;
+ z-index: 1000;
+ background-color:white;
+}
+/* this is a fun ie6 hack to get drop downs to stay behind the popup window. This should always be just underneath .calendar_date_select */
+iframe.ie6_blocker {
+ position: absolute;
+ z-index: 999;
+}
+
+.calendar_date_select thead th {
+ color: black !important;
+ font-weight:bold;
+}
+
+.calendar_date_select .cds_buttons {
+ text-align:center;
+ padding:5px 0px;
+}
+
+.calendar_date_select .cds_footer {
+ padding:3px;
+ font-size:10px;
+ text-align:center;
+}
+
+.calendar_date_select table {
+ margin: 0px;
+ padding: 0px;
+}
+
+
+.calendar_date_select .cds_header {
+ text-align:center;
+}
+
+.calendar_date_select .cds_header * {
+ border:0px;
+ background-color:white;
+}
+
+.calendar_date_select .cds_header span {
+ font-size:15px;
+ color: black;
+ font-weight: bold;
+}
+
+.calendar_date_select select { font-size:11px;}
+
+.calendar_date_select .cds_header a:hover {
+ color: white;
+}
+.calendar_date_select .cds_header a {
+ width:22px;
+ height:20px;
+ text-decoration: none;
+ font-size:14px;
+ color:black !important;
+}
+
+.calendar_date_select .cds_header a.prev {
+ float:left;
+}
+.calendar_date_select .cds_header a.next {
+ float:right;
+}
+.calendar_date_select .cds_header a.close {
+ float:right;
+ display:none;
+}
+
+.calendar_date_select .cds_header select.month {
+ width:90px;
+}
+
+.calendar_date_select .cds_header select.year {
+ width:61px;
+}
+
+.calendar_date_select .cds_buttons a {
+ color: black;
+ font-size: 9px;
+}
+.calendar_date_select td {
+ font-size:12px;
+ width: 24px;
+ height: 21px;
+ text-align:center;
+ vertical-align: middle;
+ background-color: #fff;
+}
+.calendar_date_select td.weekend {
+}
+
+.calendar_date_select td div {
+ color: #000;
+}
+.calendar_date_select td div.other {
+ color: #ccc;
+}
+.calendar_date_select td.selected div {
+ color:white;
+}
+
+.calendar_date_select tbody td {
+}
+.calendar_date_select td.selected {
+ background-color:#777;
+}
+
+.calendar_date_select td:hover {
+ background-color:#ccc;
+}
+
+.calendar_date_select td.today {
+ border: 1px dashed #999;
+}
+
+.calendar_date_select td.disabled div {
+ color: #e6e6e6;
+}
+
+.fieldWithErrors .calendar_date_select {
+ border: 2px solid red;
+}
diff --git a/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/stylesheets/calendar_date_select/red.css b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/stylesheets/calendar_date_select/red.css
new file mode 100644
index 00000000..a2ff2f24
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/stylesheets/calendar_date_select/red.css
@@ -0,0 +1,135 @@
+.calendar_date_select {
+ color:white;
+ border:#777 1px solid;
+ display:block;
+ width:195px;
+ z-index: 1000;
+}
+/* this is a fun ie6 hack to get drop downs to stay behind the popup window. This should always be just underneath .calendar_date_select */
+iframe.ie6_blocker {
+ position: absolute;
+ z-index: 999;
+}
+
+.calendar_date_select thead th {
+ font-weight:bold;
+ background-color: #E7E8E8;
+ border-bottom:2px solid black;
+ color: black !important;
+}
+
+.calendar_date_select .cds_buttons {
+ text-align:center;
+ padding:5px 0px;
+ background-color: #5f0000;
+}
+
+.calendar_date_select .cds_footer {
+ background-color: black;
+ padding:3px;
+ text-align:center;
+}
+
+.calendar_date_select table {
+ margin: 0px;
+ padding: 0px;
+}
+
+
+.calendar_date_select .cds_header {
+ background-color: #ccc;
+ border-bottom: 2px solid #aaa;
+ text-align:center;
+}
+
+.calendar_date_select .cds_header span {
+ font-size:15px;
+ color: black;
+ font-weight: bold;
+}
+
+.calendar_date_select select { font-size:11px;}
+
+.calendar_date_select .cds_header a:hover {
+ color: white;
+}
+.calendar_date_select .cds_header a {
+ width:22px;
+ height:20px;
+ text-decoration: none;
+ font-size:14px;
+ color:black !important;
+}
+
+.calendar_date_select .cds_header a.prev {
+ float:left;
+}
+.calendar_date_select .cds_header a.next {
+ float:right;
+}
+
+.calendar_date_select .cds_header a.close {
+ float:right;
+ display:none;
+}
+
+.calendar_date_select .cds_header select.month {
+ width:90px;
+}
+
+.calendar_date_select .cds_header select.year {
+ width:61px;
+}
+
+.calendar_date_select .cds_buttons a {
+ color: white;
+ font-size: 9px;
+}
+
+
+.calendar_date_select td {
+ background-color: #660000;
+ font-size:12px;
+ width: 24px;
+ height: 21px;
+ text-align:center;
+ vertical-align: middle;
+}
+.calendar_date_select td.weekend {
+ background-color: #5a0000;
+}
+
+.calendar_date_select td div {
+ color:#fff;
+}
+.calendar_date_select td div.other {
+ color: #93554C;
+}
+.calendar_date_select td.selected div {
+ color:black;
+}
+
+
+.calendar_date_select tbody td {
+ border-bottom: 1px solid #550000;
+}
+.calendar_date_select tbody td.selected {
+ background-color:white;
+ color:black;
+}
+
+.calendar_date_select tbody td:hover {
+ background-color:#ccc;
+}
+
+.calendar_date_select tbody td.today {
+ border: 1px dashed red;
+}
+
+.calendar_date_select td.disabled div {
+ color: #440000;
+}
+
+.fieldWithErrors .calendar_date_select {
+ border: 2px solid red;
+}
diff --git a/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/stylesheets/calendar_date_select/silver.css b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/stylesheets/calendar_date_select/silver.css
new file mode 100644
index 00000000..6e70cc68
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/calendar_date_select/stylesheets/calendar_date_select/silver.css
@@ -0,0 +1,133 @@
+.calendar_date_select {
+ color:white;
+ border:#777 1px solid;
+ display:block;
+ width:195px;
+ z-index: 1000;
+}
+/* this is a fun ie6 hack to get drop downs to stay behind the popup window. This should always be just underneath .calendar_date_select */
+iframe.ie6_blocker {
+ position: absolute;
+ z-index: 999;
+}
+
+.calendar_date_select thead th {
+ font-weight:bold;
+ background-color: #000;
+ border-top:1px solid #777;
+ border-bottom:2px solid #333;
+ color: white !important;
+}
+
+.calendar_date_select .cds_buttons {
+ text-align:center;
+ padding:5px 0px;
+ background-color: #555;
+}
+
+.calendar_date_select .cds_footer {
+ background-color: black;
+ padding:3px;
+ font-size:12px;
+ text-align:center;
+}
+
+.calendar_date_select table {
+ margin: 0px;
+ padding: 0px;
+}
+
+
+.calendar_date_select .cds_header {
+ background-color: #ccc;
+ border-bottom: 2px solid #aaa;
+ text-align:center;
+}
+
+.calendar_date_select .cds_header span {
+ font-size:15px;
+ color: black;
+ font-weight: bold;
+}
+
+.calendar_date_select select { font-size:11px;}
+
+.calendar_date_select .cds_header a:hover {
+ color: white;
+}
+.calendar_date_select .cds_header a {
+ width:22px;
+ height:20px;
+ text-decoration: none;
+ font-size:14px;
+ color:black !important;
+}
+
+.calendar_date_select .cds_header a.prev {
+ float:left;
+}
+.calendar_date_select .cds_header a.next {
+ float:right;
+}
+.calendar_date_select .cds_header a.close {
+ float:right;
+ display:none;
+}
+
+.calendar_date_select .cds_header select.month {
+ width:90px;
+}
+
+.calendar_date_select .cds_header select.year {
+ width:61px;
+}
+
+.calendar_date_select .cds_buttons a {
+ color: white;
+ font-size: 9px;
+}
+.calendar_date_select td {
+ font-size:12px;
+ width: 24px;
+ height: 21px;
+ text-align:center;
+ vertical-align: middle;
+ background-color: #666666;
+}
+.calendar_date_select td.weekend {
+ background-color: #606060;
+}
+
+.calendar_date_select td div {
+ color: #fff;
+}
+.calendar_date_select td div.other {
+ color: #888;
+}
+.calendar_date_select td.selected div {
+ color:black;
+}
+
+.calendar_date_select tbody td {
+ border-bottom: 1px solid #555;
+}
+.calendar_date_select td.selected {
+ background-color:white;
+}
+
+.calendar_date_select td:hover {
+ background-color:#ccc;
+}
+
+.calendar_date_select td.today {
+ border: 1px dashed #999;
+}
+
+.calendar_date_select td.disabled div {
+ color: #454545;
+}
+
+
+.fieldWithErrors .calendar_date_select {
+ border: 2px solid red;
+}
diff --git a/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/ColReorder.min.js b/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/ColReorder.min.js
new file mode 100644
index 00000000..111f4b81
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/ColReorder.min.js
@@ -0,0 +1,33 @@
+/*
+ * File: ColReorder.min.js
+ * Version: 1.0.8
+ * Author: Allan Jardine (www.sprymedia.co.uk)
+ *
+ * Copyright 2010-2012 Allan Jardine, all rights reserved.
+ *
+ * This source file is free software, under either the GPL v2 license or a
+ * BSD (3 point) style license, as supplied with this software.
+ *
+ * This source file is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
+ */
+(function(f,o,g){function m(a){for(var b=[],d=0,c=a.length;d<c;d++)b[a[d]]=d;return b}function j(a,b,d){b=a.splice(b,1)[0];a.splice(d,0,b)}function n(a,b,d){for(var c=[],e=0,f=a.childNodes.length;e<f;e++)1==a.childNodes[e].nodeType&&c.push(a.childNodes[e]);b=c[b];null!==d?a.insertBefore(b,c[d]):a.appendChild(b)}f.fn.dataTableExt.oApi.fnColReorder=function(a,b,d){var c,e,h,l,k=a.aoColumns.length,i;if(b!=d)if(0>b||b>=k)this.oApi._fnLog(a,1,"ColReorder 'from' index is out of bounds: "+b);else if(0>d||
+d>=k)this.oApi._fnLog(a,1,"ColReorder 'to' index is out of bounds: "+d);else{var g=[];c=0;for(e=k;c<e;c++)g[c]=c;j(g,b,d);g=m(g);c=0;for(e=a.aaSorting.length;c<e;c++)a.aaSorting[c][0]=g[a.aaSorting[c][0]];if(null!==a.aaSortingFixed){c=0;for(e=a.aaSortingFixed.length;c<e;c++)a.aaSortingFixed[c][0]=g[a.aaSortingFixed[c][0]]}c=0;for(e=k;c<e;c++){i=a.aoColumns[c];h=0;for(l=i.aDataSort.length;h<l;h++)i.aDataSort[h]=g[i.aDataSort[h]]}c=0;for(e=k;c<e;c++)i=a.aoColumns[c],"number"==typeof i.mData&&(i.mData=
+g[i.mData],i.fnGetData=a.oApi._fnGetObjectDataFn(i.mData),i.fnSetData=a.oApi._fnSetObjectDataFn(i.mData));if(a.aoColumns[b].bVisible){l=this.oApi._fnColumnIndexToVisible(a,b);i=null;for(c=d<b?d:d+1;null===i&&c<k;)i=this.oApi._fnColumnIndexToVisible(a,c),c++;h=a.nTHead.getElementsByTagName("tr");c=0;for(e=h.length;c<e;c++)n(h[c],l,i);if(null!==a.nTFoot){h=a.nTFoot.getElementsByTagName("tr");c=0;for(e=h.length;c<e;c++)n(h[c],l,i)}c=0;for(e=a.aoData.length;c<e;c++)null!==a.aoData[c].nTr&&n(a.aoData[c].nTr,
+l,i)}j(a.aoColumns,b,d);j(a.aoPreSearchCols,b,d);c=0;for(e=a.aoData.length;c<e;c++)f.isArray(a.aoData[c]._aData)&&j(a.aoData[c]._aData,b,d),j(a.aoData[c]._anHidden,b,d);c=0;for(e=a.aoHeader.length;c<e;c++)j(a.aoHeader[c],b,d);if(null!==a.aoFooter){c=0;for(e=a.aoFooter.length;c<e;c++)j(a.aoFooter[c],b,d)}c=0;for(e=k;c<e;c++)f(a.aoColumns[c].nTh).unbind("click"),this.oApi._fnSortAttachListener(a,a.aoColumns[c].nTh,c);f(a.oInstance).trigger("column-reorder",[a,{iFrom:b,iTo:d,aiInvertMapping:g}]);"undefined"!=
+typeof a.oInstance._oPluginFixedHeader&&a.oInstance._oPluginFixedHeader.fnUpdate()}};ColReorder=function(a,b){(!this.CLASS||"ColReorder"!=this.CLASS)&&alert("Warning: ColReorder must be initialised with the keyword 'new'");"undefined"==typeof b&&(b={});this.s={dt:null,init:b,fixed:0,dropCallback:null,mouse:{startX:-1,startY:-1,offsetX:-1,offsetY:-1,target:-1,targetIndex:-1,fromIndex:-1},aoTargets:[]};this.dom={drag:null,pointer:null};this.s.dt=a.oInstance.fnSettings();this._fnConstruct();a.oApi._fnCallbackReg(a,
+"aoDestroyCallback",jQuery.proxy(this._fnDestroy,this),"ColReorder");ColReorder.aoInstances.push(this);return this};ColReorder.prototype={fnReset:function(){for(var a=[],b=0,d=this.s.dt.aoColumns.length;b<d;b++)a.push(this.s.dt.aoColumns[b]._ColReorder_iOrigCol);this._fnOrderColumns(a)},_fnConstruct:function(){var a=this,b,d;"undefined"!=typeof this.s.init.iFixedColumns&&(this.s.fixed=this.s.init.iFixedColumns);"undefined"!=typeof this.s.init.fnReorderCallback&&(this.s.dropCallback=this.s.init.fnReorderCallback);
+b=0;for(d=this.s.dt.aoColumns.length;b<d;b++)b>this.s.fixed-1&&this._fnMouseListener(b,this.s.dt.aoColumns[b].nTh),this.s.dt.aoColumns[b]._ColReorder_iOrigCol=b;this.s.dt.oApi._fnCallbackReg(this.s.dt,"aoStateSaveParams",function(c,b){a._fnStateSave.call(a,b)},"ColReorder_State");var c=null;"undefined"!=typeof this.s.init.aiOrder&&(c=this.s.init.aiOrder.slice());this.s.dt.oLoadedState&&("undefined"!=typeof this.s.dt.oLoadedState.ColReorder&&this.s.dt.oLoadedState.ColReorder.length==this.s.dt.aoColumns.length)&&
+(c=this.s.dt.oLoadedState.ColReorder);if(c)if(a.s.dt._bInitComplete)b=m(c),a._fnOrderColumns.call(a,b);else{var e=!1;this.s.dt.aoDrawCallback.push({fn:function(){if(!a.s.dt._bInitComplete&&!e){e=true;var b=m(c);a._fnOrderColumns.call(a,b)}},sName:"ColReorder_Pre"})}},_fnOrderColumns:function(a){if(a.length!=this.s.dt.aoColumns.length)this.s.dt.oInstance.oApi._fnLog(this.s.dt,1,"ColReorder - array reorder does not match known number of columns. Skipping.");else{for(var b=0,d=a.length;b<d;b++){var c=
+f.inArray(b,a);b!=c&&(j(a,c,b),this.s.dt.oInstance.fnColReorder(c,b))}(""!==this.s.dt.oScroll.sX||""!==this.s.dt.oScroll.sY)&&this.s.dt.oInstance.fnAdjustColumnSizing();this.s.dt.oInstance.oApi._fnSaveState(this.s.dt)}},_fnStateSave:function(a){var b,d,c,e=this.s.dt;for(b=0;b<a.aaSorting.length;b++)a.aaSorting[b][0]=e.aoColumns[a.aaSorting[b][0]]._ColReorder_iOrigCol;aSearchCopy=f.extend(!0,[],a.aoSearchCols);a.ColReorder=[];b=0;for(d=e.aoColumns.length;b<d;b++)c=e.aoColumns[b]._ColReorder_iOrigCol,
+a.aoSearchCols[c]=aSearchCopy[b],a.abVisCols[c]=e.aoColumns[b].bVisible,a.ColReorder.push(c)},_fnMouseListener:function(a,b){var d=this;f(b).bind("mousedown.ColReorder",function(a){a.preventDefault();d._fnMouseDown.call(d,a,b)})},_fnMouseDown:function(a,b){var d=this,c=this.s.dt.aoColumns,e="TH"==a.target.nodeName?a.target:f(a.target).parents("TH")[0],e=f(e).offset();this.s.mouse.startX=a.pageX;this.s.mouse.startY=a.pageY;this.s.mouse.offsetX=a.pageX-e.left;this.s.mouse.offsetY=a.pageY-e.top;this.s.mouse.target=
+b;this.s.mouse.targetIndex=f("th",b.parentNode).index(b);this.s.mouse.fromIndex=this.s.dt.oInstance.oApi._fnVisibleToColumnIndex(this.s.dt,this.s.mouse.targetIndex);this.s.aoTargets.splice(0,this.s.aoTargets.length);this.s.aoTargets.push({x:f(this.s.dt.nTable).offset().left,to:0});for(var h=e=0,j=c.length;h<j;h++)h!=this.s.mouse.fromIndex&&e++,c[h].bVisible&&this.s.aoTargets.push({x:f(c[h].nTh).offset().left+f(c[h].nTh).outerWidth(),to:e});0!==this.s.fixed&&this.s.aoTargets.splice(0,this.s.fixed);
+f(g).bind("mousemove.ColReorder",function(a){d._fnMouseMove.call(d,a)});f(g).bind("mouseup.ColReorder",function(a){d._fnMouseUp.call(d,a)})},_fnMouseMove:function(a){if(null===this.dom.drag){if(5>Math.pow(Math.pow(a.pageX-this.s.mouse.startX,2)+Math.pow(a.pageY-this.s.mouse.startY,2),0.5))return;this._fnCreateDragNode()}this.dom.drag.style.left=a.pageX-this.s.mouse.offsetX+"px";this.dom.drag.style.top=a.pageY-this.s.mouse.offsetY+"px";for(var b=!1,d=1,c=this.s.aoTargets.length;d<c;d++)if(a.pageX<
+this.s.aoTargets[d-1].x+(this.s.aoTargets[d].x-this.s.aoTargets[d-1].x)/2){this.dom.pointer.style.left=this.s.aoTargets[d-1].x+"px";this.s.mouse.toIndex=this.s.aoTargets[d-1].to;b=!0;break}b||(this.dom.pointer.style.left=this.s.aoTargets[this.s.aoTargets.length-1].x+"px",this.s.mouse.toIndex=this.s.aoTargets[this.s.aoTargets.length-1].to)},_fnMouseUp:function(){f(g).unbind("mousemove.ColReorder");f(g).unbind("mouseup.ColReorder");null!==this.dom.drag&&(g.body.removeChild(this.dom.drag),g.body.removeChild(this.dom.pointer),
+this.dom.drag=null,this.dom.pointer=null,this.s.dt.oInstance.fnColReorder(this.s.mouse.fromIndex,this.s.mouse.toIndex),(""!==this.s.dt.oScroll.sX||""!==this.s.dt.oScroll.sY)&&this.s.dt.oInstance.fnAdjustColumnSizing(),null!==this.s.dropCallback&&this.s.dropCallback.call(this),this.s.dt.oInstance.oApi._fnSaveState(this.s.dt))},_fnCreateDragNode:function(){var a=this;this.dom.drag=f(this.s.dt.nTHead.parentNode).clone(!0)[0];for(this.dom.drag.className+=" DTCR_clonedTable";0<this.dom.drag.getElementsByTagName("caption").length;)this.dom.drag.removeChild(this.dom.drag.getElementsByTagName("caption")[0]);
+for(;0<this.dom.drag.getElementsByTagName("tbody").length;)this.dom.drag.removeChild(this.dom.drag.getElementsByTagName("tbody")[0]);for(;0<this.dom.drag.getElementsByTagName("tfoot").length;)this.dom.drag.removeChild(this.dom.drag.getElementsByTagName("tfoot")[0]);f("thead tr:eq(0)",this.dom.drag).each(function(){f("th",this).eq(a.s.mouse.targetIndex).siblings().remove()});f("tr",this.dom.drag).height(f("tr:eq(0)",a.s.dt.nTHead).height());f("thead tr:gt(0)",this.dom.drag).remove();f("thead th:eq(0)",
+this.dom.drag).each(function(){this.style.width=f("th:eq("+a.s.mouse.targetIndex+")",a.s.dt.nTHead).width()+"px"});this.dom.drag.style.position="absolute";this.dom.drag.style.top="0px";this.dom.drag.style.left="0px";this.dom.drag.style.width=f("th:eq("+a.s.mouse.targetIndex+")",a.s.dt.nTHead).outerWidth()+"px";this.dom.pointer=g.createElement("div");this.dom.pointer.className="DTCR_pointer";this.dom.pointer.style.position="absolute";""===this.s.dt.oScroll.sX&&""===this.s.dt.oScroll.sY?(this.dom.pointer.style.top=
+f(this.s.dt.nTable).offset().top+"px",this.dom.pointer.style.height=f(this.s.dt.nTable).height()+"px"):(this.dom.pointer.style.top=f("div.dataTables_scroll",this.s.dt.nTableWrapper).offset().top+"px",this.dom.pointer.style.height=f("div.dataTables_scroll",this.s.dt.nTableWrapper).height()+"px");g.body.appendChild(this.dom.pointer);g.body.appendChild(this.dom.drag)},_fnDestroy:function(){for(var a=0,b=ColReorder.aoInstances.length;a<b;a++)if(ColReorder.aoInstances[a]===this){ColReorder.aoInstances.splice(a,
+1);break}f(this.s.dt.nTHead).find("*").unbind(".ColReorder");this.s=this.s.dt.oInstance._oPluginColReorder=null}};ColReorder.aoInstances=[];ColReorder.fnReset=function(a){for(var b=0,d=ColReorder.aoInstances.length;b<d;b++)ColReorder.aoInstances[b].s.dt.oInstance==a&&ColReorder.aoInstances[b].fnReset()};ColReorder.prototype.CLASS="ColReorder";ColReorder.VERSION="1.0.8";ColReorder.prototype.VERSION=ColReorder.VERSION;"function"==typeof f.fn.dataTable&&"function"==typeof f.fn.dataTableExt.fnVersionCheck&&
+f.fn.dataTableExt.fnVersionCheck("1.9.3")?f.fn.dataTableExt.aoFeatures.push({fnInit:function(a){var b=a.oInstance;"undefined"==typeof b._oPluginColReorder?b._oPluginColReorder=new ColReorder(a,"undefined"!=typeof a.oInit.oColReorder?a.oInit.oColReorder:{}):b.oApi._fnLog(a,1,"ColReorder attempted to initialise twice. Ignoring second");return null},cFeature:"R",sFeature:"ColReorder"}):alert("Warning: ColReorder requires DataTables 1.9.3 or greater - www.datatables.net/download")})(jQuery,window,document);
diff --git a/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/css/ColReorder.css b/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/css/ColReorder.css
new file mode 100644
index 00000000..9c597e34
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/css/ColReorder.css
@@ -0,0 +1,21 @@
+/*
+ * Namespace DTCR - "DataTables ColReorder" plug-in
+ */
+
+table.DTCR_clonedTable {
+ background-color: white;
+ z-index: 202;
+}
+
+div.DTCR_pointer {
+ width: 1px;
+ background-color: #0259C4;
+ z-index: 201;
+}
+
+body.alt div.DTCR_pointer {
+ margin-top: -15px;
+ margin-left: -9px;
+ width: 18px;
+ background: url('../images/insert.png') no-repeat top left;
+} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/css/jquery.dataTables.css b/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/css/jquery.dataTables.css
new file mode 100644
index 00000000..7da7faec
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/css/jquery.dataTables.css
@@ -0,0 +1,221 @@
+
+/*
+ * Table
+ */
+table.dataTable {
+ margin: 0 auto;
+ clear: both;
+ width: 100%;
+}
+
+table.dataTable thead th {
+ padding: 3px 18px 3px 10px;
+ border-bottom: 1px solid black;
+ font-weight: bold;
+ cursor: pointer;
+ *cursor: hand;
+}
+
+table.dataTable tfoot th {
+ padding: 3px 18px 3px 10px;
+ border-top: 1px solid black;
+ font-weight: bold;
+}
+
+table.dataTable td {
+ padding: 3px 10px;
+}
+
+table.dataTable td.center,
+table.dataTable td.dataTables_empty {
+ text-align: center;
+}
+
+table.dataTable tr.odd { background-color: #E2E4FF; }
+table.dataTable tr.even { background-color: white; }
+
+table.dataTable tr.odd td.sorting_1 { background-color: #D3D6FF; }
+table.dataTable tr.odd td.sorting_2 { background-color: #DADCFF; }
+table.dataTable tr.odd td.sorting_3 { background-color: #E0E2FF; }
+table.dataTable tr.even td.sorting_1 { background-color: #EAEBFF; }
+table.dataTable tr.even td.sorting_2 { background-color: #F2F3FF; }
+table.dataTable tr.even td.sorting_3 { background-color: #F9F9FF; }
+
+
+/*
+ * Table wrapper
+ */
+.dataTables_wrapper {
+ position: relative;
+ clear: both;
+ *zoom: 1;
+}
+
+
+/*
+ * Page length menu
+ */
+.dataTables_length {
+ float: left;
+}
+
+
+/*
+ * Filter
+ */
+.dataTables_filter {
+ float: right;
+ text-align: right;
+}
+
+
+/*
+ * Table information
+ */
+.dataTables_info {
+ clear: both;
+ float: left;
+}
+
+
+/*
+ * Pagination
+ */
+.dataTables_paginate {
+ float: right;
+ text-align: right;
+}
+
+/* Two button pagination - previous / next */
+.paginate_disabled_previous,
+.paginate_enabled_previous,
+.paginate_disabled_next,
+.paginate_enabled_next {
+ height: 19px;
+ float: left;
+ cursor: pointer;
+ *cursor: hand;
+ color: #111 !important;
+}
+.paginate_disabled_previous:hover,
+.paginate_enabled_previous:hover,
+.paginate_disabled_next:hover,
+.paginate_enabled_next:hover {
+ text-decoration: none !important;
+}
+.paginate_disabled_previous:active,
+.paginate_enabled_previous:active,
+.paginate_disabled_next:active,
+.paginate_enabled_next:active {
+ outline: none;
+}
+
+.paginate_disabled_previous,
+.paginate_disabled_next {
+ color: #666 !important;
+}
+.paginate_disabled_previous,
+.paginate_enabled_previous {
+ padding-left: 23px;
+}
+.paginate_disabled_next,
+.paginate_enabled_next {
+ padding-right: 23px;
+ margin-left: 10px;
+}
+
+.paginate_enabled_previous { background: url('../images/back_enabled.png') no-repeat top left; }
+.paginate_enabled_previous:hover { background: url('../images/back_enabled_hover.png') no-repeat top left; }
+.paginate_disabled_previous { background: url('../images/back_disabled.png') no-repeat top left; }
+
+.paginate_enabled_next { background: url('../images/forward_enabled.png') no-repeat top right; }
+.paginate_enabled_next:hover { background: url('../images/forward_enabled_hover.png') no-repeat top right; }
+.paginate_disabled_next { background: url('../images/forward_disabled.png') no-repeat top right; }
+
+/* Full number pagination */
+.paging_full_numbers {
+ height: 22px;
+ line-height: 22px;
+}
+.paging_full_numbers a:active {
+ outline: none
+}
+.paging_full_numbers a:hover {
+ text-decoration: none;
+}
+
+.paging_full_numbers a.paginate_button,
+.paging_full_numbers a.paginate_active {
+ border: 1px solid #aaa;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+ padding: 2px 5px;
+ margin: 0 3px;
+ cursor: pointer;
+ *cursor: hand;
+ color: #333 !important;
+}
+
+.paging_full_numbers a.paginate_button {
+ background-color: #ddd;
+}
+
+.paging_full_numbers a.paginate_button:hover {
+ background-color: #ccc;
+ text-decoration: none !important;
+}
+
+.paging_full_numbers a.paginate_active {
+ background-color: #99B3FF;
+}
+
+
+/*
+ * Processing indicator
+ */
+.dataTables_processing {
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ width: 250px;
+ height: 30px;
+ margin-left: -125px;
+ margin-top: -15px;
+ padding: 14px 0 2px 0;
+ border: 1px solid #ddd;
+ text-align: center;
+ color: #999;
+ font-size: 14px;
+ background-color: white;
+}
+
+
+/*
+ * Sorting
+ */
+.sorting { background: url('../images/sort_both.png') no-repeat center right; }
+.sorting_asc { background: url('../images/sort_asc.png') no-repeat center right; }
+.sorting_desc { background: url('../images/sort_desc.png') no-repeat center right; }
+
+.sorting_asc_disabled { background: url('../images/sort_asc_disabled.png') no-repeat center right; }
+.sorting_desc_disabled { background: url('../images/sort_desc_disabled.png') no-repeat center right; }
+
+table.dataTable thead th:active,
+table.dataTable thead td:active {
+ outline: none;
+}
+
+
+/*
+ * Scrolling
+ */
+.dataTables_scroll {
+ clear: both;
+}
+
+.dataTables_scrollBody {
+ *margin-top: -1px;
+ -webkit-overflow-scrolling: touch;
+}
+
diff --git a/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/back_disabled.png b/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/back_disabled.png
new file mode 100644
index 00000000..881de797
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/back_disabled.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/back_enabled.png b/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/back_enabled.png
new file mode 100644
index 00000000..c608682b
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/back_enabled.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/back_enabled_hover.png b/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/back_enabled_hover.png
new file mode 100644
index 00000000..d300f106
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/back_enabled_hover.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/forward_disabled.png b/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/forward_disabled.png
new file mode 100644
index 00000000..6a6ded7d
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/forward_disabled.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/forward_enabled.png b/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/forward_enabled.png
new file mode 100644
index 00000000..a4e6b538
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/forward_enabled.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/forward_enabled_hover.png b/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/forward_enabled_hover.png
new file mode 100644
index 00000000..fc46c5eb
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/forward_enabled_hover.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/insert.png b/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/insert.png
new file mode 100644
index 00000000..15d5522d
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/insert.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/sort_asc.png b/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/sort_asc.png
new file mode 100644
index 00000000..a88d7975
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/sort_asc.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/sort_asc_disabled.png b/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/sort_asc_disabled.png
new file mode 100644
index 00000000..4e144cf0
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/sort_asc_disabled.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/sort_both.png b/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/sort_both.png
new file mode 100644
index 00000000..18670406
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/sort_both.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/sort_desc.png b/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/sort_desc.png
new file mode 100644
index 00000000..def071ed
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/sort_desc.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/sort_desc_disabled.png b/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/sort_desc_disabled.png
new file mode 100644
index 00000000..7824973c
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/sort_desc_disabled.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/unchecked.gif b/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/unchecked.gif
new file mode 100644
index 00000000..06ecaba1
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/images/unchecked.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/jquery.dataTables.columnFilter.js b/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/jquery.dataTables.columnFilter.js
new file mode 100644
index 00000000..cc0cd690
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/jquery.dataTables.columnFilter.js
@@ -0,0 +1,365 @@
+/*
+* File: jquery.dataTables.columnFilter.js
+* Version: 0.9.0
+* Author: Jovan Popovic
+*
+* Copyright 2011 Jovan Popovic, all rights reserved.
+*
+* This source file is free software, under either the GPL v2 license or a
+* BSD style license, as supplied with this software.
+*
+* This source file is distributed in the hope that it will be useful, but
+* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+* or FITNESS FOR A PARTICULAR PURPOSE.
+*
+* Parameters:
+* @sPlaceHolder String Place where inline filtering function should be place ("tfoot", "thead"). Default is "tfoot"
+* @sRangeSeparator String Separatot that will be used when range values are sent to the server-side. Default value is "~".
+* @iFilteringDelay int TODO: Delay that will be set between the filtering requests. Default is 250.
+* @sRangeFormat string Default format of the From ... to ... range inputs. Default is From {from} to {to}
+* @aoColumns Array Array of the filter settings that will be applied on the columns
+
+http://www.datatables.net/plug-ins/filtering
+
+*/
+(function ($) {
+
+
+
+
+
+
+ var asInitVals, i, label, th;
+
+ var sTableId = "table";
+ var sRangeFormat = "From {from} to {to}";
+ //Array of the functions that will override sSearch_ parameters
+ var afnSearch_ = new Array();
+ var aiCustomSearch_Indexes = new Array();
+
+ var oFunctionTimeout = null;
+
+
+ function fnCreateInput(regex, smart, bIsNumber) {
+ var sCSSClass = "text_filter";
+ if (bIsNumber)
+ sCSSClass = "number_filter";
+ var input = $('<input type="text" class="search_init ' + sCSSClass + '" value="' + label + '"/>');
+ th.html(input);
+ if (bIsNumber)
+ th.wrapInner('<span class="filter_column filter_number" />');
+ else
+ th.wrapInner('<span class="filter_column filter_text" />');
+ asInitVals[i] = label;
+ var index = i;
+
+ if (bIsNumber && !oTable.fnSettings().oFeatures.bServerSide) {
+ input.keyup(function () {
+ /* Filter on the column all numbers that starts with the entered value */
+ oTable.fnFilter('^' + this.value, index, true, false);
+ });
+ } else {
+ input.keyup(function () {
+ /* Filter on the column (the index) of this element */
+ oTable.fnFilter(this.value, index, regex, smart);
+ });
+ }
+
+ input.focus(function () {
+ if ($(this).hasClass("search_init")) {
+ $(this).removeClass("search_init");
+ this.value = "";
+ }
+ });
+ input.blur(function () {
+ if (this.value == "") {
+ $(this).addClass("search_init");
+ this.value = asInitVals[index];
+ }
+ });
+ }
+
+ function fnCreateRangeInput() {
+
+ th.html(_fnRangeLabelPart(0));
+ var sFromId = sTableId + 'range_from_' + i;
+ var from = $('<input type="text" class="number_range_filter" id="' + sFromId + '" rel="' + i + '"/>');
+ th.append(from);
+ th.append(_fnRangeLabelPart(1));
+ var sToId = sTableId + 'range_to_' + i;
+ var to = $('<input type="text" class="number_range_filter" id="' + sToId + '" rel="' + i + '"/>');
+ th.append(to);
+ th.append(_fnRangeLabelPart(2));
+ th.wrapInner('<span class="filterColumn filter_number_range" />');
+ var index = i;
+ aiCustomSearch_Indexes.push(i);
+
+
+
+ //------------start range filtering function
+
+
+ /* Custom filtering function which will filter data in column four between two values
+ * Author: Allan Jardine, Modified by Jovan Popovic
+ */
+ $.fn.dataTableExt.afnFiltering.push(
+ function (oSettings, aData, iDataIndex) {
+ var iMin = document.getElementById(sFromId).value * 1;
+ var iMax = document.getElementById(sToId).value * 1;
+ var iValue = aData[index] == "-" ? 0 : aData[index] * 1;
+ if (iMin == "" && iMax == "") {
+ return true;
+ }
+ else if (iMin == "" && iValue < iMax) {
+ return true;
+ }
+ else if (iMin < iValue && "" == iMax) {
+ return true;
+ }
+ else if (iMin < iValue && iValue < iMax) {
+ return true;
+ }
+ return false;
+ }
+ );
+ //------------end range filtering function
+
+
+
+ $('#' + sFromId + ',#' + sToId, th).keyup(function () {
+
+ var iMin = document.getElementById(sFromId).value * 1;
+ var iMax = document.getElementById(sToId).value * 1;
+ if (iMin != 0 && iMax != 0 && iMin > iMax)
+ return;
+
+ oTable.fnDraw();
+
+ });
+
+
+ }
+
+
+ function fnCreateDateRangeInput() {
+
+ th.html(_fnRangeLabelPart(0));
+ var sFromId = sTableId + 'range_from_' + i;
+ var from = $('<input type="text" class="date_range_filter" id="' + sFromId + '" rel="' + i + '"/>');
+ from.datepicker();
+ th.append(from);
+ th.append(_fnRangeLabelPart(1));
+ var sToId = sTableId + 'range_to_' + i;
+ var to = $('<input type="text" class="date_range_filter" id="' + sToId + '" rel="' + i + '"/>');
+ th.append(to);
+ th.append(_fnRangeLabelPart(2));
+ th.wrapInner('<span class="filterColumn filter_date_range" />');
+ to.datepicker();
+ var index = i;
+ aiCustomSearch_Indexes.push(i);
+
+
+ //------------start date range filtering function
+
+ $.fn.dataTableExt.afnFiltering.push(
+ function (oSettings, aData, iDataIndex) {
+ var dStartDate = from.datepicker("getDate");
+
+ var dEndDate = to.datepicker("getDate");
+
+ var dCellDate = $.datepicker.parseDate($.datepicker.regional[""].dateFormat, aData[index]);
+
+ if (dCellDate == null)
+ return false;
+
+ if (dStartDate == null && dEndDate == null) {
+ return true;
+ }
+ else if (dStartDate == null && dCellDate < dEndDate) {
+ return true;
+ }
+ else if (dStartDate < dCellDate && dEndDate == null) {
+ return true;
+ }
+ else if (dStartDate < dCellDate && dCellDate < dEndDate) {
+ return true;
+ }
+ return false;
+ }
+ );
+ //------------end date range filtering function
+
+ $('#' + sFromId + ',#' + sToId, th).change(function () {
+ oTable.fnDraw();
+ });
+
+
+ }
+
+
+ function fnCreateSelect(aData) {
+ var index = i;
+ var r = '<select class="search_init select_filter"><option value="" class="search_init">' + label + '</option>', j, iLen = aData.length;
+
+ for (j = 0; j < iLen; j++) {
+ r += '<option value="' + aData[j] + '">' + aData[j] + '</option>';
+ }
+ var select = $(r + '</select>');
+ th.html(select);
+ th.wrapInner('<span class="filterColumn filter_select" />');
+ select.change(function () {
+ //var val = $(this).val();
+ if ($(this).val() != "") {
+ $(this).removeClass("search_init");
+ } else {
+ $(this).addClass("search_init");
+ }
+ oTable.fnFilter($(this).val(), index);
+ });
+ }
+
+ function _fnRangeLabelPart(iPlace){
+ switch(iPlace){
+ case 0:
+ return sRangeFormat.substring(0, sRangeFormat.indexOf("{from}"));
+ case 1:
+ return sRangeFormat.substring(sRangeFormat.indexOf("{from}") + 6, sRangeFormat.indexOf("{to}"));
+ default:
+ return sRangeFormat.substring(sRangeFormat.indexOf("{to}") + 4);
+ }
+ }
+
+
+ $.fn.columnFilter = function (options) {
+
+ oTable = this;
+
+ var defaults = {
+ sPlaceHolder: "foot",
+ sRangeSeparator: "~",
+ iFilteringDelay: 500,
+ aoColumns: null,
+ sRangeFormat: "From {from} to {to}"
+
+ };
+
+ properties = $.extend(defaults, options);
+
+ return this.each(function () {
+
+ asInitVals = new Array();
+ var sFilterRow = "tfoot tr";
+ if (properties.sPlaceHolder == "head:after") {
+ sFilterRow = "thead tr:last";
+ } else if (properties.sPlaceHolder == "head:before") {
+ var tr = $("thead tr:last").detach();
+ tr.prependTo("thead");
+ sFilterRow = "thead tr:first";
+ }
+
+ $(sFilterRow + " th", oTable).each(function (index) {
+ i = index;
+ var aoColumn = { type: "text",
+ bRegex: false,
+ bSmart: true
+ };
+ if (properties.aoColumns != null) {
+ if (properties.aoColumns.length < i || properties.aoColumns[i] == null)
+ return;
+ aoColumn = properties.aoColumns[i];
+ }
+ label = $(this).text(); //"Search by " + $(this).text();
+ th = $($(this)[0]);
+ if (aoColumn != null) {
+ if (aoColumn.sRangeFormat != null)
+ sRangeFormat = aoColumn.sRangeFormat;
+ else
+ sRangeFormat = properties.sRangeFormat
+ switch (aoColumn.type) {
+ case "number":
+ fnCreateInput(true, false, true);
+ break;
+ case "text":
+ bRegex = (aoColumn.bRegex == null ? false : aoColumn.bRegex);
+ bSmart = (aoColumn.bSmart == null ? false : aoColumn.bSmart);
+ fnCreateInput(bRegex, bSmart, false);
+ break;
+ case "select":
+ fnCreateSelect(aoColumn.values);
+ break;
+ case "number-range":
+ fnCreateRangeInput();
+ break;
+ case "date-range":
+ fnCreateDateRangeInput();
+
+ break;
+ default:
+ break;
+
+ }
+ }
+ });
+
+ for (j = 0; j < aiCustomSearch_Indexes.length; j++) {
+ var index = aiCustomSearch_Indexes[j];
+ var fnSearch_ = function () {
+ return $("#range_from_" + index).val() + properties.sRangeSeparator + $("#range_to_" + index).val()
+ }
+ afnSearch_.push(fnSearch_);
+ }
+
+ if (oTable.fnSettings().oFeatures.bServerSide) {
+
+ var fnServerDataOriginal = oTable.fnSettings().fnServerData;
+
+ oTable.fnSettings().fnServerData = function (sSource, aoData, fnCallback) {
+
+ for (j = 0; j < aiCustomSearch_Indexes.length; j++) {
+ var index = aiCustomSearch_Indexes[j];
+
+ for (k = 0; k < aoData.length; k++) {
+ if (aoData[k].name == "sSearch_" + index)
+ aoData[k].value = afnSearch_[j]();
+ }
+ }
+ aoData.push({ "name": "sRangeSeparator", "value": properties.sRangeSeparator });
+
+ if (fnServerDataOriginal != null) {
+ fnServerDataOriginal(sSource, aoData, fnCallback);
+ }
+ else {
+ $.getJSON(sSource, aoData, function (json) {
+ fnCallback(json)
+ });
+ }
+
+ /*
+ if (fnServerDataOriginal != null) {
+ if (properties.iDelay != 0) {
+ if (oFunctionTimeout != null)
+ window.clearTimeout(oFunctionTimeout);
+ oFunctionTimeout = window.setTimeout(function () {
+ fnServerDataOriginal(sSource, aoData, fnCallback);
+ }, properties.iDelay);
+ } else {
+ fnServerDataOriginal(sSource, aoData, fnCallback);
+ }
+ }
+ else
+ $.getJSON(sSource, aoData, function (json) {
+ fnCallback(json)
+ });
+ */
+ };
+
+ }
+
+ });
+
+ };
+
+
+
+
+})(jQuery); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/jquery.dataTables.min.js b/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/jquery.dataTables.min.js
new file mode 100644
index 00000000..02694a4a
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/jquery-dataTables/jquery.dataTables.min.js
@@ -0,0 +1,155 @@
+/*
+ * File: jquery.dataTables.min.js
+ * Version: 1.9.4
+ * Author: Allan Jardine (www.sprymedia.co.uk)
+ * Info: www.datatables.net
+ *
+ * Copyright 2008-2012 Allan Jardine, all rights reserved.
+ *
+ * This source file is free software, under either the GPL v2 license or a
+ * BSD style license, available at:
+ * http://datatables.net/license_gpl2
+ * http://datatables.net/license_bsd
+ *
+ * This source file is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
+ */
+(function(X,l,n){var L=function(h){var j=function(e){function o(a,b){var c=j.defaults.columns,d=a.aoColumns.length,c=h.extend({},j.models.oColumn,c,{sSortingClass:a.oClasses.sSortable,sSortingClassJUI:a.oClasses.sSortJUI,nTh:b?b:l.createElement("th"),sTitle:c.sTitle?c.sTitle:b?b.innerHTML:"",aDataSort:c.aDataSort?c.aDataSort:[d],mData:c.mData?c.oDefaults:d});a.aoColumns.push(c);if(a.aoPreSearchCols[d]===n||null===a.aoPreSearchCols[d])a.aoPreSearchCols[d]=h.extend({},j.models.oSearch);else if(c=a.aoPreSearchCols[d],
+c.bRegex===n&&(c.bRegex=!0),c.bSmart===n&&(c.bSmart=!0),c.bCaseInsensitive===n)c.bCaseInsensitive=!0;m(a,d,null)}function m(a,b,c){var d=a.aoColumns[b];c!==n&&null!==c&&(c.mDataProp&&!c.mData&&(c.mData=c.mDataProp),c.sType!==n&&(d.sType=c.sType,d._bAutoType=!1),h.extend(d,c),p(d,c,"sWidth","sWidthOrig"),c.iDataSort!==n&&(d.aDataSort=[c.iDataSort]),p(d,c,"aDataSort"));var i=d.mRender?Q(d.mRender):null,f=Q(d.mData);d.fnGetData=function(a,b){var c=f(a,b);return d.mRender&&b&&""!==b?i(c,b,a):c};d.fnSetData=
+L(d.mData);a.oFeatures.bSort||(d.bSortable=!1);!d.bSortable||-1==h.inArray("asc",d.asSorting)&&-1==h.inArray("desc",d.asSorting)?(d.sSortingClass=a.oClasses.sSortableNone,d.sSortingClassJUI=""):-1==h.inArray("asc",d.asSorting)&&-1==h.inArray("desc",d.asSorting)?(d.sSortingClass=a.oClasses.sSortable,d.sSortingClassJUI=a.oClasses.sSortJUI):-1!=h.inArray("asc",d.asSorting)&&-1==h.inArray("desc",d.asSorting)?(d.sSortingClass=a.oClasses.sSortableAsc,d.sSortingClassJUI=a.oClasses.sSortJUIAscAllowed):-1==
+h.inArray("asc",d.asSorting)&&-1!=h.inArray("desc",d.asSorting)&&(d.sSortingClass=a.oClasses.sSortableDesc,d.sSortingClassJUI=a.oClasses.sSortJUIDescAllowed)}function k(a){if(!1===a.oFeatures.bAutoWidth)return!1;da(a);for(var b=0,c=a.aoColumns.length;b<c;b++)a.aoColumns[b].nTh.style.width=a.aoColumns[b].sWidth}function G(a,b){var c=r(a,"bVisible");return"number"===typeof c[b]?c[b]:null}function R(a,b){var c=r(a,"bVisible"),c=h.inArray(b,c);return-1!==c?c:null}function t(a){return r(a,"bVisible").length}
+function r(a,b){var c=[];h.map(a.aoColumns,function(a,i){a[b]&&c.push(i)});return c}function B(a){for(var b=j.ext.aTypes,c=b.length,d=0;d<c;d++){var i=b[d](a);if(null!==i)return i}return"string"}function u(a,b){for(var c=b.split(","),d=[],i=0,f=a.aoColumns.length;i<f;i++)for(var g=0;g<f;g++)if(a.aoColumns[i].sName==c[g]){d.push(g);break}return d}function M(a){for(var b="",c=0,d=a.aoColumns.length;c<d;c++)b+=a.aoColumns[c].sName+",";return b.length==d?"":b.slice(0,-1)}function ta(a,b,c,d){var i,f,
+g,e,w;if(b)for(i=b.length-1;0<=i;i--){var j=b[i].aTargets;h.isArray(j)||D(a,1,"aTargets must be an array of targets, not a "+typeof j);f=0;for(g=j.length;f<g;f++)if("number"===typeof j[f]&&0<=j[f]){for(;a.aoColumns.length<=j[f];)o(a);d(j[f],b[i])}else if("number"===typeof j[f]&&0>j[f])d(a.aoColumns.length+j[f],b[i]);else if("string"===typeof j[f]){e=0;for(w=a.aoColumns.length;e<w;e++)("_all"==j[f]||h(a.aoColumns[e].nTh).hasClass(j[f]))&&d(e,b[i])}}if(c){i=0;for(a=c.length;i<a;i++)d(i,c[i])}}function H(a,
+b){var c;c=h.isArray(b)?b.slice():h.extend(!0,{},b);var d=a.aoData.length,i=h.extend(!0,{},j.models.oRow);i._aData=c;a.aoData.push(i);for(var f,i=0,g=a.aoColumns.length;i<g;i++)c=a.aoColumns[i],"function"===typeof c.fnRender&&c.bUseRendered&&null!==c.mData?F(a,d,i,S(a,d,i)):F(a,d,i,v(a,d,i)),c._bAutoType&&"string"!=c.sType&&(f=v(a,d,i,"type"),null!==f&&""!==f&&(f=B(f),null===c.sType?c.sType=f:c.sType!=f&&"html"!=c.sType&&(c.sType="string")));a.aiDisplayMaster.push(d);a.oFeatures.bDeferRender||ea(a,
+d);return d}function ua(a){var b,c,d,i,f,g,e;if(a.bDeferLoading||null===a.sAjaxSource)for(b=a.nTBody.firstChild;b;){if("TR"==b.nodeName.toUpperCase()){c=a.aoData.length;b._DT_RowIndex=c;a.aoData.push(h.extend(!0,{},j.models.oRow,{nTr:b}));a.aiDisplayMaster.push(c);f=b.firstChild;for(d=0;f;){g=f.nodeName.toUpperCase();if("TD"==g||"TH"==g)F(a,c,d,h.trim(f.innerHTML)),d++;f=f.nextSibling}}b=b.nextSibling}i=T(a);d=[];b=0;for(c=i.length;b<c;b++)for(f=i[b].firstChild;f;)g=f.nodeName.toUpperCase(),("TD"==
+g||"TH"==g)&&d.push(f),f=f.nextSibling;c=0;for(i=a.aoColumns.length;c<i;c++){e=a.aoColumns[c];null===e.sTitle&&(e.sTitle=e.nTh.innerHTML);var w=e._bAutoType,o="function"===typeof e.fnRender,k=null!==e.sClass,n=e.bVisible,m,p;if(w||o||k||!n){g=0;for(b=a.aoData.length;g<b;g++)f=a.aoData[g],m=d[g*i+c],w&&"string"!=e.sType&&(p=v(a,g,c,"type"),""!==p&&(p=B(p),null===e.sType?e.sType=p:e.sType!=p&&"html"!=e.sType&&(e.sType="string"))),e.mRender?m.innerHTML=v(a,g,c,"display"):e.mData!==c&&(m.innerHTML=v(a,
+g,c,"display")),o&&(p=S(a,g,c),m.innerHTML=p,e.bUseRendered&&F(a,g,c,p)),k&&(m.className+=" "+e.sClass),n?f._anHidden[c]=null:(f._anHidden[c]=m,m.parentNode.removeChild(m)),e.fnCreatedCell&&e.fnCreatedCell.call(a.oInstance,m,v(a,g,c,"display"),f._aData,g,c)}}if(0!==a.aoRowCreatedCallback.length){b=0;for(c=a.aoData.length;b<c;b++)f=a.aoData[b],A(a,"aoRowCreatedCallback",null,[f.nTr,f._aData,b])}}function I(a,b){return b._DT_RowIndex!==n?b._DT_RowIndex:null}function fa(a,b,c){for(var b=J(a,b),d=0,a=
+a.aoColumns.length;d<a;d++)if(b[d]===c)return d;return-1}function Y(a,b,c,d){for(var i=[],f=0,g=d.length;f<g;f++)i.push(v(a,b,d[f],c));return i}function v(a,b,c,d){var i=a.aoColumns[c];if((c=i.fnGetData(a.aoData[b]._aData,d))===n)return a.iDrawError!=a.iDraw&&null===i.sDefaultContent&&(D(a,0,"Requested unknown parameter "+("function"==typeof i.mData?"{mData function}":"'"+i.mData+"'")+" from the data source for row "+b),a.iDrawError=a.iDraw),i.sDefaultContent;if(null===c&&null!==i.sDefaultContent)c=
+i.sDefaultContent;else if("function"===typeof c)return c();return"display"==d&&null===c?"":c}function F(a,b,c,d){a.aoColumns[c].fnSetData(a.aoData[b]._aData,d)}function Q(a){if(null===a)return function(){return null};if("function"===typeof a)return function(b,d,i){return a(b,d,i)};if("string"===typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("["))){var b=function(a,d,i){var f=i.split("."),g;if(""!==i){var e=0;for(g=f.length;e<g;e++){if(i=f[e].match(U)){f[e]=f[e].replace(U,"");""!==f[e]&&(a=a[f[e]]);
+g=[];f.splice(0,e+1);for(var f=f.join("."),e=0,h=a.length;e<h;e++)g.push(b(a[e],d,f));a=i[0].substring(1,i[0].length-1);a=""===a?g:g.join(a);break}if(null===a||a[f[e]]===n)return n;a=a[f[e]]}}return a};return function(c,d){return b(c,d,a)}}return function(b){return b[a]}}function L(a){if(null===a)return function(){};if("function"===typeof a)return function(b,d){a(b,"set",d)};if("string"===typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("["))){var b=function(a,d,i){var i=i.split("."),f,g,e=0;for(g=
+i.length-1;e<g;e++){if(f=i[e].match(U)){i[e]=i[e].replace(U,"");a[i[e]]=[];f=i.slice();f.splice(0,e+1);g=f.join(".");for(var h=0,j=d.length;h<j;h++)f={},b(f,d[h],g),a[i[e]].push(f);return}if(null===a[i[e]]||a[i[e]]===n)a[i[e]]={};a=a[i[e]]}a[i[i.length-1].replace(U,"")]=d};return function(c,d){return b(c,d,a)}}return function(b,d){b[a]=d}}function Z(a){for(var b=[],c=a.aoData.length,d=0;d<c;d++)b.push(a.aoData[d]._aData);return b}function ga(a){a.aoData.splice(0,a.aoData.length);a.aiDisplayMaster.splice(0,
+a.aiDisplayMaster.length);a.aiDisplay.splice(0,a.aiDisplay.length);y(a)}function ha(a,b){for(var c=-1,d=0,i=a.length;d<i;d++)a[d]==b?c=d:a[d]>b&&a[d]--; -1!=c&&a.splice(c,1)}function S(a,b,c){var d=a.aoColumns[c];return d.fnRender({iDataRow:b,iDataColumn:c,oSettings:a,aData:a.aoData[b]._aData,mDataProp:d.mData},v(a,b,c,"display"))}function ea(a,b){var c=a.aoData[b],d;if(null===c.nTr){c.nTr=l.createElement("tr");c.nTr._DT_RowIndex=b;c._aData.DT_RowId&&(c.nTr.id=c._aData.DT_RowId);c._aData.DT_RowClass&&
+(c.nTr.className=c._aData.DT_RowClass);for(var i=0,f=a.aoColumns.length;i<f;i++){var g=a.aoColumns[i];d=l.createElement(g.sCellType);d.innerHTML="function"===typeof g.fnRender&&(!g.bUseRendered||null===g.mData)?S(a,b,i):v(a,b,i,"display");null!==g.sClass&&(d.className=g.sClass);g.bVisible?(c.nTr.appendChild(d),c._anHidden[i]=null):c._anHidden[i]=d;g.fnCreatedCell&&g.fnCreatedCell.call(a.oInstance,d,v(a,b,i,"display"),c._aData,b,i)}A(a,"aoRowCreatedCallback",null,[c.nTr,c._aData,b])}}function va(a){var b,
+c,d;if(0!==h("th, td",a.nTHead).length){b=0;for(d=a.aoColumns.length;b<d;b++)if(c=a.aoColumns[b].nTh,c.setAttribute("role","columnheader"),a.aoColumns[b].bSortable&&(c.setAttribute("tabindex",a.iTabIndex),c.setAttribute("aria-controls",a.sTableId)),null!==a.aoColumns[b].sClass&&h(c).addClass(a.aoColumns[b].sClass),a.aoColumns[b].sTitle!=c.innerHTML)c.innerHTML=a.aoColumns[b].sTitle}else{var i=l.createElement("tr");b=0;for(d=a.aoColumns.length;b<d;b++)c=a.aoColumns[b].nTh,c.innerHTML=a.aoColumns[b].sTitle,
+c.setAttribute("tabindex","0"),null!==a.aoColumns[b].sClass&&h(c).addClass(a.aoColumns[b].sClass),i.appendChild(c);h(a.nTHead).html("")[0].appendChild(i);V(a.aoHeader,a.nTHead)}h(a.nTHead).children("tr").attr("role","row");if(a.bJUI){b=0;for(d=a.aoColumns.length;b<d;b++){c=a.aoColumns[b].nTh;i=l.createElement("div");i.className=a.oClasses.sSortJUIWrapper;h(c).contents().appendTo(i);var f=l.createElement("span");f.className=a.oClasses.sSortIcon;i.appendChild(f);c.appendChild(i)}}if(a.oFeatures.bSort)for(b=
+0;b<a.aoColumns.length;b++)!1!==a.aoColumns[b].bSortable?ia(a,a.aoColumns[b].nTh,b):h(a.aoColumns[b].nTh).addClass(a.oClasses.sSortableNone);""!==a.oClasses.sFooterTH&&h(a.nTFoot).children("tr").children("th").addClass(a.oClasses.sFooterTH);if(null!==a.nTFoot){c=N(a,null,a.aoFooter);b=0;for(d=a.aoColumns.length;b<d;b++)c[b]&&(a.aoColumns[b].nTf=c[b],a.aoColumns[b].sClass&&h(c[b]).addClass(a.aoColumns[b].sClass))}}function W(a,b,c){var d,i,f,g=[],e=[],h=a.aoColumns.length,j;c===n&&(c=!1);d=0;for(i=
+b.length;d<i;d++){g[d]=b[d].slice();g[d].nTr=b[d].nTr;for(f=h-1;0<=f;f--)!a.aoColumns[f].bVisible&&!c&&g[d].splice(f,1);e.push([])}d=0;for(i=g.length;d<i;d++){if(a=g[d].nTr)for(;f=a.firstChild;)a.removeChild(f);f=0;for(b=g[d].length;f<b;f++)if(j=h=1,e[d][f]===n){a.appendChild(g[d][f].cell);for(e[d][f]=1;g[d+h]!==n&&g[d][f].cell==g[d+h][f].cell;)e[d+h][f]=1,h++;for(;g[d][f+j]!==n&&g[d][f].cell==g[d][f+j].cell;){for(c=0;c<h;c++)e[d+c][f+j]=1;j++}g[d][f].cell.rowSpan=h;g[d][f].cell.colSpan=j}}}function x(a){var b=
+A(a,"aoPreDrawCallback","preDraw",[a]);if(-1!==h.inArray(!1,b))E(a,!1);else{var c,d,b=[],i=0,f=a.asStripeClasses.length;c=a.aoOpenRows.length;a.bDrawing=!0;a.iInitDisplayStart!==n&&-1!=a.iInitDisplayStart&&(a._iDisplayStart=a.oFeatures.bServerSide?a.iInitDisplayStart:a.iInitDisplayStart>=a.fnRecordsDisplay()?0:a.iInitDisplayStart,a.iInitDisplayStart=-1,y(a));if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++;else if(a.oFeatures.bServerSide){if(!a.bDestroying&&!wa(a))return}else a.iDraw++;if(0!==a.aiDisplay.length){var g=
+a._iDisplayStart;d=a._iDisplayEnd;a.oFeatures.bServerSide&&(g=0,d=a.aoData.length);for(;g<d;g++){var e=a.aoData[a.aiDisplay[g]];null===e.nTr&&ea(a,a.aiDisplay[g]);var j=e.nTr;if(0!==f){var o=a.asStripeClasses[i%f];e._sRowStripe!=o&&(h(j).removeClass(e._sRowStripe).addClass(o),e._sRowStripe=o)}A(a,"aoRowCallback",null,[j,a.aoData[a.aiDisplay[g]]._aData,i,g]);b.push(j);i++;if(0!==c)for(e=0;e<c;e++)if(j==a.aoOpenRows[e].nParent){b.push(a.aoOpenRows[e].nTr);break}}}else b[0]=l.createElement("tr"),a.asStripeClasses[0]&&
+(b[0].className=a.asStripeClasses[0]),c=a.oLanguage,f=c.sZeroRecords,1==a.iDraw&&null!==a.sAjaxSource&&!a.oFeatures.bServerSide?f=c.sLoadingRecords:c.sEmptyTable&&0===a.fnRecordsTotal()&&(f=c.sEmptyTable),c=l.createElement("td"),c.setAttribute("valign","top"),c.colSpan=t(a),c.className=a.oClasses.sRowEmpty,c.innerHTML=ja(a,f),b[i].appendChild(c);A(a,"aoHeaderCallback","header",[h(a.nTHead).children("tr")[0],Z(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay]);A(a,"aoFooterCallback","footer",[h(a.nTFoot).children("tr")[0],
+Z(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay]);i=l.createDocumentFragment();c=l.createDocumentFragment();if(a.nTBody){f=a.nTBody.parentNode;c.appendChild(a.nTBody);if(!a.oScroll.bInfinite||!a._bInitComplete||a.bSorted||a.bFiltered)for(;c=a.nTBody.firstChild;)a.nTBody.removeChild(c);c=0;for(d=b.length;c<d;c++)i.appendChild(b[c]);a.nTBody.appendChild(i);null!==f&&f.appendChild(a.nTBody)}A(a,"aoDrawCallback","draw",[a]);a.bSorted=!1;a.bFiltered=!1;a.bDrawing=!1;a.oFeatures.bServerSide&&(E(a,!1),
+a._bInitComplete||$(a))}}function aa(a){a.oFeatures.bSort?O(a,a.oPreviousSearch):a.oFeatures.bFilter?K(a,a.oPreviousSearch):(y(a),x(a))}function xa(a){var b=h("<div></div>")[0];a.nTable.parentNode.insertBefore(b,a.nTable);a.nTableWrapper=h('<div id="'+a.sTableId+'_wrapper" class="'+a.oClasses.sWrapper+'" role="grid"></div>')[0];a.nTableReinsertBefore=a.nTable.nextSibling;for(var c=a.nTableWrapper,d=a.sDom.split(""),i,f,g,e,w,o,k,m=0;m<d.length;m++){f=0;g=d[m];if("<"==g){e=h("<div></div>")[0];w=d[m+
+1];if("'"==w||'"'==w){o="";for(k=2;d[m+k]!=w;)o+=d[m+k],k++;"H"==o?o=a.oClasses.sJUIHeader:"F"==o&&(o=a.oClasses.sJUIFooter);-1!=o.indexOf(".")?(w=o.split("."),e.id=w[0].substr(1,w[0].length-1),e.className=w[1]):"#"==o.charAt(0)?e.id=o.substr(1,o.length-1):e.className=o;m+=k}c.appendChild(e);c=e}else if(">"==g)c=c.parentNode;else if("l"==g&&a.oFeatures.bPaginate&&a.oFeatures.bLengthChange)i=ya(a),f=1;else if("f"==g&&a.oFeatures.bFilter)i=za(a),f=1;else if("r"==g&&a.oFeatures.bProcessing)i=Aa(a),f=
+1;else if("t"==g)i=Ba(a),f=1;else if("i"==g&&a.oFeatures.bInfo)i=Ca(a),f=1;else if("p"==g&&a.oFeatures.bPaginate)i=Da(a),f=1;else if(0!==j.ext.aoFeatures.length){e=j.ext.aoFeatures;k=0;for(w=e.length;k<w;k++)if(g==e[k].cFeature){(i=e[k].fnInit(a))&&(f=1);break}}1==f&&null!==i&&("object"!==typeof a.aanFeatures[g]&&(a.aanFeatures[g]=[]),a.aanFeatures[g].push(i),c.appendChild(i))}b.parentNode.replaceChild(a.nTableWrapper,b)}function V(a,b){var c=h(b).children("tr"),d,i,f,g,e,j,o,k,m,p;a.splice(0,a.length);
+f=0;for(j=c.length;f<j;f++)a.push([]);f=0;for(j=c.length;f<j;f++){d=c[f];for(i=d.firstChild;i;){if("TD"==i.nodeName.toUpperCase()||"TH"==i.nodeName.toUpperCase()){k=1*i.getAttribute("colspan");m=1*i.getAttribute("rowspan");k=!k||0===k||1===k?1:k;m=!m||0===m||1===m?1:m;g=0;for(e=a[f];e[g];)g++;o=g;p=1===k?!0:!1;for(e=0;e<k;e++)for(g=0;g<m;g++)a[f+g][o+e]={cell:i,unique:p},a[f+g].nTr=d}i=i.nextSibling}}}function N(a,b,c){var d=[];c||(c=a.aoHeader,b&&(c=[],V(c,b)));for(var b=0,i=c.length;b<i;b++)for(var f=
+0,g=c[b].length;f<g;f++)if(c[b][f].unique&&(!d[f]||!a.bSortCellsTop))d[f]=c[b][f].cell;return d}function wa(a){if(a.bAjaxDataGet){a.iDraw++;E(a,!0);var b=Ea(a);ka(a,b);a.fnServerData.call(a.oInstance,a.sAjaxSource,b,function(b){Fa(a,b)},a);return!1}return!0}function Ea(a){var b=a.aoColumns.length,c=[],d,i,f,g;c.push({name:"sEcho",value:a.iDraw});c.push({name:"iColumns",value:b});c.push({name:"sColumns",value:M(a)});c.push({name:"iDisplayStart",value:a._iDisplayStart});c.push({name:"iDisplayLength",
+value:!1!==a.oFeatures.bPaginate?a._iDisplayLength:-1});for(f=0;f<b;f++)d=a.aoColumns[f].mData,c.push({name:"mDataProp_"+f,value:"function"===typeof d?"function":d});if(!1!==a.oFeatures.bFilter){c.push({name:"sSearch",value:a.oPreviousSearch.sSearch});c.push({name:"bRegex",value:a.oPreviousSearch.bRegex});for(f=0;f<b;f++)c.push({name:"sSearch_"+f,value:a.aoPreSearchCols[f].sSearch}),c.push({name:"bRegex_"+f,value:a.aoPreSearchCols[f].bRegex}),c.push({name:"bSearchable_"+f,value:a.aoColumns[f].bSearchable})}if(!1!==
+a.oFeatures.bSort){var e=0;d=null!==a.aaSortingFixed?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(f=0;f<d.length;f++){i=a.aoColumns[d[f][0]].aDataSort;for(g=0;g<i.length;g++)c.push({name:"iSortCol_"+e,value:i[g]}),c.push({name:"sSortDir_"+e,value:d[f][1]}),e++}c.push({name:"iSortingCols",value:e});for(f=0;f<b;f++)c.push({name:"bSortable_"+f,value:a.aoColumns[f].bSortable})}return c}function ka(a,b){A(a,"aoServerParams","serverParams",[b])}function Fa(a,b){if(b.sEcho!==n){if(1*b.sEcho<
+a.iDraw)return;a.iDraw=1*b.sEcho}(!a.oScroll.bInfinite||a.oScroll.bInfinite&&(a.bSorted||a.bFiltered))&&ga(a);a._iRecordsTotal=parseInt(b.iTotalRecords,10);a._iRecordsDisplay=parseInt(b.iTotalDisplayRecords,10);var c=M(a),c=b.sColumns!==n&&""!==c&&b.sColumns!=c,d;c&&(d=u(a,b.sColumns));for(var i=Q(a.sAjaxDataProp)(b),f=0,g=i.length;f<g;f++)if(c){for(var e=[],h=0,j=a.aoColumns.length;h<j;h++)e.push(i[f][d[h]]);H(a,e)}else H(a,i[f]);a.aiDisplay=a.aiDisplayMaster.slice();a.bAjaxDataGet=!1;x(a);a.bAjaxDataGet=
+!0;E(a,!1)}function za(a){var b=a.oPreviousSearch,c=a.oLanguage.sSearch,c=-1!==c.indexOf("_INPUT_")?c.replace("_INPUT_",'<input type="text" />'):""===c?'<input type="text" />':c+' <input type="text" />',d=l.createElement("div");d.className=a.oClasses.sFilter;d.innerHTML="<label>"+c+"</label>";a.aanFeatures.f||(d.id=a.sTableId+"_filter");c=h('input[type="text"]',d);d._DT_Input=c[0];c.val(b.sSearch.replace('"',"&quot;"));c.bind("keyup.DT",function(){for(var c=a.aanFeatures.f,d=this.value===""?"":this.value,
+g=0,e=c.length;g<e;g++)c[g]!=h(this).parents("div.dataTables_filter")[0]&&h(c[g]._DT_Input).val(d);d!=b.sSearch&&K(a,{sSearch:d,bRegex:b.bRegex,bSmart:b.bSmart,bCaseInsensitive:b.bCaseInsensitive})});c.attr("aria-controls",a.sTableId).bind("keypress.DT",function(a){if(a.keyCode==13)return false});return d}function K(a,b,c){var d=a.oPreviousSearch,i=a.aoPreSearchCols,f=function(a){d.sSearch=a.sSearch;d.bRegex=a.bRegex;d.bSmart=a.bSmart;d.bCaseInsensitive=a.bCaseInsensitive};if(a.oFeatures.bServerSide)f(b);
+else{Ga(a,b.sSearch,c,b.bRegex,b.bSmart,b.bCaseInsensitive);f(b);for(b=0;b<a.aoPreSearchCols.length;b++)Ha(a,i[b].sSearch,b,i[b].bRegex,i[b].bSmart,i[b].bCaseInsensitive);Ia(a)}a.bFiltered=!0;h(a.oInstance).trigger("filter",a);a._iDisplayStart=0;y(a);x(a);la(a,0)}function Ia(a){for(var b=j.ext.afnFiltering,c=r(a,"bSearchable"),d=0,i=b.length;d<i;d++)for(var f=0,g=0,e=a.aiDisplay.length;g<e;g++){var h=a.aiDisplay[g-f];b[d](a,Y(a,h,"filter",c),h)||(a.aiDisplay.splice(g-f,1),f++)}}function Ha(a,b,c,
+d,i,f){if(""!==b)for(var g=0,b=ma(b,d,i,f),d=a.aiDisplay.length-1;0<=d;d--)i=Ja(v(a,a.aiDisplay[d],c,"filter"),a.aoColumns[c].sType),b.test(i)||(a.aiDisplay.splice(d,1),g++)}function Ga(a,b,c,d,i,f){d=ma(b,d,i,f);i=a.oPreviousSearch;c||(c=0);0!==j.ext.afnFiltering.length&&(c=1);if(0>=b.length)a.aiDisplay.splice(0,a.aiDisplay.length),a.aiDisplay=a.aiDisplayMaster.slice();else if(a.aiDisplay.length==a.aiDisplayMaster.length||i.sSearch.length>b.length||1==c||0!==b.indexOf(i.sSearch)){a.aiDisplay.splice(0,
+a.aiDisplay.length);la(a,1);for(b=0;b<a.aiDisplayMaster.length;b++)d.test(a.asDataSearch[b])&&a.aiDisplay.push(a.aiDisplayMaster[b])}else for(b=c=0;b<a.asDataSearch.length;b++)d.test(a.asDataSearch[b])||(a.aiDisplay.splice(b-c,1),c++)}function la(a,b){if(!a.oFeatures.bServerSide){a.asDataSearch=[];for(var c=r(a,"bSearchable"),d=1===b?a.aiDisplayMaster:a.aiDisplay,i=0,f=d.length;i<f;i++)a.asDataSearch[i]=na(a,Y(a,d[i],"filter",c))}}function na(a,b){var c=b.join(" ");-1!==c.indexOf("&")&&(c=h("<div>").html(c).text());
+return c.replace(/[\n\r]/g," ")}function ma(a,b,c,d){if(c)return a=b?a.split(" "):oa(a).split(" "),a="^(?=.*?"+a.join(")(?=.*?")+").*$",RegExp(a,d?"i":"");a=b?a:oa(a);return RegExp(a,d?"i":"")}function Ja(a,b){return"function"===typeof j.ext.ofnSearch[b]?j.ext.ofnSearch[b](a):null===a?"":"html"==b?a.replace(/[\r\n]/g," ").replace(/<.*?>/g,""):"string"===typeof a?a.replace(/[\r\n]/g," "):a}function oa(a){return a.replace(RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\|\\$|\\^|\\-)","g"),
+"\\$1")}function Ca(a){var b=l.createElement("div");b.className=a.oClasses.sInfo;a.aanFeatures.i||(a.aoDrawCallback.push({fn:Ka,sName:"information"}),b.id=a.sTableId+"_info");a.nTable.setAttribute("aria-describedby",a.sTableId+"_info");return b}function Ka(a){if(a.oFeatures.bInfo&&0!==a.aanFeatures.i.length){var b=a.oLanguage,c=a._iDisplayStart+1,d=a.fnDisplayEnd(),i=a.fnRecordsTotal(),f=a.fnRecordsDisplay(),g;g=0===f?b.sInfoEmpty:b.sInfo;f!=i&&(g+=" "+b.sInfoFiltered);g+=b.sInfoPostFix;g=ja(a,g);
+null!==b.fnInfoCallback&&(g=b.fnInfoCallback.call(a.oInstance,a,c,d,i,f,g));a=a.aanFeatures.i;b=0;for(c=a.length;b<c;b++)h(a[b]).html(g)}}function ja(a,b){var c=a.fnFormatNumber(a._iDisplayStart+1),d=a.fnDisplayEnd(),d=a.fnFormatNumber(d),i=a.fnRecordsDisplay(),i=a.fnFormatNumber(i),f=a.fnRecordsTotal(),f=a.fnFormatNumber(f);a.oScroll.bInfinite&&(c=a.fnFormatNumber(1));return b.replace(/_START_/g,c).replace(/_END_/g,d).replace(/_TOTAL_/g,i).replace(/_MAX_/g,f)}function ba(a){var b,c,d=a.iInitDisplayStart;
+if(!1===a.bInitialised)setTimeout(function(){ba(a)},200);else{xa(a);va(a);W(a,a.aoHeader);a.nTFoot&&W(a,a.aoFooter);E(a,!0);a.oFeatures.bAutoWidth&&da(a);b=0;for(c=a.aoColumns.length;b<c;b++)null!==a.aoColumns[b].sWidth&&(a.aoColumns[b].nTh.style.width=q(a.aoColumns[b].sWidth));a.oFeatures.bSort?O(a):a.oFeatures.bFilter?K(a,a.oPreviousSearch):(a.aiDisplay=a.aiDisplayMaster.slice(),y(a),x(a));null!==a.sAjaxSource&&!a.oFeatures.bServerSide?(c=[],ka(a,c),a.fnServerData.call(a.oInstance,a.sAjaxSource,
+c,function(c){var f=a.sAjaxDataProp!==""?Q(a.sAjaxDataProp)(c):c;for(b=0;b<f.length;b++)H(a,f[b]);a.iInitDisplayStart=d;if(a.oFeatures.bSort)O(a);else{a.aiDisplay=a.aiDisplayMaster.slice();y(a);x(a)}E(a,false);$(a,c)},a)):a.oFeatures.bServerSide||(E(a,!1),$(a))}}function $(a,b){a._bInitComplete=!0;A(a,"aoInitComplete","init",[a,b])}function pa(a){var b=j.defaults.oLanguage;!a.sEmptyTable&&(a.sZeroRecords&&"No data available in table"===b.sEmptyTable)&&p(a,a,"sZeroRecords","sEmptyTable");!a.sLoadingRecords&&
+(a.sZeroRecords&&"Loading..."===b.sLoadingRecords)&&p(a,a,"sZeroRecords","sLoadingRecords")}function ya(a){if(a.oScroll.bInfinite)return null;var b='<select size="1" '+('name="'+a.sTableId+'_length"')+">",c,d,i=a.aLengthMenu;if(2==i.length&&"object"===typeof i[0]&&"object"===typeof i[1]){c=0;for(d=i[0].length;c<d;c++)b+='<option value="'+i[0][c]+'">'+i[1][c]+"</option>"}else{c=0;for(d=i.length;c<d;c++)b+='<option value="'+i[c]+'">'+i[c]+"</option>"}b+="</select>";i=l.createElement("div");a.aanFeatures.l||
+(i.id=a.sTableId+"_length");i.className=a.oClasses.sLength;i.innerHTML="<label>"+a.oLanguage.sLengthMenu.replace("_MENU_",b)+"</label>";h('select option[value="'+a._iDisplayLength+'"]',i).attr("selected",!0);h("select",i).bind("change.DT",function(){var b=h(this).val(),i=a.aanFeatures.l;c=0;for(d=i.length;c<d;c++)i[c]!=this.parentNode&&h("select",i[c]).val(b);a._iDisplayLength=parseInt(b,10);y(a);if(a.fnDisplayEnd()==a.fnRecordsDisplay()){a._iDisplayStart=a.fnDisplayEnd()-a._iDisplayLength;if(a._iDisplayStart<
+0)a._iDisplayStart=0}if(a._iDisplayLength==-1)a._iDisplayStart=0;x(a)});h("select",i).attr("aria-controls",a.sTableId);return i}function y(a){a._iDisplayEnd=!1===a.oFeatures.bPaginate?a.aiDisplay.length:a._iDisplayStart+a._iDisplayLength>a.aiDisplay.length||-1==a._iDisplayLength?a.aiDisplay.length:a._iDisplayStart+a._iDisplayLength}function Da(a){if(a.oScroll.bInfinite)return null;var b=l.createElement("div");b.className=a.oClasses.sPaging+a.sPaginationType;j.ext.oPagination[a.sPaginationType].fnInit(a,
+b,function(a){y(a);x(a)});a.aanFeatures.p||a.aoDrawCallback.push({fn:function(a){j.ext.oPagination[a.sPaginationType].fnUpdate(a,function(a){y(a);x(a)})},sName:"pagination"});return b}function qa(a,b){var c=a._iDisplayStart;if("number"===typeof b)a._iDisplayStart=b*a._iDisplayLength,a._iDisplayStart>a.fnRecordsDisplay()&&(a._iDisplayStart=0);else if("first"==b)a._iDisplayStart=0;else if("previous"==b)a._iDisplayStart=0<=a._iDisplayLength?a._iDisplayStart-a._iDisplayLength:0,0>a._iDisplayStart&&(a._iDisplayStart=
+0);else if("next"==b)0<=a._iDisplayLength?a._iDisplayStart+a._iDisplayLength<a.fnRecordsDisplay()&&(a._iDisplayStart+=a._iDisplayLength):a._iDisplayStart=0;else if("last"==b)if(0<=a._iDisplayLength){var d=parseInt((a.fnRecordsDisplay()-1)/a._iDisplayLength,10)+1;a._iDisplayStart=(d-1)*a._iDisplayLength}else a._iDisplayStart=0;else D(a,0,"Unknown paging action: "+b);h(a.oInstance).trigger("page",a);return c!=a._iDisplayStart}function Aa(a){var b=l.createElement("div");a.aanFeatures.r||(b.id=a.sTableId+
+"_processing");b.innerHTML=a.oLanguage.sProcessing;b.className=a.oClasses.sProcessing;a.nTable.parentNode.insertBefore(b,a.nTable);return b}function E(a,b){if(a.oFeatures.bProcessing)for(var c=a.aanFeatures.r,d=0,i=c.length;d<i;d++)c[d].style.visibility=b?"visible":"hidden";h(a.oInstance).trigger("processing",[a,b])}function Ba(a){if(""===a.oScroll.sX&&""===a.oScroll.sY)return a.nTable;var b=l.createElement("div"),c=l.createElement("div"),d=l.createElement("div"),i=l.createElement("div"),f=l.createElement("div"),
+g=l.createElement("div"),e=a.nTable.cloneNode(!1),j=a.nTable.cloneNode(!1),o=a.nTable.getElementsByTagName("thead")[0],k=0===a.nTable.getElementsByTagName("tfoot").length?null:a.nTable.getElementsByTagName("tfoot")[0],m=a.oClasses;c.appendChild(d);f.appendChild(g);i.appendChild(a.nTable);b.appendChild(c);b.appendChild(i);d.appendChild(e);e.appendChild(o);null!==k&&(b.appendChild(f),g.appendChild(j),j.appendChild(k));b.className=m.sScrollWrapper;c.className=m.sScrollHead;d.className=m.sScrollHeadInner;
+i.className=m.sScrollBody;f.className=m.sScrollFoot;g.className=m.sScrollFootInner;a.oScroll.bAutoCss&&(c.style.overflow="hidden",c.style.position="relative",f.style.overflow="hidden",i.style.overflow="auto");c.style.border="0";c.style.width="100%";f.style.border="0";d.style.width=""!==a.oScroll.sXInner?a.oScroll.sXInner:"100%";e.removeAttribute("id");e.style.marginLeft="0";a.nTable.style.marginLeft="0";null!==k&&(j.removeAttribute("id"),j.style.marginLeft="0");d=h(a.nTable).children("caption");0<
+d.length&&(d=d[0],"top"===d._captionSide?e.appendChild(d):"bottom"===d._captionSide&&k&&j.appendChild(d));""!==a.oScroll.sX&&(c.style.width=q(a.oScroll.sX),i.style.width=q(a.oScroll.sX),null!==k&&(f.style.width=q(a.oScroll.sX)),h(i).scroll(function(){c.scrollLeft=this.scrollLeft;if(k!==null)f.scrollLeft=this.scrollLeft}));""!==a.oScroll.sY&&(i.style.height=q(a.oScroll.sY));a.aoDrawCallback.push({fn:La,sName:"scrolling"});a.oScroll.bInfinite&&h(i).scroll(function(){if(!a.bDrawing&&h(this).scrollTop()!==
+0&&h(this).scrollTop()+h(this).height()>h(a.nTable).height()-a.oScroll.iLoadGap&&a.fnDisplayEnd()<a.fnRecordsDisplay()){qa(a,"next");y(a);x(a)}});a.nScrollHead=c;a.nScrollFoot=f;return b}function La(a){var b=a.nScrollHead.getElementsByTagName("div")[0],c=b.getElementsByTagName("table")[0],d=a.nTable.parentNode,i,f,g,e,j,o,k,m,p=[],n=[],l=null!==a.nTFoot?a.nScrollFoot.getElementsByTagName("div")[0]:null,R=null!==a.nTFoot?l.getElementsByTagName("table")[0]:null,r=a.oBrowser.bScrollOversize,s=function(a){k=
+a.style;k.paddingTop="0";k.paddingBottom="0";k.borderTopWidth="0";k.borderBottomWidth="0";k.height=0};h(a.nTable).children("thead, tfoot").remove();i=h(a.nTHead).clone()[0];a.nTable.insertBefore(i,a.nTable.childNodes[0]);g=a.nTHead.getElementsByTagName("tr");e=i.getElementsByTagName("tr");null!==a.nTFoot&&(j=h(a.nTFoot).clone()[0],a.nTable.insertBefore(j,a.nTable.childNodes[1]),o=a.nTFoot.getElementsByTagName("tr"),j=j.getElementsByTagName("tr"));""===a.oScroll.sX&&(d.style.width="100%",b.parentNode.style.width=
+"100%");var t=N(a,i);i=0;for(f=t.length;i<f;i++)m=G(a,i),t[i].style.width=a.aoColumns[m].sWidth;null!==a.nTFoot&&C(function(a){a.style.width=""},j);a.oScroll.bCollapse&&""!==a.oScroll.sY&&(d.style.height=d.offsetHeight+a.nTHead.offsetHeight+"px");i=h(a.nTable).outerWidth();if(""===a.oScroll.sX){if(a.nTable.style.width="100%",r&&(h("tbody",d).height()>d.offsetHeight||"scroll"==h(d).css("overflow-y")))a.nTable.style.width=q(h(a.nTable).outerWidth()-a.oScroll.iBarWidth)}else""!==a.oScroll.sXInner?a.nTable.style.width=
+q(a.oScroll.sXInner):i==h(d).width()&&h(d).height()<h(a.nTable).height()?(a.nTable.style.width=q(i-a.oScroll.iBarWidth),h(a.nTable).outerWidth()>i-a.oScroll.iBarWidth&&(a.nTable.style.width=q(i))):a.nTable.style.width=q(i);i=h(a.nTable).outerWidth();C(s,e);C(function(a){p.push(q(h(a).width()))},e);C(function(a,b){a.style.width=p[b]},g);h(e).height(0);null!==a.nTFoot&&(C(s,j),C(function(a){n.push(q(h(a).width()))},j),C(function(a,b){a.style.width=n[b]},o),h(j).height(0));C(function(a,b){a.innerHTML=
+"";a.style.width=p[b]},e);null!==a.nTFoot&&C(function(a,b){a.innerHTML="";a.style.width=n[b]},j);if(h(a.nTable).outerWidth()<i){g=d.scrollHeight>d.offsetHeight||"scroll"==h(d).css("overflow-y")?i+a.oScroll.iBarWidth:i;if(r&&(d.scrollHeight>d.offsetHeight||"scroll"==h(d).css("overflow-y")))a.nTable.style.width=q(g-a.oScroll.iBarWidth);d.style.width=q(g);a.nScrollHead.style.width=q(g);null!==a.nTFoot&&(a.nScrollFoot.style.width=q(g));""===a.oScroll.sX?D(a,1,"The table cannot fit into the current element which will cause column misalignment. The table has been drawn at its minimum possible width."):
+""!==a.oScroll.sXInner&&D(a,1,"The table cannot fit into the current element which will cause column misalignment. Increase the sScrollXInner value or remove it to allow automatic calculation")}else d.style.width=q("100%"),a.nScrollHead.style.width=q("100%"),null!==a.nTFoot&&(a.nScrollFoot.style.width=q("100%"));""===a.oScroll.sY&&r&&(d.style.height=q(a.nTable.offsetHeight+a.oScroll.iBarWidth));""!==a.oScroll.sY&&a.oScroll.bCollapse&&(d.style.height=q(a.oScroll.sY),r=""!==a.oScroll.sX&&a.nTable.offsetWidth>
+d.offsetWidth?a.oScroll.iBarWidth:0,a.nTable.offsetHeight<d.offsetHeight&&(d.style.height=q(a.nTable.offsetHeight+r)));r=h(a.nTable).outerWidth();c.style.width=q(r);b.style.width=q(r);c=h(a.nTable).height()>d.clientHeight||"scroll"==h(d).css("overflow-y");b.style.paddingRight=c?a.oScroll.iBarWidth+"px":"0px";null!==a.nTFoot&&(R.style.width=q(r),l.style.width=q(r),l.style.paddingRight=c?a.oScroll.iBarWidth+"px":"0px");h(d).scroll();if(a.bSorted||a.bFiltered)d.scrollTop=0}function C(a,b,c){for(var d=
+0,i=0,f=b.length,g,e;i<f;){g=b[i].firstChild;for(e=c?c[i].firstChild:null;g;)1===g.nodeType&&(c?a(g,e,d):a(g,d),d++),g=g.nextSibling,e=c?e.nextSibling:null;i++}}function Ma(a,b){if(!a||null===a||""===a)return 0;b||(b=l.body);var c,d=l.createElement("div");d.style.width=q(a);b.appendChild(d);c=d.offsetWidth;b.removeChild(d);return c}function da(a){var b=0,c,d=0,i=a.aoColumns.length,f,e,j=h("th",a.nTHead),o=a.nTable.getAttribute("width");e=a.nTable.parentNode;for(f=0;f<i;f++)a.aoColumns[f].bVisible&&
+(d++,null!==a.aoColumns[f].sWidth&&(c=Ma(a.aoColumns[f].sWidthOrig,e),null!==c&&(a.aoColumns[f].sWidth=q(c)),b++));if(i==j.length&&0===b&&d==i&&""===a.oScroll.sX&&""===a.oScroll.sY)for(f=0;f<a.aoColumns.length;f++)c=h(j[f]).width(),null!==c&&(a.aoColumns[f].sWidth=q(c));else{b=a.nTable.cloneNode(!1);f=a.nTHead.cloneNode(!0);d=l.createElement("tbody");c=l.createElement("tr");b.removeAttribute("id");b.appendChild(f);null!==a.nTFoot&&(b.appendChild(a.nTFoot.cloneNode(!0)),C(function(a){a.style.width=
+""},b.getElementsByTagName("tr")));b.appendChild(d);d.appendChild(c);d=h("thead th",b);0===d.length&&(d=h("tbody tr:eq(0)>td",b));j=N(a,f);for(f=d=0;f<i;f++){var k=a.aoColumns[f];k.bVisible&&null!==k.sWidthOrig&&""!==k.sWidthOrig?j[f-d].style.width=q(k.sWidthOrig):k.bVisible?j[f-d].style.width="":d++}for(f=0;f<i;f++)a.aoColumns[f].bVisible&&(d=Na(a,f),null!==d&&(d=d.cloneNode(!0),""!==a.aoColumns[f].sContentPadding&&(d.innerHTML+=a.aoColumns[f].sContentPadding),c.appendChild(d)));e.appendChild(b);
+""!==a.oScroll.sX&&""!==a.oScroll.sXInner?b.style.width=q(a.oScroll.sXInner):""!==a.oScroll.sX?(b.style.width="",h(b).width()<e.offsetWidth&&(b.style.width=q(e.offsetWidth))):""!==a.oScroll.sY?b.style.width=q(e.offsetWidth):o&&(b.style.width=q(o));b.style.visibility="hidden";Oa(a,b);i=h("tbody tr:eq(0)",b).children();0===i.length&&(i=N(a,h("thead",b)[0]));if(""!==a.oScroll.sX){for(f=d=e=0;f<a.aoColumns.length;f++)a.aoColumns[f].bVisible&&(e=null===a.aoColumns[f].sWidthOrig?e+h(i[d]).outerWidth():
+e+(parseInt(a.aoColumns[f].sWidth.replace("px",""),10)+(h(i[d]).outerWidth()-h(i[d]).width())),d++);b.style.width=q(e);a.nTable.style.width=q(e)}for(f=d=0;f<a.aoColumns.length;f++)a.aoColumns[f].bVisible&&(e=h(i[d]).width(),null!==e&&0<e&&(a.aoColumns[f].sWidth=q(e)),d++);i=h(b).css("width");a.nTable.style.width=-1!==i.indexOf("%")?i:q(h(b).outerWidth());b.parentNode.removeChild(b)}o&&(a.nTable.style.width=q(o))}function Oa(a,b){""===a.oScroll.sX&&""!==a.oScroll.sY?(h(b).width(),b.style.width=q(h(b).outerWidth()-
+a.oScroll.iBarWidth)):""!==a.oScroll.sX&&(b.style.width=q(h(b).outerWidth()))}function Na(a,b){var c=Pa(a,b);if(0>c)return null;if(null===a.aoData[c].nTr){var d=l.createElement("td");d.innerHTML=v(a,c,b,"");return d}return J(a,c)[b]}function Pa(a,b){for(var c=-1,d=-1,i=0;i<a.aoData.length;i++){var e=v(a,i,b,"display")+"",e=e.replace(/<.*?>/g,"");e.length>c&&(c=e.length,d=i)}return d}function q(a){if(null===a)return"0px";if("number"==typeof a)return 0>a?"0px":a+"px";var b=a.charCodeAt(a.length-1);
+return 48>b||57<b?a:a+"px"}function Qa(){var a=l.createElement("p"),b=a.style;b.width="100%";b.height="200px";b.padding="0px";var c=l.createElement("div"),b=c.style;b.position="absolute";b.top="0px";b.left="0px";b.visibility="hidden";b.width="200px";b.height="150px";b.padding="0px";b.overflow="hidden";c.appendChild(a);l.body.appendChild(c);b=a.offsetWidth;c.style.overflow="scroll";a=a.offsetWidth;b==a&&(a=c.clientWidth);l.body.removeChild(c);return b-a}function O(a,b){var c,d,i,e,g,k,o=[],m=[],p=
+j.ext.oSort,l=a.aoData,q=a.aoColumns,G=a.oLanguage.oAria;if(!a.oFeatures.bServerSide&&(0!==a.aaSorting.length||null!==a.aaSortingFixed)){o=null!==a.aaSortingFixed?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(c=0;c<o.length;c++)if(d=o[c][0],i=R(a,d),e=a.aoColumns[d].sSortDataType,j.ext.afnSortData[e])if(g=j.ext.afnSortData[e].call(a.oInstance,a,d,i),g.length===l.length){i=0;for(e=l.length;i<e;i++)F(a,i,d,g[i])}else D(a,0,"Returned data sort array (col "+d+") is the wrong length");c=
+0;for(d=a.aiDisplayMaster.length;c<d;c++)m[a.aiDisplayMaster[c]]=c;var r=o.length,s;c=0;for(d=l.length;c<d;c++)for(i=0;i<r;i++){s=q[o[i][0]].aDataSort;g=0;for(k=s.length;g<k;g++)e=q[s[g]].sType,e=p[(e?e:"string")+"-pre"],l[c]._aSortData[s[g]]=e?e(v(a,c,s[g],"sort")):v(a,c,s[g],"sort")}a.aiDisplayMaster.sort(function(a,b){var c,d,e,i,f;for(c=0;c<r;c++){f=q[o[c][0]].aDataSort;d=0;for(e=f.length;d<e;d++)if(i=q[f[d]].sType,i=p[(i?i:"string")+"-"+o[c][1]](l[a]._aSortData[f[d]],l[b]._aSortData[f[d]]),0!==
+i)return i}return p["numeric-asc"](m[a],m[b])})}(b===n||b)&&!a.oFeatures.bDeferRender&&P(a);c=0;for(d=a.aoColumns.length;c<d;c++)e=q[c].sTitle.replace(/<.*?>/g,""),i=q[c].nTh,i.removeAttribute("aria-sort"),i.removeAttribute("aria-label"),q[c].bSortable?0<o.length&&o[0][0]==c?(i.setAttribute("aria-sort","asc"==o[0][1]?"ascending":"descending"),i.setAttribute("aria-label",e+("asc"==(q[c].asSorting[o[0][2]+1]?q[c].asSorting[o[0][2]+1]:q[c].asSorting[0])?G.sSortAscending:G.sSortDescending))):i.setAttribute("aria-label",
+e+("asc"==q[c].asSorting[0]?G.sSortAscending:G.sSortDescending)):i.setAttribute("aria-label",e);a.bSorted=!0;h(a.oInstance).trigger("sort",a);a.oFeatures.bFilter?K(a,a.oPreviousSearch,1):(a.aiDisplay=a.aiDisplayMaster.slice(),a._iDisplayStart=0,y(a),x(a))}function ia(a,b,c,d){Ra(b,{},function(b){if(!1!==a.aoColumns[c].bSortable){var e=function(){var d,e;if(b.shiftKey){for(var f=!1,h=0;h<a.aaSorting.length;h++)if(a.aaSorting[h][0]==c){f=!0;d=a.aaSorting[h][0];e=a.aaSorting[h][2]+1;a.aoColumns[d].asSorting[e]?
+(a.aaSorting[h][1]=a.aoColumns[d].asSorting[e],a.aaSorting[h][2]=e):a.aaSorting.splice(h,1);break}!1===f&&a.aaSorting.push([c,a.aoColumns[c].asSorting[0],0])}else 1==a.aaSorting.length&&a.aaSorting[0][0]==c?(d=a.aaSorting[0][0],e=a.aaSorting[0][2]+1,a.aoColumns[d].asSorting[e]||(e=0),a.aaSorting[0][1]=a.aoColumns[d].asSorting[e],a.aaSorting[0][2]=e):(a.aaSorting.splice(0,a.aaSorting.length),a.aaSorting.push([c,a.aoColumns[c].asSorting[0],0]));O(a)};a.oFeatures.bProcessing?(E(a,!0),setTimeout(function(){e();
+a.oFeatures.bServerSide||E(a,!1)},0)):e();"function"==typeof d&&d(a)}})}function P(a){var b,c,d,e,f,g=a.aoColumns.length,j=a.oClasses;for(b=0;b<g;b++)a.aoColumns[b].bSortable&&h(a.aoColumns[b].nTh).removeClass(j.sSortAsc+" "+j.sSortDesc+" "+a.aoColumns[b].sSortingClass);c=null!==a.aaSortingFixed?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(b=0;b<a.aoColumns.length;b++)if(a.aoColumns[b].bSortable){f=a.aoColumns[b].sSortingClass;e=-1;for(d=0;d<c.length;d++)if(c[d][0]==b){f="asc"==c[d][1]?
+j.sSortAsc:j.sSortDesc;e=d;break}h(a.aoColumns[b].nTh).addClass(f);a.bJUI&&(f=h("span."+j.sSortIcon,a.aoColumns[b].nTh),f.removeClass(j.sSortJUIAsc+" "+j.sSortJUIDesc+" "+j.sSortJUI+" "+j.sSortJUIAscAllowed+" "+j.sSortJUIDescAllowed),f.addClass(-1==e?a.aoColumns[b].sSortingClassJUI:"asc"==c[e][1]?j.sSortJUIAsc:j.sSortJUIDesc))}else h(a.aoColumns[b].nTh).addClass(a.aoColumns[b].sSortingClass);f=j.sSortColumn;if(a.oFeatures.bSort&&a.oFeatures.bSortClasses){a=J(a);e=[];for(b=0;b<g;b++)e.push("");b=0;
+for(d=1;b<c.length;b++)j=parseInt(c[b][0],10),e[j]=f+d,3>d&&d++;f=RegExp(f+"[123]");var o;b=0;for(c=a.length;b<c;b++)j=b%g,d=a[b].className,o=e[j],j=d.replace(f,o),j!=d?a[b].className=h.trim(j):0<o.length&&-1==d.indexOf(o)&&(a[b].className=d+" "+o)}}function ra(a){if(a.oFeatures.bStateSave&&!a.bDestroying){var b,c;b=a.oScroll.bInfinite;var d={iCreate:(new Date).getTime(),iStart:b?0:a._iDisplayStart,iEnd:b?a._iDisplayLength:a._iDisplayEnd,iLength:a._iDisplayLength,aaSorting:h.extend(!0,[],a.aaSorting),
+oSearch:h.extend(!0,{},a.oPreviousSearch),aoSearchCols:h.extend(!0,[],a.aoPreSearchCols),abVisCols:[]};b=0;for(c=a.aoColumns.length;b<c;b++)d.abVisCols.push(a.aoColumns[b].bVisible);A(a,"aoStateSaveParams","stateSaveParams",[a,d]);a.fnStateSave.call(a.oInstance,a,d)}}function Sa(a,b){if(a.oFeatures.bStateSave){var c=a.fnStateLoad.call(a.oInstance,a);if(c){var d=A(a,"aoStateLoadParams","stateLoadParams",[a,c]);if(-1===h.inArray(!1,d)){a.oLoadedState=h.extend(!0,{},c);a._iDisplayStart=c.iStart;a.iInitDisplayStart=
+c.iStart;a._iDisplayEnd=c.iEnd;a._iDisplayLength=c.iLength;a.aaSorting=c.aaSorting.slice();a.saved_aaSorting=c.aaSorting.slice();h.extend(a.oPreviousSearch,c.oSearch);h.extend(!0,a.aoPreSearchCols,c.aoSearchCols);b.saved_aoColumns=[];for(d=0;d<c.abVisCols.length;d++)b.saved_aoColumns[d]={},b.saved_aoColumns[d].bVisible=c.abVisCols[d];A(a,"aoStateLoaded","stateLoaded",[a,c])}}}}function s(a){for(var b=0;b<j.settings.length;b++)if(j.settings[b].nTable===a)return j.settings[b];return null}function T(a){for(var b=
+[],a=a.aoData,c=0,d=a.length;c<d;c++)null!==a[c].nTr&&b.push(a[c].nTr);return b}function J(a,b){var c=[],d,e,f,g,h,j;e=0;var o=a.aoData.length;b!==n&&(e=b,o=b+1);for(f=e;f<o;f++)if(j=a.aoData[f],null!==j.nTr){e=[];for(d=j.nTr.firstChild;d;)g=d.nodeName.toLowerCase(),("td"==g||"th"==g)&&e.push(d),d=d.nextSibling;g=d=0;for(h=a.aoColumns.length;g<h;g++)a.aoColumns[g].bVisible?c.push(e[g-d]):(c.push(j._anHidden[g]),d++)}return c}function D(a,b,c){a=null===a?"DataTables warning: "+c:"DataTables warning (table id = '"+
+a.sTableId+"'): "+c;if(0===b)if("alert"==j.ext.sErrMode)alert(a);else throw Error(a);else X.console&&console.log&&console.log(a)}function p(a,b,c,d){d===n&&(d=c);b[c]!==n&&(a[d]=b[c])}function Ta(a,b){var c,d;for(d in b)b.hasOwnProperty(d)&&(c=b[d],"object"===typeof e[d]&&null!==c&&!1===h.isArray(c)?h.extend(!0,a[d],c):a[d]=c);return a}function Ra(a,b,c){h(a).bind("click.DT",b,function(b){a.blur();c(b)}).bind("keypress.DT",b,function(a){13===a.which&&c(a)}).bind("selectstart.DT",function(){return!1})}
+function z(a,b,c,d){c&&a[b].push({fn:c,sName:d})}function A(a,b,c,d){for(var b=a[b],e=[],f=b.length-1;0<=f;f--)e.push(b[f].fn.apply(a.oInstance,d));null!==c&&h(a.oInstance).trigger(c,d);return e}function Ua(a){var b=h('<div style="position:absolute; top:0; left:0; height:1px; width:1px; overflow:hidden"><div style="position:absolute; top:1px; left:1px; width:100px; overflow:scroll;"><div id="DT_BrowserTest" style="width:100%; height:10px;"></div></div></div>')[0];l.body.appendChild(b);a.oBrowser.bScrollOversize=
+100===h("#DT_BrowserTest",b)[0].offsetWidth?!0:!1;l.body.removeChild(b)}function Va(a){return function(){var b=[s(this[j.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return j.ext.oApi[a].apply(this,b)}}var U=/\[.*?\]$/,Wa=X.JSON?JSON.stringify:function(a){var b=typeof a;if("object"!==b||null===a)return"string"===b&&(a='"'+a+'"'),a+"";var c,d,e=[],f=h.isArray(a);for(c in a)d=a[c],b=typeof d,"string"===b?d='"'+d+'"':"object"===b&&null!==d&&(d=Wa(d)),e.push((f?"":'"'+c+'":')+d);return(f?
+"[":"{")+e+(f?"]":"}")};this.$=function(a,b){var c,d,e=[],f;d=s(this[j.ext.iApiIndex]);var g=d.aoData,o=d.aiDisplay,k=d.aiDisplayMaster;b||(b={});b=h.extend({},{filter:"none",order:"current",page:"all"},b);if("current"==b.page){c=d._iDisplayStart;for(d=d.fnDisplayEnd();c<d;c++)(f=g[o[c]].nTr)&&e.push(f)}else if("current"==b.order&&"none"==b.filter){c=0;for(d=k.length;c<d;c++)(f=g[k[c]].nTr)&&e.push(f)}else if("current"==b.order&&"applied"==b.filter){c=0;for(d=o.length;c<d;c++)(f=g[o[c]].nTr)&&e.push(f)}else if("original"==
+b.order&&"none"==b.filter){c=0;for(d=g.length;c<d;c++)(f=g[c].nTr)&&e.push(f)}else if("original"==b.order&&"applied"==b.filter){c=0;for(d=g.length;c<d;c++)f=g[c].nTr,-1!==h.inArray(c,o)&&f&&e.push(f)}else D(d,1,"Unknown selection options");e=h(e);c=e.filter(a);e=e.find(a);return h([].concat(h.makeArray(c),h.makeArray(e)))};this._=function(a,b){var c=[],d,e,f=this.$(a,b);d=0;for(e=f.length;d<e;d++)c.push(this.fnGetData(f[d]));return c};this.fnAddData=function(a,b){if(0===a.length)return[];var c=[],
+d,e=s(this[j.ext.iApiIndex]);if("object"===typeof a[0]&&null!==a[0])for(var f=0;f<a.length;f++){d=H(e,a[f]);if(-1==d)return c;c.push(d)}else{d=H(e,a);if(-1==d)return c;c.push(d)}e.aiDisplay=e.aiDisplayMaster.slice();(b===n||b)&&aa(e);return c};this.fnAdjustColumnSizing=function(a){var b=s(this[j.ext.iApiIndex]);k(b);a===n||a?this.fnDraw(!1):(""!==b.oScroll.sX||""!==b.oScroll.sY)&&this.oApi._fnScrollDraw(b)};this.fnClearTable=function(a){var b=s(this[j.ext.iApiIndex]);ga(b);(a===n||a)&&x(b)};this.fnClose=
+function(a){for(var b=s(this[j.ext.iApiIndex]),c=0;c<b.aoOpenRows.length;c++)if(b.aoOpenRows[c].nParent==a)return(a=b.aoOpenRows[c].nTr.parentNode)&&a.removeChild(b.aoOpenRows[c].nTr),b.aoOpenRows.splice(c,1),0;return 1};this.fnDeleteRow=function(a,b,c){var d=s(this[j.ext.iApiIndex]),e,f,a="object"===typeof a?I(d,a):a,g=d.aoData.splice(a,1);e=0;for(f=d.aoData.length;e<f;e++)null!==d.aoData[e].nTr&&(d.aoData[e].nTr._DT_RowIndex=e);e=h.inArray(a,d.aiDisplay);d.asDataSearch.splice(e,1);ha(d.aiDisplayMaster,
+a);ha(d.aiDisplay,a);"function"===typeof b&&b.call(this,d,g);d._iDisplayStart>=d.fnRecordsDisplay()&&(d._iDisplayStart-=d._iDisplayLength,0>d._iDisplayStart&&(d._iDisplayStart=0));if(c===n||c)y(d),x(d);return g};this.fnDestroy=function(a){var b=s(this[j.ext.iApiIndex]),c=b.nTableWrapper.parentNode,d=b.nTBody,i,f,a=a===n?!1:a;b.bDestroying=!0;A(b,"aoDestroyCallback","destroy",[b]);if(!a){i=0;for(f=b.aoColumns.length;i<f;i++)!1===b.aoColumns[i].bVisible&&this.fnSetColumnVis(i,!0)}h(b.nTableWrapper).find("*").andSelf().unbind(".DT");
+h("tbody>tr>td."+b.oClasses.sRowEmpty,b.nTable).parent().remove();b.nTable!=b.nTHead.parentNode&&(h(b.nTable).children("thead").remove(),b.nTable.appendChild(b.nTHead));b.nTFoot&&b.nTable!=b.nTFoot.parentNode&&(h(b.nTable).children("tfoot").remove(),b.nTable.appendChild(b.nTFoot));b.nTable.parentNode.removeChild(b.nTable);h(b.nTableWrapper).remove();b.aaSorting=[];b.aaSortingFixed=[];P(b);h(T(b)).removeClass(b.asStripeClasses.join(" "));h("th, td",b.nTHead).removeClass([b.oClasses.sSortable,b.oClasses.sSortableAsc,
+b.oClasses.sSortableDesc,b.oClasses.sSortableNone].join(" "));b.bJUI&&(h("th span."+b.oClasses.sSortIcon+", td span."+b.oClasses.sSortIcon,b.nTHead).remove(),h("th, td",b.nTHead).each(function(){var a=h("div."+b.oClasses.sSortJUIWrapper,this),c=a.contents();h(this).append(c);a.remove()}));!a&&b.nTableReinsertBefore?c.insertBefore(b.nTable,b.nTableReinsertBefore):a||c.appendChild(b.nTable);i=0;for(f=b.aoData.length;i<f;i++)null!==b.aoData[i].nTr&&d.appendChild(b.aoData[i].nTr);!0===b.oFeatures.bAutoWidth&&
+(b.nTable.style.width=q(b.sDestroyWidth));if(f=b.asDestroyStripes.length){a=h(d).children("tr");for(i=0;i<f;i++)a.filter(":nth-child("+f+"n + "+i+")").addClass(b.asDestroyStripes[i])}i=0;for(f=j.settings.length;i<f;i++)j.settings[i]==b&&j.settings.splice(i,1);e=b=null};this.fnDraw=function(a){var b=s(this[j.ext.iApiIndex]);!1===a?(y(b),x(b)):aa(b)};this.fnFilter=function(a,b,c,d,e,f){var g=s(this[j.ext.iApiIndex]);if(g.oFeatures.bFilter){if(c===n||null===c)c=!1;if(d===n||null===d)d=!0;if(e===n||null===
+e)e=!0;if(f===n||null===f)f=!0;if(b===n||null===b){if(K(g,{sSearch:a+"",bRegex:c,bSmart:d,bCaseInsensitive:f},1),e&&g.aanFeatures.f){b=g.aanFeatures.f;c=0;for(d=b.length;c<d;c++)try{b[c]._DT_Input!=l.activeElement&&h(b[c]._DT_Input).val(a)}catch(o){h(b[c]._DT_Input).val(a)}}}else h.extend(g.aoPreSearchCols[b],{sSearch:a+"",bRegex:c,bSmart:d,bCaseInsensitive:f}),K(g,g.oPreviousSearch,1)}};this.fnGetData=function(a,b){var c=s(this[j.ext.iApiIndex]);if(a!==n){var d=a;if("object"===typeof a){var e=a.nodeName.toLowerCase();
+"tr"===e?d=I(c,a):"td"===e&&(d=I(c,a.parentNode),b=fa(c,d,a))}return b!==n?v(c,d,b,""):c.aoData[d]!==n?c.aoData[d]._aData:null}return Z(c)};this.fnGetNodes=function(a){var b=s(this[j.ext.iApiIndex]);return a!==n?b.aoData[a]!==n?b.aoData[a].nTr:null:T(b)};this.fnGetPosition=function(a){var b=s(this[j.ext.iApiIndex]),c=a.nodeName.toUpperCase();return"TR"==c?I(b,a):"TD"==c||"TH"==c?(c=I(b,a.parentNode),a=fa(b,c,a),[c,R(b,a),a]):null};this.fnIsOpen=function(a){for(var b=s(this[j.ext.iApiIndex]),c=0;c<
+b.aoOpenRows.length;c++)if(b.aoOpenRows[c].nParent==a)return!0;return!1};this.fnOpen=function(a,b,c){var d=s(this[j.ext.iApiIndex]),e=T(d);if(-1!==h.inArray(a,e)){this.fnClose(a);var e=l.createElement("tr"),f=l.createElement("td");e.appendChild(f);f.className=c;f.colSpan=t(d);"string"===typeof b?f.innerHTML=b:h(f).html(b);b=h("tr",d.nTBody);-1!=h.inArray(a,b)&&h(e).insertAfter(a);d.aoOpenRows.push({nTr:e,nParent:a});return e}};this.fnPageChange=function(a,b){var c=s(this[j.ext.iApiIndex]);qa(c,a);
+y(c);(b===n||b)&&x(c)};this.fnSetColumnVis=function(a,b,c){var d=s(this[j.ext.iApiIndex]),e,f,g=d.aoColumns,h=d.aoData,o,m;if(g[a].bVisible!=b){if(b){for(e=f=0;e<a;e++)g[e].bVisible&&f++;m=f>=t(d);if(!m)for(e=a;e<g.length;e++)if(g[e].bVisible){o=e;break}e=0;for(f=h.length;e<f;e++)null!==h[e].nTr&&(m?h[e].nTr.appendChild(h[e]._anHidden[a]):h[e].nTr.insertBefore(h[e]._anHidden[a],J(d,e)[o]))}else{e=0;for(f=h.length;e<f;e++)null!==h[e].nTr&&(o=J(d,e)[a],h[e]._anHidden[a]=o,o.parentNode.removeChild(o))}g[a].bVisible=
+b;W(d,d.aoHeader);d.nTFoot&&W(d,d.aoFooter);e=0;for(f=d.aoOpenRows.length;e<f;e++)d.aoOpenRows[e].nTr.colSpan=t(d);if(c===n||c)k(d),x(d);ra(d)}};this.fnSettings=function(){return s(this[j.ext.iApiIndex])};this.fnSort=function(a){var b=s(this[j.ext.iApiIndex]);b.aaSorting=a;O(b)};this.fnSortListener=function(a,b,c){ia(s(this[j.ext.iApiIndex]),a,b,c)};this.fnUpdate=function(a,b,c,d,e){var f=s(this[j.ext.iApiIndex]),b="object"===typeof b?I(f,b):b;if(h.isArray(a)&&c===n){f.aoData[b]._aData=a.slice();
+for(c=0;c<f.aoColumns.length;c++)this.fnUpdate(v(f,b,c),b,c,!1,!1)}else if(h.isPlainObject(a)&&c===n){f.aoData[b]._aData=h.extend(!0,{},a);for(c=0;c<f.aoColumns.length;c++)this.fnUpdate(v(f,b,c),b,c,!1,!1)}else{F(f,b,c,a);var a=v(f,b,c,"display"),g=f.aoColumns[c];null!==g.fnRender&&(a=S(f,b,c),g.bUseRendered&&F(f,b,c,a));null!==f.aoData[b].nTr&&(J(f,b)[c].innerHTML=a)}c=h.inArray(b,f.aiDisplay);f.asDataSearch[c]=na(f,Y(f,b,"filter",r(f,"bSearchable")));(e===n||e)&&k(f);(d===n||d)&&aa(f);return 0};
+this.fnVersionCheck=j.ext.fnVersionCheck;this.oApi={_fnExternApiFunc:Va,_fnInitialise:ba,_fnInitComplete:$,_fnLanguageCompat:pa,_fnAddColumn:o,_fnColumnOptions:m,_fnAddData:H,_fnCreateTr:ea,_fnGatherData:ua,_fnBuildHead:va,_fnDrawHead:W,_fnDraw:x,_fnReDraw:aa,_fnAjaxUpdate:wa,_fnAjaxParameters:Ea,_fnAjaxUpdateDraw:Fa,_fnServerParams:ka,_fnAddOptionsHtml:xa,_fnFeatureHtmlTable:Ba,_fnScrollDraw:La,_fnAdjustColumnSizing:k,_fnFeatureHtmlFilter:za,_fnFilterComplete:K,_fnFilterCustom:Ia,_fnFilterColumn:Ha,
+_fnFilter:Ga,_fnBuildSearchArray:la,_fnBuildSearchRow:na,_fnFilterCreateSearch:ma,_fnDataToSearch:Ja,_fnSort:O,_fnSortAttachListener:ia,_fnSortingClasses:P,_fnFeatureHtmlPaginate:Da,_fnPageChange:qa,_fnFeatureHtmlInfo:Ca,_fnUpdateInfo:Ka,_fnFeatureHtmlLength:ya,_fnFeatureHtmlProcessing:Aa,_fnProcessingDisplay:E,_fnVisibleToColumnIndex:G,_fnColumnIndexToVisible:R,_fnNodeToDataIndex:I,_fnVisbleColumns:t,_fnCalculateEnd:y,_fnConvertToWidth:Ma,_fnCalculateColumnWidths:da,_fnScrollingWidthAdjust:Oa,_fnGetWidestNode:Na,
+_fnGetMaxLenString:Pa,_fnStringToCss:q,_fnDetectType:B,_fnSettingsFromNode:s,_fnGetDataMaster:Z,_fnGetTrNodes:T,_fnGetTdNodes:J,_fnEscapeRegex:oa,_fnDeleteIndex:ha,_fnReOrderIndex:u,_fnColumnOrdering:M,_fnLog:D,_fnClearTable:ga,_fnSaveState:ra,_fnLoadState:Sa,_fnCreateCookie:function(a,b,c,d,e){var f=new Date;f.setTime(f.getTime()+1E3*c);var c=X.location.pathname.split("/"),a=a+"_"+c.pop().replace(/[\/:]/g,"").toLowerCase(),g;null!==e?(g="function"===typeof h.parseJSON?h.parseJSON(b):eval("("+b+")"),
+b=e(a,g,f.toGMTString(),c.join("/")+"/")):b=a+"="+encodeURIComponent(b)+"; expires="+f.toGMTString()+"; path="+c.join("/")+"/";a=l.cookie.split(";");e=b.split(";")[0].length;f=[];if(4096<e+l.cookie.length+10){for(var j=0,o=a.length;j<o;j++)if(-1!=a[j].indexOf(d)){var k=a[j].split("=");try{(g=eval("("+decodeURIComponent(k[1])+")"))&&g.iCreate&&f.push({name:k[0],time:g.iCreate})}catch(m){}}for(f.sort(function(a,b){return b.time-a.time});4096<e+l.cookie.length+10;){if(0===f.length)return;d=f.pop();l.cookie=
+d.name+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; path="+c.join("/")+"/"}}l.cookie=b},_fnReadCookie:function(a){for(var b=X.location.pathname.split("/"),a=a+"_"+b[b.length-1].replace(/[\/:]/g,"").toLowerCase()+"=",b=l.cookie.split(";"),c=0;c<b.length;c++){for(var d=b[c];" "==d.charAt(0);)d=d.substring(1,d.length);if(0===d.indexOf(a))return decodeURIComponent(d.substring(a.length,d.length))}return null},_fnDetectHeader:V,_fnGetUniqueThs:N,_fnScrollBarWidth:Qa,_fnApplyToChildren:C,_fnMap:p,_fnGetRowData:Y,
+_fnGetCellData:v,_fnSetCellData:F,_fnGetObjectDataFn:Q,_fnSetObjectDataFn:L,_fnApplyColumnDefs:ta,_fnBindAction:Ra,_fnExtend:Ta,_fnCallbackReg:z,_fnCallbackFire:A,_fnJsonString:Wa,_fnRender:S,_fnNodeToColumnIndex:fa,_fnInfoMacros:ja,_fnBrowserDetect:Ua,_fnGetColumns:r};h.extend(j.ext.oApi,this.oApi);for(var sa in j.ext.oApi)sa&&(this[sa]=Va(sa));var ca=this;this.each(function(){var a=0,b,c,d;c=this.getAttribute("id");var i=!1,f=!1;if("table"!=this.nodeName.toLowerCase())D(null,0,"Attempted to initialise DataTables on a node which is not a table: "+
+this.nodeName);else{a=0;for(b=j.settings.length;a<b;a++){if(j.settings[a].nTable==this){if(e===n||e.bRetrieve)return j.settings[a].oInstance;if(e.bDestroy){j.settings[a].oInstance.fnDestroy();break}else{D(j.settings[a],0,"Cannot reinitialise DataTable.\n\nTo retrieve the DataTables object for this table, pass no arguments or see the docs for bRetrieve and bDestroy");return}}if(j.settings[a].sTableId==this.id){j.settings.splice(a,1);break}}if(null===c||""===c)this.id=c="DataTables_Table_"+j.ext._oExternConfig.iNextUnique++;
+var g=h.extend(!0,{},j.models.oSettings,{nTable:this,oApi:ca.oApi,oInit:e,sDestroyWidth:h(this).width(),sInstance:c,sTableId:c});j.settings.push(g);g.oInstance=1===ca.length?ca:h(this).dataTable();e||(e={});e.oLanguage&&pa(e.oLanguage);e=Ta(h.extend(!0,{},j.defaults),e);p(g.oFeatures,e,"bPaginate");p(g.oFeatures,e,"bLengthChange");p(g.oFeatures,e,"bFilter");p(g.oFeatures,e,"bSort");p(g.oFeatures,e,"bInfo");p(g.oFeatures,e,"bProcessing");p(g.oFeatures,e,"bAutoWidth");p(g.oFeatures,e,"bSortClasses");
+p(g.oFeatures,e,"bServerSide");p(g.oFeatures,e,"bDeferRender");p(g.oScroll,e,"sScrollX","sX");p(g.oScroll,e,"sScrollXInner","sXInner");p(g.oScroll,e,"sScrollY","sY");p(g.oScroll,e,"bScrollCollapse","bCollapse");p(g.oScroll,e,"bScrollInfinite","bInfinite");p(g.oScroll,e,"iScrollLoadGap","iLoadGap");p(g.oScroll,e,"bScrollAutoCss","bAutoCss");p(g,e,"asStripeClasses");p(g,e,"asStripClasses","asStripeClasses");p(g,e,"fnServerData");p(g,e,"fnFormatNumber");p(g,e,"sServerMethod");p(g,e,"aaSorting");p(g,
+e,"aaSortingFixed");p(g,e,"aLengthMenu");p(g,e,"sPaginationType");p(g,e,"sAjaxSource");p(g,e,"sAjaxDataProp");p(g,e,"iCookieDuration");p(g,e,"sCookiePrefix");p(g,e,"sDom");p(g,e,"bSortCellsTop");p(g,e,"iTabIndex");p(g,e,"oSearch","oPreviousSearch");p(g,e,"aoSearchCols","aoPreSearchCols");p(g,e,"iDisplayLength","_iDisplayLength");p(g,e,"bJQueryUI","bJUI");p(g,e,"fnCookieCallback");p(g,e,"fnStateLoad");p(g,e,"fnStateSave");p(g.oLanguage,e,"fnInfoCallback");z(g,"aoDrawCallback",e.fnDrawCallback,"user");
+z(g,"aoServerParams",e.fnServerParams,"user");z(g,"aoStateSaveParams",e.fnStateSaveParams,"user");z(g,"aoStateLoadParams",e.fnStateLoadParams,"user");z(g,"aoStateLoaded",e.fnStateLoaded,"user");z(g,"aoRowCallback",e.fnRowCallback,"user");z(g,"aoRowCreatedCallback",e.fnCreatedRow,"user");z(g,"aoHeaderCallback",e.fnHeaderCallback,"user");z(g,"aoFooterCallback",e.fnFooterCallback,"user");z(g,"aoInitComplete",e.fnInitComplete,"user");z(g,"aoPreDrawCallback",e.fnPreDrawCallback,"user");g.oFeatures.bServerSide&&
+g.oFeatures.bSort&&g.oFeatures.bSortClasses?z(g,"aoDrawCallback",P,"server_side_sort_classes"):g.oFeatures.bDeferRender&&z(g,"aoDrawCallback",P,"defer_sort_classes");e.bJQueryUI?(h.extend(g.oClasses,j.ext.oJUIClasses),e.sDom===j.defaults.sDom&&"lfrtip"===j.defaults.sDom&&(g.sDom='<"H"lfr>t<"F"ip>')):h.extend(g.oClasses,j.ext.oStdClasses);h(this).addClass(g.oClasses.sTable);if(""!==g.oScroll.sX||""!==g.oScroll.sY)g.oScroll.iBarWidth=Qa();g.iInitDisplayStart===n&&(g.iInitDisplayStart=e.iDisplayStart,
+g._iDisplayStart=e.iDisplayStart);e.bStateSave&&(g.oFeatures.bStateSave=!0,Sa(g,e),z(g,"aoDrawCallback",ra,"state_save"));null!==e.iDeferLoading&&(g.bDeferLoading=!0,a=h.isArray(e.iDeferLoading),g._iRecordsDisplay=a?e.iDeferLoading[0]:e.iDeferLoading,g._iRecordsTotal=a?e.iDeferLoading[1]:e.iDeferLoading);null!==e.aaData&&(f=!0);""!==e.oLanguage.sUrl?(g.oLanguage.sUrl=e.oLanguage.sUrl,h.getJSON(g.oLanguage.sUrl,null,function(a){pa(a);h.extend(true,g.oLanguage,e.oLanguage,a);ba(g)}),i=!0):h.extend(!0,
+g.oLanguage,e.oLanguage);null===e.asStripeClasses&&(g.asStripeClasses=[g.oClasses.sStripeOdd,g.oClasses.sStripeEven]);b=g.asStripeClasses.length;g.asDestroyStripes=[];if(b){c=!1;d=h(this).children("tbody").children("tr:lt("+b+")");for(a=0;a<b;a++)d.hasClass(g.asStripeClasses[a])&&(c=!0,g.asDestroyStripes.push(g.asStripeClasses[a]));c&&d.removeClass(g.asStripeClasses.join(" "))}c=[];a=this.getElementsByTagName("thead");0!==a.length&&(V(g.aoHeader,a[0]),c=N(g));if(null===e.aoColumns){d=[];a=0;for(b=
+c.length;a<b;a++)d.push(null)}else d=e.aoColumns;a=0;for(b=d.length;a<b;a++)e.saved_aoColumns!==n&&e.saved_aoColumns.length==b&&(null===d[a]&&(d[a]={}),d[a].bVisible=e.saved_aoColumns[a].bVisible),o(g,c?c[a]:null);ta(g,e.aoColumnDefs,d,function(a,b){m(g,a,b)});a=0;for(b=g.aaSorting.length;a<b;a++){g.aaSorting[a][0]>=g.aoColumns.length&&(g.aaSorting[a][0]=0);var k=g.aoColumns[g.aaSorting[a][0]];g.aaSorting[a][2]===n&&(g.aaSorting[a][2]=0);e.aaSorting===n&&g.saved_aaSorting===n&&(g.aaSorting[a][1]=
+k.asSorting[0]);c=0;for(d=k.asSorting.length;c<d;c++)if(g.aaSorting[a][1]==k.asSorting[c]){g.aaSorting[a][2]=c;break}}P(g);Ua(g);a=h(this).children("caption").each(function(){this._captionSide=h(this).css("caption-side")});b=h(this).children("thead");0===b.length&&(b=[l.createElement("thead")],this.appendChild(b[0]));g.nTHead=b[0];b=h(this).children("tbody");0===b.length&&(b=[l.createElement("tbody")],this.appendChild(b[0]));g.nTBody=b[0];g.nTBody.setAttribute("role","alert");g.nTBody.setAttribute("aria-live",
+"polite");g.nTBody.setAttribute("aria-relevant","all");b=h(this).children("tfoot");if(0===b.length&&0<a.length&&(""!==g.oScroll.sX||""!==g.oScroll.sY))b=[l.createElement("tfoot")],this.appendChild(b[0]);0<b.length&&(g.nTFoot=b[0],V(g.aoFooter,g.nTFoot));if(f)for(a=0;a<e.aaData.length;a++)H(g,e.aaData[a]);else ua(g);g.aiDisplay=g.aiDisplayMaster.slice();g.bInitialised=!0;!1===i&&ba(g)}});ca=null;return this};j.fnVersionCheck=function(e){for(var h=function(e,h){for(;e.length<h;)e+="0";return e},m=j.ext.sVersion.split("."),
+e=e.split("."),k="",n="",l=0,t=e.length;l<t;l++)k+=h(m[l],3),n+=h(e[l],3);return parseInt(k,10)>=parseInt(n,10)};j.fnIsDataTable=function(e){for(var h=j.settings,m=0;m<h.length;m++)if(h[m].nTable===e||h[m].nScrollHead===e||h[m].nScrollFoot===e)return!0;return!1};j.fnTables=function(e){var o=[];jQuery.each(j.settings,function(j,k){(!e||!0===e&&h(k.nTable).is(":visible"))&&o.push(k.nTable)});return o};j.version="1.9.4";j.settings=[];j.models={};j.models.ext={afnFiltering:[],afnSortData:[],aoFeatures:[],
+aTypes:[],fnVersionCheck:j.fnVersionCheck,iApiIndex:0,ofnSearch:{},oApi:{},oStdClasses:{},oJUIClasses:{},oPagination:{},oSort:{},sVersion:j.version,sErrMode:"alert",_oExternConfig:{iNextUnique:0}};j.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0};j.models.oRow={nTr:null,_aData:[],_aSortData:[],_anHidden:[],_sRowStripe:""};j.models.oColumn={aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bUseRendered:null,bVisible:null,_bAutoType:!0,fnCreatedCell:null,fnGetData:null,
+fnRender:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null};j.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bJQueryUI:!1,bLengthChange:!0,
+bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollAutoCss:!0,bScrollCollapse:!1,bScrollInfinite:!1,bServerSide:!1,bSort:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCookieCallback:null,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(e){if(1E3>e)return e;for(var h=e+"",e=h.split(""),j="",h=h.length,k=0;k<h;k++)0===k%3&&0!==k&&(j=this.oLanguage.sInfoThousands+j),j=e[h-k-1]+j;return j},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,
+fnRowCallback:null,fnServerData:function(e,j,m,k){k.jqXHR=h.ajax({url:e,data:j,success:function(e){e.sError&&k.oApi._fnLog(k,0,e.sError);h(k.oInstance).trigger("xhr",[k,e]);m(e)},dataType:"json",cache:!1,type:k.sServerMethod,error:function(e,h){"parsererror"==h&&k.oApi._fnLog(k,0,"DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.")}})},fnServerParams:null,fnStateLoad:function(e){var e=this.oApi._fnReadCookie(e.sCookiePrefix+e.sInstance),j;try{j=
+"function"===typeof h.parseJSON?h.parseJSON(e):eval("("+e+")")}catch(m){j=null}return j},fnStateLoadParams:null,fnStateLoaded:null,fnStateSave:function(e,h){this.oApi._fnCreateCookie(e.sCookiePrefix+e.sInstance,this.oApi._fnJsonString(h),e.iCookieDuration,e.sCookiePrefix,e.fnCookieCallback)},fnStateSaveParams:null,iCookieDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iScrollLoadGap:100,iTabIndex:0,oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},
+oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sInfoThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sUrl:"",sZeroRecords:"No matching records found"},oSearch:h.extend({},j.models.oSearch),sAjaxDataProp:"aaData",
+sAjaxSource:null,sCookiePrefix:"SpryMedia_DataTables_",sDom:"lfrtip",sPaginationType:"two_button",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET"};j.defaults.columns={aDataSort:null,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bUseRendered:!0,bVisible:!0,fnCreatedCell:null,fnRender:null,iDataSort:-1,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null};j.models.oSettings={oFeatures:{bAutoWidth:null,
+bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortClasses:null,bStateSave:null},oScroll:{bAutoCss:null,bCollapse:null,bInfinite:null,iBarWidth:0,iLoadGap:null,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1},aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aoColumns:[],aoHeader:[],aoFooter:[],asDataSearch:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:null,
+asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,sPaginationType:"two_button",iCookieDuration:0,sCookiePrefix:"",fnCookieCallback:null,aoStateSave:[],aoStateLoad:[],
+oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iDisplayEnd:10,_iRecordsTotal:0,_iRecordsDisplay:0,bJUI:null,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsTotal,10):this.aiDisplayMaster.length},
+fnRecordsDisplay:function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsDisplay,10):this.aiDisplay.length},fnDisplayEnd:function(){return this.oFeatures.bServerSide?!1===this.oFeatures.bPaginate||-1==this._iDisplayLength?this._iDisplayStart+this.aiDisplay.length:Math.min(this._iDisplayStart+this._iDisplayLength,this._iRecordsDisplay):this._iDisplayEnd},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null};j.ext=h.extend(!0,{},j.models.ext);h.extend(j.ext.oStdClasses,
+{sTable:"dataTable",sPagePrevEnabled:"paginate_enabled_previous",sPagePrevDisabled:"paginate_disabled_previous",sPageNextEnabled:"paginate_enabled_next",sPageNextDisabled:"paginate_disabled_next",sPageJUINext:"",sPageJUIPrev:"",sPageButton:"paginate_button",sPageButtonActive:"paginate_active",sPageButtonStaticDisabled:"paginate_button paginate_button_disabled",sPageFirst:"first",sPagePrevious:"previous",sPageNext:"next",sPageLast:"last",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",
+sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",
+sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sFooterTH:"",sJUIHeader:"",sJUIFooter:""});h.extend(j.ext.oJUIClasses,j.ext.oStdClasses,{sPagePrevEnabled:"fg-button ui-button ui-state-default ui-corner-left",sPagePrevDisabled:"fg-button ui-button ui-state-default ui-corner-left ui-state-disabled",sPageNextEnabled:"fg-button ui-button ui-state-default ui-corner-right",
+sPageNextDisabled:"fg-button ui-button ui-state-default ui-corner-right ui-state-disabled",sPageJUINext:"ui-icon ui-icon-circle-arrow-e",sPageJUIPrev:"ui-icon ui-icon-circle-arrow-w",sPageButton:"fg-button ui-button ui-state-default",sPageButtonActive:"fg-button ui-button ui-state-default ui-state-disabled",sPageButtonStaticDisabled:"fg-button ui-button ui-state-default ui-state-disabled",sPageFirst:"first ui-corner-tl ui-corner-bl",sPageLast:"last ui-corner-tr ui-corner-br",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",
+sSortAsc:"ui-state-default",sSortDesc:"ui-state-default",sSortable:"ui-state-default",sSortableAsc:"ui-state-default",sSortableDesc:"ui-state-default",sSortableNone:"ui-state-default",sSortJUIAsc:"css_right ui-icon ui-icon-triangle-1-n",sSortJUIDesc:"css_right ui-icon ui-icon-triangle-1-s",sSortJUI:"css_right ui-icon ui-icon-carat-2-n-s",sSortJUIAscAllowed:"css_right ui-icon ui-icon-carat-1-n",sSortJUIDescAllowed:"css_right ui-icon ui-icon-carat-1-s",sSortJUIWrapper:"DataTables_sort_wrapper",sSortIcon:"DataTables_sort_icon",
+sScrollHead:"dataTables_scrollHead ui-state-default",sScrollFoot:"dataTables_scrollFoot ui-state-default",sFooterTH:"ui-state-default",sJUIHeader:"fg-toolbar ui-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix",sJUIFooter:"fg-toolbar ui-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix"});h.extend(j.ext.oPagination,{two_button:{fnInit:function(e,j,m){var k=e.oLanguage.oPaginate,n=function(h){e.oApi._fnPageChange(e,h.data.action)&&m(e)},k=!e.bJUI?'<a class="'+
+e.oClasses.sPagePrevDisabled+'" tabindex="'+e.iTabIndex+'" role="button">'+k.sPrevious+'</a><a class="'+e.oClasses.sPageNextDisabled+'" tabindex="'+e.iTabIndex+'" role="button">'+k.sNext+"</a>":'<a class="'+e.oClasses.sPagePrevDisabled+'" tabindex="'+e.iTabIndex+'" role="button"><span class="'+e.oClasses.sPageJUIPrev+'"></span></a><a class="'+e.oClasses.sPageNextDisabled+'" tabindex="'+e.iTabIndex+'" role="button"><span class="'+e.oClasses.sPageJUINext+'"></span></a>';h(j).append(k);var l=h("a",j),
+k=l[0],l=l[1];e.oApi._fnBindAction(k,{action:"previous"},n);e.oApi._fnBindAction(l,{action:"next"},n);e.aanFeatures.p||(j.id=e.sTableId+"_paginate",k.id=e.sTableId+"_previous",l.id=e.sTableId+"_next",k.setAttribute("aria-controls",e.sTableId),l.setAttribute("aria-controls",e.sTableId))},fnUpdate:function(e){if(e.aanFeatures.p)for(var h=e.oClasses,j=e.aanFeatures.p,k,l=0,n=j.length;l<n;l++)if(k=j[l].firstChild)k.className=0===e._iDisplayStart?h.sPagePrevDisabled:h.sPagePrevEnabled,k=k.nextSibling,
+k.className=e.fnDisplayEnd()==e.fnRecordsDisplay()?h.sPageNextDisabled:h.sPageNextEnabled}},iFullNumbersShowPages:5,full_numbers:{fnInit:function(e,j,m){var k=e.oLanguage.oPaginate,l=e.oClasses,n=function(h){e.oApi._fnPageChange(e,h.data.action)&&m(e)};h(j).append('<a tabindex="'+e.iTabIndex+'" class="'+l.sPageButton+" "+l.sPageFirst+'">'+k.sFirst+'</a><a tabindex="'+e.iTabIndex+'" class="'+l.sPageButton+" "+l.sPagePrevious+'">'+k.sPrevious+'</a><span></span><a tabindex="'+e.iTabIndex+'" class="'+
+l.sPageButton+" "+l.sPageNext+'">'+k.sNext+'</a><a tabindex="'+e.iTabIndex+'" class="'+l.sPageButton+" "+l.sPageLast+'">'+k.sLast+"</a>");var t=h("a",j),k=t[0],l=t[1],r=t[2],t=t[3];e.oApi._fnBindAction(k,{action:"first"},n);e.oApi._fnBindAction(l,{action:"previous"},n);e.oApi._fnBindAction(r,{action:"next"},n);e.oApi._fnBindAction(t,{action:"last"},n);e.aanFeatures.p||(j.id=e.sTableId+"_paginate",k.id=e.sTableId+"_first",l.id=e.sTableId+"_previous",r.id=e.sTableId+"_next",t.id=e.sTableId+"_last")},
+fnUpdate:function(e,o){if(e.aanFeatures.p){var m=j.ext.oPagination.iFullNumbersShowPages,k=Math.floor(m/2),l=Math.ceil(e.fnRecordsDisplay()/e._iDisplayLength),n=Math.ceil(e._iDisplayStart/e._iDisplayLength)+1,t="",r,B=e.oClasses,u,M=e.aanFeatures.p,L=function(h){e.oApi._fnBindAction(this,{page:h+r-1},function(h){e.oApi._fnPageChange(e,h.data.page);o(e);h.preventDefault()})};-1===e._iDisplayLength?n=k=r=1:l<m?(r=1,k=l):n<=k?(r=1,k=m):n>=l-k?(r=l-m+1,k=l):(r=n-Math.ceil(m/2)+1,k=r+m-1);for(m=r;m<=k;m++)t+=
+n!==m?'<a tabindex="'+e.iTabIndex+'" class="'+B.sPageButton+'">'+e.fnFormatNumber(m)+"</a>":'<a tabindex="'+e.iTabIndex+'" class="'+B.sPageButtonActive+'">'+e.fnFormatNumber(m)+"</a>";m=0;for(k=M.length;m<k;m++)u=M[m],u.hasChildNodes()&&(h("span:eq(0)",u).html(t).children("a").each(L),u=u.getElementsByTagName("a"),u=[u[0],u[1],u[u.length-2],u[u.length-1]],h(u).removeClass(B.sPageButton+" "+B.sPageButtonActive+" "+B.sPageButtonStaticDisabled),h([u[0],u[1]]).addClass(1==n?B.sPageButtonStaticDisabled:
+B.sPageButton),h([u[2],u[3]]).addClass(0===l||n===l||-1===e._iDisplayLength?B.sPageButtonStaticDisabled:B.sPageButton))}}}});h.extend(j.ext.oSort,{"string-pre":function(e){"string"!=typeof e&&(e=null!==e&&e.toString?e.toString():"");return e.toLowerCase()},"string-asc":function(e,h){return e<h?-1:e>h?1:0},"string-desc":function(e,h){return e<h?1:e>h?-1:0},"html-pre":function(e){return e.replace(/<.*?>/g,"").toLowerCase()},"html-asc":function(e,h){return e<h?-1:e>h?1:0},"html-desc":function(e,h){return e<
+h?1:e>h?-1:0},"date-pre":function(e){e=Date.parse(e);if(isNaN(e)||""===e)e=Date.parse("01/01/1970 00:00:00");return e},"date-asc":function(e,h){return e-h},"date-desc":function(e,h){return h-e},"numeric-pre":function(e){return"-"==e||""===e?0:1*e},"numeric-asc":function(e,h){return e-h},"numeric-desc":function(e,h){return h-e}});h.extend(j.ext.aTypes,[function(e){if("number"===typeof e)return"numeric";if("string"!==typeof e)return null;var h,j=!1;h=e.charAt(0);if(-1=="0123456789-".indexOf(h))return null;
+for(var k=1;k<e.length;k++){h=e.charAt(k);if(-1=="0123456789.".indexOf(h))return null;if("."==h){if(j)return null;j=!0}}return"numeric"},function(e){var h=Date.parse(e);return null!==h&&!isNaN(h)||"string"===typeof e&&0===e.length?"date":null},function(e){return"string"===typeof e&&-1!=e.indexOf("<")&&-1!=e.indexOf(">")?"html":null}]);h.fn.DataTable=j;h.fn.dataTable=j;h.fn.dataTableSettings=j.settings;h.fn.dataTableExt=j.ext};"function"===typeof define&&define.amd?define(["jquery"],L):jQuery&&!jQuery.fn.dataTable&&
+L(jQuery)})(window,document);
diff --git a/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/animated-overlay.gif b/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/animated-overlay.gif
new file mode 100644
index 00000000..d441f75e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/animated-overlay.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-bg_flat_0_aaaaaa_40x100.png b/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-bg_flat_0_aaaaaa_40x100.png
new file mode 100644
index 00000000..5b5dab2a
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-bg_flat_0_aaaaaa_40x100.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-bg_flat_75_ffffff_40x100.png b/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-bg_flat_75_ffffff_40x100.png
new file mode 100644
index 00000000..ac8b229a
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-bg_flat_75_ffffff_40x100.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-bg_glass_55_fbf9ee_1x400.png b/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-bg_glass_55_fbf9ee_1x400.png
new file mode 100644
index 00000000..ad3d6346
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-bg_glass_55_fbf9ee_1x400.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-bg_glass_65_ffffff_1x400.png b/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-bg_glass_65_ffffff_1x400.png
new file mode 100644
index 00000000..42ccba26
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-bg_glass_65_ffffff_1x400.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-bg_glass_75_dadada_1x400.png b/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-bg_glass_75_dadada_1x400.png
new file mode 100644
index 00000000..5a46b47c
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-bg_glass_75_dadada_1x400.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-bg_glass_75_e6e6e6_1x400.png b/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-bg_glass_75_e6e6e6_1x400.png
new file mode 100644
index 00000000..86c2baa6
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-bg_glass_75_e6e6e6_1x400.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-bg_glass_95_fef1ec_1x400.png b/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-bg_glass_95_fef1ec_1x400.png
new file mode 100644
index 00000000..4443fdc1
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-bg_glass_95_fef1ec_1x400.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png
new file mode 100644
index 00000000..7c9fa6c6
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-icons_222222_256x240.png b/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-icons_222222_256x240.png
new file mode 100644
index 00000000..ee039dc0
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-icons_222222_256x240.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-icons_2e83ff_256x240.png b/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-icons_2e83ff_256x240.png
new file mode 100644
index 00000000..45e8928e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-icons_2e83ff_256x240.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-icons_454545_256x240.png b/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-icons_454545_256x240.png
new file mode 100644
index 00000000..7ec70d11
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-icons_454545_256x240.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-icons_888888_256x240.png b/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-icons_888888_256x240.png
new file mode 100644
index 00000000..5ba708c3
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-icons_888888_256x240.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-icons_cd0a0a_256x240.png b/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-icons_cd0a0a_256x240.png
new file mode 100644
index 00000000..7930a558
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/images/ui-icons_cd0a0a_256x240.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/jquery-ui-timepicker-addon.css b/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/jquery-ui-timepicker-addon.css
new file mode 100644
index 00000000..b93a85f6
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/jquery-ui-timepicker-addon.css
@@ -0,0 +1,10 @@
+.ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }
+.ui-timepicker-div dl { text-align: left; }
+.ui-timepicker-div dl dt { height: 25px; margin-bottom: -25px; }
+.ui-timepicker-div dl dd { margin: 0 10px 10px 65px; }
+.ui-timepicker-div td { font-size: 90%; }
+.ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; }
+
+.ui-timepicker-rtl{ direction: rtl; }
+.ui-timepicker-rtl dl { text-align: right; }
+.ui-timepicker-rtl dl dd { margin: 0 65px 10px 10px; } \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/jquery-ui.min.css b/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/jquery-ui.min.css
new file mode 100644
index 00000000..b84984a9
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/jquery-ui/css/base/jquery-ui.min.css
@@ -0,0 +1,4 @@
+/*! jQuery UI - v1.10.3 - 2013-05-03
+* http://jqueryui.com
+* Includes: jquery.ui.core.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css, jquery.ui.theme.css
+* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */ .ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin-top:2px;padding:.5em .5em .5em .7em;min-height:0}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-noicons{padding-left:.7em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month-year{width:100%}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:49%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:700;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-dialog{position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:21px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:0;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-menu{list-style:none;padding:2px;margin:0;display:block;outline:0}.ui-menu .ui-menu{margin-top:-3px;position:absolute}.ui-menu .ui-menu-item{margin:0;padding:0;width:100%;list-style-image:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)}.ui-menu .ui-menu-divider{margin:5px -2px 5px -2px;height:0;font-size:0;line-height:0;border-width:1px 0 0}.ui-menu .ui-menu-item a{text-decoration:none;display:block;padding:2px .4em;line-height:1.5;min-height:0;font-weight:400}.ui-menu .ui-menu-item a.ui-state-focus,.ui-menu .ui-menu-item a.ui-state-active{font-weight:400;margin:-1px}.ui-menu .ui-state-disabled{font-weight:400;margin:.4em 0 .2em;line-height:1.5}.ui-menu .ui-state-disabled a{cursor:default}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item a{position:relative;padding-left:2em}.ui-menu .ui-icon{position:absolute;top:.2em;left:.2em}.ui-menu .ui-menu-icon{position:static;float:right}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url(images/animated-overlay.gif);height:100%;filter:alpha(opacity=25);opacity:.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;display:block}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted #000}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:0;background:0;color:inherit;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:0;border-bottom:0;border-right:0}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav li a{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active a,.ui-tabs .ui-tabs-nav li.ui-state-disabled a,.ui-tabs .ui-tabs-nav li.ui-tabs-loading a{cursor:text}.ui-tabs .ui-tabs-nav li a,.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:0}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}body .ui-tooltip{border-width:2px}.ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #aaa;background:#fff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x;color:#222}.ui-widget-content a{color:#222}.ui-widget-header{border:1px solid #aaa;background:#ccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x;color:#222;font-weight:700}.ui-widget-header a{color:#222}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #d3d3d3;background:#e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;font-weight:400;color:#555}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#555;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #999;background:#dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x;font-weight:400;color:#212121}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited{color:#212121;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #aaa;background:#fff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;font-weight:400;color:#212121}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#212121;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fcefa1;background:#fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x;color:#cd0a0a}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#cd0a0a}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#cd0a0a}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:700}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:400}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.ui-widget-header .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.ui-state-default .ui-icon{background-image:url(images/ui-icons_888888_256x240.png)}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url(images/ui-icons_454545_256x240.png)}.ui-state-active .ui-icon{background-image:url(images/ui-icons_454545_256x240.png)}.ui-state-highlight .ui-icon{background-image:url(images/ui-icons_2e83ff_256x240.png)}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url(images/ui-icons_cd0a0a_256x240.png)}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:4px}.ui-widget-overlay{background:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{margin:-8px 0 0 -8px;padding:8px;background:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30);border-radius:8px} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/jquery-ui/i18n/jquery-ui-i18n.min.js b/mayor-orig/www/skin/classic/share/javascript/jquery-ui/i18n/jquery-ui-i18n.min.js
new file mode 100644
index 00000000..346d0f52
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/jquery-ui/i18n/jquery-ui-i18n.min.js
@@ -0,0 +1,6 @@
+/*! jQuery UI - v1.10.3 - 2013-05-03
+* http://jqueryui.com
+* Includes: jquery.ui.datepicker-af.js, jquery.ui.datepicker-ar-DZ.js, jquery.ui.datepicker-ar.js, jquery.ui.datepicker-az.js, jquery.ui.datepicker-be.js, jquery.ui.datepicker-bg.js, jquery.ui.datepicker-bs.js, jquery.ui.datepicker-ca.js, jquery.ui.datepicker-cs.js, jquery.ui.datepicker-cy-GB.js, jquery.ui.datepicker-da.js, jquery.ui.datepicker-de.js, jquery.ui.datepicker-el.js, jquery.ui.datepicker-en-AU.js, jquery.ui.datepicker-en-GB.js, jquery.ui.datepicker-en-NZ.js, jquery.ui.datepicker-eo.js, jquery.ui.datepicker-es.js, jquery.ui.datepicker-et.js, jquery.ui.datepicker-eu.js, jquery.ui.datepicker-fa.js, jquery.ui.datepicker-fi.js, jquery.ui.datepicker-fo.js, jquery.ui.datepicker-fr-CA.js, jquery.ui.datepicker-fr-CH.js, jquery.ui.datepicker-fr.js, jquery.ui.datepicker-gl.js, jquery.ui.datepicker-he.js, jquery.ui.datepicker-hi.js, jquery.ui.datepicker-hr.js, jquery.ui.datepicker-hu.js, jquery.ui.datepicker-hy.js, jquery.ui.datepicker-id.js, jquery.ui.datepicker-is.js, jquery.ui.datepicker-it.js, jquery.ui.datepicker-ja.js, jquery.ui.datepicker-ka.js, jquery.ui.datepicker-kk.js, jquery.ui.datepicker-km.js, jquery.ui.datepicker-ko.js, jquery.ui.datepicker-ky.js, jquery.ui.datepicker-lb.js, jquery.ui.datepicker-lt.js, jquery.ui.datepicker-lv.js, jquery.ui.datepicker-mk.js, jquery.ui.datepicker-ml.js, jquery.ui.datepicker-ms.js, jquery.ui.datepicker-nb.js, jquery.ui.datepicker-nl-BE.js, jquery.ui.datepicker-nl.js, jquery.ui.datepicker-nn.js, jquery.ui.datepicker-no.js, jquery.ui.datepicker-pl.js, jquery.ui.datepicker-pt-BR.js, jquery.ui.datepicker-pt.js, jquery.ui.datepicker-rm.js, jquery.ui.datepicker-ro.js, jquery.ui.datepicker-ru.js, jquery.ui.datepicker-sk.js, jquery.ui.datepicker-sl.js, jquery.ui.datepicker-sq.js, jquery.ui.datepicker-sr-SR.js, jquery.ui.datepicker-sr.js, jquery.ui.datepicker-sv.js, jquery.ui.datepicker-ta.js, jquery.ui.datepicker-th.js, jquery.ui.datepicker-tj.js, jquery.ui.datepicker-tr.js, jquery.ui.datepicker-uk.js, jquery.ui.datepicker-vi.js, jquery.ui.datepicker-zh-CN.js, jquery.ui.datepicker-zh-HK.js, jquery.ui.datepicker-zh-TW.js
+* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
+jQuery(function(e){e.datepicker.regional.af={closeText:"Selekteer",prevText:"Vorige",nextText:"Volgende",currentText:"Vandag",monthNames:["Januarie","Februarie","Maart","April","Mei","Junie","Julie","Augustus","September","Oktober","November","Desember"],monthNamesShort:["Jan","Feb","Mrt","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Des"],dayNames:["Sondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrydag","Saterdag"],dayNamesShort:["Son","Maa","Din","Woe","Don","Vry","Sat"],dayNamesMin:["So","Ma","Di","Wo","Do","Vr","Sa"],weekHeader:"Wk",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.af)}),jQuery(function(e){e.datepicker.regional["ar-DZ"]={closeText:"إغلاق",prevText:"&#x3C;السابق",nextText:"التالي&#x3E;",currentText:"اليوم",monthNames:["جانفي","فيفري","مارس","أفريل","ماي","جوان","جويلية","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],monthNamesShort:["1","2","3","4","5","6","7","8","9","10","11","12"],dayNames:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],dayNamesShort:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],dayNamesMin:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],weekHeader:"أسبوع",dateFormat:"dd/mm/yy",firstDay:6,isRTL:!0,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional["ar-DZ"])}),jQuery(function(e){e.datepicker.regional.ar={closeText:"إغلاق",prevText:"&#x3C;السابق",nextText:"التالي&#x3E;",currentText:"اليوم",monthNames:["كانون الثاني","شباط","آذار","نيسان","مايو","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول"],monthNamesShort:["1","2","3","4","5","6","7","8","9","10","11","12"],dayNames:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],dayNamesShort:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],dayNamesMin:["ح","ن","ث","ر","خ","ج","س"],weekHeader:"أسبوع",dateFormat:"dd/mm/yy",firstDay:6,isRTL:!0,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.ar)}),jQuery(function(e){e.datepicker.regional.az={closeText:"Bağla",prevText:"&#x3C;Geri",nextText:"İrəli&#x3E;",currentText:"Bugün",monthNames:["Yanvar","Fevral","Mart","Aprel","May","İyun","İyul","Avqust","Sentyabr","Oktyabr","Noyabr","Dekabr"],monthNamesShort:["Yan","Fev","Mar","Apr","May","İyun","İyul","Avq","Sen","Okt","Noy","Dek"],dayNames:["Bazar","Bazar ertəsi","Çərşənbə axşamı","Çərşənbə","Cümə axşamı","Cümə","Şənbə"],dayNamesShort:["B","Be","Ça","Ç","Ca","C","Ş"],dayNamesMin:["B","B","Ç","С","Ç","C","Ş"],weekHeader:"Hf",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.az)}),jQuery(function(e){e.datepicker.regional.be={closeText:"Зачыніць",prevText:"&larr;Папяр.",nextText:"Наст.&rarr;",currentText:"Сёньня",monthNames:["Студзень","Люты","Сакавік","Красавік","Травень","Чэрвень","Ліпень","Жнівень","Верасень","Кастрычнік","Лістапад","Сьнежань"],monthNamesShort:["Сту","Лют","Сак","Кра","Тра","Чэр","Ліп","Жні","Вер","Кас","Ліс","Сьн"],dayNames:["нядзеля","панядзелак","аўторак","серада","чацьвер","пятніца","субота"],dayNamesShort:["ндз","пнд","аўт","срд","чцв","птн","сбт"],dayNamesMin:["Нд","Пн","Аў","Ср","Чц","Пт","Сб"],weekHeader:"Тд",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.be)}),jQuery(function(e){e.datepicker.regional.bg={closeText:"затвори",prevText:"&#x3C;назад",nextText:"напред&#x3E;",nextBigText:"&#x3E;&#x3E;",currentText:"днес",monthNames:["Януари","Февруари","Март","Април","Май","Юни","Юли","Август","Септември","Октомври","Ноември","Декември"],monthNamesShort:["Яну","Фев","Мар","Апр","Май","Юни","Юли","Авг","Сеп","Окт","Нов","Дек"],dayNames:["Неделя","Понеделник","Вторник","Сряда","Четвъртък","Петък","Събота"],dayNamesShort:["Нед","Пон","Вто","Сря","Чет","Пет","Съб"],dayNamesMin:["Не","По","Вт","Ср","Че","Пе","Съ"],weekHeader:"Wk",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.bg)}),jQuery(function(e){e.datepicker.regional.bs={closeText:"Zatvori",prevText:"&#x3C;",nextText:"&#x3E;",currentText:"Danas",monthNames:["Januar","Februar","Mart","April","Maj","Juni","Juli","August","Septembar","Oktobar","Novembar","Decembar"],monthNamesShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],dayNames:["Nedelja","Ponedeljak","Utorak","Srijeda","Četvrtak","Petak","Subota"],dayNamesShort:["Ned","Pon","Uto","Sri","Čet","Pet","Sub"],dayNamesMin:["Ne","Po","Ut","Sr","Če","Pe","Su"],weekHeader:"Wk",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.bs)}),jQuery(function(e){e.datepicker.regional.ca={closeText:"Tanca",prevText:"Anterior",nextText:"Següent",currentText:"Avui",monthNames:["gener","febrer","març","abril","maig","juny","juliol","agost","setembre","octubre","novembre","desembre"],monthNamesShort:["gen","feb","març","abr","maig","juny","jul","ag","set","oct","nov","des"],dayNames:["diumenge","dilluns","dimarts","dimecres","dijous","divendres","dissabte"],dayNamesShort:["dg","dl","dt","dc","dj","dv","ds"],dayNamesMin:["dg","dl","dt","dc","dj","dv","ds"],weekHeader:"Set",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.ca)}),jQuery(function(e){e.datepicker.regional.cs={closeText:"Zavřít",prevText:"&#x3C;Dříve",nextText:"Později&#x3E;",currentText:"Nyní",monthNames:["leden","únor","březen","duben","květen","červen","červenec","srpen","září","říjen","listopad","prosinec"],monthNamesShort:["led","úno","bře","dub","kvě","čer","čvc","srp","zář","říj","lis","pro"],dayNames:["neděle","pondělí","úterý","středa","čtvrtek","pátek","sobota"],dayNamesShort:["ne","po","út","st","čt","pá","so"],dayNamesMin:["ne","po","út","st","čt","pá","so"],weekHeader:"Týd",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.cs)}),jQuery(function(e){e.datepicker.regional["cy-GB"]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["Ionawr","Chwefror","Mawrth","Ebrill","Mai","Mehefin","Gorffennaf","Awst","Medi","Hydref","Tachwedd","Rhagfyr"],monthNamesShort:["Ion","Chw","Maw","Ebr","Mai","Meh","Gor","Aws","Med","Hyd","Tac","Rha"],dayNames:["Dydd Sul","Dydd Llun","Dydd Mawrth","Dydd Mercher","Dydd Iau","Dydd Gwener","Dydd Sadwrn"],dayNamesShort:["Sul","Llu","Maw","Mer","Iau","Gwe","Sad"],dayNamesMin:["Su","Ll","Ma","Me","Ia","Gw","Sa"],weekHeader:"Wy",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional["cy-GB"])}),jQuery(function(e){e.datepicker.regional.da={closeText:"Luk",prevText:"&#x3C;Forrige",nextText:"Næste&#x3E;",currentText:"Idag",monthNames:["Januar","Februar","Marts","April","Maj","Juni","Juli","August","September","Oktober","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],dayNames:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag"],dayNamesShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør"],dayNamesMin:["Sø","Ma","Ti","On","To","Fr","Lø"],weekHeader:"Uge",dateFormat:"dd-mm-yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.da)}),jQuery(function(e){e.datepicker.regional.de={closeText:"Schließen",prevText:"&#x3C;Zurück",nextText:"Vor&#x3E;",currentText:"Heute",monthNames:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthNamesShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],dayNames:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],dayNamesShort:["So","Mo","Di","Mi","Do","Fr","Sa"],dayNamesMin:["So","Mo","Di","Mi","Do","Fr","Sa"],weekHeader:"KW",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.de)}),jQuery(function(e){e.datepicker.regional.el={closeText:"Κλείσιμο",prevText:"Προηγούμενος",nextText:"Επόμενος",currentText:"Τρέχων Μήνας",monthNames:["Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάιος","Ιούνιος","Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος"],monthNamesShort:["Ιαν","Φεβ","Μαρ","Απρ","Μαι","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ"],dayNames:["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο"],dayNamesShort:["Κυρ","Δευ","Τρι","Τετ","Πεμ","Παρ","Σαβ"],dayNamesMin:["Κυ","Δε","Τρ","Τε","Πε","Πα","Σα"],weekHeader:"Εβδ",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.el)}),jQuery(function(e){e.datepicker.regional["en-AU"]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional["en-AU"])}),jQuery(function(e){e.datepicker.regional["en-GB"]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional["en-GB"])}),jQuery(function(e){e.datepicker.regional["en-NZ"]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional["en-NZ"])}),jQuery(function(e){e.datepicker.regional.eo={closeText:"Fermi",prevText:"&#x3C;Anta",nextText:"Sekv&#x3E;",currentText:"Nuna",monthNames:["Januaro","Februaro","Marto","Aprilo","Majo","Junio","Julio","Aŭgusto","Septembro","Oktobro","Novembro","Decembro"],monthNamesShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aŭg","Sep","Okt","Nov","Dec"],dayNames:["Dimanĉo","Lundo","Mardo","Merkredo","Ĵaŭdo","Vendredo","Sabato"],dayNamesShort:["Dim","Lun","Mar","Mer","Ĵaŭ","Ven","Sab"],dayNamesMin:["Di","Lu","Ma","Me","Ĵa","Ve","Sa"],weekHeader:"Sb",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.eo)}),jQuery(function(e){e.datepicker.regional.es={closeText:"Cerrar",prevText:"&#x3C;Ant",nextText:"Sig&#x3E;",currentText:"Hoy",monthNames:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],monthNamesShort:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],dayNames:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"],dayNamesShort:["Dom","Lun","Mar","Mié","Juv","Vie","Sáb"],dayNamesMin:["Do","Lu","Ma","Mi","Ju","Vi","Sá"],weekHeader:"Sm",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.es)}),jQuery(function(e){e.datepicker.regional.et={closeText:"Sulge",prevText:"Eelnev",nextText:"Järgnev",currentText:"Täna",monthNames:["Jaanuar","Veebruar","Märts","Aprill","Mai","Juuni","Juuli","August","September","Oktoober","November","Detsember"],monthNamesShort:["Jaan","Veebr","Märts","Apr","Mai","Juuni","Juuli","Aug","Sept","Okt","Nov","Dets"],dayNames:["Pühapäev","Esmaspäev","Teisipäev","Kolmapäev","Neljapäev","Reede","Laupäev"],dayNamesShort:["Pühap","Esmasp","Teisip","Kolmap","Neljap","Reede","Laup"],dayNamesMin:["P","E","T","K","N","R","L"],weekHeader:"näd",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.et)}),jQuery(function(e){e.datepicker.regional.eu={closeText:"Egina",prevText:"&#x3C;Aur",nextText:"Hur&#x3E;",currentText:"Gaur",monthNames:["urtarrila","otsaila","martxoa","apirila","maiatza","ekaina","uztaila","abuztua","iraila","urria","azaroa","abendua"],monthNamesShort:["urt.","ots.","mar.","api.","mai.","eka.","uzt.","abu.","ira.","urr.","aza.","abe."],dayNames:["igandea","astelehena","asteartea","asteazkena","osteguna","ostirala","larunbata"],dayNamesShort:["ig.","al.","ar.","az.","og.","ol.","lr."],dayNamesMin:["ig","al","ar","az","og","ol","lr"],weekHeader:"As",dateFormat:"yy-mm-dd",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.eu)}),jQuery(function(e){e.datepicker.regional.fa={closeText:"بستن",prevText:"&#x3C;قبلی",nextText:"بعدی&#x3E;",currentText:"امروز",monthNames:["فروردين","ارديبهشت","خرداد","تير","مرداد","شهريور","مهر","آبان","آذر","دی","بهمن","اسفند"],monthNamesShort:["1","2","3","4","5","6","7","8","9","10","11","12"],dayNames:["يکشنبه","دوشنبه","سه‌شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"],dayNamesShort:["ی","د","س","چ","پ","ج","ش"],dayNamesMin:["ی","د","س","چ","پ","ج","ش"],weekHeader:"هف",dateFormat:"yy/mm/dd",firstDay:6,isRTL:!0,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.fa)}),jQuery(function(e){e.datepicker.regional.fi={closeText:"Sulje",prevText:"&#xAB;Edellinen",nextText:"Seuraava&#xBB;",currentText:"Tänään",monthNames:["Tammikuu","Helmikuu","Maaliskuu","Huhtikuu","Toukokuu","Kesäkuu","Heinäkuu","Elokuu","Syyskuu","Lokakuu","Marraskuu","Joulukuu"],monthNamesShort:["Tammi","Helmi","Maalis","Huhti","Touko","Kesä","Heinä","Elo","Syys","Loka","Marras","Joulu"],dayNamesShort:["Su","Ma","Ti","Ke","To","Pe","La"],dayNames:["Sunnuntai","Maanantai","Tiistai","Keskiviikko","Torstai","Perjantai","Lauantai"],dayNamesMin:["Su","Ma","Ti","Ke","To","Pe","La"],weekHeader:"Vk",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.fi)}),jQuery(function(e){e.datepicker.regional.fo={closeText:"Lat aftur",prevText:"&#x3C;Fyrra",nextText:"Næsta&#x3E;",currentText:"Í dag",monthNames:["Januar","Februar","Mars","Apríl","Mei","Juni","Juli","August","September","Oktober","November","Desember"],monthNamesShort:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Des"],dayNames:["Sunnudagur","Mánadagur","Týsdagur","Mikudagur","Hósdagur","Fríggjadagur","Leyardagur"],dayNamesShort:["Sun","Mán","Týs","Mik","Hós","Frí","Ley"],dayNamesMin:["Su","Má","Tý","Mi","Hó","Fr","Le"],weekHeader:"Vk",dateFormat:"dd-mm-yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.fo)}),jQuery(function(e){e.datepicker.regional["fr-CA"]={closeText:"Fermer",prevText:"Précédent",nextText:"Suivant",currentText:"Aujourd'hui",monthNames:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],monthNamesShort:["janv.","févr.","mars","avril","mai","juin","juil.","août","sept.","oct.","nov.","déc."],dayNames:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],dayNamesShort:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],dayNamesMin:["D","L","M","M","J","V","S"],weekHeader:"Sem.",dateFormat:"yy-mm-dd",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional["fr-CA"])}),jQuery(function(e){e.datepicker.regional["fr-CH"]={closeText:"Fermer",prevText:"&#x3C;Préc",nextText:"Suiv&#x3E;",currentText:"Courant",monthNames:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],monthNamesShort:["Jan","Fév","Mar","Avr","Mai","Jun","Jul","Aoû","Sep","Oct","Nov","Déc"],dayNames:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi"],dayNamesShort:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],dayNamesMin:["Di","Lu","Ma","Me","Je","Ve","Sa"],weekHeader:"Sm",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional["fr-CH"])}),jQuery(function(e){e.datepicker.regional.fr={closeText:"Fermer",prevText:"Précédent",nextText:"Suivant",currentText:"Aujourd'hui",monthNames:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],monthNamesShort:["Janv.","Févr.","Mars","Avril","Mai","Juin","Juil.","Août","Sept.","Oct.","Nov.","Déc."],dayNames:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi"],dayNamesShort:["Dim.","Lun.","Mar.","Mer.","Jeu.","Ven.","Sam."],dayNamesMin:["D","L","M","M","J","V","S"],weekHeader:"Sem.",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.fr)}),jQuery(function(e){e.datepicker.regional.gl={closeText:"Pechar",prevText:"&#x3C;Ant",nextText:"Seg&#x3E;",currentText:"Hoxe",monthNames:["Xaneiro","Febreiro","Marzo","Abril","Maio","Xuño","Xullo","Agosto","Setembro","Outubro","Novembro","Decembro"],monthNamesShort:["Xan","Feb","Mar","Abr","Mai","Xuñ","Xul","Ago","Set","Out","Nov","Dec"],dayNames:["Domingo","Luns","Martes","Mércores","Xoves","Venres","Sábado"],dayNamesShort:["Dom","Lun","Mar","Mér","Xov","Ven","Sáb"],dayNamesMin:["Do","Lu","Ma","Mé","Xo","Ve","Sá"],weekHeader:"Sm",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.gl)}),jQuery(function(e){e.datepicker.regional.he={closeText:"סגור",prevText:"&#x3C;הקודם",nextText:"הבא&#x3E;",currentText:"היום",monthNames:["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר"],monthNamesShort:["ינו","פבר","מרץ","אפר","מאי","יוני","יולי","אוג","ספט","אוק","נוב","דצמ"],dayNames:["ראשון","שני","שלישי","רביעי","חמישי","שישי","שבת"],dayNamesShort:["א'","ב'","ג'","ד'","ה'","ו'","שבת"],dayNamesMin:["א'","ב'","ג'","ד'","ה'","ו'","שבת"],weekHeader:"Wk",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!0,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.he)}),jQuery(function(e){e.datepicker.regional.hi={closeText:"बंद",prevText:"पिछला",nextText:"अगला",currentText:"आज",monthNames:["जनवरी ","फरवरी","मार्च","अप्रेल","मई","जून","जूलाई","अगस्त ","सितम्बर","अक्टूबर","नवम्बर","दिसम्बर"],monthNamesShort:["जन","फर","मार्च","अप्रेल","मई","जून","जूलाई","अग","सित","अक्ट","नव","दि"],dayNames:["रविवार","सोमवार","मंगलवार","बुधवार","गुरुवार","शुक्रवार","शनिवार"],dayNamesShort:["रवि","सोम","मंगल","बुध","गुरु","शुक्र","शनि"],dayNamesMin:["रवि","सोम","मंगल","बुध","गुरु","शुक्र","शनि"],weekHeader:"हफ्ता",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.hi)}),jQuery(function(e){e.datepicker.regional.hr={closeText:"Zatvori",prevText:"&#x3C;",nextText:"&#x3E;",currentText:"Danas",monthNames:["Siječanj","Veljača","Ožujak","Travanj","Svibanj","Lipanj","Srpanj","Kolovoz","Rujan","Listopad","Studeni","Prosinac"],monthNamesShort:["Sij","Velj","Ožu","Tra","Svi","Lip","Srp","Kol","Ruj","Lis","Stu","Pro"],dayNames:["Nedjelja","Ponedjeljak","Utorak","Srijeda","Četvrtak","Petak","Subota"],dayNamesShort:["Ned","Pon","Uto","Sri","Čet","Pet","Sub"],dayNamesMin:["Ne","Po","Ut","Sr","Če","Pe","Su"],weekHeader:"Tje",dateFormat:"dd.mm.yy.",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.hr)}),jQuery(function(e){e.datepicker.regional.hu={closeText:"bezár",prevText:"vissza",nextText:"előre",currentText:"ma",monthNames:["Január","Február","Március","Április","Május","Június","Július","Augusztus","Szeptember","Október","November","December"],monthNamesShort:["Jan","Feb","Már","Ápr","Máj","Jún","Júl","Aug","Szep","Okt","Nov","Dec"],dayNames:["Vasárnap","Hétfő","Kedd","Szerda","Csütörtök","Péntek","Szombat"],dayNamesShort:["Vas","Hét","Ked","Sze","Csü","Pén","Szo"],dayNamesMin:["V","H","K","Sze","Cs","P","Szo"],weekHeader:"Hét",dateFormat:"yy.mm.dd.",firstDay:1,isRTL:!1,showMonthAfterYear:!0,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.hu)}),jQuery(function(e){e.datepicker.regional.hy={closeText:"Փակել",prevText:"&#x3C;Նախ.",nextText:"Հաջ.&#x3E;",currentText:"Այսօր",monthNames:["Հունվար","Փետրվար","Մարտ","Ապրիլ","Մայիս","Հունիս","Հուլիս","Օգոստոս","Սեպտեմբեր","Հոկտեմբեր","Նոյեմբեր","Դեկտեմբեր"],monthNamesShort:["Հունվ","Փետր","Մարտ","Ապր","Մայիս","Հունիս","Հուլ","Օգս","Սեպ","Հոկ","Նոյ","Դեկ"],dayNames:["կիրակի","եկուշաբթի","երեքշաբթի","չորեքշաբթի","հինգշաբթի","ուրբաթ","շաբաթ"],dayNamesShort:["կիր","երկ","երք","չրք","հնգ","ուրբ","շբթ"],dayNamesMin:["կիր","երկ","երք","չրք","հնգ","ուրբ","շբթ"],weekHeader:"ՇԲՏ",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.hy)}),jQuery(function(e){e.datepicker.regional.id={closeText:"Tutup",prevText:"&#x3C;mundur",nextText:"maju&#x3E;",currentText:"hari ini",monthNames:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","Nopember","Desember"],monthNamesShort:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agus","Sep","Okt","Nop","Des"],dayNames:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"],dayNamesShort:["Min","Sen","Sel","Rab","kam","Jum","Sab"],dayNamesMin:["Mg","Sn","Sl","Rb","Km","jm","Sb"],weekHeader:"Mg",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.id)}),jQuery(function(e){e.datepicker.regional.is={closeText:"Loka",prevText:"&#x3C; Fyrri",nextText:"Næsti &#x3E;",currentText:"Í dag",monthNames:["Janúar","Febrúar","Mars","Apríl","Maí","Júní","Júlí","Ágúst","September","Október","Nóvember","Desember"],monthNamesShort:["Jan","Feb","Mar","Apr","Maí","Jún","Júl","Ágú","Sep","Okt","Nóv","Des"],dayNames:["Sunnudagur","Mánudagur","Þriðjudagur","Miðvikudagur","Fimmtudagur","Föstudagur","Laugardagur"],dayNamesShort:["Sun","Mán","Þri","Mið","Fim","Fös","Lau"],dayNamesMin:["Su","Má","Þr","Mi","Fi","Fö","La"],weekHeader:"Vika",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.is)}),jQuery(function(e){e.datepicker.regional.it={closeText:"Chiudi",prevText:"&#x3C;Prec",nextText:"Succ&#x3E;",currentText:"Oggi",monthNames:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],monthNamesShort:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],dayNames:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato"],dayNamesShort:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"],dayNamesMin:["Do","Lu","Ma","Me","Gi","Ve","Sa"],weekHeader:"Sm",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.it)}),jQuery(function(e){e.datepicker.regional.ja={closeText:"閉じる",prevText:"&#x3C;前",nextText:"次&#x3E;",currentText:"今日",monthNames:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],monthNamesShort:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayNames:["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],dayNamesShort:["日","月","火","水","木","金","土"],dayNamesMin:["日","月","火","水","木","金","土"],weekHeader:"週",dateFormat:"yy/mm/dd",firstDay:0,isRTL:!1,showMonthAfterYear:!0,yearSuffix:"年"},e.datepicker.setDefaults(e.datepicker.regional.ja)}),jQuery(function(e){e.datepicker.regional.ka={closeText:"დახურვა",prevText:"&#x3c; წინა",nextText:"შემდეგი &#x3e;",currentText:"დღეს",monthNames:["იანვარი","თებერვალი","მარტი","აპრილი","მაისი","ივნისი","ივლისი","აგვისტო","სექტემბერი","ოქტომბერი","ნოემბერი","დეკემბერი"],monthNamesShort:["იან","თებ","მარ","აპრ","მაი","ივნ","ივლ","აგვ","სექ","ოქტ","ნოე","დეკ"],dayNames:["კვირა","ორშაბათი","სამშაბათი","ოთხშაბათი","ხუთშაბათი","პარასკევი","შაბათი"],dayNamesShort:["კვ","ორშ","სამ","ოთხ","ხუთ","პარ","შაბ"],dayNamesMin:["კვ","ორშ","სამ","ოთხ","ხუთ","პარ","შაბ"],weekHeader:"კვირა",dateFormat:"dd-mm-yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.ka)}),jQuery(function(e){e.datepicker.regional.kk={closeText:"Жабу",prevText:"&#x3C;Алдыңғы",nextText:"Келесі&#x3E;",currentText:"Бүгін",monthNames:["Қаңтар","Ақпан","Наурыз","Сәуір","Мамыр","Маусым","Шілде","Тамыз","Қыркүйек","Қазан","Қараша","Желтоқсан"],monthNamesShort:["Қаң","Ақп","Нау","Сәу","Мам","Мау","Шіл","Там","Қыр","Қаз","Қар","Жел"],dayNames:["Жексенбі","Дүйсенбі","Сейсенбі","Сәрсенбі","Бейсенбі","Жұма","Сенбі"],dayNamesShort:["жкс","дсн","ссн","срс","бсн","жма","снб"],dayNamesMin:["Жк","Дс","Сс","Ср","Бс","Жм","Сн"],weekHeader:"Не",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.kk)}),jQuery(function(e){e.datepicker.regional.km={closeText:"ធ្វើ​រួច",prevText:"មុន",nextText:"បន្ទាប់",currentText:"ថ្ងៃ​នេះ",monthNames:["មករា","កុម្ភៈ","មីនា","មេសា","ឧសភា","មិថុនា","កក្កដា","សីហា","កញ្ញា","តុលា","វិច្ឆិកា","ធ្នូ"],monthNamesShort:["មករា","កុម្ភៈ","មីនា","មេសា","ឧសភា","មិថុនា","កក្កដា","សីហា","កញ្ញា","តុលា","វិច្ឆិកា","ធ្នូ"],dayNames:["អាទិត្យ","ចន្ទ","អង្គារ","ពុធ","ព្រហស្បតិ៍","សុក្រ","សៅរ៍"],dayNamesShort:["អា","ច","អ","ពុ","ព្រហ","សុ","សៅ"],dayNamesMin:["អា","ច","អ","ពុ","ព្រហ","សុ","សៅ"],weekHeader:"សប្ដាហ៍",dateFormat:"dd-mm-yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.km)}),jQuery(function(e){e.datepicker.regional.ko={closeText:"닫기",prevText:"이전달",nextText:"다음달",currentText:"오늘",monthNames:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],monthNamesShort:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],dayNames:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],dayNamesShort:["일","월","화","수","목","금","토"],dayNamesMin:["일","월","화","수","목","금","토"],weekHeader:"Wk",dateFormat:"yy-mm-dd",firstDay:0,isRTL:!1,showMonthAfterYear:!0,yearSuffix:"년"},e.datepicker.setDefaults(e.datepicker.regional.ko)}),jQuery(function(e){e.datepicker.regional.ky={closeText:"Жабуу",prevText:"&#x3c;Мур",nextText:"Кий&#x3e;",currentText:"Бүгүн",monthNames:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],monthNamesShort:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],dayNames:["жекшемби","дүйшөмбү","шейшемби","шаршемби","бейшемби","жума","ишемби"],dayNamesShort:["жек","дүй","шей","шар","бей","жум","ише"],dayNamesMin:["Жк","Дш","Шш","Шр","Бш","Жм","Иш"],weekHeader:"Жум",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.ky)}),jQuery(function(e){e.datepicker.regional.lb={closeText:"Fäerdeg",prevText:"Zréck",nextText:"Weider",currentText:"Haut",monthNames:["Januar","Februar","Mäerz","Abrëll","Mee","Juni","Juli","August","September","Oktober","November","Dezember"],monthNamesShort:["Jan","Feb","Mäe","Abr","Mee","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],dayNames:["Sonndeg","Méindeg","Dënschdeg","Mëttwoch","Donneschdeg","Freideg","Samschdeg"],dayNamesShort:["Son","Méi","Dën","Mët","Don","Fre","Sam"],dayNamesMin:["So","Mé","Dë","Më","Do","Fr","Sa"],weekHeader:"W",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.lb)}),jQuery(function(e){e.datepicker.regional.lt={closeText:"Uždaryti",prevText:"&#x3C;Atgal",nextText:"Pirmyn&#x3E;",currentText:"Šiandien",monthNames:["Sausis","Vasaris","Kovas","Balandis","Gegužė","Birželis","Liepa","Rugpjūtis","Rugsėjis","Spalis","Lapkritis","Gruodis"],monthNamesShort:["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rugp","Rugs","Spa","Lap","Gru"],dayNames:["sekmadienis","pirmadienis","antradienis","trečiadienis","ketvirtadienis","penktadienis","šeštadienis"],dayNamesShort:["sek","pir","ant","tre","ket","pen","šeš"],dayNamesMin:["Se","Pr","An","Tr","Ke","Pe","Še"],weekHeader:"Wk",dateFormat:"yy-mm-dd",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.lt)}),jQuery(function(e){e.datepicker.regional.lv={closeText:"Aizvērt",prevText:"Iepr",nextText:"Nāka",currentText:"Šodien",monthNames:["Janvāris","Februāris","Marts","Aprīlis","Maijs","Jūnijs","Jūlijs","Augusts","Septembris","Oktobris","Novembris","Decembris"],monthNamesShort:["Jan","Feb","Mar","Apr","Mai","Jūn","Jūl","Aug","Sep","Okt","Nov","Dec"],dayNames:["svētdiena","pirmdiena","otrdiena","trešdiena","ceturtdiena","piektdiena","sestdiena"],dayNamesShort:["svt","prm","otr","tre","ctr","pkt","sst"],dayNamesMin:["Sv","Pr","Ot","Tr","Ct","Pk","Ss"],weekHeader:"Nav",dateFormat:"dd-mm-yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.lv)}),jQuery(function(e){e.datepicker.regional.mk={closeText:"Затвори",prevText:"&#x3C;",nextText:"&#x3E;",currentText:"Денес",monthNames:["Јануари","Февруари","Март","Април","Мај","Јуни","Јули","Август","Септември","Октомври","Ноември","Декември"],monthNamesShort:["Јан","Фев","Мар","Апр","Мај","Јун","Јул","Авг","Сеп","Окт","Ное","Дек"],dayNames:["Недела","Понеделник","Вторник","Среда","Четврток","Петок","Сабота"],dayNamesShort:["Нед","Пон","Вто","Сре","Чет","Пет","Саб"],dayNamesMin:["Не","По","Вт","Ср","Че","Пе","Са"],weekHeader:"Сед",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.mk)}),jQuery(function(e){e.datepicker.regional.ml={closeText:"ശരി",prevText:"മുന്നത്തെ",nextText:"അടുത്തത് ",currentText:"ഇന്ന്",monthNames:["ജനുവരി","ഫെബ്രുവരി","മാര്‍ച്ച്","ഏപ്രില്‍","മേയ്","ജൂണ്‍","ജൂലൈ","ആഗസ്റ്റ്","സെപ്റ്റംബര്‍","ഒക്ടോബര്‍","നവംബര്‍","ഡിസംബര്‍"],monthNamesShort:["ജനു","ഫെബ്","മാര്‍","ഏപ്രി","മേയ്","ജൂണ്‍","ജൂലാ","ആഗ","സെപ്","ഒക്ടോ","നവം","ഡിസ"],dayNames:["ഞായര്‍","തിങ്കള്‍","ചൊവ്വ","ബുധന്‍","വ്യാഴം","വെള്ളി","ശനി"],dayNamesShort:["ഞായ","തിങ്ക","ചൊവ്വ","ബുധ","വ്യാഴം","വെള്ളി","ശനി"],dayNamesMin:["ഞാ","തി","ചൊ","ബു","വ്യാ","വെ","ശ"],weekHeader:"ആ",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.ml)}),jQuery(function(e){e.datepicker.regional.ms={closeText:"Tutup",prevText:"&#x3C;Sebelum",nextText:"Selepas&#x3E;",currentText:"hari ini",monthNames:["Januari","Februari","Mac","April","Mei","Jun","Julai","Ogos","September","Oktober","November","Disember"],monthNamesShort:["Jan","Feb","Mac","Apr","Mei","Jun","Jul","Ogo","Sep","Okt","Nov","Dis"],dayNames:["Ahad","Isnin","Selasa","Rabu","Khamis","Jumaat","Sabtu"],dayNamesShort:["Aha","Isn","Sel","Rab","kha","Jum","Sab"],dayNamesMin:["Ah","Is","Se","Ra","Kh","Ju","Sa"],weekHeader:"Mg",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.ms)}),jQuery(function(e){e.datepicker.regional.nb={closeText:"Lukk",prevText:"&#xAB;Forrige",nextText:"Neste&#xBB;",currentText:"I dag",monthNames:["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember"],monthNamesShort:["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des"],dayNamesShort:["søn","man","tir","ons","tor","fre","lør"],dayNames:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"],dayNamesMin:["sø","ma","ti","on","to","fr","lø"],weekHeader:"Uke",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.nb)
+}),jQuery(function(e){e.datepicker.regional["nl-BE"]={closeText:"Sluiten",prevText:"←",nextText:"→",currentText:"Vandaag",monthNames:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],monthNamesShort:["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec"],dayNames:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],dayNamesShort:["zon","maa","din","woe","don","vri","zat"],dayNamesMin:["zo","ma","di","wo","do","vr","za"],weekHeader:"Wk",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional["nl-BE"])}),jQuery(function(e){e.datepicker.regional.nl={closeText:"Sluiten",prevText:"←",nextText:"→",currentText:"Vandaag",monthNames:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],monthNamesShort:["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec"],dayNames:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],dayNamesShort:["zon","maa","din","woe","don","vri","zat"],dayNamesMin:["zo","ma","di","wo","do","vr","za"],weekHeader:"Wk",dateFormat:"dd-mm-yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.nl)}),jQuery(function(e){e.datepicker.regional.nn={closeText:"Lukk",prevText:"&#xAB;Førre",nextText:"Neste&#xBB;",currentText:"I dag",monthNames:["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember"],monthNamesShort:["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des"],dayNamesShort:["sun","mån","tys","ons","tor","fre","lau"],dayNames:["sundag","måndag","tysdag","onsdag","torsdag","fredag","laurdag"],dayNamesMin:["su","må","ty","on","to","fr","la"],weekHeader:"Veke",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.nn)}),jQuery(function(e){e.datepicker.regional.no={closeText:"Lukk",prevText:"&#xAB;Forrige",nextText:"Neste&#xBB;",currentText:"I dag",monthNames:["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember"],monthNamesShort:["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des"],dayNamesShort:["søn","man","tir","ons","tor","fre","lør"],dayNames:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"],dayNamesMin:["sø","ma","ti","on","to","fr","lø"],weekHeader:"Uke",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.no)}),jQuery(function(e){e.datepicker.regional.pl={closeText:"Zamknij",prevText:"&#x3C;Poprzedni",nextText:"Następny&#x3E;",currentText:"Dziś",monthNames:["Styczeń","Luty","Marzec","Kwiecień","Maj","Czerwiec","Lipiec","Sierpień","Wrzesień","Październik","Listopad","Grudzień"],monthNamesShort:["Sty","Lu","Mar","Kw","Maj","Cze","Lip","Sie","Wrz","Pa","Lis","Gru"],dayNames:["Niedziela","Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota"],dayNamesShort:["Nie","Pn","Wt","Śr","Czw","Pt","So"],dayNamesMin:["N","Pn","Wt","Śr","Cz","Pt","So"],weekHeader:"Tydz",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.pl)}),jQuery(function(e){e.datepicker.regional["pt-BR"]={closeText:"Fechar",prevText:"&#x3C;Anterior",nextText:"Próximo&#x3E;",currentText:"Hoje",monthNames:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthNamesShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],dayNames:["Domingo","Segunda-feira","Terça-feira","Quarta-feira","Quinta-feira","Sexta-feira","Sábado"],dayNamesShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],dayNamesMin:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],weekHeader:"Sm",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional["pt-BR"])}),jQuery(function(e){e.datepicker.regional.pt={closeText:"Fechar",prevText:"&#x3C;Anterior",nextText:"Seguinte",currentText:"Hoje",monthNames:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthNamesShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],dayNames:["Domingo","Segunda-feira","Terça-feira","Quarta-feira","Quinta-feira","Sexta-feira","Sábado"],dayNamesShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],dayNamesMin:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],weekHeader:"Sem",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.pt)}),jQuery(function(e){e.datepicker.regional.rm={closeText:"Serrar",prevText:"&#x3C;Suandant",nextText:"Precedent&#x3E;",currentText:"Actual",monthNames:["Schaner","Favrer","Mars","Avrigl","Matg","Zercladur","Fanadur","Avust","Settember","October","November","December"],monthNamesShort:["Scha","Fev","Mar","Avr","Matg","Zer","Fan","Avu","Sett","Oct","Nov","Dec"],dayNames:["Dumengia","Glindesdi","Mardi","Mesemna","Gievgia","Venderdi","Sonda"],dayNamesShort:["Dum","Gli","Mar","Mes","Gie","Ven","Som"],dayNamesMin:["Du","Gl","Ma","Me","Gi","Ve","So"],weekHeader:"emna",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.rm)}),jQuery(function(e){e.datepicker.regional.ro={closeText:"Închide",prevText:"&#xAB; Luna precedentă",nextText:"Luna următoare &#xBB;",currentText:"Azi",monthNames:["Ianuarie","Februarie","Martie","Aprilie","Mai","Iunie","Iulie","August","Septembrie","Octombrie","Noiembrie","Decembrie"],monthNamesShort:["Ian","Feb","Mar","Apr","Mai","Iun","Iul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Duminică","Luni","Marţi","Miercuri","Joi","Vineri","Sâmbătă"],dayNamesShort:["Dum","Lun","Mar","Mie","Joi","Vin","Sâm"],dayNamesMin:["Du","Lu","Ma","Mi","Jo","Vi","Sâ"],weekHeader:"Săpt",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.ro)}),jQuery(function(e){e.datepicker.regional.ru={closeText:"Закрыть",prevText:"&#x3C;Пред",nextText:"След&#x3E;",currentText:"Сегодня",monthNames:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],monthNamesShort:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],dayNames:["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"],dayNamesShort:["вск","пнд","втр","срд","чтв","птн","сбт"],dayNamesMin:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],weekHeader:"Нед",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.ru)}),jQuery(function(e){e.datepicker.regional.sk={closeText:"Zavrieť",prevText:"&#x3C;Predchádzajúci",nextText:"Nasledujúci&#x3E;",currentText:"Dnes",monthNames:["január","február","marec","apríl","máj","jún","júl","august","september","október","november","december"],monthNamesShort:["Jan","Feb","Mar","Apr","Máj","Jún","Júl","Aug","Sep","Okt","Nov","Dec"],dayNames:["nedeľa","pondelok","utorok","streda","štvrtok","piatok","sobota"],dayNamesShort:["Ned","Pon","Uto","Str","Štv","Pia","Sob"],dayNamesMin:["Ne","Po","Ut","St","Št","Pia","So"],weekHeader:"Ty",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.sk)}),jQuery(function(e){e.datepicker.regional.sl={closeText:"Zapri",prevText:"&#x3C;Prejšnji",nextText:"Naslednji&#x3E;",currentText:"Trenutni",monthNames:["Januar","Februar","Marec","April","Maj","Junij","Julij","Avgust","September","Oktober","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Avg","Sep","Okt","Nov","Dec"],dayNames:["Nedelja","Ponedeljek","Torek","Sreda","Četrtek","Petek","Sobota"],dayNamesShort:["Ned","Pon","Tor","Sre","Čet","Pet","Sob"],dayNamesMin:["Ne","Po","To","Sr","Če","Pe","So"],weekHeader:"Teden",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.sl)}),jQuery(function(e){e.datepicker.regional.sq={closeText:"mbylle",prevText:"&#x3C;mbrapa",nextText:"Përpara&#x3E;",currentText:"sot",monthNames:["Janar","Shkurt","Mars","Prill","Maj","Qershor","Korrik","Gusht","Shtator","Tetor","Nëntor","Dhjetor"],monthNamesShort:["Jan","Shk","Mar","Pri","Maj","Qer","Kor","Gus","Sht","Tet","Nën","Dhj"],dayNames:["E Diel","E Hënë","E Martë","E Mërkurë","E Enjte","E Premte","E Shtune"],dayNamesShort:["Di","Hë","Ma","Më","En","Pr","Sh"],dayNamesMin:["Di","Hë","Ma","Më","En","Pr","Sh"],weekHeader:"Ja",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.sq)}),jQuery(function(e){e.datepicker.regional["sr-SR"]={closeText:"Zatvori",prevText:"&#x3C;",nextText:"&#x3E;",currentText:"Danas",monthNames:["Januar","Februar","Mart","April","Maj","Jun","Jul","Avgust","Septembar","Oktobar","Novembar","Decembar"],monthNamesShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Avg","Sep","Okt","Nov","Dec"],dayNames:["Nedelja","Ponedeljak","Utorak","Sreda","Četvrtak","Petak","Subota"],dayNamesShort:["Ned","Pon","Uto","Sre","Čet","Pet","Sub"],dayNamesMin:["Ne","Po","Ut","Sr","Če","Pe","Su"],weekHeader:"Sed",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional["sr-SR"])}),jQuery(function(e){e.datepicker.regional.sr={closeText:"Затвори",prevText:"&#x3C;",nextText:"&#x3E;",currentText:"Данас",monthNames:["Јануар","Фебруар","Март","Април","Мај","Јун","Јул","Август","Септембар","Октобар","Новембар","Децембар"],monthNamesShort:["Јан","Феб","Мар","Апр","Мај","Јун","Јул","Авг","Сеп","Окт","Нов","Дец"],dayNames:["Недеља","Понедељак","Уторак","Среда","Четвртак","Петак","Субота"],dayNamesShort:["Нед","Пон","Уто","Сре","Чет","Пет","Суб"],dayNamesMin:["Не","По","Ут","Ср","Че","Пе","Су"],weekHeader:"Сед",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.sr)}),jQuery(function(e){e.datepicker.regional.sv={closeText:"Stäng",prevText:"&#xAB;Förra",nextText:"Nästa&#xBB;",currentText:"Idag",monthNames:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],dayNamesShort:["Sön","Mån","Tis","Ons","Tor","Fre","Lör"],dayNames:["Söndag","Måndag","Tisdag","Onsdag","Torsdag","Fredag","Lördag"],dayNamesMin:["Sö","Må","Ti","On","To","Fr","Lö"],weekHeader:"Ve",dateFormat:"yy-mm-dd",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.sv)}),jQuery(function(e){e.datepicker.regional.ta={closeText:"மூடு",prevText:"முன்னையது",nextText:"அடுத்தது",currentText:"இன்று",monthNames:["தை","மாசி","பங்குனி","சித்திரை","வைகாசி","ஆனி","ஆடி","ஆவணி","புரட்டாசி","ஐப்பசி","கார்த்திகை","மார்கழி"],monthNamesShort:["தை","மாசி","பங்","சித்","வைகா","ஆனி","ஆடி","ஆவ","புர","ஐப்","கார்","மார்"],dayNames:["ஞாயிற்றுக்கிழமை","திங்கட்கிழமை","செவ்வாய்க்கிழமை","புதன்கிழமை","வியாழக்கிழமை","வெள்ளிக்கிழமை","சனிக்கிழமை"],dayNamesShort:["ஞாயிறு","திங்கள்","செவ்வாய்","புதன்","வியாழன்","வெள்ளி","சனி"],dayNamesMin:["ஞா","தி","செ","பு","வி","வெ","ச"],weekHeader:"Не",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.ta)}),jQuery(function(e){e.datepicker.regional.th={closeText:"ปิด",prevText:"&#xAB;&#xA0;ย้อน",nextText:"ถัดไป&#xA0;&#xBB;",currentText:"วันนี้",monthNames:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"],monthNamesShort:["ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค."],dayNames:["อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัสบดี","ศุกร์","เสาร์"],dayNamesShort:["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."],dayNamesMin:["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."],weekHeader:"Wk",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.th)}),jQuery(function(e){e.datepicker.regional.tj={closeText:"Идома",prevText:"&#x3c;Қафо",nextText:"Пеш&#x3e;",currentText:"Имрӯз",monthNames:["Январ","Феврал","Март","Апрел","Май","Июн","Июл","Август","Сентябр","Октябр","Ноябр","Декабр"],monthNamesShort:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],dayNames:["якшанбе","душанбе","сешанбе","чоршанбе","панҷшанбе","ҷумъа","шанбе"],dayNamesShort:["якш","душ","сеш","чор","пан","ҷум","шан"],dayNamesMin:["Як","Дш","Сш","Чш","Пш","Ҷм","Шн"],weekHeader:"Хф",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.tj)}),jQuery(function(e){e.datepicker.regional.tr={closeText:"kapat",prevText:"&#x3C;geri",nextText:"ileri&#x3e",currentText:"bugün",monthNames:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],monthNamesShort:["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara"],dayNames:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"],dayNamesShort:["Pz","Pt","Sa","Ça","Pe","Cu","Ct"],dayNamesMin:["Pz","Pt","Sa","Ça","Pe","Cu","Ct"],weekHeader:"Hf",dateFormat:"dd.mm.yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.tr)}),jQuery(function(e){e.datepicker.regional.uk={closeText:"Закрити",prevText:"&#x3C;",nextText:"&#x3E;",currentText:"Сьогодні",monthNames:["Січень","Лютий","Березень","Квітень","Травень","Червень","Липень","Серпень","Вересень","Жовтень","Листопад","Грудень"],monthNamesShort:["Січ","Лют","Бер","Кві","Тра","Чер","Лип","Сер","Вер","Жов","Лис","Гру"],dayNames:["неділя","понеділок","вівторок","середа","четвер","п’ятниця","субота"],dayNamesShort:["нед","пнд","вів","срд","чтв","птн","сбт"],dayNamesMin:["Нд","Пн","Вт","Ср","Чт","Пт","Сб"],weekHeader:"Тиж",dateFormat:"dd/mm/yy",firstDay:1,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.uk)}),jQuery(function(e){e.datepicker.regional.vi={closeText:"Đóng",prevText:"&#x3C;Trước",nextText:"Tiếp&#x3E;",currentText:"Hôm nay",monthNames:["Tháng Một","Tháng Hai","Tháng Ba","Tháng Tư","Tháng Năm","Tháng Sáu","Tháng Bảy","Tháng Tám","Tháng Chín","Tháng Mười","Tháng Mười Một","Tháng Mười Hai"],monthNamesShort:["Tháng 1","Tháng 2","Tháng 3","Tháng 4","Tháng 5","Tháng 6","Tháng 7","Tháng 8","Tháng 9","Tháng 10","Tháng 11","Tháng 12"],dayNames:["Chủ Nhật","Thứ Hai","Thứ Ba","Thứ Tư","Thứ Năm","Thứ Sáu","Thứ Bảy"],dayNamesShort:["CN","T2","T3","T4","T5","T6","T7"],dayNamesMin:["CN","T2","T3","T4","T5","T6","T7"],weekHeader:"Tu",dateFormat:"dd/mm/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.vi)}),jQuery(function(e){e.datepicker.regional["zh-CN"]={closeText:"关闭",prevText:"&#x3C;上月",nextText:"下月&#x3E;",currentText:"今天",monthNames:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthNamesShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],dayNames:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayNamesShort:["周日","周一","周二","周三","周四","周五","周六"],dayNamesMin:["日","一","二","三","四","五","六"],weekHeader:"周",dateFormat:"yy-mm-dd",firstDay:1,isRTL:!1,showMonthAfterYear:!0,yearSuffix:"年"},e.datepicker.setDefaults(e.datepicker.regional["zh-CN"])}),jQuery(function(e){e.datepicker.regional["zh-HK"]={closeText:"關閉",prevText:"&#x3C;上月",nextText:"下月&#x3E;",currentText:"今天",monthNames:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthNamesShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],dayNames:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayNamesShort:["周日","周一","周二","周三","周四","周五","周六"],dayNamesMin:["日","一","二","三","四","五","六"],weekHeader:"周",dateFormat:"dd-mm-yy",firstDay:0,isRTL:!1,showMonthAfterYear:!0,yearSuffix:"年"},e.datepicker.setDefaults(e.datepicker.regional["zh-HK"])}),jQuery(function(e){e.datepicker.regional["zh-TW"]={closeText:"關閉",prevText:"&#x3C;上月",nextText:"下月&#x3E;",currentText:"今天",monthNames:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthNamesShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],dayNames:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayNamesShort:["周日","周一","周二","周三","周四","周五","周六"],dayNamesMin:["日","一","二","三","四","五","六"],weekHeader:"周",dateFormat:"yy/mm/dd",firstDay:1,isRTL:!1,showMonthAfterYear:!0,yearSuffix:"年"},e.datepicker.setDefaults(e.datepicker.regional["zh-TW"])}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/jquery-ui/i18n/jquery-ui-timepicker-hu.js b/mayor-orig/www/skin/classic/share/javascript/jquery-ui/i18n/jquery-ui-timepicker-hu.js
new file mode 100644
index 00000000..fd1f5e19
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/jquery-ui/i18n/jquery-ui-timepicker-hu.js
@@ -0,0 +1,21 @@
+/* Hungarian translation for the jQuery Timepicker Addon */
+/* Written by Vas Gábor */
+(function($) {
+ $.timepicker.regional['hu'] = {
+ timeOnlyTitle: 'Válasszon időpontot',
+ timeText: 'Idő',
+ hourText: 'Óra',
+ minuteText: 'Perc',
+ secondText: 'Másodperc',
+ millisecText: 'Milliszekundumos',
+ microsecText: 'Ezredmásodperc',
+ timezoneText: 'Időzóna',
+ currentText: 'Most',
+ closeText: 'Kész',
+ timeFormat: 'HH:mm',
+ amNames: ['de.', 'AM', 'A'],
+ pmNames: ['du.', 'PM', 'P'],
+ isRTL: false
+ };
+ $.timepicker.setDefaults($.timepicker.regional['hu']);
+})(jQuery);
diff --git a/mayor-orig/www/skin/classic/share/javascript/jquery-ui/i18n/jquery.ui.datepicker-hu.min.js b/mayor-orig/www/skin/classic/share/javascript/jquery-ui/i18n/jquery.ui.datepicker-hu.min.js
new file mode 100644
index 00000000..5b6d141b
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/jquery-ui/i18n/jquery.ui.datepicker-hu.min.js
@@ -0,0 +1,4 @@
+/*! jQuery UI - v1.10.3 - 2013-05-03
+* http://jqueryui.com
+* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
+jQuery(function(e){e.datepicker.regional.hu={closeText:"bezár",prevText:"vissza",nextText:"előre",currentText:"ma",monthNames:["Január","Február","Március","Április","Május","Június","Július","Augusztus","Szeptember","Október","November","December"],monthNamesShort:["Jan","Feb","Már","Ápr","Máj","Jún","Júl","Aug","Szep","Okt","Nov","Dec"],dayNames:["Vasárnap","Hétfő","Kedd","Szerda","Csütörtök","Péntek","Szombat"],dayNamesShort:["Vas","Hét","Ked","Sze","Csü","Pén","Szo"],dayNamesMin:["V","H","K","Sze","Cs","P","Szo"],weekHeader:"Hét",dateFormat:"yy.mm.dd.",firstDay:1,isRTL:!1,showMonthAfterYear:!0,yearSuffix:""},e.datepicker.setDefaults(e.datepicker.regional.hu)}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/jquery-ui/jquery-ui-timepicker-addon.js b/mayor-orig/www/skin/classic/share/javascript/jquery-ui/jquery-ui-timepicker-addon.js
new file mode 100644
index 00000000..eccc6a7b
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/jquery-ui/jquery-ui-timepicker-addon.js
@@ -0,0 +1,2128 @@
+/*
+ * jQuery timepicker addon
+ * By: Trent Richardson [http://trentrichardson.com]
+ * Version 1.3.1
+ * Last Modified: 07/07/2013
+ *
+ * Copyright 2013 Trent Richardson
+ * You may use this project under MIT or GPL licenses.
+ * http://trentrichardson.com/Impromptu/GPL-LICENSE.txt
+ * http://trentrichardson.com/Impromptu/MIT-LICENSE.txt
+ */
+
+/*jslint evil: true, white: false, undef: false, nomen: false */
+
+(function($) {
+
+ /*
+ * Lets not redefine timepicker, Prevent "Uncaught RangeError: Maximum call stack size exceeded"
+ */
+ $.ui.timepicker = $.ui.timepicker || {};
+ if ($.ui.timepicker.version) {
+ return;
+ }
+
+ /*
+ * Extend jQueryUI, get it started with our version number
+ */
+ $.extend($.ui, {
+ timepicker: {
+ version: "1.3.1"
+ }
+ });
+
+ /*
+ * Timepicker manager.
+ * Use the singleton instance of this class, $.timepicker, to interact with the time picker.
+ * Settings for (groups of) time pickers are maintained in an instance object,
+ * allowing multiple different settings on the same page.
+ */
+ var Timepicker = function() {
+ this.regional = []; // Available regional settings, indexed by language code
+ this.regional[''] = { // Default regional settings
+ currentText: 'Now',
+ closeText: 'Done',
+ amNames: ['AM', 'A'],
+ pmNames: ['PM', 'P'],
+ timeFormat: 'HH:mm',
+ timeSuffix: '',
+ timeOnlyTitle: 'Choose Time',
+ timeText: 'Time',
+ hourText: 'Hour',
+ minuteText: 'Minute',
+ secondText: 'Second',
+ millisecText: 'Millisecond',
+ microsecText: 'Microsecond',
+ timezoneText: 'Time Zone',
+ isRTL: false
+ };
+ this._defaults = { // Global defaults for all the datetime picker instances
+ showButtonPanel: true,
+ timeOnly: false,
+ showHour: null,
+ showMinute: null,
+ showSecond: null,
+ showMillisec: null,
+ showMicrosec: null,
+ showTimezone: null,
+ showTime: true,
+ stepHour: 1,
+ stepMinute: 1,
+ stepSecond: 1,
+ stepMillisec: 1,
+ stepMicrosec: 1,
+ hour: 0,
+ minute: 0,
+ second: 0,
+ millisec: 0,
+ microsec: 0,
+ timezone: null,
+ hourMin: 0,
+ minuteMin: 0,
+ secondMin: 0,
+ millisecMin: 0,
+ microsecMin: 0,
+ hourMax: 23,
+ minuteMax: 59,
+ secondMax: 59,
+ millisecMax: 999,
+ microsecMax: 999,
+ minDateTime: null,
+ maxDateTime: null,
+ onSelect: null,
+ hourGrid: 0,
+ minuteGrid: 0,
+ secondGrid: 0,
+ millisecGrid: 0,
+ microsecGrid: 0,
+ alwaysSetTime: true,
+ separator: ' ',
+ altFieldTimeOnly: true,
+ altTimeFormat: null,
+ altSeparator: null,
+ altTimeSuffix: null,
+ pickerTimeFormat: null,
+ pickerTimeSuffix: null,
+ showTimepicker: true,
+ timezoneList: null,
+ addSliderAccess: false,
+ sliderAccessArgs: null,
+ controlType: 'slider',
+ defaultValue: null,
+ parse: 'strict'
+ };
+ $.extend(this._defaults, this.regional['']);
+ };
+
+ $.extend(Timepicker.prototype, {
+ $input: null,
+ $altInput: null,
+ $timeObj: null,
+ inst: null,
+ hour_slider: null,
+ minute_slider: null,
+ second_slider: null,
+ millisec_slider: null,
+ microsec_slider: null,
+ timezone_select: null,
+ hour: 0,
+ minute: 0,
+ second: 0,
+ millisec: 0,
+ microsec: 0,
+ timezone: null,
+ hourMinOriginal: null,
+ minuteMinOriginal: null,
+ secondMinOriginal: null,
+ millisecMinOriginal: null,
+ microsecMinOriginal: null,
+ hourMaxOriginal: null,
+ minuteMaxOriginal: null,
+ secondMaxOriginal: null,
+ millisecMaxOriginal: null,
+ microsecMaxOriginal: null,
+ ampm: '',
+ formattedDate: '',
+ formattedTime: '',
+ formattedDateTime: '',
+ timezoneList: null,
+ units: ['hour','minute','second','millisec', 'microsec'],
+ support: {},
+ control: null,
+
+ /*
+ * Override the default settings for all instances of the time picker.
+ * @param settings object - the new settings to use as defaults (anonymous object)
+ * @return the manager object
+ */
+ setDefaults: function(settings) {
+ extendRemove(this._defaults, settings || {});
+ return this;
+ },
+
+ /*
+ * Create a new Timepicker instance
+ */
+ _newInst: function($input, opts) {
+ var tp_inst = new Timepicker(),
+ inlineSettings = {},
+ fns = {},
+ overrides, i;
+
+ for (var attrName in this._defaults) {
+ if(this._defaults.hasOwnProperty(attrName)){
+ var attrValue = $input.attr('time:' + attrName);
+ if (attrValue) {
+ try {
+ inlineSettings[attrName] = eval(attrValue);
+ } catch (err) {
+ inlineSettings[attrName] = attrValue;
+ }
+ }
+ }
+ }
+
+ overrides = {
+ beforeShow: function (input, dp_inst) {
+ if ($.isFunction(tp_inst._defaults.evnts.beforeShow)) {
+ return tp_inst._defaults.evnts.beforeShow.call($input[0], input, dp_inst, tp_inst);
+ }
+ },
+ onChangeMonthYear: function (year, month, dp_inst) {
+ // Update the time as well : this prevents the time from disappearing from the $input field.
+ tp_inst._updateDateTime(dp_inst);
+ if ($.isFunction(tp_inst._defaults.evnts.onChangeMonthYear)) {
+ tp_inst._defaults.evnts.onChangeMonthYear.call($input[0], year, month, dp_inst, tp_inst);
+ }
+ },
+ onClose: function (dateText, dp_inst) {
+ if (tp_inst.timeDefined === true && $input.val() !== '') {
+ tp_inst._updateDateTime(dp_inst);
+ }
+ if ($.isFunction(tp_inst._defaults.evnts.onClose)) {
+ tp_inst._defaults.evnts.onClose.call($input[0], dateText, dp_inst, tp_inst);
+ }
+ }
+ };
+ for (i in overrides) {
+ if (overrides.hasOwnProperty(i)) {
+ fns[i] = opts[i] || null;
+ }
+ }
+
+ tp_inst._defaults = $.extend({}, this._defaults, inlineSettings, opts, overrides, {
+ evnts:fns,
+ timepicker: tp_inst // add timepicker as a property of datepicker: $.datepicker._get(dp_inst, 'timepicker');
+ });
+ tp_inst.amNames = $.map(tp_inst._defaults.amNames, function(val) {
+ return val.toUpperCase();
+ });
+ tp_inst.pmNames = $.map(tp_inst._defaults.pmNames, function(val) {
+ return val.toUpperCase();
+ });
+
+ // detect which units are supported
+ tp_inst.support = detectSupport(
+ tp_inst._defaults.timeFormat +
+ (tp_inst._defaults.pickerTimeFormat? tp_inst._defaults.pickerTimeFormat:'') +
+ (tp_inst._defaults.altTimeFormat? tp_inst._defaults.altTimeFormat:''));
+
+ // controlType is string - key to our this._controls
+ if(typeof(tp_inst._defaults.controlType) === 'string'){
+ if(tp_inst._defaults.controlType == 'slider' && typeof(jQuery.ui.slider) === 'undefined'){
+ tp_inst._defaults.controlType = 'select';
+ }
+ tp_inst.control = tp_inst._controls[tp_inst._defaults.controlType];
+ }
+ // controlType is an object and must implement create, options, value methods
+ else{
+ tp_inst.control = tp_inst._defaults.controlType;
+ }
+
+ // prep the timezone options
+ var timezoneList = [-720,-660,-600,-570,-540,-480,-420,-360,-300,-270,-240,-210,-180,-120,-60,
+ 0,60,120,180,210,240,270,300,330,345,360,390,420,480,525,540,570,600,630,660,690,720,765,780,840];
+ if (tp_inst._defaults.timezoneList !== null) {
+ timezoneList = tp_inst._defaults.timezoneList;
+ }
+ var tzl=timezoneList.length,tzi=0,tzv=null;
+ if (tzl > 0 && typeof timezoneList[0] !== 'object') {
+ for(; tzi<tzl; tzi++){
+ tzv = timezoneList[tzi];
+ timezoneList[tzi] = { value: tzv, label: $.timepicker.timezoneOffsetString(tzv, tp_inst.support.iso8601) };
+ }
+ }
+ tp_inst._defaults.timezoneList = timezoneList;
+
+ // set the default units
+ tp_inst.timezone = tp_inst._defaults.timezone !== null? $.timepicker.timezoneOffsetNumber(tp_inst._defaults.timezone) :
+ ((new Date()).getTimezoneOffset()*-1);
+ tp_inst.hour = tp_inst._defaults.hour < tp_inst._defaults.hourMin? tp_inst._defaults.hourMin :
+ tp_inst._defaults.hour > tp_inst._defaults.hourMax? tp_inst._defaults.hourMax : tp_inst._defaults.hour;
+ tp_inst.minute = tp_inst._defaults.minute < tp_inst._defaults.minuteMin? tp_inst._defaults.minuteMin :
+ tp_inst._defaults.minute > tp_inst._defaults.minuteMax? tp_inst._defaults.minuteMax : tp_inst._defaults.minute;
+ tp_inst.second = tp_inst._defaults.second < tp_inst._defaults.secondMin? tp_inst._defaults.secondMin :
+ tp_inst._defaults.second > tp_inst._defaults.secondMax? tp_inst._defaults.secondMax : tp_inst._defaults.second;
+ tp_inst.millisec = tp_inst._defaults.millisec < tp_inst._defaults.millisecMin? tp_inst._defaults.millisecMin :
+ tp_inst._defaults.millisec > tp_inst._defaults.millisecMax? tp_inst._defaults.millisecMax : tp_inst._defaults.millisec;
+ tp_inst.microsec = tp_inst._defaults.microsec < tp_inst._defaults.microsecMin? tp_inst._defaults.microsecMin :
+ tp_inst._defaults.microsec > tp_inst._defaults.microsecMax? tp_inst._defaults.microsecMax : tp_inst._defaults.microsec;
+ tp_inst.ampm = '';
+ tp_inst.$input = $input;
+
+ if (tp_inst._defaults.altField) {
+ tp_inst.$altInput = $(tp_inst._defaults.altField).css({
+ cursor: 'pointer'
+ }).focus(function() {
+ $input.trigger("focus");
+ });
+ }
+
+ if (tp_inst._defaults.minDate === 0 || tp_inst._defaults.minDateTime === 0) {
+ tp_inst._defaults.minDate = new Date();
+ }
+ if (tp_inst._defaults.maxDate === 0 || tp_inst._defaults.maxDateTime === 0) {
+ tp_inst._defaults.maxDate = new Date();
+ }
+
+ // datepicker needs minDate/maxDate, timepicker needs minDateTime/maxDateTime..
+ if (tp_inst._defaults.minDate !== undefined && tp_inst._defaults.minDate instanceof Date) {
+ tp_inst._defaults.minDateTime = new Date(tp_inst._defaults.minDate.getTime());
+ }
+ if (tp_inst._defaults.minDateTime !== undefined && tp_inst._defaults.minDateTime instanceof Date) {
+ tp_inst._defaults.minDate = new Date(tp_inst._defaults.minDateTime.getTime());
+ }
+ if (tp_inst._defaults.maxDate !== undefined && tp_inst._defaults.maxDate instanceof Date) {
+ tp_inst._defaults.maxDateTime = new Date(tp_inst._defaults.maxDate.getTime());
+ }
+ if (tp_inst._defaults.maxDateTime !== undefined && tp_inst._defaults.maxDateTime instanceof Date) {
+ tp_inst._defaults.maxDate = new Date(tp_inst._defaults.maxDateTime.getTime());
+ }
+ tp_inst.$input.bind('focus', function() {
+ tp_inst._onFocus();
+ });
+
+ return tp_inst;
+ },
+
+ /*
+ * add our sliders to the calendar
+ */
+ _addTimePicker: function(dp_inst) {
+ var currDT = (this.$altInput && this._defaults.altFieldTimeOnly) ? this.$input.val() + ' ' + this.$altInput.val() : this.$input.val();
+
+ this.timeDefined = this._parseTime(currDT);
+ this._limitMinMaxDateTime(dp_inst, false);
+ this._injectTimePicker();
+ },
+
+ /*
+ * parse the time string from input value or _setTime
+ */
+ _parseTime: function(timeString, withDate) {
+ if (!this.inst) {
+ this.inst = $.datepicker._getInst(this.$input[0]);
+ }
+
+ if (withDate || !this._defaults.timeOnly) {
+ var dp_dateFormat = $.datepicker._get(this.inst, 'dateFormat');
+ try {
+ var parseRes = parseDateTimeInternal(dp_dateFormat, this._defaults.timeFormat, timeString, $.datepicker._getFormatConfig(this.inst), this._defaults);
+ if (!parseRes.timeObj) {
+ return false;
+ }
+ $.extend(this, parseRes.timeObj);
+ } catch (err) {
+ $.timepicker.log("Error parsing the date/time string: " + err +
+ "\ndate/time string = " + timeString +
+ "\ntimeFormat = " + this._defaults.timeFormat +
+ "\ndateFormat = " + dp_dateFormat);
+ return false;
+ }
+ return true;
+ } else {
+ var timeObj = $.datepicker.parseTime(this._defaults.timeFormat, timeString, this._defaults);
+ if (!timeObj) {
+ return false;
+ }
+ $.extend(this, timeObj);
+ return true;
+ }
+ },
+
+ /*
+ * generate and inject html for timepicker into ui datepicker
+ */
+ _injectTimePicker: function() {
+ var $dp = this.inst.dpDiv,
+ o = this.inst.settings,
+ tp_inst = this,
+ litem = '',
+ uitem = '',
+ show = null,
+ max = {},
+ gridSize = {},
+ size = null,
+ i=0,
+ l=0;
+
+ // Prevent displaying twice
+ if ($dp.find("div.ui-timepicker-div").length === 0 && o.showTimepicker) {
+ var noDisplay = ' style="display:none;"',
+ html = '<div class="ui-timepicker-div'+ (o.isRTL? ' ui-timepicker-rtl' : '') +'"><dl>' + '<dt class="ui_tpicker_time_label"' + ((o.showTime) ? '' : noDisplay) + '>' + o.timeText + '</dt>' +
+ '<dd class="ui_tpicker_time"' + ((o.showTime) ? '' : noDisplay) + '></dd>';
+
+ // Create the markup
+ for(i=0,l=this.units.length; i<l; i++){
+ litem = this.units[i];
+ uitem = litem.substr(0,1).toUpperCase() + litem.substr(1);
+ show = o['show'+uitem] !== null? o['show'+uitem] : this.support[litem];
+
+ // Added by Peter Medeiros:
+ // - Figure out what the hour/minute/second max should be based on the step values.
+ // - Example: if stepMinute is 15, then minMax is 45.
+ max[litem] = parseInt((o[litem+'Max'] - ((o[litem+'Max'] - o[litem+'Min']) % o['step'+uitem])), 10);
+ gridSize[litem] = 0;
+
+ html += '<dt class="ui_tpicker_'+ litem +'_label"' + (show ? '' : noDisplay) + '>' + o[litem +'Text'] + '</dt>' +
+ '<dd class="ui_tpicker_'+ litem +'"><div class="ui_tpicker_'+ litem +'_slider"' + (show ? '' : noDisplay) + '></div>';
+
+ if (show && o[litem+'Grid'] > 0) {
+ html += '<div style="padding-left: 1px"><table class="ui-tpicker-grid-label"><tr>';
+
+ if(litem == 'hour'){
+ for (var h = o[litem+'Min']; h <= max[litem]; h += parseInt(o[litem+'Grid'], 10)) {
+ gridSize[litem]++;
+ var tmph = $.datepicker.formatTime(this.support.ampm? 'hht':'HH', {hour:h}, o);
+ html += '<td data-for="'+litem+'">' + tmph + '</td>';
+ }
+ }
+ else{
+ for (var m = o[litem+'Min']; m <= max[litem]; m += parseInt(o[litem+'Grid'], 10)) {
+ gridSize[litem]++;
+ html += '<td data-for="'+litem+'">' + ((m < 10) ? '0' : '') + m + '</td>';
+ }
+ }
+
+ html += '</tr></table></div>';
+ }
+ html += '</dd>';
+ }
+
+ // Timezone
+ var showTz = o.showTimezone !== null? o.showTimezone : this.support.timezone;
+ html += '<dt class="ui_tpicker_timezone_label"' + (showTz ? '' : noDisplay) + '>' + o.timezoneText + '</dt>';
+ html += '<dd class="ui_tpicker_timezone" ' + (showTz ? '' : noDisplay) + '></dd>';
+
+ // Create the elements from string
+ html += '</dl></div>';
+ var $tp = $(html);
+
+ // if we only want time picker...
+ if (o.timeOnly === true) {
+ $tp.prepend('<div class="ui-widget-header ui-helper-clearfix ui-corner-all">' + '<div class="ui-datepicker-title">' + o.timeOnlyTitle + '</div>' + '</div>');
+ $dp.find('.ui-datepicker-header, .ui-datepicker-calendar').hide();
+ }
+
+ // add sliders, adjust grids, add events
+ for(i=0,l=tp_inst.units.length; i<l; i++){
+ litem = tp_inst.units[i];
+ uitem = litem.substr(0,1).toUpperCase() + litem.substr(1);
+ show = o['show'+uitem] !== null? o['show'+uitem] : this.support[litem];
+
+ // add the slider
+ tp_inst[litem+'_slider'] = tp_inst.control.create(tp_inst, $tp.find('.ui_tpicker_'+litem+'_slider'), litem, tp_inst[litem], o[litem+'Min'], max[litem], o['step'+uitem]);
+
+ // adjust the grid and add click event
+ if (show && o[litem+'Grid'] > 0) {
+ size = 100 * gridSize[litem] * o[litem+'Grid'] / (max[litem] - o[litem+'Min']);
+ $tp.find('.ui_tpicker_'+litem+' table').css({
+ width: size + "%",
+ marginLeft: o.isRTL? '0' : ((size / (-2 * gridSize[litem])) + "%"),
+ marginRight: o.isRTL? ((size / (-2 * gridSize[litem])) + "%") : '0',
+ borderCollapse: 'collapse'
+ }).find("td").click(function(e){
+ var $t = $(this),
+ h = $t.html(),
+ n = parseInt(h.replace(/[^0-9]/g),10),
+ ap = h.replace(/[^apm]/ig),
+ f = $t.data('for'); // loses scope, so we use data-for
+
+ if(f == 'hour'){
+ if(ap.indexOf('p') !== -1 && n < 12){
+ n += 12;
+ }
+ else{
+ if(ap.indexOf('a') !== -1 && n === 12){
+ n = 0;
+ }
+ }
+ }
+
+ tp_inst.control.value(tp_inst, tp_inst[f+'_slider'], litem, n);
+
+ tp_inst._onTimeChange();
+ tp_inst._onSelectHandler();
+ }).css({
+ cursor: 'pointer',
+ width: (100 / gridSize[litem]) + '%',
+ textAlign: 'center',
+ overflow: 'hidden'
+ });
+ } // end if grid > 0
+ } // end for loop
+
+ // Add timezone options
+ this.timezone_select = $tp.find('.ui_tpicker_timezone').append('<select></select>').find("select");
+ $.fn.append.apply(this.timezone_select,
+ $.map(o.timezoneList, function(val, idx) {
+ return $("<option />").val(typeof val == "object" ? val.value : val).text(typeof val == "object" ? val.label : val);
+ }));
+ if (typeof(this.timezone) != "undefined" && this.timezone !== null && this.timezone !== "") {
+ var local_timezone = (new Date(this.inst.selectedYear, this.inst.selectedMonth, this.inst.selectedDay, 12)).getTimezoneOffset()*-1;
+ if (local_timezone == this.timezone) {
+ selectLocalTimezone(tp_inst);
+ } else {
+ this.timezone_select.val(this.timezone);
+ }
+ } else {
+ if (typeof(this.hour) != "undefined" && this.hour !== null && this.hour !== "") {
+ this.timezone_select.val(o.timezone);
+ } else {
+ selectLocalTimezone(tp_inst);
+ }
+ }
+ this.timezone_select.change(function() {
+ tp_inst._onTimeChange();
+ tp_inst._onSelectHandler();
+ });
+ // End timezone options
+
+ // inject timepicker into datepicker
+ var $buttonPanel = $dp.find('.ui-datepicker-buttonpane');
+ if ($buttonPanel.length) {
+ $buttonPanel.before($tp);
+ } else {
+ $dp.append($tp);
+ }
+
+ this.$timeObj = $tp.find('.ui_tpicker_time');
+
+ if (this.inst !== null) {
+ var timeDefined = this.timeDefined;
+ this._onTimeChange();
+ this.timeDefined = timeDefined;
+ }
+
+ // slideAccess integration: http://trentrichardson.com/2011/11/11/jquery-ui-sliders-and-touch-accessibility/
+ if (this._defaults.addSliderAccess) {
+ var sliderAccessArgs = this._defaults.sliderAccessArgs,
+ rtl = this._defaults.isRTL;
+ sliderAccessArgs.isRTL = rtl;
+
+ setTimeout(function() { // fix for inline mode
+ if ($tp.find('.ui-slider-access').length === 0) {
+ $tp.find('.ui-slider:visible').sliderAccess(sliderAccessArgs);
+
+ // fix any grids since sliders are shorter
+ var sliderAccessWidth = $tp.find('.ui-slider-access:eq(0)').outerWidth(true);
+ if (sliderAccessWidth) {
+ $tp.find('table:visible').each(function() {
+ var $g = $(this),
+ oldWidth = $g.outerWidth(),
+ oldMarginLeft = $g.css(rtl? 'marginRight':'marginLeft').toString().replace('%', ''),
+ newWidth = oldWidth - sliderAccessWidth,
+ newMarginLeft = ((oldMarginLeft * newWidth) / oldWidth) + '%',
+ css = { width: newWidth, marginRight: 0, marginLeft: 0 };
+ css[rtl? 'marginRight':'marginLeft'] = newMarginLeft;
+ $g.css(css);
+ });
+ }
+ }
+ }, 10);
+ }
+ // end slideAccess integration
+
+ tp_inst._limitMinMaxDateTime(this.inst, true);
+ }
+ },
+
+ /*
+ * This function tries to limit the ability to go outside the
+ * min/max date range
+ */
+ _limitMinMaxDateTime: function(dp_inst, adjustSliders) {
+ var o = this._defaults,
+ dp_date = new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay);
+
+ if (!this._defaults.showTimepicker) {
+ return;
+ } // No time so nothing to check here
+
+ if ($.datepicker._get(dp_inst, 'minDateTime') !== null && $.datepicker._get(dp_inst, 'minDateTime') !== undefined && dp_date) {
+ var minDateTime = $.datepicker._get(dp_inst, 'minDateTime'),
+ minDateTimeDate = new Date(minDateTime.getFullYear(), minDateTime.getMonth(), minDateTime.getDate(), 0, 0, 0, 0);
+
+ if (this.hourMinOriginal === null || this.minuteMinOriginal === null || this.secondMinOriginal === null || this.millisecMinOriginal === null || this.microsecMinOriginal === null) {
+ this.hourMinOriginal = o.hourMin;
+ this.minuteMinOriginal = o.minuteMin;
+ this.secondMinOriginal = o.secondMin;
+ this.millisecMinOriginal = o.millisecMin;
+ this.microsecMinOriginal = o.microsecMin;
+ }
+
+ if (dp_inst.settings.timeOnly || minDateTimeDate.getTime() == dp_date.getTime()) {
+ this._defaults.hourMin = minDateTime.getHours();
+ if (this.hour <= this._defaults.hourMin) {
+ this.hour = this._defaults.hourMin;
+ this._defaults.minuteMin = minDateTime.getMinutes();
+ if (this.minute <= this._defaults.minuteMin) {
+ this.minute = this._defaults.minuteMin;
+ this._defaults.secondMin = minDateTime.getSeconds();
+ if (this.second <= this._defaults.secondMin) {
+ this.second = this._defaults.secondMin;
+ this._defaults.millisecMin = minDateTime.getMilliseconds();
+ if(this.millisec <= this._defaults.millisecMin) {
+ this.millisec = this._defaults.millisecMin;
+ this._defaults.microsecMin = minDateTime.getMicroseconds();
+ } else {
+ if (this.microsec < this._defaults.microsecMin) {
+ this.microsec = this._defaults.microsecMin;
+ }
+ this._defaults.microsecMin = this.microsecMinOriginal;
+ }
+ } else {
+ this._defaults.millisecMin = this.millisecMinOriginal;
+ this._defaults.microsecMin = this.microsecMinOriginal;
+ }
+ } else {
+ this._defaults.secondMin = this.secondMinOriginal;
+ this._defaults.millisecMin = this.millisecMinOriginal;
+ this._defaults.microsecMin = this.microsecMinOriginal;
+ }
+ } else {
+ this._defaults.minuteMin = this.minuteMinOriginal;
+ this._defaults.secondMin = this.secondMinOriginal;
+ this._defaults.millisecMin = this.millisecMinOriginal;
+ this._defaults.microsecMin = this.microsecMinOriginal;
+ }
+ } else {
+ this._defaults.hourMin = this.hourMinOriginal;
+ this._defaults.minuteMin = this.minuteMinOriginal;
+ this._defaults.secondMin = this.secondMinOriginal;
+ this._defaults.millisecMin = this.millisecMinOriginal;
+ this._defaults.microsecMin = this.microsecMinOriginal;
+ }
+ }
+
+ if ($.datepicker._get(dp_inst, 'maxDateTime') !== null && $.datepicker._get(dp_inst, 'maxDateTime') !== undefined && dp_date) {
+ var maxDateTime = $.datepicker._get(dp_inst, 'maxDateTime'),
+ maxDateTimeDate = new Date(maxDateTime.getFullYear(), maxDateTime.getMonth(), maxDateTime.getDate(), 0, 0, 0, 0);
+
+ if (this.hourMaxOriginal === null || this.minuteMaxOriginal === null || this.secondMaxOriginal === null || this.millisecMaxOriginal === null) {
+ this.hourMaxOriginal = o.hourMax;
+ this.minuteMaxOriginal = o.minuteMax;
+ this.secondMaxOriginal = o.secondMax;
+ this.millisecMaxOriginal = o.millisecMax;
+ this.microsecMaxOriginal = o.microsecMax;
+ }
+
+ if (dp_inst.settings.timeOnly || maxDateTimeDate.getTime() == dp_date.getTime()) {
+ this._defaults.hourMax = maxDateTime.getHours();
+ if (this.hour >= this._defaults.hourMax) {
+ this.hour = this._defaults.hourMax;
+ this._defaults.minuteMax = maxDateTime.getMinutes();
+ if (this.minute >= this._defaults.minuteMax) {
+ this.minute = this._defaults.minuteMax;
+ this._defaults.secondMax = maxDateTime.getSeconds();
+ if (this.second >= this._defaults.secondMax) {
+ this.second = this._defaults.secondMax;
+ this._defaults.millisecMax = maxDateTime.getMilliseconds();
+ if (this.millisec >= this._defaults.millisecMax) {
+ this.millisec = this._defaults.millisecMax;
+ this._defaults.microsecMax = maxDateTime.getMicroseconds();
+ } else {
+ if (this.microsec > this._defaults.microsecMax) {
+ this.microsec = this._defaults.microsecMax;
+ }
+ this._defaults.microsecMax = this.microsecMaxOriginal;
+ }
+ } else {
+ this._defaults.millisecMax = this.millisecMaxOriginal;
+ this._defaults.microsecMax = this.microsecMaxOriginal;
+ }
+ } else {
+ this._defaults.secondMax = this.secondMaxOriginal;
+ this._defaults.millisecMax = this.millisecMaxOriginal;
+ this._defaults.microsecMax = this.microsecMaxOriginal;
+ }
+ } else {
+ this._defaults.minuteMax = this.minuteMaxOriginal;
+ this._defaults.secondMax = this.secondMaxOriginal;
+ this._defaults.millisecMax = this.millisecMaxOriginal;
+ this._defaults.microsecMax = this.microsecMaxOriginal;
+ }
+ } else {
+ this._defaults.hourMax = this.hourMaxOriginal;
+ this._defaults.minuteMax = this.minuteMaxOriginal;
+ this._defaults.secondMax = this.secondMaxOriginal;
+ this._defaults.millisecMax = this.millisecMaxOriginal;
+ this._defaults.microsecMax = this.microsecMaxOriginal;
+ }
+ }
+
+ if (adjustSliders !== undefined && adjustSliders === true) {
+ var hourMax = parseInt((this._defaults.hourMax - ((this._defaults.hourMax - this._defaults.hourMin) % this._defaults.stepHour)), 10),
+ minMax = parseInt((this._defaults.minuteMax - ((this._defaults.minuteMax - this._defaults.minuteMin) % this._defaults.stepMinute)), 10),
+ secMax = parseInt((this._defaults.secondMax - ((this._defaults.secondMax - this._defaults.secondMin) % this._defaults.stepSecond)), 10),
+ millisecMax = parseInt((this._defaults.millisecMax - ((this._defaults.millisecMax - this._defaults.millisecMin) % this._defaults.stepMillisec)), 10);
+ microsecMax = parseInt((this._defaults.microsecMax - ((this._defaults.microsecMax - this._defaults.microsecMin) % this._defaults.stepMicrosec)), 10);
+
+ if (this.hour_slider) {
+ this.control.options(this, this.hour_slider, 'hour', { min: this._defaults.hourMin, max: hourMax });
+ this.control.value(this, this.hour_slider, 'hour', this.hour - (this.hour % this._defaults.stepHour));
+ }
+ if (this.minute_slider) {
+ this.control.options(this, this.minute_slider, 'minute', { min: this._defaults.minuteMin, max: minMax });
+ this.control.value(this, this.minute_slider, 'minute', this.minute - (this.minute % this._defaults.stepMinute));
+ }
+ if (this.second_slider) {
+ this.control.options(this, this.second_slider, 'second', { min: this._defaults.secondMin, max: secMax });
+ this.control.value(this, this.second_slider, 'second', this.second - (this.second % this._defaults.stepSecond));
+ }
+ if (this.millisec_slider) {
+ this.control.options(this, this.millisec_slider, 'millisec', { min: this._defaults.millisecMin, max: millisecMax });
+ this.control.value(this, this.millisec_slider, 'millisec', this.millisec - (this.millisec % this._defaults.stepMillisec));
+ }
+ if (this.microsec_slider) {
+ this.control.options(this, this.microsec_slider, 'microsec', { min: this._defaults.microsecMin, max: microsecMax });
+ this.control.value(this, this.microsec_slider, 'microsec', this.microsec - (this.microsec % this._defaults.stepMicrosec));
+ }
+ }
+
+ },
+
+ /*
+ * when a slider moves, set the internal time...
+ * on time change is also called when the time is updated in the text field
+ */
+ _onTimeChange: function() {
+ var hour = (this.hour_slider) ? this.control.value(this, this.hour_slider, 'hour') : false,
+ minute = (this.minute_slider) ? this.control.value(this, this.minute_slider, 'minute') : false,
+ second = (this.second_slider) ? this.control.value(this, this.second_slider, 'second') : false,
+ millisec = (this.millisec_slider) ? this.control.value(this, this.millisec_slider, 'millisec') : false,
+ microsec = (this.microsec_slider) ? this.control.value(this, this.microsec_slider, 'microsec') : false,
+ timezone = (this.timezone_select) ? this.timezone_select.val() : false,
+ o = this._defaults,
+ pickerTimeFormat = o.pickerTimeFormat || o.timeFormat,
+ pickerTimeSuffix = o.pickerTimeSuffix || o.timeSuffix;
+
+ if (typeof(hour) == 'object') {
+ hour = false;
+ }
+ if (typeof(minute) == 'object') {
+ minute = false;
+ }
+ if (typeof(second) == 'object') {
+ second = false;
+ }
+ if (typeof(millisec) == 'object') {
+ millisec = false;
+ }
+ if (typeof(microsec) == 'object') {
+ microsec = false;
+ }
+ if (typeof(timezone) == 'object') {
+ timezone = false;
+ }
+
+ if (hour !== false) {
+ hour = parseInt(hour, 10);
+ }
+ if (minute !== false) {
+ minute = parseInt(minute, 10);
+ }
+ if (second !== false) {
+ second = parseInt(second, 10);
+ }
+ if (millisec !== false) {
+ millisec = parseInt(millisec, 10);
+ }
+ if (microsec !== false) {
+ microsec = parseInt(microsec, 10);
+ }
+
+ var ampm = o[hour < 12 ? 'amNames' : 'pmNames'][0];
+
+ // If the update was done in the input field, the input field should not be updated.
+ // If the update was done using the sliders, update the input field.
+ var hasChanged = (hour != this.hour || minute != this.minute || second != this.second || millisec != this.millisec || microsec != this.microsec
+ || (this.ampm.length > 0 && (hour < 12) != ($.inArray(this.ampm.toUpperCase(), this.amNames) !== -1))
+ || (this.timezone !== null && timezone != this.timezone));
+
+ if (hasChanged) {
+
+ if (hour !== false) {
+ this.hour = hour;
+ }
+ if (minute !== false) {
+ this.minute = minute;
+ }
+ if (second !== false) {
+ this.second = second;
+ }
+ if (millisec !== false) {
+ this.millisec = millisec;
+ }
+ if (microsec !== false) {
+ this.microsec = microsec;
+ }
+ if (timezone !== false) {
+ this.timezone = timezone;
+ }
+
+ if (!this.inst) {
+ this.inst = $.datepicker._getInst(this.$input[0]);
+ }
+
+ this._limitMinMaxDateTime(this.inst, true);
+ }
+ if (this.support.ampm) {
+ this.ampm = ampm;
+ }
+
+ // Updates the time within the timepicker
+ this.formattedTime = $.datepicker.formatTime(o.timeFormat, this, o);
+ if (this.$timeObj) {
+ if(pickerTimeFormat === o.timeFormat){
+ this.$timeObj.text(this.formattedTime + pickerTimeSuffix);
+ }
+ else{
+ this.$timeObj.text($.datepicker.formatTime(pickerTimeFormat, this, o) + pickerTimeSuffix);
+ }
+ }
+
+ this.timeDefined = true;
+ if (hasChanged) {
+ this._updateDateTime();
+ }
+ },
+
+ /*
+ * call custom onSelect.
+ * bind to sliders slidestop, and grid click.
+ */
+ _onSelectHandler: function() {
+ var onSelect = this._defaults.onSelect || this.inst.settings.onSelect;
+ var inputEl = this.$input ? this.$input[0] : null;
+ if (onSelect && inputEl) {
+ onSelect.apply(inputEl, [this.formattedDateTime, this]);
+ }
+ },
+
+ /*
+ * update our input with the new date time..
+ */
+ _updateDateTime: function(dp_inst) {
+ dp_inst = this.inst || dp_inst;
+ //var dt = $.datepicker._daylightSavingAdjust(new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay)),
+ var dt = $.datepicker._daylightSavingAdjust(new Date(dp_inst.currentYear, dp_inst.currentMonth, dp_inst.currentDay)),
+ dateFmt = $.datepicker._get(dp_inst, 'dateFormat'),
+ formatCfg = $.datepicker._getFormatConfig(dp_inst),
+ timeAvailable = dt !== null && this.timeDefined;
+ this.formattedDate = $.datepicker.formatDate(dateFmt, (dt === null ? new Date() : dt), formatCfg);
+ var formattedDateTime = this.formattedDate;
+
+ // if a slider was changed but datepicker doesn't have a value yet, set it
+ if(dp_inst.lastVal===""){
+ dp_inst.currentYear=dp_inst.selectedYear;
+ dp_inst.currentMonth=dp_inst.selectedMonth;
+ dp_inst.currentDay=dp_inst.selectedDay;
+ }
+
+ /*
+ * remove following lines to force every changes in date picker to change the input value
+ * Bug descriptions: when an input field has a default value, and click on the field to pop up the date picker.
+ * If the user manually empty the value in the input field, the date picker will never change selected value.
+ */
+ //if (dp_inst.lastVal !== undefined && (dp_inst.lastVal.length > 0 && this.$input.val().length === 0)) {
+ // return;
+ //}
+
+ if (this._defaults.timeOnly === true) {
+ formattedDateTime = this.formattedTime;
+ } else if (this._defaults.timeOnly !== true && (this._defaults.alwaysSetTime || timeAvailable)) {
+ formattedDateTime += this._defaults.separator + this.formattedTime + this._defaults.timeSuffix;
+ }
+
+ this.formattedDateTime = formattedDateTime;
+
+ if (!this._defaults.showTimepicker) {
+ this.$input.val(this.formattedDate);
+ } else if (this.$altInput && this._defaults.timeOnly === false && this._defaults.altFieldTimeOnly === true) {
+ this.$altInput.val(this.formattedTime);
+ this.$input.val(this.formattedDate);
+ } else if (this.$altInput) {
+ this.$input.val(formattedDateTime);
+ var altFormattedDateTime = '',
+ altSeparator = this._defaults.altSeparator ? this._defaults.altSeparator : this._defaults.separator,
+ altTimeSuffix = this._defaults.altTimeSuffix ? this._defaults.altTimeSuffix : this._defaults.timeSuffix;
+
+ if(!this._defaults.timeOnly){
+ if (this._defaults.altFormat){
+ altFormattedDateTime = $.datepicker.formatDate(this._defaults.altFormat, (dt === null ? new Date() : dt), formatCfg);
+ }
+ else{
+ altFormattedDateTime = this.formattedDate;
+ }
+
+ if (altFormattedDateTime){
+ altFormattedDateTime += altSeparator;
+ }
+ }
+
+ if(this._defaults.altTimeFormat){
+ altFormattedDateTime += $.datepicker.formatTime(this._defaults.altTimeFormat, this, this._defaults) + altTimeSuffix;
+ }
+ else{
+ altFormattedDateTime += this.formattedTime + altTimeSuffix;
+ }
+ this.$altInput.val(altFormattedDateTime);
+ } else {
+ this.$input.val(formattedDateTime);
+ }
+
+ this.$input.trigger("change");
+ },
+
+ _onFocus: function() {
+ if (!this.$input.val() && this._defaults.defaultValue) {
+ this.$input.val(this._defaults.defaultValue);
+ var inst = $.datepicker._getInst(this.$input.get(0)),
+ tp_inst = $.datepicker._get(inst, 'timepicker');
+ if (tp_inst) {
+ if (tp_inst._defaults.timeOnly && (inst.input.val() != inst.lastVal)) {
+ try {
+ $.datepicker._updateDatepicker(inst);
+ } catch (err) {
+ $.timepicker.log(err);
+ }
+ }
+ }
+ }
+ },
+
+ /*
+ * Small abstraction to control types
+ * We can add more, just be sure to follow the pattern: create, options, value
+ */
+ _controls: {
+ // slider methods
+ slider: {
+ create: function(tp_inst, obj, unit, val, min, max, step){
+ var rtl = tp_inst._defaults.isRTL; // if rtl go -60->0 instead of 0->60
+ return obj.prop('slide', null).slider({
+ orientation: "horizontal",
+ value: rtl? val*-1 : val,
+ min: rtl? max*-1 : min,
+ max: rtl? min*-1 : max,
+ step: step,
+ slide: function(event, ui) {
+ tp_inst.control.value(tp_inst, $(this), unit, rtl? ui.value*-1:ui.value);
+ tp_inst._onTimeChange();
+ },
+ stop: function(event, ui) {
+ tp_inst._onSelectHandler();
+ }
+ });
+ },
+ options: function(tp_inst, obj, unit, opts, val){
+ if(tp_inst._defaults.isRTL){
+ if(typeof(opts) == 'string'){
+ if(opts == 'min' || opts == 'max'){
+ if(val !== undefined){
+ return obj.slider(opts, val*-1);
+ }
+ return Math.abs(obj.slider(opts));
+ }
+ return obj.slider(opts);
+ }
+ var min = opts.min,
+ max = opts.max;
+ opts.min = opts.max = null;
+ if(min !== undefined){
+ opts.max = min * -1;
+ }
+ if(max !== undefined){
+ opts.min = max * -1;
+ }
+ return obj.slider(opts);
+ }
+ if(typeof(opts) == 'string' && val !== undefined){
+ return obj.slider(opts, val);
+ }
+ return obj.slider(opts);
+ },
+ value: function(tp_inst, obj, unit, val){
+ if(tp_inst._defaults.isRTL){
+ if(val !== undefined){
+ return obj.slider('value', val*-1);
+ }
+ return Math.abs(obj.slider('value'));
+ }
+ if(val !== undefined){
+ return obj.slider('value', val);
+ }
+ return obj.slider('value');
+ }
+ },
+ // select methods
+ select: {
+ create: function(tp_inst, obj, unit, val, min, max, step){
+ var sel = '<select class="ui-timepicker-select" data-unit="'+ unit +'" data-min="'+ min +'" data-max="'+ max +'" data-step="'+ step +'">',
+ format = tp_inst._defaults.pickerTimeFormat || tp_inst._defaults.timeFormat;
+
+ for(var i=min; i<=max; i+=step){
+ sel += '<option value="'+ i +'"'+ (i==val? ' selected':'') +'>';
+ if(unit == 'hour'){
+ sel += $.datepicker.formatTime($.trim(format.replace(/[^ht ]/ig,'')), {hour:i}, tp_inst._defaults);
+ }
+ else if(unit == 'millisec' || unit == 'microsec' || i >= 10){ sel += i; }
+ else {sel += '0'+ i.toString(); }
+ sel += '</option>';
+ }
+ sel += '</select>';
+
+ obj.children('select').remove();
+
+ $(sel).appendTo(obj).change(function(e){
+ tp_inst._onTimeChange();
+ tp_inst._onSelectHandler();
+ });
+
+ return obj;
+ },
+ options: function(tp_inst, obj, unit, opts, val){
+ var o = {},
+ $t = obj.children('select');
+ if(typeof(opts) == 'string'){
+ if(val === undefined){
+ return $t.data(opts);
+ }
+ o[opts] = val;
+ }
+ else{ o = opts; }
+ return tp_inst.control.create(tp_inst, obj, $t.data('unit'), $t.val(), o.min || $t.data('min'), o.max || $t.data('max'), o.step || $t.data('step'));
+ },
+ value: function(tp_inst, obj, unit, val){
+ var $t = obj.children('select');
+ if(val !== undefined){
+ return $t.val(val);
+ }
+ return $t.val();
+ }
+ }
+ } // end _controls
+
+ });
+
+ $.fn.extend({
+ /*
+ * shorthand just to use timepicker..
+ */
+ timepicker: function(o) {
+ o = o || {};
+ var tmp_args = Array.prototype.slice.call(arguments);
+
+ if (typeof o == 'object') {
+ tmp_args[0] = $.extend(o, {
+ timeOnly: true
+ });
+ }
+
+ return $(this).each(function() {
+ $.fn.datetimepicker.apply($(this), tmp_args);
+ });
+ },
+
+ /*
+ * extend timepicker to datepicker
+ */
+ datetimepicker: function(o) {
+ o = o || {};
+ var tmp_args = arguments;
+
+ if (typeof(o) == 'string') {
+ if (o == 'getDate') {
+ return $.fn.datepicker.apply($(this[0]), tmp_args);
+ } else {
+ return this.each(function() {
+ var $t = $(this);
+ $t.datepicker.apply($t, tmp_args);
+ });
+ }
+ } else {
+ return this.each(function() {
+ var $t = $(this);
+ $t.datepicker($.timepicker._newInst($t, o)._defaults);
+ });
+ }
+ }
+ });
+
+ /*
+ * Public Utility to parse date and time
+ */
+ $.datepicker.parseDateTime = function(dateFormat, timeFormat, dateTimeString, dateSettings, timeSettings) {
+ var parseRes = parseDateTimeInternal(dateFormat, timeFormat, dateTimeString, dateSettings, timeSettings);
+ if (parseRes.timeObj) {
+ var t = parseRes.timeObj;
+ parseRes.date.setHours(t.hour, t.minute, t.second, t.millisec);
+ parseRes.date.setMicroseconds(t.microsec);
+ }
+
+ return parseRes.date;
+ };
+
+ /*
+ * Public utility to parse time
+ */
+ $.datepicker.parseTime = function(timeFormat, timeString, options) {
+ var o = extendRemove(extendRemove({}, $.timepicker._defaults), options || {}),
+ iso8601 = (timeFormat.replace(/\'.*?\'/g,'').indexOf('Z') !== -1);
+
+ // Strict parse requires the timeString to match the timeFormat exactly
+ var strictParse = function(f, s, o){
+
+ // pattern for standard and localized AM/PM markers
+ var getPatternAmpm = function(amNames, pmNames) {
+ var markers = [];
+ if (amNames) {
+ $.merge(markers, amNames);
+ }
+ if (pmNames) {
+ $.merge(markers, pmNames);
+ }
+ markers = $.map(markers, function(val) {
+ return val.replace(/[.*+?|()\[\]{}\\]/g, '\\$&');
+ });
+ return '(' + markers.join('|') + ')?';
+ };
+
+ // figure out position of time elements.. cause js cant do named captures
+ var getFormatPositions = function(timeFormat) {
+ var finds = timeFormat.toLowerCase().match(/(h{1,2}|m{1,2}|s{1,2}|l{1}|c{1}|t{1,2}|z|'.*?')/g),
+ orders = {
+ h: -1,
+ m: -1,
+ s: -1,
+ l: -1,
+ c: -1,
+ t: -1,
+ z: -1
+ };
+
+ if (finds) {
+ for (var i = 0; i < finds.length; i++) {
+ if (orders[finds[i].toString().charAt(0)] == -1) {
+ orders[finds[i].toString().charAt(0)] = i + 1;
+ }
+ }
+ }
+ return orders;
+ };
+
+ var regstr = '^' + f.toString()
+ .replace(/([hH]{1,2}|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g, function (match) {
+ var ml = match.length;
+ switch (match.charAt(0).toLowerCase()) {
+ case 'h': return ml === 1? '(\\d?\\d)':'(\\d{'+ml+'})';
+ case 'm': return ml === 1? '(\\d?\\d)':'(\\d{'+ml+'})';
+ case 's': return ml === 1? '(\\d?\\d)':'(\\d{'+ml+'})';
+ case 'l': return '(\\d?\\d?\\d)';
+ case 'c': return '(\\d?\\d?\\d)';
+ case 'z': return '(z|[-+]\\d\\d:?\\d\\d|\\S+)?';
+ case 't': return getPatternAmpm(o.amNames, o.pmNames);
+ default: // literal escaped in quotes
+ return '(' + match.replace(/\'/g, "").replace(/(\.|\$|\^|\\|\/|\(|\)|\[|\]|\?|\+|\*)/g, function (m) { return "\\" + m; }) + ')?';
+ }
+ })
+ .replace(/\s/g, '\\s?') +
+ o.timeSuffix + '$',
+ order = getFormatPositions(f),
+ ampm = '',
+ treg;
+
+ treg = s.match(new RegExp(regstr, 'i'));
+
+ var resTime = {
+ hour: 0,
+ minute: 0,
+ second: 0,
+ millisec: 0,
+ microsec: 0
+ };
+
+ if (treg) {
+ if (order.t !== -1) {
+ if (treg[order.t] === undefined || treg[order.t].length === 0) {
+ ampm = '';
+ resTime.ampm = '';
+ } else {
+ ampm = $.inArray(treg[order.t].toUpperCase(), o.amNames) !== -1 ? 'AM' : 'PM';
+ resTime.ampm = o[ampm == 'AM' ? 'amNames' : 'pmNames'][0];
+ }
+ }
+
+ if (order.h !== -1) {
+ if (ampm == 'AM' && treg[order.h] == '12') {
+ resTime.hour = 0; // 12am = 0 hour
+ } else {
+ if (ampm == 'PM' && treg[order.h] != '12') {
+ resTime.hour = parseInt(treg[order.h], 10) + 12; // 12pm = 12 hour, any other pm = hour + 12
+ } else {
+ resTime.hour = Number(treg[order.h]);
+ }
+ }
+ }
+
+ if (order.m !== -1) {
+ resTime.minute = Number(treg[order.m]);
+ }
+ if (order.s !== -1) {
+ resTime.second = Number(treg[order.s]);
+ }
+ if (order.l !== -1) {
+ resTime.millisec = Number(treg[order.l]);
+ }
+ if (order.c !== -1) {
+ resTime.microsec = Number(treg[order.c]);
+ }
+ if (order.z !== -1 && treg[order.z] !== undefined) {
+ resTime.timezone = $.timepicker.timezoneOffsetNumber(treg[order.z]);
+ }
+
+
+ return resTime;
+ }
+ return false;
+ };// end strictParse
+
+ // First try JS Date, if that fails, use strictParse
+ var looseParse = function(f,s,o){
+ try{
+ var d = new Date('2012-01-01 '+ s);
+ if(isNaN(d.getTime())){
+ d = new Date('2012-01-01T'+ s);
+ if(isNaN(d.getTime())){
+ d = new Date('01/01/2012 '+ s);
+ if(isNaN(d.getTime())){
+ throw "Unable to parse time with native Date: "+ s;
+ }
+ }
+ }
+
+ return {
+ hour: d.getHours(),
+ minute: d.getMinutes(),
+ second: d.getSeconds(),
+ millisec: d.getMilliseconds(),
+ microsec: d.getMicroseconds(),
+ timezone: d.getTimezoneOffset()*-1
+ };
+ }
+ catch(err){
+ try{
+ return strictParse(f,s,o);
+ }
+ catch(err2){
+ $.timepicker.log("Unable to parse \ntimeString: "+ s +"\ntimeFormat: "+ f);
+ }
+ }
+ return false;
+ }; // end looseParse
+
+ if(typeof o.parse === "function"){
+ return o.parse(timeFormat, timeString, o);
+ }
+ if(o.parse === 'loose'){
+ return looseParse(timeFormat, timeString, o);
+ }
+ return strictParse(timeFormat, timeString, o);
+ };
+
+ /*
+ * Public utility to format the time
+ * format = string format of the time
+ * time = a {}, not a Date() for timezones
+ * options = essentially the regional[].. amNames, pmNames, ampm
+ */
+ $.datepicker.formatTime = function(format, time, options) {
+ options = options || {};
+ options = $.extend({}, $.timepicker._defaults, options);
+ time = $.extend({
+ hour: 0,
+ minute: 0,
+ second: 0,
+ millisec: 0,
+ timezone: 0
+ }, time);
+
+ var tmptime = format,
+ ampmName = options.amNames[0],
+ hour = parseInt(time.hour, 10);
+
+ if (hour > 11) {
+ ampmName = options.pmNames[0];
+ }
+
+ tmptime = tmptime.replace(/(?:HH?|hh?|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|('.*?'|".*?"))/g, function(match) {
+ switch (match) {
+ case 'HH':
+ return ('0' + hour).slice(-2);
+ case 'H':
+ return hour;
+ case 'hh':
+ return ('0' + convert24to12(hour)).slice(-2);
+ case 'h':
+ return convert24to12(hour);
+ case 'mm':
+ return ('0' + time.minute).slice(-2);
+ case 'm':
+ return time.minute;
+ case 'ss':
+ return ('0' + time.second).slice(-2);
+ case 's':
+ return time.second;
+ case 'l':
+ return ('00' + time.millisec).slice(-3);
+ case 'c':
+ return ('00' + time.microsec).slice(-3);
+ case 'z':
+ return $.timepicker.timezoneOffsetString(time.timezone === null? options.timezone : time.timezone, false);
+ case 'Z':
+ return $.timepicker.timezoneOffsetString(time.timezone === null? options.timezone : time.timezone, true);
+ case 'T':
+ return ampmName.charAt(0).toUpperCase();
+ case 'TT':
+ return ampmName.toUpperCase();
+ case 't':
+ return ampmName.charAt(0).toLowerCase();
+ case 'tt':
+ return ampmName.toLowerCase();
+ default:
+ return match.replace(/\'/g, "") || "'";
+ }
+ });
+
+ tmptime = $.trim(tmptime);
+ return tmptime;
+ };
+
+ /*
+ * the bad hack :/ override datepicker so it doesnt close on select
+ // inspired: http://stackoverflow.com/questions/1252512/jquery-datepicker-prevent-closing-picker-when-clicking-a-date/1762378#1762378
+ */
+ $.datepicker._base_selectDate = $.datepicker._selectDate;
+ $.datepicker._selectDate = function(id, dateStr) {
+ var inst = this._getInst($(id)[0]),
+ tp_inst = this._get(inst, 'timepicker');
+
+ if (tp_inst) {
+ tp_inst._limitMinMaxDateTime(inst, true);
+ inst.inline = inst.stay_open = true;
+ //This way the onSelect handler called from calendarpicker get the full dateTime
+ this._base_selectDate(id, dateStr);
+ inst.inline = inst.stay_open = false;
+ this._notifyChange(inst);
+ this._updateDatepicker(inst);
+ } else {
+ this._base_selectDate(id, dateStr);
+ }
+ };
+
+ /*
+ * second bad hack :/ override datepicker so it triggers an event when changing the input field
+ * and does not redraw the datepicker on every selectDate event
+ */
+ $.datepicker._base_updateDatepicker = $.datepicker._updateDatepicker;
+ $.datepicker._updateDatepicker = function(inst) {
+
+ // don't popup the datepicker if there is another instance already opened
+ var input = inst.input[0];
+ if ($.datepicker._curInst && $.datepicker._curInst != inst && $.datepicker._datepickerShowing && $.datepicker._lastInput != input) {
+ return;
+ }
+
+ if (typeof(inst.stay_open) !== 'boolean' || inst.stay_open === false) {
+
+ this._base_updateDatepicker(inst);
+
+ // Reload the time control when changing something in the input text field.
+ var tp_inst = this._get(inst, 'timepicker');
+ if (tp_inst) {
+ tp_inst._addTimePicker(inst);
+ }
+ }
+ };
+
+ /*
+ * third bad hack :/ override datepicker so it allows spaces and colon in the input field
+ */
+ $.datepicker._base_doKeyPress = $.datepicker._doKeyPress;
+ $.datepicker._doKeyPress = function(event) {
+ var inst = $.datepicker._getInst(event.target),
+ tp_inst = $.datepicker._get(inst, 'timepicker');
+
+ if (tp_inst) {
+ if ($.datepicker._get(inst, 'constrainInput')) {
+ var ampm = tp_inst.support.ampm,
+ tz = tp_inst._defaults.showTimezone !== null? tp_inst._defaults.showTimezone : tp_inst.support.timezone,
+ dateChars = $.datepicker._possibleChars($.datepicker._get(inst, 'dateFormat')),
+ datetimeChars = tp_inst._defaults.timeFormat.toString()
+ .replace(/[hms]/g, '')
+ .replace(/TT/g, ampm ? 'APM' : '')
+ .replace(/Tt/g, ampm ? 'AaPpMm' : '')
+ .replace(/tT/g, ampm ? 'AaPpMm' : '')
+ .replace(/T/g, ampm ? 'AP' : '')
+ .replace(/tt/g, ampm ? 'apm' : '')
+ .replace(/t/g, ampm ? 'ap' : '') +
+ " " + tp_inst._defaults.separator +
+ tp_inst._defaults.timeSuffix +
+ (tz ? tp_inst._defaults.timezoneList.join('') : '') +
+ (tp_inst._defaults.amNames.join('')) + (tp_inst._defaults.pmNames.join('')) +
+ dateChars,
+ chr = String.fromCharCode(event.charCode === undefined ? event.keyCode : event.charCode);
+ return event.ctrlKey || (chr < ' ' || !dateChars || datetimeChars.indexOf(chr) > -1);
+ }
+ }
+
+ return $.datepicker._base_doKeyPress(event);
+ };
+
+ /*
+ * Fourth bad hack :/ override _updateAlternate function used in inline mode to init altField
+ */
+ $.datepicker._base_updateAlternate = $.datepicker._updateAlternate;
+ /* Update any alternate field to synchronise with the main field. */
+ $.datepicker._updateAlternate = function(inst) {
+ var tp_inst = this._get(inst, 'timepicker');
+ if(tp_inst){
+ var altField = tp_inst._defaults.altField;
+ if (altField) { // update alternate field too
+ var altFormat = tp_inst._defaults.altFormat || tp_inst._defaults.dateFormat,
+ date = this._getDate(inst),
+ formatCfg = $.datepicker._getFormatConfig(inst),
+ altFormattedDateTime = '',
+ altSeparator = tp_inst._defaults.altSeparator ? tp_inst._defaults.altSeparator : tp_inst._defaults.separator,
+ altTimeSuffix = tp_inst._defaults.altTimeSuffix ? tp_inst._defaults.altTimeSuffix : tp_inst._defaults.timeSuffix,
+ altTimeFormat = tp_inst._defaults.altTimeFormat !== null ? tp_inst._defaults.altTimeFormat : tp_inst._defaults.timeFormat;
+
+ altFormattedDateTime += $.datepicker.formatTime(altTimeFormat, tp_inst, tp_inst._defaults) + altTimeSuffix;
+ if(!tp_inst._defaults.timeOnly && !tp_inst._defaults.altFieldTimeOnly && date !== null){
+ if(tp_inst._defaults.altFormat){
+ altFormattedDateTime = $.datepicker.formatDate(tp_inst._defaults.altFormat, date, formatCfg) + altSeparator + altFormattedDateTime;
+ }
+ else{
+ altFormattedDateTime = tp_inst.formattedDate + altSeparator + altFormattedDateTime;
+ }
+ }
+ $(altField).val(altFormattedDateTime);
+ }
+ }
+ else{
+ $.datepicker._base_updateAlternate(inst);
+ }
+ };
+
+ /*
+ * Override key up event to sync manual input changes.
+ */
+ $.datepicker._base_doKeyUp = $.datepicker._doKeyUp;
+ $.datepicker._doKeyUp = function(event) {
+ var inst = $.datepicker._getInst(event.target),
+ tp_inst = $.datepicker._get(inst, 'timepicker');
+
+ if (tp_inst) {
+ if (tp_inst._defaults.timeOnly && (inst.input.val() != inst.lastVal)) {
+ try {
+ $.datepicker._updateDatepicker(inst);
+ } catch (err) {
+ $.timepicker.log(err);
+ }
+ }
+ }
+
+ return $.datepicker._base_doKeyUp(event);
+ };
+
+ /*
+ * override "Today" button to also grab the time.
+ */
+ $.datepicker._base_gotoToday = $.datepicker._gotoToday;
+ $.datepicker._gotoToday = function(id) {
+ var inst = this._getInst($(id)[0]),
+ $dp = inst.dpDiv;
+ this._base_gotoToday(id);
+ var tp_inst = this._get(inst, 'timepicker');
+ selectLocalTimezone(tp_inst);
+ var now = new Date();
+ this._setTime(inst, now);
+ $('.ui-datepicker-today', $dp).click();
+ };
+
+ /*
+ * Disable & enable the Time in the datetimepicker
+ */
+ $.datepicker._disableTimepickerDatepicker = function(target) {
+ var inst = this._getInst(target);
+ if (!inst) {
+ return;
+ }
+
+ var tp_inst = this._get(inst, 'timepicker');
+ $(target).datepicker('getDate'); // Init selected[Year|Month|Day]
+ if (tp_inst) {
+ tp_inst._defaults.showTimepicker = false;
+ tp_inst._updateDateTime(inst);
+ }
+ };
+
+ $.datepicker._enableTimepickerDatepicker = function(target) {
+ var inst = this._getInst(target);
+ if (!inst) {
+ return;
+ }
+
+ var tp_inst = this._get(inst, 'timepicker');
+ $(target).datepicker('getDate'); // Init selected[Year|Month|Day]
+ if (tp_inst) {
+ tp_inst._defaults.showTimepicker = true;
+ tp_inst._addTimePicker(inst); // Could be disabled on page load
+ tp_inst._updateDateTime(inst);
+ }
+ };
+
+ /*
+ * Create our own set time function
+ */
+ $.datepicker._setTime = function(inst, date) {
+ var tp_inst = this._get(inst, 'timepicker');
+ if (tp_inst) {
+ var defaults = tp_inst._defaults;
+
+ // calling _setTime with no date sets time to defaults
+ tp_inst.hour = date ? date.getHours() : defaults.hour;
+ tp_inst.minute = date ? date.getMinutes() : defaults.minute;
+ tp_inst.second = date ? date.getSeconds() : defaults.second;
+ tp_inst.millisec = date ? date.getMilliseconds() : defaults.millisec;
+ tp_inst.microsec = date ? date.getMicroseconds() : defaults.microsec;
+
+ //check if within min/max times..
+ tp_inst._limitMinMaxDateTime(inst, true);
+
+ tp_inst._onTimeChange();
+ tp_inst._updateDateTime(inst);
+ }
+ };
+
+ /*
+ * Create new public method to set only time, callable as $().datepicker('setTime', date)
+ */
+ $.datepicker._setTimeDatepicker = function(target, date, withDate) {
+ var inst = this._getInst(target);
+ if (!inst) {
+ return;
+ }
+
+ var tp_inst = this._get(inst, 'timepicker');
+
+ if (tp_inst) {
+ this._setDateFromField(inst);
+ var tp_date;
+ if (date) {
+ if (typeof date == "string") {
+ tp_inst._parseTime(date, withDate);
+ tp_date = new Date();
+ tp_date.setHours(tp_inst.hour, tp_inst.minute, tp_inst.second, tp_inst.millisec);
+ tp_date.setMicroseconds(tp_inst.microsec);
+ } else {
+ tp_date = new Date(date.getTime());
+ tp_date.setMicroseconds(date.getMicroseconds());
+ }
+ if (tp_date.toString() == 'Invalid Date') {
+ tp_date = undefined;
+ }
+ this._setTime(inst, tp_date);
+ }
+ }
+
+ };
+
+ /*
+ * override setDate() to allow setting time too within Date object
+ */
+ $.datepicker._base_setDateDatepicker = $.datepicker._setDateDatepicker;
+ $.datepicker._setDateDatepicker = function(target, date) {
+ var inst = this._getInst(target);
+ if (!inst) {
+ return;
+ }
+
+ if(typeof(date) === 'string'){
+ date = new Date(date);
+ if(!date.getTime()){
+ $.timepicker.log("Error creating Date object from string.");
+ }
+ }
+
+ var tp_inst = this._get(inst, 'timepicker');
+ var tp_date;
+ if (date instanceof Date) {
+ tp_date = new Date(date.getTime());
+ tp_date.setMicroseconds(date.getMicroseconds());
+ } else {
+ tp_date = date;
+ }
+
+ // This is important if you are using the timezone option, javascript's Date
+ // object will only return the timezone offset for the current locale, so we
+ // adjust it accordingly. If not using timezone option this won't matter..
+ // If a timezone is different in tp, keep the timezone as is
+ if(tp_inst){
+ // look out for DST if tz wasn't specified
+ if(!tp_inst.support.timezone && tp_inst._defaults.timezone === null){
+ tp_inst.timezone = tp_date.getTimezoneOffset()*-1;
+ }
+ date = $.timepicker.timezoneAdjust(date, tp_inst.timezone);
+ tp_date = $.timepicker.timezoneAdjust(tp_date, tp_inst.timezone);
+ }
+
+ this._updateDatepicker(inst);
+ this._base_setDateDatepicker.apply(this, arguments);
+ this._setTimeDatepicker(target, tp_date, true);
+ };
+
+ /*
+ * override getDate() to allow getting time too within Date object
+ */
+ $.datepicker._base_getDateDatepicker = $.datepicker._getDateDatepicker;
+ $.datepicker._getDateDatepicker = function(target, noDefault) {
+ var inst = this._getInst(target);
+ if (!inst) {
+ return;
+ }
+
+ var tp_inst = this._get(inst, 'timepicker');
+
+ if (tp_inst) {
+ // if it hasn't yet been defined, grab from field
+ if(inst.lastVal === undefined){
+ this._setDateFromField(inst, noDefault);
+ }
+
+ var date = this._getDate(inst);
+ if (date && tp_inst._parseTime($(target).val(), tp_inst.timeOnly)) {
+ date.setHours(tp_inst.hour, tp_inst.minute, tp_inst.second, tp_inst.millisec);
+ date.setMicroseconds(tp_inst.microsec);
+
+ // This is important if you are using the timezone option, javascript's Date
+ // object will only return the timezone offset for the current locale, so we
+ // adjust it accordingly. If not using timezone option this won't matter..
+ if(tp_inst.timezone != null){
+ // look out for DST if tz wasn't specified
+ if(!tp_inst.support.timezone && tp_inst._defaults.timezone === null){
+ tp_inst.timezone = date.getTimezoneOffset()*-1;
+ }
+ date = $.timepicker.timezoneAdjust(date, tp_inst.timezone);
+ }
+ }
+ return date;
+ }
+ return this._base_getDateDatepicker(target, noDefault);
+ };
+
+ /*
+ * override parseDate() because UI 1.8.14 throws an error about "Extra characters"
+ * An option in datapicker to ignore extra format characters would be nicer.
+ */
+ $.datepicker._base_parseDate = $.datepicker.parseDate;
+ $.datepicker.parseDate = function(format, value, settings) {
+ var date;
+ try {
+ date = this._base_parseDate(format, value, settings);
+ } catch (err) {
+ // Hack! The error message ends with a colon, a space, and
+ // the "extra" characters. We rely on that instead of
+ // attempting to perfectly reproduce the parsing algorithm.
+ if (err.indexOf(":") >= 0) {
+ date = this._base_parseDate(format, value.substring(0,value.length-(err.length-err.indexOf(':')-2)), settings);
+ $.timepicker.log("Error parsing the date string: " + err + "\ndate string = " + value + "\ndate format = " + format);
+ } else {
+ throw err;
+ }
+ }
+ return date;
+ };
+
+ /*
+ * override formatDate to set date with time to the input
+ */
+ $.datepicker._base_formatDate = $.datepicker._formatDate;
+ $.datepicker._formatDate = function(inst, day, month, year) {
+ var tp_inst = this._get(inst, 'timepicker');
+ if (tp_inst) {
+ tp_inst._updateDateTime(inst);
+ return tp_inst.$input.val();
+ }
+ return this._base_formatDate(inst);
+ };
+
+ /*
+ * override options setter to add time to maxDate(Time) and minDate(Time). MaxDate
+ */
+ $.datepicker._base_optionDatepicker = $.datepicker._optionDatepicker;
+ $.datepicker._optionDatepicker = function(target, name, value) {
+ var inst = this._getInst(target),
+ name_clone;
+ if (!inst) {
+ return null;
+ }
+
+ var tp_inst = this._get(inst, 'timepicker');
+ if (tp_inst) {
+ var min = null,
+ max = null,
+ onselect = null,
+ overrides = tp_inst._defaults.evnts,
+ fns = {},
+ prop;
+ if (typeof name == 'string') { // if min/max was set with the string
+ if (name === 'minDate' || name === 'minDateTime') {
+ min = value;
+ } else if (name === 'maxDate' || name === 'maxDateTime') {
+ max = value;
+ } else if (name === 'onSelect') {
+ onselect = value;
+ } else if (overrides.hasOwnProperty(name)) {
+ if (typeof (value) === 'undefined') {
+ return overrides[name];
+ }
+ fns[name] = value;
+ name_clone = {}; //empty results in exiting function after overrides updated
+ }
+ } else if (typeof name == 'object') { //if min/max was set with the JSON
+ if (name.minDate) {
+ min = name.minDate;
+ } else if (name.minDateTime) {
+ min = name.minDateTime;
+ } else if (name.maxDate) {
+ max = name.maxDate;
+ } else if (name.maxDateTime) {
+ max = name.maxDateTime;
+ }
+ for (prop in overrides) {
+ if (overrides.hasOwnProperty(prop) && name[prop]) {
+ fns[prop] = name[prop];
+ }
+ }
+ }
+ for (prop in fns) {
+ if (fns.hasOwnProperty(prop)) {
+ overrides[prop] = fns[prop];
+ if (!name_clone) { name_clone = $.extend({}, name);}
+ delete name_clone[prop];
+ }
+ }
+ if (name_clone && isEmptyObject(name_clone)) { return; }
+ if (min) { //if min was set
+ if (min === 0) {
+ min = new Date();
+ } else {
+ min = new Date(min);
+ }
+ tp_inst._defaults.minDate = min;
+ tp_inst._defaults.minDateTime = min;
+ } else if (max) { //if max was set
+ if (max === 0) {
+ max = new Date();
+ } else {
+ max = new Date(max);
+ }
+ tp_inst._defaults.maxDate = max;
+ tp_inst._defaults.maxDateTime = max;
+ } else if (onselect) {
+ tp_inst._defaults.onSelect = onselect;
+ }
+ }
+ if (value === undefined) {
+ return this._base_optionDatepicker.call($.datepicker, target, name);
+ }
+ return this._base_optionDatepicker.call($.datepicker, target, name_clone || name, value);
+ };
+
+ /*
+ * jQuery isEmptyObject does not check hasOwnProperty - if someone has added to the object prototype,
+ * it will return false for all objects
+ */
+ var isEmptyObject = function(obj) {
+ var prop;
+ for (prop in obj) {
+ if (obj.hasOwnProperty(obj)) {
+ return false;
+ }
+ }
+ return true;
+ };
+
+ /*
+ * jQuery extend now ignores nulls!
+ */
+ var extendRemove = function(target, props) {
+ $.extend(target, props);
+ for (var name in props) {
+ if (props[name] === null || props[name] === undefined) {
+ target[name] = props[name];
+ }
+ }
+ return target;
+ };
+
+ /*
+ * Determine by the time format which units are supported
+ * Returns an object of booleans for each unit
+ */
+ var detectSupport = function(timeFormat){
+ var tf = timeFormat.replace(/\'.*?\'/g,'').toLowerCase(), // removes literals
+ isIn = function(f, t){ // does the format contain the token?
+ return f.indexOf(t) !== -1? true:false;
+ };
+ return {
+ hour: isIn(tf,'h'),
+ minute: isIn(tf,'m'),
+ second: isIn(tf,'s'),
+ millisec: isIn(tf,'l'),
+ microsec: isIn(tf,'c'),
+ timezone: isIn(tf,'z'),
+ ampm: isIn(tf,'t') && isIn(timeFormat,'h'),
+ iso8601: isIn(timeFormat, 'Z')
+ };
+ };
+
+ /*
+ * Converts 24 hour format into 12 hour
+ * Returns 12 hour without leading 0
+ */
+ var convert24to12 = function(hour) {
+ if (hour > 12) {
+ hour = hour - 12;
+ }
+
+ if (hour === 0) {
+ hour = 12;
+ }
+
+ return String(hour);
+ };
+
+ /*
+ * Splits datetime string into date ans time substrings.
+ * Throws exception when date can't be parsed
+ * Returns [dateString, timeString]
+ */
+ var splitDateTime = function(dateFormat, dateTimeString, dateSettings, timeSettings) {
+ try {
+ // The idea is to get the number separator occurances in datetime and the time format requested (since time has
+ // fewer unknowns, mostly numbers and am/pm). We will use the time pattern to split.
+ var separator = timeSettings && timeSettings.separator ? timeSettings.separator : $.timepicker._defaults.separator,
+ format = timeSettings && timeSettings.timeFormat ? timeSettings.timeFormat : $.timepicker._defaults.timeFormat,
+ timeParts = format.split(separator), // how many occurances of separator may be in our format?
+ timePartsLen = timeParts.length,
+ allParts = dateTimeString.split(separator),
+ allPartsLen = allParts.length;
+
+ if (allPartsLen > 1) {
+ return [
+ allParts.splice(0,allPartsLen-timePartsLen).join(separator),
+ allParts.splice(0,timePartsLen).join(separator)
+ ];
+ }
+
+ } catch (err) {
+ $.timepicker.log('Could not split the date from the time. Please check the following datetimepicker options' +
+ "\nthrown error: " + err +
+ "\ndateTimeString" + dateTimeString +
+ "\ndateFormat = " + dateFormat +
+ "\nseparator = " + timeSettings.separator +
+ "\ntimeFormat = " + timeSettings.timeFormat);
+
+ if (err.indexOf(":") >= 0) {
+ // Hack! The error message ends with a colon, a space, and
+ // the "extra" characters. We rely on that instead of
+ // attempting to perfectly reproduce the parsing algorithm.
+ var dateStringLength = dateTimeString.length - (err.length - err.indexOf(':') - 2),
+ timeString = dateTimeString.substring(dateStringLength);
+
+ return [$.trim(dateTimeString.substring(0, dateStringLength)), $.trim(dateTimeString.substring(dateStringLength))];
+
+ } else {
+ throw err;
+ }
+ }
+ return [dateTimeString, ''];
+ };
+
+ /*
+ * Internal function to parse datetime interval
+ * Returns: {date: Date, timeObj: Object}, where
+ * date - parsed date without time (type Date)
+ * timeObj = {hour: , minute: , second: , millisec: , microsec: } - parsed time. Optional
+ */
+ var parseDateTimeInternal = function(dateFormat, timeFormat, dateTimeString, dateSettings, timeSettings) {
+ var date;
+ var splitRes = splitDateTime(dateFormat, dateTimeString, dateSettings, timeSettings);
+ date = $.datepicker._base_parseDate(dateFormat, splitRes[0], dateSettings);
+ if (splitRes[1] !== '') {
+ var timeString = splitRes[1],
+ parsedTime = $.datepicker.parseTime(timeFormat, timeString, timeSettings);
+
+ if (parsedTime === null) {
+ throw 'Wrong time format';
+ }
+ return {
+ date: date,
+ timeObj: parsedTime
+ };
+ } else {
+ return {
+ date: date
+ };
+ }
+ };
+
+ /*
+ * Internal function to set timezone_select to the local timezone
+ */
+ var selectLocalTimezone = function(tp_inst, date) {
+ if (tp_inst && tp_inst.timezone_select) {
+ var now = typeof date !== 'undefined' ? date : new Date();
+ tp_inst.timezone_select.val(now.getTimezoneOffset()*-1);
+ }
+ };
+
+ /*
+ * Create a Singleton Insance
+ */
+ $.timepicker = new Timepicker();
+
+ /**
+ * Get the timezone offset as string from a date object (eg '+0530' for UTC+5.5)
+ * @param number if not a number this value is returned
+ * @param boolean if true formats in accordance to iso8601 "+12:45"
+ * @return string
+ */
+ $.timepicker.timezoneOffsetString = function(tzMinutes, iso8601) {
+ if(isNaN(tzMinutes) || tzMinutes > 840){
+ return tzMinutes;
+ }
+
+ var off = tzMinutes,
+ minutes = off % 60,
+ hours = (off - minutes) / 60,
+ iso = iso8601? ':':'',
+ tz = (off >= 0 ? '+' : '-') + ('0' + (hours * 101).toString()).slice(-2) + iso + ('0' + (minutes * 101).toString()).slice(-2);
+
+ if(tz == '+00:00'){
+ return 'Z';
+ }
+ return tz;
+ };
+
+ /**
+ * Get the number in minutes that represents a timezone string
+ * @param string formated like "+0500", "-1245"
+ * @return number
+ */
+ $.timepicker.timezoneOffsetNumber = function(tzString) {
+ tzString = tzString.toString().replace(':',''); // excuse any iso8601, end up with "+1245"
+
+ if(tzString.toUpperCase() === 'Z'){ // if iso8601 with Z, its 0 minute offset
+ return 0;
+ }
+
+ if(!/^(\-|\+)\d{4}$/.test(tzString)){ // possibly a user defined tz, so just give it back
+ return tzString;
+ }
+
+ return ((tzString.substr(0,1) =='-'? -1 : 1) * // plus or minus
+ ((parseInt(tzString.substr(1,2),10)*60) + // hours (converted to minutes)
+ parseInt(tzString.substr(3,2),10))); // minutes
+ };
+
+ /**
+ * No way to set timezone in js Date, so we must adjust the minutes to compensate. (think setDate, getDate)
+ * @param date
+ * @param string formated like "+0500", "-1245"
+ * @return date
+ */
+ $.timepicker.timezoneAdjust = function(date, toTimezone) {
+ var toTz = $.timepicker.timezoneOffsetNumber(toTimezone);
+ if(!isNaN(toTz)){
+ date.setMinutes(date.getMinutes()*1 + (date.getTimezoneOffset()*-1 - toTz*1) );
+ }
+ return date;
+ };
+
+ /**
+ * Calls `timepicker()` on the `startTime` and `endTime` elements, and configures them to
+ * enforce date range limits.
+ * n.b. The input value must be correctly formatted (reformatting is not supported)
+ * @param Element startTime
+ * @param Element endTime
+ * @param obj options Options for the timepicker() call
+ * @return jQuery
+ */
+ $.timepicker.timeRange = function(startTime, endTime, options) {
+ return $.timepicker.handleRange('timepicker', startTime, endTime, options);
+ };
+
+ /**
+ * Calls `datetimepicker` on the `startTime` and `endTime` elements, and configures them to
+ * enforce date range limits.
+ * @param Element startTime
+ * @param Element endTime
+ * @param obj options Options for the `timepicker()` call. Also supports `reformat`,
+ * a boolean value that can be used to reformat the input values to the `dateFormat`.
+ * @param string method Can be used to specify the type of picker to be added
+ * @return jQuery
+ */
+ $.timepicker.datetimeRange = function(startTime, endTime, options) {
+ $.timepicker.handleRange('datetimepicker', startTime, endTime, options);
+ };
+
+ /**
+ * Calls `method` on the `startTime` and `endTime` elements, and configures them to
+ * enforce date range limits.
+ * @param Element startTime
+ * @param Element endTime
+ * @param obj options Options for the `timepicker()` call. Also supports `reformat`,
+ * a boolean value that can be used to reformat the input values to the `dateFormat`.
+ * @return jQuery
+ */
+ $.timepicker.dateRange = function(startTime, endTime, options) {
+ $.timepicker.handleRange('datepicker', startTime, endTime, options);
+ };
+
+ /**
+ * Calls `method` on the `startTime` and `endTime` elements, and configures them to
+ * enforce date range limits.
+ * @param string method Can be used to specify the type of picker to be added
+ * @param Element startTime
+ * @param Element endTime
+ * @param obj options Options for the `timepicker()` call. Also supports `reformat`,
+ * a boolean value that can be used to reformat the input values to the `dateFormat`.
+ * @return jQuery
+ */
+ $.timepicker.handleRange = function(method, startTime, endTime, options) {
+ options = $.extend({}, {
+ minInterval: 0, // min allowed interval in milliseconds
+ maxInterval: 0, // max allowed interval in milliseconds
+ start: {}, // options for start picker
+ end: {} // options for end picker
+ }, options);
+
+ $.fn[method].call(startTime, $.extend({
+ onClose: function(dateText, inst) {
+ checkDates($(this), endTime);
+ },
+ onSelect: function(selectedDateTime) {
+ selected($(this), endTime, 'minDate');
+ }
+ }, options, options.start));
+ $.fn[method].call(endTime, $.extend({
+ onClose: function(dateText, inst) {
+ checkDates($(this), startTime);
+ },
+ onSelect: function(selectedDateTime) {
+ selected($(this), startTime, 'maxDate');
+ }
+ }, options, options.end));
+
+ checkDates(startTime, endTime);
+ selected(startTime, endTime, 'minDate');
+ selected(endTime, startTime, 'maxDate');
+
+ function checkDates(changed, other) {
+ var startdt = startTime[method]('getDate'),
+ enddt = endTime[method]('getDate'),
+ changeddt = changed[method]('getDate');
+
+ if(startdt !== null){
+ var minDate = new Date(startdt.getTime()),
+ maxDate = new Date(startdt.getTime());
+
+ minDate.setMilliseconds(minDate.getMilliseconds() + options.minInterval);
+ maxDate.setMilliseconds(maxDate.getMilliseconds() + options.maxInterval);
+
+ if(options.minInterval > 0 && minDate > enddt){ // minInterval check
+ endTime[method]('setDate',minDate);
+ }
+ else if(options.maxInterval > 0 && maxDate < enddt){ // max interval check
+ endTime[method]('setDate',maxDate);
+ }
+ else if (startdt > enddt) {
+ other[method]('setDate',changeddt);
+ }
+ }
+ }
+
+ function selected(changed, other, option) {
+ if (!changed.val()) {
+ return;
+ }
+ var date = changed[method].call(changed, 'getDate');
+ if(date !== null && options.minInterval > 0){
+ if(option == 'minDate'){
+ date.setMilliseconds(date.getMilliseconds() + options.minInterval);
+ }
+ if(option == 'maxDate'){
+ date.setMilliseconds(date.getMilliseconds() - options.minInterval);
+ }
+ }
+ if (date.getTime) {
+ other[method].call(other, 'option', option, date);
+ }
+ }
+ return $([startTime.get(0), endTime.get(0)]);
+ };
+
+ /**
+ * Log error or data to the console during error or debugging
+ * @param Object err pass any type object to log to the console during error or debugging
+ * @return void
+ */
+ $.timepicker.log = function(err){
+ if(window.console){
+ console.log(err);
+ }
+ };
+
+ /*
+ * Microsecond support
+ */
+ if(!Date.prototype.getMicroseconds){
+ Date.prototype.microseconds = 0;
+ Date.prototype.getMicroseconds = function(){ return this.microseconds; };
+ Date.prototype.setMicroseconds = function(m){
+ this.setMilliseconds(this.getMilliseconds() + Math.floor(m/1000));
+ this.microseconds = m%1000;
+ return this;
+ };
+ }
+
+ /*
+ * Keep up with the version
+ */
+ $.timepicker.version = "1.3.1";
+
+})(jQuery);
diff --git a/mayor-orig/www/skin/classic/share/javascript/jquery-ui/jquery-ui.min.js b/mayor-orig/www/skin/classic/share/javascript/jquery-ui/jquery-ui.min.js
new file mode 100644
index 00000000..82bbb671
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/jquery-ui/jquery-ui.min.js
@@ -0,0 +1,12 @@
+/*! jQuery UI - v1.10.3 - 2013-05-03
+* http://jqueryui.com
+* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.effect.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js, jquery.ui.menu.js, jquery.ui.position.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js
+* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
+(function(t,e){function i(e,i){var n,o,a,r=e.nodeName.toLowerCase();return"area"===r?(n=e.parentNode,o=n.name,e.href&&o&&"map"===n.nodeName.toLowerCase()?(a=t("img[usemap=#"+o+"]")[0],!!a&&s(a)):!1):(/input|select|textarea|button|object/.test(r)?!e.disabled:"a"===r?e.href||i:i)&&s(e)}function s(e){return t.expr.filters.visible(e)&&!t(e).parents().addBack().filter(function(){return"hidden"===t.css(this,"visibility")}).length}var n=0,o=/^ui-id-\d+$/;t.ui=t.ui||{},t.extend(t.ui,{version:"1.10.3",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),t.fn.extend({focus:function(e){return function(i,s){return"number"==typeof i?this.each(function(){var e=this;setTimeout(function(){t(e).focus(),s&&s.call(e)},i)}):e.apply(this,arguments)}}(t.fn.focus),scrollParent:function(){var e;return e=t.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(t.css(this,"position"))&&/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!e.length?t(document):e},zIndex:function(i){if(i!==e)return this.css("zIndex",i);if(this.length)for(var s,n,o=t(this[0]);o.length&&o[0]!==document;){if(s=o.css("position"),("absolute"===s||"relative"===s||"fixed"===s)&&(n=parseInt(o.css("zIndex"),10),!isNaN(n)&&0!==n))return n;o=o.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++n)})},removeUniqueId:function(){return this.each(function(){o.test(this.id)&&t(this).removeAttr("id")})}}),t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])},focusable:function(e){return i(e,!isNaN(t.attr(e,"tabindex")))},tabbable:function(e){var s=t.attr(e,"tabindex"),n=isNaN(s);return(n||s>=0)&&i(e,!n)}}),t("<a>").outerWidth(1).jquery||t.each(["Width","Height"],function(i,s){function n(e,i,s,n){return t.each(o,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),n&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var o="Width"===s?["Left","Right"]:["Top","Bottom"],a=s.toLowerCase(),r={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+s]=function(i){return i===e?r["inner"+s].call(this):this.each(function(){t(this).css(a,n(this,i)+"px")})},t.fn["outer"+s]=function(e,i){return"number"!=typeof e?r["outer"+s].call(this,e):this.each(function(){t(this).css(a,n(this,e,!0,i)+"px")})}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(t.fn.removeData=function(e){return function(i){return arguments.length?e.call(this,t.camelCase(i)):e.call(this)}}(t.fn.removeData)),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),t.support.selectstart="onselectstart"in document.createElement("div"),t.fn.extend({disableSelection:function(){return this.bind((t.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(t){t.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),t.extend(t.ui,{plugin:{add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i){var s,n=t.plugins[e];if(n&&t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType)for(s=0;n.length>s;s++)t.options[n[s][0]]&&n[s][1].apply(t.element,i)}},hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return e[s]>0?!0:(e[s]=1,n=e[s]>0,e[s]=0,n)}})})(jQuery),function(t,e){var i=0,s=Array.prototype.slice,n=t.cleanData;t.cleanData=function(e){for(var i,s=0;null!=(i=e[s]);s++)try{t(i).triggerHandler("remove")}catch(o){}n(e)},t.widget=function(i,s,n){var o,a,r,h,l={},c=i.split(".")[0];i=i.split(".")[1],o=c+"-"+i,n||(n=s,s=t.Widget),t.expr[":"][o.toLowerCase()]=function(e){return!!t.data(e,o)},t[c]=t[c]||{},a=t[c][i],r=t[c][i]=function(t,i){return this._createWidget?(arguments.length&&this._createWidget(t,i),e):new r(t,i)},t.extend(r,a,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),h=new s,h.options=t.widget.extend({},h.options),t.each(n,function(i,n){return t.isFunction(n)?(l[i]=function(){var t=function(){return s.prototype[i].apply(this,arguments)},e=function(t){return s.prototype[i].apply(this,t)};return function(){var i,s=this._super,o=this._superApply;return this._super=t,this._superApply=e,i=n.apply(this,arguments),this._super=s,this._superApply=o,i}}(),e):(l[i]=n,e)}),r.prototype=t.widget.extend(h,{widgetEventPrefix:a?h.widgetEventPrefix:i},l,{constructor:r,namespace:c,widgetName:i,widgetFullName:o}),a?(t.each(a._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,r,i._proto)}),delete a._childConstructors):s._childConstructors.push(r),t.widget.bridge(i,r)},t.widget.extend=function(i){for(var n,o,a=s.call(arguments,1),r=0,h=a.length;h>r;r++)for(n in a[r])o=a[r][n],a[r].hasOwnProperty(n)&&o!==e&&(i[n]=t.isPlainObject(o)?t.isPlainObject(i[n])?t.widget.extend({},i[n],o):t.widget.extend({},o):o);return i},t.widget.bridge=function(i,n){var o=n.prototype.widgetFullName||i;t.fn[i]=function(a){var r="string"==typeof a,h=s.call(arguments,1),l=this;return a=!r&&h.length?t.widget.extend.apply(null,[a].concat(h)):a,r?this.each(function(){var s,n=t.data(this,o);return n?t.isFunction(n[a])&&"_"!==a.charAt(0)?(s=n[a].apply(n,h),s!==n&&s!==e?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):e):t.error("no such method '"+a+"' for "+i+" widget instance"):t.error("cannot call methods on "+i+" prior to initialization; "+"attempted to call method '"+a+"'")}):this.each(function(){var e=t.data(this,o);e?e.option(a||{})._init():t.data(this,o,new n(a,this))}),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this.bindings=t(),this.hoverable=t(),this.focusable=t(),s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(i,s){var n,o,a,r=i;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof i)if(r={},n=i.split("."),i=n.shift(),n.length){for(o=r[i]=t.widget.extend({},this.options[i]),a=0;n.length-1>a;a++)o[n[a]]=o[n[a]]||{},o=o[n[a]];if(i=n.pop(),s===e)return o[i]===e?null:o[i];o[i]=s}else{if(s===e)return this.options[i]===e?null:this.options[i];r[i]=s}return this._setOptions(r),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!e).attr("aria-disabled",e),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,s,n){var o,a=this;"boolean"!=typeof i&&(n=s,s=i,i=!1),n?(s=o=t(s),this.bindings=this.bindings.add(s)):(n=s,s=this.element,o=this.widget()),t.each(n,function(n,r){function h(){return i||a.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof r?a[r]:r).apply(a,arguments):e}"string"!=typeof r&&(h.guid=r.guid=r.guid||h.guid||t.guid++);var l=n.match(/^(\w+)\s*(.*)$/),c=l[1]+a.eventNamespace,u=l[2];u?o.delegate(u,c,h):s.bind(c,h)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(e).undelegate(e)},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}})}(jQuery),function(t){var e=!1;t(document).mouseup(function(){e=!1}),t.widget("ui.mouse",{version:"1.10.3",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.bind("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).bind("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):undefined}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!e){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var s=this,n=1===i.which,o="string"==typeof this.options.cancel&&i.target.nodeName?t(i.target).closest(this.options.cancel).length:!1;return n&&!o&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){s.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===t.data(i.target,this.widgetName+".preventClickEvent")&&t.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return s._mouseMove(t)},this._mouseUpDelegate=function(t){return s._mouseUp(t)},t(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),e=!0,!0)):!0}},_mouseMove:function(e){return t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button?this._mouseUp(e):this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),!1},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}(jQuery),function(t){t.widget("ui.draggable",t.ui.mouse,{version:"1.10.3",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"!==this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(e){var i=this.options;return this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(e),this.handle?(t(i.iframeFix===!0?"iframe":i.iframeFix).each(function(){t("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(t(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offsetParent=this.helper.offsetParent(),this.offsetParentCssPosition=this.offsetParent.css("position"),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_mouseDrag:function(e,i){if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",e,s)===!1)return this._mouseUp({}),!1;this.position=s.position}return this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.dropped,this.dropped=!1),"original"!==this.options.helper||t.contains(this.element[0].ownerDocument,this.element[0])?("invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",e)!==!1&&i._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1):!1},_mouseUp:function(e){return t("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(e){return this.options.handle?!!t(e.target).closest(this.element.find(this.options.handle)).length:!0},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return s.parents("body").length||s.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.element.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;return n.containment?"window"===n.containment?(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):"document"===n.containment?(this.containment=[0,0,t(document).width()-this.helperProportions.width-this.margins.left,(t(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):n.containment.constructor===Array?(this.containment=n.containment,undefined):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=t(n.containment),s=i[0],s&&(e="hidden"!==i.css("overflow"),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=i),undefined):(this.containment=null,undefined)},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent;return this.offset.scroll||(this.offset.scroll={top:n.scrollTop(),left:n.scrollLeft()}),{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top)*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)*s}},_generatePosition:function(e){var i,s,n,o,a=this.options,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=e.pageX,l=e.pageY;return this.offset.scroll||(this.offset.scroll={top:r.scrollTop(),left:r.scrollLeft()}),this.originalPosition&&(this.containment&&(this.relative_container?(s=this.relative_container.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,e.pageX-this.offset.click.left<i[0]&&(h=i[0]+this.offset.click.left),e.pageY-this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),e.pageX-this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),e.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),a.grid&&(n=a.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,l=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-a.grid[1]:n+a.grid[1]:n,o=a.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,h=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-a.grid[0]:o+a.grid[0]:o)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s]),"drag"===e&&(this.positionAbs=this._convertPositionTo("absolute")),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i){var s=t(this).data("ui-draggable"),n=s.options,o=t.extend({},i,{item:s.element});s.sortables=[],t(n.connectToSortable).each(function(){var i=t.data(this,"ui-sortable");i&&!i.options.disabled&&(s.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger("activate",e,o))})},stop:function(e,i){var s=t(this).data("ui-draggable"),n=t.extend({},i,{item:s.element});t.each(s.sortables,function(){this.instance.isOver?(this.instance.isOver=0,s.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(e),this.instance.options.helper=this.instance.options._helper,"original"===s.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",e,n))})},drag:function(e,i){var s=t(this).data("ui-draggable"),n=this;t.each(s.sortables,function(){var o=!1,a=this;this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(o=!0,t.each(s.sortables,function(){return this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this!==a&&this.instance._intersectsWith(this.instance.containerCache)&&t.contains(a.instance.element[0],this.instance.element[0])&&(o=!1),o})),o?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=t(n).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},e.target=this.instance.currentItem[0],this.instance._mouseCapture(e,!0),this.instance._mouseStart(e,!0,!0),this.instance.offset.click.top=s.offset.click.top,this.instance.offset.click.left=s.offset.click.left,this.instance.offset.parent.left-=s.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=s.offset.parent.top-this.instance.offset.parent.top,s._trigger("toSortable",e),s.dropped=this.instance.element,s.currentItem=s.element,this.instance.fromOutside=s),this.instance.currentItem&&this.instance._mouseDrag(e)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",e,this.instance._uiHash(this.instance)),this.instance._mouseStop(e,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),s._trigger("fromSortable",e),s.dropped=!1)})}}),t.ui.plugin.add("draggable","cursor",{start:function(){var e=t("body"),i=t(this).data("ui-draggable").options;e.css("cursor")&&(i._cursor=e.css("cursor")),e.css("cursor",i.cursor)},stop:function(){var e=t(this).data("ui-draggable").options;e._cursor&&t("body").css("cursor",e._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i){var s=t(i.helper),n=t(this).data("ui-draggable").options;s.css("opacity")&&(n._opacity=s.css("opacity")),s.css("opacity",n.opacity)},stop:function(e,i){var s=t(this).data("ui-draggable").options;s._opacity&&t(i.helper).css("opacity",s._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(){var e=t(this).data("ui-draggable");e.scrollParent[0]!==document&&"HTML"!==e.scrollParent[0].tagName&&(e.overflowOffset=e.scrollParent.offset())},drag:function(e){var i=t(this).data("ui-draggable"),s=i.options,n=!1;i.scrollParent[0]!==document&&"HTML"!==i.scrollParent[0].tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+i.scrollParent[0].offsetHeight-e.pageY<s.scrollSensitivity?i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop+s.scrollSpeed:e.pageY-i.overflowOffset.top<s.scrollSensitivity&&(i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||(i.overflowOffset.left+i.scrollParent[0].offsetWidth-e.pageX<s.scrollSensitivity?i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft+s.scrollSpeed:e.pageX-i.overflowOffset.left<s.scrollSensitivity&&(i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(e.pageY-t(document).scrollTop()<s.scrollSensitivity?n=t(document).scrollTop(t(document).scrollTop()-s.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<s.scrollSensitivity&&(n=t(document).scrollTop(t(document).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(e.pageX-t(document).scrollLeft()<s.scrollSensitivity?n=t(document).scrollLeft(t(document).scrollLeft()-s.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<s.scrollSensitivity&&(n=t(document).scrollLeft(t(document).scrollLeft()+s.scrollSpeed)))),n!==!1&&t.ui.ddmanager&&!s.dropBehaviour&&t.ui.ddmanager.prepareOffsets(i,e)}}),t.ui.plugin.add("draggable","snap",{start:function(){var e=t(this).data("ui-draggable"),i=e.options;e.snapElements=[],t(i.snap.constructor!==String?i.snap.items||":data(ui-draggable)":i.snap).each(function(){var i=t(this),s=i.offset();this!==e.element[0]&&e.snapElements.push({item:this,width:i.outerWidth(),height:i.outerHeight(),top:s.top,left:s.left})})},drag:function(e,i){var s,n,o,a,r,h,l,c,u,d,p=t(this).data("ui-draggable"),f=p.options,g=f.snapTolerance,m=i.offset.left,v=m+p.helperProportions.width,_=i.offset.top,b=_+p.helperProportions.height;for(u=p.snapElements.length-1;u>=0;u--)r=p.snapElements[u].left,h=r+p.snapElements[u].width,l=p.snapElements[u].top,c=l+p.snapElements[u].height,r-g>v||m>h+g||l-g>b||_>c+g||!t.contains(p.snapElements[u].item.ownerDocument,p.snapElements[u].item)?(p.snapElements[u].snapping&&p.options.snap.release&&p.options.snap.release.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapElements[u].item})),p.snapElements[u].snapping=!1):("inner"!==f.snapMode&&(s=g>=Math.abs(l-b),n=g>=Math.abs(c-_),o=g>=Math.abs(r-v),a=g>=Math.abs(h-m),s&&(i.position.top=p._convertPositionTo("relative",{top:l-p.helperProportions.height,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:c,left:0}).top-p.margins.top),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r-p.helperProportions.width}).left-p.margins.left),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:h}).left-p.margins.left)),d=s||n||o||a,"outer"!==f.snapMode&&(s=g>=Math.abs(l-_),n=g>=Math.abs(c-b),o=g>=Math.abs(r-m),a=g>=Math.abs(h-v),s&&(i.position.top=p._convertPositionTo("relative",{top:l,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:c-p.helperProportions.height,left:0}).top-p.margins.top),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r}).left-p.margins.left),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:h-p.helperProportions.width}).left-p.margins.left)),!p.snapElements[u].snapping&&(s||n||o||a||d)&&p.options.snap.snap&&p.options.snap.snap.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapElements[u].item})),p.snapElements[u].snapping=s||n||o||a||d)}}),t.ui.plugin.add("draggable","stack",{start:function(){var e,i=this.data("ui-draggable").options,s=t.makeArray(t(i.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});s.length&&(e=parseInt(t(s[0]).css("zIndex"),10)||0,t(s).each(function(i){t(this).css("zIndex",e+i)}),this.css("zIndex",e+s.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i){var s=t(i.helper),n=t(this).data("ui-draggable").options;s.css("zIndex")&&(n._zIndex=s.css("zIndex")),s.css("zIndex",n.zIndex)},stop:function(e,i){var s=t(this).data("ui-draggable").options;s._zIndex&&t(i.helper).css("zIndex",s._zIndex)}})}(jQuery),function(t){function e(t,e,i){return t>e&&e+i>t}t.widget("ui.droppable",{version:"1.10.3",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e=this.options,i=e.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(i)?i:function(t){return t.is(i)
+},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},t.ui.ddmanager.droppables[e.scope]=t.ui.ddmanager.droppables[e.scope]||[],t.ui.ddmanager.droppables[e.scope].push(this),e.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var e=0,i=t.ui.ddmanager.droppables[this.options.scope];i.length>e;e++)i[e]===this&&i.splice(e,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(e,i){"accept"===e&&(this.accept=t.isFunction(i)?i:function(t){return t.is(i)}),t.Widget.prototype._setOption.apply(this,arguments)},_activate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var s=i||t.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var e=t.data(this,"ui-droppable");return e.options.greedy&&!e.options.disabled&&e.options.scope===s.options.scope&&e.accept.call(e.element[0],s.currentItem||s.element)&&t.ui.intersect(s,t.extend(e,{offset:e.element.offset()}),e.options.tolerance)?(n=!0,!1):undefined}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",e,this.ui(s)),this.element):!1):!1},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}}}),t.ui.intersect=function(t,i,s){if(!i.offset)return!1;var n,o,a=(t.positionAbs||t.position.absolute).left,r=a+t.helperProportions.width,h=(t.positionAbs||t.position.absolute).top,l=h+t.helperProportions.height,c=i.offset.left,u=c+i.proportions.width,d=i.offset.top,p=d+i.proportions.height;switch(s){case"fit":return a>=c&&u>=r&&h>=d&&p>=l;case"intersect":return a+t.helperProportions.width/2>c&&u>r-t.helperProportions.width/2&&h+t.helperProportions.height/2>d&&p>l-t.helperProportions.height/2;case"pointer":return n=(t.positionAbs||t.position.absolute).left+(t.clickOffset||t.offset.click).left,o=(t.positionAbs||t.position.absolute).top+(t.clickOffset||t.offset.click).top,e(o,d,i.proportions.height)&&e(n,c,i.proportions.width);case"touch":return(h>=d&&p>=h||l>=d&&p>=l||d>h&&l>p)&&(a>=c&&u>=a||r>=c&&u>=r||c>a&&r>u);default:return!1}},t.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,i){var s,n,o=t.ui.ddmanager.droppables[e.options.scope]||[],a=i?i.type:null,r=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(s=0;o.length>s;s++)if(!(o[s].options.disabled||e&&!o[s].accept.call(o[s].element[0],e.currentItem||e.element))){for(n=0;r.length>n;n++)if(r[n]===o[s].element[0]){o[s].proportions.height=0;continue t}o[s].visible="none"!==o[s].element.css("display"),o[s].visible&&("mousedown"===a&&o[s]._activate.call(o[s],i),o[s].offset=o[s].element.offset(),o[s].proportions={width:o[s].element[0].offsetWidth,height:o[s].element[0].offsetHeight})}},drop:function(e,i){var s=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&t.ui.intersect(e,this,this.options.tolerance)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(e,i){e.element.parentsUntil("body").bind("scroll.droppable",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)})},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,o,a=t.ui.intersect(e,this,this.options.tolerance),r=!a&&this.isover?"isout":a&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,o=this.element.parents(":data(ui-droppable)").filter(function(){return t.data(this,"ui-droppable").options.scope===n}),o.length&&(s=t.data(o[0],"ui-droppable"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(e,i){e.element.parentsUntil("body").unbind("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}}}(jQuery),function(t){function e(t){return parseInt(t,10)||0}function i(t){return!isNaN(parseInt(t,10))}t.widget("ui.resizable",t.ui.mouse,{version:"1.10.3",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_create:function(){var e,i,s,n,o,a=this,r=this.options;if(this.element.addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!r.aspectRatio,aspectRatio:r.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:r.helper||r.ghost||r.animate?r.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(t("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.data("ui-resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=r.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),e=this.handles.split(","),this.handles={},i=0;e.length>i;i++)s=t.trim(e[i]),o="ui-resizable-"+s,n=t("<div class='ui-resizable-handle "+o+"'></div>"),n.css({zIndex:r.zIndex}),"se"===s&&n.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(n);this._renderAxis=function(e){var i,s,n,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String&&(this.handles[i]=t(this.handles[i],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,o),this._proportionallyResize()),t(this.handles[i]).length},this._renderAxis(this.element),this._handles=t(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){a.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),a.axis=n&&n[1]?n[1]:"se")}),r.autoHide&&(this._handles.hide(),t(this.element).addClass("ui-resizable-autohide").mouseenter(function(){r.disabled||(t(this).removeClass("ui-resizable-autohide"),a._handles.show())}).mouseleave(function(){r.disabled||a.resizing||(t(this).addClass("ui-resizable-autohide"),a._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(i){var s,n,o,a=this.options,r=this.element.position(),h=this.element;return this.resizing=!0,/absolute/.test(h.css("position"))?h.css({position:"absolute",top:h.css("top"),left:h.css("left")}):h.is(".ui-draggable")&&h.css({position:"absolute",top:r.top,left:r.left}),this._renderProxy(),s=e(this.helper.css("left")),n=e(this.helper.css("top")),a.containment&&(s+=t(a.containment).scrollLeft()||0,n+=t(a.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:s,top:n},this.size=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.originalSize=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.originalPosition={left:s,top:n},this.sizeDiff={width:h.outerWidth()-h.width(),height:h.outerHeight()-h.height()},this.originalMousePosition={left:i.pageX,top:i.pageY},this.aspectRatio="number"==typeof a.aspectRatio?a.aspectRatio:this.originalSize.width/this.originalSize.height||1,o=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===o?this.axis+"-resize":o),h.addClass("ui-resizable-resizing"),this._propagate("start",i),!0},_mouseDrag:function(e){var i,s=this.helper,n={},o=this.originalMousePosition,a=this.axis,r=this.position.top,h=this.position.left,l=this.size.width,c=this.size.height,u=e.pageX-o.left||0,d=e.pageY-o.top||0,p=this._change[a];return p?(i=p.apply(this,[e,u,d]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),this.position.top!==r&&(n.top=this.position.top+"px"),this.position.left!==h&&(n.left=this.position.left+"px"),this.size.width!==l&&(n.width=this.size.width+"px"),this.size.height!==c&&(n.height=this.size.height+"px"),s.css(n),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(n)||this._trigger("resize",e,this.ui()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,a,r,h,l=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&t.ui.hasScroll(i[0],"left")?0:c.sizeDiff.height,o=s?0:c.sizeDiff.width,a={width:c.helper.width()-o,height:c.helper.height()-n},r=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null,h=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(a,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(t){var e,s,n,o,a,r=this.options;a={minWidth:i(r.minWidth)?r.minWidth:0,maxWidth:i(r.maxWidth)?r.maxWidth:1/0,minHeight:i(r.minHeight)?r.minHeight:0,maxHeight:i(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||t)&&(e=a.minHeight*this.aspectRatio,n=a.minWidth/this.aspectRatio,s=a.maxHeight*this.aspectRatio,o=a.maxWidth/this.aspectRatio,e>a.minWidth&&(a.minWidth=e),n>a.minHeight&&(a.minHeight=n),a.maxWidth>s&&(a.maxWidth=s),a.maxHeight>o&&(a.maxHeight=o)),this._vBoundaries=a},_updateCache:function(t){this.offset=this.helper.offset(),i(t.left)&&(this.position.left=t.left),i(t.top)&&(this.position.top=t.top),i(t.height)&&(this.size.height=t.height),i(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,s=this.size,n=this.axis;return i(t.height)?t.width=t.height*this.aspectRatio:i(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===n&&(t.left=e.left+(s.width-t.width),t.top=null),"nw"===n&&(t.top=e.top+(s.height-t.height),t.left=e.left+(s.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,s=this.axis,n=i(t.width)&&e.maxWidth&&e.maxWidth<t.width,o=i(t.height)&&e.maxHeight&&e.maxHeight<t.height,a=i(t.width)&&e.minWidth&&e.minWidth>t.width,r=i(t.height)&&e.minHeight&&e.minHeight>t.height,h=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,c=/sw|nw|w/.test(s),u=/nw|ne|n/.test(s);return a&&(t.width=e.minWidth),r&&(t.height=e.minHeight),n&&(t.width=e.maxWidth),o&&(t.height=e.maxHeight),a&&c&&(t.left=h-e.minWidth),n&&c&&(t.left=h-e.maxWidth),r&&u&&(t.top=l-e.minHeight),o&&u&&(t.top=l-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var t,e,i,s,n,o=this.helper||this.element;for(t=0;this._proportionallyResizeElements.length>t;t++){if(n=this._proportionallyResizeElements[t],!this.borderDif)for(this.borderDif=[],i=[n.css("borderTopWidth"),n.css("borderRightWidth"),n.css("borderBottomWidth"),n.css("borderLeftWidth")],s=[n.css("paddingTop"),n.css("paddingRight"),n.css("paddingBottom"),n.css("paddingLeft")],e=0;i.length>e;e++)this.borderDif[e]=(parseInt(i[e],10)||0)+(parseInt(s[e],10)||0);n.css({height:o.height()-this.borderDif[0]-this.borderDif[2]||0,width:o.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).data("ui-resizable"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),a=o&&t.ui.hasScroll(n[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-a},l=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,c=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var i,s,n,o,a,r,h,l=t(this).data("ui-resizable"),c=l.options,u=l.element,d=c.containment,p=d instanceof t?d.get(0):/parent/.test(d)?u.parent().get(0):d;p&&(l.containerElement=t(p),/document/.test(d)||d===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(i=t(p),s=[],t(["Top","Right","Left","Bottom"]).each(function(t,n){s[t]=e(i.css("padding"+n))}),l.containerOffset=i.offset(),l.containerPosition=i.position(),l.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},n=l.containerOffset,o=l.containerSize.height,a=l.containerSize.width,r=t.ui.hasScroll(p,"left")?p.scrollWidth:a,h=t.ui.hasScroll(p)?p.scrollHeight:o,l.parentData={element:p,left:n.left,top:n.top,width:r,height:h}))},resize:function(e){var i,s,n,o,a=t(this).data("ui-resizable"),r=a.options,h=a.containerOffset,l=a.position,c=a._aspectRatio||e.shiftKey,u={top:0,left:0},d=a.containerElement;d[0]!==document&&/static/.test(d.css("position"))&&(u=h),l.left<(a._helper?h.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-h.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectRatio),a.position.left=r.helper?h.left:0),l.top<(a._helper?h.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-h.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio),a.position.top=a._helper?h.top:0),a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top,i=Math.abs((a._helper?a.offset.left-u.left:a.offset.left-u.left)+a.sizeDiff.width),s=Math.abs((a._helper?a.offset.top-u.top:a.offset.top-h.top)+a.sizeDiff.height),n=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),n&&o&&(i-=a.parentData.left),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio)),s+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-s,c&&(a.size.width=a.size.height*a.aspectRatio))},stop:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,a=t(e.helper),r=a.offset(),h=a.outerWidth()-e.sizeDiff.width,l=a.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,s=function(e){t(e).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseInt(e.width(),10),height:parseInt(e.height(),10),left:parseInt(e.css("left"),10),top:parseInt(e.css("top"),10)})})};"object"!=typeof i.alsoResize||i.alsoResize.parentNode?s(i.alsoResize):i.alsoResize.length?(i.alsoResize=i.alsoResize[0],s(i.alsoResize)):t.each(i.alsoResize,function(t){s(t)})},resize:function(e,i){var s=t(this).data("ui-resizable"),n=s.options,o=s.originalSize,a=s.originalPosition,r={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-a.top||0,left:s.position.left-a.left||0},h=function(e,s){t(e).each(function(){var e=t(this),n=t(this).data("ui-resizable-alsoresize"),o={},a=s&&s.length?s:e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(a,function(t,e){var i=(n[e]||0)+(r[e]||0);i&&i>=0&&(o[e]=i||null)}),e.css(o)})};"object"!=typeof n.alsoResize||n.alsoResize.nodeType?h(n.alsoResize):t.each(n.alsoResize,function(t,e){h(t,e)})},stop:function(){t(this).removeData("resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).data("ui-resizable");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).data("ui-resizable");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.size,n=e.originalSize,o=e.originalPosition,a=e.axis,r="number"==typeof i.grid?[i.grid,i.grid]:i.grid,h=r[0]||1,l=r[1]||1,c=Math.round((s.width-n.width)/h)*h,u=Math.round((s.height-n.height)/l)*l,d=n.width+c,p=n.height+u,f=i.maxWidth&&d>i.maxWidth,g=i.maxHeight&&p>i.maxHeight,m=i.minWidth&&i.minWidth>d,v=i.minHeight&&i.minHeight>p;i.grid=r,m&&(d+=h),v&&(p+=l),f&&(d-=h),g&&(p-=l),/^(se|s|e)$/.test(a)?(e.size.width=d,e.size.height=p):/^(ne)$/.test(a)?(e.size.width=d,e.size.height=p,e.position.top=o.top-u):/^(sw)$/.test(a)?(e.size.width=d,e.size.height=p,e.position.left=o.left-c):(e.size.width=d,e.size.height=p,e.position.top=o.top-u,e.position.left=o.left-c)}})}(jQuery),function(t){t.widget("ui.selectable",t.ui.mouse,{version:"1.10.3",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e,i=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e=t(i.options.filter,i.element[0]),e.addClass("ui-selectee"),e.each(function(){var e=t(this),i=e.offset();t.data(this,"selectable-item",{element:this,$element:e,left:i.left,top:i.top,right:i.left+e.outerWidth(),bottom:i.top+e.outerHeight(),startselected:!1,selected:e.hasClass("ui-selected"),selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=e.addClass("ui-selectee"),this._mouseInit(),this.helper=t("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(e){var i=this,s=this.options;this.opos=[e.pageX,e.pageY],this.options.disabled||(this.selectees=t(s.filter,this.element[0]),this._trigger("start",e),t(s.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=t.data(this,"selectable-item");s.startselected=!0,e.metaKey||e.ctrlKey||(s.$element.removeClass("ui-selected"),s.selected=!1,s.$element.addClass("ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",e,{unselecting:s.element}))}),t(e.target).parents().addBack().each(function(){var s,n=t.data(this,"selectable-item");return n?(s=!e.metaKey&&!e.ctrlKey||!n.$element.hasClass("ui-selected"),n.$element.removeClass(s?"ui-unselecting":"ui-selected").addClass(s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",e,{selecting:n.element}):i._trigger("unselecting",e,{unselecting:n.element}),!1):undefined}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,o=this.opos[0],a=this.opos[1],r=e.pageX,h=e.pageY;return o>r&&(i=r,r=o,o=i),a>h&&(i=h,h=a,a=i),this.helper.css({left:o,top:a,width:r-o,height:h-a}),this.selectees.each(function(){var i=t.data(this,"selectable-item"),l=!1;i&&i.element!==s.element[0]&&("touch"===n.tolerance?l=!(i.left>r||o>i.right||i.top>h||a>i.bottom):"fit"===n.tolerance&&(l=i.left>o&&r>i.right&&i.top>a&&h>i.bottom),l?(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,s._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addClass("ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",e,{unselecting:i.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");s.$element.removeClass("ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",e,{unselected:s.element})}),t(".ui-selecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");s.$element.removeClass("ui-selecting").addClass("ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",e,{selected:s.element})}),this._trigger("stop",e),this.helper.remove(),!1}})}(jQuery),function(t){function e(t,e,i){return t>e&&e+i>t}function i(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))}t.widget("ui.sortable",t.ui.mouse,{version:"1.10.3",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var t=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===t.axis||i(this.items[0].item):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_setOption:function(e,i){"disabled"===e?(this.options[e]=i,this.widget().toggleClass("ui-sortable-disabled",!!i)):t.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(e,i){var s=null,n=!1,o=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,o.widgetName+"-item")===o?(s=t(this),!1):undefined}),t.data(e.target,o.widgetName+"-item")===o&&(s=t(e.target)),s?!this.options.handle||i||(t(this.options.handle,s).find("*").addBack().each(function(){this===e.target&&(n=!0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(e,i,s){var n,o,a=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),a.containment&&this._setContainment(),a.cursor&&"auto"!==a.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",a.cursor),this.storedStylesheet=t("<style>*{ cursor: "+a.cursor+" !important; }</style>").appendTo(o)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,n,o,a=this.options,r=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<a.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+a.scrollSpeed:e.pageY-this.overflowOffset.top<a.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-a.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<a.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+a.scrollSpeed:e.pageX-this.overflowOffset.left<a.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-a.scrollSpeed)):(e.pageY-t(document).scrollTop()<a.scrollSensitivity?r=t(document).scrollTop(t(document).scrollTop()-a.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<a.scrollSensitivity&&(r=t(document).scrollTop(t(document).scrollTop()+a.scrollSpeed)),e.pageX-t(document).scrollLeft()<a.scrollSensitivity?r=t(document).scrollLeft(t(document).scrollLeft()-a.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<a.scrollSensitivity&&(r=t(document).scrollLeft(t(document).scrollLeft()+a.scrollSpeed))),r!==!1&&t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(s=this.items[i],n=s.item[0],o=this._intersectsWithPointer(s),o&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==n&&!t.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],n):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;
+this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),o=this.options.axis,a={};o&&"x"!==o||(a.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(a.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(a,parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=t.left,a=o+t.width,r=t.top,h=r+t.height,l=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||s+l>r&&h>s+l,d="y"===this.options.axis||e+c>o&&a>e+c,p=u&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:e+this.helperProportions.width/2>o&&a>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>n-this.helperProportions.height/2},_intersectsWithPointer:function(t){var i="x"===this.options.axis||e(this.positionAbs.top+this.offset.click.top,t.top,t.height),s="y"===this.options.axis||e(this.positionAbs.left+this.offset.click.left,t.left,t.width),n=i&&s,o=this._getDragVerticalDirection(),a=this._getDragHorizontalDirection();return n?this.floating?a&&"right"===a||"down"===o?2:1:o&&("down"===o?2:1):!1},_intersectsWithSides:function(t){var i=e(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),s=e(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),n=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return this.floating&&o?"right"===o&&s||"left"===o&&!s:n&&("down"===n&&i||"up"===n&&!i)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){var i,s,n,o,a=[],r=[],h=this._connectWith();if(h&&e)for(i=h.length-1;i>=0;i--)for(n=t(h[i]),s=n.length-1;s>=0;s--)o=t.data(n[s],this.widgetFullName),o&&o!==this&&!o.options.disabled&&r.push([t.isFunction(o.options.items)?o.options.items.call(o.element):t(o.options.items,o.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),o]);for(r.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),i=r.length-1;i>=0;i--)r[i][0].each(function(){a.push(this)});return t(a)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;e.length>i;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,n,o,a,r,h,l,c=this.items,u=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=t(d[i]),s=n.length-1;s>=0;s--)o=t.data(n[s],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(u.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=u.length-1;i>=0;i--)for(a=u[i][1],r=u[i][0],s=0,l=r.length;l>s;s++)h=t(r[s]),h.data(this.widgetName+"-item",a),c.push({item:h,instance:a,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,o;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=n.outerWidth(),s.height=n.outerHeight()),o=n.offset(),s.left=o.left,s.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)o=this.containers[i].element.offset(),this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var i,s=e.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),n=t("<"+s+">",e.document[0]).addClass(i||e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===s?e.currentItem.children().each(function(){t("<td>&#160;</td>",e.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(n)}):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_contactContainers:function(s){var n,o,a,r,h,l,c,u,d,p,f=null,g=null;for(n=this.containers.length-1;n>=0;n--)if(!t.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWith(this.containers[n].containerCache)){if(f&&t.contains(this.containers[n].element[0],f.element[0]))continue;f=this.containers[n],g=n}else this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",s,this._uiHash(this)),this.containers[n].containerCache.over=0);if(f)if(1===this.containers.length)this.containers[g].containerCache.over||(this.containers[g]._trigger("over",s,this._uiHash(this)),this.containers[g].containerCache.over=1);else{for(a=1e4,r=null,p=f.floating||i(this.currentItem),h=p?"left":"top",l=p?"width":"height",c=this.positionAbs[h]+this.offset.click[h],o=this.items.length-1;o>=0;o--)t.contains(this.containers[g].element[0],this.items[o].item[0])&&this.items[o].item[0]!==this.currentItem[0]&&(!p||e(this.positionAbs.top+this.offset.click.top,this.items[o].top,this.items[o].height))&&(u=this.items[o].item.offset()[h],d=!1,Math.abs(u-c)>Math.abs(u+this.items[o][l]-c)&&(d=!0,u+=this.items[o][l]),a>Math.abs(u-c)&&(a=Math.abs(u-c),r=this.items[o],this.direction=d?"up":"down"));if(!r&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[g])return;r?this._rearrange(s,r,null,!0):this._rearrange(s,null,this.containers[g].element,!0),this._trigger("change",s,this._uiHash()),this.containers[g]._trigger("change",s,this._uiHash(this)),this.currentContainer=this.containers[g],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[g]._trigger("over",s,this._uiHash(this)),this.containers[g].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,t("document"===n.containment?document:window).width()-this.helperProportions.width-this.margins.left,(t("document"===n.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n=this.options,o=e.pageX,a=e.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(a=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((a-this.originalPageY)/n.grid[1])*n.grid[1],a=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((o-this.originalPageX)/n.grid[0])*n.grid[0],o=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){this.reverting=!1;var i,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)("auto"===this._storedCSS[i]||"static"===this._storedCSS[i])&&(this._storedCSS[i]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&s.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||s.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(s.push(function(t){this._trigger("remove",t,this._uiHash())}),s.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;i>=0;i--)e||s.push(function(t){return function(e){t._trigger("deactivate",e,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over&&(s.push(function(t){return function(e){t._trigger("out",e,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!e){for(this._trigger("beforeStop",t,this._uiHash()),i=0;s.length>i;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!1}if(e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!e){for(i=0;s.length>i;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}})}(jQuery),function(t,e){var i="ui-effects-";t.effects={effect:{}},function(t,e){function i(t,e,i){var s=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function s(i){var s=l(),n=s._rgba=[];return i=i.toLowerCase(),f(h,function(t,o){var a,r=o.re.exec(i),h=r&&o.parse(r),l=o.space||"rgba";return h?(a=s[l](h),s[c[l].cache]=a[c[l].cache],n=s._rgba=a._rgba,!1):e}),n.length?("0,0,0,0"===n.join()&&t.extend(n,o.transparent),s):o[i]}function n(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var o,a="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,h=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],l=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=l.support={},p=t("<p>")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),l.fn=t.extend(l.prototype,{parse:function(n,a,r,h){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(a),a=e);var u=this,d=t.type(n),p=this._rgba=[];return a!==e&&(n=[n,a,r,h],d="array"),"string"===d?this.parse(s(n)||o._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n instanceof l?f(c,function(t,e){n[e.cache]&&(u[e.cache]=n[e.cache].slice())}):f(c,function(e,s){var o=s.cache;f(s.props,function(t,e){if(!u[o]&&s.to){if("alpha"===t||null==n[t])return;u[o]=s.to(u._rgba)}u[o][e.idx]=i(n[t],e,!0)}),u[o]&&0>t.inArray(null,u[o].slice(0,3))&&(u[o][3]=1,s.from&&(u._rgba=s.from(u[o])))}),this):e},is:function(t){var i=l(t),s=!0,n=this;return f(c,function(t,o){var a,r=i[o.cache];return r&&(a=n[o.cache]||o.to&&o.to(n._rgba)||[],f(o.props,function(t,i){return null!=r[i.idx]?s=r[i.idx]===a[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return f(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=l(t),n=s._space(),o=c[n],a=0===this.alpha()?l("transparent"):this,r=a[o.cache]||o.to(a._rgba),h=r.slice();return s=s[o.cache],f(o.props,function(t,n){var o=n.idx,a=r[o],l=s[o],c=u[n.type]||{};null!==l&&(null===a?h[o]=l:(c.mod&&(l-a>c.mod/2?a+=c.mod:a-l>c.mod/2&&(a-=c.mod)),h[o]=i((l-a)*e+a,n)))}),this[n](h)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=l(e)._rgba;return l(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,o=t[2]/255,a=t[3],r=Math.max(s,n,o),h=Math.min(s,n,o),l=r-h,c=r+h,u=.5*c;return e=h===r?0:s===r?60*(n-o)/l+360:n===r?60*(o-s)/l+120:60*(s-n)/l+240,i=0===l?0:.5>=u?l/c:l/(2-c),[Math.round(e)%360,i,u,null==a?1:a]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],o=t[3],a=.5>=s?s*(1+i):s+i-s*i,r=2*s-a;return[Math.round(255*n(r,a,e+1/3)),Math.round(255*n(r,a,e)),Math.round(255*n(r,a,e-1/3)),o]},f(c,function(s,n){var o=n.props,a=n.cache,h=n.to,c=n.from;l.fn[s]=function(s){if(h&&!this[a]&&(this[a]=h(this._rgba)),s===e)return this[a].slice();var n,r=t.type(s),u="array"===r||"object"===r?s:arguments,d=this[a].slice();return f(o,function(t,e){var s=u["object"===r?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),c?(n=l(c(d)),n[a]=d,n):l(d)},f(o,function(e,i){l.fn[e]||(l.fn[e]=function(n){var o,a=t.type(n),h="alpha"===e?this._hsla?"hsla":"rgba":s,l=this[h](),c=l[i.idx];return"undefined"===a?c:("function"===a&&(n=n.call(this,c),a=t.type(n)),null==n&&i.empty?this:("string"===a&&(o=r.exec(n),o&&(n=c+parseFloat(o[2])*("+"===o[1]?1:-1))),l[i.idx]=n,this[h](l)))})})}),l.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.cssHooks[i]={set:function(e,n){var o,a,r="";if("transparent"!==n&&("string"!==t.type(n)||(o=s(n)))){if(n=l(o||n),!d.rgba&&1!==n._rgba[3]){for(a="backgroundColor"===i?e.parentNode:e;(""===r||"transparent"===r)&&a&&a.style;)try{r=t.css(a,"backgroundColor"),a=a.parentNode}catch(h){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(h){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=l(e.elem,i),e.end=l(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},l.hook(a),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}},o=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),function(){function i(e){var i,s,n=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(o[t.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(o[i]=n[i]);return o}function s(e,i){var s,n,a={};for(s in i)n=i[s],e[s]!==n&&(o[s]||(t.fx.step[s]||!isNaN(parseFloat(n)))&&(a[s]=n));return a}var n=["add","remove","toggle"],o={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(jQuery.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(e,o,a,r){var h=t.speed(o,a,r);return this.queue(function(){var o,a=t(this),r=a.attr("class")||"",l=h.children?a.find("*").addBack():a;l=l.map(function(){var e=t(this);return{el:e,start:i(this)}}),o=function(){t.each(n,function(t,i){e[i]&&a[i+"Class"](e[i])})},o(),l=l.map(function(){return this.end=i(this.el[0]),this.diff=s(this.start,this.end),this}),a.attr("class",r),l=l.map(function(){var e=this,i=t.Deferred(),s=t.extend({},h,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,l.get()).done(function(){o(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),h.complete.call(a[0])})})},t.fn.extend({addClass:function(e){return function(i,s,n,o){return s?t.effects.animateClass.call(this,{add:i},s,n,o):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,s,n,o){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},s,n,o):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(i){return function(s,n,o,a,r){return"boolean"==typeof n||n===e?o?t.effects.animateClass.call(this,n?{add:s}:{remove:s},o,a,r):i.apply(this,arguments):t.effects.animateClass.call(this,{toggle:s},n,o,a)}}(t.fn.toggleClass),switchClass:function(e,i,s,n,o){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,o)}})}(),function(){function s(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function n(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isFunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}t.extend(t.effects,{version:"1.10.3",save:function(t,e){for(var s=0;e.length>s;s++)null!==e[s]&&t.data(i+e[s],t[0].style[e[s]])},restore:function(t,s){var n,o;for(o=0;s.length>o;o++)null!==s[o]&&(n=t.data(i+s[o]),n===e&&(n=""),t.css(s[o],n))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},s=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},o=document.activeElement;try{o.id}catch(a){o=document.body}return e.wrap(s),(e[0]===o||t.contains(e[0],o))&&t(o).focus(),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).focus()),e},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var o=e.cssUnit(i);o[0]>0&&(n[i]=o[0]*s+o[1])}),n}}),t.fn.extend({effect:function(){function e(e){function s(){t.isFunction(o)&&o.call(n[0]),t.isFunction(e)&&e()}var n=t(this),o=i.complete,r=i.mode;(n.is(":hidden")?"hide"===r:"show"===r)?(n[r](),s()):a.call(n[0],i,s)}var i=s.apply(this,arguments),n=i.mode,o=i.queue,a=t.effects.effect[i.effect];return t.fx.off||!a?n?this[n](i.duration,i.complete):this.each(function(){i.complete&&i.complete.call(this)}):o===!1?this.each(e):this.queue(o||"fx",e)},show:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="show",this.effect.call(this,i)}}(t.fn.show),hide:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="hide",this.effect.call(this,i)}}(t.fn.hide),toggle:function(t){return function(e){if(n(e)||"boolean"==typeof e)return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="toggle",this.effect.call(this,i)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s}})}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}()}(jQuery),function(t){var e=0,i={},s={};i.height=i.paddingTop=i.paddingBottom=i.borderTopWidth=i.borderBottomWidth="hide",s.height=s.paddingTop=s.paddingBottom=s.borderTopWidth=s.borderBottomWidth="show",t.widget("ui.accordion",{version:"1.10.3",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),e.collapsible||e.active!==!1&&null!=e.active||(e.active=0),this._processPanels(),0>e.active&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t(),content:this.active.length?this.active.next():t()}},_createIcons:function(){var e=this.options.icons;e&&(t("<span>").addClass("ui-accordion-header-icon ui-icon "+e.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(e.header).addClass(e.activeHeader),this.headers.addClass("ui-accordion-icons"))
+},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){return"active"===t?(this._activate(e),undefined):("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||this.options.active!==!1||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons()),"disabled"===t&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!e),undefined)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var i=t.ui.keyCode,s=this.headers.length,n=this.headers.index(e.target),o=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:o=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:o=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(e);break;case i.HOME:o=this.headers[0];break;case i.END:o=this.headers[s-1]}o&&(t(e.target).attr("tabIndex",-1),t(o).attr("tabIndex",0),o.focus(),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().focus()},refresh:function(){var e=this.options;this._processPanels(),e.active===!1&&e.collapsible===!0||!this.headers.length?(e.active=!1,this.active=t()):e.active===!1?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide()},_refresh:function(){var i,s=this.options,n=s.heightStyle,o=this.element.parent(),a=this.accordionId="ui-accordion-"+(this.element.attr("id")||++e);this.active=this._findActive(s.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(e){var i=t(this),s=i.attr("id"),n=i.next(),o=n.attr("id");s||(s=a+"-header-"+e,i.attr("id",s)),o||(o=a+"-panel-"+e,n.attr("id",o)),i.attr("aria-controls",o),n.attr("aria-labelledby",s)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false",tabIndex:-1}).next().attr({"aria-expanded":"false","aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true",tabIndex:0}).next().attr({"aria-expanded":"true","aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(s.event),"fill"===n?(i=o.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.headers.each(function(){i-=t(this).outerHeight(!0)}),this.headers.next().each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===n&&(i=0,this.headers.next().each(function(){i=Math.max(i,t(this).css("height","").height())}).height(i))},_activate:function(e){var i=this._findActive(e)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),o=n[0]===s[0],a=o&&i.collapsible,r=a?t():n.next(),h=s.next(),l={oldHeader:s,oldPanel:h,newHeader:a?t():n,newPanel:r};e.preventDefault(),o&&!i.collapsible||this._trigger("beforeActivate",e,l)===!1||(i.active=a?!1:this.headers.index(n),this.active=o?t():n,this._toggle(l),s.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&s.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),o||(n.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&n.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),n.next().addClass("ui-accordion-content-active")))},_toggle:function(e){var i=e.newPanel,s=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,e):(s.hide(),i.show(),this._toggleComplete(e)),s.attr({"aria-expanded":"false","aria-hidden":"true"}),s.prev().attr("aria-selected","false"),i.length&&s.length?s.prev().attr("tabIndex",-1):i.length&&this.headers.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),i.attr({"aria-expanded":"true","aria-hidden":"false"}).prev().attr({"aria-selected":"true",tabIndex:0})},_animate:function(t,e,n){var o,a,r,h=this,l=0,c=t.length&&(!e.length||t.index()<e.index()),u=this.options.animate||{},d=c&&u.down||u,p=function(){h._toggleComplete(n)};return"number"==typeof d&&(r=d),"string"==typeof d&&(a=d),a=a||d.easing||u.easing,r=r||d.duration||u.duration,e.length?t.length?(o=t.show().outerHeight(),e.animate(i,{duration:r,easing:a,step:function(t,e){e.now=Math.round(t)}}),t.hide().animate(s,{duration:r,easing:a,complete:p,step:function(t,i){i.now=Math.round(t),"height"!==i.prop?l+=i.now:"content"!==h.options.heightStyle&&(i.now=Math.round(o-e.outerHeight()-l),l=0)}}),undefined):e.animate(i,r,a,p):t.animate(s,r,a,p)},_toggleComplete:function(t){var e=t.oldPanel;e.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}})}(jQuery),function(t){var e=0;t.widget("ui.autocomplete",{version:"1.10.3",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var e,i,s,n=this.element[0].nodeName.toLowerCase(),o="textarea"===n,a="input"===n;this.isMultiLine=o?!0:a?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[o||a?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,i=!0,undefined;e=!1,s=!1,i=!1;var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",n);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case o.UP:e=!0,this._keyEvent("previous",n);break;case o.DOWN:e=!0,this._keyEvent("next",n);break;case o.ENTER:case o.NUMPAD_ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case o.TAB:this.menu.active&&this.menu.select(n);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),undefined;if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!1,t.preventDefault(),undefined):(this._searchTimeout(t),undefined)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,undefined):(clearTimeout(this.searching),this.close(t),this._change(t),undefined)}}),this._initSource(),this.menu=t("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().data("ui-menu"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];t(e.target).closest(".ui-menu-item").length||this._delay(function(){var e=this;this.document.one("mousedown",function(s){s.target===e.element[0]||s.target===i||t.contains(i,s.target)||e.close()})})},menufocus:function(e,i){if(this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type)))return this.menu.blur(),this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)}),undefined;var s=i.item.data("ui-autocomplete-item");!1!==this._trigger("focus",e,{item:s})?e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(s.value):this.liveRegion.text(s.value)},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=t("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertBefore(this.element),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e||(e=this.element.closest(".ui-front")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):this._trigger("search",e)!==!1?this._search(t):undefined},_search:function(t){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var t=this,i=++e;return function(s){i===e&&t.__response(s),t.pending--,t.pending||t.element.removeClass("ui-autocomplete-loading")}},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({label:e.label||e.value,value:e.value||e.label},e)})},_suggest:function(e){var i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var s=this;t.each(i,function(t,i){s._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").append(t("<a>").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this._value(this.term),this.menu.blur(),undefined):(this.menu[t](e),undefined):(this.search(null,e),undefined)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var e;this._superApply(arguments),this.options.disabled||this.cancelSearch||(e=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,this.liveRegion.text(e))}})}(jQuery),function(t){var e,i,s,n,o="ui-button ui-widget ui-state-default ui-corner-all",a="ui-state-hover ui-state-active ",r="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",h=function(){var e=t(this);setTimeout(function(){e.find(":ui-button").button("refresh")},1)},l=function(e){var i=e.name,s=e.form,n=t([]);return i&&(i=i.replace(/'/g,"\\'"),n=s?t(s).find("[name='"+i+"']"):t("[name='"+i+"']",e.ownerDocument).filter(function(){return!this.form})),n};t.widget("ui.button",{version:"1.10.3",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,h),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var a=this,r=this.options,c="checkbox"===this.type||"radio"===this.type,u=c?"":"ui-state-active",d="ui-state-focus";null===r.label&&(r.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(o).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){r.disabled||this===e&&t(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){r.disabled||t(this).removeClass(u)}).bind("click"+this.eventNamespace,function(t){r.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}),this.element.bind("focus"+this.eventNamespace,function(){a.buttonElement.addClass(d)}).bind("blur"+this.eventNamespace,function(){a.buttonElement.removeClass(d)}),c&&(this.element.bind("change"+this.eventNamespace,function(){n||a.refresh()}),this.buttonElement.bind("mousedown"+this.eventNamespace,function(t){r.disabled||(n=!1,i=t.pageX,s=t.pageY)}).bind("mouseup"+this.eventNamespace,function(t){r.disabled||(i!==t.pageX||s!==t.pageY)&&(n=!0)})),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return r.disabled||n?!1:undefined}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(r.disabled||n)return!1;t(this).addClass("ui-state-active"),a.buttonElement.attr("aria-pressed","true");var e=a.element[0];l(e).not(e).map(function(){return t(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return r.disabled?!1:(t(this).addClass("ui-state-active"),e=this,a.document.one("mouseup",function(){e=null}),undefined)}).bind("mouseup"+this.eventNamespace,function(){return r.disabled?!1:(t(this).removeClass("ui-state-active"),undefined)}).bind("keydown"+this.eventNamespace,function(e){return r.disabled?!1:((e.keyCode===t.ui.keyCode.SPACE||e.keyCode===t.ui.keyCode.ENTER)&&t(this).addClass("ui-state-active"),undefined)}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){t(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(e){e.keyCode===t.ui.keyCode.SPACE&&t(this).click()})),this._setOption("disabled",r.disabled),this._resetButton()},_determineButtonType:function(){var t,e,i;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"button","checkbox"===this.type||"radio"===this.type?(t=this.element.parents().last(),e="label[for='"+this.element.attr("id")+"']",this.buttonElement=t.find(e),this.buttonElement.length||(t=t.length?t.siblings():this.element.siblings(),this.buttonElement=t.filter(e),this.buttonElement.length||(this.buttonElement=t.find(e))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(o+" "+a+" "+r).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(t,e){return this._super(t,e),"disabled"===t?(e?this.element.prop("disabled",!0):this.element.prop("disabled",!1),undefined):(this._resetButton(),undefined)},refresh:function(){var e=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");e!==this.options.disabled&&this._setOption("disabled",e),"radio"===this.type?l(this.element[0]).each(function(){t(this).is(":checked")?t(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):t(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return this.options.label&&this.element.val(this.options.label),undefined;var e=this.buttonElement.removeClass(r),i=t("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(e.empty()).text(),s=this.options.icons,n=s.primary&&s.secondary,o=[];s.primary||s.secondary?(this.options.text&&o.push("ui-button-text-icon"+(n?"s":s.primary?"-primary":"-secondary")),s.primary&&e.prepend("<span class='ui-button-icon-primary ui-icon "+s.primary+"'></span>"),s.secondary&&e.append("<span class='ui-button-icon-secondary ui-icon "+s.secondary+"'></span>"),this.options.text||(o.push(n?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||e.attr("title",t.trim(i)))):o.push("ui-button-text-only"),e.addClass(o.join(" "))}}),t.widget("ui.buttonset",{version:"1.10.3",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(t,e){"disabled"===t&&this.buttons.button("option",t,e),this._super(t,e)},refresh:function(){var e="rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(e?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(e?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})}(jQuery),function(t,e){function i(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.dpDiv=s(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function s(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.delegate(i,"mouseout",function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",function(){t.datepicker._isDisabledDatepicker(o.inline?e.parent()[0]:o.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))})}function n(e,i){t.extend(e,i);for(var s in i)null==i[s]&&(e[s]=i[s]);return e}t.extend(t.ui,{datepicker:{version:"1.10.3"}});var o,a="datepicker";t.extend(i.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return n(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var s,n,o;s=e.nodeName.toLowerCase(),n="div"===s||"span"===s,e.id||(this.uuid+=1,e.id="dp"+this.uuid),o=this._newInst(t(e),n),o.settings=t.extend({},i||{}),"input"===s?this._connectDatepicker(e,o):n&&this._inlineDatepicker(e,o)},_newInst:function(e,i){var n=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:n,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?s(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var s=t(e);i.append=t([]),i.trigger=t([]),s.hasClass(this.markerClassName)||(this._attachments(s,i),s.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),t.data(e,a,i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var s,n,o,a=this._get(i,"appendText"),r=this._get(i,"isRTL");i.append&&i.append.remove(),a&&(i.append=t("<span class='"+this._appendClass+"'>"+a+"</span>"),e[r?"before":"after"](i.append)),e.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),s=this._get(i,"showOn"),("focus"===s||"both"===s)&&e.focus(this._showDatepicker),("button"===s||"both"===s)&&(n=this._get(i,"buttonText"),o=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:o,alt:n,title:n}):t("<button type='button'></button>").addClass(this._triggerClass).html(o?t("<img/>").attr({src:o,alt:n,title:n}):n)),e[r?"before":"after"](i.trigger),i.trigger.click(function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,s,n,o=new Date(2009,11,20),a=this._get(t,"dateFormat");a.match(/[DM]/)&&(e=function(t){for(i=0,s=0,n=0;t.length>n;n++)t[n].length>i&&(i=t[n].length,s=n);return s},o.setMonth(e(this._get(t,a.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(e,i){var s=t(e);s.hasClass(this.markerClassName)||(s.addClass(this.markerClassName).append(i.dpDiv),t.data(e,a,i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,s,o,r){var h,l,c,u,d,p=this._dialogInst;return p||(this.uuid+=1,h="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+h+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),t("body").append(this._dialogInput),p=this._dialogInst=this._newInst(this._dialogInput,!1),p.settings={},t.data(this._dialogInput[0],a,p)),n(p.settings,o||{}),i=i&&i.constructor===Date?this._formatDate(p,i):i,this._dialogInput.val(i),this._pos=r?r.length?r:[r.pageX,r.pageY]:null,this._pos||(l=document.documentElement.clientWidth,c=document.documentElement.clientHeight,u=document.documentElement.scrollLeft||document.body.scrollLeft,d=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[l/2-100+u,c/2-150+d]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),p.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],a,p),this},_destroyDatepicker:function(e){var i,s=t(e),n=t.data(e,a);s.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,a),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty())},_enableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,a);n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,a);n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;this._disabledInputs.length>e;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,a)}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(i,s,o){var a,r,h,l,c=this._getInst(i);return 2===arguments.length&&"string"==typeof s?"defaults"===s?t.extend({},t.datepicker._defaults):c?"all"===s?t.extend({},c.settings):this._get(c,s):null:(a=s||{},"string"==typeof s&&(a={},a[s]=o),c&&(this._curInst===c&&this._hideDatepicker(),r=this._getDateDatepicker(i,!0),h=this._getMinMaxDate(c,"min"),l=this._getMinMaxDate(c,"max"),n(c.settings,a),null!==h&&a.dateFormat!==e&&a.minDate===e&&(c.settings.minDate=this._formatDate(c,h)),null!==l&&a.dateFormat!==e&&a.maxDate===e&&(c.settings.maxDate=this._formatDate(c,l)),"disabled"in a&&(a.disabled?this._disableDatepicker(i):this._enableDatepicker(i)),this._attachments(t(i),c),this._autoSize(c),this._setDate(c,r),this._updateAlternate(c),this._updateDatepicker(c)),e)},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,s,n,o=t.datepicker._getInst(e.target),a=!0,r=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),a=!1;break;case 13:return n=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",o.dpDiv),n[0]&&t.datepicker._selectDay(e.target,o.selectedMonth,o.selectedYear,n[0]),i=t.datepicker._get(o,"onSelect"),i?(s=t.datepicker._formatDate(o),i.apply(o.input?o.input[0]:null,[s,o])):t.datepicker._hideDatepicker(),!1;
+case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),a=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),a=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?1:-1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),a=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?-1:1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),a=e.ctrlKey||e.metaKey;break;default:a=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):a=!1;a&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(i){var s,n,o=t.datepicker._getInst(i.target);return t.datepicker._get(o,"constrainInput")?(s=t.datepicker._possibleChars(t.datepicker._get(o,"dateFormat")),n=String.fromCharCode(null==i.charCode?i.keyCode:i.charCode),i.ctrlKey||i.metaKey||" ">n||!s||s.indexOf(n)>-1):e},_doKeyUp:function(e){var i,s=t.datepicker._getInst(e.target);if(s.input.val()!==s.lastVal)try{i=t.datepicker.parseDate(t.datepicker._get(s,"dateFormat"),s.input?s.input.val():null,t.datepicker._getFormatConfig(s)),i&&(t.datepicker._setDateFromField(s),t.datepicker._updateAlternate(s),t.datepicker._updateDatepicker(s))}catch(n){}return!0},_showDatepicker:function(e){if(e=e.target||e,"input"!==e.nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),!t.datepicker._isDisabledDatepicker(e)&&t.datepicker._lastInput!==e){var i,s,o,a,r,h,l;i=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==i&&(t.datepicker._curInst.dpDiv.stop(!0,!0),i&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),s=t.datepicker._get(i,"beforeShow"),o=s?s.apply(e,[e,i]):{},o!==!1&&(n(i.settings,o),i.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(i),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),a=!1,t(e).parents().each(function(){return a|="fixed"===t(this).css("position"),!a}),r={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(i),r=t.datepicker._checkOffset(i,r,a),i.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":a?"fixed":"absolute",display:"none",left:r.left+"px",top:r.top+"px"}),i.inline||(h=t.datepicker._get(i,"showAnim"),l=t.datepicker._get(i,"duration"),i.dpDiv.zIndex(t(e).zIndex()+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[h]?i.dpDiv.show(h,t.datepicker._get(i,"showOptions"),l):i.dpDiv[h||"show"](h?l:null),t.datepicker._shouldFocusInput(i)&&i.input.focus(),t.datepicker._curInst=i))}},_updateDatepicker:function(e){this.maxRows=4,o=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e),e.dpDiv.find("."+this._dayOverClass+" a").mouseover();var i,s=this._getNumberOfMonths(e),n=s[1],a=17;e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&e.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",a*n+"em"),e.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.focus(),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,s){var n=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),a=e.input?e.input.outerWidth():0,r=e.input?e.input.outerHeight():0,h=document.documentElement.clientWidth+(s?0:t(document).scrollLeft()),l=document.documentElement.clientHeight+(s?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?n-a:0,i.left-=s&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=s&&i.top===e.input.offset().top+r?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>h&&h>n?Math.abs(i.left+n-h):0),i.top-=Math.min(i.top,i.top+o>l&&l>o?Math.abs(o+r):0),i},_findPos:function(e){for(var i,s=this._getInst(e),n=this._get(s,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[n?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,s,n,o,r=this._curInst;!r||e&&r!==t.data(e,a)||this._datepickerShowing&&(i=this._get(r,"showAnim"),s=this._get(r,"duration"),n=function(){t.datepicker._tidyDialog(r)},t.effects&&(t.effects.effect[i]||t.effects[i])?r.dpDiv.hide(i,t.datepicker._get(r,"showOptions"),s,n):r.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,o=this._get(r,"onClose"),o&&o.apply(r.input?r.input[0]:null,[r.input?r.input.val():"",r]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),s=t.datepicker._getInst(i[0]);(i[0].id!==t.datepicker._mainDivId&&0===i.parents("#"+t.datepicker._mainDivId).length&&!i.hasClass(t.datepicker.markerClassName)&&!i.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&(!t.datepicker._inDialog||!t.blockUI)||i.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==s)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,s){var n=t(e),o=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(o,i+("M"===s?this._get(o,"showCurrentAtPos"):0),s),this._updateDatepicker(o))},_gotoToday:function(e){var i,s=t(e),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(e,i,s){var n=t(e),o=this._getInst(n[0]);o["selected"+("M"===s?"Month":"Year")]=o["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(n)},_selectDay:function(e,i,s,n){var o,a=t(e);t(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(a[0])||(o=this._getInst(a[0]),o.selectedDay=o.currentDay=t("a",n).html(),o.selectedMonth=o.currentMonth=i,o.selectedYear=o.currentYear=s,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var s,n=t(e),o=this._getInst(n[0]);i=null!=i?i:this._formatDate(o),o.input&&o.input.val(i),this._updateAlternate(o),s=this._get(o,"onSelect"),s?s.apply(o.input?o.input[0]:null,[i,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.focus(),this._lastInput=null)},_updateAlternate:function(e){var i,s,n,o=this._get(e,"altField");o&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),s=this._getDate(e),n=this.formatDate(i,s,this._getFormatConfig(e)),t(o).each(function(){t(this).val(n)}))},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(i,s,n){if(null==i||null==s)throw"Invalid arguments";if(s="object"==typeof s?""+s:s+"",""===s)return null;var o,a,r,h,l=0,c=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff,u="string"!=typeof c?c:(new Date).getFullYear()%100+parseInt(c,10),d=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,p=(n?n.dayNames:null)||this._defaults.dayNames,f=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,g=(n?n.monthNames:null)||this._defaults.monthNames,m=-1,v=-1,_=-1,b=-1,y=!1,w=function(t){var e=i.length>o+1&&i.charAt(o+1)===t;return e&&o++,e},k=function(t){var e=w(t),i="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,n=RegExp("^\\d{1,"+i+"}"),o=s.substring(l).match(n);if(!o)throw"Missing number at position "+l;return l+=o[0].length,parseInt(o[0],10)},x=function(i,n,o){var a=-1,r=t.map(w(i)?o:n,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(r,function(t,i){var n=i[1];return s.substr(l,n.length).toLowerCase()===n.toLowerCase()?(a=i[0],l+=n.length,!1):e}),-1!==a)return a+1;throw"Unknown name at position "+l},D=function(){if(s.charAt(l)!==i.charAt(o))throw"Unexpected literal at position "+l;l++};for(o=0;i.length>o;o++)if(y)"'"!==i.charAt(o)||w("'")?D():y=!1;else switch(i.charAt(o)){case"d":_=k("d");break;case"D":x("D",d,p);break;case"o":b=k("o");break;case"m":v=k("m");break;case"M":v=x("M",f,g);break;case"y":m=k("y");break;case"@":h=new Date(k("@")),m=h.getFullYear(),v=h.getMonth()+1,_=h.getDate();break;case"!":h=new Date((k("!")-this._ticksTo1970)/1e4),m=h.getFullYear(),v=h.getMonth()+1,_=h.getDate();break;case"'":w("'")?D():y=!0;break;default:D()}if(s.length>l&&(r=s.substr(l),!/^\s+/.test(r)))throw"Extra/unparsed characters found in date: "+r;if(-1===m?m=(new Date).getFullYear():100>m&&(m+=(new Date).getFullYear()-(new Date).getFullYear()%100+(u>=m?0:-100)),b>-1)for(v=1,_=b;;){if(a=this._getDaysInMonth(m,v-1),a>=_)break;v++,_-=a}if(h=this._daylightSavingAdjust(new Date(m,v-1,_)),h.getFullYear()!==m||h.getMonth()+1!==v||h.getDate()!==_)throw"Invalid date";return h},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(t,e,i){if(!e)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,o=(i?i.dayNames:null)||this._defaults.dayNames,a=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,r=(i?i.monthNames:null)||this._defaults.monthNames,h=function(e){var i=t.length>s+1&&t.charAt(s+1)===e;return i&&s++,i},l=function(t,e,i){var s=""+e;if(h(t))for(;i>s.length;)s="0"+s;return s},c=function(t,e,i,s){return h(t)?s[e]:i[e]},u="",d=!1;if(e)for(s=0;t.length>s;s++)if(d)"'"!==t.charAt(s)||h("'")?u+=t.charAt(s):d=!1;else switch(t.charAt(s)){case"d":u+=l("d",e.getDate(),2);break;case"D":u+=c("D",e.getDay(),n,o);break;case"o":u+=l("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=l("m",e.getMonth()+1,2);break;case"M":u+=c("M",e.getMonth(),a,r);break;case"y":u+=h("y")?e.getFullYear():(10>e.getYear()%100?"0":"")+e.getYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()+this._ticksTo1970;break;case"'":h("'")?u+="'":d=!0;break;default:u+=t.charAt(s)}return u},_possibleChars:function(t){var e,i="",s=!1,n=function(i){var s=t.length>e+1&&t.charAt(e+1)===i;return s&&e++,s};for(e=0;t.length>e;e++)if(s)"'"!==t.charAt(e)||n("'")?i+=t.charAt(e):s=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,i){return t.settings[i]!==e?t.settings[i]:this._defaults[i]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),o=n,a=this._getFormatConfig(t);try{o=this.parseDate(i,s,a)||n}catch(r){s=e?"":s}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=s?o.getDate():0,t.currentMonth=s?o.getMonth():0,t.currentYear=s?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,s){var n=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},o=function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(s){}for(var n=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,o=n.getFullYear(),a=n.getMonth(),r=n.getDate(),h=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=h.exec(i);l;){switch(l[2]||"d"){case"d":case"D":r+=parseInt(l[1],10);break;case"w":case"W":r+=7*parseInt(l[1],10);break;case"m":case"M":a+=parseInt(l[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a));break;case"y":case"Y":o+=parseInt(l[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a))}l=h.exec(i)}return new Date(o,a,r)},a=null==i||""===i?s:"string"==typeof i?o(i):"number"==typeof i?isNaN(i)?s:n(i):new Date(i.getTime());return a=a&&"Invalid Date"==""+a?s:a,a&&(a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)),this._daylightSavingAdjust(a)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,o=t.selectedYear,a=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=a.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=a.getMonth(),t.drawYear=t.selectedYear=t.currentYear=a.getFullYear(),n===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){var e=!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return e},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),s="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(s,-i,"M")},next:function(){t.datepicker._adjustDate(s,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(s)},selectDay:function(){return t.datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(s,this,"Y"),!1}};t(this).bind(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,o,a,r,h,l,c,u,d,p,f,g,m,v,_,b,y,w,k,x,D,C,I,P,T,M,S,z,A,H,E,N,W,O,F,R,L=new Date,j=this._daylightSavingAdjust(new Date(L.getFullYear(),L.getMonth(),L.getDate())),Y=this._get(t,"isRTL"),B=this._get(t,"showButtonPanel"),V=this._get(t,"hideIfNoPrevNext"),K=this._get(t,"navigationAsDateFormat"),U=this._getNumberOfMonths(t),q=this._get(t,"showCurrentAtPos"),Q=this._get(t,"stepMonths"),X=1!==U[0]||1!==U[1],$=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),G=this._getMinMaxDate(t,"min"),J=this._getMinMaxDate(t,"max"),Z=t.drawMonth-q,te=t.drawYear;if(0>Z&&(Z+=12,te--),J)for(e=this._daylightSavingAdjust(new Date(J.getFullYear(),J.getMonth()-U[0]*U[1]+1,J.getDate())),e=G&&G>e?G:e;this._daylightSavingAdjust(new Date(te,Z,1))>e;)Z--,0>Z&&(Z=11,te--);for(t.drawMonth=Z,t.drawYear=te,i=this._get(t,"prevText"),i=K?this.formatDate(i,this._daylightSavingAdjust(new Date(te,Z-Q,1)),this._getFormatConfig(t)):i,s=this._canAdjustMonth(t,-1,te,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>":V?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>",n=this._get(t,"nextText"),n=K?this.formatDate(n,this._daylightSavingAdjust(new Date(te,Z+Q,1)),this._getFormatConfig(t)):n,o=this._canAdjustMonth(t,1,te,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>":V?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>",a=this._get(t,"currentText"),r=this._get(t,"gotoCurrent")&&t.currentDay?$:j,a=K?this.formatDate(a,r,this._getFormatConfig(t)):a,h=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",l=B?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(Y?h:"")+(this._isInRange(t,r)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+a+"</button>":"")+(Y?"":h)+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,u=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),m=this._get(t,"beforeShowDay"),v=this._get(t,"showOtherMonths"),_=this._get(t,"selectOtherMonths"),b=this._getDefaultDate(t),y="",k=0;U[0]>k;k++){for(x="",this.maxRows=4,D=0;U[1]>D;D++){if(C=this._daylightSavingAdjust(new Date(te,Z,t.selectedDay)),I=" ui-corner-all",P="",X){if(P+="<div class='ui-datepicker-group",U[1]>1)switch(D){case 0:P+=" ui-datepicker-group-first",I=" ui-corner-"+(Y?"right":"left");break;case U[1]-1:P+=" ui-datepicker-group-last",I=" ui-corner-"+(Y?"left":"right");break;default:P+=" ui-datepicker-group-middle",I=""}P+="'>"}for(P+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+I+"'>"+(/all|left/.test(I)&&0===k?Y?o:s:"")+(/all|right/.test(I)&&0===k?Y?s:o:"")+this._generateMonthYearHeader(t,Z,te,G,J,k>0||D>0,f,g)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>",T=u?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",w=0;7>w;w++)M=(w+c)%7,T+="<th"+((w+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span title='"+d[M]+"'>"+p[M]+"</span></th>";for(P+=T+"</tr></thead><tbody>",S=this._getDaysInMonth(te,Z),te===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,S)),z=(this._getFirstDayOfMonth(te,Z)-c+7)%7,A=Math.ceil((z+S)/7),H=X?this.maxRows>A?this.maxRows:A:A,this.maxRows=H,E=this._daylightSavingAdjust(new Date(te,Z,1-z)),N=0;H>N;N++){for(P+="<tr>",W=u?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(E)+"</td>":"",w=0;7>w;w++)O=m?m.apply(t.input?t.input[0]:null,[E]):[!0,""],F=E.getMonth()!==Z,R=F&&!_||!O[0]||G&&G>E||J&&E>J,W+="<td class='"+((w+c+6)%7>=5?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+(E.getTime()===C.getTime()&&Z===t.selectedMonth&&t._keyEvent||b.getTime()===E.getTime()&&b.getTime()===C.getTime()?" "+this._dayOverClass:"")+(R?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!v?"":" "+O[1]+(E.getTime()===$.getTime()?" "+this._currentClass:"")+(E.getTime()===j.getTime()?" ui-datepicker-today":""))+"'"+(F&&!v||!O[2]?"":" title='"+O[2].replace(/'/g,"&#39;")+"'")+(R?"":" data-handler='selectDay' data-event='click' data-month='"+E.getMonth()+"' data-year='"+E.getFullYear()+"'")+">"+(F&&!v?"&#xa0;":R?"<span class='ui-state-default'>"+E.getDate()+"</span>":"<a class='ui-state-default"+(E.getTime()===j.getTime()?" ui-state-highlight":"")+(E.getTime()===$.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+"' href='#'>"+E.getDate()+"</a>")+"</td>",E.setDate(E.getDate()+1),E=this._daylightSavingAdjust(E);P+=W+"</tr>"}Z++,Z>11&&(Z=0,te++),P+="</tbody></table>"+(X?"</div>"+(U[0]>0&&D===U[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),x+=P}y+=x}return y+=l,t._keyEvent=!1,y},_generateMonthYearHeader:function(t,e,i,s,n,o,a,r){var h,l,c,u,d,p,f,g,m=this._get(t,"changeMonth"),v=this._get(t,"changeYear"),_=this._get(t,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",y="";if(o||!m)y+="<span class='ui-datepicker-month'>"+a[e]+"</span>";else{for(h=s&&s.getFullYear()===i,l=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;12>c;c++)(!h||c>=s.getMonth())&&(!l||n.getMonth()>=c)&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+r[c]+"</option>");y+="</select>"}if(_||(b+=y+(!o&&m&&v?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",o||!v)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(u=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e},f=p(u[0]),g=Math.max(f,p(u[1]||"")),f=s?Math.max(f,s.getFullYear()):f,g=n?Math.min(g,n.getFullYear()):g,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";g>=f;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),_&&(b+=(!o&&m&&v?"":"&#xa0;")+y),b+="</div>"},_adjustInstDate:function(t,e,i){var s=t.drawYear+("Y"===i?e:0),n=t.drawMonth+("M"===i?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),a=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,o)));t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=i&&i>e?i:e;return s&&n>s?s:n},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(i,s+(0>e?e:n[0]*n[1]),1));return 0>e&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var i,s,n=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),a=null,r=null,h=this._get(t,"yearRange");return h&&(i=h.split(":"),s=(new Date).getFullYear(),a=parseInt(i[0],10),r=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(a+=s),i[1].match(/[+\-].*/)&&(r+=s)),(!n||e.getTime()>=n.getTime())&&(!o||e.getTime()<=o.getTime())&&(!a||e.getFullYear()>=a)&&(!r||r>=e.getFullYear())},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var n=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),n,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).mousedown(t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new i,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.10.3"}(jQuery),function(t){var e={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},i={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};t.widget("ui.dialog",{version:"1.10.3",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var i=t(this).css(e).offset().top;0>i&&t(this).css("top",e.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&t.fn.draggable&&this._makeDraggable(),this.options.resizable&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),t=e.parent.children().eq(e.index),t.length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:t.noop,enable:t.noop,close:function(e){var i=this;this._isOpen&&this._trigger("beforeClose",e)!==!1&&(this._isOpen=!1,this._destroyOverlay(),this.opener.filter(":focusable").focus().length||t(this.document[0].activeElement).blur(),this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",e)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,e){var i=!!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;return i&&!e&&this._trigger("focus",t),i},open:function(){var e=this;return this._isOpen?(this._moveToTop()&&this._focusTabbable(),undefined):(this._isOpen=!0,this.opener=t(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._trigger("open"),undefined)},_focusTabbable:function(){var t=this.element.find("[autofocus]");t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).focus()},_keepFocus:function(e){function i(){var e=this.document[0].activeElement,i=this.uiDialog[0]===e||t.contains(this.uiDialog[0],e);i||this._focusTabbable()}e.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=t("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return e.preventDefault(),this.close(e),undefined;if(e.keyCode===t.ui.keyCode.TAB){var i=this.uiDialog.find(":tabbable"),s=i.filter(":first"),n=i.filter(":last");e.target!==n[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==s[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(n.focus(1),e.preventDefault()):(s.focus(1),e.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=t("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=t("<button></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),e=t("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(e),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title||t.html("&#160;"),t.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=t("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var e=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||t.isArray(i)&&!i.length?(this.uiDialog.removeClass("ui-dialog-buttons"),undefined):(t.each(i,function(i,s){var n,o;s=t.isFunction(s)?{click:s,text:i}:s,s=t.extend({type:"button"},s),n=s.click,s.click=function(){n.apply(e.element[0],arguments)},o={icons:s.icons,text:s.showText},delete s.icons,delete s.showText,t("<button></button>",s).button(o).appendTo(e.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),undefined)},_makeDraggable:function(){function e(t){return{position:t.position,offset:t.offset}}var i=this,s=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(s,n){t(this).addClass("ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",s,e(n))},drag:function(t,s){i._trigger("drag",t,e(s))},stop:function(n,o){s.position=[o.position.left-i.document.scrollLeft(),o.position.top-i.document.scrollTop()],t(this).removeClass("ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",n,e(o))}})},_makeResizable:function(){function e(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}
+}var i=this,s=this.options,n=s.resizable,o=this.uiDialog.css("position"),a="string"==typeof n?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:a,start:function(s,n){t(this).addClass("ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",s,e(n))},resize:function(t,s){i._trigger("resize",t,e(s))},stop:function(n,o){s.height=t(this).height(),s.width=t(this).width(),t(this).removeClass("ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",n,e(o))}}).css("position",o)},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(s){var n=this,o=!1,a={};t.each(s,function(t,s){n._setOption(t,s),t in e&&(o=!0),t in i&&(a[t]=s)}),o&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",a)},_setOption:function(t,e){var i,s,n=this.uiDialog;"dialogClass"===t&&n.removeClass(this.options.dialogClass).addClass(e),"disabled"!==t&&(this._super(t,e),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({label:""+e}),"draggable"===t&&(i=n.is(":data(ui-draggable)"),i&&!e&&n.draggable("destroy"),!i&&e&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&(s=n.is(":data(ui-resizable)"),s&&!e&&n.resizable("destroy"),s&&"string"==typeof e&&n.resizable("option","handles",e),s||e===!1||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),e=Math.max(0,s.minHeight-t),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-t):"none","auto"===s.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=t(this);return t("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return t(e.target).closest(".ui-dialog").length?!0:!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=this,i=this.widgetFullName;t.ui.dialog.overlayInstances||this._delay(function(){t.ui.dialog.overlayInstances&&this.document.bind("focusin.dialog",function(s){e._allowInteraction(s)||(s.preventDefault(),t(".ui-dialog:visible:last .ui-dialog-content").data(i)._focusTabbable())})}),this.overlay=t("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),t.ui.dialog.overlayInstances++}},_destroyOverlay:function(){this.options.modal&&this.overlay&&(t.ui.dialog.overlayInstances--,t.ui.dialog.overlayInstances||this.document.unbind("focusin.dialog"),this.overlay.remove(),this.overlay=null)}}),t.ui.dialog.overlayInstances=0,t.uiBackCompat!==!1&&t.widget("ui.dialog",t.ui.dialog,{_position:function(){var e,i=this.options.position,s=[],n=[0,0];i?(("string"==typeof i||"object"==typeof i&&"0"in i)&&(s=i.split?i.split(" "):[i[0],i[1]],1===s.length&&(s[1]=s[0]),t.each(["left","top"],function(t,e){+s[t]===s[t]&&(n[t]=s[t],s[t]=e)}),i={my:s[0]+(0>n[0]?n[0]:"+"+n[0])+" "+s[1]+(0>n[1]?n[1]:"+"+n[1]),at:s.join(" ")}),i=t.extend({},t.ui.dialog.prototype.options.position,i)):i=t.ui.dialog.prototype.options.position,e=this.uiDialog.is(":visible"),e||this.uiDialog.show(),this.uiDialog.position(i),e||this.uiDialog.hide()}})}(jQuery),function(t){var e=/up|down|vertical/,i=/up|left|vertical|horizontal/;t.effects.effect.blind=function(s,n){var o,a,r,h=t(this),l=["position","top","bottom","left","right","height","width"],c=t.effects.setMode(h,s.mode||"hide"),u=s.direction||"up",d=e.test(u),p=d?"height":"width",f=d?"top":"left",g=i.test(u),m={},v="show"===c;h.parent().is(".ui-effects-wrapper")?t.effects.save(h.parent(),l):t.effects.save(h,l),h.show(),o=t.effects.createWrapper(h).css({overflow:"hidden"}),a=o[p](),r=parseFloat(o.css(f))||0,m[p]=v?a:0,g||(h.css(d?"bottom":"right",0).css(d?"top":"left","auto").css({position:"absolute"}),m[f]=v?r:a+r),v&&(o.css(p,0),g||o.css(f,r+a)),o.animate(m,{duration:s.duration,easing:s.easing,queue:!1,complete:function(){"hide"===c&&h.hide(),t.effects.restore(h,l),t.effects.removeWrapper(h),n()}})}}(jQuery),function(t){t.effects.effect.bounce=function(e,i){var s,n,o,a=t(this),r=["position","top","bottom","left","right","height","width"],h=t.effects.setMode(a,e.mode||"effect"),l="hide"===h,c="show"===h,u=e.direction||"up",d=e.distance,p=e.times||5,f=2*p+(c||l?1:0),g=e.duration/f,m=e.easing,v="up"===u||"down"===u?"top":"left",_="up"===u||"left"===u,b=a.queue(),y=b.length;for((c||l)&&r.push("opacity"),t.effects.save(a,r),a.show(),t.effects.createWrapper(a),d||(d=a["top"===v?"outerHeight":"outerWidth"]()/3),c&&(o={opacity:1},o[v]=0,a.css("opacity",0).css(v,_?2*-d:2*d).animate(o,g,m)),l&&(d/=Math.pow(2,p-1)),o={},o[v]=0,s=0;p>s;s++)n={},n[v]=(_?"-=":"+=")+d,a.animate(n,g,m).animate(o,g,m),d=l?2*d:d/2;l&&(n={opacity:0},n[v]=(_?"-=":"+=")+d,a.animate(n,g,m)),a.queue(function(){l&&a.hide(),t.effects.restore(a,r),t.effects.removeWrapper(a),i()}),y>1&&b.splice.apply(b,[1,0].concat(b.splice(y,f+1))),a.dequeue()}}(jQuery),function(t){t.effects.effect.clip=function(e,i){var s,n,o,a=t(this),r=["position","top","bottom","left","right","height","width"],h=t.effects.setMode(a,e.mode||"hide"),l="show"===h,c=e.direction||"vertical",u="vertical"===c,d=u?"height":"width",p=u?"top":"left",f={};t.effects.save(a,r),a.show(),s=t.effects.createWrapper(a).css({overflow:"hidden"}),n="IMG"===a[0].tagName?s:a,o=n[d](),l&&(n.css(d,0),n.css(p,o/2)),f[d]=l?o:0,f[p]=l?0:o/2,n.animate(f,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){l||a.hide(),t.effects.restore(a,r),t.effects.removeWrapper(a),i()}})}}(jQuery),function(t){t.effects.effect.drop=function(e,i){var s,n=t(this),o=["position","top","bottom","left","right","opacity","height","width"],a=t.effects.setMode(n,e.mode||"hide"),r="show"===a,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h?"pos":"neg",u={opacity:r?1:0};t.effects.save(n,o),n.show(),t.effects.createWrapper(n),s=e.distance||n["top"===l?"outerHeight":"outerWidth"](!0)/2,r&&n.css("opacity",0).css(l,"pos"===c?-s:s),u[l]=(r?"pos"===c?"+=":"-=":"pos"===c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===a&&n.hide(),t.effects.restore(n,o),t.effects.removeWrapper(n),i()}})}}(jQuery),function(t){t.effects.effect.explode=function(e,i){function s(){b.push(this),b.length===u*d&&n()}function n(){p.css({visibility:"visible"}),t(b).remove(),g||p.hide(),i()}var o,a,r,h,l,c,u=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=u,p=t(this),f=t.effects.setMode(p,e.mode||"hide"),g="show"===f,m=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/d),_=Math.ceil(p.outerHeight()/u),b=[];for(o=0;u>o;o++)for(h=m.top+o*_,c=o-(u-1)/2,a=0;d>a;a++)r=m.left+a*v,l=a-(d-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-a*v,top:-o*_}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:_,left:r+(g?l*v:0),top:h+(g?c*_:0),opacity:g?0:1}).animate({left:r+(g?0:l*v),top:h+(g?0:c*_),opacity:g?1:0},e.duration||500,e.easing,s)}}(jQuery),function(t){t.effects.effect.fade=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"toggle");s.animate({opacity:n},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}}(jQuery),function(t){t.effects.effect.fold=function(e,i){var s,n,o=t(this),a=["position","top","bottom","left","right","height","width"],r=t.effects.setMode(o,e.mode||"hide"),h="show"===r,l="hide"===r,c=e.size||15,u=/([0-9]+)%/.exec(c),d=!!e.horizFirst,p=h!==d,f=p?["width","height"]:["height","width"],g=e.duration/2,m={},v={};t.effects.save(o,a),o.show(),s=t.effects.createWrapper(o).css({overflow:"hidden"}),n=p?[s.width(),s.height()]:[s.height(),s.width()],u&&(c=parseInt(u[1],10)/100*n[l?0:1]),h&&s.css(d?{height:0,width:c}:{height:c,width:0}),m[f[0]]=h?n[0]:c,v[f[1]]=h?n[1]:0,s.animate(m,g,e.easing).animate(v,g,e.easing,function(){l&&o.hide(),t.effects.restore(o,a),t.effects.removeWrapper(o),i()})}}(jQuery),function(t){t.effects.effect.highlight=function(e,i){var s=t(this),n=["backgroundImage","backgroundColor","opacity"],o=t.effects.setMode(s,e.mode||"show"),a={backgroundColor:s.css("backgroundColor")};"hide"===o&&(a.opacity=0),t.effects.save(s,n),s.show().css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(a,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&s.hide(),t.effects.restore(s,n),i()}})}}(jQuery),function(t){t.effects.effect.pulsate=function(e,i){var s,n=t(this),o=t.effects.setMode(n,e.mode||"show"),a="show"===o,r="hide"===o,h=a||"hide"===o,l=2*(e.times||5)+(h?1:0),c=e.duration/l,u=0,d=n.queue(),p=d.length;for((a||!n.is(":visible"))&&(n.css("opacity",0).show(),u=1),s=1;l>s;s++)n.animate({opacity:u},c,e.easing),u=1-u;n.animate({opacity:u},c,e.easing),n.queue(function(){r&&n.hide(),i()}),p>1&&d.splice.apply(d,[1,0].concat(d.splice(p,l+1))),n.dequeue()}}(jQuery),function(t){t.effects.effect.puff=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"hide"),o="hide"===n,a=parseInt(e.percent,10)||150,r=a/100,h={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()};t.extend(e,{effect:"scale",queue:!1,fade:!0,mode:n,complete:i,percent:o?a:100,from:o?h:{height:h.height*r,width:h.width*r,outerHeight:h.outerHeight*r,outerWidth:h.outerWidth*r}}),s.effect(e)},t.effects.effect.scale=function(e,i){var s=t(this),n=t.extend(!0,{},e),o=t.effects.setMode(s,e.mode||"effect"),a=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"hide"===o?0:100),r=e.direction||"both",h=e.origin,l={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()},c={y:"horizontal"!==r?a/100:1,x:"vertical"!==r?a/100:1};n.effect="size",n.queue=!1,n.complete=i,"effect"!==o&&(n.origin=h||["middle","center"],n.restore=!0),n.from=e.from||("show"===o?{height:0,width:0,outerHeight:0,outerWidth:0}:l),n.to={height:l.height*c.y,width:l.width*c.x,outerHeight:l.outerHeight*c.y,outerWidth:l.outerWidth*c.x},n.fade&&("show"===o&&(n.from.opacity=0,n.to.opacity=1),"hide"===o&&(n.from.opacity=1,n.to.opacity=0)),s.effect(n)},t.effects.effect.size=function(e,i){var s,n,o,a=t(this),r=["position","top","bottom","left","right","width","height","overflow","opacity"],h=["position","top","bottom","left","right","overflow","opacity"],l=["width","height","overflow"],c=["fontSize"],u=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],d=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=t.effects.setMode(a,e.mode||"effect"),f=e.restore||"effect"!==p,g=e.scale||"both",m=e.origin||["middle","center"],v=a.css("position"),_=f?r:h,b={height:0,width:0,outerHeight:0,outerWidth:0};"show"===p&&a.show(),s={height:a.height(),width:a.width(),outerHeight:a.outerHeight(),outerWidth:a.outerWidth()},"toggle"===e.mode&&"show"===p?(a.from=e.to||b,a.to=e.from||s):(a.from=e.from||("show"===p?b:s),a.to=e.to||("hide"===p?b:s)),o={from:{y:a.from.height/s.height,x:a.from.width/s.width},to:{y:a.to.height/s.height,x:a.to.width/s.width}},("box"===g||"both"===g)&&(o.from.y!==o.to.y&&(_=_.concat(u),a.from=t.effects.setTransition(a,u,o.from.y,a.from),a.to=t.effects.setTransition(a,u,o.to.y,a.to)),o.from.x!==o.to.x&&(_=_.concat(d),a.from=t.effects.setTransition(a,d,o.from.x,a.from),a.to=t.effects.setTransition(a,d,o.to.x,a.to))),("content"===g||"both"===g)&&o.from.y!==o.to.y&&(_=_.concat(c).concat(l),a.from=t.effects.setTransition(a,c,o.from.y,a.from),a.to=t.effects.setTransition(a,c,o.to.y,a.to)),t.effects.save(a,_),a.show(),t.effects.createWrapper(a),a.css("overflow","hidden").css(a.from),m&&(n=t.effects.getBaseline(m,s),a.from.top=(s.outerHeight-a.outerHeight())*n.y,a.from.left=(s.outerWidth-a.outerWidth())*n.x,a.to.top=(s.outerHeight-a.to.outerHeight)*n.y,a.to.left=(s.outerWidth-a.to.outerWidth)*n.x),a.css(a.from),("content"===g||"both"===g)&&(u=u.concat(["marginTop","marginBottom"]).concat(c),d=d.concat(["marginLeft","marginRight"]),l=r.concat(u).concat(d),a.find("*[width]").each(function(){var i=t(this),s={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};f&&t.effects.save(i,l),i.from={height:s.height*o.from.y,width:s.width*o.from.x,outerHeight:s.outerHeight*o.from.y,outerWidth:s.outerWidth*o.from.x},i.to={height:s.height*o.to.y,width:s.width*o.to.x,outerHeight:s.height*o.to.y,outerWidth:s.width*o.to.x},o.from.y!==o.to.y&&(i.from=t.effects.setTransition(i,u,o.from.y,i.from),i.to=t.effects.setTransition(i,u,o.to.y,i.to)),o.from.x!==o.to.x&&(i.from=t.effects.setTransition(i,d,o.from.x,i.from),i.to=t.effects.setTransition(i,d,o.to.x,i.to)),i.css(i.from),i.animate(i.to,e.duration,e.easing,function(){f&&t.effects.restore(i,l)})})),a.animate(a.to,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){0===a.to.opacity&&a.css("opacity",a.from.opacity),"hide"===p&&a.hide(),t.effects.restore(a,_),f||("static"===v?a.css({position:"relative",top:a.to.top,left:a.to.left}):t.each(["top","left"],function(t,e){a.css(e,function(e,i){var s=parseInt(i,10),n=t?a.to.left:a.to.top;return"auto"===i?n+"px":s+n+"px"})})),t.effects.removeWrapper(a),i()}})}}(jQuery),function(t){t.effects.effect.shake=function(e,i){var s,n=t(this),o=["position","top","bottom","left","right","height","width"],a=t.effects.setMode(n,e.mode||"effect"),r=e.direction||"left",h=e.distance||20,l=e.times||3,c=2*l+1,u=Math.round(e.duration/c),d="up"===r||"down"===r?"top":"left",p="up"===r||"left"===r,f={},g={},m={},v=n.queue(),_=v.length;for(t.effects.save(n,o),n.show(),t.effects.createWrapper(n),f[d]=(p?"-=":"+=")+h,g[d]=(p?"+=":"-=")+2*h,m[d]=(p?"-=":"+=")+2*h,n.animate(f,u,e.easing),s=1;l>s;s++)n.animate(g,u,e.easing).animate(m,u,e.easing);n.animate(g,u,e.easing).animate(f,u/2,e.easing).queue(function(){"hide"===a&&n.hide(),t.effects.restore(n,o),t.effects.removeWrapper(n),i()}),_>1&&v.splice.apply(v,[1,0].concat(v.splice(_,c+1))),n.dequeue()}}(jQuery),function(t){t.effects.effect.slide=function(e,i){var s,n=t(this),o=["position","top","bottom","left","right","width","height"],a=t.effects.setMode(n,e.mode||"show"),r="show"===a,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h,u={};t.effects.save(n,o),n.show(),s=e.distance||n["top"===l?"outerHeight":"outerWidth"](!0),t.effects.createWrapper(n).css({overflow:"hidden"}),r&&n.css(l,c?isNaN(s)?"-"+s:-s:s),u[l]=(r?c?"+=":"-=":c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===a&&n.hide(),t.effects.restore(n,o),t.effects.removeWrapper(n),i()}})}}(jQuery),function(t){t.effects.effect.transfer=function(e,i){var s=t(this),n=t(e.to),o="fixed"===n.css("position"),a=t("body"),r=o?a.scrollTop():0,h=o?a.scrollLeft():0,l=n.offset(),c={top:l.top-r,left:l.left-h,height:n.innerHeight(),width:n.innerWidth()},u=s.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(e.className).css({top:u.top-r,left:u.left-h,height:s.innerHeight(),width:s.innerWidth(),position:o?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),i()})}}(jQuery),function(t){t.widget("ui.menu",{version:"1.10.3",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,t.proxy(function(t){this.options.disabled&&t.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(t){t.preventDefault()},"click .ui-state-disabled > a":function(t){t.preventDefault()},"click .ui-menu-item:has(a)":function(e){var i=t(e.target).closest(".ui-menu-item");!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.mouseHandled=!0,this.select(e),i.has(".ui-menu").length?this.expand(e):this.element.is(":focus")||(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){var i=t(e.currentTarget);i.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(e,i)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.children(".ui-menu-item").eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){t.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){t(e.target).closest(".ui-menu").length||this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=t(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){function i(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var s,n,o,a,r,h=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:h=!1,n=this.previousFilter||"",o=String.fromCharCode(e.keyCode),a=!1,clearTimeout(this.filterTimer),o===n?a=!0:o=n+o,r=RegExp("^"+i(o),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())}),s=a&&-1!==s.index(this.active.next())?this.active.nextAll(".ui-menu-item"):s,s.length||(o=String.fromCharCode(e.keyCode),r=RegExp("^"+i(o),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())})),s.length?(this.focus(e,s),s.length>1?(this.previousFilter=o,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}h&&e.preventDefault()},_activate:function(t){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i=this.options.icons.submenu,s=this.element.find(this.options.menus);s.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),s=e.prev("a"),n=t("<span>").addClass("ui-menu-icon ui-icon "+i).data("ui-menu-submenu-carat",!0);s.attr("aria-haspopup","true").prepend(n),e.attr("aria-labelledby",s.attr("id"))}),e=s.add(this.element),e.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),e.children(":not(.ui-menu-item)").each(function(){var e=t(this);/[^\-\u2014\u2013\s]/.test(e.text())||e.addClass("ui-widget-content ui-menu-divider")}),e.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){"icons"===t&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(e.submenu),this._super(t,e)},focus:function(t,e){var i,s;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,o,a,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),r=e.height(),0>n?this.activeMenu.scrollTop(o+n):n+r>a&&this.activeMenu.scrollTop(o+n-a+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",t,{item:this.active}))},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.children(".ui-menu-item")[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())),undefined):(this.next(e),undefined)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item").first())),undefined):(this.next(e),undefined)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)}})}(jQuery),function(t,e){function i(t,e,i){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?i/100:1)]}function s(e,i){return parseInt(t.css(e,i),10)||0}function n(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var o,a=Math.max,r=Math.abs,h=Math.round,l=/left|center|right/,c=/top|center|bottom/,u=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(o!==e)return o;var i,s,n=t("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),a=n.children()[0];return t("body").append(n),i=a.offsetWidth,n.css("overflow","scroll"),s=a.offsetWidth,i===s&&(s=n[0].clientWidth),n.remove(),o=i-s},getScrollInfo:function(e){var i=e.isWindow?"":e.element.css("overflow-x"),s=e.isWindow?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,o="scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight;return{width:o?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]);return{element:i,isWindow:s,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:s?i.width():i.outerWidth(),height:s?i.height():i.outerHeight()}}},t.fn.position=function(e){if(!e||!e.of)return f.apply(this,arguments);e=t.extend({},e);var o,p,g,m,v,_,b=t(e.of),y=t.position.getWithinInfo(e.within),w=t.position.getScrollInfo(y),k=(e.collision||"flip").split(" "),x={};return _=n(b),b[0].preventDefault&&(e.at="left top"),p=_.width,g=_.height,m=_.offset,v=t.extend({},m),t.each(["my","at"],function(){var t,i,s=(e[this]||"").split(" ");1===s.length&&(s=l.test(s[0])?s.concat(["center"]):c.test(s[0])?["center"].concat(s):["center","center"]),s[0]=l.test(s[0])?s[0]:"center",s[1]=c.test(s[1])?s[1]:"center",t=u.exec(s[0]),i=u.exec(s[1]),x[this]=[t?t[0]:0,i?i[0]:0],e[this]=[d.exec(s[0])[0],d.exec(s[1])[0]]}),1===k.length&&(k[1]=k[0]),"right"===e.at[0]?v.left+=p:"center"===e.at[0]&&(v.left+=p/2),"bottom"===e.at[1]?v.top+=g:"center"===e.at[1]&&(v.top+=g/2),o=i(x.at,p,g),v.left+=o[0],v.top+=o[1],this.each(function(){var n,l,c=t(this),u=c.outerWidth(),d=c.outerHeight(),f=s(this,"marginLeft"),_=s(this,"marginTop"),D=u+f+s(this,"marginRight")+w.width,C=d+_+s(this,"marginBottom")+w.height,I=t.extend({},v),P=i(x.my,c.outerWidth(),c.outerHeight());"right"===e.my[0]?I.left-=u:"center"===e.my[0]&&(I.left-=u/2),"bottom"===e.my[1]?I.top-=d:"center"===e.my[1]&&(I.top-=d/2),I.left+=P[0],I.top+=P[1],t.support.offsetFractions||(I.left=h(I.left),I.top=h(I.top)),n={marginLeft:f,marginTop:_},t.each(["left","top"],function(i,s){t.ui.position[k[i]]&&t.ui.position[k[i]][s](I,{targetWidth:p,targetHeight:g,elemWidth:u,elemHeight:d,collisionPosition:n,collisionWidth:D,collisionHeight:C,offset:[o[0]+P[0],o[1]+P[1]],my:e.my,at:e.at,within:y,elem:c})}),e.using&&(l=function(t){var i=m.left-I.left,s=i+p-u,n=m.top-I.top,o=n+g-d,h={target:{element:b,left:m.left,top:m.top,width:p,height:g},element:{element:c,left:I.left,top:I.top,width:u,height:d},horizontal:0>s?"left":i>0?"right":"center",vertical:0>o?"top":n>0?"bottom":"middle"};u>p&&p>r(i+s)&&(h.horizontal="center"),d>g&&g>r(n+o)&&(h.vertical="middle"),h.important=a(r(i),r(s))>a(r(n),r(o))?"horizontal":"vertical",e.using.call(this,t,h)}),c.offset(t.extend(I,{using:l}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,o=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-o-n;e.collisionWidth>o?h>0&&0>=l?(i=t.left+h+e.collisionWidth-o-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+o-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=a(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,o=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-o-n;e.collisionHeight>o?h>0&&0>=l?(i=t.top+h+e.collisionHeight-o-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+o-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=a(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,a=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-a-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-a-o,(0>i||r(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,(s>0||u>r(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,a=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-a-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(s=t.top+p+f+g+e.collisionHeight-a-o,t.top+p+f+g>c&&(0>s||r(c)>s)&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-h,t.top+p+f+g>u&&(i>0||u>r(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,i,s,n,o,a=document.getElementsByTagName("body")[0],r=document.createElement("div");e=document.createElement(a?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},a&&t.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(o in s)e.style[o]=s[o];e.appendChild(r),i=a||document.documentElement,i.insertBefore(e,i.firstChild),r.style.cssText="position: absolute; left: 10.7432222px;",n=t(r).offset().left,t.support.offsetFractions=n>10&&11>n,e.innerHTML="",i.removeChild(e)}()}(jQuery),function(t,e){t.widget("ui.progressbar",{version:"1.10.3",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=t("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()
+},value:function(t){return t===e?this.options.value:(this.options.value=this._constrainedValue(t),this._refreshValue(),e)},_constrainedValue:function(t){return t===e&&(t=this.options.value),this.indeterminate=t===!1,"number"!=typeof t&&(t=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).toggleClass("ui-corner-right",e===this.options.max).width(i.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}})}(jQuery),function(t){var e=5;t.widget("ui.slider",t.ui.mouse,{version:"1.10.3",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),o="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",a=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)a.push(o);this.handles=n.add(t(a.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e)})},_createRange:function(){var e=this.options,i="";e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=t("<div></div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===e.range||"max"===e.range?" ui-slider-range-"+e.range:""))):this.range=t([])},_setupEvents:function(){var t=this.handles.add(this.range).filter("a");this._off(t),this._on(t,this._handleEvents),this._hoverable(t),this._focusable(t)},_destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,o,a,r,h,l,c=this,u=this.options;return u.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-c.values(e));(n>i||n===i&&(e===c._lastChangedValue||c.values(e)===u.min))&&(n=i,o=t(this),a=e)}),r=this._start(e,a),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=a,o.addClass("ui-state-active").focus(),h=o.offset(),l=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:e.pageX-h.left-o.width()/2,top:e.pageY-h.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,a,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,o;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),o=this._valueMin()+s*n,this._trimAlignValue(o)},_start:function(t,e){var i={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("start",t,i)},_slide:function(t,e,i){var s,n,o;this.options.values&&this.options.values.length?(s=this.values(e?0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&i>s||1===e&&s>i)&&(i=s),i!==this.values(e)&&(n=this.values(),n[e]=i,o=this._trigger("slide",t,{handle:this.handles[e],value:i,values:n}),s=this.values(e?0:1),o!==!1&&this.values(e,i,!0))):i!==this.value()&&(o=this._trigger("slide",t,{handle:this.handles[e],value:i}),o!==!1&&this.value(i))},_stop:function(t,e){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("stop",t,i)},_change:function(t,e){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._lastChangedValue=e,this._trigger("change",t,i)}},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),undefined):this._value()},values:function(e,i){var s,n,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),undefined;if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(s=this.options.values,n=arguments[0],o=0;s.length>o;o+=1)s[o]=this._trimAlignValue(n[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),t.Widget.prototype._setOption.apply(this,arguments),e){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=0;n>s;s+=1)this._change(null,s);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var e,i,s,n,o,a=this.options.range,r=this.options,h=this,l=this._animateOff?!1:r.animate,c={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=100*((h.values(s)-h._valueMin())/(h._valueMax()-h._valueMin())),c["horizontal"===h.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[l?"animate":"css"](c,r.animate),h.options.range===!0&&("horizontal"===h.orientation?(0===s&&h.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&h.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),o=this._valueMax(),i=o!==n?100*((s-n)/(o-n)):0,c["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](c,r.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},r.animate),"max"===a&&"horizontal"===this.orientation&&this.range[l?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:r.animate}),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},r.animate),"max"===a&&"vertical"===this.orientation&&this.range[l?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:r.animate}))},_handleEvents:{keydown:function(i){var s,n,o,a,r=t(i.target).data("ui-slider-handle-index");switch(i.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(i.preventDefault(),!this._keySliding&&(this._keySliding=!0,t(i.target).addClass("ui-state-active"),s=this._start(i,r),s===!1))return}switch(a=this.options.step,n=o=this.options.values&&this.options.values.length?this.values(r):this.value(),i.keyCode){case t.ui.keyCode.HOME:o=this._valueMin();break;case t.ui.keyCode.END:o=this._valueMax();break;case t.ui.keyCode.PAGE_UP:o=this._trimAlignValue(n+(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.PAGE_DOWN:o=this._trimAlignValue(n-(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(n===this._valueMax())return;o=this._trimAlignValue(n+a);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(n===this._valueMin())return;o=this._trimAlignValue(n-a)}this._slide(i,r,o)},click:function(t){t.preventDefault()},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),t(e.target).removeClass("ui-state-active"))}}})}(jQuery),function(t){function e(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.widget("ui.spinner",{version:"1.10.3",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e={},i=this.element;return t.each(["min","max","step"],function(t,s){var n=i.attr(s);void 0!==n&&n.length&&(e[s]=n)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t),void 0)},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){var t=this.element[0]===this.document[0].activeElement;t||(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return t(e.currentTarget).hasClass("ui-state-active")?this._start(e)===!1?!1:(this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var t=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=t.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*t.height())&&t.height()>0&&t.height(t.height()),this.options.disabled&&this.disable()},_keydown:function(e){var i=this.options,s=t.ui.keyCode;switch(e.keyCode){case s.UP:return this._repeat(null,1,e),!0;case s.DOWN:return this._repeat(null,-1,e),!0;case s.PAGE_UP:return this._repeat(null,i.page,e),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>&#9650;</span>"+"</a>"+"<a class='ui-spinner-button ui-spinner-down ui-corner-br'>"+"<span class='ui-icon "+this.options.icons.down+"'>&#9660;</span>"+"</a>"},_start:function(t){return this.spinning||this._trigger("start",t)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,s=this.options;return e=null!==s.min?s.min:0,i=t-e,i=Math.round(i/s.step)*s.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==s.max&&t>s.max?s.max:null!==s.min&&s.min>t?s.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){if("culture"===t||"numberFormat"===t){var i=this._parse(this.element.val());return this.options[t]=e,this.element.val(this._format(i)),void 0}("max"===t||"min"===t||"step"===t)&&"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(e.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(e.down)),this._super(t,e),"disabled"===t&&(e?(this.element.prop("disabled",!0),this.buttons.button("disable")):(this.element.prop("disabled",!1),this.buttons.button("enable")))},_setOptions:e(function(t){this._super(t),this._value(this.element.val())}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},_value:function(t,e){var i;""!==t&&(i=this._parse(t),null!==i&&(e||(i=this._adjustValue(i)),t=this._format(i))),this.element.val(t),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:e(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:e(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:e(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:e(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?(e(this._value).call(this,t),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}})}(jQuery),function(t,e){function i(){return++n}function s(t){return t.hash.length>1&&decodeURIComponent(t.href.replace(o,""))===decodeURIComponent(location.href.replace(o,""))}var n=0,o=/#.*$/;t.widget("ui.tabs",{version:"1.10.3",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var e=this,i=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",i.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var i=this.options.active,s=this.options.collapsible,n=location.hash.substring(1);return null===i&&(n&&this.tabs.each(function(s,o){return t(o).attr("aria-controls")===n?(i=s,!1):e}),null===i&&(i=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===i||-1===i)&&(i=this.tabs.length?0:!1)),i!==!1&&(i=this.tabs.index(this.tabs.eq(i)),-1===i&&(i=s?!1:0)),!s&&i===!1&&this.anchors.length&&(i=0),i},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(i){var s=t(this.document[0].activeElement).closest("li"),n=this.tabs.index(s),o=!0;if(!this._handlePageNav(i)){switch(i.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:n++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:o=!1,n--;break;case t.ui.keyCode.END:n=this.anchors.length-1;break;case t.ui.keyCode.HOME:n=0;break;case t.ui.keyCode.SPACE:return i.preventDefault(),clearTimeout(this.activating),this._activate(n),e;case t.ui.keyCode.ENTER:return i.preventDefault(),clearTimeout(this.activating),this._activate(n===this.options.active?!1:n),e;default:return}i.preventDefault(),clearTimeout(this.activating),n=this._focusNextTab(n,o),i.ctrlKey||(s.attr("aria-selected","false"),this.tabs.eq(n).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",n)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.focus())},_handlePageNav:function(i){return i.altKey&&i.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):i.altKey&&i.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):e},_findNextTab:function(e,i){function s(){return e>n&&(e=0),0>e&&(e=n),e}for(var n=this.tabs.length-1;-1!==t.inArray(s(),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).focus(),t},_setOption:function(t,i){return"active"===t?(this._activate(i),e):"disabled"===t?(this._setupDisabled(i),e):(this._super(t,i),"collapsible"===t&&(this.element.toggleClass("ui-tabs-collapsible",i),i||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(i),"heightStyle"===t&&this._setupHeightStyle(i),e)},_tabId:function(t){return t.attr("aria-controls")||"ui-tabs-"+i()},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist"),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=t(),this.anchors.each(function(i,n){var o,a,r,h=t(n).uniqueId().attr("id"),l=t(n).closest("li"),c=l.attr("aria-controls");s(n)?(o=n.hash,a=e.element.find(e._sanitizeSelector(o))):(r=e._tabId(l),o="#"+r,a=e.element.find(o),a.length||(a=e._createPanel(r),a.insertAfter(e.panels[i-1]||e.tablist)),a.attr("aria-live","polite")),a.length&&(e.panels=e.panels.add(a)),c&&l.data("ui-tabs-aria-controls",c),l.attr({"aria-controls":o.substring(1),"aria-labelledby":h}),a.attr("aria-labelledby",h)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.element.find("ol,ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(e){t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1);for(var i,s=0;i=this.tabs[s];s++)e===!0||-1!==t.inArray(s,e)?t(i).addClass("ui-state-disabled").attr("aria-disabled","true"):t(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=e},_setupEvents:function(e){var i={click:function(t){t.preventDefault()}};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,s=this.element.parent();"fill"===e?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),o=n.closest("li"),a=o[0]===s[0],r=a&&i.collapsible,h=r?t():this._getPanelForTab(o),l=s.length?this._getPanelForTab(s):t(),c={oldTab:s,oldPanel:l,newTab:r?t():o,newPanel:h};e.preventDefault(),o.hasClass("ui-state-disabled")||o.hasClass("ui-tabs-loading")||this.running||a&&!i.collapsible||this._trigger("beforeActivate",e,c)===!1||(i.active=r?!1:this.tabs.index(o),this.active=a?t():o,this.xhr&&this.xhr.abort(),l.length||h.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(o),e),this._toggle(e,c))},_toggle:function(e,i){function s(){o.running=!1,o._trigger("activate",e,i)}function n(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),a.length&&o.options.show?o._show(a,o.options.show,s):(a.show(),s())}var o=this,a=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),n()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),r.hide(),n()),r.attr({"aria-expanded":"false","aria-hidden":"true"}),i.oldTab.attr("aria-selected","false"),a.length&&r.length?i.oldTab.attr("tabIndex",-1):a.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),a.attr({"aria-expanded":"true","aria-hidden":"false"}),i.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(e){var i,s=this._findActive(e);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+t+"']"))),t},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var s=this.options.disabled;s!==!1&&(i===e?s=!1:(i=this._getIndex(i),s=t.isArray(s)?t.map(s,function(t){return t!==i?t:null}):t.map(this.tabs,function(t,e){return e!==i?e:null})),this._setupDisabled(s))},disable:function(i){var s=this.options.disabled;if(s!==!0){if(i===e)s=!0;else{if(i=this._getIndex(i),-1!==t.inArray(i,s))return;s=t.isArray(s)?t.merge([i],s).sort():[i]}this._setupDisabled(s)}},load:function(e,i){e=this._getIndex(e);var n=this,o=this.tabs.eq(e),a=o.find(".ui-tabs-anchor"),r=this._getPanelForTab(o),h={tab:o,panel:r};s(a[0])||(this.xhr=t.ajax(this._ajaxSettings(a,i,h)),this.xhr&&"canceled"!==this.xhr.statusText&&(o.addClass("ui-tabs-loading"),r.attr("aria-busy","true"),this.xhr.success(function(t){setTimeout(function(){r.html(t),n._trigger("load",i,h)},1)}).complete(function(t,e){setTimeout(function(){"abort"===e&&n.panels.stop(!1,!0),o.removeClass("ui-tabs-loading"),r.removeAttr("aria-busy"),t===n.xhr&&delete n.xhr},1)})))},_ajaxSettings:function(e,i,s){var n=this;return{url:e.attr("href"),beforeSend:function(e,o){return n._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:o},s))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}})}(jQuery),function(t){function e(e,i){var s=(e.attr("aria-describedby")||"").split(/\s+/);s.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(s.join(" ")))}function i(e){var i=e.data("ui-tooltip-id"),s=(e.attr("aria-describedby")||"").split(/\s+/),n=t.inArray(i,s);-1!==n&&s.splice(n,1),e.removeData("ui-tooltip-id"),s=t.trim(s.join(" ")),s?e.attr("aria-describedby",s):e.removeAttr("aria-describedby")}var s=0;t.widget("ui.tooltip",{version:"1.10.3",options:{content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable()},_setOption:function(e,i){var s=this;return"disabled"===e?(this[i?"_disable":"_enable"](),this.options[e]=i,void 0):(this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){s._updateContent(e)}),void 0)},_disable:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0)}),this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.is("[title]")&&e.data("ui-tooltip-title",e.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))})},open:function(e){var i=this,s=t(e?e.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&s.parents().each(function(){var e,s=t(this);s.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._updateContent(s,e))},_updateContent:function(t,e){var i,s=this.options.content,n=this,o=e?e.type:null;return"string"==typeof s?this._open(e,t,s):(i=s.call(t[0],function(i){t.data("ui-tooltip-open")&&n._delay(function(){e&&(e.type=o),this._open(e,t,i)})}),i&&this._open(e,t,i),void 0)},_open:function(i,s,n){function o(t){l.of=t,a.is(":hidden")||a.position(l)}var a,r,h,l=t.extend({},this.options.position);
+if(n){if(a=this._find(s),a.length)return a.find(".ui-tooltip-content").html(n),void 0;s.is("[title]")&&(i&&"mouseover"===i.type?s.attr("title",""):s.removeAttr("title")),a=this._tooltip(s),e(s,a.attr("id")),a.find(".ui-tooltip-content").html(n),this.options.track&&i&&/^mouse/.test(i.type)?(this._on(this.document,{mousemove:o}),o(i)):a.position(t.extend({of:s},this.options.position)),a.hide(),this._show(a,this.options.show),this.options.show&&this.options.show.delay&&(h=this.delayedShow=setInterval(function(){a.is(":visible")&&(o(l.of),clearInterval(h))},t.fx.interval)),this._trigger("open",i,{tooltip:a}),r={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var i=t.Event(e);i.currentTarget=s[0],this.close(i,!0)}},remove:function(){this._removeTooltip(a)}},i&&"mouseover"!==i.type||(r.mouseleave="close"),i&&"focusin"!==i.type||(r.focusout="close"),this._on(!0,s,r)}},close:function(e){var s=this,n=t(e?e.currentTarget:this.element),o=this._find(n);this.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&n.attr("title",n.data("ui-tooltip-title")),i(n),o.stop(!0),this._hide(o,this.options.hide,function(){s._removeTooltip(t(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete s.parents[e]}),this.closing=!0,this._trigger("close",e,{tooltip:o}),this.closing=!1)},_tooltip:function(e){var i="ui-tooltip-"+s++,n=t("<div>").attr({id:i,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return t("<div>").addClass("ui-tooltip-content").appendTo(n),n.appendTo(this.document[0].body),this.tooltips[i]=e,n},_find:function(e){var i=e.data("ui-tooltip-id");return i?t("#"+i):t()},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0),t("#"+i).remove(),s.data("ui-tooltip-title")&&(s.attr("title",s.data("ui-tooltip-title")),s.removeData("ui-tooltip-title"))})}})}(jQuery); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/changelog.txt b/mayor-orig/www/skin/classic/share/javascript/koschtit/changelog.txt
new file mode 100644
index 00000000..cf9c8772
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/changelog.txt
@@ -0,0 +1,81 @@
+
+ MaYoR változat - released 2012-11-04
+ ki_config/ki_setup: szövegek magyar fordítása
+
+ ---------
+ KoschtIT Image Gallery v3.1b released on 10/05/2012
+ by Konstantin Tabere
+
+ Changelog
+ ---------
+
+ Fixed: Problem with manual display order of picture gets lost ( /thread-422.html )
+
+//---------------------------------------------------------------------------------------
+
+ Old Releases:
+
+ v3.1
+ - Added: Drag'n'drop in the admin panel for changing position of images in gallery
+ - Added: Deleting images animation
+ - Added: Tooltips in admin panel
+ - Added: Link to documentation in admin panel
+ - Added: New parameter $show_explorer for enabling/disabling gallery explorer
+ - Added: "Manage folder"-section in admin panel for easy managing of gallery folders
+ - Added: "Label Images" in admin menu with tooltips for new users
+ - Added: Email notifications if somebody comments on an image ($admin_mail)
+ - Added: Many new parameters ($show_explorer, $th_shadow, $vcomm..., $admin_mail...)
+ - Added: Language support for flipped images ($vcomm - params)
+ - Added: Viewer comments moderation ($moderate_posts - parameter)
+ - Added: New animation when a new user comment is made
+ - Added: User account (?user=user) with image uploading rights
+ - Changed: Redesigned viewer comments section
+ - Changed: Admin password is saved and transmitted only in md5-format now
+ - Changed: Preview pictures stay hidden if there is not enough browser window width (4:3 format)
+ - Changed: Admin menu slides out in "Settings" and "Manage folders" for not blocking the content behind it
+ - Fixed: Some smaller bugs
+ - Removed: AddThis Social Bookmarks
+
+ v3.0
+ - Added: "Deleting Images" in admin panel
+ - Added: Some nicer image borders and shadows
+ - Added: AddThis social bookmarking service for sharing
+ - Added: Default values for missing parameters
+ - Added: Changable maximum image size on image upload
+ - Added: Addable watermarks on image upload
+ - Changed: Navigation icons below thumbnails don't consume space if hidden
+ - Changed: Looks of admin pages
+ - Changed: New default design
+ - Changed: Navigation icons
+ - Fixed: Split()-function deprecated warnings since PHP5.3
+ - Fixed: Some smaller bugs ...
+
+ Last v2.X update:
+
+ v2.6
+ - Added: Some more CSS Shadows
+ - Added: Caching of folder scan results: much faster folder scans possible
+ - Added: Enable/Disable - settings in the admin-panel
+ - Added: Admin can delete viewer comments
+ - Added: Picture uploading through admin-panel
+ - Added: New parameter ($image_nav_always) in "ki_setup.php"
+ - Changed: No-JavaScript gallery reworked: looks and feels almost like JS-enabled gallery now
+ - Changed: Position of "Close"-button when $nav_style = 2
+ - Fixed: Navigation icons for displayed images sometimes not centered
+ - Fixed: Navigation icons sometimes in vertical order instead of horicontal
+ - Fixed: Images didn't show up cause of corrupted meta-information (fix in ki_makepic.php)
+ - Fixed: Loading animation stops
+ - Fixed: "ERROR: ... needs too much memory" on some server configurations ( /forum/thread-120.html )
+ - Fixed: Thumbs getting blurred on mouseover
+ - Fixed: Some smaller bugs ...
+ - Removed: Icon for "back to Website" (not needed anymore)
+
+ Last v1.X update:
+
+ v1.82
+ - Fixed: Comment was visible while closing slideshow
+ - Fixed: Problems with different charsets e.g. "default_charset=iso-8859-1"
+ - Fixed: Galleries don't expand page on startup anymore
+ - Fixed: Some security issues
+ - Added: HTML viewing mode when JavaScript disabled
+
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/custom b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/custom
new file mode 100644
index 00000000..860c9b2e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/custom
@@ -0,0 +1 @@
+kos-epulet_iskolahomlokzat1.jpg=0.14388489208633093|kos-epulet_iskolahomlokzat1-k.jpg=0.2805755395683453 \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_arrow.php b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_arrow.php
new file mode 100644
index 00000000..7f410652
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_arrow.php
@@ -0,0 +1,101 @@
+<?php
+if(!isset($_GET['ot']))
+ exit();
+else
+ $ot = $_GET['ot'];
+
+
+function imageBoldLine($resource, $x1, $y1, $x2, $y2, $Color, $BoldNess=2)
+{
+ $center = round($BoldNess/2);
+ for($i=0;$i<$BoldNess;$i++)
+ {
+ $a = $center-$i; if($a<0){$a -= $a;}
+ for($j=0;$j<$BoldNess;$j++)
+ {
+ $b = $center-$j; if($b<0){$b -= $b;}
+ $c = sqrt($a*$a + $b*$b);
+ if($c<=$BoldNess)
+ {
+ imageline($resource, $x1 +$i, $y1+$j, $x2 +$i, $y2+$j, $Color);
+ }
+ }
+ }
+}
+
+
+
+
+
+include_once("../ki_config/ki_setup.php");
+
+if($ot == 0){
+ $polygon = array(25,25, 5,15, 25,5);
+ $polygon2 = array(26,25, 5,15, 26,5);
+}elseif($ot == 1){
+ $polygon = array(25,25, 15,5, 5,25);
+ $polygon2 = array(25,26, 15,5, 5,26);
+}elseif($ot == 2){
+ $polygon = array(5,25, 25,15, 5,5);
+ $polygon2 = array(4,25, 25,15, 4,5);
+}else{
+ $polygon = array(25,5, 15,25, 5,5);
+ $polygon2 = array(25,4, 15,25, 5,4);
+}
+
+
+header("Content-type: image/png"); //Picture Format
+header("Expires: Mon, 01 Jul 2003 00:00:00 GMT"); // Past date
+header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // Consitnuously modified
+header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
+header("Pragma: no-cache"); // NO CACHE
+
+
+$browser = $_SERVER['HTTP_USER_AGENT'];
+
+if(preg_match("/Opera/",$browser))
+ $browser = "opera";
+elseif(preg_match("/MSIE [7-9]/",$browser))
+ $browser = "ie7";
+elseif(preg_match("/MSIE [1-6]/",$browser))
+ $browser = "ie6";
+elseif(preg_match("/AppleWebKit/",$browser))
+ $browser = "webkit";
+else
+ $browser = "gecko";
+
+if($browser === "ie6"){
+ $bild = imagecreatetruecolor(30, 30);
+} else {
+ $bild = imagecreate(30, 30);
+}
+
+imagealphablending($bild, false);
+imagesavealpha($bild, true);
+
+if(function_exists('imageantialias')){
+ imageantialias($bild, true);
+}
+
+$transparent = imagecolorallocatealpha($bild, 0, 0, 0, 127);
+imagefilledrectangle($bild, 0, 0, 30, 30, $transparent);
+imagecolortransparent($bild, $transparent);
+
+$r = hexdec(substr($bord_color, 1, 2));
+$g = hexdec(substr($bord_color, 3, 2));
+$b = hexdec(substr($bord_color, 5, 2));
+$farbe = imagecolorallocatealpha($bild, $r, $g, $b, 0);
+imagefilledpolygon($bild, $polygon2, 3, $farbe);
+
+$r = hexdec(substr($nav_border_color, 1, 2));
+$g = hexdec(substr($nav_border_color, 3, 2));
+$b = hexdec(substr($nav_border_color, 5, 2));
+$farbe = imagecolorallocatealpha($bild, $r, $g, $b, 255);
+
+for($i = 0; $i < 3; $i+=2){
+ imageBoldLine($bild, $polygon[$i], $polygon[$i+1], $polygon[$i+2], $polygon[$i+3], $farbe, 2);
+}
+
+imagepng($bild);
+imagedestroy($bild);
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_back.png b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_back.png
new file mode 100644
index 00000000..26bbb975
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_back.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_cellid.php b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_cellid.php
new file mode 100644
index 00000000..2911d76f
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_cellid.php
@@ -0,0 +1,62 @@
+<?php
+if(isset($_POST['file']))
+ $file = rawurldecode($_POST['file']);
+else
+ exit;
+
+if(isset($_POST['gallery']))
+ $gallery = $_POST['gallery'];
+else
+ exit;
+
+// -------------- Sicherheitsabfragen!
+if(preg_match("/[\.]*\//", $file))exit();
+if(preg_match("/[\.]*\//", $gallery))exit();
+if(!is_file("../ki_galleries/".$gallery."/".$file))exit();
+// ---------- Ende Sicherheitsabfragen!
+
+// ---------------------------------------------- Try to find Position -------------------------------------------
+$latitude = 0;
+$longitude = 0;
+
+if(function_exists("curl_init")){
+ ob_start();
+ readfile("../ki_galleries/".$gallery."/".$file);
+ $source = ob_get_contents();
+ ob_end_clean();
+ $xmpdata_start = strpos($source, "<x:xmpmeta");
+ $xmpdata_end = strpos($source, "</x:xmpmeta>");
+ $xmplength = $xmpdata_end - $xmpdata_start;
+ $xmpdata = substr($source, $xmpdata_start, $xmplength + 12);
+ if(preg_match("/<cell:mcc>(.+)<\/cell:mcc>/", $xmpdata, $temp)){ // country code
+ $mcc = $temp[1];
+ if(preg_match("/<cell:mnc>(.+)<\/cell:mnc>/", $xmpdata, $temp)){ // network code
+ $mnc = $temp[1];
+ if(preg_match("/<cell:cellid>(.+)<\/cell:cellid>/", $xmpdata, $temp)){
+ $cellid = $temp[1];
+ $myapikey = "b07aa008a74d3d0dc81d77dac2c8aaeb"; // opencellid api key
+ $lac = ""; // location area code
+ if(preg_match("/<cell:lac>(.+)<\/cell:lac>/", $xmpdata, $temp)){
+ $lac = $temp[1];
+ }
+ $ch = curl_init();
+ curl_setopt($ch, CURLOPT_URL, "http://www.opencellid.org/cell/get?key=".$myapikey."&mcc=".$mcc."&mnc=".$mnc."&cellid=".$cellid."&lac=".$lac."&fmt=txt");
+ curl_setopt($ch, CURLOPT_HEADER, 0);
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
+ $response = curl_exec($ch);
+ curl_close($ch);
+ $temp = explode(",", $response);
+ if(count($temp) > 1){
+ if($temp[0] != "0.0" && $temp[1] != "0.0"){
+ $latitude = $temp[0];
+ $longitude = $temp[1];
+ }
+ }
+ }
+ }
+ }
+}
+
+echo $latitude.",".$longitude;
+//----------------------------------------- thats what I found --------------------------
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_checkpw.php b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_checkpw.php
new file mode 100644
index 00000000..ca945fc1
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_checkpw.php
@@ -0,0 +1,169 @@
+<?php
+header("Content-Type: application/x-javascript");
+
+
+//----------------------------------------------------------------------------- functions --------------------------------------------------------------------------------
+
+function draw_image($filename, $id, $style, $params) {
+ global $browser, $basedir;
+ $idstring = "";
+ if($id != "")$idstring = "id='".$id."' ";
+ if($browser == "ie6") {
+ $imgsize = getimagesize($filename);
+ echo "<img ".$idstring."style='filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=".$basedir.$filename."); width:".$imgsize[0]."px; height:".$imgsize[1]."px; ".$style."' src='".$basedir."ki_noimage.gif' ".$params." />";
+ } else {
+ if($style != "")$style = " style='".$style."' ";
+ echo "<img ".$idstring."src='".$basedir.$filename."'".$style.$params." />";
+ }
+}
+
+$browser = $_SERVER['HTTP_USER_AGENT'];
+
+if(preg_match("/Opera/",$browser))
+ $browser = "opera";
+elseif(preg_match("/MSIE [9]/",$browser))
+ $browser = "ie9";
+elseif(preg_match("/MSIE [7-8]/",$browser))
+ $browser = "ie7";
+elseif(preg_match("/MSIE [1-6]/",$browser))
+ $browser = "ie6";
+elseif(preg_match("/AppleWebKit/",$browser))
+ $browser = "webkit";
+else
+ $browser = "gecko";
+
+if($browser === "ie6")
+ $posfix = "absolute";
+else
+ $posfix = "fixed";
+
+include_once("../ki_config/ki_setup.php");
+
+if(isset($_POST['query']))
+ $query = $_POST['query'];
+else
+ exit;
+
+if(isset($_POST['reldir']))
+ $reldir = $_POST['reldir'];
+else
+ $reldir = "";
+
+$confdir = $reldir."ki_config/";
+$galleriesdir = $reldir."ki_galleries/";
+$basedir = $reldir."ki_base/";
+
+if(isset($_POST['against']))
+ $against = $_POST['against'];
+else
+ exit;
+
+if($against === "adm"){
+ if(md5($query) === $pw){
+ session_start();
+ $_SESSION["pwquery"] = $pw;
+ ?>
+ var params = location.search.substr(1).split('&');
+ var newparams = "";
+ for(var i = 0; i < params.length; i++){
+ var param = params[i].split('=');
+ if(param[0] != 'admin'){
+ if(newparams.length == 0)
+ newparams += "?";
+ else
+ newparams += "&";
+ newparams += params[i];
+ }
+ }
+ kib.checkpw = null;
+ var slash = "";
+ if(location.pathname.substr(0, 1) != "/")slash = "/";
+ $('authorization').innerHTML = "<a href='javascript:kib.edit_ki_setup();' style='color:#ffffff; display:block; margin:5px;'>Settings</a><a href='javascript:kib.fileupload();' style='color:#ffffff; display:block; margin:5px;'>Upload images</a><a href='javascript:kib.deleteexplorer();' style='color:#ffffff; display:block; margin:5px;'>Delete images</a><a href='javascript:kib.changeorder();' style='color:#ffffff; display:block; margin:5px;'>Change order</a><a href='javascript:return false;' onmouseover='kib.showhelp(this, 1, 1)' onmouseout='kib.hidehelp()' style='color:#ffffff; display:block; margin:5px;'>Label images</a><a href='javascript:kib.managefolders();' style='color:#ffffff; display:block; margin:5px;'>Manage folders</a><a href='http://"+location.hostname+slash+location.pathname+newparams+"' style='color:#ffffff; display:block; margin:5px;'>Logout</a>";
+ fw.resize( 'authorization', 2, 100, 132, Array( fw.move, 'authorization', 1, 50 + 5, 66 + 5, Array( fw.shadebody, 0 ) ) );
+ setTimeout( function(){
+ var node = document.createElement("div");
+ node.id = "kit_docu";
+ node.style.position = "<?php echo $posfix ?>";
+ node.style.zIndex = 999;
+ node.style.padding = "0px";
+ node.style.border = "1px dashed #fff";
+ node.style.left = "-300px";
+ node.style.bottom = "2px";
+ node.innerHTML = "<a href='http://koschtit.tabere.net/en/documentation/adminpanel' target='_blank' style='border:none; padding:0px; margin:0px;'><img src='<?php echo $basedir ?>ki_online_docu.jpg' alt='Online documentation' style='border:none; padding:0px; margin:0px;' /></a>";
+ document.body.appendChild(node);
+ fw.move2(node, 2, 26, 0, Array( fw.move2, "kit_docu", 2, -14, 0, Array( fw.move2, "kit_docu", 2, 5, 0, Array( fw.move2, "kit_docu", 2, 1, 0, Array( fw.move, "kit_docu", 2, 2, 0 ) ) ) ) );
+ }, 1300);
+
+ if(!$("kib_helpbox")){
+ var node = document.createElement("div");
+ node.id = "kib_helpbox";
+ node.style.color = "<?php echo $comm_text_color ?>";
+ node.style.font = "12px Tahoma, sans-serif";
+ node.style.position = "<?php echo $posfix ?>";
+ node.style.left = "100px";
+ node.style.top = "200px";
+ node.style.lineHeight = "19px";
+ node.style.textAlign = "left";
+ node.style.zIndex = "10001";
+ node.style.width = "150px";
+ node.style.padding = "8px";
+ node.style.visibility = "hidden";
+ node.style.background = "<?php echo $bord_color ?>";
+ node.style.border = "2px solid <?php echo $nav_border_color ?>";
+ document.body.appendChild(node);
+ }
+ <?php
+ } else {
+ ?>
+ $("pwform").style.border = "1px solid #ff0000";
+ <?php
+ }
+} else {
+ if(md5($query) === $userpw){
+ session_start();
+ $_SESSION["pwquery"] = $pw;
+ ?>
+ var params = location.search.substr(1).split('&');
+ var newparams = "";
+ for(var i = 0; i < params.length; i++){
+ var param = params[i].split('=');
+ if(param[0] != 'user'){
+ if(newparams.length == 0)
+ newparams += "?";
+ else
+ newparams += "&";
+ newparams += params[i];
+ }
+ }
+ kib.checkpw = null;
+ var slash = "";
+ if(location.pathname.substr(0, 1) != "/")slash = "/";
+ $('authorization').innerHTML = "<a href='javascript:kib.fileupload();' style='color:#ffffff; display:block; margin:5px;'>Upload images</a><a href='http://"+location.hostname+slash+location.pathname+newparams+"' style='color:#ffffff; display:block; margin:5px;'>Logout</a>";
+ fw.resize( 'authorization', 2, 100, 44, Array( fw.move, 'authorization', 1, 50 + 5, 22 + 5, Array( fw.shadebody, 0 ) ) );
+
+ if(!$("kib_helpbox")){
+ var node = document.createElement("div");
+ node.id = "kib_helpbox";
+ node.style.color = "<?php echo $comm_text_color ?>";
+ node.style.font = "12px Tahoma, sans-serif";
+ node.style.position = "<?php echo $posfix ?>";
+ node.style.left = "100px";
+ node.style.top = "200px";
+ node.style.lineHeight = "19px";
+ node.style.textAlign = "left";
+ node.style.zIndex = "10001";
+ node.style.width = "150px";
+ node.style.padding = "8px";
+ node.style.visibility = "hidden";
+ node.style.background = "<?php echo $bord_color ?>";
+ node.style.border = "2px solid <?php echo $nav_border_color ?>";
+ document.body.appendChild(node);
+ }
+ <?php
+ } else {
+ ?>
+ $("pwform").style.border = "1px solid #ff0000";
+ <?php
+ }
+}
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_deleteimage.php b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_deleteimage.php
new file mode 100644
index 00000000..eb48b5e7
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_deleteimage.php
@@ -0,0 +1,43 @@
+<?php
+session_start();
+
+include_once("../ki_config/ki_setup.php");
+
+if(isset($_POST['file']))
+ $file = rawurldecode($_POST['file']);
+else
+ exit;
+
+if(isset($_POST['thumb']))
+ $thumb = rawurldecode($_POST['thumb']);
+else
+ exit;
+
+if(isset($_POST['gallery']))
+ $gallery = $_POST['gallery'];
+else
+ exit;
+
+// -------------- Sicherheitsabfragen!
+if(preg_match("/[\.]*\//", $file))exit();
+if(preg_match("/[\.]*\//", $gallery))exit();
+if(!is_file("../ki_galleries/".$gallery."/".$file))exit();
+// ---------- Ende Sicherheitsabfragen!
+
+$pwok = 0;
+if(isset($_SESSION['pwquery'])){
+ if($_SESSION['pwquery'] === $pw)$pwok = 1;
+}
+
+if($pwok == 1){
+ $imgfile = "../ki_galleries/".$gallery."/".$file;
+ $commfile = "../ki_galleries/".$gallery."/comments/".substr($file, 0, -4).".txt";
+ $vcommfile = "../ki_galleries/".$gallery."/viewercomments/".substr($file, 0, -4).".txt";
+ $thumbfile = "../ki_galleries/".$gallery."/thumbs/".$thumb;
+ if(is_file($imgfile))@unlink($imgfile);
+ if(is_file($commfile))@unlink($commfile);
+ if(is_file($vcommfile))@unlink($vcommfile);
+ if(is_file($thumbfile))@unlink($thumbfile);
+}
+?>
+
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_download.php b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_download.php
new file mode 100644
index 00000000..1997bf1a
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_download.php
@@ -0,0 +1,32 @@
+<?php
+if(isset($_POST['file']))
+ $file = rawurldecode($_POST['file']);
+else if(isset($_GET['file']))
+ $file = rawurldecode($_GET['file']);
+else
+ exit;
+
+if(isset($_POST['gallery']))
+ $gallery = $_POST['gallery'];
+else if(isset($_GET['gallery']))
+ $gallery = $_GET['gallery'];
+else
+ exit;
+
+// -------------- Sicherheitsabfragen!
+if(preg_match("/[\.]*\//", $file))exit();
+if(preg_match("/[\.]*\//", $gallery))exit();
+if(!is_file("../ki_galleries/".$gallery."/".$file))exit();
+// ---------- Ende Sicherheitsabfragen!
+
+header("Cache-Control: public");
+header("Content-Description: File Transfer");
+header("Content-Disposition: attachment; filename=".$file);
+header("Content-Type: image");
+header("Content-Transfer-Encoding: binary");
+
+readfile("../ki_galleries/".$gallery."/".$file);
+?>
+
+
+
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_explorer.php b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_explorer.php
new file mode 100644
index 00000000..a8b227fd
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_explorer.php
@@ -0,0 +1,301 @@
+<?php
+ob_start("ob_gzhandler");
+
+//----------------------------------------------------------------------------- functions --------------------------------------------------------------------------------
+
+if (!function_exists('file_put_contents')) {
+ function file_put_contents($filename, $data) {
+ $f = @fopen($filename, 'w');
+ if (!$f) {
+ return false;
+ } else {
+ $bytes = fwrite($f, $data);
+ fclose($f);
+ return $bytes;
+ }
+ }
+}
+
+if (!function_exists('file_get_contents')) {
+ function file_get_contents($filename) {
+ if ($handle = @fopen($filename, 'rb')) {
+ $data = fread($handle, filesize($filename));
+ fclose($fh);
+ return $data;
+ }
+ }
+}
+
+function cmp_0($a, $b)
+{
+ global $galleryfolder;
+ return (filemtime($galleryfolder.$a[0]) < filemtime($galleryfolder.$b[0])) ? -1 : 1;
+}
+
+function cmp_1($a, $b)
+{
+ global $galleryfolder;
+ return (filemtime($galleryfolder.$a[0]) > filemtime($galleryfolder.$b[0])) ? -1 : 1;
+}
+
+function cmp_2($a, $b)
+{
+ global $galleryfolder;
+
+ $exif = @exif_read_data($galleryfolder.$a[0]);
+ $date1 = "";
+ if (isset($exif['DateTimeOriginal']))
+ $date1 = $exif['DateTimeOriginal'];
+ if (empty($date1) && isset($exif['DateTime']))
+ $date1 = $exif['DateTime'];
+ if (!empty($date1)){
+ $date1 = split(':', str_replace(' ',':', $date1));
+ $date1 = "{$date1[0]}-{$date1[1]}-{$date1[2]} {$date1[3]}:{$date1[4]}";
+ if(sizeof($date1) > 5)$date1 .= ":{$date1[5]}";
+ $date1 = strtotime($date1);
+ } else {
+ $date1 = filemtime($galleryfolder.$a[0]);
+ }
+ $exif = @exif_read_data($galleryfolder.$b[0]);
+ $date2 = "";
+ if (isset($exif['DateTimeOriginal']))
+ $date2 = $exif['DateTimeOriginal'];
+ if (empty($date2) && isset($exif['DateTime']))
+ $date2 = $exif['DateTime'];
+ if (!empty($date2)){
+ $date2 = split(':', str_replace(' ',':', $date2));
+ $date2 = "{$date2[0]}-{$date2[1]}-{$date2[2]} {$date2[3]}:{$date2[4]}";
+ if(sizeof($date2) > 5)$date2 .= ":{$date1[5]}";
+ $date2 = strtotime($date2);
+ } else {
+ $date2 = filemtime($galleryfolder.$b[0]);
+ }
+
+ return $date1 > $date2 ? 1 : -1;
+}
+
+function cmp_3($a, $b)
+{
+ return strcmp($a[0], $b[0]);
+}
+
+//-------------------------------------------------------------------------- end functions --------------------------------------------------------------------------------
+
+$supported = array("jpg","png","gif");
+
+$reldir = "";
+if(isset($_POST['reldir']))$reldir = $_POST['reldir'];
+$confdir = $reldir."ki_config/";
+$galleriesdir = $reldir."ki_galleries/";
+$basedir = $reldir."ki_base/";
+
+if(isset($_POST['gallery']))
+ $gallery = $_POST['gallery'];
+else
+ exit();
+
+if(isset($_POST['gallerynumber']))
+ $gallerynumber = $_POST['gallerynumber'];
+else
+ exit();
+
+// -------------- Sicherheitsabfragen!
+if(preg_match("/[\.]*\//", $gallery))exit();
+// ---------- Ende Sicherheitsabfragen!
+
+include_once("../ki_config/ki_setup.php");
+if(is_file("../ki_config/".$gallery."_ki_setup.php")){
+ include_once("../ki_config/".$gallery."_ki_setup.php");
+ $configfile = "../ki_config/".$gallery."_ki_setup.php";
+} else {
+ $configfile = "../ki_config/ki_setup.php";
+}
+$galleryfolder = "../ki_galleries/".$gallery."/";
+$thumbsfolder = $galleryfolder."thumbs/";
+$commentsfolder = $galleryfolder."comments/";
+
+$pwok = 0;
+session_start();
+if(isset($_POST['todelete']) || isset($_POST['tochange'])){
+ if(isset($_SESSION['pwquery'])){
+ if($_SESSION['pwquery'] === $pw)$pwok = 1;
+ }
+ if($pwok == 0)exit();
+}
+
+$temp = getimagesize("ki_nav_next.png");
+if($nav_always == 1 && $show_nav == 1)$fr_height -= ($temp[1]+18);
+if($th_lines == "auto")$th_lines = ceil($thumbs/($th_per_line));
+if($th_width == "auto")$th_width = round($fr_width/($th_per_line)) - round($fr_height*0.04) - 4;
+if($th_height == "auto")$th_height = round($fr_height/($th_lines)) - round($fr_height*0.04) - 4;
+$th_width = $th_width - 2*$th_bord_size;
+$th_height = $th_height - 2*$th_bord_size;
+
+/*------------------- error/warning checking ------------------*/
+if(!is_dir($galleryfolder)) {
+ echo "<div style='background:#ffbbbb; color:#000000; padding:4px;'>ERROR: KoschtIT Image Gallery could't find the following folder on the server: '".htmlentities($gallery)."' . Please check if the folder is available in the 'ki_galleries' folder.</div>";
+ exit();
+}
+if($pic_order == 3){
+ if(!function_exists("exif_read_data")){
+ $pic_order = 2;
+ }
+}
+/*------------------- end error/warning checking ------------------*/
+
+/*------------------- config settings ------------------*/
+$savefile = $gallery."_lastmodified";
+$lastmodified = filemtime($configfile);
+$saved = $fr_width.$fr_height.$thumbs.$th_per_line.$th_lines.$th_width.$th_height.$th_bord_size.$th_bord_hover_increase.$th_to_square.$th_2sq_crop_vert.$th_2sq_crop_hori.$show_nav.$nav_always;
+$writestring = "<?php\r\n\$lm_saved = \"".$saved."\";\r\n";
+$writestring .= "\$lm_lastmodified = ".$lastmodified.";\r\n?>";
+if(!file_exists($savefile))@file_put_contents($savefile, $writestring);
+if(!file_exists($savefile)) {
+ $thumbs_to_disk = 0;
+} else {
+ include_once($savefile);
+ if($lm_saved !== $saved){
+ @file_put_contents($savefile, $writestring);
+ $matches = @glob($thumbsfolder."*.*", GLOB_ERR);
+ if(is_array($matches)){
+ foreach($matches as $sf) {
+ if(!is_dir($sf) && !is_link($sf)){
+ @unlink($sf);
+ }
+ }
+ }
+ } else {
+ $lastmodified = $lm_lastmodified;
+ }
+}
+/*------------------- end config settings ------------------*/
+
+$files = array();
+$temp = array();
+$savedfolderhash = 0;
+if(is_file($gallery."_dir")){
+ $temp = explode(PHP_EOL, file_get_contents($gallery."_dir"));
+ $savedfolderhash = unserialize($temp[0]);
+}
+//$folderhash = pic_order + MTime of $galleryfolder + fileSize of all files
+$folderhash = $pic_order;
+$iterator = new DirectoryIterator($galleryfolder);
+foreach ($iterator as $fileInfo) {
+ if($fileInfo->isDot()){
+ $folderhash += $fileInfo->getMTime();
+ continue;
+ } elseif($fileInfo->isFile()) {
+ $folderhash += $fileInfo->getSize();
+ }
+}
+if($folderhash != $savedfolderhash){
+ if($pic_order == 4 && sizeof($temp) > 1){
+ $files = unserialize($temp[1]);
+ $iterator->rewind();
+ foreach ($iterator as $fileInfo) {
+ $file = $fileInfo->getFilename();
+ if(!in_array(strtolower(substr($file, -3)), $supported))$continue;
+ $imgsize = @getimagesize($galleryfolder.$file);
+ if($imgsize[0]){
+ $newcandidate = array($file, $imgsize[0], $imgsize[1]);
+ if(!in_array($newcandidate, $files))$files[] = $newcandidate;
+ }
+ }
+ reset($files);
+ } else {
+ $iterator->rewind();
+ foreach ($iterator as $fileInfo) {
+ $file = $fileInfo->getFilename();
+ if(!in_array(strtolower(substr($file, -3)), $supported))$continue;
+ $imgsize = @getimagesize($galleryfolder.$file);
+ if($imgsize[0]){
+ $files[] = array($file, $imgsize[0], $imgsize[1]);
+ }
+ }
+ switch($pic_order){
+ case 0:
+ usort($files, "cmp_1");
+ break;
+ case 1:
+ usort($files, "cmp_0");
+ break;
+ case 2:
+ usort($files, "cmp_3");
+ break;
+ case 3:
+ usort($files, "cmp_2");
+ break;
+ default:
+ usort($files, "cmp_1");
+ break;
+ }
+ reset($files);
+ }
+} else {
+ $files = unserialize($temp[1]);
+}
+
+$id = 0;
+foreach ($files as $file) {
+ $id++;
+
+ $breite = $file[1];
+ $hoehe = $file[2];
+
+ if( ($breite / $hoehe) > 1){
+ $k = $hoehe / $breite;
+ $breite = $th_width;
+ $hoehe = $k*$breite;
+ if($hoehe > $th_height){
+ $hoehe = $th_height;
+ $breite = (1/$k) * $hoehe;
+ }
+ } else {
+ $k = $breite / $hoehe;
+ $hoehe = $th_height;
+ $breite = $k*$hoehe;
+ if($breite > $th_width){
+ $breite = $th_width;
+ $hoehe = (1/$k) * $breite;
+ }
+ }
+
+ if($th_to_square == 1) {
+ if($th_width < $th_height){
+ $breite = $th_width;
+ } else {
+ $breite = $th_height;
+ }
+ $hoehe = $breite;
+ }
+
+ $breite = round($breite);
+ $hoehe = round($hoehe);
+
+ if($th_bord_hover_increase > 1){
+ $inc_breite = round($breite*$th_bord_hover_increase);
+ $inc_hoehe = round($breite*$th_bord_hover_increase);
+ } else {
+ $inc_breite = $breite;
+ $inc_hoehe = $hoehe;
+ }
+
+ $src = $basedir."ki_makepic.php?file=".$gallery."/".rawurlencode($file[0])."&width=".$inc_breite."&height=".$inc_hoehe;
+ $style = "border:".$th_bord_size."px solid ".$th_bord_color."; visibility:hidden; display:block; position:absolute; width:".$breite."px; height:".$hoehe."px;";
+ if($thumbs_to_disk == 1){
+ if(!is_file($thumbsfolder.$lastmodified.$file[0])){
+ $src .= "&picname=".$lastmodified.rawurlencode($file[0]);
+ } else {
+ $src = $galleriesdir.$gallery."/thumbs/".$lastmodified.$file[0];
+ }
+ }
+ if(isset($_POST['todelete']))
+ echo "<img id='".$gallerynumber."_".($id-1)."' src='".$src."' style='".$style." cursor:pointer;' onclick='kid.deleteImage(this)' onload=\"this.style.visibility='visible'\" alt='".$breite."_".$hoehe."' onmouseover='fw.fade(this, 33)' onmouseout='fw.fade(this, 100)' />";
+ elseif(isset($_POST['tochange']))
+ echo "<img id='".$gallerynumber."_".($id-1)."' src='".$src."' style='".$style." z-index:1; cursor:move;' onmousedown='kic.selectForDrag(this)' onmouseup='kic.releaseForDrag(this)' onmouseover='kic.hoverDrag(this)' oncontextmenu='return false' ondragstart='return false' onselectstart='return false' onload=\"this.style.visibility='visible'\" moved='0' alt='".$breite."_".$hoehe."' />";
+ else
+ echo "<img id='".$gallerynumber."_".($id-1)."' src='".$src."' style='".$style." cursor:pointer;' onclick='kie.getImage(this.id)' onload=\"this.style.visibility='visible'\" onmouseover='kib.makebigger(this)' onmouseout='kib.makesmaller(this)' alt='".$breite."_".$hoehe."' />";
+
+}
+echo "<div style='position:absolute; width:1px; left:0px;'></div>";
+?>
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_flip.php b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_flip.php
new file mode 100644
index 00000000..3e473bc6
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_flip.php
@@ -0,0 +1,52 @@
+<?php
+if(!isset($_GET['ot']))
+ exit();
+else
+ $ot = $_GET['ot'];
+
+if(isset($_GET['gallery']))
+ $gallery = $_GET['gallery'];
+else
+ exit;
+
+// -------------- Sicherheitsabfragen!
+if(preg_match("/[\.]*\//", $gallery))exit();
+// ---------- Ende Sicherheitsabfragen!
+
+include_once("../ki_config/ki_setup.php");
+if(is_file("../ki_config/".$gallery."_ki_setup.php"))include_once("../ki_config/".$gallery."_ki_setup.php");
+
+if($ot == 0)
+ $polygon = array(0,0, 0,200, 200,200);
+elseif($ot == 1)
+ $polygon = array(0,0, 0,200, 200,0);
+elseif($ot == 2)
+ $polygon = array(0,200, 200,200, 200,0);
+else
+ $polygon = array(0,0, 200,200, 200,0);
+
+header("Content-type: image/gif"); //Picture Format
+header("Expires: Mon, 01 Jul 2003 00:00:00 GMT"); // Past date
+header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // Consitnuously modified
+header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
+header("Pragma: no-cache"); // NO CACHE
+
+$bild = imagecreate(200, 200);
+
+imagealphablending($bild, false);
+imagesavealpha($bild, true);
+
+$transparent = imagecolorallocatealpha($bild, 0, 0, 0, 127);
+imagefilledrectangle($bild, 0, 0, 200, 200, $transparent);
+imagecolortransparent($bild, $transparent);
+
+$r = hexdec(substr($bord_color, 1, 2));
+$g = hexdec(substr($bord_color, 3, 2));
+$b = hexdec(substr($bord_color, 5, 2));
+
+$farbe = imagecolorallocatealpha($bild, $r, $g, $b, 0);
+imagefilledpolygon($bild, $polygon, 3, $farbe);
+
+imagegif($bild);
+imagedestroy($bild);
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_fullimg.php b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_fullimg.php
new file mode 100644
index 00000000..ddb6d546
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_fullimg.php
@@ -0,0 +1,231 @@
+<?php
+session_start();
+
+$browser = $_SERVER['HTTP_USER_AGENT'];
+
+if(preg_match("/Opera/",$browser))
+ $browser = "opera";
+elseif(preg_match("/MSIE [9]/",$browser))
+ $browser = "ie9";
+elseif(preg_match("/MSIE [7-8]/",$browser))
+ $browser = "ie7";
+elseif(preg_match("/MSIE [1-6]/",$browser))
+ $browser = "ie6";
+elseif(preg_match("/AppleWebKit/",$browser))
+ $browser = "webkit";
+else
+ $browser = "gecko";
+
+$reldir = "";
+if(isset($_POST['reldir']))$reldir = $_POST['reldir'];
+$confdir = $reldir."ki_config/";
+$galleriesdir = $reldir."ki_galleries/";
+$basedir = $reldir."ki_base/";
+
+/* --------------------------------------------------------- functions ------------------------------------------------------ */
+
+if (!function_exists('file_get_contents')) {
+ function file_get_contents($filename) {
+ if ($handle = @fopen($filename, 'rb')) {
+ $data = fread($handle, filesize($filename));
+ fclose($fh);
+ return $data;
+ }
+ }
+}
+
+if (!function_exists('file_put_contents')) {
+ function file_put_contents($filename, $data) {
+ $f = @fopen($filename, 'w');
+ if (!$f) {
+ return false;
+ } else {
+ $bytes = fwrite($f, $data);
+ fclose($f);
+ return $bytes;
+ }
+ }
+}
+
+
+function draw_image($filename, $id, $style, $params) {
+ global $browser, $basedir;
+ $idstring = "";
+ if($id != "")$idstring = "id='".$id."' ";
+ if($browser == "ie6") {
+ $imgsize = getimagesize($filename);
+ echo "<img ".$idstring."style='filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=".$basedir.$filename."); width:".$imgsize[0]."px; height:".$imgsize[1]."px; ".$style."' src='".$basedir."ki_noimage.gif' ".$params." />";
+ } else {
+ if($style != "")$style = " style='".$style."' ";
+ echo "<img ".$idstring."src='".$basedir.$filename."'".$style.$params." />";
+ }
+}
+
+/* ---------------------------------------------------------- end functions -------------------------------------------------- */
+
+/* --------------------------------------------------------- Display full image ---------------------------------------------------------------------- */
+
+if(isset($_POST['file']))
+ $file = rawurldecode($_POST['file']);
+else
+ exit;
+
+if(isset($_POST['gallery']))
+ $gallery = $_POST['gallery'];
+else
+ exit;
+
+// -------------- Sicherheitsabfragen!
+if(preg_match("/[\.]*\//", $file))exit();
+if(preg_match("/[\.]*\//", $gallery))exit();
+if(!is_file("../ki_galleries/".$gallery."/".$file))exit();
+// ---------- Ende Sicherheitsabfragen!
+
+include_once("../ki_config/ki_setup.php");
+if(is_file("../ki_config/".$gallery."_ki_setup.php"))include_once("../ki_config/".$gallery."_ki_setup.php");
+
+$imgsize = getimagesize("../ki_galleries/".$gallery."/".$file);
+
+// ---------------- exif data --------------------------------------
+if($checkgps == 1){
+ $latitude = 0;
+ $longitude = 0;
+ if(function_exists("exif_read_data")){
+ $exif = @exif_read_data("../ki_galleries/".$gallery."/".$file);
+ if(isset($exif['GPSLatitude']) && isset($exif['GPSLongitude'])){
+ if(isset($exif['GPSLatitudeRef']) && isset($exif['GPSLongitudeRef'])){
+ if(count($exif['GPSLatitude']) == 3 && count($exif['GPSLongitude']) == 3){
+ $temp = $exif['GPSLatitude'][0];
+ $temp = explode("/", $temp);
+ $latitude = intval($temp[0])/intval($temp[1]);
+ $temp = $exif['GPSLatitude'][1];
+ $temp = explode("/", $temp);
+ $latitude += ((intval($temp[0])/intval($temp[1]))/60);
+ $temp = $exif['GPSLatitude'][2];
+ $temp = explode("/", $temp);
+ $latitude += ((intval($temp[0])/intval($temp[1]))/3600);
+ if($exif['GPSLatitudeRef'] == "S")$latitude*=-1;
+ $temp = $exif['GPSLongitude'][0];
+ $temp = explode("/", $temp);
+ $longitude = intval($temp[0])/intval($temp[1]);
+ $temp = $exif['GPSLongitude'][1];
+ $temp = explode("/", $temp);
+ $longitude += ((intval($temp[0])/intval($temp[1]))/60);
+ $temp = $exif['GPSLongitude'][2];
+ $temp = explode("/", $temp);
+ $longitude += ((intval($temp[0])/intval($temp[1]))/3600);
+ if($exif['GPSLongitudeRef'] == "W")$longitude*=-1;
+ }
+ }
+ }
+ }
+}
+// ---------------- end exif data --------------------------------------
+
+if(isset($_POST['x']))
+ $x = $_POST['x'];
+else
+ $x = $imgsize[0];
+
+if(isset($_POST['y']))
+ $y = $_POST['y'];
+else
+ $y = $imgsize[1];
+
+$commfile = "../ki_galleries/".$gallery."/comments/".substr($file, 0, -4).".txt";
+$srcfile = $gallery."/".$file;
+
+if($x != $imgsize[0] || $y != $imgsize[1]){
+ $srcfile = $basedir."ki_makepic.php?fullimg=1&file=".$gallery."/".rawurlencode($file)."&width=".$x."&height=".$y;
+} else {
+ $srcfile = $galleriesdir.$srcfile;
+}
+?>
+<img id='thepicture' style='visibility:hidden; position:absolute; left:50%; top:50%; margin-left:-<?php echo floor($x*0.5) ?>px; margin-top:-<?php echo floor($y*0.5) ?>px; padding:0px; border:0px; width:<?php echo $x ?>px; height:<?php echo $y ?>px; display:block; cursor:pointer;' alt='<?php echo $srcfile ?>' onclick='kiv.goon(1)' />
+<?php
+if(is_file($commfile)){
+ $comm = file_get_contents($commfile);
+} else {
+ $comm = "";
+}
+
+if($comm_auto == 1){
+ $comm = $comm_auto_string;
+}
+
+$pwok = 0;
+if(isset($_SESSION['pwquery'])){
+ if($_SESSION['pwquery'] === $pw)$pwok = 1;
+}
+
+if($comments == 1){
+ if($pwok == 0){
+ if($comm != ""){
+ $comm = nl2br($comm);
+ echo "<div id='thecomment' style='display:none;'>".stripslashes($comm)."</div>";
+ }
+ } else {
+ echo "<div id='thecomment' style='display:none;'><textarea style='font:".$comm_text_size."px ".$comm_text_font."; color:".$comm_text_color."; width:".($x+(2*$bord_size)-22)."px; text-align:".$comm_text_align."; height:50px; overflow:hidden; resize:none; overflow-y:scroll; float:none; margin:0px; padding:0px; background:".$bord_color."; border:1px dashed ".$comm_text_color.";' onkeyup='kiv.savecomment(event, this.value)' id='focusme'>".stripslashes($comm)."</textarea></div>";
+ }
+}
+
+if($checkgps == 1){
+ echo "<input id='kiv_gps' type='hidden' value='".$latitude.",".$longitude."' />";
+}
+
+if($viewercomments == 1){
+ $vcommfile = "../ki_galleries/".$gallery."/viewercomments/".substr($file, 0, -4).".txt";
+ $value = 0;
+ if(is_file($vcommfile)){
+ $value = 1;
+ }
+ echo "<input id='kiv_vcomm' type='hidden' value='".$value."' />";
+}
+
+if($pwok == 1 && $th_to_square == 1 && $thumbs_to_disk == 1){
+ if($x >= $y){
+ $aspect = $x/$y;
+ $x = round($aspect*100);
+ $y = 100;
+ switch($th_2sq_crop_hori){
+ case "left":
+ $posx = 0;
+ break;
+ case "center";
+ $posx = round($x*0.5 - 50);
+ break;
+ case "right":
+ $posx = $x - 100;
+ break;
+ }
+ $stylestring1 = "height:100px; width:".$posx."px;";
+ $stylestring2 = "height:100px; width:".($x-($posx+100))."px;";
+ } else {
+ $aspect = $y/$x;
+ $y = round($aspect*100);
+ $x = 100;
+ switch($th_2sq_crop_vert){
+ case "top":
+ $posy = 0;
+ break;
+ case "middle";
+ $posy = round($y*0.5 - 50);
+ break;
+ case "bottom":
+ $posy = $y - 100;
+ break;
+ }
+ $stylestring1 = "width:100px; height:".$posy."px;";
+ $stylestring2 = "width:100px; height:".($y-($posy+100))."px;";
+ }
+ if($browser == "ie6" || $browser == "ie7"){
+ $more = "filter:progid:DXImageTransform.Microsoft.Alpha(opacity=70);";
+ } else {
+ $more = "opacity:0.7;";
+ }
+ $stylestring1 .= $more;
+ $stylestring2 .= $more;
+ $srcfile = $basedir."ki_makepic.php?file=".$gallery."/".rawurlencode($file)."&width=".$x."&height=".$y."&fullimg=1";
+ echo "<div id='square_selector' style='position:absolute; left:".$bord_size."px; top:".$bord_size."px; width:".$x."px; height:".$y."px; z-index:1001; padding:2px; background:#000000; overflow:hidden; cursor:pointer; display:none;'><img src='".$srcfile."' style='visibility:hidden;' onload=\"this.style.visibility='visible';\" /><div id='square_1' style='background:#000000; position:absolute; left:2px; top:2px; overflow:hidden;".$stylestring1."'></div><div id='square_2' style='background:#000000; position:absolute; right:2px; bottom:2px; overflow:hidden;".$stylestring2."'></div></div>";
+}
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_getcustomsettings.php b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_getcustomsettings.php
new file mode 100644
index 00000000..26731a29
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_getcustomsettings.php
@@ -0,0 +1,25 @@
+<?php
+ob_start("ob_gzhandler");
+
+header("Expires: Mon, 01 Jul 2003 00:00:00 GMT"); // Past date
+header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // Consitnuously modified
+header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
+header("Pragma: no-cache"); // NO CACHE
+
+$verz = @opendir("../ki_config/");
+while($file = @readdir($verz))
+{
+ if($file != "." && $file != ".." && strtolower(substr($file, -12)) === "ki_setup.php"){
+ include("../ki_config/ki_setup.php");
+ if($file === "ki_setup.php")
+ $temp = "default";
+ else {
+ $temp = substr($file, 0, -13);
+ include("../ki_config/".$file);
+ }
+
+ echo "kib.customsettings['".$temp."'] = Array(".$fr_width.", ".$fr_height.", \"".$fr_color."\", \"".$th_bord_color."\", \"".$th_bord_hover_color."\", ".$th_bord_hover_increase.", ".$resize_auto.", ".$nav_style.", ".$th_bord_size.", ".$show_nav.", ".$nav_always.", ".$slideshow.", \"".$nav_color."\", \"".$nav_border_color."\", \"".$nav_pos."\", ".$show_explorer.", ".$th_shadow.");\r\n";
+ }
+}
+@closedir($verz);
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_getsetsettings.php b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_getsetsettings.php
new file mode 100644
index 00000000..9687e355
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_getsetsettings.php
@@ -0,0 +1,161 @@
+<?php
+session_start();
+
+/* --------------------------------------------------------- functions ------------------------------------------------------ */
+
+if (!function_exists('file_put_contents')) {
+ function file_put_contents($filename, $data) {
+ $f = @fopen($filename, 'w');
+ if (!$f) {
+ return false;
+ } else {
+ $bytes = fwrite($f, $data);
+ fclose($f);
+ return $bytes;
+ }
+ }
+}
+
+/* ---------------------------------------------------------- end functions -------------------------------------------------- */
+
+include_once("../ki_config/ki_setup.php");
+
+if (get_magic_quotes_gpc()) {
+ function stripslashes_gpc(&$value)
+ {
+ $value = stripslashes($value);
+ }
+ array_walk_recursive($_GET, 'stripslashes_gpc');
+ array_walk_recursive($_POST, 'stripslashes_gpc');
+ array_walk_recursive($_COOKIE, 'stripslashes_gpc');
+ array_walk_recursive($_REQUEST, 'stripslashes_gpc');
+}
+
+$global_start = -1;
+$global_length = -1;
+$global_count = -1;
+
+reset($GLOBALS);
+while (list($key, $val) = each($GLOBALS)) {
+ $global_count++;
+ if($global_start == -1){
+ if($key === "fr_width"){
+ $global_start = $global_count;
+ continue;
+ }
+ }
+ if($global_length == -1){
+ if($key === "global_start"){
+ $global_length = $global_count - $global_start;
+ break;
+ }
+ }
+}
+
+$pwok = 0;
+if(isset($_SESSION['pwquery'])){
+ if($_SESSION['pwquery'] === $pw)$pwok = 1;
+}
+
+if($pwok == 1){
+ if(isset($_POST['get'])){
+ if(isset($_POST['file'])){
+ $file = $_POST['file'];
+
+ // -------------- Sicherheitsabfragen!
+ if(preg_match("/[\.]*\//", $file))exit();
+ // ---------- Ende Sicherheitsabfragen!
+
+ if(is_file("../ki_config/".$file."_ki_setup.php")){
+ reset($GLOBALS);
+ for($i = 0; $i < $global_start; $i++)next($GLOBALS);
+ for($i = 0; $i < $global_length; $i++){
+ list($key, $val) = each($GLOBALS);
+ unset($GLOBALS[$key]);
+ }
+ include_once("../ki_config/".$file."_ki_setup.php");
+ } else
+ exit();
+ }
+ $setting = "";
+ echo "{ ";
+ reset($GLOBALS);
+ for($i = 0; $i < $global_start; $i++)next($GLOBALS);
+ for($i = 0; $i < $global_length; $i++){
+ list($key, $val) = each($GLOBALS);
+ if(isset($GLOBALS[$key]))$setting .= "\"$key\" : \"".addslashes($val)."\", ";
+ }
+ $setting = substr($setting, 0, -2)." ";
+ echo $setting;
+ echo "}";
+ }
+ if(isset($_POST['set'])){
+ if(!isset($_POST['pw']))$_POST['pw'] = $_SESSION['pwquery'];
+ if(!isset($_POST['userpw']))$_POST['userpw'] = $userpw;
+ if(isset($_POST['file'])){
+ $file = $_POST['file'];
+ if($file === "default")
+ $file = "";
+ else
+ $file .= "_";
+
+ // -------------- Sicherheitsabfragen!
+ if(preg_match("/[\.]*\//", $file))exit();
+ // ---------- Ende Sicherheitsabfragen!
+
+ $params = "";
+ reset($GLOBALS);
+ for($i = 0; $i < $global_start; $i++)next($GLOBALS);
+ for($i = 0; $i < $global_length; $i++){
+ list($key, $val) = each($GLOBALS);
+ if(isset($_POST[$key])){
+ $val = rawurldecode($_POST[$key]);
+ if($key === "pw"){
+ if($val !== $_SESSION['pwquery']){
+ $val = "\"".md5($val)."\"";
+ } else {
+ $val = "\"".$val."\"";
+ }
+ } else if($key === "userpw"){
+ if($val !== $userpw){
+ $val = "\"".md5($val)."\"";
+ } else {
+ $val = "\"".$val."\"";
+ }
+ } else {
+ if(!is_numeric($val))$val = "\"".addslashes($val)."\"";
+ }
+ $params .= "\$$key = $val;\r\n";
+ }
+ }
+
+ $setupfile = "../ki_config/".$file."ki_setup.php";
+ if($file !== ""){
+ if($params !== ""){
+ $params = "<?php\r\n".$params."?>";
+ if(!@file_put_contents($setupfile, $params))
+ echo "failure";
+ else
+ echo "modified";
+ } else {
+ if(!@unlink($setupfile))
+ echo "failure";
+ else
+ echo "modified";
+ }
+ } else {
+ $params = "<?php\r\n".$params."?>";
+ if(!@file_put_contents($setupfile, $params)){
+ echo "failure";
+ } else {
+ if($_POST['admin'].$_POST['pw'] !== $admin.$pw){
+ echo "adminchanged";
+ } else {
+ echo "modified";
+ }
+ }
+ }
+ }
+ }
+}
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_getuploadinfo.php b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_getuploadinfo.php
new file mode 100644
index 00000000..1d3bd54e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_getuploadinfo.php
@@ -0,0 +1,76 @@
+<?php
+session_start();
+
+if(isset($_POST['form']))
+ $form = $_POST['form'];
+else
+ exit();
+
+if($form === "debug"){
+ var_dump($_SESSION['uploads']);
+ exit();
+}
+
+if($form === "reset"){
+ $_SESSION['uploads'] = array(-1, -1, -1, -1, -1, -1, -1, -1, -1);
+ exit();
+}
+
+$tmpfolder = ini_get('upload_tmp_dir');
+
+function getTempFile(){
+ global $tmpfolder;
+ global $form;
+
+ if($form == -1){
+ return 0;
+ }
+
+ if(is_dir($tmpfolder)) {
+ $phptempfiles = glob($tmpfolder."/[p][h][p]*.tmp");
+ //$phptempfiles = glob($tmpfolder."/[p][h][p]*");
+ if(is_array($phptempfiles)){
+ if(sizeof($phptempfiles) != 0){ // es laufen Uploads
+ foreach($phptempfiles as $sf){
+ if(!in_array($sf, $_SESSION['uploads'])){ // Der zuletzt gestartete Upload läuft, aber wir können den nächsten starten ( laufender upload gespeichert )
+ $_SESSION['uploads'][$form] = $sf;
+ //return 1; // für alle uploads parallel
+ }
+ }
+ } else { // Alle bisher gestartete Upload sind schon abgeschlossen, d.h. wir können den nächsten starten
+ $_SESSION['uploads'][$form] = "finished";
+ return 1;
+ }
+ }
+ } else {
+ $_SESSION['uploads'][$form] = "error";
+ return 1;
+ }
+
+ return 0;
+}
+
+function getPercentage(){
+ foreach($_SESSION['uploads'] as $sf){
+ $val = 0;
+ if($sf === "finished")
+ $val = "finished";
+ else {
+ if($sf == -1){
+ $val = 0;
+ } else {
+ if(is_file($sf)){
+ $val = filesize($sf);
+ } else {
+ $val = "finished";
+ }
+ }
+ }
+ echo "<input type='hidden' value='".$val."' />";
+ }
+}
+
+
+echo "<input type='hidden' value='".getTempFile()."' />";
+getPercentage();
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_js_basic.php b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_js_basic.php
new file mode 100644
index 00000000..ce6f7681
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_js_basic.php
@@ -0,0 +1,635 @@
+<?php
+ob_start("ob_gzhandler");
+
+session_start();
+if(isset($_SESSION['pwquery']))unset($_SESSION['pwquery']);
+
+header("Expires: Mon, 01 Jul 2003 00:00:00 GMT"); // Past date
+header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // Consitnuously modified
+header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
+header("Pragma: no-cache"); // NO CACHE
+
+//-------------------------------------- functions -------------------------------------
+function draw_image($filename, $id, $style, $params) {
+ global $browser, $basedir;
+ $idstring = "";
+ if($id != "")$idstring = "id='".$id."' ";
+ if($browser == "ie6") {
+ $imgsize = getimagesize($filename);
+ echo "<img ".$idstring."style='filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=".$basedir.$filename."); width:".$imgsize[0]."px; height:".$imgsize[1]."px; ".$style."' src='".$basedir."ki_noimage.gif' ".$params." />";
+ } else {
+ if($style != "")$style = " style='".$style."' ";
+ echo "<img ".$idstring."src='".$basedir.$filename."'".$style.$params." />";
+ }
+}
+//-------------------------------------- end functions -----------------------------------
+
+$browser = $_SERVER['HTTP_USER_AGENT'];
+
+if(preg_match("/Opera/",$browser))
+ $browser = "opera";
+elseif(preg_match("/MSIE [9]/",$browser))
+ $browser = "ie9";
+elseif(preg_match("/MSIE [7-8]/",$browser))
+ $browser = "ie7";
+elseif(preg_match("/MSIE [1-6]/",$browser))
+ $browser = "ie6";
+elseif(preg_match("/AppleWebKit/",$browser))
+ $browser = "webkit";
+else
+ $browser = "gecko";
+
+if($browser == "ie6")
+ $posfix = "absolute";
+else
+ $posfix = "fixed";
+
+if(isset($_GET['reldir']))
+ $reldir = $_GET['reldir'];
+else
+ $reldir = "";
+
+$confdir = $reldir."ki_config/";
+$galleriesdir = $reldir."ki_galleries/";
+$basedir = $reldir."ki_base/";
+
+include("../ki_config/ki_setup.php");
+
+$admin_ok = 0;
+if(isset($_GET['admin']) && $admin === $_GET['admin']){
+ $admin_ok = 1;
+}
+$user_ok = 0;
+if(isset($_GET['user']) && $user === $_GET['user']){
+ $user_ok = 1;
+}
+
+header("Content-Type: application/x-javascript");
+?>
+
+// Basic module 'kib' --------------------------------------------------------------------
+
+function kib_module(){
+
+ /* -------------------------------- variables ----------------------------------- */
+
+ var galleries; // gallery objects
+ this.dirs; // gallery folders
+ this.pics; // pic names and dimensions
+ this.customsettings = new Array(); // individual width, heights and backgrounds
+ var mouseover; // Array for mouseover
+
+<?php
+ $verz = @opendir("../ki_config/");
+ while($file = @readdir($verz))
+ {
+ if($file != "." && $file != ".." && strtolower(substr($file, -12)) === "ki_setup.php"){
+ include("../ki_config/ki_setup.php");
+ if($file === "ki_setup.php")
+ $temp = "default";
+ else {
+ $temp = substr($file, 0, -13);
+ include("../ki_config/".$file);
+ }
+ echo "this.customsettings['".$temp."'] = Array(".$fr_width.", ".$fr_height.", \"".$fr_color."\", \"".$th_bord_color."\", \"".$th_bord_hover_color."\", ".$th_bord_hover_increase.", ".$resize_auto.", ".$nav_style.", ".$th_bord_size.", ".$show_nav.", ".$nav_always.", ".$slideshow.", \"".$nav_color."\", \"".$nav_border_color."\", \"".$nav_pos."\", ".$show_explorer.", ".$th_shadow.");\r\n";
+ }
+ }
+ @closedir($verz);
+?>
+
+ /* -------------------------------- getElementById function --------------------- */
+
+ function $(id){
+ return document.getElementById(id);
+ }
+
+ /* -------------------------------- constructor/descturctor --------------------- */
+
+ this.constr = function() {
+ galleries = new Array();
+ this.dirs = new Array();
+ mouseover = new Array();
+ var temp = document.getElementsByTagName("div");
+ var found = 0;
+ for(var i = 0; i < temp.length; i++){
+ if(temp[i].className.indexOf("koschtitgallery") >= 0){
+ temp[i].id = temp[i].title + "_" + found;
+ temp[i].style.position = "relative";
+ temp[i].style.padding = "0px";
+ temp[i].style.overflow = "hidden";
+ var obj = kib.customsettings[temp[i].title] ? kib.customsettings[temp[i].title] : kib.customsettings['default'];
+ temp[i].style.width = obj[0] + "px";
+ temp[i].style.height = obj[1] + "px";
+ temp[i].style.minHeight = "0";
+ temp[i].style.background = obj[2];
+ this.dirs.push(temp[i].title);
+ temp[i].title = "";
+ galleries.push(temp[i]);
+ mouseover.push(0);
+ found++;
+ }
+ }
+ if(galleries.length == 0){
+ <?php if($shade_while_loading == 1)echo "shadebody(0);" ?>
+ <?php if($show_warnings == 1)echo "alert(\"WARNING: KoschtIT Image Gallery didn't find any gallery to display. Set '\$show_warnings = 0' if you don't want to see this warning again.\");"; ?>
+ return;
+ } else {
+ this.pics = new Array(galleries.length);
+ showgallery(0);
+ }
+ }
+
+ this.destr = function(){
+
+ }
+
+ /* -------------------------------- methodes ------------------------------------ */
+
+ this.reinit = function(){
+ var count = this.dirs.length;
+ for(var i = 0; i < count; i++){
+ $(this.dirs[i]+"_"+i).title = this.dirs[i];
+ }
+ for(var i = 0; i < count; i++){
+ var temp = galleries[i].cloneNode(false);
+ galleries[i].parentNode.insertBefore(temp, galleries[i]);
+ galleries[i].parentNode.removeChild(galleries[i]);
+ }
+ kib.constr();
+ }
+
+ this.reloadcsandreinit = function(){
+ fw.getHTTP("<?php echo $basedir ?>ki_getcustomsettings.php", gotcustomsettings);
+ }
+
+ function gotcustomsettings(responseText){
+ if(responseText != ""){
+ eval(responseText);
+ kib.reinit();
+ }
+ }
+
+ function showgallery(gallerynumber){
+
+ var gallery = galleries[gallerynumber];
+ gallery.innerHTML = "<div style='background:<?php echo $bord_color ?>; position:absolute; left:50%; top:50%; width:200px; height:40px; margin-left:-106px; margin-top:-26px; border:2px solid <?php echo $nav_border_color ?>; color:<?php echo $comm_text_color ?>; font: 14px normal <?php echo $comm_text_font ?>; padding:8px 4px 0px; text-align:center; line-height:17px;' id='" + gallery.id + "_wait" + "'>Please wait, while folder being scanned ...</div>";
+
+ var node = document.createElement("div");
+ node.id = gallery.id + "_see";
+ node.style.position = "absolute";
+ node.style.height = "100%";
+ node.style.width = "100%";
+ node.style.overflow = "hidden";
+ node.style.display = "none";
+ gallery.appendChild(node);
+
+ node = document.createElement("div");
+ node.id = gallery.id + "_hide";
+ node.style.position = "absolute";
+ node.style.height = "100%";
+ node.style.width = "100%";
+ node.style.overflow = "hidden";
+ node.style.display = "none";
+ gallery.appendChild(node);
+
+ kib.inc(gallerynumber, 0, 0, 1);
+
+ fw.addevent( gallery, "mousemove", function(){ if(mouseover[gallerynumber] == 0)expandfornav(gallerynumber, 1); } );
+ fw.addevent( gallery, "mouseout", function(){ expandfornav(gallerynumber, 0); } );
+
+ if(gallerynumber+1 < galleries.length){
+ showgallery(gallerynumber+1);
+ } else {
+ <?php if($admin_ok == 1 || $user_ok == 1){ ?>
+ adminlogin();
+ <?php } ?>
+ }
+ }
+
+ function expandfornav(gallerynumber, type){
+ var gallery = galleries[gallerynumber];
+ var container = $(gallery.id + "_hide");
+
+ if(type == 1){
+ mouseover[gallerynumber] = 1;
+ container.style.overflow = "visible";
+ gallery.style.overflow = "visible";
+ } else {
+ mouseover[gallerynumber] = 0;
+ container.style.overflow = "hidden";
+ gallery.style.overflow = "hidden";
+ }
+
+ var cs = kib.customsettings[kib.dirs[gallerynumber]] ? kib.customsettings[kib.dirs[gallerynumber]] : kib.customsettings['default'];
+ if(cs[9] == 1 && cs[10] == 0){
+ <?php
+ $temp = getimagesize("ki_nav_next.png");
+ ?>
+ var ysize = cs[1];
+ if(cs[6] == 1){
+ for(var i = container.childNodes.length-1; i > 0; i--){
+ if(container.childNodes[i]){
+ if(container.childNodes[i].nodeName == "IMG"){
+ var temp2 = container.childNodes[i].alt.split("_");
+ ysize = parseInt(parseInt(temp2[3]) + 0.5*(parseInt(temp2[1]) + cs[8]*2));
+ break;
+ }
+ }
+ }
+ for(var j = 0; j < 10; j++){
+ if(container.childNodes[j]){
+ if(container.childNodes[j].nodeName == "IMG"){
+ temp2 = container.childNodes[j].alt.split("_");
+ ysize = ysize + parseInt(parseInt(temp2[3]) + 0.5*(parseInt(temp2[1]) + cs[8]*2));
+ if(ysize > cs[1])ysize = cs[1];
+ break;
+ }
+ }
+ }
+ }
+ var tb = $(container.id + "_tb");
+ if(tb != null){
+ if(type == 1){
+ if(cs[10] == 0)fw.fade(tb, 100);
+ fw.resize(gallery, 4, 0, ysize + <?php echo ($temp[1] + 18) ?>);
+ } else {
+ if(cs[10] == 0)fw.fade(tb, 0);
+ fw.resize(gallery, 4, 0, ysize);
+ }
+ }
+ }
+ }
+
+ <?php if($admin_ok == 1 || $user_ok == 1){ ?>
+
+ function adminlogin(){
+ if(!$("authorization")){
+ node = document.createElement("div");
+ node.id = "authorization";
+ node.style.position = "<?php echo $posfix ?>";
+ node.style.top = "50%";
+ node.style.left = "50%";
+ node.style.width = "150px";
+ node.style.height = "70px";
+ node.style.margin = "-35px 0px 0px -75px";
+ node.style.background = "#444444";
+ node.style.border = "1px dashed #ffffff";
+ node.style.textAlign = "center";
+ node.style.color = "#ffffff";
+ node.style.font = "11px Tahoma, sans-serif";
+ node.style.lineHeight = "13px";
+ node.style.zIndex = 2000;
+ document.body.appendChild(node);
+ $("authorization").appendChild(document.createElement("br"));
+ node = document.createTextNode("Enter password here:");
+ $("authorization").appendChild(node);
+ $("authorization").appendChild(document.createElement("br"));
+ $("authorization").appendChild(document.createElement("br"));
+ node = document.createElement("span");
+ node.innerHTML = "<input type='password' id='pwform' style='border:1px solid #ffffff; background:#000; width:140px; color:#ffffff; text-align:center; float:none; font:11px Tahoma, sans-serif; padding:1px;' />";
+ $("authorization").appendChild(node);
+ $("pwform").onkeyup = function() { kib.checkpw(this.value) };
+ $("pwform").focus();
+ }
+ }
+
+ this.checkpw = function(query){
+ if(query != "")fw.getHTTP("<?php echo $basedir ?>ki_checkpw.php?&query="+query+"&reldir=<?php echo $reldir ?>&against=<?php echo $admin_ok == 1 ? "adm" : "usr" ?>", gotcheck, null);
+ }
+
+ function gotcheck(responseText){
+ if(responseText != "")eval(responseText);
+ }
+
+ this.edit_ki_setup = function(){
+ fw.addjs("<?php echo $basedir ?>ki_js_settings.php?reldir=<?php echo $reldir ?>", "kis");
+ }
+
+ this.fileupload = function(){
+ fw.addjs("<?php echo $basedir ?>ki_js_upload.php?reldir=<?php echo $reldir ?>", "kiu");
+ }
+
+ this.deleteexplorer = function(){
+ fw.addjs("<?php echo $basedir ?>ki_js_delete.php?reldir=<?php echo $reldir ?>&gallery=" + this.dirs[0], "kid");
+ }
+
+ this.changeorder = function(){
+ fw.addjs("<?php echo $basedir ?>ki_js_changeorder.php?reldir=<?php echo $reldir ?>&gallery=" + this.dirs[0], "kic");
+ }
+
+ this.managefolders = function(){
+ fw.addjs("<?php echo $basedir ?>ki_js_managefolders.php?reldir=<?php echo $reldir ?>", "kim");
+ }
+
+ this.showhelp = function(obj, direction, messCode){
+
+ var message = "";
+ var helpBox = $("kib_helpbox");
+
+ var pointer;
+ var infosymbol = "<?php draw_image("ki_nav_info.png", "", "border:0px; vertical-align:bottom; display:inline; float:right; padding:0px 0px 8px 8px;", ""); ?>";
+
+ switch(messCode){
+ case 1:
+ message = "If you want to label an image just click on it and start typing. Press \"CTRL + Enter\" to save it. The next image will open automatically and you can keep labeling ...";
+ break;
+ case 2:
+ message = "Press \"CTRL + Enter\" to save your label.";
+ break;
+ case 3:
+ message = "Drag'n'Drop an image to change it's position in the gallery. There is also the '$pic_order'-parameter in the Settings-section which sets the main image order strategy for individual galleries.";
+ break;
+ case 4:
+ message = "Click on an image to delete it from the gallery.";
+ break;
+ case 5:
+ message = "You can upload a watermark first. Afterwards you can add this watermark to images which you upload to the gallery. The watermark position and size are controlled by the $watermark_hori/vert/size - parameters.";
+ break;
+ }
+
+ var pos = fw.findPos(obj);
+ var dim = fw.getDim(obj);
+
+ helpBox.style.visibility = "hidden";
+ helpBox.innerHTML = infosymbol + message;
+ var boxH = fw.getDim(helpBox)[1];
+
+ switch(direction){
+ case 1:
+ pointer = "<?php draw_image("ki_arrow.php?ot=0", "", "border:0px; vertical-align:bottom; position:absolute; left:-27px; top:0px; padding:0px;", ""); ?>";
+ helpBox.style.left = pos[0] + dim[0] + 15 + "px";
+ helpBox.style.top = pos[1] + 0.5*dim[1] - 15 + "px";
+ break;
+ case 2:
+ pointer = "<?php draw_image("ki_arrow.php?ot=1", "", "border:0px; vertical-align:bottom; position:absolute; left:70px; top:-27px; padding:0px;", ""); ?>";
+ helpBox.style.left = pos[0] + 0.5*dim[0] - 85 + "px";
+ helpBox.style.top = pos[1] + dim[1] + 30 + "px";
+ break;
+ case 3:
+ pointer = "<?php draw_image("ki_arrow.php?ot=2", "", "border:0px; vertical-align:bottom; position:absolute; right:-26px; top:0px; padding:0px;", ""); ?>";
+ helpBox.style.left = pos[0] - 170 - 15 + "px";
+ helpBox.style.top = pos[1] + 0.5*dim[1] - 15 + "px";
+ break;
+ case 4:
+ pointer = "<?php draw_image("ki_arrow.php?ot=3", "", "border:0px; vertical-align:bottom; position:absolute; left:70px; bottom:-26px; padding:0px;", ""); ?>";
+ helpBox.style.left = pos[0] + 0.5*dim[0] - 85 + "px";
+ helpBox.style.top = pos[1] - boxH - 30 + "px";
+ break;
+ }
+
+ helpBox.innerHTML += pointer;
+
+ helpBox.style.display = "none";
+ helpBox.style.visibility = "visible";
+ fw.fade(helpBox, 100);
+
+ }
+
+ this.hidehelp = function(){
+ var helpBox = $("kib_helpbox");
+ fw.fade(helpBox, 0, Array(function(){
+ helpBox.style.visibility = "hidden";
+ helpBox.style.display = "block";
+ }));
+ }
+ <?php } ?>
+
+ //direction: 0 = static 1 = left, 2 = right, 3 = top, 4 = bottom
+ this.inc = function(gallerynumber, direction, startfrom, collectinfo) {
+ var params = "?reldir=<?php echo $reldir ?>&gallery=" + this.dirs[gallerynumber] + "&gallerynumber=" + gallerynumber;
+ if(startfrom)params += "&startfrom="+startfrom;
+ if(collectinfo)
+ params += "&collectinfo=1";
+ else {
+ collectinfo = 0;
+ }
+ fw.getHTTP("<?php echo $basedir ?>ki_koschtit.php" + params, gotinc, new Array(direction, gallerynumber, collectinfo));
+ }
+
+ function gotinc(responseText, params) {
+ var direction = params[0];
+ var gallerynumber = params[1];
+ var collectinfo = params[2];
+
+ var container = $(kib.dirs[gallerynumber]+"_"+gallerynumber+"_see");
+ var switcher = $(kib.dirs[gallerynumber]+"_"+gallerynumber+"_hide");
+ container.id = kib.dirs[gallerynumber]+"_"+gallerynumber+"_hide";
+ switcher.id = kib.dirs[gallerynumber]+"_"+gallerynumber+"_see";
+
+ if(collectinfo == 1)container.parentNode.removeChild($(kib.dirs[gallerynumber]+"_"+gallerynumber+"_wait"));
+
+ container.innerHTML = responseText;
+
+ if(collectinfo == 1){
+ var jsontxt = $(gallerynumber+"_info").value;
+ kib.pics[gallerynumber] = eval("(" + jsontxt + ")");
+ <?php if($shade_while_loading == 1){ ?>
+ if(gallerynumber == kib.dirs.length - 1){
+ setTimeout( function(){
+ fw.shadebody(0);
+ }, 1000);
+ }
+ <?php } ?>
+ if(gallerynumber == galleries.length-1){
+ if(typeof(kit_opensharedpic) == "function")kit_opensharedpic();
+ }
+ }
+
+ var x = parseInt(container.parentNode.style.width);
+ var y = parseInt(container.parentNode.style.height);
+ var xto = 0;
+ var yto = 0;
+ if(direction > 2)
+ var onlydir = 3;
+ else
+ var onlydir = 2;
+ if(direction == 1){xto = x;}
+ if(direction == 2){xto = -x;}
+ if(direction == 3){yto = y;}
+ if(direction == 4){yto = -y;}
+
+ container.style.overflow = "hidden";
+ container.parentNode.style.overflow = "hidden";
+ container.style.left = -1*xto+"px";
+ container.style.top = -1*yto+"px";
+ container.style.display = "block";
+
+ fw.move(container, onlydir, 0, 0);
+ fw.move(switcher, onlydir, xto, yto, Array( function(){
+ var node = document.createElement("div");
+ node.id = switcher.id;
+ node.style.position = "absolute";
+ node.style.height = "100%";
+ node.style.width = "100%";
+ node.style.overflow = "hidden";
+ node.style.lineHeight = "12px";
+ node.style.display = "none";
+ var parnt = switcher.parentNode;
+ parnt.removeChild(switcher);
+ parnt.appendChild(node);
+
+ container.style.overflow = "visible";
+ container.parentNode.style.overflow = "visible";
+
+ <?php $breite = getimagesize("ki_nav_next.png"); ?>
+ var cs = kib.customsettings[kib.dirs[gallerynumber]] ? kib.customsettings[kib.dirs[gallerynumber]] : kib.customsettings['default'];
+ var ysize = cs[1];
+ if(cs[6] == 1){
+ for(var i = container.childNodes.length-1; i > 0; i--){
+ if(container.childNodes[i]){
+ if(container.childNodes[i].nodeName == "IMG"){
+ var temp2 = container.childNodes[i].alt.split("_");
+ ysize = parseInt(parseInt(temp2[3]) + 0.5*(parseInt(temp2[1]) + cs[8]*2));
+ break;
+ }
+ }
+ }
+ for(var j = 0; j < 10; j++){
+ if(container.childNodes[j]){
+ if(container.childNodes[j].nodeName == "IMG"){
+ temp2 = container.childNodes[j].alt.split("_");
+ ysize = ysize + parseInt(parseInt(temp2[3]) + 0.5*(parseInt(temp2[1]) + cs[8]*2));
+ if((cs[9] == 1 && cs[10] == 1) || (mouseover[gallerynumber] == 1 && cs[9] == 1 && cs[10] == 0))ysize += <?php echo $breite[1]+18 ?>;
+ if(ysize <= cs[1]){
+ fw.resize(parnt, 4, 0, ysize);
+ } else {
+ var temp = fw.getDim(parnt, 1)[1];
+ if(cs[9] == 1)temp += <?php echo $breite[1]+18 ?>;
+ if(ysize > temp){
+ fw.resize(parnt, 4, 0, ysize);
+ }
+ }
+ if(mouseover[gallerynumber] == 1 && cs[9] == 1 && cs[10] == 0)ysize -= <?php echo $breite[1]+18 ?>;
+ break;
+ }
+ }
+ }
+ }
+ if(cs[9] == 1){
+ var tbcontent = "";
+ var breite = 0;
+ if(cs[15] == 1){
+ tbcontent += "<?php draw_image("ki_nav_full.png", "", "cursor:pointer; border:0px; margin:0px 2px 0px 2px; padding-top:2px; display:inline;", "onclick=\\\"kib.startExplorer(\" + gallerynumber + \");\\\" onmouseover=\\\"this.style.padding = '0px 0px 2px 0px';\\\" onmouseout=\\\"this.style.padding = '2px 0px 0px 0px';\\\" title='".htmlentities(stripslashes($nav_maxi), ENT_QUOTES, "UTF-8")."'"); ?>";
+ breite += (4 + <?php echo $breite[0] ?>);
+ }
+ if(cs[11] == 1 && kib.pics[gallerynumber].length > 0){
+ tbcontent += "<?php draw_image("ki_nav_play.png", "", "cursor:pointer; border:0px; margin:0px 2px 0px 2px; padding-top:2px; display:inline;", "onclick=\\\"kib.slideshow(\" + gallerynumber + \");\\\" onmouseover=\\\"this.style.padding = '0px 0px 2px 0px';\\\" onmouseout=\\\"this.style.padding = '2px 0px 0px 0px';\\\" title='".htmlentities(stripslashes($slideshow_start), ENT_QUOTES, "UTF-8")."'"); ?>";
+ breite += (4 + <?php echo $breite[0] ?>);
+ }
+ if($(gallerynumber+"_prev")){
+ tbcontent += "<?php draw_image("ki_nav_prev.png", "", "cursor:pointer; border:0px; margin:0px 2px 0px 2px; padding-top:2px; display:inline;", "onclick=\\\"kib.inc(\" + gallerynumber + \", 1, \" + $(gallerynumber+\"_prev\").innerHTML + \");\\\" onmouseover=\\\"this.style.padding = '0px 0px 2px 0px';\\\" onmouseout=\\\"this.style.padding = '2px 0px 0px 0px';\\\" title='".htmlentities(stripslashes($nav_back), ENT_QUOTES, "UTF-8")."'"); ?>";
+ breite += (4 + <?php echo $breite[0] ?>);
+ }
+ if($(gallerynumber+"_next")){
+ tbcontent += "<?php draw_image("ki_nav_next.png", "", "cursor:pointer; border:0px; margin:0px 2px 0px 2px; padding-top:2px; display:inline;", "onclick=\\\"kib.inc(\" + gallerynumber + \", 2, \" + $(gallerynumber+\"_next\").innerHTML + \");\\\" onmouseover=\\\"this.style.padding = '0px 0px 2px 0px';\\\" onmouseout=\\\"this.style.padding = '2px 0px 0px 0px';\\\" title='".htmlentities(stripslashes($nav_next), ENT_QUOTES, "UTF-8")."'"); ?>";
+ breite += (4 + <?php echo $breite[0] ?>);
+ }
+ if(breite != 0){
+ breite -= 4;
+ } else {
+ return;
+ }
+ var navpos = 0;
+ if(cs[14] == "right"){
+ navpos = -4;
+ } else if(cs[14] == "left"){
+ navpos = 4;
+ } else {
+ breite += 16;
+ navpos = (cs[0]-breite+2)*0.5;
+ }
+ if(cs[9] == 1 && cs[10] == 0)ysize += (<?php echo $breite[1] ?> + 18);
+ fw.addtoolbar(container, tbcontent, navpos, ysize - <?php echo $breite[1] ?> - 14, 1);
+ var tb = $(container.id + "_tb");
+ tb.style.background = cs[12];
+ if(cs[7] == 2){
+ tb.style.borderRadius = "20px";
+ tb.style.MozBorderRadius = "20px";
+ tb.style.WebkitBorderRadius = "20px";
+ }
+ tb.style.border = "2px solid " + cs[13];
+ tb.style.padding = "1px 3px 3px 3px";
+ tb.style.lineHeight = "12px";
+ if(collectinfo == 1 && cs[10] == 0)tb.style.display = "none";
+ }
+ } ));
+ }
+
+ this.getImage = function(picstring) {
+ var temp = picstring.indexOf("_");
+ var gallerynumber = Number(picstring.substr(0, temp));
+ var picnumber = Number(picstring.substr(temp+1));
+ var params = Array( gallerynumber, picnumber );
+ var error = 0;
+ if(gallerynumber >= this.pics.length){
+ error = 1;
+ } else {
+ if(picnumber >= this.pics[gallerynumber].length)error = 1;
+ }
+ if(error == 1 || isNaN(picnumber)|| isNaN(gallerynumber)){
+ alert("ERROR: KoschtIT Image Gallery didn't find the picture you want to display.");
+ return;
+ }
+ <?php if($admin_ok == 1){ ?>
+ fw.addjs("<?php echo $basedir ?>ki_js_view.php?reldir=<?php echo $reldir ?>&gallery="+kib.dirs[gallerynumber]+"&admin=<?php echo $_GET['admin'] ?>", "kiv", params);
+ <?php } else { ?>
+ fw.addjs("<?php echo $basedir ?>ki_js_view.php?reldir=<?php echo $reldir ?>&gallery="+kib.dirs[gallerynumber], "kiv", params);
+ <?php } ?>
+ }
+
+ this.slideshow = function(gallerynumber) {
+ kib.getImage(gallerynumber + "_0");
+ (function(){
+ if($("thepicture")){
+ var sspic = $("ssbutton");
+ <?php if($browser != "ie6"){ ?>
+ sspic.src = "<?php echo $basedir ?>ki_nav_stop.png";
+ <?php } else { ?>
+ sspic.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src=<?php echo $basedir ?>ki_nav_stop.png)";
+ <?php } ?>
+ sspic.title = "<?php echo htmlentities(stripslashes($slideshow_stop), ENT_QUOTES, "UTF-8") ?>";
+ if($("kiv_gps"))$("kiv_gps").value = "0,0";
+ if($("kiv_help"))$("kiv_help").style.display = "none";
+ kiv.sshelp(1);
+ return;
+ }
+ setTimeout(arguments.callee, 10);
+ })();
+ }
+
+ this.startExplorer = function(gallerynumber) {
+ var params = Array();
+ params.push(gallerynumber);
+ fw.addjs("<?php echo $basedir ?>ki_js_explorer.php?reldir=<?php echo $reldir ?>&gallery="+kib.dirs[gallerynumber], "kie", params);
+ }
+
+ this.makebigger = function(obj){
+ var temp = obj.id.split("_");
+ var cs = kib.customsettings[kib.dirs[temp[0]]] ? kib.customsettings[kib.dirs[temp[0]]] : kib.customsettings['default'];
+ var faktor = cs[5];
+ var temp = obj.alt.split("_");
+ var size = Array( temp[0], temp[1] );
+ var newsize = Array( Math.round(size[0]*faktor), Math.round(size[1]*faktor) );
+ var pos = Array( temp[2], temp[3] );
+ var newpos = Array( pos[0]-0.5*(newsize[0]-size[0]), pos[1]-0.5*(newsize[1]-size[1]) );
+ fw.move(obj, 1, newpos[0], newpos[1]);
+ fw.resize(obj, 1, newsize[0], newsize[1]);
+ obj.style.zIndex = 100;
+ obj.style.borderColor = cs[4];
+ if(cs[16] == 1)fw.dropshadow(obj, 1);
+ }
+
+ this.makesmaller = function(obj){
+ var temp = obj.alt.split("_");
+ var newsize = Array( temp[0], temp[1] );
+ var newpos = Array( temp[2], temp[3] );
+ fw.move(obj, 1, newpos[0], newpos[1]);
+ fw.resize(obj, 1, newsize[0], newsize[1]);
+ obj.style.zIndex = 0;
+ temp = obj.id.split("_");
+ var cs = kib.customsettings[kib.dirs[temp[0]]] ? kib.customsettings[kib.dirs[temp[0]]] : kib.customsettings['default'];
+ obj.style.borderColor = cs[3];
+ if(cs[16] == 1)fw.dropshadow(obj, 0);
+ }
+}
+
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_js_changeorder.php b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_js_changeorder.php
new file mode 100644
index 00000000..7bb06e65
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_js_changeorder.php
@@ -0,0 +1,593 @@
+<?php
+ob_start("ob_gzhandler");
+
+session_start();
+
+header("Expires: Mon, 01 Jul 2003 00:00:00 GMT"); // Past date
+header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // Consitnuously modified
+header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
+header("Pragma: no-cache"); // NO CACHE
+
+//----------------------------------------------------------------------------- functions --------------------------------------------------------------------------------
+
+function draw_image($filename, $id, $style, $params) {
+ global $browser, $basedir;
+ $idstring = "";
+ if($id != "")$idstring = "id='".$id."' ";
+ if($browser === "ie6") {
+ $imgsize = getimagesize($filename);
+ echo "<img ".$idstring."style='filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=".$basedir.$filename."); width:".$imgsize[0]."px; height:".$imgsize[1]."px; ".$style."' src='".$basedir."ki_noimage.gif' ".$params." />";
+ } else {
+ if($style != "")$style = " style='".$style."' ";
+ echo "<img ".$idstring."src='".$basedir.$filename."'".$style.$params." />";
+ }
+}
+
+function addEvent($el, $event, $function){
+ global $browser;
+ if($browser == "ie6" || $browser == "ie7"){
+ echo $el.".attachEvent('on".$event."', ".$function.");\n";
+ } else {
+ echo $el.".addEventListener('".$event."', ".$function.", false);\n";
+ }
+}
+
+function removeEvent($el, $event, $function){
+ global $browser;
+ if($browser == "ie6" || $browser == "ie7"){
+ echo $el.".detachEvent('on".$event."', ".$function.");\n";
+ } else {
+ echo $el.".removeEventListener('".$event."', ".$function.", false);\n";
+ }
+}
+
+//------------------------------------------------------------------------ end functions ----------------------------------------------------------------------------------
+
+$browser = $_SERVER['HTTP_USER_AGENT'];
+
+if(preg_match("/Opera/",$browser))
+ $browser = "opera";
+elseif(preg_match("/MSIE [9]/",$browser))
+ $browser = "ie9";
+elseif(preg_match("/MSIE [7-8]/",$browser))
+ $browser = "ie7";
+elseif(preg_match("/MSIE [1-6]/",$browser))
+ $browser = "ie6";
+elseif(preg_match("/AppleWebKit/",$browser))
+ $browser = "webkit";
+else
+ $browser = "gecko";
+
+if($browser == "ie6")
+ $posfix = "absolute";
+else
+ $posfix = "fixed";
+
+if(isset($_GET['reldir']))
+ $reldir = $_GET['reldir'];
+else
+ $reldir = "";
+
+if(isset($_GET['gallery']))
+ $gallery = $_GET['gallery'];
+else
+ $gallery = "";
+
+// -------------- Sicherheitsabfragen!
+if(preg_match("/[\.]*\//", $gallery))exit();
+// ---------- Ende Sicherheitsabfragen!
+
+$confdir = $reldir."ki_config/";
+$galleriesdir = $reldir."ki_galleries/";
+$basedir = $reldir."ki_base/";
+
+include_once("../ki_config/ki_setup.php");
+if(is_file("../ki_config/".$gallery."_ki_setup.php"))include_once("../ki_config/".$gallery."_ki_setup.php");
+
+$pwok = 0;
+if(isset($_SESSION['pwquery'])){
+ if($_SESSION['pwquery'] === $pw)$pwok = 1;
+}
+if($pwok == 0)exit();
+
+header("Content-Type: application/x-javascript");
+?>
+
+// Change image order module 'kic' --------------------------------------------------------------------
+
+function kic_module(){
+
+ /* -------------------------------- variables ----------------------------------- */
+
+ var windowX;
+ var windowY;
+ var currentfolder = "";
+ var gallerynumber = -1;
+
+ var waitforanim = 0;
+ var dragobj = -1;
+ var hoverobj = -1;
+ var direction = 0;
+
+ /* -------------------------------- getElementById function --------------------- */
+
+ function $(id){
+ return document.getElementById(id);
+ }
+
+ /* -------------------------------- constructor/descturctor --------------------- */
+
+ this.constr = function(params){
+ if(typeof(kiv_module) == "function")kiv.closeImage();
+ if(typeof(kie_module) == "function")kie.closeGallery();
+ if(typeof(kis_module) == "function")kis.closeSettings();
+ if(typeof(kid_module) == "function")kid.close();
+ if(typeof(kiu_module) == "function")kiu.closeUpload();
+ if(typeof(kim_module) == "function")kim.close();
+ fw.shadebody(1);
+ var node;
+ if(!$("kic_maindiv")){
+ node = document.createElement("div");
+ node.id = "kic_maindiv";
+ node.style.background = "#aaaaaa";
+ node.style.position = "<?php echo $posfix ?>";
+ node.style.left = "0px";
+ node.style.top = "0px";
+ node.style.zIndex = 1000;
+ node.style.overflowX = "hidden";
+ node.style.overflowY = "auto";
+ node.style.display = "block";
+ node.style.padding = "4px";
+ node.innerHTML = "<div id='kic_changediv' style='background:#D2D2D2; border:1px solid #000000; display:none; position:relative;'></div>";
+ document.body.appendChild(node);
+ }
+ if(!$("kic_topdiv")){
+ node = document.createElement("div");
+ node.id = "kic_topdiv";
+ node.style.background = "#aaaaaa";
+ node.style.position = "<?php echo $posfix ?>";
+ node.style.height = "45px";
+ node.style.zIndex = 1001;
+ node.style.padding = "5px 20px 0px 120px";
+ node.style.font = "12px Tahoma, sans-serif";
+ node.style.color = "#222222";
+ node.style.borderBottom = "1px solid #000000";
+ node.style.borderRight = "1px solid #000000";
+ node.style.left = "0px";
+ node.style.top = "0px";
+ var dirs = "";
+ for(var i = 0; i < kib.dirs.length; i++){
+ dirs = dirs + "<span style='cursor:pointer; text-decoration:underline;margin-right:5px; line-height:14px;' onclick=\"kic.setFolder(" + i + ")\">" + kib.dirs[i] + "</span>";
+ if(kib.dirs[i] == "<?php echo $gallery ?>")gallerynumber = i;
+ }
+ currentfolder = "<?php echo $gallery ?>";
+ node.innerHTML = "<div style='margin-bottom:5px;'><span style='font-size:14px; line-height:18px; font-weight:bold; color:#003; margin-right:5px;'>Selected gallery folder</span><span style='background:#003; border:1px solid #CCC; padding:3px; color:#ffffff;' id='kic_selfolder'>" + currentfolder + "</span></div>" + dirs;
+ document.body.appendChild(node);
+ }
+ if(!$("kic_botdiv")){
+ node = document.createElement("div");
+ node.id = "kic_botdiv";
+ node.style.background = "#aaaaaa";
+ node.style.position = "<?php echo $posfix ?>";
+ node.style.zIndex = 1001;
+ node.style.padding = "5px";
+ node.style.font = "12px Tahoma, sans-serif";
+ node.style.color = "#222222";
+ node.style.borderTop = "1px solid #000000";
+ node.style.borderRight = "1px solid #000000";
+ node.style.borderLeft = "1px solid #000000";
+ node.style.right = "25px";
+ node.style.bottom = "0px";
+ node.innerHTML = "<input type='button' value='Close' style='float:right; margin:0px; padding:0px; cursor:pointer; border:1px solid #000; height:26px; width:150px;' onclick='kic.close()' />";
+ document.body.appendChild(node);
+ kib.showhelp(node, 4, 3);
+ node.onmouseover = function(){
+ kib.hidehelp();
+ }
+ }
+ if(!$("kic_wait")){
+ node = document.createElement("div");
+ node.id = "kic_wait";
+ node.style.background = "<?php echo $bord_color ?>";
+ node.style.position = "<?php echo $posfix ?>";
+ node.style.left = "50%";
+ node.style.top = "50%";
+ node.style.zIndex = 10000;
+ node.style.width = "200px";
+ node.style.height = "40px";
+ node.style.marginLeft = "-106px";
+ node.style.marginTop = "-26px";
+ node.style.border = "2px solid <?php echo $nav_border_color ?>";
+ node.style.color = "<?php echo $comm_text_color ?>";
+ node.style.font = "14px normal <?php echo $comm_text_font ?>";
+ node.style.padding = "8px 4px 0px 4px";
+ node.style.textAlign = "center";
+ node.style.lineHeight = "17px";
+ node.style.display = "none";
+ node.innerHTML = "Please wait, while folder being scanned ...";
+ document.body.appendChild(node);
+ }
+ <?php addEvent("window", "resize", "viewdim"); ?>
+ viewdim();
+ <?php
+ if(!in_array($browser, array("ie6", "ie7", "ie9", "webkit"))){
+ addEvent("document", "keypress", "kic_taste");
+ } else {
+ addEvent("document", "keydown", "kic_taste");
+ }
+ ?>
+ <?php addEvent("document", "mousemove", "mousemoved"); ?>
+ openGallery();
+ }
+
+ this.destr = function(){
+ <?php removeEvent("window", "resize", "viewdim"); ?>
+ document.body.removeChild($("kic_maindiv"));
+ document.body.removeChild($("kic_wait"));
+ document.body.removeChild($("kic_topdiv"));
+ document.body.removeChild($("kic_botdiv"));
+ <?php
+ if(!in_array($browser, array("ie6", "ie7", "ie9", "webkit"))){
+ removeEvent("document", "keypress", "kic_taste");
+ } else {
+ removeEvent("document", "keydown", "kic_taste");
+ }
+ ?>
+ <?php removeEvent("document", "mousemove", "mousemoved"); ?>
+ fw.shadebody(0);
+ }
+
+ /* -------------------------------- methodes ------------------------------------ */
+
+ function viewdim(){
+ if(window.innerHeight){
+ windowX = window.innerWidth - 10;
+ windowY = window.innerHeight - 10;
+ } else if(document.documentElement && document.documentElement.clientHeight){ // Explorer 6 Strict Mode
+ windowX = document.documentElement.clientWidth - 10;
+ windowY = document.documentElement.clientHeight - 10;
+ } else if (document.body){ // other Explorers
+ windowX = document.body.clientWidth - 10;
+ windowY = document.body.clientHeight - 10;
+ }
+ var maindiv = $("kic_maindiv");
+ maindiv.style.width = windowX + 2 + "px";
+ maindiv.style.height = windowY + 2 + "px";
+ var container = $("kic_changediv").childNodes;
+ var laenge = container.length - 1;
+ if(laenge != -1){
+ for(var i = 0; i < laenge; i++){
+ var temp = container[i].alt.split("_");
+ container[i].alt = temp[0] + "_" + temp[1];
+ }
+ placeimages();
+ }
+ }
+
+ function openGallery(){
+ $("kic_wait").style.display = "block";
+ var params = "?reldir=<?php echo $reldir ?>&gallery=" + currentfolder + "&gallerynumber=" + gallerynumber + "&tochange=1";
+ fw.getHTTP("<?php echo $basedir ?>ki_explorer.php" + params, kic.gotGallery);
+ }
+
+ this.gotGallery = function(responseText){
+ $("kic_wait").style.display = "none";
+ var changediv = $("kic_changediv");
+ changediv.innerHTML = responseText;
+ changediv.style.display = "block";
+ placeimages();
+ }
+
+ function placeimages(){
+<?php
+$temp = getimagesize("ki_nav_next.png");
+if($nav_always == 1 && $show_nav == 1)$fr_height -= ($temp[1]+18);
+if($th_lines == "auto")$th_lines = ceil($thumbs/($th_per_line));
+if($th_width == "auto")$th_width = round($fr_width/($th_per_line)) - round($fr_height*0.04) - 4;
+if($th_height == "auto")$th_height = round($fr_height/($th_lines)) - round($fr_height*0.04) - 4;
+if($th_to_square == 1) {
+ if($th_width >= $th_height){
+ $th_width = $th_height;
+ }
+ $th_height = $th_width;
+}
+echo "var th_width = ".($th_width-2*$th_bord_size).";";
+echo "var th_height = ".($th_height-2*$th_bord_size).";";
+?>
+ var prozeile = Math.floor(windowX/(th_width+<?php echo $explorer_padding+2*$th_bord_size ?>));
+ var offsetx = (windowX - (prozeile*(th_width+<?php echo $explorer_padding+2*$th_bord_size ?>)))*0.5;
+ var spaltenbreite = (windowX - 2*offsetx)/prozeile;
+ var zeilenhoehe = th_height+<?php echo $explorer_padding+2*$th_bord_size ?>;
+ var offsety = <?php echo $explorer_padding*0.5 ?>;
+
+ var zeile = 1;
+ var spalte = 1;
+
+ var zaehler = 0;
+ var container = $("kic_changediv").childNodes;
+ var act_width;
+ var act_height;
+ for(var i = 0; i < container.length - 1; i++){
+ var bild = container[i];
+ <?php if($th_to_square == 0){ ?>
+ var bildalt = bild.alt.split("_");
+ if(bildalt[0] >= bildalt[1]){
+ var k = bildalt[1]/bildalt[0];
+ act_width = th_width;
+ act_height = k*act_width;
+ if(act_height > th_height){
+ act_height = th_height;
+ act_width = (1/k) * act_height;
+ }
+ } else {
+ var k = bildalt[0]/bildalt[1];
+ act_height = th_height;
+ act_width = k*act_height;
+ if(act_width > th_width){
+ act_width = th_width;
+ act_height = (1/k) * act_width;
+ }
+ }
+ <?php } else { ?>
+ if(th_width < th_height){
+ act_width = th_width;
+ } else {
+ act_width = th_height;
+ }
+ act_height = act_width;
+ <?php } ?>
+ xpos = Math.round(offsetx + spaltenbreite*(spalte-0.5) - 0.5*act_width - <?php echo $th_bord_size ?>);
+ ypos = Math.round(offsety + zeilenhoehe*(zeile-0.5) - 0.5*act_height - <?php echo $th_bord_size ?>);
+
+ bild.style.left = xpos + "px";
+ bild.style.top = ypos + "px";
+ bild.alt = bild.alt + "_"+xpos+"_"+ypos;
+ zaehler++;
+ spalte++;
+ if(zaehler >= prozeile){
+ zaehler = 0;
+ zeile++;
+ spalte = 1;
+ }
+ }
+ $("kic_changediv").lastChild.style.position = "static";
+ $("kic_changediv").lastChild.style.paddingTop = ypos + (0.5*act_height) + "px";
+ $("kic_changediv").lastChild.style.height = 0.5*th_height + <?php echo 2*$th_bord_size+$explorer_padding ?> + "px";
+ }
+
+ this.setFolder = function(folder){
+ if(kib.dirs[folder] !== currentfolder){
+ fw.removejs("kic");
+ fw.addjs("<?php echo $basedir ?>ki_js_changeorder.php?reldir=<?php echo $reldir ?>&gallery=" + kib.dirs[folder], "kic");
+ }
+ }
+
+ this.selectForDrag = function(obj){
+ if(dragobj != -1)return;
+ var temp = obj.id.indexOf("_");
+ var picnumber = Number(obj.id.substr(temp+1));
+ obj.style.zIndex = 0;
+ fw.fade(obj, 50);
+ dragobj = obj;
+ }
+
+ function mousemoved(aEvent) {
+ if(dragobj == -1)return;
+ aEvent = aEvent ? aEvent : window.event;
+ var x = aEvent.clientX ? aEvent.clientX : aEvent.pageX;
+ var y = aEvent.clientY ? aEvent.clientY : aEvent.pageY;
+
+ var maindiv = $("kic_maindiv");
+ y += maindiv.scrollTop;
+
+ var objalt = dragobj.alt.split("_");
+
+ dragobj.style.left = x - 0.5*objalt[0] + "px";
+ dragobj.style.top = y - 0.5*objalt[1] + "px";
+ }
+
+ this.releaseForDrag = function(obj){
+ if(dragobj == -1 || obj != dragobj){
+ return;
+ }
+ var objalt = dragobj.alt.split("_");
+ if(hoverobj == -1){
+ obj.style.zIndex = 1;
+ fw.fade(dragobj, 100);
+ fw.move(dragobj, 1, objalt[2], objalt[3]);
+ } else {
+ var temp = hoverobj.id.indexOf("_");
+ var picnumber = Number(hoverobj.id.substr(temp+1))-1;
+ var newpos = -1;
+ var hoverobjalt = hoverobj.alt.split("_");
+ if(direction == 1){
+ if(hoverobj.getAttribute("moved") == 0){
+ newpos = picnumber;
+ hoverobjalt = hoverobj.previousSibling.alt.split("_");
+ } else {
+ newpos = picnumber + 1;
+ }
+ }
+ if(direction == -1){
+ if(hoverobj.getAttribute("moved") == 0){
+ newpos = picnumber + 2;
+ hoverobjalt = hoverobj.nextSibling.alt.split("_");
+ } else {
+ newpos = picnumber + 1;
+ }
+ }
+ temp = dragobj.id.indexOf("_");
+ var oldpos = Number(dragobj.id.substr(temp+1));
+ if(oldpos == newpos){
+ obj.style.zIndex = 1;
+ fw.fade(dragobj, 100);
+ fw.move(dragobj, 1, objalt[2], objalt[3]);
+ } else {
+ obj.style.zIndex = 1;
+ fw.fade(dragobj, 100);
+ var left = parseInt(hoverobjalt[2]) + 0.5*(parseInt(hoverobjalt[0])-parseInt(objalt[0]));
+ var top = parseInt(hoverobjalt[3]) + 0.5*(parseInt(hoverobjalt[1])-parseInt(objalt[1]));
+ var forcopy = dragobj;
+ fw.move(dragobj, 1, left, top, Array(function(){
+ var clone = forcopy.cloneNode(true);
+ clone.id = gallerynumber + "_" + newpos;
+ if(direction == -1){
+ forcopy.parentNode.insertBefore(clone, forcopy.parentNode.childNodes[newpos]);
+ } else {
+ forcopy.parentNode.insertBefore(clone, forcopy.parentNode.childNodes[newpos+1]);
+ }
+ forcopy.parentNode.removeChild(forcopy);
+ for(var i = 0; i < clone.parentNode.childNodes.length-1; i++){
+ var tempobj = clone.parentNode.childNodes[i];
+ var tempobjalt = tempobj.alt.split("_");
+ tempobj.alt = tempobjalt[0]+"_"+tempobjalt[1];
+ tempobj.id = gallerynumber + "_" + i;
+ tempobj.setAttribute("moved", 0);
+ }
+ placeimages();
+ }));
+ saveneworder(oldpos, newpos);
+ }
+ }
+ dragobj = -1;
+ hoverobj = -1;
+ }
+
+ this.hoverDrag = function(obj){
+ if(dragobj == -1)return;
+ if(obj == dragobj)return;
+
+ var temp = obj.id.indexOf("_");
+ var picnumber = Number(obj.id.substr(temp+1))+1;
+
+ temp = dragobj.id.indexOf("_");
+ var dragpicnumber = Number(dragobj.id.substr(temp+1))+1;
+
+ if(dragpicnumber > picnumber){
+ if(direction == 1){
+ for(var i = dragpicnumber; i < obj.parentNode.childNodes.length; i++){
+ var tempobj = obj.parentNode.childNodes[i-1];
+ if(tempobj.getAttribute("moved") == 1){
+ tempobj.setAttribute("moved", 0);
+ var tempobjalt = tempobj.alt.split("_");
+ var left = tempobjalt[2];
+ var top = tempobjalt[3];
+ fw.move(tempobj, 1, left, top);
+ }
+ }
+ }
+ direction = -1;
+ if(obj.getAttribute("moved") == 0){
+ for(var i = picnumber; i < dragpicnumber; i++){
+ var tempobj = obj.parentNode.childNodes[i-1];
+ tempobj.setAttribute("moved", 1);
+ var tempobjalt = tempobj.alt.split("_");
+ var movethumb = obj.parentNode.childNodes[i];
+ var movethumbalt = movethumb.alt.split("_");
+ var left = parseInt(movethumbalt[2]) + 0.5*(parseInt(movethumbalt[0])-parseInt(tempobjalt[0]));
+ var top = parseInt(movethumbalt[3]) + 0.5*(parseInt(movethumbalt[1])-parseInt(tempobjalt[1]));
+ fw.move(tempobj, 1, left, top);
+ }
+ } else {
+ for(var i = picnumber; i > 0; i--){
+ var tempobj = obj.parentNode.childNodes[i-1];
+ if(tempobj.getAttribute("moved") == 1){
+ tempobj.setAttribute("moved", 0);
+ var tempobjalt = tempobj.alt.split("_");
+ var left = tempobjalt[2];
+ var top = tempobjalt[3];
+ fw.move(tempobj, 1, left, top);
+ } else {
+ break;
+ }
+ }
+ }
+ } else {
+ if(direction == -1){
+ for(var i = dragpicnumber; i > 0; i--){
+ var tempobj = obj.parentNode.childNodes[i-1];
+ if(tempobj.getAttribute("moved") == 1){
+ tempobj.setAttribute("moved", 0);
+ var tempobjalt = tempobj.alt.split("_");
+ var left = tempobjalt[2];
+ var top = tempobjalt[3];
+ fw.move(tempobj, 1, left, top);
+ }
+ }
+ }
+ direction = 1;
+ if(obj.getAttribute("moved") == 0){
+ for(var i = picnumber; i > dragpicnumber; i--){
+ var tempobj = obj.parentNode.childNodes[i-1];
+ tempobj.setAttribute("moved", 1);
+ var tempobjalt = tempobj.alt.split("_");
+ var movethumb = obj.parentNode.childNodes[i-2];
+ var movethumbalt = movethumb.alt.split("_");
+ var left = parseInt(movethumbalt[2]) + 0.5*(parseInt(movethumbalt[0])-parseInt(tempobjalt[0]));
+ var top = parseInt(movethumbalt[3]) + 0.5*(parseInt(movethumbalt[1])-parseInt(tempobjalt[1]));
+ fw.move(tempobj, 1, left, top);
+ }
+ } else {
+ for(var i = picnumber; i < obj.parentNode.childNodes.length; i++){
+ var tempobj = obj.parentNode.childNodes[i-1];
+ if(tempobj.getAttribute("moved") == 1){
+ tempobj.setAttribute("moved", 0);
+ var tempobjalt = tempobj.alt.split("_");
+ var left = tempobjalt[2];
+ var top = tempobjalt[3];
+ fw.move(tempobj, 1, left, top);
+ } else {
+ break;
+ }
+ }
+ }
+ }
+
+ hoverobj = obj;
+ }
+
+ function saveneworder(oldpos, newpos){
+ var params = "?gallery=" + currentfolder + "&oldpos=" + oldpos + "&newpos=" + newpos;
+ fw.getHTTP("<?php echo $basedir ?>ki_saveneworder.php" + params, savedneworder);
+ }
+
+ function savedneworder(responseText){
+ if(responseText != "ok"){
+ var savedfile = currentfolder + "_dir";
+ alert("ERROR: File '"+savedfile+"' could not be saved/modified.");
+ }
+ }
+
+ this.close = function(){
+ kib.hidehelp();
+ var obj = $("kic_changediv").childNodes;
+ for(var i = 0; i < obj.length - 1; i++){
+ obj[i].src = "";
+ }
+ fw.removejs("kic");
+ kib.reinit();
+ }
+
+ function preventDefaultAction(aEvent) {
+ <?php if($browser !== "ie6" && $browser !== "ie7") { ?>
+ aEvent.stopPropagation();
+ <?php } ?>
+ <?php if($browser === "gecko") { ?>
+ aEvent.preventDefault();
+ <?php } ?>
+ <?php if($browser === "opera") { ?>
+ aEvent.returnValue = false;
+ <?php } ?>
+ }
+
+ function kic_taste(aEvent) {
+ aEvent = aEvent ? aEvent : window.event;
+ var keyCode = aEvent.keyCode;
+ if(keyCode == 27){
+ kic.close();
+ preventDefaultAction(aEvent);
+ return false;
+ }
+ }
+
+} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_js_delete.php b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_js_delete.php
new file mode 100644
index 00000000..10f82757
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_js_delete.php
@@ -0,0 +1,425 @@
+<?php
+ob_start("ob_gzhandler");
+
+session_start();
+
+header("Expires: Mon, 01 Jul 2003 00:00:00 GMT"); // Past date
+header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // Consitnuously modified
+header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
+header("Pragma: no-cache"); // NO CACHE
+
+//----------------------------------------------------------------------------- functions --------------------------------------------------------------------------------
+
+function draw_image($filename, $id, $style, $params) {
+ global $browser, $basedir;
+ $idstring = "";
+ if($id != "")$idstring = "id='".$id."' ";
+ if($browser === "ie6") {
+ $imgsize = getimagesize($filename);
+ echo "<img ".$idstring."style='filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=".$basedir.$filename."); width:".$imgsize[0]."px; height:".$imgsize[1]."px; ".$style."' src='".$basedir."ki_noimage.gif' ".$params." />";
+ } else {
+ if($style != "")$style = " style='".$style."' ";
+ echo "<img ".$idstring."src='".$basedir.$filename."'".$style.$params." />";
+ }
+}
+
+function addEvent($el, $event, $function){
+ global $browser;
+ if($browser == "ie6" || $browser == "ie7"){
+ echo $el.".attachEvent('on".$event."', ".$function.");\n";
+ } else {
+ echo $el.".addEventListener('".$event."', ".$function.", false);\n";
+ }
+}
+
+function removeEvent($el, $event, $function){
+ global $browser;
+ if($browser == "ie6" || $browser == "ie7"){
+ echo $el.".detachEvent('on".$event."', ".$function.");\n";
+ } else {
+ echo $el.".removeEventListener('".$event."', ".$function.", false);\n";
+ }
+}
+
+//------------------------------------------------------------------------ end functions ----------------------------------------------------------------------------------
+
+$browser = $_SERVER['HTTP_USER_AGENT'];
+
+if(preg_match("/Opera/",$browser))
+ $browser = "opera";
+elseif(preg_match("/MSIE [9]/",$browser))
+ $browser = "ie9";
+elseif(preg_match("/MSIE [7-8]/",$browser))
+ $browser = "ie7";
+elseif(preg_match("/MSIE [1-6]/",$browser))
+ $browser = "ie6";
+elseif(preg_match("/AppleWebKit/",$browser))
+ $browser = "webkit";
+else
+ $browser = "gecko";
+
+if($browser == "ie6")
+ $posfix = "absolute";
+else
+ $posfix = "fixed";
+
+if(isset($_GET['reldir']))
+ $reldir = $_GET['reldir'];
+else
+ $reldir = "";
+
+if(isset($_GET['gallery']))
+ $gallery = $_GET['gallery'];
+else
+ $gallery = "";
+
+// -------------- Sicherheitsabfragen!
+if(preg_match("/[\.]*\//", $gallery))exit();
+// ---------- Ende Sicherheitsabfragen!
+
+$confdir = $reldir."ki_config/";
+$galleriesdir = $reldir."ki_galleries/";
+$basedir = $reldir."ki_base/";
+
+include_once("../ki_config/ki_setup.php");
+if(is_file("../ki_config/".$gallery."_ki_setup.php"))include_once("../ki_config/".$gallery."_ki_setup.php");
+
+$pwok = 0;
+if(isset($_SESSION['pwquery'])){
+ if($_SESSION['pwquery'] === $pw)$pwok = 1;
+}
+if($pwok == 0)exit();
+
+header("Content-Type: application/x-javascript");
+?>
+
+// Delete Images module 'kid' --------------------------------------------------------------------
+
+function kid_module(){
+
+ /* -------------------------------- variables ----------------------------------- */
+
+ var windowX;
+ var windowY;
+ var currentfolder = "";
+ var gallerynumber = -1;
+
+ var waitforanim = 0;
+
+ /* -------------------------------- getElementById function --------------------- */
+
+ function $(id){
+ return document.getElementById(id);
+ }
+
+ /* -------------------------------- constructor/descturctor --------------------- */
+
+ this.constr = function(params){
+ if(typeof(kiv_module) == "function")kiv.closeImage();
+ if(typeof(kie_module) == "function")kie.closeGallery();
+ if(typeof(kis_module) == "function")kis.closeSettings();
+ if(typeof(kiu_module) == "function")kiu.closeUpload();
+ if(typeof(kic_module) == "function")kic.close();
+ if(typeof(kim_module) == "function")kim.close();
+ fw.shadebody(1);
+ var node;
+ if(!$("kid_maindiv")){
+ node = document.createElement("div");
+ node.id = "kid_maindiv";
+ node.style.background = "#aaaaaa";
+ node.style.position = "<?php echo $posfix ?>";
+ node.style.left = "0px";
+ node.style.top = "0px";
+ node.style.zIndex = 1000;
+ node.style.overflowX = "hidden";
+ node.style.overflowY = "auto";
+ node.style.display = "block";
+ node.style.padding = "4px";
+ node.innerHTML = "<div id='kid_deletediv' style='background:#D2D2D2; border:1px solid #000000; display:none; position:relative;'></div>";
+ document.body.appendChild(node);
+ }
+ if(!$("kid_topdiv")){
+ node = document.createElement("div");
+ node.id = "kid_topdiv";
+ node.style.background = "#aaaaaa";
+ node.style.position = "<?php echo $posfix ?>";
+ node.style.height = "45px";
+ node.style.zIndex = 1001;
+ node.style.padding = "5px 20px 0px 120px";
+ node.style.font = "12px Tahoma, sans-serif";
+ node.style.color = "#222222";
+ node.style.borderBottom = "1px solid #000000";
+ node.style.borderRight = "1px solid #000000";
+ node.style.left = "0px";
+ node.style.top = "0px";
+ var dirs = "";
+ for(var i = 0; i < kib.dirs.length; i++){
+ dirs = dirs + "<span style='cursor:pointer; text-decoration:underline;margin-right:5px; line-height:14px;' onclick=\"kid.setFolder(" + i + ")\">" + kib.dirs[i] + "</span>";
+ if(kib.dirs[i] == "<?php echo $gallery ?>")gallerynumber = i;
+ }
+ currentfolder = "<?php echo $gallery ?>";
+ node.innerHTML = "<div style='margin-bottom:5px;'><span style='font-size:14px; line-height:18px; font-weight:bold; color:#003; margin-right:5px;'>Selected gallery folder</span><span style='background:#003; border:1px solid #CCC; padding:3px; color:#ffffff;' id='kid_selfolder'>" + currentfolder + "</span></div>" + dirs;
+ document.body.appendChild(node);
+ }
+ if(!$("kid_botdiv")){
+ node = document.createElement("div");
+ node.id = "kid_botdiv";
+ node.style.background = "#aaaaaa";
+ node.style.position = "<?php echo $posfix ?>";
+ node.style.zIndex = 1001;
+ node.style.padding = "5px";
+ node.style.font = "12px Tahoma, sans-serif";
+ node.style.color = "#222222";
+ node.style.borderTop = "1px solid #000000";
+ node.style.borderRight = "1px solid #000000";
+ node.style.borderLeft = "1px solid #000000";
+ node.style.right = "25px";
+ node.style.bottom = "0px";
+ node.innerHTML = "<input type='button' value='Close' style='float:right; margin:0px; padding:0px; cursor:pointer; border:1px solid #000; height:26px; width:150px;' onclick='kid.close()' />";
+ document.body.appendChild(node);
+ kib.showhelp(node, 4, 4);
+ node.onmouseover = function(){
+ kib.hidehelp();
+ }
+ }
+ if(!$("kid_wait")){
+ node = document.createElement("div");
+ node.id = "kid_wait";
+ node.style.background = "<?php echo $bord_color ?>";
+ node.style.position = "<?php echo $posfix ?>";
+ node.style.left = "50%";
+ node.style.top = "50%";
+ node.style.zIndex = 10000;
+ node.style.width = "200px";
+ node.style.height = "40px";
+ node.style.marginLeft = "-106px";
+ node.style.marginTop = "-26px";
+ node.style.border = "2px solid <?php echo $nav_border_color ?>";
+ node.style.color = "<?php echo $comm_text_color ?>";
+ node.style.font = "14px normal <?php echo $comm_text_font ?>";
+ node.style.padding = "8px 4px 0px 4px";
+ node.style.textAlign = "center";
+ node.style.lineHeight = "17px";
+ node.style.display = "none";
+ node.innerHTML = "Please wait, while folder being scanned ...";
+ document.body.appendChild(node);
+ }
+ <?php addEvent("window", "resize", "viewdim"); ?>
+ viewdim();
+ <?php
+ if(!in_array($browser, array("ie6", "ie7", "ie9", "webkit"))){
+ addEvent("document", "keypress", "kid_taste");
+ } else {
+ addEvent("document", "keydown", "kid_taste");
+ }
+ ?>
+ openGallery();
+ }
+
+ this.destr = function(){
+ <?php removeEvent("window", "resize", "viewdim"); ?>
+ document.body.removeChild($("kid_maindiv"));
+ document.body.removeChild($("kid_wait"));
+ document.body.removeChild($("kid_topdiv"));
+ document.body.removeChild($("kid_botdiv"));
+ <?php
+ if(!in_array($browser, array("ie6", "ie7", "ie9", "webkit"))){
+ removeEvent("document", "keypress", "kid_taste");
+ } else {
+ removeEvent("document", "keydown", "kid_taste");
+ }
+ ?>
+ fw.shadebody(0);
+ }
+
+ /* -------------------------------- methodes ------------------------------------ */
+
+ function viewdim(){
+ if(window.innerHeight){
+ windowX = window.innerWidth - 10;
+ windowY = window.innerHeight - 10;
+ } else if(document.documentElement && document.documentElement.clientHeight){ // Explorer 6 Strict Mode
+ windowX = document.documentElement.clientWidth - 10;
+ windowY = document.documentElement.clientHeight - 10;
+ } else if (document.body){ // other Explorers
+ windowX = document.body.clientWidth - 10;
+ windowY = document.body.clientHeight - 10;
+ }
+ var maindiv = $("kid_maindiv");
+ maindiv.style.width = windowX + 2 + "px";
+ maindiv.style.height = windowY + 2 + "px";
+ var container = $("kid_deletediv").childNodes;
+ var laenge = container.length - 1;
+ if(laenge != -1){
+ for(var i = 0; i < laenge; i++){
+ var temp = container[i].alt.split("_");
+ container[i].alt = temp[0] + "_" + temp[1];
+ }
+ placeimages();
+ }
+ }
+
+ function openGallery(){
+ $("kid_wait").style.display = "block";
+ var params = "?reldir=<?php echo $reldir ?>&gallery=" + currentfolder + "&gallerynumber=" + gallerynumber + "&todelete=1";
+ fw.getHTTP("<?php echo $basedir ?>ki_explorer.php" + params, kid.gotGallery);
+ }
+
+ this.gotGallery = function(responseText){
+ $("kid_wait").style.display = "none";
+ var deletediv = $("kid_deletediv");
+ deletediv.innerHTML = responseText;
+ deletediv.style.display = "block";
+ placeimages();
+ }
+
+ function placeimages(){
+<?php
+$temp = getimagesize("ki_nav_next.png");
+if($nav_always == 1 && $show_nav == 1)$fr_height -= ($temp[1]+18);
+if($th_lines == "auto")$th_lines = ceil($thumbs/($th_per_line));
+if($th_width == "auto")$th_width = round($fr_width/($th_per_line)) - round($fr_height*0.04) - 4;
+if($th_height == "auto")$th_height = round($fr_height/($th_lines)) - round($fr_height*0.04) - 4;
+if($th_to_square == 1) {
+ if($th_width >= $th_height){
+ $th_width = $th_height;
+ }
+ $th_height = $th_width;
+}
+echo "var th_width = ".($th_width-2*$th_bord_size).";";
+echo "var th_height = ".($th_height-2*$th_bord_size).";";
+?>
+ var prozeile = Math.floor(windowX/(th_width+<?php echo $explorer_padding+2*$th_bord_size ?>));
+ var offsetx = (windowX - (prozeile*(th_width+<?php echo $explorer_padding+2*$th_bord_size ?>)))*0.5;
+ var spaltenbreite = (windowX - 2*offsetx)/prozeile;
+ var zeilenhoehe = th_height+<?php echo $explorer_padding+2*$th_bord_size ?>;
+ var offsety = <?php echo $explorer_padding*0.5 ?>;
+
+ var zeile = 1;
+ var spalte = 1;
+
+ var zaehler = 0;
+ var container = $("kid_deletediv").childNodes;
+ var act_width;
+ var act_height;
+ for(var i = 0; i < container.length - 1; i++){
+ <?php if($th_to_square == 0){ ?>
+ var obj = kib.pics[gallerynumber][i];
+ if(obj.x >= obj.y){
+ var k = obj.y/obj.x;
+ act_width = th_width;
+ act_height = k*act_width;
+ if(act_height > th_height){
+ act_height = th_height;
+ act_width = (1/k) * act_height;
+ }
+ } else {
+ var k = obj.x/obj.y;
+ act_height = th_height;
+ act_width = k*act_height;
+ if(act_width > th_width){
+ act_width = th_width;
+ act_height = (1/k) * act_width;
+ }
+ }
+ <?php } else { ?>
+ if(th_width < th_height){
+ act_width = th_width;
+ } else {
+ act_width = th_height;
+ }
+ act_height = act_width;
+ <?php } ?>
+ xpos = Math.round(offsetx + spaltenbreite*(spalte-0.5) - 0.5*act_width - <?php echo $th_bord_size ?>);
+ ypos = Math.round(offsety + zeilenhoehe*(zeile-0.5) - 0.5*act_height - <?php echo $th_bord_size ?>);
+
+ var bild = container[i];
+ bild.style.left = xpos + "px";
+ bild.style.top = ypos + "px";
+ bild.alt = bild.alt + "_"+xpos+"_"+ypos;
+ zaehler++;
+ spalte++;
+ if(zaehler >= prozeile){
+ zaehler = 0;
+ zeile++;
+ spalte = 1;
+ }
+ }
+ $("kid_deletediv").lastChild.style.position = "static";
+ $("kid_deletediv").lastChild.style.paddingTop = ypos + (0.5*act_height) + "px";
+ $("kid_deletediv").lastChild.style.height = 0.5*th_height + <?php echo 2*$th_bord_size+$explorer_padding ?> + "px";
+ }
+
+ this.setFolder = function(folder){
+ if(kib.dirs[folder] !== currentfolder){
+ fw.removejs("kid");
+ fw.addjs("<?php echo $basedir ?>ki_js_delete.php?reldir=<?php echo $reldir ?>&gallery=" + kib.dirs[folder], "kid");
+ }
+ }
+
+ this.deleteImage = function(obj) {
+ if(waitforanim > 0)return;
+ var temp = obj.id.indexOf("_");
+ var picnumber = Number(obj.id.substr(temp+1));
+ var thumb = obj.src.substr(obj.src.lastIndexOf("/")+1);
+ var params = "?gallery=" + kib.dirs[gallerynumber] + "&file=" + encodeURIComponent(kib.pics[gallerynumber][picnumber].file) + "&thumb=" + encodeURIComponent(thumb);
+ fw.getHTTP("<?php echo $basedir ?>ki_deleteimage.php" + params, null, null);
+
+ var go = 0;
+ for(var i = 1; i < obj.parentNode.childNodes.length-1; i++){
+ var tempobj = obj.parentNode.childNodes[i-1];
+ if(tempobj == obj){
+ waitforanim = obj.parentNode.childNodes.length-1-i;
+ go = 1;
+ }
+ if(go == 0)continue;
+ var tempobjalt = tempobj.alt.split("_");
+ var movethumb = obj.parentNode.childNodes[i];
+ var movethumbalt = movethumb.alt.split("_");
+ var left = parseInt(tempobjalt[2]) + 0.5*(parseInt(tempobjalt[0])-parseInt(movethumbalt[0]));
+ var top = parseInt(tempobjalt[3]) + 0.5*(parseInt(tempobjalt[1])-parseInt(movethumbalt[1]));
+ fw.move(movethumb, 1, left, top, Array( newaltforthumb, movethumb, movethumbalt[0], movethumbalt[1], left, top));
+ }
+ obj.parentNode.removeChild(obj);
+
+ if(go == 0)waitforanim = 0;
+ }
+
+ function newaltforthumb(obj, w, h, l, t){
+ obj.alt = w+"_"+h+"_"+l+"_"+t;
+ waitforanim--;
+ }
+
+ this.close = function(){
+ kib.hidehelp();
+ var obj = $("kid_deletediv").childNodes;
+ for(var i = 0; i < obj.length - 1; i++){
+ obj[i].src = "";
+ }
+ fw.removejs("kid");
+ kib.reinit();
+ }
+
+ function preventDefaultAction(aEvent) {
+ <?php if($browser !== "ie6" && $browser !== "ie7") { ?>
+ aEvent.stopPropagation();
+ <?php } ?>
+ <?php if($browser === "gecko") { ?>
+ aEvent.preventDefault();
+ <?php } ?>
+ <?php if($browser === "opera") { ?>
+ aEvent.returnValue = false;
+ <?php } ?>
+ }
+
+ function kid_taste(aEvent) {
+ aEvent = aEvent ? aEvent : window.event;
+ var keyCode = aEvent.keyCode;
+ if(keyCode == 27){
+ kid.close();
+ preventDefaultAction(aEvent);
+ return false;
+ }
+ }
+
+} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_js_explorer.php b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_js_explorer.php
new file mode 100644
index 00000000..8615ec7d
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_js_explorer.php
@@ -0,0 +1,349 @@
+<?php
+ob_start("ob_gzhandler");
+
+header("Expires: Mon, 01 Jul 2003 00:00:00 GMT"); // Past date
+header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // Consitnuously modified
+header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
+header("Pragma: no-cache"); // NO CACHE
+
+//----------------------------------------------------------------------------- functions --------------------------------------------------------------------------------
+
+function draw_image($filename, $id, $style, $params) {
+ global $browser, $basedir;
+ $idstring = "";
+ if($id != "")$idstring = "id='".$id."' ";
+ if($browser === "ie6") {
+ $imgsize = getimagesize($filename);
+ echo "<img ".$idstring."style='filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=".$basedir.$filename."); width:".$imgsize[0]."px; height:".$imgsize[1]."px; ".$style."' src='".$basedir."ki_noimage.gif' ".$params." />";
+ } else {
+ if($style != "")$style = " style='".$style."' ";
+ echo "<img ".$idstring."src='".$basedir.$filename."'".$style.$params." />";
+ }
+}
+
+function addEvent($el, $event, $function){
+ global $browser;
+ if($browser == "ie6" || $browser == "ie7"){
+ echo $el.".attachEvent('on".$event."', ".$function.");\n";
+ } else {
+ echo $el.".addEventListener('".$event."', ".$function.", false);\n";
+ }
+}
+
+function removeEvent($el, $event, $function){
+ global $browser;
+ if($browser == "ie6" || $browser == "ie7"){
+ echo $el.".detachEvent('on".$event."', ".$function.");\n";
+ } else {
+ echo $el.".removeEventListener('".$event."', ".$function.", false);\n";
+ }
+}
+
+//------------------------------------------------------------------------ end functions ----------------------------------------------------------------------------------
+
+$browser = $_SERVER['HTTP_USER_AGENT'];
+
+if(preg_match("/Opera/",$browser))
+ $browser = "opera";
+elseif(preg_match("/MSIE [9]/",$browser))
+ $browser = "ie9";
+elseif(preg_match("/MSIE [7-8]/",$browser))
+ $browser = "ie7";
+elseif(preg_match("/MSIE [1-6]/",$browser))
+ $browser = "ie6";
+elseif(preg_match("/AppleWebKit/",$browser))
+ $browser = "webkit";
+else
+ $browser = "gecko";
+
+if($browser == "ie6")
+ $posfix = "absolute";
+else
+ $posfix = "fixed";
+
+if(isset($_GET['reldir']))
+ $reldir = $_GET['reldir'];
+else
+ $reldir = "";
+
+if(isset($_GET['gallery']))
+ $gallery = $_GET['gallery'];
+else
+ $gallery = "";
+
+// -------------- Sicherheitsabfragen!
+if(preg_match("/[\.]*\//", $gallery))exit();
+// ---------- Ende Sicherheitsabfragen!
+
+$confdir = $reldir."ki_config/";
+$galleriesdir = $reldir."ki_galleries/";
+$basedir = $reldir."ki_base/";
+
+include_once("../ki_config/ki_setup.php");
+if(is_file("../ki_config/".$gallery."_ki_setup.php"))include_once("../ki_config/".$gallery."_ki_setup.php");
+
+header("Content-Type: application/x-javascript");
+?>
+
+// Explorer module 'kie' --------------------------------------------------------------------
+
+function kie_module(){
+
+ /* -------------------------------- variables ----------------------------------- */
+
+ var windowX;
+ var windowY;
+ var gallerynumber = -1;
+
+ /* -------------------------------- getElementById function --------------------- */
+
+ function $(id){
+ return document.getElementById(id);
+ }
+
+ /* -------------------------------- constructor/descturctor --------------------- */
+
+ this.constr = function(params){
+ gallerynumber = params[0];
+ var node;
+ if(!$("kie_maindiv")){
+ node = document.createElement("div");
+ node.id = "kie_maindiv";
+ node.style.background = "<?php echo $fr_color ?>";
+ node.style.position = "<?php echo $posfix ?>";
+ node.style.left = "0px";
+ node.style.top = "0px";
+ node.style.zIndex = 1000;
+ node.style.overflowX = "hidden";
+ node.style.overflowY = "auto";
+ node.style.display = "none";
+ document.body.appendChild(node);
+ }
+ if(!$("kie_tb")){
+ <?php $breite = getimagesize("ki_nav_close.png"); ?>
+ var tbcontent = "<?php draw_image("ki_nav_close.png", "", "cursor:pointer; border:0px; margin:0px 2px 0px 2px; padding-top:2px; display:inline;", "onclick=\\\"kie.closeGallery();\\\" onmouseover=\\\"this.style.padding = '0px 0px 2px 0px';\\\" onmouseout=\\\"this.style.padding = '2px 0px 0px 0px';\\\" title='".htmlentities(stripslashes($nav_kiv_close), ENT_QUOTES, "UTF-8")."'"); ?>";
+ node = document.createElement("div");
+ node.id = "kie_tb";
+ node.style.position = "<?php echo $posfix ?>";
+ node.style.top = "-20px";
+ node.style.left = "50%";
+ node.style.marginLeft = "-<?php echo 0.5*($breite[0]+14) ?>px";
+ node.style.background = "<?php echo $nav_color ?>";
+ <?php if($nav_style == 2){ ?>
+ node.style.borderRadius = "20px";
+ node.style.MozBorderRadius = "20px";
+ node.style.WebkitBorderRadius = "20px";
+ <?php } ?>
+ node.style.border = "2px solid <?php echo $nav_border_color ?>";
+ node.style.zIndex = 10000;
+ node.style.padding = "20px 3px 3px 3px";
+ node.style.lineHeight = "12px";
+ node.innerHTML = tbcontent;
+ document.body.appendChild(node);
+ }
+ if(!$("kie_wait")){
+ node = document.createElement("div");
+ node.id = "kie_wait";
+ node.style.background = "<?php echo $bord_color ?>";
+ node.style.position = "<?php echo $posfix ?>";
+ node.style.left = "50%";
+ node.style.top = "50%";
+ node.style.zIndex = 10000;
+ node.style.width = "200px";
+ node.style.height = "40px";
+ node.style.marginLeft = "-106px";
+ node.style.marginTop = "-26px";
+ node.style.border = "2px solid <?php echo $nav_border_color ?>";
+ node.style.color = "<?php echo $comm_text_color ?>";
+ node.style.font = "14px normal <?php echo $comm_text_font ?>";
+ node.style.padding = "8px 4px 0px 4px";
+ node.style.textAlign = "center";
+ node.style.lineHeight = "17px";
+ node.innerHTML = "Please wait, while folder being scanned ...";
+ document.body.appendChild(node);
+ }
+ <?php addEvent("window", "resize", "viewdim"); ?>
+ viewdim();
+ <?php
+ if(!in_array($browser, array("ie6", "ie7", "ie9", "webkit"))){
+ addEvent("document", "keypress", "taste");
+ } else {
+ addEvent("document", "keydown", "taste");
+ }
+ ?>
+ openGallery();
+ }
+
+ this.destr = function(){
+ <?php removeEvent("window", "resize", "viewdim"); ?>
+ document.body.removeChild($("kie_maindiv"));
+ document.body.removeChild($("kie_tb"));
+ document.body.removeChild($("kie_wait"));
+ <?php
+ if(!in_array($browser, array("ie6", "ie7", "ie9", "webkit"))){
+ removeEvent("document", "keypress", "taste");
+ } else {
+ removeEvent("document", "keydown", "taste");
+ }
+ ?>
+
+ }
+
+ /* -------------------------------- methodes ------------------------------------ */
+
+ function viewdim(){
+ if(window.innerHeight){
+ windowX = window.innerWidth;
+ windowY = window.innerHeight;
+ } else if(document.documentElement && document.documentElement.clientHeight){ // Explorer 6 Strict Mode
+ windowX = document.documentElement.clientWidth;
+ windowY = document.documentElement.clientHeight;
+ } else if (document.body){ // other Explorers
+ windowX = document.body.clientWidth;
+ windowY = document.body.clientHeight;
+ }
+ var maindiv = $("kie_maindiv");
+ maindiv.style.width = windowX + "px";
+ maindiv.style.height = windowY + "px";
+ var container = $("kie_maindiv").childNodes;
+ var laenge = container.length - 1;
+ if(laenge != -1){
+ for(var i = 0; i < laenge; i++){
+ var temp = container[i].alt.split("_");
+ container[i].alt = temp[0] + "_" + temp[1];
+ }
+ placeimages();
+ }
+ }
+
+ function openGallery(){
+ fw.shadebody(1, Array( function(){
+ $("kie_tb").style.display = "block";
+ var params = "?reldir=<?php echo $reldir ?>&gallery=" + kib.dirs[gallerynumber] + "&gallerynumber=" + gallerynumber;
+ fw.getHTTP("<?php echo $basedir ?>ki_explorer.php" + params, kie.gotGallery);
+ } ));
+ }
+
+ this.gotGallery = function(responseText){
+ $("kie_wait").style.display = "none";
+ var maindiv = $("kie_maindiv");
+ maindiv.innerHTML = responseText;
+ maindiv.style.display = "block";
+ placeimages();
+ }
+
+ function placeimages(){
+<?php
+$temp = getimagesize("ki_nav_next.png");
+if($nav_always == 1 && $show_nav == 1)$fr_height -= ($temp[1]+18);
+if($th_lines == "auto")$th_lines = ceil($thumbs/($th_per_line));
+if($th_width == "auto")$th_width = round($fr_width/($th_per_line)) - round($fr_height*0.04) - 4;
+if($th_height == "auto")$th_height = round($fr_height/($th_lines)) - round($fr_height*0.04) - 4;
+if($th_to_square == 1) {
+ if($th_width >= $th_height){
+ $th_width = $th_height;
+ }
+ $th_height = $th_width;
+}
+echo "var th_width = ".($th_width-2*$th_bord_size).";";
+echo "var th_height = ".($th_height-2*$th_bord_size).";";
+?>
+ var prozeile = Math.floor(windowX/(th_width+<?php echo $explorer_padding+2*$th_bord_size ?>));
+ var offsetx = (windowX - (prozeile*(th_width+<?php echo $explorer_padding+2*$th_bord_size ?>)))*0.5;
+ var spaltenbreite = (windowX - 2*offsetx)/prozeile;
+ var zeilenhoehe = th_height+<?php echo $explorer_padding+2*$th_bord_size ?>;
+ var offsety = <?php echo $explorer_padding*0.5 ?>;
+
+ var zeile = 1;
+ var spalte = 1;
+
+ var zaehler = 0;
+ var container = $("kie_maindiv").childNodes;
+ var act_width;
+ var act_height;
+ for(var i = 0; i < container.length - 1; i++){
+ <?php if($th_to_square == 0){ ?>
+ var obj = kib.pics[gallerynumber][i];
+ if(obj.x >= obj.y){
+ var k = obj.y/obj.x;
+ act_width = th_width;
+ act_height = k*act_width;
+ if(act_height > th_height){
+ act_height = th_height;
+ act_width = (1/k) * act_height;
+ }
+ } else {
+ var k = obj.x/obj.y;
+ act_height = th_height;
+ act_width = k*act_height;
+ if(act_width > th_width){
+ act_width = th_width;
+ act_height = (1/k) * act_width;
+ }
+ }
+ <?php } else { ?>
+ if(th_width < th_height){
+ act_width = th_width;
+ } else {
+ act_width = th_height;
+ }
+ act_height = act_width;
+ <?php } ?>
+ xpos = Math.round(offsetx + spaltenbreite*(spalte-0.5) - 0.5*act_width - <?php echo $th_bord_size ?>);
+ ypos = Math.round(offsety + zeilenhoehe*(zeile-0.5) - 0.5*act_height - <?php echo $th_bord_size ?>);
+
+ var bild = container[i];
+ bild.style.left = xpos + "px";
+ bild.style.top = ypos + "px";
+ bild.alt = bild.alt + "_"+xpos+"_"+ypos;
+ zaehler++;
+ spalte++;
+ if(zaehler >= prozeile){
+ zaehler = 0;
+ zeile++;
+ spalte = 1;
+ }
+ }
+ $("kie_maindiv").lastChild.style.top = ypos + (0.5*act_height) + "px";
+ $("kie_maindiv").lastChild.style.height = 0.5*th_height + <?php echo 2*$th_bord_size+$explorer_padding ?> + "px";
+ }
+
+ this.getImage = function(picstring) {
+ $("kie_maindiv").style.zIndex = 99;
+ $("kie_tb").style.display = "none";
+ kib.getImage(picstring);
+ }
+
+ this.closeGallery = function(){
+ var obj = $("kie_maindiv").childNodes;
+ for(var i = 0; i < obj.length - 1; i++){
+ obj[i].src = "";
+ }
+ fw.removejs("kie");
+ fw.shadebody(0);
+ }
+
+ function preventDefaultAction(aEvent) {
+ <?php if($browser !== "ie6" && $browser !== "ie7") { ?>
+ aEvent.stopPropagation();
+ <?php } ?>
+ <?php if($browser === "gecko") { ?>
+ aEvent.preventDefault();
+ <?php } ?>
+ <?php if($browser === "opera") { ?>
+ aEvent.returnValue = false;
+ <?php } ?>
+ }
+
+ function taste(aEvent) {
+ aEvent = aEvent ? aEvent : window.event;
+ var keyCode = aEvent.keyCode;
+ if(keyCode == 27){
+ if(typeof(kiv_module) == "function")return;
+ kie.closeGallery();
+ preventDefaultAction(aEvent);
+ return false;
+ }
+ }
+
+} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_js_framework.php b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_js_framework.php
new file mode 100644
index 00000000..be51112d
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_js_framework.php
@@ -0,0 +1,1070 @@
+<?php
+ob_start("ob_gzhandler");
+
+header("Expires: Mon, 01 Jul 2003 00:00:00 GMT"); // Past date
+header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // Consitnuously modified
+header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
+header("Pragma: no-cache"); // NO CACHE
+
+//----------------------------------------------------------------------------- functions --------------------------------------------------------------------------------
+
+function addEvent($el, $event, $function){
+ global $browser;
+ if($browser === "ie6" || $browser === "ie7"){
+ echo $el.".attachEvent('on".$event."', ".$function.");\n";
+ } else {
+ echo $el.".addEventListener('".$event."', ".$function.", false);\n";
+ }
+}
+
+//------------------------------------------------------------------------ end functions ----------------------------------------------------------------------------------
+
+$browser = $_SERVER['HTTP_USER_AGENT'];
+
+if(preg_match("/Opera/",$browser))
+ $browser = "opera";
+elseif(preg_match("/MSIE [9]/",$browser))
+ $browser = "ie9";
+elseif(preg_match("/MSIE [7-8]/",$browser))
+ $browser = "ie7";
+elseif(preg_match("/MSIE [1-6]/",$browser))
+ $browser = "ie6";
+elseif(preg_match("/AppleWebKit/",$browser))
+ $browser = "webkit";
+else
+ $browser = "gecko";
+
+if($browser == "ie6")
+ $posfix = "absolute";
+else
+ $posfix = "fixed";
+
+if(isset($_GET['reldir']))
+ $reldir = $_GET['reldir'];
+else
+ $reldir = "";
+
+$confdir = $reldir."ki_config/";
+$galleriesdir = $reldir."ki_galleries/";
+$basedir = $reldir."ki_base/";
+
+include_once("../ki_config/ki_setup.php");
+
+$admin_ok = 0;
+if(isset($_GET['admin']) && $admin === $_GET['admin']){
+ $admin_ok = 1;
+}
+$user_ok = 0;
+if(isset($_GET['user']) && $user === $_GET['user']){
+ $user_ok = 1;
+}
+
+$resizespeed = 5;
+$movespeed = 5;
+$fadespeed = 8;
+
+header("Content-Type: application/x-javascript");
+?>
+
+//-------------------------------------------------------------------------- FRAMEWORK -------------------------------------------------------------------------------
+
+var fw;
+
+(function(){
+ (function(){
+ <?php if(in_array($browser, array("ie6", "ie7"))) { ?>
+ try {
+ document.documentElement.doScroll("left");
+ if(document.body)
+ fw_ready();
+ else {
+ setTimeout(arguments.callee, 5);
+ }
+ } catch(error) {
+ setTimeout(arguments.callee, 5);
+ }
+ <?php } else if(in_array($browser, array("opera", "gecko", "ie9"))) { ?>
+ document.addEventListener("DOMContentLoaded", fw_ready, false);
+ <?php } else if($browser === "webkit") { ?>
+ var state = document.readyState;
+ if (state == 'loaded' || state == 'complete'){
+ fw_ready();
+ } else {
+ setTimeout(arguments.callee, 5);
+ }
+ <?php } else { ?>
+ <?php addEvent("window", "load", "function(){fw_ready();}"); ?>
+ <?php } ?>
+ })();
+})();
+
+function fw_ready(){
+ if(fw)return;
+ fw = new fw_framework();
+ fw.init();
+}
+
+function fw_framework(){
+
+ /* intern ----------------------------------------------------------------------------- Globals --------------------------------------------------------------------------- */
+
+ var animation = Array();
+ var intanimation = 0;
+ var bodyscroll = 0;
+
+ /* intern ----------------------------------------------------------------------------- Helper functions --------------------------------------------------------------------------- */
+
+ function $(id){
+ return document.getElementById(id);
+ }
+
+ this.findPos = function(obj){
+ var curleft = curtop = 0;
+ if (obj.offsetParent) {
+ curleft = obj.offsetLeft;
+ curtop = obj.offsetTop;
+ while (obj = obj.offsetParent) {
+ curleft += obj.offsetLeft;
+ curtop += obj.offsetTop;
+ }
+ }
+ return [curleft,curtop];
+ }
+
+ // type: 1 = normal, 2 = komplett mit padding
+ this.getDim = function(obj, type){
+ var y = obj.offsetHeight;
+ var x = obj.offsetWidth;
+ <?php if($browser === "ie6" || $browser === "ie7" || $browser === "ie9") { ?>
+ if(type == 1){
+ x = x - parseInt(getStyle(obj, "paddingLeft")) - parseInt(getStyle(obj, "paddingRight"));
+ y = y - parseInt(getStyle(obj, "paddingTop")) - parseInt(getStyle(obj, "paddingBottom"));
+ var temp = parseInt(getStyle(obj, "borderLeftWidth"));
+ if(!isNaN(temp))x -= temp;
+ temp = parseInt(getStyle(obj, "borderRightWidth"));
+ if(!isNaN(temp))x -= temp;
+ temp = parseInt(getStyle(obj, "borderTopWidth"));
+ if(!isNaN(temp))y -= temp;
+ temp = parseInt(getStyle(obj, "borderBottomWidth"));
+ if(!isNaN(temp))y -= temp;
+ }
+ <?php } else { ?>
+ if(type == 1){
+ x = x - parseInt(getStyle(obj, "padding-left")) - parseInt(getStyle(obj, "padding-right"));
+ y = y - parseInt(getStyle(obj, "padding-top")) - parseInt(getStyle(obj, "padding-bottom"));
+ x = x - parseInt(getStyle(obj, "border-left-width")) - parseInt(getStyle(obj, "border-right-width"));
+ y = y - parseInt(getStyle(obj, "border-top-width")) - parseInt(getStyle(obj, "border-bottom-width"));
+ }
+ <?php } ?>
+ return [x, y];
+ }
+
+ function getStyle(obj, styleProp){
+ <?php if($browser === "ie6" || $browser === "ie7" || $browser === "ie9") { ?>
+ return obj.currentStyle[styleProp];
+ <?php } else { ?>
+ return document.defaultView.getComputedStyle(obj,null).getPropertyValue(styleProp);
+ <?php } ?>
+ }
+
+ function ANIOBJ(type_, aniarray_, original_, after_){
+ this.type = type_;
+ this.aniarray = aniarray_;
+ this.original = original_;
+ this.after = after_;
+ this.step = 0;
+ switch(type_){
+ case 1:
+ this.aniarraylength = aniarray_.length/2;
+ break;
+ case 2:
+ this.aniarraylength = aniarray_.length/2;
+ break;
+ case 5:
+ this.aniarraylength = aniarray_.length/2;
+ break;
+ default:
+ this.aniarraylength = aniarray_.length;
+ break;
+ }
+ }
+
+ function startanimation(type, ma, obj, continueobj){
+ <?php if($disable_animation == 0){ ?>
+ var found = 0;
+ for(var i = 0; i < animation.length; i++){
+ if(animation[i].original == obj){
+ if(animation[i].type == type){
+ animation[i] = new ANIOBJ(type, ma, obj, continueobj);
+ found = 1;
+ break;
+ }
+ }
+ }
+ if(found == 0)animation.push( new ANIOBJ(type, ma, obj, continueobj) );
+ if(intanimation == 0)doanimation();
+ <?php } else { ?>
+ var actobj = new ANIOBJ(type, ma, obj, continueobj);
+ var style = actobj.original.style;
+ var last = actobj.aniarraylength - 1;
+ switch(actobj.type){
+ case 1: // resize normal
+ style.width = actobj.aniarray[2*last] + "px";
+ style.height = actobj.aniarray[2*last+1] + "px";
+ break;
+ case 2: // resize centered
+ style.width = actobj.aniarray[2*last] + "px";
+ style.height = actobj.aniarray[2*last+1] + "px"
+ style.marginLeft = -(0.5*actobj.aniarray[2*last]) + "px";
+ style.marginTop = -(0.5*actobj.aniarray[2*last+1]) + "px";
+ break;
+ case 3: // resize only width
+ style.width = actobj.aniarray[last] + "px";
+ break;
+ case 4: // resize only height
+ style.height = actobj.aniarray[last] + "px";
+ break;
+ case 5: // move normal
+ style.left = actobj.aniarray[2*last] + "px";
+ style.top = actobj.aniarray[2*last+1] + "px";
+ break;
+ case 6: // move only left
+ style.left = actobj.aniarray[last] + "px";
+ break;
+ case 7: // move only top
+ style.top = actobj.aniarray[last] + "px";
+ break;
+ case 8: // fade
+ <?php
+ if($browser === "ie7" || $browser === "ie6") {
+ ?>
+ actobj.original.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity=' + actobj.aniarray[last] + ')';
+ <?php
+ } else {
+ ?>
+ actobj.original.style.opacity = actobj.aniarray[last]*0.01;
+ <?php } ?>
+ break;
+ }
+ if(actobj.type == 8){
+ if(actobj.aniarray[last] == 0)
+ actobj.original.style.display = "none";
+ <?php if($browser == "ie6" || $browser == "ie7"){ ?>
+ if(actobj.aniarray[last] == 100){
+ actobj.original.style.filter = "";
+ }
+ <?php } ?>
+ }
+ if(actobj.after != null){
+ actobj.after[0](actobj.after[1], actobj.after[2], actobj.after[3], actobj.after[4], actobj.after[5], actobj.after[6]);
+ }
+ <?php } ?>
+ }
+
+ function doanimation(){
+ if(animation.length == 0){
+ clearInterval(intanimation);
+ intanimation = 0;
+ return;
+ }
+
+ if(intanimation == 0)intanimation = setInterval( doanimation, 30 );
+ for(var i = 0; i < animation.length; i++){
+ var actobj = animation[i];
+ if( actobj.step >= actobj.aniarraylength ){
+ animation.splice(i, 1);
+ if(i != animation.length-1)i--;
+ if(actobj.type == 8){
+ if(actobj.aniarray[actobj.step-1] == 0)
+ actobj.original.style.display = "none";
+ <?php if($browser === "ie6" || $browser === "ie7"){ ?>
+ if(actobj.aniarray[actobj.step-1] == 100){
+ actobj.original.style.filter = "";
+ }
+ <?php } ?>
+ }
+ if(actobj.after != null){
+ actobj.after[0](actobj.after[1], actobj.after[2], actobj.after[3], actobj.after[4], actobj.after[5], actobj.after[6]);
+ }
+ continue;
+ }
+ var style = actobj.original.style;
+ switch(actobj.type){
+ case 1: // resize normal
+ style.width = actobj.aniarray[2*actobj.step] + "px";
+ style.height = actobj.aniarray[2*actobj.step+1] + "px";
+ break;
+ case 2: // resize centered
+ style.width = actobj.aniarray[2*actobj.step] + "px";
+ style.height = actobj.aniarray[2*actobj.step+1] + "px"
+ style.marginLeft = -(0.5*actobj.aniarray[2*actobj.step]) + "px";
+ style.marginTop = -(0.5*actobj.aniarray[2*actobj.step+1]) + "px";
+ break;
+ case 3: // resize only width
+ style.width = actobj.aniarray[actobj.step] + "px";
+ break;
+ case 4: // resize only height
+ style.height = actobj.aniarray[actobj.step] + "px";
+ break;
+ case 5: // move normal
+ style.left = actobj.aniarray[2*actobj.step] + "px";
+ style.top = actobj.aniarray[2*actobj.step+1] + "px";
+ break;
+ case 6: // move only left
+ style.left = actobj.aniarray[actobj.step] + "px";
+ break;
+ case 7: // move only top
+ style.top = actobj.aniarray[actobj.step] + "px";
+ break;
+ case 8: // fade
+ <?php if($browser !== "ie7" && $browser !== "ie6") { ?>
+ style.opacity = actobj.aniarray[actobj.step]*0.01;
+ <?php } ?>
+ break;
+ }
+ actobj.step++;
+ }
+ }
+
+ /* ----------------------------------------------------------------------------- Animation functions --------------------------------------------------------------------------- */
+
+ this.shadebody = function(yes, continueobj){
+ if(yes == 1){
+ <?php if($browser !== "webkit") { ?>
+ bodyscroll = document.getElementsByTagName("html")[0].scrollTop;
+ <?php } else { ?>
+ bodyscroll = document.body.scrollTop;
+ <?php } ?>
+ <?php if($browser === "ie6") { ?>
+ document.getElementsByTagName("html")[0].style.overflowX = "hidden";
+ document.getElementsByTagName("html")[0].style.overflowY = "hidden";
+ window.scrollTo(0,0);
+ <?php } else { ?>
+ document.getElementsByTagName("html")[0].style.overflow = "hidden";
+ <?php if($browser !== "webkit") { ?>
+ document.getElementsByTagName("html")[0].scrollTop = bodyscroll;
+ <?php } else { ?>
+ document.body.scrollTop = bodyscroll;
+ <?php } ?>
+ <?php } ?>
+ $("fw_blend").style.display = "block";
+ } else {
+ $("fw_blend").style.display = "none";
+ <?php if($browser === "ie6") { ?>
+ document.getElementsByTagName("html")[0].style.overflowY = "scroll";
+ document.getElementsByTagName("html")[0].style.overflowX = "auto";
+ <?php } else { ?>
+ document.getElementsByTagName("html")[0].style.overflow = "auto";
+ <?php } ?>
+ <?php if($browser == "opera" || $browser == "webkit") { ?>
+ window.scrollBy(0, 1);
+ window.scrollBy(0, -1);
+ <?php } ?>
+ <?php if($browser !== "webkit") { ?>
+ document.getElementsByTagName("html")[0].scrollTop = bodyscroll;
+ <?php } else { ?>
+ document.body.scrollTop = bodyscroll;
+ <?php } ?>
+ }
+ if(continueobj != null){
+ continueobj[0](continueobj[1], continueobj[2], continueobj[3], continueobj[4], continueobj[5], continueobj[6]);
+ }
+ }
+
+ // type: 0 = none, 1 = outside, 2 = inside, 3 = with divs inside, 4 = none with divs inside
+ this.dropshadow = function(id, type, continueobj){
+ var obj;
+ if(id.length)
+ obj = $(id);
+ else
+ obj = id;
+ if(!obj){
+ if(continueobj != null)continueobj[0](continueobj[1], continueobj[2], continueobj[3], continueobj[4], continueobj[5], continueobj[6]);
+ return;
+ }
+ <?php if(in_array($browser, array("ie9", "opera", "gecko", "webkit"))){ ?>
+ if(type == 1){
+ obj.style.boxShadow = "0px 0px 10px #000";
+ } else if(type == 2){
+ obj.style.boxShadow = "inside 0px 0px 10px #000";
+ } else if(type == 0){
+ obj.style.boxShadow = "none";
+ } else if(type == 3){
+ for(var i = 0; i < 4; i++){
+ for(var j = 0; j < 5; j++){
+ var node = document.createElement("div");
+ node.style.position = "absolute";
+ if(i != 1){
+ node.style.left = "0%";
+ } else {
+ node.style.right = "0%";
+ }
+ if(i != 2){
+ node.style.top = "0%";
+ } else {
+ node.style.bottom = "0%";
+ }
+ if(i == 0 || i == 2){
+ node.style.width = "100%";
+ node.style.height = (j+1) + "px";
+ } else {
+ node.style.width = (j+1) + "px";
+ node.style.height = "100%";
+ }
+ node.style.opacity = 0.1 - j*0.02;
+ node.className = "ki_se";
+ node.style.background = "#000";
+ node.style.padding = "0px";
+ node.style.border = "none";
+ obj.appendChild(node);
+ }
+ }
+ } else if(type == 4){
+ var temp = obj.childNodes.length;
+ var cn = obj.childNodes;
+ for(var i = 0; i < temp; i++){
+ if(cn[i].className.indexOf("ki_se") >= 0){
+ obj.removeChild(cn[i]);
+ }
+ }
+ }
+ <?php } ?>
+ if(continueobj != null){
+ continueobj[0](continueobj[1], continueobj[2], continueobj[3], continueobj[4], continueobj[5], continueobj[6]);
+ }
+ }
+
+ // type: 1 = normal, 2 = horizontal/vertikal zentriert, 3 = nur horizontal, 4 = nur vertikal
+ this.resize = function(id, type, endwidth, endheight, continueobj){
+ var count = <?php echo $resizespeed ?>;
+ var obj;
+ if(id.length)
+ obj = $(id);
+ else
+ obj = id;
+ if(!obj){
+ if(continueobj != null)continueobj[0](continueobj[1], continueobj[2], continueobj[3], continueobj[4], continueobj[5], continueobj[6]);
+ return;
+ }
+ var temp = fw.getDim(obj, 1);
+ var actw = temp[0];
+ var acth = temp[1];
+ var step;
+ var mawidth = Array();
+ var maheight = Array();
+ var ma = Array();
+ if(type != 4){
+ step = Math.round((endwidth - actw)/count);
+ while(step != 0){
+ if( Math.abs(endwidth-actw) < Math.abs(2*step) ){
+ step = Math.round(0.4*step);
+ }
+ actw += step;
+ mawidth.push(actw);
+ }
+ mawidth.push(endwidth);
+ }
+ if(type != 3){
+ step = Math.round((endheight - acth)/count);
+ while(step != 0){
+ if( Math.abs(endheight-acth) < Math.abs(2*step) ){
+ step = Math.round(0.4*step);
+ }
+ acth += step;
+ maheight.push(acth);
+ }
+ maheight.push(endheight);
+ }
+ if(type < 3){
+ if(mawidth.length > maheight.length){
+ var diff = mawidth.length - maheight.length;
+ for(var i = 0; i < diff; i++)maheight.push(endheight);
+ } else {
+ var diff = maheight.length - mawidth.length;
+ for(var i = 0; i < diff; i++)mawidth.push(endwidth);
+ }
+ for(var i = 0; i < maheight.length; i++){
+ ma.push(mawidth[i]);
+ ma.push(maheight[i]);
+ }
+ }
+ switch(type){
+ case 3:
+ for(var i = 0; i < mawidth.length; i++){
+ ma.push(mawidth[i]);
+ }
+ break;
+ case 4:
+ for(var i = 0; i < maheight.length; i++){
+ ma.push(maheight[i]);
+ }
+ break;
+ }
+ startanimation(type, ma, obj, continueobj);
+ }
+
+ // type: 1 = normal, 2 = horizontal/vertikal zentriert, 3 = nur horizontal, 4 = nur vertikal
+ // resize ohne abbremsen, d.h. kostante geschwindigkeit
+ this.resize2 = function(id, type, endwidth, endheight, continueobj){
+ var count = 8;
+ var obj;
+ if(id.length)
+ obj = $(id);
+ else
+ obj = id;
+ if(!obj){
+ if(continueobj != null)continueobj[0](continueobj[1], continueobj[2], continueobj[3], continueobj[4], continueobj[5], continueobj[6]);
+ return;
+ }
+ var temp = fw.getDim(obj, 1);
+ var actw = temp[0];
+ var acth = temp[1];
+ var stepw;
+ var steph;
+ var ma = Array();
+ stepw = (endwidth - actw)/count;
+ steph = (endheight - acth)/count;
+ if(type < 3){
+ for(var i = 0; i < count; i++){
+ actw+=stepw;
+ acth+=steph;
+ ma.push(actw);
+ ma.push(acth);
+ }
+ ma.push(endwidth);
+ ma.push(endheight);
+ }
+ switch(type){
+ case 3:
+ for(var i = 0; i < count; i++){
+ actw+=stepw;
+ ma.push(actw);
+ }
+ ma.push(endwidth);
+ break;
+ case 4:
+ for(var i = 0; i < count; i++){
+ acth+=steph;
+ ma.push(acth);
+ }
+ ma.push(endheight);
+ break;
+ }
+ startanimation(type, ma, obj, continueobj);
+ }
+
+ // type: 1 = normal, 2 = nur horizontal, 3 = nur vertikal
+ this.move = function(id, type, endleft, endtop, continueobj) {
+ var count = <?php echo $movespeed ?>;
+ var obj;
+ if(id.length)
+ obj = $(id);
+ else
+ obj = id;
+ if(!obj){
+ if(continueobj != null)continueobj[0](continueobj[1], continueobj[2], continueobj[3], continueobj[4], continueobj[5], continueobj[6]);
+ return;
+ }
+ obj.style.display = "block";
+ if(getStyle(obj, "position") == "static")obj.style.position = "relative";
+ var actx = getStyle(obj, "left");
+ var acty = getStyle(obj, "top");
+ if(actx == "auto")
+ actx = 0;
+ else
+ actx = parseInt(actx);
+ if(acty == "auto")
+ acty = 0;
+ else
+ acty = parseInt(acty);
+ if(type != 3)obj.style.left = actx + "px";
+ if(type != 2)obj.style.top = acty + "px";
+ //obj.style.margin = "0px";
+ var step;
+ var maleft = Array();
+ var matop = Array();
+ var ma = Array();
+ if(type != 3){
+ step = (endleft - actx)/count;
+ while(step != 0){
+ if( Math.abs(endleft-actx) < Math.abs(2*step) ){
+ step = Math.round(0.4*step);
+ }
+ actx += step;
+ maleft.push(actx);
+ }
+ maleft.push(endleft);
+ }
+ if(type != 2){
+ step = (endtop - acty)/count;
+ while(step != 0){
+ if( Math.abs(endtop-acty) < Math.abs(2*step) ){
+ step = Math.round(0.4*step);
+ }
+ acty += step;
+ matop.push(acty);
+ }
+ matop.push(endtop);
+ }
+ if(type < 2){
+ if(maleft.length > matop.length){
+ var diff = maleft.length - matop.length;
+ for(var i = 0; i < diff; i++)matop.push(endtop);
+ } else {
+ var diff = matop.length - maleft.length;
+ for(var i = 0; i < diff; i++)maleft.push(endleft);
+ }
+ for(var i = 0; i < matop.length; i++){
+ ma.push(maleft[i]);
+ ma.push(matop[i]);
+ }
+ }
+ switch(type){
+ case 1:
+ type = 5;
+ break;
+ case 2:
+ type = 6;
+ for(var i = 0; i < maleft.length; i++){
+ ma.push(maleft[i]);
+ }
+ break;
+ case 3:
+ type = 7;
+ for(var i = 0; i < matop.length; i++){
+ ma.push(matop[i]);
+ }
+ break;
+ }
+ startanimation(type, ma, obj, continueobj);
+ }
+
+ // type: 1 = normal, 2 = nur horizontal, 3 = nur vertikal
+ this.move2 = function(id, type, endleft, endtop, continueobj) {
+ var count = 6;
+ var obj;
+ if(id.length)
+ obj = $(id);
+ else
+ obj = id;
+ if(!obj){
+ if(continueobj != null)continueobj[0](continueobj[1], continueobj[2], continueobj[3], continueobj[4], continueobj[5], continueobj[6]);
+ return;
+ }
+ obj.style.display = "block";
+ if(getStyle(obj, "position") == "static")obj.style.position = "relative";
+ var actx = getStyle(obj, "left");
+ var acty = getStyle(obj, "top");
+ if(actx == "auto")
+ actx = 0;
+ else
+ actx = parseInt(actx);
+ if(acty == "auto")
+ acty = 0;
+ else
+ acty = parseInt(acty);
+ if(type != 3)obj.style.left = actx + "px";
+ if(type != 2)obj.style.top = acty + "px";
+ var steph;
+ var stepv;
+ var maleft = Array();
+ var matop = Array();
+ var ma = Array();
+ steph = (endleft - actx)/count;
+ stepv = (endtop - acty)/count;
+ if(type != 3){
+ for(var i = 0; i < count; i++){
+ actx+=steph;
+ maleft.push(actx);
+ }
+ maleft.push(endleft);
+ }
+ if(type != 2){
+ for(var i = 0; i < count; i++){
+ acty+=stepv;
+ matop.push(acty);
+ }
+ matop.push(endtop);
+ }
+ if(type < 2){
+ for(var i = 0; i < ma.length; i++){
+ ma.push(maleft[i]);
+ ma.push(matop[i]);
+ }
+ }
+ switch(type){
+ case 1:
+ type = 5;
+ break;
+ case 2:
+ type = 6;
+ ma = maleft;
+ break;
+ case 3:
+ type = 7;
+ ma = matop;
+ break;
+ }
+ startanimation(type, ma, obj, continueobj);
+ }
+
+ this.fade = function(id, endfade, continueobj){
+ var count = <?php echo $fadespeed ?>;
+ var obj;
+ if(id.length)
+ obj = $(id);
+ else
+ obj = id;
+ if(!obj){
+ if(continueobj != null)continueobj[0](continueobj[1], continueobj[2], continueobj[3], continueobj[4], continueobj[5], continueobj[6]);
+ return;
+ }
+ var actfade;
+ if(getStyle(obj, "display") == "none"){
+ actfade = 0;
+ obj.style.display = "block";
+ } else {
+ <?php
+ if($browser === "ie7" || $browser === "ie6") {
+ ?>
+ if(!getStyle(obj, "filter")){
+ actfade = 100;
+ } else {
+ try {
+ actfade = obj.filters.item("DXImageTransform.Microsoft.Alpha").opacity;
+ } catch(e) {
+ actfade = 100;
+ };
+ }
+ <?php
+ } else {
+ ?>
+ actfade = parseInt(getStyle(obj, "opacity")*100);
+ <?php } ?>
+ }
+ <?php if($browser !== "ie7" && $browser !== "ie6") { ?>
+ obj.style.opacity = actfade*0.01;
+ <?php } ?>
+ var step;
+ var ma = Array();
+ step = parseInt((endfade - actfade)/count);
+ for(var i = 0; i < count; i++){
+ ma.push(actfade+i*step);
+ }
+ ma.push(endfade);
+ <?php
+ if($browser === "ie7" || $browser === "ie6") {
+ if($disable_animation == 0){
+ ?>
+ if(obj.style.filter){
+ if(obj.filters.item("DXImageTransform.Microsoft.Fade")){
+ if(obj.filters.item("DXImageTransform.Microsoft.Fade").status == 2){
+ obj.filters.item("DXImageTransform.Microsoft.Fade").stop();
+ }
+ }
+ }
+ obj.style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity=" + actfade + ") progid:DXImageTransform.Microsoft.Fade(duration=" + ma.length * 0.035 + ")";
+ obj.filters.item("DXImageTransform.Microsoft.Fade").apply();
+ obj.filters.item("DXImageTransform.Microsoft.Alpha").opacity = endfade;
+ obj.filters.item("DXImageTransform.Microsoft.Fade").play();
+ <?php
+ }
+ }
+ ?>
+
+ startanimation(8, ma, obj, continueobj);
+ }
+
+ /* ----------------------------------------------------------------------------- AJAX functions --------------------------------------------------------------------------- */
+
+ function checkforajax(){
+ var xmlhttp;
+ try {
+ xmlhttp = new XMLHttpRequest();
+ } catch (e) {
+ try {
+ xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
+ } catch (e) {
+ try {
+ xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
+ } catch (e) { return -1; }
+ }
+ }
+ return 1;
+ }
+
+ // adr = site adress with post variables to send, result = function called when ready, params[] = additional params besides responseText as first param
+ this.getHTTP = function(adr, result, params) {
+ var xmlhttp;
+ try {
+ xmlhttp = new XMLHttpRequest();
+ } catch (e) {
+ try {
+ xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
+ } catch (e) {
+ xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
+ }
+ }
+ var temp = adr.indexOf("?");
+ var sendstring = "";
+ if(temp != -1){
+ sendstring = adr.substr(temp+1);
+ adr = adr.substr(0, temp);
+ }
+ xmlhttp.onreadystatechange = function() {
+ if(xmlhttp.readyState == 4){
+ if(xmlhttp.status == 200){
+ if(result)result(xmlhttp.responseText, params);
+ } else {
+ if(xmlhttp.status == 404)alert("ERROR: Site '" + adr + "' not found or internal error during getHTTP-call.");
+ }
+ }
+ }
+ xmlhttp.open("POST", adr, true);
+ xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
+ xmlhttp.send(sendstring);
+ }
+
+ /* ----------------------------------------------------------------------------- Dynamicliy add/remove JavaScript functions ----------------------------------------------------- */
+
+ this.addjs = function(adr, modulename, params){
+ if($(modulename+"_id"))return;
+ var head = document.getElementsByTagName("head")[0];
+ var script = document.createElement('script');
+ script.id = modulename+"_id";
+ script.type = 'text/javascript';
+ script.src = adr;
+ head.appendChild(script);
+ eval( "(function(){ if(typeof "+modulename+"_module == 'function'){ "+modulename+" = new "+modulename+"_module(); "+modulename+".constr(params); return; } setTimeout( arguments.callee, 100); })();" );
+ }
+
+ this.removejs = function(modulename){
+ if(!$(modulename+"_id"))return;
+ eval(modulename + ".destr();");
+ var head = document.getElementsByTagName("head")[0];
+ var script = $(modulename+"_id");
+ head.removeChild(script);
+ eval(modulename+" = null;"+modulename+"_module = null;");
+ }
+
+ /* ----------------------------------------------------------------------------- Event functions --------------------------------------------------------------------------- */
+
+
+
+ function on_mouseover(obj, execfunc, offsL, offsT){
+ <?php addEvent("obj", "mouseover", "
+ function(event){
+ event = event ? event : window.event;
+ var from = event.relatedTarget ? event.relatedTarget : event.fromElement;
+ if(!from)return;
+ while(from.parentNode){
+ if(from == obj){
+ return;
+ }
+ from = from.parentNode;
+ }
+ var x = event.clientX ? event.clientX + document.documentElement.scrollLeft : event.pageX;
+ var y = event.clientY ? event.clientY + document.documentElement.scrollTop: event.pageY;
+ x -= offsL;
+ y -= offsT;
+ execfunc(x, y);
+ }
+ "); ?>
+ }
+
+ function on_mouseout(obj, execfunc, offsL, offsT){
+ <?php addEvent("obj", "mouseout", "
+ function(event){
+ event = event ? event : window.event;
+ var to = event.relatedTarget ? event.relatedTarget : event.toElement;
+ if(!to)return;
+ while(to.parentNode){
+ if(to == obj)return;
+ to = to.parentNode;
+ }
+ var x = event.clientX ? event.clientX + document.documentElement.scrollLeft : event.pageX;
+ var y = event.clientY ? event.clientY + document.documentElement.scrollTop: event.pageY;
+ x -= offsL;
+ y -= offsT;
+ execfunc(x, y);
+ }
+ "); ?>
+ }
+
+ function on_mouseevent(obj, evnt, execfunc, offsL, offsT){
+ <?php if($browser === "ie6" || $browser === "ie7"){
+ echo "obj.attachEvent('on'+evnt,
+ function(event){
+ event = event ? event : window.event;
+ var x = event.clientX + document.documentElement.scrollLeft - offsL;
+ var y = event.clientY + document.documentElement.scrollTop - offsT;
+ execfunc(x, y);
+ return false;
+ }
+ );";
+ } else {
+ echo "obj.addEventListener(evnt,
+ function(event){
+ event = event ? event : window.event;
+ var x = event.pageX - offsL;
+ var y = event.pageY - offsT;
+ execfunc(x, y);
+ preventDefaultAction(event);
+ }
+ , false);";
+ } ?>
+ }
+
+ function preventDefaultAction(aEvent) {
+ <?php if($browser !== "ie6" && $browser !== "ie7") { ?>
+ aEvent.stopPropagation();
+ <?php } ?>
+ <?php if($browser === "gecko") { ?>
+ aEvent.preventDefault();
+ <?php } ?>
+ <?php if($browser === "opera") { ?>
+ aEvent.returnValue = false;
+ <?php } ?>
+ }
+
+ // type: 1 = normal, 2 = x,y coordinate for static/relative positioned element
+ this.addevent = function(id, evnt, execfunc, type){
+ var obj;
+ if(id.length)
+ obj = $(id);
+ else
+ obj = id;
+ if(!obj){
+ return;
+ }
+ var offsL = 0;
+ var offsT = 0;
+ if(type == 2){
+ if(getStyle(obj, "position") == "relative"){
+ obj.style.position = "static";
+ offsL = obj.offsetLeft;
+ offsT = obj.offsetTop;
+ obj.style.position = "relative";
+ }
+ if(getStyle(obj, "position") == "static"){
+ offsL = obj.offsetLeft;
+ offsT = obj.offsetTop;
+ }
+ }
+ switch(evnt){
+ case "mouseover": on_mouseover(obj, execfunc, offsL, offsT); break;
+ case "mouseout": on_mouseout(obj, execfunc, offsL, offsT); break;
+ case "click": on_mouseevent(obj, evnt, execfunc, offsL, offsT); break;
+ case "dblclick": on_mouseevent(obj, evnt, execfunc, offsL, offsT); break;
+ case "mousedown": on_mouseevent(obj, evnt, execfunc, offsL, offsT); break;
+ case "mousemove": on_mouseevent(obj, evnt, execfunc, offsL, offsT); break;
+ case "mouseup": on_mouseevent(obj, evnt, execfunc, offsL, offsT); break;
+ case "keycapture":
+ <?php if(!in_array($browser, array("ie6", "ie7", "ie9", "webkit"))){
+ addEvent("obj", "keypress", "execfunc");
+ } else {
+ addEvent("obj", "keydown", "execfunc");
+ } ?>
+ break;
+ default:
+ <?php if($browser === "ie6" || $browser === "ie7"){
+ echo "obj.attachEvent('on'+evnt, execfunc);";
+ } else {
+ echo "obj.addEventListener(evnt, execfunc, false);";
+ } ?>
+ break;
+ }
+ }
+
+ /* extern ----------------------------------------------------------------------------- Toolbars --------------------------------------------------------------------------- */
+
+ this.addtoolbar = function(id, content, x, y, permanent){
+ var obj;
+ if(id.length)
+ obj = $(id);
+ else
+ obj = id;
+ if(!obj){
+ return;
+ }
+ id = obj.id;
+ if(!$(id+"_tb")){
+ var tb = document.createElement("div");
+ tb.id = id+"_tb";
+ tb.style.position = "absolute";
+ if(permanent == 0)tb.style.display = "none";
+ if(x > 0)
+ tb.style.left = x + "px";
+ else
+ tb.style.right = x*-1 + "px";
+ if(y > 0)
+ tb.style.top = y + "px";
+ else
+ tb.style.bottom = y*-1 + "px";
+ tb.innerHTML = content;
+ obj.appendChild(tb);
+ if(permanent == 0){
+ fw.addevent( obj, "mouseout", function(){ fw.fade(tb, 0); } );
+ fw.addevent( obj, "mouseover", function(){ fw.fade(tb, 100); } );
+ //fw.addevent( id, "mousemove", function(x, y){ $("tooltip").style.left = x + 20 + "px"; $("tooltip").style.top = y + 20 + "px"; } );
+ }
+ }
+ }
+
+ /* Init code ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
+
+ this.init = function(){
+ var node;
+ if(checkforajax() == -1){
+ var temp = document.getElementsByTagName("div");
+ for(var i = 0; i < temp.length; i++){
+ if(temp[i].className.indexOf("koschtitgallery") >= 0){
+ var titlefound = temp[i].title;
+ temp[i].innerHTML = "<p>AJAX not supported. See a plain HTML version of <a href='<?php echo $basedir ?>ki_nojs.php?gallery="+titlefound+"&amp;site="+window.location+"'>"+titlefound+"</a> here.</p>";
+ temp[i].title = "";
+ }
+ }
+ <?php if($show_warnings == 1)echo "alert(\"WARNING: Your browser doesn't support AJAX.\\nPlease upgrade your browser to view this gallery.\");"; ?>
+ return;
+ }
+ if(!$("fw_blend")){
+ <?php if($browser === "ie7" || $browser === "opera"){ ?>
+ node = document.createElement("img");
+ node.src = "<?php echo $basedir ?>ki_shade.php";
+ node.alt = "";
+ <?php } elseif($browser == "ie6"){ ?>
+ node = document.createElement("img");
+ node.alt = "";
+ node.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src=<?php echo $basedir ?>ki_shade.php, sizingMethod='scale')";
+ node.style.width = "2880px";
+ node.style.height = "1800px";
+ node.src="<?php echo $basedir ?>ki_noimage.gif";
+ <?php } else { ?>
+ node = document.createElement("div");
+ node.style.width = "100%";
+ node.style.height = "100%";
+ node.style.background = "<?php echo $fade_color ?>";
+ node.style.opacity = <?php echo $fade_alpha/10 ?>;
+ <?php } ?>
+ node.id = "fw_blend";
+ node.style.position = "<?php echo $posfix ?>";
+ node.style.left = "0px";
+ node.style.top = "0px";
+ node.style.zIndex = 100;
+ node.style.display = "none";
+ document.body.appendChild(node);
+ }
+ <?php if($shade_while_loading == 1 || $admin_ok == 1 || $user_ok == 1){ ?>
+ this.shadebody(1);
+ <?php } ?>
+ <?php if($admin_ok == 1){ ?>
+ fw.addjs("<?php echo $basedir ?>ki_js_basic.php?reldir=<?php echo $reldir ?>&admin=<?php echo $_GET['admin'] ?>", "kib");
+ <?php } elseif($user_ok == 1){ ?>
+ fw.addjs("<?php echo $basedir ?>ki_js_basic.php?reldir=<?php echo $reldir ?>&user=<?php echo $_GET['user'] ?>", "kib");
+ <?php } else { ?>
+ fw.addjs("<?php echo $basedir ?>ki_js_basic.php?reldir=<?php echo $reldir ?>", "kib");
+ <?php } ?>
+ }
+
+}
+//-------------------------------------------------------------------------------- END FRAMEWORK ----------------------------------------------------------------- \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_js_managefolders.php b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_js_managefolders.php
new file mode 100644
index 00000000..e0cde524
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_js_managefolders.php
@@ -0,0 +1,266 @@
+<?php
+ob_start("ob_gzhandler");
+
+session_start();
+
+header("Expires: Mon, 01 Jul 2003 00:00:00 GMT"); // Past date
+header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // Consitnuously modified
+header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
+header("Pragma: no-cache"); // NO CACHE
+
+//-------------------------------------- functions -------------------------------------
+function draw_image($filename, $id, $style, $params) {
+ global $browser, $basedir;
+ $idstring = "";
+ if($id != "")$idstring = "id='".$id."' ";
+ if($browser == "ie6") {
+ $imgsize = getimagesize($filename);
+ echo "<img ".$idstring."style='filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=".$basedir.$filename."); width:".$imgsize[0]."px; height:".$imgsize[1]."px; ".$style."' src='".$basedir."ki_noimage.gif' ".$params." />";
+ } else {
+ if($style != "")$style = " style='".$style."' ";
+ echo "<img ".$idstring."src='".$basedir.$filename."'".$style.$params." />";
+ }
+}
+
+function addEvent($el, $event, $function){
+ global $browser;
+ if($browser === "ie6" || $browser === "ie7"){
+ echo $el.".attachEvent('on".$event."', ".$function.");\n";
+ } else {
+ echo $el.".addEventListener('".$event."', ".$function.", false);\n";
+ }
+}
+
+function removeEvent($el, $event, $function){
+ global $browser;
+ if($browser === "ie6" || $browser === "ie7"){
+ echo $el.".detachEvent('on".$event."', ".$function.");\n";
+ } else {
+ echo $el.".removeEventListener('".$event."', ".$function.", false);\n";
+ }
+}
+//-------------------------------------- end functions -----------------------------------
+
+include("../ki_config/ki_setup.php");
+
+$browser = $_SERVER['HTTP_USER_AGENT'];
+
+if(preg_match("/Opera/",$browser))
+ $browser = "opera";
+elseif(preg_match("/MSIE [9]/",$browser))
+ $browser = "ie9";
+elseif(preg_match("/MSIE [7-8]/",$browser))
+ $browser = "ie7";
+elseif(preg_match("/MSIE [1-6]/",$browser))
+ $browser = "ie6";
+elseif(preg_match("/AppleWebKit/",$browser))
+ $browser = "webkit";
+else
+ $browser = "gecko";
+
+if($browser === "ie6")
+ $posfix = "absolute";
+else
+ $posfix = "fixed";
+
+if(isset($_GET['reldir']))
+ $reldir = $_GET['reldir'];
+else
+ $reldir = "";
+
+$confdir = $reldir."ki_config/";
+$galleriesdir = $reldir."ki_galleries/";
+$basedir = $reldir."ki_base/";
+
+$pwok = 0;
+if(isset($_SESSION['pwquery'])){
+ if($_SESSION['pwquery'] === $pw)$pwok = 1;
+}
+if($pwok == 0)exit();
+
+header("Content-Type: application/x-javascript");
+?>
+
+// Manage folders module 'kim' --------------------------------------------------------------------
+
+function kim_module(){
+
+ /* -------------------------------- variables ----------------------------------- */
+
+ var windowX;
+ var windowY;
+ var open = 0;
+
+ /* -------------------------------- getElementById function --------------------- */
+
+ function $(id){
+ return document.getElementById(id);
+ }
+
+ /* -------------------------------- constructor/descturctor --------------------- */
+
+ this.constr = function(){
+ if(typeof(kiv_module) == "function")kiv.closeImage();
+ if(typeof(kie_module) == "function")kie.closeGallery();
+ if(typeof(kis_module) == "function")kis.closeSettings();
+ if(typeof(kid_module) == "function")kid.close();
+ if(typeof(kiu_module) == "function")kiu.closeUpload();
+ if(typeof(kic_module) == "function")kic.close();
+ fw.shadebody(1);
+ var node;
+ if(!$("kim_maindiv")){
+ node = document.createElement("div");
+ node.id = "kim_maindiv";
+ node.style.background = "#aaaaaa";
+ node.style.position = "<?php echo $posfix ?>";
+ node.style.left = "0px";
+ node.style.top = "0px";
+ node.style.zIndex = 1000;
+ node.style.overflowX = "hidden";
+ node.style.overflowY = "auto";
+ node.style.display = "block";
+ node.style.font = "12px Tahoma, sans-serif";
+ node.style.padding = "4px";
+ node.innerHTML = "<div id='manage_div' style='background:#D2D2D2; padding:4px; width:960px; margin:auto; border:1px solid #000;'><div style='width:300px; margin:auto; text-align:center;'><input type='button' value='Create new folder' style='margin:0px; padding:0px; cursor:pointer; border:1px solid #000; height:26px; width:150px; background:#A5ACCF; font-weight:bold;' onclick=\"kim.createnew()\"' /></div><b>Folders in \"ki_galleries\":</b><div id='manage_div_cont' style='padding-top:5px;'></div></div>";
+ document.body.appendChild(node);
+ }
+ if(!$("kim_botdiv")){
+ node = document.createElement("div");
+ node.id = "kim_botdiv";
+ node.style.background = "#aaaaaa";
+ node.style.position = "<?php echo $posfix ?>";
+ node.style.zIndex = 1001;
+ node.style.padding = "5px";
+ node.style.font = "12px Tahoma, sans-serif";
+ node.style.color = "#222222";
+ node.style.borderTop = "1px solid #000000";
+ node.style.borderRight = "1px solid #000000";
+ node.style.borderLeft = "1px solid #000000";
+ node.style.right = "25px";
+ node.style.bottom = "0px";
+ node.innerHTML = "<input type='button' value='Close' style='float:right; margin:0px; padding:0px; cursor:pointer; border:1px solid #000; height:26px; width:150px;' onclick='kim.close()' />";
+ document.body.appendChild(node);
+ }
+ <?php addEvent("window", "resize", "viewdim"); ?>
+ viewdim();
+ <?php
+ if(!in_array($browser, array("ie6", "ie7", "ie9", "webkit"))){
+ addEvent("document", "keypress", "taste_kim");
+ } else {
+ addEvent("document", "keydown", "taste_kim");
+ }
+ ?>
+ <?php addEvent("document", "mousemove", "mousemoved"); ?>
+ listFolders();
+ fw.move("authorization", 2, -42, 0);
+ }
+
+ this.destr = function(){
+ <?php removeEvent("window", "resize", "viewdim"); ?>
+ <?php
+ if(!in_array($browser, array("ie6", "ie7", "ie9", "webkit"))){
+ removeEvent("document", "keypress", "taste_kim");
+ } else {
+ removeEvent("document", "keydown", "taste_kim");
+ }
+ ?>
+ <?php removeEvent("document", "mousemove", "mousemoved"); ?>
+ document.body.removeChild($("kim_maindiv"));
+ document.body.removeChild($("kim_botdiv"));
+ fw.shadebody(0);
+ fw.move("authorization", 2, 55, 0);
+ }
+
+ /* -------------------------------- methodes ------------------------------------ */
+
+ function listFolders(){
+ fw.getHTTP("<?php echo $basedir ?>ki_managefolders.php?list=1", listingFolders, null);
+ }
+
+ function listingFolders(responseText){
+ var managediv = $("manage_div_cont");
+ var newC = "";
+ var info = eval("(" + responseText + ")");
+ if(info.error){
+ alert(info.error);
+ } else {
+ for(var i = 0; i < info.length; i++){
+ newC += "<div style='padding:4px; margin:4px; border:1px solid #000; position:relative; background:#fff;'><input type='button' value='Delete folder' style='float:right; margin:0px; padding:0px; cursor:pointer; border:1px solid #000; height:26px; width:150px; margin-top:6px; margin-left:10px; background:#f5998f;' onclick=\"kim.delete('" + info[i].folder + "')\"' /><input type='button' value='Empty folder' style='float:right; margin:0px; padding:0px; cursor:pointer; border:1px solid #000; height:26px; width:150px; margin-top:6px;' onclick=\"kim.empty('" + info[i].folder + "')\"' /><b style='font-size:14px;'>" + info[i].folder + "</b><br /><div style='padding-top:5px; font-size:11px; color:#222;'>Image files: " + info[i].num + "<span style='position:absolute; left:140px;'>Disk usage: " + info[i].size + " MB</span></div></div>";
+ }
+ managediv.innerHTML = newC;
+ }
+ }
+
+ this.empty = function(folder){
+ fw.getHTTP("<?php echo $basedir ?>ki_managefolders.php?empty=" + folder, listingFolders, null);
+ }
+
+ this.delete = function(folder){
+ fw.getHTTP("<?php echo $basedir ?>ki_managefolders.php?delete=" + folder, listingFolders, null);
+ }
+
+ this.createnew = function(){
+ var name = prompt("Please enter a folder name", "");
+ if(name != null && name != ""){
+ fw.getHTTP("<?php echo $basedir ?>ki_managefolders.php?createnew=" + name, listingFolders, null);
+ }
+ }
+
+ function viewdim(){
+ if(window.innerHeight){
+ windowX = window.innerWidth;
+ windowY = window.innerHeight;
+ } else if(document.documentElement && document.documentElement.clientHeight){ // Explorer 6 Strict Mode
+ windowX = document.documentElement.clientWidth;
+ windowY = document.documentElement.clientHeight;
+ } else if (document.body){ // other Explorers
+ windowX = document.body.clientWidth;
+ windowY = document.body.clientHeight;
+ }
+ var maindiv = $("kim_maindiv");
+ maindiv.style.width = windowX - 8 + "px";
+ maindiv.style.height = windowY - 8 + "px";
+ }
+
+ this.close = function(){
+ fw.removejs("kim");
+ }
+
+ function preventDefaultAction(aEvent) {
+ <?php if($browser !== "ie6" && $browser !== "ie7") { ?>
+ aEvent.stopPropagation();
+ <?php } ?>
+ <?php if($browser === "gecko") { ?>
+ aEvent.preventDefault();
+ <?php } ?>
+ <?php if($browser === "opera") { ?>
+ aEvent.returnValue = false;
+ <?php } ?>
+ }
+
+ function taste_kim(aEvent) {
+ aEvent = aEvent ? aEvent : window.event;
+ var keyCode = aEvent.keyCode;
+ if(keyCode == 27){
+ kim.close();
+ preventDefaultAction(aEvent);
+ return false;
+ }
+ }
+
+ function mousemoved(aEvent){
+ aEvent = aEvent ? aEvent : window.event;
+ var x = aEvent.clientX ? aEvent.clientX : aEvent.pageX;
+ var y = aEvent.clientY ? aEvent.clientY : aEvent.pageY;
+ if(y < 180 && x < 30 && !open){
+ open = 1;
+ fw.move("authorization", 2, 55, 0);
+ return;
+ }
+ if(x > 120 || y > 180){
+ open = 0;
+ fw.move("authorization", 2, -42, 0);
+ }
+ }
+}
+
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_js_settings.php b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_js_settings.php
new file mode 100644
index 00000000..b9e7fdf6
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_js_settings.php
@@ -0,0 +1,530 @@
+<?php
+ob_start("ob_gzhandler");
+
+session_start();
+
+header("Expires: Mon, 01 Jul 2003 00:00:00 GMT"); // Past date
+header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // Consitnuously modified
+header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
+header("Pragma: no-cache"); // NO CACHE
+
+//-------------------------------------- functions -------------------------------------
+function draw_image($filename, $id, $style, $params) {
+ global $browser, $basedir;
+ $idstring = "";
+ if($id != "")$idstring = "id='".$id."' ";
+ if($browser === "ie6") {
+ $imgsize = getimagesize($filename);
+ echo "<img ".$idstring."style='filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=".$basedir.$filename."); width:".$imgsize[0]."px; height:".$imgsize[1]."px; ".$style."' src='".$basedir."ki_noimage.gif' ".$params." />";
+ } else {
+ if($style != "")$style = " style='".$style."' ";
+ echo "<img ".$idstring."src='".$basedir.$filename."'".$style.$params." />";
+ }
+}
+
+function addEvent($el, $event, $function){
+ global $browser;
+ if($browser === "ie6" || $browser === "ie7"){
+ echo $el.".attachEvent('on".$event."', ".$function.");\n";
+ } else {
+ echo $el.".addEventListener('".$event."', ".$function.", false);\n";
+ }
+}
+
+function removeEvent($el, $event, $function){
+ global $browser;
+ if($browser === "ie6" || $browser === "ie7"){
+ echo $el.".detachEvent('on".$event."', ".$function.");\n";
+ } else {
+ echo $el.".removeEventListener('".$event."', ".$function.", false);\n";
+ }
+}
+//-------------------------------------- end functions -----------------------------------
+
+include("../ki_config/ki_setup.php");
+
+$global_start = -1;
+$global_length = -1;
+$global_count = -1;
+
+reset($GLOBALS);
+
+while (list($key, $val) = each($GLOBALS)) {
+ $global_count++;
+ if($global_start == -1){
+ if($key === "fr_width"){
+ $global_start = $global_count;
+ continue;
+ }
+ }
+ if($global_length == -1){
+ if($key === "global_start"){
+ $global_length = $global_count - $global_start;
+ break;
+ }
+ }
+}
+
+$browser = $_SERVER['HTTP_USER_AGENT'];
+
+if(preg_match("/Opera/",$browser))
+ $browser = "opera";
+elseif(preg_match("/MSIE [9]/",$browser))
+ $browser = "ie9";
+elseif(preg_match("/MSIE [7-8]/",$browser))
+ $browser = "ie7";
+elseif(preg_match("/MSIE [1-6]/",$browser))
+ $browser = "ie6";
+elseif(preg_match("/AppleWebKit/",$browser))
+ $browser = "webkit";
+else
+ $browser = "gecko";
+
+if($browser === "ie6")
+ $posfix = "absolute";
+else
+ $posfix = "fixed";
+
+if(isset($_GET['reldir']))
+ $reldir = $_GET['reldir'];
+else
+ $reldir = "";
+
+$confdir = $reldir."ki_config/";
+$galleriesdir = $reldir."ki_galleries/";
+$basedir = $reldir."ki_base/";
+
+$pwok = 0;
+if(isset($_SESSION['pwquery'])){
+ if($_SESSION['pwquery'] === $pw)$pwok = 1;
+}
+if($pwok == 0)exit();
+
+header("Content-Type: application/x-javascript");
+?>
+
+// Settings module 'kis' --------------------------------------------------------------------
+
+function kis_module(){
+
+ /* -------------------------------- variables ----------------------------------- */
+
+ var windowX;
+ var windowY;
+ var currentfile = "";
+ var open = 0;
+
+ /* -------------------------------- getElementById function --------------------- */
+
+ function $(id){
+ return document.getElementById(id);
+ }
+
+ /* -------------------------------- constructor/descturctor --------------------- */
+
+ this.constr = function(){
+ if(typeof(kiv_module) == "function")kiv.closeImage();
+ if(typeof(kie_module) == "function")kie.closeGallery();
+ if(typeof(kiu_module) == "function")kiu.closeUpload();
+ if(typeof(kid_module) == "function")kid.close();
+ if(typeof(kic_module) == "function")kic.close();
+ if(typeof(kim_module) == "function")kim.close();
+ fw.shadebody(1);
+ var node;
+ if(!$("kis_maindiv")){
+ node = document.createElement("div");
+ node.id = "kis_maindiv";
+ node.style.background = "#aaaaaa";
+ node.style.position = "<?php echo $posfix ?>";
+ node.style.left = "0px";
+ node.style.top = "0px";
+ node.style.zIndex = 1000;
+ node.style.overflowX = "hidden";
+ node.style.overflowY = "auto";
+ node.style.display = "block";
+ node.style.padding = "4px";
+ node.innerHTML = "<div id='settings_div' style='background:#D2D2D2; width:960px; margin:auto; font:12px Tahoma, sans-serif; color:#222222; border:1px solid #000000; padding:46px 4px 36px 4px;'></div>";
+ document.body.appendChild(node);
+ }
+ if(!$("kis_topdiv")){
+ node = document.createElement("div");
+ node.id = "kis_topdiv";
+ node.style.background = "#aaaaaa";
+ node.style.position = "<?php echo $posfix ?>";
+ node.style.height = "45px";
+ node.style.zIndex = 1001;
+ node.style.padding = "5px 20px 0px 120px";
+ node.style.font = "12px Tahoma, sans-serif";
+ node.style.color = "#222222";
+ node.style.borderBottom = "1px solid #000000";
+ node.style.borderRight = "1px solid #000000";
+ node.style.left = "0px";
+ node.style.top = "0px";
+ var dirs = "";
+ for(var i = 0; i < kib.dirs.length; i++){
+ dirs = dirs + "<span style='cursor:pointer; text-decoration:underline; margin-right:5px; line-height:14px;' onclick=\"kis.getSettings('" + kib.dirs[i] + "')\">" + kib.dirs[i] + "</span>";
+ }
+ node.innerHTML = "<div style='margin-bottom:5px;'><span style='font-size:14px; line-height:18px; font-weight:bold; color:#003; margin-right:5px;'>Config Files</span><span style='background:#003; border:1px solid #CCC; padding:3px; color:#ffffff;' id='kis_selfile'></span></div><span style='cursor:pointer; text-decoration:underline; font-weight:bold; margin-right:5px; line-height:14px;' onclick='kis.getSettings()'>default</span>" + dirs;
+ document.body.appendChild(node);
+ }
+ if(!$("kis_botdiv")){
+ node = document.createElement("div");
+ node.id = "kis_botdiv";
+ node.style.background = "#aaaaaa";
+ node.style.position = "<?php echo $posfix ?>";
+ node.style.zIndex = 1001;
+ node.style.padding = "5px";
+ node.style.font = "12px Tahoma, sans-serif";
+ node.style.color = "#222222";
+ node.style.borderTop = "1px solid #000000";
+ node.style.borderRight = "1px solid #000000";
+ node.style.borderLeft = "1px solid #000000";
+ node.style.right = "25px";
+ node.style.bottom = "0px";
+ node.innerHTML = "<input type='button' value='Close' style='float:right; margin:0px; padding:0px; cursor:pointer; border:1px solid #000; height:26px; width:150px;' onclick='kis.closeSettings()' /><input type='button' value='Reset' style='float:right; margin:0px; margin-right:10px; padding:0px; cursor:pointer; border:1px solid #000; height:26px; width:150px; display:none;' onclick='kis.resetSettings()' id='kis_resetbutton' /><input type='button' value='Save' style='float:left; margin:0px; margin-right:10px; padding:0px; cursor:pointer; border:1px solid #000; height:26px; width:150px; background:#b8e8d4;' onclick='kis.saveSettings()' />";
+ document.body.appendChild(node);
+ }
+
+ node = $("settings_div");
+ node.innerHTML = "<table style='padding:0px; color:#006; font-size:11px;' cellpadding='4' cellspacing='0'><tr><td style='width:150px;' class='kis_paramname'>$fr_width</td><td style='width:200px;'><input id='fr_width' class='kis_param' /></td><td rowspan='2'>This two parameters set the dimension of the gallery in pixels. They are equivallent to css-width and height of the koschtitgallery-div.</td></tr><tr><td class='kis_paramname'>$fr_height</td><td><input id='fr_height' class='kis_param' /></td></tr><tr><td class='kis_paramname'>$fr_color</td><td><input id='fr_color' class='kis_param' /></td><td>The background color of the gallery. Set a hex-color '#rrggbb' or 'none'.</td></tr><tr><td colspan='3' class='kis_spacer'></td></tr><tr><td class='kis_paramname'>$thumbs</td><td><input id='thumbs' class='kis_param' /></td><td>Sets the amount of thumbnails that are visible on one page of the gallery.</td></tr><tr><td class='kis_paramname'>$th_per_line</td><td><input id='th_per_line' class='kis_param' /></td><td>Sets the amout of thumbnails in one row. This should be less or equal to the <b>$thumbs</b> - parameter.</td></tr><tr><td class='kis_paramname'>$th_lines</td><td><input id='th_lines' class='kis_param' /></td><td>Here you can set how many thumbnail rows you want to have. Set to 'auto' or a number.</td></tr><tr><td class='kis_paramname'>$th_width</td><td><input id='th_width' class='kis_param' /></td><td rowspan='2'>This two parameters set the maximum dimension of the thumbnails in pixels. Set to 'auto' or a number.</td></tr><tr><td class='kis_paramname'>$th_height</td><td><input id='th_height' class='kis_param' /></td></tr><tr><td class='kis_paramname'>$th_bord_size</td><td><input id='th_bord_size' class='kis_param' /></td><td>The border width of the thumbnails in pixels. Set to a number greater or equal to zero.</td></tr><tr><td class='kis_paramname'>$th_bord_color</td><td><input id='th_bord_color' class='kis_param' /></td><td>The border color of the thumbnails. Set a hex-color '#rrggbb' or 'none'.</td></tr><tr><td class='kis_paramname'>$th_bord_hover_color</td><td><input id='th_bord_hover_color' class='kis_param' /></td><td>If you hover over the thumbnails their border color will change to this. Set a hex-color '#rrggbb' or 'none'.</td></tr><tr><td class='kis_paramname'>$th_bord_hover_increase</td><td><input id='th_bord_hover_increase' class='kis_param' /></td><td>You can also change the size of the thumbnails when you hover over them. They will be increased by this value. Set to a decimal with a dot.</td></tr><tr><td class='kis_paramname'>$th_shadow</td><td><input id='th_shadow' class='kis_param' yn='1' /></td><td>Enables or disables the shadow which displays when mouse hovers a thumbnail.</td></tr><tr><td class='kis_paramname'>$th_to_square</td><td><input id='th_to_square' class='kis_param' yn='1' /></td><td>For square thumbs set to 1, or else set to 0.</td></tr><tr><td class='kis_paramname'>$th_2sq_crop_hori</td><td><input id='th_2sq_crop_hori' class='kis_param' /></td><td>If $th_to_square is set to 1, you can change the horizontal cropping of the thumbmails with this parameter. Set to 'left', 'center' or 'right'.</td></tr><tr><td class='kis_paramname'>$th_2sq_crop_vert</td><td><input id='th_2sq_crop_vert' class='kis_param' /></td><td>If $th_to_square is set to 1, you can change the vertical cropping of the thumbmails with this parameter. Set to 'top', 'middle' or 'bottom'.</td></tr><tr><td class='kis_paramname'>$thumbs_to_disk</td><td><input id='thumbs_to_disk' class='kis_param' yn='1' /></td><td>Set this parameter to 1, if you want your thumbnails to be saved on the server. If you want to generate your thumbnails 'on the fly', set this to 0.</td></tr><tr><td colspan='3' style='color:#666;'><b>Remember</b>: If $th_to_square is set to 1, you can also adjust the cropping for each thumbnail individually by clicking on the respective thumbnail when logged in as administrator.</td></tr><tr><td colspan='3' class='kis_spacer'></td></tr><tr><td class='kis_paramname'>$pic_order</td><td><input id='pic_order' class='kis_param' /></td><td>This parameter sets the order of your pictures in your gallery. Set to 0 for newest pictures first, set to 1 for oldest pictures first, set to 2 for alphabetical order or set to 3 for image creation order (uses EXIF). If you want to adjust the order of your pictures manually with the admin panel (Change order) set this to 4.</td></tr><tr><td class='kis_paramname'>$resize_auto</td><td><input id='resize_auto' class='kis_param' yn='1' /></td><td>If set to 1 the gallery resizes automatically to smaller size if vertical space is available. If set to 0 the gallery stays always fixed size.</td></tr><tr><td class='kis_paramname'>$bord_size</td><td><input id='bord_size' class='kis_param' /></td><td>Sets the border size of displayed pictures in pixels. Set to a number greater or equal to zero.</td></tr><tr><td class='kis_paramname'>$bord_color</td><td><input id='bord_color' class='kis_param' /></td><td>The border color of displayed pictures. Set a hex-color '#rrggbb' or 'none'.</td></tr><tr><td class='kis_paramname'>$max_pic_width</td><td><input id='max_pic_width' class='kis_param' /></td><td rowspan='2'>You can set a maximum width and height for displayed pictures. Set to a number (for total pixel size) or leave 'none' for no limits. You can also set a value between 0 and 1.0 to indicate a percentage of window size.</td></tr><tr><td class='kis_paramname'>$max_pic_height</td><td><input id='max_pic_height' class='kis_param' /></td></tr><tr><td class='kis_paramname'>$oversize_allowed</td><td><input id='oversize_allowed' class='kis_param' yn='1' /></td><td>Set to 0, if you want to adjust the size of displayed pictures to the browser window size. If you want to show your displayed pictures in full resolution set to 1.</td></tr><tr><td colspan='3' class='kis_spacer'></td></tr><tr><td class='kis_paramname'>$comments</td><td><input id='comments' class='kis_param' yn='1' /></td><td>1 enables picture comments and 0 disables them.</td></tr><tr><td class='kis_paramname'>$comm_text_size</td><td><input id='comm_text_size' class='kis_param' /></td><td>Set the font size in pixels for comments here.</td></tr><tr><td class='kis_paramname'>$comm_text_color</td><td><input id='comm_text_color' class='kis_param' /></td><td>Sets the font color for comments. Set a hex-color '#rrggbb'.</td></tr><tr><td class='kis_paramname'>$comm_text_font</td><td><input id='comm_text_font' class='kis_param' /></td><td>The font face for picture- and viewer comments . This is equal to css-font-face.</td></tr><tr><td class='kis_paramname'>$comm_text_align</td><td><input id='comm_text_align' class='kis_param' /></td><td>You can change the text alignment for comments with this parameter. Set to 'left', 'center' or 'right'.</td></tr><tr><td class='kis_paramname'>$comm_auto</td><td><input id='comm_auto' class='kis_param' yn='1' /></td><td>If you want to have automatic picture comments set this to 1, or else set to 0.</td></tr><tr><td class='kis_paramname'>$comm_auto_string</td><td><input id='comm_auto_string' class='kis_param' /></td><td>If <b>$comm_auto</b> is set to 1, you can enter your automatic picture comment here. There are some variables available: '%x' = picture number / '%X' = number of all pictures / '%f' = filename / '%g' = gallery folder</td></tr><tr><td colspan='3' style='color:#666;'><b>Remember</b>: If $comm_auto is set to 1, all custom comments won't be displayed or saved.</td></tr><tr><td colspan='3' class='kis_spacer'></td></tr><tr><td class='kis_paramname'>$viewercomments</td><td><input id='viewercomments' class='kis_param' yn='1' /></td><td>1 = viewer comments are turned on / 0 = viewer comments are turned off</td></tr><tr><td class='kis_paramname'>$moderate_posts</td><td><input id='moderate_posts' class='kis_param' yn='1' /></td><td>1 = moderate new viewer comments / 0 = no moderation<br />Enable $admin_mail if you want to receive notification for new picture comments.</td></tr><tr><td class='kis_paramname'>$vcomm_header_color</td><td><input id='vcomm_header_color' class='kis_param' /></td><td>This font color is used for viewer comment form descriptions. Set a hex-color '#rrggbb'.</td></tr><tr><td class='kis_paramname'>$vcomm_box_color</td><td><input id='vcomm_box_color' class='kis_param' /></td><td>This is the text color that is used for the comment form. Set a hex-color '#rrggbb'.</td></tr><tr><td class='kis_paramname'>$vcomm_text_color</td><td><input id='vcomm_text_color' class='kis_param' /></td><td>Defines the text color for viewer comments and their name. Set a hex-color '#rrggbb'.</td></tr><tr><td class='kis_paramname'>$vcomm_timedate_color</td><td><input id='vcomm_timedate_color' class='kis_param' /></td><td>Defines the text color for date and time line on the viewer comments page. Set a hex-color '#rrggbb'.</td></tr><tr><td class='kis_paramname'>$vcomm_back_color</td><td><input id='vcomm_back_color' class='kis_param' /></td><td>The background color of the viewer comment form is defined here. Set a hex-color '#rrggbb' or 'none'.</td></tr><tr><td class='kis_paramname'>$vcomm_bord_color</td><td><input id='vcomm_bord_color' class='kis_param' /></td><td>Sets the border color for all forms and inputs on the viewer comments page. Set a hex-color '#rrggbb'.</td></tr><tr><td class='kis_paramname'>$vcomm_horline_color</td><td><input id='vcomm_horline_color' class='kis_param' /></td><td>Defines the color for the horizontal lines between viewer comments. Set a hex-color '#rrggbb'.</td></tr><tr><td colspan='3' class='kis_spacer'></td></tr><tr><td class='kis_paramname'>$slideshow</td><td><input id='slideshow' class='kis_param' yn='1' /></td><td>Set to 1 if you want to enable a slideshow, or set to 0 else.</td></tr><tr><td class='kis_paramname'>$downloadpics</td><td><input id='downloadpics' class='kis_param' yn='1' /></td><td>Set to 1 if you want to allow full resolution picture downloads, or set to 0 else.</td></tr><tr><td class='kis_paramname'>$checkgps</td><td><input id='checkgps' class='kis_param' yn='1' /></td><td>If set to 1, a link to Googlemaps is displayed when an image contains geodetic coordinates in the exif metadata. Set to 0 if you don't need this feature.</td></tr><tr><td class='kis_paramname'>$cellinfo</td><td><input id='cellinfo' class='kis_param' yn='1' /></td><td>If <b>$checkgps</b> is set to 1, you can additionally check the image metadata for cellid information added by mobile phones. This information is then send to opencellid.org and if the cell gps position is deposed there a link to Googlemaps will be displayed too.</td></tr><tr><td class='kis_paramname'>$show_nav</td><td><input id='show_nav' class='kis_param' yn='1' /></td><td>Set this parameter to 0, if you don't need the navigation icons below the thumbnails. Otherwise set to 1.</td></tr><tr><td class='kis_paramname'>$nav_always</td><td><input id='nav_always' class='kis_param' yn='1' /></td><td>If this is set to 0, the navigation icons will only be visible if you hover with your mouse over the gallery.</td></tr><tr><td class='kis_paramname'>$nav_pos</td><td><input id='nav_pos' class='kis_param' /></td><td>Aligns the navigation icons below the thumbnails. Set to 'left', 'center' or 'right'.</td></tr><tr><td class='kis_paramname'>$nav_color</td><td><input id='nav_color' class='kis_param' /></td><td>Defines the background color of the navigation icons toolbar. Set a hex-color '#rrggbb'.</td></tr><tr><td class='kis_paramname'>$nav_border_color</td><td><input id='nav_border_color' class='kis_param' /></td><td>Defines the border color of the navigation icons toolbar. Set a hex-color '#rrggbb'.</td></tr><tr><td class='kis_paramname'>$nav_style</td><td><input id='nav_style' class='kis_param' /></td><td>1 = rectangular navigation icons / 2 = round navigation icons (doesn't work for Internet Explorer <= 8)</td></tr><tr><td class='kis_paramname'>$show_image_nav</td><td><input id='show_image_nav' class='kis_param' yn='1' /></td><td>Enables or disables the navigation icons for displayed pictures. Set to 1 or either to 0.</td></tr><tr><td class='kis_paramname'>$image_nav_always</td><td><input id='image_nav_always' class='kis_param' yn='1' /></td><td>If this is set to 0, the image navigation icons and the image sharing link will slide out if mouse moves away from them. Otherwise they stay visible (set to 1).</td></tr><tr><td class='kis_paramname'>$show_share</td><td><input id='show_share' class='kis_param' yn='1' /></td><td>Enables or disables the display of the image sharing link. Set to 1 or either to 0. (not visible when logged in as admin)</td></tr><tr><td class='kis_paramname'>$show_help</td><td><input id='show_help' class='kis_param' yn='1' /></td><td>If set to 1, a small help icon is displayed on bottom right/left of displayed pictures. Set to 0 if you don't need this.</td></tr><tr><td class='kis_paramname'>$help_pos</td><td><input id='help_pos' class='kis_param' /></td><td>Set to 'left' or 'right' to define where to place the help icon.</td></tr><tr><td class='kis_paramname'>$show_preview</td><td><input id='show_preview' class='kis_param' yn='1' /></td><td>You can disable/enable preview pictures that are displayed when you move your mouse beyond the sides of displayed pictures. Set to 1 or 0.</td></tr><tr><td class='kis_paramname'>$preview_style</td><td><input id='preview_style' class='kis_param' /></td><td>If set to 1, it displays the next/previous picture as preview. The further you move your mouse, the bigger the preview images get. If set to 2, only the icons 'ki_next.png'/'ki_back.png' are displayed. This parameter is only valid, when $show_preview is set to 1.</td></tr><tr><td class='kis_paramname'>$preview_pics</td><td><input id='preview_pics' class='kis_param' /></td><td>You can adjust the number of preview pictures that are displayed, if you move your mouse to the border of the browser window. If this is set to 0 no preview pictures will be displayed.</td></tr><tr><td colspan='3' class='kis_spacer'></td></tr><tr><td class='kis_paramname'>$show_explorer</td><td><input id='show_explorer' class='kis_param' yn='1' /></td><td>This parameter enables/disables the gallery explorer (maximized full window view).</td><tr><td class='kis_paramname'>$explorer_padding</td><td><input id='explorer_padding' class='kis_param' /></td><td>Sets the padding ( in pixels ) between pictures in 'maximized' view.</td></tr><tr><td colspan='3' class='kis_spacer'></td></tr><tr><td class='kis_paramname'>$watermark_hori</td><td><input id='watermark_hori' class='kis_param' /></td><td>Defines the horicontal position of the watermark on images. Set to 'left', 'center' or 'right'.</td></tr><tr><td class='kis_paramname'>$watermark_vert</td><td><input id='watermark_vert' class='kis_param' /></td><td>Defines the vertical position of the watermark on images. Set to 'top', 'middle' or 'bottom'.</td></tr><tr><td class='kis_paramname'>$watermark_size</td><td><input id='watermark_size' class='kis_param' /></td><td>You can adjust the size of the watermark. If you want to spread the watermark over the whole image set this to 1. Leave this at 0 if you want to leave the watermark size as it is. Otherwise set to a decimal from 0.01 to 0.99 .</td></tr><tr class='kis_global'><td colspan='3' class='kis_spacer'></td></tr><tr class='kis_global'><td class='kis_paramname'>$fade_color</td><td><input id='fade_color' class='kis_param' /></td><td>Adjust the shade color with this parameter. Set a hex-color '#rrggbb'.</td></tr><tr class='kis_global'><td class='kis_paramname'>$fade_alpha</td><td><input id='fade_alpha' class='kis_param' /></td><td>Changes the opacity of the shade. Set a number from 0 to 10, where 10 is for full opacity and 0 for no opacity at all.</td></tr><tr class='kis_global'><td class='kis_paramname'>$shade_while_loading</td><td><input id='shade_while_loading' class='kis_param' yn='1' /></td><td>If this is set to 1, the website will be shaded during the galleries will be initialized. Set to 0, if you don't need this.</td></tr><tr class='kis_global'><td class='kis_paramname'>$disable_animation</td><td><input id='disable_animation' class='kis_param' yn='1' /></td><td>You can disable all script animations if you set this to 1. If you wish to enable animations, set this to 0.</td></tr><tr class='kis_global'><td class='kis_paramname'>$slideshow_time</td><td><input id='slideshow_time' class='kis_param' /></td><td>This is the time an image will be displayed during slideshow. Enter a value in milliseconds.</td></tr><tr class='kis_global'><td colspan='3' style='color:#666;'><b>Remember</b>: These are global settings. The changes will only be applied if you refresh your website.</td></tr><tr class='kis_global'><td colspan='3' class='kis_spacer'></td></tr><tr class='kis_global'><td class='kis_paramname'>$nav_next</td><td><input id='nav_next' class='kis_param' /></td><td>Next thumbnails page icon description.</td></tr><tr class='kis_global'><td class='kis_paramname'>$nav_back</td><td><input id='nav_back' class='kis_param' /></td><td>Previous thumbnails page icon description.</td></tr><tr class='kis_global'><td class='kis_paramname'>$nav_maxi</td><td><input id='nav_maxi' class='kis_param' /></td><td>Maximize gallery icon description.</td></tr><tr class='kis_global'><td class='kis_paramname'>$nav_kiv_next</td><td><input id='nav_kiv_next' class='kis_param' /></td><td>Next gallery picture icon description.</td></tr><tr class='kis_global'><td class='kis_paramname'>$nav_kiv_back</td><td><input id='nav_kiv_back' class='kis_param' /></td><td>Previous gallery picture icon description.</td></tr><tr class='kis_global'><td class='kis_paramname'>$nav_kiv_close</td><td><input id='nav_kiv_close' class='kis_param' /></td><td>Close icon description.</td></tr><tr class='kis_global'><td class='kis_paramname'>$nav_gps_coord</td><td><input id='nav_gps_coord' class='kis_param' /></td><td>Googlemaps icon description.</td></tr><tr class='kis_global'><td class='kis_paramname'>$nav_kiv_vcomm</td><td><input id='nav_kiv_vcomm' class='kis_param' /></td><td>Show/Add viewer comments icon description.</td></tr><tr class='kis_global'><td class='kis_paramname'>$nav_kiv_download</td><td><input id='nav_kiv_download' class='kis_param' /></td><td>Download full picture icon description.</td></tr><tr class='kis_global'><td class='kis_paramname'>$slideshow_start</td><td><input id='slideshow_start' class='kis_param' /></td><td>Start slideshow icon description.</td></tr><tr class='kis_global'><td class='kis_paramname'>$slideshow_stop</td><td><input id='slideshow_stop' class='kis_param' /></td><td>Stop slideshow icon description.</td></tr><tr class='kis_global'><td class='kis_paramname'>$help_text</td><td><input id='help_text' class='kis_param' /></td><td>The help text, that is displayed when you hover over the info icon. The following variable is available: '[mouse]' = mouse moving image</td></tr><tr class='kis_global'><td class='kis_paramname'>$vcomm_lac</td><td><input id='vcomm_lac' class='kis_param' /></td><td>\"Leave a comment\"</td></tr><tr class='kis_global'><td class='kis_paramname'>$vcomm_name</td><td><input id='vcomm_name' class='kis_param' /></td><td>\"Name\"</td></tr><tr class='kis_global'><td class='kis_paramname'>$vcomm_comm</td><td><input id='vcomm_comm' class='kis_param' /></td><td>\"Comment\"</td></tr><tr class='kis_global'><td class='kis_paramname'>$vcomm_post</td><td><input id='vcomm_post' class='kis_param' /></td><td>\"Post comment\"</td></tr><tr class='kis_global'><td class='kis_paramname'>$vcomm_clk</td><td><input id='vcomm_clk' class='kis_param' /></td><td>\"Click on the image to flip back to the full image.\"</td></tr><tr class='kis_global'><td class='kis_paramname'>$vcomm_ncy</td><td><input id='vcomm_ncy' class='kis_param' /></td><td>\"No comments yet.\"</td></tr><tr class='kis_global'><td colspan='3' class='kis_spacer'></td></tr><tr class='kis_global'><td class='kis_paramname'>$admin_mail</td><td><input id='admin_mail' class='kis_param' yn='1' /></td><td>Enable or disable Email notifications for new image viewer comments.</td></tr><tr class='kis_global'><td class='kis_paramname'>$admin_mail_from</td><td><input id='admin_mail_from' class='kis_param' /></td><td>Email-address from where the Emails are send.</td></tr><tr class='kis_global'><td class='kis_paramname'>$admin_mail_to</td><td><input id='admin_mail_to' class='kis_param' /></td><td>Email-address where the Emails are send to.</td></tr><tr class='kis_global'><td colspan='3' style='color:#666;'><b>Remember</b>: The Email notifications system may only work if the '$admin_mail_from'-address actually belongs to this server. The PHP mail()-method needs to be working on your server.</td></tr><tr class='kis_global'><td colspan='3' class='kis_spacer'></td></tr><tr class='kis_global'><td class='kis_paramname'>$show_warnings</td><td><input id='show_warnings' class='kis_param' yn='1' /></td><td>Set to 0, if you don't need to get script warnings displayed.</td></tr><tr class='kis_global'><td colspan='3' class='kis_spacer'></td></tr><tr class='kis_global'><td class='kis_paramname'>$user</td><td><input id='user' class='kis_param' /></td><td>Change the user login name. Users can only upload new images.</td></tr><tr class='kis_global'><td class='kis_paramname'>$userpw</td><td><input id='userpw' class='kis_param' type='password' /></td><td>Change the user login password.</td></tr><tr class='kis_global'><td colspan='3' class='kis_spacer'></td></tr><tr class='kis_global'><td class='kis_paramname'>$admin</td><td><input id='admin' class='kis_param' /></td><td>Change the admin login name.</td></tr><tr class='kis_global'><td class='kis_paramname'>$pw</td><td><input id='pw' class='kis_param' type='password' /></td><td>Change the admin login password.</td></tr><tr class='kis_global'><td colspan='3' style='color:#666;'><b>Remember</b>: If you change your username and/or password you have to logout first and then login again before you can change any other settings.</td></tr></table>";
+ placeparams();
+ <?php addEvent("window", "resize", "viewdim"); ?>
+ viewdim();
+ <?php
+ if(!in_array($browser, array("ie6", "ie7", "ie9", "webkit"))){
+ addEvent("document", "keypress", "taste_kis");
+ } else {
+ addEvent("document", "keydown", "taste_kis");
+ }
+ ?>
+ <?php addEvent("document", "mousemove", "mousemoved"); ?>
+ kis.getSettings();
+ fw.move("authorization", 2, -42, 0);
+ fw.move("kis_topdiv", 2, -96, 0);
+ }
+
+ this.destr = function(){
+ <?php removeEvent("window", "resize", "viewdim"); ?>
+ <?php
+ if(!in_array($browser, array("ie6", "ie7", "ie9", "webkit"))){
+ removeEvent("document", "keypress", "taste_kis");
+ } else {
+ removeEvent("document", "keydown", "taste_kis");
+ }
+ ?>
+ <?php removeEvent("document", "mousemove", "mousemoved"); ?>
+ document.body.removeChild($("kis_maindiv"));
+ document.body.removeChild($("kis_topdiv"));
+ document.body.removeChild($("kis_botdiv"));
+ fw.shadebody(0);
+ fw.move("authorization", 2, 55, 0);
+ fw.move("kis_topdiv", 2, 0, 0);
+ }
+
+ /* -------------------------------- methodes ------------------------------------ */
+
+ function viewdim(){
+ if(window.innerHeight){
+ windowX = window.innerWidth;
+ windowY = window.innerHeight;
+ } else if(document.documentElement && document.documentElement.clientHeight){ // Explorer 6 Strict Mode
+ windowX = document.documentElement.clientWidth;
+ windowY = document.documentElement.clientHeight;
+ } else if (document.body){ // other Explorers
+ windowX = document.body.clientWidth;
+ windowY = document.body.clientHeight;
+ }
+ var maindiv = $("kis_maindiv");
+ maindiv.style.width = windowX - 8 + "px";
+ maindiv.style.height = windowY - 8 + "px";
+ }
+
+ this.closeSettings = function(){
+ fw.removejs("kis");
+ }
+
+ this.resetSettings = function(){
+ if(currentfile != "default"){
+ var nodes = document.getElementsByTagName("input");
+ var counter = 0;
+ for(var i = 0; i < nodes.length; i++){
+ if(nodes[i].className == 'kis_param'){
+ nodes[i].value = "";
+ if(nodes[i].getAttribute("yn")){
+ document.getElementsByName("kis_group"+counter)[0].checked = false;
+ document.getElementsByName("kis_group"+counter)[1].checked = false;
+ counter++;
+ }
+ }
+ }
+ }
+ }
+
+ function placeparams(){
+ var nodes = document.getElementsByTagName("input");
+ var counter = 0;
+ for(var i = 0; i < nodes.length; i++){
+ if(nodes[i].className == 'kis_param'){
+ nodes[i].id = "kis_" + nodes[i].id;
+ if(nodes[i].getAttribute("yn")){
+ nodes[i].style.display = "none";
+ nodes[i].parentNode.style.color = "#000000";
+ var node = document.createElement("label");
+ node.style.border = "1px solid #8c8c8c";
+ node.style.padding = "2px 0px 2px 15px";
+ node.style.background = "#D6ECA6";
+ node.style.width = "74px";
+ node.style.height = "16px";
+ node.style.lineHeight = "15px";
+ node.style.display = "block";
+ <?php if(in_array($browser, array("ie6", "ie7"))){ ?>
+ node.style.styleFloat = "left";
+ <?php } else { ?>
+ node.style.cssFloat = "left";
+ <?php } ?>
+ node.style.marginRight = "13px";
+ node.innerHTML = "<input type='radio' style='float:left; vertical-align:middle; height:16px; width:16px; padding:0px; margin:0px 3px 0px 0px;' name='kis_group"+counter+"' onclick=\"document.getElementById('"+nodes[i].id+"').value = '1';\" /><span style='float:left;'>Enable</span>";
+ nodes[i].parentNode.appendChild(node);
+ node = document.createElement("label");
+ node.style.border = "1px solid #8c8c8c";
+ node.style.padding = "2px 0px 2px 15px";
+ node.style.background = "#ECA6D6";
+ node.style.width = "74px";
+ node.style.height = "16px";
+ node.style.lineHeight = "15px";
+ node.style.display = "block";
+ <?php if(in_array($browser, array("ie6", "ie7"))){ ?>
+ node.style.styleFloat = "left";
+ <?php } else { ?>
+ node.style.cssFloat = "left";
+ <?php } ?>
+ node.innerHTML = "<input type='radio' style='float:left; vertical-align:middle; height:16px; width:16px; padding:0px; margin:0px 3px 0px 0px;' name='kis_group"+counter+"' onclick=\"document.getElementById('"+nodes[i].id+"').value = '0';\" /><span style='float:left;'>Disable</span>";
+ nodes[i].parentNode.appendChild(node);
+ counter++;
+ } else {
+ nodes[i].style.width = "190px";
+ nodes[i].style.border = "1px solid #8c8c8c";
+ nodes[i].style.padding = "2px";
+ nodes[i].style.margin = "0px";
+ nodes[i].style.background = "#e1edfc";
+ nodes[i].style.color = "#000000";
+ nodes[i].style.textAlign = "center";
+ }
+ }
+ }
+ nodes = document.getElementsByTagName("td");
+ for(var i = 0; i < nodes.length; i++){
+ nodes[i].style.padding = "4px";
+ if(nodes[i].className == 'kis_paramname'){
+ nodes[i].style.fontWeight = "bold";
+ nodes[i].style.color = "#5f443b";
+ nodes[i].style.fontSize = "12px";
+ }
+ if(nodes[i].className == 'kis_spacer'){
+ nodes[i].innerHTML = "<hr style='color:#398789;' />";
+ nodes[i].style.height = "19px";
+ }
+ }
+ }
+
+ this.getSettings = function(setupfile){
+ var params = "?file=";
+ if(setupfile)
+ params += setupfile + "&get=1";
+ else
+ params = "?get=1";
+ var nodes = document.getElementsByTagName("input");
+ var counter = 0;
+ for(var i = 0; i < nodes.length; i++){
+ if(nodes[i].className == 'kis_param'){
+ nodes[i].value = "";
+ if(nodes[i].getAttribute("yn")){
+ document.getElementsByName("kis_group"+counter)[0].checked = false;
+ document.getElementsByName("kis_group"+counter)[1].checked = false;
+ counter++;
+ }
+ }
+ }
+ nodes = document.getElementsByTagName("tr");
+ if(setupfile){
+ for(var i = 0; i < nodes.length; i++){
+ if(nodes[i].className == 'kis_global'){
+ nodes[i].style.display = "none";
+ }
+ }
+ } else {
+ for(var i = 0; i < nodes.length; i++){
+ if(nodes[i].className == 'kis_global'){
+ <?php if($browser === "ie6"){ ?>
+ nodes[i].style.display = "block";
+ <?php } else { ?>
+ nodes[i].style.display = "table-row";
+ <?php } ?>
+ }
+ }
+ }
+ $("kis_selfile").innerHTML = "";
+ $("kis_resetbutton").style.display = "none";
+ fw.getHTTP("<?php echo $basedir ?>ki_getsetsettings.php" + params, gotSettings, setupfile);
+ }
+
+ function gotSettings(responseText, setupfile){
+ if(!setupfile)setupfile = "default";
+ currentfile = setupfile;
+ if(currentfile == "default"){
+ $("kis_selfile").innerHTML = "ki_setup.php";
+ } else {
+ $("kis_selfile").innerHTML = setupfile + "_ki_setup.php";
+ }
+ if(currentfile != "default"){
+ $("kis_resetbutton").style.display = "block";
+ }
+ if(responseText != ""){
+ var jsontxt = responseText;
+ var settings = eval("(" + jsontxt + ")");
+
+ <?php
+ reset($GLOBALS);
+ for($i = 0; $i < $global_start; $i++)next($GLOBALS);
+ for($i = 0; $i < $global_length; $i++){
+ list($key, $val) = each($GLOBALS);
+ echo "\$(\"kis_$key\").value = settings.$key ? stripslashes(settings.$key) : \"\";\r\n";
+ }
+ ?>
+ $("kis_pw").value = "";
+ $("kis_userpw").value = "";
+
+ var nodes = document.getElementsByTagName("input");
+ var counter = 0;
+ for(var i = 0; i < nodes.length; i++){
+ if(nodes[i].className == 'kis_param'){
+ if(nodes[i].getAttribute("yn")){
+ if(nodes[i].value == "1")document.getElementsByName("kis_group"+counter)[0].checked = true;
+ if(nodes[i].value == "0")document.getElementsByName("kis_group"+counter)[1].checked = true;
+ counter++;
+ }
+ }
+ }
+
+ }
+ }
+
+ function stripslashes(str) {
+ str = str.replace(/\\'/g,'\'');
+ str = str.replace(/\\"/g,'"');
+ str = str.replace(/\\0/g,'\0');
+ str = str.replace(/\\\\/g,'\\');
+ return str;
+ }
+
+ this.saveSettings = function(){
+ if(currentfile != ""){
+ var params = "?file=" + currentfile + "&set=1";
+ <?php
+ reset($GLOBALS);
+ for($i = 0; $i < $global_start; $i++)next($GLOBALS);
+ for($i = 0; $i < $global_length; $i++){
+ list($key, $val) = each($GLOBALS);
+ echo "params += helpsave(\"$key\");\r\n";
+ }
+ ?>
+ var errors = lastcheck();
+ if(errors == 0){
+ fw.getHTTP("<?php echo $basedir ?>ki_getsetsettings.php" + params, savedSettings, currentfile);
+ } else {
+ alert("Error: All fields must be set for 'ki_setup.php'!");
+ }
+ }
+ }
+
+ function lastcheck(){
+ if(currentfile == "default"){
+ var nodes = document.getElementsByTagName("input");
+ for(var i = 0; i < nodes.length; i++){
+ if(nodes[i].className == 'kis_param'){
+ if(nodes[i].value == "" && nodes[i].id != "kis_pw" && nodes[i].id != "kis_userpw")return 1; // check all fields, except pw
+ }
+ }
+ }
+ return 0;
+ }
+
+ function helpsave(param){
+ return $("kis_"+param).value != "" ? "&"+param+"=" + encodeURIComponent($("kis_"+param).value) : "";
+ }
+
+ function savedSettings(responseText, savedfile){
+ var dirname = savedfile;
+ if(savedfile == "default")
+ savedfile = "ki_setup.php";
+ else
+ savedfile += "_ki_setup.php";
+ if(responseText == 'adminchanged'){
+ alert("File '"+savedfile+"' modified. You changed also your login username and/or password. You will now be logged out. Please login with your new data.");
+ var params = location.search.substr(1).split('&');
+ var newparams = "";
+ for(var i = 0; i < params.length; i++){
+ var param = params[i].split('=');
+ if(param[0] != 'admin'){
+ if(newparams.length == 0)
+ newparams += "?";
+ else
+ newparams += "&";
+ newparams += params[i];
+ } else {
+ if(newparams.length == 0)
+ newparams += "?";
+ else
+ newparams += "&";
+ newparams += "admin=" + $("kis_admin").value;
+ }
+ }
+ location.href = "./" + newparams;
+ } else if(responseText == 'modified'){
+ alert("File '"+savedfile+"' modified.");
+ kib.reloadcsandreinit();
+ } else {
+ alert("ERROR: File '"+savedfile+"' could not be saved/modified.");
+ }
+ }
+
+ function preventDefaultAction(aEvent) {
+ <?php if($browser !== "ie6" && $browser !== "ie7") { ?>
+ aEvent.stopPropagation();
+ <?php } ?>
+ <?php if($browser === "gecko") { ?>
+ aEvent.preventDefault();
+ <?php } ?>
+ <?php if($browser === "opera") { ?>
+ aEvent.returnValue = false;
+ <?php } ?>
+ }
+
+ function taste_kis(aEvent) {
+ aEvent = aEvent ? aEvent : window.event;
+ var keyCode = aEvent.keyCode;
+ if(keyCode == 27){
+ kis.closeSettings();
+ preventDefaultAction(aEvent);
+ return false;
+ }
+ }
+
+ function mousemoved(aEvent){
+ aEvent = aEvent ? aEvent : window.event;
+ var x = aEvent.clientX ? aEvent.clientX : aEvent.pageX;
+ var y = aEvent.clientY ? aEvent.clientY : aEvent.pageY;
+ if(y < 180 && x < 30 && !open){
+ open = 1;
+ fw.move("authorization", 2, 55, 0);
+ fw.move("kis_topdiv", 2, 0, 0);
+ return;
+ }
+ if(x > 120 || y > 180){
+ open = 0;
+ fw.move("authorization", 2, -42, 0);
+ fw.move("kis_topdiv", 2, -96, 0);
+ }
+ }
+}
+
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_js_upload.php b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_js_upload.php
new file mode 100644
index 00000000..97a5ea6d
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_js_upload.php
@@ -0,0 +1,611 @@
+<?php
+ob_start("ob_gzhandler");
+
+session_start();
+
+header("Expires: Mon, 01 Jul 2003 00:00:00 GMT"); // Past date
+header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // Consitnuously modified
+header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
+header("Pragma: no-cache"); // NO CACHE
+
+//-------------------------------------- functions -------------------------------------
+function draw_image($filename, $id, $style, $params) {
+ global $browser, $basedir;
+ $idstring = "";
+ if($id != "")$idstring = "id='".$id."' ";
+ if($browser == "ie6") {
+ $imgsize = getimagesize($filename);
+ echo "<img ".$idstring."style='filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=".$basedir.$filename."); width:".$imgsize[0]."px; height:".$imgsize[1]."px; ".$style."' src='".$basedir."ki_noimage.gif' ".$params." />";
+ } else {
+ if($style != "")$style = " style='".$style."' ";
+ echo "<img ".$idstring."src='".$basedir.$filename."'".$style.$params." />";
+ }
+}
+
+function addEvent($el, $event, $function){
+ global $browser;
+ if($browser === "ie6" || $browser === "ie7"){
+ echo $el.".attachEvent('on".$event."', ".$function.");\n";
+ } else {
+ echo $el.".addEventListener('".$event."', ".$function.", false);\n";
+ }
+}
+
+function removeEvent($el, $event, $function){
+ global $browser;
+ if($browser === "ie6" || $browser === "ie7"){
+ echo $el.".detachEvent('on".$event."', ".$function.");\n";
+ } else {
+ echo $el.".removeEventListener('".$event."', ".$function.", false);\n";
+ }
+}
+//-------------------------------------- end functions -----------------------------------
+
+include("../ki_config/ki_setup.php");
+
+$browser = $_SERVER['HTTP_USER_AGENT'];
+
+if(preg_match("/Opera/",$browser))
+ $browser = "opera";
+elseif(preg_match("/MSIE [9]/",$browser))
+ $browser = "ie9";
+elseif(preg_match("/MSIE [7-8]/",$browser))
+ $browser = "ie7";
+elseif(preg_match("/MSIE [1-6]/",$browser))
+ $browser = "ie6";
+elseif(preg_match("/AppleWebKit/",$browser))
+ $browser = "webkit";
+else
+ $browser = "gecko";
+
+if($browser === "ie6")
+ $posfix = "absolute";
+else
+ $posfix = "fixed";
+
+if(isset($_GET['reldir']))
+ $reldir = $_GET['reldir'];
+else
+ $reldir = "";
+
+$confdir = $reldir."ki_config/";
+$galleriesdir = $reldir."ki_galleries/";
+$basedir = $reldir."ki_base/";
+
+$pwok = 0;
+if(isset($_SESSION['pwquery'])){
+ if($_SESSION['pwquery'] === $pw)$pwok = 1;
+}
+if($pwok == 0)exit();
+
+header("Content-Type: application/x-javascript");
+?>
+
+// Settings module 'kiu' --------------------------------------------------------------------
+
+function kiu_module(){
+
+ /* -------------------------------- variables ----------------------------------- */
+
+ var windowX;
+ var windowY;
+ var currentfolder = "";
+ var finalsizes = Array();
+
+ /* -------------------------------- getElementById function --------------------- */
+
+ function $(id){
+ return document.getElementById(id);
+ }
+
+ /* -------------------------------- constructor/descturctor --------------------- */
+
+ this.constr = function(){
+ if(typeof(kiv_module) == "function")kiv.closeImage();
+ if(typeof(kie_module) == "function")kie.closeGallery();
+ if(typeof(kis_module) == "function")kis.closeSettings();
+ if(typeof(kid_module) == "function")kid.close();
+ if(typeof(kic_module) == "function")kic.close();
+ if(typeof(kim_module) == "function")kim.close();
+ fw.shadebody(1);
+ var node;
+ if(!$("kiu_maindiv")){
+ node = document.createElement("div");
+ node.id = "kiu_maindiv";
+ node.style.background = "#aaaaaa";
+ node.style.position = "<?php echo $posfix ?>";
+ node.style.left = "0px";
+ node.style.top = "0px";
+ node.style.zIndex = 1000;
+ node.style.overflowX = "hidden";
+ node.style.overflowY = "auto";
+ node.style.display = "block";
+ node.style.font = "12px Tahoma, sans-serif";
+ node.style.padding = "4px";
+ node.innerHTML = "<div id='upload_div' style='background:#D2D2D2; position:absolute; left:50%; top:50%; margin-left:-481px; margin-top:-266px; border:1px solid #000000; padding:4px; height:530px; width:960px;'></div><div style='position:absolute; left:50%; top:50%; margin-left:-481px; margin-top:-266px; width:960px; height:480px; padding:4px; z-index:3; background:#D2D2D2; text-align:center; border:1px solid #000000; padding-top:54px; display:none;' id='kiu_progress'><span style='font-size:14px; font-weight:bold;'>Uploading files</span><div style='position:absolute; left:180px; top:150px; height:24px; width:600px; border:1px dashed #fff; line-height:24px; background:#afafaf;'><div id='kiu_progress_cur' style='position:absolute; left:0px; top:0px; width:0%; height:100%; background:#F63;'></div><div style='position:relative; color:#fff; overflow:hidden;'></div></div><div style='position:absolute; left:180px; top:250px; height:24px; width:600px; border:1px dashed #fff; line-height:24px; background:#afafaf;'><div id='kiu_progress_tot' style='position:absolute; left:0px; top:0px; width:0%; height:100%; background:#F63;'></div><div style='position:relative; color:#fff; overflow:hidden;'></div></div></div><div id='kiu_uploaddata' style='display:none;'></div>";
+ document.body.appendChild(node);
+ node = $("upload_div");
+ var uploadfield = "";
+ if(supportAjaxUploadWithProgress()){
+ uploadfield += "<form id='kiu_m_file_form'><div style='font-size:12px; text-align:center; padding-bottom:40px; padding-top:40px;'>Your browser supports uploading multiple files. Select all files from the \"Browse files\" upload field.</div><div style='position:relative; width:580px; margin:auto;'><input type='file' size='74' style='width:575px; padding:2px; margin:0px; border:1px solid #000; display:block; position:relative; <?php echo in_array($browser, array("ie6", "ie7")) ? "filter:alpha(opacity:0);" : "opacity:0;" ?> z-index:2;' onchange='kiu.choseMFiles(this)' multiple='multiple' name='pic' id='kiu_m_file' /><div style='position:absolute; left:0px; top:0px; z-index:1;'><div style='width:475px; height:18px; padding:2px; margin:0px; border:1px solid #8c8c8c; float:left; margin-right:5px; background:#fff; line-height:18px; margin-bottom:20px;'></div><input type='button' value='Browse files' style='float:left; display:block; margin:0px; padding:2px; border:1px solid #8c8c8c; height:24px; line-height:18px; width:90px;' /></div></div></form>";
+ } else {
+ for(var i = 0; i < 9; i++){
+ uploadfield += "<div style='position:relative; width:580px; margin:auto; margin-top:18px; height:27px; overflow:hidden;'><form action='<?php echo $basedir ?>ki_upload.php' target='kiu_uploadframe"+i+"' name='kiu_upform"+i+"' enctype='multipart/form-data' method='post'><input type='hidden' value='' name='dir'><input type='hidden' value='0' name='addwatermark'><input type='hidden' value='' name='maxx'><input type='hidden' value='' name='maxy'><iframe name='kiu_uploadframe"+i+"' src='about:blank' style='display:none;'></iframe><input type='file' size='74' style='width:575px; padding:2px; margin:0px; border:1px solid #000; display:block; position:relative; <?php echo in_array($browser, array("ie6", "ie7")) ? "filter:alpha(opacity:0);" : "opacity:0;" ?> z-index:2;' onchange='kiu.choseFiles(this)' name='pic' /><div style='position:absolute; left:0px; top:0px; z-index:1;'><input type='text' style='width:475px; height:18px; padding:2px; margin:0px; border:1px solid #8c8c8c; float:left; margin-right:5px;' /><input type='button' value='Browse file' style='float:left; display:block; margin:0px; padding:2px; border:1px solid #8c8c8c; height:24px; line-height:18px; width:90px;' /></div></form></div>";
+ }
+ }
+ uploadfield += "<div style='position:absolute; bottom:20px; left:195px; width:580px; margin:0px; line-height:22px; vertical-align:middle;'><span style='float:left;'>Upload a watermark:</span><div style='position:relative; width:450px; margin:auto; height:27px; overflow:hidden; float:right;'><form action='<?php echo $basedir ?>ki_upload.php' target='kiu_watermark' name='kiu_watermark_form' enctype='multipart/form-data' method='post'><iframe name='kiu_watermark' src='about:blank' style='display:none;'></iframe><input type='file' size='74' style='width:445px; padding:2px; margin:0px; border:1px solid #000; display:block; position:relative; <?php echo in_array($browser, array("ie6", "ie7")) ? "filter:alpha(opacity:0);" : "opacity:0;" ?> z-index:2;' onchange='kiu.choseFiles(this)' name='pic' /><div style='position:absolute; left:0px; top:0px; z-index:1;'><input type='text' style='width:345px; height:18px; padding:2px; margin:0px; border:1px solid #8c8c8c; float:left; margin-right:5px;' /><input type='button' value='Browse file' style='float:left; display:block; margin:0px; padding:2px; border:1px solid #8c8c8c; height:24px; line-height:18px; width:90px;' /></div><input type='hidden' name='watermark' value='1' /></form></div><span style='float:left; margin-right:15px; margin-top:8px; width:150px;'>Add watermark to images:</span><input type='checkbox' style='display:block; margin:0px; margin-top:10px; float:left;' onclick='kiu.toggleWatermark(this)' id='kiu_wmcb' /><br /><span style='float:left; margin-right:15px; margin-top:8px; clear:both;'>Reduce maximum image size to:</span><input type='text' style='width:50px; height:18px; padding:2px; margin:0px; margin-top:8px; margin-right:8px; border:1px solid #8c8c8c; float:left; text-align:center;' id='kiu_maxx' /><span style='float:left; margin-top:8px;'>x</span><input type='text' style='width:50px; height:18px; padding:2px; margin:0px; margin-top:8px; margin-left:10px; border:1px solid #8c8c8c; float:left; text-align:center;' id='kiu_maxy' /><div style='float:right; margin-left:10px; margin-top:-20px; margin-right:5px; height:52px; width:220px;'><?php draw_image("ki_watermark.pic", "kiu_wm_preview", "max-height:100%; max-width:100%; float:right; visibility:hidden;", "alt='Watermark'"); ?></div></div>";
+ node.innerHTML = uploadfield;
+ <?php if(is_file("ki_watermark.pic"))echo "$('kiu_wm_preview').style.visibility = 'visible';"; ?>
+ }
+ if(!$("kiu_topdiv")){
+ node = document.createElement("div");
+ node.id = "kiu_topdiv";
+ node.style.background = "#aaaaaa";
+ node.style.position = "<?php echo $posfix ?>";
+ node.style.height = "45px";
+ node.style.zIndex = 1001;
+ node.style.padding = "5px 20px 0px 120px";
+ node.style.font = "12px Tahoma, sans-serif";
+ node.style.color = "#222222";
+ node.style.borderBottom = "1px solid #000000";
+ node.style.borderRight = "1px solid #000000";
+ node.style.left = "0px";
+ node.style.top = "0px";
+ var dirs = "";
+ for(var i = 0; i < kib.dirs.length; i++){
+ dirs = dirs + "<span style='cursor:pointer; text-decoration:underline; margin-right:5px; line-height:14px;' onclick=\"kiu.setFolder('" + kib.dirs[i] + "')\">" + kib.dirs[i] + "</span>";
+ }
+ currentfolder = kib.dirs[0];
+ node.innerHTML = "<div style='margin-bottom:5px;'><span style='font-size:14px; line-height:18px; font-weight:bold; color:#003; margin-right:5px;'>Selected gallery upload folder</span><span style='background:#003; border:1px solid #CCC; padding:3px; color:#ffffff;' id='kiu_selfolder'>" + currentfolder + "</span></div>" + dirs;
+ document.body.appendChild(node);
+ }
+ if(!$("kiu_botdiv")){
+ node = document.createElement("div");
+ node.id = "kiu_botdiv";
+ node.style.background = "#aaaaaa";
+ node.style.position = "<?php echo $posfix ?>";
+ node.style.zIndex = 1001;
+ node.style.padding = "5px";
+ node.style.font = "12px Tahoma, sans-serif";
+ node.style.color = "#222222";
+ node.style.borderTop = "1px solid #000000";
+ node.style.borderRight = "1px solid #000000";
+ node.style.borderLeft = "1px solid #000000";
+ node.style.right = "25px";
+ node.style.bottom = "0px";
+ node.innerHTML = "<input type='button' value='Close' style='float:right; margin:0px; padding:0px; cursor:pointer; border:1px solid #000; height:26px; width:150px;' onclick='kiu.closeUpload()' /><input type='button' value='Upload files' style='margin:0px; margin-right:10px; padding:0px; cursor:pointer; border:1px solid #000; height:26px; width:150px; background:#B8E8D4;' onclick='kiu.startUpload()' /><input type='button' value='Upload watermark' style='margin:0px; margin-right:10px; padding:0px; cursor:pointer; border:1px solid #000; height:26px; width:150px;' onclick='kiu.uploadWatermark()' />";
+ document.body.appendChild(node);
+ kib.showhelp(node, 4, 5);
+ node.onmouseover = function(){
+ kib.hidehelp();
+ }
+ }
+ <?php addEvent("window", "resize", "viewdim"); ?>
+ viewdim();
+ <?php
+ if(!in_array($browser, array("ie6", "ie7", "ie9", "webkit"))){
+ addEvent("document", "keypress", "taste_kiu");
+ } else {
+ addEvent("document", "keydown", "taste_kiu");
+ }
+ ?>
+ kiu.setFolder(currentfolder);
+ }
+
+ this.destr = function(){
+ <?php removeEvent("window", "resize", "viewdim"); ?>
+ <?php
+ if(!in_array($browser, array("ie6", "ie7", "ie9", "webkit"))){
+ removeEvent("document", "keypress", "taste_kiu");
+ } else {
+ removeEvent("document", "keydown", "taste_kiu");
+ }
+ ?>
+ document.body.removeChild($("kiu_maindiv"));
+ document.body.removeChild($("kiu_topdiv"));
+ document.body.removeChild($("kiu_botdiv"));
+ fw.shadebody(0);
+ }
+
+ /* -------------------------------- methodes ------------------------------------ */
+
+ function viewdim(){
+ if(window.innerHeight){
+ windowX = window.innerWidth;
+ windowY = window.innerHeight;
+ } else if(document.documentElement && document.documentElement.clientHeight){ // Explorer 6 Strict Mode
+ windowX = document.documentElement.clientWidth;
+ windowY = document.documentElement.clientHeight;
+ } else if (document.body){ // other Explorers
+ windowX = document.body.clientWidth;
+ windowY = document.body.clientHeight;
+ }
+ var maindiv = $("kiu_maindiv");
+ maindiv.style.width = windowX - 8 + "px";
+ maindiv.style.height = windowY - 8 + "px";
+ }
+
+ this.closeUpload = function(){
+ kib.hidehelp();
+ fw.removejs("kiu");
+ kib.reinit();
+ }
+
+ function supportAjaxUploadWithProgress() {
+ var xhr = new XMLHttpRequest();
+ if (window.File && window.FileReader && window.FileList && ('upload' in xhr) && ('onprogress' in xhr.upload)) {
+ if(window.FormData){
+ return 1;
+ } else if('sendAsBinary' in xhr){
+ return 1;
+ }
+ }
+ return 0;
+ }
+
+ this.choseFiles = function(obj){
+ var fakefield = obj.nextSibling.firstChild;
+ var fileInput = obj;
+ var ret = "";
+ <?php if(in_array($browser, array("ie6", "ie7", "ie9", "opera"))) { ?>
+ var temp = fileInput.value.split("\\");
+ ret = temp[temp.length-1];
+ <?php } else { ?>
+ ret = fileInput.files[0].name;
+ <?php } ?>
+ fakefield.value = ret;
+ }
+
+ this.choseMFiles = function(obj){
+ var fakefield = obj.nextSibling.firstChild;
+ var fileInput = obj;
+ var ret = "";
+
+ for(var i = 0; i < fileInput.files.length; i++){
+ if(i != 0)ret += ", ";
+ ret += fileInput.files[i].name;
+ }
+
+ var temp = fw.getDim(fakefield, 1);
+ fakefield.style.visibility = "hidden";
+ fakefield.style.height = "auto";
+ fakefield.style.overflow = "visible";
+ fakefield.innerHTML = ret;
+ temp2 = fw.getDim(fakefield, 1);
+ fakefield.style.overflow = "hidden";
+ fakefield.style.height = temp[1] + "px";
+ fakefield.style.visibility = "visible";
+ fw.resize(fakefield, 4, 0, temp2[1]);
+ }
+
+ this.setFolder = function(folder){
+ currentfolder = folder;
+ var i = 0;
+ while(document.getElementsByName("kiu_upform"+i)[0]){
+ var obj = document.getElementsByName("kiu_upform"+i)[0];
+ obj.dir.value = folder;
+ i++;
+ }
+ $("kiu_selfolder").innerHTML = folder;
+ }
+
+ this.uploadWatermark = function(){
+ var myform = document.getElementsByName("kiu_watermark_form")[0];
+ myform.submit();
+ }
+
+ this.uploadedWatermark = function(){
+ var obj = $("kiu_wm_preview");
+ obj.src = "<?php echo $basedir ?>ki_watermark.pic?" + Math.round(Math.random()*10000);
+ obj.style.visibility = 'visible';
+ }
+
+ this.toggleWatermark = function(wm){
+ var i = 0;
+ while(document.getElementsByName("kiu_upform"+i)[0]){
+ var obj = document.getElementsByName("kiu_upform"+i)[0];
+ if(wm.checked == true){
+ obj.addwatermark.value = "1";
+ } else {
+ obj.addwatermark.value = "0";
+ }
+ i++;
+ }
+ }
+
+ this.startUpload = function(){
+ $("kiu_progress").style.display = "block";
+ if(supportAjaxUploadWithProgress()){
+ sendfile(0);
+ } else {
+ $("kiu_progress_cur").style.width = "0%";
+ $("kiu_progress_tot").style.width = "0%";
+ var myform = document.getElementsByName("kiu_upform0");
+ var loop = 0;
+ while(myform[0]){
+ myform[0].maxx.value = $("kiu_maxx").value;
+ myform[0].maxy.value = $("kiu_maxy").value;
+ <?php if( in_array($browser, array("gecko", "webkit")) ){ ?>
+ if(myform[0].pic.files[0]){
+ finalsizes.push(myform[0].pic.files[0].size);
+ } else {
+ finalsizes.push(0);
+ }
+ <?php } else { ?>
+ if(myform[0].pic.value){
+ finalsizes.push(1);
+ } else {
+ finalsizes.push(0);
+ }
+ <?php } ?>
+ loop++;
+ myform = document.getElementsByName("kiu_upform"+loop);
+ }
+ fw.getHTTP("<?php echo $basedir ?>ki_getuploadinfo.php?form=reset", submitform, 0);
+ }
+ }
+
+ function sendfile(no){
+ var fileInput = $('kiu_m_file');
+ var file = fileInput.files[no];
+
+ if(!file){
+ allfinished();
+ return -1;
+ }
+
+ var allsize = 0;
+ var completesize = 0;
+ for(var i = 0; i < no; i++){
+ completesize += fileInput.files[i].size;
+ }
+ for(var i = 0; i < fileInput.files.length; i++){
+ allsize += fileInput.files[i].size;
+ }
+
+ var reader = new FileReader();
+
+ reader.onloadend = function(evt){
+
+ var xhr = new XMLHttpRequest();
+
+ var bar_cur = $("kiu_progress_cur");
+ var bar_tot = $("kiu_progress_tot");
+
+ bar_cur.nextSibling.innerHTML = "Current '" + file.name + "'";
+
+ xhr.upload.addEventListener("progress", function(e) {
+ if(e.lengthComputable){
+ var curfilecomplete = Math.round((e.loaded / e.total)*file.size);
+ var barsize = Math.round(((completesize+curfilecomplete)/allsize)*100);
+ bar_cur.style.width = Math.round((e.loaded / e.total)*100) + "%";
+ bar_tot.style.width = barsize + "%";
+ bar_tot.nextSibling.innerHTML = "Total: " + barsize + " %";
+ }
+ }, false);
+
+ xhr.onload = function(e) {
+ completesize += file.size;
+ bar_cur.style.width = "100%";
+ bar_cur.nextSibling.innerHTML = "'" + file.name + "' uploaded.";
+ var barsize = Math.round((completesize/allsize)*100);
+ bar_tot.style.width = barsize + "%";
+ bar_tot.nextSibling.innerHTML = "Total: " + barsize + " %";
+ setTimeout(function(){
+ sendfile(no+1);
+ }, 1000);
+ };
+
+ xhr.open('POST', '<?php echo $basedir ?>ki_upload.php', true);
+
+ var wm = $("kiu_wmcb");
+ if(wm.checked == true){
+ wm = "1";
+ }else{
+ wm = "0";
+ }
+
+ if(window.FormData){
+ var formData = new FormData();
+ formData.append("dir", currentfolder);
+ formData.append("addwatermark", wm);
+ formData.append("pic", file);
+ formData.append("maxx", $("kiu_maxx").value);
+ formData.append("maxy", $("kiu_maxy").value);
+ xhr.send(formData);
+ } else {
+ //xhr.setRequestHeader("Cache-Control", "no-cache");
+ //xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
+
+ var CRLF = "\r\n";
+ var boundary = "AJAX-----------------------" + (new Date).getTime();
+
+ var requestBody = "Content-Type: multipart/form-data; boundary="+boundary+CRLF+CRLF;
+ //requestBody += "Content-Length: "+file.size+CRLF+CRLF;
+ requestBody += "--"+boundary+CRLF;
+
+ requestBody += "Content-Disposition: form-data; name=\"dir\""+CRLF+CRLF;
+ requestBody += currentfolder+CRLF;
+ requestBody += "--"+boundary+CRLF;
+
+ requestBody += "Content-Disposition: form-data; name=\"addwatermark\""+CRLF+CRLF;
+ requestBody += wm+CRLF;
+ requestBody += "--"+boundary+CRLF;
+
+ requestBody += "Content-Disposition: form-data; name=\"maxx\""+CRLF+CRLF;
+ requestBody += $("kiu_maxx").value+CRLF;
+ requestBody += "--"+boundary+CRLF;
+
+ requestBody += "Content-Disposition: form-data; name=\"maxy\""+CRLF+CRLF;
+ requestBody += $("kiu_maxy").value+CRLF;
+ requestBody += "--"+boundary+CRLF;
+
+ requestBody += "Content-Disposition: form-data; name=\"pic\"; filename=\""+file.name+"\""+CRLF;
+ requestBody += "Content-Type: application/octet-stream"+CRLF+CRLF;
+ requestBody += evt.target.result+CRLF;
+ requestBody += "--"+boundary+"--"+CRLF;
+
+ xhr.setRequestHeader("Content-Type", "multipart/form-data; boundary=" + boundary);
+ xhr.sendAsBinary(requestBody);
+ }
+ };
+ reader.readAsBinaryString(file);
+ }
+
+
+ function submitform(responseText, nextform){
+ for(var i = nextform; i < finalsizes.length; i++){
+ if(finalsizes[i] != 0){
+ //alert("started " + i);
+ document.getElementsByName("kiu_upform"+i)[0].submit();
+ setTimeout( function(){
+ fw.getHTTP("<?php echo $basedir ?>ki_getuploadinfo.php?form="+i, gotuploadinfo, i);
+ }, 1000);
+ return;
+ }
+ }
+ var counter = 0;
+ for(var i = 0; i < finalsizes.length; i++){
+ if(finalsizes[i] == 0)counter++;
+ }
+ if(counter == finalsizes.length){
+ allfinished();
+ } else { // alle gestartet, aber es laufen noch uploads
+ setTimeout( function(){
+ fw.getHTTP("<?php echo $basedir ?>ki_getuploadinfo.php?form="+(nextform-1), gotuploadinfo, nextform-1);
+ }, 1000);
+ }
+ }
+
+ function allfinished(){
+ $("kiu_progress").style.display = "none";
+ var bar_cur = $("kiu_progress_cur");
+ var bar_tot = $("kiu_progress_tot");
+ bar_cur.nextSibling.innerHTML = "";
+ bar_tot.nextSibling.innerHTML = "";
+ bar_cur.style.width = "0%";
+ bar_tot.style.width = "0%";
+ if(!supportAjaxUploadWithProgress()){
+ finalsizes = Array();
+ var myform = document.getElementsByName("kiu_upform0");
+ var loop = 0;
+ while(myform[0]){
+ myform[0].reset();
+ loop++;
+ myform = document.getElementsByName("kiu_upform"+loop);
+ }
+ } else {
+ $('kiu_m_file_form').reset();
+ var fakefield = $('kiu_m_file').nextSibling.firstChild;
+ fakefield.innerHTML = "";
+ fw.resize(fakefield, 4, 0, 18);
+ }
+ }
+
+ function gotuploadinfo(responseText, nextform){
+ var obj = $("kiu_uploaddata");
+ var counter;
+ var currentsizes = Array();
+
+ obj.innerHTML = responseText;
+
+ for(var i = 1; i < obj.childNodes.length; i++){
+ currentsizes.push(obj.childNodes[i].value);
+ }
+
+ var bar_cur = $("kiu_progress_cur");
+ var bar_tot = $("kiu_progress_tot");
+ <?php if( in_array($browser, array("gecko", "webkit")) ){ ?>
+ var fileName = document.getElementsByName("kiu_upform"+nextform)[0].pic.files[0].name;
+ if(currentsizes[nextform] != "finished"){
+ var barsize = Math.round((currentsizes[nextform]/finalsizes[nextform])*100);
+ bar_cur.style.width = barsize + "%";
+ bar_cur.nextSibling.innerHTML = "Current '" + fileName + "'";
+ var total = 0;
+ var current = 0;
+ for(var i = 0; i < finalsizes.length; i++){
+ total += finalsizes[i];
+ if(currentsizes[i] != "finished"){
+ current += parseInt(currentsizes[i]);
+ } else {
+ current += parseInt(finalsizes[i]);
+ }
+ }
+ barsize = Math.round((current/total)*100);
+ bar_tot.style.width = barsize + "%";
+ bar_tot.nextSibling.innerHTML = "Total: " + barsize + " %";
+ } else {
+ bar_cur.style.width = "100%";
+ bar_cur.nextSibling.innerHTML = "'" + fileName + "' uploaded.";
+ }
+ <?php } else { ?>
+ var fileName = document.getElementsByName("kiu_upform"+nextform)[0].pic.value.split("\\");
+ fileName = fileName[fileName.length-1];
+ if(currentsizes[nextform] != "finished"){
+ bar_cur.style.width = "100%";
+ bar_cur.nextSibling.innerHTML = "Current '" + fileName + "' " + Math.round(currentsizes[nextform]/1024) + " KB uploaded";
+ var total = 0;
+ var current = 0;
+ for(var i = 0; i < finalsizes.length; i++){
+ total += finalsizes[i];
+ if(currentsizes[i] == "finished"){
+ current += 1;
+ }
+ }
+ var barsize = Math.round((current/total)*100);
+ bar_tot.style.width = barsize + "%";
+ bar_tot.nextSibling.innerHTML = "Total: " + barsize + " %";
+ } else {
+ bar_cur.style.width = "100%";
+ bar_cur.nextSibling.innerHTML = "'" + fileName + "' uploaded.";
+ }
+ <?php } ?>
+
+ counter = 0;
+ for(var i = 0; i < currentsizes.length; i++){
+ if(currentsizes[i] == "finished" || finalsizes[i] == 0)counter++;
+ }
+ if(counter == currentsizes.length){
+ allfinished();
+ } else {
+ for(var i = 0; i < currentsizes.length; i++){
+ if(currentsizes[i] != "finished" && finalsizes[i] != 0){
+ if(obj.firstChild.value == 1){
+ submitform("", nextform+1);
+ } else { // upload läuft, aber nächster kann noch nicht gestartet werden
+ setTimeout( function(){
+ fw.getHTTP("<?php echo $basedir ?>ki_getuploadinfo.php?form="+nextform, gotuploadinfo, nextform);
+ }, 1000);
+ }
+ return;
+ }
+ }
+ }
+
+ }
+
+
+
+ function preventDefaultAction(aEvent) {
+ <?php if($browser !== "ie6" && $browser !== "ie7") { ?>
+ aEvent.stopPropagation();
+ <?php } ?>
+ <?php if($browser === "gecko") { ?>
+ aEvent.preventDefault();
+ <?php } ?>
+ <?php if($browser === "opera") { ?>
+ aEvent.returnValue = false;
+ <?php } ?>
+ }
+
+ function taste_kiu(aEvent) {
+ aEvent = aEvent ? aEvent : window.event;
+ var keyCode = aEvent.keyCode;
+ if(keyCode == 27){
+ kiu.closeUpload();
+ preventDefaultAction(aEvent);
+ return false;
+ }
+ }
+}
+
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_js_view.php b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_js_view.php
new file mode 100644
index 00000000..e2edf708
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_js_view.php
@@ -0,0 +1,1789 @@
+<?php
+ob_start("ob_gzhandler");
+
+session_start();
+
+header("Expires: Mon, 01 Jul 2003 00:00:00 GMT"); // Past date
+header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // Consitnuously modified
+header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
+header("Pragma: no-cache"); // NO CACHE
+
+//----------------------------------------------------------------------------- functions --------------------------------------------------------------------------------
+
+function draw_image($filename, $id, $style, $params) {
+ global $browser, $basedir;
+ $idstring = "";
+ if($id != "")$idstring = "id='".$id."' ";
+ if($browser == "ie6") {
+ $imgsize = getimagesize($filename);
+ echo "<img ".$idstring."style='filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=".$basedir.$filename."); width:".$imgsize[0]."px; height:".$imgsize[1]."px; ".$style."' src='".$basedir."ki_noimage.gif' ".$params." />";
+ } else {
+ if($style != "")$style = " style='".$style."' ";
+ echo "<img ".$idstring."src='".$basedir.$filename."'".$style.$params." />";
+ }
+}
+
+function addEvent($el, $event, $function){
+ global $browser;
+ if($browser == "ie6" || $browser == "ie7"){
+ echo $el.".attachEvent('on".$event."', ".$function.");\n";
+ } else {
+ echo $el.".addEventListener('".$event."', ".$function.", false);\n";
+ }
+}
+
+function removeEvent($el, $event, $function){
+ global $browser;
+ if($browser == "ie6" || $browser == "ie7"){
+ echo $el.".detachEvent('on".$event."', ".$function.");\n";
+ } else {
+ echo $el.".removeEventListener('".$event."', ".$function.", false);\n";
+ }
+}
+
+//------------------------------------------------------------------------ end functions ----------------------------------------------------------------------------------
+
+$browser = $_SERVER['HTTP_USER_AGENT'];
+
+if(preg_match("/Opera/",$browser))
+ $browser = "opera";
+elseif(preg_match("/MSIE [9]/",$browser))
+ $browser = "ie9";
+elseif(preg_match("/MSIE [7-8]/",$browser))
+ $browser = "ie7";
+elseif(preg_match("/MSIE [1-6]/",$browser))
+ $browser = "ie6";
+elseif(preg_match("/AppleWebKit/",$browser))
+ $browser = "webkit";
+else
+ $browser = "gecko";
+
+if($browser == "ie6")
+ $posfix = "absolute";
+else
+ $posfix = "fixed";
+
+if(isset($_GET['reldir']))
+ $reldir = $_GET['reldir'];
+else
+ $reldir = "";
+
+$confdir = $reldir."ki_config/";
+$galleriesdir = $reldir."ki_galleries/";
+$basedir = $reldir."ki_base/";
+
+if(isset($_GET['gallery']))
+ $gallery = $_GET['gallery'];
+else
+ $gallery = "";
+
+// -------------- Sicherheitsabfragen!
+if(preg_match("/[\.]*\//", $gallery))exit();
+// ---------- Ende Sicherheitsabfragen!
+
+$confdir = $reldir."ki_config/";
+$galleriesdir = $reldir."ki_galleries/";
+$basedir = $reldir."ki_base/";
+
+include_once("../ki_config/ki_setup.php");
+if(is_file("../ki_config/".$gallery."_ki_setup.php"))include_once("../ki_config/".$gallery."_ki_setup.php");
+
+$pwok = 0;
+if(isset($_SESSION['pwquery'])){
+ if($_SESSION['pwquery'] === $pw)$pwok = 1;
+}
+
+header("Content-Type: application/x-javascript");
+?>
+
+// Viewing module 'kiv' --------------------------------------------------------------------
+
+function kiv_module(){
+
+ /* -------------------------------- variables ----------------------------------- */
+
+ var cur_gallery = -1;
+ var cur_pic = -1;
+ var preloading;
+ var breakpreloading = 0;
+ var cur_load = 0;
+ var windowX;
+ var windowY;
+ var oversizeX = 0;
+ var oversizeY = 0;
+ var posX;
+ var posY;
+ var previewing = 0;
+ var ss = -1;
+ var stop = 0;
+ var flipped = 2;
+
+ /* -------------------------------- getElementById function --------------------- */
+
+ function $(id){
+ return document.getElementById(id);
+ }
+
+ /* -------------------------------- constructor/descturctor --------------------- */
+
+ this.constr = function(params){
+ <?php addEvent("window", "resize", "viewdim"); ?>
+ viewdim();
+ var node;
+ if(!$("kiv_picdiv")){
+ node = document.createElement("div");
+ node.id = "kiv_picdiv";
+ node.style.position = "<?php echo $posfix ?>";
+ node.style.zIndex = 1000;
+ node.style.background = "<?php echo $bord_color ?>";
+ node.style.padding = "0px";
+ node.style.display = "none";
+ node.style.overflow = "hidden";
+ document.body.appendChild(node);
+ }
+
+ if(!$("kiv_comdiv")){
+ node = document.createElement("div");
+ node.id = "kiv_comdiv";
+ node.style.position = "<?php echo $posfix ?>";
+ node.style.zIndex = 1000;
+ node.style.background = "<?php echo $bord_color ?>";
+ node.style.padding = "10px";
+ node.style.display = "none";
+ node.style.overflow = "hidden";
+ node.style.font = "<?php echo $comm_text_size."px ".$comm_text_font ?>";
+ node.style.color = "<?php echo $comm_text_color ?>";
+ fw.dropshadow(node, 1);
+ document.body.appendChild(node);
+ }
+
+ if(!$("kiv_inshadow")){
+ node = document.createElement("div");
+ node.id = "kiv_inshadow";
+ node.style.position = "relative";
+ node.style.left = "0%";
+ node.style.top = "0%";
+ node.style.zIndex = 1000;
+ node.style.background = "none";
+ node.style.padding = "0px";
+ node.style.border = "<?php echo $bord_size ?>px solid <?php echo $bord_color ?>";
+ node.style.width = "0px";
+ node.style.height = "0px";
+ node.style.display = "none";
+ node.style.overflow = "hidden";
+ node.style.cursor = "pointer";
+ node.onclick = function(){
+ kiv.goon(1);
+ }
+ fw.dropshadow(node, 3);
+ $("kiv_picdiv").appendChild(node);
+ }
+ if(!$("kiv_closebutton")){
+ var tbcontent = "<?php draw_image("ki_nav_close.png", "", "cursor:pointer; border:0px; margin:0px 2px 0px 2px; padding-top:2px; display:inline;", "onclick=\\\"kiv.closeImage();\\\" onmouseover=\\\"this.style.padding = '0px 0px 2px 0px';\\\" onmouseout=\\\"this.style.padding = '2px 0px 0px 0px';\\\" title='".htmlentities(stripslashes($nav_kiv_close), ENT_QUOTES, "UTF-8")."'"); ?>";
+ node = document.createElement("div");
+ node.id = "kiv_closebutton";
+ node.style.position = "absolute";
+ node.style.top = "0px";
+ node.style.right = "0px";
+ node.style.background = "<?php echo $bord_color ?>";
+ node.style.zIndex = 10000;
+ node.style.padding = "1px 1px 3px 1px";
+ node.style.lineHeight = "12px";
+ fw.dropshadow(node, 1);
+ node.innerHTML = tbcontent;
+ $("kiv_inshadow").appendChild(node);
+ }
+ <?php if($show_help == 1){ ?>
+ if(!$("kiv_help")){
+ var nodeh = document.createElement("div");
+ nodeh.id = "kiv_help";
+ nodeh.style.color = "<?php echo $comm_text_color ?>";
+ nodeh.style.font = "12px Tahoma, sans-serif";
+ nodeh.style.position = "absolute";
+ <?php if($help_pos === "left"){ ?>
+ nodeh.style.left = "4px";
+ <?php } else { ?>
+ nodeh.style.right = "4px";
+ <?php } ?>
+ nodeh.style.bottom = "4px";
+ nodeh.style.lineHeight = "19px";
+ nodeh.style.textAlign = "left";
+ nodeh.style.zIndex = "10";
+ if(ss == 1)nodeh.style.display = "none";
+ var infosymbol = "<?php draw_image("ki_nav_info.png", "", "border:0px; vertical-align:bottom; display:inline;", ""); ?>";
+ var infocontent = "<?php echo htmlentities(stripslashes($help_text), ENT_QUOTES, "UTF-8") ?>";
+ infocontent = infocontent.replace("[mouse]", "<?php draw_image("ki_mouse_help.png", "", "vertical-align:middle; padding:0px 2px 0px 2px;", ""); ?>");
+ nodeh.innerHTML = infosymbol;
+ fw.addevent( nodeh, "mouseover", function(){
+ nodeh.style.width = "250px";
+ nodeh.style.padding = "4px";
+ nodeh.style.background = "<?php echo $bord_color ?>";
+ nodeh.style.border = "2px solid <?php echo $nav_border_color ?>";
+ nodeh.innerHTML = infocontent;
+ fw.fade(nodeh, 100);
+ } );
+ fw.addevent( nodeh, "mouseout", function(){
+ nodeh.style.width = "auto";
+ nodeh.style.padding = "0px";
+ nodeh.style.background = "none";
+ nodeh.style.border = "0px";
+ nodeh.innerHTML = infosymbol;
+ fw.fade(nodeh, 51);
+ } );
+ $("kiv_inshadow").appendChild(nodeh);
+ setTimeout( function(){
+ if(nodeh && ss != 1 && nodeh.style.width != "250px" && nodeh.style.display != "none")fw.fade(nodeh, 51);
+ }, 5000);
+ }
+ <?php } ?>
+ <?php if($checkgps == 1){ ?>
+ if(!$("kiv_gpspic")){
+ var tbcontent = "<?php draw_image("ki_nav_globe.png", "", "cursor:pointer; border:0px; margin:0px 2px 0px 2px; padding-top:2px; display:inline;", "onclick=\\\"kiv.opengps();\\\" onmouseover=\\\"this.style.padding = '0px 0px 2px 0px';\\\" onmouseout=\\\"this.style.padding = '2px 0px 0px 0px';\\\" title='".htmlentities(stripslashes($nav_gps_coord), ENT_QUOTES, "UTF-8")."'"); ?>";
+ node = document.createElement("div");
+ node.id = "kiv_gpspic";
+ node.style.position = "absolute";
+ node.style.top = "0px";
+ node.style.left = "0px";
+ node.style.background = "<?php echo $bord_color ?>";
+ node.style.zIndex = 10000;
+ node.style.padding = "1px 1px 3px 1px";
+ node.style.lineHeight = "12px";
+ fw.dropshadow(node, 1);
+ node.style.display = "none";
+ node.innerHTML = tbcontent;
+ $("kiv_inshadow").appendChild(node);
+ }
+ <?php } ?>
+
+
+ if(!$("kiv_loading")){
+ node = document.createElement("img");
+ node.id = "kiv_loading";
+ <?php $loadimgsize = getimagesize("ki_loading.gif"); ?>
+ node.style.margin = "0px";
+ node.style.marginLeft = "-<?php echo 0.5*$loadimgsize[0] ?>px";
+ node.style.marginTop = "-<?php echo 0.5*$loadimgsize[1] ?>px";
+ node.style.position = "<?php echo $posfix ?>";
+ node.style.top = "50%";
+ node.style.left = "50%";
+ node.style.zIndex = 10000;
+ node.src = "<?php echo $basedir."ki_loading.gif" ?>";
+ node.style.padding = "0px";
+ node.style.border = "0px";
+ node.style.display = "none";
+ document.body.appendChild(node);
+ }
+ if(!$("kiv_prevdiv")){
+ node = document.createElement("div");
+ node.id = "kiv_prevdiv";
+ node.style.position = "<?php echo $posfix ?>";
+ node.style.zIndex = 10000;
+ node.style.background = "<?php echo $bord_color ?>";
+ node.style.padding = "4px 2px 4px 2px";
+ node.style.height = "100px";
+ node.style.overflow = "hidden";
+ node.style.display = "none";
+ fw.dropshadow(node, 1);
+ document.body.appendChild(node);
+ }
+ <?php if($show_preview == 1){ ?>
+ if(!$("kiv_wowdiv")){
+ node = document.createElement("div");
+ node.id = "kiv_wowdiv";
+ node.style.position = "<?php echo $posfix ?>";
+ node.style.zIndex = 1001;
+ node.style.padding = "0px";
+ node.style.display = "none";
+ <?php if($preview_style == 1){ ?>
+ node.style.padding = "<?php echo $bord_size ?>px";
+ node.style.background = "<?php echo $bord_color ?>";
+ <?php } ?>
+ document.body.appendChild(node);
+ }
+ <?php } ?>
+ <?php $breite = getimagesize("ki_nav_next.png"); ?>
+ <?php if($pwok == 0 && $show_share == 1){ ?>
+ if(!$("kiv_share")){
+ node = document.createElement("div");
+ node.id = "kiv_share";
+ node.style.width = "280";
+ node.style.position = "<?php echo $posfix ?>";
+ node.style.top = windowY + "px";
+ node.style.left = "50%";
+ node.style.marginLeft = "-145px";
+ node.style.background = "<?php echo $nav_color ?>";
+ <?php if($nav_style == 2){ ?>
+ node.style.borderRadius = "20px";
+ node.style.MozBorderRadius = "20px";
+ node.style.WebkitBorderRadius = "20px";
+ <?php } ?>
+ node.style.border = "2px solid <?php echo $nav_border_color ?>";
+ node.style.zIndex = 1000;
+ node.style.padding = "3px 3px 30px 3px";
+ node.style.overflow = "hidden";
+ node.style.lineHeight = "12px";
+ node.style.display = "none";
+ var tbcontent = "<?php draw_image("ki_nav_link.png", "", "border:0px; margin:0px 2px 0px 0px; padding:0px; vertical-align:top; display:inline;", "title='Link'"); ?>";
+ node.innerHTML = tbcontent + "<input type='text' readonly='readonly' onclick='this.select()' style='width:<?php echo 276-$breite[0]-2 ?>px; height:17px; padding:1px; line-height:17px; margin:0px; background-color:#fff; font-size:12px; font-weight:normal; color:#000; border:1px solid #000;' />";
+ document.body.appendChild(node);
+ }
+ <?php } ?>
+ fw.shadebody(1);
+ <?php if($show_image_nav == 1){ ?>
+ if(!$("kiv_tb")){
+ var breite = <?php echo $breite[0] ?>;
+ var tbcontent = "<?php draw_image("ki_nav_close.png", "", "cursor:pointer; border:0px; margin:0px 2px 0px 2px; padding-top:2px; display:inline;", "onclick=\\\"kiv.closeImage();\\\" onmouseover=\\\"this.style.padding = '0px 0px 2px 0px';\\\" onmouseout=\\\"this.style.padding = '2px 0px 0px 0px';\\\" title='".htmlentities(stripslashes($nav_kiv_close), ENT_QUOTES, "UTF-8")."'"); ?>";
+ <?php if($viewercomments == 1){ ?>
+ breite += <?php echo ($breite[0]+4) ?>;
+ tbcontent += "<?php draw_image("ki_nav_vcomm.png", "vcommbutton", "cursor:pointer; border:0px; margin:0px 2px 0px 2px; padding-top:2px; display:inline;", "onclick=\\\"kiv.flip_vcomm();\\\" onmouseover=\\\"this.style.padding = '0px 0px 2px 0px';\\\" onmouseout=\\\"this.style.padding = '2px 0px 0px 0px';\\\" title='".htmlentities(stripslashes($nav_kiv_vcomm), ENT_QUOTES, "UTF-8")."'"); ?>";
+ <?php } ?>
+ <?php if($downloadpics == 1){ ?>
+ breite += <?php echo ($breite[0]+4) ?>;
+ tbcontent += "<?php draw_image("ki_nav_download.png", "", "cursor:pointer; border:0px; margin:0px 2px 0px 2px; padding-top:2px; display:inline;", "onclick=\\\"kiv.download();\\\" onmouseover=\\\"this.style.padding = '0px 0px 2px 0px';\\\" onmouseout=\\\"this.style.padding = '2px 0px 0px 0px';\\\" title='".htmlentities(stripslashes($nav_kiv_download), ENT_QUOTES, "UTF-8")."'"); ?>";
+ <?php } ?>
+ if(kib.pics[params[0]].length > 1){
+ <?php
+ if($slideshow == 1){
+ echo "breite += ".($breite[0]+4).";";
+ ?>
+ tbcontent += "<?php draw_image("ki_nav_play.png", "ssbutton", "cursor:pointer; border:0px; margin:0px 2px 0px 2px; padding-top:2px; display:inline;", "onclick=\\\"kiv.slideshow();\\\" onmouseover=\\\"this.style.padding = '0px 0px 2px 0px';\\\" onmouseout=\\\"this.style.padding = '2px 0px 0px 0px';\\\" title='".htmlentities(stripslashes($slideshow_start), ENT_QUOTES, "UTF-8")."'"); ?>";
+ <?php
+ }
+ echo "breite += ".(2*($breite[0]+4)).";";
+ ?>
+ tbcontent += "<?php draw_image("ki_nav_prev.png", "", "cursor:pointer; border:0px; margin:0px 2px 0px 2px; padding-top:2px; display:inline;", "onclick=\\\"kiv.goon(-1);\\\" onmouseover=\\\"this.style.padding = '0px 0px 2px 0px';\\\" onmouseout=\\\"this.style.padding = '2px 0px 0px 0px';\\\" title='".htmlentities(stripslashes($nav_kiv_back), ENT_QUOTES, "UTF-8")."'"); ?>";
+ tbcontent += "<?php draw_image("ki_nav_next.png", "", "cursor:pointer; border:0px; margin:0px 2px 0px 2px; padding-top:2px; display:inline;", "onclick=\\\"kiv.goon(1);\\\" onmouseover=\\\"this.style.padding = '0px 0px 2px 0px';\\\" onmouseout=\\\"this.style.padding = '2px 0px 0px 0px';\\\" title='".htmlentities(stripslashes($nav_kiv_next), ENT_QUOTES, "UTF-8")."'"); ?>";
+ }
+ node = document.createElement("div");
+ node.id = "kiv_tb";
+ node.style.position = "<?php echo $posfix ?>";
+ node.style.top = "-<?php echo 2*$breite[0] ?>px";
+ node.style.left = "50%";
+ node.style.marginLeft = -(breite+10)/2+"px";
+ node.style.background = "<?php echo $nav_color ?>";
+ <?php if($nav_style == 2){ ?>
+ node.style.borderRadius = "20px";
+ node.style.MozBorderRadius = "20px";
+ node.style.WebkitBorderRadius = "20px";
+ <?php } ?>
+ node.style.border = "2px solid <?php echo $nav_border_color ?>";
+ node.style.zIndex = 10000;
+ node.style.padding = "20px 3px 3px 3px";
+ node.style.lineHeight = "12px";
+ node.style.display = "none";
+ node.innerHTML = tbcontent;
+ document.body.appendChild(node);
+ }
+ <?php } ?>
+ <?php
+ if(!in_array($browser, array("ie6", "ie7", "ie9", "webkit"))){
+ if($pwok == 0)addEvent("document", "keypress", "taste");
+ } else {
+ if($pwok == 0)addEvent("document", "keydown", "taste");
+ }
+ ?>
+ <?php if($pwok == 1 && $comm_auto == 1 && $show_warnings == 1){ ?>
+ alert("WARNING: If you want to write custom comments you have to set '$comm_auto = 0'. Custom comments won't get saved. Set '$show_warnings = 0' if you don't want to see this warning again.");
+ <?php } ?>
+ kiv.getImage(params[0], params[1]);
+ }
+
+ this.destr = function(){
+ document.body.removeChild($("kiv_picdiv"));
+ document.body.removeChild($("kiv_comdiv"));
+ <?php if($show_image_nav == 1){ ?>
+ document.body.removeChild($("kiv_tb"));
+ <?php } ?>
+ document.body.removeChild($("kiv_loading"));
+ document.body.removeChild($("kiv_prevdiv"));
+ <?php if($show_preview == 1){ ?>document.body.removeChild($("kiv_wowdiv"));<?php } ?>
+ <?php if($pwok == 0 && $show_share == 1){ ?>document.body.removeChild($("kiv_share"));<?php } ?>
+ <?php removeEvent("window", "resize", "viewdim"); ?>
+ <?php
+ if(!in_array($browser, array("ie6", "ie7", "ie9", "webkit"))){
+ if($pwok == 0)removeEvent("document", "keypress", "taste");
+ } else {
+ if($pwok == 0)removeEvent("document", "keydown", "taste");
+ }
+ ?>
+ }
+
+ /* -------------------------------- methodes ------------------------------------ */
+
+ <?php if($pwok == 1){ ?>
+ this.deleteVComm = function(counter){
+ fw.getHTTP("<?php echo $basedir ?>ki_vcomm.php?file=" + encodeURIComponent(kib.pics[cur_gallery][cur_pic].file) + "&gallery=" + kib.dirs[cur_gallery] + "&counter=" + counter + "&get=1", kiv.getvcomm, null);
+ }
+
+ this.publishVComm = function(counter){
+ fw.getHTTP("<?php echo $basedir ?>ki_vcomm.php?file=" + encodeURIComponent(kib.pics[cur_gallery][cur_pic].file) + "&gallery=" + kib.dirs[cur_gallery] + "&publish=" + counter + "&get=1", kiv.getvcomm, null);
+ }
+
+ this.savecomment = function(aEvent, commstring){
+ aEvent = aEvent ? aEvent : window.event;
+ var keyCode = aEvent.keyCode;
+ if(keyCode == 27){
+ kiv.closeImage();
+ preventDefaultAction(aEvent);
+ return false;
+ }
+ if(keyCode == 33 && !aEvent.shiftKey){
+ kiv.goon(-1);
+ preventDefaultAction(aEvent);
+ return false;
+ }
+ if(keyCode == 34 && !aEvent.shiftKey){
+ kiv.goon(1);
+ preventDefaultAction(aEvent);
+ return false;
+ }
+ if((aEvent.ctrlKey == true && keyCode == 13) || keyCode == 10){
+ fw.getHTTP("<?php echo $basedir ?>ki_savecomment.php?file=" + encodeURIComponent(kib.pics[cur_gallery][cur_pic].file) + "&gallery=" + kib.dirs[cur_gallery] + "&comment=" + encodeURIComponent(commstring), saved, null);
+ preventDefaultAction(aEvent);
+ return false;
+ }
+ }
+
+ function saved(){
+ stop = 0;
+ kiv.goon(1);
+ }
+
+ function squarethumbhandling(){
+ if($("square_selector")){
+ var sths = 0;
+ var startx = 0;
+ var starty = 0;
+ var obj = $("square_selector");
+ obj.style.display = "block";
+ var sub = fw.findPos(obj);
+ var objx = parseInt(obj.style.width);
+ var objy = parseInt(obj.style.height);
+ if(objx == objy)return;
+ var wide = objx > objy ? 1 : 0;
+ var square_1 = $("square_1").style;
+ var square_2 = $("square_2").style;
+ var posx = parseInt(square_1.width);
+ var posy = parseInt(square_1.height);
+ fw.addevent( obj, "mousedown", function(x, y){
+ if(sths == 0){
+ sths = 1;
+ startx = x - sub[0];
+ starty = y - sub[1];
+ }
+ } );
+ fw.addevent( obj, "mousemove", function(x, y){
+ if(sths == 1){
+ var movx = (x - sub[0]) - startx;
+ var movy = (y - sub[1]) - starty;
+ if(wide == 1){
+ var temp = posx + movx;
+ if(temp < 0)temp = 0;
+ if(temp > (objx - 100))temp = objx - 100;
+ square_1.width = temp + "px";
+ square_2.width = objx - (temp + 100) + "px";
+ } else {
+ var temp = posy + movy;
+ if(temp < 0)temp = 0;
+ if(temp > (objy - 100))temp = objy - 100;
+ square_1.height = temp + "px";
+ square_2.height = objy - (temp + 100) + "px";
+ }
+ }
+ } );
+ fw.addevent( obj, "mouseup", function(x, y){
+ if(sths == 1){
+ var final = -1;
+ if(wide == 1){
+ var final = posx + (x - sub[0]) - startx;
+ if(final < 0)final = 0;
+ if(final > (objx - 100))final = objx - 100;
+ final = final / objx;
+ } else {
+ var final = posy + (y - sub[1]) - starty;
+ if(final < 0)final = 0;
+ if(final > (objy - 100))final = objy - 100;
+ final = final / objy;
+ }
+ var params = "?file=" + kib.dirs[cur_gallery] + "/" + encodeURIComponent(kib.pics[cur_gallery][cur_pic].file) + "&pos=" + final;
+ fw.getHTTP("<?php echo $basedir ?>ki_savesquarethumb.php" + params, null);
+ var long = new Date();
+ long.setTime(long.getTime() + (10 * 365 * 24 * 60 * 60 * 1000));
+ document.cookie = "koschtit_" + kib.dirs[cur_gallery] + cur_gallery + "_" + kib.pics[cur_gallery][cur_pic].file + "=" + final + "; path=/; expires=" + long.toGMTString();
+ obj.style.background = "#00ff00";
+ setTimeout( function(){
+ obj.style.background = "#000000";
+ }, 400);
+ }
+ sths = 0;
+ } );
+ var custompos = -1;
+ var nameEQ = "koschtit_" + kib.dirs[cur_gallery] + cur_gallery + "_" + kib.pics[cur_gallery][cur_pic].file + "=";
+ var ca = document.cookie.split(';');
+ for(var i = 0; i < ca.length; i++) {
+ var c = ca[i];
+ while (c.charAt(0)==' ')c = c.substring(1,c.length);
+ if(c.indexOf(nameEQ) == 0)custompos = c.substring(nameEQ.length,c.length);
+ }
+ if(custompos != -1){
+ if(wide == 1){
+ var temp = Math.round(custompos*objx);
+ square_1.width = temp + "px";
+ square_2.width = objx - (temp + 100) + "px";
+ } else {
+ var temp = Math.round(custompos*objy);
+ square_1.height = temp + "px";
+ square_2.height = objy - (temp + 100) + "px";
+ }
+ }
+ }
+ }
+ <?php } ?>
+
+ function viewdim(){
+ if(window.innerHeight){
+ windowX = window.innerWidth;
+ windowY = window.innerHeight;
+ } else if(document.documentElement && document.documentElement.clientHeight){ // Explorer 6 Strict Mode
+ windowX = document.documentElement.clientWidth;
+ windowY = document.documentElement.clientHeight;
+ } else if (document.body){ // other Explorers
+ windowX = document.body.clientWidth;
+ windowY = document.body.clientHeight;
+ }
+ if($("kiv_share"))$("kiv_share").style.top = windowY + "px";
+ if($("kiv_comdiv")){
+ var com_div = $("kiv_comdiv");
+ var sizes = fw.getDim($("kiv_picdiv"), 1);
+ var comm_x = com_div.offsetWidth;
+ var comm_y = com_div.offsetHeight;
+ if(comm_x > sizes[0]){
+ comm_x = sizes[0];
+ com_div.style.width = (sizes[0] - 2*10) + "px";
+ comm_y = com_div.offsetHeight;
+ }
+ <?php
+ if($comm_text_align === "left"){
+ ?>
+ var x_pos = $("kiv_picdiv").offsetLeft;
+ var y_pos = $("kiv_picdiv").offsetHeight + $("kiv_picdiv").offsetTop + 5;
+ if(y_pos + comm_y > windowY){
+ y_pos -= comm_y + 10;
+ <?php if($pwok == 0){ ?>if(comm_x != sizes[0])x_pos += 5;<?php } ?>
+ }
+ <?php
+ }elseif($comm_text_align === "right"){
+ ?>
+ var x_pos = $("kiv_picdiv").offsetLeft + sizes[0] - comm_x;
+ var y_pos = $("kiv_picdiv").offsetHeight + $("kiv_picdiv").offsetTop + 5;
+ if(y_pos + comm_y > windowY){
+ y_pos -= comm_y + 10;
+ <?php if($pwok == 0){ ?>if(comm_x != sizes[0])x_pos -= 5;<?php } ?>
+ }
+ <?php
+ }else{
+ ?>
+ var x_pos = $("kiv_picdiv").offsetLeft + 0.5*(sizes[0] - comm_x);
+ var y_pos = $("kiv_picdiv").offsetHeight + $("kiv_picdiv").offsetTop + 5;
+ if(y_pos + comm_y > windowY){
+ y_pos -= comm_y + 10;
+ }
+ <?php
+ }
+ ?>
+ com_div.style.left = x_pos + "px";
+ com_div.style.top = y_pos + "px";
+ }
+ }
+
+ function preloadgallery(){
+ if(breakpreloading == 1)return;
+ var files = kib.pics[cur_gallery].length;
+ cur_load = cur_pic + 1;
+ if(cur_load == files)return;
+ var loaded = 0;
+ while(preloading[cur_load] != null){
+ cur_load++;
+ loaded++;
+ if(loaded == files){
+ return;
+ }
+ if(cur_load == files || cur_load - cur_pic > 3)return;
+ }
+ preloading[cur_load] = document.createElement('img');
+ preloading[cur_load].onload = function(){
+ preloadgallery();
+ };
+ var picsize = calcpicsize(cur_load);
+ if(picsize[0] != kib.pics[cur_gallery][cur_load].x){
+ preloading[cur_load].src = "<?php echo $basedir ?>ki_makepic.php?fullimg=1&file=" + kib.dirs[cur_gallery] + "/" + encodeURIComponent(kib.pics[cur_gallery][cur_load].file) + "&width=" + picsize[0] + "&height=" + picsize[1];
+ } else {
+ preloading[cur_load].src = "<?php echo $galleriesdir ?>" + kib.dirs[cur_gallery] + "/" + kib.pics[cur_gallery][cur_load].file;
+ }
+ }
+
+ this.getImage = function(gallerynumber, picnumber){
+ if(stop == 1)return;
+ var firsttoshow = 0;
+ if(cur_gallery == -1){
+ firsttoshow = 1;
+ preloading = new Array(kib.pics[gallerynumber].length);
+ }
+ if($("kib_helpbox")){
+ kib.hidehelp();
+ }
+ <?php removeEvent("document", "mousemove", "mousemoved"); ?>
+ if($("kiv_vcomments_form")){
+ $("kiv_picdiv").removeChild($("kiv_vcomments_form"));
+ if($("kiv_vcomments_list"))$("kiv_picdiv").removeChild($("kiv_vcomments_list"));
+ }
+ <?php if($show_preview == 1){ ?>kiv.removewow();<?php } ?>
+ <?php if($checkgps == 1){ ?>fw.fade("kiv_gpspic", 0);<?php } ?>
+ if(gallerynumber == -1)gallerynumber = cur_gallery;
+ breakpreloading = 1;
+ preloading[cur_load] = null;
+ cur_gallery = gallerynumber;
+ cur_pic = picnumber;
+ var picsize = calcpicsize(picnumber);
+ <?php if($oversize_allowed == 1){ ?>
+ oversizeX = posX = 0;
+ oversizeY = posY = 0;
+ if(picsize[0]+2*<?php echo $bord_size ?> > windowX)oversizeX = Math.round((picsize[0] - windowX)*0.5) + <?php echo $bord_size ?>;
+ if(picsize[1]+2*<?php echo $bord_size ?> > windowY)oversizeY = Math.round((picsize[1] - windowY)*0.5) + <?php echo $bord_size ?>;
+ <?php } ?>
+ var params = "?reldir=<?php echo $reldir ?>&gallery=" + kib.dirs[cur_gallery] + "&file=" + encodeURIComponent(kib.pics[cur_gallery][cur_pic].file) + "&x=" + picsize[0] + "&y=" + picsize[1];
+ fw.getHTTP("<?php echo $basedir ?>ki_fullimg.php" + params, kiv.gotImage, Array(picsize, firsttoshow, 0));
+ }
+
+ this.gotImage = function(responseText, params){
+ if(stop == 1)return;
+ var picdiv = $("kiv_picdiv");
+ var inshad = $("kiv_inshadow");
+ var picdivsize = params[0];
+ var firsttoshow = params[1];
+ if(params[2] == 0){ // Bild wird geladen
+ picdivsize[0] += <?php echo 2*$bord_size ?>;
+ picdivsize[1] += <?php echo 2*$bord_size ?>;
+
+ if(firsttoshow == 1){ // Einfgen/Warten von onload beim ersten ffnen
+
+ picdiv.style.top = "50%";
+ picdiv.style.left = "50%";
+ picdiv.style.width = "0px";
+ picdiv.style.height = "1px";
+ picdiv.style.display = "block";
+
+ var node = document.createElement("div");
+ node.innerHTML = responseText;
+ var temp = node.childNodes.length;
+ for(var i = 0; i < temp; i++){
+ picdiv.appendChild(node.childNodes[0]);
+ }
+
+ var thepic = $("thepicture");
+ thepic.onload = function(){
+ if(kiv != null && thepic == $("thepicture"))kiv.gotImage("", Array(picdivsize, firsttoshow, 1));
+ };
+ thepic.src = thepic.alt;
+ setTimeout( function(){ if(kiv != null && thepic != null){if(thepic.alt != "" && !thepic.complete){fw.fade("kiv_loading", 100, Array(function(){$("kiv_loading").src = "<?php echo $basedir."ki_loading.gif" ?>";}));$("kiv_picdiv").style.zIndex = 99;}} }, 750);
+
+ } else { // Einfgen/Warten von onload beim Weiterklicken
+
+ <?php if($pwok == 1){ ?>
+ if($("square_selector"))picdiv.removeChild($("square_selector"));
+ <?php } ?>
+ <?php if($checkgps == 1){ ?>
+ if($("kiv_gps"))picdiv.removeChild($("kiv_gps"));
+ <?php } ?>
+ <?php if($viewercomments == 1){ ?>
+ if($("kiv_vcomm"))picdiv.removeChild($("kiv_vcomm"));
+ <?php } ?>
+ if($("thepicture"))$("thepicture").id = "oldpic";
+
+ fw.fade("kiv_comdiv", 0);
+
+ var node = document.createElement("div");
+ node.innerHTML = responseText;
+ var temp = node.childNodes.length;
+ for(var i = 0; i < temp; i++){
+ picdiv.appendChild(node.childNodes[0]);
+ }
+ var thepic = $("thepicture");
+ thepic.onload = function(){
+ if(kiv != null && thepic == $("thepicture"))kiv.gotImage("", Array(picdivsize, firsttoshow, 1));
+ };
+ thepic.src = thepic.alt;
+ setTimeout( function(){ if(kiv != null && thepic != null){if(thepic.alt != "" && !thepic.complete){fw.fade("kiv_loading", 100, Array(function(){$("kiv_loading").src = "<?php echo $basedir."ki_loading.gif" ?>";}));$("kiv_picdiv").style.zIndex = 99;}} }, 750);
+
+
+ }
+
+ } else { // Bild wurde geladen -> Bild anzeigen
+
+ $("kiv_loading").style.display = "none";
+ if(previewing == 0){
+ $("kiv_picdiv").style.zIndex = 1000;
+ $("kiv_comdiv").style.zIndex = 1000;
+ }
+ preloading[cur_pic] = 1;
+ breakpreloading = 0;
+ preloadgallery();
+
+ <?php if($pwok == 0 && $show_share == 1){ ?>
+ var shareadd = location.search;
+ if(shareadd.indexOf('kit_code=') != -1)
+ shareadd = shareadd.substr(0, shareadd.indexOf('kit_code=')-1);
+ if(shareadd.indexOf('?') == -1)
+ shareadd = "?" + shareadd;
+ else
+ shareadd += "&";
+ var slash = "";
+ if(location.pathname.substr(0, 1) != "/")slash = "/";
+ shareadd = "http://" + location.hostname + slash + location.pathname + shareadd + "kit_code=" + cur_gallery+"_"+cur_pic + location.hash;
+ $("kiv_share").childNodes[1].value = shareadd;
+ <?php } ?>
+
+ var thepic = $("thepicture");
+ if(thepic != null){
+ thepic.alt = "";
+ thepic.style.display = "none";
+ thepic.style.visibility = "visible";
+ }
+ flipped = 0;
+
+ if(firsttoshow == 1){ // Bild wurde geladen -> Bild anzeigen beim ersten ffnen
+
+ fw.resize( picdiv, 2, picdivsize[0], 1, Array( function(){
+
+ fw.resize( picdiv, 2, picdivsize[0], picdivsize[1], Array( function(){
+ inshad.style.width = picdivsize[0] - 2*<?php echo $bord_size ?> + "px";
+ inshad.style.height = picdivsize[1] - 2*<?php echo $bord_size ?> + "px";
+ inshad.style.display = "block";
+ fw.dropshadow(picdiv, 1);
+ fw.fade("thepicture", 100, Array( function(){
+
+ <?php if($show_image_nav == 1){ ?>
+ fw.move("kiv_tb", 3, 0, -<?php echo $breite[0] ?>);
+ $("kiv_tb").setAttribute("contr", "stay");
+ setTimeout( function() {
+ if($("kiv_tb"))$("kiv_tb").setAttribute("contr", "");
+ }, 5000);
+ <?php } ?>
+ <?php if($pwok == 0 && $show_share == 1){ ?>
+ fw.move("kiv_share", 3, 0, windowY - 29);
+ $("kiv_share").setAttribute("contr", "stay");
+ setTimeout( function() {
+ if($("kiv_share"))$("kiv_share").setAttribute("contr", "");
+ }, 5000);
+ <?php } ?>
+ viewdim();
+ showcomment();
+ checkgps();
+ checkvcomment();
+ var focme = $("focusme");
+ if(focme){
+ kib.showhelp(focme, 4, 2);
+ }
+ <?php addEvent("document", "mousemove", "mousemoved"); ?>
+ <?php if($pwok == 1){ ?>
+ squarethumbhandling();
+ <?php } ?>
+ if(ss == 1)setTimeout( function(){if(kiv != null){if(ss == 1){ss = 2;kiv.goon(1);}}} , <?php echo $slideshow_time ?>);
+
+ } ));
+ } ));
+ } ));
+
+ } else { // Bild wurde geladen -> Bild anzeigen beim Weiterklicken
+
+ fw.fade("oldpic", 0, Array( function(){
+ var picdiv = $("kiv_picdiv");
+ for(var i = 0; i < picdiv.childNodes.length; i++){
+ if(picdiv.childNodes[i].id == "oldpic"){
+ picdiv.removeChild(picdiv.childNodes[i]);
+ i-=1;
+ }
+ }
+ } ));
+ fw.fade("thepicture", 100, Array( function(){
+ inshad.style.display = "block";
+ fw.resize( inshad, 1, picdivsize[0] - 2*<?php echo $bord_size ?>, picdivsize[1] - 2*<?php echo $bord_size ?> );
+ fw.resize( picdiv, 2, picdivsize[0], picdivsize[1], Array( function(){
+ showcomment();
+ checkgps();
+ checkvcomment();
+ if(previewing == 0){
+ <?php addEvent("document", "mousemove", "mousemoved"); ?>
+ }
+ <?php if($pwok == 1){ ?>
+ squarethumbhandling();
+ <?php } ?>
+ <?php if($show_help == 1){ ?>if(ss != 1)fw.fade("kiv_help", 51);<?php } ?>
+ if(ss == 1)setTimeout( function(){if(kiv != null){if(ss == 1){ss = 2;kiv.goon(1);}}} , <?php echo $slideshow_time ?>);
+ } ));
+ } ));
+ }
+ }
+ }
+
+ function checkgps(){
+ <?php if($checkgps == 1){ ?>
+ if(stop == 1 || ss == 1)return;
+ if(!$("kiv_gps"))return;
+ var coordinates = $("kiv_gps").value;
+ if(coordinates != "0,0"){
+ fw.fade("kiv_gpspic", 100);
+ } else {
+ <?php if($cellinfo == 1){ ?>
+ var params = "?gallery=" + kib.dirs[cur_gallery] + "&file=" + encodeURIComponent(kib.pics[cur_gallery][cur_pic].file);
+ fw.getHTTP("<?php echo $basedir ?>ki_cellid.php" + params, gotCellInfo, Array(cur_gallery, cur_pic));
+ <?php } ?>
+ }
+ <?php } ?>
+ }
+
+ <?php if($cellinfo == 1 && $checkgps == 1){ ?>
+ function gotCellInfo(responseText, params){
+ if(stop == 1 || ss == 1)return;
+ if(cur_gallery != params[0] || cur_pic != params[1])return;
+ if(responseText == "0,0")return;
+ $("kiv_gps").value = responseText;
+ fw.fade("kiv_gpspic", 100);
+ }
+ <?php } ?>
+
+ <?php if($checkgps == 1){ ?>
+ this.opengps = function(){
+ if($("kiv_gps")){
+ if($("kiv_gps").value != "0,0"){
+ var coordinates = $("kiv_gps").value;
+ var filename = kib.pics[cur_gallery][cur_pic].file;
+ filename = filename.substr(0, filename.length-4);
+ window.open("http://maps.google.com/?q=" + filename + "@" + coordinates);
+ }
+ }
+ }
+ <?php } ?>
+
+ function checkvcomment(){
+ <?php if($viewercomments == 1 && $show_image_nav == 1){ ?>
+ if(stop == 1 || ss == 1)return;
+ if(!$("vcommbutton"))return;
+ if(!$("kiv_vcomm"))return;
+ var obj = $("vcommbutton");
+ if($("kiv_vcomm").value == "1"){
+ var tb = obj.parentNode;
+ tb.setAttribute("contr", "stay");
+ fw.move(tb, 3, 0, -<?php echo $breite[0] ?>, Array(function(){
+ <?php if($browser !== "ie6"){ ?>
+ fw.fade(obj, 10, Array(fw.fade, obj, 100, Array(fw.fade, obj, 10, Array(fw.fade, obj, 100, Array(fw.fade, obj, 10, Array(fw.fade, obj, 100, Array(function(){
+ if(tb){
+ tb.setAttribute("contr", "");
+ }
+ })))))));
+ <?php } else { ?>
+ setTimeout( function(){
+ if(tb){
+ tb.setAttribute("contr", "");
+ }
+ }, 2000);
+ <?php } ?>
+ }));
+ }
+ <?php } ?>
+ }
+
+ <?php if($show_preview == 1){ ?>
+ this.removewow = function(){
+ var wowdiv = $("kiv_wowdiv");
+ wowdiv.innerHTML = "";
+ wowdiv.style.display = "none";
+ fw.dropshadow(wowdiv, 0);
+ <?php if($preview_style == 2){ ?>
+ var blende = $("fw_blend");
+ blende.style.cursor = "auto";
+ blende.onclick = null;
+ <?php } ?>
+ }
+ <?php } ?>
+
+ function mousemoved(aEvent) {
+ if(stop == 1)return;
+ aEvent = aEvent ? aEvent : window.event;
+ var x = aEvent.clientX ? aEvent.clientX : aEvent.pageX;
+ var y = aEvent.clientY ? aEvent.clientY : aEvent.pageY;
+
+ <?php if($show_image_nav == 1 && $image_nav_always == 0){ ?>
+ var tb = $("kiv_tb");
+ if(y > windowY * 0.33 || x > (windowX/2+200) || x < (windowX/2-200)){
+ if(tb.getAttribute("contr") == ""){
+ fw.move(tb, 3, 0, -<?php echo $breite[0]*3 ?>);
+ tb.setAttribute("contr", "open");
+ }
+ } else {
+ if(tb.getAttribute("contr") == "open"){
+ fw.move(tb, 3, 20, -<?php echo $breite[0] ?>);
+ tb.setAttribute("contr", "");
+ }
+ }
+ <?php } ?>
+
+ <?php if($pwok == 0 && $show_share == 1 && $image_nav_always == 0){ ?>
+ var sh = $("kiv_share");
+ if(y < windowY - 150 || x > (windowX/2+300) || x < (windowX/2-300)){
+ if(sh.getAttribute("contr") == ""){
+ <?php if(in_array($browser, array("ie6", "ie7", "ie9"))){ ?>
+ if(aEvent.srcElement.nodeName == "INPUT")return;
+ <?php } ?>
+ fw.move(sh, 3, 0, windowY);
+ sh.setAttribute("contr", "open");
+ }
+ } else {
+ if(sh.getAttribute("contr") == "open"){
+ fw.move(sh, 3, 20, windowY - 29);
+ sh.setAttribute("contr", "");
+ }
+ }
+ <?php } ?>
+
+ if(!x)x = 1;
+ if(ss == 1)return;
+
+ var dim = fw.getDim($("kiv_picdiv"));
+ var wowdiv = $("kiv_wowdiv");
+
+ <?php
+ if($show_preview == 1){
+ if($preview_style == 1){
+ ?>
+ if(windowX - dim[0] >= 0.33*windowX){ // Bild bedeckt max 2/3 des Bildschirmplatzes
+ if(x > (windowX + dim[0])*0.5 && cur_pic != kib.pics[cur_gallery].length-1){
+ if(y > (windowY-dim[1])*0.5 && y < (windowY+dim[1])*0.5){
+ if(!wowdiv.firstChild){
+ var picsize = calcpicsize(cur_pic+1);
+ var picsrc = "";
+ if(picsize[0] != kib.pics[cur_gallery][cur_pic+1].x){
+ picsrc = "<?php echo $basedir ?>ki_makepic.php?fullimg=1&file=" + kib.dirs[cur_gallery] + "/" + encodeURIComponent(kib.pics[cur_gallery][cur_pic+1].file) + "&width=" + picsize[0] + "&height=" + picsize[1];
+ } else {
+ picsrc = "<?php echo $galleriesdir ?>" + kib.dirs[cur_gallery] + "/" + kib.pics[cur_gallery][cur_pic+1].file;
+ }
+ wowdiv.style.zIndex = 10000;
+ wowdiv.innerHTML = "<img src='"+picsrc+"' style='vertical-align:middle; visibility:hidden; cursor:pointer;' onload=\"this.style.visibility='visible'\" onclick='kiv.goon(1);' /><div id='kiv_wowdiv_inshadow' style='position:absolute; left:0%; top:0%; background:none; padding:0px; border:<?php echo $bord_size ?>px solid <?php echo $bord_color ?>; cursor:pointer;' onclick='kiv.goon(1);'></div>";
+ wowdiv.style.left = (windowX + dim[0])*0.5 - 30 + "px";
+ fw.dropshadow("kiv_wowdiv_inshadow", 3);
+ fw.dropshadow(wowdiv, 1);
+ fw.fade(wowdiv, 100);
+ }
+ var obj = kib.pics[cur_gallery][cur_pic+1];
+ var breite = x - (windowX + dim[0])*0.5 + 50;
+ var hoehe = (obj.y/obj.x)*breite;
+ var maxh = dim[1]*0.66;
+ if(hoehe > maxh){
+ hoehe = maxh;
+ breite = (obj.x/obj.y)*hoehe;
+ }
+ var pic = wowdiv.firstChild;
+ pic.style.width = breite + "px";
+ pic.style.height = hoehe + "px";
+ wowdiv.style.top = y + "px";
+ wowdiv.style.marginTop = -0.5*(hoehe+<?php echo $bord_size ?>*2) + "px";
+ var inshad = $("kiv_wowdiv_inshadow");
+ inshad.style.width = breite + "px";
+ inshad.style.height = hoehe + "px";
+ }
+ } else if(x < (windowX - dim[0])*0.5 && cur_pic != 0){
+ if(y > (windowY-dim[1])*0.5 && y < (windowY+dim[1])*0.5){
+ if(!wowdiv.firstChild){
+ var picsize = calcpicsize(cur_pic-1);
+ var picsrc = "";
+ if(picsize[0] != kib.pics[cur_gallery][cur_pic-1].x){
+ picsrc = "<?php echo $basedir ?>ki_makepic.php?fullimg=1&file=" + kib.dirs[cur_gallery] + "/" + encodeURIComponent(kib.pics[cur_gallery][cur_pic-1].file) + "&width=" + picsize[0] + "&height=" + picsize[1];
+ } else {
+ picsrc = "<?php echo $galleriesdir ?>" + kib.dirs[cur_gallery] + "/" + kib.pics[cur_gallery][cur_pic-1].file;
+ }
+ wowdiv.style.zIndex = 999;
+ wowdiv.innerHTML = "<img src='"+picsrc+"' style='vertical-align:middle; visibility:hidden; cursor:pointer;' onload=\"this.style.visibility='visible'\" onclick='kiv.goon(-1);' /><div id='kiv_wowdiv_inshadow' style='position:absolute; left:0%; top:0%; background:none; padding:0px; border:<?php echo $bord_size ?>px solid <?php echo $bord_color ?>; cursor:pointer;' onclick='kiv.goon(-1);'></div>";
+ fw.dropshadow("kiv_wowdiv_inshadow", 3);
+ fw.dropshadow(wowdiv, 1);
+ fw.fade(wowdiv, 100);
+ }
+ var obj = kib.pics[cur_gallery][cur_pic-1];
+ var breite = (windowX - dim[0])*0.5 - x + 50;
+ var hoehe = (obj.y/obj.x)*breite;
+ var maxh = dim[1]*0.66;
+ if(hoehe > maxh){
+ hoehe = maxh;
+ breite = (obj.x/obj.y)*hoehe;
+ }
+ var pic = wowdiv.firstChild;
+ pic.style.width = breite + "px";
+ pic.style.height = hoehe + "px";
+ wowdiv.style.left = (windowX - dim[0])*0.5 + 30 - breite - <?php echo $bord_size ?>*2 + "px";
+ wowdiv.style.top = y + "px";
+ wowdiv.style.marginTop = -0.5*(hoehe+<?php echo $bord_size ?>*2) + "px";
+ var inshad = $("kiv_wowdiv_inshadow");
+ inshad.style.width = breite + "px";
+ inshad.style.height = hoehe + "px";
+ }
+ } else {
+ if(wowdiv.firstChild){
+ kiv.removewow();
+ }
+ }
+ }
+ <?php
+ } else {
+ $temp = getimagesize("ki_next.png");
+ ?>
+ if(windowX - dim[0] >= 80){ // Mindestens 40 Pixel Platz zu jeder Seite
+ if(x > (windowX + dim[0])*0.5 && cur_pic != kib.pics[cur_gallery].length-1){
+ if(y > (windowY-dim[1])*0.5 && y < (windowY+dim[1])*0.5){
+ if(!wowdiv.firstChild){
+ wowdiv.innerHTML = "<?php draw_image("ki_next.png", "", "cursor:pointer; vertical-align:middle;", "onclick='kiv.goon(1);' alt='' "); ?>";
+ wowdiv.style.left = (windowX + dim[0])*0.5 + 5 + "px";
+ wowdiv.style.top = "50%";
+ wowdiv.style.marginTop = -0.5*(<?php echo $temp[1] ?>) + "px";
+ fw.fade(wowdiv, 100);
+ var blende = $("fw_blend");
+ blende.style.cursor = "pointer";
+ blende.onclick = function(){
+ kiv.goon(1);
+ }
+ }
+ }
+ } else if(x < (windowX - dim[0])*0.5 && cur_pic != 0){
+ if(y > (windowY-dim[1])*0.5 && y < (windowY+dim[1])*0.5){
+ if(!wowdiv.firstChild){
+ wowdiv.innerHTML = "<?php draw_image("ki_back.png", "", "cursor:pointer; vertical-align:middle;", "onclick='kiv.goon(-1);' alt='' "); ?>";
+ wowdiv.style.left = (windowX - dim[0])*0.5 - 5 - <?php echo $temp[0] ?> + "px";
+ wowdiv.style.top = "50%";
+ wowdiv.style.marginTop = -0.5*(<?php echo $temp[1] ?>) + "px";
+ fw.fade(wowdiv, 100);
+ var blende = $("fw_blend");
+ blende.style.cursor = "pointer";
+ blende.onclick = function(){
+ kiv.goon(-1);
+ }
+ }
+ }
+
+ } else {
+ if(wowdiv.firstChild){
+ kiv.removewow();
+ }
+ }
+ }
+ <?php
+ }
+ }
+ ?>
+
+ <?php if($preview_pics > 0){ ?>
+ if(windowX - dim[0] < 200)return; // Mindestens 100 Pixel Platz zu jeder Seite
+ if(x > windowX - 40 && cur_pic != kib.pics[cur_gallery].length-1){
+ <?php if($show_preview == 1){ ?>
+ if(wowdiv.firstChild){
+ fw.dropshadow(wowdiv, 0);
+ fw.fade(wowdiv, 0, Array( function(){
+ wowdiv.innerHTML = "";
+ } ));
+ }
+ <?php } ?>
+ <?php removeEvent("document", "mousemove", "mousemoved"); ?>
+ previewing = 1;
+ var prevdiv = $("kiv_prevdiv");
+ prevdiv.style.top = y - 54 + "px";
+ prevdiv.style.left = windowX + 500 + "px";
+ prevdiv.style.width = "20px";
+ $("kiv_picdiv").style.zIndex = 99;
+ $("kiv_comdiv").style.zIndex = 99;
+ prevdiv.style.display = "block";
+ fw.move(prevdiv, 2, windowX - 20, 0, Array( function(){
+ var params = "?reldir=<?php echo $reldir ?>&gallery=" + kib.dirs[cur_gallery] + "&file=" + encodeURIComponent(kib.pics[cur_gallery][cur_pic].file) + "&topic=1";
+ fw.getHTTP("<?php echo $basedir ?>ki_preview.php" + params, kiv.showpreview, 1);
+ <?php addEvent("$('fw_blend')", "mousemove", "closepreview"); ?>
+ } ));
+ } else if(x < 40 && cur_pic != 0){
+ <?php if($show_preview == 1){ ?>
+ if(wowdiv.firstChild){
+ fw.dropshadow(wowdiv, 0);
+ fw.fade(wowdiv, 0, Array( function(){
+ wowdiv.innerHTML = "";
+ } ));
+ }
+ <?php } ?>
+ <?php removeEvent("document", "mousemove", "mousemoved"); ?>
+ previewing = 1;
+ var prevdiv = $("kiv_prevdiv");
+ prevdiv.style.top = y - 54 + "px";
+ prevdiv.style.left = "-500px";
+ prevdiv.style.width = "20px";
+ $("kiv_picdiv").style.zIndex = 99;
+ $("kiv_comdiv").style.zIndex = 99;
+ prevdiv.style.display = "block";
+ fw.move(prevdiv, 2, 0, 0, Array( function(){
+ var params = "?reldir=<?php echo $reldir ?>&gallery=" + kib.dirs[cur_gallery] + "&file=" + encodeURIComponent(kib.pics[cur_gallery][cur_pic].file) + "&topic=-1";
+ fw.getHTTP("<?php echo $basedir ?>ki_preview.php" + params, kiv.showpreview, -1);
+ <?php addEvent("$('fw_blend')", "mousemove", "closepreview"); ?>
+ } ));
+ }
+ <?php } ?>
+ }
+
+ this.showpreview = function(responseText, topic){
+ if(stop == 1 || previewing == 0)return;
+ var prevdiv = $("kiv_prevdiv");
+ prevdiv.innerHTML = responseText;
+ var gesbreite = $("gesbreite").value;
+ if(topic == 1){
+ prevdiv.style.width = gesbreite + "px";
+ fw.move(prevdiv, 2, windowX - gesbreite - 4, 0);
+ } else {
+ prevdiv.style.left = -1*gesbreite + 20 + "px";
+ prevdiv.style.width = gesbreite + "px";
+ fw.move(prevdiv, 2, 0, 0);
+ }
+ }
+
+ function closepreview(aEvent){
+ if(stop == 1)return;
+ aEvent = aEvent ? aEvent : window.event;
+ var x = aEvent.clientX ? aEvent.clientX : aEvent.pageX;
+ var y = aEvent.clientY ? aEvent.clientY : aEvent.pageY;
+
+ if(x > windowX - 40 || x < 40)return;
+
+ <?php removeEvent("$('fw_blend')", "mousemove", "closepreview"); ?>
+ previewing = 0;
+ var prevdiv = $("kiv_prevdiv");
+ if($("kiv_loading").style.display == "none"){
+ $("kiv_picdiv").style.zIndex = 1000;
+ $("kiv_comdiv").style.zIndex = 1000;
+ }
+ if(parseInt(prevdiv.style.left) > 0){
+ fw.move(prevdiv, 2, windowX, 0, Array( function(){
+ prevdiv.innerHTML = "";
+ prevdiv.style.display = "none";
+ <?php addEvent("document", "mousemove", "mousemoved"); ?>
+ } ));
+ } else {
+ fw.move(prevdiv, 2, -prevdiv.offsetWidth, 0, Array( function(){
+ prevdiv.innerHTML = "";
+ prevdiv.style.display = "none";
+ <?php addEvent("document", "mousemove", "mousemoved"); ?>
+ } ));
+ }
+ }
+
+ function showcomment(){
+ if(stop == 1)return;
+ var com_div = $("kiv_comdiv");
+ var sizes = fw.getDim($("kiv_picdiv"), 1);
+ if($("thecomment")){
+ com_div.style.visibility = "hidden";
+ com_div.style.display = "block";
+ com_div.style.width = "auto";
+
+ var commstring = $("thecomment").innerHTML;
+ <?php if($comm_auto == 1){ ?>
+ commstring = commstring.replace(/%x/, cur_pic+1);
+ commstring = commstring.replace(/%X/, kib.pics[cur_gallery].length);
+ commstring = commstring.replace(/%g/, kib.dirs[cur_gallery]);
+ var filename = kib.pics[cur_gallery][cur_pic].file;
+ commstring = commstring.replace(/%f/, filename.substr(0, filename.length-4));
+ <?php } ?>
+ com_div.innerHTML = commstring;
+
+ $("kiv_picdiv").removeChild($("thecomment"));
+
+ var comm_x = com_div.offsetWidth;
+ var comm_y = com_div.offsetHeight;
+
+ if(comm_x > sizes[0]){
+ comm_x = sizes[0];
+ com_div.style.width = (sizes[0] - 2*10) + "px";
+ comm_y = com_div.offsetHeight;
+ }
+
+ <?php
+ if($comm_text_align === "left"){
+ ?>
+ var x_pos = $("kiv_picdiv").offsetLeft;
+ var y_pos = $("kiv_picdiv").offsetHeight + $("kiv_picdiv").offsetTop + 5;
+ if(y_pos + comm_y > windowY){
+ y_pos -= comm_y + 10;
+ <?php if($pwok == 0){ ?>if(comm_x != sizes[0])x_pos += 5;<?php } ?>
+ }
+ <?php
+ }elseif($comm_text_align === "right"){
+ ?>
+ var x_pos = $("kiv_picdiv").offsetLeft + sizes[0] - comm_x;
+ var y_pos = $("kiv_picdiv").offsetHeight + $("kiv_picdiv").offsetTop + 5;
+ if(y_pos + comm_y > windowY){
+ y_pos -= comm_y + 10;
+ <?php if($pwok == 0){ ?>if(comm_x != sizes[0])x_pos -= 5;<?php } ?>
+ }
+ <?php
+ }else{
+ ?>
+ var x_pos = $("kiv_picdiv").offsetLeft + 0.5*(sizes[0] - comm_x);
+ var y_pos = $("kiv_picdiv").offsetHeight + $("kiv_picdiv").offsetTop + 5;
+ if(y_pos + comm_y > windowY){
+ y_pos -= comm_y + 10;
+ }
+ <?php
+ }
+ ?>
+
+ com_div.style.left = x_pos + "px";
+ com_div.style.top = y_pos + "px";
+ com_div.style.display = "none";
+ com_div.style.visibility = "visible";
+ fw.fade(com_div, 100);
+
+ var focme = $("focusme");
+ if(focme){
+ focme.focus();
+ }
+ }
+
+ }
+
+ function calcpicsize(fileno){
+ var picx = kib.pics[cur_gallery][fileno].x;
+ var picy = kib.pics[cur_gallery][fileno].y;
+ var winx = picx + <?php echo 2*$bord_size ?>;
+ var winy = picy + <?php echo 2*$bord_size ?>;
+ <?php
+ $x_limiter = 10000;
+ $y_limiter = 10000;
+ if($max_pic_width != "none")$x_limiter = $max_pic_width;
+ if($max_pic_height != "none")$y_limiter = $max_pic_height;
+ if($max_pic_height != "none" || $max_pic_width != "none" || $oversize_allowed == 0){
+ ?>
+ var xlimiter = <?php echo $x_limiter ?>;
+ var ylimiter = <?php echo $y_limiter ?>;
+ if(xlimiter < 1)xlimiter = parseInt(<?php echo $x_limiter ?>*windowX);
+ if(ylimiter < 1)ylimiter = parseInt(<?php echo $y_limiter ?>*windowY);
+ <?php if($oversize_allowed == 0){ ?>
+ if(xlimiter > windowX)xlimiter = windowX - 20;
+ if(ylimiter > windowY)ylimiter = windowY - 34;
+ <?php } ?>
+ if(winy > ylimiter || winx > xlimiter){
+ var k;
+ if( (picx / picy) > 1){
+ k = picy / picx;
+ picx = xlimiter-<?php echo 2*$bord_size ?>;
+ picy = k*picx;
+ if(picy > ylimiter-<?php echo 2*$bord_size ?>){
+ picy = ylimiter-<?php echo 2*$bord_size ?>;
+ picx = (1/k) * picy;
+ }
+ } else {
+ k = picx / picy;
+ picy = ylimiter-<?php echo 2*$bord_size ?>;
+ picx = k*picy;
+ if(picx > xlimiter-<?php echo 2*$bord_size ?>){
+ picx = xlimiter-<?php echo 2*$bord_size ?>;
+ picy = (1/k) * picx;
+ }
+ }
+ picx = Math.round(picx);
+ picy = Math.round(picy);
+ }
+ <?php } ?>
+ return new Array(picx, picy);
+ }
+
+ this.slideshow = function(){
+ if(stop == 1)return;
+ if(ss == 2)ss = 1;
+ ss *= -1;
+ var sspic = $("ssbutton");
+ if(ss == 1){
+ <?php if($browser != "ie6"){ ?>
+ sspic.src = "<?php echo $basedir ?>ki_nav_stop.png";
+ <?php } else { ?>
+ sspic.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src=<?php echo $basedir ?>ki_nav_stop.png)";
+ <?php } ?>
+ sspic.title = "<?php echo html_entity_decode(htmlentities(stripslashes($slideshow_stop), ENT_QUOTES, "UTF-8"), ENT_NOQUOTES, "UTF-8") ?>";
+ <?php if($show_help == 1){ ?>$("kiv_help").style.display = "none";<?php } ?>
+ ss = 2;
+ kiv.goon(1);
+ } else {
+ <?php if($browser != "ie6"){ ?>
+ sspic.src = "<?php echo $basedir ?>ki_nav_play.png";
+ <?php } else { ?>
+ sspic.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src=<?php echo $basedir ?>ki_nav_play.png)";
+ <?php } ?>
+ sspic.title = "<?php echo html_entity_decode(htmlentities(stripslashes($slideshow_start), ENT_QUOTES, "UTF-8"), ENT_NOQUOTES, "UTF-8") ?>";
+ <?php if($show_help == 1){ ?>fw.fade("kiv_help", 51);<?php } ?>
+ }
+ }
+
+ this.sshelp = function(val){
+ ss = val;
+ }
+
+ this.goon = function(topic){
+ if(stop == 1 || ss == 1)return;
+ if(ss == 2)ss = 1;
+ if(topic > 0){
+ if(cur_pic + topic <= kib.pics[cur_gallery].length-1){
+ kiv.getImage(cur_gallery, cur_pic+topic);
+ } else {
+ kiv.getImage(cur_gallery, (cur_pic+topic)-kib.pics[cur_gallery].length);
+ }
+ } else {
+ if(cur_pic + topic >= 0){
+ kiv.getImage(cur_gallery, cur_pic+topic);
+ } else {
+ kiv.getImage(cur_gallery, kib.pics[cur_gallery].length+(cur_pic+topic));
+ }
+ }
+ }
+
+ this.closeImage = function(){
+ stop = 1;
+ if($("kib_helpbox")){
+ kib.hidehelp();
+ }
+ <?php removeEvent("document", "mousemove", "mousemoved"); ?>
+ <?php if($show_preview == 1){ ?>kiv.removewow();<?php } ?>
+ if(window.stop !== undefined){
+ window.stop();
+ }else if(document.execCommand !== undefined){
+ document.execCommand("Stop", false);
+ }
+ var picdiv = $("kiv_picdiv");
+ <?php if($pwok == 1){ ?>
+ if($("square_selector")){
+ var obj = $("square_selector");
+ obj.parentNode.removeChild(obj);
+ }
+ <?php } ?>
+ if($("kiv_vcomments_form"))$("kiv_picdiv").removeChild($("kiv_vcomments_form"));
+ if($("kiv_vcomments_list"))$("kiv_picdiv").removeChild($("kiv_vcomments_list"));
+ fw.fade("kiv_share", 0);
+ fw.fade("kiv_closebutton", 0);
+ fw.fade("kiv_help", 0);
+ fw.fade("kiv_gpspic", 0);
+ fw.fade("kiv_prevdiv", 0);
+ fw.fade("kiv_tb", 0);
+ fw.fade("kiv_inshadow", 0);
+
+ fw.fade("kiv_comdiv", 0, Array( function() {
+ fw.fade("thepicture", 0, Array( fw.resize, picdiv, 2, parseInt(picdiv.style.width), 1, Array( fw.resize, picdiv, 2, 0, 1, Array( function(){fw.removejs("kiv");if(typeof(kie_module) == "function"){$("kie_maindiv").style.zIndex = 1000;$("kie_tb").style.display = "block";}else{if(typeof(kis_module) != "function")fw.shadebody(0);}} ))));
+ } ));
+
+ }
+
+ function preventDefaultAction(aEvent) {
+ <?php if($browser !== "ie6" && $browser !== "ie7") { ?>
+ aEvent.stopPropagation();
+ <?php } ?>
+ <?php if($browser === "gecko") { ?>
+ aEvent.preventDefault();
+ <?php } ?>
+ <?php if($browser === "opera") { ?>
+ aEvent.returnValue = false;
+ <?php } ?>
+ }
+
+ function taste(aEvent) {
+ aEvent = aEvent ? aEvent : window.event;
+ var keyCode = aEvent.keyCode;
+ var charCode = aEvent.charCode ? aEvent.charCode : 0;
+ if(keyCode == 27){
+ kiv.closeImage();
+ preventDefaultAction(aEvent);
+ return false;
+ }
+ if(stop == 1 || flipped != 0)return;
+ <?php if($slideshow == 1){ ?>
+ if(keyCode == 19 || keyCode == 32 || charCode == 32){
+ if(kib.pics[cur_gallery].length > 1)kiv.slideshow($("ssbutton"));
+ preventDefaultAction(aEvent);
+ return false;
+ }
+ if(ss == 1)return false;
+ <?php } ?>
+ <?php if($viewercomments == 1){ ?>
+ if(keyCode == 70 || charCode == 102 || keyCode == 102){
+ kiv.flip_vcomm();
+ preventDefaultAction(aEvent);
+ return false;
+ }
+ <?php } ?>
+ if(keyCode == 33 || keyCode == 36){
+ kiv.goon(-1);
+ preventDefaultAction(aEvent);
+ return false;
+ }
+ if(keyCode == 34 || keyCode == 35){
+ kiv.goon(1);
+ preventDefaultAction(aEvent);
+ return false;
+ }
+ if(keyCode == 38){
+ <?php if($oversize_allowed == 1){ ?>
+ if(kib.pics[cur_gallery][cur_pic].y+2*<?php echo $bord_size ?> > windowY){
+ if(posY < oversizeY){
+ posY += 20;
+ var picdiv = $("kiv_picdiv");
+ picdiv.style.marginTop = -(0.5*picdiv.offsetHeight) + posY + "px";
+ }
+ }
+ <?php } ?>
+ preventDefaultAction(aEvent);
+ return false;
+ }
+ if(keyCode == 40){
+ <?php if($oversize_allowed == 1){ ?>
+ if(kib.pics[cur_gallery][cur_pic].y+2*<?php echo $bord_size ?> > windowY){
+ if(oversizeY + posY > 0){
+ posY -= 20;
+ var picdiv = $("kiv_picdiv");
+ picdiv.style.marginTop = -(0.5*picdiv.offsetHeight) + posY + "px";
+ }
+ }
+ <?php } ?>
+ preventDefaultAction(aEvent);
+ return false;
+ }
+ if(keyCode == 37){
+ <?php if($oversize_allowed == 1){ ?>
+ if(kib.pics[cur_gallery][cur_pic].x+2*<?php echo $bord_size ?> > windowX){
+ if(posX < oversizeX){
+ posX += 20;
+ var picdiv = $("kiv_picdiv");
+ picdiv.style.marginLeft = -(0.5*picdiv.offsetWidth) + posX + "px";
+ }
+ } else {
+ kiv.goon(-1);
+ }
+ <?php } else { ?>
+ kiv.goon(-1);
+ <?php } ?>
+ preventDefaultAction(aEvent);
+ return false;
+ }
+ if(keyCode == 39){
+ <?php if($oversize_allowed == 1){ ?>
+ if(kib.pics[cur_gallery][cur_pic].x+2*<?php echo $bord_size ?> > windowX){
+ if(oversizeX + posX > 0){
+ posX -= 20;
+ var picdiv = $("kiv_picdiv");
+ picdiv.style.marginLeft = -(0.5*picdiv.offsetWidth) + posX + "px";
+ }
+ } else {
+ kiv.goon(1);
+ }
+ <?php } else { ?>
+ kiv.goon(1);
+ <?php } ?>
+ preventDefaultAction(aEvent);
+ return false;
+ }
+ }
+
+ <?php if($viewercomments == 1){ ?>
+ this.flip_vcomm = function(){
+ if(flipped == 0){
+ if($("kib_helpbox")){
+ kib.hidehelp();
+ }
+ flip(1);
+ flipped = 2;
+ return;
+ }
+ if(flipped == 1){
+ flip(-1);
+ flipped = 2;
+ return;
+ }
+ }
+
+ function flip(direction){
+ if(stop == 1 || ss == 1 || flipped == 2)return;
+
+ stop = 1;
+
+ var picsize = calcpicsize(cur_pic);
+ picsize[0] += <?php echo 2*$bord_size ?>;
+ picsize[1] += <?php echo 2*$bord_size ?>;
+
+ if(direction == 1){
+ if(picsize[0] < 700)picsize[0] = 700;
+ if(picsize[1] < 410)picsize[1] = 410;
+ } else {
+ $("kiv_picdiv").removeChild($("kiv_vcomments_form"));
+ $("kiv_picdiv").removeChild($("kiv_vcomments_list"));
+ }
+
+ var flipZ = (picsize[0]/(1.2*picsize[1]))*0.25;
+ if(flipZ > 0.5)flipZ = 0.5;
+ if(flipZ < 0.05)flipZ = 0.05;
+
+ <?php if($pwok == 1){ ?>
+ if($("square_selector"))$("square_selector").style.display = "none";
+ <?php } ?>
+ <?php if($checkgps == 1){ ?>
+ if($("kiv_gpspic"))$("kiv_gpspic").style.display = "none";
+ <?php } ?>
+ <?php if($show_help){ ?>
+ $("kiv_help").style.display = "none";
+ <?php } ?>
+ $("kiv_comdiv").style.visibility = "hidden";
+ var node = $("kiv_inshadow");
+ node.style.display = "none";
+ node.style.width = picsize[0] - <?php echo 2*$bord_size ?> + "px";
+ node.style.height = picsize[1] - <?php echo 2*$bord_size ?> + "px";
+
+ var temp = 0;
+
+ var node = document.createElement("div");
+ node.innerHTML = "<img id='kiv_flipT1' style='margin:0px; position:absolute; left:0px; top:0px; padding:0px; border:0px; width:100%; height:0px;' src='<?php echo $basedir."ki_flip.php?ot=0&gallery=" ?>"+kib.dirs[cur_gallery]+"' /><img id='kiv_flipB1' style='margin:0px; position:absolute; left:0px; bottom:0px; padding:0px; border:0px; width:100%; height:0px;' src='<?php echo $basedir."ki_flip.php?ot=1&gallery=" ?>"+kib.dirs[cur_gallery]+"' /><img id='kiv_flipT2' style='margin:0px; position:absolute; left:0px; top:0px; padding:0px; border:0px; width:0%; height:"+Math.round(picsize[1]*flipZ)+"px;' src='<?php echo $basedir."ki_flip.php?ot=2&gallery=" ?>"+kib.dirs[cur_gallery]+"' /><img id='kiv_flipB2' style='margin:0px; position:absolute; left:0px; bottom:0px; padding:0px; border:0px; width:0%; height:"+Math.round(picsize[1]*flipZ)+"px;' src='<?php echo $basedir."ki_flip.php?ot=3&gallery=" ?>"+kib.dirs[cur_gallery]+"' />";
+ var what = node.childNodes.length;
+ for(var i = 0; i < what; i++){
+ $("kiv_picdiv").appendChild(node.childNodes[0]);
+ }
+ $("kiv_flipT1").onload = function(){
+ temp++;
+ if(temp == 4)kiv.flip2(direction, picsize, flipZ);
+ };
+ $("kiv_flipB1").onload = function(){
+ temp++;
+ if(temp == 4)kiv.flip2(direction, picsize, flipZ);
+ };
+ $("kiv_flipT2").onload = function(){
+ temp++;
+ if(temp == 4)kiv.flip2(direction, picsize, flipZ);
+ };
+ $("kiv_flipB2").onload = function(){
+ temp++;
+ if(temp == 4)kiv.flip2(direction, picsize, flipZ);
+ };
+ }
+
+ this.flip2 = function(direction, picsize, flipZ){
+ var obj = $("kiv_picdiv");
+ fw.dropshadow(obj, 0);
+ fw.fade("thepicture", 0, Array( function(){
+
+ var node = document.createElement("div");
+ node.id = "kiv_flip_";
+ node.style.margin = "0px";
+ node.style.position = "absolute";
+ node.style.marginLeft = "-50%";
+ node.style.marginTop = "-50%";
+ node.style.top = "50%";
+ node.style.left = "50%";
+ node.style.padding = "0px";
+ node.style.border = "0px";
+ node.style.width = "100%";
+ node.style.height = "100%";
+ node.style.background = "<?php echo $bord_color ?>";
+ obj.appendChild(node);
+
+ obj.style.background = "none";
+
+ fw.resize2( "kiv_picdiv", 2, 0, picsize[1], Array( function() {
+ $("kiv_flipT1").style.display = "none";
+ $("kiv_flipB1").style.display = "none";
+ $("kiv_flipT2").style.width = "100%";
+ $("kiv_flipB2").style.width = "100%";
+ fw.resize2( "kiv_picdiv", 2, picsize[0], picsize[1], Array( function() {
+ $("kiv_picdiv").removeChild($("kiv_flipT1"));
+ $("kiv_picdiv").removeChild($("kiv_flipB1"));
+ $("kiv_picdiv").removeChild($("kiv_flipT2"));
+ $("kiv_picdiv").removeChild($("kiv_flipB2"));
+ $("kiv_picdiv").removeChild($("kiv_flip_"));
+ $("kiv_picdiv").style.background = "<?php echo $bord_color ?>";
+ fw.dropshadow(obj, 1);
+ obj = $("thepicture");
+ var picsize = calcpicsize(cur_pic);
+ if(direction == 1){
+ obj.style.left = "<?php echo $bord_size ?>px";
+ obj.style.top = "<?php echo $bord_size ?>px";
+ obj.style.margin = "0px";
+ obj.style.width = "230px";
+ obj.style.padding = "5px";
+ obj.style.height = (picsize[1]/picsize[0])*230 + "px";
+ <?php
+ if($browser !== "ie6" && $browser !== "ie7")
+ echo "obj.style.clip = 'rect(0px,240px,247px,0px)';";
+ else
+ echo "obj.style.clip = 'rect(0px 240px 247px 0px)';";
+ ?>
+ obj.onclick = function(){
+ kiv.flip_vcomm();
+ };
+ fw.fade(obj, 100);
+
+ picsize[0] += <?php echo 2*$bord_size ?>;
+ picsize[1] += <?php echo 2*$bord_size ?>;
+ if(picsize[0] < 700)picsize[0] = 700;
+ if(picsize[1] < 410)picsize[1] = 410;
+ picsize[0] -= <?php echo (2*$bord_size+20+1) ?>;
+ picsize[1] -= <?php echo (2*$bord_size+20+1) ?>;
+
+ var node = document.createElement("div");
+ node.id = "kiv_vcomments_form";
+ node.style.margin = "0px";
+ node.style.position = "absolute";
+ node.style.top = "<?php echo $bord_size+5 ?>px";
+ node.style.left = "<?php echo $bord_size+230+20 ?>px";
+ node.style.padding = "0px";
+ node.style.textAlign = "left";
+ node.style.border = "0px";
+ node.style.lineHeight = "12px";
+ node.style.font = "<?php echo "12px ".$comm_text_font ?>";
+ node.style.color = "<?php echo $vcomm_header_color ?>";
+ node.innerHTML = "<div style='margin:0px 0px 11px; font-size:16px; line-height:16px; color:<?php echo $vcomm_header_color ?>;'><b><?php echo $vcomm_lac ?></b></div><label><?php echo $vcomm_name ?></label><input type='text' style='width:240px; line-height:24px; border:1px solid <?php echo $vcomm_bord_color ?>; padding:2px; margin:9px 0px 0px; font:16px <?php echo $comm_text_font ?>; color:<?php echo $vcomm_box_color ?>; display:block; text-align:left; background:<?php echo $vcomm_back_color ?>;' name='email' id='vcomm_email'/><br /><label><?php echo $vcomm_comm ?></label><textarea style='width:400px; height:80px; line-height:24px; border:1px solid <?php echo $vcomm_bord_color ?>; padding:2px; margin:9px 0px 0px; color:<?php echo $vcomm_box_color ?>; font:16px <?php echo $comm_text_font ?>; display:block; text-align:left; background:<?php echo $vcomm_back_color ?>;' name='assystem' id='vcomm_assystem'></textarea><input type='button' value='<?php echo $vcomm_post ?>' style='line-height:16px; padding:2px; width:110px; margin:9px 9px 0px 0px; font:14px <?php echo $comm_text_font ?>; border:1px solid <?php echo $vcomm_bord_color ?>; color:#000000; background:#eeeeee; cursor:pointer;' onclick='kiv.sendvcomment()' /><?php echo $vcomm_clk ?>";
+ $("kiv_picdiv").appendChild(node);
+ $("vcomm_email").focus();
+ $("vcomm_assystem").style.width = picsize[0]-240 + "px";
+
+ node = document.createElement("div");
+ node.id = "kiv_vcomments_list";
+ node.style.margin = "0px";
+ node.style.position = "absolute";
+ node.style.top = "<?php echo $bord_size+260+10 ?>px";
+ node.style.left = "<?php echo $bord_size+5 ?>px";
+ node.style.padding = "5px";
+ node.style.textAlign = "left";
+ node.style.lineHeight = "12px";
+ node.style.width = picsize[0] + 10 - 10 + "px";
+ node.style.height = picsize[1] - 260 - 5 + "px";
+ node.style.background = "<?php echo $bord_color ?>";
+ node.style.overflowY = "scroll";
+ node.style.font = "<?php echo "12px ".$comm_text_font ?>";
+ node.style.color = "<?php echo $vcomm_text_color ?>";
+ node.innerHTML = "";
+ $("kiv_picdiv").appendChild(node);
+ var params = "?file=" + encodeURIComponent(kib.pics[cur_gallery][cur_pic].file) + "&gallery=" + kib.dirs[cur_gallery] + "&get=1";
+ fw.getHTTP("<?php echo $basedir ?>ki_vcomm.php" + params, kiv.getvcomm, null);
+
+ } else {
+ flipped = 0;
+ obj.style.left = "50%";
+ obj.style.top = "50%";
+ obj.style.padding = "0px";
+ obj.style.marginLeft = -0.5*picsize[0]+"px";
+ obj.style.marginTop = -0.5*picsize[1]+"px";
+ obj.style.width = picsize[0]+"px";
+ obj.style.height = picsize[1]+"px";
+ <?php
+ if($browser !== "ie6" && $browser !== "ie7")
+ echo "obj.style.clip = 'auto';";
+ else
+ echo "obj.style.clip = 'rect(auto auto auto auto)';";
+ ?>
+ obj.onclick = function(){
+ kiv.goon(1);
+ };
+ fw.fade(obj, 100, Array( function(){
+
+ <?php if($pwok == 1){ ?>
+ if($("square_selector"))$("square_selector").style.display = "block";
+ <?php } ?>
+ <?php if($checkgps == 1){ ?>
+ checkgps();
+ <?php } ?>
+ <?php if($show_help){ ?>
+ fw.fade("kiv_help", 51);
+ <?php } ?>
+
+ $("kiv_comdiv").style.visibility = "visible";
+ $("kiv_inshadow").style.display = "block";
+
+ if($("focusme"))$("focusme").focus();
+
+ flipped = 0;
+ } ) );
+ }
+ stop = 0;
+ } ) );
+ fw.resize2( "kiv_flipT2", 4, 0, 0 );
+ fw.resize2( "kiv_flipB2", 4, 0, 0 );
+ fw.resize2( "kiv_flip_", 2, picsize[0], picsize[1] );
+ } ) );
+ fw.resize2( "kiv_flipT1", 4, 0, Math.round(picsize[1]*flipZ) );
+ fw.resize2( "kiv_flipB1", 4, 0, Math.round(picsize[1]*flipZ) );
+ fw.resize2( "kiv_flip_", 2, 0, Math.round(picsize[1]*(1-2*flipZ))+8 );
+
+ } ) );
+ }
+
+ this.sendvcomment = function(){
+ var email = $("vcomm_email").value;
+ var assystem = $("vcomm_assystem").value;
+ if(email != "" && assystem != ""){
+ var shareadd = location.search;
+ if(shareadd.indexOf('kit_code=') != -1)
+ shareadd = shareadd.substr(0, shareadd.indexOf('kit_code=')-1);
+ if(shareadd.indexOf('?') == -1)
+ shareadd = "?" + shareadd;
+ else
+ shareadd += "&";
+ var slash = "";
+ if(location.pathname.substr(0, 1) != "/")slash = "/";
+ shareadd = encodeURIComponent(location.hostname + slash + location.pathname + shareadd + "kit_code=" + cur_gallery+"_"+cur_pic + location.hash);
+ var params = "?file=" + encodeURIComponent(kib.pics[cur_gallery][cur_pic].file) + "&gallery=" + kib.dirs[cur_gallery] + "&email=" + encodeURIComponent(email) + "&assystem=" + encodeURIComponent(assystem) + "&address=" + shareadd;
+ fw.getHTTP("<?php echo $basedir ?>ki_vcomm.php" + params, kiv.savedvcomm, null);
+ } else {
+ alert("ERROR: Name and/or comment empty.");
+ }
+ }
+
+ this.savedvcomm = function(responseText){
+ if(responseText == "1"){
+ alert("ERROR: For spam avoiding reasons you are only allowed to post a comment every 3 minutes.");
+ } else if(responseText == "2") {
+ alert("ERROR: Your comment has been identified as spam.");
+ } else {
+ $("vcomm_email").value = "";
+ $("vcomm_assystem").value = "";
+ var vlist = $("kiv_vcomments_list");
+ <?php if($moderate_posts == 0){ ?>
+ var old = vlist.innerHTML;
+ vlist.style.visibility = "hidden";
+ var oldd = parseInt(vlist.style.height);
+ vlist.style.height = "auto";
+ var olds = fw.getDim(vlist, 1)[1];
+ vlist.innerHTML = responseText;
+ var news = fw.getDim(vlist, 1)[1];
+ vlist.innerHTML = old;
+ vlist.style.height = oldd + "px";
+ vlist.style.visibility = "visible";
+ fw.move(vlist, 3, 0, 280 + (news - olds), Array(function(){
+ vlist.innerHTML = responseText;
+ vlist.style.top = "280px";
+ }));
+ <?php } else { ?>
+ alert("Thanks. Your comment will be visible after moderation.");
+ <?php } ?>
+ }
+ }
+
+ this.getvcomm = function(responseText){
+ if(responseText != ""){
+ if($("kiv_vcomments_list")){
+ $("kiv_vcomments_list").innerHTML = responseText;
+ }
+ }
+ flipped = 1;
+ }
+ <?php } ?>
+
+ this.download = function(){
+ var node = document.createElement("form");
+ node.action = "<?php echo $basedir ?>ki_download.php";
+ node.method = "post";
+ node.innerHTML = "<input type='hidden' name='file' value='" + kib.pics[cur_gallery][cur_pic].file + "' /><input type='hidden' name='gallery' value='" + kib.dirs[cur_gallery] + "' />";
+ document.body.appendChild(node);
+ node.submit();
+ document.body.removeChild(node);
+ }
+} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_koschtit.php b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_koschtit.php
new file mode 100644
index 00000000..bad23817
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_koschtit.php
@@ -0,0 +1,404 @@
+<?php
+ob_start("ob_gzhandler");
+if(!ini_get('date.timezone') && function_exists("date_default_timezone_set"))date_default_timezone_set('Europe/Berlin');
+
+//----------------------------------------------------------------------------- functions --------------------------------------------------------------------------------
+
+if (!function_exists('file_put_contents')) {
+ function file_put_contents($filename, $data) {
+ $f = @fopen($filename, 'w');
+ if (!$f) {
+ return false;
+ } else {
+ $bytes = fwrite($f, $data);
+ fclose($f);
+ return $bytes;
+ }
+ }
+}
+
+if (!function_exists('file_get_contents')) {
+ function file_get_contents($filename) {
+ if ($handle = @fopen($filename, 'rb')) {
+ $data = fread($handle, filesize($filename));
+ fclose($fh);
+ return $data;
+ }
+ }
+}
+
+function cmp_0($a, $b)
+{
+ global $galleryfolder;
+ return (filemtime($galleryfolder.$a[0]) < filemtime($galleryfolder.$b[0])) ? -1 : 1;
+}
+
+function cmp_1($a, $b)
+{
+ global $galleryfolder;
+ return (filemtime($galleryfolder.$a[0]) > filemtime($galleryfolder.$b[0])) ? -1 : 1;
+}
+
+function cmp_2($a, $b)
+{
+ global $galleryfolder;
+
+ $exif = @exif_read_data($galleryfolder.$a[0]);
+ $date1 = "";
+ if (isset($exif['DateTimeOriginal']))
+ $date1 = $exif['DateTimeOriginal'];
+ if (empty($date1) && isset($exif['DateTime']))
+ $date1 = $exif['DateTime'];
+ if (!empty($date1)){
+ $date1 = explode(':', str_replace(' ',':', $date1));
+ if(sizeof($date1) > 4){
+ $date1 = "{$date1[0]}-{$date1[1]}-{$date1[2]} {$date1[3]}:{$date1[4]}";
+ if(sizeof($date1) > 5)$date1 .= ":{$date1[5]}";
+ $date1 = strtotime($date1);
+ }
+ } else {
+ $date1 = filemtime($galleryfolder.$a[0]);
+ }
+ $exif = @exif_read_data($galleryfolder.$b[0]);
+ $date2 = "";
+ if (isset($exif['DateTimeOriginal']))
+ $date2 = $exif['DateTimeOriginal'];
+ if (empty($date2) && isset($exif['DateTime']))
+ $date2 = $exif['DateTime'];
+ if (!empty($date2)){
+ $date2 = explode(':', str_replace(' ',':', $date2));
+ if(sizeof($date2) > 4){
+ $date2 = "{$date2[0]}-{$date2[1]}-{$date2[2]} {$date2[3]}:{$date2[4]}";
+ if(sizeof($date2) > 5)$date2 .= ":{$date1[5]}";
+ $date2 = strtotime($date2);
+ } else {
+ $date2 = filemtime($galleryfolder.$b[0]);
+ }
+ } else {
+ $date2 = filemtime($galleryfolder.$b[0]);
+ }
+
+ return $date1 > $date2 ? 1 : -1;
+}
+
+function cmp_3($a, $b)
+{
+ return strcmp($a[0], $b[0]);
+}
+
+//-------------------------------------------------------------------------- end functions --------------------------------------------------------------------------------
+
+$supported = array("jpg","png","gif");
+
+$reldir = "";
+if(isset($_POST['reldir']))$reldir = $_POST['reldir'];
+$confdir = $reldir."ki_config/";
+$galleriesdir = $reldir."ki_galleries/";
+$basedir = $reldir."ki_base/";
+
+if(isset($_POST['gallery']))
+ $gallery = $_POST['gallery'];
+else
+ exit();
+
+if(isset($_POST['gallerynumber']))
+ $gallerynumber = $_POST['gallerynumber'];
+else
+ exit();
+
+if(isset($_POST['startfrom']))
+ $startfrom = $_POST['startfrom'];
+else
+ $startfrom = 0;
+
+if(isset($_POST['collectinfo']))
+ $collectinfo = 1;
+else
+ $collectinfo = 0;
+
+// -------------- Sicherheitsabfragen!
+if(preg_match("/[\.]*\//", $gallery))exit();
+// ---------- Ende Sicherheitsabfragen!
+
+include_once("../ki_config/ki_setup.php");
+if(is_file("../ki_config/".$gallery."_ki_setup.php")){
+ include_once("../ki_config/".$gallery."_ki_setup.php");
+ $configfile = "../ki_config/".$gallery."_ki_setup.php";
+} else {
+ $configfile = "../ki_config/ki_setup.php";
+}
+$galleryfolder = "../ki_galleries/".$gallery."/";
+$thumbsfolder = $galleryfolder."thumbs/";
+$commentsfolder = $galleryfolder."comments/";
+$viewercommentsfolder = $galleryfolder."viewercomments/";
+
+$temp = getimagesize("ki_nav_next.png");
+if($nav_always == 1 && $show_nav == 1)$fr_height -= ($temp[1]+18);
+if($th_lines == "auto")$th_lines = ceil($thumbs/($th_per_line));
+if($th_width == "auto")$th_width = round($fr_width/($th_per_line)) - round($fr_height*0.04) - 4;
+if($th_height == "auto")$th_height = round($fr_height/($th_lines)) - round($fr_height*0.04) - 4;
+$th_width = $th_width - 2*$th_bord_size;
+$th_height = $th_height - 2*$th_bord_size;
+if(($th_lines*$th_per_line) < $thumbs)$thumbs = $th_lines*$th_per_line;
+
+$zeile = 1;
+$spalte = 0;
+
+$spaltenbreite = $fr_width/($th_per_line);
+$zeilenhoehe = $fr_height/($th_lines);
+
+/*------------------- error/warning checking ------------------*/
+if($collectinfo == 1){
+ if (!function_exists('imagecreatetruecolor')) {
+ echo "<div style='background:#ffbbbb; color:#000000; margin-bottom:5px; position:relative; z-index:10; padding:4px;'>ERROR: KoschtIT Image Gallery can't find the PHP GD2 Library available. Please make sure you have removed the semicolon from this line ';extension=php_gd2.dll' in your php.ini and the library is correctly installed.</div>";
+ }
+ if(!is_dir($galleryfolder)) {
+ echo "<div style='background:#ffbbbb; color:#000000; margin-bottom:5px; position:relative; z-index:10; padding:4px;'>ERROR: KoschtIT Image Gallery can't find the following folder on the server: '".htmlentities($gallery)."' . Please check if the folder is available in the 'ki_galleries' folder.</div>";
+ echo "<input type='hidden' id='".$gallerynumber."_info' value='[ ]' />";
+ exit();
+ }
+ if($checkgps == 1){
+ if(!function_exists("exif_read_data")){
+ if($show_warnings == 1)echo "<div style='background:#bbbbff; color:#000000; margin-bottom:5px; position:relative; z-index:10; padding:4px;'>WARNING: You don't have the exif extension for PHP installed. The script won't be able to read any positioning metadata from your pictures. Please disable '\$checkgps' for fixing this issue. Set '\$show_warnings = 0' if you don't want to see this warning again.</div>";
+ }
+ }
+ if($pic_order == 3){
+ if(!function_exists("exif_read_data")){
+ $pic_order = 2;
+ if($show_warnings == 1)echo "<div style='background:#bbbbff; color:#000000; margin-bottom:5px; position:relative; z-index:10; padding:4px;'>WARNING: You don't have the exif extension for PHP installed. You can't set \'$pic_order\' to 3. Please set a different value for '\$pic_order'. Set '\$show_warnings = 0' if you don't want to see this warning again.</div>";
+ }
+ }
+ if($checkgps == 1 && $cellinfo == 1){
+ if(!function_exists("curl_init")){
+ if($show_warnings == 1)echo "<div style='background:#bbbbff; color:#000000; margin-bottom:5px; position:relative; z-index:10; padding:4px;'>WARNING: You don't have the curl extension for PHP installed. You will need this extension for retrieving geo-tagging information from opencellid.com . Please disable '\$cellinfo' for fixing this issue. Set '\$show_warnings = 0' if you don't want to see this warning again.</div>";
+ }
+ }
+ if($thumbs_to_disk == 1){
+ $error = 0;
+ if(!is_dir($thumbsfolder)){
+ @chmod($galleryfolder, 0777);
+ if( !@mkdir($thumbsfolder, 0777) ) {
+ $error = 1;
+ }
+ } else {
+ if(!is_file($thumbsfolder."test") && !$f = @fopen($thumbsfolder."test", 'w')){
+ $error = 1;
+ }
+ @fclose($f);
+ @unlink($thumbsfolder."test");
+ }
+ if($error == 1 && $show_warnings == 1)echo "<div style='background:#bbbbff; color:#000000; margin-bottom:5px; position:relative; z-index:10; padding:4px;'>WARNING: KoschtIT Image Gallery can't get writing permission on the server (\"ki_galleries\\".$gallery."\\thumbs\"-folder). Thumbs won't be saved. Please disable '\$thumbs_to_disk' or grant writing permission. Set '\$show_warnings = 0' if you don't want to see this warning again.</div>";
+ }
+ if($comments == 1){
+ $error = 0;
+ if(!is_dir($commentsfolder)){
+ @chmod($galleryfolder, 0777);
+ if( !@mkdir($commentsfolder, 0777) ) {
+ $error = 1;
+ }
+ } else {
+ if(!is_file($commentsfolder."test") && !$f = @fopen($commentsfolder."test", 'w')){
+ $error = 1;
+ }
+ @fclose($f);
+ @unlink($commentsfolder."test");
+ }
+ if($error == 1 && $show_warnings == 1)echo "<div style='background:#bbbbff; color:#000000; margin-bottom:5px; z-index:3000; position:relative; z-index:10; padding:4px;'>WARNING: KoschtIT Image Gallery can't get writing permission on the server (\"ki_galleries\\".$gallery."\\comments\"-folder). Picture comments won't be saved, but you can still use '\$comm_auto'. Please disable '\$comments' or grant writing permission. Set '\$show_warnings = 0' if you don't want to see this warning again.</div>";
+ }
+ if($viewercomments == 1){
+ $error = 0;
+ if(!is_dir($viewercommentsfolder)){
+ @chmod($galleryfolder, 0777);
+ if( !@mkdir($viewercommentsfolder, 0777) ) {
+ $error = 1;
+ }
+ } else {
+ if(!is_file($viewercommentsfolder."test") && !$f = @fopen($viewercommentsfolder."test", 'w')){
+ $error = 1;
+ }
+ @fclose($f);
+ @unlink($viewercommentsfolder."test");
+ }
+ if($error == 1 && $show_warnings == 1)echo "<div style='background:#bbbbff; color:#000000; margin-bottom:5px; z-index:3000; position:relative; z-index:10; padding:4px;'>WARNING: KoschtIT Image Gallery can't get writing permission on the server (\"ki_galleries\\".$gallery."\\viewercomments\"-folder). User comments won't be saved. Please disable '\$viewercomments' or grant writing permission. Set '\$show_warnings = 0' if you don't want to see this warning again.</div>";
+ }
+}
+/*------------------- end error/warning checking ------------------*/
+
+/*------------------- config settings ------------------*/
+$savefile = $gallery."_lastmodified";
+$lastmodified = filemtime($configfile);
+$saved = $fr_width.$fr_height.$thumbs.$th_per_line.$th_lines.$th_width.$th_height.$th_bord_size.$th_bord_hover_increase.$th_to_square.$th_2sq_crop_vert.$th_2sq_crop_hori.$show_nav.$nav_always;
+$writestring = "<?php\r\n\$lm_saved = \"".$saved."\";\r\n";
+$writestring .= "\$lm_lastmodified = ".$lastmodified.";\r\n?>";
+if(!file_exists($savefile))@file_put_contents($savefile, $writestring);
+if(!file_exists($savefile)) {
+ $thumbs_to_disk = 0;
+} else {
+ include_once($savefile);
+ if($lm_saved !== $saved){
+ @file_put_contents($savefile, $writestring);
+ $matches = @glob($thumbsfolder."*.*", GLOB_ERR);
+ if(is_array($matches)){
+ foreach($matches as $sf) {
+ if(!is_dir($sf) && !is_link($sf)){
+ @unlink($sf);
+ }
+ }
+ }
+ } else {
+ $lastmodified = $lm_lastmodified;
+ }
+}
+/*------------------- end config settings ------------------*/
+
+$files = array();
+$temp = array();
+$savedfolderhash = 0;
+if(is_file($gallery."_dir")){
+ $temp = explode(PHP_EOL, file_get_contents($gallery."_dir"));
+ $savedfolderhash = unserialize($temp[0]);
+}
+//$folderhash = pic_order + MTime of $galleryfolder + fileSize of all files
+$folderhash = $pic_order;
+$iterator = new DirectoryIterator($galleryfolder);
+foreach ($iterator as $fileInfo) {
+ if($fileInfo->isDot()){
+ $folderhash += $fileInfo->getMTime();
+ continue;
+ } elseif($fileInfo->isFile()) {
+ $folderhash += $fileInfo->getSize();
+ }
+}
+if($folderhash != $savedfolderhash){
+ if($pic_order == 4 && sizeof($temp) > 1){
+ $files = unserialize($temp[1]);
+ $iterator->rewind();
+ foreach ($iterator as $fileInfo) {
+ $file = $fileInfo->getFilename();
+ if(!in_array(strtolower(substr($file, -3)), $supported))$continue;
+ $imgsize = @getimagesize($galleryfolder.$file);
+ if($imgsize[0]){
+ $newcandidate = array($file, $imgsize[0], $imgsize[1]);
+ if(!in_array($newcandidate, $files))$files[] = $newcandidate;
+ }
+ }
+ reset($files);
+ } else {
+ $iterator->rewind();
+ foreach ($iterator as $fileInfo) {
+ $file = $fileInfo->getFilename();
+ if(!in_array(strtolower(substr($file, -3)), $supported))$continue;
+ $imgsize = @getimagesize($galleryfolder.$file);
+ if($imgsize[0]){
+ $files[] = array($file, $imgsize[0], $imgsize[1]);
+ }
+ }
+ switch($pic_order){
+ case 0:
+ usort($files, "cmp_1");
+ break;
+ case 1:
+ usort($files, "cmp_0");
+ break;
+ case 2:
+ usort($files, "cmp_3");
+ break;
+ case 3:
+ usort($files, "cmp_2");
+ break;
+ default:
+ usort($files, "cmp_1");
+ break;
+ }
+ reset($files);
+ }
+} else {
+ $files = unserialize($temp[1]);
+}
+
+if($collectinfo == 1){
+ $id = 0;
+ $fileinfo = "";
+ foreach ($files as $file) {
+ if($id != 0)$fileinfo .= ", ";
+ $id++;
+ $fileinfo .= "{ \"file\" : \"".$file[0]."\", \"x\" : ".$file[1].", \"y\" : ".$file[2]." }";
+ }
+ echo "<input id='".$gallerynumber."_info' type='hidden' value='[ ".$fileinfo." ]' />";
+ @file_put_contents($gallery."_dir", serialize($folderhash).PHP_EOL.serialize($files));
+}
+
+$id = 0;
+foreach ($files as $file) {
+ $id++;
+ if($id > $startfrom) {
+
+ $spalte++;
+ if($spalte == $th_per_line+1){
+ $zeile++;
+ $spalte = 1;
+ }
+
+ $breite = $file[1];
+ $hoehe = $file[2];
+
+ if( ($breite / $hoehe) > 1){
+ $k = $hoehe / $breite;
+ $breite = $th_width;
+ $hoehe = $k*$breite;
+ if($hoehe > $th_height){
+ $hoehe = $th_height;
+ $breite = (1/$k) * $hoehe;
+ }
+ } else {
+ $k = $breite / $hoehe;
+ $hoehe = $th_height;
+ $breite = $k*$hoehe;
+ if($breite > $th_width){
+ $breite = $th_width;
+ $hoehe = (1/$k) * $breite;
+ }
+ }
+
+ if($th_to_square == 1) {
+ if($th_width < $th_height){
+ $breite = $th_width;
+ } else {
+ $breite = $th_height;
+ }
+ $hoehe = $breite;
+ }
+
+ $x_pos = round($spaltenbreite*($spalte - 0.5) - 0.5*$breite) - $th_bord_size;
+ $y_pos = round($zeilenhoehe*($zeile - 0.5) - 0.5*$hoehe) - $th_bord_size;
+
+ $breite = round($breite);
+ $hoehe = round($hoehe);
+
+ if($th_bord_hover_increase > 1){
+ $inc_breite = round($breite*$th_bord_hover_increase);
+ $inc_hoehe = round($breite*$th_bord_hover_increase);
+ } else {
+ $inc_breite = $breite;
+ $inc_hoehe = $hoehe;
+ }
+
+ if($zeile <= $th_lines && ($id-$startfrom) <= $thumbs)
+ {
+ $src = $basedir."ki_makepic.php?file=".$gallery."/".rawurlencode($file[0])."&width=".$inc_breite."&height=".$inc_hoehe;
+ $style = "border:".$th_bord_size."px solid ".$th_bord_color."; position:absolute; left:".$x_pos."px; top:".$y_pos."px; cursor:pointer; visibility:hidden; margin:0px; width:".$breite."px; height:".$hoehe."px;";
+ if($thumbs_to_disk == 1){
+ if(!is_file($thumbsfolder.$lastmodified.$file[0])){
+ $src .= "&picname=".$lastmodified.rawurlencode($file[0]);
+ } else {
+ $src = $galleriesdir.$gallery."/thumbs/".$lastmodified.$file[0];
+ }
+ }
+ echo "<img id='".$gallerynumber."_".($id-1)."' src='".$src."' style='".$style."' onclick='kib.getImage(this.id)' onload=\"this.style.visibility='visible'\" onmouseover='kib.makebigger(this)' onmouseout='kib.makesmaller(this)' alt='".$breite."_".$hoehe."_".$x_pos."_".$y_pos."' />";
+ }
+ }
+}
+
+if(($id-$startfrom) > $thumbs)echo "<span id='".$gallerynumber."_next' style='display:none;'>".($startfrom+$thumbs)."</span>";
+if($startfrom != 0)echo "<span id='".$gallerynumber."_prev' style='display:none;'>".($startfrom-$thumbs)."</span>";
+?>
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_loading.gif b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_loading.gif
new file mode 100644
index 00000000..3cd7d9de
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_loading.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_makepic.php b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_makepic.php
new file mode 100644
index 00000000..93606187
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_makepic.php
@@ -0,0 +1,317 @@
+<?php
+// -------------------------------------------------------- functions --------------------------------------------------------------
+
+//------------------ Start Caching ---------------------------------
+if(!ini_get('date.timezone') && function_exists("date_default_timezone_set"))date_default_timezone_set('Europe/Berlin');
+$mtime = filemtime($_SERVER['SCRIPT_FILENAME']);
+$gmt_mtime = gmdate('D, d M Y H:i:s', $mtime).' GMT';
+header('ETag: "'.md5($mtime.$_SERVER['SCRIPT_FILENAME']).'"');
+if(isset($_SERVER['HTTP_IF_MODIFIED_SINCE']))
+{
+ if ($_SERVER['HTTP_IF_MODIFIED_SINCE'] == $gmt_mtime)
+ {
+ header('HTTP/1.1 304 Not Modified');
+ exit();
+ }
+}
+if (isset($_SERVER['HTTP_IF_NONE_MATCH']))
+{
+ if (str_replace('"', '', stripslashes($_SERVER['HTTP_IF_NONE_MATCH'])) == md5($mtime.$_SERVER['SCRIPT_FILENAME']))
+ {
+ header("HTTP/1.1 304 Not Modified");
+ exit();
+ }
+}
+//------------------ Ende Caching ---------------------------------
+
+if (!function_exists('file_get_contents')) {
+ function file_get_contents($filename) {
+ if ($handle = @fopen($filename, 'rb')) {
+ $data = fread($handle, filesize($filename));
+ fclose($fh);
+ return $data;
+ }
+ }
+}
+
+function getMemLimit(){
+ if(ini_get("memory_limit"))return return_bytes(ini_get("memory_limit")) - memory_get_usage();
+ if(ini_get("se_memory_limit"))return return_bytes(ini_get("se_memory_limit")) - memory_get_usage();
+ return -1;
+}
+
+
+function return_bytes($size_str){
+ switch (substr ($size_str, -1))
+ {
+ case 'M': case 'm': return (int)$size_str * 1048576;
+ case 'K': case 'k': return (int)$size_str * 1024;
+ case 'G': case 'g': return (int)$size_str * 1073741824;
+ default: return $size_str;
+ }
+}
+
+function getNeededMemoryForImageCreate($width, $height) {
+ return $width*$height*5.2;
+}
+
+function imagestringwrap($image, $font, $x, $y, $text, $color, $maxwidth){
+
+ $fontwidth = imagefontwidth($font);
+ $fontheight = imagefontheight($font);
+
+ if ($maxwidth != NULL){
+ $maxcharsperline = floor($maxwidth / $fontwidth);
+ $text = wordwrap($text, $maxcharsperline, "\n", 1);
+ }
+
+ $lines = explode("\n", $text);
+ while (list($numl, $line) = each($lines)) {
+ imagestring($image, $font, $x, $y, $line, $color);
+ $y += $fontheight;
+ }
+}
+
+// -------------------------------------------------------- end functions --------------------------------------------------------------
+
+include_once("../ki_config/ki_setup.php");
+
+if(isset($_GET['file']))
+ $file = rawurldecode($_GET['file']);
+else
+ exit();
+
+$gallery = substr($file, 0, strpos($file, "/"));
+$file = substr($file, strpos($file, "/")+1);
+
+// -------------- Sicherheitsabfragen!
+if(preg_match("/[\.]*\//", $file))exit();
+if(preg_match("/[\.]*\//", $gallery))exit();
+if(!is_file("../ki_galleries/".$gallery."/".$file))exit();
+// ---------- Ende Sicherheitsabfragen!
+
+if(is_file("../ki_config/".$gallery."_ki_setup.php"))
+ include_once("../ki_config/".$gallery."_ki_setup.php");
+
+$filename = $file;
+$file = "../ki_galleries/".$gallery."/".$file;
+$imgsize = getimagesize($file);
+
+if(isset($_GET['height']))
+ $hoehe = $_GET['height'];
+else
+ $hoehe = 100;
+
+if(isset($_GET['width']))
+ $breite = $_GET['width'];
+else
+ $breite = $imgsize[0]/$imgsize[1]*$hoehe;
+
+$src_x = 0;
+$src_y = 0;
+$src_w = $imgsize[0];
+$src_h = $imgsize[1];
+
+if($th_to_square == 1 && isset($_GET['width']) && !isset($_GET['fullimg'])){
+ if($imgsize[0]/$imgsize[1] >= 1)
+ $wide = 1;
+ else
+ $wide = 0;
+
+ $custom = -1;
+ if(is_file("custom")){
+ $content = @file_get_contents("custom");
+ $pictures = explode("|", $content);
+ $picname = $gallery."_".$filename;
+ for($i = 0; $i < count($pictures); $i++){
+ if(strpos($pictures[$i], $picname) !== FALSE){
+ $custom = substr($pictures[$i], strpos($pictures[$i], "=") + 1);
+ }
+ }
+ }
+
+ if($custom == -1){
+ switch($th_2sq_crop_vert){
+ case "top":
+ $src_y = 0;
+ if($wide == 1)
+ $src_h = $imgsize[1];
+ else
+ $src_h = $imgsize[0];
+ break;
+ case "middle";
+ if($wide == 1){
+ $src_y = 0;
+ $src_h = $imgsize[1];
+ } else {
+ $src_y = $imgsize[1]*0.5-0.5*$imgsize[0];
+ $src_h = $imgsize[0];
+ }
+ break;
+ case "bottom":
+ if($wide == 1){
+ $src_y = 0;
+ $src_h = $imgsize[1];
+ } else {
+ $src_y = $imgsize[1]-$imgsize[0];
+ $src_h = $imgsize[0];
+ }
+ break;
+ }
+ switch($th_2sq_crop_hori){
+ case "left":
+ $src_x = 0;
+ if($wide == 1)
+ $src_w = $imgsize[1];
+ else
+ $src_w = $imgsize[0];
+ break;
+ case "center";
+ if($wide == 1){
+ $src_x = $imgsize[0]*0.5-0.5*$imgsize[1];
+ $src_w = $imgsize[1];
+ } else {
+ $src_x = 0;
+ $src_w = $imgsize[0];
+ }
+ break;
+ case "right":
+ if($wide == 1){
+ $src_x = $imgsize[0]-$imgsize[1];
+ $src_w = $imgsize[1];
+ } else {
+ $src_x = 0;
+ $src_w = $imgsize[0];
+ }
+ break;
+ }
+ } else {
+ if($wide == 1){
+ $src_x = $custom*$imgsize[0];
+ $src_y = 0;
+ $src_w = $imgsize[1];
+ $src_h = $imgsize[1];
+ } else {
+ $src_y = $custom*$imgsize[1];
+ $src_x = 0;
+ $src_h = $imgsize[0];
+ $src_w = $imgsize[0];
+ }
+ }
+}
+
+
+$limit = getMemLimit();
+$need = getNeededMemoryForImageCreate($imgsize[0], $imgsize[1]);
+if($need > $limit){
+ while($limit < $need){
+ if(!@ini_set("memory_limit", strval(round(return_bytes(ini_get("memory_limit"))*2))) || $limit < 0){
+ if(!isset($_GET['fullimg'])){
+ $im = imagecreate($breite, $hoehe);
+ $bg = imagecolorallocate($im, 255, 255, 255);
+ imagefill($im, 0, 0, $bg);
+ $textcolor = imagecolorallocate($im, 255, 0, 0);
+ imagestringwrap($im, 2, 2, 2, "ERROR: '".substr($file, strrpos($file, "/")+1)."' needs too much memory to create this thumb. Please reduce it's size by hand.", $textcolor, $breite-2);
+ header('Content-type: image/png');
+ imagepng($im);
+ imagedestroy($im);
+ exit();
+ } else {
+ header("Location: ".$file);
+ exit();
+ }
+ } else {
+ $limit = return_bytes(ini_get("memory_limit")) - memory_get_usage();
+ }
+ }
+}
+
+ini_set("gd.jpeg_ignore_warning", true);
+
+switch(strtolower(substr($file, -3))){
+ case "jpg":
+ $image = @imagecreatefromjpeg($file);
+ break;
+ case "png":
+ $image = @imagecreatefrompng($file);
+ break;
+ case "gif":
+ $image = @imagecreatefromgif($file);
+ break;
+ default:
+ exit;
+ break;
+}
+
+$limit = getMemLimit();
+$need = getNeededMemoryForImageCreate($breite, $hoehe);
+if($need > $limit){
+ while($limit < $need){
+ if(!@ini_set("memory_limit", strval(round(return_bytes(ini_get("memory_limit"))*2))) || $limit < 0){
+ if(!isset($_GET['fullimg'])){
+ $im = imagecreate($breite, $hoehe);
+ $bg = imagecolorallocate($im, 255, 255, 255);
+ imagefill($im, 0, 0, $bg);
+ $textcolor = imagecolorallocate($im, 255, 0, 0);
+ imagestringwrap($im, 2, 2, 2, "ERROR: '".substr($file, strrpos($file, "/")+1)."' needs too much memory to create this thumb. Please reduce it's size by hand.", $textcolor, $breite-2);
+ header('Content-type: image/png');
+ imagepng($im);
+ imagedestroy($im);
+ exit();
+ } else {
+ header("Location: ".$file);
+ exit();
+ }
+ } else {
+ $limit = return_bytes(ini_get("memory_limit")) - memory_get_usage();
+ }
+ }
+}
+
+$bild = imagecreatetruecolor($breite, $hoehe);
+imagealphablending($bild, false);
+imagesavealpha($bild, true);
+imagecopyresampled($bild, $image, 0, 0, $src_x, $src_y, $breite, $hoehe, $src_w, $src_h);
+imagedestroy($image);
+
+if(isset($_GET['picname'])){
+ $picname = rawurldecode($_GET['picname']);
+ // -------------- Sicherheitsabfragen!
+ if(preg_match("/[\.]*\//", $picname))exit();
+ // ---------- Ende Sicherheitsabfragen!
+ switch(strtolower(substr($file, -3))){
+ case "jpg":
+ @imagejpeg($bild, "../ki_galleries/".$gallery."/thumbs/".$_GET['picname'], 80);
+ break;
+ case "png":
+ @imagepng($bild, "../ki_galleries/".$gallery."/thumbs/".$_GET['picname']);
+ break;
+ case "gif":
+ @imagegif($bild, "../ki_galleries/".$gallery."/thumbs/".$_GET['picname']);
+ break;
+ }
+} else {
+ //------------------ Start Caching ---------------------------------
+ header('Last-Modified: '.$gmt_mtime);
+ header('Cache-Control: public');
+ header('Expires: '.gmdate('D, d M Y H:i:s', strtotime('+1 month')).' GMT');
+ //------------------ Ende Caching ---------------------------------
+}
+
+switch(strtolower(substr($file, -3))){
+ case "jpg":
+ header("Content-Type: image/jpeg");
+ imagejpeg($bild, "", 80);
+ break;
+ case "png":
+ header("Content-Type: image/png");
+ imagepng($bild);
+ break;
+ case "gif":
+ header("Content-Type: image/gif");
+ imagegif($bild);
+ break;
+}
+
+imagedestroy($bild);
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_managefolders.php b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_managefolders.php
new file mode 100644
index 00000000..1b8956fd
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_managefolders.php
@@ -0,0 +1,122 @@
+<?php
+session_start();
+
+/* --------------------------------------------------------- functions ------------------------------------------------------ */
+
+function calcSize($dir){
+ $size = 0;
+ $num = 0;
+ $iterator = new DirectoryIterator($dir);
+ foreach ($iterator as $fileInfo){
+ if($fileInfo->isDot()){
+ continue;
+ } else if($fileInfo->isDir()){
+ $info = calcSize($dir.$fileInfo->getBasename()."/");
+ $size += $info[1];
+ } else if($fileInfo->isFile()){
+ $size += $fileInfo->getSize();
+ $num += 1;
+ }
+ }
+ return array($num, $size);
+}
+
+function listFolders(){
+ $setting = "";
+ $iterator = new DirectoryIterator("../ki_galleries/");
+ foreach ($iterator as $fileInfo) {
+ if($fileInfo->isDot()){
+ continue;
+ } else if($fileInfo->isDir()) {
+ $info = calcSize("../ki_galleries/".$fileInfo->getBasename()."/");
+ $setting .= "{\"folder\":\"".addslashes($fileInfo->getBasename())."\", \"size\":".round(($info[1]/1024/1024), 2).", \"num\":".$info[0]." }, ";
+ }
+ }
+ $setting = substr($setting, 0, -2)." ";
+ return $setting;
+}
+
+function deleteAll($folder){
+ $iterator = new DirectoryIterator($folder);
+ foreach ($iterator as $fileInfo) {
+ if($fileInfo->isDot()){
+ continue;
+ } else if($fileInfo->isFile()){
+ @unlink($folder.$fileInfo->getBasename());
+ } else if($fileInfo->isDir()){
+ deleteAll($folder.$fileInfo->getBasename()."/");
+ }
+ }
+ return @rmdir($folder);
+}
+
+function emptyAll($folder){
+ $iterator = new DirectoryIterator($folder);
+ foreach ($iterator as $fileInfo) {
+ if($fileInfo->isDot()){
+ continue;
+ } else if($fileInfo->isFile()){
+ if(!@unlink($folder.$fileInfo->getBasename()))return false;
+ } else if($fileInfo->isDir()){
+ deleteAll($folder.$fileInfo->getBasename()."/");
+ }
+ }
+ return true;
+}
+
+/* ---------------------------------------------------------- end functions -------------------------------------------------- */
+
+include_once("../ki_config/ki_setup.php");
+
+$pwok = 0;
+if(isset($_SESSION['pwquery'])){
+ if($_SESSION['pwquery'] === $pw)$pwok = 1;
+}
+
+if($pwok == 1){
+ if(isset($_POST['list'])){
+ echo "[ ".listFolders()." ]";
+ }
+ if(isset($_POST['createnew'])){
+ $error = "";
+ $folder = "../ki_galleries/".$_POST['createnew']."/";
+ if(!is_dir($folder)){
+ if( !@mkdir($folder, 0777) ) {
+ $error = "ERROR: Could not create new folder. Check permissions.";
+ }
+ } else {
+ $error = "ERROR: Folder already exists.";
+ }
+ if($error === "")
+ echo "[ ".listFolders()." ]";
+ else
+ echo "{\"error\":\"".$error."\" }";
+ }
+ if(isset($_POST['delete'])){
+ $error = "";
+ $folder = "../ki_galleries/".$_POST['delete']."/";
+ if(is_dir($folder)){
+ if(!deleteAll($folder))$error = "ERROR: Could not delete folder. Check permissions.";
+ } else {
+ $error = "ERROR: Folder not existent.";
+ }
+ if($error === "")
+ echo "[ ".listFolders()." ]";
+ else
+ echo "{\"error\":\"".$error."\" }";
+ }
+ if(isset($_POST['empty'])){
+ $error = "";
+ $folder = "../ki_galleries/".$_POST['empty']."/";
+ if(is_dir($folder)){
+ if(!emptyAll($folder))$error = "ERROR: Could not empty folder. Check permissions.";
+ } else {
+ $error = "ERROR: Folder not existent.";
+ }
+ if($error === "")
+ echo "[ ".listFolders()." ]";
+ else
+ echo "{\"error\":\"".$error."\" }";
+ }
+}
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_mouse_help.png b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_mouse_help.png
new file mode 100644
index 00000000..74624e72
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_mouse_help.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_close.png b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_close.png
new file mode 100644
index 00000000..b2c2d106
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_close.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_download.png b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_download.png
new file mode 100644
index 00000000..4e9c99b2
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_download.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_full.png b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_full.png
new file mode 100644
index 00000000..30e18e04
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_full.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_globe.png b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_globe.png
new file mode 100644
index 00000000..d4aaa8fd
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_globe.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_info.png b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_info.png
new file mode 100644
index 00000000..431a975d
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_info.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_link.png b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_link.png
new file mode 100644
index 00000000..c2ac959d
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_link.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_next.png b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_next.png
new file mode 100644
index 00000000..45c77753
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_next.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_play.png b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_play.png
new file mode 100644
index 00000000..1603a9d6
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_play.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_prev.png b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_prev.png
new file mode 100644
index 00000000..11ef619c
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_prev.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_stop.png b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_stop.png
new file mode 100644
index 00000000..685a4cbe
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_stop.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_vcomm.png b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_vcomm.png
new file mode 100644
index 00000000..50ef6f1d
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nav_vcomm.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_next.png b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_next.png
new file mode 100644
index 00000000..699a849b
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_next.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_noimage.gif b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_noimage.gif
new file mode 100644
index 00000000..35d42e80
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_noimage.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nojs.php b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nojs.php
new file mode 100644
index 00000000..90bc2fc7
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nojs.php
@@ -0,0 +1,447 @@
+<?php
+ob_start("ob_gzhandler");
+
+//----------------------------------------------------------------------------- functions --------------------------------------------------------------------------------
+function draw_image($filename, $id, $style, $params) {
+ global $browser, $basedir;
+ $idstring = "";
+ if($id != "")$idstring = "id='".$id."' ";
+ if($browser == "ie6") {
+ $imgsize = getimagesize($filename);
+ echo "<img ".$idstring."style='filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=".$filename."); width:".$imgsize[0]."px; height:".$imgsize[1]."px; ".$style."' src='".$basedir."ki_noimage.gif' ".$params." />";
+ } else {
+ if($style != "")$style = " style='".$style."' ";
+ echo "<img ".$idstring."src='".$filename."'".$style.$params." />";
+ }
+}
+
+if (!function_exists('file_put_contents')) {
+ function file_put_contents($filename, $data) {
+ $f = @fopen($filename, 'w');
+ if (!$f) {
+ return false;
+ } else {
+ $bytes = fwrite($f, $data);
+ fclose($f);
+ return $bytes;
+ }
+ }
+}
+
+if (!function_exists('file_get_contents')) {
+ function file_get_contents($filename) {
+ if ($handle = @fopen($filename, 'rb')) {
+ $data = fread($handle, filesize($filename));
+ fclose($fh);
+ return $data;
+ }
+ }
+}
+
+function cmp_0($a, $b)
+{
+ global $galleryfolder;
+ return (filemtime($galleryfolder.$a[0]) < filemtime($galleryfolder.$b[0])) ? -1 : 1;
+}
+
+function cmp_1($a, $b)
+{
+ global $galleryfolder;
+ return (filemtime($galleryfolder.$a[0]) > filemtime($galleryfolder.$b[0])) ? -1 : 1;
+}
+
+function cmp_2($a, $b)
+{
+ global $galleryfolder;
+
+ $exif = @exif_read_data($galleryfolder.$a[0]);
+ $date1 = "";
+ if (isset($exif['DateTimeOriginal']))
+ $date1 = $exif['DateTimeOriginal'];
+ if (empty($date1) && isset($exif['DateTime']))
+ $date1 = $exif['DateTime'];
+ if (!empty($date1)){
+ $date1 = explode(':', str_replace(' ',':', $date1));
+ $date1 = "{$date1[0]}-{$date1[1]}-{$date1[2]} {$date1[3]}:{$date1[4]}";
+ if(sizeof($date1) > 5)$date1 .= ":{$date1[5]}";
+ $date1 = strtotime($date1);
+ } else {
+ $date1 = filemtime($galleryfolder.$a[0]);
+ }
+ $exif = @exif_read_data($galleryfolder.$b[0]);
+ $date2 = "";
+ if (isset($exif['DateTimeOriginal']))
+ $date2 = $exif['DateTimeOriginal'];
+ if (empty($date2) && isset($exif['DateTime']))
+ $date2 = $exif['DateTime'];
+ if (!empty($date2)){
+ $date2 = explode(':', str_replace(' ',':', $date2));
+ $date2 = "{$date2[0]}-{$date2[1]}-{$date2[2]} {$date2[3]}:{$date2[4]}";
+ if(sizeof($date2) > 5)$date2 .= ":{$date1[5]}";
+ $date2 = strtotime($date2);
+ } else {
+ $date2 = filemtime($galleryfolder.$b[0]);
+ }
+
+ return $date1 > $date2 ? 1 : -1;
+}
+
+function cmp_3($a, $b)
+{
+ return strcmp($a[0], $b[0]);
+}
+
+//-------------------------------------------------------------------------- end functions --------------------------------------------------------------------------------
+
+@ini_set("default_charset", "utf-8");
+header('Content-type: text/html; charset=utf-8');
+
+$browser = $_SERVER['HTTP_USER_AGENT'];
+
+if(preg_match("/Opera/",$browser))
+ $browser = "opera";
+elseif(preg_match("/MSIE [9]/",$browser))
+ $browser = "ie9";
+elseif(preg_match("/MSIE [7-8]/",$browser))
+ $browser = "ie7";
+elseif(preg_match("/MSIE [1-6]/",$browser))
+ $browser = "ie6";
+elseif(preg_match("/AppleWebKit/",$browser))
+ $browser = "webkit";
+else
+ $browser = "gecko";
+
+if($browser == "ie6")
+ $posfix = "absolute";
+else
+ $posfix = "fixed";
+
+$supported = array("jpg","png","gif");
+
+if(isset($_GET['gallery']))
+ $gallery = $_GET['gallery'];
+else
+ exit();
+
+if(isset($_GET['site']))
+ $site = $_GET['site'];
+else
+ exit();
+
+if(isset($_GET['startfrom']))
+ $startfrom = $_GET['startfrom'];
+else
+ $startfrom = 0;
+
+if(isset($_GET['explorer']))
+ $explorer = 1;
+else
+ $explorer = 0;
+
+// -------------- Sicherheitsabfragen!
+if(preg_match("/[\.]*\//", $gallery))exit();
+// ---------- Ende Sicherheitsabfragen!
+
+include_once("../ki_config/ki_setup.php");
+if(is_file("../ki_config/".$gallery."_ki_setup.php")){
+ include_once("../ki_config/".$gallery."_ki_setup.php");
+ $configfile = "../ki_config/".$gallery."_ki_setup.php";
+} else {
+ $configfile = "../ki_config/ki_setup.php";
+}
+$galleryfolder = "../ki_galleries/".$gallery."/";
+$thumbsfolder = $galleryfolder."thumbs/";
+$commentsfolder = $galleryfolder."comments/";
+
+$temp = getimagesize("ki_nav_next.png");
+if($nav_always == 1 && $show_nav == 1)$fr_height -= ($temp[1]+18);
+if($th_lines == "auto")$th_lines = ceil($thumbs/($th_per_line));
+if($th_width == "auto")$th_width = round($fr_width/($th_per_line)) - round($fr_height*0.04) - 4;
+if($th_height == "auto")$th_height = round($fr_height/($th_lines)) - round($fr_height*0.04) - 4;
+$th_width = $th_width - 2*$th_bord_size;
+$th_height = $th_height - 2*$th_bord_size;
+if(($th_lines*$th_per_line) < $thumbs)$thumbs = $th_lines*$th_per_line;
+
+$zeile = 1;
+$spalte = 0;
+
+$spaltenbreite = $fr_width/($th_per_line);
+$zeilenhoehe = $fr_height/($th_lines);
+?>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="koschtit_version" content="KoschtIT Image Gallery v3.1b by Konstantin Tabere" />
+<title>KoschtIT Image Gallery: <?php echo $gallery ?></title>
+<style type="text/css">
+a.nav:hover img{
+ top:-2px;
+}
+
+a.pic {
+ <?php if($th_to_square == 0) { ?>
+ line-height:<?php echo $th_height+$explorer_padding+2*$th_bord_size ?>px;
+ <?php } ?>
+}
+a.pic img {
+ border:<?php echo $th_bord_size ?>px solid <?php echo $th_bord_color ?>;
+ <?php if($explorer == 1)echo "margin:".(0.5*$explorer_padding)."px;" ?>
+ vertical-align:middle;
+}
+a.pic:hover img {
+ border-color:<?php echo $th_bord_hover_color ?>;
+ <?php if(in_array($browser, array("ie9", "opera", "gecko", "webkit"))){ ?>
+ box-shadow:0px 0px 10px #000;
+ <?php } ?>
+}
+</style>
+</head>
+<body style="background:<?php echo $fr_color ?>; padding:0px; margin:0px;">
+
+
+<?php
+
+/*------------------- error/warning checking ------------------*/
+if(!function_exists('imagecreatetruecolor')){
+ echo "<div style='background:#ffbbbb; color:#000000; padding:4px;'>ERROR: KoschtIT Image Gallery can't find the PHP GD2 Library available. Please make sure you have removed the semicolon from this line ';extension=php_gd2.dll' in your php.ini and the library is correctly installed.</div>";
+}
+if(!is_dir($galleryfolder)) {
+ echo "<div style='background:#ffbbbb; color:#000000; padding:4px;'>ERROR: KoschtIT Image Gallery can't find the following folder on the server: '".htmlentities($gallery)."' . Please check if the folder is available in the 'ki_galleries' folder.</div>";
+ exit();
+}
+if($pic_order == 3){
+ if(!function_exists("exif_read_data")){
+ $pic_order = 2;
+ }
+}
+/*------------------- end error/warning checking ------------------*/
+
+/*------------------- config settings ------------------*/
+$savefile = $gallery."_lastmodified";
+$lastmodified = filemtime($configfile);
+$saved = $fr_width.$fr_height.$thumbs.$th_per_line.$th_lines.$th_width.$th_height.$th_bord_size.$th_bord_hover_increase.$th_to_square.$th_2sq_crop_vert.$th_2sq_crop_hori.$show_nav.$nav_always;
+$writestring = "<?php\r\n\$lm_saved = \"".$saved."\";\r\n";
+$writestring .= "\$lm_lastmodified = ".$lastmodified.";\r\n?>";
+if(!file_exists($savefile))@file_put_contents($savefile, $writestring);
+if(!file_exists($savefile)) {
+ $thumbs_to_disk = 0;
+} else {
+ include_once($savefile);
+ if($lm_saved !== $saved){
+ @file_put_contents($savefile, $writestring);
+ $matches = @glob($thumbsfolder."*.*", GLOB_ERR);
+ if(is_array($matches)){
+ foreach($matches as $sf) {
+ if(!is_dir($sf) && !is_link($sf)){
+ @unlink($sf);
+ }
+ }
+ }
+ } else {
+ $lastmodified = $lm_lastmodified;
+ }
+}
+/*------------------- end config settings ------------------*/
+
+$files = array();
+$temp = array();
+$savedfolderhash = 0;
+if(is_file($gallery."_dir")){
+ $temp = explode(PHP_EOL, file_get_contents($gallery."_dir"));
+ $savedfolderhash = unserialize($temp[0]);
+}
+//$folderhash = pic_order + MTime of $galleryfolder + fileSize of all files
+$folderhash = $pic_order;
+$iterator = new DirectoryIterator($galleryfolder);
+foreach ($iterator as $fileInfo) {
+ if($fileInfo->isDot()){
+ $folderhash += $fileInfo->getMTime();
+ continue;
+ } elseif($fileInfo->isFile()) {
+ $folderhash += $fileInfo->getSize();
+ }
+}
+if($folderhash != $savedfolderhash){
+ if($pic_order == 4 && sizeof($temp) > 1){
+ $files = unserialize($temp[1]);
+ $iterator->rewind();
+ foreach ($iterator as $fileInfo) {
+ $file = $fileInfo->getFilename();
+ if(!in_array(strtolower(substr($file, -3)), $supported))$continue;
+ $imgsize = @getimagesize($galleryfolder.$file);
+ if($imgsize[0]){
+ $newcandidate = array($file, $imgsize[0], $imgsize[1]);
+ if(!in_array($newcandidate, $files))$files[] = $newcandidate;
+ }
+ }
+ reset($files);
+ } else {
+ $iterator->rewind();
+ foreach ($iterator as $fileInfo) {
+ $file = $fileInfo->getFilename();
+ if(!in_array(strtolower(substr($file, -3)), $supported))$continue;
+ $imgsize = @getimagesize($galleryfolder.$file);
+ if($imgsize[0]){
+ $files[] = array($file, $imgsize[0], $imgsize[1]);
+ }
+ }
+ switch($pic_order){
+ case 0:
+ usort($files, "cmp_1");
+ break;
+ case 1:
+ usort($files, "cmp_0");
+ break;
+ case 2:
+ usort($files, "cmp_3");
+ break;
+ case 3:
+ usort($files, "cmp_2");
+ break;
+ default:
+ usort($files, "cmp_1");
+ break;
+ }
+ reset($files);
+ }
+} else {
+ $files = unserialize($temp[1]);
+}
+
+if($explorer == 1){
+ $temp = getimagesize("ki_nav_close.png");
+?>
+<div style="position:<?php echo $posfix ?>; left:50%; top:-20px; background:<?php echo $nav_color ?>; <?php if($nav_style == 2){ ?>border-radius:20px; -moz-border-radius:20px; -webkit-border-radius:20px;<?php } ?> border:2px solid <?php echo $nav_border_color ?>; z-index:10000; padding:22px 3px 3px 3px; margin-left:-<?php echo 0.5*($temp[0]+14) ?>px;">
+ <a class="nav" href="<?php echo $site ?>"><?php draw_image("ki_nav_close.png", "", "display:block; border:0px; margin:0px 2px 0px 2px; position:relative;", "title='".htmlentities(stripslashes($nav_kiv_close), ENT_QUOTES, "UTF-8")."'") ?></a>
+</div>
+<?php
+ echo "<div style='text-align:center; padding:".($explorer_padding*0.5)."px;'>";
+}
+
+
+$id = 0;
+foreach ($files as $file) {
+ $id++;
+ if($id > $startfrom) {
+
+ $spalte++;
+ if($spalte == $th_per_line+1){
+ $zeile++;
+ $spalte = 1;
+ }
+
+ $breite = $file[1];
+ $hoehe = $file[2];
+
+ if( ($breite / $hoehe) > 1){
+ $k = $hoehe / $breite;
+ $breite = $th_width;
+ $hoehe = $k*$breite;
+ if($hoehe > $th_height){
+ $hoehe = $th_height;
+ $breite = (1/$k) * $hoehe;
+ }
+ } else {
+ $k = $breite / $hoehe;
+ $hoehe = $th_height;
+ $breite = $k*$hoehe;
+ if($breite > $th_width){
+ $breite = $th_width;
+ $hoehe = (1/$k) * $breite;
+ }
+ }
+
+ if($th_to_square == 1) {
+ if($th_width < $th_height){
+ $breite = $th_width;
+ } else {
+ $breite = $th_height;
+ }
+ $hoehe = $breite;
+ }
+
+ $x_pos = round($spaltenbreite*($spalte - 0.5) - 0.5*$breite) - $th_bord_size;
+ $y_pos = round($zeilenhoehe*($zeile - 0.5) - 0.5*$hoehe) - $th_bord_size;
+
+ $breite = round($breite);
+ $hoehe = round($hoehe);
+
+ if($th_bord_hover_increase > 1){
+ $inc_breite = round($breite*$th_bord_hover_increase);
+ $inc_hoehe = round($breite*$th_bord_hover_increase);
+ } else {
+ $inc_breite = $breite;
+ $inc_hoehe = $hoehe;
+ }
+
+ if(($zeile <= $th_lines && ($id-$startfrom) <= $thumbs) || $explorer == 1)
+ {
+ $src = "ki_makepic.php?file=".$gallery."/".rawurlencode($file[0])."&width=".$inc_breite."&height=".$inc_hoehe;
+ $style = "width:".$breite."px; height:".$hoehe."px;";
+ $exp = "";
+ if($explorer == 0){
+ $style .= " position:absolute; left:".$x_pos."px; top:".$y_pos."px;";
+ } else {
+ $exp .= "&explorer=1";
+ }
+ if($thumbs_to_disk == 1){
+ if(!is_file($thumbsfolder.$lastmodified.$file[0])){
+ $src .= "&picname=".$lastmodified.rawurlencode($file[0]);
+ } else {
+ $src = "../ki_galleries/".$gallery."/thumbs/".$lastmodified.$file[0];
+ }
+ }
+ echo "<a class='pic' href='ki_nojsdisplayimage.php?fileno=".($id-1)."&gallery=".$gallery."&site=".$site.$exp."' target='_top'><img src='".$src."' style='".$style."' /></a>";
+ }
+ }
+}
+
+
+if($explorer == 0 && $show_nav == 1){
+ $breite = 0;
+ if($nav_pos === "right"){
+ $xpos = "right:3px;";
+ } elseif($nav_pos === "left"){
+ $xpos = "left:3px;";
+ } else {
+ $temp = getimagesize("ki_nav_close.png");
+ $temp = $temp[0]+4;
+ $breite = $temp;
+ if($slideshow == 1 && $id > 1)$breite += $temp;
+ if($startfrom != 0)$breite += $temp;
+ if(($id-$startfrom) > $thumbs)$breite += $temp;
+ $xpos = "left:50%; margin-left:-".(0.5*($breite+10))."px;";
+ }
+?>
+<div style="position:<?php echo $posfix ?>; <?php echo $xpos ?> bottom:4px; background:<?php echo $nav_color ?>; <?php if($nav_style == 2){ ?>border-radius:20px; -moz-border-radius:20px; -webkit-border-radius:20px;<?php } ?> border:2px solid <?php echo $nav_border_color ?>; z-index:10000; padding:3px;">
+<a class='nav' href='ki_nojs.php?gallery=<?php echo $gallery ?>&amp;site=<?php echo $site ?>&explorer=1' target='_top' style='float:left;'><?php draw_image("ki_nav_full.png", "", "display:block; border:0px; margin:0px 2px 0px 2px; position:relative;", "title='".htmlentities(stripslashes($nav_maxi), ENT_QUOTES, "UTF-8")."'") ?></a>
+<?php
+if($slideshow == 1 && $id > 1){
+?>
+<a class='nav' href='ki_nojsdisplayimage.php?fileno=0&amp;gallery=<?php echo $gallery ?>&amp;site=<?php echo $site ?>&ss=1' target='_top' style='float:left;'><?php draw_image("ki_nav_play.png", "", "display:block; border:0px; margin:0px 2px 0px 2px; position:relative;", "title='".htmlentities(stripslashes($slideshow_start), ENT_QUOTES, "UTF-8")."'") ?></a>
+<?php
+}
+if($startfrom != 0){
+?>
+<a class='nav' href='ki_nojs.php?gallery=<?php echo $gallery ?>&amp;site=<?php echo $site ?>&startfrom=<?php echo ($startfrom-$thumbs) ?>' style='float:left;'><?php draw_image("ki_nav_prev.png", "", "display:block; border:0px; margin:0px 2px 0px 2px; position:relative;", "title='".htmlentities(stripslashes($nav_back), ENT_QUOTES, "UTF-8")."'") ?></a>
+<?php
+}
+if(($id-$startfrom) > $thumbs){
+?>
+<a class='nav' href='ki_nojs.php?gallery=<?php echo $gallery ?>&amp;site=<?php echo $site ?>&startfrom=<?php echo ($startfrom+$thumbs) ?>' style='float:left;'><?php draw_image("ki_nav_next.png", "", "display:block; border:0px; margin:0px 2px 0px 2px; position:relative;", "title='".htmlentities(stripslashes($nav_next), ENT_QUOTES, "UTF-8")."'") ?></a>
+<?php
+}
+?>
+</div>
+<?php
+}
+
+
+if($explorer == 1)echo "</div>";
+?>
+
+
+</body>
+</html> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nojsdisplayimage.php b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nojsdisplayimage.php
new file mode 100644
index 00000000..10a35720
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_nojsdisplayimage.php
@@ -0,0 +1,427 @@
+<?php
+ob_start("ob_gzhandler");
+
+/* --------------------------------------------------------- functions ------------------------------------------------------ */
+
+function draw_image($filename, $id, $style, $params) {
+ global $browser, $basedir;
+ $idstring = "";
+ if($id != "")$idstring = "id='".$id."' ";
+ if($browser == "ie6") {
+ $imgsize = getimagesize($filename);
+ echo "<img ".$idstring."style='filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=".$filename."); width:".$imgsize[0]."px; height:".$imgsize[1]."px; ".$style."' src='".$basedir."ki_noimage.gif' ".$params." />";
+ } else {
+ if($style != "")$style = " style='".$style."' ";
+ echo "<img ".$idstring."src='".$filename."'".$style.$params." />";
+ }
+}
+
+if (!function_exists('file_put_contents')) {
+ function file_put_contents($filename, $data) {
+ $f = @fopen($filename, 'w');
+ if (!$f) {
+ return false;
+ } else {
+ $bytes = fwrite($f, $data);
+ fclose($f);
+ return $bytes;
+ }
+ }
+}
+
+if (!function_exists('file_get_contents')) {
+ function file_get_contents($filename) {
+ if ($handle = @fopen($filename, 'rb')) {
+ $data = fread($handle, filesize($filename));
+ fclose($fh);
+ return $data;
+ }
+ }
+}
+
+function cmp_0($a, $b)
+{
+ global $galleryfolder;
+ return (filemtime($galleryfolder.$a[0]) < filemtime($galleryfolder.$b[0])) ? -1 : 1;
+}
+
+function cmp_1($a, $b)
+{
+ global $galleryfolder;
+ return (filemtime($galleryfolder.$a[0]) > filemtime($galleryfolder.$b[0])) ? -1 : 1;
+}
+
+function cmp_2($a, $b)
+{
+ global $galleryfolder;
+
+ $exif = @exif_read_data($galleryfolder.$a[0]);
+ $date1 = "";
+ if (isset($exif['DateTimeOriginal']))
+ $date1 = $exif['DateTimeOriginal'];
+ if (empty($date1) && isset($exif['DateTime']))
+ $date1 = $exif['DateTime'];
+ if (!empty($date1)){
+ $date1 = explode(':', str_replace(' ',':', $date1));
+ $date1 = "{$date1[0]}-{$date1[1]}-{$date1[2]} {$date1[3]}:{$date1[4]}";
+ if(sizeof($date1) > 5)$date1 .= ":{$date1[5]}";
+ $date1 = strtotime($date1);
+ } else {
+ $date1 = filemtime($galleryfolder.$a[0]);
+ }
+ $exif = @exif_read_data($galleryfolder.$b[0]);
+ $date2 = "";
+ if (isset($exif['DateTimeOriginal']))
+ $date2 = $exif['DateTimeOriginal'];
+ if (empty($date2) && isset($exif['DateTime']))
+ $date2 = $exif['DateTime'];
+ if (!empty($date2)){
+ $date2 = explode(':', str_replace(' ',':', $date2));
+ $date2 = "{$date2[0]}-{$date2[1]}-{$date2[2]} {$date2[3]}:{$date2[4]}";
+ if(sizeof($date2) > 5)$date2 .= ":{$date1[5]}";
+ $date2 = strtotime($date2);
+ } else {
+ $date2 = filemtime($galleryfolder.$b[0]);
+ }
+
+ return $date1 > $date2 ? 1 : -1;
+}
+
+function cmp_3($a, $b)
+{
+ return strcmp($a[0], $b[0]);
+}
+
+function is_utf8($str) {
+ $c=0; $b=0;
+ $bits=0;
+ $len=strlen($str);
+ for($i=0; $i<$len; $i++){
+ $c=ord($str[$i]);
+ if($c > 128){
+ if(($c >= 254)) return false;
+ elseif($c >= 252) $bits=6;
+ elseif($c >= 248) $bits=5;
+ elseif($c >= 240) $bits=4;
+ elseif($c >= 224) $bits=3;
+ elseif($c >= 192) $bits=2;
+ else return false;
+ if(($i+$bits) > $len) return false;
+ while($bits > 1){
+ $i++;
+ $b=ord($str[$i]);
+ if($b < 128 || $b > 191) return false;
+ $bits--;
+ }
+ }
+ }
+ return true;
+}
+
+function utf8_encode_safe($string){
+
+ if( is_utf8($string) )
+ return $string;
+ else
+ return utf8_encode($string);
+}
+
+/* ---------------------------------------------------------- end functions -------------------------------------------------- */
+
+$browser = $_SERVER['HTTP_USER_AGENT'];
+
+if(preg_match("/Opera/",$browser))
+ $browser = "opera";
+elseif(preg_match("/MSIE [9]/",$browser))
+ $browser = "ie9";
+elseif(preg_match("/MSIE [7-8]/",$browser))
+ $browser = "ie7";
+elseif(preg_match("/MSIE [1-6]/",$browser))
+ $browser = "ie6";
+elseif(preg_match("/AppleWebKit/",$browser))
+ $browser = "webkit";
+else
+ $browser = "gecko";
+
+if($browser == "ie6")
+ $posfix = "absolute";
+else
+ $posfix = "fixed";
+
+/* --------------------------------------------------------- Display full image ---------------------------------------------------------------------- */
+
+@ini_set("default_charset", "utf-8");
+header('Content-type: text/html; charset=utf-8');
+
+if(isset($_GET['fileno']))
+ $fileno = $_GET['fileno'];
+else
+ exit;
+
+if(isset($_GET['gallery']))
+ $gallery = $_GET['gallery'];
+else
+ exit;
+
+if(isset($_GET['site']))
+ $site = $_GET['site'];
+else
+ exit;
+
+if(isset($_GET['explorer']))
+ $explorer = 1;
+else
+ $explorer = 0;
+
+if(isset($_GET['ss']))
+ $ss = 1;
+else
+ $ss = 0;
+
+// -------------- Sicherheitsabfragen!
+if(!is_int(intval($fileno)))exit();
+if(preg_match("/[\.]*\//", $gallery))exit();
+// ---------- Ende Sicherheitsabfragen!
+
+include_once("../ki_config/ki_setup.php");
+if(is_file("../ki_config/".$gallery."_ki_setup.php"))include_once("../ki_config/".$gallery."_ki_setup.php");
+
+$supported = array("jpg","png","gif");
+
+$galleryfolder = "../ki_galleries/".$gallery."/";
+
+/*------------------- error/warning checking ------------------*/
+if(!is_dir($galleryfolder)) {
+ echo "<div style='background:#ffbbbb; color:#000000; padding:4px;'>ERROR: KoschtIT Image Gallery could't find the following folder on the server: '".htmlentities($gallery)."' . Please check if the folder is available in the 'ki_galleries' folder.</div>";
+ exit();
+}
+if($pic_order == 3){
+ if(!function_exists("exif_read_data")){
+ $pic_order = 2;
+ }
+}
+/*------------------- end error/warning checking ------------------*/
+
+$files = array();
+$temp = array();
+$savedfolderhash = 0;
+if(is_file($gallery."_dir")){
+ $temp = explode(PHP_EOL, file_get_contents($gallery."_dir"));
+ $savedfolderhash = unserialize($temp[0]);
+}
+//$folderhash = pic_order + MTime of $galleryfolder + fileSize of all files
+$folderhash = $pic_order;
+$iterator = new DirectoryIterator($galleryfolder);
+foreach ($iterator as $fileInfo) {
+ if($fileInfo->isDot()){
+ $folderhash += $fileInfo->getMTime();
+ continue;
+ } elseif($fileInfo->isFile()) {
+ $folderhash += $fileInfo->getSize();
+ }
+}
+if($folderhash != $savedfolderhash){
+ if($pic_order == 4 && sizeof($temp) > 1){
+ $files = unserialize($temp[1]);
+ $iterator->rewind();
+ foreach ($iterator as $fileInfo) {
+ $file = $fileInfo->getFilename();
+ if(!in_array(strtolower(substr($file, -3)), $supported))$continue;
+ $imgsize = @getimagesize($galleryfolder.$file);
+ if($imgsize[0]){
+ $newcandidate = array($file, $imgsize[0], $imgsize[1]);
+ if(!in_array($newcandidate, $files))$files[] = $newcandidate;
+ }
+ }
+ reset($files);
+ } else {
+ $iterator->rewind();
+ foreach ($iterator as $fileInfo) {
+ $file = $fileInfo->getFilename();
+ if(!in_array(strtolower(substr($file, -3)), $supported))$continue;
+ $imgsize = @getimagesize($galleryfolder.$file);
+ if($imgsize[0]){
+ $files[] = array($file, $imgsize[0], $imgsize[1]);
+ }
+ }
+ switch($pic_order){
+ case 0:
+ usort($files, "cmp_1");
+ break;
+ case 1:
+ usort($files, "cmp_0");
+ break;
+ case 2:
+ usort($files, "cmp_3");
+ break;
+ case 3:
+ usort($files, "cmp_2");
+ break;
+ default:
+ usort($files, "cmp_1");
+ break;
+ }
+ reset($files);
+ }
+} else {
+ $files = unserialize($temp[1]);
+}
+
+$file = $files[$fileno][0];
+
+$x = $files[$fileno][1];
+$y = $files[$fileno][2];
+
+$xlimiter = 10000;
+$ylimiter = 10000;
+if(is_int($max_pic_width)){
+ $xlimiter = $max_pic_width;
+}
+if(is_int($max_pic_height)){
+ $ylimiter = $max_pic_height;
+}
+if($y > $ylimiter || $x > $xlimiter){
+ if(($x / $y) > 1){
+ $k = $y / $x;
+ $x = $xlimiter-2*$bord_size;
+ $y = $k*$x;
+ if($y > $ylimiter-2*$bord_size){
+ $y = $ylimiter-2*$bord_size;
+ $x = (1/$k) * $y;
+ }
+ } else {
+ $k = $x / $y;
+ $y = $ylimiter-2*$bord_size;
+ $x = $k*$y;
+ if($x > $xlimiter-2*$bord_size){
+ $x = $xlimiter-2*$bord_size;
+ $y = (1/$k) * $x;
+ }
+ }
+ $x = round($x);
+ $y = round($y);
+}
+
+$commfile = "../ki_galleries/".$gallery."/comments/".substr($file, 0, -4).".txt";
+$srcfile = $gallery."/".$file;
+
+if($x != $files[$fileno][1] || $y != $files[$fileno][2]){
+ $srcfile = "ki_makepic.php?fullimg=1&file=".$srcfile."&width=".$x."&height=".$y;
+} else {
+ $srcfile = "../ki_galleries/".$srcfile;
+}
+?>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="koschtit_version" content="KoschtIT Image Gallery v3.1b by Konstantin Tabere" />
+<?php
+$next = $fileno+1;
+if($next == count($files))$next = 0;
+if($ss == 1 && $slideshow == 1){
+?>
+<meta http-equiv="refresh" content="<?php echo $slideshow_time/1000 ?>; url=ki_nojsdisplayimage.php?fileno=<?php echo $next ?>&gallery=<?php echo $gallery ?>&site=<?php echo $site;if($explorer == 1)echo "&explorer=1"; ?>&ss=1">
+<?php
+}
+?>
+<title>KoschtIT Image Gallery: <?php echo $gallery ?></title>
+<style type="text/css">
+a.nav:hover img{
+ top:-2px;
+}
+</style>
+</head>
+<body style="background:<?php echo $fade_color ?>; padding:0px; margin:0px;">
+
+<?php
+if($show_image_nav == 1){
+ $temp = getimagesize("ki_nav_close.png");
+ if(count($files > 1))
+ $breite = ($temp[0]+4)*3;
+ else
+ $breite = ($temp[0]+4)*2;
+ if($downloadpics == 1)$breite += ($temp[0]+4);
+ if($slideshow == 1)$breite += ($temp[0]+4);
+?>
+<div style="position:<?php echo $posfix ?>; left:50%; top:-20px; background:<?php echo $nav_color ?>; <?php if($nav_style == 2){ ?>border-radius:20px; -moz-border-radius:20px; -webkit-border-radius:20px;<?php } ?> border:2px solid <?php echo $nav_border_color ?>; z-index:10000; padding:22px 3px 3px 3px; margin-left:-<?php echo 0.5*($breite+10) ?>px;">
+ <a class="nav" href="<?php echo ($explorer == 0) ? $site : "ki_nojs.php?gallery=".$gallery."&site=".$site."&explorer=1"; ?>" style="float:left;"><?php draw_image("ki_nav_close.png", "", "display:block; border:0px; margin:0px 2px 0px 2px; position:relative;", "title='".htmlentities(stripslashes($nav_kiv_close), ENT_QUOTES, "UTF-8")."'") ?></a>
+ <?php
+ if($slideshow == 1){
+ if($ss == 1){
+ $sstitle = $slideshow_stop;
+ $sspic = "ki_nav_stop";
+ $sshref = "?fileno=".$fileno."&gallery=".$gallery."&site=".$site;
+ } else {
+ $sstitle = $slideshow_start;
+ $sspic = "ki_nav_play";
+ $sshref = "?fileno=".$next."&gallery=".$gallery."&site=".$site."&ss=1";
+ }
+ if($explorer == 1)$sshref .= "&explorer=1";
+ ?>
+ <a class="nav" href="<?php echo $sshref ?>" style="float:left;"><?php draw_image($sspic.".png", "", "display:block; border:0px; margin:0px 2px 0px 2px; position:relative;", "title='".htmlentities(stripslashes($sstitle), ENT_QUOTES, "UTF-8")."'") ?></a>
+ <?php
+ }
+ ?>
+ <?php if($downloadpics == 1){ ?>
+ <a class="nav" href="ki_download.php?gallery=<?php echo $gallery ?>&file=<?php echo $file ?>" style="float:left;" target="_blank"><?php draw_image("ki_nav_download.png", "", "display:block; border:0px; margin:0px 2px 0px 2px; position:relative;", "title='".htmlentities(stripslashes($nav_kiv_download), ENT_QUOTES, "UTF-8")."'") ?></a>
+ <?php } ?>
+ <?php
+ $next = $fileno+1;
+ $prev = $fileno-1;
+ if(count($files) > 1){
+ if($next == count($files))$next = 0;
+ if($prev == -1)$prev = count($files)-1;
+ ?>
+ <a class="nav" href="?fileno=<?php echo $prev ?>&gallery=<?php echo $gallery ?>&site=<?php echo $site;if($explorer == 1)echo "&explorer=1"; ?>" style="float:left;"><?php draw_image("ki_nav_prev.png", "", "display:block; border:0px; margin:0px 2px 0px 2px; position:relative;", "title='".htmlentities(stripslashes($nav_kiv_back), ENT_QUOTES, "UTF-8")."'") ?></a>
+ <a class="nav" href="?fileno=<?php echo $next ?>&gallery=<?php echo $gallery ?>&site=<?php echo $site;if($explorer == 1)echo "&explorer=1"; ?>" style="float:left;"><?php draw_image("ki_nav_next.png", "", "display:block; border:0px; margin:0px 2px 0px 2px; position:relative;", "title='".htmlentities(stripslashes($nav_kiv_next), ENT_QUOTES, "UTF-8")."'") ?></a>
+ <?php
+ }
+ ?>
+</div>
+<?php
+}
+?>
+
+<div style="position:<?php echo $posfix ?>; left:50%; top:50%; margin-left:-<?php echo round($x*0.5+$bord_size) ?>px; margin-top:-<?php echo round($y*0.5+$bord_size) ?>px; width:<?php echo ($x+2*$bord_size) ?>px; height:<?php echo ($y+2*$bord_size) ?>px; background:<?php echo $bord_color ?>">
+<a href="?fileno=<?php echo $next ?>&gallery=<?php echo $gallery ?>&site=<?php echo $site;if($explorer == 1)echo "&explorer=1"; ?>" style="display:block; text-decoration:none;">
+<?php
+$addshadow = "";
+if(in_array($browser, array("ie9", "opera", "gecko", "webkit"))){
+$addshadow = "box-shadow:inset 0px 0px 10px #000; ";
+}
+echo "<img src='".$srcfile."' style='border:none; padding:".$bord_size."px;' /><div style='width:".$x."px; height:".$y."px; z-index:1000; ".$addshadow."position:absolute; top:0px; left:0px; border:".$bord_size."px solid ".$bord_color."'></div>";
+?>
+</a>
+<?php
+if(is_file($commfile)){
+ $comm = file_get_contents($commfile);
+} else {
+ $comm = "";
+}
+
+if($comm_auto == 1){
+ $comm = $comm_auto_string;
+ $comm = str_replace("%x", ($fileno+1), $comm);
+ $comm = str_replace("%X", count($files), $comm);
+ $comm = str_replace("%g", $gallery, $comm);
+ $comm = str_replace("%f", substr($file, 0, -4), $comm);
+}
+
+if($comments == 1){
+ if($comm != ""){
+ $pos = "left:0px;";
+ if($comm_text_align === "left"){
+ echo "<div style='position:absolute; left:0px; top:100%; background:".$bord_color."; padding:10px; overflow:hidden; font:".$comm_text_size."px ".$comm_text_font."; color:".$comm_text_color."; margin-top:5px; text-align:".$comm_text_align.";'>".utf8_encode_safe(stripslashes($comm))."</div>";
+ }elseif($comm_text_align === "right"){
+ echo "<div style='position:absolute; right:0px; top:100%; background:".$bord_color."; padding:10px; overflow:hidden; font:".$comm_text_size."px ".$comm_text_font."; color:".$comm_text_color."; margin-top:5px; text-align:".$comm_text_align.";'>".utf8_encode_safe(stripslashes($comm))."</div>";
+ }else{
+ echo "<div style='position:absolute; left:50%; top:100%;'><div style='position:relative; left:-50%; background:".$bord_color."; padding:10px; overflow:hidden; font:".$comm_text_size."px ".$comm_text_font."; color:".$comm_text_color."; margin-top:5px; text-align:".$comm_text_align.";'>".utf8_encode_safe(stripslashes($comm))."</div></div>";
+ }
+ }
+}
+?>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_online_docu.jpg b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_online_docu.jpg
new file mode 100644
index 00000000..be39a2c6
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_online_docu.jpg
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_preview.php b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_preview.php
new file mode 100644
index 00000000..6298e9dc
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_preview.php
@@ -0,0 +1,240 @@
+<?php
+ob_start("ob_gzhandler");
+
+$browser = $_SERVER['HTTP_USER_AGENT'];
+
+if(preg_match("/Opera/",$browser))
+ $browser = "opera";
+elseif(preg_match("/MSIE [7-9]/",$browser))
+ $browser = "ie7";
+elseif(preg_match("/MSIE [1-6]/",$browser))
+ $browser = "ie6";
+elseif(preg_match("/AppleWebKit/",$browser))
+ $browser = "webkit";
+else
+ $browser = "gecko";
+
+$reldir = "";
+if(isset($_POST['reldir']))$reldir = $_POST['reldir'];
+$confdir = $reldir."ki_config/";
+$galleriesdir = $reldir."ki_galleries/";
+$basedir = $reldir."ki_base/";
+
+//----------------------------------------------------------------------------- functions --------------------------------------------------------------------------------
+
+if (!function_exists('file_put_contents')) {
+ function file_put_contents($filename, $data) {
+ $f = @fopen($filename, 'w');
+ if (!$f) {
+ return false;
+ } else {
+ $bytes = fwrite($f, $data);
+ fclose($f);
+ return $bytes;
+ }
+ }
+}
+
+if (!function_exists('file_get_contents')) {
+ function file_get_contents($filename) {
+ if ($handle = @fopen($filename, 'rb')) {
+ $data = fread($handle, filesize($filename));
+ fclose($fh);
+ return $data;
+ }
+ }
+}
+
+function cmp_0($a, $b)
+{
+ global $galleryfolder;
+ return (filemtime($galleryfolder.$a[0]) < filemtime($galleryfolder.$b[0])) ? -1 : 1;
+}
+
+function cmp_1($a, $b)
+{
+ global $galleryfolder;
+ return (filemtime($galleryfolder.$a[0]) > filemtime($galleryfolder.$b[0])) ? -1 : 1;
+}
+
+function cmp_2($a, $b)
+{
+ global $galleryfolder;
+
+ $exif = @exif_read_data($galleryfolder.$a[0]);
+ $date1 = "";
+ if (isset($exif['DateTimeOriginal']))
+ $date1 = $exif['DateTimeOriginal'];
+ if (empty($date1) && isset($exif['DateTime']))
+ $date1 = $exif['DateTime'];
+ if (!empty($date1)){
+ $date1 = explode(':', str_replace(' ',':', $date1));
+ $date1 = "{$date1[0]}-{$date1[1]}-{$date1[2]} {$date1[3]}:{$date1[4]}";
+ if(sizeof($date1) > 5)$date1 .= ":{$date1[5]}";
+ $date1 = strtotime($date1);
+ } else {
+ $date1 = filemtime($galleryfolder.$a[0]);
+ }
+ $exif = @exif_read_data($galleryfolder.$b[0]);
+ $date2 = "";
+ if (isset($exif['DateTimeOriginal']))
+ $date2 = $exif['DateTimeOriginal'];
+ if (empty($date2) && isset($exif['DateTime']))
+ $date2 = $exif['DateTime'];
+ if (!empty($date2)){
+ $date2 = explode(':', str_replace(' ',':', $date2));
+ $date2 = "{$date2[0]}-{$date2[1]}-{$date2[2]} {$date2[3]}:{$date2[4]}";
+ if(sizeof($date2) > 5)$date2 .= ":{$date1[5]}";
+ $date2 = strtotime($date2);
+ } else {
+ $date2 = filemtime($galleryfolder.$b[0]);
+ }
+
+ return $date1 > $date2 ? 1 : -1;
+}
+
+function cmp_3($a, $b)
+{
+ return strcmp($a[0], $b[0]);
+}
+
+//-------------------------------------------------------------------------- end functions --------------------------------------------------------------------------------
+
+
+if(isset($_POST['file']))
+ $file = rawurldecode($_POST['file']);
+else
+ exit;
+
+if(isset($_POST['gallery']))
+ $gallery = $_POST['gallery'];
+else
+ exit;
+
+if(isset($_POST['topic']))
+ $topic = $_POST['topic'];
+else
+ exit;
+
+// -------------- Sicherheitsabfragen!
+if(preg_match("/[\.]*\//", $file))exit();
+if(preg_match("/[\.]*\//", $gallery))exit();
+if(!is_file("../ki_galleries/".$gallery."/".$file))exit();
+// ---------- Ende Sicherheitsabfragen!
+
+include_once("../ki_config/ki_setup.php");
+if(is_file("../ki_config/".$gallery."_ki_setup.php"))include_once("../ki_config/".$gallery."_ki_setup.php");
+
+/*------------------- error/warning checking ------------------*/
+if($pic_order == 3){
+ if(!function_exists("exif_read_data")){
+ $pic_order = 2;
+ }
+}
+/*------------------- end error/warning checking ------------------*/
+
+$supported = array("jpg","png","gif");
+$galleryfolder = "../ki_galleries/".$gallery."/";
+if(!is_dir($galleryfolder))exit();
+
+$files = array();
+$temp = array();
+$savedfolderhash = 0;
+if(is_file($gallery."_dir")){
+ $temp = explode(PHP_EOL, file_get_contents($gallery."_dir"));
+ $savedfolderhash = unserialize($temp[0]);
+}
+//$folderhash = pic_order + MTime of $galleryfolder + fileSize of all files
+$folderhash = $pic_order;
+$iterator = new DirectoryIterator($galleryfolder);
+foreach ($iterator as $fileInfo) {
+ if($fileInfo->isDot()){
+ $folderhash += $fileInfo->getMTime();
+ continue;
+ } elseif($fileInfo->isFile()) {
+ $folderhash += $fileInfo->getSize();
+ }
+}
+if($folderhash != $savedfolderhash){
+ if($pic_order == 4 && sizeof($temp) > 1){
+ $files = unserialize($temp[1]);
+ $iterator->rewind();
+ foreach ($iterator as $fileInfo) {
+ $file = $fileInfo->getFilename();
+ if(!in_array(strtolower(substr($file, -3)), $supported))$continue;
+ $imgsize = @getimagesize($galleryfolder.$file);
+ if($imgsize[0]){
+ $newcandidate = array($file, $imgsize[0], $imgsize[1]);
+ if(!in_array($newcandidate, $files))$files[] = $newcandidate;
+ }
+ }
+ reset($files);
+ } else {
+ $iterator->rewind();
+ foreach ($iterator as $fileInfo) {
+ $tfile = $fileInfo->getFilename();
+ if(!in_array(strtolower(substr($tfile, -3)), $supported))$continue;
+ $imgsize = @getimagesize($galleryfolder.$tfile);
+ if($imgsize[0]){
+ $files[] = array($tfile, $imgsize[0], $imgsize[1]);
+ }
+ }
+ switch($pic_order){
+ case 0:
+ usort($files, "cmp_1");
+ break;
+ case 1:
+ usort($files, "cmp_0");
+ break;
+ case 2:
+ usort($files, "cmp_3");
+ break;
+ case 3:
+ usort($files, "cmp_2");
+ break;
+ default:
+ usort($files, "cmp_1");
+ break;
+ }
+ reset($files);
+ }
+} else {
+ $files = unserialize($temp[1]);
+}
+
+$id = -1;
+foreach ($files as $picfile) {
+ $id++;
+ if($picfile[0] == $file){
+ break;
+ }
+}
+
+$gesbreite = 0;
+
+if($topic == 1){
+ $id++;
+ for($i = 0; $i < $preview_pics; $i++){
+ if($id + $i >= count($files))break;
+ $srcfile = $basedir."ki_makepic.php?file=".$gallery."/".rawurlencode($files[$id+$i][0]);
+ $y = 100;
+ $x = floor($files[$id+$i][1]/$files[$id+$i][2]*100);
+ $gesbreite += $x + 4;
+ echo "<img src='".$srcfile."' style='float:left; display:block; margin:0px 2px 0px 2px; border:0px; padding:0px; cursor:pointer; visibility:hidden; width:".$x."px; height:".$y."px;' onclick=\"kiv.getImage(-1, ".($id+$i).")\" onload=\"this.style.visibility='visible'\" />";
+
+ }
+} else {
+ $id--;
+ for($i = 0; $i < $preview_pics; $i++){
+ if($id - $i < 0)break;
+ $srcfile = $basedir."ki_makepic.php?file=".$gallery."/".rawurlencode($files[$id-$i][0]);
+ $y = 100;
+ $x = floor($files[$id-$i][1]/$files[$id-$i][2]*100);
+ $gesbreite += $x + 4;
+ echo "<img src='".$srcfile."' style='float:right; display:block; margin:0px 2px 0px 2px; border:0px; padding:0px; cursor:pointer; visibility:hidden; width:".$x."px; height:".$y."px;' onclick=\"kiv.getImage(-1, ".($id-$i).")\" onload=\"this.style.visibility='visible'\" />";
+ }
+}
+
+echo "<input id='gesbreite' type='hidden' value='".($gesbreite)."' />";
+?>
+
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_savecomment.php b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_savecomment.php
new file mode 100644
index 00000000..365f6d5b
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_savecomment.php
@@ -0,0 +1,65 @@
+<?php
+session_start();
+
+/* --------------------------------------------------------- functions ------------------------------------------------------ */
+
+if (!function_exists('file_put_contents')) {
+ function file_put_contents($filename, $data) {
+ $f = @fopen($filename, 'w');
+ if (!$f) {
+ return false;
+ } else {
+ $bytes = fwrite($f, $data);
+ fclose($f);
+ return $bytes;
+ }
+ }
+}
+
+/* ---------------------------------------------------------- end functions -------------------------------------------------- */
+
+include_once("../ki_config/ki_setup.php");
+
+if (get_magic_quotes_gpc()) {
+ function stripslashes_gpc(&$value)
+ {
+ $value = stripslashes($value);
+ }
+ array_walk_recursive($_GET, 'stripslashes_gpc');
+ array_walk_recursive($_POST, 'stripslashes_gpc');
+ array_walk_recursive($_COOKIE, 'stripslashes_gpc');
+ array_walk_recursive($_REQUEST, 'stripslashes_gpc');
+}
+
+if(isset($_POST['file']))
+ $file = rawurldecode($_POST['file']);
+else
+ exit;
+
+if(isset($_POST['gallery']))
+ $gallery = $_POST['gallery'];
+else
+ exit;
+
+// -------------- Sicherheitsabfragen!
+if(preg_match("/[\.]*\//", $file))exit();
+if(preg_match("/[\.]*\//", $gallery))exit();
+if(!is_file("../ki_galleries/".$gallery."/".$file))exit();
+// ---------- Ende Sicherheitsabfragen!
+
+if(isset($_POST['comment']))
+ $comment = addslashes(rawurldecode($_POST['comment']));
+else
+ $comment = "";
+
+$pwok = 0;
+if(isset($_SESSION['pwquery'])){
+ if($_SESSION['pwquery'] === $pw)$pwok = 1;
+}
+
+if($pwok == 1){
+ $commfile = "../ki_galleries/".$gallery."/comments/".substr($file, 0, -4).".txt";
+ file_put_contents($commfile, $comment);
+}
+?>
+
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_saveneworder.php b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_saveneworder.php
new file mode 100644
index 00000000..3aa7eaec
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_saveneworder.php
@@ -0,0 +1,129 @@
+<?php
+session_start();
+
+/* --------------------------------------------------------- functions ------------------------------------------------------ */
+
+if (!function_exists('file_put_contents')) {
+ function file_put_contents($filename, $data) {
+ $f = @fopen($filename, 'w');
+ if (!$f) {
+ return false;
+ } else {
+ $bytes = fwrite($f, $data);
+ fclose($f);
+ return $bytes;
+ }
+ }
+}
+
+if (!function_exists('file_get_contents')) {
+ function file_get_contents($filename) {
+ if ($handle = @fopen($filename, 'rb')) {
+ $data = fread($handle, filesize($filename));
+ fclose($fh);
+ return $data;
+ }
+ }
+}
+
+/* ---------------------------------------------------------- end functions -------------------------------------------------- */
+
+include_once("../ki_config/ki_setup.php");
+
+if(isset($_POST['gallery']))
+ $gallery = $_POST['gallery'];
+else
+ exit;
+
+if(isset($_POST['oldpos']))
+ $oldpos = intval($_POST['oldpos']);
+else
+ exit;
+
+if(isset($_POST['newpos']))
+ $newpos = intval($_POST['newpos']);
+else
+ exit;
+
+// -------------- Sicherheitsabfragen!
+if(preg_match("/[\.]*\//", $gallery))exit();
+// ---------- Ende Sicherheitsabfragen!
+
+$pwok = 0;
+if(isset($_SESSION['pwquery'])){
+ if($_SESSION['pwquery'] === $pw)$pwok = 1;
+}
+
+if($pwok == 1){
+
+ $files = array();
+ $temp = array();
+ $newfiles = array();
+ $savedfolderhash = 0;
+ if(is_file($gallery."_dir")){
+ $temp = explode(PHP_EOL, file_get_contents($gallery."_dir"));
+ $savedfolderhash = unserialize($temp[0]);
+ $files = unserialize($temp[1]);
+
+ if($oldpos > $newpos){
+ for($i = 0; $i < sizeof($files); $i++){
+ if($i < $newpos || $i > $oldpos){
+ $newfiles[] = $files[$i];
+ continue;
+ }
+ if($i == $newpos){
+ $newfiles[] = $files[$oldpos];
+ continue;
+ }
+ if($i <= $oldpos){
+ $newfiles[] = $files[$i-1];
+ continue;
+ }
+ }
+ } else {
+ for($i = 0; $i < sizeof($files); $i++){
+ if($i < $oldpos || $i > $newpos){
+ $newfiles[] = $files[$i];
+ continue;
+ }
+ if($i < $newpos){
+ $newfiles[] = $files[$i+1];
+ continue;
+ }
+ if($i == $newpos){
+ $newfiles[] = $files[$oldpos];
+ continue;
+ }
+ }
+ }
+
+ if(@file_put_contents($gallery."_dir", serialize($savedfolderhash).PHP_EOL.serialize($newfiles)) > 0){
+ $setupfile = "../ki_config/".$gallery."_ki_setup.php";
+ $params = "";
+ if(is_file($setupfile)){
+ $temp = explode(PHP_EOL, file_get_contents($setupfile));
+ $set = 0;
+ for($i = 1; $i < sizeof($temp) - 1; $i++){
+ if(strpos($temp[$i], "\$pic_order") !== FALSE){
+ $params .= "\$pic_order = 4;\r\n";
+ $set = 1;
+ } else {
+ $params .= $temp[$i]."\r\n";
+ }
+ }
+ if($set == 0){
+ $params .= "\$pic_order = 4;\r\n";
+ }
+ } else {
+ $params = "\$pic_order = 4;\r\n";
+ }
+ $params = "<?php\r\n".$params."?>";
+ if(@file_put_contents($setupfile, $params) > 0){
+ echo "ok";
+ }
+ }
+
+ }
+
+}
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_savesquarethumb.php b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_savesquarethumb.php
new file mode 100644
index 00000000..28f1993d
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_savesquarethumb.php
@@ -0,0 +1,101 @@
+<?php
+session_start();
+
+//----------------------------------------------------------------------------- functions --------------------------------------------------------------------------------
+
+if (!function_exists('file_get_contents')) {
+ function file_get_contents($filename) {
+ if ($handle = @fopen($filename, 'rb')) {
+ $data = fread($handle, filesize($filename));
+ fclose($fh);
+ return $data;
+ }
+ }
+}
+
+if (!function_exists('file_put_contents')) {
+ function file_put_contents($filename, $data) {
+ $f = @fopen($filename, 'w');
+ if (!$f) {
+ return false;
+ } else {
+ $bytes = fwrite($f, $data);
+ fclose($f);
+ return $bytes;
+ }
+ }
+}
+
+//-------------------------------------------------------------------------- end functions --------------------------------------------------------------------------------
+
+include_once("../ki_config/ki_setup.php");
+
+if(isset($_POST['file']))
+ $file = rawurldecode($_POST['file']);
+else
+ exit();
+
+if(isset($_POST['pos']))
+ $pos = $_POST['pos'];
+else
+ exit();
+
+$gallery = substr($file, 0, strpos($file, "/"));
+$file = substr($file, strpos($file, "/")+1);
+
+// -------------- Sicherheitsabfragen!
+if(preg_match("/[\.]*\//", $file))exit();
+if(preg_match("/[\.]*\//", $gallery))exit();
+if(!is_file("../ki_galleries/".$gallery."/".$file))exit();
+// ---------- Ende Sicherheitsabfragen!
+
+$pwok = 0;
+if(isset($_SESSION['pwquery'])){
+ if($_SESSION['pwquery'] === $pw)$pwok = 1;
+}
+
+if($pwok == 1){
+ if(is_file("../ki_config/".$gallery."_ki_setup.php")){
+ include_once("../ki_config/".$gallery."_ki_setup.php");
+ $configfile = "../ki_config/".$gallery."_ki_setup.php";
+ } else {
+ $configfile = "../ki_config/ki_setup.php";
+ }
+
+ /*------------------- change config settings ------------------*/
+ $savefile = $gallery."_lastmodified";
+ $writestring = "<?php\r\n\$lm_saved = \"1\";\r\n";
+ $writestring .= "\$lm_lastmodified = \"1\";\r\n?>";
+ @file_put_contents($savefile, $writestring);
+ $oldcontent = file_get_contents($configfile);
+ if(substr($oldcontent, -1) === "\n"){
+ $oldcontent = substr($oldcontent, 0, -1);
+ } else {
+ $oldcontent .= "\n";
+ }
+ @file_put_contents($configfile, $oldcontent);
+ /*------------------- end change config settings ------------------*/
+
+ $picname = $gallery."_".$file;
+ if(!is_file("custom")){
+ @file_put_contents("custom", $picname."=".$pos);
+ } else {
+ $content = @file_get_contents("custom");
+ $pictures = explode("|", $content);
+ $newcontent = "";
+ $found = 0;
+ for($i = 0; $i < count($pictures); $i++){
+ if(strpos($pictures[$i], $picname) !== FALSE){
+ $pictures[$i] = $picname."=".$pos;
+ $found = 1;
+ }
+ $newcontent .= $pictures[$i]."|";
+ }
+ if($found == 0){
+ $newcontent .= $picname."=".$pos."|";
+ }
+ $newcontent = substr($newcontent, 0, -1);
+ @file_put_contents("custom", $newcontent);
+ }
+}
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_shade.php b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_shade.php
new file mode 100644
index 00000000..ff203826
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_shade.php
@@ -0,0 +1,41 @@
+<?php
+include("../ki_config/ki_setup.php");
+
+$browser = $_SERVER['HTTP_USER_AGENT'];
+
+if(preg_match("/Opera/",$browser))
+ $browser = "opera";
+elseif(preg_match("/MSIE [7-9]/",$browser))
+ $browser = "ie7";
+elseif(preg_match("/MSIE [1-6]/",$browser))
+ $browser = "ie6";
+elseif(preg_match("/AppleWebKit/",$browser))
+ $browser = "webkit";
+else
+ $browser = "gecko";
+
+header("Content-type: image/png"); //Picture Format
+header("Expires: Mon, 01 Jul 2003 00:00:00 GMT"); // Past date
+header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // Consitnuously modified
+header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
+header("Pragma: no-cache"); // NO CACHE
+
+if($browser === "ie6"){
+ $bild = imagecreatetruecolor(1, 1);
+} else {
+ $bild = imagecreate(2880, 1800);
+}
+imagealphablending($bild, false);
+imagesavealpha($bild, true);
+$r = hexdec(substr($fade_color, 1, 2));
+$g = hexdec(substr($fade_color, 3, 2));
+$b = hexdec(substr($fade_color, 5, 2));
+$farbe = imagecolorallocatealpha($bild, $r, $g, $b, ((10-$fade_alpha)/10)*127);
+if($browser === "ie6"){
+ ImageFilledRectangle($bild,0,0,1,1,$farbe);
+} else {
+ ImageFilledRectangle($bild,0,0,2880,1800,$farbe);
+}
+imagepng($bild);
+imagedestroy($bild);
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_upload.php b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_upload.php
new file mode 100644
index 00000000..afd72d8b
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_upload.php
@@ -0,0 +1,243 @@
+<?php
+session_start();
+
+include_once("../ki_config/ki_setup.php");
+
+$pwok = 0;
+if(isset($_SESSION['pwquery'])){
+ if($_SESSION['pwquery'] === $pw || $_SESSION['pwquery'] === $userpw)$pwok = 1;
+}
+
+if($pwok == 1){
+ $supported = array("jpg","png","gif", "jpeg");
+
+ if(is_uploaded_file($_FILES['pic']['tmp_name'])){
+
+ $thefile = $_FILES['pic'];
+
+ if(isset($_POST['watermark'])){
+ $target_name = "../ki_base/ki_watermark.pic";
+ $temp = explode('.', strtolower($thefile['name']));
+ if(in_array($temp[1], $supported)){
+ if(move_uploaded_file($thefile['tmp_name'], $target_name)){
+?>
+<script>
+parent.kiu.uploadedWatermark();
+</script>
+<?php
+ }
+ }
+ } else {
+
+ if(!isset($_POST['dir']))
+ exit();
+ else
+ $dir = $_POST['dir'];
+
+ if(!isset($_POST['addwatermark']))
+ exit();
+ else
+ $addwatermak = intval($_POST['addwatermark']);
+
+ // -------------- Sicherheitsabfragen!
+ if(preg_match("/[\.]*\//", $dir))exit();
+ // ---------- Ende Sicherheitsabfragen!
+
+ if(is_file("../ki_config/".$dir."_ki_setup.php"))include_once("../ki_config/".$dir."_ki_setup.php");
+
+ $target_path = "../ki_galleries/".$dir."/";
+ $temp = explode('.', strtolower($thefile['name']));
+ if(in_array($temp[1], $supported)){
+ if($temp[1] === "jpeg")$temp[1] = "jpg";
+ $target_name = $target_path.$temp[0].".".$temp[1]; // Endgltige Pfad+Name
+ if(move_uploaded_file($thefile['tmp_name'], $target_name)){
+
+ // Load the image where the logo will be embeded into
+ switch($temp[1]){
+ case "jpg":
+ $image = imagecreatefromjpeg($target_name);
+ break;
+ case "png":
+ $image = imagecreatefrompng($target_name);
+ break;
+ case "gif":
+ $image = imagecreatefromgif($target_name);
+ break;
+ }
+ imagealphablending($image, true);
+ imagesavealpha($image, true);
+
+ // Get dimensions
+ $imageWidth = imagesx($image);
+ $imageHeight = imagesy($image);
+ $imageWidth_o = $imageWidth;
+ $imageHeight_o = $imageHeight;
+
+ if($addwatermak == 1){
+ if(is_file("../ki_base/ki_watermark.pic")){
+ // Load the logo image
+ $logoImage = imagecreatefrompng("../ki_base/ki_watermark.pic");
+ if(!$logoImage){
+ $logoImage = imagecreatefromjpeg("../ki_base/ki_watermark.pic");
+ }
+ if(!$logoImage){
+ $logoImage = imagecreatefromgif("../ki_base/ki_watermark.pic");
+ }
+ if(!$logoImage){
+ exit();
+ }
+ imagealphablending($logoImage, true);
+ imagesavealpha($logoImage, true);
+
+ $logoWidth = imagesx($logoImage);
+ $logoHeight = imagesy($logoImage);
+ $logoWidth_o = $logoWidth;
+ $logoHeight_o = $logoHeight;
+
+ if($watermark_size > 0){
+ $logoAspect = $logoWidth / $logoHeight;
+
+ if($imageWidth > $imageHeight){
+ $wide = 1;
+ } else {
+ $wide = 0;
+ }
+
+ if($logoWidth > $logoHeight){
+ $logoWide = 1;
+ } else {
+ $logoWide = 0;
+ }
+
+ if($wide == 1){
+ if($logoWide == 1){
+ $logoWidth = round($watermark_size * $imageWidth);
+ $logoHeight = round((1/$logoAspect) * $logoWidth);
+ if($logoHeight > $imageHeight){
+ $logoHeight = round($watermark_size * $imageHeight);
+ $logoWidth = round($logoAspect * $logoHeight);
+ }
+ } else {
+ $logoHeight = round($watermark_size * $imageHeight);
+ $logoWidth = round($logoAspect * $logoHeight);
+ }
+ } else {
+ if($logoWide == 0){
+ $logoHeight = round($watermark_size * $imageHeight);
+ $logoWidth = round($logoAspect * $logoHeight);
+ if($logoWidth > $imageWidth){
+ $logoWidth = round($watermark_size * $imageWidth);
+ $logoHeight = round((1/$logoAspect) * $logoWidth);
+ } else {
+ $logoWidth = round($watermark_size * $imageWidth);
+ $logoHeight = round((1/$logoAspect) * $logoWidth);
+ }
+ }
+ }
+ }
+
+ switch($watermark_vert){
+ case "top":
+ $starty = 0;
+ break;
+ case "middle";
+ $starty = round(($imageHeight - $logoHeight)*0.5);
+ break;
+ case "bottom":
+ $starty = $imageHeight-$logoHeight;
+ break;
+ }
+ switch($watermark_hori){
+ case "left":
+ $startx = 0;
+ break;
+ case "center";
+ $startx = round(($imageWidth - $logoWidth)*0.5);
+ break;
+ case "right":
+ $startx = $imageWidth-$logoWidth;
+ break;
+ }
+
+ // Paste the logo
+ imagecopyresampled($image, $logoImage, $startx, $starty, 0, 0, $logoWidth, $logoHeight, $logoWidth_o, $logoHeight_o);
+
+ imageDestroy($logoImage);
+ }
+ }
+
+ $maxx = 10000;
+ $maxy = 10000;
+ if(isset($_POST['maxx'])){
+ if(intval($_POST['maxx']) > 0)$maxx = intval($_POST['maxx']);
+ }
+ if(isset($_POST['maxy'])){
+ if(intval($_POST['maxy']) > 0)$maxy = intval($_POST['maxy']);
+ }
+
+ $aspect = $imageWidth / $imageHeight;
+
+ if($aspect > 1){
+ if($imageWidth > $maxx){
+ $imageWidth = $maxx;
+ $imageHeight = round((1/$aspect) * $imageWidth);
+ }
+ if($imageHeight > $maxy){
+ $imageHeight = $maxy;
+ $imageWidth = round($aspect * $imageHeight);
+ }
+ } else {
+ if($imageHeight > $maxy){
+ $imageHeight = $maxy;
+ $imageWidth = round($aspect * $imageHeight);
+ }
+ if($imageWidth > $maxx){
+ $imageWidth = $maxx;
+ $imageHeight = round((1/$aspect) * $imageWidth);
+ }
+ }
+
+ if($imageWidth_o != $imageWidth || $imageHeight_o != $imageHeight){
+ $bild = imagecreatetruecolor($imageWidth, $imageHeight);
+ imagealphablending($bild, false);
+ imagesavealpha($bild, true);
+ imagecopyresampled($bild, $image, 0, 0, 0, 0, $imageWidth, $imageHeight, $imageWidth_o, $imageHeight_o);
+ switch($temp[1]){
+ case "jpg":
+ imagejpeg($bild, $target_name, 80);
+ break;
+ case "png":
+ imagepng($bild, $target_name);
+ break;
+ case "gif":
+ imagegif($bild, $target_name);
+ break;
+ }
+ imageDestroy($bild);
+ } else {
+ if($addwatermak == 1){
+ // Save image
+ switch($temp[1]){
+ case "jpg":
+ imagejpeg($image, $target_name, 80);
+ break;
+ case "png":
+ imagepng($image, $target_name);
+ break;
+ case "gif":
+ imagegif($image, $target_name);
+ break;
+ }
+ }
+ }
+
+ // Release memory
+ imageDestroy($image);
+
+ echo "done";
+ }
+ }
+ }
+ }
+}
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_vcomm.php b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_vcomm.php
new file mode 100644
index 00000000..78b73cc0
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/ki_vcomm.php
@@ -0,0 +1,221 @@
+<?php
+session_start();
+
+/* --------------------------------------------------------- functions ------------------------------------------------------ */
+
+if (!function_exists('file_get_contents')) {
+ function file_get_contents($filename) {
+ if ($handle = @fopen($filename, 'rb')) {
+ $data = fread($handle, filesize($filename));
+ fclose($fh);
+ return $data;
+ }
+ }
+}
+
+
+if (!function_exists('file_put_contents')) {
+ function file_put_contents($filename, $data) {
+ $f = @fopen($filename, 'w');
+ if (!$f) {
+ return false;
+ } else {
+ $bytes = fwrite($f, $data);
+ fclose($f);
+ return $bytes;
+ }
+ }
+}
+
+function sendAmail($to, $betreff, $content){
+
+ $content = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">
+<html xmlns=\"http://www.w3.org/1999/xhtml\"><head><title>".$betreff."</title></head><body><div style=\"font:13px Arial,Verdana,sans-serif;\">".nl2br($content)."</div></body></html>";
+
+ $header = "MIME-Version: 1.0\n";
+ $header .= "Content-type: text/html; charset=UTF-8\n";
+ $header .= "Content-Transfer-Encoding: 8bit\n";
+ $header .= "From: ".$admin_mail_from."\n";
+ //$header .= "Reply-To: ".$admin_mail_from."\n";
+
+ // verschicke die E-Mail
+ @ini_set(sendmail_from, $admin_mail_from);
+ @mail($to, $betreff, $content, $header);
+ @ini_restore(sendmail_from);
+}
+
+
+
+/* ---------------------------------------------------------- end functions -------------------------------------------------- */
+
+if (get_magic_quotes_gpc()) {
+ function stripslashes_gpc(&$value)
+ {
+ $value = stripslashes($value);
+ }
+ array_walk_recursive($_GET, 'stripslashes_gpc');
+ array_walk_recursive($_POST, 'stripslashes_gpc');
+ array_walk_recursive($_COOKIE, 'stripslashes_gpc');
+ array_walk_recursive($_REQUEST, 'stripslashes_gpc');
+}
+
+if(isset($_POST['file']))
+ $file = rawurldecode($_POST['file']);
+else
+ exit;
+
+if(isset($_POST['gallery']))
+ $gallery = $_POST['gallery'];
+else
+ exit;
+
+// -------------- Sicherheitsabfragen!
+if(preg_match("/[\.]*\//", $file))exit();
+if(preg_match("/[\.]*\//", $gallery))exit();
+if(!is_file("../ki_galleries/".$gallery."/".$file))exit();
+// ---------- Ende Sicherheitsabfragen!
+
+include_once("../ki_config/ki_setup.php");
+if(is_file("../ki_config/".$gallery."_ki_setup.php"))include_once("../ki_config/".$gallery."_ki_setup.php");
+
+$pwok = 0;
+if(isset($_SESSION['pwquery'])){
+ if($_SESSION['pwquery'] === $pw)$pwok = 1;
+}
+
+$commfile = "../ki_galleries/".$gallery."/viewercomments/".substr($file, 0, -4).".txt";
+
+if(!isset($_POST['get'])){
+
+ if(isset($_POST['email']))
+ $name = addslashes(htmlentities(rawurldecode($_POST['email']), ENT_QUOTES, "UTF-8"));
+ else
+ exit;
+
+ if(isset($_POST['assystem']))
+ $comment = addslashes(htmlentities(rawurldecode($_POST['assystem']), ENT_QUOTES, "UTF-8"));
+ else
+ exit;
+
+ if(isset($_POST['address']))
+ $address = rawurldecode($_POST['address']);
+ else
+ exit;
+
+ if (!ini_get('date.timezone') && function_exists("date_default_timezone_set"))date_default_timezone_set('Europe/Berlin');
+
+ if( stripos($name, "@") !== false ){
+ echo "2";
+ exit();
+ }
+
+ $ip = $_SERVER["REMOTE_ADDR"];
+ $date = date("m/d/Y");
+ $time = date('H').":".date('i');
+
+ $moderate = "";
+ if($moderate_posts == 1)$moderate = "._.1";
+ $post = $name."._.".$date."._.".$time."._.".$ip.$moderate."\r\n".$comment."\r\n:_:\r\n";
+
+ $oldcomments = "";
+ if(is_file($commfile)){
+ $oldcomments = file_get_contents($commfile);
+ $handle = @fopen($commfile, "r");
+ if($handle) {
+ $lastcomment = fgets($handle);
+ $data = explode("._.", $lastcomment, 4);
+ $lastip = rtrim($data[3]);
+ $lastdate = $data[1];
+ $lasttime = substr($data[2], 0, 2)*60+substr($data[2], 3, 2);
+ $newtime = substr($time, 0, 2)*60+substr($time, 3, 2);
+ if($lastip === $ip && $lastdate === $date){
+ if($newtime - $lasttime < 3){
+ echo "1";
+ exit();
+ }
+ }
+ }
+ fclose($handle);
+ }
+ file_put_contents($commfile, $post);
+ if($oldcomments !== ""){
+ file_put_contents($commfile, $oldcomments, FILE_APPEND);
+ }
+
+ if($admin_mail != 0){
+ $s = empty($_SERVER["HTTPS"]) ? '' : ($_SERVER["HTTPS"] == "on") ? "s" : "";
+ $address = "http".$s."://".$address;
+ $message = stripslashes($comment);
+
+ $betreff = "New comment on picture (".$_SERVER['HTTP_HOST'].")";
+ if($moderate_posts == 1){
+ $content = "A new comment has been made for one of your images. Visit '<a href='".$address."'>".$address."</a>' and flip the picture to read all comments for this image.\nThis is the last comment:\n\n\"".$message."\"\n\nThis comment is moderated and is not readable in public yet. You have the option publish this comment when you login as admin.\n\n\n<small>E-Mail generated by KoschtIT Image Gallery.\n<a href='http://koschtit.tabere.net/en/'>http://koschtit.tabere.net/en/</a></small>";
+ } else {
+ $content = "A new comment has been made for one of your images. Visit '<a href='".$address."'>".$address."</a>' and flip the picture to read all comments for this image.\nThis is the last comment:\n\n\"".$message."\"\n\n\n<small>E-Mail generated by KoschtIT Image Gallery.\n<a href='http://koschtit.tabere.net/en/'>http://koschtit.tabere.net/en/</a></small>";
+ }
+ sendAmail($admin_mail_to, $betreff, $content);
+ }
+}
+
+if(isset($_POST['counter']) || isset($_POST['publish'])){
+ $newfile = "";
+}
+$counter = 0;
+$handle = @fopen($commfile, "r");
+if($handle) {
+ while(!feof($handle)){
+ $head = fgets($handle);
+ $headdata = explode("._.", $head);
+ $comment = "";
+ while($acommentline = fgets($handle)){
+ if($acommentline === ":_:\r\n")break;
+ $comment .= $acommentline;
+ }
+ if(sizeof($headdata) == 4 || ($pwok == 1 && sizeof($headdata) == 5)){
+ $buttons = "";
+ if($pwok == 1){
+ if(isset($_POST['publish'])){
+ if($counter == $_POST['publish']){
+ array_pop($headdata);
+ $newfile .= $headdata[0]."._.".$headdata[1]."._.".$headdata[2]."._.".$headdata[3]."\r\n".$comment.":_:\r\n";
+ } else {
+ $newfile .= $head.$comment.":_:\r\n";
+ }
+ }
+ $buttons = "<input type='button' value='Delete' style='float:right; margin:0px; padding:0px; cursor:pointer; border:1px solid #000; height:26px; width:100px; background:#bd8b8b; color:#fff;' onclick='kiv.deleteVComm(".$counter.")' />";
+ if($moderate_posts == 1 && sizeof($headdata) == 5)$buttons .= "<input type='button' value='Publish' style='float:right; margin:0px; padding:0px; margin-right:10px; cursor:pointer; border:1px solid #000; height:26px; width:100px; background:#658342; color:#fff;' onclick='kiv.publishVComm(".$counter.")' />";
+ }
+ $skip = 0;
+ if(isset($_POST['counter'])){
+ if($_POST['counter'] != $counter){
+ $newfile .= $head.$comment.":_:\r\n";
+ } else {
+ $skip = 1;
+ }
+ }
+ if($skip == 0){
+?>
+<div style='margin:0px 0px 5px 0px; padding:4px; text-align:left; <?php if($counter != 0)echo "margin-top:10px;" ?>'><?php echo nl2br(stripslashes($comment)) ?></div><div style='font-size:10px; text-align:left; padding:0px 0px 10px 0px;'>&raquo; <span style='padding-left:0px; margin-bottom:10px; color:<?php echo $vcomm_timedate_color ?>;'><?php echo $headdata[1] ?> <?php echo $headdata[2] ?> </span><?php echo $buttons.stripslashes($headdata[0]) ?></div>
+<?php
+ }
+ $counter++;
+ }
+ }
+ fclose($handle);
+} else {
+ echo "<p style='margin-top:20px; text-align:center; font-weight:bold;'>".$vcomm_ncy."</p>";
+}
+if(isset($_POST['counter']) || isset($_POST['publish'])){
+ if($pwok == 1){
+ if(strlen($newfile) > 2){
+ file_put_contents($commfile, $newfile);
+ } else {
+ @unlink($commfile);
+ echo "<p style='margin-top:20px; text-align:center; font-weight:bold;'".$vcomm_ncy."</p>";
+ }
+ }
+}
+?>
+
+
+
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/kos-epulet_dir b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/kos-epulet_dir
new file mode 100644
index 00000000..18896e28
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/kos-epulet_dir
@@ -0,0 +1,2 @@
+i:2707615525;
+a:16:{i:0;a:3:{i:0;s:20:"iskolahomlokzat1.jpg";i:1;i:1865;i:2;i:2592;}i:1;a:3:{i:0;s:22:"iskolahomlokzat1-k.jpg";i:1;i:187;i:2;i:260;}i:2;a:3:{i:0;s:9:"terem.jpg";i:1;i:2189;i:2;i:1406;}i:3;a:3:{i:0;s:11:"terem-k.jpg";i:1;i:219;i:2;i:141;}i:4;a:3:{i:0;s:12:"folyoso3.jpg";i:1;i:1894;i:2;i:1398;}i:5;a:3:{i:0;s:14:"folyoso3-k.jpg";i:1;i:189;i:2;i:140;}i:6;a:3:{i:0;s:14:"konyvtar-k.jpg";i:1;i:170;i:2;i:165;}i:7;a:3:{i:0;s:12:"konyvtar.jpg";i:1;i:1704;i:2;i:1649;}i:8;a:3:{i:0;s:12:"folyoso2.jpg";i:1;i:1519;i:2;i:1719;}i:9;a:3:{i:0;s:15:"hatsolepcso.jpg";i:1;i:1209;i:2;i:1986;}i:10;a:3:{i:0;s:17:"hatsolepcso-k.jpg";i:1;i:121;i:2;i:199;}i:11;a:3:{i:0;s:14:"folyoso2-k.jpg";i:1;i:152;i:2;i:172;}i:12;a:3:{i:0;s:14:"folyoso1-k.jpg";i:1;i:124;i:2;i:176;}i:13;a:3:{i:0;s:12:"folyoso1.jpg";i:1;i:1240;i:2;i:1757;}i:14;a:3:{i:0;s:16:"elsolepcso-k.jpg";i:1;i:158;i:2;i:190;}i:15;a:3:{i:0;s:14:"elsolepcso.jpg";i:1;i:1588;i:2;i:1909;}} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/kos-epulet_lastmodified b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/kos-epulet_lastmodified
new file mode 100644
index 00000000..eb79d55a
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/kos-epulet_lastmodified
@@ -0,0 +1,4 @@
+<?php
+$lm_saved = "948300147210912451.21middlecenter10";
+$lm_lastmodified = 1351903878;
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/mayor logo_dir b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/mayor logo_dir
new file mode 100644
index 00000000..5975e58f
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/mayor logo_dir
@@ -0,0 +1,2 @@
+i:2703855617;
+a:3:{i:0;a:3:{i:0;s:19:"mayor-vasarely4.png";i:1;i:400;i:2;i:400;}i:1;a:3:{i:0;s:7:"ml1.png";i:1;i:295;i:2;i:196;}i:2;a:3:{i:0;s:13:"mm-bw-pro.png";i:1;i:500;i:2;i:253;}} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/mayor logo_lastmodified b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/mayor logo_lastmodified
new file mode 100644
index 00000000..61d1a8d0
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_base/mayor logo_lastmodified
@@ -0,0 +1,4 @@
+<?php
+$lm_saved = "9483001472109124510middlecenter10";
+$lm_lastmodified = 1351902692;
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_config/ki_setup.php b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_config/ki_setup.php
new file mode 100644
index 00000000..da86d1bf
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_config/ki_setup.php
@@ -0,0 +1,96 @@
+<?php
+$fr_width = 640;
+$fr_height = 300;
+$fr_color = "#666666";
+$thumbs = 14;
+$th_per_line = 7;
+$th_lines = "auto";
+$th_width = "auto";
+$th_height = "auto";
+$th_bord_size = 5;
+$th_bord_color = "#ffffff";
+$th_bord_hover_color = "#bbbbbb";
+$th_bord_hover_increase = 1.2;
+$th_shadow = 1;
+$th_to_square = 1;
+$th_2sq_crop_hori = "center";
+$th_2sq_crop_vert = "middle";
+$thumbs_to_disk = 1;
+$pic_order = 3;
+$resize_auto = 1;
+$bord_size = 10;
+$bord_color = "#ffffff";
+$max_pic_width = "none";
+$max_pic_height = 0.75;
+$oversize_allowed = 0;
+$comments = 1;
+$comm_text_size = 12;
+$comm_text_color = "#000000";
+$comm_text_font = "Tahoma, sans-serif";
+$comm_text_align = "left";
+$comm_auto = 0;
+$comm_auto_string = "Picture %x of %X Filename: %f, Gallery: %g";
+$viewercomments = 1;
+$moderate_posts = 0;
+$vcomm_header_color = "#000000";
+$vcomm_box_color = "#000000";
+$vcomm_text_color = "#000000";
+$vcomm_timedate_color = "#888888";
+$vcomm_back_color = "none";
+$vcomm_bord_color = "#888888";
+$vcomm_horline_color = "#888888";
+$slideshow = 1;
+$downloadpics = 1;
+$checkgps = 1;
+$cellinfo = 0;
+$show_nav = 1;
+$nav_always = 0;
+$nav_pos = "right";
+$nav_color = "#ffffff";
+$nav_border_color = "#000000";
+$nav_style = 1;
+$show_image_nav = 1;
+$image_nav_always = 0;
+$show_share = 1;
+$show_help = 1;
+$help_pos = "left";
+$show_preview = 1;
+$preview_style = 1;
+$preview_pics = 6;
+$show_explorer = 1;
+$explorer_padding = 50;
+$watermark_hori = "right";
+$watermark_vert = "bottom";
+$watermark_size = 0;
+$fade_color = "#000000";
+$fade_alpha = 8;
+$shade_while_loading = 0;
+$disable_animation = 0;
+$slideshow_time = 4000;
+$nav_next = "Next page";
+$nav_back = "Previous page";
+$nav_maxi = "Maximize gallery";
+$nav_kiv_next = "Next picture";
+$nav_kiv_back = "Previous picture";
+$nav_kiv_close = "Close";
+$nav_gps_coord = "Show location on map";
+$nav_kiv_vcomm = "Add/See viewer comments";
+$nav_kiv_download = "Download full resolution picture";
+$slideshow_start = "Start slideshow";
+$slideshow_stop = "Stop slideshow";
+$help_text = "Move your mouse [mouse] beyond the sides of the image to see what image comes next/was last in the gallery. If you move your mouse even further to the border of the window you can see the next/last couple of images. Move your mouse up to the top to view navigation controls and move it down to see a link address of the picture displayed.";
+$vcomm_lac = "Leave a comment";
+$vcomm_name = "Name";
+$vcomm_comm = "Comment";
+$vcomm_post = "Post comment";
+$vcomm_clk = "Click on the image to flip back to the full image.";
+$vcomm_ncy = "No comments yet.";
+$admin_mail = 0;
+$admin_mail_from = "support@vmg.sulinet.hu";
+$admin_mail_to = $admin_mail_from;
+$show_warnings = 0;
+$user = "user22";
+$userpw = "5f4dcc3b5aa765d61d8327deb882cf99";
+$admin = "admin22";
+$pw = "5f4dcc3b5aa765d61d8327deb882cf99";
+?>
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_config/kos-epulet_ki_setup.php b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_config/kos-epulet_ki_setup.php
new file mode 100644
index 00000000..a92dea52
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_config/kos-epulet_ki_setup.php
@@ -0,0 +1,96 @@
+<?php
+$fr_width = 948;
+$fr_height = 300;
+$fr_color = "#66f";
+$thumbs = 8;
+$th_per_line = 4;
+$th_lines = "auto";
+$th_width = "auto";
+$th_height = "auto";
+$th_bord_size = 5;
+$th_bord_color = "#ffffff";
+$th_bord_hover_color = "#bbbbbb";
+$th_bord_hover_increase = 1.2;
+$th_shadow = 1;
+$th_to_square = 1;
+$th_2sq_crop_hori = "center";
+$th_2sq_crop_vert = "middle";
+$thumbs_to_disk = 1;
+$pic_order = 3;
+$resize_auto = 1;
+$bord_size = 10;
+$bord_color = "#ffffff";
+$max_pic_width = "none";
+$max_pic_height = 0.75;
+$oversize_allowed = 0;
+$comments = 1;
+$comm_text_size = 12;
+$comm_text_color = "#000000";
+$comm_text_font = "Tahoma, sans-serif";
+$comm_text_align = "left";
+$comm_auto = 0;
+$comm_auto_string = "KoschtIT Image Gallery - Picture %x of %X Filename: %f, Gallery: %g";
+$viewercomments = 1;
+$moderate_posts = 0;
+$vcomm_header_color = "#000000";
+$vcomm_box_color = "#000000";
+$vcomm_text_color = "#000000";
+$vcomm_timedate_color = "#888888";
+$vcomm_back_color = "none";
+$vcomm_bord_color = "#888888";
+$vcomm_horline_color = "#888888";
+$slideshow = 1;
+$downloadpics = 1;
+$checkgps = 1;
+$cellinfo = 0;
+$show_nav = 1;
+$nav_always = 0;
+$nav_pos = "right";
+$nav_color = "#ffffff";
+$nav_border_color = "#000000";
+$nav_style = 1;
+$show_image_nav = 1;
+$image_nav_always = 0;
+$show_share = 1;
+$show_help = 1;
+$help_pos = "left";
+$show_preview = 1;
+$preview_style = 1;
+$preview_pics = 6;
+$show_explorer = 1;
+$explorer_padding = 50;
+$watermark_hori = "right";
+$watermark_vert = "bottom";
+$watermark_size = 0;
+$fade_color = "#000000";
+$fade_alpha = 8;
+$shade_while_loading = 0;
+$disable_animation = 0;
+$slideshow_time = 4000;
+$nav_next = "Next page";
+$nav_back = "Previous page";
+$nav_maxi = "Maximize gallery";
+$nav_kiv_next = "Next picture";
+$nav_kiv_back = "Previous picture";
+$nav_kiv_close = "Close";
+$nav_gps_coord = "Show location on map";
+$nav_kiv_vcomm = "Add/See viewer comments";
+$nav_kiv_download = "Download full resolution picture";
+$slideshow_start = "Start slideshow";
+$slideshow_stop = "Stop slideshow";
+$help_text = "Move your mouse [mouse] beyond the sides of the image to see what image comes next/was last in the gallery. If you move your mouse even further to the border of the window you can see the next/last couple of images. Move your mouse up to the top to view navigation controls and move it down to see a link address of the picture displayed.";
+$vcomm_lac = "Leave a comment";
+$vcomm_name = "Name";
+$vcomm_comm = "Comment";
+$vcomm_post = "Post comment";
+$vcomm_clk = "Click on the image to flip back to the full image.";
+$vcomm_ncy = "No comments yet.";
+$admin_mail = 0;
+$admin_mail_from = "admin@localhost";
+$admin_mail_to = "admin@localhost";
+$show_warnings = 0;
+$user = "user";
+$userpw = "5f4dcc3b5aa765d61d8327deb882cf99";
+$admin = "admin";
+$pw = "5f4dcc3b5aa765d61d8327deb882cf99";
+?>
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_include.php b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_include.php
new file mode 100644
index 00000000..db30e454
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/ki_include.php
@@ -0,0 +1,306 @@
+<?php
+$reldir = $_SERVER['PHP_SELF'];
+$basedir = $_SERVER['SCRIPT_FILENAME'];
+$confdir = __FILE__;
+
+$reldir = explode("/", dirname(trim(str_replace("\\", "/", $reldir), "/")));
+$basedir = explode("/", dirname(trim(str_replace("\\", "/", $basedir), "/")));
+$confdir = explode("/", dirname(trim(str_replace("\\", "/", $confdir), "/")));
+
+$reldirsize = count($reldir);
+$basedirsize = count($basedir);
+$confdirsize = count($confdir);
+
+$foundat = -1;
+$reldir = "";
+
+for($i = $basedirsize - 1; $i >= $basedirsize - $reldirsize - 1 && $i >= 0; $i--){
+ for($j = $confdirsize - 1; $j >= 0; $j--){
+ if($basedir[$i] === $confdir[$j]){
+ $foundat = $j;
+ break;
+ }
+ }
+ if($foundat != -1)
+ break;
+ else
+ $reldir .= "../";
+}
+
+if($foundat != -1){
+ for($i = $foundat + 1; $i < $confdirsize; $i++){
+ $reldir .= $confdir[$i]."/";
+ }
+} else {
+
+// Enter the relative path here, if the script asks you to. Example: $reldir = "../script/";
+$reldir = "";
+// ----------------------------------------------------------------------------------------
+
+}
+
+if (!function_exists('file_put_contents')) {
+ function file_put_contents($filename, $data) {
+ $f = @fopen($filename, 'w');
+ if (!$f) {
+ return false;
+ } else {
+ $bytes = fwrite($f, $data);
+ fclose($f);
+ return $bytes;
+ }
+ }
+}
+
+$browser = $_SERVER['HTTP_USER_AGENT'];
+
+if(preg_match("/Opera/",$browser))
+ $browser = "opera";
+elseif(preg_match("/MSIE [9]/",$browser))
+ $browser = "ie9";
+elseif(preg_match("/MSIE [7-8]/",$browser))
+ $browser = "ie7";
+elseif(preg_match("/MSIE [1-6]/",$browser))
+ $browser = "ie6";
+elseif(preg_match("/AppleWebKit/",$browser))
+ $browser = "webkit";
+else
+ $browser = "gecko";
+
+$confdir = $reldir."ki_config/";
+$galleriesdir = $reldir."ki_galleries/";
+$basedir = $reldir."ki_base/";
+
+if(!is_file($basedir."ki_js_view.php")){
+?>
+<script type="text/javascript">
+alert("ERROR: KoschtIT Image Gallery couldn't find the path to the script folder. Please enter the relative path from '<?php echo $_SERVER['PHP_SELF'] ?>' to the folder where the 'ki_config' folder is, into the 'ki_include.php' on line 37.");
+</script>
+<?php
+} else {
+ $def_fr_width = 948;
+ $def_fr_height = 300;
+ $def_fr_color = "#666666";
+ $def_thumbs = 14;
+ $def_th_per_line = 7;
+ $def_th_lines = "auto";
+ $def_th_width = "auto";
+ $def_th_height = "auto";
+ $def_th_bord_size = 5;
+ $def_th_bord_color = "#ffffff";
+ $def_th_bord_hover_color = "#bbbbbb";
+ $def_th_bord_hover_increase = 1.2;
+ $def_th_shadow = 1;
+ $def_th_to_square = 1;
+ $def_th_2sq_crop_hori = "center";
+ $def_th_2sq_crop_vert = "middle";
+ $def_thumbs_to_disk = 1;
+ $def_pic_order = 2;
+ $def_resize_auto = 1;
+ $def_bord_size = 10;
+ $def_bord_color = "#ffffff";
+ $def_max_pic_width = "none";
+ $def_max_pic_height = 0.75;
+ $def_oversize_allowed = 0;
+ $def_comments = 1;
+ $def_comm_text_size = 12;
+ $def_comm_text_color = "#000000";
+ $def_comm_text_font = "Tahoma, sans-serif";
+ $def_comm_text_align = "left";
+ $def_comm_auto = 0;
+ $def_comm_auto_string = "KoschtIT Image Gallery - Picture %x of %X Filename: %f, Gallery: %g";
+ $def_viewercomments = 1;
+ $def_moderate_posts = 0;
+ $def_vcomm_header_color = "#000000";
+ $def_vcomm_box_color = "#000000";
+ $def_vcomm_text_color = "#000000";
+ $def_vcomm_timedate_color = "#888888";
+ $def_vcomm_back_color = "none";
+ $def_vcomm_bord_color = "#888888";
+ $def_vcomm_horline_color = "#888888";
+ $def_slideshow = 1;
+ $def_downloadpics = 1;
+ $def_checkgps = 1;
+ $def_cellinfo = 0;
+ $def_show_nav = 1;
+ $def_nav_always = 0;
+ $def_nav_pos = "right";
+ $def_nav_color = "#ffffff";
+ $def_nav_border_color = "#000000";
+ $def_nav_style = 1;
+ $def_show_image_nav = 1;
+ $def_image_nav_always = 0;
+ $def_show_share = 1;
+ $def_show_help = 1;
+ $def_help_pos = "left";
+ $def_show_preview = 1;
+ $def_preview_style = 1;
+ $def_preview_pics = 6;
+ $def_show_explorer = 1;
+ $def_explorer_padding = 50;
+ $def_watermark_hori = "right";
+ $def_watermark_vert = "bottom";
+ $def_watermark_size = 0;
+ $def_fade_color = "#000000";
+ $def_fade_alpha = 8;
+ $def_shade_while_loading = 0;
+ $def_disable_animation = 0;
+ $def_slideshow_time = 4000;
+ $def_nav_next = "Next page";
+ $def_nav_back = "Previous page";
+ $def_nav_maxi = "Maximize gallery";
+ $def_nav_kiv_next = "Next picture";
+ $def_nav_kiv_back = "Previous picture";
+ $def_nav_kiv_close = "Close";
+ $def_nav_gps_coord = "Show location on map";
+ $def_nav_kiv_vcomm = "Add/See viewer comments";
+ $def_nav_kiv_download = "Download full resolution picture";
+ $def_slideshow_start = "Start slideshow";
+ $def_slideshow_stop = "Stop slideshow";
+ $def_help_text = "Move your mouse [mouse] beyond the sides of the image to see what image comes next/was last in the gallery. If you move your mouse even further to the border of the window you can see the next/last couple of images. Move your mouse up to the top to view navigation controls and move it down to see a link address of the picture displayed.";
+ $def_vcomm_lac = "Leave a comment";
+ $def_vcomm_name = "Name";
+ $def_vcomm_comm = "Comment";
+ $def_vcomm_post = "Post comment";
+ $def_vcomm_clk = "Click on the image to flip back to the full image.";
+ $def_vcomm_ncy = "No comments yet.";
+ $def_admin_mail = 0;
+ $def_admin_mail_from = "admin@localhost";
+ $def_admin_mail_to = "admin@localhost";
+ $def_show_warnings = 1;
+ $def_user = "user";
+ $def_userpw = "5f4dcc3b5aa765d61d8327deb882cf99";
+ $def_admin = "admin";
+ $def_pw = "5f4dcc3b5aa765d61d8327deb882cf99";
+
+ $global_start = -1;
+ $global_length = -1;
+ $global_count = -1;
+
+ reset($GLOBALS);
+ while (list($key, $val) = each($GLOBALS)) {
+ $global_count++;
+ if($global_start == -1){
+ if($key === "def_fr_width"){
+ $global_start = $global_count;
+ continue;
+ }
+ }
+ if($global_length == -1){
+ if($key === "global_start"){
+ $global_length = $global_count - $global_start;
+ break;
+ }
+ }
+ }
+
+ if(!is_file($confdir."ki_setup.php")){
+?>
+<script type="text/javascript">
+alert("ERROR: KoschtIT Image Gallery couldn't find the main config file 'ki_setup.php' in the 'ki_config' folder. A new 'ki_setup.php'-file with the default parameters has been created. Please change your username and password.");
+</script>
+<?php
+ } else {
+ include($confdir."ki_setup.php");
+ }
+
+ $switchtodefaults = 0;
+ $params = "";
+ reset($GLOBALS);
+ for($i = 0; $i < $global_start; $i++)next($GLOBALS);
+ for($i = 0; $i < $global_length; $i++){
+ list($key, $val) = each($GLOBALS);
+ $param = substr($key, 4);
+ if(!isset($GLOBALS[$param])){
+ $switchtodefaults = 1;
+ if(!is_numeric($val))$val = "\"".addslashes($val)."\"";
+ $params .= "\$$param = $val;\r\n";
+ } else {
+ $val = $GLOBALS[$param];
+ if($param === "pw"){
+ if(strlen($val) != 32){
+ $switchtodefaults = 1;
+ $val = md5($val);
+ }
+ }
+ if(!is_numeric($val))$val = "\"".addslashes($val)."\"";
+ $params .= "\$$param = $val;\r\n";
+ }
+ }
+
+ if($switchtodefaults == 1){
+ $params = "<?php\r\n".$params."?>";
+ if(!@file_put_contents($confdir."ki_setup.php", $params)){
+?>
+<script type="text/javascript">
+alert("ERROR: Your 'ki_setup.php' does not match this script version. Please grant writing permission to the 'ki_config'-folder and reload this site to finish the upgrade procedure.");
+</script>
+<?php
+ exit();
+ }
+
+ include($confdir."ki_setup.php");
+ }
+
+ $access = "?reldir=".$reldir;
+ if(isset($_GET['admin'])){
+ $access .= "&admin=".$_GET['admin'];
+ }
+ if(isset($_GET['user'])){
+ $access .= "&user=".$_GET['user'];
+ }
+?>
+<meta name="koschtit_version" content="KoschtIT Image Gallery v3.1b by Konstantin Tabere" />
+<script type="text/javascript" src="<?php echo $basedir ?>ki_js_framework.php<?php echo $access ?>"></script>
+<?php
+if(isset($_GET['kit_code']))
+ $kitcode = $_GET['kit_code'];
+else
+ $kitcode = "";
+
+ if($kitcode !== ""){
+?>
+<script type="text/javascript">
+ function kit_opensharedpic(){
+ kib.getImage("<?php echo $kitcode ?>");
+ }
+</script>
+<?php
+ }
+ ob_start("jsdisabled");
+}
+
+function jsdisabled($buffer){
+ global $basedir, $confdir, $galleriesdir, $browser;
+ global $fr_width, $fr_height, $fr_color, $text_size, $text_color, $text_font;
+ @chdir(dirname((strstr($_SERVER["SCRIPT_FILENAME"], $_SERVER["PHP_SELF"]) ? $_SERVER["SCRIPT_FILENAME"] : $_SERVER["PATH_TRANSLATED"])));
+ preg_match_all("|(<div[^>]+class\s*=\s*[\"'][^>]*koschtitgallery[^>]*[\"'][^>]*)>.*</div>|U", $buffer, $out, PREG_PATTERN_ORDER);
+ $navimgsize = getimagesize($basedir."ki_nav_next.png");
+ if(is_array($out)){
+ if(is_array($out[0])){
+ for($i = 0; $i < count($out[0]); $i++){
+ if(preg_match("|<div[^>]+title\s*=\s*[\"']([^>]+)[\"'][^>]*>|U", $out[0][$i], $temp)){
+ $titlefound = $temp[1];
+ include($confdir."ki_setup.php");
+ if(is_file($confdir.$titlefound."_ki_setup.php"))
+ include($confdir.$titlefound."_ki_setup.php");
+ $stylestring = "position:relative; padding:0px; width:".$fr_width."px; min-height:".$fr_height."px; background:".$fr_color.";";
+ if($show_nav == 1 && $nav_always == 0)$fr_height += ($navimgsize[1]+18);
+ $noscript = "<object type='application/xhtml+xml' data='".$basedir."ki_nojs.php?gallery=".$titlefound."&amp;site=".$_SERVER['REQUEST_URI']."' width='".$fr_width."' height='".$fr_height."'>";
+ if(in_array($browser, array("ie6", "ie7"))){
+ $noscript = "<!--[if IE]><iframe src='".$basedir."ki_nojs.php?gallery=".$titlefound."&amp;site=".$_SERVER['REQUEST_URI']."' style='width:".$fr_width."px; height:".$fr_height."px;' frameborder='0'></iframe><!--[if IE]>";
+ }
+ $noscript .= "</object>";
+ if(preg_match("|(<div[^>]+style\s*=\s*[\"'])([^>]+)([\"'][^>]*>)|U", $out[0][$i], $temp)){
+ $buffer = str_replace($out[0][$i], $temp[1].$temp[2]."; ".$stylestring.$temp[3]."<noscript>".$noscript."</noscript></div>", $buffer);
+ } else {
+ $buffer = str_replace($out[0][$i], $out[1][$i]." style='".$stylestring."'><noscript>".$noscript."</noscript></div>", $buffer);
+ }
+ }
+ }
+ }
+ }
+
+ return $buffer;
+}
+?> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/koschtit/readme.txt b/mayor-orig/www/skin/classic/share/javascript/koschtit/readme.txt
new file mode 100644
index 00000000..7b505237
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/koschtit/readme.txt
@@ -0,0 +1,61 @@
+ KoschtIT Image Gallery
+ by Konstantin Tabere
+
+
+ Latest version
+ --------------
+
+ The most recent script version can be downloaded at <http://koschtit.tabere.net/en/>.
+ Beta versions will be available in the script forum.
+
+
+ Documentation
+ -------------
+
+ The script documentation is also available online at <http://koschtit.tabere.net/en/documentation/install>.
+ If you want to add the script to your website, follow these steps:
+
+ 1. Upload the script to your webserver. Please note, that the script needs PHP5 with GD2 enabled.
+
+ 2. Set the correct DOCTYPE for your webpage on the first line of your source code.
+ If you have HTML use:
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+ If you have XHTML use:
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+ 3. Add: <?php include_once("...../ki_include.php"); ?> into your header ( between <head> and </head> ).
+ Make sure the path to the "ki_include.php" is entered correctly.
+
+ 4. Add: <div class="koschtitgallery" title="sample"></div> to the spot where your gallery should be.
+ Edit 'title' to specify which gallery folder you want to display.
+
+ 5. Create gallery folders inside the "ki_galleries"-folder. For each new gallery a seperate folder is neccessary.
+ This is the place where your images will go to. A "sample" gallery comes with this package.
+
+ 6. You can open the admin panel for each gallery directly on your website. Therefore add an additional parameter "?admin=admin" to the url
+ e.g. "http://somedomain.com/mygallery/?admin=admin". Login to the admin panel with the default password: "password"
+
+ 7. Change the default admin/user-username and password for both admins and users in the "Settings"-menu. Now you can upload your images either through the "Upload Images"-menu
+ or if you want you can use a FTP-client.
+
+ 8. Edit further parameters through the "Settings"-menu. The "ki_setup.php" - config file is applied to all galleries. If you want to make
+ custom settings for individual galleries you will need to select the "galleryfolder_ki_setup.php" - config file.
+
+ 9. You can label pictures (image descriptions) when logged in as admin. Therefore just open the picture and write your text in the box
+ below the image. To save the picture comments press 'CTRL + Enter'.
+
+ If the script gives you warning messages you can disable them with the "$show_warnings"-parameter.
+
+
+ Licensing
+ ---------
+
+ The script is free and available for everyone without limitations. If you are using the script in a commercial project a donation
+ would be strongly appreciated. You can make a Donation via PayPal (they also accept credit cards) on my website <http://koschtit.tabere.net/en/>.
+
+
+ Contact
+ -------
+
+ If you want to contact me write me an E-mail to: kkokus [at] web [dot] de .
+ Please use the forum at <http://koschtit.tabere.net/forum/> in case you need script support.
diff --git a/mayor-orig/www/skin/classic/share/javascript/scriptaculous/MIT-LICENSE b/mayor-orig/www/skin/classic/share/javascript/scriptaculous/MIT-LICENSE
new file mode 100644
index 00000000..b5e74b40
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/scriptaculous/MIT-LICENSE
@@ -0,0 +1,20 @@
+Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/scriptaculous/builder.js b/mayor-orig/www/skin/classic/share/javascript/scriptaculous/builder.js
new file mode 100644
index 00000000..73250380
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/scriptaculous/builder.js
@@ -0,0 +1,136 @@
+// script.aculo.us builder.js v1.9.0, Thu Dec 23 16:54:48 -0500 2010
+
+// Copyright (c) 2005-2010 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+//
+// script.aculo.us is freely distributable under the terms of an MIT-style license.
+// For details, see the script.aculo.us web site: http://script.aculo.us/
+
+var Builder = {
+ NODEMAP: {
+ AREA: 'map',
+ CAPTION: 'table',
+ COL: 'table',
+ COLGROUP: 'table',
+ LEGEND: 'fieldset',
+ OPTGROUP: 'select',
+ OPTION: 'select',
+ PARAM: 'object',
+ TBODY: 'table',
+ TD: 'table',
+ TFOOT: 'table',
+ TH: 'table',
+ THEAD: 'table',
+ TR: 'table'
+ },
+ // note: For Firefox < 1.5, OPTION and OPTGROUP tags are currently broken,
+ // due to a Firefox bug
+ node: function(elementName) {
+ elementName = elementName.toUpperCase();
+
+ // try innerHTML approach
+ var parentTag = this.NODEMAP[elementName] || 'div';
+ var parentElement = document.createElement(parentTag);
+ try { // prevent IE "feature": http://dev.rubyonrails.org/ticket/2707
+ parentElement.innerHTML = "<" + elementName + "></" + elementName + ">";
+ } catch(e) {}
+ var element = parentElement.firstChild || null;
+
+ // see if browser added wrapping tags
+ if(element && (element.tagName.toUpperCase() != elementName))
+ element = element.getElementsByTagName(elementName)[0];
+
+ // fallback to createElement approach
+ if(!element) element = document.createElement(elementName);
+
+ // abort if nothing could be created
+ if(!element) return;
+
+ // attributes (or text)
+ if(arguments[1])
+ if(this._isStringOrNumber(arguments[1]) ||
+ (arguments[1] instanceof Array) ||
+ arguments[1].tagName) {
+ this._children(element, arguments[1]);
+ } else {
+ var attrs = this._attributes(arguments[1]);
+ if(attrs.length) {
+ try { // prevent IE "feature": http://dev.rubyonrails.org/ticket/2707
+ parentElement.innerHTML = "<" +elementName + " " +
+ attrs + "></" + elementName + ">";
+ } catch(e) {}
+ element = parentElement.firstChild || null;
+ // workaround firefox 1.0.X bug
+ if(!element) {
+ element = document.createElement(elementName);
+ for(attr in arguments[1])
+ element[attr == 'class' ? 'className' : attr] = arguments[1][attr];
+ }
+ if(element.tagName.toUpperCase() != elementName)
+ element = parentElement.getElementsByTagName(elementName)[0];
+ }
+ }
+
+ // text, or array of children
+ if(arguments[2])
+ this._children(element, arguments[2]);
+
+ return $(element);
+ },
+ _text: function(text) {
+ return document.createTextNode(text);
+ },
+
+ ATTR_MAP: {
+ 'className': 'class',
+ 'htmlFor': 'for'
+ },
+
+ _attributes: function(attributes) {
+ var attrs = [];
+ for(attribute in attributes)
+ attrs.push((attribute in this.ATTR_MAP ? this.ATTR_MAP[attribute] : attribute) +
+ '="' + attributes[attribute].toString().escapeHTML().gsub(/"/,'&quot;') + '"');
+ return attrs.join(" ");
+ },
+ _children: function(element, children) {
+ if(children.tagName) {
+ element.appendChild(children);
+ return;
+ }
+ if(typeof children=='object') { // array can hold nodes and text
+ children.flatten().each( function(e) {
+ if(typeof e=='object')
+ element.appendChild(e);
+ else
+ if(Builder._isStringOrNumber(e))
+ element.appendChild(Builder._text(e));
+ });
+ } else
+ if(Builder._isStringOrNumber(children))
+ element.appendChild(Builder._text(children));
+ },
+ _isStringOrNumber: function(param) {
+ return(typeof param=='string' || typeof param=='number');
+ },
+ build: function(html) {
+ var element = this.node('div');
+ $(element).update(html.strip());
+ return element.down();
+ },
+ dump: function(scope) {
+ if(typeof scope != 'object' && typeof scope != 'function') scope = window; //global scope
+
+ var tags = ("A ABBR ACRONYM ADDRESS APPLET AREA B BASE BASEFONT BDO BIG BLOCKQUOTE BODY " +
+ "BR BUTTON CAPTION CENTER CITE CODE COL COLGROUP DD DEL DFN DIR DIV DL DT EM FIELDSET " +
+ "FONT FORM FRAME FRAMESET H1 H2 H3 H4 H5 H6 HEAD HR HTML I IFRAME IMG INPUT INS ISINDEX "+
+ "KBD LABEL LEGEND LI LINK MAP MENU META NOFRAMES NOSCRIPT OBJECT OL OPTGROUP OPTION P "+
+ "PARAM PRE Q S SAMP SCRIPT SELECT SMALL SPAN STRIKE STRONG STYLE SUB SUP TABLE TBODY TD "+
+ "TEXTAREA TFOOT TH THEAD TITLE TR TT U UL VAR").split(/\s+/);
+
+ tags.each( function(tag){
+ scope[tag] = function() {
+ return Builder.node.apply(Builder, [tag].concat($A(arguments)));
+ };
+ });
+ }
+}; \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/scriptaculous/controls.js b/mayor-orig/www/skin/classic/share/javascript/scriptaculous/controls.js
new file mode 100644
index 00000000..5137ab51
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/scriptaculous/controls.js
@@ -0,0 +1,965 @@
+// script.aculo.us controls.js v1.9.0, Thu Dec 23 16:54:48 -0500 2010
+
+// Copyright (c) 2005-2010 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+// (c) 2005-2010 Ivan Krstic (http://blogs.law.harvard.edu/ivan)
+// (c) 2005-2010 Jon Tirsen (http://www.tirsen.com)
+// Contributors:
+// Richard Livsey
+// Rahul Bhargava
+// Rob Wills
+//
+// script.aculo.us is freely distributable under the terms of an MIT-style license.
+// For details, see the script.aculo.us web site: http://script.aculo.us/
+
+// Autocompleter.Base handles all the autocompletion functionality
+// that's independent of the data source for autocompletion. This
+// includes drawing the autocompletion menu, observing keyboard
+// and mouse events, and similar.
+//
+// Specific autocompleters need to provide, at the very least,
+// a getUpdatedChoices function that will be invoked every time
+// the text inside the monitored textbox changes. This method
+// should get the text for which to provide autocompletion by
+// invoking this.getToken(), NOT by directly accessing
+// this.element.value. This is to allow incremental tokenized
+// autocompletion. Specific auto-completion logic (AJAX, etc)
+// belongs in getUpdatedChoices.
+//
+// Tokenized incremental autocompletion is enabled automatically
+// when an autocompleter is instantiated with the 'tokens' option
+// in the options parameter, e.g.:
+// new Ajax.Autocompleter('id','upd', '/url/', { tokens: ',' });
+// will incrementally autocomplete with a comma as the token.
+// Additionally, ',' in the above example can be replaced with
+// a token array, e.g. { tokens: [',', '\n'] } which
+// enables autocompletion on multiple tokens. This is most
+// useful when one of the tokens is \n (a newline), as it
+// allows smart autocompletion after linebreaks.
+
+if(typeof Effect == 'undefined')
+ throw("controls.js requires including script.aculo.us' effects.js library");
+
+var Autocompleter = { };
+Autocompleter.Base = Class.create({
+ baseInitialize: function(element, update, options) {
+ element = $(element);
+ this.element = element;
+ this.update = $(update);
+ this.hasFocus = false;
+ this.changed = false;
+ this.active = false;
+ this.index = 0;
+ this.entryCount = 0;
+ this.oldElementValue = this.element.value;
+
+ if(this.setOptions)
+ this.setOptions(options);
+ else
+ this.options = options || { };
+
+ this.options.paramName = this.options.paramName || this.element.name;
+ this.options.tokens = this.options.tokens || [];
+ this.options.frequency = this.options.frequency || 0.4;
+ this.options.minChars = this.options.minChars || 1;
+ this.options.onShow = this.options.onShow ||
+ function(element, update){
+ if(!update.style.position || update.style.position=='absolute') {
+ update.style.position = 'absolute';
+ Position.clone(element, update, {
+ setHeight: false,
+ offsetTop: element.offsetHeight
+ });
+ }
+ Effect.Appear(update,{duration:0.15});
+ };
+ this.options.onHide = this.options.onHide ||
+ function(element, update){ new Effect.Fade(update,{duration:0.15}) };
+
+ if(typeof(this.options.tokens) == 'string')
+ this.options.tokens = new Array(this.options.tokens);
+ // Force carriage returns as token delimiters anyway
+ if (!this.options.tokens.include('\n'))
+ this.options.tokens.push('\n');
+
+ this.observer = null;
+
+ this.element.setAttribute('autocomplete','off');
+
+ Element.hide(this.update);
+
+ Event.observe(this.element, 'blur', this.onBlur.bindAsEventListener(this));
+ Event.observe(this.element, 'keydown', this.onKeyPress.bindAsEventListener(this));
+ },
+
+ show: function() {
+ if(Element.getStyle(this.update, 'display')=='none') this.options.onShow(this.element, this.update);
+ if(!this.iefix &&
+ (Prototype.Browser.IE) &&
+ (Element.getStyle(this.update, 'position')=='absolute')) {
+ new Insertion.After(this.update,
+ '<iframe id="' + this.update.id + '_iefix" '+
+ 'style="display:none;position:absolute;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);" ' +
+ 'src="javascript:false;" frameborder="0" scrolling="no"></iframe>');
+ this.iefix = $(this.update.id+'_iefix');
+ }
+ if(this.iefix) setTimeout(this.fixIEOverlapping.bind(this), 50);
+ },
+
+ fixIEOverlapping: function() {
+ Position.clone(this.update, this.iefix, {setTop:(!this.update.style.height)});
+ this.iefix.style.zIndex = 1;
+ this.update.style.zIndex = 2;
+ Element.show(this.iefix);
+ },
+
+ hide: function() {
+ this.stopIndicator();
+ if(Element.getStyle(this.update, 'display')!='none') this.options.onHide(this.element, this.update);
+ if(this.iefix) Element.hide(this.iefix);
+ },
+
+ startIndicator: function() {
+ if(this.options.indicator) Element.show(this.options.indicator);
+ },
+
+ stopIndicator: function() {
+ if(this.options.indicator) Element.hide(this.options.indicator);
+ },
+
+ onKeyPress: function(event) {
+ if(this.active)
+ switch(event.keyCode) {
+ case Event.KEY_TAB:
+ case Event.KEY_RETURN:
+ this.selectEntry();
+ Event.stop(event);
+ case Event.KEY_ESC:
+ this.hide();
+ this.active = false;
+ Event.stop(event);
+ return;
+ case Event.KEY_LEFT:
+ case Event.KEY_RIGHT:
+ return;
+ case Event.KEY_UP:
+ this.markPrevious();
+ this.render();
+ Event.stop(event);
+ return;
+ case Event.KEY_DOWN:
+ this.markNext();
+ this.render();
+ Event.stop(event);
+ return;
+ }
+ else
+ if(event.keyCode==Event.KEY_TAB || event.keyCode==Event.KEY_RETURN ||
+ (Prototype.Browser.WebKit > 0 && event.keyCode == 0)) return;
+
+ this.changed = true;
+ this.hasFocus = true;
+
+ if(this.observer) clearTimeout(this.observer);
+ this.observer =
+ setTimeout(this.onObserverEvent.bind(this), this.options.frequency*1000);
+ },
+
+ activate: function() {
+ this.changed = false;
+ this.hasFocus = true;
+ this.getUpdatedChoices();
+ },
+
+ onHover: function(event) {
+ var element = Event.findElement(event, 'LI');
+ if(this.index != element.autocompleteIndex)
+ {
+ this.index = element.autocompleteIndex;
+ this.render();
+ }
+ Event.stop(event);
+ },
+
+ onClick: function(event) {
+ var element = Event.findElement(event, 'LI');
+ this.index = element.autocompleteIndex;
+ this.selectEntry();
+ this.hide();
+ },
+
+ onBlur: function(event) {
+ // needed to make click events working
+ setTimeout(this.hide.bind(this), 250);
+ this.hasFocus = false;
+ this.active = false;
+ },
+
+ render: function() {
+ if(this.entryCount > 0) {
+ for (var i = 0; i < this.entryCount; i++)
+ this.index==i ?
+ Element.addClassName(this.getEntry(i),"selected") :
+ Element.removeClassName(this.getEntry(i),"selected");
+ if(this.hasFocus) {
+ this.show();
+ this.active = true;
+ }
+ } else {
+ this.active = false;
+ this.hide();
+ }
+ },
+
+ markPrevious: function() {
+ if(this.index > 0) this.index--;
+ else this.index = this.entryCount-1;
+ this.getEntry(this.index).scrollIntoView(true);
+ },
+
+ markNext: function() {
+ if(this.index < this.entryCount-1) this.index++;
+ else this.index = 0;
+ this.getEntry(this.index).scrollIntoView(false);
+ },
+
+ getEntry: function(index) {
+ return this.update.firstChild.childNodes[index];
+ },
+
+ getCurrentEntry: function() {
+ return this.getEntry(this.index);
+ },
+
+ selectEntry: function() {
+ this.active = false;
+ this.updateElement(this.getCurrentEntry());
+ },
+
+ updateElement: function(selectedElement) {
+ if (this.options.updateElement) {
+ this.options.updateElement(selectedElement);
+ return;
+ }
+ var value = '';
+ if (this.options.select) {
+ var nodes = $(selectedElement).select('.' + this.options.select) || [];
+ if(nodes.length>0) value = Element.collectTextNodes(nodes[0], this.options.select);
+ } else
+ value = Element.collectTextNodesIgnoreClass(selectedElement, 'informal');
+
+ var bounds = this.getTokenBounds();
+ if (bounds[0] != -1) {
+ var newValue = this.element.value.substr(0, bounds[0]);
+ var whitespace = this.element.value.substr(bounds[0]).match(/^\s+/);
+ if (whitespace)
+ newValue += whitespace[0];
+ this.element.value = newValue + value + this.element.value.substr(bounds[1]);
+ } else {
+ this.element.value = value;
+ }
+ this.oldElementValue = this.element.value;
+ this.element.focus();
+
+ if (this.options.afterUpdateElement)
+ this.options.afterUpdateElement(this.element, selectedElement);
+ },
+
+ updateChoices: function(choices) {
+ if(!this.changed && this.hasFocus) {
+ this.update.innerHTML = choices;
+ Element.cleanWhitespace(this.update);
+ Element.cleanWhitespace(this.update.down());
+
+ if(this.update.firstChild && this.update.down().childNodes) {
+ this.entryCount =
+ this.update.down().childNodes.length;
+ for (var i = 0; i < this.entryCount; i++) {
+ var entry = this.getEntry(i);
+ entry.autocompleteIndex = i;
+ this.addObservers(entry);
+ }
+ } else {
+ this.entryCount = 0;
+ }
+
+ this.stopIndicator();
+ this.index = 0;
+
+ if(this.entryCount==1 && this.options.autoSelect) {
+ this.selectEntry();
+ this.hide();
+ } else {
+ this.render();
+ }
+ }
+ },
+
+ addObservers: function(element) {
+ Event.observe(element, "mouseover", this.onHover.bindAsEventListener(this));
+ Event.observe(element, "click", this.onClick.bindAsEventListener(this));
+ },
+
+ onObserverEvent: function() {
+ this.changed = false;
+ this.tokenBounds = null;
+ if(this.getToken().length>=this.options.minChars) {
+ this.getUpdatedChoices();
+ } else {
+ this.active = false;
+ this.hide();
+ }
+ this.oldElementValue = this.element.value;
+ },
+
+ getToken: function() {
+ var bounds = this.getTokenBounds();
+ return this.element.value.substring(bounds[0], bounds[1]).strip();
+ },
+
+ getTokenBounds: function() {
+ if (null != this.tokenBounds) return this.tokenBounds;
+ var value = this.element.value;
+ if (value.strip().empty()) return [-1, 0];
+ var diff = arguments.callee.getFirstDifferencePos(value, this.oldElementValue);
+ var offset = (diff == this.oldElementValue.length ? 1 : 0);
+ var prevTokenPos = -1, nextTokenPos = value.length;
+ var tp;
+ for (var index = 0, l = this.options.tokens.length; index < l; ++index) {
+ tp = value.lastIndexOf(this.options.tokens[index], diff + offset - 1);
+ if (tp > prevTokenPos) prevTokenPos = tp;
+ tp = value.indexOf(this.options.tokens[index], diff + offset);
+ if (-1 != tp && tp < nextTokenPos) nextTokenPos = tp;
+ }
+ return (this.tokenBounds = [prevTokenPos + 1, nextTokenPos]);
+ }
+});
+
+Autocompleter.Base.prototype.getTokenBounds.getFirstDifferencePos = function(newS, oldS) {
+ var boundary = Math.min(newS.length, oldS.length);
+ for (var index = 0; index < boundary; ++index)
+ if (newS[index] != oldS[index])
+ return index;
+ return boundary;
+};
+
+Ajax.Autocompleter = Class.create(Autocompleter.Base, {
+ initialize: function(element, update, url, options) {
+ this.baseInitialize(element, update, options);
+ this.options.asynchronous = true;
+ this.options.onComplete = this.onComplete.bind(this);
+ this.options.defaultParams = this.options.parameters || null;
+ this.url = url;
+ },
+
+ getUpdatedChoices: function() {
+ this.startIndicator();
+
+ var entry = encodeURIComponent(this.options.paramName) + '=' +
+ encodeURIComponent(this.getToken());
+
+ this.options.parameters = this.options.callback ?
+ this.options.callback(this.element, entry) : entry;
+
+ if(this.options.defaultParams)
+ this.options.parameters += '&' + this.options.defaultParams;
+
+ new Ajax.Request(this.url, this.options);
+ },
+
+ onComplete: function(request) {
+ this.updateChoices(request.responseText);
+ }
+});
+
+// The local array autocompleter. Used when you'd prefer to
+// inject an array of autocompletion options into the page, rather
+// than sending out Ajax queries, which can be quite slow sometimes.
+//
+// The constructor takes four parameters. The first two are, as usual,
+// the id of the monitored textbox, and id of the autocompletion menu.
+// The third is the array you want to autocomplete from, and the fourth
+// is the options block.
+//
+// Extra local autocompletion options:
+// - choices - How many autocompletion choices to offer
+//
+// - partialSearch - If false, the autocompleter will match entered
+// text only at the beginning of strings in the
+// autocomplete array. Defaults to true, which will
+// match text at the beginning of any *word* in the
+// strings in the autocomplete array. If you want to
+// search anywhere in the string, additionally set
+// the option fullSearch to true (default: off).
+//
+// - fullSsearch - Search anywhere in autocomplete array strings.
+//
+// - partialChars - How many characters to enter before triggering
+// a partial match (unlike minChars, which defines
+// how many characters are required to do any match
+// at all). Defaults to 2.
+//
+// - ignoreCase - Whether to ignore case when autocompleting.
+// Defaults to true.
+//
+// It's possible to pass in a custom function as the 'selector'
+// option, if you prefer to write your own autocompletion logic.
+// In that case, the other options above will not apply unless
+// you support them.
+
+Autocompleter.Local = Class.create(Autocompleter.Base, {
+ initialize: function(element, update, array, options) {
+ this.baseInitialize(element, update, options);
+ this.options.array = array;
+ },
+
+ getUpdatedChoices: function() {
+ this.updateChoices(this.options.selector(this));
+ },
+
+ setOptions: function(options) {
+ this.options = Object.extend({
+ choices: 10,
+ partialSearch: true,
+ partialChars: 2,
+ ignoreCase: true,
+ fullSearch: false,
+ selector: function(instance) {
+ var ret = []; // Beginning matches
+ var partial = []; // Inside matches
+ var entry = instance.getToken();
+ var count = 0;
+
+ for (var i = 0; i < instance.options.array.length &&
+ ret.length < instance.options.choices ; i++) {
+
+ var elem = instance.options.array[i];
+ var foundPos = instance.options.ignoreCase ?
+ elem.toLowerCase().indexOf(entry.toLowerCase()) :
+ elem.indexOf(entry);
+
+ while (foundPos != -1) {
+ if (foundPos == 0 && elem.length != entry.length) {
+ ret.push("<li><strong>" + elem.substr(0, entry.length) + "</strong>" +
+ elem.substr(entry.length) + "</li>");
+ break;
+ } else if (entry.length >= instance.options.partialChars &&
+ instance.options.partialSearch && foundPos != -1) {
+ if (instance.options.fullSearch || /\s/.test(elem.substr(foundPos-1,1))) {
+ partial.push("<li>" + elem.substr(0, foundPos) + "<strong>" +
+ elem.substr(foundPos, entry.length) + "</strong>" + elem.substr(
+ foundPos + entry.length) + "</li>");
+ break;
+ }
+ }
+
+ foundPos = instance.options.ignoreCase ?
+ elem.toLowerCase().indexOf(entry.toLowerCase(), foundPos + 1) :
+ elem.indexOf(entry, foundPos + 1);
+
+ }
+ }
+ if (partial.length)
+ ret = ret.concat(partial.slice(0, instance.options.choices - ret.length));
+ return "<ul>" + ret.join('') + "</ul>";
+ }
+ }, options || { });
+ }
+});
+
+// AJAX in-place editor and collection editor
+// Full rewrite by Christophe Porteneuve <tdd@tddsworld.com> (April 2007).
+
+// Use this if you notice weird scrolling problems on some browsers,
+// the DOM might be a bit confused when this gets called so do this
+// waits 1 ms (with setTimeout) until it does the activation
+Field.scrollFreeActivate = function(field) {
+ setTimeout(function() {
+ Field.activate(field);
+ }, 1);
+};
+
+Ajax.InPlaceEditor = Class.create({
+ initialize: function(element, url, options) {
+ this.url = url;
+ this.element = element = $(element);
+ this.prepareOptions();
+ this._controls = { };
+ arguments.callee.dealWithDeprecatedOptions(options); // DEPRECATION LAYER!!!
+ Object.extend(this.options, options || { });
+ if (!this.options.formId && this.element.id) {
+ this.options.formId = this.element.id + '-inplaceeditor';
+ if ($(this.options.formId))
+ this.options.formId = '';
+ }
+ if (this.options.externalControl)
+ this.options.externalControl = $(this.options.externalControl);
+ if (!this.options.externalControl)
+ this.options.externalControlOnly = false;
+ this._originalBackground = this.element.getStyle('background-color') || 'transparent';
+ this.element.title = this.options.clickToEditText;
+ this._boundCancelHandler = this.handleFormCancellation.bind(this);
+ this._boundComplete = (this.options.onComplete || Prototype.emptyFunction).bind(this);
+ this._boundFailureHandler = this.handleAJAXFailure.bind(this);
+ this._boundSubmitHandler = this.handleFormSubmission.bind(this);
+ this._boundWrapperHandler = this.wrapUp.bind(this);
+ this.registerListeners();
+ },
+ checkForEscapeOrReturn: function(e) {
+ if (!this._editing || e.ctrlKey || e.altKey || e.shiftKey) return;
+ if (Event.KEY_ESC == e.keyCode)
+ this.handleFormCancellation(e);
+ else if (Event.KEY_RETURN == e.keyCode)
+ this.handleFormSubmission(e);
+ },
+ createControl: function(mode, handler, extraClasses) {
+ var control = this.options[mode + 'Control'];
+ var text = this.options[mode + 'Text'];
+ if ('button' == control) {
+ var btn = document.createElement('input');
+ btn.type = 'submit';
+ btn.value = text;
+ btn.className = 'editor_' + mode + '_button';
+ if ('cancel' == mode)
+ btn.onclick = this._boundCancelHandler;
+ this._form.appendChild(btn);
+ this._controls[mode] = btn;
+ } else if ('link' == control) {
+ var link = document.createElement('a');
+ link.href = '#';
+ link.appendChild(document.createTextNode(text));
+ link.onclick = 'cancel' == mode ? this._boundCancelHandler : this._boundSubmitHandler;
+ link.className = 'editor_' + mode + '_link';
+ if (extraClasses)
+ link.className += ' ' + extraClasses;
+ this._form.appendChild(link);
+ this._controls[mode] = link;
+ }
+ },
+ createEditField: function() {
+ var text = (this.options.loadTextURL ? this.options.loadingText : this.getText());
+ var fld;
+ if (1 >= this.options.rows && !/\r|\n/.test(this.getText())) {
+ fld = document.createElement('input');
+ fld.type = 'text';
+ var size = this.options.size || this.options.cols || 0;
+ if (0 < size) fld.size = size;
+ } else {
+ fld = document.createElement('textarea');
+ fld.rows = (1 >= this.options.rows ? this.options.autoRows : this.options.rows);
+ fld.cols = this.options.cols || 40;
+ }
+ fld.name = this.options.paramName;
+ fld.value = text; // No HTML breaks conversion anymore
+ fld.className = 'editor_field';
+ if (this.options.submitOnBlur)
+ fld.onblur = this._boundSubmitHandler;
+ this._controls.editor = fld;
+ if (this.options.loadTextURL)
+ this.loadExternalText();
+ this._form.appendChild(this._controls.editor);
+ },
+ createForm: function() {
+ var ipe = this;
+ function addText(mode, condition) {
+ var text = ipe.options['text' + mode + 'Controls'];
+ if (!text || condition === false) return;
+ ipe._form.appendChild(document.createTextNode(text));
+ };
+ this._form = $(document.createElement('form'));
+ this._form.id = this.options.formId;
+ this._form.addClassName(this.options.formClassName);
+ this._form.onsubmit = this._boundSubmitHandler;
+ this.createEditField();
+ if ('textarea' == this._controls.editor.tagName.toLowerCase())
+ this._form.appendChild(document.createElement('br'));
+ if (this.options.onFormCustomization)
+ this.options.onFormCustomization(this, this._form);
+ addText('Before', this.options.okControl || this.options.cancelControl);
+ this.createControl('ok', this._boundSubmitHandler);
+ addText('Between', this.options.okControl && this.options.cancelControl);
+ this.createControl('cancel', this._boundCancelHandler, 'editor_cancel');
+ addText('After', this.options.okControl || this.options.cancelControl);
+ },
+ destroy: function() {
+ if (this._oldInnerHTML)
+ this.element.innerHTML = this._oldInnerHTML;
+ this.leaveEditMode();
+ this.unregisterListeners();
+ },
+ enterEditMode: function(e) {
+ if (this._saving || this._editing) return;
+ this._editing = true;
+ this.triggerCallback('onEnterEditMode');
+ if (this.options.externalControl)
+ this.options.externalControl.hide();
+ this.element.hide();
+ this.createForm();
+ this.element.parentNode.insertBefore(this._form, this.element);
+ if (!this.options.loadTextURL)
+ this.postProcessEditField();
+ if (e) Event.stop(e);
+ },
+ enterHover: function(e) {
+ if (this.options.hoverClassName)
+ this.element.addClassName(this.options.hoverClassName);
+ if (this._saving) return;
+ this.triggerCallback('onEnterHover');
+ },
+ getText: function() {
+ return this.element.innerHTML.unescapeHTML();
+ },
+ handleAJAXFailure: function(transport) {
+ this.triggerCallback('onFailure', transport);
+ if (this._oldInnerHTML) {
+ this.element.innerHTML = this._oldInnerHTML;
+ this._oldInnerHTML = null;
+ }
+ },
+ handleFormCancellation: function(e) {
+ this.wrapUp();
+ if (e) Event.stop(e);
+ },
+ handleFormSubmission: function(e) {
+ var form = this._form;
+ var value = $F(this._controls.editor);
+ this.prepareSubmission();
+ var params = this.options.callback(form, value) || '';
+ if (Object.isString(params))
+ params = params.toQueryParams();
+ params.editorId = this.element.id;
+ if (this.options.htmlResponse) {
+ var options = Object.extend({ evalScripts: true }, this.options.ajaxOptions);
+ Object.extend(options, {
+ parameters: params,
+ onComplete: this._boundWrapperHandler,
+ onFailure: this._boundFailureHandler
+ });
+ new Ajax.Updater({ success: this.element }, this.url, options);
+ } else {
+ var options = Object.extend({ method: 'get' }, this.options.ajaxOptions);
+ Object.extend(options, {
+ parameters: params,
+ onComplete: this._boundWrapperHandler,
+ onFailure: this._boundFailureHandler
+ });
+ new Ajax.Request(this.url, options);
+ }
+ if (e) Event.stop(e);
+ },
+ leaveEditMode: function() {
+ this.element.removeClassName(this.options.savingClassName);
+ this.removeForm();
+ this.leaveHover();
+ this.element.style.backgroundColor = this._originalBackground;
+ this.element.show();
+ if (this.options.externalControl)
+ this.options.externalControl.show();
+ this._saving = false;
+ this._editing = false;
+ this._oldInnerHTML = null;
+ this.triggerCallback('onLeaveEditMode');
+ },
+ leaveHover: function(e) {
+ if (this.options.hoverClassName)
+ this.element.removeClassName(this.options.hoverClassName);
+ if (this._saving) return;
+ this.triggerCallback('onLeaveHover');
+ },
+ loadExternalText: function() {
+ this._form.addClassName(this.options.loadingClassName);
+ this._controls.editor.disabled = true;
+ var options = Object.extend({ method: 'get' }, this.options.ajaxOptions);
+ Object.extend(options, {
+ parameters: 'editorId=' + encodeURIComponent(this.element.id),
+ onComplete: Prototype.emptyFunction,
+ onSuccess: function(transport) {
+ this._form.removeClassName(this.options.loadingClassName);
+ var text = transport.responseText;
+ if (this.options.stripLoadedTextTags)
+ text = text.stripTags();
+ this._controls.editor.value = text;
+ this._controls.editor.disabled = false;
+ this.postProcessEditField();
+ }.bind(this),
+ onFailure: this._boundFailureHandler
+ });
+ new Ajax.Request(this.options.loadTextURL, options);
+ },
+ postProcessEditField: function() {
+ var fpc = this.options.fieldPostCreation;
+ if (fpc)
+ $(this._controls.editor)['focus' == fpc ? 'focus' : 'activate']();
+ },
+ prepareOptions: function() {
+ this.options = Object.clone(Ajax.InPlaceEditor.DefaultOptions);
+ Object.extend(this.options, Ajax.InPlaceEditor.DefaultCallbacks);
+ [this._extraDefaultOptions].flatten().compact().each(function(defs) {
+ Object.extend(this.options, defs);
+ }.bind(this));
+ },
+ prepareSubmission: function() {
+ this._saving = true;
+ this.removeForm();
+ this.leaveHover();
+ this.showSaving();
+ },
+ registerListeners: function() {
+ this._listeners = { };
+ var listener;
+ $H(Ajax.InPlaceEditor.Listeners).each(function(pair) {
+ listener = this[pair.value].bind(this);
+ this._listeners[pair.key] = listener;
+ if (!this.options.externalControlOnly)
+ this.element.observe(pair.key, listener);
+ if (this.options.externalControl)
+ this.options.externalControl.observe(pair.key, listener);
+ }.bind(this));
+ },
+ removeForm: function() {
+ if (!this._form) return;
+ this._form.remove();
+ this._form = null;
+ this._controls = { };
+ },
+ showSaving: function() {
+ this._oldInnerHTML = this.element.innerHTML;
+ this.element.innerHTML = this.options.savingText;
+ this.element.addClassName(this.options.savingClassName);
+ this.element.style.backgroundColor = this._originalBackground;
+ this.element.show();
+ },
+ triggerCallback: function(cbName, arg) {
+ if ('function' == typeof this.options[cbName]) {
+ this.options[cbName](this, arg);
+ }
+ },
+ unregisterListeners: function() {
+ $H(this._listeners).each(function(pair) {
+ if (!this.options.externalControlOnly)
+ this.element.stopObserving(pair.key, pair.value);
+ if (this.options.externalControl)
+ this.options.externalControl.stopObserving(pair.key, pair.value);
+ }.bind(this));
+ },
+ wrapUp: function(transport) {
+ this.leaveEditMode();
+ // Can't use triggerCallback due to backward compatibility: requires
+ // binding + direct element
+ this._boundComplete(transport, this.element);
+ }
+});
+
+Object.extend(Ajax.InPlaceEditor.prototype, {
+ dispose: Ajax.InPlaceEditor.prototype.destroy
+});
+
+Ajax.InPlaceCollectionEditor = Class.create(Ajax.InPlaceEditor, {
+ initialize: function($super, element, url, options) {
+ this._extraDefaultOptions = Ajax.InPlaceCollectionEditor.DefaultOptions;
+ $super(element, url, options);
+ },
+
+ createEditField: function() {
+ var list = document.createElement('select');
+ list.name = this.options.paramName;
+ list.size = 1;
+ this._controls.editor = list;
+ this._collection = this.options.collection || [];
+ if (this.options.loadCollectionURL)
+ this.loadCollection();
+ else
+ this.checkForExternalText();
+ this._form.appendChild(this._controls.editor);
+ },
+
+ loadCollection: function() {
+ this._form.addClassName(this.options.loadingClassName);
+ this.showLoadingText(this.options.loadingCollectionText);
+ var options = Object.extend({ method: 'get' }, this.options.ajaxOptions);
+ Object.extend(options, {
+ parameters: 'editorId=' + encodeURIComponent(this.element.id),
+ onComplete: Prototype.emptyFunction,
+ onSuccess: function(transport) {
+ var js = transport.responseText.strip();
+ if (!/^\[.*\]$/.test(js)) // TODO: improve sanity check
+ throw('Server returned an invalid collection representation.');
+ this._collection = eval(js);
+ this.checkForExternalText();
+ }.bind(this),
+ onFailure: this.onFailure
+ });
+ new Ajax.Request(this.options.loadCollectionURL, options);
+ },
+
+ showLoadingText: function(text) {
+ this._controls.editor.disabled = true;
+ var tempOption = this._controls.editor.firstChild;
+ if (!tempOption) {
+ tempOption = document.createElement('option');
+ tempOption.value = '';
+ this._controls.editor.appendChild(tempOption);
+ tempOption.selected = true;
+ }
+ tempOption.update((text || '').stripScripts().stripTags());
+ },
+
+ checkForExternalText: function() {
+ this._text = this.getText();
+ if (this.options.loadTextURL)
+ this.loadExternalText();
+ else
+ this.buildOptionList();
+ },
+
+ loadExternalText: function() {
+ this.showLoadingText(this.options.loadingText);
+ var options = Object.extend({ method: 'get' }, this.options.ajaxOptions);
+ Object.extend(options, {
+ parameters: 'editorId=' + encodeURIComponent(this.element.id),
+ onComplete: Prototype.emptyFunction,
+ onSuccess: function(transport) {
+ this._text = transport.responseText.strip();
+ this.buildOptionList();
+ }.bind(this),
+ onFailure: this.onFailure
+ });
+ new Ajax.Request(this.options.loadTextURL, options);
+ },
+
+ buildOptionList: function() {
+ this._form.removeClassName(this.options.loadingClassName);
+ this._collection = this._collection.map(function(entry) {
+ return 2 === entry.length ? entry : [entry, entry].flatten();
+ });
+ var marker = ('value' in this.options) ? this.options.value : this._text;
+ var textFound = this._collection.any(function(entry) {
+ return entry[0] == marker;
+ }.bind(this));
+ this._controls.editor.update('');
+ var option;
+ this._collection.each(function(entry, index) {
+ option = document.createElement('option');
+ option.value = entry[0];
+ option.selected = textFound ? entry[0] == marker : 0 == index;
+ option.appendChild(document.createTextNode(entry[1]));
+ this._controls.editor.appendChild(option);
+ }.bind(this));
+ this._controls.editor.disabled = false;
+ Field.scrollFreeActivate(this._controls.editor);
+ }
+});
+
+//**** DEPRECATION LAYER FOR InPlace[Collection]Editor! ****
+//**** This only exists for a while, in order to let ****
+//**** users adapt to the new API. Read up on the new ****
+//**** API and convert your code to it ASAP! ****
+
+Ajax.InPlaceEditor.prototype.initialize.dealWithDeprecatedOptions = function(options) {
+ if (!options) return;
+ function fallback(name, expr) {
+ if (name in options || expr === undefined) return;
+ options[name] = expr;
+ };
+ fallback('cancelControl', (options.cancelLink ? 'link' : (options.cancelButton ? 'button' :
+ options.cancelLink == options.cancelButton == false ? false : undefined)));
+ fallback('okControl', (options.okLink ? 'link' : (options.okButton ? 'button' :
+ options.okLink == options.okButton == false ? false : undefined)));
+ fallback('highlightColor', options.highlightcolor);
+ fallback('highlightEndColor', options.highlightendcolor);
+};
+
+Object.extend(Ajax.InPlaceEditor, {
+ DefaultOptions: {
+ ajaxOptions: { },
+ autoRows: 3, // Use when multi-line w/ rows == 1
+ cancelControl: 'link', // 'link'|'button'|false
+ cancelText: 'cancel',
+ clickToEditText: 'Click to edit',
+ externalControl: null, // id|elt
+ externalControlOnly: false,
+ fieldPostCreation: 'activate', // 'activate'|'focus'|false
+ formClassName: 'inplaceeditor-form',
+ formId: null, // id|elt
+ highlightColor: '#ffff99',
+ highlightEndColor: '#ffffff',
+ hoverClassName: '',
+ htmlResponse: true,
+ loadingClassName: 'inplaceeditor-loading',
+ loadingText: 'Loading...',
+ okControl: 'button', // 'link'|'button'|false
+ okText: 'ok',
+ paramName: 'value',
+ rows: 1, // If 1 and multi-line, uses autoRows
+ savingClassName: 'inplaceeditor-saving',
+ savingText: 'Saving...',
+ size: 0,
+ stripLoadedTextTags: false,
+ submitOnBlur: false,
+ textAfterControls: '',
+ textBeforeControls: '',
+ textBetweenControls: ''
+ },
+ DefaultCallbacks: {
+ callback: function(form) {
+ return Form.serialize(form);
+ },
+ onComplete: function(transport, element) {
+ // For backward compatibility, this one is bound to the IPE, and passes
+ // the element directly. It was too often customized, so we don't break it.
+ new Effect.Highlight(element, {
+ startcolor: this.options.highlightColor, keepBackgroundImage: true });
+ },
+ onEnterEditMode: null,
+ onEnterHover: function(ipe) {
+ ipe.element.style.backgroundColor = ipe.options.highlightColor;
+ if (ipe._effect)
+ ipe._effect.cancel();
+ },
+ onFailure: function(transport, ipe) {
+ alert('Error communication with the server: ' + transport.responseText.stripTags());
+ },
+ onFormCustomization: null, // Takes the IPE and its generated form, after editor, before controls.
+ onLeaveEditMode: null,
+ onLeaveHover: function(ipe) {
+ ipe._effect = new Effect.Highlight(ipe.element, {
+ startcolor: ipe.options.highlightColor, endcolor: ipe.options.highlightEndColor,
+ restorecolor: ipe._originalBackground, keepBackgroundImage: true
+ });
+ }
+ },
+ Listeners: {
+ click: 'enterEditMode',
+ keydown: 'checkForEscapeOrReturn',
+ mouseover: 'enterHover',
+ mouseout: 'leaveHover'
+ }
+});
+
+Ajax.InPlaceCollectionEditor.DefaultOptions = {
+ loadingCollectionText: 'Loading options...'
+};
+
+// Delayed observer, like Form.Element.Observer,
+// but waits for delay after last key input
+// Ideal for live-search fields
+
+Form.Element.DelayedObserver = Class.create({
+ initialize: function(element, delay, callback) {
+ this.delay = delay || 0.5;
+ this.element = $(element);
+ this.callback = callback;
+ this.timer = null;
+ this.lastValue = $F(this.element);
+ Event.observe(this.element,'keyup',this.delayedListener.bindAsEventListener(this));
+ },
+ delayedListener: function(event) {
+ if(this.lastValue == $F(this.element)) return;
+ if(this.timer) clearTimeout(this.timer);
+ this.timer = setTimeout(this.onTimerEvent.bind(this), this.delay * 1000);
+ this.lastValue = $F(this.element);
+ },
+ onTimerEvent: function() {
+ this.timer = null;
+ this.callback(this.element, $F(this.element));
+ }
+}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/scriptaculous/dragdrop.js b/mayor-orig/www/skin/classic/share/javascript/scriptaculous/dragdrop.js
new file mode 100644
index 00000000..9ebfe24d
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/scriptaculous/dragdrop.js
@@ -0,0 +1,974 @@
+// script.aculo.us dragdrop.js v1.9.0, Thu Dec 23 16:54:48 -0500 2010
+
+// Copyright (c) 2005-2010 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+//
+// script.aculo.us is freely distributable under the terms of an MIT-style license.
+// For details, see the script.aculo.us web site: http://script.aculo.us/
+
+if(Object.isUndefined(Effect))
+ throw("dragdrop.js requires including script.aculo.us' effects.js library");
+
+var Droppables = {
+ drops: [],
+
+ remove: function(element) {
+ this.drops = this.drops.reject(function(d) { return d.element==$(element) });
+ },
+
+ add: function(element) {
+ element = $(element);
+ var options = Object.extend({
+ greedy: true,
+ hoverclass: null,
+ tree: false
+ }, arguments[1] || { });
+
+ // cache containers
+ if(options.containment) {
+ options._containers = [];
+ var containment = options.containment;
+ if(Object.isArray(containment)) {
+ containment.each( function(c) { options._containers.push($(c)) });
+ } else {
+ options._containers.push($(containment));
+ }
+ }
+
+ if(options.accept) options.accept = [options.accept].flatten();
+
+ Element.makePositioned(element); // fix IE
+ options.element = element;
+
+ this.drops.push(options);
+ },
+
+ findDeepestChild: function(drops) {
+ deepest = drops[0];
+
+ for (i = 1; i < drops.length; ++i)
+ if (Element.isParent(drops[i].element, deepest.element))
+ deepest = drops[i];
+
+ return deepest;
+ },
+
+ isContained: function(element, drop) {
+ var containmentNode;
+ if(drop.tree) {
+ containmentNode = element.treeNode;
+ } else {
+ containmentNode = element.parentNode;
+ }
+ return drop._containers.detect(function(c) { return containmentNode == c });
+ },
+
+ isAffected: function(point, element, drop) {
+ return (
+ (drop.element!=element) &&
+ ((!drop._containers) ||
+ this.isContained(element, drop)) &&
+ ((!drop.accept) ||
+ (Element.classNames(element).detect(
+ function(v) { return drop.accept.include(v) } ) )) &&
+ Position.within(drop.element, point[0], point[1]) );
+ },
+
+ deactivate: function(drop) {
+ if(drop.hoverclass)
+ Element.removeClassName(drop.element, drop.hoverclass);
+ this.last_active = null;
+ },
+
+ activate: function(drop) {
+ if(drop.hoverclass)
+ Element.addClassName(drop.element, drop.hoverclass);
+ this.last_active = drop;
+ },
+
+ show: function(point, element) {
+ if(!this.drops.length) return;
+ var drop, affected = [];
+
+ this.drops.each( function(drop) {
+ if(Droppables.isAffected(point, element, drop))
+ affected.push(drop);
+ });
+
+ if(affected.length>0)
+ drop = Droppables.findDeepestChild(affected);
+
+ if(this.last_active && this.last_active != drop) this.deactivate(this.last_active);
+ if (drop) {
+ Position.within(drop.element, point[0], point[1]);
+ if(drop.onHover)
+ drop.onHover(element, drop.element, Position.overlap(drop.overlap, drop.element));
+
+ if (drop != this.last_active) Droppables.activate(drop);
+ }
+ },
+
+ fire: function(event, element) {
+ if(!this.last_active) return;
+ Position.prepare();
+
+ if (this.isAffected([Event.pointerX(event), Event.pointerY(event)], element, this.last_active))
+ if (this.last_active.onDrop) {
+ this.last_active.onDrop(element, this.last_active.element, event);
+ return true;
+ }
+ },
+
+ reset: function() {
+ if(this.last_active)
+ this.deactivate(this.last_active);
+ }
+};
+
+var Draggables = {
+ drags: [],
+ observers: [],
+
+ register: function(draggable) {
+ if(this.drags.length == 0) {
+ this.eventMouseUp = this.endDrag.bindAsEventListener(this);
+ this.eventMouseMove = this.updateDrag.bindAsEventListener(this);
+ this.eventKeypress = this.keyPress.bindAsEventListener(this);
+
+ Event.observe(document, "mouseup", this.eventMouseUp);
+ Event.observe(document, "mousemove", this.eventMouseMove);
+ Event.observe(document, "keypress", this.eventKeypress);
+ }
+ this.drags.push(draggable);
+ },
+
+ unregister: function(draggable) {
+ this.drags = this.drags.reject(function(d) { return d==draggable });
+ if(this.drags.length == 0) {
+ Event.stopObserving(document, "mouseup", this.eventMouseUp);
+ Event.stopObserving(document, "mousemove", this.eventMouseMove);
+ Event.stopObserving(document, "keypress", this.eventKeypress);
+ }
+ },
+
+ activate: function(draggable) {
+ if(draggable.options.delay) {
+ this._timeout = setTimeout(function() {
+ Draggables._timeout = null;
+ window.focus();
+ Draggables.activeDraggable = draggable;
+ }.bind(this), draggable.options.delay);
+ } else {
+ window.focus(); // allows keypress events if window isn't currently focused, fails for Safari
+ this.activeDraggable = draggable;
+ }
+ },
+
+ deactivate: function() {
+ this.activeDraggable = null;
+ },
+
+ updateDrag: function(event) {
+ if(!this.activeDraggable) return;
+ var pointer = [Event.pointerX(event), Event.pointerY(event)];
+ // Mozilla-based browsers fire successive mousemove events with
+ // the same coordinates, prevent needless redrawing (moz bug?)
+ if(this._lastPointer && (this._lastPointer.inspect() == pointer.inspect())) return;
+ this._lastPointer = pointer;
+
+ this.activeDraggable.updateDrag(event, pointer);
+ },
+
+ endDrag: function(event) {
+ if(this._timeout) {
+ clearTimeout(this._timeout);
+ this._timeout = null;
+ }
+ if(!this.activeDraggable) return;
+ this._lastPointer = null;
+ this.activeDraggable.endDrag(event);
+ this.activeDraggable = null;
+ },
+
+ keyPress: function(event) {
+ if(this.activeDraggable)
+ this.activeDraggable.keyPress(event);
+ },
+
+ addObserver: function(observer) {
+ this.observers.push(observer);
+ this._cacheObserverCallbacks();
+ },
+
+ removeObserver: function(element) { // element instead of observer fixes mem leaks
+ this.observers = this.observers.reject( function(o) { return o.element==element });
+ this._cacheObserverCallbacks();
+ },
+
+ notify: function(eventName, draggable, event) { // 'onStart', 'onEnd', 'onDrag'
+ if(this[eventName+'Count'] > 0)
+ this.observers.each( function(o) {
+ if(o[eventName]) o[eventName](eventName, draggable, event);
+ });
+ if(draggable.options[eventName]) draggable.options[eventName](draggable, event);
+ },
+
+ _cacheObserverCallbacks: function() {
+ ['onStart','onEnd','onDrag'].each( function(eventName) {
+ Draggables[eventName+'Count'] = Draggables.observers.select(
+ function(o) { return o[eventName]; }
+ ).length;
+ });
+ }
+};
+
+/*--------------------------------------------------------------------------*/
+
+var Draggable = Class.create({
+ initialize: function(element) {
+ var defaults = {
+ handle: false,
+ reverteffect: function(element, top_offset, left_offset) {
+ var dur = Math.sqrt(Math.abs(top_offset^2)+Math.abs(left_offset^2))*0.02;
+ new Effect.Move(element, { x: -left_offset, y: -top_offset, duration: dur,
+ queue: {scope:'_draggable', position:'end'}
+ });
+ },
+ endeffect: function(element) {
+ var toOpacity = Object.isNumber(element._opacity) ? element._opacity : 1.0;
+ new Effect.Opacity(element, {duration:0.2, from:0.7, to:toOpacity,
+ queue: {scope:'_draggable', position:'end'},
+ afterFinish: function(){
+ Draggable._dragging[element] = false
+ }
+ });
+ },
+ zindex: 1000,
+ revert: false,
+ quiet: false,
+ scroll: false,
+ scrollSensitivity: 20,
+ scrollSpeed: 15,
+ snap: false, // false, or xy or [x,y] or function(x,y){ return [x,y] }
+ delay: 0
+ };
+
+ if(!arguments[1] || Object.isUndefined(arguments[1].endeffect))
+ Object.extend(defaults, {
+ starteffect: function(element) {
+ element._opacity = Element.getOpacity(element);
+ Draggable._dragging[element] = true;
+ new Effect.Opacity(element, {duration:0.2, from:element._opacity, to:0.7});
+ }
+ });
+
+ var options = Object.extend(defaults, arguments[1] || { });
+
+ this.element = $(element);
+
+ if(options.handle && Object.isString(options.handle))
+ this.handle = this.element.down('.'+options.handle, 0);
+
+ if(!this.handle) this.handle = $(options.handle);
+ if(!this.handle) this.handle = this.element;
+
+ if(options.scroll && !options.scroll.scrollTo && !options.scroll.outerHTML) {
+ options.scroll = $(options.scroll);
+ this._isScrollChild = Element.childOf(this.element, options.scroll);
+ }
+
+ Element.makePositioned(this.element); // fix IE
+
+ this.options = options;
+ this.dragging = false;
+
+ this.eventMouseDown = this.initDrag.bindAsEventListener(this);
+ Event.observe(this.handle, "mousedown", this.eventMouseDown);
+
+ Draggables.register(this);
+ },
+
+ destroy: function() {
+ Event.stopObserving(this.handle, "mousedown", this.eventMouseDown);
+ Draggables.unregister(this);
+ },
+
+ currentDelta: function() {
+ return([
+ parseInt(Element.getStyle(this.element,'left') || '0'),
+ parseInt(Element.getStyle(this.element,'top') || '0')]);
+ },
+
+ initDrag: function(event) {
+ if(!Object.isUndefined(Draggable._dragging[this.element]) &&
+ Draggable._dragging[this.element]) return;
+ if(Event.isLeftClick(event)) {
+ // abort on form elements, fixes a Firefox issue
+ var src = Event.element(event);
+ if((tag_name = src.tagName.toUpperCase()) && (
+ tag_name=='INPUT' ||
+ tag_name=='SELECT' ||
+ tag_name=='OPTION' ||
+ tag_name=='BUTTON' ||
+ tag_name=='TEXTAREA')) return;
+
+ var pointer = [Event.pointerX(event), Event.pointerY(event)];
+ var pos = this.element.cumulativeOffset();
+ this.offset = [0,1].map( function(i) { return (pointer[i] - pos[i]) });
+
+ Draggables.activate(this);
+ Event.stop(event);
+ }
+ },
+
+ startDrag: function(event) {
+ this.dragging = true;
+ if(!this.delta)
+ this.delta = this.currentDelta();
+
+ if(this.options.zindex) {
+ this.originalZ = parseInt(Element.getStyle(this.element,'z-index') || 0);
+ this.element.style.zIndex = this.options.zindex;
+ }
+
+ if(this.options.ghosting) {
+ this._clone = this.element.cloneNode(true);
+ this._originallyAbsolute = (this.element.getStyle('position') == 'absolute');
+ if (!this._originallyAbsolute)
+ Position.absolutize(this.element);
+ this.element.parentNode.insertBefore(this._clone, this.element);
+ }
+
+ if(this.options.scroll) {
+ if (this.options.scroll == window) {
+ var where = this._getWindowScroll(this.options.scroll);
+ this.originalScrollLeft = where.left;
+ this.originalScrollTop = where.top;
+ } else {
+ this.originalScrollLeft = this.options.scroll.scrollLeft;
+ this.originalScrollTop = this.options.scroll.scrollTop;
+ }
+ }
+
+ Draggables.notify('onStart', this, event);
+
+ if(this.options.starteffect) this.options.starteffect(this.element);
+ },
+
+ updateDrag: function(event, pointer) {
+ if(!this.dragging) this.startDrag(event);
+
+ if(!this.options.quiet){
+ Position.prepare();
+ Droppables.show(pointer, this.element);
+ }
+
+ Draggables.notify('onDrag', this, event);
+
+ this.draw(pointer);
+ if(this.options.change) this.options.change(this);
+
+ if(this.options.scroll) {
+ this.stopScrolling();
+
+ var p;
+ if (this.options.scroll == window) {
+ with(this._getWindowScroll(this.options.scroll)) { p = [ left, top, left+width, top+height ]; }
+ } else {
+ p = Position.page(this.options.scroll).toArray();
+ p[0] += this.options.scroll.scrollLeft + Position.deltaX;
+ p[1] += this.options.scroll.scrollTop + Position.deltaY;
+ p.push(p[0]+this.options.scroll.offsetWidth);
+ p.push(p[1]+this.options.scroll.offsetHeight);
+ }
+ var speed = [0,0];
+ if(pointer[0] < (p[0]+this.options.scrollSensitivity)) speed[0] = pointer[0]-(p[0]+this.options.scrollSensitivity);
+ if(pointer[1] < (p[1]+this.options.scrollSensitivity)) speed[1] = pointer[1]-(p[1]+this.options.scrollSensitivity);
+ if(pointer[0] > (p[2]-this.options.scrollSensitivity)) speed[0] = pointer[0]-(p[2]-this.options.scrollSensitivity);
+ if(pointer[1] > (p[3]-this.options.scrollSensitivity)) speed[1] = pointer[1]-(p[3]-this.options.scrollSensitivity);
+ this.startScrolling(speed);
+ }
+
+ // fix AppleWebKit rendering
+ if(Prototype.Browser.WebKit) window.scrollBy(0,0);
+
+ Event.stop(event);
+ },
+
+ finishDrag: function(event, success) {
+ this.dragging = false;
+
+ if(this.options.quiet){
+ Position.prepare();
+ var pointer = [Event.pointerX(event), Event.pointerY(event)];
+ Droppables.show(pointer, this.element);
+ }
+
+ if(this.options.ghosting) {
+ if (!this._originallyAbsolute)
+ Position.relativize(this.element);
+ delete this._originallyAbsolute;
+ Element.remove(this._clone);
+ this._clone = null;
+ }
+
+ var dropped = false;
+ if(success) {
+ dropped = Droppables.fire(event, this.element);
+ if (!dropped) dropped = false;
+ }
+ if(dropped && this.options.onDropped) this.options.onDropped(this.element);
+ Draggables.notify('onEnd', this, event);
+
+ var revert = this.options.revert;
+ if(revert && Object.isFunction(revert)) revert = revert(this.element);
+
+ var d = this.currentDelta();
+ if(revert && this.options.reverteffect) {
+ if (dropped == 0 || revert != 'failure')
+ this.options.reverteffect(this.element,
+ d[1]-this.delta[1], d[0]-this.delta[0]);
+ } else {
+ this.delta = d;
+ }
+
+ if(this.options.zindex)
+ this.element.style.zIndex = this.originalZ;
+
+ if(this.options.endeffect)
+ this.options.endeffect(this.element);
+
+ Draggables.deactivate(this);
+ Droppables.reset();
+ },
+
+ keyPress: function(event) {
+ if(event.keyCode!=Event.KEY_ESC) return;
+ this.finishDrag(event, false);
+ Event.stop(event);
+ },
+
+ endDrag: function(event) {
+ if(!this.dragging) return;
+ this.stopScrolling();
+ this.finishDrag(event, true);
+ Event.stop(event);
+ },
+
+ draw: function(point) {
+ var pos = this.element.cumulativeOffset();
+ if(this.options.ghosting) {
+ var r = Position.realOffset(this.element);
+ pos[0] += r[0] - Position.deltaX; pos[1] += r[1] - Position.deltaY;
+ }
+
+ var d = this.currentDelta();
+ pos[0] -= d[0]; pos[1] -= d[1];
+
+ if(this.options.scroll && (this.options.scroll != window && this._isScrollChild)) {
+ pos[0] -= this.options.scroll.scrollLeft-this.originalScrollLeft;
+ pos[1] -= this.options.scroll.scrollTop-this.originalScrollTop;
+ }
+
+ var p = [0,1].map(function(i){
+ return (point[i]-pos[i]-this.offset[i])
+ }.bind(this));
+
+ if(this.options.snap) {
+ if(Object.isFunction(this.options.snap)) {
+ p = this.options.snap(p[0],p[1],this);
+ } else {
+ if(Object.isArray(this.options.snap)) {
+ p = p.map( function(v, i) {
+ return (v/this.options.snap[i]).round()*this.options.snap[i] }.bind(this));
+ } else {
+ p = p.map( function(v) {
+ return (v/this.options.snap).round()*this.options.snap }.bind(this));
+ }
+ }}
+
+ var style = this.element.style;
+ if((!this.options.constraint) || (this.options.constraint=='horizontal'))
+ style.left = p[0] + "px";
+ if((!this.options.constraint) || (this.options.constraint=='vertical'))
+ style.top = p[1] + "px";
+
+ if(style.visibility=="hidden") style.visibility = ""; // fix gecko rendering
+ },
+
+ stopScrolling: function() {
+ if(this.scrollInterval) {
+ clearInterval(this.scrollInterval);
+ this.scrollInterval = null;
+ Draggables._lastScrollPointer = null;
+ }
+ },
+
+ startScrolling: function(speed) {
+ if(!(speed[0] || speed[1])) return;
+ this.scrollSpeed = [speed[0]*this.options.scrollSpeed,speed[1]*this.options.scrollSpeed];
+ this.lastScrolled = new Date();
+ this.scrollInterval = setInterval(this.scroll.bind(this), 10);
+ },
+
+ scroll: function() {
+ var current = new Date();
+ var delta = current - this.lastScrolled;
+ this.lastScrolled = current;
+ if(this.options.scroll == window) {
+ with (this._getWindowScroll(this.options.scroll)) {
+ if (this.scrollSpeed[0] || this.scrollSpeed[1]) {
+ var d = delta / 1000;
+ this.options.scroll.scrollTo( left + d*this.scrollSpeed[0], top + d*this.scrollSpeed[1] );
+ }
+ }
+ } else {
+ this.options.scroll.scrollLeft += this.scrollSpeed[0] * delta / 1000;
+ this.options.scroll.scrollTop += this.scrollSpeed[1] * delta / 1000;
+ }
+
+ Position.prepare();
+ Droppables.show(Draggables._lastPointer, this.element);
+ Draggables.notify('onDrag', this);
+ if (this._isScrollChild) {
+ Draggables._lastScrollPointer = Draggables._lastScrollPointer || $A(Draggables._lastPointer);
+ Draggables._lastScrollPointer[0] += this.scrollSpeed[0] * delta / 1000;
+ Draggables._lastScrollPointer[1] += this.scrollSpeed[1] * delta / 1000;
+ if (Draggables._lastScrollPointer[0] < 0)
+ Draggables._lastScrollPointer[0] = 0;
+ if (Draggables._lastScrollPointer[1] < 0)
+ Draggables._lastScrollPointer[1] = 0;
+ this.draw(Draggables._lastScrollPointer);
+ }
+
+ if(this.options.change) this.options.change(this);
+ },
+
+ _getWindowScroll: function(w) {
+ var T, L, W, H;
+ with (w.document) {
+ if (w.document.documentElement && documentElement.scrollTop) {
+ T = documentElement.scrollTop;
+ L = documentElement.scrollLeft;
+ } else if (w.document.body) {
+ T = body.scrollTop;
+ L = body.scrollLeft;
+ }
+ if (w.innerWidth) {
+ W = w.innerWidth;
+ H = w.innerHeight;
+ } else if (w.document.documentElement && documentElement.clientWidth) {
+ W = documentElement.clientWidth;
+ H = documentElement.clientHeight;
+ } else {
+ W = body.offsetWidth;
+ H = body.offsetHeight;
+ }
+ }
+ return { top: T, left: L, width: W, height: H };
+ }
+});
+
+Draggable._dragging = { };
+
+/*--------------------------------------------------------------------------*/
+
+var SortableObserver = Class.create({
+ initialize: function(element, observer) {
+ this.element = $(element);
+ this.observer = observer;
+ this.lastValue = Sortable.serialize(this.element);
+ },
+
+ onStart: function() {
+ this.lastValue = Sortable.serialize(this.element);
+ },
+
+ onEnd: function() {
+ Sortable.unmark();
+ if(this.lastValue != Sortable.serialize(this.element))
+ this.observer(this.element)
+ }
+});
+
+var Sortable = {
+ SERIALIZE_RULE: /^[^_\-](?:[A-Za-z0-9\-\_]*)[_](.*)$/,
+
+ sortables: { },
+
+ _findRootElement: function(element) {
+ while (element.tagName.toUpperCase() != "BODY") {
+ if(element.id && Sortable.sortables[element.id]) return element;
+ element = element.parentNode;
+ }
+ },
+
+ options: function(element) {
+ element = Sortable._findRootElement($(element));
+ if(!element) return;
+ return Sortable.sortables[element.id];
+ },
+
+ destroy: function(element){
+ element = $(element);
+ var s = Sortable.sortables[element.id];
+
+ if(s) {
+ Draggables.removeObserver(s.element);
+ s.droppables.each(function(d){ Droppables.remove(d) });
+ s.draggables.invoke('destroy');
+
+ delete Sortable.sortables[s.element.id];
+ }
+ },
+
+ create: function(element) {
+ element = $(element);
+ var options = Object.extend({
+ element: element,
+ tag: 'li', // assumes li children, override with tag: 'tagname'
+ dropOnEmpty: false,
+ tree: false,
+ treeTag: 'ul',
+ overlap: 'vertical', // one of 'vertical', 'horizontal'
+ constraint: 'vertical', // one of 'vertical', 'horizontal', false
+ containment: element, // also takes array of elements (or id's); or false
+ handle: false, // or a CSS class
+ only: false,
+ delay: 0,
+ hoverclass: null,
+ ghosting: false,
+ quiet: false,
+ scroll: false,
+ scrollSensitivity: 20,
+ scrollSpeed: 15,
+ format: this.SERIALIZE_RULE,
+
+ // these take arrays of elements or ids and can be
+ // used for better initialization performance
+ elements: false,
+ handles: false,
+
+ onChange: Prototype.emptyFunction,
+ onUpdate: Prototype.emptyFunction
+ }, arguments[1] || { });
+
+ // clear any old sortable with same element
+ this.destroy(element);
+
+ // build options for the draggables
+ var options_for_draggable = {
+ revert: true,
+ quiet: options.quiet,
+ scroll: options.scroll,
+ scrollSpeed: options.scrollSpeed,
+ scrollSensitivity: options.scrollSensitivity,
+ delay: options.delay,
+ ghosting: options.ghosting,
+ constraint: options.constraint,
+ handle: options.handle };
+
+ if(options.starteffect)
+ options_for_draggable.starteffect = options.starteffect;
+
+ if(options.reverteffect)
+ options_for_draggable.reverteffect = options.reverteffect;
+ else
+ if(options.ghosting) options_for_draggable.reverteffect = function(element) {
+ element.style.top = 0;
+ element.style.left = 0;
+ };
+
+ if(options.endeffect)
+ options_for_draggable.endeffect = options.endeffect;
+
+ if(options.zindex)
+ options_for_draggable.zindex = options.zindex;
+
+ // build options for the droppables
+ var options_for_droppable = {
+ overlap: options.overlap,
+ containment: options.containment,
+ tree: options.tree,
+ hoverclass: options.hoverclass,
+ onHover: Sortable.onHover
+ };
+
+ var options_for_tree = {
+ onHover: Sortable.onEmptyHover,
+ overlap: options.overlap,
+ containment: options.containment,
+ hoverclass: options.hoverclass
+ };
+
+ // fix for gecko engine
+ Element.cleanWhitespace(element);
+
+ options.draggables = [];
+ options.droppables = [];
+
+ // drop on empty handling
+ if(options.dropOnEmpty || options.tree) {
+ Droppables.add(element, options_for_tree);
+ options.droppables.push(element);
+ }
+
+ (options.elements || this.findElements(element, options) || []).each( function(e,i) {
+ var handle = options.handles ? $(options.handles[i]) :
+ (options.handle ? $(e).select('.' + options.handle)[0] : e);
+ options.draggables.push(
+ new Draggable(e, Object.extend(options_for_draggable, { handle: handle })));
+ Droppables.add(e, options_for_droppable);
+ if(options.tree) e.treeNode = element;
+ options.droppables.push(e);
+ });
+
+ if(options.tree) {
+ (Sortable.findTreeElements(element, options) || []).each( function(e) {
+ Droppables.add(e, options_for_tree);
+ e.treeNode = element;
+ options.droppables.push(e);
+ });
+ }
+
+ // keep reference
+ this.sortables[element.identify()] = options;
+
+ // for onupdate
+ Draggables.addObserver(new SortableObserver(element, options.onUpdate));
+
+ },
+
+ // return all suitable-for-sortable elements in a guaranteed order
+ findElements: function(element, options) {
+ return Element.findChildren(
+ element, options.only, options.tree ? true : false, options.tag);
+ },
+
+ findTreeElements: function(element, options) {
+ return Element.findChildren(
+ element, options.only, options.tree ? true : false, options.treeTag);
+ },
+
+ onHover: function(element, dropon, overlap) {
+ if(Element.isParent(dropon, element)) return;
+
+ if(overlap > .33 && overlap < .66 && Sortable.options(dropon).tree) {
+ return;
+ } else if(overlap>0.5) {
+ Sortable.mark(dropon, 'before');
+ if(dropon.previousSibling != element) {
+ var oldParentNode = element.parentNode;
+ element.style.visibility = "hidden"; // fix gecko rendering
+ dropon.parentNode.insertBefore(element, dropon);
+ if(dropon.parentNode!=oldParentNode)
+ Sortable.options(oldParentNode).onChange(element);
+ Sortable.options(dropon.parentNode).onChange(element);
+ }
+ } else {
+ Sortable.mark(dropon, 'after');
+ var nextElement = dropon.nextSibling || null;
+ if(nextElement != element) {
+ var oldParentNode = element.parentNode;
+ element.style.visibility = "hidden"; // fix gecko rendering
+ dropon.parentNode.insertBefore(element, nextElement);
+ if(dropon.parentNode!=oldParentNode)
+ Sortable.options(oldParentNode).onChange(element);
+ Sortable.options(dropon.parentNode).onChange(element);
+ }
+ }
+ },
+
+ onEmptyHover: function(element, dropon, overlap) {
+ var oldParentNode = element.parentNode;
+ var droponOptions = Sortable.options(dropon);
+
+ if(!Element.isParent(dropon, element)) {
+ var index;
+
+ var children = Sortable.findElements(dropon, {tag: droponOptions.tag, only: droponOptions.only});
+ var child = null;
+
+ if(children) {
+ var offset = Element.offsetSize(dropon, droponOptions.overlap) * (1.0 - overlap);
+
+ for (index = 0; index < children.length; index += 1) {
+ if (offset - Element.offsetSize (children[index], droponOptions.overlap) >= 0) {
+ offset -= Element.offsetSize (children[index], droponOptions.overlap);
+ } else if (offset - (Element.offsetSize (children[index], droponOptions.overlap) / 2) >= 0) {
+ child = index + 1 < children.length ? children[index + 1] : null;
+ break;
+ } else {
+ child = children[index];
+ break;
+ }
+ }
+ }
+
+ dropon.insertBefore(element, child);
+
+ Sortable.options(oldParentNode).onChange(element);
+ droponOptions.onChange(element);
+ }
+ },
+
+ unmark: function() {
+ if(Sortable._marker) Sortable._marker.hide();
+ },
+
+ mark: function(dropon, position) {
+ // mark on ghosting only
+ var sortable = Sortable.options(dropon.parentNode);
+ if(sortable && !sortable.ghosting) return;
+
+ if(!Sortable._marker) {
+ Sortable._marker =
+ ($('dropmarker') || Element.extend(document.createElement('DIV'))).
+ hide().addClassName('dropmarker').setStyle({position:'absolute'});
+ document.getElementsByTagName("body").item(0).appendChild(Sortable._marker);
+ }
+ var offsets = dropon.cumulativeOffset();
+ Sortable._marker.setStyle({left: offsets[0]+'px', top: offsets[1] + 'px'});
+
+ if(position=='after')
+ if(sortable.overlap == 'horizontal')
+ Sortable._marker.setStyle({left: (offsets[0]+dropon.clientWidth) + 'px'});
+ else
+ Sortable._marker.setStyle({top: (offsets[1]+dropon.clientHeight) + 'px'});
+
+ Sortable._marker.show();
+ },
+
+ _tree: function(element, options, parent) {
+ var children = Sortable.findElements(element, options) || [];
+
+ for (var i = 0; i < children.length; ++i) {
+ var match = children[i].id.match(options.format);
+
+ if (!match) continue;
+
+ var child = {
+ id: encodeURIComponent(match ? match[1] : null),
+ element: element,
+ parent: parent,
+ children: [],
+ position: parent.children.length,
+ container: $(children[i]).down(options.treeTag)
+ };
+
+ /* Get the element containing the children and recurse over it */
+ if (child.container)
+ this._tree(child.container, options, child);
+
+ parent.children.push (child);
+ }
+
+ return parent;
+ },
+
+ tree: function(element) {
+ element = $(element);
+ var sortableOptions = this.options(element);
+ var options = Object.extend({
+ tag: sortableOptions.tag,
+ treeTag: sortableOptions.treeTag,
+ only: sortableOptions.only,
+ name: element.id,
+ format: sortableOptions.format
+ }, arguments[1] || { });
+
+ var root = {
+ id: null,
+ parent: null,
+ children: [],
+ container: element,
+ position: 0
+ };
+
+ return Sortable._tree(element, options, root);
+ },
+
+ /* Construct a [i] index for a particular node */
+ _constructIndex: function(node) {
+ var index = '';
+ do {
+ if (node.id) index = '[' + node.position + ']' + index;
+ } while ((node = node.parent) != null);
+ return index;
+ },
+
+ sequence: function(element) {
+ element = $(element);
+ var options = Object.extend(this.options(element), arguments[1] || { });
+
+ return $(this.findElements(element, options) || []).map( function(item) {
+ return item.id.match(options.format) ? item.id.match(options.format)[1] : '';
+ });
+ },
+
+ setSequence: function(element, new_sequence) {
+ element = $(element);
+ var options = Object.extend(this.options(element), arguments[2] || { });
+
+ var nodeMap = { };
+ this.findElements(element, options).each( function(n) {
+ if (n.id.match(options.format))
+ nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode];
+ n.parentNode.removeChild(n);
+ });
+
+ new_sequence.each(function(ident) {
+ var n = nodeMap[ident];
+ if (n) {
+ n[1].appendChild(n[0]);
+ delete nodeMap[ident];
+ }
+ });
+ },
+
+ serialize: function(element) {
+ element = $(element);
+ var options = Object.extend(Sortable.options(element), arguments[1] || { });
+ var name = encodeURIComponent(
+ (arguments[1] && arguments[1].name) ? arguments[1].name : element.id);
+
+ if (options.tree) {
+ return Sortable.tree(element, arguments[1]).children.map( function (item) {
+ return [name + Sortable._constructIndex(item) + "[id]=" +
+ encodeURIComponent(item.id)].concat(item.children.map(arguments.callee));
+ }).flatten().join('&');
+ } else {
+ return Sortable.sequence(element, arguments[1]).map( function(item) {
+ return name + "[]=" + encodeURIComponent(item);
+ }).join('&');
+ }
+ }
+};
+
+// Returns true if child is contained within element
+Element.isParent = function(child, element) {
+ if (!child.parentNode || child == element) return false;
+ if (child.parentNode == element) return true;
+ return Element.isParent(child.parentNode, element);
+};
+
+Element.findChildren = function(element, only, recursive, tagName) {
+ if(!element.hasChildNodes()) return null;
+ tagName = tagName.toUpperCase();
+ if(only) only = [only].flatten();
+ var elements = [];
+ $A(element.childNodes).each( function(e) {
+ if(e.tagName && e.tagName.toUpperCase()==tagName &&
+ (!only || (Element.classNames(e).detect(function(v) { return only.include(v) }))))
+ elements.push(e);
+ if(recursive) {
+ var grandchildren = Element.findChildren(e, only, recursive, tagName);
+ if(grandchildren) elements.push(grandchildren);
+ }
+ });
+
+ return (elements.length>0 ? elements.flatten() : []);
+};
+
+Element.offsetSize = function (element, type) {
+ return element['offset' + ((type=='vertical' || type=='height') ? 'Height' : 'Width')];
+}; \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/scriptaculous/effects.js b/mayor-orig/www/skin/classic/share/javascript/scriptaculous/effects.js
new file mode 100644
index 00000000..860ddc09
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/scriptaculous/effects.js
@@ -0,0 +1,1123 @@
+// script.aculo.us effects.js v1.9.0, Thu Dec 23 16:54:48 -0500 2010
+
+// Copyright (c) 2005-2010 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+// Contributors:
+// Justin Palmer (http://encytemedia.com/)
+// Mark Pilgrim (http://diveintomark.org/)
+// Martin Bialasinki
+//
+// script.aculo.us is freely distributable under the terms of an MIT-style license.
+// For details, see the script.aculo.us web site: http://script.aculo.us/
+
+// converts rgb() and #xxx to #xxxxxx format,
+// returns self (or first argument) if not convertable
+String.prototype.parseColor = function() {
+ var color = '#';
+ if (this.slice(0,4) == 'rgb(') {
+ var cols = this.slice(4,this.length-1).split(',');
+ var i=0; do { color += parseInt(cols[i]).toColorPart() } while (++i<3);
+ } else {
+ if (this.slice(0,1) == '#') {
+ if (this.length==4) for(var i=1;i<4;i++) color += (this.charAt(i) + this.charAt(i)).toLowerCase();
+ if (this.length==7) color = this.toLowerCase();
+ }
+ }
+ return (color.length==7 ? color : (arguments[0] || this));
+};
+
+/*--------------------------------------------------------------------------*/
+
+Element.collectTextNodes = function(element) {
+ return $A($(element).childNodes).collect( function(node) {
+ return (node.nodeType==3 ? node.nodeValue :
+ (node.hasChildNodes() ? Element.collectTextNodes(node) : ''));
+ }).flatten().join('');
+};
+
+Element.collectTextNodesIgnoreClass = function(element, className) {
+ return $A($(element).childNodes).collect( function(node) {
+ return (node.nodeType==3 ? node.nodeValue :
+ ((node.hasChildNodes() && !Element.hasClassName(node,className)) ?
+ Element.collectTextNodesIgnoreClass(node, className) : ''));
+ }).flatten().join('');
+};
+
+Element.setContentZoom = function(element, percent) {
+ element = $(element);
+ element.setStyle({fontSize: (percent/100) + 'em'});
+ if (Prototype.Browser.WebKit) window.scrollBy(0,0);
+ return element;
+};
+
+Element.getInlineOpacity = function(element){
+ return $(element).style.opacity || '';
+};
+
+Element.forceRerendering = function(element) {
+ try {
+ element = $(element);
+ var n = document.createTextNode(' ');
+ element.appendChild(n);
+ element.removeChild(n);
+ } catch(e) { }
+};
+
+/*--------------------------------------------------------------------------*/
+
+var Effect = {
+ _elementDoesNotExistError: {
+ name: 'ElementDoesNotExistError',
+ message: 'The specified DOM element does not exist, but is required for this effect to operate'
+ },
+ Transitions: {
+ linear: Prototype.K,
+ sinoidal: function(pos) {
+ return (-Math.cos(pos*Math.PI)/2) + .5;
+ },
+ reverse: function(pos) {
+ return 1-pos;
+ },
+ flicker: function(pos) {
+ var pos = ((-Math.cos(pos*Math.PI)/4) + .75) + Math.random()/4;
+ return pos > 1 ? 1 : pos;
+ },
+ wobble: function(pos) {
+ return (-Math.cos(pos*Math.PI*(9*pos))/2) + .5;
+ },
+ pulse: function(pos, pulses) {
+ return (-Math.cos((pos*((pulses||5)-.5)*2)*Math.PI)/2) + .5;
+ },
+ spring: function(pos) {
+ return 1 - (Math.cos(pos * 4.5 * Math.PI) * Math.exp(-pos * 6));
+ },
+ none: function(pos) {
+ return 0;
+ },
+ full: function(pos) {
+ return 1;
+ }
+ },
+ DefaultOptions: {
+ duration: 1.0, // seconds
+ fps: 100, // 100= assume 66fps max.
+ sync: false, // true for combining
+ from: 0.0,
+ to: 1.0,
+ delay: 0.0,
+ queue: 'parallel'
+ },
+ tagifyText: function(element) {
+ var tagifyStyle = 'position:relative';
+ if (Prototype.Browser.IE) tagifyStyle += ';zoom:1';
+
+ element = $(element);
+ $A(element.childNodes).each( function(child) {
+ if (child.nodeType==3) {
+ child.nodeValue.toArray().each( function(character) {
+ element.insertBefore(
+ new Element('span', {style: tagifyStyle}).update(
+ character == ' ' ? String.fromCharCode(160) : character),
+ child);
+ });
+ Element.remove(child);
+ }
+ });
+ },
+ multiple: function(element, effect) {
+ var elements;
+ if (((typeof element == 'object') ||
+ Object.isFunction(element)) &&
+ (element.length))
+ elements = element;
+ else
+ elements = $(element).childNodes;
+
+ var options = Object.extend({
+ speed: 0.1,
+ delay: 0.0
+ }, arguments[2] || { });
+ var masterDelay = options.delay;
+
+ $A(elements).each( function(element, index) {
+ new effect(element, Object.extend(options, { delay: index * options.speed + masterDelay }));
+ });
+ },
+ PAIRS: {
+ 'slide': ['SlideDown','SlideUp'],
+ 'blind': ['BlindDown','BlindUp'],
+ 'appear': ['Appear','Fade']
+ },
+ toggle: function(element, effect, options) {
+ element = $(element);
+ effect = (effect || 'appear').toLowerCase();
+
+ return Effect[ Effect.PAIRS[ effect ][ element.visible() ? 1 : 0 ] ](element, Object.extend({
+ queue: { position:'end', scope:(element.id || 'global'), limit: 1 }
+ }, options || {}));
+ }
+};
+
+Effect.DefaultOptions.transition = Effect.Transitions.sinoidal;
+
+/* ------------- core effects ------------- */
+
+Effect.ScopedQueue = Class.create(Enumerable, {
+ initialize: function() {
+ this.effects = [];
+ this.interval = null;
+ },
+ _each: function(iterator) {
+ this.effects._each(iterator);
+ },
+ add: function(effect) {
+ var timestamp = new Date().getTime();
+
+ var position = Object.isString(effect.options.queue) ?
+ effect.options.queue : effect.options.queue.position;
+
+ switch(position) {
+ case 'front':
+ // move unstarted effects after this effect
+ this.effects.findAll(function(e){ return e.state=='idle' }).each( function(e) {
+ e.startOn += effect.finishOn;
+ e.finishOn += effect.finishOn;
+ });
+ break;
+ case 'with-last':
+ timestamp = this.effects.pluck('startOn').max() || timestamp;
+ break;
+ case 'end':
+ // start effect after last queued effect has finished
+ timestamp = this.effects.pluck('finishOn').max() || timestamp;
+ break;
+ }
+
+ effect.startOn += timestamp;
+ effect.finishOn += timestamp;
+
+ if (!effect.options.queue.limit || (this.effects.length < effect.options.queue.limit))
+ this.effects.push(effect);
+
+ if (!this.interval)
+ this.interval = setInterval(this.loop.bind(this), 15);
+ },
+ remove: function(effect) {
+ this.effects = this.effects.reject(function(e) { return e==effect });
+ if (this.effects.length == 0) {
+ clearInterval(this.interval);
+ this.interval = null;
+ }
+ },
+ loop: function() {
+ var timePos = new Date().getTime();
+ for(var i=0, len=this.effects.length;i<len;i++)
+ this.effects[i] && this.effects[i].loop(timePos);
+ }
+});
+
+Effect.Queues = {
+ instances: $H(),
+ get: function(queueName) {
+ if (!Object.isString(queueName)) return queueName;
+
+ return this.instances.get(queueName) ||
+ this.instances.set(queueName, new Effect.ScopedQueue());
+ }
+};
+Effect.Queue = Effect.Queues.get('global');
+
+Effect.Base = Class.create({
+ position: null,
+ start: function(options) {
+ if (options && options.transition === false) options.transition = Effect.Transitions.linear;
+ this.options = Object.extend(Object.extend({ },Effect.DefaultOptions), options || { });
+ this.currentFrame = 0;
+ this.state = 'idle';
+ this.startOn = this.options.delay*1000;
+ this.finishOn = this.startOn+(this.options.duration*1000);
+ this.fromToDelta = this.options.to-this.options.from;
+ this.totalTime = this.finishOn-this.startOn;
+ this.totalFrames = this.options.fps*this.options.duration;
+
+ this.render = (function() {
+ function dispatch(effect, eventName) {
+ if (effect.options[eventName + 'Internal'])
+ effect.options[eventName + 'Internal'](effect);
+ if (effect.options[eventName])
+ effect.options[eventName](effect);
+ }
+
+ return function(pos) {
+ if (this.state === "idle") {
+ this.state = "running";
+ dispatch(this, 'beforeSetup');
+ if (this.setup) this.setup();
+ dispatch(this, 'afterSetup');
+ }
+ if (this.state === "running") {
+ pos = (this.options.transition(pos) * this.fromToDelta) + this.options.from;
+ this.position = pos;
+ dispatch(this, 'beforeUpdate');
+ if (this.update) this.update(pos);
+ dispatch(this, 'afterUpdate');
+ }
+ };
+ })();
+
+ this.event('beforeStart');
+ if (!this.options.sync)
+ Effect.Queues.get(Object.isString(this.options.queue) ?
+ 'global' : this.options.queue.scope).add(this);
+ },
+ loop: function(timePos) {
+ if (timePos >= this.startOn) {
+ if (timePos >= this.finishOn) {
+ this.render(1.0);
+ this.cancel();
+ this.event('beforeFinish');
+ if (this.finish) this.finish();
+ this.event('afterFinish');
+ return;
+ }
+ var pos = (timePos - this.startOn) / this.totalTime,
+ frame = (pos * this.totalFrames).round();
+ if (frame > this.currentFrame) {
+ this.render(pos);
+ this.currentFrame = frame;
+ }
+ }
+ },
+ cancel: function() {
+ if (!this.options.sync)
+ Effect.Queues.get(Object.isString(this.options.queue) ?
+ 'global' : this.options.queue.scope).remove(this);
+ this.state = 'finished';
+ },
+ event: function(eventName) {
+ if (this.options[eventName + 'Internal']) this.options[eventName + 'Internal'](this);
+ if (this.options[eventName]) this.options[eventName](this);
+ },
+ inspect: function() {
+ var data = $H();
+ for(property in this)
+ if (!Object.isFunction(this[property])) data.set(property, this[property]);
+ return '#<Effect:' + data.inspect() + ',options:' + $H(this.options).inspect() + '>';
+ }
+});
+
+Effect.Parallel = Class.create(Effect.Base, {
+ initialize: function(effects) {
+ this.effects = effects || [];
+ this.start(arguments[1]);
+ },
+ update: function(position) {
+ this.effects.invoke('render', position);
+ },
+ finish: function(position) {
+ this.effects.each( function(effect) {
+ effect.render(1.0);
+ effect.cancel();
+ effect.event('beforeFinish');
+ if (effect.finish) effect.finish(position);
+ effect.event('afterFinish');
+ });
+ }
+});
+
+Effect.Tween = Class.create(Effect.Base, {
+ initialize: function(object, from, to) {
+ object = Object.isString(object) ? $(object) : object;
+ var args = $A(arguments), method = args.last(),
+ options = args.length == 5 ? args[3] : null;
+ this.method = Object.isFunction(method) ? method.bind(object) :
+ Object.isFunction(object[method]) ? object[method].bind(object) :
+ function(value) { object[method] = value };
+ this.start(Object.extend({ from: from, to: to }, options || { }));
+ },
+ update: function(position) {
+ this.method(position);
+ }
+});
+
+Effect.Event = Class.create(Effect.Base, {
+ initialize: function() {
+ this.start(Object.extend({ duration: 0 }, arguments[0] || { }));
+ },
+ update: Prototype.emptyFunction
+});
+
+Effect.Opacity = Class.create(Effect.Base, {
+ initialize: function(element) {
+ this.element = $(element);
+ if (!this.element) throw(Effect._elementDoesNotExistError);
+ // make this work on IE on elements without 'layout'
+ if (Prototype.Browser.IE && (!this.element.currentStyle.hasLayout))
+ this.element.setStyle({zoom: 1});
+ var options = Object.extend({
+ from: this.element.getOpacity() || 0.0,
+ to: 1.0
+ }, arguments[1] || { });
+ this.start(options);
+ },
+ update: function(position) {
+ this.element.setOpacity(position);
+ }
+});
+
+Effect.Move = Class.create(Effect.Base, {
+ initialize: function(element) {
+ this.element = $(element);
+ if (!this.element) throw(Effect._elementDoesNotExistError);
+ var options = Object.extend({
+ x: 0,
+ y: 0,
+ mode: 'relative'
+ }, arguments[1] || { });
+ this.start(options);
+ },
+ setup: function() {
+ this.element.makePositioned();
+ this.originalLeft = parseFloat(this.element.getStyle('left') || '0');
+ this.originalTop = parseFloat(this.element.getStyle('top') || '0');
+ if (this.options.mode == 'absolute') {
+ this.options.x = this.options.x - this.originalLeft;
+ this.options.y = this.options.y - this.originalTop;
+ }
+ },
+ update: function(position) {
+ this.element.setStyle({
+ left: (this.options.x * position + this.originalLeft).round() + 'px',
+ top: (this.options.y * position + this.originalTop).round() + 'px'
+ });
+ }
+});
+
+// for backwards compatibility
+Effect.MoveBy = function(element, toTop, toLeft) {
+ return new Effect.Move(element,
+ Object.extend({ x: toLeft, y: toTop }, arguments[3] || { }));
+};
+
+Effect.Scale = Class.create(Effect.Base, {
+ initialize: function(element, percent) {
+ this.element = $(element);
+ if (!this.element) throw(Effect._elementDoesNotExistError);
+ var options = Object.extend({
+ scaleX: true,
+ scaleY: true,
+ scaleContent: true,
+ scaleFromCenter: false,
+ scaleMode: 'box', // 'box' or 'contents' or { } with provided values
+ scaleFrom: 100.0,
+ scaleTo: percent
+ }, arguments[2] || { });
+ this.start(options);
+ },
+ setup: function() {
+ this.restoreAfterFinish = this.options.restoreAfterFinish || false;
+ this.elementPositioning = this.element.getStyle('position');
+
+ this.originalStyle = { };
+ ['top','left','width','height','fontSize'].each( function(k) {
+ this.originalStyle[k] = this.element.style[k];
+ }.bind(this));
+
+ this.originalTop = this.element.offsetTop;
+ this.originalLeft = this.element.offsetLeft;
+
+ var fontSize = this.element.getStyle('font-size') || '100%';
+ ['em','px','%','pt'].each( function(fontSizeType) {
+ if (fontSize.indexOf(fontSizeType)>0) {
+ this.fontSize = parseFloat(fontSize);
+ this.fontSizeType = fontSizeType;
+ }
+ }.bind(this));
+
+ this.factor = (this.options.scaleTo - this.options.scaleFrom)/100;
+
+ this.dims = null;
+ if (this.options.scaleMode=='box')
+ this.dims = [this.element.offsetHeight, this.element.offsetWidth];
+ if (/^content/.test(this.options.scaleMode))
+ this.dims = [this.element.scrollHeight, this.element.scrollWidth];
+ if (!this.dims)
+ this.dims = [this.options.scaleMode.originalHeight,
+ this.options.scaleMode.originalWidth];
+ },
+ update: function(position) {
+ var currentScale = (this.options.scaleFrom/100.0) + (this.factor * position);
+ if (this.options.scaleContent && this.fontSize)
+ this.element.setStyle({fontSize: this.fontSize * currentScale + this.fontSizeType });
+ this.setDimensions(this.dims[0] * currentScale, this.dims[1] * currentScale);
+ },
+ finish: function(position) {
+ if (this.restoreAfterFinish) this.element.setStyle(this.originalStyle);
+ },
+ setDimensions: function(height, width) {
+ var d = { };
+ if (this.options.scaleX) d.width = width.round() + 'px';
+ if (this.options.scaleY) d.height = height.round() + 'px';
+ if (this.options.scaleFromCenter) {
+ var topd = (height - this.dims[0])/2;
+ var leftd = (width - this.dims[1])/2;
+ if (this.elementPositioning == 'absolute') {
+ if (this.options.scaleY) d.top = this.originalTop-topd + 'px';
+ if (this.options.scaleX) d.left = this.originalLeft-leftd + 'px';
+ } else {
+ if (this.options.scaleY) d.top = -topd + 'px';
+ if (this.options.scaleX) d.left = -leftd + 'px';
+ }
+ }
+ this.element.setStyle(d);
+ }
+});
+
+Effect.Highlight = Class.create(Effect.Base, {
+ initialize: function(element) {
+ this.element = $(element);
+ if (!this.element) throw(Effect._elementDoesNotExistError);
+ var options = Object.extend({ startcolor: '#ffff99' }, arguments[1] || { });
+ this.start(options);
+ },
+ setup: function() {
+ // Prevent executing on elements not in the layout flow
+ if (this.element.getStyle('display')=='none') { this.cancel(); return; }
+ // Disable background image during the effect
+ this.oldStyle = { };
+ if (!this.options.keepBackgroundImage) {
+ this.oldStyle.backgroundImage = this.element.getStyle('background-image');
+ this.element.setStyle({backgroundImage: 'none'});
+ }
+ if (!this.options.endcolor)
+ this.options.endcolor = this.element.getStyle('background-color').parseColor('#ffffff');
+ if (!this.options.restorecolor)
+ this.options.restorecolor = this.element.getStyle('background-color');
+ // init color calculations
+ this._base = $R(0,2).map(function(i){ return parseInt(this.options.startcolor.slice(i*2+1,i*2+3),16) }.bind(this));
+ this._delta = $R(0,2).map(function(i){ return parseInt(this.options.endcolor.slice(i*2+1,i*2+3),16)-this._base[i] }.bind(this));
+ },
+ update: function(position) {
+ this.element.setStyle({backgroundColor: $R(0,2).inject('#',function(m,v,i){
+ return m+((this._base[i]+(this._delta[i]*position)).round().toColorPart()); }.bind(this)) });
+ },
+ finish: function() {
+ this.element.setStyle(Object.extend(this.oldStyle, {
+ backgroundColor: this.options.restorecolor
+ }));
+ }
+});
+
+Effect.ScrollTo = function(element) {
+ var options = arguments[1] || { },
+ scrollOffsets = document.viewport.getScrollOffsets(),
+ elementOffsets = $(element).cumulativeOffset();
+
+ if (options.offset) elementOffsets[1] += options.offset;
+
+ return new Effect.Tween(null,
+ scrollOffsets.top,
+ elementOffsets[1],
+ options,
+ function(p){ scrollTo(scrollOffsets.left, p.round()); }
+ );
+};
+
+/* ------------- combination effects ------------- */
+
+Effect.Fade = function(element) {
+ element = $(element);
+ var oldOpacity = element.getInlineOpacity();
+ var options = Object.extend({
+ from: element.getOpacity() || 1.0,
+ to: 0.0,
+ afterFinishInternal: function(effect) {
+ if (effect.options.to!=0) return;
+ effect.element.hide().setStyle({opacity: oldOpacity});
+ }
+ }, arguments[1] || { });
+ return new Effect.Opacity(element,options);
+};
+
+Effect.Appear = function(element) {
+ element = $(element);
+ var options = Object.extend({
+ from: (element.getStyle('display') == 'none' ? 0.0 : element.getOpacity() || 0.0),
+ to: 1.0,
+ // force Safari to render floated elements properly
+ afterFinishInternal: function(effect) {
+ effect.element.forceRerendering();
+ },
+ beforeSetup: function(effect) {
+ effect.element.setOpacity(effect.options.from).show();
+ }}, arguments[1] || { });
+ return new Effect.Opacity(element,options);
+};
+
+Effect.Puff = function(element) {
+ element = $(element);
+ var oldStyle = {
+ opacity: element.getInlineOpacity(),
+ position: element.getStyle('position'),
+ top: element.style.top,
+ left: element.style.left,
+ width: element.style.width,
+ height: element.style.height
+ };
+ return new Effect.Parallel(
+ [ new Effect.Scale(element, 200,
+ { sync: true, scaleFromCenter: true, scaleContent: true, restoreAfterFinish: true }),
+ new Effect.Opacity(element, { sync: true, to: 0.0 } ) ],
+ Object.extend({ duration: 1.0,
+ beforeSetupInternal: function(effect) {
+ Position.absolutize(effect.effects[0].element);
+ },
+ afterFinishInternal: function(effect) {
+ effect.effects[0].element.hide().setStyle(oldStyle); }
+ }, arguments[1] || { })
+ );
+};
+
+Effect.BlindUp = function(element) {
+ element = $(element);
+ element.makeClipping();
+ return new Effect.Scale(element, 0,
+ Object.extend({ scaleContent: false,
+ scaleX: false,
+ restoreAfterFinish: true,
+ afterFinishInternal: function(effect) {
+ effect.element.hide().undoClipping();
+ }
+ }, arguments[1] || { })
+ );
+};
+
+Effect.BlindDown = function(element) {
+ element = $(element);
+ var elementDimensions = element.getDimensions();
+ return new Effect.Scale(element, 100, Object.extend({
+ scaleContent: false,
+ scaleX: false,
+ scaleFrom: 0,
+ scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width},
+ restoreAfterFinish: true,
+ afterSetup: function(effect) {
+ effect.element.makeClipping().setStyle({height: '0px'}).show();
+ },
+ afterFinishInternal: function(effect) {
+ effect.element.undoClipping();
+ }
+ }, arguments[1] || { }));
+};
+
+Effect.SwitchOff = function(element) {
+ element = $(element);
+ var oldOpacity = element.getInlineOpacity();
+ return new Effect.Appear(element, Object.extend({
+ duration: 0.4,
+ from: 0,
+ transition: Effect.Transitions.flicker,
+ afterFinishInternal: function(effect) {
+ new Effect.Scale(effect.element, 1, {
+ duration: 0.3, scaleFromCenter: true,
+ scaleX: false, scaleContent: false, restoreAfterFinish: true,
+ beforeSetup: function(effect) {
+ effect.element.makePositioned().makeClipping();
+ },
+ afterFinishInternal: function(effect) {
+ effect.element.hide().undoClipping().undoPositioned().setStyle({opacity: oldOpacity});
+ }
+ });
+ }
+ }, arguments[1] || { }));
+};
+
+Effect.DropOut = function(element) {
+ element = $(element);
+ var oldStyle = {
+ top: element.getStyle('top'),
+ left: element.getStyle('left'),
+ opacity: element.getInlineOpacity() };
+ return new Effect.Parallel(
+ [ new Effect.Move(element, {x: 0, y: 100, sync: true }),
+ new Effect.Opacity(element, { sync: true, to: 0.0 }) ],
+ Object.extend(
+ { duration: 0.5,
+ beforeSetup: function(effect) {
+ effect.effects[0].element.makePositioned();
+ },
+ afterFinishInternal: function(effect) {
+ effect.effects[0].element.hide().undoPositioned().setStyle(oldStyle);
+ }
+ }, arguments[1] || { }));
+};
+
+Effect.Shake = function(element) {
+ element = $(element);
+ var options = Object.extend({
+ distance: 20,
+ duration: 0.5
+ }, arguments[1] || {});
+ var distance = parseFloat(options.distance);
+ var split = parseFloat(options.duration) / 10.0;
+ var oldStyle = {
+ top: element.getStyle('top'),
+ left: element.getStyle('left') };
+ return new Effect.Move(element,
+ { x: distance, y: 0, duration: split, afterFinishInternal: function(effect) {
+ new Effect.Move(effect.element,
+ { x: -distance*2, y: 0, duration: split*2, afterFinishInternal: function(effect) {
+ new Effect.Move(effect.element,
+ { x: distance*2, y: 0, duration: split*2, afterFinishInternal: function(effect) {
+ new Effect.Move(effect.element,
+ { x: -distance*2, y: 0, duration: split*2, afterFinishInternal: function(effect) {
+ new Effect.Move(effect.element,
+ { x: distance*2, y: 0, duration: split*2, afterFinishInternal: function(effect) {
+ new Effect.Move(effect.element,
+ { x: -distance, y: 0, duration: split, afterFinishInternal: function(effect) {
+ effect.element.undoPositioned().setStyle(oldStyle);
+ }}); }}); }}); }}); }}); }});
+};
+
+Effect.SlideDown = function(element) {
+ element = $(element).cleanWhitespace();
+ // SlideDown need to have the content of the element wrapped in a container element with fixed height!
+ var oldInnerBottom = element.down().getStyle('bottom');
+ var elementDimensions = element.getDimensions();
+ return new Effect.Scale(element, 100, Object.extend({
+ scaleContent: false,
+ scaleX: false,
+ scaleFrom: window.opera ? 0 : 1,
+ scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width},
+ restoreAfterFinish: true,
+ afterSetup: function(effect) {
+ effect.element.makePositioned();
+ effect.element.down().makePositioned();
+ if (window.opera) effect.element.setStyle({top: ''});
+ effect.element.makeClipping().setStyle({height: '0px'}).show();
+ },
+ afterUpdateInternal: function(effect) {
+ effect.element.down().setStyle({bottom:
+ (effect.dims[0] - effect.element.clientHeight) + 'px' });
+ },
+ afterFinishInternal: function(effect) {
+ effect.element.undoClipping().undoPositioned();
+ effect.element.down().undoPositioned().setStyle({bottom: oldInnerBottom}); }
+ }, arguments[1] || { })
+ );
+};
+
+Effect.SlideUp = function(element) {
+ element = $(element).cleanWhitespace();
+ var oldInnerBottom = element.down().getStyle('bottom');
+ var elementDimensions = element.getDimensions();
+ return new Effect.Scale(element, window.opera ? 0 : 1,
+ Object.extend({ scaleContent: false,
+ scaleX: false,
+ scaleMode: 'box',
+ scaleFrom: 100,
+ scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width},
+ restoreAfterFinish: true,
+ afterSetup: function(effect) {
+ effect.element.makePositioned();
+ effect.element.down().makePositioned();
+ if (window.opera) effect.element.setStyle({top: ''});
+ effect.element.makeClipping().show();
+ },
+ afterUpdateInternal: function(effect) {
+ effect.element.down().setStyle({bottom:
+ (effect.dims[0] - effect.element.clientHeight) + 'px' });
+ },
+ afterFinishInternal: function(effect) {
+ effect.element.hide().undoClipping().undoPositioned();
+ effect.element.down().undoPositioned().setStyle({bottom: oldInnerBottom});
+ }
+ }, arguments[1] || { })
+ );
+};
+
+// Bug in opera makes the TD containing this element expand for a instance after finish
+Effect.Squish = function(element) {
+ return new Effect.Scale(element, window.opera ? 1 : 0, {
+ restoreAfterFinish: true,
+ beforeSetup: function(effect) {
+ effect.element.makeClipping();
+ },
+ afterFinishInternal: function(effect) {
+ effect.element.hide().undoClipping();
+ }
+ });
+};
+
+Effect.Grow = function(element) {
+ element = $(element);
+ var options = Object.extend({
+ direction: 'center',
+ moveTransition: Effect.Transitions.sinoidal,
+ scaleTransition: Effect.Transitions.sinoidal,
+ opacityTransition: Effect.Transitions.full
+ }, arguments[1] || { });
+ var oldStyle = {
+ top: element.style.top,
+ left: element.style.left,
+ height: element.style.height,
+ width: element.style.width,
+ opacity: element.getInlineOpacity() };
+
+ var dims = element.getDimensions();
+ var initialMoveX, initialMoveY;
+ var moveX, moveY;
+
+ switch (options.direction) {
+ case 'top-left':
+ initialMoveX = initialMoveY = moveX = moveY = 0;
+ break;
+ case 'top-right':
+ initialMoveX = dims.width;
+ initialMoveY = moveY = 0;
+ moveX = -dims.width;
+ break;
+ case 'bottom-left':
+ initialMoveX = moveX = 0;
+ initialMoveY = dims.height;
+ moveY = -dims.height;
+ break;
+ case 'bottom-right':
+ initialMoveX = dims.width;
+ initialMoveY = dims.height;
+ moveX = -dims.width;
+ moveY = -dims.height;
+ break;
+ case 'center':
+ initialMoveX = dims.width / 2;
+ initialMoveY = dims.height / 2;
+ moveX = -dims.width / 2;
+ moveY = -dims.height / 2;
+ break;
+ }
+
+ return new Effect.Move(element, {
+ x: initialMoveX,
+ y: initialMoveY,
+ duration: 0.01,
+ beforeSetup: function(effect) {
+ effect.element.hide().makeClipping().makePositioned();
+ },
+ afterFinishInternal: function(effect) {
+ new Effect.Parallel(
+ [ new Effect.Opacity(effect.element, { sync: true, to: 1.0, from: 0.0, transition: options.opacityTransition }),
+ new Effect.Move(effect.element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition }),
+ new Effect.Scale(effect.element, 100, {
+ scaleMode: { originalHeight: dims.height, originalWidth: dims.width },
+ sync: true, scaleFrom: window.opera ? 1 : 0, transition: options.scaleTransition, restoreAfterFinish: true})
+ ], Object.extend({
+ beforeSetup: function(effect) {
+ effect.effects[0].element.setStyle({height: '0px'}).show();
+ },
+ afterFinishInternal: function(effect) {
+ effect.effects[0].element.undoClipping().undoPositioned().setStyle(oldStyle);
+ }
+ }, options)
+ );
+ }
+ });
+};
+
+Effect.Shrink = function(element) {
+ element = $(element);
+ var options = Object.extend({
+ direction: 'center',
+ moveTransition: Effect.Transitions.sinoidal,
+ scaleTransition: Effect.Transitions.sinoidal,
+ opacityTransition: Effect.Transitions.none
+ }, arguments[1] || { });
+ var oldStyle = {
+ top: element.style.top,
+ left: element.style.left,
+ height: element.style.height,
+ width: element.style.width,
+ opacity: element.getInlineOpacity() };
+
+ var dims = element.getDimensions();
+ var moveX, moveY;
+
+ switch (options.direction) {
+ case 'top-left':
+ moveX = moveY = 0;
+ break;
+ case 'top-right':
+ moveX = dims.width;
+ moveY = 0;
+ break;
+ case 'bottom-left':
+ moveX = 0;
+ moveY = dims.height;
+ break;
+ case 'bottom-right':
+ moveX = dims.width;
+ moveY = dims.height;
+ break;
+ case 'center':
+ moveX = dims.width / 2;
+ moveY = dims.height / 2;
+ break;
+ }
+
+ return new Effect.Parallel(
+ [ new Effect.Opacity(element, { sync: true, to: 0.0, from: 1.0, transition: options.opacityTransition }),
+ new Effect.Scale(element, window.opera ? 1 : 0, { sync: true, transition: options.scaleTransition, restoreAfterFinish: true}),
+ new Effect.Move(element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition })
+ ], Object.extend({
+ beforeStartInternal: function(effect) {
+ effect.effects[0].element.makePositioned().makeClipping();
+ },
+ afterFinishInternal: function(effect) {
+ effect.effects[0].element.hide().undoClipping().undoPositioned().setStyle(oldStyle); }
+ }, options)
+ );
+};
+
+Effect.Pulsate = function(element) {
+ element = $(element);
+ var options = arguments[1] || { },
+ oldOpacity = element.getInlineOpacity(),
+ transition = options.transition || Effect.Transitions.linear,
+ reverser = function(pos){
+ return 1 - transition((-Math.cos((pos*(options.pulses||5)*2)*Math.PI)/2) + .5);
+ };
+
+ return new Effect.Opacity(element,
+ Object.extend(Object.extend({ duration: 2.0, from: 0,
+ afterFinishInternal: function(effect) { effect.element.setStyle({opacity: oldOpacity}); }
+ }, options), {transition: reverser}));
+};
+
+Effect.Fold = function(element) {
+ element = $(element);
+ var oldStyle = {
+ top: element.style.top,
+ left: element.style.left,
+ width: element.style.width,
+ height: element.style.height };
+ element.makeClipping();
+ return new Effect.Scale(element, 5, Object.extend({
+ scaleContent: false,
+ scaleX: false,
+ afterFinishInternal: function(effect) {
+ new Effect.Scale(element, 1, {
+ scaleContent: false,
+ scaleY: false,
+ afterFinishInternal: function(effect) {
+ effect.element.hide().undoClipping().setStyle(oldStyle);
+ } });
+ }}, arguments[1] || { }));
+};
+
+Effect.Morph = Class.create(Effect.Base, {
+ initialize: function(element) {
+ this.element = $(element);
+ if (!this.element) throw(Effect._elementDoesNotExistError);
+ var options = Object.extend({
+ style: { }
+ }, arguments[1] || { });
+
+ if (!Object.isString(options.style)) this.style = $H(options.style);
+ else {
+ if (options.style.include(':'))
+ this.style = options.style.parseStyle();
+ else {
+ this.element.addClassName(options.style);
+ this.style = $H(this.element.getStyles());
+ this.element.removeClassName(options.style);
+ var css = this.element.getStyles();
+ this.style = this.style.reject(function(style) {
+ return style.value == css[style.key];
+ });
+ options.afterFinishInternal = function(effect) {
+ effect.element.addClassName(effect.options.style);
+ effect.transforms.each(function(transform) {
+ effect.element.style[transform.style] = '';
+ });
+ };
+ }
+ }
+ this.start(options);
+ },
+
+ setup: function(){
+ function parseColor(color){
+ if (!color || ['rgba(0, 0, 0, 0)','transparent'].include(color)) color = '#ffffff';
+ color = color.parseColor();
+ return $R(0,2).map(function(i){
+ return parseInt( color.slice(i*2+1,i*2+3), 16 );
+ });
+ }
+ this.transforms = this.style.map(function(pair){
+ var property = pair[0], value = pair[1], unit = null;
+
+ if (value.parseColor('#zzzzzz') != '#zzzzzz') {
+ value = value.parseColor();
+ unit = 'color';
+ } else if (property == 'opacity') {
+ value = parseFloat(value);
+ if (Prototype.Browser.IE && (!this.element.currentStyle.hasLayout))
+ this.element.setStyle({zoom: 1});
+ } else if (Element.CSS_LENGTH.test(value)) {
+ var components = value.match(/^([\+\-]?[0-9\.]+)(.*)$/);
+ value = parseFloat(components[1]);
+ unit = (components.length == 3) ? components[2] : null;
+ }
+
+ var originalValue = this.element.getStyle(property);
+ return {
+ style: property.camelize(),
+ originalValue: unit=='color' ? parseColor(originalValue) : parseFloat(originalValue || 0),
+ targetValue: unit=='color' ? parseColor(value) : value,
+ unit: unit
+ };
+ }.bind(this)).reject(function(transform){
+ return (
+ (transform.originalValue == transform.targetValue) ||
+ (
+ transform.unit != 'color' &&
+ (isNaN(transform.originalValue) || isNaN(transform.targetValue))
+ )
+ );
+ });
+ },
+ update: function(position) {
+ var style = { }, transform, i = this.transforms.length;
+ while(i--)
+ style[(transform = this.transforms[i]).style] =
+ transform.unit=='color' ? '#'+
+ (Math.round(transform.originalValue[0]+
+ (transform.targetValue[0]-transform.originalValue[0])*position)).toColorPart() +
+ (Math.round(transform.originalValue[1]+
+ (transform.targetValue[1]-transform.originalValue[1])*position)).toColorPart() +
+ (Math.round(transform.originalValue[2]+
+ (transform.targetValue[2]-transform.originalValue[2])*position)).toColorPart() :
+ (transform.originalValue +
+ (transform.targetValue - transform.originalValue) * position).toFixed(3) +
+ (transform.unit === null ? '' : transform.unit);
+ this.element.setStyle(style, true);
+ }
+});
+
+Effect.Transform = Class.create({
+ initialize: function(tracks){
+ this.tracks = [];
+ this.options = arguments[1] || { };
+ this.addTracks(tracks);
+ },
+ addTracks: function(tracks){
+ tracks.each(function(track){
+ track = $H(track);
+ var data = track.values().first();
+ this.tracks.push($H({
+ ids: track.keys().first(),
+ effect: Effect.Morph,
+ options: { style: data }
+ }));
+ }.bind(this));
+ return this;
+ },
+ play: function(){
+ return new Effect.Parallel(
+ this.tracks.map(function(track){
+ var ids = track.get('ids'), effect = track.get('effect'), options = track.get('options');
+ var elements = [$(ids) || $$(ids)].flatten();
+ return elements.map(function(e){ return new effect(e, Object.extend({ sync:true }, options)) });
+ }).flatten(),
+ this.options
+ );
+ }
+});
+
+Element.CSS_PROPERTIES = $w(
+ 'backgroundColor backgroundPosition borderBottomColor borderBottomStyle ' +
+ 'borderBottomWidth borderLeftColor borderLeftStyle borderLeftWidth ' +
+ 'borderRightColor borderRightStyle borderRightWidth borderSpacing ' +
+ 'borderTopColor borderTopStyle borderTopWidth bottom clip color ' +
+ 'fontSize fontWeight height left letterSpacing lineHeight ' +
+ 'marginBottom marginLeft marginRight marginTop markerOffset maxHeight '+
+ 'maxWidth minHeight minWidth opacity outlineColor outlineOffset ' +
+ 'outlineWidth paddingBottom paddingLeft paddingRight paddingTop ' +
+ 'right textIndent top width wordSpacing zIndex');
+
+Element.CSS_LENGTH = /^(([\+\-]?[0-9\.]+)(em|ex|px|in|cm|mm|pt|pc|\%))|0$/;
+
+String.__parseStyleElement = document.createElement('div');
+String.prototype.parseStyle = function(){
+ var style, styleRules = $H();
+ if (Prototype.Browser.WebKit)
+ style = new Element('div',{style:this}).style;
+ else {
+ String.__parseStyleElement.innerHTML = '<div style="' + this + '"></div>';
+ style = String.__parseStyleElement.childNodes[0].style;
+ }
+
+ Element.CSS_PROPERTIES.each(function(property){
+ if (style[property]) styleRules.set(property, style[property]);
+ });
+
+ if (Prototype.Browser.IE && this.include('opacity'))
+ styleRules.set('opacity', this.match(/opacity:\s*((?:0|1)?(?:\.\d*)?)/)[1]);
+
+ return styleRules;
+};
+
+if (document.defaultView && document.defaultView.getComputedStyle) {
+ Element.getStyles = function(element) {
+ var css = document.defaultView.getComputedStyle($(element), null);
+ return Element.CSS_PROPERTIES.inject({ }, function(styles, property) {
+ styles[property] = css[property];
+ return styles;
+ });
+ };
+} else {
+ Element.getStyles = function(element) {
+ element = $(element);
+ var css = element.currentStyle, styles;
+ styles = Element.CSS_PROPERTIES.inject({ }, function(results, property) {
+ results[property] = css[property];
+ return results;
+ });
+ if (!styles.opacity) styles.opacity = element.getOpacity();
+ return styles;
+ };
+}
+
+Effect.Methods = {
+ morph: function(element, style) {
+ element = $(element);
+ new Effect.Morph(element, Object.extend({ style: style }, arguments[2] || { }));
+ return element;
+ },
+ visualEffect: function(element, effect, options) {
+ element = $(element);
+ var s = effect.dasherize().camelize(), klass = s.charAt(0).toUpperCase() + s.substring(1);
+ new Effect[klass](element, options);
+ return element;
+ },
+ highlight: function(element, options) {
+ element = $(element);
+ new Effect.Highlight(element, options);
+ return element;
+ }
+};
+
+$w('fade appear grow shrink fold blindUp blindDown slideUp slideDown '+
+ 'pulsate shake puff squish switchOff dropOut').each(
+ function(effect) {
+ Effect.Methods[effect] = function(element, options){
+ element = $(element);
+ Effect[effect.charAt(0).toUpperCase() + effect.substring(1)](element, options);
+ return element;
+ };
+ }
+);
+
+$w('getInlineOpacity forceRerendering setContentZoom collectTextNodes collectTextNodesIgnoreClass getStyles').each(
+ function(f) { Effect.Methods[f] = Element[f]; }
+);
+
+Element.addMethods(Effect.Methods); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/scriptaculous/scriptaculous.js b/mayor-orig/www/skin/classic/share/javascript/scriptaculous/scriptaculous.js
new file mode 100644
index 00000000..0ea5c445
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/scriptaculous/scriptaculous.js
@@ -0,0 +1,68 @@
+// script.aculo.us scriptaculous.js v1.9.0, Thu Dec 23 16:54:48 -0500 2010
+
+// Copyright (c) 2005-2010 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// For details, see the script.aculo.us web site: http://script.aculo.us/
+
+var Scriptaculous = {
+ Version: '1.9.0',
+ require: function(libraryName) {
+ try{
+ // inserting via DOM fails in Safari 2.0, so brute force approach
+ document.write('<script type="text/javascript" src="'+libraryName+'"><\/script>');
+ } catch(e) {
+ // for xhtml+xml served content, fall back to DOM methods
+ var script = document.createElement('script');
+ script.type = 'text/javascript';
+ script.src = libraryName;
+ document.getElementsByTagName('head')[0].appendChild(script);
+ }
+ },
+ REQUIRED_PROTOTYPE: '1.6.0.3',
+ load: function() {
+ function convertVersionString(versionString) {
+ var v = versionString.replace(/_.*|\./g, '');
+ v = parseInt(v + '0'.times(4-v.length));
+ return versionString.indexOf('_') > -1 ? v-1 : v;
+ }
+
+ if((typeof Prototype=='undefined') ||
+ (typeof Element == 'undefined') ||
+ (typeof Element.Methods=='undefined') ||
+ (convertVersionString(Prototype.Version) <
+ convertVersionString(Scriptaculous.REQUIRED_PROTOTYPE)))
+ throw("script.aculo.us requires the Prototype JavaScript framework >= " +
+ Scriptaculous.REQUIRED_PROTOTYPE);
+
+ var js = /scriptaculous\.js(\?.*)?$/;
+ $$('script[src]').findAll(function(s) {
+ return s.src.match(js);
+ }).each(function(s) {
+ var path = s.src.replace(js, ''),
+ includes = s.src.match(/\?.*load=([a-z,]*)/);
+ (includes ? includes[1] : 'builder,effects,dragdrop,controls,slider,sound').split(',').each(
+ function(include) { Scriptaculous.require(path+include+'.js') });
+ });
+ }
+};
+
+Scriptaculous.load(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/scriptaculous/slider.js b/mayor-orig/www/skin/classic/share/javascript/scriptaculous/slider.js
new file mode 100644
index 00000000..438e6892
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/scriptaculous/slider.js
@@ -0,0 +1,275 @@
+// script.aculo.us slider.js v1.9.0, Thu Dec 23 16:54:48 -0500 2010
+
+// Copyright (c) 2005-2010 Marty Haught, Thomas Fuchs
+//
+// script.aculo.us is freely distributable under the terms of an MIT-style license.
+// For details, see the script.aculo.us web site: http://script.aculo.us/
+
+if (!Control) var Control = { };
+
+// options:
+// axis: 'vertical', or 'horizontal' (default)
+//
+// callbacks:
+// onChange(value)
+// onSlide(value)
+Control.Slider = Class.create({
+ initialize: function(handle, track, options) {
+ var slider = this;
+
+ if (Object.isArray(handle)) {
+ this.handles = handle.collect( function(e) { return $(e) });
+ } else {
+ this.handles = [$(handle)];
+ }
+
+ this.track = $(track);
+ this.options = options || { };
+
+ this.axis = this.options.axis || 'horizontal';
+ this.increment = this.options.increment || 1;
+ this.step = parseInt(this.options.step || '1');
+ this.range = this.options.range || $R(0,1);
+
+ this.value = 0; // assure backwards compat
+ this.values = this.handles.map( function() { return 0 });
+ this.spans = this.options.spans ? this.options.spans.map(function(s){ return $(s) }) : false;
+ this.options.startSpan = $(this.options.startSpan || null);
+ this.options.endSpan = $(this.options.endSpan || null);
+
+ this.restricted = this.options.restricted || false;
+
+ this.maximum = this.options.maximum || this.range.end;
+ this.minimum = this.options.minimum || this.range.start;
+
+ // Will be used to align the handle onto the track, if necessary
+ this.alignX = parseInt(this.options.alignX || '0');
+ this.alignY = parseInt(this.options.alignY || '0');
+
+ this.trackLength = this.maximumOffset() - this.minimumOffset();
+
+ this.handleLength = this.isVertical() ?
+ (this.handles[0].offsetHeight != 0 ?
+ this.handles[0].offsetHeight : this.handles[0].style.height.replace(/px$/,"")) :
+ (this.handles[0].offsetWidth != 0 ? this.handles[0].offsetWidth :
+ this.handles[0].style.width.replace(/px$/,""));
+
+ this.active = false;
+ this.dragging = false;
+ this.disabled = false;
+
+ if (this.options.disabled) this.setDisabled();
+
+ // Allowed values array
+ this.allowedValues = this.options.values ? this.options.values.sortBy(Prototype.K) : false;
+ if (this.allowedValues) {
+ this.minimum = this.allowedValues.min();
+ this.maximum = this.allowedValues.max();
+ }
+
+ this.eventMouseDown = this.startDrag.bindAsEventListener(this);
+ this.eventMouseUp = this.endDrag.bindAsEventListener(this);
+ this.eventMouseMove = this.update.bindAsEventListener(this);
+
+ // Initialize handles in reverse (make sure first handle is active)
+ this.handles.each( function(h,i) {
+ i = slider.handles.length-1-i;
+ slider.setValue(parseFloat(
+ (Object.isArray(slider.options.sliderValue) ?
+ slider.options.sliderValue[i] : slider.options.sliderValue) ||
+ slider.range.start), i);
+ h.makePositioned().observe("mousedown", slider.eventMouseDown);
+ });
+
+ this.track.observe("mousedown", this.eventMouseDown);
+ document.observe("mouseup", this.eventMouseUp);
+ document.observe("mousemove", this.eventMouseMove);
+
+ this.initialized = true;
+ },
+ dispose: function() {
+ var slider = this;
+ Event.stopObserving(this.track, "mousedown", this.eventMouseDown);
+ Event.stopObserving(document, "mouseup", this.eventMouseUp);
+ Event.stopObserving(document, "mousemove", this.eventMouseMove);
+ this.handles.each( function(h) {
+ Event.stopObserving(h, "mousedown", slider.eventMouseDown);
+ });
+ },
+ setDisabled: function(){
+ this.disabled = true;
+ },
+ setEnabled: function(){
+ this.disabled = false;
+ },
+ getNearestValue: function(value){
+ if (this.allowedValues){
+ if (value >= this.allowedValues.max()) return(this.allowedValues.max());
+ if (value <= this.allowedValues.min()) return(this.allowedValues.min());
+
+ var offset = Math.abs(this.allowedValues[0] - value);
+ var newValue = this.allowedValues[0];
+ this.allowedValues.each( function(v) {
+ var currentOffset = Math.abs(v - value);
+ if (currentOffset <= offset){
+ newValue = v;
+ offset = currentOffset;
+ }
+ });
+ return newValue;
+ }
+ if (value > this.range.end) return this.range.end;
+ if (value < this.range.start) return this.range.start;
+ return value;
+ },
+ setValue: function(sliderValue, handleIdx){
+ if (!this.active) {
+ this.activeHandleIdx = handleIdx || 0;
+ this.activeHandle = this.handles[this.activeHandleIdx];
+ this.updateStyles();
+ }
+ handleIdx = handleIdx || this.activeHandleIdx || 0;
+ if (this.initialized && this.restricted) {
+ if ((handleIdx>0) && (sliderValue<this.values[handleIdx-1]))
+ sliderValue = this.values[handleIdx-1];
+ if ((handleIdx < (this.handles.length-1)) && (sliderValue>this.values[handleIdx+1]))
+ sliderValue = this.values[handleIdx+1];
+ }
+ sliderValue = this.getNearestValue(sliderValue);
+ this.values[handleIdx] = sliderValue;
+ this.value = this.values[0]; // assure backwards compat
+
+ this.handles[handleIdx].style[this.isVertical() ? 'top' : 'left'] =
+ this.translateToPx(sliderValue);
+
+ this.drawSpans();
+ if (!this.dragging || !this.event) this.updateFinished();
+ },
+ setValueBy: function(delta, handleIdx) {
+ this.setValue(this.values[handleIdx || this.activeHandleIdx || 0] + delta,
+ handleIdx || this.activeHandleIdx || 0);
+ },
+ translateToPx: function(value) {
+ return Math.round(
+ ((this.trackLength-this.handleLength)/(this.range.end-this.range.start)) *
+ (value - this.range.start)) + "px";
+ },
+ translateToValue: function(offset) {
+ return ((offset/(this.trackLength-this.handleLength) *
+ (this.range.end-this.range.start)) + this.range.start);
+ },
+ getRange: function(range) {
+ var v = this.values.sortBy(Prototype.K);
+ range = range || 0;
+ return $R(v[range],v[range+1]);
+ },
+ minimumOffset: function(){
+ return(this.isVertical() ? this.alignY : this.alignX);
+ },
+ maximumOffset: function(){
+ return(this.isVertical() ?
+ (this.track.offsetHeight != 0 ? this.track.offsetHeight :
+ this.track.style.height.replace(/px$/,"")) - this.alignY :
+ (this.track.offsetWidth != 0 ? this.track.offsetWidth :
+ this.track.style.width.replace(/px$/,"")) - this.alignX);
+ },
+ isVertical: function(){
+ return (this.axis == 'vertical');
+ },
+ drawSpans: function() {
+ var slider = this;
+ if (this.spans)
+ $R(0, this.spans.length-1).each(function(r) { slider.setSpan(slider.spans[r], slider.getRange(r)) });
+ if (this.options.startSpan)
+ this.setSpan(this.options.startSpan,
+ $R(0, this.values.length>1 ? this.getRange(0).min() : this.value ));
+ if (this.options.endSpan)
+ this.setSpan(this.options.endSpan,
+ $R(this.values.length>1 ? this.getRange(this.spans.length-1).max() : this.value, this.maximum));
+ },
+ setSpan: function(span, range) {
+ if (this.isVertical()) {
+ span.style.top = this.translateToPx(range.start);
+ span.style.height = this.translateToPx(range.end - range.start + this.range.start);
+ } else {
+ span.style.left = this.translateToPx(range.start);
+ span.style.width = this.translateToPx(range.end - range.start + this.range.start);
+ }
+ },
+ updateStyles: function() {
+ this.handles.each( function(h){ Element.removeClassName(h, 'selected') });
+ Element.addClassName(this.activeHandle, 'selected');
+ },
+ startDrag: function(event) {
+ if (Event.isLeftClick(event)) {
+ if (!this.disabled){
+ this.active = true;
+
+ var handle = Event.element(event);
+ var pointer = [Event.pointerX(event), Event.pointerY(event)];
+ var track = handle;
+ if (track==this.track) {
+ var offsets = this.track.cumulativeOffset();
+ this.event = event;
+ this.setValue(this.translateToValue(
+ (this.isVertical() ? pointer[1]-offsets[1] : pointer[0]-offsets[0])-(this.handleLength/2)
+ ));
+ var offsets = this.activeHandle.cumulativeOffset();
+ this.offsetX = (pointer[0] - offsets[0]);
+ this.offsetY = (pointer[1] - offsets[1]);
+ } else {
+ // find the handle (prevents issues with Safari)
+ while((this.handles.indexOf(handle) == -1) && handle.parentNode)
+ handle = handle.parentNode;
+
+ if (this.handles.indexOf(handle)!=-1) {
+ this.activeHandle = handle;
+ this.activeHandleIdx = this.handles.indexOf(this.activeHandle);
+ this.updateStyles();
+
+ var offsets = this.activeHandle.cumulativeOffset();
+ this.offsetX = (pointer[0] - offsets[0]);
+ this.offsetY = (pointer[1] - offsets[1]);
+ }
+ }
+ }
+ Event.stop(event);
+ }
+ },
+ update: function(event) {
+ if (this.active) {
+ if (!this.dragging) this.dragging = true;
+ this.draw(event);
+ if (Prototype.Browser.WebKit) window.scrollBy(0,0);
+ Event.stop(event);
+ }
+ },
+ draw: function(event) {
+ var pointer = [Event.pointerX(event), Event.pointerY(event)];
+ var offsets = this.track.cumulativeOffset();
+ pointer[0] -= this.offsetX + offsets[0];
+ pointer[1] -= this.offsetY + offsets[1];
+ this.event = event;
+ this.setValue(this.translateToValue( this.isVertical() ? pointer[1] : pointer[0] ));
+ if (this.initialized && this.options.onSlide)
+ this.options.onSlide(this.values.length>1 ? this.values : this.value, this);
+ },
+ endDrag: function(event) {
+ if (this.active && this.dragging) {
+ this.finishDrag(event, true);
+ Event.stop(event);
+ }
+ this.active = false;
+ this.dragging = false;
+ },
+ finishDrag: function(event, success) {
+ this.active = false;
+ this.dragging = false;
+ this.updateFinished();
+ },
+ updateFinished: function() {
+ if (this.initialized && this.options.onChange)
+ this.options.onChange(this.values.length>1 ? this.values : this.value, this);
+ this.event = null;
+ }
+}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/scriptaculous/sound.js b/mayor-orig/www/skin/classic/share/javascript/scriptaculous/sound.js
new file mode 100644
index 00000000..d3f84646
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/scriptaculous/sound.js
@@ -0,0 +1,59 @@
+// script.aculo.us sound.js v1.9.0, Thu Dec 23 16:54:48 -0500 2010
+
+// Copyright (c) 2005-2010 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+//
+// Based on code created by Jules Gravinese (http://www.webveteran.com/)
+//
+// script.aculo.us is freely distributable under the terms of an MIT-style license.
+// For details, see the script.aculo.us web site: http://script.aculo.us/
+
+Sound = {
+ tracks: {},
+ _enabled: true,
+ template:
+ new Template('<embed style="height:0" id="sound_#{track}_#{id}" src="#{url}" loop="false" autostart="true" hidden="true"/>'),
+ enable: function(){
+ Sound._enabled = true;
+ },
+ disable: function(){
+ Sound._enabled = false;
+ },
+ play: function(url){
+ if(!Sound._enabled) return;
+ var options = Object.extend({
+ track: 'global', url: url, replace: false
+ }, arguments[1] || {});
+
+ if(options.replace && this.tracks[options.track]) {
+ $R(0, this.tracks[options.track].id).each(function(id){
+ var sound = $('sound_'+options.track+'_'+id);
+ sound.Stop && sound.Stop();
+ sound.remove();
+ });
+ this.tracks[options.track] = null;
+ }
+
+ if(!this.tracks[options.track])
+ this.tracks[options.track] = { id: 0 };
+ else
+ this.tracks[options.track].id++;
+
+ options.id = this.tracks[options.track].id;
+ $$('body')[0].insert(
+ Prototype.Browser.IE ? new Element('bgsound',{
+ id: 'sound_'+options.track+'_'+options.id,
+ src: options.url, loop: 1, autostart: true
+ }) : Sound.template.evaluate(options));
+ }
+};
+
+if(Prototype.Browser.Gecko && navigator.userAgent.indexOf("Win") > 0){
+ if(navigator.plugins && $A(navigator.plugins).detect(function(p){ return p.name.indexOf('QuickTime') != -1 }))
+ Sound.template = new Template('<object id="sound_#{track}_#{id}" width="0" height="0" type="audio/mpeg" data="#{url}"/>');
+ else if(navigator.plugins && $A(navigator.plugins).detect(function(p){ return p.name.indexOf('Windows Media') != -1 }))
+ Sound.template = new Template('<object id="sound_#{track}_#{id}" type="application/x-mplayer2" data="#{url}"></object>');
+ else if(navigator.plugins && $A(navigator.plugins).detect(function(p){ return p.name.indexOf('RealPlayer') != -1 }))
+ Sound.template = new Template('<embed type="audio/x-pn-realaudio-plugin" style="height:0" id="sound_#{track}_#{id}" src="#{url}" loop="false" autostart="true" hidden="true"/>');
+ else
+ Sound.play = function(){};
+} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/scriptaculous/unittest.js b/mayor-orig/www/skin/classic/share/javascript/scriptaculous/unittest.js
new file mode 100644
index 00000000..9555c22c
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/scriptaculous/unittest.js
@@ -0,0 +1,568 @@
+// script.aculo.us unittest.js v1.9.0, Thu Dec 23 16:54:48 -0500 2010
+
+// Copyright (c) 2005-2010 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+// (c) 2005-2010 Jon Tirsen (http://www.tirsen.com)
+// (c) 2005-2010 Michael Schuerig (http://www.schuerig.de/michael/)
+//
+// script.aculo.us is freely distributable under the terms of an MIT-style license.
+// For details, see the script.aculo.us web site: http://script.aculo.us/
+
+// experimental, Firefox-only
+Event.simulateMouse = function(element, eventName) {
+ var options = Object.extend({
+ pointerX: 0,
+ pointerY: 0,
+ buttons: 0,
+ ctrlKey: false,
+ altKey: false,
+ shiftKey: false,
+ metaKey: false
+ }, arguments[2] || {});
+ var oEvent = document.createEvent("MouseEvents");
+ oEvent.initMouseEvent(eventName, true, true, document.defaultView,
+ options.buttons, options.pointerX, options.pointerY, options.pointerX, options.pointerY,
+ options.ctrlKey, options.altKey, options.shiftKey, options.metaKey, 0, $(element));
+
+ if(this.mark) Element.remove(this.mark);
+ this.mark = document.createElement('div');
+ this.mark.appendChild(document.createTextNode(" "));
+ document.body.appendChild(this.mark);
+ this.mark.style.position = 'absolute';
+ this.mark.style.top = options.pointerY + "px";
+ this.mark.style.left = options.pointerX + "px";
+ this.mark.style.width = "5px";
+ this.mark.style.height = "5px;";
+ this.mark.style.borderTop = "1px solid red;";
+ this.mark.style.borderLeft = "1px solid red;";
+
+ if(this.step)
+ alert('['+new Date().getTime().toString()+'] '+eventName+'/'+Test.Unit.inspect(options));
+
+ $(element).dispatchEvent(oEvent);
+};
+
+// Note: Due to a fix in Firefox 1.0.5/6 that probably fixed "too much", this doesn't work in 1.0.6 or DP2.
+// You need to downgrade to 1.0.4 for now to get this working
+// See https://bugzilla.mozilla.org/show_bug.cgi?id=289940 for the fix that fixed too much
+Event.simulateKey = function(element, eventName) {
+ var options = Object.extend({
+ ctrlKey: false,
+ altKey: false,
+ shiftKey: false,
+ metaKey: false,
+ keyCode: 0,
+ charCode: 0
+ }, arguments[2] || {});
+
+ var oEvent = document.createEvent("KeyEvents");
+ oEvent.initKeyEvent(eventName, true, true, window,
+ options.ctrlKey, options.altKey, options.shiftKey, options.metaKey,
+ options.keyCode, options.charCode );
+ $(element).dispatchEvent(oEvent);
+};
+
+Event.simulateKeys = function(element, command) {
+ for(var i=0; i<command.length; i++) {
+ Event.simulateKey(element,'keypress',{charCode:command.charCodeAt(i)});
+ }
+};
+
+var Test = {};
+Test.Unit = {};
+
+// security exception workaround
+Test.Unit.inspect = Object.inspect;
+
+Test.Unit.Logger = Class.create();
+Test.Unit.Logger.prototype = {
+ initialize: function(log) {
+ this.log = $(log);
+ if (this.log) {
+ this._createLogTable();
+ }
+ },
+ start: function(testName) {
+ if (!this.log) return;
+ this.testName = testName;
+ this.lastLogLine = document.createElement('tr');
+ this.statusCell = document.createElement('td');
+ this.nameCell = document.createElement('td');
+ this.nameCell.className = "nameCell";
+ this.nameCell.appendChild(document.createTextNode(testName));
+ this.messageCell = document.createElement('td');
+ this.lastLogLine.appendChild(this.statusCell);
+ this.lastLogLine.appendChild(this.nameCell);
+ this.lastLogLine.appendChild(this.messageCell);
+ this.loglines.appendChild(this.lastLogLine);
+ },
+ finish: function(status, summary) {
+ if (!this.log) return;
+ this.lastLogLine.className = status;
+ this.statusCell.innerHTML = status;
+ this.messageCell.innerHTML = this._toHTML(summary);
+ this.addLinksToResults();
+ },
+ message: function(message) {
+ if (!this.log) return;
+ this.messageCell.innerHTML = this._toHTML(message);
+ },
+ summary: function(summary) {
+ if (!this.log) return;
+ this.logsummary.innerHTML = this._toHTML(summary);
+ },
+ _createLogTable: function() {
+ this.log.innerHTML =
+ '<div id="logsummary"></div>' +
+ '<table id="logtable">' +
+ '<thead><tr><th>Status</th><th>Test</th><th>Message</th></tr></thead>' +
+ '<tbody id="loglines"></tbody>' +
+ '</table>';
+ this.logsummary = $('logsummary');
+ this.loglines = $('loglines');
+ },
+ _toHTML: function(txt) {
+ return txt.escapeHTML().replace(/\n/g,"<br/>");
+ },
+ addLinksToResults: function(){
+ $$("tr.failed .nameCell").each( function(td){ // todo: limit to children of this.log
+ td.title = "Run only this test";
+ Event.observe(td, 'click', function(){ window.location.search = "?tests=" + td.innerHTML;});
+ });
+ $$("tr.passed .nameCell").each( function(td){ // todo: limit to children of this.log
+ td.title = "Run all tests";
+ Event.observe(td, 'click', function(){ window.location.search = "";});
+ });
+ }
+};
+
+Test.Unit.Runner = Class.create();
+Test.Unit.Runner.prototype = {
+ initialize: function(testcases) {
+ this.options = Object.extend({
+ testLog: 'testlog'
+ }, arguments[1] || {});
+ this.options.resultsURL = this.parseResultsURLQueryParameter();
+ this.options.tests = this.parseTestsQueryParameter();
+ if (this.options.testLog) {
+ this.options.testLog = $(this.options.testLog) || null;
+ }
+ if(this.options.tests) {
+ this.tests = [];
+ for(var i = 0; i < this.options.tests.length; i++) {
+ if(/^test/.test(this.options.tests[i])) {
+ this.tests.push(new Test.Unit.Testcase(this.options.tests[i], testcases[this.options.tests[i]], testcases["setup"], testcases["teardown"]));
+ }
+ }
+ } else {
+ if (this.options.test) {
+ this.tests = [new Test.Unit.Testcase(this.options.test, testcases[this.options.test], testcases["setup"], testcases["teardown"])];
+ } else {
+ this.tests = [];
+ for(var testcase in testcases) {
+ if(/^test/.test(testcase)) {
+ this.tests.push(
+ new Test.Unit.Testcase(
+ this.options.context ? ' -> ' + this.options.titles[testcase] : testcase,
+ testcases[testcase], testcases["setup"], testcases["teardown"]
+ ));
+ }
+ }
+ }
+ }
+ this.currentTest = 0;
+ this.logger = new Test.Unit.Logger(this.options.testLog);
+ setTimeout(this.runTests.bind(this), 1000);
+ },
+ parseResultsURLQueryParameter: function() {
+ return window.location.search.parseQuery()["resultsURL"];
+ },
+ parseTestsQueryParameter: function(){
+ if (window.location.search.parseQuery()["tests"]){
+ return window.location.search.parseQuery()["tests"].split(',');
+ };
+ },
+ // Returns:
+ // "ERROR" if there was an error,
+ // "FAILURE" if there was a failure, or
+ // "SUCCESS" if there was neither
+ getResult: function() {
+ var hasFailure = false;
+ for(var i=0;i<this.tests.length;i++) {
+ if (this.tests[i].errors > 0) {
+ return "ERROR";
+ }
+ if (this.tests[i].failures > 0) {
+ hasFailure = true;
+ }
+ }
+ if (hasFailure) {
+ return "FAILURE";
+ } else {
+ return "SUCCESS";
+ }
+ },
+ postResults: function() {
+ if (this.options.resultsURL) {
+ new Ajax.Request(this.options.resultsURL,
+ { method: 'get', parameters: 'result=' + this.getResult(), asynchronous: false });
+ }
+ },
+ runTests: function() {
+ var test = this.tests[this.currentTest];
+ if (!test) {
+ // finished!
+ this.postResults();
+ this.logger.summary(this.summary());
+ return;
+ }
+ if(!test.isWaiting) {
+ this.logger.start(test.name);
+ }
+ test.run();
+ if(test.isWaiting) {
+ this.logger.message("Waiting for " + test.timeToWait + "ms");
+ setTimeout(this.runTests.bind(this), test.timeToWait || 1000);
+ } else {
+ this.logger.finish(test.status(), test.summary());
+ this.currentTest++;
+ // tail recursive, hopefully the browser will skip the stackframe
+ this.runTests();
+ }
+ },
+ summary: function() {
+ var assertions = 0;
+ var failures = 0;
+ var errors = 0;
+ var messages = [];
+ for(var i=0;i<this.tests.length;i++) {
+ assertions += this.tests[i].assertions;
+ failures += this.tests[i].failures;
+ errors += this.tests[i].errors;
+ }
+ return (
+ (this.options.context ? this.options.context + ': ': '') +
+ this.tests.length + " tests, " +
+ assertions + " assertions, " +
+ failures + " failures, " +
+ errors + " errors");
+ }
+};
+
+Test.Unit.Assertions = Class.create();
+Test.Unit.Assertions.prototype = {
+ initialize: function() {
+ this.assertions = 0;
+ this.failures = 0;
+ this.errors = 0;
+ this.messages = [];
+ },
+ summary: function() {
+ return (
+ this.assertions + " assertions, " +
+ this.failures + " failures, " +
+ this.errors + " errors" + "\n" +
+ this.messages.join("\n"));
+ },
+ pass: function() {
+ this.assertions++;
+ },
+ fail: function(message) {
+ this.failures++;
+ this.messages.push("Failure: " + message);
+ },
+ info: function(message) {
+ this.messages.push("Info: " + message);
+ },
+ error: function(error) {
+ this.errors++;
+ this.messages.push(error.name + ": "+ error.message + "(" + Test.Unit.inspect(error) +")");
+ },
+ status: function() {
+ if (this.failures > 0) return 'failed';
+ if (this.errors > 0) return 'error';
+ return 'passed';
+ },
+ assert: function(expression) {
+ var message = arguments[1] || 'assert: got "' + Test.Unit.inspect(expression) + '"';
+ try { expression ? this.pass() :
+ this.fail(message); }
+ catch(e) { this.error(e); }
+ },
+ assertEqual: function(expected, actual) {
+ var message = arguments[2] || "assertEqual";
+ try { (expected == actual) ? this.pass() :
+ this.fail(message + ': expected "' + Test.Unit.inspect(expected) +
+ '", actual "' + Test.Unit.inspect(actual) + '"'); }
+ catch(e) { this.error(e); }
+ },
+ assertInspect: function(expected, actual) {
+ var message = arguments[2] || "assertInspect";
+ try { (expected == actual.inspect()) ? this.pass() :
+ this.fail(message + ': expected "' + Test.Unit.inspect(expected) +
+ '", actual "' + Test.Unit.inspect(actual) + '"'); }
+ catch(e) { this.error(e); }
+ },
+ assertEnumEqual: function(expected, actual) {
+ var message = arguments[2] || "assertEnumEqual";
+ try { $A(expected).length == $A(actual).length &&
+ expected.zip(actual).all(function(pair) { return pair[0] == pair[1] }) ?
+ this.pass() : this.fail(message + ': expected ' + Test.Unit.inspect(expected) +
+ ', actual ' + Test.Unit.inspect(actual)); }
+ catch(e) { this.error(e); }
+ },
+ assertNotEqual: function(expected, actual) {
+ var message = arguments[2] || "assertNotEqual";
+ try { (expected != actual) ? this.pass() :
+ this.fail(message + ': got "' + Test.Unit.inspect(actual) + '"'); }
+ catch(e) { this.error(e); }
+ },
+ assertIdentical: function(expected, actual) {
+ var message = arguments[2] || "assertIdentical";
+ try { (expected === actual) ? this.pass() :
+ this.fail(message + ': expected "' + Test.Unit.inspect(expected) +
+ '", actual "' + Test.Unit.inspect(actual) + '"'); }
+ catch(e) { this.error(e); }
+ },
+ assertNotIdentical: function(expected, actual) {
+ var message = arguments[2] || "assertNotIdentical";
+ try { !(expected === actual) ? this.pass() :
+ this.fail(message + ': expected "' + Test.Unit.inspect(expected) +
+ '", actual "' + Test.Unit.inspect(actual) + '"'); }
+ catch(e) { this.error(e); }
+ },
+ assertNull: function(obj) {
+ var message = arguments[1] || 'assertNull';
+ try { (obj==null) ? this.pass() :
+ this.fail(message + ': got "' + Test.Unit.inspect(obj) + '"'); }
+ catch(e) { this.error(e); }
+ },
+ assertMatch: function(expected, actual) {
+ var message = arguments[2] || 'assertMatch';
+ var regex = new RegExp(expected);
+ try { (regex.exec(actual)) ? this.pass() :
+ this.fail(message + ' : regex: "' + Test.Unit.inspect(expected) + ' did not match: ' + Test.Unit.inspect(actual) + '"'); }
+ catch(e) { this.error(e); }
+ },
+ assertHidden: function(element) {
+ var message = arguments[1] || 'assertHidden';
+ this.assertEqual("none", element.style.display, message);
+ },
+ assertNotNull: function(object) {
+ var message = arguments[1] || 'assertNotNull';
+ this.assert(object != null, message);
+ },
+ assertType: function(expected, actual) {
+ var message = arguments[2] || 'assertType';
+ try {
+ (actual.constructor == expected) ? this.pass() :
+ this.fail(message + ': expected "' + Test.Unit.inspect(expected) +
+ '", actual "' + (actual.constructor) + '"'); }
+ catch(e) { this.error(e); }
+ },
+ assertNotOfType: function(expected, actual) {
+ var message = arguments[2] || 'assertNotOfType';
+ try {
+ (actual.constructor != expected) ? this.pass() :
+ this.fail(message + ': expected "' + Test.Unit.inspect(expected) +
+ '", actual "' + (actual.constructor) + '"'); }
+ catch(e) { this.error(e); }
+ },
+ assertInstanceOf: function(expected, actual) {
+ var message = arguments[2] || 'assertInstanceOf';
+ try {
+ (actual instanceof expected) ? this.pass() :
+ this.fail(message + ": object was not an instance of the expected type"); }
+ catch(e) { this.error(e); }
+ },
+ assertNotInstanceOf: function(expected, actual) {
+ var message = arguments[2] || 'assertNotInstanceOf';
+ try {
+ !(actual instanceof expected) ? this.pass() :
+ this.fail(message + ": object was an instance of the not expected type"); }
+ catch(e) { this.error(e); }
+ },
+ assertRespondsTo: function(method, obj) {
+ var message = arguments[2] || 'assertRespondsTo';
+ try {
+ (obj[method] && typeof obj[method] == 'function') ? this.pass() :
+ this.fail(message + ": object doesn't respond to [" + method + "]"); }
+ catch(e) { this.error(e); }
+ },
+ assertReturnsTrue: function(method, obj) {
+ var message = arguments[2] || 'assertReturnsTrue';
+ try {
+ var m = obj[method];
+ if(!m) m = obj['is'+method.charAt(0).toUpperCase()+method.slice(1)];
+ m() ? this.pass() :
+ this.fail(message + ": method returned false"); }
+ catch(e) { this.error(e); }
+ },
+ assertReturnsFalse: function(method, obj) {
+ var message = arguments[2] || 'assertReturnsFalse';
+ try {
+ var m = obj[method];
+ if(!m) m = obj['is'+method.charAt(0).toUpperCase()+method.slice(1)];
+ !m() ? this.pass() :
+ this.fail(message + ": method returned true"); }
+ catch(e) { this.error(e); }
+ },
+ assertRaise: function(exceptionName, method) {
+ var message = arguments[2] || 'assertRaise';
+ try {
+ method();
+ this.fail(message + ": exception expected but none was raised"); }
+ catch(e) {
+ ((exceptionName == null) || (e.name==exceptionName)) ? this.pass() : this.error(e);
+ }
+ },
+ assertElementsMatch: function() {
+ var expressions = $A(arguments), elements = $A(expressions.shift());
+ if (elements.length != expressions.length) {
+ this.fail('assertElementsMatch: size mismatch: ' + elements.length + ' elements, ' + expressions.length + ' expressions');
+ return false;
+ }
+ elements.zip(expressions).all(function(pair, index) {
+ var element = $(pair.first()), expression = pair.last();
+ if (element.match(expression)) return true;
+ this.fail('assertElementsMatch: (in index ' + index + ') expected ' + expression.inspect() + ' but got ' + element.inspect());
+ }.bind(this)) && this.pass();
+ },
+ assertElementMatches: function(element, expression) {
+ this.assertElementsMatch([element], expression);
+ },
+ benchmark: function(operation, iterations) {
+ var startAt = new Date();
+ (iterations || 1).times(operation);
+ var timeTaken = ((new Date())-startAt);
+ this.info((arguments[2] || 'Operation') + ' finished ' +
+ iterations + ' iterations in ' + (timeTaken/1000)+'s' );
+ return timeTaken;
+ },
+ _isVisible: function(element) {
+ element = $(element);
+ if(!element.parentNode) return true;
+ this.assertNotNull(element);
+ if(element.style && Element.getStyle(element, 'display') == 'none')
+ return false;
+
+ return this._isVisible(element.parentNode);
+ },
+ assertNotVisible: function(element) {
+ this.assert(!this._isVisible(element), Test.Unit.inspect(element) + " was not hidden and didn't have a hidden parent either. " + ("" || arguments[1]));
+ },
+ assertVisible: function(element) {
+ this.assert(this._isVisible(element), Test.Unit.inspect(element) + " was not visible. " + ("" || arguments[1]));
+ },
+ benchmark: function(operation, iterations) {
+ var startAt = new Date();
+ (iterations || 1).times(operation);
+ var timeTaken = ((new Date())-startAt);
+ this.info((arguments[2] || 'Operation') + ' finished ' +
+ iterations + ' iterations in ' + (timeTaken/1000)+'s' );
+ return timeTaken;
+ }
+};
+
+Test.Unit.Testcase = Class.create();
+Object.extend(Object.extend(Test.Unit.Testcase.prototype, Test.Unit.Assertions.prototype), {
+ initialize: function(name, test, setup, teardown) {
+ Test.Unit.Assertions.prototype.initialize.bind(this)();
+ this.name = name;
+
+ if(typeof test == 'string') {
+ test = test.gsub(/(\.should[^\(]+\()/,'#{0}this,');
+ test = test.gsub(/(\.should[^\(]+)\(this,\)/,'#{1}(this)');
+ this.test = function() {
+ eval('with(this){'+test+'}');
+ }
+ } else {
+ this.test = test || function() {};
+ }
+
+ this.setup = setup || function() {};
+ this.teardown = teardown || function() {};
+ this.isWaiting = false;
+ this.timeToWait = 1000;
+ },
+ wait: function(time, nextPart) {
+ this.isWaiting = true;
+ this.test = nextPart;
+ this.timeToWait = time;
+ },
+ run: function() {
+ try {
+ try {
+ if (!this.isWaiting) this.setup.bind(this)();
+ this.isWaiting = false;
+ this.test.bind(this)();
+ } finally {
+ if(!this.isWaiting) {
+ this.teardown.bind(this)();
+ }
+ }
+ }
+ catch(e) { this.error(e); }
+ }
+});
+
+// *EXPERIMENTAL* BDD-style testing to please non-technical folk
+// This draws many ideas from RSpec http://rspec.rubyforge.org/
+
+Test.setupBDDExtensionMethods = function(){
+ var METHODMAP = {
+ shouldEqual: 'assertEqual',
+ shouldNotEqual: 'assertNotEqual',
+ shouldEqualEnum: 'assertEnumEqual',
+ shouldBeA: 'assertType',
+ shouldNotBeA: 'assertNotOfType',
+ shouldBeAn: 'assertType',
+ shouldNotBeAn: 'assertNotOfType',
+ shouldBeNull: 'assertNull',
+ shouldNotBeNull: 'assertNotNull',
+
+ shouldBe: 'assertReturnsTrue',
+ shouldNotBe: 'assertReturnsFalse',
+ shouldRespondTo: 'assertRespondsTo'
+ };
+ var makeAssertion = function(assertion, args, object) {
+ this[assertion].apply(this,(args || []).concat([object]));
+ };
+
+ Test.BDDMethods = {};
+ $H(METHODMAP).each(function(pair) {
+ Test.BDDMethods[pair.key] = function() {
+ var args = $A(arguments);
+ var scope = args.shift();
+ makeAssertion.apply(scope, [pair.value, args, this]); };
+ });
+
+ [Array.prototype, String.prototype, Number.prototype, Boolean.prototype].each(
+ function(p){ Object.extend(p, Test.BDDMethods) }
+ );
+};
+
+Test.context = function(name, spec, log){
+ Test.setupBDDExtensionMethods();
+
+ var compiledSpec = {};
+ var titles = {};
+ for(specName in spec) {
+ switch(specName){
+ case "setup":
+ case "teardown":
+ compiledSpec[specName] = spec[specName];
+ break;
+ default:
+ var testName = 'test'+specName.gsub(/\s+/,'-').camelize();
+ var body = spec[specName].toString().split('\n').slice(1);
+ if(/^\{/.test(body[0])) body = body.slice(1);
+ body.pop();
+ body = body.map(function(statement){
+ return statement.strip()
+ });
+ compiledSpec[testName] = body.join('\n');
+ titles[testName] = specName;
+ }
+ }
+ new Test.Unit.Runner(compiledSpec, { titles: titles, testLog: log || 'testlog', context: name });
+}; \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/langs/de.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/langs/de.js
new file mode 100755
index 00000000..0144c9ac
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/langs/de.js
@@ -0,0 +1 @@
+tinyMCE.addI18n({de:{common:{"more_colors":"Weitere Farben","invalid_data":"Fehler: Es wurden ung\u00fcltige Werte eingegeben (rot markiert).","popup_blocked":"Leider hat der Popup-Blocker ein Fenster unterbunden, das f\u00fcr den Betrieb dieses Programms n\u00f6tig ist. Bitte den Popup-Blocker f\u00fcr diese Seite deaktivieren.","clipboard_no_support":"Wird derzeit im verwendeten Browser nicht unterst\u00fctzt. Bitte stattdessen die Tastenk\u00fcrzel benutzen.","clipboard_msg":"Kopieren, Ausschneiden und Einf\u00fcgen sind im Mozilla Firefox nicht m\u00f6glich.\nMehr \u00fcber dieses Problem erfahren?","not_set":"- unbestimmt -","class_name":"CSS-Klasse",browse:"Durchsuchen",close:"Schlie\u00dfen",cancel:"Abbrechen",update:"Aktualisieren",insert:"Einf\u00fcgen",apply:"\u00dcbernehmen","edit_confirm":"Soll dieser Text jetzt bearbeitet werden?","invalid_data_number":"{#field} muss eine Zahl sein","invalid_data_min":"{#field} muss eine Zahl gr\u00f6\u00dfer als {#min} sein","invalid_data_size":"{#field} muss eine Zahl oder ein Prozentwert sein",value:"(Wert)"},contextmenu:{full:"Blocksatz",right:"Rechtsb\u00fcndig",center:"Zentriert",left:"Linksb\u00fcndig",align:"Ausrichtung"},insertdatetime:{"day_short":"So,Mo,Di,Mi,Do,Fr,Sa,So","day_long":"Sonntag,Montag,Dienstag,Mittwoch,Donnerstag,Freitag,Samstag,Sonntag","months_short":"Jan,Feb,M\u00e4r,Apr,Mai,Juni,Juli,Aug,Sept,Okt,Nov,Dez","months_long":"Januar,Februar,M\u00e4rz,April,Mai,Juni,Juli,August,September,Oktober,November,Dezember","inserttime_desc":"Zeit einf\u00fcgen","insertdate_desc":"Datum einf\u00fcgen","time_fmt":"%H:%M:%S","date_fmt":"%d.%m.%Y"},print:{"print_desc":"Drucken"},preview:{"preview_desc":"Vorschau"},directionality:{"rtl_desc":"Schrift von rechts nach links","ltr_desc":"Schrift von links nach rechts"},layer:{content:"Neue Ebene...","absolute_desc":"Absolute Positionierung","backward_desc":"Nach hinten legen","forward_desc":"Nach vorne holen","insertlayer_desc":"Neue Ebene einf\u00fcgen"},save:{"save_desc":"Speichern","cancel_desc":"Alle \u00c4nderungen verwerfen"},nonbreaking:{"nonbreaking_desc":"Gesch\u00fctztes Leerzeichen einf\u00fcgen"},iespell:{download:"ieSpell konnte nicht gefunden werden. Soll es installiert werden?","iespell_desc":"Rechtschreibpr\u00fcfung"},advhr:{"advhr_desc":"Trennlinie","delta_height":"","delta_width":""},emotions:{"emotions_desc":"Smileys","delta_height":"","delta_width":""},searchreplace:{"replace_desc":"Suchen/Ersetzen","search_desc":"Suchen","delta_width":"","delta_height":""},advimage:{"image_desc":"Bild einf\u00fcgen/ver\u00e4ndern","delta_width":"","delta_height":""},advlink:{"link_desc":"Link einf\u00fcgen/ver\u00e4ndern","delta_height":"","delta_width":""},xhtmlxtras:{"attribs_desc":"Attribute einf\u00fcgen/bearbeiten","ins_desc":"Eingef\u00fcgter Text","del_desc":"Entfernter Text","acronym_desc":"Akronym","abbr_desc":"Abk\u00fcrzung","cite_desc":"Quellenangabe","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{desc:"CSS-Styles bearbeiten","delta_height":"","delta_width":""},paste:{"plaintext_mode":"Einf\u00fcgemodus ist nun \"Nur Text\". Erneut klicken stellt den Normalmodus wieder her.","plaintext_mode_sticky":"Einf\u00fcgemodus ist nun \"Nur Text\". Erneut klicken (oder das Einf\u00fcgen aus der Zwischenablage) stellt den Normalmodus wieder her.","selectall_desc":"Alles ausw\u00e4hlen","paste_word_desc":"Mit Formatierungen (aus Word) einf\u00fcgen","paste_text_desc":"Als einfachen Text einf\u00fcgen"},"paste_dlg":{"word_title":"Strg V auf der Tastatur dr\u00fccken, um den Text einzuf\u00fcgen.","text_linebreaks":"Zeilenumbr\u00fcche beibehalten","text_title":"Strg V auf der Tastatur dr\u00fccken, um den Text einzuf\u00fcgen."},table:{"cellprops_delta_width":"150",cell:"Zelle",col:"Spalte",row:"Zeile",del:"Tabelle l\u00f6schen","copy_row_desc":"Zeile kopieren","cut_row_desc":"Zeile ausschneiden","paste_row_after_desc":"Zeile unterhalb aus der Zwischenablage einf\u00fcgen","paste_row_before_desc":"Zeile oberhalb aus der Zwischenablage einf\u00fcgen","props_desc":"Eigenschaften der Tabelle","cell_desc":"Eigenschaften der Zelle","row_desc":"Eigenschaften der Zeile","merge_cells_desc":"Zellen verbinden","split_cells_desc":"Verbundene Zellen trennen","delete_col_desc":"Spalte l\u00f6schen","col_after_desc":"Spalte rechts einf\u00fcgen","col_before_desc":"Spalte links einf\u00fcgen","delete_row_desc":"Zeile l\u00f6schen","row_after_desc":"Zeile unterhalb einf\u00fcgen","row_before_desc":"Zeile oberhalb einf\u00fcgen",desc:"Tabelle erstellen/bearbeiten","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"warning_message":"Beim wiederherstellen des gespeicherten Inhalts gehen die aktuellen Daten im Editor verloren.\n\nSoll der gespeicherte Inhalt wirklich wiederhergestellt werden?","restore_content":"Automatisch gespeicherten Inhalt wiederherstellen.","unload_msg":"Beim verlassen der Seite werden die \u00c4nderungen verloren gehen."},fullscreen:{desc:"Vollbildschirm"},media:{edit:"Multimediaeinbettung bearbeiten",desc:"Multimedia einbetten/bearbeiten","delta_height":"","delta_width":""},fullpage:{desc:"Dokument-Eigenschaften","delta_width":"","delta_height":""},template:{desc:"Inhalt aus Vorlage einf\u00fcgen"},visualchars:{desc:"Sichtbarkeit der Steuerzeichen an/aus"},spellchecker:{desc:"Rechtschreibpr\u00fcfung an/aus",menu:"Einstellungen der Rechtschreibpr\u00fcfung","ignore_word":"Wort ignorieren","ignore_words":"Alle ignorieren",langs:"Sprachen",wait:"Bitte warten...",sug:"Vorschl\u00e4ge","no_sug":"Keine Vorschl\u00e4ge","no_mpell":"Keine Rechtschreibfehler gefunden.","learn_word":"Zum W\u00f6rterbuch hinzuf\u00fcgen"},pagebreak:{desc:"Seitenumbruch einf\u00fcgen"},advlist:{types:"Typen",def:"Standard","lower_alpha":"a. b. c.","lower_greek":"1. 2. 3.","lower_roman":"i. ii. iii.","upper_alpha":"A. B. C.","upper_roman":"I. II. III.",circle:"Kreis",disc:"Punkt",square:"Quadrat"},colors:{"333300":"Dunkeloliv","993300":"Orange","000000":"Schwarz","003300":"Dunkelgr\u00fcn","003366":"Dunkles himmelblau","000080":"Marineblau","333399":"Indigoblau","333333":"Sehr dunkelgrau","800000":"Kastanienbraun",FF6600:"Orange","808000":"Oliv","008000":"Gr\u00fcn","008080":"Blaugr\u00fcn","0000FF":"Blau","666699":"Graublau","808080":"Grau",FF0000:"Rot",FF9900:"Bernsteinfarben","99CC00":"Gelbgr\u00fcn","339966":"Meergr\u00fcn","33CCCC":"T\u00fcrkis","3366FF":"K\u00f6nigsblau","800080":"Violett","999999":"Mittelgrau",FF00FF:"Magenta",FFCC00:"Gold",FFFF00:"Gelb","00FF00":"Hellgr\u00fcn","00FFFF":"Aquamarinblau","00CCFF":"Himmelblau","993366":"Braun",C0C0C0:"Silber",FF99CC:"Rosa",FFCC99:"Pfirsichfarben",FFFF99:"Hellgelb",CCFFCC:"Blassgr\u00fcn",CCFFFF:"Blasst\u00fcrkis","99CCFF":"Helles himmelblau",CC99FF:"Pflaumenblau",FFFFFF:"Wei\u00df"},aria:{"rich_text_area":"Rich Text Bereich"},wordcount:{words:"W\u00f6rter: "}}}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/langs/en.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/langs/en.js
new file mode 100755
index 00000000..16d7a93e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/langs/en.js
@@ -0,0 +1 @@
+tinyMCE.addI18n({en:{common:{"more_colors":"More Colors...","invalid_data":"Error: Invalid values entered, these are marked in red.","popup_blocked":"Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.","clipboard_no_support":"Currently not supported by your browser, use keyboard shortcuts instead.","clipboard_msg":"Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?","not_set":"-- Not Set --","class_name":"Class",browse:"Browse",close:"Close",cancel:"Cancel",update:"Update",insert:"Insert",apply:"Apply","edit_confirm":"Do you want to use the WYSIWYG mode for this textarea?","invalid_data_number":"{#field} must be a number","invalid_data_min":"{#field} must be a number greater than {#min}","invalid_data_size":"{#field} must be a number or percentage",value:"(value)"},contextmenu:{full:"Full",right:"Right",center:"Center",left:"Left",align:"Alignment"},insertdatetime:{"day_short":"Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun","day_long":"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday","months_short":"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec","months_long":"January,February,March,April,May,June,July,August,September,October,November,December","inserttime_desc":"Insert Time","insertdate_desc":"Insert Date","time_fmt":"%H:%M:%S","date_fmt":"%Y-%m-%d"},print:{"print_desc":"Print"},preview:{"preview_desc":"Preview"},directionality:{"rtl_desc":"Direction Right to Left","ltr_desc":"Direction Left to Right"},layer:{content:"New layer...","absolute_desc":"Toggle Absolute Positioning","backward_desc":"Move Backward","forward_desc":"Move Forward","insertlayer_desc":"Insert New Layer"},save:{"save_desc":"Save","cancel_desc":"Cancel All Changes"},nonbreaking:{"nonbreaking_desc":"Insert Non-Breaking Space Character"},iespell:{download:"ieSpell not detected. Do you want to install it now?","iespell_desc":"Check Spelling"},advhr:{"delta_height":"","delta_width":"","advhr_desc":"Insert Horizontal Line"},emotions:{"delta_height":"","delta_width":"","emotions_desc":"Emotions"},searchreplace:{"replace_desc":"Find/Replace","delta_width":"","delta_height":"","search_desc":"Find"},advimage:{"delta_width":"","image_desc":"Insert/Edit Image","delta_height":""},advlink:{"delta_height":"","delta_width":"","link_desc":"Insert/Edit Link"},xhtmlxtras:{"attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":"","attribs_desc":"Insert/Edit Attributes","ins_desc":"Insertion","del_desc":"Deletion","acronym_desc":"Acronym","abbr_desc":"Abbreviation","cite_desc":"Citation"},style:{"delta_height":"","delta_width":"",desc:"Edit CSS Style"},paste:{"plaintext_mode":"Paste is now in plain text mode. Click again to toggle back to regular paste mode.","plaintext_mode_sticky":"Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.","selectall_desc":"Select All","paste_word_desc":"Paste from Word","paste_text_desc":"Paste as Plain Text"},"paste_dlg":{"word_title":"Use Ctrl+V on your keyboard to paste the text into the window.","text_linebreaks":"Keep Linebreaks","text_title":"Use Ctrl+V on your keyboard to paste the text into the window."},table:{"merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","cellprops_delta_width":"","rowprops_delta_height":"","rowprops_delta_width":"",cell:"Cell",col:"Column",row:"Row",del:"Delete Table","copy_row_desc":"Copy Table Row","cut_row_desc":"Cut Table Row","paste_row_after_desc":"Paste Table Row After","paste_row_before_desc":"Paste Table Row Before","props_desc":"Table Properties","cell_desc":"Table Cell Properties","row_desc":"Table Row Properties","merge_cells_desc":"Merge Table Cells","split_cells_desc":"Split Merged Table Cells","delete_col_desc":"Delete Column","col_after_desc":"Insert Column After","col_before_desc":"Insert Column Before","delete_row_desc":"Delete Row","row_after_desc":"Insert Row After","row_before_desc":"Insert Row Before",desc:"Insert/Edit Table"},autosave:{"warning_message":"If you restore the saved content, you will lose all the content that is currently in the editor.\n\nAre you sure you want to restore the saved content?","restore_content":"Restore auto-saved content.","unload_msg":"The changes you made will be lost if you navigate away from this page."},fullscreen:{desc:"Toggle Full Screen Mode"},media:{"delta_height":"","delta_width":"",edit:"Edit Embedded Media",desc:"Insert/Edit Embedded Media"},fullpage:{desc:"Document Properties","delta_width":"","delta_height":""},template:{desc:"Insert Predefined Template Content"},visualchars:{desc:"Show/Hide Visual Control Characters"},spellchecker:{desc:"Toggle Spell Checker",menu:"Spell Checker Settings","ignore_word":"Ignore Word","ignore_words":"Ignore All",langs:"Languages",wait:"Please wait...",sug:"Suggestions","no_sug":"No Suggestions","no_mpell":"No misspellings found.","learn_word":"Learn word"},pagebreak:{desc:"Insert Page Break for Printing"},advlist:{types:"Types",def:"Default","lower_alpha":"Lower Alpha","lower_greek":"Lower Greek","lower_roman":"Lower Roman","upper_alpha":"Upper Alpha","upper_roman":"Upper Roman",circle:"Circle",disc:"Disc",square:"Square"},colors:{"333300":"Dark olive","993300":"Burnt orange","000000":"Black","003300":"Dark green","003366":"Dark azure","000080":"Navy Blue","333399":"Indigo","333333":"Very dark gray","800000":"Maroon",FF6600:"Orange","808000":"Olive","008000":"Green","008080":"Teal","0000FF":"Blue","666699":"Grayish blue","808080":"Gray",FF0000:"Red",FF9900:"Amber","99CC00":"Yellow green","339966":"Sea green","33CCCC":"Turquoise","3366FF":"Royal blue","800080":"Purple","999999":"Medium gray",FF00FF:"Magenta",FFCC00:"Gold",FFFF00:"Yellow","00FF00":"Lime","00FFFF":"Aqua","00CCFF":"Sky blue","993366":"Brown",C0C0C0:"Silver",FF99CC:"Pink",FFCC99:"Peach",FFFF99:"Light yellow",CCFFCC:"Pale green",CCFFFF:"Pale cyan","99CCFF":"Light sky blue",CC99FF:"Plum",FFFFFF:"White"},aria:{"rich_text_area":"Rich Text Area"},wordcount:{words:"Words:"}}}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/langs/hu.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/langs/hu.js
new file mode 100644
index 00000000..71a3b76e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/langs/hu.js
@@ -0,0 +1 @@
+tinyMCE.addI18n({hu:{common:{"more_colors":"Tov\u00e1bbi sz\u00ednek...","invalid_data":"Hiba: Az \u00e9rv\u00e9nytelen adatok, pirossal jel\u00f6lve.","popup_blocked":"A felugr\u00f3 ablakok tilt\u00e1sa miatt nem siker\u00fclt megjelen\u00edteni egy, az alkalmaz\u00e1shoz sz\u00fcks\u00e9ges ablakot. Enged\u00e9lyezze a b\u00f6ng\u00e9sz\u0151j\u00e9ben a felugr\u00f3 ablakokat, hogy minden funkci\u00f3t haszn\u00e1lhasson.","clipboard_no_support":"Jelenleg nem t\u00e1mogatja a b\u00f6ng\u00e9sz\u0151je, haszn\u00e1lja a billenty\u0171kombin\u00e1ci\u00f3kat helyette.","clipboard_msg":"A M\u00e1sol\u00e1s/Kiv\u00e1g\u00e1s/Besz\u00far\u00e1s funkci\u00f3k nem \u00e9rhet\u0151k el Mozilla \u00e9s Firefox alatt.\nK\u00edv\u00e1n t\u00f6bbet megtudni err\u0151l a t\u00e9m\u00e1r\u00f3l?","not_set":"-- Nincs megadva --","class_name":"Oszt\u00e1ly",browse:"Tall\u00f3z\u00e1s",close:"Bez\u00e1r\u00e1s",cancel:"M\u00e9gsem",update:"Friss\u00edt\u00e9s",insert:"Besz\u00far\u00e1s",apply:"Alkalmaz","edit_confirm":"Haszn\u00e1lni k\u00edv\u00e1nja a (WYSIWYG) sz\u00f6vegszerkeszt\u0151 m\u00f3dot ebben a sz\u00f6vegdobozban?","invalid_data_number":"{#field} sz\u00e1m kell legyen","invalid_data_min":"{#field} egy nagyobb sz\u00e1m kell legyen, mint {#min}","invalid_data_size":"{#field} egy sz\u00e1m vagy sz\u00e1zal\u00e9k kell legyen",value:"(\u00e9rt\u00e9k)"},contextmenu:{full:"Sorkiz\u00e1rt",right:"Jobbra",center:"K\u00f6z\u00e9pre",left:"Balra",align:"Igaz\u00edt\u00e1s"},insertdatetime:{"day_short":"V,H,K,Sze,Cs,P,Szo,V","day_long":"vas\u00e1rnap,h\u00e9tf\u0151,kedd,szerda,cs\u00fct\u00f6rt\u00f6k,p\u00e9ntek,szombat,vas\u00e1rnap","months_short":"Jan,Feb,M\u00e1r,\u00c1pr,M\u00e1j,J\u00fan,J\u00fal,Aug,Szept,Okt,Nov,Dec","months_long":"janu\u00e1r,febru\u00e1r,m\u00e1rcius,\u00e1prilis,m\u00e1jus,j\u00fanius,j\u00falius,augusztus,szeptember,okt\u00f3ber,november,december","inserttime_desc":"Id\u0151 besz\u00far\u00e1sa","insertdate_desc":"D\u00e1tum besz\u00far\u00e1sa","time_fmt":"%H:%M:%S","date_fmt":"%Y. %m. %d."},print:{"print_desc":"Nyomtat\u00e1s"},preview:{"preview_desc":"El\u0151n\u00e9zet"},directionality:{"rtl_desc":"Jobbr\u00f3l balra","ltr_desc":"Balr\u00f3l jobbra"},layer:{content:"\u00daj r\u00e9teg...","absolute_desc":"Abszol\u00fat poz\u00edci\u00f3 megad\u00e1s ki-/bekapcsol\u00e1sa","backward_desc":"Mozgat\u00e1s h\u00e1tra","forward_desc":"Mozgat\u00e1s el\u0151re","insertlayer_desc":"\u00daj r\u00e9teg besz\u00far\u00e1sa"},save:{"save_desc":"Ment\u00e9s","cancel_desc":"Minden m\u00f3dos\u00edt\u00e1s elvet\u00e9se"},nonbreaking:{"nonbreaking_desc":"Nem (sor)t\u00f6rhet\u0151 sz\u00f3k\u00f6z besz\u00far\u00e1sa"},iespell:{download:"ieSpell nem tal\u00e1lhat\u00f3. Telep\u00edti most?","iespell_desc":"Helyes\u00edr\u00e1s-ellen\u0151rz\u00e9s futtat\u00e1sa"},advhr:{"advhr_desc":"V\u00edzszintes vonal","delta_height":"","delta_width":""},emotions:{"emotions_desc":"Hangulatjelek","delta_height":"","delta_width":""},searchreplace:{"replace_desc":"Keres\u00e9s/Csere","search_desc":"Keres\u00e9s","delta_width":"","delta_height":""},advimage:{"image_desc":"K\u00e9p besz\u00far\u00e1sa/szerkeszt\u00e9se","delta_width":"","delta_height":""},advlink:{"link_desc":"Link besz\u00far\u00e1sa/szerkeszt\u00e9se","delta_height":"","delta_width":""},xhtmlxtras:{"attribs_desc":"Tulajdons\u00e1gok besz\u00far\u00e1sa/szerkeszt\u00e9se","ins_desc":"Besz\u00far\u00e1s","del_desc":"T\u00f6r\u00f6l\u00e9s","acronym_desc":"Bet\u0171sz\u00f3","abbr_desc":"R\u00f6vid\u00edt\u00e9s","cite_desc":"Id\u00e9zet","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{desc:"CSS st\u00edlus szerkeszt\u00e9se","delta_height":"","delta_width":""},paste:{"plaintext_mode":"A besz\u00far\u00e1s mostant\u00f3l egyszer\u0171 sz\u00f6veg m\u00f3dban van. Kattintson ide \u00fajra ezen m\u00f3d ki/be kapcsol\u00e1s\u00e1hoz.","plaintext_mode_sticky":"A besz\u00far\u00e1s mostant\u00f3l egyszer\u0171 sz\u00f6veg m\u00f3dban van. Kattintson ide \u00fajra ezen m\u00f3d ki/be kapcsol\u00e1s\u00e1hoz. Miut\u00e1n besz\u00far valamit, visszaker\u00fcl norm\u00e1l m\u00f3dba.","selectall_desc":"Mindent kijel\u00f6l","paste_word_desc":"Besz\u00far\u00e1s Wordb\u0151l","paste_text_desc":"Besz\u00far\u00e1s egyszer\u0171 sz\u00f6vegk\u00e9nt"},"paste_dlg":{"word_title":"Haszn\u00e1lja a Ctrl V-t a billenty\u0171zet\u00e9n a sz\u00f6veg beilleszt\u00e9shez.","text_linebreaks":"Sort\u00f6r\u00e9sek megtart\u00e1sa","text_title":"Haszn\u00e1lja a Ctrl V-t a billenty\u0171zet\u00e9n a sz\u00f6veg beilleszt\u00e9shez."},table:{cell:"Cella",col:"Oszlop",row:"Sor",del:"T\u00e1bl\u00e1zat t\u00f6rl\u00e9se","copy_row_desc":"Sor m\u00e1sol\u00e1sa","cut_row_desc":"Sor kiv\u00e1g\u00e1sa","paste_row_after_desc":"Sor bem\u00e1sol\u00e1sa ut\u00e1na","paste_row_before_desc":"Sor bem\u00e1sol\u00e1sa el\u00e9","props_desc":"T\u00e1bl\u00e1zat tulajdons\u00e1gai","cell_desc":"Cella tulajdons\u00e1gai","row_desc":"Sor tulajdons\u00e1gai","merge_cells_desc":"Cell\u00e1k egyes\u00edt\u00e9se","split_cells_desc":"Egyes\u00edtett cell\u00e1k feloszt\u00e1sa","delete_col_desc":"Oszlop t\u00f6rl\u00e9se","col_after_desc":"Oszlop besz\u00far\u00e1sa ut\u00e1na","col_before_desc":"Oszlop besz\u00far\u00e1sa el\u00e9","delete_row_desc":"Sor t\u00f6rl\u00e9se","row_after_desc":"Sor besz\u00far\u00e1sa ut\u00e1na","row_before_desc":"Sor besz\u00far\u00e1sa el\u00e9",desc:"T\u00e1bl\u00e1zat besz\u00far\u00e1sa/szerkeszt\u00e9se","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","cellprops_delta_width":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"warning_message":"Ha visszat\u00f6lti a mentett be\u00e1ll\u00edt\u00e1sokat, a jelenlegi \u00e1llapot elv\u00e9sz.\n\nBiztosan visszat\u00f6lti a mentett \u00e1llapotot?","restore_content":"Automatikus ment\u00e9s bet\u00f6lt\u00e9se.","unload_msg":"A m\u00f3dos\u00edt\u00e1sok nem lesznek mentve, ha elhagyja az oldalt."},fullscreen:{desc:"Teljesk\u00e9perny\u0151s m\u00f3d ki-/bekapcsol\u00e1sa"},media:{edit:"Be\u00e1gyazott m\u00e9dia szerkeszt\u00e9se",desc:"Be\u00e1gyazott m\u00e9dia besz\u00far\u00e1sa/szerkeszt\u00e9se","delta_height":"","delta_width":""},fullpage:{desc:"Dokumentum tulajdons\u00e1gai","delta_width":"","delta_height":""},template:{desc:"Sablon beilleszt\u00e9se"},visualchars:{desc:"Vizu\u00e1lis vez\u00e9rl\u0151karakterek be-/kikapcsol\u00e1sa"},spellchecker:{desc:"Helyes\u00edr\u00e1s-ellen\u0151rz\u0151 ki-/bekapcsol\u00e1sa",menu:"Helyes\u00edr\u00e1s-ellen\u0151rz\u0151 be\u00e1ll\u00edt\u00e1sok","ignore_word":"Sz\u00f3 kihagy\u00e1sa","ignore_words":"Mindet kihagy",langs:"Nyelvek",wait:"K\u00e9rem, v\u00e1rjon...",sug:"Aj\u00e1nl\u00e1sok","no_sug":"Nincs aj\u00e1nl\u00e1s","no_mpell":"Nem tal\u00e1ltam helyes\u00edr\u00e1si hib\u00e1t.","learn_word":"Sz\u00f3 megjegyz\u00e9se"},pagebreak:{desc:"Oldalt\u00f6r\u00e9s besz\u00far\u00e1sa a nyomtat\u00e1shoz"},advlist:{types:"T\u00edpusok",def:"Alap\u00e9rtelmezett","lower_alpha":"Kisbet\u0171s abc","lower_greek":"Kisbet\u0171s g\u00f6r\u00f6g","lower_roman":"Kisbet\u0171s r\u00f3mai","upper_alpha":"Nagybet\u0171s ABC","upper_roman":"Nagybet\u0171s r\u00f3mai",circle:"Karika",disc:"P\u00f6tty",square:"N\u00e9gyzet"},colors:{"333300":"S\u00f6t\u00e9t ol\u00edv","993300":"\u00c9g\u0151 narancs","000000":"Fekete","003300":"S\u00f6t\u00e9t z\u00f6ld","003366":"S\u00f6t\u00e9t az\u00far","000080":"Tenger k\u00e9k","333399":"Indig\u00f3","333333":"Nagyon s\u00f6t\u00e9tsz\u00fcrke","800000":"Gesztenyebarna",FF6600:"Narancs","808000":"Ol\u00edv","008000":"Z\u00f6ld","008080":"P\u00e1vak\u00e9k","0000FF":"K\u00e9k","666699":"Sz\u00fcrk\u00e9s k\u00e9k","808080":"Sz\u00fcrke",FF0000:"V\u00f6r\u00f6s",FF9900:"Borosty\u00e1ns\u00e1rga","99CC00":"S\u00e1rg\u00e1s z\u00f6ld","339966":"Tengerz\u00f6ld","33CCCC":"T\u00fcrk\u00edz","3366FF":"Kir\u00e1lyk\u00e9k","800080":"B\u00edbor","999999":"K\u00f6z\u00e9psz\u00fcrke",FF00FF:"B\u00edborv\u00f6r\u00f6s",FFCC00:"Arany",FFFF00:"S\u00e1rga","00FF00":"Vil\u00e1gos borosty\u00e1n","00FFFF":"V\u00edz","00CCFF":"\u00c9gk\u00e9k","993366":"Barna",C0C0C0:"Ez\u00fcst",FF99CC:"R\u00f3zsasz\u00edn",FFCC99:"Barack",FFFF99:"Vil\u00e1gos s\u00e1rga",CCFFCC:"Halv\u00e1ny z\u00f6ld",CCFFFF:"Halv\u00e1ny ci\u00e1n","99CCFF":"Vil\u00e1gos \u00e9gk\u00e9k",CC99FF:"Szilvak\u00e9k",FFFFFF:"Feh\u00e9r"},aria:{"rich_text_area":"Rich Text mez\u0151"},wordcount:{words:"Szavak sz\u00e1ma: "}}}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/langs/ja.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/langs/ja.js
new file mode 100755
index 00000000..cdd5399a
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/langs/ja.js
@@ -0,0 +1 @@
+tinyMCE.addI18n({ja:{common:{"more_colors":"\u3055\u3089\u306b\u8272\u3092\u4f7f\u7528...","invalid_data":"\u30a8\u30e9\u30fc: \u5165\u529b\u306b\u8aa4\u308a\u304c\u3042\u308a\u307e\u3059\u3002\uff08\u8d64\u5b57\u306e\u9805\u76ee\uff09","popup_blocked":"\u7533\u3057\u8a33\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7\u8868\u793a\u3092\u8a31\u53ef\u3057\u3066\u3044\u306a\u3044\u305f\u3081\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u6a5f\u80fd\u3092\u63d0\u4f9b\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u3053\u306e\u30c4\u30fc\u30eb\u306e\u6a5f\u80fd\u3092\u5b8c\u5168\u306b\u6d3b\u7528\u3059\u308b\u306b\u306f\u3001\u3053\u306e\u30b5\u30a4\u30c8\u3067\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7\u3092\u8a31\u53ef\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002","clipboard_no_support":"\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u64cd\u4f5c\u306f\u5229\u7528\u3055\u308c\u3066\u3044\u308b\u30d6\u30e9\u30a6\u30b6\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u305b\u3093\u3002\u30ad\u30fc\u30dc\u30fc\u30c9\u306e\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u3092\u4ee3\u308f\u308a\u306b\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3044\u3002","clipboard_msg":"\u30b3\u30d4\u30fc/\u5207\u308a\u53d6\u308a/\u8cbc\u308a\u4ed8\u3051\u306fMozilla\u3068Firefox\u3067\u306f\u4f7f\u7528\u3067\u304d\u307e\u305b\u3093\u3002\n\u3053\u306e\u554f\u984c\u306e\u8a73\u7d30\u3092\u5f97\u305f\u3044\u3067\u3059\u304b?","not_set":"-- \u672a\u8a2d\u5b9a --","class_name":"\u30af\u30e9\u30b9",browse:"\u95b2\u89a7",close:"\u9589\u3058\u308b",cancel:"\u53d6\u308a\u6d88\u3057",update:"\u66f4\u65b0",insert:"\u633f\u5165",apply:"\u9069\u7528","edit_confirm":"\u3053\u306e\u30c6\u30ad\u30b9\u30c8\u30a8\u30ea\u30a2\u3092WYSIWYG\u30e2\u30fc\u30c9\u306b\u5207\u308a\u66ff\u3048\u307e\u3059\u304b\uff1f","invalid_data_number":"{#field} \u306f\u6570\u5024\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002","invalid_data_min":"{#field} \u306f{#min}\u3088\u308a\u3082\u5927\u304d\u306a\u6570\u5024\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002","invalid_data_size":"{#field}\u306f\u6570\u5024\u307e\u305f\u306f\u30d1\u30fc\u30bb\u30f3\u30c6\u30fc\u30b8\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002",value:"(\u5024)"},contextmenu:{full:"\u5747\u7b49\u5272\u4ed8",right:"\u53f3\u63c3\u3048",center:"\u4e2d\u592e\u63c3\u3048",left:"\u5de6\u63c3\u3048",align:"\u914d\u7f6e"},insertdatetime:{"day_short":"(\u65e5),(\u6708),(\u706b),(\u6c34),(\u6728),(\u91d1),(\u571f),(\u65e5)","day_long":"\u65e5\u66dc\u65e5,\u6708\u66dc\u65e5,\u706b\u66dc\u65e5,\u6c34\u66dc\u65e5,\u6728\u66dc\u65e5,\u91d1\u66dc\u65e5,\u571f\u66dc\u65e5,\u65e5\u66dc\u65e5","months_short":"1\u6708,2\u6708,3\u6708,4\u6708,5\u6708,6\u6708,7\u6708,8\u6708,9\u6708,10\u6708,11\u6708,12\u6708","months_long":"1,2,3,4,5,6,7,8,9,10,11,12","inserttime_desc":"\u6642\u523b\u3092\u633f\u5165","insertdate_desc":"\u65e5\u4ed8\u3092\u633f\u5165","time_fmt":"%H:%M:%S","date_fmt":"%Y-%m-%d"},print:{"print_desc":"\u5370\u5237"},preview:{"preview_desc":"\u30d7\u30ec\u30d3\u30e5\u30fc"},directionality:{"rtl_desc":"\u53f3\u304b\u3089\u5de6","ltr_desc":"\u5de6\u304b\u3089\u53f3"},layer:{content:"\u65b0\u3057\u3044\u30ec\u30a4\u30e4\u30fc...","absolute_desc":"\u7d76\u5bfe\u4f4d\u7f6e\u306e\u6307\u5b9a\u3092\u5207\u66ff","backward_desc":"\u80cc\u9762\u3078\u79fb\u52d5","forward_desc":"\u524d\u9762\u3078\u79fb\u52d5","insertlayer_desc":"\u65b0\u3057\u3044\u30ec\u30a4\u30e4\u30fc\u3092\u633f\u5165"},save:{"save_desc":"\u4fdd\u5b58","cancel_desc":"\u3059\u3079\u3066\u306e\u5909\u66f4\u3092\u53d6\u308a\u6d88\u3057"},nonbreaking:{"nonbreaking_desc":"\u6539\u884c\u3057\u306a\u3044\u30b9\u30da\u30fc\u30b9\u6587\u5b57(NBSP)\u3092\u633f\u5165"},iespell:{download:"ieSpell\u304c\u306a\u3044\u3088\u3046\u3067\u3059\u3002\u4eca\u3059\u3050\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u304b\uff1f","iespell_desc":"\u30b9\u30da\u30eb\u30c1\u30a7\u30c3\u30af"},advhr:{"advhr_desc":"\u6c34\u5e73\u7dda\u3092\u633f\u5165","delta_height":"","delta_width":""},emotions:{"emotions_desc":"\u8868\u60c5\u30a2\u30a4\u30b3\u30f3","delta_height":"","delta_width":""},searchreplace:{"replace_desc":"\u691c\u7d22\u3068\u7f6e\u63db","search_desc":"\u691c\u7d22","delta_width":"","delta_height":""},advimage:{"image_desc":"\u753b\u50cf\u306e\u633f\u5165\u3084\u7de8\u96c6","delta_width":"","delta_height":""},advlink:{"link_desc":"\u30ea\u30f3\u30af\u306e\u633f\u5165\u3084\u7de8\u96c6","delta_height":"","delta_width":""},xhtmlxtras:{"attribs_desc":"\u5c5e\u6027\u306e\u633f\u5165\u3084\u7de8\u96c6","ins_desc":"\u633f\u5165","del_desc":"\u524a\u9664","acronym_desc":"\u982d\u5b57\u8a9e","abbr_desc":"\u7565\u8a9e","cite_desc":"\u5f15\u7528","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{desc:"CSS\u306e\u7de8\u96c6","delta_height":"","delta_width":""},paste:{"plaintext_mode":"\u30c6\u30ad\u30b9\u30c8\u5f62\u5f0f\u306e\u30e2\u30fc\u30c9\u3067\u8cbc\u308a\u4ed8\u3051\u307e\u3059\u3002\u3082\u3046\u4e00\u5ea6\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001\u901a\u5e38\u306e\u8cbc\u308a\u4ed8\u3051\u306e\u30e2\u30fc\u30c9\u306b\u623b\u3057\u307e\u3059\u3002","plaintext_mode_sticky":"\u30c6\u30ad\u30b9\u30c8\u5f62\u5f0f\u306e\u30e2\u30fc\u30c9\u3067\u8cbc\u308a\u4ed8\u3051\u307e\u3059\u3002\u3082\u3046\u4e00\u5ea6\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001\u901a\u5e38\u306e\u8cbc\u308a\u4ed8\u3051\u306e\u30e2\u30fc\u30c9\u306b\u623b\u3057\u307e\u3059\u3002\u4f55\u304b\u8cbc\u308a\u4ed8\u3051\u308b\u3068\u3001\u305d\u306e\u5f8c\u306f\u901a\u5e38\u306e\u8cbc\u308a\u4ed8\u3051\u30e2\u30fc\u30c9\u306b\u623b\u308a\u307e\u3059\u3002","selectall_desc":"\u3059\u3079\u3066\u9078\u629e","paste_word_desc":"Word\u304b\u3089\u8cbc\u308a\u4ed8\u3051","paste_text_desc":"\u30c6\u30ad\u30b9\u30c8\u5f62\u5f0f\u3067\u8cbc\u308a\u4ed8\u3051"},"paste_dlg":{"word_title":"Ctrl V(\u30ad\u30fc\u30dc\u30fc\u30c9)\u3092\u4f7f\u7528\u3057\u3066\u3001\u30c6\u30ad\u30b9\u30c8\u3092\u30a6\u30a3\u30f3\u30c9\u30a6\u306b\u8cbc\u308a\u4ed8\u3051\u3066\u304f\u3060\u3055\u3044\u3002","text_linebreaks":"\u6539\u884c\u3092\u4fdd\u6301","text_title":"Ctrl V(\u30ad\u30fc\u30dc\u30fc\u30c9)\u3092\u4f7f\u7528\u3057\u3066\u3001\u30c6\u30ad\u30b9\u30c8\u3092\u30a6\u30a3\u30f3\u30c9\u30a6\u306b\u8cbc\u308a\u4ed8\u3051\u3066\u304f\u3060\u3055\u3044\u3002"},table:{cell:"\u30bb\u30eb",col:"\u5217",row:"\u884c",del:"\u8868\u3092\u524a\u9664","copy_row_desc":"\u884c\u3092\u30b3\u30d4\u30fc","cut_row_desc":"\u884c\u3092\u5207\u308a\u53d6\u308a","paste_row_after_desc":"\u4e0b\u306b\u884c\u3092\u8cbc\u308a\u4ed8\u3051","paste_row_before_desc":"\u4e0a\u306b\u884c\u3092\u8cbc\u308a\u4ed8\u3051","props_desc":"\u8868\u306e\u5c5e\u6027","cell_desc":"\u30bb\u30eb\u306e\u5c5e\u6027","row_desc":"\u884c\u306e\u5c5e\u6027","merge_cells_desc":"\u30bb\u30eb\u3092\u7d50\u5408","split_cells_desc":"\u30bb\u30eb\u306e\u7d50\u5408\u3092\u89e3\u9664","delete_col_desc":"\u5217\u3092\u524a\u9664","col_after_desc":"\u53f3\u306b\u5217\u3092\u633f\u5165","col_before_desc":"\u5de6\u306b\u5217\u3092\u633f\u5165","delete_row_desc":"\u884c\u3092\u524a\u9664","row_after_desc":"\u4e0b\u306b\u884c\u3092\u633f\u5165","row_before_desc":"\u4e0a\u306b\u884c\u3092\u633f\u5165",desc:"\u8868\u306e\u633f\u5165","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","cellprops_delta_width":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"warning_message":"\u4fdd\u5b58\u3057\u305f\u30c7\u30fc\u30bf\u3092\u5fa9\u5143\u3059\u308b\u3068\u3001\u73fe\u5728\u306e\u7de8\u96c6\u5185\u5bb9\u3092\u3059\u3079\u3066\u5931\u3044\u307e\u3059\u3002\n\n\u672c\u5f53\u306b\u4fdd\u5b58\u3057\u305f\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u8fbc\u307f\u307e\u3059\u304b?","restore_content":"\u81ea\u52d5\u4fdd\u5b58\u30c7\u30fc\u30bf\u3092\u5fa9\u5143","unload_msg":"\u4ed6\u306e\u30da\u30fc\u30b8\u306b\u79fb\u52d5\u3059\u308b\u3068\u3001\u5909\u66f4\u3092\u3059\u3079\u3066\u5931\u3044\u307e\u3059\u3002"},fullscreen:{desc:"\u5168\u753b\u9762"},media:{"delta_height":"",edit:"\u57cb\u3081\u8fbc\u307f\u30e1\u30c7\u30a3\u30a2\u306e\u7de8\u96c6",desc:"\u57cb\u3081\u8fbc\u307f\u30e1\u30c7\u30a3\u30a2\u306e\u633f\u5165\u3084\u7de8\u96c6","delta_width":""},fullpage:{desc:"\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u5c5e\u6027","delta_width":"","delta_height":""},template:{desc:"\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306e\u633f\u5165"},visualchars:{desc:"\u5236\u5fa1\u6587\u5b57\u306e\u8868\u793a\u3092\u5207\u308a\u66ff\u3048"},spellchecker:{desc:"\u30b9\u30da\u30eb\u30c1\u30a7\u30c3\u30af\u306e\u4f7f\u7528\u3092\u5207\u308a\u66ff\u3048",menu:"\u30b9\u30da\u30eb\u30c1\u30a7\u30c3\u30af\u306e\u8a2d\u5b9a","ignore_word":"\u3053\u306e\u5358\u8a9e\u3092\u7121\u8996","ignore_words":"\u3059\u3079\u3066\u7121\u8996",langs:"\u8a00\u8a9e",wait:"\u3057\u3070\u3089\u304f\u304a\u5f85\u3061\u304f\u3060\u3055\u3044...",sug:"\u5019\u88dc","no_sug":"\u5019\u88dc\u306a\u3057","no_mpell":"\u30b9\u30da\u30eb\u306e\u8aa4\u308a\u306f\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002","learn_word":"\u3053\u306e\u5358\u8a9e\u3092\u5b66\u7fd2"},pagebreak:{desc:"\u5370\u5237\u7528\u306e\u6539\u30da\u30fc\u30b8\u3092\u633f\u5165"},advlist:{types:"\u7a2e\u985e",def:"\u30c7\u30d5\u30a9\u30eb\u30c8","lower_alpha":"a b c ...","lower_greek":"\u03b1 \u03b2 \u03b3 \u2026","lower_roman":"i ii iii ...","upper_alpha":"A B C ...","upper_roman":"I II III ...",circle:"\u767d\u4e38\uff08circle\uff09",disc:"\u9ed2\u4e38\uff08disc\uff09",square:"\u56db\u89d2\uff08square\uff09"},colors:{"333300":"\u6fc3\u3044\u30aa\u30ea\u30fc\u30d6\u8272","993300":"\u6fc3\u3044\u30aa\u30ec\u30f3\u30b8\u8272","000000":"\u9ed2\u8272","003300":"\u6fc3\u3044\u7dd1\u8272","003366":"\u6fc3\u3044\u7fa4\u9752\u8272","000080":"\u6fc3\u7d3a\u8272","333399":"\u85cd\u8272","333333":"\u3068\u3066\u3082\u6fc3\u3044\u7070\u8272","800000":"\u6817\u8272",FF6600:"\u6a59\u8272","808000":"\u30aa\u30ea\u30fc\u30d6\u8272","008000":"\u7dd1\u8272","008080":"\u7dd1\u304c\u304b\u304b\u3063\u305f\u9752\u8272","0000FF":"\u9752\u8272","666699":"\u7d0d\u6238\u8272","808080":"\u7070\u8272",FF0000:"\u8d64",FF9900:"\u7425\u73c0\u8272","99CC00":"\u9ec4\u7dd1\u8272","339966":"\u6d77\u7dd1\u8272","33CCCC":"\u9752\u7dd1\u8272","3366FF":"\u85e4\u7d2b\u8272","800080":"\u7d2b\u8272","999999":"\u4e2d\u304f\u3089\u3044\u306e\u7070\u8272",FF00FF:"\u8d64\u7d2b\u8272",FFCC00:"\u91d1\u8272",FFFF00:"\u9ec4\u8272","00FF00":"\u30e9\u30a4\u30e0\u8272","00FFFF":"\u6c34\u8272","00CCFF":"\u7a7a\u8272","993366":"\u8336\u8272",C0C0C0:"\u9280\u8272",FF99CC:"\u30d4\u30f3\u30af\u8272",FFCC99:"\u6843\u8272",FFFF99:"\u8584\u3044\u9ec4\u8272",CCFFCC:"\u6de1\u7dd1\u8272",CCFFFF:"\u6de1\u9752\u7dd1\u8272","99CCFF":"\u8584\u3044\u6c34\u8272",CC99FF:"\u6fc3\u3044\u8d64\u7d2b\u8272",FFFFFF:"\u767d\u8272"},aria:{"rich_text_area":"\u30ea\u30c3\u30c1\u30c6\u30ad\u30b9\u30c8\u30a8\u30ea\u30a2"},wordcount:{words:"\u5358\u8a9e\u306e\u6570"}}}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/license.txt b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/license.txt
new file mode 100755
index 00000000..60d6d4c8
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/license.txt
@@ -0,0 +1,504 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the library's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
+
+
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advhr/css/advhr.css b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advhr/css/advhr.css
new file mode 100755
index 00000000..0e228349
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advhr/css/advhr.css
@@ -0,0 +1,5 @@
+input.radio {border:1px none #000; background:transparent; vertical-align:middle;}
+.panel_wrapper div.current {height:80px;}
+#width {width:50px; vertical-align:middle;}
+#width2 {width:50px; vertical-align:middle;}
+#size {width:100px;}
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advhr/editor_plugin.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advhr/editor_plugin.js
new file mode 100755
index 00000000..4d3b062d
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advhr/editor_plugin.js
@@ -0,0 +1 @@
+(function(){tinymce.create("tinymce.plugins.AdvancedHRPlugin",{init:function(a,b){a.addCommand("mceAdvancedHr",function(){a.windowManager.open({file:b+"/rule.htm",width:250+parseInt(a.getLang("advhr.delta_width",0)),height:160+parseInt(a.getLang("advhr.delta_height",0)),inline:1},{plugin_url:b})});a.addButton("advhr",{title:"advhr.advhr_desc",cmd:"mceAdvancedHr"});a.onNodeChange.add(function(d,c,e){c.setActive("advhr",e.nodeName=="HR")});a.onClick.add(function(c,d){d=d.target;if(d.nodeName==="HR"){c.selection.select(d)}})},getInfo:function(){return{longname:"Advanced HR",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advhr",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advhr",tinymce.plugins.AdvancedHRPlugin)})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advhr/editor_plugin_src.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advhr/editor_plugin_src.js
new file mode 100755
index 00000000..0c652d33
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advhr/editor_plugin_src.js
@@ -0,0 +1,57 @@
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+ tinymce.create('tinymce.plugins.AdvancedHRPlugin', {
+ init : function(ed, url) {
+ // Register commands
+ ed.addCommand('mceAdvancedHr', function() {
+ ed.windowManager.open({
+ file : url + '/rule.htm',
+ width : 250 + parseInt(ed.getLang('advhr.delta_width', 0)),
+ height : 160 + parseInt(ed.getLang('advhr.delta_height', 0)),
+ inline : 1
+ }, {
+ plugin_url : url
+ });
+ });
+
+ // Register buttons
+ ed.addButton('advhr', {
+ title : 'advhr.advhr_desc',
+ cmd : 'mceAdvancedHr'
+ });
+
+ ed.onNodeChange.add(function(ed, cm, n) {
+ cm.setActive('advhr', n.nodeName == 'HR');
+ });
+
+ ed.onClick.add(function(ed, e) {
+ e = e.target;
+
+ if (e.nodeName === 'HR')
+ ed.selection.select(e);
+ });
+ },
+
+ getInfo : function() {
+ return {
+ longname : 'Advanced HR',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advhr',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ };
+ }
+ });
+
+ // Register plugin
+ tinymce.PluginManager.add('advhr', tinymce.plugins.AdvancedHRPlugin);
+})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advhr/js/rule.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advhr/js/rule.js
new file mode 100644
index 00000000..b6cbd66c
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advhr/js/rule.js
@@ -0,0 +1,43 @@
+var AdvHRDialog = {
+ init : function(ed) {
+ var dom = ed.dom, f = document.forms[0], n = ed.selection.getNode(), w;
+
+ w = dom.getAttrib(n, 'width');
+ f.width.value = w ? parseInt(w) : (dom.getStyle('width') || '');
+ f.size.value = dom.getAttrib(n, 'size') || parseInt(dom.getStyle('height')) || '';
+ f.noshade.checked = !!dom.getAttrib(n, 'noshade') || !!dom.getStyle('border-width');
+ selectByValue(f, 'width2', w.indexOf('%') != -1 ? '%' : 'px');
+ },
+
+ update : function() {
+ var ed = tinyMCEPopup.editor, h, f = document.forms[0], st = '';
+
+ h = '<hr';
+
+ if (f.size.value) {
+ h += ' size="' + f.size.value + '"';
+ st += ' height:' + f.size.value + 'px;';
+ }
+
+ if (f.width.value) {
+ h += ' width="' + f.width.value + (f.width2.value == '%' ? '%' : '') + '"';
+ st += ' width:' + f.width.value + (f.width2.value == '%' ? '%' : 'px') + ';';
+ }
+
+ if (f.noshade.checked) {
+ h += ' noshade="noshade"';
+ st += ' border-width: 1px; border-style: solid; border-color: #CCCCCC; color: #ffffff;';
+ }
+
+ if (ed.settings.inline_styles)
+ h += ' style="' + tinymce.trim(st) + '"';
+
+ h += ' />';
+
+ ed.execCommand("mceInsertContent", false, h);
+ tinyMCEPopup.close();
+ }
+};
+
+tinyMCEPopup.requireLangPack();
+tinyMCEPopup.onInit.add(AdvHRDialog.init, AdvHRDialog);
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advhr/langs/de_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advhr/langs/de_dlg.js
new file mode 100644
index 00000000..7c5143e5
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advhr/langs/de_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('de.advhr_dlg',{size:"H\u00f6he",noshade:"Kein Schatten",width:"Breite",normal:"Normal",widthunits:"Einheiten"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advhr/langs/en_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advhr/langs/en_dlg.js
new file mode 100644
index 00000000..0c3bf15e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advhr/langs/en_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('en.advhr_dlg',{size:"Height",noshade:"No Shadow",width:"Width",normal:"Normal",widthunits:"Units"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advhr/langs/hu_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advhr/langs/hu_dlg.js
new file mode 100644
index 00000000..8dafd82e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advhr/langs/hu_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('hu.advhr_dlg',{size:"Magass\u00e1g",noshade:"Nincs \u00e1rny\u00e9k",width:"Sz\u00e9less\u00e9g",normal:"Norm\u00e1l",widthunits:"M\u00e9rt\u00e9kegys\u00e9gek"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advhr/langs/ja_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advhr/langs/ja_dlg.js
new file mode 100644
index 00000000..70adc8b5
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advhr/langs/ja_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('ja.advhr_dlg',{size:"\u9ad8\u3055",noshade:"\u5f71\u306a\u3057",width:"\u5e45",normal:"\u901a\u5e38",widthunits:"\u5358\u4f4d"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advhr/rule.htm b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advhr/rule.htm
new file mode 100755
index 00000000..843e1f8f
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advhr/rule.htm
@@ -0,0 +1,58 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>{#advhr.advhr_desc}</title>
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script type="text/javascript" src="js/rule.js"></script>
+ <script type="text/javascript" src="../../utils/mctabs.js"></script>
+ <script type="text/javascript" src="../../utils/form_utils.js"></script>
+ <link href="css/advhr.css" rel="stylesheet" type="text/css" />
+</head>
+<body role="application">
+<form onsubmit="AdvHRDialog.update();return false;" action="#">
+ <div class="tabs">
+ <ul>
+ <li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advhr.advhr_desc}</a></span></li>
+ </ul>
+ </div>
+
+ <div class="panel_wrapper">
+ <div id="general_panel" class="panel current">
+ <table role="presentation" border="0" cellpadding="4" cellspacing="0">
+ <tr role="group" aria-labelledby="width_label">
+ <td><label id="width_label" for="width">{#advhr_dlg.width}</label></td>
+ <td class="nowrap">
+ <input id="width" name="width" type="text" value="" class="mceFocus" />
+ <span style="display:none;" id="width_unit_label">{#advhr_dlg.widthunits}</span>
+ <select name="width2" id="width2" aria-labelledby="width_unit_label">
+ <option value="">px</option>
+ <option value="%">%</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td><label for="size">{#advhr_dlg.size}</label></td>
+ <td><select id="size" name="size">
+ <option value="">{#advhr_dlg.normal}</option>
+ <option value="1">1</option>
+ <option value="2">2</option>
+ <option value="3">3</option>
+ <option value="4">4</option>
+ <option value="5">5</option>
+ </select></td>
+ </tr>
+ <tr>
+ <td><label for="noshade">{#advhr_dlg.noshade}</label></td>
+ <td><input type="checkbox" name="noshade" id="noshade" class="radio" /></td>
+ </tr>
+ </table>
+ </div>
+ </div>
+
+ <div class="mceActionPanel">
+ <input type="submit" id="insert" name="insert" value="{#insert}" />
+ <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
+ </div>
+</form>
+</body>
+</html>
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advimage/css/advimage.css b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advimage/css/advimage.css
new file mode 100755
index 00000000..0a6251a6
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advimage/css/advimage.css
@@ -0,0 +1,13 @@
+#src_list, #over_list, #out_list {width:280px;}
+.mceActionPanel {margin-top:7px;}
+.alignPreview {border:1px solid #000; width:140px; height:140px; overflow:hidden; padding:5px;}
+.checkbox {border:0;}
+.panel_wrapper div.current {height:305px;}
+#prev {margin:0; border:1px solid #000; width:428px; height:150px; overflow:auto;}
+#align, #classlist {width:150px;}
+#width, #height {vertical-align:middle; width:50px; text-align:center;}
+#vspace, #hspace, #border {vertical-align:middle; width:30px; text-align:center;}
+#class_list {width:180px;}
+input {width: 280px;}
+#constrain, #onmousemovecheck {width:auto;}
+#id, #dir, #lang, #usemap, #longdesc {width:200px;}
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advimage/editor_plugin.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advimage/editor_plugin.js
new file mode 100755
index 00000000..d613a613
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advimage/editor_plugin.js
@@ -0,0 +1 @@
+(function(){tinymce.create("tinymce.plugins.AdvancedImagePlugin",{init:function(a,b){a.addCommand("mceAdvImage",function(){if(a.dom.getAttrib(a.selection.getNode(),"class","").indexOf("mceItem")!=-1){return}a.windowManager.open({file:b+"/image.htm",width:480+parseInt(a.getLang("advimage.delta_width",0)),height:385+parseInt(a.getLang("advimage.delta_height",0)),inline:1},{plugin_url:b})});a.addButton("image",{title:"advimage.image_desc",cmd:"mceAdvImage"})},getInfo:function(){return{longname:"Advanced image",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advimage",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advimage",tinymce.plugins.AdvancedImagePlugin)})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advimage/editor_plugin_src.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advimage/editor_plugin_src.js
new file mode 100755
index 00000000..d2678cbc
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advimage/editor_plugin_src.js
@@ -0,0 +1,50 @@
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+ tinymce.create('tinymce.plugins.AdvancedImagePlugin', {
+ init : function(ed, url) {
+ // Register commands
+ ed.addCommand('mceAdvImage', function() {
+ // Internal image object like a flash placeholder
+ if (ed.dom.getAttrib(ed.selection.getNode(), 'class', '').indexOf('mceItem') != -1)
+ return;
+
+ ed.windowManager.open({
+ file : url + '/image.htm',
+ width : 480 + parseInt(ed.getLang('advimage.delta_width', 0)),
+ height : 385 + parseInt(ed.getLang('advimage.delta_height', 0)),
+ inline : 1
+ }, {
+ plugin_url : url
+ });
+ });
+
+ // Register buttons
+ ed.addButton('image', {
+ title : 'advimage.image_desc',
+ cmd : 'mceAdvImage'
+ });
+ },
+
+ getInfo : function() {
+ return {
+ longname : 'Advanced image',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advimage',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ };
+ }
+ });
+
+ // Register plugin
+ tinymce.PluginManager.add('advimage', tinymce.plugins.AdvancedImagePlugin);
+})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advimage/image.htm b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advimage/image.htm
new file mode 100755
index 00000000..ed16b3d4
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advimage/image.htm
@@ -0,0 +1,235 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>{#advimage_dlg.dialog_title}</title>
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script type="text/javascript" src="../../utils/mctabs.js"></script>
+ <script type="text/javascript" src="../../utils/form_utils.js"></script>
+ <script type="text/javascript" src="../../utils/validate.js"></script>
+ <script type="text/javascript" src="../../utils/editable_selects.js"></script>
+ <script type="text/javascript" src="js/image.js"></script>
+ <link href="css/advimage.css" rel="stylesheet" type="text/css" />
+</head>
+<body id="advimage" style="display: none" role="application" aria-labelledby="app_title">
+ <span id="app_title" style="display:none">{#advimage_dlg.dialog_title}</span>
+ <form onsubmit="ImageDialog.insert();return false;" action="#">
+ <div class="tabs">
+ <ul>
+ <li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advimage_dlg.tab_general}</a></span></li>
+ <li id="appearance_tab" aria-controls="appearance_panel"><span><a href="javascript:mcTabs.displayTab('appearance_tab','appearance_panel');" onmousedown="return false;">{#advimage_dlg.tab_appearance}</a></span></li>
+ <li id="advanced_tab" aria-controls="advanced_panel"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#advimage_dlg.tab_advanced}</a></span></li>
+ </ul>
+ </div>
+
+ <div class="panel_wrapper">
+ <div id="general_panel" class="panel current">
+ <fieldset>
+ <legend>{#advimage_dlg.general}</legend>
+
+ <table role="presentation" class="properties">
+ <tr>
+ <td class="column1"><label id="srclabel" for="src">{#advimage_dlg.src}</label></td>
+ <td colspan="2"><table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input name="src" type="text" id="src" value="" class="mceFocus" onchange="ImageDialog.showPreviewImage(this.value);" aria-required="true" /></td>
+ <td id="srcbrowsercontainer">&nbsp;</td>
+ </tr>
+ </table></td>
+ </tr>
+ <tr>
+ <td><label for="src_list">{#advimage_dlg.image_list}</label></td>
+ <td><select id="src_list" name="src_list" onchange="document.getElementById('src').value=this.options[this.selectedIndex].value;document.getElementById('alt').value=this.options[this.selectedIndex].text;document.getElementById('title').value=this.options[this.selectedIndex].text;ImageDialog.showPreviewImage(this.options[this.selectedIndex].value);"><option value=""></option></select></td>
+ </tr>
+ <tr>
+ <td class="column1"><label id="altlabel" for="alt">{#advimage_dlg.alt}</label></td>
+ <td colspan="2"><input id="alt" name="alt" type="text" value="" /></td>
+ </tr>
+ <tr>
+ <td class="column1"><label id="titlelabel" for="title">{#advimage_dlg.title}</label></td>
+ <td colspan="2"><input id="title" name="title" type="text" value="" /></td>
+ </tr>
+ </table>
+ </fieldset>
+
+ <fieldset>
+ <legend>{#advimage_dlg.preview}</legend>
+ <div id="prev"></div>
+ </fieldset>
+ </div>
+
+ <div id="appearance_panel" class="panel">
+ <fieldset>
+ <legend>{#advimage_dlg.tab_appearance}</legend>
+
+ <table role="presentation" border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td class="column1"><label id="alignlabel" for="align">{#advimage_dlg.align}</label></td>
+ <td><select id="align" name="align" onchange="ImageDialog.updateStyle('align');ImageDialog.changeAppearance();">
+ <option value="">{#not_set}</option>
+ <option value="baseline">{#advimage_dlg.align_baseline}</option>
+ <option value="top">{#advimage_dlg.align_top}</option>
+ <option value="middle">{#advimage_dlg.align_middle}</option>
+ <option value="bottom">{#advimage_dlg.align_bottom}</option>
+ <option value="text-top">{#advimage_dlg.align_texttop}</option>
+ <option value="text-bottom">{#advimage_dlg.align_textbottom}</option>
+ <option value="left">{#advimage_dlg.align_left}</option>
+ <option value="right">{#advimage_dlg.align_right}</option>
+ </select>
+ </td>
+ <td rowspan="6" valign="top">
+ <div class="alignPreview">
+ <img id="alignSampleImg" src="img/sample.gif" alt="{#advimage_dlg.example_img}" />
+ Lorem ipsum, Dolor sit amet, consectetuer adipiscing loreum ipsum edipiscing elit, sed diam
+ nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.Loreum ipsum
+ edipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam
+ erat volutpat.
+ </div>
+ </td>
+ </tr>
+
+ <tr role="group" aria-labelledby="widthlabel">
+ <td class="column1"><label id="widthlabel" for="width">{#advimage_dlg.dimensions}</label></td>
+ <td class="nowrap">
+ <span style="display:none" id="width_voiceLabel">{#advimage_dlg.width}</span>
+ <input name="width" type="text" id="width" value="" size="5" maxlength="5" class="size" onchange="ImageDialog.changeHeight();" aria-labelledby="width_voiceLabel" /> x
+ <span style="display:none" id="height_voiceLabel">{#advimage_dlg.height}</span>
+ <input name="height" type="text" id="height" value="" size="5" maxlength="5" class="size" onchange="ImageDialog.changeWidth();" aria-labelledby="height_voiceLabel" /> px
+ </td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ <td><table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input id="constrain" type="checkbox" name="constrain" class="checkbox" /></td>
+ <td><label id="constrainlabel" for="constrain">{#advimage_dlg.constrain_proportions}</label></td>
+ </tr>
+ </table></td>
+ </tr>
+
+ <tr>
+ <td class="column1"><label id="vspacelabel" for="vspace">{#advimage_dlg.vspace}</label></td>
+ <td><input name="vspace" type="text" id="vspace" value="" size="3" maxlength="3" class="number" onchange="ImageDialog.updateStyle('vspace');ImageDialog.changeAppearance();" onblur="ImageDialog.updateStyle('vspace');ImageDialog.changeAppearance();" />
+ </td>
+ </tr>
+
+ <tr>
+ <td class="column1"><label id="hspacelabel" for="hspace">{#advimage_dlg.hspace}</label></td>
+ <td><input name="hspace" type="text" id="hspace" value="" size="3" maxlength="3" class="number" onchange="ImageDialog.updateStyle('hspace');ImageDialog.changeAppearance();" onblur="ImageDialog.updateStyle('hspace');ImageDialog.changeAppearance();" /></td>
+ </tr>
+
+ <tr>
+ <td class="column1"><label id="borderlabel" for="border">{#advimage_dlg.border}</label></td>
+ <td><input id="border" name="border" type="text" value="" size="3" maxlength="3" class="number" onchange="ImageDialog.updateStyle('border');ImageDialog.changeAppearance();" onblur="ImageDialog.updateStyle('border');ImageDialog.changeAppearance();" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="class_list">{#class_name}</label></td>
+ <td colspan="2"><select id="class_list" name="class_list" class="mceEditableSelect"><option value=""></option></select></td>
+ </tr>
+
+ <tr>
+ <td class="column1"><label id="stylelabel" for="style">{#advimage_dlg.style}</label></td>
+ <td colspan="2"><input id="style" name="style" type="text" value="" onchange="ImageDialog.changeAppearance();" /></td>
+ </tr>
+
+ <!-- <tr>
+ <td class="column1"><label id="classeslabel" for="classes">{#advimage_dlg.classes}</label></td>
+ <td colspan="2"><input id="classes" name="classes" type="text" value="" onchange="selectByValue(this.form,'classlist',this.value,true);" /></td>
+ </tr> -->
+ </table>
+ </fieldset>
+ </div>
+
+ <div id="advanced_panel" class="panel">
+ <fieldset>
+ <legend>{#advimage_dlg.swap_image}</legend>
+
+ <input type="checkbox" id="onmousemovecheck" name="onmousemovecheck" class="checkbox" onclick="ImageDialog.setSwapImage(this.checked);" aria-controls="onmouseoversrc onmouseoutsrc" />
+ <label id="onmousemovechecklabel" for="onmousemovecheck">{#advimage_dlg.alt_image}</label>
+
+ <table role="presentation" border="0" cellpadding="4" cellspacing="0" width="100%">
+ <tr>
+ <td class="column1"><label id="onmouseoversrclabel" for="onmouseoversrc">{#advimage_dlg.mouseover}</label></td>
+ <td><table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input id="onmouseoversrc" name="onmouseoversrc" type="text" value="" /></td>
+ <td id="onmouseoversrccontainer">&nbsp;</td>
+ </tr>
+ </table></td>
+ </tr>
+ <tr>
+ <td><label for="over_list">{#advimage_dlg.image_list}</label></td>
+ <td><select id="over_list" name="over_list" onchange="document.getElementById('onmouseoversrc').value=this.options[this.selectedIndex].value;"><option value=""></option></select></td>
+ </tr>
+ <tr>
+ <td class="column1"><label id="onmouseoutsrclabel" for="onmouseoutsrc">{#advimage_dlg.mouseout}</label></td>
+ <td class="column2"><table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input id="onmouseoutsrc" name="onmouseoutsrc" type="text" value="" /></td>
+ <td id="onmouseoutsrccontainer">&nbsp;</td>
+ </tr>
+ </table></td>
+ </tr>
+ <tr>
+ <td><label for="out_list">{#advimage_dlg.image_list}</label></td>
+ <td><select id="out_list" name="out_list" onchange="document.getElementById('onmouseoutsrc').value=this.options[this.selectedIndex].value;"><option value=""></option></select></td>
+ </tr>
+ </table>
+ </fieldset>
+
+ <fieldset>
+ <legend>{#advimage_dlg.misc}</legend>
+
+ <table role="presentation" border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td class="column1"><label id="idlabel" for="id">{#advimage_dlg.id}</label></td>
+ <td><input id="id" name="id" type="text" value="" /></td>
+ </tr>
+
+ <tr>
+ <td class="column1"><label id="dirlabel" for="dir">{#advimage_dlg.langdir}</label></td>
+ <td>
+ <select id="dir" name="dir" onchange="ImageDialog.changeAppearance();">
+ <option value="">{#not_set}</option>
+ <option value="ltr">{#advimage_dlg.ltr}</option>
+ <option value="rtl">{#advimage_dlg.rtl}</option>
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="column1"><label id="langlabel" for="lang">{#advimage_dlg.langcode}</label></td>
+ <td>
+ <input id="lang" name="lang" type="text" value="" />
+ </td>
+ </tr>
+
+ <tr>
+ <td class="column1"><label id="usemaplabel" for="usemap">{#advimage_dlg.map}</label></td>
+ <td>
+ <input id="usemap" name="usemap" type="text" value="" />
+ </td>
+ </tr>
+
+ <tr>
+ <td class="column1"><label id="longdesclabel" for="longdesc">{#advimage_dlg.long_desc}</label></td>
+ <td><table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input id="longdesc" name="longdesc" type="text" value="" /></td>
+ <td id="longdesccontainer">&nbsp;</td>
+ </tr>
+ </table></td>
+ </tr>
+ </table>
+ </fieldset>
+ </div>
+ </div>
+
+ <div class="mceActionPanel">
+ <input type="submit" id="insert" name="insert" value="{#insert}" />
+ <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
+ </div>
+ </form>
+</body>
+</html>
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advimage/img/sample.gif b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advimage/img/sample.gif
new file mode 100644
index 00000000..53bf6890
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advimage/img/sample.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advimage/js/image.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advimage/js/image.js
new file mode 100644
index 00000000..f0b7c6ee
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advimage/js/image.js
@@ -0,0 +1,464 @@
+var ImageDialog = {
+ preInit : function() {
+ var url;
+
+ tinyMCEPopup.requireLangPack();
+
+ if (url = tinyMCEPopup.getParam("external_image_list_url"))
+ document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
+ },
+
+ init : function(ed) {
+ var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, dom = ed.dom, n = ed.selection.getNode(), fl = tinyMCEPopup.getParam('external_image_list', 'tinyMCEImageList');
+
+ tinyMCEPopup.resizeToInnerSize();
+ this.fillClassList('class_list');
+ this.fillFileList('src_list', fl);
+ this.fillFileList('over_list', fl);
+ this.fillFileList('out_list', fl);
+ TinyMCE_EditableSelects.init();
+
+ if (n.nodeName == 'IMG') {
+ nl.src.value = dom.getAttrib(n, 'src');
+ nl.width.value = dom.getAttrib(n, 'width');
+ nl.height.value = dom.getAttrib(n, 'height');
+ nl.alt.value = dom.getAttrib(n, 'alt');
+ nl.title.value = dom.getAttrib(n, 'title');
+ nl.vspace.value = this.getAttrib(n, 'vspace');
+ nl.hspace.value = this.getAttrib(n, 'hspace');
+ nl.border.value = this.getAttrib(n, 'border');
+ selectByValue(f, 'align', this.getAttrib(n, 'align'));
+ selectByValue(f, 'class_list', dom.getAttrib(n, 'class'), true, true);
+ nl.style.value = dom.getAttrib(n, 'style');
+ nl.id.value = dom.getAttrib(n, 'id');
+ nl.dir.value = dom.getAttrib(n, 'dir');
+ nl.lang.value = dom.getAttrib(n, 'lang');
+ nl.usemap.value = dom.getAttrib(n, 'usemap');
+ nl.longdesc.value = dom.getAttrib(n, 'longdesc');
+ nl.insert.value = ed.getLang('update');
+
+ if (/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/.test(dom.getAttrib(n, 'onmouseover')))
+ nl.onmouseoversrc.value = dom.getAttrib(n, 'onmouseover').replace(/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/, '$1');
+
+ if (/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/.test(dom.getAttrib(n, 'onmouseout')))
+ nl.onmouseoutsrc.value = dom.getAttrib(n, 'onmouseout').replace(/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/, '$1');
+
+ if (ed.settings.inline_styles) {
+ // Move attribs to styles
+ if (dom.getAttrib(n, 'align'))
+ this.updateStyle('align');
+
+ if (dom.getAttrib(n, 'hspace'))
+ this.updateStyle('hspace');
+
+ if (dom.getAttrib(n, 'border'))
+ this.updateStyle('border');
+
+ if (dom.getAttrib(n, 'vspace'))
+ this.updateStyle('vspace');
+ }
+ }
+
+ // Setup browse button
+ document.getElementById('srcbrowsercontainer').innerHTML = getBrowserHTML('srcbrowser','src','image','theme_advanced_image');
+ if (isVisible('srcbrowser'))
+ document.getElementById('src').style.width = '260px';
+
+ // Setup browse button
+ document.getElementById('onmouseoversrccontainer').innerHTML = getBrowserHTML('overbrowser','onmouseoversrc','image','theme_advanced_image');
+ if (isVisible('overbrowser'))
+ document.getElementById('onmouseoversrc').style.width = '260px';
+
+ // Setup browse button
+ document.getElementById('onmouseoutsrccontainer').innerHTML = getBrowserHTML('outbrowser','onmouseoutsrc','image','theme_advanced_image');
+ if (isVisible('outbrowser'))
+ document.getElementById('onmouseoutsrc').style.width = '260px';
+
+ // If option enabled default contrain proportions to checked
+ if (ed.getParam("advimage_constrain_proportions", true))
+ f.constrain.checked = true;
+
+ // Check swap image if valid data
+ if (nl.onmouseoversrc.value || nl.onmouseoutsrc.value)
+ this.setSwapImage(true);
+ else
+ this.setSwapImage(false);
+
+ this.changeAppearance();
+ this.showPreviewImage(nl.src.value, 1);
+ },
+
+ insert : function(file, title) {
+ var ed = tinyMCEPopup.editor, t = this, f = document.forms[0];
+
+ if (f.src.value === '') {
+ if (ed.selection.getNode().nodeName == 'IMG') {
+ ed.dom.remove(ed.selection.getNode());
+ ed.execCommand('mceRepaint');
+ }
+
+ tinyMCEPopup.close();
+ return;
+ }
+
+ if (tinyMCEPopup.getParam("accessibility_warnings", 1)) {
+ if (!f.alt.value) {
+ tinyMCEPopup.confirm(tinyMCEPopup.getLang('advimage_dlg.missing_alt'), function(s) {
+ if (s)
+ t.insertAndClose();
+ });
+
+ return;
+ }
+ }
+
+ t.insertAndClose();
+ },
+
+ insertAndClose : function() {
+ var ed = tinyMCEPopup.editor, f = document.forms[0], nl = f.elements, v, args = {}, el;
+
+ tinyMCEPopup.restoreSelection();
+
+ // Fixes crash in Safari
+ if (tinymce.isWebKit)
+ ed.getWin().focus();
+
+ if (!ed.settings.inline_styles) {
+ args = {
+ vspace : nl.vspace.value,
+ hspace : nl.hspace.value,
+ border : nl.border.value,
+ align : getSelectValue(f, 'align')
+ };
+ } else {
+ // Remove deprecated values
+ args = {
+ vspace : '',
+ hspace : '',
+ border : '',
+ align : ''
+ };
+ }
+
+ tinymce.extend(args, {
+ src : nl.src.value.replace(/ /g, '%20'),
+ width : nl.width.value,
+ height : nl.height.value,
+ alt : nl.alt.value,
+ title : nl.title.value,
+ 'class' : getSelectValue(f, 'class_list'),
+ style : nl.style.value,
+ id : nl.id.value,
+ dir : nl.dir.value,
+ lang : nl.lang.value,
+ usemap : nl.usemap.value,
+ longdesc : nl.longdesc.value
+ });
+
+ args.onmouseover = args.onmouseout = '';
+
+ if (f.onmousemovecheck.checked) {
+ if (nl.onmouseoversrc.value)
+ args.onmouseover = "this.src='" + nl.onmouseoversrc.value + "';";
+
+ if (nl.onmouseoutsrc.value)
+ args.onmouseout = "this.src='" + nl.onmouseoutsrc.value + "';";
+ }
+
+ el = ed.selection.getNode();
+
+ if (el && el.nodeName == 'IMG') {
+ ed.dom.setAttribs(el, args);
+ } else {
+ tinymce.each(args, function(value, name) {
+ if (value === "") {
+ delete args[name];
+ }
+ });
+
+ ed.execCommand('mceInsertContent', false, tinyMCEPopup.editor.dom.createHTML('img', args), {skip_undo : 1});
+ ed.undoManager.add();
+ }
+
+ tinyMCEPopup.editor.execCommand('mceRepaint');
+ tinyMCEPopup.editor.focus();
+ tinyMCEPopup.close();
+ },
+
+ getAttrib : function(e, at) {
+ var ed = tinyMCEPopup.editor, dom = ed.dom, v, v2;
+
+ if (ed.settings.inline_styles) {
+ switch (at) {
+ case 'align':
+ if (v = dom.getStyle(e, 'float'))
+ return v;
+
+ if (v = dom.getStyle(e, 'vertical-align'))
+ return v;
+
+ break;
+
+ case 'hspace':
+ v = dom.getStyle(e, 'margin-left')
+ v2 = dom.getStyle(e, 'margin-right');
+
+ if (v && v == v2)
+ return parseInt(v.replace(/[^0-9]/g, ''));
+
+ break;
+
+ case 'vspace':
+ v = dom.getStyle(e, 'margin-top')
+ v2 = dom.getStyle(e, 'margin-bottom');
+ if (v && v == v2)
+ return parseInt(v.replace(/[^0-9]/g, ''));
+
+ break;
+
+ case 'border':
+ v = 0;
+
+ tinymce.each(['top', 'right', 'bottom', 'left'], function(sv) {
+ sv = dom.getStyle(e, 'border-' + sv + '-width');
+
+ // False or not the same as prev
+ if (!sv || (sv != v && v !== 0)) {
+ v = 0;
+ return false;
+ }
+
+ if (sv)
+ v = sv;
+ });
+
+ if (v)
+ return parseInt(v.replace(/[^0-9]/g, ''));
+
+ break;
+ }
+ }
+
+ if (v = dom.getAttrib(e, at))
+ return v;
+
+ return '';
+ },
+
+ setSwapImage : function(st) {
+ var f = document.forms[0];
+
+ f.onmousemovecheck.checked = st;
+ setBrowserDisabled('overbrowser', !st);
+ setBrowserDisabled('outbrowser', !st);
+
+ if (f.over_list)
+ f.over_list.disabled = !st;
+
+ if (f.out_list)
+ f.out_list.disabled = !st;
+
+ f.onmouseoversrc.disabled = !st;
+ f.onmouseoutsrc.disabled = !st;
+ },
+
+ fillClassList : function(id) {
+ var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
+
+ if (v = tinyMCEPopup.getParam('theme_advanced_styles')) {
+ cl = [];
+
+ tinymce.each(v.split(';'), function(v) {
+ var p = v.split('=');
+
+ cl.push({'title' : p[0], 'class' : p[1]});
+ });
+ } else
+ cl = tinyMCEPopup.editor.dom.getClasses();
+
+ if (cl.length > 0) {
+ lst.options.length = 0;
+ lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), '');
+
+ tinymce.each(cl, function(o) {
+ lst.options[lst.options.length] = new Option(o.title || o['class'], o['class']);
+ });
+ } else
+ dom.remove(dom.getParent(id, 'tr'));
+ },
+
+ fillFileList : function(id, l) {
+ var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
+
+ l = typeof(l) === 'function' ? l() : window[l];
+ lst.options.length = 0;
+
+ if (l && l.length > 0) {
+ lst.options[lst.options.length] = new Option('', '');
+
+ tinymce.each(l, function(o) {
+ lst.options[lst.options.length] = new Option(o[0], o[1]);
+ });
+ } else
+ dom.remove(dom.getParent(id, 'tr'));
+ },
+
+ resetImageData : function() {
+ var f = document.forms[0];
+
+ f.elements.width.value = f.elements.height.value = '';
+ },
+
+ updateImageData : function(img, st) {
+ var f = document.forms[0];
+
+ if (!st) {
+ f.elements.width.value = img.width;
+ f.elements.height.value = img.height;
+ }
+
+ this.preloadImg = img;
+ },
+
+ changeAppearance : function() {
+ var ed = tinyMCEPopup.editor, f = document.forms[0], img = document.getElementById('alignSampleImg');
+
+ if (img) {
+ if (ed.getParam('inline_styles')) {
+ ed.dom.setAttrib(img, 'style', f.style.value);
+ } else {
+ img.align = f.align.value;
+ img.border = f.border.value;
+ img.hspace = f.hspace.value;
+ img.vspace = f.vspace.value;
+ }
+ }
+ },
+
+ changeHeight : function() {
+ var f = document.forms[0], tp, t = this;
+
+ if (!f.constrain.checked || !t.preloadImg) {
+ return;
+ }
+
+ if (f.width.value == "" || f.height.value == "")
+ return;
+
+ tp = (parseInt(f.width.value) / parseInt(t.preloadImg.width)) * t.preloadImg.height;
+ f.height.value = tp.toFixed(0);
+ },
+
+ changeWidth : function() {
+ var f = document.forms[0], tp, t = this;
+
+ if (!f.constrain.checked || !t.preloadImg) {
+ return;
+ }
+
+ if (f.width.value == "" || f.height.value == "")
+ return;
+
+ tp = (parseInt(f.height.value) / parseInt(t.preloadImg.height)) * t.preloadImg.width;
+ f.width.value = tp.toFixed(0);
+ },
+
+ updateStyle : function(ty) {
+ var dom = tinyMCEPopup.dom, b, bStyle, bColor, v, isIE = tinymce.isIE, f = document.forms[0], img = dom.create('img', {style : dom.get('style').value});
+
+ if (tinyMCEPopup.editor.settings.inline_styles) {
+ // Handle align
+ if (ty == 'align') {
+ dom.setStyle(img, 'float', '');
+ dom.setStyle(img, 'vertical-align', '');
+
+ v = getSelectValue(f, 'align');
+ if (v) {
+ if (v == 'left' || v == 'right')
+ dom.setStyle(img, 'float', v);
+ else
+ img.style.verticalAlign = v;
+ }
+ }
+
+ // Handle border
+ if (ty == 'border') {
+ b = img.style.border ? img.style.border.split(' ') : [];
+ bStyle = dom.getStyle(img, 'border-style');
+ bColor = dom.getStyle(img, 'border-color');
+
+ dom.setStyle(img, 'border', '');
+
+ v = f.border.value;
+ if (v || v == '0') {
+ if (v == '0')
+ img.style.border = isIE ? '0' : '0 none none';
+ else {
+ var isOldIE = tinymce.isIE && (!document.documentMode || document.documentMode < 9);
+
+ if (b.length == 3 && b[isOldIE ? 2 : 1])
+ bStyle = b[isOldIE ? 2 : 1];
+ else if (!bStyle || bStyle == 'none')
+ bStyle = 'solid';
+ if (b.length == 3 && b[isIE ? 0 : 2])
+ bColor = b[isOldIE ? 0 : 2];
+ else if (!bColor || bColor == 'none')
+ bColor = 'black';
+ img.style.border = v + 'px ' + bStyle + ' ' + bColor;
+ }
+ }
+ }
+
+ // Handle hspace
+ if (ty == 'hspace') {
+ dom.setStyle(img, 'marginLeft', '');
+ dom.setStyle(img, 'marginRight', '');
+
+ v = f.hspace.value;
+ if (v) {
+ img.style.marginLeft = v + 'px';
+ img.style.marginRight = v + 'px';
+ }
+ }
+
+ // Handle vspace
+ if (ty == 'vspace') {
+ dom.setStyle(img, 'marginTop', '');
+ dom.setStyle(img, 'marginBottom', '');
+
+ v = f.vspace.value;
+ if (v) {
+ img.style.marginTop = v + 'px';
+ img.style.marginBottom = v + 'px';
+ }
+ }
+
+ // Merge
+ dom.get('style').value = dom.serializeStyle(dom.parseStyle(img.style.cssText), 'img');
+ }
+ },
+
+ changeMouseMove : function() {
+ },
+
+ showPreviewImage : function(u, st) {
+ if (!u) {
+ tinyMCEPopup.dom.setHTML('prev', '');
+ return;
+ }
+
+ if (!st && tinyMCEPopup.getParam("advimage_update_dimensions_onchange", true))
+ this.resetImageData();
+
+ u = tinyMCEPopup.editor.documentBaseURI.toAbsolute(u);
+
+ if (!st)
+ tinyMCEPopup.dom.setHTML('prev', '<img id="previewImg" src="' + u + '" border="0" onload="ImageDialog.updateImageData(this);" onerror="ImageDialog.resetImageData();" />');
+ else
+ tinyMCEPopup.dom.setHTML('prev', '<img id="previewImg" src="' + u + '" border="0" onload="ImageDialog.updateImageData(this, 1);" />');
+ }
+};
+
+ImageDialog.preInit();
+tinyMCEPopup.onInit.add(ImageDialog.init, ImageDialog);
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advimage/langs/de_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advimage/langs/de_dlg.js
new file mode 100644
index 00000000..c5ea891a
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advimage/langs/de_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('de.advimage_dlg',{"image_list":"Bilderliste","align_right":"Rechts","align_left":"Links","align_textbottom":"Unten im Text","align_texttop":"Oben im Text","align_bottom":"Unten","align_middle":"Mittig","align_top":"Oben","align_baseline":"Zeile",align:"Ausrichtung",hspace:"Horizontaler Abstand",vspace:"Vertikaler Abstand",dimensions:"Ausma\u00dfe",border:"Rahmen",list:"Bilderliste",alt:"Beschreibung",src:"Adresse","dialog_title":"Bild einf\u00fcgen/ver\u00e4ndern","missing_alt":"Soll wirklich keine Beschreibung f\u00fcr das Bild eingegeben werden? Bestimmte Benutzer mit k\u00f6rperlichen Einschr\u00e4nkungen k\u00f6nnen so nicht darauf zugreifen, ebenso solche, die einen Textbrowser benutzen oder die Anzeige von Bildern deaktiviert haben.","example_img":"Vorschau auf das Aussehen",misc:"Verschiedenes",mouseout:"bei keinem Mauskontakt",mouseover:"bei Mauskontakt","alt_image":"Alternatives Bild","swap_image":"Bild austauschen",map:"Image-Map",id:"ID",rtl:"Rechts nach links",ltr:"Links nach rechts",classes:"Klassen",style:"Format","long_desc":"Ausf\u00fchrliche Beschreibung",langcode:"Sprachcode",langdir:"Schriftrichtung","constrain_proportions":"Seitenverh\u00e4ltnis beibehalten",preview:"Vorschau",title:"Titel",general:"Allgemein","tab_advanced":"Erweitert","tab_appearance":"Aussehen","tab_general":"Allgemein",width:"Breite",height:"H\u00f6he"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advimage/langs/en_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advimage/langs/en_dlg.js
new file mode 100644
index 00000000..5f122e2c
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advimage/langs/en_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('en.advimage_dlg',{"image_list":"Image List","align_right":"Right","align_left":"Left","align_textbottom":"Text Bottom","align_texttop":"Text Top","align_bottom":"Bottom","align_middle":"Middle","align_top":"Top","align_baseline":"Baseline",align:"Alignment",hspace:"Horizontal Space",vspace:"Vertical Space",dimensions:"Dimensions",border:"Border",list:"Image List",alt:"Image Description",src:"Image URL","dialog_title":"Insert/Edit Image","missing_alt":"Are you sure you want to continue without including an Image Description? Without it the image may not be accessible to some users with disabilities, or to those using a text browser, or browsing the Web with images turned off.","example_img":"Appearance Preview Image",misc:"Miscellaneous",mouseout:"For Mouse Out",mouseover:"For Mouse Over","alt_image":"Alternative Image","swap_image":"Swap Image",map:"Image Map",id:"ID",rtl:"Right to Left",ltr:"Left to Right",classes:"Classes",style:"Style","long_desc":"Long Description Link",langcode:"Language Code",langdir:"Language Direction","constrain_proportions":"Constrain Proportions",preview:"Preview",title:"Title",general:"General","tab_advanced":"Advanced","tab_appearance":"Appearance","tab_general":"General",width:"Width",height:"Height"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advimage/langs/hu_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advimage/langs/hu_dlg.js
new file mode 100644
index 00000000..37c93464
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advimage/langs/hu_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('hu.advimage_dlg',{"image_list":"K\u00e9plista","align_right":"Jobbra","align_left":"Balra","align_textbottom":"Sz\u00f6veg alj\u00e1hoz","align_texttop":"Sz\u00f6veg tetej\u00e9hez","align_bottom":"Lentre","align_middle":"K\u00f6z\u00e9pre","align_top":"Fentre","align_baseline":"Alapvonalhoz",align:"Igaz\u00edt\u00e1s",hspace:"V\u00edzszintes t\u00e1vols\u00e1g",vspace:"F\u00fcgg\u0151leges t\u00e1vols\u00e1g",dimensions:"M\u00e9retek",border:"Keret",list:"K\u00e9plista",alt:"K\u00e9p helyettes\u00edt\u0151 sz\u00f6vege",src:"K\u00e9p internet c\u00edme","dialog_title":"K\u00e9p besz\u00far\u00e1sa/szerkeszt\u00e9se","missing_alt":"Biztosan folytatja k\u00e9pet le\u00edr\u00f3 sz\u00f6veg n\u00e9lk\u00fcl? En\u00e9lk\u00fcl a fogyat\u00e9koss\u00e1ggal \u00e9l\u0151k, sz\u00f6veges b\u00f6ng\u00e9sz\u0151t haszn\u00e1l\u00f3k \u00e9s a k\u00e9pek megjelen\u00edt\u00e9s\u00e9t letilt\u00f3 felhaszn\u00e1l\u00f3k h\u00e1tr\u00e1nyba ker\u00fclnek.","example_img":"El\u0151n\u00e9zeti k\u00e9p megjelen\u00edt\u00e9se",misc:"Vegyes",mouseout:"K\u00e9p az eg\u00e9rkurzor lev\u00e9telekor",mouseover:"K\u00e9p az eg\u00e9rkurzor f\u00f6l\u00e9vitelekor","alt_image":"Alternat\u00edv k\u00e9p","swap_image":"K\u00e9pcsere",map:"K\u00e9p t\u00e9rk\u00e9p",id:"ID",rtl:"Jobbr\u00f3l balra",ltr:"Balr\u00f3l jobbra",classes:"Oszt\u00e1lyok",style:"CSS St\u00edlus","long_desc":"B\u0151vebb le\u00edr\u00e1s\u00fa link",langcode:"Nyelv k\u00f3d",langdir:"Nyelv \u00edr\u00e1s ir\u00e1ny","constrain_proportions":"Ar\u00e1nytart\u00e1s",preview:"El\u0151n\u00e9zet",title:"C\u00edm",general:"\u00c1ltal\u00e1nos","tab_advanced":"Halad\u00f3","tab_appearance":"Megjelen\u00e9s","tab_general":"\u00c1ltal\u00e1nos",width:"Sz\u00e9less\u00e9g",height:"Magass\u00e1g"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advimage/langs/ja_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advimage/langs/ja_dlg.js
new file mode 100644
index 00000000..f8449c42
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advimage/langs/ja_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('ja.advimage_dlg',{"image_list":"\u753b\u50cf\u306e\u4e00\u89a7","align_right":"\u53f3\u5bc4\u305b","align_left":"\u5de6\u5bc4\u305b","align_textbottom":"\u30c6\u30ad\u30b9\u30c8\u3092\u4e0b\u7aef\u63c3\u3048","align_texttop":"\u30c6\u30ad\u30b9\u30c8\u3092\u4e0a\u7aef\u63c3\u3048","align_bottom":"\u4e0b\u63c3\u3048","align_middle":"\u4e2d\u592e\u63c3\u3048","align_top":"\u4e0a\u63c3\u3048","align_baseline":"\u30d9\u30fc\u30b9\u30e9\u30a4\u30f3\u63c3\u3048",align:"\u914d\u7f6e",hspace:"\u5de6\u53f3\u306e\u4f59\u767d",vspace:"\u4e0a\u4e0b\u306e\u4f59\u767d",dimensions:"\u5bf8\u6cd5",border:"\u67a0\u7dda",list:"\u753b\u50cf\u306e\u4e00\u89a7",alt:"\u753b\u50cf\u306e\u8aac\u660e",src:"\u753b\u50cf\u306eURL","dialog_title":"\u753b\u50cf\u3092\u633f\u5165/\u7de8\u96c6","missing_alt":"\u753b\u50cf\u306e\u8aac\u660e\u3092\u542b\u3081\u305a\u306b\u7d9a\u3051\u307e\u3059\u304b? \u753b\u50cf\u306e\u8aac\u660e\u304c\u306a\u3044\u3068\u76ee\u306e\u4e0d\u81ea\u7531\u306a\u65b9\u3001\u30c6\u30ad\u30b9\u30c8\u8868\u793a\u3060\u3051\u306e\u30d6\u30e9\u30a6\u30b6\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u65b9\u3001\u753b\u50cf\u306e\u8868\u793a\u3092\u6b62\u3081\u3066\u308b\u65b9\u304c\u30a2\u30af\u30bb\u30b9\u3067\u304d\u306a\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002","example_img":"\u753b\u50cf\u306e\u30d7\u30ec\u30d3\u30e5\u30fc\u306e\u69d8\u5b50",misc:"\u305d\u306e\u4ed6",mouseout:"\u30de\u30a6\u30b9\u30ab\u30fc\u30bd\u30eb\u304c\u5916\u308c\u308b\u6642",mouseover:"\u30de\u30a6\u30b9\u30ab\u30fc\u30bd\u30eb\u304c\u304b\u304b\u308b\u6642","alt_image":"\u5225\u306e\u753b\u50cf","swap_image":"\u753b\u50cf\u306e\u5165\u308c\u66ff\u3048",map:"\u30a4\u30e1\u30fc\u30b8\u30de\u30c3\u30d7",id:"ID",rtl:"\u53f3\u304b\u3089\u5de6",ltr:"\u5de6\u304b\u3089\u53f3",classes:"\u30af\u30e9\u30b9",style:"\u30b9\u30bf\u30a4\u30eb","long_desc":"\u8a73\u7d30\u306a\u8aac\u660e\u306e\u30ea\u30f3\u30af",langcode:"\u8a00\u8a9e\u30b3\u30fc\u30c9",langdir:"\u6587\u7ae0\u306e\u65b9\u5411","constrain_proportions":"\u7e26\u6a2a\u6bd4\u306e\u7dad\u6301",preview:"\u30d7\u30ec\u30d3\u30e5\u30fc",title:"\u30bf\u30a4\u30c8\u30eb",general:"\u4e00\u822c","tab_advanced":"\u9ad8\u5ea6\u306a\u8a2d\u5b9a","tab_appearance":"\u8868\u793a","tab_general":"\u4e00\u822c",width:"\u5e45",height:"\u9ad8\u3055"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlink/css/advlink.css b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlink/css/advlink.css
new file mode 100755
index 00000000..14364316
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlink/css/advlink.css
@@ -0,0 +1,8 @@
+.mceLinkList, .mceAnchorList, #targetlist {width:280px;}
+.mceActionPanel {margin-top:7px;}
+.panel_wrapper div.current {height:320px;}
+#classlist, #title, #href {width:280px;}
+#popupurl, #popupname {width:200px;}
+#popupwidth, #popupheight, #popupleft, #popuptop {width:30px;vertical-align:middle;text-align:center;}
+#id, #style, #classes, #target, #dir, #hreflang, #lang, #charset, #type, #rel, #rev, #tabindex, #accesskey {width:200px;}
+#events_panel input {width:200px;}
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlink/editor_plugin.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlink/editor_plugin.js
new file mode 100755
index 00000000..983fe5a9
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlink/editor_plugin.js
@@ -0,0 +1 @@
+(function(){tinymce.create("tinymce.plugins.AdvancedLinkPlugin",{init:function(a,b){this.editor=a;a.addCommand("mceAdvLink",function(){var c=a.selection;if(c.isCollapsed()&&!a.dom.getParent(c.getNode(),"A")){return}a.windowManager.open({file:b+"/link.htm",width:480+parseInt(a.getLang("advlink.delta_width",0)),height:400+parseInt(a.getLang("advlink.delta_height",0)),inline:1},{plugin_url:b})});a.addButton("link",{title:"advlink.link_desc",cmd:"mceAdvLink"});a.addShortcut("ctrl+k","advlink.advlink_desc","mceAdvLink");a.onNodeChange.add(function(d,c,f,e){c.setDisabled("link",e&&f.nodeName!="A");c.setActive("link",f.nodeName=="A"&&!f.name)})},getInfo:function(){return{longname:"Advanced link",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlink",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advlink",tinymce.plugins.AdvancedLinkPlugin)})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlink/editor_plugin_src.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlink/editor_plugin_src.js
new file mode 100755
index 00000000..14e46a76
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlink/editor_plugin_src.js
@@ -0,0 +1,61 @@
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+ tinymce.create('tinymce.plugins.AdvancedLinkPlugin', {
+ init : function(ed, url) {
+ this.editor = ed;
+
+ // Register commands
+ ed.addCommand('mceAdvLink', function() {
+ var se = ed.selection;
+
+ // No selection and not in link
+ if (se.isCollapsed() && !ed.dom.getParent(se.getNode(), 'A'))
+ return;
+
+ ed.windowManager.open({
+ file : url + '/link.htm',
+ width : 480 + parseInt(ed.getLang('advlink.delta_width', 0)),
+ height : 400 + parseInt(ed.getLang('advlink.delta_height', 0)),
+ inline : 1
+ }, {
+ plugin_url : url
+ });
+ });
+
+ // Register buttons
+ ed.addButton('link', {
+ title : 'advlink.link_desc',
+ cmd : 'mceAdvLink'
+ });
+
+ ed.addShortcut('ctrl+k', 'advlink.advlink_desc', 'mceAdvLink');
+
+ ed.onNodeChange.add(function(ed, cm, n, co) {
+ cm.setDisabled('link', co && n.nodeName != 'A');
+ cm.setActive('link', n.nodeName == 'A' && !n.name);
+ });
+ },
+
+ getInfo : function() {
+ return {
+ longname : 'Advanced link',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlink',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ };
+ }
+ });
+
+ // Register plugin
+ tinymce.PluginManager.add('advlink', tinymce.plugins.AdvancedLinkPlugin);
+})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlink/js/advlink.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlink/js/advlink.js
new file mode 100644
index 00000000..f013aac1
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlink/js/advlink.js
@@ -0,0 +1,543 @@
+/* Functions for the advlink plugin popup */
+
+tinyMCEPopup.requireLangPack();
+
+var templates = {
+ "window.open" : "window.open('${url}','${target}','${options}')"
+};
+
+function preinit() {
+ var url;
+
+ if (url = tinyMCEPopup.getParam("external_link_list_url"))
+ document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
+}
+
+function changeClass() {
+ var f = document.forms[0];
+
+ f.classes.value = getSelectValue(f, 'classlist');
+}
+
+function init() {
+ tinyMCEPopup.resizeToInnerSize();
+
+ var formObj = document.forms[0];
+ var inst = tinyMCEPopup.editor;
+ var elm = inst.selection.getNode();
+ var action = "insert";
+ var html;
+
+ document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser','href','file','advlink');
+ document.getElementById('popupurlbrowsercontainer').innerHTML = getBrowserHTML('popupurlbrowser','popupurl','file','advlink');
+ document.getElementById('targetlistcontainer').innerHTML = getTargetListHTML('targetlist','target');
+
+ // Link list
+ html = getLinkListHTML('linklisthref','href');
+ if (html == "")
+ document.getElementById("linklisthrefrow").style.display = 'none';
+ else
+ document.getElementById("linklisthrefcontainer").innerHTML = html;
+
+ // Anchor list
+ html = getAnchorListHTML('anchorlist','href');
+ if (html == "")
+ document.getElementById("anchorlistrow").style.display = 'none';
+ else
+ document.getElementById("anchorlistcontainer").innerHTML = html;
+
+ // Resize some elements
+ if (isVisible('hrefbrowser'))
+ document.getElementById('href').style.width = '260px';
+
+ if (isVisible('popupurlbrowser'))
+ document.getElementById('popupurl').style.width = '180px';
+
+ elm = inst.dom.getParent(elm, "A");
+ if (elm == null) {
+ var prospect = inst.dom.create("p", null, inst.selection.getContent());
+ if (prospect.childNodes.length === 1) {
+ elm = prospect.firstChild;
+ }
+ }
+
+ if (elm != null && elm.nodeName == "A")
+ action = "update";
+
+ formObj.insert.value = tinyMCEPopup.getLang(action, 'Insert', true);
+
+ setPopupControlsDisabled(true);
+
+ if (action == "update") {
+ var href = inst.dom.getAttrib(elm, 'href');
+ var onclick = inst.dom.getAttrib(elm, 'onclick');
+ var linkTarget = inst.dom.getAttrib(elm, 'target') ? inst.dom.getAttrib(elm, 'target') : "_self";
+
+ // Setup form data
+ setFormValue('href', href);
+ setFormValue('title', inst.dom.getAttrib(elm, 'title'));
+ setFormValue('id', inst.dom.getAttrib(elm, 'id'));
+ setFormValue('style', inst.dom.getAttrib(elm, "style"));
+ setFormValue('rel', inst.dom.getAttrib(elm, 'rel'));
+ setFormValue('rev', inst.dom.getAttrib(elm, 'rev'));
+ setFormValue('charset', inst.dom.getAttrib(elm, 'charset'));
+ setFormValue('hreflang', inst.dom.getAttrib(elm, 'hreflang'));
+ setFormValue('dir', inst.dom.getAttrib(elm, 'dir'));
+ setFormValue('lang', inst.dom.getAttrib(elm, 'lang'));
+ setFormValue('tabindex', inst.dom.getAttrib(elm, 'tabindex', typeof(elm.tabindex) != "undefined" ? elm.tabindex : ""));
+ setFormValue('accesskey', inst.dom.getAttrib(elm, 'accesskey', typeof(elm.accesskey) != "undefined" ? elm.accesskey : ""));
+ setFormValue('type', inst.dom.getAttrib(elm, 'type'));
+ setFormValue('onfocus', inst.dom.getAttrib(elm, 'onfocus'));
+ setFormValue('onblur', inst.dom.getAttrib(elm, 'onblur'));
+ setFormValue('onclick', onclick);
+ setFormValue('ondblclick', inst.dom.getAttrib(elm, 'ondblclick'));
+ setFormValue('onmousedown', inst.dom.getAttrib(elm, 'onmousedown'));
+ setFormValue('onmouseup', inst.dom.getAttrib(elm, 'onmouseup'));
+ setFormValue('onmouseover', inst.dom.getAttrib(elm, 'onmouseover'));
+ setFormValue('onmousemove', inst.dom.getAttrib(elm, 'onmousemove'));
+ setFormValue('onmouseout', inst.dom.getAttrib(elm, 'onmouseout'));
+ setFormValue('onkeypress', inst.dom.getAttrib(elm, 'onkeypress'));
+ setFormValue('onkeydown', inst.dom.getAttrib(elm, 'onkeydown'));
+ setFormValue('onkeyup', inst.dom.getAttrib(elm, 'onkeyup'));
+ setFormValue('target', linkTarget);
+ setFormValue('classes', inst.dom.getAttrib(elm, 'class'));
+
+ // Parse onclick data
+ if (onclick != null && onclick.indexOf('window.open') != -1)
+ parseWindowOpen(onclick);
+ else
+ parseFunction(onclick);
+
+ // Select by the values
+ selectByValue(formObj, 'dir', inst.dom.getAttrib(elm, 'dir'));
+ selectByValue(formObj, 'rel', inst.dom.getAttrib(elm, 'rel'));
+ selectByValue(formObj, 'rev', inst.dom.getAttrib(elm, 'rev'));
+ selectByValue(formObj, 'linklisthref', href);
+
+ if (href.charAt(0) == '#')
+ selectByValue(formObj, 'anchorlist', href);
+
+ addClassesToList('classlist', 'advlink_styles');
+
+ selectByValue(formObj, 'classlist', inst.dom.getAttrib(elm, 'class'), true);
+ selectByValue(formObj, 'targetlist', linkTarget, true);
+ } else
+ addClassesToList('classlist', 'advlink_styles');
+}
+
+function checkPrefix(n) {
+ if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_email')))
+ n.value = 'mailto:' + n.value;
+
+ if (/^\s*www\./i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_external')))
+ n.value = 'http://' + n.value;
+}
+
+function setFormValue(name, value) {
+ document.forms[0].elements[name].value = value;
+}
+
+function parseWindowOpen(onclick) {
+ var formObj = document.forms[0];
+
+ // Preprocess center code
+ if (onclick.indexOf('return false;') != -1) {
+ formObj.popupreturn.checked = true;
+ onclick = onclick.replace('return false;', '');
+ } else
+ formObj.popupreturn.checked = false;
+
+ var onClickData = parseLink(onclick);
+
+ if (onClickData != null) {
+ formObj.ispopup.checked = true;
+ setPopupControlsDisabled(false);
+
+ var onClickWindowOptions = parseOptions(onClickData['options']);
+ var url = onClickData['url'];
+
+ formObj.popupname.value = onClickData['target'];
+ formObj.popupurl.value = url;
+ formObj.popupwidth.value = getOption(onClickWindowOptions, 'width');
+ formObj.popupheight.value = getOption(onClickWindowOptions, 'height');
+
+ formObj.popupleft.value = getOption(onClickWindowOptions, 'left');
+ formObj.popuptop.value = getOption(onClickWindowOptions, 'top');
+
+ if (formObj.popupleft.value.indexOf('screen') != -1)
+ formObj.popupleft.value = "c";
+
+ if (formObj.popuptop.value.indexOf('screen') != -1)
+ formObj.popuptop.value = "c";
+
+ formObj.popuplocation.checked = getOption(onClickWindowOptions, 'location') == "yes";
+ formObj.popupscrollbars.checked = getOption(onClickWindowOptions, 'scrollbars') == "yes";
+ formObj.popupmenubar.checked = getOption(onClickWindowOptions, 'menubar') == "yes";
+ formObj.popupresizable.checked = getOption(onClickWindowOptions, 'resizable') == "yes";
+ formObj.popuptoolbar.checked = getOption(onClickWindowOptions, 'toolbar') == "yes";
+ formObj.popupstatus.checked = getOption(onClickWindowOptions, 'status') == "yes";
+ formObj.popupdependent.checked = getOption(onClickWindowOptions, 'dependent') == "yes";
+
+ buildOnClick();
+ }
+}
+
+function parseFunction(onclick) {
+ var formObj = document.forms[0];
+ var onClickData = parseLink(onclick);
+
+ // TODO: Add stuff here
+}
+
+function getOption(opts, name) {
+ return typeof(opts[name]) == "undefined" ? "" : opts[name];
+}
+
+function setPopupControlsDisabled(state) {
+ var formObj = document.forms[0];
+
+ formObj.popupname.disabled = state;
+ formObj.popupurl.disabled = state;
+ formObj.popupwidth.disabled = state;
+ formObj.popupheight.disabled = state;
+ formObj.popupleft.disabled = state;
+ formObj.popuptop.disabled = state;
+ formObj.popuplocation.disabled = state;
+ formObj.popupscrollbars.disabled = state;
+ formObj.popupmenubar.disabled = state;
+ formObj.popupresizable.disabled = state;
+ formObj.popuptoolbar.disabled = state;
+ formObj.popupstatus.disabled = state;
+ formObj.popupreturn.disabled = state;
+ formObj.popupdependent.disabled = state;
+
+ setBrowserDisabled('popupurlbrowser', state);
+}
+
+function parseLink(link) {
+ link = link.replace(new RegExp('&#39;', 'g'), "'");
+
+ var fnName = link.replace(new RegExp("\\s*([A-Za-z0-9\.]*)\\s*\\(.*", "gi"), "$1");
+
+ // Is function name a template function
+ var template = templates[fnName];
+ if (template) {
+ // Build regexp
+ var variableNames = template.match(new RegExp("'?\\$\\{[A-Za-z0-9\.]*\\}'?", "gi"));
+ var regExp = "\\s*[A-Za-z0-9\.]*\\s*\\(";
+ var replaceStr = "";
+ for (var i=0; i<variableNames.length; i++) {
+ // Is string value
+ if (variableNames[i].indexOf("'${") != -1)
+ regExp += "'(.*)'";
+ else // Number value
+ regExp += "([0-9]*)";
+
+ replaceStr += "$" + (i+1);
+
+ // Cleanup variable name
+ variableNames[i] = variableNames[i].replace(new RegExp("[^A-Za-z0-9]", "gi"), "");
+
+ if (i != variableNames.length-1) {
+ regExp += "\\s*,\\s*";
+ replaceStr += "<delim>";
+ } else
+ regExp += ".*";
+ }
+
+ regExp += "\\);?";
+
+ // Build variable array
+ var variables = [];
+ variables["_function"] = fnName;
+ var variableValues = link.replace(new RegExp(regExp, "gi"), replaceStr).split('<delim>');
+ for (var i=0; i<variableNames.length; i++)
+ variables[variableNames[i]] = variableValues[i];
+
+ return variables;
+ }
+
+ return null;
+}
+
+function parseOptions(opts) {
+ if (opts == null || opts == "")
+ return [];
+
+ // Cleanup the options
+ opts = opts.toLowerCase();
+ opts = opts.replace(/;/g, ",");
+ opts = opts.replace(/[^0-9a-z=,]/g, "");
+
+ var optionChunks = opts.split(',');
+ var options = [];
+
+ for (var i=0; i<optionChunks.length; i++) {
+ var parts = optionChunks[i].split('=');
+
+ if (parts.length == 2)
+ options[parts[0]] = parts[1];
+ }
+
+ return options;
+}
+
+function buildOnClick() {
+ var formObj = document.forms[0];
+
+ if (!formObj.ispopup.checked) {
+ formObj.onclick.value = "";
+ return;
+ }
+
+ var onclick = "window.open('";
+ var url = formObj.popupurl.value;
+
+ onclick += url + "','";
+ onclick += formObj.popupname.value + "','";
+
+ if (formObj.popuplocation.checked)
+ onclick += "location=yes,";
+
+ if (formObj.popupscrollbars.checked)
+ onclick += "scrollbars=yes,";
+
+ if (formObj.popupmenubar.checked)
+ onclick += "menubar=yes,";
+
+ if (formObj.popupresizable.checked)
+ onclick += "resizable=yes,";
+
+ if (formObj.popuptoolbar.checked)
+ onclick += "toolbar=yes,";
+
+ if (formObj.popupstatus.checked)
+ onclick += "status=yes,";
+
+ if (formObj.popupdependent.checked)
+ onclick += "dependent=yes,";
+
+ if (formObj.popupwidth.value != "")
+ onclick += "width=" + formObj.popupwidth.value + ",";
+
+ if (formObj.popupheight.value != "")
+ onclick += "height=" + formObj.popupheight.value + ",";
+
+ if (formObj.popupleft.value != "") {
+ if (formObj.popupleft.value != "c")
+ onclick += "left=" + formObj.popupleft.value + ",";
+ else
+ onclick += "left='+(screen.availWidth/2-" + (formObj.popupwidth.value/2) + ")+',";
+ }
+
+ if (formObj.popuptop.value != "") {
+ if (formObj.popuptop.value != "c")
+ onclick += "top=" + formObj.popuptop.value + ",";
+ else
+ onclick += "top='+(screen.availHeight/2-" + (formObj.popupheight.value/2) + ")+',";
+ }
+
+ if (onclick.charAt(onclick.length-1) == ',')
+ onclick = onclick.substring(0, onclick.length-1);
+
+ onclick += "');";
+
+ if (formObj.popupreturn.checked)
+ onclick += "return false;";
+
+ // tinyMCE.debug(onclick);
+
+ formObj.onclick.value = onclick;
+
+ if (formObj.href.value == "")
+ formObj.href.value = url;
+}
+
+function setAttrib(elm, attrib, value) {
+ var formObj = document.forms[0];
+ var valueElm = formObj.elements[attrib.toLowerCase()];
+ var dom = tinyMCEPopup.editor.dom;
+
+ if (typeof(value) == "undefined" || value == null) {
+ value = "";
+
+ if (valueElm)
+ value = valueElm.value;
+ }
+
+ // Clean up the style
+ if (attrib == 'style')
+ value = dom.serializeStyle(dom.parseStyle(value), 'a');
+
+ dom.setAttrib(elm, attrib, value);
+}
+
+function getAnchorListHTML(id, target) {
+ var ed = tinyMCEPopup.editor, nodes = ed.dom.select('a'), name, i, len, html = "";
+
+ for (i=0, len=nodes.length; i<len; i++) {
+ if ((name = ed.dom.getAttrib(nodes[i], "name")) != "")
+ html += '<option value="#' + name + '">' + name + '</option>';
+
+ if ((name = nodes[i].id) != "" && !nodes[i].href)
+ html += '<option value="#' + name + '">' + name + '</option>';
+ }
+
+ if (html == "")
+ return "";
+
+ html = '<select id="' + id + '" name="' + id + '" class="mceAnchorList"'
+ + ' onchange="this.form.' + target + '.value=this.options[this.selectedIndex].value"'
+ + '>'
+ + '<option value="">---</option>'
+ + html
+ + '</select>';
+
+ return html;
+}
+
+function insertAction() {
+ var inst = tinyMCEPopup.editor;
+ var elm, elementArray, i;
+
+ elm = inst.selection.getNode();
+ checkPrefix(document.forms[0].href);
+
+ elm = inst.dom.getParent(elm, "A");
+
+ // Remove element if there is no href
+ if (!document.forms[0].href.value) {
+ i = inst.selection.getBookmark();
+ inst.dom.remove(elm, 1);
+ inst.selection.moveToBookmark(i);
+ tinyMCEPopup.execCommand("mceEndUndoLevel");
+ tinyMCEPopup.close();
+ return;
+ }
+
+ // Create new anchor elements
+ if (elm == null) {
+ inst.getDoc().execCommand("unlink", false, null);
+ tinyMCEPopup.execCommand("mceInsertLink", false, "#mce_temp_url#", {skip_undo : 1});
+
+ elementArray = tinymce.grep(inst.dom.select("a"), function(n) {return inst.dom.getAttrib(n, 'href') == '#mce_temp_url#';});
+ for (i=0; i<elementArray.length; i++)
+ setAllAttribs(elm = elementArray[i]);
+ } else
+ setAllAttribs(elm);
+
+ // Don't move caret if selection was image
+ if (elm.childNodes.length != 1 || elm.firstChild.nodeName != 'IMG') {
+ inst.focus();
+ inst.selection.select(elm);
+ inst.selection.collapse(0);
+ tinyMCEPopup.storeSelection();
+ }
+
+ tinyMCEPopup.execCommand("mceEndUndoLevel");
+ tinyMCEPopup.close();
+}
+
+function setAllAttribs(elm) {
+ var formObj = document.forms[0];
+ var href = formObj.href.value.replace(/ /g, '%20');
+ var target = getSelectValue(formObj, 'targetlist');
+
+ setAttrib(elm, 'href', href);
+ setAttrib(elm, 'title');
+ setAttrib(elm, 'target', target == '_self' ? '' : target);
+ setAttrib(elm, 'id');
+ setAttrib(elm, 'style');
+ setAttrib(elm, 'class', getSelectValue(formObj, 'classlist'));
+ setAttrib(elm, 'rel');
+ setAttrib(elm, 'rev');
+ setAttrib(elm, 'charset');
+ setAttrib(elm, 'hreflang');
+ setAttrib(elm, 'dir');
+ setAttrib(elm, 'lang');
+ setAttrib(elm, 'tabindex');
+ setAttrib(elm, 'accesskey');
+ setAttrib(elm, 'type');
+ setAttrib(elm, 'onfocus');
+ setAttrib(elm, 'onblur');
+ setAttrib(elm, 'onclick');
+ setAttrib(elm, 'ondblclick');
+ setAttrib(elm, 'onmousedown');
+ setAttrib(elm, 'onmouseup');
+ setAttrib(elm, 'onmouseover');
+ setAttrib(elm, 'onmousemove');
+ setAttrib(elm, 'onmouseout');
+ setAttrib(elm, 'onkeypress');
+ setAttrib(elm, 'onkeydown');
+ setAttrib(elm, 'onkeyup');
+
+ // Refresh in old MSIE
+ if (tinyMCE.isMSIE5)
+ elm.outerHTML = elm.outerHTML;
+}
+
+function getSelectValue(form_obj, field_name) {
+ var elm = form_obj.elements[field_name];
+
+ if (!elm || elm.options == null || elm.selectedIndex == -1)
+ return "";
+
+ return elm.options[elm.selectedIndex].value;
+}
+
+function getLinkListHTML(elm_id, target_form_element, onchange_func) {
+ if (typeof(tinyMCELinkList) == "undefined" || tinyMCELinkList.length == 0)
+ return "";
+
+ var html = "";
+
+ html += '<select id="' + elm_id + '" name="' + elm_id + '"';
+ html += ' class="mceLinkList" onchange="this.form.' + target_form_element + '.value=';
+ html += 'this.options[this.selectedIndex].value;';
+
+ if (typeof(onchange_func) != "undefined")
+ html += onchange_func + '(\'' + target_form_element + '\',this.options[this.selectedIndex].text,this.options[this.selectedIndex].value);';
+
+ html += '"><option value="">---</option>';
+
+ for (var i=0; i<tinyMCELinkList.length; i++)
+ html += '<option value="' + tinyMCELinkList[i][1] + '">' + tinyMCELinkList[i][0] + '</option>';
+
+ html += '</select>';
+
+ return html;
+
+ // tinyMCE.debug('-- image list start --', html, '-- image list end --');
+}
+
+function getTargetListHTML(elm_id, target_form_element) {
+ var targets = tinyMCEPopup.getParam('theme_advanced_link_targets', '').split(';');
+ var html = '';
+
+ html += '<select id="' + elm_id + '" name="' + elm_id + '" onchange="this.form.' + target_form_element + '.value=';
+ html += 'this.options[this.selectedIndex].value;">';
+ html += '<option value="_self">' + tinyMCEPopup.getLang('advlink_dlg.target_same') + '</option>';
+ html += '<option value="_blank">' + tinyMCEPopup.getLang('advlink_dlg.target_blank') + ' (_blank)</option>';
+ html += '<option value="_parent">' + tinyMCEPopup.getLang('advlink_dlg.target_parent') + ' (_parent)</option>';
+ html += '<option value="_top">' + tinyMCEPopup.getLang('advlink_dlg.target_top') + ' (_top)</option>';
+
+ for (var i=0; i<targets.length; i++) {
+ var key, value;
+
+ if (targets[i] == "")
+ continue;
+
+ key = targets[i].split('=')[0];
+ value = targets[i].split('=')[1];
+
+ html += '<option value="' + key + '">' + value + ' (' + key + ')</option>';
+ }
+
+ html += '</select>';
+
+ return html;
+}
+
+// While loading
+preinit();
+tinyMCEPopup.onInit.add(init);
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlink/langs/de_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlink/langs/de_dlg.js
new file mode 100644
index 00000000..475dfe95
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlink/langs/de_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('de.advlink_dlg',{"target_name":"Name der Zielseite",classes:"Klassen",style:"Format",id:"ID","popup_position":"Position (X/Y)",langdir:"Schriftrichtung","popup_size":"Gr\u00f6\u00dfe","popup_dependent":"Vom Elternfenster abh\u00e4ngig <br /> (nur Mozilla/Firefox) ","popup_resizable":"Vergr\u00f6\u00dfern des Fenster zulassen","popup_location":"Adressleiste anzeigen","popup_menubar":"Browsermen\u00fc anzeigen","popup_toolbar":"Werkzeugleisten anzeigen","popup_statusbar":"Statusleiste anzeigen","popup_scrollbars":"Scrollbalken anzeigen","popup_return":"Link trotz Popup folgen","popup_name":"Name des Fensters","popup_url":"Popup-Adresse",popup:"JavaScript-Popup","target_blank":"In neuem Fenster \u00f6ffnen","target_top":"Im obersten Frame \u00f6ffnen (sprengt das Frameset)","target_parent":"Im \u00fcbergeordneten Fenster/Frame \u00f6ffnen","target_same":"Im selben Fenster/Frame \u00f6ffnen","anchor_names":"Anker","popup_opts":"Optionen","advanced_props":"Erweiterte Eigenschaften","event_props":"Ereignisse","popup_props":"Popup-Eigenschaften","general_props":"Allemeine Eigenschaften","advanced_tab":"Erweitert","events_tab":"Ereignisse","popup_tab":"Popup","general_tab":"Allgemein",list:"Linkliste","is_external":"Diese Adresse scheint ein externer Link zu sein. Soll das dazu ben\u00f6tigte \"http://\" vorangestellt werden?","is_email":"Diese Adresse scheint eine E-Mail Adresse zu sein. Soll das dazu ben\u00f6tigte \"mailto:\" vorangestellt werden?",titlefield:"Titel",target:"Fenster",url:"Adresse",title:"Link einf\u00fcgen/bearbeiten","link_list":"Linkliste",rtl:"Rechts nach links",ltr:"Links nach rechts",accesskey:"Tastenk\u00fcrzel",tabindex:"Tabindex",rev:"Beziehung des Linkziels zur Seite",rel:"Beziehung der Seite zum Linkziel",mime:"MIME-Type der Zielseite",encoding:"Zeichenkodierung der Zielseite",langcode:"Sprachcode","target_langcode":"Sprache der Zielseite",width:"Breite",height:"H\u00f6he"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlink/langs/en_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlink/langs/en_dlg.js
new file mode 100644
index 00000000..3169a565
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlink/langs/en_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('en.advlink_dlg',{"target_name":"Target Name",classes:"Classes",style:"Style",id:"ID","popup_position":"Position (X/Y)",langdir:"Language Direction","popup_size":"Size","popup_dependent":"Dependent (Mozilla/Firefox Only)","popup_resizable":"Make Window Resizable","popup_location":"Show Location Bar","popup_menubar":"Show Menu Bar","popup_toolbar":"Show Toolbars","popup_statusbar":"Show Status Bar","popup_scrollbars":"Show Scrollbars","popup_return":"Insert \'return false\'","popup_name":"Window Name","popup_url":"Popup URL",popup:"JavaScript Popup","target_blank":"Open in New Window","target_top":"Open in Top Frame (Replaces All Frames)","target_parent":"Open in Parent Window/Frame","target_same":"Open in This Window/Frame","anchor_names":"Anchors","popup_opts":"Options","advanced_props":"Advanced Properties","event_props":"Events","popup_props":"Popup Properties","general_props":"General Properties","advanced_tab":"Advanced","events_tab":"Events","popup_tab":"Popup","general_tab":"General",list:"Link List","is_external":"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?","is_email":"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",titlefield:"Title",target:"Target",url:"Link URL",title:"Insert/Edit Link","link_list":"Link List",rtl:"Right to Left",ltr:"Left to Right",accesskey:"AccessKey",tabindex:"TabIndex",rev:"Relationship Target to Page",rel:"Relationship Page to Target",mime:"Target MIME Type",encoding:"Target Character Encoding",langcode:"Language Code","target_langcode":"Target Language",width:"Width",height:"Height"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlink/langs/hu_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlink/langs/hu_dlg.js
new file mode 100644
index 00000000..ec82452c
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlink/langs/hu_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('hu.advlink_dlg',{"target_name":"C\u00e9l neve",classes:"Oszt\u00e1lyok",style:"St\u00edlus",id:"ID","popup_position":" (X/Y) Poz\u00edci\u00f3",langdir:"Nyelv \u00edr\u00e1s ir\u00e1ny","popup_size":"M\u00e9ret","popup_dependent":"F\u00fcgg\u0151 (csak Mozilla/Firefox)","popup_resizable":"\u00c1tm\u00e9retezhet\u0151 ablak k\u00e9sz\u00edt\u00e9se","popup_location":"C\u00edm mez\u0151 mutat\u00e1sa","popup_menubar":"Men\u00fcsor mutat\u00e1sa","popup_toolbar":"Eszk\u00f6zsor mutat\u00e1sa","popup_statusbar":"St\u00e1tuszsor mutat\u00e1sa","popup_scrollbars":"G\u00f6rget\u0151s\u00e1vok mutat\u00e1sa","popup_return":"\'return false\' besz\u00far\u00e1sa","popup_name":"Ablakn\u00e9v","popup_url":"Felugr\u00f3 ablak URL",popup:"JavaScript felugr\u00f3 ablak","target_blank":"Megnyit\u00e1s \u00faj ablakban ","target_top":"Megnyit\u00e1s azonos ablakban/keretben legfel\u00fcl","target_parent":"Megnyit\u00e1s sz\u00fcl\u0151 ablakban/keretben ","target_same":"Megnyit\u00e1s azonos ablakban/keretben ","anchor_names":"Horgonyok","popup_opts":"Be\u00e1ll\u00edt\u00e1sok","advanced_props":"Halad\u00f3 tulajdons\u00e1gok","event_props":"Esem\u00e9nyek","popup_props":"Felugr\u00f3 ablak tulajdons\u00e1gai","general_props":"\u00c1ltal\u00e1nos tulajdons\u00e1gok","advanced_tab":"Halad\u00f3","events_tab":"Esem\u00e9nyek","popup_tab":"Felugr\u00f3 ablak","general_tab":"\u00c1ltal\u00e1nos",list:"Link lista","is_external":"A be\u00edrt URL k\u00fcls\u0151 hivatkoz\u00e1snak t\u0171nik, k\u00edv\u00e1nja a sz\u00fcks\u00e9ges http:// -t el\u00e9 tenni?","is_email":"A be\u00edrt URL e-mail c\u00edmnek t\u0171nik, k\u00edv\u00e1nja a sz\u00fcks\u00e9ges mailto: el\u0151tagot el\u00e9 tenni?",titlefield:"C\u00edm",target:"C\u00e9l (target)",url:"Link URL",title:"Hivatkoz\u00e1s besz\u00far\u00e1s/szerkeszt\u00e9s","link_list":"Link lista",rtl:"Jobbr\u00f3l balra",ltr:"Balr\u00f3l jobbra",accesskey:"Gyorsgomb",tabindex:"Tabindex",rev:"C\u00e9l kapcsolata az oldallal",rel:"Oldal kapcsolata a c\u00e9llal",mime:"C\u00e9l MIME t\u00edpus",encoding:"C\u00e9l karakterk\u00f3dol\u00e1s",langcode:"Nyelv k\u00f3d","target_langcode":"C\u00e9l nyelv",width:"Sz\u00e9less\u00e9g",height:"Magass\u00e1g"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlink/langs/ja_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlink/langs/ja_dlg.js
new file mode 100644
index 00000000..68ebcd2e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlink/langs/ja_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('ja.advlink_dlg',{"target_name":"\u30bf\u30fc\u30b2\u30c3\u30c8\u306e\u540d\u524d",classes:"\u30af\u30e9\u30b9",style:"\u30b9\u30bf\u30a4\u30eb",id:"ID","popup_position":"\u4f4d\u7f6e (X/Y)",langdir:"\u6587\u7ae0\u306e\u65b9\u5411","popup_size":"\u5927\u304d\u3055","popup_dependent":"\u4f9d\u5b58(Mozilla\u3068Firefox\u3060\u3051)","popup_resizable":"\u30a6\u30a4\u30f3\u30c9\u30a6\u306e\u30b5\u30a4\u30ba\u5909\u66f4\u3092\u8a31\u53ef","popup_location":"\u30a2\u30c9\u30ec\u30b9\u30d0\u30fc\u3092\u8868\u793a","popup_menubar":"\u30e1\u30cb\u30e5\u30fc\u30d0\u30fc\u3092\u8868\u793a","popup_toolbar":"\u30c4\u30fc\u30eb\u30d0\u30fc\u3092\u8868\u793a","popup_statusbar":"\u30b9\u30c6\u30fc\u30bf\u30b9\u30d0\u30fc\u3092\u8868\u793a","popup_scrollbars":"\u30b9\u30af\u30ed\u30fc\u30eb\u30d0\u30fc\u3092\u8868\u793a","popup_return":"\'return false\'\u3092\u633f\u5165","popup_name":"\u30a6\u30a4\u30f3\u30c9\u30a6\u306e\u540d\u524d","popup_url":"\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7\u306eURL",popup:"Javascript\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7","target_blank":"\u65b0\u3057\u3044\u30a6\u30a4\u30f3\u30c9\u30a6\u3067\u958b\u304f","target_top":"\u30c8\u30c3\u30d7\u306e\u30d5\u30ec\u30fc\u30e0\u3067\u958b\u304f(\u3059\u3079\u3066\u306e\u30d5\u30ec\u30fc\u30e0\u3092\u7f6e\u304d\u63db\u3048)","target_parent":"\u89aa\u30a6\u30a4\u30f3\u30c9\u30a6/\u89aa\u30d5\u30ec\u30fc\u30e0\u3067\u958b\u304f","target_same":"\u3053\u306e\u30a6\u30a4\u30f3\u30c9\u30a6/\u30d5\u30ec\u30fc\u30e0\u3067\u958b\u304f","anchor_names":"\u30a2\u30f3\u30ab\u30fc","popup_opts":"\u30aa\u30d7\u30b7\u30e7\u30f3","advanced_props":"\u9ad8\u5ea6\u306a\u5c5e\u6027","event_props":"\u30a4\u30d9\u30f3\u30c8","popup_props":"\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7","general_props":"\u4e00\u822c","advanced_tab":"\u5c02\u9580\u7684","events_tab":"\u30a4\u30d9\u30f3\u30c8","popup_tab":"\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7","general_tab":"\u4e00\u822c",list:"\u30ea\u30f3\u30af\u306e\u4e00\u89a7","is_external":"\u5165\u529b\u3057\u305fURL\u306f\u5916\u90e8\u306e\u30ea\u30f3\u30af\u306e\u3088\u3046\u3067\u3059\u3002\u30ea\u30f3\u30af\u306b http:// \u3092\u8ffd\u52a0\u3057\u307e\u3059\u304b?","is_email":"\u5165\u529b\u3057\u305fURL\u306f\u96fb\u5b50\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306e\u3088\u3046\u3067\u3059\u3002\u30ea\u30f3\u30af\u306b mailto: \u3092\u8ffd\u52a0\u3057\u307e\u3059\u304b?",titlefield:"\u30bf\u30a4\u30c8\u30eb",target:"\u30bf\u30fc\u30b2\u30c3\u30c8",url:"\u30ea\u30f3\u30af\u306eURL",title:"\u30ea\u30f3\u30af\u306e\u633f\u5165/\u7de8\u96c6","link_list":"\u30ea\u30f3\u30af\u306e\u4e00\u89a7",rtl:"\u53f3\u304b\u3089\u5de6",ltr:"\u5de6\u304b\u3089\u53f3",accesskey:"\u30a2\u30af\u30bb\u30b9\u30ad\u30fc",tabindex:"\u30bf\u30d6\u30a4\u30f3\u30c7\u30c3\u30af\u30b9",rev:"\u30bf\u30fc\u30b2\u30c3\u30c8\u304b\u3089\u30da\u30fc\u30b8\u306e\u95a2\u4fc2",rel:"\u30da\u30fc\u30b8\u304b\u3089\u30bf\u30fc\u30b2\u30c3\u30c8\u306e\u95a2\u4fc2",mime:"\u30bf\u30fc\u30b2\u30c3\u30c8\u306eMIME\u30bf\u30a4\u30d7",encoding:"\u30bf\u30fc\u30b2\u30c3\u30c8\u306e\u6587\u5b57\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0",langcode:"\u8a00\u8a9e\u30b3\u30fc\u30c9","target_langcode":"\u30bf\u30fc\u30b2\u30c3\u30c8\u306e\u8a00\u8a9e",width:"\u5e45",height:"\u9ad8\u3055"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlink/link.htm b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlink/link.htm
new file mode 100755
index 00000000..8ab7c2a9
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlink/link.htm
@@ -0,0 +1,338 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>{#advlink_dlg.title}</title>
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script type="text/javascript" src="../../utils/mctabs.js"></script>
+ <script type="text/javascript" src="../../utils/form_utils.js"></script>
+ <script type="text/javascript" src="../../utils/validate.js"></script>
+ <script type="text/javascript" src="js/advlink.js"></script>
+ <link href="css/advlink.css" rel="stylesheet" type="text/css" />
+</head>
+<body id="advlink" style="display: none" role="application" onload="javascript:mcTabs.displayTab('general_tab','general_panel', true);" aria-labelledby="app_label">
+ <span class="mceVoiceLabel" id="app_label" style="display:none;">{#advlink_dlg.title}</span>
+ <form onsubmit="insertAction();return false;" action="#">
+ <div class="tabs" role="presentation">
+ <ul>
+ <li id="general_tab" class="current" aria-controls="general_panel" ><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advlink_dlg.general_tab}</a></span></li>
+ <li id="popup_tab" aria-controls="popup_panel" ><span><a href="javascript:mcTabs.displayTab('popup_tab','popup_panel');" onmousedown="return false;">{#advlink_dlg.popup_tab}</a></span></li>
+ <li id="events_tab" aria-controls="events_panel"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#advlink_dlg.events_tab}</a></span></li>
+ <li id="advanced_tab" aria-controls="advanced_panel"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#advlink_dlg.advanced_tab}</a></span></li>
+ </ul>
+ </div>
+
+ <div class="panel_wrapper" role="presentation">
+ <div id="general_panel" class="panel current">
+ <fieldset>
+ <legend>{#advlink_dlg.general_props}</legend>
+
+ <table border="0" cellpadding="4" cellspacing="0" role="presentation">
+ <tr>
+ <td class="nowrap"><label id="hreflabel" for="href">{#advlink_dlg.url}</label></td>
+ <td><table border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input id="href" name="href" type="text" class="mceFocus" value="" onchange="selectByValue(this.form,'linklisthref',this.value);" aria-required="true" /></td>
+ <td id="hrefbrowsercontainer">&nbsp;</td>
+ </tr>
+ </table></td>
+ </tr>
+ <tr id="linklisthrefrow">
+ <td class="column1"><label for="linklisthref">{#advlink_dlg.list}</label></td>
+ <td colspan="2" id="linklisthrefcontainer"><select id="linklisthref"><option value=""></option></select></td>
+ </tr>
+ <tr id="anchorlistrow">
+ <td class="column1"><label for="anchorlist">{#advlink_dlg.anchor_names}</label></td>
+ <td colspan="2" id="anchorlistcontainer"><select id="anchorlist"><option value=""></option></select></td>
+ </tr>
+ <tr>
+ <td><label id="targetlistlabel" for="targetlist">{#advlink_dlg.target}</label></td>
+ <td id="targetlistcontainer"><select id="targetlist"><option value=""></option></select></td>
+ </tr>
+ <tr>
+ <td class="nowrap"><label id="titlelabel" for="title">{#advlink_dlg.titlefield}</label></td>
+ <td><input id="title" name="title" type="text" value="" /></td>
+ </tr>
+ <tr>
+ <td><label id="classlabel" for="classlist">{#class_name}</label></td>
+ <td>
+ <select id="classlist" name="classlist" onchange="changeClass();">
+ <option value="" selected="selected">{#not_set}</option>
+ </select>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+ </div>
+
+ <div id="popup_panel" class="panel">
+ <fieldset>
+ <legend>{#advlink_dlg.popup_props}</legend>
+
+ <input type="checkbox" id="ispopup" name="ispopup" class="radio" onclick="setPopupControlsDisabled(!this.checked);buildOnClick();" />
+ <label id="ispopuplabel" for="ispopup">{#advlink_dlg.popup}</label>
+
+ <table border="0" cellpadding="0" cellspacing="4" role="presentation" >
+ <tr>
+ <td class="nowrap"><label for="popupurl">{#advlink_dlg.popup_url}</label>&nbsp;</td>
+ <td>
+ <table border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" name="popupurl" id="popupurl" value="" onchange="buildOnClick();" /></td>
+ <td id="popupurlbrowsercontainer">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td class="nowrap"><label for="popupname">{#advlink_dlg.popup_name}</label>&nbsp;</td>
+ <td><input type="text" name="popupname" id="popupname" value="" onchange="buildOnClick();" /></td>
+ </tr>
+ <tr role="group" aria-labelledby="popup_size_label">
+ <td class="nowrap"><label id="popup_size_label">{#advlink_dlg.popup_size}</label>&nbsp;</td>
+ <td class="nowrap">
+ <span style="display:none" id="width_voiceLabel">{#advlink_dlg.width}</span>
+ <input type="text" id="popupwidth" name="popupwidth" value="" onchange="buildOnClick();" aria-labelledby="width_voiceLabel" /> x
+ <span style="display:none" id="height_voiceLabel">{#advlink_dlg.height}</span>
+ <input type="text" id="popupheight" name="popupheight" value="" onchange="buildOnClick();" aria-labelledby="height_voiceLabel" /> px
+ </td>
+ </tr>
+ <tr role="group" aria-labelledby="popup_position_label center_hint">
+ <td class="nowrap" id="labelleft"><label id="popup_position_label">{#advlink_dlg.popup_position}</label>&nbsp;</td>
+ <td class="nowrap">
+ <span style="display:none" id="x_voiceLabel">X</span>
+ <input type="text" id="popupleft" name="popupleft" value="" onchange="buildOnClick();" aria-labelledby="x_voiceLabel" /> /
+ <span style="display:none" id="y_voiceLabel">Y</span>
+ <input type="text" id="popuptop" name="popuptop" value="" onchange="buildOnClick();" aria-labelledby="y_voiceLabel" /> <span id="center_hint">(c /c = center)</span>
+ </td>
+ </tr>
+ </table>
+
+ <fieldset>
+ <legend>{#advlink_dlg.popup_opts}</legend>
+
+ <table border="0" cellpadding="0" cellspacing="4" role="presentation" >
+ <tr>
+ <td><input type="checkbox" id="popuplocation" name="popuplocation" class="checkbox" onchange="buildOnClick();" /></td>
+ <td class="nowrap"><label id="popuplocationlabel" for="popuplocation">{#advlink_dlg.popup_location}</label></td>
+ <td><input type="checkbox" id="popupscrollbars" name="popupscrollbars" class="checkbox" onchange="buildOnClick();" /></td>
+ <td class="nowrap"><label id="popupscrollbarslabel" for="popupscrollbars">{#advlink_dlg.popup_scrollbars}</label></td>
+ </tr>
+ <tr>
+ <td><input type="checkbox" id="popupmenubar" name="popupmenubar" class="checkbox" onchange="buildOnClick();" /></td>
+ <td class="nowrap"><label id="popupmenubarlabel" for="popupmenubar">{#advlink_dlg.popup_menubar}</label></td>
+ <td><input type="checkbox" id="popupresizable" name="popupresizable" class="checkbox" onchange="buildOnClick();" /></td>
+ <td class="nowrap"><label id="popupresizablelabel" for="popupresizable">{#advlink_dlg.popup_resizable}</label></td>
+ </tr>
+ <tr>
+ <td><input type="checkbox" id="popuptoolbar" name="popuptoolbar" class="checkbox" onchange="buildOnClick();" /></td>
+ <td class="nowrap"><label id="popuptoolbarlabel" for="popuptoolbar">{#advlink_dlg.popup_toolbar}</label></td>
+ <td><input type="checkbox" id="popupdependent" name="popupdependent" class="checkbox" onchange="buildOnClick();" /></td>
+ <td class="nowrap"><label id="popupdependentlabel" for="popupdependent">{#advlink_dlg.popup_dependent}</label></td>
+ </tr>
+ <tr>
+ <td><input type="checkbox" id="popupstatus" name="popupstatus" class="checkbox" onchange="buildOnClick();" /></td>
+ <td class="nowrap"><label id="popupstatuslabel" for="popupstatus">{#advlink_dlg.popup_statusbar}</label></td>
+ <td><input type="checkbox" id="popupreturn" name="popupreturn" class="checkbox" onchange="buildOnClick();" checked="checked" /></td>
+ <td class="nowrap"><label id="popupreturnlabel" for="popupreturn">{#advlink_dlg.popup_return}</label></td>
+ </tr>
+ </table>
+ </fieldset>
+ </fieldset>
+ </div>
+
+ <div id="advanced_panel" class="panel">
+ <fieldset>
+ <legend>{#advlink_dlg.advanced_props}</legend>
+
+ <table border="0" cellpadding="0" cellspacing="4" role="presentation" >
+ <tr>
+ <td class="column1"><label id="idlabel" for="id">{#advlink_dlg.id}</label></td>
+ <td><input id="id" name="id" type="text" value="" /></td>
+ </tr>
+
+ <tr>
+ <td><label id="stylelabel" for="style">{#advlink_dlg.style}</label></td>
+ <td><input type="text" id="style" name="style" value="" /></td>
+ </tr>
+
+ <tr>
+ <td><label id="classeslabel" for="classes">{#advlink_dlg.classes}</label></td>
+ <td><input type="text" id="classes" name="classes" value="" onchange="selectByValue(this.form,'classlist',this.value,true);" /></td>
+ </tr>
+
+ <tr>
+ <td><label id="targetlabel" for="target">{#advlink_dlg.target_name}</label></td>
+ <td><input type="text" id="target" name="target" value="" onchange="selectByValue(this.form,'targetlist',this.value,true);" /></td>
+ </tr>
+
+ <tr>
+ <td class="column1"><label id="dirlabel" for="dir">{#advlink_dlg.langdir}</label></td>
+ <td>
+ <select id="dir" name="dir">
+ <option value="">{#not_set}</option>
+ <option value="ltr">{#advlink_dlg.ltr}</option>
+ <option value="rtl">{#advlink_dlg.rtl}</option>
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <td><label id="hreflanglabel" for="hreflang">{#advlink_dlg.target_langcode}</label></td>
+ <td><input type="text" id="hreflang" name="hreflang" value="" /></td>
+ </tr>
+
+ <tr>
+ <td class="column1"><label id="langlabel" for="lang">{#advlink_dlg.langcode}</label></td>
+ <td>
+ <input id="lang" name="lang" type="text" value="" />
+ </td>
+ </tr>
+
+ <tr>
+ <td><label id="charsetlabel" for="charset">{#advlink_dlg.encoding}</label></td>
+ <td><input type="text" id="charset" name="charset" value="" /></td>
+ </tr>
+
+ <tr>
+ <td><label id="typelabel" for="type">{#advlink_dlg.mime}</label></td>
+ <td><input type="text" id="type" name="type" value="" /></td>
+ </tr>
+
+ <tr>
+ <td><label id="rellabel" for="rel">{#advlink_dlg.rel}</label></td>
+ <td><select id="rel" name="rel">
+ <option value="">{#not_set}</option>
+ <option value="lightbox">Lightbox</option>
+ <option value="alternate">Alternate</option>
+ <option value="designates">Designates</option>
+ <option value="stylesheet">Stylesheet</option>
+ <option value="start">Start</option>
+ <option value="next">Next</option>
+ <option value="prev">Prev</option>
+ <option value="contents">Contents</option>
+ <option value="index">Index</option>
+ <option value="glossary">Glossary</option>
+ <option value="copyright">Copyright</option>
+ <option value="chapter">Chapter</option>
+ <option value="subsection">Subsection</option>
+ <option value="appendix">Appendix</option>
+ <option value="help">Help</option>
+ <option value="bookmark">Bookmark</option>
+ <option value="nofollow">No Follow</option>
+ <option value="tag">Tag</option>
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <td><label id="revlabel" for="rev">{#advlink_dlg.rev}</label></td>
+ <td><select id="rev" name="rev">
+ <option value="">{#not_set}</option>
+ <option value="alternate">Alternate</option>
+ <option value="designates">Designates</option>
+ <option value="stylesheet">Stylesheet</option>
+ <option value="start">Start</option>
+ <option value="next">Next</option>
+ <option value="prev">Prev</option>
+ <option value="contents">Contents</option>
+ <option value="index">Index</option>
+ <option value="glossary">Glossary</option>
+ <option value="copyright">Copyright</option>
+ <option value="chapter">Chapter</option>
+ <option value="subsection">Subsection</option>
+ <option value="appendix">Appendix</option>
+ <option value="help">Help</option>
+ <option value="bookmark">Bookmark</option>
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <td><label id="tabindexlabel" for="tabindex">{#advlink_dlg.tabindex}</label></td>
+ <td><input type="text" id="tabindex" name="tabindex" value="" /></td>
+ </tr>
+
+ <tr>
+ <td><label id="accesskeylabel" for="accesskey">{#advlink_dlg.accesskey}</label></td>
+ <td><input type="text" id="accesskey" name="accesskey" value="" /></td>
+ </tr>
+ </table>
+ </fieldset>
+ </div>
+
+ <div id="events_panel" class="panel">
+ <fieldset>
+ <legend>{#advlink_dlg.event_props}</legend>
+
+ <table border="0" cellpadding="0" cellspacing="4" role="presentation" >
+ <tr>
+ <td class="column1"><label for="onfocus">onfocus</label></td>
+ <td><input id="onfocus" name="onfocus" type="text" value="" /></td>
+ </tr>
+
+ <tr>
+ <td class="column1"><label for="onblur">onblur</label></td>
+ <td><input id="onblur" name="onblur" type="text" value="" /></td>
+ </tr>
+
+ <tr>
+ <td class="column1"><label for="onclick">onclick</label></td>
+ <td><input id="onclick" name="onclick" type="text" value="" /></td>
+ </tr>
+
+ <tr>
+ <td class="column1"><label for="ondblclick">ondblclick</label></td>
+ <td><input id="ondblclick" name="ondblclick" type="text" value="" /></td>
+ </tr>
+
+ <tr>
+ <td class="column1"><label for="onmousedown">onmousedown</label></td>
+ <td><input id="onmousedown" name="onmousedown" type="text" value="" /></td>
+ </tr>
+
+ <tr>
+ <td class="column1"><label for="onmouseup">onmouseup</label></td>
+ <td><input id="onmouseup" name="onmouseup" type="text" value="" /></td>
+ </tr>
+
+ <tr>
+ <td class="column1"><label for="onmouseover">onmouseover</label></td>
+ <td><input id="onmouseover" name="onmouseover" type="text" value="" /></td>
+ </tr>
+
+ <tr>
+ <td class="column1"><label for="onmousemove">onmousemove</label></td>
+ <td><input id="onmousemove" name="onmousemove" type="text" value="" /></td>
+ </tr>
+
+ <tr>
+ <td class="column1"><label for="onmouseout">onmouseout</label></td>
+ <td><input id="onmouseout" name="onmouseout" type="text" value="" /></td>
+ </tr>
+
+ <tr>
+ <td class="column1"><label for="onkeypress">onkeypress</label></td>
+ <td><input id="onkeypress" name="onkeypress" type="text" value="" /></td>
+ </tr>
+
+ <tr>
+ <td class="column1"><label for="onkeydown">onkeydown</label></td>
+ <td><input id="onkeydown" name="onkeydown" type="text" value="" /></td>
+ </tr>
+
+ <tr>
+ <td class="column1"><label for="onkeyup">onkeyup</label></td>
+ <td><input id="onkeyup" name="onkeyup" type="text" value="" /></td>
+ </tr>
+ </table>
+ </fieldset>
+ </div>
+ </div>
+
+ <div class="mceActionPanel">
+ <input type="submit" id="insert" name="insert" value="{#insert}" />
+ <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
+ </div>
+ </form>
+</body>
+</html>
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlist/editor_plugin.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlist/editor_plugin.js
new file mode 100644
index 00000000..57ecce6e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlist/editor_plugin.js
@@ -0,0 +1 @@
+(function(){var a=tinymce.each;tinymce.create("tinymce.plugins.AdvListPlugin",{init:function(b,c){var d=this;d.editor=b;function e(g){var f=[];a(g.split(/,/),function(h){f.push({title:"advlist."+(h=="default"?"def":h.replace(/-/g,"_")),styles:{listStyleType:h=="default"?"":h}})});return f}d.numlist=b.getParam("advlist_number_styles")||e("default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman");d.bullist=b.getParam("advlist_bullet_styles")||e("default,circle,disc,square");if(tinymce.isIE&&/MSIE [2-7]/.test(navigator.userAgent)){d.isIE7=true}},createControl:function(d,b){var f=this,e,i,g=f.editor;if(d=="numlist"||d=="bullist"){if(f[d][0].title=="advlist.def"){i=f[d][0]}function c(j,l){var k=true;a(l.styles,function(n,m){if(g.dom.getStyle(j,m)!=n){k=false;return false}});return k}function h(){var k,l=g.dom,j=g.selection;k=l.getParent(j.getNode(),"ol,ul");if(!k||k.nodeName==(d=="bullist"?"OL":"UL")||c(k,i)){g.execCommand(d=="bullist"?"InsertUnorderedList":"InsertOrderedList")}if(i){k=l.getParent(j.getNode(),"ol,ul");if(k){l.setStyles(k,i.styles);k.removeAttribute("data-mce-style")}}g.focus()}e=b.createSplitButton(d,{title:"advanced."+d+"_desc","class":"mce_"+d,onclick:function(){h()}});e.onRenderMenu.add(function(j,k){k.onHideMenu.add(function(){if(f.bookmark){g.selection.moveToBookmark(f.bookmark);f.bookmark=0}});k.onShowMenu.add(function(){var n=g.dom,m=n.getParent(g.selection.getNode(),"ol,ul"),l;if(m||i){l=f[d];a(k.items,function(o){var p=true;o.setSelected(0);if(m&&!o.isDisabled()){a(l,function(q){if(q.id==o.id){if(!c(m,q)){p=false;return false}}});if(p){o.setSelected(1)}}});if(!m){k.items[i.id].setSelected(1)}}g.focus();if(tinymce.isIE){f.bookmark=g.selection.getBookmark(1)}});k.add({id:g.dom.uniqueId(),title:"advlist.types","class":"mceMenuItemTitle",titleItem:true}).setDisabled(1);a(f[d],function(l){if(f.isIE7&&l.styles.listStyleType=="lower-greek"){return}l.id=g.dom.uniqueId();k.add({id:l.id,title:l.title,onclick:function(){i=l;h()}})})});return e}},getInfo:function(){return{longname:"Advanced lists",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlist",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advlist",tinymce.plugins.AdvListPlugin)})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlist/editor_plugin_src.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlist/editor_plugin_src.js
new file mode 100644
index 00000000..a8f046b4
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/advlist/editor_plugin_src.js
@@ -0,0 +1,176 @@
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+ var each = tinymce.each;
+
+ tinymce.create('tinymce.plugins.AdvListPlugin', {
+ init : function(ed, url) {
+ var t = this;
+
+ t.editor = ed;
+
+ function buildFormats(str) {
+ var formats = [];
+
+ each(str.split(/,/), function(type) {
+ formats.push({
+ title : 'advlist.' + (type == 'default' ? 'def' : type.replace(/-/g, '_')),
+ styles : {
+ listStyleType : type == 'default' ? '' : type
+ }
+ });
+ });
+
+ return formats;
+ };
+
+ // Setup number formats from config or default
+ t.numlist = ed.getParam("advlist_number_styles") || buildFormats("default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman");
+ t.bullist = ed.getParam("advlist_bullet_styles") || buildFormats("default,circle,disc,square");
+
+ if (tinymce.isIE && /MSIE [2-7]/.test(navigator.userAgent))
+ t.isIE7 = true;
+ },
+
+ createControl: function(name, cm) {
+ var t = this, btn, format, editor = t.editor;
+
+ if (name == 'numlist' || name == 'bullist') {
+ // Default to first item if it's a default item
+ if (t[name][0].title == 'advlist.def')
+ format = t[name][0];
+
+ function hasFormat(node, format) {
+ var state = true;
+
+ each(format.styles, function(value, name) {
+ // Format doesn't match
+ if (editor.dom.getStyle(node, name) != value) {
+ state = false;
+ return false;
+ }
+ });
+
+ return state;
+ };
+
+ function applyListFormat() {
+ var list, dom = editor.dom, sel = editor.selection;
+
+ // Check for existing list element
+ list = dom.getParent(sel.getNode(), 'ol,ul');
+
+ // Switch/add list type if needed
+ if (!list || list.nodeName == (name == 'bullist' ? 'OL' : 'UL') || hasFormat(list, format))
+ editor.execCommand(name == 'bullist' ? 'InsertUnorderedList' : 'InsertOrderedList');
+
+ // Append styles to new list element
+ if (format) {
+ list = dom.getParent(sel.getNode(), 'ol,ul');
+ if (list) {
+ dom.setStyles(list, format.styles);
+ list.removeAttribute('data-mce-style');
+ }
+ }
+
+ editor.focus();
+ };
+
+ btn = cm.createSplitButton(name, {
+ title : 'advanced.' + name + '_desc',
+ 'class' : 'mce_' + name,
+ onclick : function() {
+ applyListFormat();
+ }
+ });
+
+ btn.onRenderMenu.add(function(btn, menu) {
+ menu.onHideMenu.add(function() {
+ if (t.bookmark) {
+ editor.selection.moveToBookmark(t.bookmark);
+ t.bookmark = 0;
+ }
+ });
+
+ menu.onShowMenu.add(function() {
+ var dom = editor.dom, list = dom.getParent(editor.selection.getNode(), 'ol,ul'), fmtList;
+
+ if (list || format) {
+ fmtList = t[name];
+
+ // Unselect existing items
+ each(menu.items, function(item) {
+ var state = true;
+
+ item.setSelected(0);
+
+ if (list && !item.isDisabled()) {
+ each(fmtList, function(fmt) {
+ if (fmt.id == item.id) {
+ if (!hasFormat(list, fmt)) {
+ state = false;
+ return false;
+ }
+ }
+ });
+
+ if (state)
+ item.setSelected(1);
+ }
+ });
+
+ // Select the current format
+ if (!list)
+ menu.items[format.id].setSelected(1);
+ }
+
+ editor.focus();
+
+ // IE looses it's selection so store it away and restore it later
+ if (tinymce.isIE) {
+ t.bookmark = editor.selection.getBookmark(1);
+ }
+ });
+
+ menu.add({id : editor.dom.uniqueId(), title : 'advlist.types', 'class' : 'mceMenuItemTitle', titleItem: true}).setDisabled(1);
+
+ each(t[name], function(item) {
+ // IE<8 doesn't support lower-greek, skip it
+ if (t.isIE7 && item.styles.listStyleType == 'lower-greek')
+ return;
+
+ item.id = editor.dom.uniqueId();
+
+ menu.add({id : item.id, title : item.title, onclick : function() {
+ format = item;
+ applyListFormat();
+ }});
+ });
+ });
+
+ return btn;
+ }
+ },
+
+ getInfo : function() {
+ return {
+ longname : 'Advanced lists',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlist',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ };
+ }
+ });
+
+ // Register plugin
+ tinymce.PluginManager.add('advlist', tinymce.plugins.AdvListPlugin);
+})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/autolink/editor_plugin.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/autolink/editor_plugin.js
new file mode 100644
index 00000000..d1c3502a
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/autolink/editor_plugin.js
@@ -0,0 +1 @@
+(function(){tinymce.create("tinymce.plugins.AutolinkPlugin",{init:function(a,b){var c=this;a.onKeyDown.addToTop(function(d,f){if(f.keyCode==13){return c.handleEnter(d)}});if(tinyMCE.isIE){return}a.onKeyPress.add(function(d,f){if(f.which==41){return c.handleEclipse(d)}});a.onKeyUp.add(function(d,f){if(f.keyCode==32){return c.handleSpacebar(d)}})},handleEclipse:function(a){this.parseCurrentLine(a,-1,"(",true)},handleSpacebar:function(a){this.parseCurrentLine(a,0,"",true)},handleEnter:function(a){this.parseCurrentLine(a,-1,"",false)},parseCurrentLine:function(i,d,b,g){var a,f,c,n,k,m,h,e,j;a=i.selection.getRng(true).cloneRange();if(a.startOffset<5){e=a.endContainer.previousSibling;if(e==null){if(a.endContainer.firstChild==null||a.endContainer.firstChild.nextSibling==null){return}e=a.endContainer.firstChild.nextSibling}j=e.length;a.setStart(e,j);a.setEnd(e,j);if(a.endOffset<5){return}f=a.endOffset;n=e}else{n=a.endContainer;if(n.nodeType!=3&&n.firstChild){while(n.nodeType!=3&&n.firstChild){n=n.firstChild}if(n.nodeType==3){a.setStart(n,0);a.setEnd(n,n.nodeValue.length)}}if(a.endOffset==1){f=2}else{f=a.endOffset-1-d}}c=f;do{a.setStart(n,f-2);a.setEnd(n,f-1);f-=1}while(a.toString()!=" "&&a.toString()!=""&&a.toString().charCodeAt(0)!=160&&(f-2)>=0&&a.toString()!=b);if(a.toString()==b||a.toString().charCodeAt(0)==160){a.setStart(n,f);a.setEnd(n,c);f+=1}else{if(a.startOffset==0){a.setStart(n,0);a.setEnd(n,c)}else{a.setStart(n,f);a.setEnd(n,c)}}var m=a.toString();if(m.charAt(m.length-1)=="."){a.setEnd(n,c-1)}m=a.toString();h=m.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+-]+@)(.+)$/i);if(h){if(h[1]=="www."){h[1]="http://www."}else{if(/@$/.test(h[1])&&!/^mailto:/.test(h[1])){h[1]="mailto:"+h[1]}}k=i.selection.getBookmark();i.selection.setRng(a);tinyMCE.execCommand("createlink",false,h[1]+h[2]);i.selection.moveToBookmark(k);i.nodeChanged();if(tinyMCE.isWebKit){i.selection.collapse(false);var l=Math.min(n.length,c+1);a.setStart(n,l);a.setEnd(n,l);i.selection.setRng(a)}}},getInfo:function(){return{longname:"Autolink",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autolink",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("autolink",tinymce.plugins.AutolinkPlugin)})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/autolink/editor_plugin_src.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/autolink/editor_plugin_src.js
new file mode 100644
index 00000000..c05fbbc0
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/autolink/editor_plugin_src.js
@@ -0,0 +1,184 @@
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2011, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+ tinymce.create('tinymce.plugins.AutolinkPlugin', {
+ /**
+ * Initializes the plugin, this will be executed after the plugin has been created.
+ * This call is done before the editor instance has finished it's initialization so use the onInit event
+ * of the editor instance to intercept that event.
+ *
+ * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
+ * @param {string} url Absolute URL to where the plugin is located.
+ */
+
+ init : function(ed, url) {
+ var t = this;
+
+ // Add a key down handler
+ ed.onKeyDown.addToTop(function(ed, e) {
+ if (e.keyCode == 13)
+ return t.handleEnter(ed);
+ });
+
+ // Internet Explorer has built-in automatic linking for most cases
+ if (tinyMCE.isIE)
+ return;
+
+ ed.onKeyPress.add(function(ed, e) {
+ if (e.which == 41)
+ return t.handleEclipse(ed);
+ });
+
+ // Add a key up handler
+ ed.onKeyUp.add(function(ed, e) {
+ if (e.keyCode == 32)
+ return t.handleSpacebar(ed);
+ });
+ },
+
+ handleEclipse : function(ed) {
+ this.parseCurrentLine(ed, -1, '(', true);
+ },
+
+ handleSpacebar : function(ed) {
+ this.parseCurrentLine(ed, 0, '', true);
+ },
+
+ handleEnter : function(ed) {
+ this.parseCurrentLine(ed, -1, '', false);
+ },
+
+ parseCurrentLine : function(ed, end_offset, delimiter, goback) {
+ var r, end, start, endContainer, bookmark, text, matches, prev, len;
+
+ // We need at least five characters to form a URL,
+ // hence, at minimum, five characters from the beginning of the line.
+ r = ed.selection.getRng(true).cloneRange();
+ if (r.startOffset < 5) {
+ // During testing, the caret is placed inbetween two text nodes.
+ // The previous text node contains the URL.
+ prev = r.endContainer.previousSibling;
+ if (prev == null) {
+ if (r.endContainer.firstChild == null || r.endContainer.firstChild.nextSibling == null)
+ return;
+
+ prev = r.endContainer.firstChild.nextSibling;
+ }
+ len = prev.length;
+ r.setStart(prev, len);
+ r.setEnd(prev, len);
+
+ if (r.endOffset < 5)
+ return;
+
+ end = r.endOffset;
+ endContainer = prev;
+ } else {
+ endContainer = r.endContainer;
+
+ // Get a text node
+ if (endContainer.nodeType != 3 && endContainer.firstChild) {
+ while (endContainer.nodeType != 3 && endContainer.firstChild)
+ endContainer = endContainer.firstChild;
+
+ // Move range to text node
+ if (endContainer.nodeType == 3) {
+ r.setStart(endContainer, 0);
+ r.setEnd(endContainer, endContainer.nodeValue.length);
+ }
+ }
+
+ if (r.endOffset == 1)
+ end = 2;
+ else
+ end = r.endOffset - 1 - end_offset;
+ }
+
+ start = end;
+
+ do
+ {
+ // Move the selection one character backwards.
+ r.setStart(endContainer, end - 2);
+ r.setEnd(endContainer, end - 1);
+ end -= 1;
+
+ // Loop until one of the following is found: a blank space, &nbsp;, delimeter, (end-2) >= 0
+ } while (r.toString() != ' ' && r.toString() != '' && r.toString().charCodeAt(0) != 160 && (end -2) >= 0 && r.toString() != delimiter);
+
+ if (r.toString() == delimiter || r.toString().charCodeAt(0) == 160) {
+ r.setStart(endContainer, end);
+ r.setEnd(endContainer, start);
+ end += 1;
+ } else if (r.startOffset == 0) {
+ r.setStart(endContainer, 0);
+ r.setEnd(endContainer, start);
+ }
+ else {
+ r.setStart(endContainer, end);
+ r.setEnd(endContainer, start);
+ }
+
+ // Exclude last . from word like "www.site.com."
+ var text = r.toString();
+ if (text.charAt(text.length - 1) == '.') {
+ r.setEnd(endContainer, start - 1);
+ }
+
+ text = r.toString();
+ matches = text.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+-]+@)(.+)$/i);
+
+ if (matches) {
+ if (matches[1] == 'www.') {
+ matches[1] = 'http://www.';
+ } else if (/@$/.test(matches[1]) && !/^mailto:/.test(matches[1])) {
+ matches[1] = 'mailto:' + matches[1];
+ }
+
+ bookmark = ed.selection.getBookmark();
+
+ ed.selection.setRng(r);
+ tinyMCE.execCommand('createlink',false, matches[1] + matches[2]);
+ ed.selection.moveToBookmark(bookmark);
+ ed.nodeChanged();
+
+ // TODO: Determine if this is still needed.
+ if (tinyMCE.isWebKit) {
+ // move the caret to its original position
+ ed.selection.collapse(false);
+ var max = Math.min(endContainer.length, start + 1);
+ r.setStart(endContainer, max);
+ r.setEnd(endContainer, max);
+ ed.selection.setRng(r);
+ }
+ }
+ },
+
+ /**
+ * Returns information about the plugin as a name/value array.
+ * The current keys are longname, author, authorurl, infourl and version.
+ *
+ * @return {Object} Name/value array containing information about the plugin.
+ */
+ getInfo : function() {
+ return {
+ longname : 'Autolink',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autolink',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ };
+ }
+ });
+
+ // Register plugin
+ tinymce.PluginManager.add('autolink', tinymce.plugins.AutolinkPlugin);
+})();
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/autoresize/editor_plugin.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/autoresize/editor_plugin.js
new file mode 100644
index 00000000..46d9dc3d
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/autoresize/editor_plugin.js
@@ -0,0 +1 @@
+(function(){tinymce.create("tinymce.plugins.AutoResizePlugin",{init:function(a,c){var d=this,e=0;if(a.getParam("fullscreen_is_enabled")){return}function b(){var j,i=a.getDoc(),f=i.body,l=i.documentElement,h=tinymce.DOM,k=d.autoresize_min_height,g;g=tinymce.isIE?f.scrollHeight:(tinymce.isWebKit&&f.clientHeight==0?0:f.offsetHeight);if(g>d.autoresize_min_height){k=g}if(d.autoresize_max_height&&g>d.autoresize_max_height){k=d.autoresize_max_height;f.style.overflowY="auto";l.style.overflowY="auto"}else{f.style.overflowY="hidden";l.style.overflowY="hidden";f.scrollTop=0}if(k!==e){j=k-e;h.setStyle(h.get(a.id+"_ifr"),"height",k+"px");e=k;if(tinymce.isWebKit&&j<0){b()}}}d.editor=a;d.autoresize_min_height=parseInt(a.getParam("autoresize_min_height",a.getElement().offsetHeight));d.autoresize_max_height=parseInt(a.getParam("autoresize_max_height",0));a.onInit.add(function(f){f.dom.setStyle(f.getBody(),"paddingBottom",f.getParam("autoresize_bottom_margin",50)+"px")});a.onChange.add(b);a.onSetContent.add(b);a.onPaste.add(b);a.onKeyUp.add(b);a.onPostRender.add(b);if(a.getParam("autoresize_on_init",true)){a.onLoad.add(b);a.onLoadContent.add(b)}a.addCommand("mceAutoResize",b)},getInfo:function(){return{longname:"Auto Resize",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autoresize",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("autoresize",tinymce.plugins.AutoResizePlugin)})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/autoresize/editor_plugin_src.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/autoresize/editor_plugin_src.js
new file mode 100644
index 00000000..7673bcff
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/autoresize/editor_plugin_src.js
@@ -0,0 +1,119 @@
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+ /**
+ * Auto Resize
+ *
+ * This plugin automatically resizes the content area to fit its content height.
+ * It will retain a minimum height, which is the height of the content area when
+ * it's initialized.
+ */
+ tinymce.create('tinymce.plugins.AutoResizePlugin', {
+ /**
+ * Initializes the plugin, this will be executed after the plugin has been created.
+ * This call is done before the editor instance has finished it's initialization so use the onInit event
+ * of the editor instance to intercept that event.
+ *
+ * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
+ * @param {string} url Absolute URL to where the plugin is located.
+ */
+ init : function(ed, url) {
+ var t = this, oldSize = 0;
+
+ if (ed.getParam('fullscreen_is_enabled'))
+ return;
+
+ /**
+ * This method gets executed each time the editor needs to resize.
+ */
+ function resize() {
+ var deltaSize, d = ed.getDoc(), body = d.body, de = d.documentElement, DOM = tinymce.DOM, resizeHeight = t.autoresize_min_height, myHeight;
+
+ // Get height differently depending on the browser used
+ myHeight = tinymce.isIE ? body.scrollHeight : (tinymce.isWebKit && body.clientHeight == 0 ? 0 : body.offsetHeight);
+
+ // Don't make it smaller than the minimum height
+ if (myHeight > t.autoresize_min_height)
+ resizeHeight = myHeight;
+
+ // If a maximum height has been defined don't exceed this height
+ if (t.autoresize_max_height && myHeight > t.autoresize_max_height) {
+ resizeHeight = t.autoresize_max_height;
+ body.style.overflowY = "auto";
+ de.style.overflowY = "auto"; // Old IE
+ } else {
+ body.style.overflowY = "hidden";
+ de.style.overflowY = "hidden"; // Old IE
+ body.scrollTop = 0;
+ }
+
+ // Resize content element
+ if (resizeHeight !== oldSize) {
+ deltaSize = resizeHeight - oldSize;
+ DOM.setStyle(DOM.get(ed.id + '_ifr'), 'height', resizeHeight + 'px');
+ oldSize = resizeHeight;
+
+ // WebKit doesn't decrease the size of the body element until the iframe gets resized
+ // So we need to continue to resize the iframe down until the size gets fixed
+ if (tinymce.isWebKit && deltaSize < 0)
+ resize();
+ }
+ };
+
+ t.editor = ed;
+
+ // Define minimum height
+ t.autoresize_min_height = parseInt(ed.getParam('autoresize_min_height', ed.getElement().offsetHeight));
+
+ // Define maximum height
+ t.autoresize_max_height = parseInt(ed.getParam('autoresize_max_height', 0));
+
+ // Add padding at the bottom for better UX
+ ed.onInit.add(function(ed){
+ ed.dom.setStyle(ed.getBody(), 'paddingBottom', ed.getParam('autoresize_bottom_margin', 50) + 'px');
+ });
+
+ // Add appropriate listeners for resizing content area
+ ed.onChange.add(resize);
+ ed.onSetContent.add(resize);
+ ed.onPaste.add(resize);
+ ed.onKeyUp.add(resize);
+ ed.onPostRender.add(resize);
+
+ if (ed.getParam('autoresize_on_init', true)) {
+ ed.onLoad.add(resize);
+ ed.onLoadContent.add(resize);
+ }
+
+ // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample');
+ ed.addCommand('mceAutoResize', resize);
+ },
+
+ /**
+ * Returns information about the plugin as a name/value array.
+ * The current keys are longname, author, authorurl, infourl and version.
+ *
+ * @return {Object} Name/value array containing information about the plugin.
+ */
+ getInfo : function() {
+ return {
+ longname : 'Auto Resize',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autoresize',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ };
+ }
+ });
+
+ // Register plugin
+ tinymce.PluginManager.add('autoresize', tinymce.plugins.AutoResizePlugin);
+})();
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/autosave/editor_plugin.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/autosave/editor_plugin.js
new file mode 100755
index 00000000..6da98ff3
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/autosave/editor_plugin.js
@@ -0,0 +1 @@
+(function(e){var c="autosave",g="restoredraft",b=true,f,d,a=e.util.Dispatcher;e.create("tinymce.plugins.AutoSave",{init:function(i,j){var h=this,l=i.settings;h.editor=i;function k(n){var m={s:1000,m:60000};n=/^(\d+)([ms]?)$/.exec(""+n);return(n[2]?m[n[2]]:1)*parseInt(n)}e.each({ask_before_unload:b,interval:"30s",retention:"20m",minlength:50},function(n,m){m=c+"_"+m;if(l[m]===f){l[m]=n}});l.autosave_interval=k(l.autosave_interval);l.autosave_retention=k(l.autosave_retention);i.addButton(g,{title:c+".restore_content",onclick:function(){if(i.getContent({draft:true}).replace(/\s|&nbsp;|<\/?p[^>]*>|<br[^>]*>/gi,"").length>0){i.windowManager.confirm(c+".warning_message",function(m){if(m){h.restoreDraft()}})}else{h.restoreDraft()}}});i.onNodeChange.add(function(){var m=i.controlManager;if(m.get(g)){m.setDisabled(g,!h.hasDraft())}});i.onInit.add(function(){if(i.controlManager.get(g)){h.setupStorage(i);setInterval(function(){if(!i.removed){h.storeDraft();i.nodeChanged()}},l.autosave_interval)}});h.onStoreDraft=new a(h);h.onRestoreDraft=new a(h);h.onRemoveDraft=new a(h);if(!d){window.onbeforeunload=e.plugins.AutoSave._beforeUnloadHandler;d=b}},getInfo:function(){return{longname:"Auto save",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autosave",version:e.majorVersion+"."+e.minorVersion}},getExpDate:function(){return new Date(new Date().getTime()+this.editor.settings.autosave_retention).toUTCString()},setupStorage:function(i){var h=this,k=c+"_test",j="OK";h.key=c+i.id;e.each([function(){if(localStorage){localStorage.setItem(k,j);if(localStorage.getItem(k)===j){localStorage.removeItem(k);return localStorage}}},function(){if(sessionStorage){sessionStorage.setItem(k,j);if(sessionStorage.getItem(k)===j){sessionStorage.removeItem(k);return sessionStorage}}},function(){if(e.isIE){i.getElement().style.behavior="url('#default#userData')";return{autoExpires:b,setItem:function(l,n){var m=i.getElement();m.setAttribute(l,n);m.expires=h.getExpDate();try{m.save("TinyMCE")}catch(o){}},getItem:function(l){var m=i.getElement();try{m.load("TinyMCE");return m.getAttribute(l)}catch(n){return null}},removeItem:function(l){i.getElement().removeAttribute(l)}}}},],function(l){try{h.storage=l();if(h.storage){return false}}catch(m){}})},storeDraft:function(){var i=this,l=i.storage,j=i.editor,h,k;if(l){if(!l.getItem(i.key)&&!j.isDirty()){return}k=j.getContent({draft:true});if(k.length>j.settings.autosave_minlength){h=i.getExpDate();if(!i.storage.autoExpires){i.storage.setItem(i.key+"_expires",h)}i.storage.setItem(i.key,k);i.onStoreDraft.dispatch(i,{expires:h,content:k})}}},restoreDraft:function(){var h=this,j=h.storage,i;if(j){i=j.getItem(h.key);if(i){h.editor.setContent(i);h.onRestoreDraft.dispatch(h,{content:i})}}},hasDraft:function(){var h=this,k=h.storage,i,j;if(k){j=!!k.getItem(h.key);if(j){if(!h.storage.autoExpires){i=new Date(k.getItem(h.key+"_expires"));if(new Date().getTime()<i.getTime()){return b}h.removeDraft()}else{return b}}}return false},removeDraft:function(){var h=this,k=h.storage,i=h.key,j;if(k){j=k.getItem(i);k.removeItem(i);k.removeItem(i+"_expires");if(j){h.onRemoveDraft.dispatch(h,{content:j})}}},"static":{_beforeUnloadHandler:function(h){var i;e.each(tinyMCE.editors,function(j){if(j.plugins.autosave){j.plugins.autosave.storeDraft()}if(j.getParam("fullscreen_is_enabled")){return}if(!i&&j.isDirty()&&j.getParam("autosave_ask_before_unload")){i=j.getLang("autosave.unload_msg")}});return i}}});e.PluginManager.add("autosave",e.plugins.AutoSave)})(tinymce); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/autosave/editor_plugin_src.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/autosave/editor_plugin_src.js
new file mode 100755
index 00000000..8b308f5a
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/autosave/editor_plugin_src.js
@@ -0,0 +1,433 @@
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ *
+ * Adds auto-save capability to the TinyMCE text editor to rescue content
+ * inadvertently lost. This plugin was originally developed by Speednet
+ * and that project can be found here: http://code.google.com/p/tinyautosave/
+ *
+ * TECHNOLOGY DISCUSSION:
+ *
+ * The plugin attempts to use the most advanced features available in the current browser to save
+ * as much content as possible. There are a total of four different methods used to autosave the
+ * content. In order of preference, they are:
+ *
+ * 1. localStorage - A new feature of HTML 5, localStorage can store megabytes of data per domain
+ * on the client computer. Data stored in the localStorage area has no expiration date, so we must
+ * manage expiring the data ourselves. localStorage is fully supported by IE8, and it is supposed
+ * to be working in Firefox 3 and Safari 3.2, but in reality is is flaky in those browsers. As
+ * HTML 5 gets wider support, the AutoSave plugin will use it automatically. In Windows Vista/7,
+ * localStorage is stored in the following folder:
+ * C:\Users\[username]\AppData\Local\Microsoft\Internet Explorer\DOMStore\[tempFolder]
+ *
+ * 2. sessionStorage - A new feature of HTML 5, sessionStorage works similarly to localStorage,
+ * except it is designed to expire after a certain amount of time. Because the specification
+ * around expiration date/time is very loosely-described, it is preferrable to use locaStorage and
+ * manage the expiration ourselves. sessionStorage has similar storage characteristics to
+ * localStorage, although it seems to have better support by Firefox 3 at the moment. (That will
+ * certainly change as Firefox continues getting better at HTML 5 adoption.)
+ *
+ * 3. UserData - A very under-exploited feature of Microsoft Internet Explorer, UserData is a
+ * way to store up to 128K of data per "document", or up to 1MB of data per domain, on the client
+ * computer. The feature is available for IE 5+, which makes it available for every version of IE
+ * supported by TinyMCE. The content is persistent across browser restarts and expires on the
+ * date/time specified, just like a cookie. However, the data is not cleared when the user clears
+ * cookies on the browser, which makes it well-suited for rescuing autosaved content. UserData,
+ * like other Microsoft IE browser technologies, is implemented as a behavior attached to a
+ * specific DOM object, so in this case we attach the behavior to the same DOM element that the
+ * TinyMCE editor instance is attached to.
+ */
+
+(function(tinymce) {
+ // Setup constants to help the compressor to reduce script size
+ var PLUGIN_NAME = 'autosave',
+ RESTORE_DRAFT = 'restoredraft',
+ TRUE = true,
+ undefined,
+ unloadHandlerAdded,
+ Dispatcher = tinymce.util.Dispatcher;
+
+ /**
+ * This plugin adds auto-save capability to the TinyMCE text editor to rescue content
+ * inadvertently lost. By using localStorage.
+ *
+ * @class tinymce.plugins.AutoSave
+ */
+ tinymce.create('tinymce.plugins.AutoSave', {
+ /**
+ * Initializes the plugin, this will be executed after the plugin has been created.
+ * This call is done before the editor instance has finished it's initialization so use the onInit event
+ * of the editor instance to intercept that event.
+ *
+ * @method init
+ * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
+ * @param {string} url Absolute URL to where the plugin is located.
+ */
+ init : function(ed, url) {
+ var self = this, settings = ed.settings;
+
+ self.editor = ed;
+
+ // Parses the specified time string into a milisecond number 10m, 10s etc.
+ function parseTime(time) {
+ var multipels = {
+ s : 1000,
+ m : 60000
+ };
+
+ time = /^(\d+)([ms]?)$/.exec('' + time);
+
+ return (time[2] ? multipels[time[2]] : 1) * parseInt(time);
+ };
+
+ // Default config
+ tinymce.each({
+ ask_before_unload : TRUE,
+ interval : '30s',
+ retention : '20m',
+ minlength : 50
+ }, function(value, key) {
+ key = PLUGIN_NAME + '_' + key;
+
+ if (settings[key] === undefined)
+ settings[key] = value;
+ });
+
+ // Parse times
+ settings.autosave_interval = parseTime(settings.autosave_interval);
+ settings.autosave_retention = parseTime(settings.autosave_retention);
+
+ // Register restore button
+ ed.addButton(RESTORE_DRAFT, {
+ title : PLUGIN_NAME + ".restore_content",
+ onclick : function() {
+ if (ed.getContent({draft: true}).replace(/\s|&nbsp;|<\/?p[^>]*>|<br[^>]*>/gi, "").length > 0) {
+ // Show confirm dialog if the editor isn't empty
+ ed.windowManager.confirm(
+ PLUGIN_NAME + ".warning_message",
+ function(ok) {
+ if (ok)
+ self.restoreDraft();
+ }
+ );
+ } else
+ self.restoreDraft();
+ }
+ });
+
+ // Enable/disable restoredraft button depending on if there is a draft stored or not
+ ed.onNodeChange.add(function() {
+ var controlManager = ed.controlManager;
+
+ if (controlManager.get(RESTORE_DRAFT))
+ controlManager.setDisabled(RESTORE_DRAFT, !self.hasDraft());
+ });
+
+ ed.onInit.add(function() {
+ // Check if the user added the restore button, then setup auto storage logic
+ if (ed.controlManager.get(RESTORE_DRAFT)) {
+ // Setup storage engine
+ self.setupStorage(ed);
+
+ // Auto save contents each interval time
+ setInterval(function() {
+ if (!ed.removed) {
+ self.storeDraft();
+ ed.nodeChanged();
+ }
+ }, settings.autosave_interval);
+ }
+ });
+
+ /**
+ * This event gets fired when a draft is stored to local storage.
+ *
+ * @event onStoreDraft
+ * @param {tinymce.plugins.AutoSave} sender Plugin instance sending the event.
+ * @param {Object} draft Draft object containing the HTML contents of the editor.
+ */
+ self.onStoreDraft = new Dispatcher(self);
+
+ /**
+ * This event gets fired when a draft is restored from local storage.
+ *
+ * @event onStoreDraft
+ * @param {tinymce.plugins.AutoSave} sender Plugin instance sending the event.
+ * @param {Object} draft Draft object containing the HTML contents of the editor.
+ */
+ self.onRestoreDraft = new Dispatcher(self);
+
+ /**
+ * This event gets fired when a draft removed/expired.
+ *
+ * @event onRemoveDraft
+ * @param {tinymce.plugins.AutoSave} sender Plugin instance sending the event.
+ * @param {Object} draft Draft object containing the HTML contents of the editor.
+ */
+ self.onRemoveDraft = new Dispatcher(self);
+
+ // Add ask before unload dialog only add one unload handler
+ if (!unloadHandlerAdded) {
+ window.onbeforeunload = tinymce.plugins.AutoSave._beforeUnloadHandler;
+ unloadHandlerAdded = TRUE;
+ }
+ },
+
+ /**
+ * Returns information about the plugin as a name/value array.
+ * The current keys are longname, author, authorurl, infourl and version.
+ *
+ * @method getInfo
+ * @return {Object} Name/value array containing information about the plugin.
+ */
+ getInfo : function() {
+ return {
+ longname : 'Auto save',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autosave',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ };
+ },
+
+ /**
+ * Returns an expiration date UTC string.
+ *
+ * @method getExpDate
+ * @return {String} Expiration date UTC string.
+ */
+ getExpDate : function() {
+ return new Date(
+ new Date().getTime() + this.editor.settings.autosave_retention
+ ).toUTCString();
+ },
+
+ /**
+ * This method will setup the storage engine. If the browser has support for it.
+ *
+ * @method setupStorage
+ */
+ setupStorage : function(ed) {
+ var self = this, testKey = PLUGIN_NAME + '_test', testVal = "OK";
+
+ self.key = PLUGIN_NAME + ed.id;
+
+ // Loop though each storage engine type until we find one that works
+ tinymce.each([
+ function() {
+ // Try HTML5 Local Storage
+ if (localStorage) {
+ localStorage.setItem(testKey, testVal);
+
+ if (localStorage.getItem(testKey) === testVal) {
+ localStorage.removeItem(testKey);
+
+ return localStorage;
+ }
+ }
+ },
+
+ function() {
+ // Try HTML5 Session Storage
+ if (sessionStorage) {
+ sessionStorage.setItem(testKey, testVal);
+
+ if (sessionStorage.getItem(testKey) === testVal) {
+ sessionStorage.removeItem(testKey);
+
+ return sessionStorage;
+ }
+ }
+ },
+
+ function() {
+ // Try IE userData
+ if (tinymce.isIE) {
+ ed.getElement().style.behavior = "url('#default#userData')";
+
+ // Fake localStorage on old IE
+ return {
+ autoExpires : TRUE,
+
+ setItem : function(key, value) {
+ var userDataElement = ed.getElement();
+
+ userDataElement.setAttribute(key, value);
+ userDataElement.expires = self.getExpDate();
+
+ try {
+ userDataElement.save("TinyMCE");
+ } catch (e) {
+ // Ignore, saving might fail if "Userdata Persistence" is disabled in IE
+ }
+ },
+
+ getItem : function(key) {
+ var userDataElement = ed.getElement();
+
+ try {
+ userDataElement.load("TinyMCE");
+ return userDataElement.getAttribute(key);
+ } catch (e) {
+ // Ignore, loading might fail if "Userdata Persistence" is disabled in IE
+ return null;
+ }
+ },
+
+ removeItem : function(key) {
+ ed.getElement().removeAttribute(key);
+ }
+ };
+ }
+ },
+ ], function(setup) {
+ // Try executing each function to find a suitable storage engine
+ try {
+ self.storage = setup();
+
+ if (self.storage)
+ return false;
+ } catch (e) {
+ // Ignore
+ }
+ });
+ },
+
+ /**
+ * This method will store the current contents in the the storage engine.
+ *
+ * @method storeDraft
+ */
+ storeDraft : function() {
+ var self = this, storage = self.storage, editor = self.editor, expires, content;
+
+ // Is the contents dirty
+ if (storage) {
+ // If there is no existing key and the contents hasn't been changed since
+ // it's original value then there is no point in saving a draft
+ if (!storage.getItem(self.key) && !editor.isDirty())
+ return;
+
+ // Store contents if the contents if longer than the minlength of characters
+ content = editor.getContent({draft: true});
+ if (content.length > editor.settings.autosave_minlength) {
+ expires = self.getExpDate();
+
+ // Store expiration date if needed IE userData has auto expire built in
+ if (!self.storage.autoExpires)
+ self.storage.setItem(self.key + "_expires", expires);
+
+ self.storage.setItem(self.key, content);
+ self.onStoreDraft.dispatch(self, {
+ expires : expires,
+ content : content
+ });
+ }
+ }
+ },
+
+ /**
+ * This method will restore the contents from the storage engine back to the editor.
+ *
+ * @method restoreDraft
+ */
+ restoreDraft : function() {
+ var self = this, storage = self.storage, content;
+
+ if (storage) {
+ content = storage.getItem(self.key);
+
+ if (content) {
+ self.editor.setContent(content);
+ self.onRestoreDraft.dispatch(self, {
+ content : content
+ });
+ }
+ }
+ },
+
+ /**
+ * This method will return true/false if there is a local storage draft available.
+ *
+ * @method hasDraft
+ * @return {boolean} true/false state if there is a local draft.
+ */
+ hasDraft : function() {
+ var self = this, storage = self.storage, expDate, exists;
+
+ if (storage) {
+ // Does the item exist at all
+ exists = !!storage.getItem(self.key);
+ if (exists) {
+ // Storage needs autoexpire
+ if (!self.storage.autoExpires) {
+ expDate = new Date(storage.getItem(self.key + "_expires"));
+
+ // Contents hasn't expired
+ if (new Date().getTime() < expDate.getTime())
+ return TRUE;
+
+ // Remove it if it has
+ self.removeDraft();
+ } else
+ return TRUE;
+ }
+ }
+
+ return false;
+ },
+
+ /**
+ * Removes the currently stored draft.
+ *
+ * @method removeDraft
+ */
+ removeDraft : function() {
+ var self = this, storage = self.storage, key = self.key, content;
+
+ if (storage) {
+ // Get current contents and remove the existing draft
+ content = storage.getItem(key);
+ storage.removeItem(key);
+ storage.removeItem(key + "_expires");
+
+ // Dispatch remove event if we had any contents
+ if (content) {
+ self.onRemoveDraft.dispatch(self, {
+ content : content
+ });
+ }
+ }
+ },
+
+ "static" : {
+ // Internal unload handler will be called before the page is unloaded
+ _beforeUnloadHandler : function(e) {
+ var msg;
+
+ tinymce.each(tinyMCE.editors, function(ed) {
+ // Store a draft for each editor instance
+ if (ed.plugins.autosave)
+ ed.plugins.autosave.storeDraft();
+
+ // Never ask in fullscreen mode
+ if (ed.getParam("fullscreen_is_enabled"))
+ return;
+
+ // Setup a return message if the editor is dirty
+ if (!msg && ed.isDirty() && ed.getParam("autosave_ask_before_unload"))
+ msg = ed.getLang("autosave.unload_msg");
+ });
+
+ return msg;
+ }
+ }
+ });
+
+ tinymce.PluginManager.add('autosave', tinymce.plugins.AutoSave);
+})(tinymce);
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/autosave/langs/en.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/autosave/langs/en.js
new file mode 100755
index 00000000..fce6bd3e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/autosave/langs/en.js
@@ -0,0 +1,4 @@
+tinyMCE.addI18n('en.autosave',{
+restore_content: "Restore auto-saved content",
+warning_message: "If you restore the saved content, you will lose all the content that is currently in the editor.\n\nAre you sure you want to restore the saved content?"
+}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/bbcode/editor_plugin.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/bbcode/editor_plugin.js
new file mode 100755
index 00000000..8f8821fd
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/bbcode/editor_plugin.js
@@ -0,0 +1 @@
+(function(){tinymce.create("tinymce.plugins.BBCodePlugin",{init:function(a,b){var d=this,c=a.getParam("bbcode_dialect","punbb").toLowerCase();a.onBeforeSetContent.add(function(e,f){f.content=d["_"+c+"_bbcode2html"](f.content)});a.onPostProcess.add(function(e,f){if(f.set){f.content=d["_"+c+"_bbcode2html"](f.content)}if(f.get){f.content=d["_"+c+"_html2bbcode"](f.content)}})},getInfo:function(){return{longname:"BBCode Plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/bbcode",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_punbb_html2bbcode:function(a){a=tinymce.trim(a);function b(c,d){a=a.replace(c,d)}b(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]");b(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");b(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");b(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");b(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");b(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]");b(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[color=$1]$2[/color]");b(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]");b(/<font>(.*?)<\/font>/gi,"$1");b(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]");b(/<span class=\"codeStyle\">(.*?)<\/span>/gi,"[code]$1[/code]");b(/<span class=\"quoteStyle\">(.*?)<\/span>/gi,"[quote]$1[/quote]");b(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]");b(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]");b(/<em class=\"codeStyle\">(.*?)<\/em>/gi,"[code][i]$1[/i][/code]");b(/<em class=\"quoteStyle\">(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]");b(/<u class=\"codeStyle\">(.*?)<\/u>/gi,"[code][u]$1[/u][/code]");b(/<u class=\"quoteStyle\">(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]");b(/<\/(strong|b)>/gi,"[/b]");b(/<(strong|b)>/gi,"[b]");b(/<\/(em|i)>/gi,"[/i]");b(/<(em|i)>/gi,"[i]");b(/<\/u>/gi,"[/u]");b(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi,"[u]$1[/u]");b(/<u>/gi,"[u]");b(/<blockquote[^>]*>/gi,"[quote]");b(/<\/blockquote>/gi,"[/quote]");b(/<br \/>/gi,"\n");b(/<br\/>/gi,"\n");b(/<br>/gi,"\n");b(/<p>/gi,"");b(/<\/p>/gi,"\n");b(/&nbsp;|\u00a0/gi," ");b(/&quot;/gi,'"');b(/&lt;/gi,"<");b(/&gt;/gi,">");b(/&amp;/gi,"&");return a},_punbb_bbcode2html:function(a){a=tinymce.trim(a);function b(c,d){a=a.replace(c,d)}b(/\n/gi,"<br />");b(/\[b\]/gi,"<strong>");b(/\[\/b\]/gi,"</strong>");b(/\[i\]/gi,"<em>");b(/\[\/i\]/gi,"</em>");b(/\[u\]/gi,"<u>");b(/\[\/u\]/gi,"</u>");b(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'<a href="$1">$2</a>');b(/\[url\](.*?)\[\/url\]/gi,'<a href="$1">$1</a>');b(/\[img\](.*?)\[\/img\]/gi,'<img src="$1" />');b(/\[color=(.*?)\](.*?)\[\/color\]/gi,'<font color="$1">$2</font>');b(/\[code\](.*?)\[\/code\]/gi,'<span class="codeStyle">$1</span>&nbsp;');b(/\[quote.*?\](.*?)\[\/quote\]/gi,'<span class="quoteStyle">$1</span>&nbsp;');return a}});tinymce.PluginManager.add("bbcode",tinymce.plugins.BBCodePlugin)})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/bbcode/editor_plugin_src.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/bbcode/editor_plugin_src.js
new file mode 100755
index 00000000..4e7eb337
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/bbcode/editor_plugin_src.js
@@ -0,0 +1,120 @@
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+ tinymce.create('tinymce.plugins.BBCodePlugin', {
+ init : function(ed, url) {
+ var t = this, dialect = ed.getParam('bbcode_dialect', 'punbb').toLowerCase();
+
+ ed.onBeforeSetContent.add(function(ed, o) {
+ o.content = t['_' + dialect + '_bbcode2html'](o.content);
+ });
+
+ ed.onPostProcess.add(function(ed, o) {
+ if (o.set)
+ o.content = t['_' + dialect + '_bbcode2html'](o.content);
+
+ if (o.get)
+ o.content = t['_' + dialect + '_html2bbcode'](o.content);
+ });
+ },
+
+ getInfo : function() {
+ return {
+ longname : 'BBCode Plugin',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/bbcode',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ };
+ },
+
+ // Private methods
+
+ // HTML -> BBCode in PunBB dialect
+ _punbb_html2bbcode : function(s) {
+ s = tinymce.trim(s);
+
+ function rep(re, str) {
+ s = s.replace(re, str);
+ };
+
+ // example: <strong> to [b]
+ rep(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]");
+ rep(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");
+ rep(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");
+ rep(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");
+ rep(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");
+ rep(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]");
+ rep(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[color=$1]$2[/color]");
+ rep(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]");
+ rep(/<font>(.*?)<\/font>/gi,"$1");
+ rep(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]");
+ rep(/<span class=\"codeStyle\">(.*?)<\/span>/gi,"[code]$1[/code]");
+ rep(/<span class=\"quoteStyle\">(.*?)<\/span>/gi,"[quote]$1[/quote]");
+ rep(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]");
+ rep(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]");
+ rep(/<em class=\"codeStyle\">(.*?)<\/em>/gi,"[code][i]$1[/i][/code]");
+ rep(/<em class=\"quoteStyle\">(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]");
+ rep(/<u class=\"codeStyle\">(.*?)<\/u>/gi,"[code][u]$1[/u][/code]");
+ rep(/<u class=\"quoteStyle\">(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]");
+ rep(/<\/(strong|b)>/gi,"[/b]");
+ rep(/<(strong|b)>/gi,"[b]");
+ rep(/<\/(em|i)>/gi,"[/i]");
+ rep(/<(em|i)>/gi,"[i]");
+ rep(/<\/u>/gi,"[/u]");
+ rep(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi,"[u]$1[/u]");
+ rep(/<u>/gi,"[u]");
+ rep(/<blockquote[^>]*>/gi,"[quote]");
+ rep(/<\/blockquote>/gi,"[/quote]");
+ rep(/<br \/>/gi,"\n");
+ rep(/<br\/>/gi,"\n");
+ rep(/<br>/gi,"\n");
+ rep(/<p>/gi,"");
+ rep(/<\/p>/gi,"\n");
+ rep(/&nbsp;|\u00a0/gi," ");
+ rep(/&quot;/gi,"\"");
+ rep(/&lt;/gi,"<");
+ rep(/&gt;/gi,">");
+ rep(/&amp;/gi,"&");
+
+ return s;
+ },
+
+ // BBCode -> HTML from PunBB dialect
+ _punbb_bbcode2html : function(s) {
+ s = tinymce.trim(s);
+
+ function rep(re, str) {
+ s = s.replace(re, str);
+ };
+
+ // example: [b] to <strong>
+ rep(/\n/gi,"<br />");
+ rep(/\[b\]/gi,"<strong>");
+ rep(/\[\/b\]/gi,"</strong>");
+ rep(/\[i\]/gi,"<em>");
+ rep(/\[\/i\]/gi,"</em>");
+ rep(/\[u\]/gi,"<u>");
+ rep(/\[\/u\]/gi,"</u>");
+ rep(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,"<a href=\"$1\">$2</a>");
+ rep(/\[url\](.*?)\[\/url\]/gi,"<a href=\"$1\">$1</a>");
+ rep(/\[img\](.*?)\[\/img\]/gi,"<img src=\"$1\" />");
+ rep(/\[color=(.*?)\](.*?)\[\/color\]/gi,"<font color=\"$1\">$2</font>");
+ rep(/\[code\](.*?)\[\/code\]/gi,"<span class=\"codeStyle\">$1</span>&nbsp;");
+ rep(/\[quote.*?\](.*?)\[\/quote\]/gi,"<span class=\"quoteStyle\">$1</span>&nbsp;");
+
+ return s;
+ }
+ });
+
+ // Register plugin
+ tinymce.PluginManager.add('bbcode', tinymce.plugins.BBCodePlugin);
+})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/contextmenu/editor_plugin.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/contextmenu/editor_plugin.js
new file mode 100755
index 00000000..2ed042c3
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/contextmenu/editor_plugin.js
@@ -0,0 +1 @@
+(function(){var a=tinymce.dom.Event,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.ContextMenu",{init:function(f){var i=this,g,d,j,e;i.editor=f;d=f.settings.contextmenu_never_use_native;i.onContextMenu=new tinymce.util.Dispatcher(this);e=function(k){h(f,k)};g=f.onContextMenu.add(function(k,l){if((j!==0?j:l.ctrlKey)&&!d){return}a.cancel(l);if(l.target.nodeName=="IMG"){k.selection.select(l.target)}i._getMenu(k).showMenu(l.clientX||l.pageX,l.clientY||l.pageY);a.add(k.getDoc(),"click",e);k.nodeChanged()});f.onRemove.add(function(){if(i._menu){i._menu.removeAll()}});function h(k,l){j=0;if(l&&l.button==2){j=l.ctrlKey;return}if(i._menu){i._menu.removeAll();i._menu.destroy();a.remove(k.getDoc(),"click",e);i._menu=null}}f.onMouseDown.add(h);f.onKeyDown.add(h);f.onKeyDown.add(function(k,l){if(l.shiftKey&&!l.ctrlKey&&!l.altKey&&l.keyCode===121){a.cancel(l);g(k,l)}})},getInfo:function(){return{longname:"Contextmenu",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/contextmenu",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_getMenu:function(e){var g=this,d=g._menu,j=e.selection,f=j.isCollapsed(),h=j.getNode()||e.getBody(),i,k;if(d){d.removeAll();d.destroy()}k=b.getPos(e.getContentAreaContainer());d=e.controlManager.createDropMenu("contextmenu",{offset_x:k.x+e.getParam("contextmenu_offset_x",0),offset_y:k.y+e.getParam("contextmenu_offset_y",0),constrain:1,keyboard_focus:true});g._menu=d;d.add({title:"advanced.cut_desc",icon:"cut",cmd:"Cut"}).setDisabled(f);d.add({title:"advanced.copy_desc",icon:"copy",cmd:"Copy"}).setDisabled(f);d.add({title:"advanced.paste_desc",icon:"paste",cmd:"Paste"});if((h.nodeName=="A"&&!e.dom.getAttrib(h,"name"))||!f){d.addSeparator();d.add({title:"advanced.link_desc",icon:"link",cmd:e.plugins.advlink?"mceAdvLink":"mceLink",ui:true});d.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"})}d.addSeparator();d.add({title:"advanced.image_desc",icon:"image",cmd:e.plugins.advimage?"mceAdvImage":"mceImage",ui:true});d.addSeparator();i=d.addMenu({title:"contextmenu.align"});i.add({title:"contextmenu.left",icon:"justifyleft",cmd:"JustifyLeft"});i.add({title:"contextmenu.center",icon:"justifycenter",cmd:"JustifyCenter"});i.add({title:"contextmenu.right",icon:"justifyright",cmd:"JustifyRight"});i.add({title:"contextmenu.full",icon:"justifyfull",cmd:"JustifyFull"});g.onContextMenu.dispatch(g,d,h,f);return d}});tinymce.PluginManager.add("contextmenu",tinymce.plugins.ContextMenu)})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/contextmenu/editor_plugin_src.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/contextmenu/editor_plugin_src.js
new file mode 100755
index 00000000..48b0fff9
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/contextmenu/editor_plugin_src.js
@@ -0,0 +1,163 @@
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+ var Event = tinymce.dom.Event, each = tinymce.each, DOM = tinymce.DOM;
+
+ /**
+ * This plugin a context menu to TinyMCE editor instances.
+ *
+ * @class tinymce.plugins.ContextMenu
+ */
+ tinymce.create('tinymce.plugins.ContextMenu', {
+ /**
+ * Initializes the plugin, this will be executed after the plugin has been created.
+ * This call is done before the editor instance has finished it's initialization so use the onInit event
+ * of the editor instance to intercept that event.
+ *
+ * @method init
+ * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
+ * @param {string} url Absolute URL to where the plugin is located.
+ */
+ init : function(ed) {
+ var t = this, showMenu, contextmenuNeverUseNative, realCtrlKey, hideMenu;
+
+ t.editor = ed;
+
+ contextmenuNeverUseNative = ed.settings.contextmenu_never_use_native;
+
+ /**
+ * This event gets fired when the context menu is shown.
+ *
+ * @event onContextMenu
+ * @param {tinymce.plugins.ContextMenu} sender Plugin instance sending the event.
+ * @param {tinymce.ui.DropMenu} menu Drop down menu to fill with more items if needed.
+ */
+ t.onContextMenu = new tinymce.util.Dispatcher(this);
+
+ hideMenu = function(e) {
+ hide(ed, e);
+ };
+
+ showMenu = ed.onContextMenu.add(function(ed, e) {
+ // Block TinyMCE menu on ctrlKey and work around Safari issue
+ if ((realCtrlKey !== 0 ? realCtrlKey : e.ctrlKey) && !contextmenuNeverUseNative)
+ return;
+
+ Event.cancel(e);
+
+ // Select the image if it's clicked. WebKit would other wise expand the selection
+ if (e.target.nodeName == 'IMG')
+ ed.selection.select(e.target);
+
+ t._getMenu(ed).showMenu(e.clientX || e.pageX, e.clientY || e.pageY);
+ Event.add(ed.getDoc(), 'click', hideMenu);
+
+ ed.nodeChanged();
+ });
+
+ ed.onRemove.add(function() {
+ if (t._menu)
+ t._menu.removeAll();
+ });
+
+ function hide(ed, e) {
+ realCtrlKey = 0;
+
+ // Since the contextmenu event moves
+ // the selection we need to store it away
+ if (e && e.button == 2) {
+ realCtrlKey = e.ctrlKey;
+ return;
+ }
+
+ if (t._menu) {
+ t._menu.removeAll();
+ t._menu.destroy();
+ Event.remove(ed.getDoc(), 'click', hideMenu);
+ t._menu = null;
+ }
+ };
+
+ ed.onMouseDown.add(hide);
+ ed.onKeyDown.add(hide);
+ ed.onKeyDown.add(function(ed, e) {
+ if (e.shiftKey && !e.ctrlKey && !e.altKey && e.keyCode === 121) {
+ Event.cancel(e);
+ showMenu(ed, e);
+ }
+ });
+ },
+
+ /**
+ * Returns information about the plugin as a name/value array.
+ * The current keys are longname, author, authorurl, infourl and version.
+ *
+ * @method getInfo
+ * @return {Object} Name/value array containing information about the plugin.
+ */
+ getInfo : function() {
+ return {
+ longname : 'Contextmenu',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/contextmenu',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ };
+ },
+
+ _getMenu : function(ed) {
+ var t = this, m = t._menu, se = ed.selection, col = se.isCollapsed(), el = se.getNode() || ed.getBody(), am, p;
+
+ if (m) {
+ m.removeAll();
+ m.destroy();
+ }
+
+ p = DOM.getPos(ed.getContentAreaContainer());
+
+ m = ed.controlManager.createDropMenu('contextmenu', {
+ offset_x : p.x + ed.getParam('contextmenu_offset_x', 0),
+ offset_y : p.y + ed.getParam('contextmenu_offset_y', 0),
+ constrain : 1,
+ keyboard_focus: true
+ });
+
+ t._menu = m;
+
+ m.add({title : 'advanced.cut_desc', icon : 'cut', cmd : 'Cut'}).setDisabled(col);
+ m.add({title : 'advanced.copy_desc', icon : 'copy', cmd : 'Copy'}).setDisabled(col);
+ m.add({title : 'advanced.paste_desc', icon : 'paste', cmd : 'Paste'});
+
+ if ((el.nodeName == 'A' && !ed.dom.getAttrib(el, 'name')) || !col) {
+ m.addSeparator();
+ m.add({title : 'advanced.link_desc', icon : 'link', cmd : ed.plugins.advlink ? 'mceAdvLink' : 'mceLink', ui : true});
+ m.add({title : 'advanced.unlink_desc', icon : 'unlink', cmd : 'UnLink'});
+ }
+
+ m.addSeparator();
+ m.add({title : 'advanced.image_desc', icon : 'image', cmd : ed.plugins.advimage ? 'mceAdvImage' : 'mceImage', ui : true});
+
+ m.addSeparator();
+ am = m.addMenu({title : 'contextmenu.align'});
+ am.add({title : 'contextmenu.left', icon : 'justifyleft', cmd : 'JustifyLeft'});
+ am.add({title : 'contextmenu.center', icon : 'justifycenter', cmd : 'JustifyCenter'});
+ am.add({title : 'contextmenu.right', icon : 'justifyright', cmd : 'JustifyRight'});
+ am.add({title : 'contextmenu.full', icon : 'justifyfull', cmd : 'JustifyFull'});
+
+ t.onContextMenu.dispatch(t, m, el, col);
+
+ return m;
+ }
+ });
+
+ // Register plugin
+ tinymce.PluginManager.add('contextmenu', tinymce.plugins.ContextMenu);
+})();
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/directionality/editor_plugin.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/directionality/editor_plugin.js
new file mode 100755
index 00000000..90847e78
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/directionality/editor_plugin.js
@@ -0,0 +1 @@
+(function(){tinymce.create("tinymce.plugins.Directionality",{init:function(b,c){var d=this;d.editor=b;function a(e){var h=b.dom,g,f=b.selection.getSelectedBlocks();if(f.length){g=h.getAttrib(f[0],"dir");tinymce.each(f,function(i){if(!h.getParent(i.parentNode,"*[dir='"+e+"']",h.getRoot())){if(g!=e){h.setAttrib(i,"dir",e)}else{h.setAttrib(i,"dir",null)}}});b.nodeChanged()}}b.addCommand("mceDirectionLTR",function(){a("ltr")});b.addCommand("mceDirectionRTL",function(){a("rtl")});b.addButton("ltr",{title:"directionality.ltr_desc",cmd:"mceDirectionLTR"});b.addButton("rtl",{title:"directionality.rtl_desc",cmd:"mceDirectionRTL"});b.onNodeChange.add(d._nodeChange,d)},getInfo:function(){return{longname:"Directionality",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/directionality",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_nodeChange:function(b,a,e){var d=b.dom,c;e=d.getParent(e,d.isBlock);if(!e){a.setDisabled("ltr",1);a.setDisabled("rtl",1);return}c=d.getAttrib(e,"dir");a.setActive("ltr",c=="ltr");a.setDisabled("ltr",0);a.setActive("rtl",c=="rtl");a.setDisabled("rtl",0)}});tinymce.PluginManager.add("directionality",tinymce.plugins.Directionality)})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/directionality/editor_plugin_src.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/directionality/editor_plugin_src.js
new file mode 100755
index 00000000..b1340141
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/directionality/editor_plugin_src.js
@@ -0,0 +1,85 @@
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+ tinymce.create('tinymce.plugins.Directionality', {
+ init : function(ed, url) {
+ var t = this;
+
+ t.editor = ed;
+
+ function setDir(dir) {
+ var dom = ed.dom, curDir, blocks = ed.selection.getSelectedBlocks();
+
+ if (blocks.length) {
+ curDir = dom.getAttrib(blocks[0], "dir");
+
+ tinymce.each(blocks, function(block) {
+ // Add dir to block if the parent block doesn't already have that dir
+ if (!dom.getParent(block.parentNode, "*[dir='" + dir + "']", dom.getRoot())) {
+ if (curDir != dir) {
+ dom.setAttrib(block, "dir", dir);
+ } else {
+ dom.setAttrib(block, "dir", null);
+ }
+ }
+ });
+
+ ed.nodeChanged();
+ }
+ }
+
+ ed.addCommand('mceDirectionLTR', function() {
+ setDir("ltr");
+ });
+
+ ed.addCommand('mceDirectionRTL', function() {
+ setDir("rtl");
+ });
+
+ ed.addButton('ltr', {title : 'directionality.ltr_desc', cmd : 'mceDirectionLTR'});
+ ed.addButton('rtl', {title : 'directionality.rtl_desc', cmd : 'mceDirectionRTL'});
+
+ ed.onNodeChange.add(t._nodeChange, t);
+ },
+
+ getInfo : function() {
+ return {
+ longname : 'Directionality',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/directionality',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ };
+ },
+
+ // Private methods
+
+ _nodeChange : function(ed, cm, n) {
+ var dom = ed.dom, dir;
+
+ n = dom.getParent(n, dom.isBlock);
+ if (!n) {
+ cm.setDisabled('ltr', 1);
+ cm.setDisabled('rtl', 1);
+ return;
+ }
+
+ dir = dom.getAttrib(n, 'dir');
+ cm.setActive('ltr', dir == "ltr");
+ cm.setDisabled('ltr', 0);
+ cm.setActive('rtl', dir == "rtl");
+ cm.setDisabled('rtl', 0);
+ }
+ });
+
+ // Register plugin
+ tinymce.PluginManager.add('directionality', tinymce.plugins.Directionality);
+})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/editor_plugin.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/editor_plugin.js
new file mode 100755
index 00000000..dbdd8ffb
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/editor_plugin.js
@@ -0,0 +1 @@
+(function(a){a.create("tinymce.plugins.EmotionsPlugin",{init:function(b,c){b.addCommand("mceEmotion",function(){b.windowManager.open({file:c+"/emotions.htm",width:250+parseInt(b.getLang("emotions.delta_width",0)),height:160+parseInt(b.getLang("emotions.delta_height",0)),inline:1},{plugin_url:c})});b.addButton("emotions",{title:"emotions.emotions_desc",cmd:"mceEmotion"})},getInfo:function(){return{longname:"Emotions",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/emotions",version:a.majorVersion+"."+a.minorVersion}}});a.PluginManager.add("emotions",a.plugins.EmotionsPlugin)})(tinymce); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/editor_plugin_src.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/editor_plugin_src.js
new file mode 100755
index 00000000..71d54169
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/editor_plugin_src.js
@@ -0,0 +1,43 @@
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function(tinymce) {
+ tinymce.create('tinymce.plugins.EmotionsPlugin', {
+ init : function(ed, url) {
+ // Register commands
+ ed.addCommand('mceEmotion', function() {
+ ed.windowManager.open({
+ file : url + '/emotions.htm',
+ width : 250 + parseInt(ed.getLang('emotions.delta_width', 0)),
+ height : 160 + parseInt(ed.getLang('emotions.delta_height', 0)),
+ inline : 1
+ }, {
+ plugin_url : url
+ });
+ });
+
+ // Register buttons
+ ed.addButton('emotions', {title : 'emotions.emotions_desc', cmd : 'mceEmotion'});
+ },
+
+ getInfo : function() {
+ return {
+ longname : 'Emotions',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/emotions',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ };
+ }
+ });
+
+ // Register plugin
+ tinymce.PluginManager.add('emotions', tinymce.plugins.EmotionsPlugin);
+})(tinymce); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/emotions.htm b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/emotions.htm
new file mode 100755
index 00000000..10135565
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/emotions.htm
@@ -0,0 +1,42 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>{#emotions_dlg.title}</title>
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script type="text/javascript" src="js/emotions.js"></script>
+</head>
+<body style="display: none" role="application" aria-labelledby="app_title">
+<span style="display:none;" id="app_title">{#emotions_dlg.title}</span>
+<div align="center">
+ <div class="title">{#emotions_dlg.title}:<br /><br /></div>
+
+ <table id="emoticon_table" role="presentation" border="0" cellspacing="0" cellpadding="4">
+ <tr>
+ <td><a class="emoticon_link" role="button" title="{#emotions_dlg.cool}. {#emotions_dlg.usage}" href="javascript:EmotionsDialog.insert('smiley-cool.gif','emotions_dlg.cool');"><img src="img/smiley-cool.gif" width="18" height="18" border="0" alt="{#emotions_dlg.cool}. {#emotions_dlg.usage}" /></a></td>
+ <td><a class="emoticon_link" role="button" title="{#emotions_dlg.cry}. {#emotions_dlg.usage}" href="javascript:EmotionsDialog.insert('smiley-cry.gif','emotions_dlg.cry');"><img src="img/smiley-cry.gif" width="18" height="18" border="0" alt="{#emotions_dlg.cry}. {#emotions_dlg.usage}" /></a></td>
+ <td><a class="emoticon_link" role="button" title="{#emotions_dlg.embarassed}. {#emotions_dlg.usage}" href="javascript:EmotionsDialog.insert('smiley-embarassed.gif','emotions_dlg.embarassed');"><img src="img/smiley-embarassed.gif" width="18" height="18" border="0" alt="{#emotions_dlg.embarassed}. {#emotions_dlg.usage}" /></a></td>
+ <td><a class="emoticon_link" role="button" title="{#emotions_dlg.foot_in_mouth}. {#emotions_dlg.usage}" href="javascript:EmotionsDialog.insert('smiley-foot-in-mouth.gif','emotions_dlg.foot_in_mouth');"><img src="img/smiley-foot-in-mouth.gif" width="18" height="18" border="0" alt="{#emotions_dlg.foot_in_mouth}. {#emotions_dlg.usage}" /></a></td>
+ </tr>
+ <tr>
+ <td><a class="emoticon_link" role="button" title="{#emotions_dlg.frown}. {#emotions_dlg.usage}" href="javascript:EmotionsDialog.insert('smiley-frown.gif','emotions_dlg.frown');"><img src="img/smiley-frown.gif" width="18" height="18" border="0" alt="{#emotions_dlg.frown}. {#emotions_dlg.usage}" /></a></td>
+ <td><a class="emoticon_link" role="button" title="{#emotions_dlg.innocent}. {#emotions_dlg.usage}" href="javascript:EmotionsDialog.insert('smiley-innocent.gif','emotions_dlg.innocent');"><img src="img/smiley-innocent.gif" width="18" height="18" border="0" alt="{#emotions_dlg.innocent}. {#emotions_dlg.usage}" /></a></td>
+ <td><a class="emoticon_link" role="button" title="{#emotions_dlg.kiss}. {#emotions_dlg.usage}" href="javascript:EmotionsDialog.insert('smiley-kiss.gif','emotions_dlg.kiss');"><img src="img/smiley-kiss.gif" width="18" height="18" border="0" alt="{#emotions_dlg.kiss}. {#emotions_dlg.usage}" /></a></td>
+ <td><a class="emoticon_link" role="button" title="{#emotions_dlg.laughing}. {#emotions_dlg.usage}" href="javascript:EmotionsDialog.insert('smiley-laughing.gif','emotions_dlg.laughing');"><img src="img/smiley-laughing.gif" width="18" height="18" border="0" alt="{#emotions_dlg.laughing}. {#emotions_dlg.usage}" /></a></td>
+ </tr>
+ <tr>
+ <td><a class="emoticon_link" role="button" title="{#emotions_dlg.money_mouth}. {#emotions_dlg.usage}" href="javascript:EmotionsDialog.insert('smiley-money-mouth.gif','emotions_dlg.money_mouth');"><img src="img/smiley-money-mouth.gif" width="18" height="18" border="0" alt="{#emotions_dlg.money_mouth}. {#emotions_dlg.usage}"/></a></td>
+ <td><a class="emoticon_link" role="button" title="{#emotions_dlg.sealed}. {#emotions_dlg.usage}" href="javascript:EmotionsDialog.insert('smiley-sealed.gif','emotions_dlg.sealed');"><img src="img/smiley-sealed.gif" width="18" height="18" border="0" alt="{#emotions_dlg.sealed}. {#emotions_dlg.usage}" /></a></td>
+ <td><a class="emoticon_link" role="button" title="{#emotions_dlg.smile}. {#emotions_dlg.usage}" href="javascript:EmotionsDialog.insert('smiley-smile.gif','emotions_dlg.smile');"><img src="img/smiley-smile.gif" width="18" height="18" border="0" alt="{#emotions_dlg.smile}. {#emotions_dlg.usage}" /></a></td>
+ <td><a class="emoticon_link" role="button" title="{#emotions_dlg.surprised}. {#emotions_dlg.usage}" href="javascript:EmotionsDialog.insert('smiley-surprised.gif','emotions_dlg.surprised');"><img src="img/smiley-surprised.gif" width="18" height="18" border="0" alt="{#emotions_dlg.surprised}. {#emotions_dlg.usage}" /></a></td>
+ </tr>
+ <tr>
+ <td><a class="emoticon_link" role="button" title="{#emotions_dlg.tongue_out}. {#emotions_dlg.usage}" href="javascript:EmotionsDialog.insert('smiley-tongue-out.gif','emotions_dlg.tongue_out');"><img src="img/smiley-tongue-out.gif" width="18" height="18" border="0" alt="{#emotions_dlg.tongue-out}. {#emotions_dlg.usage}" /></a></td>
+ <td><a class="emoticon_link" role="button" title="{#emotions_dlg.undecided}. {#emotions_dlg.usage}" href="javascript:EmotionsDialog.insert('smiley-undecided.gif','emotions_dlg.undecided');"><img src="img/smiley-undecided.gif" width="18" height="18" border="0" alt="{#emotions_dlg.undecided}. {#emotions_dlg.usage}" /></a></td>
+ <td><a class="emoticon_link" role="button" title="{#emotions_dlg.wink}. {#emotions_dlg.usage}" href="javascript:EmotionsDialog.insert('smiley-wink.gif','emotions_dlg.wink');"><img src="img/smiley-wink.gif" width="18" height="18" border="0" alt="{#emotions_dlg.wink}. {#emotions_dlg.usage}" /></a></td>
+ <td><a class="emoticon_link" role="button" title="{#emotions_dlg.yell}. {#emotions_dlg.usage}" href="javascript:EmotionsDialog.insert('smiley-yell.gif','emotions_dlg.yell');"><img src="img/smiley-yell.gif" width="18" height="18" border="0" alt="{#emotions_dlg.yell}. {#emotions_dlg.usage}" /></a></td>
+ </tr>
+ </table>
+ <div>{#emotions_dlg.usage}</div>
+</div>
+</body>
+</html>
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-cool.gif b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-cool.gif
new file mode 100644
index 00000000..ba90cc36
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-cool.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-cry.gif b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-cry.gif
new file mode 100644
index 00000000..74d897a4
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-cry.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-embarassed.gif b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-embarassed.gif
new file mode 100644
index 00000000..963a96b8
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-embarassed.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif
new file mode 100644
index 00000000..c7cf1011
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-frown.gif b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-frown.gif
new file mode 100644
index 00000000..716f55e1
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-frown.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-innocent.gif b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-innocent.gif
new file mode 100644
index 00000000..334d49e0
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-innocent.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-kiss.gif b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-kiss.gif
new file mode 100644
index 00000000..4efd549e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-kiss.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-laughing.gif b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-laughing.gif
new file mode 100644
index 00000000..82c5b182
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-laughing.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif
new file mode 100644
index 00000000..ca2451e1
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-sealed.gif b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-sealed.gif
new file mode 100644
index 00000000..fe66220c
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-sealed.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-smile.gif b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-smile.gif
new file mode 100644
index 00000000..fd27edfa
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-smile.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-surprised.gif b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-surprised.gif
new file mode 100644
index 00000000..0cc9bb71
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-surprised.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif
new file mode 100644
index 00000000..2075dc16
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-undecided.gif b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-undecided.gif
new file mode 100644
index 00000000..bef7e257
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-undecided.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-wink.gif b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-wink.gif
new file mode 100644
index 00000000..0631c761
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-wink.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-yell.gif b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-yell.gif
new file mode 100644
index 00000000..648e6e87
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/img/smiley-yell.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/js/emotions.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/js/emotions.js
new file mode 100644
index 00000000..b360f20b
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/js/emotions.js
@@ -0,0 +1,43 @@
+tinyMCEPopup.requireLangPack();
+
+var EmotionsDialog = {
+ addKeyboardNavigation: function(){
+ var tableElm, cells, settings;
+
+ cells = tinyMCEPopup.dom.select("a.emoticon_link", "emoticon_table");
+
+ settings ={
+ root: "emoticon_table",
+ items: cells
+ };
+ cells[0].tabindex=0;
+ tinyMCEPopup.dom.addClass(cells[0], "mceFocus");
+ if (tinymce.isGecko) {
+ cells[0].focus();
+ } else {
+ setTimeout(function(){
+ cells[0].focus();
+ }, 100);
+ }
+ tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', settings, tinyMCEPopup.dom);
+ },
+ init : function(ed) {
+ tinyMCEPopup.resizeToInnerSize();
+ this.addKeyboardNavigation();
+ },
+
+ insert : function(file, title) {
+ var ed = tinyMCEPopup.editor, dom = ed.dom;
+
+ tinyMCEPopup.execCommand('mceInsertContent', false, dom.createHTML('img', {
+ src : tinyMCEPopup.getWindowArg('plugin_url') + '/img/' + file,
+ alt : ed.getLang(title),
+ title : ed.getLang(title),
+ border : 0
+ }));
+
+ tinyMCEPopup.close();
+ }
+};
+
+tinyMCEPopup.onInit.add(EmotionsDialog.init, EmotionsDialog);
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/langs/de_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/langs/de_dlg.js
new file mode 100644
index 00000000..7489e35e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/langs/de_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('de.emotions_dlg',{cry:"Weinend",cool:"Cool",desc:"Smileys",title:"Smiley einf\u00fcgen",yell:"Br\u00fcllend",wink:"Zwinkernd",undecided:"Unentschlossen","tongue_out":"Zunge raus",surprised:"\u00dcberrascht",smile:"L\u00e4chelnd",sealed:"Verschlossen","money_mouth":"Geld",laughing:"Lachend",kiss:"K\u00fcssend",innocent:"Unschuldig",frown:"Stirnrunzelnd","foot_in_mouth":"Reingefallen",embarassed:"Verlegen",usage:"Navigation mit linken und rechten Pfeilen."}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/langs/en_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/langs/en_dlg.js
new file mode 100644
index 00000000..f5aafc39
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/langs/en_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('en.emotions_dlg',{cry:"Cry",cool:"Cool",desc:"Emotions",title:"Insert Emotion",yell:"Yell",wink:"Wink",undecided:"Undecided","tongue_out":"Tongue Out",surprised:"Surprised",smile:"Smile",sealed:"Sealed","money_mouth":"Money Mouth",laughing:"Laughing",kiss:"Kiss",innocent:"Innocent",frown:"Frown","foot_in_mouth":"Foot in Mouth",embarassed:"Embarassed",usage:"Use left and right arrows to navigate."}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/langs/hu_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/langs/hu_dlg.js
new file mode 100644
index 00000000..b48285bb
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/langs/hu_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('hu.emotions_dlg',{cry:"S\u00edr\u00f3s",cool:"Kir\u00e1ly",desc:"Hangulatjelek",title:"Hangulatjel besz\u00far\u00e1sa",yell:"\u00dcv\u00f6lt\u00e9s",wink:"Kacsint\u00e1s",undecided:"Hat\u00e1rozatlan","tongue_out":"Nyelv\u00f6lt\u00e9s",surprised:"Meglepett",smile:"Vigyor",sealed:"Lakat a sz\u00e1j\u00e1n","money_mouth":"P\u00e9nz besz\u00e9l",laughing:"Nevet\u00e9s",kiss:"Cs\u00f3k",innocent:"\u00c1rtatlan",frown:"Rosszall","foot_in_mouth":"L\u00e1b a sz\u00e1jban",embarassed:"Zavarban van",usage:"A navig\u00e1l\u00e1shoz haszn\u00e1ld a bal \u00e9s jobb oldali nyilat."}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/langs/ja_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/langs/ja_dlg.js
new file mode 100644
index 00000000..7ff287f3
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/emotions/langs/ja_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('ja.emotions_dlg',{cry:"\u6ce3\u304d\u9854",cool:"\u30af\u30fc\u30eb",desc:"\u8868\u60c5\u30a2\u30a4\u30b3\u30f3",title:"\u8868\u60c5\u30a2\u30a4\u30b3\u30f3\u306e\u633f\u5165",yell:"\u30a8\u30fc\u30eb",wink:"\u30a6\u30a3\u30f3\u30af",undecided:"\u672a\u6c7a\u5b9a","tongue_out":"\u30a2\u30c3\u30ab\u30f3\u30d9\u30fc",surprised:"\u9a5a\u304d",smile:"\u7b11\u9854",sealed:"\u5c01\u5370","money_mouth":"\u53e3\u306b\u304a\u91d1",laughing:"\u7b11\u3044",kiss:"\u30ad\u30b9",innocent:"\u7d14\u771f\u7121\u57a2",frown:"\u6e0b\u9762","foot_in_mouth":"\u53e3\u306b\u8db3",embarassed:"\u56f0\u60d1",usage:"\u5de6\u3068\u53f3\u306e\u30ab\u30fc\u30bd\u30eb\u30ad\u30fc\u3067\u79fb\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/example/dialog.htm b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/example/dialog.htm
new file mode 100644
index 00000000..50b2b344
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/example/dialog.htm
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>{#example_dlg.title}</title>
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script type="text/javascript" src="js/dialog.js"></script>
+</head>
+<body>
+
+<form onsubmit="ExampleDialog.insert();return false;" action="#">
+ <p>Here is a example dialog.</p>
+ <p>Selected text: <input id="someval" name="someval" type="text" class="text" /></p>
+ <p>Custom arg: <input id="somearg" name="somearg" type="text" class="text" /></p>
+
+ <div class="mceActionPanel">
+ <input type="button" id="insert" name="insert" value="{#insert}" onclick="ExampleDialog.insert();" />
+ <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
+ </div>
+</form>
+
+</body>
+</html>
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/example/editor_plugin.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/example/editor_plugin.js
new file mode 100644
index 00000000..ec1f81ea
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/example/editor_plugin.js
@@ -0,0 +1 @@
+(function(){tinymce.PluginManager.requireLangPack("example");tinymce.create("tinymce.plugins.ExamplePlugin",{init:function(a,b){a.addCommand("mceExample",function(){a.windowManager.open({file:b+"/dialog.htm",width:320+parseInt(a.getLang("example.delta_width",0)),height:120+parseInt(a.getLang("example.delta_height",0)),inline:1},{plugin_url:b,some_custom_arg:"custom arg"})});a.addButton("example",{title:"example.desc",cmd:"mceExample",image:b+"/img/example.gif"});a.onNodeChange.add(function(d,c,e){c.setActive("example",e.nodeName=="IMG")})},createControl:function(b,a){return null},getInfo:function(){return{longname:"Example plugin",author:"Some author",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example",version:"1.0"}}});tinymce.PluginManager.add("example",tinymce.plugins.ExamplePlugin)})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/example/editor_plugin_src.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/example/editor_plugin_src.js
new file mode 100644
index 00000000..9a0e7da1
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/example/editor_plugin_src.js
@@ -0,0 +1,84 @@
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+ // Load plugin specific language pack
+ tinymce.PluginManager.requireLangPack('example');
+
+ tinymce.create('tinymce.plugins.ExamplePlugin', {
+ /**
+ * Initializes the plugin, this will be executed after the plugin has been created.
+ * This call is done before the editor instance has finished it's initialization so use the onInit event
+ * of the editor instance to intercept that event.
+ *
+ * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
+ * @param {string} url Absolute URL to where the plugin is located.
+ */
+ init : function(ed, url) {
+ // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample');
+ ed.addCommand('mceExample', function() {
+ ed.windowManager.open({
+ file : url + '/dialog.htm',
+ width : 320 + parseInt(ed.getLang('example.delta_width', 0)),
+ height : 120 + parseInt(ed.getLang('example.delta_height', 0)),
+ inline : 1
+ }, {
+ plugin_url : url, // Plugin absolute URL
+ some_custom_arg : 'custom arg' // Custom argument
+ });
+ });
+
+ // Register example button
+ ed.addButton('example', {
+ title : 'example.desc',
+ cmd : 'mceExample',
+ image : url + '/img/example.gif'
+ });
+
+ // Add a node change handler, selects the button in the UI when a image is selected
+ ed.onNodeChange.add(function(ed, cm, n) {
+ cm.setActive('example', n.nodeName == 'IMG');
+ });
+ },
+
+ /**
+ * Creates control instances based in the incomming name. This method is normally not
+ * needed since the addButton method of the tinymce.Editor class is a more easy way of adding buttons
+ * but you sometimes need to create more complex controls like listboxes, split buttons etc then this
+ * method can be used to create those.
+ *
+ * @param {String} n Name of the control to create.
+ * @param {tinymce.ControlManager} cm Control manager to use inorder to create new control.
+ * @return {tinymce.ui.Control} New control instance or null if no control was created.
+ */
+ createControl : function(n, cm) {
+ return null;
+ },
+
+ /**
+ * Returns information about the plugin as a name/value array.
+ * The current keys are longname, author, authorurl, infourl and version.
+ *
+ * @return {Object} Name/value array containing information about the plugin.
+ */
+ getInfo : function() {
+ return {
+ longname : 'Example plugin',
+ author : 'Some author',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example',
+ version : "1.0"
+ };
+ }
+ });
+
+ // Register plugin
+ tinymce.PluginManager.add('example', tinymce.plugins.ExamplePlugin);
+})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/example/img/example.gif b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/example/img/example.gif
new file mode 100644
index 00000000..1ab5da44
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/example/img/example.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/example/js/dialog.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/example/js/dialog.js
new file mode 100644
index 00000000..fa834113
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/example/js/dialog.js
@@ -0,0 +1,19 @@
+tinyMCEPopup.requireLangPack();
+
+var ExampleDialog = {
+ init : function() {
+ var f = document.forms[0];
+
+ // Get the selected contents as text and place it in the input
+ f.someval.value = tinyMCEPopup.editor.selection.getContent({format : 'text'});
+ f.somearg.value = tinyMCEPopup.getWindowArg('some_custom_arg');
+ },
+
+ insert : function() {
+ // Insert the contents from the input into the document
+ tinyMCEPopup.editor.execCommand('mceInsertContent', false, document.forms[0].someval.value);
+ tinyMCEPopup.close();
+ }
+};
+
+tinyMCEPopup.onInit.add(ExampleDialog.init, ExampleDialog);
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/example/langs/en.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/example/langs/en.js
new file mode 100644
index 00000000..e0784f80
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/example/langs/en.js
@@ -0,0 +1,3 @@
+tinyMCE.addI18n('en.example',{
+ desc : 'This is just a template button'
+});
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/example/langs/en_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/example/langs/en_dlg.js
new file mode 100644
index 00000000..ebcf948d
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/example/langs/en_dlg.js
@@ -0,0 +1,3 @@
+tinyMCE.addI18n('en.example_dlg',{
+ title : 'This is just a example title'
+});
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/example_dependency/editor_plugin.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/example_dependency/editor_plugin.js
new file mode 100644
index 00000000..0a4551d3
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/example_dependency/editor_plugin.js
@@ -0,0 +1 @@
+(function(){tinymce.create("tinymce.plugins.ExampleDependencyPlugin",{init:function(a,b){},getInfo:function(){return{longname:"Example Dependency plugin",author:"Some author",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example_dependency",version:"1.0"}}});tinymce.PluginManager.add("example_dependency",tinymce.plugins.ExampleDependencyPlugin,["example"])})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/example_dependency/editor_plugin_src.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/example_dependency/editor_plugin_src.js
new file mode 100644
index 00000000..e1c55e41
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/example_dependency/editor_plugin_src.js
@@ -0,0 +1,50 @@
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+
+ tinymce.create('tinymce.plugins.ExampleDependencyPlugin', {
+ /**
+ * Initializes the plugin, this will be executed after the plugin has been created.
+ * This call is done before the editor instance has finished it's initialization so use the onInit event
+ * of the editor instance to intercept that event.
+ *
+ * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
+ * @param {string} url Absolute URL to where the plugin is located.
+ */
+ init : function(ed, url) {
+ },
+
+
+ /**
+ * Returns information about the plugin as a name/value array.
+ * The current keys are longname, author, authorurl, infourl and version.
+ *
+ * @return {Object} Name/value array containing information about the plugin.
+ */
+ getInfo : function() {
+ return {
+ longname : 'Example Dependency plugin',
+ author : 'Some author',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example_dependency',
+ version : "1.0"
+ };
+ }
+ });
+
+ /**
+ * Register the plugin, specifying the list of the plugins that this plugin depends on. They are specified in a list, with the list loaded in order.
+ * plugins in this list will be initialised when this plugin is initialized. (before the init method is called).
+ * plugins in a depends list should typically be specified using the short name). If neccesary this can be done
+ * with an object which has the url to the plugin and the shortname.
+ */
+ tinymce.PluginManager.add('example_dependency', tinymce.plugins.ExampleDependencyPlugin, ['example']);
+})();
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullpage/css/fullpage.css b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullpage/css/fullpage.css
new file mode 100755
index 00000000..2675cec1
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullpage/css/fullpage.css
@@ -0,0 +1,143 @@
+/* Hide the advanced tab */
+#advanced_tab {
+ display: none;
+}
+
+#metatitle, #metakeywords, #metadescription, #metaauthor, #metacopyright {
+ width: 280px;
+}
+
+#doctype, #docencoding {
+ width: 200px;
+}
+
+#langcode {
+ width: 30px;
+}
+
+#bgimage {
+ width: 220px;
+}
+
+#fontface {
+ width: 240px;
+}
+
+#leftmargin, #rightmargin, #topmargin, #bottommargin {
+ width: 50px;
+}
+
+.panel_wrapper div.current {
+ height: 400px;
+}
+
+#stylesheet, #style {
+ width: 240px;
+}
+
+#doctypes {
+ width: 200px;
+}
+
+/* Head list classes */
+
+.headlistwrapper {
+ width: 100%;
+}
+
+.selected {
+ border: 1px solid #0A246A;
+ background-color: #B6BDD2;
+}
+
+.toolbar {
+ width: 100%;
+}
+
+#headlist {
+ width: 100%;
+ margin-top: 3px;
+ font-size: 11px;
+}
+
+#info, #title_element, #meta_element, #script_element, #style_element, #base_element, #link_element, #comment_element, #unknown_element {
+ display: none;
+}
+
+#addmenu {
+ position: absolute;
+ border: 1px solid gray;
+ display: none;
+ z-index: 100;
+ background-color: white;
+}
+
+#addmenu a {
+ display: block;
+ width: 100%;
+ line-height: 20px;
+ text-decoration: none;
+ background-color: white;
+}
+
+#addmenu a:hover {
+ background-color: #B6BDD2;
+ color: black;
+}
+
+#addmenu span {
+ padding-left: 10px;
+ padding-right: 10px;
+}
+
+#updateElementPanel {
+ display: none;
+}
+
+#script_element .panel_wrapper div.current {
+ height: 108px;
+}
+
+#style_element .panel_wrapper div.current {
+ height: 108px;
+}
+
+#link_element .panel_wrapper div.current {
+ height: 140px;
+}
+
+#element_script_value {
+ width: 100%;
+ height: 100px;
+}
+
+#element_comment_value {
+ width: 100%;
+ height: 120px;
+}
+
+#element_style_value {
+ width: 100%;
+ height: 100px;
+}
+
+#element_title, #element_script_src, #element_meta_name, #element_meta_content, #element_base_href, #element_link_href, #element_link_title {
+ width: 250px;
+}
+
+.updateElementButton {
+ margin-top: 3px;
+}
+
+/* MSIE specific styles */
+
+* html .addbutton, * html .removebutton, * html .moveupbutton, * html .movedownbutton {
+ width: 22px;
+ height: 22px;
+}
+
+textarea {
+ height: 55px;
+}
+
+.panel_wrapper div.current {height:420px;} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullpage/editor_plugin.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullpage/editor_plugin.js
new file mode 100755
index 00000000..dcf76024
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullpage/editor_plugin.js
@@ -0,0 +1 @@
+(function(){var b=tinymce.each,a=tinymce.html.Node;tinymce.create("tinymce.plugins.FullPagePlugin",{init:function(c,d){var e=this;e.editor=c;c.addCommand("mceFullPageProperties",function(){c.windowManager.open({file:d+"/fullpage.htm",width:430+parseInt(c.getLang("fullpage.delta_width",0)),height:495+parseInt(c.getLang("fullpage.delta_height",0)),inline:1},{plugin_url:d,data:e._htmlToData()})});c.addButton("fullpage",{title:"fullpage.desc",cmd:"mceFullPageProperties"});c.onBeforeSetContent.add(e._setContent,e);c.onGetContent.add(e._getContent,e)},getInfo:function(){return{longname:"Fullpage",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullpage",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_htmlToData:function(){var f=this._parseHeader(),h={},c,i,g,e=this.editor;function d(l,j){var k=l.attr(j);return k||""}h.fontface=e.getParam("fullpage_default_fontface","");h.fontsize=e.getParam("fullpage_default_fontsize","");i=f.firstChild;if(i.type==7){h.xml_pi=true;g=/encoding="([^"]+)"/.exec(i.value);if(g){h.docencoding=g[1]}}i=f.getAll("#doctype")[0];if(i){h.doctype="<!DOCTYPE"+i.value+">"}i=f.getAll("title")[0];if(i&&i.firstChild){h.metatitle=i.firstChild.value}b(f.getAll("meta"),function(m){var k=m.attr("name"),j=m.attr("http-equiv"),l;if(k){h["meta"+k.toLowerCase()]=m.attr("content")}else{if(j=="Content-Type"){l=/charset\s*=\s*(.*)\s*/gi.exec(m.attr("content"));if(l){h.docencoding=l[1]}}}});i=f.getAll("html")[0];if(i){h.langcode=d(i,"lang")||d(i,"xml:lang")}i=f.getAll("link")[0];if(i&&i.attr("rel")=="stylesheet"){h.stylesheet=i.attr("href")}i=f.getAll("body")[0];if(i){h.langdir=d(i,"dir");h.style=d(i,"style");h.visited_color=d(i,"vlink");h.link_color=d(i,"link");h.active_color=d(i,"alink")}return h},_dataToHtml:function(g){var f,d,h,j,k,e=this.editor.dom;function c(n,l,m){n.attr(l,m?m:undefined)}function i(l){if(d.firstChild){d.insert(l,d.firstChild)}else{d.append(l)}}f=this._parseHeader();d=f.getAll("head")[0];if(!d){j=f.getAll("html")[0];d=new a("head",1);if(j.firstChild){j.insert(d,j.firstChild,true)}else{j.append(d)}}j=f.firstChild;if(g.xml_pi){k='version="1.0"';if(g.docencoding){k+=' encoding="'+g.docencoding+'"'}if(j.type!=7){j=new a("xml",7);f.insert(j,f.firstChild,true)}j.value=k}else{if(j&&j.type==7){j.remove()}}j=f.getAll("#doctype")[0];if(g.doctype){if(!j){j=new a("#doctype",10);if(g.xml_pi){f.insert(j,f.firstChild)}else{i(j)}}j.value=g.doctype.substring(9,g.doctype.length-1)}else{if(j){j.remove()}}j=f.getAll("title")[0];if(g.metatitle){if(!j){j=new a("title",1);j.append(new a("#text",3)).value=g.metatitle;i(j)}}if(g.docencoding){j=null;b(f.getAll("meta"),function(l){if(l.attr("http-equiv")=="Content-Type"){j=l}});if(!j){j=new a("meta",1);j.attr("http-equiv","Content-Type");j.shortEnded=true;i(j)}j.attr("content","text/html; charset="+g.docencoding)}b("keywords,description,author,copyright,robots".split(","),function(m){var l=f.getAll("meta"),n,p,o=g["meta"+m];for(n=0;n<l.length;n++){p=l[n];if(p.attr("name")==m){if(o){p.attr("content",o)}else{p.remove()}return}}if(o){j=new a("meta",1);j.attr("name",m);j.attr("content",o);j.shortEnded=true;i(j)}});j=f.getAll("link")[0];if(j&&j.attr("rel")=="stylesheet"){if(g.stylesheet){j.attr("href",g.stylesheet)}else{j.remove()}}else{if(g.stylesheet){j=new a("link",1);j.attr({rel:"stylesheet",text:"text/css",href:g.stylesheet});j.shortEnded=true;i(j)}}j=f.getAll("body")[0];if(j){c(j,"dir",g.langdir);c(j,"style",g.style);c(j,"vlink",g.visited_color);c(j,"link",g.link_color);c(j,"alink",g.active_color);e.setAttribs(this.editor.getBody(),{style:g.style,dir:g.dir,vLink:g.visited_color,link:g.link_color,aLink:g.active_color})}j=f.getAll("html")[0];if(j){c(j,"lang",g.langcode);c(j,"xml:lang",g.langcode)}h=new tinymce.html.Serializer({validate:false,indent:true,apply_source_formatting:true,indent_before:"head,html,body,meta,title,script,link,style",indent_after:"head,html,body,meta,title,script,link,style"}).serialize(f);this.head=h.substring(0,h.indexOf("</body>"))},_parseHeader:function(){return new tinymce.html.DomParser({validate:false,root_name:"#document"}).parse(this.head)},_setContent:function(g,d){var m=this,i,c,h=d.content,f,l="",e=m.editor.dom,j;function k(n){return n.replace(/<\/?[A-Z]+/g,function(o){return o.toLowerCase()})}if(d.format=="raw"&&m.head){return}if(d.source_view&&g.getParam("fullpage_hide_in_source_view")){return}h=h.replace(/<(\/?)BODY/gi,"<$1body");i=h.indexOf("<body");if(i!=-1){i=h.indexOf(">",i);m.head=k(h.substring(0,i+1));c=h.indexOf("</body",i);if(c==-1){c=h.length}d.content=h.substring(i+1,c);m.foot=k(h.substring(c))}else{m.head=this._getDefaultHeader();m.foot="\n</body>\n</html>"}f=m._parseHeader();b(f.getAll("style"),function(n){if(n.firstChild){l+=n.firstChild.value}});j=f.getAll("body")[0];if(j){e.setAttribs(m.editor.getBody(),{style:j.attr("style")||"",dir:j.attr("dir")||"",vLink:j.attr("vlink")||"",link:j.attr("link")||"",aLink:j.attr("alink")||""})}e.remove("fullpage_styles");if(l){e.add(m.editor.getDoc().getElementsByTagName("head")[0],"style",{id:"fullpage_styles"},l);j=e.get("fullpage_styles");if(j.styleSheet){j.styleSheet.cssText=l}}},_getDefaultHeader:function(){var f="",c=this.editor,e,d="";if(c.getParam("fullpage_default_xml_pi")){f+='<?xml version="1.0" encoding="'+c.getParam("fullpage_default_encoding","ISO-8859-1")+'" ?>\n'}f+=c.getParam("fullpage_default_doctype",'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');f+="\n<html>\n<head>\n";if(e=c.getParam("fullpage_default_title")){f+="<title>"+e+"</title>\n"}if(e=c.getParam("fullpage_default_encoding")){f+='<meta http-equiv="Content-Type" content="text/html; charset='+e+'" />\n'}if(e=c.getParam("fullpage_default_font_family")){d+="font-family: "+e+";"}if(e=c.getParam("fullpage_default_font_size")){d+="font-size: "+e+";"}if(e=c.getParam("fullpage_default_text_color")){d+="color: "+e+";"}f+="</head>\n<body"+(d?' style="'+d+'"':"")+">\n";return f},_getContent:function(d,e){var c=this;if(!e.source_view||!d.getParam("fullpage_hide_in_source_view")){e.content=tinymce.trim(c.head)+"\n"+tinymce.trim(e.content)+"\n"+tinymce.trim(c.foot)}}});tinymce.PluginManager.add("fullpage",tinymce.plugins.FullPagePlugin)})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullpage/editor_plugin_src.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullpage/editor_plugin_src.js
new file mode 100755
index 00000000..23de7c5a
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullpage/editor_plugin_src.js
@@ -0,0 +1,405 @@
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+ var each = tinymce.each, Node = tinymce.html.Node;
+
+ tinymce.create('tinymce.plugins.FullPagePlugin', {
+ init : function(ed, url) {
+ var t = this;
+
+ t.editor = ed;
+
+ // Register commands
+ ed.addCommand('mceFullPageProperties', function() {
+ ed.windowManager.open({
+ file : url + '/fullpage.htm',
+ width : 430 + parseInt(ed.getLang('fullpage.delta_width', 0)),
+ height : 495 + parseInt(ed.getLang('fullpage.delta_height', 0)),
+ inline : 1
+ }, {
+ plugin_url : url,
+ data : t._htmlToData()
+ });
+ });
+
+ // Register buttons
+ ed.addButton('fullpage', {title : 'fullpage.desc', cmd : 'mceFullPageProperties'});
+
+ ed.onBeforeSetContent.add(t._setContent, t);
+ ed.onGetContent.add(t._getContent, t);
+ },
+
+ getInfo : function() {
+ return {
+ longname : 'Fullpage',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullpage',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ };
+ },
+
+ // Private plugin internal methods
+
+ _htmlToData : function() {
+ var headerFragment = this._parseHeader(), data = {}, nodes, elm, matches, editor = this.editor;
+
+ function getAttr(elm, name) {
+ var value = elm.attr(name);
+
+ return value || '';
+ };
+
+ // Default some values
+ data.fontface = editor.getParam("fullpage_default_fontface", "");
+ data.fontsize = editor.getParam("fullpage_default_fontsize", "");
+
+ // Parse XML PI
+ elm = headerFragment.firstChild;
+ if (elm.type == 7) {
+ data.xml_pi = true;
+ matches = /encoding="([^"]+)"/.exec(elm.value);
+ if (matches)
+ data.docencoding = matches[1];
+ }
+
+ // Parse doctype
+ elm = headerFragment.getAll('#doctype')[0];
+ if (elm)
+ data.doctype = '<!DOCTYPE' + elm.value + ">";
+
+ // Parse title element
+ elm = headerFragment.getAll('title')[0];
+ if (elm && elm.firstChild) {
+ data.metatitle = elm.firstChild.value;
+ }
+
+ // Parse meta elements
+ each(headerFragment.getAll('meta'), function(meta) {
+ var name = meta.attr('name'), httpEquiv = meta.attr('http-equiv'), matches;
+
+ if (name)
+ data['meta' + name.toLowerCase()] = meta.attr('content');
+ else if (httpEquiv == "Content-Type") {
+ matches = /charset\s*=\s*(.*)\s*/gi.exec(meta.attr('content'));
+
+ if (matches)
+ data.docencoding = matches[1];
+ }
+ });
+
+ // Parse html attribs
+ elm = headerFragment.getAll('html')[0];
+ if (elm)
+ data.langcode = getAttr(elm, 'lang') || getAttr(elm, 'xml:lang');
+
+ // Parse stylesheet
+ elm = headerFragment.getAll('link')[0];
+ if (elm && elm.attr('rel') == 'stylesheet')
+ data.stylesheet = elm.attr('href');
+
+ // Parse body parts
+ elm = headerFragment.getAll('body')[0];
+ if (elm) {
+ data.langdir = getAttr(elm, 'dir');
+ data.style = getAttr(elm, 'style');
+ data.visited_color = getAttr(elm, 'vlink');
+ data.link_color = getAttr(elm, 'link');
+ data.active_color = getAttr(elm, 'alink');
+ }
+
+ return data;
+ },
+
+ _dataToHtml : function(data) {
+ var headerFragment, headElement, html, elm, value, dom = this.editor.dom;
+
+ function setAttr(elm, name, value) {
+ elm.attr(name, value ? value : undefined);
+ };
+
+ function addHeadNode(node) {
+ if (headElement.firstChild)
+ headElement.insert(node, headElement.firstChild);
+ else
+ headElement.append(node);
+ };
+
+ headerFragment = this._parseHeader();
+ headElement = headerFragment.getAll('head')[0];
+ if (!headElement) {
+ elm = headerFragment.getAll('html')[0];
+ headElement = new Node('head', 1);
+
+ if (elm.firstChild)
+ elm.insert(headElement, elm.firstChild, true);
+ else
+ elm.append(headElement);
+ }
+
+ // Add/update/remove XML-PI
+ elm = headerFragment.firstChild;
+ if (data.xml_pi) {
+ value = 'version="1.0"';
+
+ if (data.docencoding)
+ value += ' encoding="' + data.docencoding + '"';
+
+ if (elm.type != 7) {
+ elm = new Node('xml', 7);
+ headerFragment.insert(elm, headerFragment.firstChild, true);
+ }
+
+ elm.value = value;
+ } else if (elm && elm.type == 7)
+ elm.remove();
+
+ // Add/update/remove doctype
+ elm = headerFragment.getAll('#doctype')[0];
+ if (data.doctype) {
+ if (!elm) {
+ elm = new Node('#doctype', 10);
+
+ if (data.xml_pi)
+ headerFragment.insert(elm, headerFragment.firstChild);
+ else
+ addHeadNode(elm);
+ }
+
+ elm.value = data.doctype.substring(9, data.doctype.length - 1);
+ } else if (elm)
+ elm.remove();
+
+ // Add/update/remove title
+ elm = headerFragment.getAll('title')[0];
+ if (data.metatitle) {
+ if (!elm) {
+ elm = new Node('title', 1);
+ elm.append(new Node('#text', 3)).value = data.metatitle;
+ addHeadNode(elm);
+ }
+ }
+
+ // Add meta encoding
+ if (data.docencoding) {
+ elm = null;
+ each(headerFragment.getAll('meta'), function(meta) {
+ if (meta.attr('http-equiv') == 'Content-Type')
+ elm = meta;
+ });
+
+ if (!elm) {
+ elm = new Node('meta', 1);
+ elm.attr('http-equiv', 'Content-Type');
+ elm.shortEnded = true;
+ addHeadNode(elm);
+ }
+
+ elm.attr('content', 'text/html; charset=' + data.docencoding);
+ }
+
+ // Add/update/remove meta
+ each('keywords,description,author,copyright,robots'.split(','), function(name) {
+ var nodes = headerFragment.getAll('meta'), i, meta, value = data['meta' + name];
+
+ for (i = 0; i < nodes.length; i++) {
+ meta = nodes[i];
+
+ if (meta.attr('name') == name) {
+ if (value)
+ meta.attr('content', value);
+ else
+ meta.remove();
+
+ return;
+ }
+ }
+
+ if (value) {
+ elm = new Node('meta', 1);
+ elm.attr('name', name);
+ elm.attr('content', value);
+ elm.shortEnded = true;
+
+ addHeadNode(elm);
+ }
+ });
+
+ // Add/update/delete link
+ elm = headerFragment.getAll('link')[0];
+ if (elm && elm.attr('rel') == 'stylesheet') {
+ if (data.stylesheet)
+ elm.attr('href', data.stylesheet);
+ else
+ elm.remove();
+ } else if (data.stylesheet) {
+ elm = new Node('link', 1);
+ elm.attr({
+ rel : 'stylesheet',
+ text : 'text/css',
+ href : data.stylesheet
+ });
+ elm.shortEnded = true;
+
+ addHeadNode(elm);
+ }
+
+ // Update body attributes
+ elm = headerFragment.getAll('body')[0];
+ if (elm) {
+ setAttr(elm, 'dir', data.langdir);
+ setAttr(elm, 'style', data.style);
+ setAttr(elm, 'vlink', data.visited_color);
+ setAttr(elm, 'link', data.link_color);
+ setAttr(elm, 'alink', data.active_color);
+
+ // Update iframe body as well
+ dom.setAttribs(this.editor.getBody(), {
+ style : data.style,
+ dir : data.dir,
+ vLink : data.visited_color,
+ link : data.link_color,
+ aLink : data.active_color
+ });
+ }
+
+ // Set html attributes
+ elm = headerFragment.getAll('html')[0];
+ if (elm) {
+ setAttr(elm, 'lang', data.langcode);
+ setAttr(elm, 'xml:lang', data.langcode);
+ }
+
+ // Serialize header fragment and crop away body part
+ html = new tinymce.html.Serializer({
+ validate: false,
+ indent: true,
+ apply_source_formatting : true,
+ indent_before: 'head,html,body,meta,title,script,link,style',
+ indent_after: 'head,html,body,meta,title,script,link,style'
+ }).serialize(headerFragment);
+
+ this.head = html.substring(0, html.indexOf('</body>'));
+ },
+
+ _parseHeader : function() {
+ // Parse the contents with a DOM parser
+ return new tinymce.html.DomParser({
+ validate: false,
+ root_name: '#document'
+ }).parse(this.head);
+ },
+
+ _setContent : function(ed, o) {
+ var self = this, startPos, endPos, content = o.content, headerFragment, styles = '', dom = self.editor.dom, elm;
+
+ function low(s) {
+ return s.replace(/<\/?[A-Z]+/g, function(a) {
+ return a.toLowerCase();
+ })
+ };
+
+ // Ignore raw updated if we already have a head, this will fix issues with undo/redo keeping the head/foot separate
+ if (o.format == 'raw' && self.head)
+ return;
+
+ if (o.source_view && ed.getParam('fullpage_hide_in_source_view'))
+ return;
+
+ // Parse out head, body and footer
+ content = content.replace(/<(\/?)BODY/gi, '<$1body');
+ startPos = content.indexOf('<body');
+
+ if (startPos != -1) {
+ startPos = content.indexOf('>', startPos);
+ self.head = low(content.substring(0, startPos + 1));
+
+ endPos = content.indexOf('</body', startPos);
+ if (endPos == -1)
+ endPos = content.length;
+
+ o.content = content.substring(startPos + 1, endPos);
+ self.foot = low(content.substring(endPos));
+ } else {
+ self.head = this._getDefaultHeader();
+ self.foot = '\n</body>\n</html>';
+ }
+
+ // Parse header and update iframe
+ headerFragment = self._parseHeader();
+ each(headerFragment.getAll('style'), function(node) {
+ if (node.firstChild)
+ styles += node.firstChild.value;
+ });
+
+ elm = headerFragment.getAll('body')[0];
+ if (elm) {
+ dom.setAttribs(self.editor.getBody(), {
+ style : elm.attr('style') || '',
+ dir : elm.attr('dir') || '',
+ vLink : elm.attr('vlink') || '',
+ link : elm.attr('link') || '',
+ aLink : elm.attr('alink') || ''
+ });
+ }
+
+ dom.remove('fullpage_styles');
+
+ if (styles) {
+ dom.add(self.editor.getDoc().getElementsByTagName('head')[0], 'style', {id : 'fullpage_styles'}, styles);
+
+ // Needed for IE 6/7
+ elm = dom.get('fullpage_styles');
+ if (elm.styleSheet)
+ elm.styleSheet.cssText = styles;
+ }
+ },
+
+ _getDefaultHeader : function() {
+ var header = '', editor = this.editor, value, styles = '';
+
+ if (editor.getParam('fullpage_default_xml_pi'))
+ header += '<?xml version="1.0" encoding="' + editor.getParam('fullpage_default_encoding', 'ISO-8859-1') + '" ?>\n';
+
+ header += editor.getParam('fullpage_default_doctype', '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');
+ header += '\n<html>\n<head>\n';
+
+ if (value = editor.getParam('fullpage_default_title'))
+ header += '<title>' + value + '</title>\n';
+
+ if (value = editor.getParam('fullpage_default_encoding'))
+ header += '<meta http-equiv="Content-Type" content="text/html; charset=' + value + '" />\n';
+
+ if (value = editor.getParam('fullpage_default_font_family'))
+ styles += 'font-family: ' + value + ';';
+
+ if (value = editor.getParam('fullpage_default_font_size'))
+ styles += 'font-size: ' + value + ';';
+
+ if (value = editor.getParam('fullpage_default_text_color'))
+ styles += 'color: ' + value + ';';
+
+ header += '</head>\n<body' + (styles ? ' style="' + styles + '"' : '') + '>\n';
+
+ return header;
+ },
+
+ _getContent : function(ed, o) {
+ var self = this;
+
+ if (!o.source_view || !ed.getParam('fullpage_hide_in_source_view'))
+ o.content = tinymce.trim(self.head) + '\n' + tinymce.trim(o.content) + '\n' + tinymce.trim(self.foot);
+ }
+ });
+
+ // Register plugin
+ tinymce.PluginManager.add('fullpage', tinymce.plugins.FullPagePlugin);
+})();
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullpage/fullpage.htm b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullpage/fullpage.htm
new file mode 100755
index 00000000..14ab8652
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullpage/fullpage.htm
@@ -0,0 +1,259 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>{#fullpage_dlg.title}</title>
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script type="text/javascript" src="../../utils/mctabs.js"></script>
+ <script type="text/javascript" src="../../utils/form_utils.js"></script>
+ <script type="text/javascript" src="js/fullpage.js"></script>
+ <link href="css/fullpage.css" rel="stylesheet" type="text/css" />
+</head>
+<body id="fullpage" style="display: none">
+<form onsubmit="FullPageDialog.update();return false;" name="fullpage" action="#">
+ <div class="tabs">
+ <ul>
+ <li id="meta_tab" class="current"><span><a href="javascript:mcTabs.displayTab('meta_tab','meta_panel');" onmousedown="return false;">{#fullpage_dlg.meta_tab}</a></span></li>
+ <li id="appearance_tab"><span><a href="javascript:mcTabs.displayTab('appearance_tab','appearance_panel');" onmousedown="return false;">{#fullpage_dlg.appearance_tab}</a></span></li>
+ </ul>
+ </div>
+
+ <div class="panel_wrapper">
+ <div id="meta_panel" class="panel current">
+ <fieldset>
+ <legend>{#fullpage_dlg.meta_props}</legend>
+
+ <table border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td class="nowrap"><label for="metatitle">{#fullpage_dlg.meta_title}</label>&nbsp;</td>
+ <td><input type="text" id="metatitle" name="metatitle" value="" class="mceFocus" /></td>
+ </tr>
+ <tr>
+ <td class="nowrap"><label for="metakeywords">{#fullpage_dlg.meta_keywords}</label>&nbsp;</td>
+ <td><textarea id="metakeywords" name="metakeywords" rows="4"></textarea></td>
+ </tr>
+ <tr>
+ <td class="nowrap"><label for="metadescription">{#fullpage_dlg.meta_description}</label>&nbsp;</td>
+ <td><textarea id="metadescription" name="metadescription" rows="4"></textarea></td>
+ </tr>
+ <tr>
+ <td class="nowrap"><label for="metaauthor">{#fullpage_dlg.author}</label>&nbsp;</td>
+ <td><input type="text" id="metaauthor" name="metaauthor" value="" /></td>
+ </tr>
+ <tr>
+ <td class="nowrap"><label for="metacopyright">{#fullpage_dlg.copyright}</label>&nbsp;</td>
+ <td><input type="text" id="metacopyright" name="metacopyright" value="" /></td>
+ </tr>
+ <tr>
+ <td class="nowrap"><label for="metarobots">{#fullpage_dlg.meta_robots}</label>&nbsp;</td>
+ <td>
+ <select id="metarobots" name="metarobots">
+ <option value="">{#not_set}</option>
+ <option value="index,follow">{#fullpage_dlg.meta_index_follow}</option>
+ <option value="index,nofollow">{#fullpage_dlg.meta_index_nofollow}</option>
+ <option value="noindex,follow">{#fullpage_dlg.meta_noindex_follow}</option>
+ <option value="noindex,nofollow">{#fullpage_dlg.meta_noindex_nofollow}</option>
+ </select>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+
+ <fieldset>
+ <legend>{#fullpage_dlg.langprops}</legend>
+
+ <table border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td class="column1"><label for="docencoding">{#fullpage_dlg.encoding}</label></td>
+ <td>
+ <select id="docencoding" name="docencoding">
+ <option value="">{#not_set}</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td class="nowrap"><label for="doctype">{#fullpage_dlg.doctypes}</label>&nbsp;</td>
+ <td>
+ <select id="doctype" name="doctype">
+ <option value="">{#not_set}</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td class="nowrap"><label for="langcode">{#fullpage_dlg.langcode}</label>&nbsp;</td>
+ <td><input type="text" id="langcode" name="langcode" value="" /></td>
+ </tr>
+ <tr>
+ <td class="column1"><label for="langdir">{#fullpage_dlg.langdir}</label></td>
+ <td>
+ <select id="langdir" name="langdir">
+ <option value="">{#not_set}</option>
+ <option value="ltr">{#fullpage_dlg.ltr}</option>
+ <option value="rtl">{#fullpage_dlg.rtl}</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td class="nowrap"><label for="xml_pi">{#fullpage_dlg.xml_pi}</label>&nbsp;</td>
+ <td><input type="checkbox" id="xml_pi" name="xml_pi" class="checkbox" /></td>
+ </tr>
+ </table>
+ </fieldset>
+ </div>
+
+ <div id="appearance_panel" class="panel">
+ <fieldset>
+ <legend>{#fullpage_dlg.appearance_textprops}</legend>
+
+ <table border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td class="column1"><label for="fontface">{#fullpage_dlg.fontface}</label></td>
+ <td>
+ <select id="fontface" name="fontface" onchange="FullPageDialog.changedStyleProp();">
+ <option value="">{#not_set}</option>
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="column1"><label for="fontsize">{#fullpage_dlg.fontsize}</label></td>
+ <td>
+ <select id="fontsize" name="fontsize" onchange="FullPageDialog.changedStyleProp();">
+ <option value="">{#not_set}</option>
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="column1"><label for="textcolor">{#fullpage_dlg.textcolor}</label></td>
+ <td>
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input id="textcolor" name="textcolor" type="text" value="" size="9" onchange="updateColor('textcolor_pick','textcolor');FullPageDialog.changedStyleProp();" /></td>
+ <td id="textcolor_pickcontainer">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+
+ <fieldset>
+ <legend>{#fullpage_dlg.appearance_bgprops}</legend>
+
+ <table border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td class="column1"><label for="bgimage">{#fullpage_dlg.bgimage}</label></td>
+ <td>
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input id="bgimage" name="bgimage" type="text" value="" onchange="FullPageDialog.changedStyleProp();" /></td>
+ <td id="bgimage_pickcontainer">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td class="column1"><label for="bgcolor">{#fullpage_dlg.bgcolor}</label></td>
+ <td>
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');FullPageDialog.changedStyleProp();" /></td>
+ <td id="bgcolor_pickcontainer">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+
+ <fieldset>
+ <legend>{#fullpage_dlg.appearance_marginprops}</legend>
+
+ <table border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td class="column1"><label for="leftmargin">{#fullpage_dlg.left_margin}</label></td>
+ <td><input id="leftmargin" name="leftmargin" type="text" value="" onchange="FullPageDialog.changedStyleProp();" /></td>
+ <td class="column1"><label for="rightmargin">{#fullpage_dlg.right_margin}</label></td>
+ <td><input id="rightmargin" name="rightmargin" type="text" value="" onchange="FullPageDialog.changedStyleProp();" /></td>
+ </tr>
+ <tr>
+ <td class="column1"><label for="topmargin">{#fullpage_dlg.top_margin}</label></td>
+ <td><input id="topmargin" name="topmargin" type="text" value="" onchange="FullPageDialog.changedStyleProp();" /></td>
+ <td class="column1"><label for="bottommargin">{#fullpage_dlg.bottom_margin}</label></td>
+ <td><input id="bottommargin" name="bottommargin" type="text" value="" onchange="FullPageDialog.changedStyleProp();" /></td>
+ </tr>
+ </table>
+ </fieldset>
+
+ <fieldset>
+ <legend>{#fullpage_dlg.appearance_linkprops}</legend>
+
+ <table border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td class="column1"><label for="link_color">{#fullpage_dlg.link_color}</label></td>
+ <td>
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input id="link_color" name="link_color" type="text" value="" size="9" onchange="updateColor('link_color_pick','link_color');FullPageDialog.changedStyleProp();" /></td>
+ <td id="link_color_pickcontainer">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+
+ <td class="column1"><label for="visited_color">{#fullpage_dlg.visited_color}</label></td>
+ <td>
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input id="visited_color" name="visited_color" type="text" value="" size="9" onchange="updateColor('visited_color_pick','visited_color');FullPageDialog.changedStyleProp();" /></td>
+ <td id="visited_color_pickcontainer">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="column1"><label for="active_color">{#fullpage_dlg.active_color}</label></td>
+ <td>
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input id="active_color" name="active_color" type="text" value="" size="9" onchange="updateColor('active_color_pick','active_color');FullPageDialog.changedStyleProp();" /></td>
+ <td id="active_color_pickcontainer">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ </tr>
+ </table>
+ </fieldset>
+
+ <fieldset>
+ <legend>{#fullpage_dlg.appearance_style}</legend>
+
+ <table border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td class="column1"><label for="stylesheet">{#fullpage_dlg.stylesheet}</label></td>
+ <td><table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input id="stylesheet" name="stylesheet" type="text" value="" /></td>
+ <td id="stylesheet_browsercontainer">&nbsp;</td>
+ </tr>
+ </table></td>
+ </tr>
+ <tr>
+ <td class="column1"><label for="style">{#fullpage_dlg.style}</label></td>
+ <td><input id="style" name="style" type="text" value="" onchange="FullPageDialog.changedStyle();" /></td>
+ </tr>
+ </table>
+ </fieldset>
+ </div>
+ </div>
+
+ <div class="mceActionPanel">
+ <input type="submit" id="insert" name="update" value="{#update}" />
+ <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
+ </div>
+</form>
+</body>
+</html>
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullpage/js/fullpage.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullpage/js/fullpage.js
new file mode 100644
index 00000000..3f672ad3
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullpage/js/fullpage.js
@@ -0,0 +1,232 @@
+/**
+ * fullpage.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+ tinyMCEPopup.requireLangPack();
+
+ var defaultDocTypes =
+ 'XHTML 1.0 Transitional=<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">,' +
+ 'XHTML 1.0 Frameset=<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">,' +
+ 'XHTML 1.0 Strict=<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">,' +
+ 'XHTML 1.1=<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">,' +
+ 'HTML 4.01 Transitional=<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">,' +
+ 'HTML 4.01 Strict=<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">,' +
+ 'HTML 4.01 Frameset=<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">';
+
+ var defaultEncodings =
+ 'Western european (iso-8859-1)=iso-8859-1,' +
+ 'Central European (iso-8859-2)=iso-8859-2,' +
+ 'Unicode (UTF-8)=utf-8,' +
+ 'Chinese traditional (Big5)=big5,' +
+ 'Cyrillic (iso-8859-5)=iso-8859-5,' +
+ 'Japanese (iso-2022-jp)=iso-2022-jp,' +
+ 'Greek (iso-8859-7)=iso-8859-7,' +
+ 'Korean (iso-2022-kr)=iso-2022-kr,' +
+ 'ASCII (us-ascii)=us-ascii';
+
+ var defaultFontNames = 'Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;WingDings=wingdings';
+ var defaultFontSizes = '10px,11px,12px,13px,14px,15px,16px';
+
+ function setVal(id, value) {
+ var elm = document.getElementById(id);
+
+ if (elm) {
+ value = value || '';
+
+ if (elm.nodeName == "SELECT")
+ selectByValue(document.forms[0], id, value);
+ else if (elm.type == "checkbox")
+ elm.checked = !!value;
+ else
+ elm.value = value;
+ }
+ };
+
+ function getVal(id) {
+ var elm = document.getElementById(id);
+
+ if (elm.nodeName == "SELECT")
+ return elm.options[elm.selectedIndex].value;
+
+ if (elm.type == "checkbox")
+ return elm.checked;
+
+ return elm.value;
+ };
+
+ window.FullPageDialog = {
+ changedStyle : function() {
+ var val, styles = tinyMCEPopup.editor.dom.parseStyle(getVal('style'));
+
+ setVal('fontface', styles['font-face']);
+ setVal('fontsize', styles['font-size']);
+ setVal('textcolor', styles['color']);
+
+ if (val = styles['background-image'])
+ setVal('bgimage', val.replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1"));
+ else
+ setVal('bgimage', '');
+
+ setVal('bgcolor', styles['background-color']);
+
+ // Reset margin form elements
+ setVal('topmargin', '');
+ setVal('rightmargin', '');
+ setVal('bottommargin', '');
+ setVal('leftmargin', '');
+
+ // Expand margin
+ if (val = styles['margin']) {
+ val = val.split(' ');
+ styles['margin-top'] = val[0] || '';
+ styles['margin-right'] = val[1] || val[0] || '';
+ styles['margin-bottom'] = val[2] || val[0] || '';
+ styles['margin-left'] = val[3] || val[0] || '';
+ }
+
+ if (val = styles['margin-top'])
+ setVal('topmargin', val.replace(/px/, ''));
+
+ if (val = styles['margin-right'])
+ setVal('rightmargin', val.replace(/px/, ''));
+
+ if (val = styles['margin-bottom'])
+ setVal('bottommargin', val.replace(/px/, ''));
+
+ if (val = styles['margin-left'])
+ setVal('leftmargin', val.replace(/px/, ''));
+
+ updateColor('bgcolor_pick', 'bgcolor');
+ updateColor('textcolor_pick', 'textcolor');
+ },
+
+ changedStyleProp : function() {
+ var val, dom = tinyMCEPopup.editor.dom, styles = dom.parseStyle(getVal('style'));
+
+ styles['font-face'] = getVal('fontface');
+ styles['font-size'] = getVal('fontsize');
+ styles['color'] = getVal('textcolor');
+ styles['background-color'] = getVal('bgcolor');
+
+ if (val = getVal('bgimage'))
+ styles['background-image'] = "url('" + val + "')";
+ else
+ styles['background-image'] = '';
+
+ delete styles['margin'];
+
+ if (val = getVal('topmargin'))
+ styles['margin-top'] = val + "px";
+ else
+ styles['margin-top'] = '';
+
+ if (val = getVal('rightmargin'))
+ styles['margin-right'] = val + "px";
+ else
+ styles['margin-right'] = '';
+
+ if (val = getVal('bottommargin'))
+ styles['margin-bottom'] = val + "px";
+ else
+ styles['margin-bottom'] = '';
+
+ if (val = getVal('leftmargin'))
+ styles['margin-left'] = val + "px";
+ else
+ styles['margin-left'] = '';
+
+ // Serialize, parse and reserialize this will compress redundant styles
+ setVal('style', dom.serializeStyle(dom.parseStyle(dom.serializeStyle(styles))));
+ this.changedStyle();
+ },
+
+ update : function() {
+ var data = {};
+
+ tinymce.each(tinyMCEPopup.dom.select('select,input,textarea'), function(node) {
+ data[node.id] = getVal(node.id);
+ });
+
+ tinyMCEPopup.editor.plugins.fullpage._dataToHtml(data);
+ tinyMCEPopup.close();
+ }
+ };
+
+ function init() {
+ var form = document.forms[0], i, item, list, editor = tinyMCEPopup.editor;
+
+ // Setup doctype select box
+ list = editor.getParam("fullpage_doctypes", defaultDocTypes).split(',');
+ for (i = 0; i < list.length; i++) {
+ item = list[i].split('=');
+
+ if (item.length > 1)
+ addSelectValue(form, 'doctype', item[0], item[1]);
+ }
+
+ // Setup fonts select box
+ list = editor.getParam("fullpage_fonts", defaultFontNames).split(';');
+ for (i = 0; i < list.length; i++) {
+ item = list[i].split('=');
+
+ if (item.length > 1)
+ addSelectValue(form, 'fontface', item[0], item[1]);
+ }
+
+ // Setup fontsize select box
+ list = editor.getParam("fullpage_fontsizes", defaultFontSizes).split(',');
+ for (i = 0; i < list.length; i++)
+ addSelectValue(form, 'fontsize', list[i], list[i]);
+
+ // Setup encodings select box
+ list = editor.getParam("fullpage_encodings", defaultEncodings).split(',');
+ for (i = 0; i < list.length; i++) {
+ item = list[i].split('=');
+
+ if (item.length > 1)
+ addSelectValue(form, 'docencoding', item[0], item[1]);
+ }
+
+ // Setup color pickers
+ document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
+ document.getElementById('link_color_pickcontainer').innerHTML = getColorPickerHTML('link_color_pick','link_color');
+ document.getElementById('visited_color_pickcontainer').innerHTML = getColorPickerHTML('visited_color_pick','visited_color');
+ document.getElementById('active_color_pickcontainer').innerHTML = getColorPickerHTML('active_color_pick','active_color');
+ document.getElementById('textcolor_pickcontainer').innerHTML = getColorPickerHTML('textcolor_pick','textcolor');
+ document.getElementById('stylesheet_browsercontainer').innerHTML = getBrowserHTML('stylesheetbrowser','stylesheet','file','fullpage');
+ document.getElementById('bgimage_pickcontainer').innerHTML = getBrowserHTML('bgimage_browser','bgimage','image','fullpage');
+
+ // Resize some elements
+ if (isVisible('stylesheetbrowser'))
+ document.getElementById('stylesheet').style.width = '220px';
+
+ if (isVisible('link_href_browser'))
+ document.getElementById('element_link_href').style.width = '230px';
+
+ if (isVisible('bgimage_browser'))
+ document.getElementById('bgimage').style.width = '210px';
+
+ // Update form
+ tinymce.each(tinyMCEPopup.getWindowArg('data'), function(value, key) {
+ setVal(key, value);
+ });
+
+ FullPageDialog.changedStyle();
+
+ // Update colors
+ updateColor('textcolor_pick', 'textcolor');
+ updateColor('bgcolor_pick', 'bgcolor');
+ updateColor('visited_color_pick', 'visited_color');
+ updateColor('active_color_pick', 'active_color');
+ updateColor('link_color_pick', 'link_color');
+ };
+
+ tinyMCEPopup.onInit.add(init);
+})();
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullpage/langs/de_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullpage/langs/de_dlg.js
new file mode 100644
index 00000000..ecdff9ed
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullpage/langs/de_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('de.fullpage_dlg',{title:"Dokument-Eigenschaften","meta_tab":"Allgemein","appearance_tab":"Aussehen","advanced_tab":"Erweitert","meta_props":"Meta-Information",langprops:"Sprache und Codierung","meta_title":"Titel","meta_keywords":"Keywords","meta_description":"Beschreibung","meta_robots":"Robots",doctypes:"DocType",langcode:"Sprachcode",langdir:"Sprachrichtung",ltr:"Links nach Rechts",rtl:"Rechts nach Links","xml_pi":"XML Deklaration",encoding:"Zeichencodierung","appearance_bgprops":"Hintergrund-Eigenschaften","appearance_marginprops":"Abst\u00e4nde des Body","appearance_linkprops":"Linkfarben","appearance_textprops":"Text-Eigenschaften",bgcolor:"Hintergrundfarbe",bgimage:"Hintergrundbild","left_margin":"Linker Abstand","right_margin":"Rechter Abstand","top_margin":"Oberer Abstand","bottom_margin":"Unterer Abstand","text_color":"Textfarbe","font_size":"Schriftgr\u00f6\u00dfe","font_face":"Schriftart","link_color":"Linkfarbe","hover_color":"Hover-Farbe","visited_color":"Visited-Farbe","active_color":"Active-Farbe",textcolor:"Farbe",fontsize:"Schriftgr\u00f6\u00dfe",fontface:"Schriftart","meta_index_follow":"Indizieren und den Links folgen","meta_index_nofollow":"Indizieren, aber den Links nicht folgen","meta_noindex_follow":"Nicht indizieren, aber den Links folgen","meta_noindex_nofollow":"Nicht indizieren und auch nicht den Links folgen","appearance_style":"CSS-Stylesheet und Stileigenschaften",stylesheet:"CSS-Stylesheet",style:"CSS-Stil",author:"Autor",copyright:"Copyright",add:"Neues Element hinzuf\u00fcgen",remove:"Ausgew\u00e4hltes Element entfernen",moveup:"Ausgew\u00e4hltes Element nach oben bewegen",movedown:"Ausgew\u00e4hltes Element nach unten bewegen","head_elements":"\u00dcberschriftenelemente",info:"Information","add_title":"Titel-Element","add_meta":"Meta-Element","add_script":"Script-Element","add_style":"Style-Element","add_link":"Link-Element","add_base":"Base-Element","add_comment":"HTML-Kommentar","title_element":"Titel-Element","script_element":"Script-Element","style_element":"Style-Element","base_element":"Base-Element","link_element":"Link-Element","meta_element":"Meta_Element","comment_element":"Kommentar",src:"Src",language:"Sprache",href:"Href",target:"Ziel",type:"Typ",charset:"Zeichensatz",defer:"Defer",media:"Media",properties:"Eigenschaften",name:"Name",value:"Wert",content:"Inhalt",rel:"Rel",rev:"Rev",hreflang:"Href lang","general_props":"Allgemein","advanced_props":"Erweitert"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullpage/langs/en_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullpage/langs/en_dlg.js
new file mode 100644
index 00000000..516edc74
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullpage/langs/en_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('en.fullpage_dlg',{title:"Document Properties","meta_tab":"General","appearance_tab":"Appearance","advanced_tab":"Advanced","meta_props":"Meta Information",langprops:"Language and Encoding","meta_title":"Title","meta_keywords":"Keywords","meta_description":"Description","meta_robots":"Robots",doctypes:"Doctype",langcode:"Language Code",langdir:"Language Direction",ltr:"Left to Right",rtl:"Right to Left","xml_pi":"XML Declaration",encoding:"Character Encoding","appearance_bgprops":"Background Properties","appearance_marginprops":"Body Margins","appearance_linkprops":"Link Colors","appearance_textprops":"Text Properties",bgcolor:"Background Color",bgimage:"Background Image","left_margin":"Left Margin","right_margin":"Right Margin","top_margin":"Top Margin","bottom_margin":"Bottom Margin","text_color":"Text Color","font_size":"Font Size","font_face":"Font Face","link_color":"Link Color","hover_color":"Hover Color","visited_color":"Visited Color","active_color":"Active Color",textcolor:"Color",fontsize:"Font Size",fontface:"Font Family","meta_index_follow":"Index and Follow the Links","meta_index_nofollow":"Index and Don\'t Follow the Links","meta_noindex_follow":"Do Not Index but Follow the Links","meta_noindex_nofollow":"Do Not Index and Don\'t Follow the Links","appearance_style":"Stylesheet and Style Properties",stylesheet:"Stylesheet",style:"Style",author:"Author",copyright:"Copyright",add:"Add New Element",remove:"Remove Selected Element",moveup:"Move Selected Element Up",movedown:"Move Selected Element Down","head_elements":"Head Elements",info:"Information","add_title":"Title Element","add_meta":"Meta Element","add_script":"Script Element","add_style":"Style Element","add_link":"Link Element","add_base":"Base Element","add_comment":"Comment Node","title_element":"Title Element","script_element":"Script Element","style_element":"Style Element","base_element":"Base Element","link_element":"Link Element","meta_element":"Meta Element","comment_element":"Comment",src:"Source",language:"Language",href:"HREF",target:"Target",type:"Type",charset:"Charset",defer:"Defer",media:"Media",properties:"Properties",name:"Name",value:"Value",content:"Content",rel:"Rel",rev:"Rev",hreflang:"HREF Lang","general_props":"General","advanced_props":"Advanced"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullpage/langs/hu_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullpage/langs/hu_dlg.js
new file mode 100644
index 00000000..e9f911e3
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullpage/langs/hu_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('hu.fullpage_dlg',{title:"Dokumentum tulajdons\u00e1gai","meta_tab":"\u00c1ltal\u00e1nos","appearance_tab":"Megjelen\u00e9s","advanced_tab":"Halad\u00f3","meta_props":"Meta inform\u00e1ci\u00f3",langprops:"Nyelv \u00e9s k\u00f3dol\u00e1s","meta_title":"C\u00edm","meta_keywords":"Kulcsszavak","meta_description":"Le\u00edr\u00e1s","meta_robots":"Robotok",doctypes:"Dokumentum t\u00edpus",langcode:"Nyelvk\u00f3d",langdir:"\u00cdr\u00e1s ir\u00e1nya",ltr:"Balr\u00f3l jobra",rtl:"Jobbr\u00f3l balra","xml_pi":"XML deklar\u00e1ci\u00f3",encoding:"Karakterk\u00f3dol\u00e1s","appearance_bgprops":"H\u00e1tt\u00e9r tulajdons\u00e1gai","appearance_marginprops":"Body marg\u00f3k","appearance_linkprops":"Link sz\u00ednek","appearance_textprops":"Sz\u00f6veg tulajdons\u00e1gai",bgcolor:"H\u00e1tt\u00e9rsz\u00edn",bgimage:"H\u00e1tt\u00e9rk\u00e9p","left_margin":"Bal marg\u00f3","right_margin":"Jobb marg\u00f3","top_margin":"Fels\u0151 marg\u00f3","bottom_margin":"Als\u00f3 marg\u00f3","text_color":"Sz\u00f6vegsz\u00edn","font_size":"Bet\u0171m\u00e9ret","font_face":"Bet\u0171t\u00edpus","link_color":"Link sz\u00edn","hover_color":"Sz\u00edn eg\u00e9r fel\u00e9vitelekor","visited_color":"Sz\u00edn, ha l\u00e1togatott","active_color":"Akt\u00edv sz\u00edn",textcolor:"Sz\u00edn",fontsize:"Bet\u0171m\u00e9ret",fontface:"Bet\u0171 csal\u00e1d","meta_index_follow":"Linkek indexel\u00e9se \u00e9s k\u00f6vet\u00e9se","meta_index_nofollow":"Indexel, de nem k\u00f6veti a linkeket","meta_noindex_follow":"Nincs indexel\u00e9s, de van link-k\u00f6vet\u00e9s","meta_noindex_nofollow":"Nem indexel \u00e9s nem k\u00f6veti a linkeket","appearance_style":"Stylesheet \u00e9s style tulajdons\u00e1gok",stylesheet:"St\u00edluslap",style:"St\u00edlus",author:"Szerz\u0151",copyright:"Copyright",add:"\u00daj elem hozz\u00e1ad\u00e1sa",remove:"Kijel\u00f6lt elem t\u00f6rl\u00e9se",moveup:"Kijel\u00f6lt elem felfel\u00e9 mozgat\u00e1sa",movedown:"Kijel\u00f6lt elem lefel\u00e9 mozgat\u00e1sa","head_elements":"Fej elemek",info:"Inform\u00e1ci\u00f3","add_title":"C\u00edm elem","add_meta":"Meta elem","add_script":"Script elem","add_style":"Style elem","add_link":"Link elem","add_base":"Base elem","add_comment":"Comment elem","title_element":"Title elem","script_element":"Script elem","style_element":"Style elem","base_element":"Base elem","link_element":"Link elem","meta_element":"Meta elem","comment_element":"Megjegyz\u00e9s",src:"Forr\u00e1s",language:"Nyelv",href:"HREF",target:"C\u00e9l",type:"T\u00edpus",charset:"Charset",defer:"Defer",media:"M\u00e9dia",properties:"Tulajdons\u00e1gok",name:"N\u00e9v",value:"\u00c9rt\u00e9k",content:"Tartalom",rel:"Rel",rev:"Rev",hreflang:"HREF nyelv","general_props":"\u00c1ltal\u00e1nos","advanced_props":"Halad\u00f3"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullpage/langs/ja_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullpage/langs/ja_dlg.js
new file mode 100644
index 00000000..65643630
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullpage/langs/ja_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('ja.fullpage_dlg',{title:"\u30da\u30fc\u30b8\u306e\u5c5e\u6027","meta_tab":"\u4e00\u822c","appearance_tab":"\u8868\u793a","advanced_tab":"\u9ad8\u5ea6\u306a\u8a2d\u5b9a","meta_props":"\u30e1\u30bf\u60c5\u5831",langprops:"\u8a00\u8a9e\u3068\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0","meta_title":"\u30bf\u30a4\u30c8\u30eb","meta_keywords":"\u30ad\u30fc\u30ef\u30fc\u30c9","meta_description":"\u8aac\u660e","meta_robots":"\u691c\u7d22\u30ed\u30dc\u30c3\u30c8\u306e\u5236\u5fa1",doctypes:"\u6587\u66f8\u578b",langcode:"\u8a00\u8a9e\u30b3\u30fc\u30c9",langdir:"\u6587\u7ae0\u306e\u65b9\u5411",ltr:"\u5de6\u304b\u3089\u53f3",rtl:"\u53f3\u304b\u3089\u5de6","xml_pi":"XML\u5ba3\u8a00",encoding:"\u6587\u5b57\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0","appearance_bgprops":"\u80cc\u666f\u306e\u5c5e\u6027","appearance_marginprops":"Body\u306e\u4f59\u767d","appearance_linkprops":"\u30ea\u30f3\u30af\u306e\u8272","appearance_textprops":"\u6587\u5b57\u306e\u5c5e\u6027",bgcolor:"\u80cc\u666f\u306e\u8272",bgimage:"\u80cc\u666f\u306e\u753b\u50cf","left_margin":"\u5de6\u306e\u4f59\u767d","right_margin":"\u53f3\u306e\u4f59\u767d","top_margin":"\u4e0a\u306e\u4f59\u767d","bottom_margin":"\u4e0b\u306e\u4f59\u767d","text_color":"\u6587\u5b57\u306e\u8272","font_size":"\u6587\u5b57\u306e\u5927\u304d\u3055","font_face":"\u30d5\u30a9\u30f3\u30c8","link_color":"\u30ea\u30f3\u30af\u306e\u8272","hover_color":"\u30de\u30a6\u30b9\u30ab\u30fc\u30bd\u30eb\u304c\u3042\u308b\u30ea\u30f3\u30af\u306e\u8272(hover)","visited_color":"\u65e2\u306b\u8aad\u3093\u3060\u30ea\u30f3\u30af\u306e\u8272(visited)","active_color":"\u30af\u30ea\u30c3\u30af\u3057\u305f\u77ac\u9593\u306e\u30ea\u30f3\u30af\u306e\u8272(active)",textcolor:"\u8272",fontsize:"\u6587\u5b57\u306e\u5927\u304d\u3055",fontface:"\u30d5\u30a9\u30f3\u30c8","meta_index_follow":"\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u4f7f\u7528\u3057\u3066\u30ea\u30f3\u30af\u3092\u305f\u3069\u308b","meta_index_nofollow":"\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u4f7f\u7528\u3057\u3066\u30ea\u30f3\u30af\u306f\u305f\u3069\u3089\u306a\u3044","meta_noindex_follow":"\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u4f7f\u7528\u3057\u306a\u3044\u304c\u30ea\u30f3\u30af\u3092\u305f\u3069\u308b","meta_noindex_nofollow":"\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306b\u4f7f\u7528\u3057\u306a\u3044\u3067\u30ea\u30f3\u30af\u3082\u305f\u3069\u3089\u306a\u3044","appearance_style":"\u30b9\u30bf\u30a4\u30eb\u30b7\u30fc\u30c8\u3068\u30b9\u30bf\u30a4\u30eb\u306e\u5c5e\u6027",stylesheet:"\u30b9\u30bf\u30a4\u30eb\u30b7\u30fc\u30c8",style:"\u30b9\u30bf\u30a4\u30eb",author:"\u4f5c\u6210\u8005",copyright:"\u8457\u4f5c\u6a29",add:"\u65b0\u3057\u304f\u8981\u7d20\u3092\u8ffd\u52a0",remove:"\u9078\u629e\u3057\u305f\u8981\u7d20\u3092\u524a\u9664",moveup:"\u9078\u629e\u3057\u305f\u8981\u7d20\u3092\u4e0a\u306b\u79fb\u52d5",movedown:"\u9078\u629e\u3057\u305f\u8981\u7d20\u3092\u4e0b\u306b\u79fb\u52d5","head_elements":"Head\u8981\u7d20",info:"\u60c5\u5831","add_title":"Title\u8981\u7d20","add_meta":"Meta\u8981\u7d20","add_script":"Script\u8981\u7d20","add_style":"Style\u8981\u7d20","add_link":"Link\u8981\u7d20","add_base":"Base\u8981\u7d20","add_comment":"Comment\u30ce\u30fc\u30c9","title_element":"Title\u8981\u7d20","script_element":"Script\u8981\u7d20","style_element":"Style\u8981\u7d20","base_element":"Base\u8981\u7d20","link_element":"Link\u8981\u7d20","meta_element":"Meta\u8981\u7d20","comment_element":"\u30b3\u30e1\u30f3\u30c8",src:"src",language:"\u8a00\u8a9e",href:"Href",target:"Target",type:"Type",charset:"Charset",defer:"Defer",media:"Media",properties:"Properties",name:"Name",value:"Value",content:"Content",rel:"Rel",rev:"Rev",hreflang:"Href\u306e\u8a00\u8a9e","general_props":"\u4e00\u822c","advanced_props":"\u8a73\u7d30\u306a\u8a2d\u5b9a"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullscreen/editor_plugin.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullscreen/editor_plugin.js
new file mode 100755
index 00000000..a2eb0348
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullscreen/editor_plugin.js
@@ -0,0 +1 @@
+(function(){var a=tinymce.DOM;tinymce.create("tinymce.plugins.FullScreenPlugin",{init:function(d,e){var f=this,g={},c,b;f.editor=d;d.addCommand("mceFullScreen",function(){var i,j=a.doc.documentElement;if(d.getParam("fullscreen_is_enabled")){if(d.getParam("fullscreen_new_window")){closeFullscreen()}else{a.win.setTimeout(function(){tinymce.dom.Event.remove(a.win,"resize",f.resizeFunc);tinyMCE.get(d.getParam("fullscreen_editor_id")).setContent(d.getContent());tinyMCE.remove(d);a.remove("mce_fullscreen_container");j.style.overflow=d.getParam("fullscreen_html_overflow");a.setStyle(a.doc.body,"overflow",d.getParam("fullscreen_overflow"));a.win.scrollTo(d.getParam("fullscreen_scrollx"),d.getParam("fullscreen_scrolly"));tinyMCE.settings=tinyMCE.oldSettings},10)}return}if(d.getParam("fullscreen_new_window")){i=a.win.open(e+"/fullscreen.htm","mceFullScreenPopup","fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width="+screen.availWidth+",height="+screen.availHeight);try{i.resizeTo(screen.availWidth,screen.availHeight)}catch(h){}}else{tinyMCE.oldSettings=tinyMCE.settings;g.fullscreen_overflow=a.getStyle(a.doc.body,"overflow",1)||"auto";g.fullscreen_html_overflow=a.getStyle(j,"overflow",1);c=a.getViewPort();g.fullscreen_scrollx=c.x;g.fullscreen_scrolly=c.y;if(tinymce.isOpera&&g.fullscreen_overflow=="visible"){g.fullscreen_overflow="auto"}if(tinymce.isIE&&g.fullscreen_overflow=="scroll"){g.fullscreen_overflow="auto"}if(tinymce.isIE&&(g.fullscreen_html_overflow=="visible"||g.fullscreen_html_overflow=="scroll")){g.fullscreen_html_overflow="auto"}if(g.fullscreen_overflow=="0px"){g.fullscreen_overflow=""}a.setStyle(a.doc.body,"overflow","hidden");j.style.overflow="hidden";c=a.getViewPort();a.win.scrollTo(0,0);if(tinymce.isIE){c.h-=1}if(tinymce.isIE6||document.compatMode=="BackCompat"){b="absolute;top:"+c.y}else{b="fixed;top:0"}n=a.add(a.doc.body,"div",{id:"mce_fullscreen_container",style:"position:"+b+";left:0;width:"+c.w+"px;height:"+c.h+"px;z-index:200000;"});a.add(n,"div",{id:"mce_fullscreen"});tinymce.each(d.settings,function(k,l){g[l]=k});g.id="mce_fullscreen";g.width=n.clientWidth;g.height=n.clientHeight-15;g.fullscreen_is_enabled=true;g.fullscreen_editor_id=d.id;g.theme_advanced_resizing=false;g.save_onsavecallback=function(){d.setContent(tinyMCE.get(g.id).getContent());d.execCommand("mceSave")};tinymce.each(d.getParam("fullscreen_settings"),function(m,l){g[l]=m});if(g.theme_advanced_toolbar_location==="external"){g.theme_advanced_toolbar_location="top"}f.fullscreenEditor=new tinymce.Editor("mce_fullscreen",g);f.fullscreenEditor.onInit.add(function(){f.fullscreenEditor.setContent(d.getContent());f.fullscreenEditor.focus()});f.fullscreenEditor.render();f.fullscreenElement=new tinymce.dom.Element("mce_fullscreen_container");f.fullscreenElement.update();f.resizeFunc=tinymce.dom.Event.add(a.win,"resize",function(){var o=tinymce.DOM.getViewPort(),l=f.fullscreenEditor,k,m;k=l.dom.getSize(l.getContainer().getElementsByTagName("table")[0]);m=l.dom.getSize(l.getContainer().getElementsByTagName("iframe")[0]);l.theme.resizeTo(o.w-k.w+m.w,o.h-k.h+m.h)})}});d.addButton("fullscreen",{title:"fullscreen.desc",cmd:"mceFullScreen"});d.onNodeChange.add(function(i,h){h.setActive("fullscreen",i.getParam("fullscreen_is_enabled"))})},getInfo:function(){return{longname:"Fullscreen",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("fullscreen",tinymce.plugins.FullScreenPlugin)})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullscreen/editor_plugin_src.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullscreen/editor_plugin_src.js
new file mode 100755
index 00000000..524b487a
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullscreen/editor_plugin_src.js
@@ -0,0 +1,159 @@
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+ var DOM = tinymce.DOM;
+
+ tinymce.create('tinymce.plugins.FullScreenPlugin', {
+ init : function(ed, url) {
+ var t = this, s = {}, vp, posCss;
+
+ t.editor = ed;
+
+ // Register commands
+ ed.addCommand('mceFullScreen', function() {
+ var win, de = DOM.doc.documentElement;
+
+ if (ed.getParam('fullscreen_is_enabled')) {
+ if (ed.getParam('fullscreen_new_window'))
+ closeFullscreen(); // Call to close in new window
+ else {
+ DOM.win.setTimeout(function() {
+ tinymce.dom.Event.remove(DOM.win, 'resize', t.resizeFunc);
+ tinyMCE.get(ed.getParam('fullscreen_editor_id')).setContent(ed.getContent());
+ tinyMCE.remove(ed);
+ DOM.remove('mce_fullscreen_container');
+ de.style.overflow = ed.getParam('fullscreen_html_overflow');
+ DOM.setStyle(DOM.doc.body, 'overflow', ed.getParam('fullscreen_overflow'));
+ DOM.win.scrollTo(ed.getParam('fullscreen_scrollx'), ed.getParam('fullscreen_scrolly'));
+ tinyMCE.settings = tinyMCE.oldSettings; // Restore old settings
+ }, 10);
+ }
+
+ return;
+ }
+
+ if (ed.getParam('fullscreen_new_window')) {
+ win = DOM.win.open(url + "/fullscreen.htm", "mceFullScreenPopup", "fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width=" + screen.availWidth + ",height=" + screen.availHeight);
+ try {
+ win.resizeTo(screen.availWidth, screen.availHeight);
+ } catch (e) {
+ // Ignore
+ }
+ } else {
+ tinyMCE.oldSettings = tinyMCE.settings; // Store old settings
+ s.fullscreen_overflow = DOM.getStyle(DOM.doc.body, 'overflow', 1) || 'auto';
+ s.fullscreen_html_overflow = DOM.getStyle(de, 'overflow', 1);
+ vp = DOM.getViewPort();
+ s.fullscreen_scrollx = vp.x;
+ s.fullscreen_scrolly = vp.y;
+
+ // Fixes an Opera bug where the scrollbars doesn't reappear
+ if (tinymce.isOpera && s.fullscreen_overflow == 'visible')
+ s.fullscreen_overflow = 'auto';
+
+ // Fixes an IE bug where horizontal scrollbars would appear
+ if (tinymce.isIE && s.fullscreen_overflow == 'scroll')
+ s.fullscreen_overflow = 'auto';
+
+ // Fixes an IE bug where the scrollbars doesn't reappear
+ if (tinymce.isIE && (s.fullscreen_html_overflow == 'visible' || s.fullscreen_html_overflow == 'scroll'))
+ s.fullscreen_html_overflow = 'auto';
+
+ if (s.fullscreen_overflow == '0px')
+ s.fullscreen_overflow = '';
+
+ DOM.setStyle(DOM.doc.body, 'overflow', 'hidden');
+ de.style.overflow = 'hidden'; //Fix for IE6/7
+ vp = DOM.getViewPort();
+ DOM.win.scrollTo(0, 0);
+
+ if (tinymce.isIE)
+ vp.h -= 1;
+
+ // Use fixed position if it exists
+ if (tinymce.isIE6 || document.compatMode == 'BackCompat')
+ posCss = 'absolute;top:' + vp.y;
+ else
+ posCss = 'fixed;top:0';
+
+ n = DOM.add(DOM.doc.body, 'div', {
+ id : 'mce_fullscreen_container',
+ style : 'position:' + posCss + ';left:0;width:' + vp.w + 'px;height:' + vp.h + 'px;z-index:200000;'});
+ DOM.add(n, 'div', {id : 'mce_fullscreen'});
+
+ tinymce.each(ed.settings, function(v, n) {
+ s[n] = v;
+ });
+
+ s.id = 'mce_fullscreen';
+ s.width = n.clientWidth;
+ s.height = n.clientHeight - 15;
+ s.fullscreen_is_enabled = true;
+ s.fullscreen_editor_id = ed.id;
+ s.theme_advanced_resizing = false;
+ s.save_onsavecallback = function() {
+ ed.setContent(tinyMCE.get(s.id).getContent());
+ ed.execCommand('mceSave');
+ };
+
+ tinymce.each(ed.getParam('fullscreen_settings'), function(v, k) {
+ s[k] = v;
+ });
+
+ if (s.theme_advanced_toolbar_location === 'external')
+ s.theme_advanced_toolbar_location = 'top';
+
+ t.fullscreenEditor = new tinymce.Editor('mce_fullscreen', s);
+ t.fullscreenEditor.onInit.add(function() {
+ t.fullscreenEditor.setContent(ed.getContent());
+ t.fullscreenEditor.focus();
+ });
+
+ t.fullscreenEditor.render();
+
+ t.fullscreenElement = new tinymce.dom.Element('mce_fullscreen_container');
+ t.fullscreenElement.update();
+ //document.body.overflow = 'hidden';
+
+ t.resizeFunc = tinymce.dom.Event.add(DOM.win, 'resize', function() {
+ var vp = tinymce.DOM.getViewPort(), fed = t.fullscreenEditor, outerSize, innerSize;
+
+ // Get outer/inner size to get a delta size that can be used to calc the new iframe size
+ outerSize = fed.dom.getSize(fed.getContainer().getElementsByTagName('table')[0]);
+ innerSize = fed.dom.getSize(fed.getContainer().getElementsByTagName('iframe')[0]);
+
+ fed.theme.resizeTo(vp.w - outerSize.w + innerSize.w, vp.h - outerSize.h + innerSize.h);
+ });
+ }
+ });
+
+ // Register buttons
+ ed.addButton('fullscreen', {title : 'fullscreen.desc', cmd : 'mceFullScreen'});
+
+ ed.onNodeChange.add(function(ed, cm) {
+ cm.setActive('fullscreen', ed.getParam('fullscreen_is_enabled'));
+ });
+ },
+
+ getInfo : function() {
+ return {
+ longname : 'Fullscreen',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ };
+ }
+ });
+
+ // Register plugin
+ tinymce.PluginManager.add('fullscreen', tinymce.plugins.FullScreenPlugin);
+})();
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullscreen/fullscreen.htm b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullscreen/fullscreen.htm
new file mode 100755
index 00000000..ffe528e4
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/fullscreen/fullscreen.htm
@@ -0,0 +1,110 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title></title>
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+ <script type="text/javascript" src="../../tiny_mce.js"></script>
+ <script type="text/javascript">
+ function patchCallback(settings, key) {
+ if (settings[key])
+ settings[key] = "window.opener." + settings[key];
+ }
+
+ var settings = {}, paSe = window.opener.tinyMCE.activeEditor.settings, oeID = window.opener.tinyMCE.activeEditor.id;
+
+ // Clone array
+ for (var n in paSe)
+ settings[n] = paSe[n];
+
+ // Override options for fullscreen
+ for (var n in paSe.fullscreen_settings)
+ settings[n] = paSe.fullscreen_settings[n];
+
+ // Patch callbacks, make them point to window.opener
+ patchCallback(settings, 'urlconverter_callback');
+ patchCallback(settings, 'insertlink_callback');
+ patchCallback(settings, 'insertimage_callback');
+ patchCallback(settings, 'setupcontent_callback');
+ patchCallback(settings, 'save_callback');
+ patchCallback(settings, 'onchange_callback');
+ patchCallback(settings, 'init_instance_callback');
+ patchCallback(settings, 'file_browser_callback');
+ patchCallback(settings, 'cleanup_callback');
+ patchCallback(settings, 'execcommand_callback');
+ patchCallback(settings, 'oninit');
+
+ // Set options
+ delete settings.id;
+ settings['mode'] = 'exact';
+ settings['elements'] = 'fullscreenarea';
+ settings['add_unload_trigger'] = false;
+ settings['ask'] = false;
+ settings['document_base_url'] = window.opener.tinyMCE.activeEditor.documentBaseURI.getURI();
+ settings['fullscreen_is_enabled'] = true;
+ settings['fullscreen_editor_id'] = oeID;
+ settings['theme_advanced_resizing'] = false;
+ settings['strict_loading_mode'] = true;
+
+ settings.save_onsavecallback = function() {
+ window.opener.tinyMCE.get(oeID).setContent(tinyMCE.get('fullscreenarea').getContent({format : 'raw'}), {format : 'raw'});
+ window.opener.tinyMCE.get(oeID).execCommand('mceSave');
+ window.close();
+ };
+
+ function unloadHandler(e) {
+ moveContent();
+ }
+
+ function moveContent() {
+ window.opener.tinyMCE.get(oeID).setContent(tinyMCE.activeEditor.getContent());
+ }
+
+ function closeFullscreen() {
+ moveContent();
+ window.close();
+ }
+
+ function doParentSubmit() {
+ moveContent();
+
+ if (window.opener.tinyMCE.selectedInstance.formElement.form)
+ window.opener.tinyMCE.selectedInstance.formElement.form.submit();
+
+ window.close();
+
+ return false;
+ }
+
+ function render() {
+ var e = document.getElementById('fullscreenarea'), vp, ed, ow, oh, dom = tinymce.DOM;
+
+ e.value = window.opener.tinyMCE.get(oeID).getContent();
+
+ vp = dom.getViewPort();
+ settings.width = vp.w;
+ settings.height = vp.h - 15;
+
+ tinymce.dom.Event.add(window, 'resize', function() {
+ var vp = dom.getViewPort();
+
+ tinyMCE.activeEditor.theme.resizeTo(vp.w, vp.h);
+ });
+
+ tinyMCE.init(settings);
+ }
+
+ // Add onunload
+ tinymce.dom.Event.add(window, "beforeunload", unloadHandler);
+ </script>
+</head>
+<body style="margin:0;overflow:hidden;width:100%;height:100%" scrolling="no" scroll="no">
+<form onsubmit="doParentSubmit();">
+<textarea id="fullscreenarea" style="width:100%; height:100%"></textarea>
+</form>
+
+<script type="text/javascript">
+ render();
+</script>
+
+</body>
+</html>
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/iespell/editor_plugin.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/iespell/editor_plugin.js
new file mode 100755
index 00000000..e9cba106
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/iespell/editor_plugin.js
@@ -0,0 +1 @@
+(function(){tinymce.create("tinymce.plugins.IESpell",{init:function(a,b){var c=this,d;if(!tinymce.isIE){return}c.editor=a;a.addCommand("mceIESpell",function(){try{d=new ActiveXObject("ieSpell.ieSpellExtension");d.CheckDocumentNode(a.getDoc().documentElement)}catch(f){if(f.number==-2146827859){a.windowManager.confirm(a.getLang("iespell.download"),function(e){if(e){window.open("http://www.iespell.com/download.php","ieSpellDownload","")}})}else{a.windowManager.alert("Error Loading ieSpell: Exception "+f.number)}}});a.addButton("iespell",{title:"iespell.iespell_desc",cmd:"mceIESpell"})},getInfo:function(){return{longname:"IESpell (IE Only)",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/iespell",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("iespell",tinymce.plugins.IESpell)})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/iespell/editor_plugin_src.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/iespell/editor_plugin_src.js
new file mode 100755
index 00000000..1b2bb984
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/iespell/editor_plugin_src.js
@@ -0,0 +1,54 @@
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+ tinymce.create('tinymce.plugins.IESpell', {
+ init : function(ed, url) {
+ var t = this, sp;
+
+ if (!tinymce.isIE)
+ return;
+
+ t.editor = ed;
+
+ // Register commands
+ ed.addCommand('mceIESpell', function() {
+ try {
+ sp = new ActiveXObject("ieSpell.ieSpellExtension");
+ sp.CheckDocumentNode(ed.getDoc().documentElement);
+ } catch (e) {
+ if (e.number == -2146827859) {
+ ed.windowManager.confirm(ed.getLang("iespell.download"), function(s) {
+ if (s)
+ window.open('http://www.iespell.com/download.php', 'ieSpellDownload', '');
+ });
+ } else
+ ed.windowManager.alert("Error Loading ieSpell: Exception " + e.number);
+ }
+ });
+
+ // Register buttons
+ ed.addButton('iespell', {title : 'iespell.iespell_desc', cmd : 'mceIESpell'});
+ },
+
+ getInfo : function() {
+ return {
+ longname : 'IESpell (IE Only)',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/iespell',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ };
+ }
+ });
+
+ // Register plugin
+ tinymce.PluginManager.add('iespell', tinymce.plugins.IESpell);
+})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/editor_plugin.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/editor_plugin.js
new file mode 100755
index 00000000..8bb96f9c
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/editor_plugin.js
@@ -0,0 +1 @@
+(function(){var d=tinymce.DOM,b=tinymce.dom.Element,a=tinymce.dom.Event,e=tinymce.each,c=tinymce.is;tinymce.create("tinymce.plugins.InlinePopups",{init:function(f,g){f.onBeforeRenderUI.add(function(){f.windowManager=new tinymce.InlineWindowManager(f);d.loadCSS(g+"/skins/"+(f.settings.inlinepopups_skin||"clearlooks2")+"/window.css")})},getInfo:function(){return{longname:"InlinePopups",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.create("tinymce.InlineWindowManager:tinymce.WindowManager",{InlineWindowManager:function(f){var g=this;g.parent(f);g.zIndex=300000;g.count=0;g.windows={}},open:function(s,j){var z=this,i,k="",r=z.editor,g=0,v=0,h,m,o,q,l,x,y,n;s=s||{};j=j||{};if(!s.inline){return z.parent(s,j)}n=z._frontWindow();if(n&&d.get(n.id+"_ifr")){n.focussedElement=d.get(n.id+"_ifr").contentWindow.document.activeElement}if(!s.type){z.bookmark=r.selection.getBookmark(1)}i=d.uniqueId();h=d.getViewPort();s.width=parseInt(s.width||320);s.height=parseInt(s.height||240)+(tinymce.isIE?8:0);s.min_width=parseInt(s.min_width||150);s.min_height=parseInt(s.min_height||100);s.max_width=parseInt(s.max_width||2000);s.max_height=parseInt(s.max_height||2000);s.left=s.left||Math.round(Math.max(h.x,h.x+(h.w/2)-(s.width/2)));s.top=s.top||Math.round(Math.max(h.y,h.y+(h.h/2)-(s.height/2)));s.movable=s.resizable=true;j.mce_width=s.width;j.mce_height=s.height;j.mce_inline=true;j.mce_window_id=i;j.mce_auto_focus=s.auto_focus;z.features=s;z.params=j;z.onOpen.dispatch(z,s,j);if(s.type){k+=" mceModal";if(s.type){k+=" mce"+s.type.substring(0,1).toUpperCase()+s.type.substring(1)}s.resizable=false}if(s.statusbar){k+=" mceStatusbar"}if(s.resizable){k+=" mceResizable"}if(s.minimizable){k+=" mceMinimizable"}if(s.maximizable){k+=" mceMaximizable"}if(s.movable){k+=" mceMovable"}z._addAll(d.doc.body,["div",{id:i,role:"dialog","aria-labelledby":s.type?i+"_content":i+"_title","class":(r.settings.inlinepopups_skin||"clearlooks2")+(tinymce.isIE&&window.getSelection?" ie9":""),style:"width:100px;height:100px"},["div",{id:i+"_wrapper","class":"mceWrapper"+k},["div",{id:i+"_top","class":"mceTop"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_title"},s.title||""]],["div",{id:i+"_middle","class":"mceMiddle"},["div",{id:i+"_left","class":"mceLeft",tabindex:"0"}],["span",{id:i+"_content"}],["div",{id:i+"_right","class":"mceRight",tabindex:"0"}]],["div",{id:i+"_bottom","class":"mceBottom"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_status"},"Content"]],["a",{"class":"mceMove",tabindex:"-1",href:"javascript:;"}],["a",{"class":"mceMin",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMax",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMed",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceClose",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{id:i+"_resize_n","class":"mceResize mceResizeN",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_s","class":"mceResize mceResizeS",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_w","class":"mceResize mceResizeW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_e","class":"mceResize mceResizeE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_nw","class":"mceResize mceResizeNW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_ne","class":"mceResize mceResizeNE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_sw","class":"mceResize mceResizeSW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_se","class":"mceResize mceResizeSE",tabindex:"-1",href:"javascript:;"}]]]);d.setStyles(i,{top:-10000,left:-10000});if(tinymce.isGecko){d.setStyle(i,"overflow","auto")}if(!s.type){g+=d.get(i+"_left").clientWidth;g+=d.get(i+"_right").clientWidth;v+=d.get(i+"_top").clientHeight;v+=d.get(i+"_bottom").clientHeight}d.setStyles(i,{top:s.top,left:s.left,width:s.width+g,height:s.height+v});y=s.url||s.file;if(y){if(tinymce.relaxedDomain){y+=(y.indexOf("?")==-1?"?":"&")+"mce_rdomain="+tinymce.relaxedDomain}y=tinymce._addVer(y)}if(!s.type){d.add(i+"_content","iframe",{id:i+"_ifr",src:'javascript:""',frameBorder:0,style:"border:0;width:10px;height:10px"});d.setStyles(i+"_ifr",{width:s.width,height:s.height});d.setAttrib(i+"_ifr","src",y)}else{d.add(i+"_wrapper","a",{id:i+"_ok","class":"mceButton mceOk",href:"javascript:;",onmousedown:"return false;"},"Ok");if(s.type=="confirm"){d.add(i+"_wrapper","a",{"class":"mceButton mceCancel",href:"javascript:;",onmousedown:"return false;"},"Cancel")}d.add(i+"_middle","div",{"class":"mceIcon"});d.setHTML(i+"_content",s.content.replace("\n","<br />"));a.add(i,"keyup",function(f){var p=27;if(f.keyCode===p){s.button_func(false);return a.cancel(f)}});a.add(i,"keydown",function(f){var t,p=9;if(f.keyCode===p){t=d.select("a.mceCancel",i+"_wrapper")[0];if(t&&t!==f.target){t.focus()}else{d.get(i+"_ok").focus()}return a.cancel(f)}})}o=a.add(i,"mousedown",function(t){var u=t.target,f,p;f=z.windows[i];z.focus(i);if(u.nodeName=="A"||u.nodeName=="a"){if(u.className=="mceClose"){z.close(null,i);return a.cancel(t)}else{if(u.className=="mceMax"){f.oldPos=f.element.getXY();f.oldSize=f.element.getSize();p=d.getViewPort();p.w-=2;p.h-=2;f.element.moveTo(p.x,p.y);f.element.resizeTo(p.w,p.h);d.setStyles(i+"_ifr",{width:p.w-f.deltaWidth,height:p.h-f.deltaHeight});d.addClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMed"){f.element.moveTo(f.oldPos.x,f.oldPos.y);f.element.resizeTo(f.oldSize.w,f.oldSize.h);f.iframeElement.resizeTo(f.oldSize.w-f.deltaWidth,f.oldSize.h-f.deltaHeight);d.removeClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMove"){return z._startDrag(i,t,u.className)}else{if(d.hasClass(u,"mceResize")){return z._startDrag(i,t,u.className.substring(13))}}}}}}});q=a.add(i,"click",function(f){var p=f.target;z.focus(i);if(p.nodeName=="A"||p.nodeName=="a"){switch(p.className){case"mceClose":z.close(null,i);return a.cancel(f);case"mceButton mceOk":case"mceButton mceCancel":s.button_func(p.className=="mceButton mceOk");return a.cancel(f)}}});a.add([i+"_left",i+"_right"],"focus",function(p){var t=d.get(i+"_ifr");if(t){var f=t.contentWindow.document.body;var u=d.select(":input:enabled,*[tabindex=0]",f);if(p.target.id===(i+"_left")){u[u.length-1].focus()}else{u[0].focus()}}else{d.get(i+"_ok").focus()}});x=z.windows[i]={id:i,mousedown_func:o,click_func:q,element:new b(i,{blocker:1,container:r.getContainer()}),iframeElement:new b(i+"_ifr"),features:s,deltaWidth:g,deltaHeight:v};x.iframeElement.on("focus",function(){z.focus(i)});if(z.count==0&&z.editor.getParam("dialog_type","modal")=="modal"){d.add(d.doc.body,"div",{id:"mceModalBlocker","class":(z.editor.settings.inlinepopups_skin||"clearlooks2")+"_modalBlocker",style:{zIndex:z.zIndex-1}});d.show("mceModalBlocker");d.setAttrib(d.doc.body,"aria-hidden","true")}else{d.setStyle("mceModalBlocker","z-index",z.zIndex-1)}if(tinymce.isIE6||/Firefox\/2\./.test(navigator.userAgent)||(tinymce.isIE&&!d.boxModel)){d.setStyles("mceModalBlocker",{position:"absolute",left:h.x,top:h.y,width:h.w-2,height:h.h-2})}d.setAttrib(i,"aria-hidden","false");z.focus(i);z._fixIELayout(i,1);if(d.get(i+"_ok")){d.get(i+"_ok").focus()}z.count++;return x},focus:function(h){var g=this,f;if(f=g.windows[h]){f.zIndex=this.zIndex++;f.element.setStyle("zIndex",f.zIndex);f.element.update();h=h+"_wrapper";d.removeClass(g.lastId,"mceFocus");d.addClass(h,"mceFocus");g.lastId=h;if(f.focussedElement){f.focussedElement.focus()}else{if(d.get(h+"_ok")){d.get(f.id+"_ok").focus()}else{if(d.get(f.id+"_ifr")){d.get(f.id+"_ifr").focus()}}}}},_addAll:function(k,h){var g,l,f=this,j=tinymce.DOM;if(c(h,"string")){k.appendChild(j.doc.createTextNode(h))}else{if(h.length){k=k.appendChild(j.create(h[0],h[1]));for(g=2;g<h.length;g++){f._addAll(k,h[g])}}}},_startDrag:function(v,G,E){var o=this,u,z,C=d.doc,f,l=o.windows[v],h=l.element,y=h.getXY(),x,q,F,g,A,s,r,j,i,m,k,n,B;g={x:0,y:0};A=d.getViewPort();A.w-=2;A.h-=2;j=G.screenX;i=G.screenY;m=k=n=B=0;u=a.add(C,"mouseup",function(p){a.remove(C,"mouseup",u);a.remove(C,"mousemove",z);if(f){f.remove()}h.moveBy(m,k);h.resizeBy(n,B);q=h.getSize();d.setStyles(v+"_ifr",{width:q.w-l.deltaWidth,height:q.h-l.deltaHeight});o._fixIELayout(v,1);return a.cancel(p)});if(E!="Move"){D()}function D(){if(f){return}o._fixIELayout(v,0);d.add(C.body,"div",{id:"mceEventBlocker","class":"mceEventBlocker "+(o.editor.settings.inlinepopups_skin||"clearlooks2"),style:{zIndex:o.zIndex+1}});if(tinymce.isIE6||(tinymce.isIE&&!d.boxModel)){d.setStyles("mceEventBlocker",{position:"absolute",left:A.x,top:A.y,width:A.w-2,height:A.h-2})}f=new b("mceEventBlocker");f.update();x=h.getXY();q=h.getSize();s=g.x+x.x-A.x;r=g.y+x.y-A.y;d.add(f.get(),"div",{id:"mcePlaceHolder","class":"mcePlaceHolder",style:{left:s,top:r,width:q.w,height:q.h}});F=new b("mcePlaceHolder")}z=a.add(C,"mousemove",function(w){var p,H,t;D();p=w.screenX-j;H=w.screenY-i;switch(E){case"ResizeW":m=p;n=0-p;break;case"ResizeE":n=p;break;case"ResizeN":case"ResizeNW":case"ResizeNE":if(E=="ResizeNW"){m=p;n=0-p}else{if(E=="ResizeNE"){n=p}}k=H;B=0-H;break;case"ResizeS":case"ResizeSW":case"ResizeSE":if(E=="ResizeSW"){m=p;n=0-p}else{if(E=="ResizeSE"){n=p}}B=H;break;case"mceMove":m=p;k=H;break}if(n<(t=l.features.min_width-q.w)){if(m!==0){m+=n-t}n=t}if(B<(t=l.features.min_height-q.h)){if(k!==0){k+=B-t}B=t}n=Math.min(n,l.features.max_width-q.w);B=Math.min(B,l.features.max_height-q.h);m=Math.max(m,A.x-(s+A.x));k=Math.max(k,A.y-(r+A.y));m=Math.min(m,(A.w+A.x)-(s+q.w+A.x));k=Math.min(k,(A.h+A.y)-(r+q.h+A.y));if(m+k!==0){if(s+m<0){m=0}if(r+k<0){k=0}F.moveTo(s+m,r+k)}if(n+B!==0){F.resizeTo(q.w+n,q.h+B)}return a.cancel(w)});return a.cancel(G)},resizeBy:function(g,h,i){var f=this.windows[i];if(f){f.element.resizeBy(g,h);f.iframeElement.resizeBy(g,h)}},close:function(i,k){var g=this,f,j=d.doc,h,k;k=g._findId(k||i);if(!g.windows[k]){g.parent(i);return}g.count--;if(g.count==0){d.remove("mceModalBlocker");d.setAttrib(d.doc.body,"aria-hidden","false");g.editor.focus()}if(f=g.windows[k]){g.onClose.dispatch(g);a.remove(j,"mousedown",f.mousedownFunc);a.remove(j,"click",f.clickFunc);a.clear(k);a.clear(k+"_ifr");d.setAttrib(k+"_ifr","src",'javascript:""');f.element.remove();delete g.windows[k];h=g._frontWindow();if(h){g.focus(h.id)}}},_frontWindow:function(){var g,f=0;e(this.windows,function(h){if(h.zIndex>f){g=h;f=h.zIndex}});return g},setTitle:function(f,g){var h;f=this._findId(f);if(h=d.get(f+"_title")){h.innerHTML=d.encode(g)}},alert:function(g,f,j){var i=this,h;h=i.open({title:i,type:"alert",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},confirm:function(g,f,j){var i=this,h;h=i.open({title:i,type:"confirm",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},_findId:function(f){var g=this;if(typeof(f)=="string"){return f}e(g.windows,function(h){var i=d.get(h.id+"_ifr");if(i&&f==i.contentWindow){f=h.id;return false}});return f},_fixIELayout:function(i,h){var f,g;if(!tinymce.isIE6){return}e(["n","s","w","e","nw","ne","sw","se"],function(j){var k=d.get(i+"_resize_"+j);d.setStyles(k,{width:h?k.clientWidth:"",height:h?k.clientHeight:"",cursor:d.getStyle(k,"cursor",1)});d.setStyle(i+"_bottom","bottom","-1px");k=0});if(f=this.windows[i]){f.element.hide();f.element.show();e(d.select("div,a",i),function(k,j){if(k.currentStyle.backgroundImage!="none"){g=new Image();g.src=k.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/,"$1")}});d.get(i).style.filter=""}}});tinymce.PluginManager.add("inlinepopups",tinymce.plugins.InlinePopups)})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/editor_plugin_src.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/editor_plugin_src.js
new file mode 100755
index 00000000..67123ca3
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/editor_plugin_src.js
@@ -0,0 +1,699 @@
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+ var DOM = tinymce.DOM, Element = tinymce.dom.Element, Event = tinymce.dom.Event, each = tinymce.each, is = tinymce.is;
+
+ tinymce.create('tinymce.plugins.InlinePopups', {
+ init : function(ed, url) {
+ // Replace window manager
+ ed.onBeforeRenderUI.add(function() {
+ ed.windowManager = new tinymce.InlineWindowManager(ed);
+ DOM.loadCSS(url + '/skins/' + (ed.settings.inlinepopups_skin || 'clearlooks2') + "/window.css");
+ });
+ },
+
+ getInfo : function() {
+ return {
+ longname : 'InlinePopups',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ };
+ }
+ });
+
+ tinymce.create('tinymce.InlineWindowManager:tinymce.WindowManager', {
+ InlineWindowManager : function(ed) {
+ var t = this;
+
+ t.parent(ed);
+ t.zIndex = 300000;
+ t.count = 0;
+ t.windows = {};
+ },
+
+ open : function(f, p) {
+ var t = this, id, opt = '', ed = t.editor, dw = 0, dh = 0, vp, po, mdf, clf, we, w, u, parentWindow;
+
+ f = f || {};
+ p = p || {};
+
+ // Run native windows
+ if (!f.inline)
+ return t.parent(f, p);
+
+ parentWindow = t._frontWindow();
+ if (parentWindow && DOM.get(parentWindow.id + '_ifr')) {
+ parentWindow.focussedElement = DOM.get(parentWindow.id + '_ifr').contentWindow.document.activeElement;
+ }
+
+ // Only store selection if the type is a normal window
+ if (!f.type)
+ t.bookmark = ed.selection.getBookmark(1);
+
+ id = DOM.uniqueId();
+ vp = DOM.getViewPort();
+ f.width = parseInt(f.width || 320);
+ f.height = parseInt(f.height || 240) + (tinymce.isIE ? 8 : 0);
+ f.min_width = parseInt(f.min_width || 150);
+ f.min_height = parseInt(f.min_height || 100);
+ f.max_width = parseInt(f.max_width || 2000);
+ f.max_height = parseInt(f.max_height || 2000);
+ f.left = f.left || Math.round(Math.max(vp.x, vp.x + (vp.w / 2.0) - (f.width / 2.0)));
+ f.top = f.top || Math.round(Math.max(vp.y, vp.y + (vp.h / 2.0) - (f.height / 2.0)));
+ f.movable = f.resizable = true;
+ p.mce_width = f.width;
+ p.mce_height = f.height;
+ p.mce_inline = true;
+ p.mce_window_id = id;
+ p.mce_auto_focus = f.auto_focus;
+
+ // Transpose
+// po = DOM.getPos(ed.getContainer());
+// f.left -= po.x;
+// f.top -= po.y;
+
+ t.features = f;
+ t.params = p;
+ t.onOpen.dispatch(t, f, p);
+
+ if (f.type) {
+ opt += ' mceModal';
+
+ if (f.type)
+ opt += ' mce' + f.type.substring(0, 1).toUpperCase() + f.type.substring(1);
+
+ f.resizable = false;
+ }
+
+ if (f.statusbar)
+ opt += ' mceStatusbar';
+
+ if (f.resizable)
+ opt += ' mceResizable';
+
+ if (f.minimizable)
+ opt += ' mceMinimizable';
+
+ if (f.maximizable)
+ opt += ' mceMaximizable';
+
+ if (f.movable)
+ opt += ' mceMovable';
+
+ // Create DOM objects
+ t._addAll(DOM.doc.body,
+ ['div', {id : id, role : 'dialog', 'aria-labelledby': f.type ? id + '_content' : id + '_title', 'class' : (ed.settings.inlinepopups_skin || 'clearlooks2') + (tinymce.isIE && window.getSelection ? ' ie9' : ''), style : 'width:100px;height:100px'},
+ ['div', {id : id + '_wrapper', 'class' : 'mceWrapper' + opt},
+ ['div', {id : id + '_top', 'class' : 'mceTop'},
+ ['div', {'class' : 'mceLeft'}],
+ ['div', {'class' : 'mceCenter'}],
+ ['div', {'class' : 'mceRight'}],
+ ['span', {id : id + '_title'}, f.title || '']
+ ],
+
+ ['div', {id : id + '_middle', 'class' : 'mceMiddle'},
+ ['div', {id : id + '_left', 'class' : 'mceLeft', tabindex : '0'}],
+ ['span', {id : id + '_content'}],
+ ['div', {id : id + '_right', 'class' : 'mceRight', tabindex : '0'}]
+ ],
+
+ ['div', {id : id + '_bottom', 'class' : 'mceBottom'},
+ ['div', {'class' : 'mceLeft'}],
+ ['div', {'class' : 'mceCenter'}],
+ ['div', {'class' : 'mceRight'}],
+ ['span', {id : id + '_status'}, 'Content']
+ ],
+
+ ['a', {'class' : 'mceMove', tabindex : '-1', href : 'javascript:;'}],
+ ['a', {'class' : 'mceMin', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
+ ['a', {'class' : 'mceMax', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
+ ['a', {'class' : 'mceMed', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
+ ['a', {'class' : 'mceClose', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
+ ['a', {id : id + '_resize_n', 'class' : 'mceResize mceResizeN', tabindex : '-1', href : 'javascript:;'}],
+ ['a', {id : id + '_resize_s', 'class' : 'mceResize mceResizeS', tabindex : '-1', href : 'javascript:;'}],
+ ['a', {id : id + '_resize_w', 'class' : 'mceResize mceResizeW', tabindex : '-1', href : 'javascript:;'}],
+ ['a', {id : id + '_resize_e', 'class' : 'mceResize mceResizeE', tabindex : '-1', href : 'javascript:;'}],
+ ['a', {id : id + '_resize_nw', 'class' : 'mceResize mceResizeNW', tabindex : '-1', href : 'javascript:;'}],
+ ['a', {id : id + '_resize_ne', 'class' : 'mceResize mceResizeNE', tabindex : '-1', href : 'javascript:;'}],
+ ['a', {id : id + '_resize_sw', 'class' : 'mceResize mceResizeSW', tabindex : '-1', href : 'javascript:;'}],
+ ['a', {id : id + '_resize_se', 'class' : 'mceResize mceResizeSE', tabindex : '-1', href : 'javascript:;'}]
+ ]
+ ]
+ );
+
+ DOM.setStyles(id, {top : -10000, left : -10000});
+
+ // Fix gecko rendering bug, where the editors iframe messed with window contents
+ if (tinymce.isGecko)
+ DOM.setStyle(id, 'overflow', 'auto');
+
+ // Measure borders
+ if (!f.type) {
+ dw += DOM.get(id + '_left').clientWidth;
+ dw += DOM.get(id + '_right').clientWidth;
+ dh += DOM.get(id + '_top').clientHeight;
+ dh += DOM.get(id + '_bottom').clientHeight;
+ }
+
+ // Resize window
+ DOM.setStyles(id, {top : f.top, left : f.left, width : f.width + dw, height : f.height + dh});
+
+ u = f.url || f.file;
+ if (u) {
+ if (tinymce.relaxedDomain)
+ u += (u.indexOf('?') == -1 ? '?' : '&') + 'mce_rdomain=' + tinymce.relaxedDomain;
+
+ u = tinymce._addVer(u);
+ }
+
+ if (!f.type) {
+ DOM.add(id + '_content', 'iframe', {id : id + '_ifr', src : 'javascript:""', frameBorder : 0, style : 'border:0;width:10px;height:10px'});
+ DOM.setStyles(id + '_ifr', {width : f.width, height : f.height});
+ DOM.setAttrib(id + '_ifr', 'src', u);
+ } else {
+ DOM.add(id + '_wrapper', 'a', {id : id + '_ok', 'class' : 'mceButton mceOk', href : 'javascript:;', onmousedown : 'return false;'}, 'Ok');
+
+ if (f.type == 'confirm')
+ DOM.add(id + '_wrapper', 'a', {'class' : 'mceButton mceCancel', href : 'javascript:;', onmousedown : 'return false;'}, 'Cancel');
+
+ DOM.add(id + '_middle', 'div', {'class' : 'mceIcon'});
+ DOM.setHTML(id + '_content', f.content.replace('\n', '<br />'));
+
+ Event.add(id, 'keyup', function(evt) {
+ var VK_ESCAPE = 27;
+ if (evt.keyCode === VK_ESCAPE) {
+ f.button_func(false);
+ return Event.cancel(evt);
+ }
+ });
+
+ Event.add(id, 'keydown', function(evt) {
+ var cancelButton, VK_TAB = 9;
+ if (evt.keyCode === VK_TAB) {
+ cancelButton = DOM.select('a.mceCancel', id + '_wrapper')[0];
+ if (cancelButton && cancelButton !== evt.target) {
+ cancelButton.focus();
+ } else {
+ DOM.get(id + '_ok').focus();
+ }
+ return Event.cancel(evt);
+ }
+ });
+ }
+
+ // Register events
+ mdf = Event.add(id, 'mousedown', function(e) {
+ var n = e.target, w, vp;
+
+ w = t.windows[id];
+ t.focus(id);
+
+ if (n.nodeName == 'A' || n.nodeName == 'a') {
+ if (n.className == 'mceClose') {
+ t.close(null, id);
+ return Event.cancel(e);
+ } else if (n.className == 'mceMax') {
+ w.oldPos = w.element.getXY();
+ w.oldSize = w.element.getSize();
+
+ vp = DOM.getViewPort();
+
+ // Reduce viewport size to avoid scrollbars
+ vp.w -= 2;
+ vp.h -= 2;
+
+ w.element.moveTo(vp.x, vp.y);
+ w.element.resizeTo(vp.w, vp.h);
+ DOM.setStyles(id + '_ifr', {width : vp.w - w.deltaWidth, height : vp.h - w.deltaHeight});
+ DOM.addClass(id + '_wrapper', 'mceMaximized');
+ } else if (n.className == 'mceMed') {
+ // Reset to old size
+ w.element.moveTo(w.oldPos.x, w.oldPos.y);
+ w.element.resizeTo(w.oldSize.w, w.oldSize.h);
+ w.iframeElement.resizeTo(w.oldSize.w - w.deltaWidth, w.oldSize.h - w.deltaHeight);
+
+ DOM.removeClass(id + '_wrapper', 'mceMaximized');
+ } else if (n.className == 'mceMove')
+ return t._startDrag(id, e, n.className);
+ else if (DOM.hasClass(n, 'mceResize'))
+ return t._startDrag(id, e, n.className.substring(13));
+ }
+ });
+
+ clf = Event.add(id, 'click', function(e) {
+ var n = e.target;
+
+ t.focus(id);
+
+ if (n.nodeName == 'A' || n.nodeName == 'a') {
+ switch (n.className) {
+ case 'mceClose':
+ t.close(null, id);
+ return Event.cancel(e);
+
+ case 'mceButton mceOk':
+ case 'mceButton mceCancel':
+ f.button_func(n.className == 'mceButton mceOk');
+ return Event.cancel(e);
+ }
+ }
+ });
+
+ // Make sure the tab order loops within the dialog.
+ Event.add([id + '_left', id + '_right'], 'focus', function(evt) {
+ var iframe = DOM.get(id + '_ifr');
+ if (iframe) {
+ var body = iframe.contentWindow.document.body;
+ var focusable = DOM.select(':input:enabled,*[tabindex=0]', body);
+ if (evt.target.id === (id + '_left')) {
+ focusable[focusable.length - 1].focus();
+ } else {
+ focusable[0].focus();
+ }
+ } else {
+ DOM.get(id + '_ok').focus();
+ }
+ });
+
+ // Add window
+ w = t.windows[id] = {
+ id : id,
+ mousedown_func : mdf,
+ click_func : clf,
+ element : new Element(id, {blocker : 1, container : ed.getContainer()}),
+ iframeElement : new Element(id + '_ifr'),
+ features : f,
+ deltaWidth : dw,
+ deltaHeight : dh
+ };
+
+ w.iframeElement.on('focus', function() {
+ t.focus(id);
+ });
+
+ // Setup blocker
+ if (t.count == 0 && t.editor.getParam('dialog_type', 'modal') == 'modal') {
+ DOM.add(DOM.doc.body, 'div', {
+ id : 'mceModalBlocker',
+ 'class' : (t.editor.settings.inlinepopups_skin || 'clearlooks2') + '_modalBlocker',
+ style : {zIndex : t.zIndex - 1}
+ });
+
+ DOM.show('mceModalBlocker'); // Reduces flicker in IE
+ DOM.setAttrib(DOM.doc.body, 'aria-hidden', 'true');
+ } else
+ DOM.setStyle('mceModalBlocker', 'z-index', t.zIndex - 1);
+
+ if (tinymce.isIE6 || /Firefox\/2\./.test(navigator.userAgent) || (tinymce.isIE && !DOM.boxModel))
+ DOM.setStyles('mceModalBlocker', {position : 'absolute', left : vp.x, top : vp.y, width : vp.w - 2, height : vp.h - 2});
+
+ DOM.setAttrib(id, 'aria-hidden', 'false');
+ t.focus(id);
+ t._fixIELayout(id, 1);
+
+ // Focus ok button
+ if (DOM.get(id + '_ok'))
+ DOM.get(id + '_ok').focus();
+ t.count++;
+
+ return w;
+ },
+
+ focus : function(id) {
+ var t = this, w;
+
+ if (w = t.windows[id]) {
+ w.zIndex = this.zIndex++;
+ w.element.setStyle('zIndex', w.zIndex);
+ w.element.update();
+
+ id = id + '_wrapper';
+ DOM.removeClass(t.lastId, 'mceFocus');
+ DOM.addClass(id, 'mceFocus');
+ t.lastId = id;
+
+ if (w.focussedElement) {
+ w.focussedElement.focus();
+ } else if (DOM.get(id + '_ok')) {
+ DOM.get(w.id + '_ok').focus();
+ } else if (DOM.get(w.id + '_ifr')) {
+ DOM.get(w.id + '_ifr').focus();
+ }
+ }
+ },
+
+ _addAll : function(te, ne) {
+ var i, n, t = this, dom = tinymce.DOM;
+
+ if (is(ne, 'string'))
+ te.appendChild(dom.doc.createTextNode(ne));
+ else if (ne.length) {
+ te = te.appendChild(dom.create(ne[0], ne[1]));
+
+ for (i=2; i<ne.length; i++)
+ t._addAll(te, ne[i]);
+ }
+ },
+
+ _startDrag : function(id, se, ac) {
+ var t = this, mu, mm, d = DOM.doc, eb, w = t.windows[id], we = w.element, sp = we.getXY(), p, sz, ph, cp, vp, sx, sy, sex, sey, dx, dy, dw, dh;
+
+ // Get positons and sizes
+// cp = DOM.getPos(t.editor.getContainer());
+ cp = {x : 0, y : 0};
+ vp = DOM.getViewPort();
+
+ // Reduce viewport size to avoid scrollbars while dragging
+ vp.w -= 2;
+ vp.h -= 2;
+
+ sex = se.screenX;
+ sey = se.screenY;
+ dx = dy = dw = dh = 0;
+
+ // Handle mouse up
+ mu = Event.add(d, 'mouseup', function(e) {
+ Event.remove(d, 'mouseup', mu);
+ Event.remove(d, 'mousemove', mm);
+
+ if (eb)
+ eb.remove();
+
+ we.moveBy(dx, dy);
+ we.resizeBy(dw, dh);
+ sz = we.getSize();
+ DOM.setStyles(id + '_ifr', {width : sz.w - w.deltaWidth, height : sz.h - w.deltaHeight});
+ t._fixIELayout(id, 1);
+
+ return Event.cancel(e);
+ });
+
+ if (ac != 'Move')
+ startMove();
+
+ function startMove() {
+ if (eb)
+ return;
+
+ t._fixIELayout(id, 0);
+
+ // Setup event blocker
+ DOM.add(d.body, 'div', {
+ id : 'mceEventBlocker',
+ 'class' : 'mceEventBlocker ' + (t.editor.settings.inlinepopups_skin || 'clearlooks2'),
+ style : {zIndex : t.zIndex + 1}
+ });
+
+ if (tinymce.isIE6 || (tinymce.isIE && !DOM.boxModel))
+ DOM.setStyles('mceEventBlocker', {position : 'absolute', left : vp.x, top : vp.y, width : vp.w - 2, height : vp.h - 2});
+
+ eb = new Element('mceEventBlocker');
+ eb.update();
+
+ // Setup placeholder
+ p = we.getXY();
+ sz = we.getSize();
+ sx = cp.x + p.x - vp.x;
+ sy = cp.y + p.y - vp.y;
+ DOM.add(eb.get(), 'div', {id : 'mcePlaceHolder', 'class' : 'mcePlaceHolder', style : {left : sx, top : sy, width : sz.w, height : sz.h}});
+ ph = new Element('mcePlaceHolder');
+ };
+
+ // Handle mouse move/drag
+ mm = Event.add(d, 'mousemove', function(e) {
+ var x, y, v;
+
+ startMove();
+
+ x = e.screenX - sex;
+ y = e.screenY - sey;
+
+ switch (ac) {
+ case 'ResizeW':
+ dx = x;
+ dw = 0 - x;
+ break;
+
+ case 'ResizeE':
+ dw = x;
+ break;
+
+ case 'ResizeN':
+ case 'ResizeNW':
+ case 'ResizeNE':
+ if (ac == "ResizeNW") {
+ dx = x;
+ dw = 0 - x;
+ } else if (ac == "ResizeNE")
+ dw = x;
+
+ dy = y;
+ dh = 0 - y;
+ break;
+
+ case 'ResizeS':
+ case 'ResizeSW':
+ case 'ResizeSE':
+ if (ac == "ResizeSW") {
+ dx = x;
+ dw = 0 - x;
+ } else if (ac == "ResizeSE")
+ dw = x;
+
+ dh = y;
+ break;
+
+ case 'mceMove':
+ dx = x;
+ dy = y;
+ break;
+ }
+
+ // Boundary check
+ if (dw < (v = w.features.min_width - sz.w)) {
+ if (dx !== 0)
+ dx += dw - v;
+
+ dw = v;
+ }
+
+ if (dh < (v = w.features.min_height - sz.h)) {
+ if (dy !== 0)
+ dy += dh - v;
+
+ dh = v;
+ }
+
+ dw = Math.min(dw, w.features.max_width - sz.w);
+ dh = Math.min(dh, w.features.max_height - sz.h);
+ dx = Math.max(dx, vp.x - (sx + vp.x));
+ dy = Math.max(dy, vp.y - (sy + vp.y));
+ dx = Math.min(dx, (vp.w + vp.x) - (sx + sz.w + vp.x));
+ dy = Math.min(dy, (vp.h + vp.y) - (sy + sz.h + vp.y));
+
+ // Move if needed
+ if (dx + dy !== 0) {
+ if (sx + dx < 0)
+ dx = 0;
+
+ if (sy + dy < 0)
+ dy = 0;
+
+ ph.moveTo(sx + dx, sy + dy);
+ }
+
+ // Resize if needed
+ if (dw + dh !== 0)
+ ph.resizeTo(sz.w + dw, sz.h + dh);
+
+ return Event.cancel(e);
+ });
+
+ return Event.cancel(se);
+ },
+
+ resizeBy : function(dw, dh, id) {
+ var w = this.windows[id];
+
+ if (w) {
+ w.element.resizeBy(dw, dh);
+ w.iframeElement.resizeBy(dw, dh);
+ }
+ },
+
+ close : function(win, id) {
+ var t = this, w, d = DOM.doc, fw, id;
+
+ id = t._findId(id || win);
+
+ // Probably not inline
+ if (!t.windows[id]) {
+ t.parent(win);
+ return;
+ }
+
+ t.count--;
+
+ if (t.count == 0) {
+ DOM.remove('mceModalBlocker');
+ DOM.setAttrib(DOM.doc.body, 'aria-hidden', 'false');
+ t.editor.focus();
+ }
+
+ if (w = t.windows[id]) {
+ t.onClose.dispatch(t);
+ Event.remove(d, 'mousedown', w.mousedownFunc);
+ Event.remove(d, 'click', w.clickFunc);
+ Event.clear(id);
+ Event.clear(id + '_ifr');
+
+ DOM.setAttrib(id + '_ifr', 'src', 'javascript:""'); // Prevent leak
+ w.element.remove();
+ delete t.windows[id];
+
+ fw = t._frontWindow();
+
+ if (fw)
+ t.focus(fw.id);
+ }
+ },
+
+ // Find front most window
+ _frontWindow : function() {
+ var fw, ix = 0;
+ // Find front most window and focus that
+ each (this.windows, function(w) {
+ if (w.zIndex > ix) {
+ fw = w;
+ ix = w.zIndex;
+ }
+ });
+ return fw;
+ },
+
+ setTitle : function(w, ti) {
+ var e;
+
+ w = this._findId(w);
+
+ if (e = DOM.get(w + '_title'))
+ e.innerHTML = DOM.encode(ti);
+ },
+
+ alert : function(txt, cb, s) {
+ var t = this, w;
+
+ w = t.open({
+ title : t,
+ type : 'alert',
+ button_func : function(s) {
+ if (cb)
+ cb.call(s || t, s);
+
+ t.close(null, w.id);
+ },
+ content : DOM.encode(t.editor.getLang(txt, txt)),
+ inline : 1,
+ width : 400,
+ height : 130
+ });
+ },
+
+ confirm : function(txt, cb, s) {
+ var t = this, w;
+
+ w = t.open({
+ title : t,
+ type : 'confirm',
+ button_func : function(s) {
+ if (cb)
+ cb.call(s || t, s);
+
+ t.close(null, w.id);
+ },
+ content : DOM.encode(t.editor.getLang(txt, txt)),
+ inline : 1,
+ width : 400,
+ height : 130
+ });
+ },
+
+ // Internal functions
+
+ _findId : function(w) {
+ var t = this;
+
+ if (typeof(w) == 'string')
+ return w;
+
+ each(t.windows, function(wo) {
+ var ifr = DOM.get(wo.id + '_ifr');
+
+ if (ifr && w == ifr.contentWindow) {
+ w = wo.id;
+ return false;
+ }
+ });
+
+ return w;
+ },
+
+ _fixIELayout : function(id, s) {
+ var w, img;
+
+ if (!tinymce.isIE6)
+ return;
+
+ // Fixes the bug where hover flickers and does odd things in IE6
+ each(['n','s','w','e','nw','ne','sw','se'], function(v) {
+ var e = DOM.get(id + '_resize_' + v);
+
+ DOM.setStyles(e, {
+ width : s ? e.clientWidth : '',
+ height : s ? e.clientHeight : '',
+ cursor : DOM.getStyle(e, 'cursor', 1)
+ });
+
+ DOM.setStyle(id + "_bottom", 'bottom', '-1px');
+
+ e = 0;
+ });
+
+ // Fixes graphics glitch
+ if (w = this.windows[id]) {
+ // Fixes rendering bug after resize
+ w.element.hide();
+ w.element.show();
+
+ // Forced a repaint of the window
+ //DOM.get(id).style.filter = '';
+
+ // IE has a bug where images used in CSS won't get loaded
+ // sometimes when the cache in the browser is disabled
+ // This fix tries to solve it by loading the images using the image object
+ each(DOM.select('div,a', id), function(e, i) {
+ if (e.currentStyle.backgroundImage != 'none') {
+ img = new Image();
+ img.src = e.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/, '$1');
+ }
+ });
+
+ DOM.get(id).style.filter = '';
+ }
+ }
+ });
+
+ // Register plugin
+ tinymce.PluginManager.add('inlinepopups', tinymce.plugins.InlinePopups);
+})();
+
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif
new file mode 100644
index 00000000..21913985
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif
new file mode 100644
index 00000000..f957e49a
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif
new file mode 100644
index 00000000..6baf64ad
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif
new file mode 100644
index 00000000..20acbbf7
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif
new file mode 100644
index 00000000..d5de1cc2
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif
new file mode 100644
index 00000000..c2a2ad45
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif
new file mode 100644
index 00000000..0b4cc368
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css
new file mode 100644
index 00000000..a50d4fc5
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css
@@ -0,0 +1,90 @@
+/* Clearlooks 2 */
+
+/* Reset */
+.clearlooks2, .clearlooks2 div, .clearlooks2 span, .clearlooks2 a {vertical-align:baseline; text-align:left; position:absolute; border:0; padding:0; margin:0; background:transparent; font-family:Arial,Verdana; font-size:11px; color:#000; text-decoration:none; font-weight:normal; width:auto; height:auto; overflow:hidden; display:block}
+
+/* General */
+.clearlooks2 {position:absolute; direction:ltr}
+.clearlooks2 .mceWrapper {position:static}
+.mceEventBlocker {position:fixed; left:0; top:0; background:url(img/horizontal.gif) no-repeat 0 -75px; width:100%; height:100%}
+.clearlooks2 .mcePlaceHolder {border:1px solid #000; background:#888; top:0; left:0; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50)}
+.clearlooks2_modalBlocker {position:fixed; left:0; top:0; width:100%; height:100%; background:#FFF; opacity:0.6; -ms-filter:'alpha(opacity=60)'; filter:alpha(opacity=60); display:none}
+
+/* Top */
+.clearlooks2 .mceTop, .clearlooks2 .mceTop div {top:0; width:100%; height:23px}
+.clearlooks2 .mceTop .mceLeft {width:6px; background:url(img/corners.gif)}
+.clearlooks2 .mceTop .mceCenter {right:6px; width:100%; height:23px; background:url(img/horizontal.gif) 12px 0; clip:rect(auto auto auto 12px)}
+.clearlooks2 .mceTop .mceRight {right:0; width:6px; height:23px; background:url(img/corners.gif) -12px 0}
+.clearlooks2 .mceTop span {width:100%; text-align:center; vertical-align:middle; line-height:23px; font-weight:bold}
+.clearlooks2 .mceFocus .mceTop .mceLeft {background:url(img/corners.gif) -6px 0}
+.clearlooks2 .mceFocus .mceTop .mceCenter {background:url(img/horizontal.gif) 0 -23px}
+.clearlooks2 .mceFocus .mceTop .mceRight {background:url(img/corners.gif) -18px 0}
+.clearlooks2 .mceFocus .mceTop span {color:#FFF}
+
+/* Middle */
+.clearlooks2 .mceMiddle, .clearlooks2 .mceMiddle div {top:0}
+.clearlooks2 .mceMiddle {width:100%; height:100%; clip:rect(23px auto auto auto)}
+.clearlooks2 .mceMiddle .mceLeft {left:0; width:5px; height:100%; background:url(img/vertical.gif) -5px 0}
+.clearlooks2 .mceMiddle span {top:23px; left:5px; width:100%; height:100%; background:#FFF}
+.clearlooks2 .mceMiddle .mceRight {right:0; width:5px; height:100%; background:url(img/vertical.gif)}
+
+/* Bottom */
+.clearlooks2 .mceBottom, .clearlooks2 .mceBottom div {height:6px}
+.clearlooks2 .mceBottom {left:0; bottom:0; width:100%}
+.clearlooks2 .mceBottom div {top:0}
+.clearlooks2 .mceBottom .mceLeft {left:0; width:5px; background:url(img/corners.gif) -34px -6px}
+.clearlooks2 .mceBottom .mceCenter {left:5px; width:100%; background:url(img/horizontal.gif) 0 -46px}
+.clearlooks2 .mceBottom .mceRight {right:0; width:5px; background: url(img/corners.gif) -34px 0}
+.clearlooks2 .mceBottom span {display:none}
+.clearlooks2 .mceStatusbar .mceBottom, .clearlooks2 .mceStatusbar .mceBottom div {height:23px}
+.clearlooks2 .mceStatusbar .mceBottom .mceLeft {background:url(img/corners.gif) -29px 0}
+.clearlooks2 .mceStatusbar .mceBottom .mceCenter {background:url(img/horizontal.gif) 0 -52px}
+.clearlooks2 .mceStatusbar .mceBottom .mceRight {background:url(img/corners.gif) -24px 0}
+.clearlooks2 .mceStatusbar .mceBottom span {display:block; left:7px; font-family:Arial, Verdana; font-size:11px; line-height:23px}
+
+/* Actions */
+.clearlooks2 a {width:29px; height:16px; top:3px;}
+.clearlooks2 .mceClose {right:6px; background:url(img/buttons.gif) -87px 0}
+.clearlooks2 .mceMin {display:none; right:68px; background:url(img/buttons.gif) 0 0}
+.clearlooks2 .mceMed {display:none; right:37px; background:url(img/buttons.gif) -29px 0}
+.clearlooks2 .mceMax {display:none; right:37px; background:url(img/buttons.gif) -58px 0}
+.clearlooks2 .mceMove {display:none;width:100%;cursor:move;background:url(img/corners.gif) no-repeat -100px -100px}
+.clearlooks2 .mceMovable .mceMove {display:block}
+.clearlooks2 .mceFocus .mceClose {right:6px; background:url(img/buttons.gif) -87px -16px}
+.clearlooks2 .mceFocus .mceMin {right:68px; background:url(img/buttons.gif) 0 -16px}
+.clearlooks2 .mceFocus .mceMed {right:37px; background:url(img/buttons.gif) -29px -16px}
+.clearlooks2 .mceFocus .mceMax {right:37px; background:url(img/buttons.gif) -58px -16px}
+.clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px}
+.clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px}
+.clearlooks2 .mceFocus .mceMin:hover {right:68px; background:url(img/buttons.gif) 0 -32px}
+.clearlooks2 .mceFocus .mceMed:hover {right:37px; background:url(img/buttons.gif) -29px -32px}
+.clearlooks2 .mceFocus .mceMax:hover {right:37px; background:url(img/buttons.gif) -58px -32px}
+
+/* Resize */
+.clearlooks2 .mceResize {top:auto; left:auto; display:none; width:5px; height:5px; background:url(img/horizontal.gif) no-repeat 0 -75px}
+.clearlooks2 .mceResizable .mceResize {display:block}
+.clearlooks2 .mceResizable .mceMin, .clearlooks2 .mceMax {display:none}
+.clearlooks2 .mceMinimizable .mceMin {display:block}
+.clearlooks2 .mceMaximizable .mceMax {display:block}
+.clearlooks2 .mceMaximized .mceMed {display:block}
+.clearlooks2 .mceMaximized .mceMax {display:none}
+.clearlooks2 a.mceResizeN {top:0; left:0; width:100%; cursor:n-resize}
+.clearlooks2 a.mceResizeNW {top:0; left:0; cursor:nw-resize}
+.clearlooks2 a.mceResizeNE {top:0; right:0; cursor:ne-resize}
+.clearlooks2 a.mceResizeW {top:0; left:0; height:100%; cursor:w-resize;}
+.clearlooks2 a.mceResizeE {top:0; right:0; height:100%; cursor:e-resize}
+.clearlooks2 a.mceResizeS {bottom:0; left:0; width:100%; cursor:s-resize}
+.clearlooks2 a.mceResizeSW {bottom:0; left:0; cursor:sw-resize}
+.clearlooks2 a.mceResizeSE {bottom:0; right:0; cursor:se-resize}
+
+/* Alert/Confirm */
+.clearlooks2 .mceButton {font-weight:bold; bottom:10px; width:80px; height:30px; background:url(img/button.gif); line-height:30px; vertical-align:middle; text-align:center; outline:0}
+.clearlooks2 .mceMiddle .mceIcon {left:15px; top:35px; width:32px; height:32px}
+.clearlooks2 .mceAlert .mceMiddle span, .clearlooks2 .mceConfirm .mceMiddle span {background:transparent;left:60px; top:35px; width:320px; height:50px; font-weight:bold; overflow:auto; white-space:normal}
+.clearlooks2 a:hover {font-weight:bold;}
+.clearlooks2 .mceAlert .mceMiddle, .clearlooks2 .mceConfirm .mceMiddle {background:#D6D7D5}
+.clearlooks2 .mceAlert .mceOk {left:50%; top:auto; margin-left: -40px}
+.clearlooks2 .mceAlert .mceIcon {background:url(img/alert.gif)}
+.clearlooks2 .mceConfirm .mceOk {left:50%; top:auto; margin-left: -90px}
+.clearlooks2 .mceConfirm .mceCancel {left:50%; top:auto}
+.clearlooks2 .mceConfirm .mceIcon {background:url(img/confirm.gif)}
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/template.htm b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/template.htm
new file mode 100644
index 00000000..f9ec6421
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/inlinepopups/template.htm
@@ -0,0 +1,387 @@
+<!-- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -->
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>Template for dialogs</title>
+<link rel="stylesheet" type="text/css" href="skins/clearlooks2/window.css" />
+</head>
+<body>
+
+<div class="mceEditor">
+ <div class="clearlooks2" style="width:400px; height:100px; left:10px;">
+ <div class="mceWrapper">
+ <div class="mceTop">
+ <div class="mceLeft"></div>
+ <div class="mceCenter"></div>
+ <div class="mceRight"></div>
+ <span>Blured</span>
+ </div>
+
+ <div class="mceMiddle">
+ <div class="mceLeft"></div>
+ <span>Content</span>
+ <div class="mceRight"></div>
+ </div>
+
+ <div class="mceBottom">
+ <div class="mceLeft"></div>
+ <div class="mceCenter"></div>
+ <div class="mceRight"></div>
+ <span>Statusbar text.</span>
+ </div>
+
+ <a class="mceMove" href="#"></a>
+ <a class="mceMin" href="#"></a>
+ <a class="mceMax" href="#"></a>
+ <a class="mceMed" href="#"></a>
+ <a class="mceClose" href="#"></a>
+ <a class="mceResize mceResizeN" href="#"></a>
+ <a class="mceResize mceResizeS" href="#"></a>
+ <a class="mceResize mceResizeW" href="#"></a>
+ <a class="mceResize mceResizeE" href="#"></a>
+ <a class="mceResize mceResizeNW" href="#"></a>
+ <a class="mceResize mceResizeNE" href="#"></a>
+ <a class="mceResize mceResizeSW" href="#"></a>
+ <a class="mceResize mceResizeSE" href="#"></a>
+ </div>
+ </div>
+
+ <div class="clearlooks2" style="width:400px; height:100px; left:420px;">
+ <div class="mceWrapper mceMovable mceFocus">
+ <div class="mceTop">
+ <div class="mceLeft"></div>
+ <div class="mceCenter"></div>
+ <div class="mceRight"></div>
+ <span>Focused</span>
+ </div>
+
+ <div class="mceMiddle">
+ <div class="mceLeft"></div>
+ <span>Content</span>
+ <div class="mceRight"></div>
+ </div>
+
+ <div class="mceBottom">
+ <div class="mceLeft"></div>
+ <div class="mceCenter"></div>
+ <div class="mceRight"></div>
+ <span>Statusbar text.</span>
+ </div>
+
+ <a class="mceMove" href="#"></a>
+ <a class="mceMin" href="#"></a>
+ <a class="mceMax" href="#"></a>
+ <a class="mceMed" href="#"></a>
+ <a class="mceClose" href="#"></a>
+ <a class="mceResize mceResizeN" href="#"></a>
+ <a class="mceResize mceResizeS" href="#"></a>
+ <a class="mceResize mceResizeW" href="#"></a>
+ <a class="mceResize mceResizeE" href="#"></a>
+ <a class="mceResize mceResizeNW" href="#"></a>
+ <a class="mceResize mceResizeNE" href="#"></a>
+ <a class="mceResize mceResizeSW" href="#"></a>
+ <a class="mceResize mceResizeSE" href="#"></a>
+ </div>
+ </div>
+
+ <div class="clearlooks2" style="width:400px; height:100px; left:10px; top:120px;">
+ <div class="mceWrapper mceMovable mceFocus mceStatusbar">
+ <div class="mceTop">
+ <div class="mceLeft"></div>
+ <div class="mceCenter"></div>
+ <div class="mceRight"></div>
+ <span>Statusbar</span>
+ </div>
+
+ <div class="mceMiddle">
+ <div class="mceLeft"></div>
+ <span>Content</span>
+ <div class="mceRight"></div>
+ </div>
+
+ <div class="mceBottom">
+ <div class="mceLeft"></div>
+ <div class="mceCenter"></div>
+ <div class="mceRight"></div>
+ <span>Statusbar text.</span>
+ </div>
+
+ <a class="mceMove" href="#"></a>
+ <a class="mceMin" href="#"></a>
+ <a class="mceMax" href="#"></a>
+ <a class="mceMed" href="#"></a>
+ <a class="mceClose" href="#"></a>
+ <a class="mceResize mceResizeN" href="#"></a>
+ <a class="mceResize mceResizeS" href="#"></a>
+ <a class="mceResize mceResizeW" href="#"></a>
+ <a class="mceResize mceResizeE" href="#"></a>
+ <a class="mceResize mceResizeNW" href="#"></a>
+ <a class="mceResize mceResizeNE" href="#"></a>
+ <a class="mceResize mceResizeSW" href="#"></a>
+ <a class="mceResize mceResizeSE" href="#"></a>
+ </div>
+ </div>
+
+ <div class="clearlooks2" style="width:400px; height:100px; left:420px; top:120px;">
+ <div class="mceWrapper mceMovable mceFocus mceStatusbar mceResizable">
+ <div class="mceTop">
+ <div class="mceLeft"></div>
+ <div class="mceCenter"></div>
+ <div class="mceRight"></div>
+ <span>Statusbar, Resizable</span>
+ </div>
+
+ <div class="mceMiddle">
+ <div class="mceLeft"></div>
+ <span>Content</span>
+ <div class="mceRight"></div>
+ </div>
+
+ <div class="mceBottom">
+ <div class="mceLeft"></div>
+ <div class="mceCenter"></div>
+ <div class="mceRight"></div>
+ <span>Statusbar text.</span>
+ </div>
+
+ <a class="mceMove" href="#"></a>
+ <a class="mceMin" href="#"></a>
+ <a class="mceMax" href="#"></a>
+ <a class="mceMed" href="#"></a>
+ <a class="mceClose" href="#"></a>
+ <a class="mceResize mceResizeN" href="#"></a>
+ <a class="mceResize mceResizeS" href="#"></a>
+ <a class="mceResize mceResizeW" href="#"></a>
+ <a class="mceResize mceResizeE" href="#"></a>
+ <a class="mceResize mceResizeNW" href="#"></a>
+ <a class="mceResize mceResizeNE" href="#"></a>
+ <a class="mceResize mceResizeSW" href="#"></a>
+ <a class="mceResize mceResizeSE" href="#"></a>
+ </div>
+ </div>
+
+ <div class="clearlooks2" style="width:400px; height:100px; left:10px; top:230px;">
+ <div class="mceWrapper mceMovable mceFocus mceResizable mceMaximizable">
+ <div class="mceTop">
+ <div class="mceLeft"></div>
+ <div class="mceCenter"></div>
+ <div class="mceRight"></div>
+ <span>Resizable, Maximizable</span>
+ </div>
+
+ <div class="mceMiddle">
+ <div class="mceLeft"></div>
+ <span>Content</span>
+ <div class="mceRight"></div>
+ </div>
+
+ <div class="mceBottom">
+ <div class="mceLeft"></div>
+ <div class="mceCenter"></div>
+ <div class="mceRight"></div>
+ <span>Statusbar text.</span>
+ </div>
+
+ <a class="mceMove" href="#"></a>
+ <a class="mceMin" href="#"></a>
+ <a class="mceMax" href="#"></a>
+ <a class="mceMed" href="#"></a>
+ <a class="mceClose" href="#"></a>
+ <a class="mceResize mceResizeN" href="#"></a>
+ <a class="mceResize mceResizeS" href="#"></a>
+ <a class="mceResize mceResizeW" href="#"></a>
+ <a class="mceResize mceResizeE" href="#"></a>
+ <a class="mceResize mceResizeNW" href="#"></a>
+ <a class="mceResize mceResizeNE" href="#"></a>
+ <a class="mceResize mceResizeSW" href="#"></a>
+ <a class="mceResize mceResizeSE" href="#"></a>
+ </div>
+ </div>
+
+ <div class="clearlooks2" style="width:400px; height:100px; left:420px; top:230px;">
+ <div class="mceWrapper mceMovable mceStatusbar mceResizable mceMaximizable">
+ <div class="mceTop">
+ <div class="mceLeft"></div>
+ <div class="mceCenter"></div>
+ <div class="mceRight"></div>
+ <span>Blurred, Maximizable, Statusbar, Resizable</span>
+ </div>
+
+ <div class="mceMiddle">
+ <div class="mceLeft"></div>
+ <span>Content</span>
+ <div class="mceRight"></div>
+ </div>
+
+ <div class="mceBottom">
+ <div class="mceLeft"></div>
+ <div class="mceCenter"></div>
+ <div class="mceRight"></div>
+ <span>Statusbar text.</span>
+ </div>
+
+ <a class="mceMove" href="#"></a>
+ <a class="mceMin" href="#"></a>
+ <a class="mceMax" href="#"></a>
+ <a class="mceMed" href="#"></a>
+ <a class="mceClose" href="#"></a>
+ <a class="mceResize mceResizeN" href="#"></a>
+ <a class="mceResize mceResizeS" href="#"></a>
+ <a class="mceResize mceResizeW" href="#"></a>
+ <a class="mceResize mceResizeE" href="#"></a>
+ <a class="mceResize mceResizeNW" href="#"></a>
+ <a class="mceResize mceResizeNE" href="#"></a>
+ <a class="mceResize mceResizeSW" href="#"></a>
+ <a class="mceResize mceResizeSE" href="#"></a>
+ </div>
+ </div>
+
+ <div class="clearlooks2" style="width:400px; height:100px; left:10px; top:340px;">
+ <div class="mceWrapper mceMovable mceFocus mceResizable mceMaximized mceMinimizable mceMaximizable">
+ <div class="mceTop">
+ <div class="mceLeft"></div>
+ <div class="mceCenter"></div>
+ <div class="mceRight"></div>
+ <span>Maximized, Maximizable, Minimizable</span>
+ </div>
+
+ <div class="mceMiddle">
+ <div class="mceLeft"></div>
+ <span>Content</span>
+ <div class="mceRight"></div>
+ </div>
+
+ <div class="mceBottom">
+ <div class="mceLeft"></div>
+ <div class="mceCenter"></div>
+ <div class="mceRight"></div>
+ <span>Statusbar text.</span>
+ </div>
+
+ <a class="mceMove" href="#"></a>
+ <a class="mceMin" href="#"></a>
+ <a class="mceMax" href="#"></a>
+ <a class="mceMed" href="#"></a>
+ <a class="mceClose" href="#"></a>
+ <a class="mceResize mceResizeN" href="#"></a>
+ <a class="mceResize mceResizeS" href="#"></a>
+ <a class="mceResize mceResizeW" href="#"></a>
+ <a class="mceResize mceResizeE" href="#"></a>
+ <a class="mceResize mceResizeNW" href="#"></a>
+ <a class="mceResize mceResizeNE" href="#"></a>
+ <a class="mceResize mceResizeSW" href="#"></a>
+ <a class="mceResize mceResizeSE" href="#"></a>
+ </div>
+ </div>
+
+ <div class="clearlooks2" style="width:400px; height:100px; left:420px; top:340px;">
+ <div class="mceWrapper mceMovable mceStatusbar mceResizable mceMaximized mceMinimizable mceMaximizable">
+ <div class="mceTop">
+ <div class="mceLeft"></div>
+ <div class="mceCenter"></div>
+ <div class="mceRight"></div>
+ <span>Blured</span>
+ </div>
+
+ <div class="mceMiddle">
+ <div class="mceLeft"></div>
+ <span>Content</span>
+ <div class="mceRight"></div>
+ </div>
+
+ <div class="mceBottom">
+ <div class="mceLeft"></div>
+ <div class="mceCenter"></div>
+ <div class="mceRight"></div>
+ <span>Statusbar text.</span>
+ </div>
+
+ <a class="mceMove" href="#"></a>
+ <a class="mceMin" href="#"></a>
+ <a class="mceMax" href="#"></a>
+ <a class="mceMed" href="#"></a>
+ <a class="mceClose" href="#"></a>
+ <a class="mceResize mceResizeN" href="#"></a>
+ <a class="mceResize mceResizeS" href="#"></a>
+ <a class="mceResize mceResizeW" href="#"></a>
+ <a class="mceResize mceResizeE" href="#"></a>
+ <a class="mceResize mceResizeNW" href="#"></a>
+ <a class="mceResize mceResizeNE" href="#"></a>
+ <a class="mceResize mceResizeSW" href="#"></a>
+ <a class="mceResize mceResizeSE" href="#"></a>
+ </div>
+ </div>
+
+ <div class="clearlooks2" style="width:400px; height:130px; left:10px; top:450px;">
+ <div class="mceWrapper mceMovable mceFocus mceModal mceAlert">
+ <div class="mceTop">
+ <div class="mceLeft"></div>
+ <div class="mceCenter"></div>
+ <div class="mceRight"></div>
+ <span>Alert</span>
+ </div>
+
+ <div class="mceMiddle">
+ <div class="mceLeft"></div>
+ <span>
+ This is a very long error message. This is a very long error message.
+ This is a very long error message. This is a very long error message.
+ This is a very long error message. This is a very long error message.
+ This is a very long error message. This is a very long error message.
+ This is a very long error message. This is a very long error message.
+ This is a very long error message. This is a very long error message.
+ </span>
+ <div class="mceRight"></div>
+ <div class="mceIcon"></div>
+ </div>
+
+ <div class="mceBottom">
+ <div class="mceLeft"></div>
+ <div class="mceCenter"></div>
+ <div class="mceRight"></div>
+ </div>
+
+ <a class="mceMove" href="#"></a>
+ <a class="mceButton mceOk" href="#">Ok</a>
+ <a class="mceClose" href="#"></a>
+ </div>
+ </div>
+
+ <div class="clearlooks2" style="width:400px; height:130px; left:420px; top:450px;">
+ <div class="mceWrapper mceMovable mceFocus mceModal mceConfirm">
+ <div class="mceTop">
+ <div class="mceLeft"></div>
+ <div class="mceCenter"></div>
+ <div class="mceRight"></div>
+ <span>Confirm</span>
+ </div>
+
+ <div class="mceMiddle">
+ <div class="mceLeft"></div>
+ <span>
+ This is a very long error message. This is a very long error message.
+ This is a very long error message. This is a very long error message.
+ This is a very long error message. This is a very long error message.
+ This is a very long error message. This is a very long error message.
+ This is a very long error message. This is a very long error message.
+ This is a very long error message. This is a very long error message.
+ </span>
+ <div class="mceRight"></div>
+ <div class="mceIcon"></div>
+ </div>
+
+ <div class="mceBottom">
+ <div class="mceLeft"></div>
+ <div class="mceCenter"></div>
+ <div class="mceRight"></div>
+ </div>
+
+ <a class="mceMove" href="#"></a>
+ <a class="mceButton mceOk" href="#">Ok</a>
+ <a class="mceButton mceCancel" href="#">Cancel</a>
+ <a class="mceClose" href="#"></a>
+ </div>
+ </div>
+</div>
+
+</body>
+</html>
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/insertdatetime/editor_plugin.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/insertdatetime/editor_plugin.js
new file mode 100755
index 00000000..938ce6b1
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/insertdatetime/editor_plugin.js
@@ -0,0 +1 @@
+(function(){tinymce.create("tinymce.plugins.InsertDateTime",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceInsertDate",function(){var d=c._getDateTime(new Date(),a.getParam("plugin_insertdate_dateFormat",a.getLang("insertdatetime.date_fmt")));a.execCommand("mceInsertContent",false,d)});a.addCommand("mceInsertTime",function(){var d=c._getDateTime(new Date(),a.getParam("plugin_insertdate_timeFormat",a.getLang("insertdatetime.time_fmt")));a.execCommand("mceInsertContent",false,d)});a.addButton("insertdate",{title:"insertdatetime.insertdate_desc",cmd:"mceInsertDate"});a.addButton("inserttime",{title:"insertdatetime.inserttime_desc",cmd:"mceInsertTime"})},getInfo:function(){return{longname:"Insert date/time",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/insertdatetime",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_getDateTime:function(e,a){var c=this.editor;function b(g,d){g=""+g;if(g.length<d){for(var f=0;f<(d-g.length);f++){g="0"+g}}return g}a=a.replace("%D","%m/%d/%y");a=a.replace("%r","%I:%M:%S %p");a=a.replace("%Y",""+e.getFullYear());a=a.replace("%y",""+e.getYear());a=a.replace("%m",b(e.getMonth()+1,2));a=a.replace("%d",b(e.getDate(),2));a=a.replace("%H",""+b(e.getHours(),2));a=a.replace("%M",""+b(e.getMinutes(),2));a=a.replace("%S",""+b(e.getSeconds(),2));a=a.replace("%I",""+((e.getHours()+11)%12+1));a=a.replace("%p",""+(e.getHours()<12?"AM":"PM"));a=a.replace("%B",""+c.getLang("insertdatetime.months_long").split(",")[e.getMonth()]);a=a.replace("%b",""+c.getLang("insertdatetime.months_short").split(",")[e.getMonth()]);a=a.replace("%A",""+c.getLang("insertdatetime.day_long").split(",")[e.getDay()]);a=a.replace("%a",""+c.getLang("insertdatetime.day_short").split(",")[e.getDay()]);a=a.replace("%%","%");return a}});tinymce.PluginManager.add("insertdatetime",tinymce.plugins.InsertDateTime)})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/insertdatetime/editor_plugin_src.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/insertdatetime/editor_plugin_src.js
new file mode 100755
index 00000000..181c791e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/insertdatetime/editor_plugin_src.js
@@ -0,0 +1,83 @@
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+ tinymce.create('tinymce.plugins.InsertDateTime', {
+ init : function(ed, url) {
+ var t = this;
+
+ t.editor = ed;
+
+ ed.addCommand('mceInsertDate', function() {
+ var str = t._getDateTime(new Date(), ed.getParam("plugin_insertdate_dateFormat", ed.getLang('insertdatetime.date_fmt')));
+
+ ed.execCommand('mceInsertContent', false, str);
+ });
+
+ ed.addCommand('mceInsertTime', function() {
+ var str = t._getDateTime(new Date(), ed.getParam("plugin_insertdate_timeFormat", ed.getLang('insertdatetime.time_fmt')));
+
+ ed.execCommand('mceInsertContent', false, str);
+ });
+
+ ed.addButton('insertdate', {title : 'insertdatetime.insertdate_desc', cmd : 'mceInsertDate'});
+ ed.addButton('inserttime', {title : 'insertdatetime.inserttime_desc', cmd : 'mceInsertTime'});
+ },
+
+ getInfo : function() {
+ return {
+ longname : 'Insert date/time',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/insertdatetime',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ };
+ },
+
+ // Private methods
+
+ _getDateTime : function(d, fmt) {
+ var ed = this.editor;
+
+ function addZeros(value, len) {
+ value = "" + value;
+
+ if (value.length < len) {
+ for (var i=0; i<(len-value.length); i++)
+ value = "0" + value;
+ }
+
+ return value;
+ };
+
+ fmt = fmt.replace("%D", "%m/%d/%y");
+ fmt = fmt.replace("%r", "%I:%M:%S %p");
+ fmt = fmt.replace("%Y", "" + d.getFullYear());
+ fmt = fmt.replace("%y", "" + d.getYear());
+ fmt = fmt.replace("%m", addZeros(d.getMonth()+1, 2));
+ fmt = fmt.replace("%d", addZeros(d.getDate(), 2));
+ fmt = fmt.replace("%H", "" + addZeros(d.getHours(), 2));
+ fmt = fmt.replace("%M", "" + addZeros(d.getMinutes(), 2));
+ fmt = fmt.replace("%S", "" + addZeros(d.getSeconds(), 2));
+ fmt = fmt.replace("%I", "" + ((d.getHours() + 11) % 12 + 1));
+ fmt = fmt.replace("%p", "" + (d.getHours() < 12 ? "AM" : "PM"));
+ fmt = fmt.replace("%B", "" + ed.getLang("insertdatetime.months_long").split(',')[d.getMonth()]);
+ fmt = fmt.replace("%b", "" + ed.getLang("insertdatetime.months_short").split(',')[d.getMonth()]);
+ fmt = fmt.replace("%A", "" + ed.getLang("insertdatetime.day_long").split(',')[d.getDay()]);
+ fmt = fmt.replace("%a", "" + ed.getLang("insertdatetime.day_short").split(',')[d.getDay()]);
+ fmt = fmt.replace("%%", "%");
+
+ return fmt;
+ }
+ });
+
+ // Register plugin
+ tinymce.PluginManager.add('insertdatetime', tinymce.plugins.InsertDateTime);
+})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/layer/editor_plugin.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/layer/editor_plugin.js
new file mode 100755
index 00000000..ca3857a7
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/layer/editor_plugin.js
@@ -0,0 +1 @@
+(function(){function a(b){do{if(b.className&&b.className.indexOf("mceItemLayer")!=-1){return b}}while(b=b.parentNode)}tinymce.create("tinymce.plugins.Layer",{init:function(b,c){var d=this;d.editor=b;b.addCommand("mceInsertLayer",d._insertLayer,d);b.addCommand("mceMoveForward",function(){d._move(1)});b.addCommand("mceMoveBackward",function(){d._move(-1)});b.addCommand("mceMakeAbsolute",function(){d._toggleAbsolute()});b.addButton("moveforward",{title:"layer.forward_desc",cmd:"mceMoveForward"});b.addButton("movebackward",{title:"layer.backward_desc",cmd:"mceMoveBackward"});b.addButton("absolute",{title:"layer.absolute_desc",cmd:"mceMakeAbsolute"});b.addButton("insertlayer",{title:"layer.insertlayer_desc",cmd:"mceInsertLayer"});b.onInit.add(function(){var e=b.dom;if(tinymce.isIE){b.getDoc().execCommand("2D-Position",false,true)}});b.onMouseUp.add(function(f,h){var g=a(h.target);if(g){f.dom.setAttrib(g,"data-mce-style","")}});b.onMouseDown.add(function(f,j){var h=j.target,i=f.getDoc(),g;if(tinymce.isGecko){if(a(h)){if(i.designMode!=="on"){i.designMode="on";h=i.body;g=h.parentNode;g.removeChild(h);g.appendChild(h)}}else{if(i.designMode=="on"){i.designMode="off"}}}});b.onNodeChange.add(d._nodeChange,d);b.onVisualAid.add(d._visualAid,d)},getInfo:function(){return{longname:"Layer",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/layer",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_nodeChange:function(c,b,f){var d,e;d=this._getParentLayer(f);e=c.dom.getParent(f,"DIV,P,IMG");if(!e){b.setDisabled("absolute",1);b.setDisabled("moveforward",1);b.setDisabled("movebackward",1)}else{b.setDisabled("absolute",0);b.setDisabled("moveforward",!d);b.setDisabled("movebackward",!d);b.setActive("absolute",d&&d.style.position.toLowerCase()=="absolute")}},_visualAid:function(b,d,c){var f=b.dom;tinymce.each(f.select("div,p",d),function(g){if(/^(absolute|relative|fixed)$/i.test(g.style.position)){if(c){f.addClass(g,"mceItemVisualAid")}else{f.removeClass(g,"mceItemVisualAid")}f.addClass(g,"mceItemLayer")}})},_move:function(j){var c=this.editor,g,h=[],f=this._getParentLayer(c.selection.getNode()),e=-1,k=-1,b;b=[];tinymce.walk(c.getBody(),function(d){if(d.nodeType==1&&/^(absolute|relative|static)$/i.test(d.style.position)){b.push(d)}},"childNodes");for(g=0;g<b.length;g++){h[g]=b[g].style.zIndex?parseInt(b[g].style.zIndex):0;if(e<0&&b[g]==f){e=g}}if(j<0){for(g=0;g<h.length;g++){if(h[g]<h[e]){k=g;break}}if(k>-1){b[e].style.zIndex=h[k];b[k].style.zIndex=h[e]}else{if(h[e]>0){b[e].style.zIndex=h[e]-1}}}else{for(g=0;g<h.length;g++){if(h[g]>h[e]){k=g;break}}if(k>-1){b[e].style.zIndex=h[k];b[k].style.zIndex=h[e]}else{b[e].style.zIndex=h[e]+1}}c.execCommand("mceRepaint")},_getParentLayer:function(b){return this.editor.dom.getParent(b,function(c){return c.nodeType==1&&/^(absolute|relative|static)$/i.test(c.style.position)})},_insertLayer:function(){var c=this.editor,e=c.dom,d=e.getPos(e.getParent(c.selection.getNode(),"*")),b=c.getBody();c.dom.add(b,"div",{style:{position:"absolute",left:d.x,top:(d.y>20?d.y:20),width:100,height:100},"class":"mceItemVisualAid mceItemLayer"},c.selection.getContent()||c.getLang("layer.content"));if(tinymce.isIE){e.setHTML(b,b.innerHTML)}},_toggleAbsolute:function(){var b=this.editor,c=this._getParentLayer(b.selection.getNode());if(!c){c=b.dom.getParent(b.selection.getNode(),"DIV,P,IMG")}if(c){if(c.style.position.toLowerCase()=="absolute"){b.dom.setStyles(c,{position:"",left:"",top:"",width:"",height:""});b.dom.removeClass(c,"mceItemVisualAid");b.dom.removeClass(c,"mceItemLayer")}else{if(c.style.left==""){c.style.left=20+"px"}if(c.style.top==""){c.style.top=20+"px"}if(c.style.width==""){c.style.width=c.width?(c.width+"px"):"100px"}if(c.style.height==""){c.style.height=c.height?(c.height+"px"):"100px"}c.style.position="absolute";b.dom.setAttrib(c,"data-mce-style","");b.addVisual(b.getBody())}b.execCommand("mceRepaint");b.nodeChanged()}}});tinymce.PluginManager.add("layer",tinymce.plugins.Layer)})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/layer/editor_plugin_src.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/layer/editor_plugin_src.js
new file mode 100755
index 00000000..daed2806
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/layer/editor_plugin_src.js
@@ -0,0 +1,262 @@
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+ function findParentLayer(node) {
+ do {
+ if (node.className && node.className.indexOf('mceItemLayer') != -1) {
+ return node;
+ }
+ } while (node = node.parentNode);
+ };
+
+ tinymce.create('tinymce.plugins.Layer', {
+ init : function(ed, url) {
+ var t = this;
+
+ t.editor = ed;
+
+ // Register commands
+ ed.addCommand('mceInsertLayer', t._insertLayer, t);
+
+ ed.addCommand('mceMoveForward', function() {
+ t._move(1);
+ });
+
+ ed.addCommand('mceMoveBackward', function() {
+ t._move(-1);
+ });
+
+ ed.addCommand('mceMakeAbsolute', function() {
+ t._toggleAbsolute();
+ });
+
+ // Register buttons
+ ed.addButton('moveforward', {title : 'layer.forward_desc', cmd : 'mceMoveForward'});
+ ed.addButton('movebackward', {title : 'layer.backward_desc', cmd : 'mceMoveBackward'});
+ ed.addButton('absolute', {title : 'layer.absolute_desc', cmd : 'mceMakeAbsolute'});
+ ed.addButton('insertlayer', {title : 'layer.insertlayer_desc', cmd : 'mceInsertLayer'});
+
+ ed.onInit.add(function() {
+ var dom = ed.dom;
+
+ if (tinymce.isIE)
+ ed.getDoc().execCommand('2D-Position', false, true);
+ });
+
+ // Remove serialized styles when selecting a layer since it might be changed by a drag operation
+ ed.onMouseUp.add(function(ed, e) {
+ var layer = findParentLayer(e.target);
+
+ if (layer) {
+ ed.dom.setAttrib(layer, 'data-mce-style', '');
+ }
+ });
+
+ // Fixes edit focus issues with layers on Gecko
+ // This will enable designMode while inside a layer and disable it when outside
+ ed.onMouseDown.add(function(ed, e) {
+ var node = e.target, doc = ed.getDoc(), parent;
+
+ if (tinymce.isGecko) {
+ if (findParentLayer(node)) {
+ if (doc.designMode !== 'on') {
+ doc.designMode = 'on';
+
+ // Repaint caret
+ node = doc.body;
+ parent = node.parentNode;
+ parent.removeChild(node);
+ parent.appendChild(node);
+ }
+ } else if (doc.designMode == 'on') {
+ doc.designMode = 'off';
+ }
+ }
+ });
+
+ ed.onNodeChange.add(t._nodeChange, t);
+ ed.onVisualAid.add(t._visualAid, t);
+ },
+
+ getInfo : function() {
+ return {
+ longname : 'Layer',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/layer',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ };
+ },
+
+ // Private methods
+
+ _nodeChange : function(ed, cm, n) {
+ var le, p;
+
+ le = this._getParentLayer(n);
+ p = ed.dom.getParent(n, 'DIV,P,IMG');
+
+ if (!p) {
+ cm.setDisabled('absolute', 1);
+ cm.setDisabled('moveforward', 1);
+ cm.setDisabled('movebackward', 1);
+ } else {
+ cm.setDisabled('absolute', 0);
+ cm.setDisabled('moveforward', !le);
+ cm.setDisabled('movebackward', !le);
+ cm.setActive('absolute', le && le.style.position.toLowerCase() == "absolute");
+ }
+ },
+
+ // Private methods
+
+ _visualAid : function(ed, e, s) {
+ var dom = ed.dom;
+
+ tinymce.each(dom.select('div,p', e), function(e) {
+ if (/^(absolute|relative|fixed)$/i.test(e.style.position)) {
+ if (s)
+ dom.addClass(e, 'mceItemVisualAid');
+ else
+ dom.removeClass(e, 'mceItemVisualAid');
+
+ dom.addClass(e, 'mceItemLayer');
+ }
+ });
+ },
+
+ _move : function(d) {
+ var ed = this.editor, i, z = [], le = this._getParentLayer(ed.selection.getNode()), ci = -1, fi = -1, nl;
+
+ nl = [];
+ tinymce.walk(ed.getBody(), function(n) {
+ if (n.nodeType == 1 && /^(absolute|relative|static)$/i.test(n.style.position))
+ nl.push(n);
+ }, 'childNodes');
+
+ // Find z-indexes
+ for (i=0; i<nl.length; i++) {
+ z[i] = nl[i].style.zIndex ? parseInt(nl[i].style.zIndex) : 0;
+
+ if (ci < 0 && nl[i] == le)
+ ci = i;
+ }
+
+ if (d < 0) {
+ // Move back
+
+ // Try find a lower one
+ for (i=0; i<z.length; i++) {
+ if (z[i] < z[ci]) {
+ fi = i;
+ break;
+ }
+ }
+
+ if (fi > -1) {
+ nl[ci].style.zIndex = z[fi];
+ nl[fi].style.zIndex = z[ci];
+ } else {
+ if (z[ci] > 0)
+ nl[ci].style.zIndex = z[ci] - 1;
+ }
+ } else {
+ // Move forward
+
+ // Try find a higher one
+ for (i=0; i<z.length; i++) {
+ if (z[i] > z[ci]) {
+ fi = i;
+ break;
+ }
+ }
+
+ if (fi > -1) {
+ nl[ci].style.zIndex = z[fi];
+ nl[fi].style.zIndex = z[ci];
+ } else
+ nl[ci].style.zIndex = z[ci] + 1;
+ }
+
+ ed.execCommand('mceRepaint');
+ },
+
+ _getParentLayer : function(n) {
+ return this.editor.dom.getParent(n, function(n) {
+ return n.nodeType == 1 && /^(absolute|relative|static)$/i.test(n.style.position);
+ });
+ },
+
+ _insertLayer : function() {
+ var ed = this.editor, dom = ed.dom, p = dom.getPos(dom.getParent(ed.selection.getNode(), '*')), body = ed.getBody();
+
+ ed.dom.add(body, 'div', {
+ style : {
+ position : 'absolute',
+ left : p.x,
+ top : (p.y > 20 ? p.y : 20),
+ width : 100,
+ height : 100
+ },
+ 'class' : 'mceItemVisualAid mceItemLayer'
+ }, ed.selection.getContent() || ed.getLang('layer.content'));
+
+ // Workaround for IE where it messes up the JS engine if you insert a layer on IE 6,7
+ if (tinymce.isIE)
+ dom.setHTML(body, body.innerHTML);
+ },
+
+ _toggleAbsolute : function() {
+ var ed = this.editor, le = this._getParentLayer(ed.selection.getNode());
+
+ if (!le)
+ le = ed.dom.getParent(ed.selection.getNode(), 'DIV,P,IMG');
+
+ if (le) {
+ if (le.style.position.toLowerCase() == "absolute") {
+ ed.dom.setStyles(le, {
+ position : '',
+ left : '',
+ top : '',
+ width : '',
+ height : ''
+ });
+
+ ed.dom.removeClass(le, 'mceItemVisualAid');
+ ed.dom.removeClass(le, 'mceItemLayer');
+ } else {
+ if (le.style.left == "")
+ le.style.left = 20 + 'px';
+
+ if (le.style.top == "")
+ le.style.top = 20 + 'px';
+
+ if (le.style.width == "")
+ le.style.width = le.width ? (le.width + 'px') : '100px';
+
+ if (le.style.height == "")
+ le.style.height = le.height ? (le.height + 'px') : '100px';
+
+ le.style.position = "absolute";
+
+ ed.dom.setAttrib(le, 'data-mce-style', '');
+ ed.addVisual(ed.getBody());
+ }
+
+ ed.execCommand('mceRepaint');
+ ed.nodeChanged();
+ }
+ }
+ });
+
+ // Register plugin
+ tinymce.PluginManager.add('layer', tinymce.plugins.Layer);
+})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/legacyoutput/editor_plugin.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/legacyoutput/editor_plugin.js
new file mode 100644
index 00000000..2ed5f41a
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/legacyoutput/editor_plugin.js
@@ -0,0 +1 @@
+(function(a){a.onAddEditor.addToTop(function(c,b){b.settings.inline_styles=false});a.create("tinymce.plugins.LegacyOutput",{init:function(b){b.onInit.add(function(){var c="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",e=a.explode(b.settings.font_size_style_values),d=b.schema;b.formatter.register({alignleft:{selector:c,attributes:{align:"left"}},aligncenter:{selector:c,attributes:{align:"center"}},alignright:{selector:c,attributes:{align:"right"}},alignfull:{selector:c,attributes:{align:"justify"}},bold:[{inline:"b",remove:"all"},{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"i",remove:"all"},{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all"},{inline:"span",styles:{textDecoration:"underline"},exact:true}],strikethrough:[{inline:"strike",remove:"all"},{inline:"span",styles:{textDecoration:"line-through"},exact:true}],fontname:{inline:"font",attributes:{face:"%value"}},fontsize:{inline:"font",attributes:{size:function(f){return a.inArray(e,f.value)+1}}},forecolor:{inline:"font",attributes:{color:"%value"}},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"}}});a.each("b,i,u,strike".split(","),function(f){d.addValidElements(f+"[*]")});if(!d.getElementRule("font")){d.addValidElements("font[face|size|color|style]")}a.each(c.split(","),function(f){var h=d.getElementRule(f),g;if(h){if(!h.attributes.align){h.attributes.align={};h.attributesOrder.push("align")}}});b.onNodeChange.add(function(g,k){var j,f,h,i;f=g.dom.getParent(g.selection.getNode(),"font");if(f){h=f.face;i=f.size}if(j=k.get("fontselect")){j.select(function(l){return l==h})}if(j=k.get("fontsizeselect")){j.select(function(m){var l=a.inArray(e,m.fontSize);return l+1==i})}})})},getInfo:function(){return{longname:"LegacyOutput",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/legacyoutput",version:a.majorVersion+"."+a.minorVersion}}});a.PluginManager.add("legacyoutput",a.plugins.LegacyOutput)})(tinymce); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/legacyoutput/editor_plugin_src.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/legacyoutput/editor_plugin_src.js
new file mode 100644
index 00000000..3cdcde57
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/legacyoutput/editor_plugin_src.js
@@ -0,0 +1,139 @@
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ *
+ * This plugin will force TinyMCE to produce deprecated legacy output such as font elements, u elements, align
+ * attributes and so forth. There are a few cases where these old items might be needed for example in email applications or with Flash
+ *
+ * However you should NOT use this plugin if you are building some system that produces web contents such as a CMS. All these elements are
+ * not apart of the newer specifications for HTML and XHTML.
+ */
+
+(function(tinymce) {
+ // Override inline_styles setting to force TinyMCE to produce deprecated contents
+ tinymce.onAddEditor.addToTop(function(tinymce, editor) {
+ editor.settings.inline_styles = false;
+ });
+
+ // Create the legacy ouput plugin
+ tinymce.create('tinymce.plugins.LegacyOutput', {
+ init : function(editor) {
+ editor.onInit.add(function() {
+ var alignElements = 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img',
+ fontSizes = tinymce.explode(editor.settings.font_size_style_values),
+ schema = editor.schema;
+
+ // Override some internal formats to produce legacy elements and attributes
+ editor.formatter.register({
+ // Change alignment formats to use the deprecated align attribute
+ alignleft : {selector : alignElements, attributes : {align : 'left'}},
+ aligncenter : {selector : alignElements, attributes : {align : 'center'}},
+ alignright : {selector : alignElements, attributes : {align : 'right'}},
+ alignfull : {selector : alignElements, attributes : {align : 'justify'}},
+
+ // Change the basic formatting elements to use deprecated element types
+ bold : [
+ {inline : 'b', remove : 'all'},
+ {inline : 'strong', remove : 'all'},
+ {inline : 'span', styles : {fontWeight : 'bold'}}
+ ],
+ italic : [
+ {inline : 'i', remove : 'all'},
+ {inline : 'em', remove : 'all'},
+ {inline : 'span', styles : {fontStyle : 'italic'}}
+ ],
+ underline : [
+ {inline : 'u', remove : 'all'},
+ {inline : 'span', styles : {textDecoration : 'underline'}, exact : true}
+ ],
+ strikethrough : [
+ {inline : 'strike', remove : 'all'},
+ {inline : 'span', styles : {textDecoration: 'line-through'}, exact : true}
+ ],
+
+ // Change font size and font family to use the deprecated font element
+ fontname : {inline : 'font', attributes : {face : '%value'}},
+ fontsize : {
+ inline : 'font',
+ attributes : {
+ size : function(vars) {
+ return tinymce.inArray(fontSizes, vars.value) + 1;
+ }
+ }
+ },
+
+ // Setup font elements for colors as well
+ forecolor : {inline : 'font', attributes : {color : '%value'}},
+ hilitecolor : {inline : 'font', styles : {backgroundColor : '%value'}}
+ });
+
+ // Check that deprecated elements are allowed if not add them
+ tinymce.each('b,i,u,strike'.split(','), function(name) {
+ schema.addValidElements(name + '[*]');
+ });
+
+ // Add font element if it's missing
+ if (!schema.getElementRule("font"))
+ schema.addValidElements("font[face|size|color|style]");
+
+ // Add the missing and depreacted align attribute for the serialization engine
+ tinymce.each(alignElements.split(','), function(name) {
+ var rule = schema.getElementRule(name), found;
+
+ if (rule) {
+ if (!rule.attributes.align) {
+ rule.attributes.align = {};
+ rule.attributesOrder.push('align');
+ }
+ }
+ });
+
+ // Listen for the onNodeChange event so that we can do special logic for the font size and font name drop boxes
+ editor.onNodeChange.add(function(editor, control_manager) {
+ var control, fontElm, fontName, fontSize;
+
+ // Find font element get it's name and size
+ fontElm = editor.dom.getParent(editor.selection.getNode(), 'font');
+ if (fontElm) {
+ fontName = fontElm.face;
+ fontSize = fontElm.size;
+ }
+
+ // Select/unselect the font name in droplist
+ if (control = control_manager.get('fontselect')) {
+ control.select(function(value) {
+ return value == fontName;
+ });
+ }
+
+ // Select/unselect the font size in droplist
+ if (control = control_manager.get('fontsizeselect')) {
+ control.select(function(value) {
+ var index = tinymce.inArray(fontSizes, value.fontSize);
+
+ return index + 1 == fontSize;
+ });
+ }
+ });
+ });
+ },
+
+ getInfo : function() {
+ return {
+ longname : 'LegacyOutput',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/legacyoutput',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ };
+ }
+ });
+
+ // Register plugin
+ tinymce.PluginManager.add('legacyoutput', tinymce.plugins.LegacyOutput);
+})(tinymce);
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/lists/editor_plugin.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/lists/editor_plugin.js
new file mode 100644
index 00000000..ec21b256
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/lists/editor_plugin.js
@@ -0,0 +1 @@
+(function(){var e=tinymce.each,r=tinymce.dom.Event,g;function p(t,s){while(t&&(t.nodeType===8||(t.nodeType===3&&/^[ \t\n\r]*$/.test(t.nodeValue)))){t=s(t)}return t}function b(s){return p(s,function(t){return t.previousSibling})}function i(s){return p(s,function(t){return t.nextSibling})}function d(s,u,t){return s.dom.getParent(u,function(v){return tinymce.inArray(t,v)!==-1})}function n(s){return s&&(s.tagName==="OL"||s.tagName==="UL")}function c(u,v){var t,w,s;t=b(u.lastChild);while(n(t)){w=t;t=b(w.previousSibling)}if(w){s=v.create("li",{style:"list-style-type: none;"});v.split(u,w);v.insertAfter(s,w);s.appendChild(w);s.appendChild(w);u=s.previousSibling}return u}function m(t,s,u){t=a(t,s,u);return o(t,s,u)}function a(u,s,v){var t=b(u.previousSibling);if(t){return h(t,u,s?t:false,v)}else{return u}}function o(u,t,v){var s=i(u.nextSibling);if(s){return h(u,s,t?s:false,v)}else{return u}}function h(u,s,t,v){if(l(u,s,!!t,v)){return f(u,s,t)}else{if(u&&u.tagName==="LI"&&n(s)){u.appendChild(s)}}return s}function l(u,t,s,v){if(!u||!t){return false}else{if(u.tagName==="LI"&&t.tagName==="LI"){return t.style.listStyleType==="none"||j(t)}else{if(n(u)){return(u.tagName===t.tagName&&(s||u.style.listStyleType===t.style.listStyleType))||q(t)}else{return v&&u.tagName==="P"&&t.tagName==="P"}}}}function q(t){var s=i(t.firstChild),u=b(t.lastChild);return s&&u&&n(t)&&s===u&&(n(s)||s.style.listStyleType==="none"||j(s))}function j(u){var t=i(u.firstChild),s=b(u.lastChild);return t&&s&&t===s&&n(t)}function f(w,v,s){var u=b(w.lastChild),t=i(v.firstChild);if(w.tagName==="P"){w.appendChild(w.ownerDocument.createElement("br"))}while(v.firstChild){w.appendChild(v.firstChild)}if(s){w.style.listStyleType=s.style.listStyleType}v.parentNode.removeChild(v);h(u,t,false);return w}function k(t,u){var s;if(!u.is(t,"li,ol,ul")){s=u.getParent(t,"li");if(s){t=s}}return t}tinymce.create("tinymce.plugins.Lists",{init:function(y){var v="TABBING";var s="EMPTY";var J="ESCAPE";var z="PARAGRAPH";var N="UNKNOWN";var x=N;function E(U){return U.keyCode===tinymce.VK.TAB&&!(U.altKey||U.ctrlKey)&&(y.queryCommandState("InsertUnorderedList")||y.queryCommandState("InsertOrderedList"))}function w(){var U=B();var W=U.parentNode.parentNode;var V=U.parentNode.lastChild===U;return V&&!t(W)&&P(U)}function t(U){if(n(U)){return U.parentNode&&U.parentNode.tagName==="LI"}else{return U.tagName==="LI"}}function F(){return y.selection.isCollapsed()&&P(B())}function B(){var U=y.selection.getStart();return((U.tagName=="BR"||U.tagName=="")&&U.parentNode.tagName=="LI")?U.parentNode:U}function P(U){var V=U.childNodes.length;if(U.tagName==="LI"){return V==0?true:V==1&&(U.firstChild.tagName==""||U.firstChild.tagName=="BR"||H(U))}return false}function H(U){var V=tinymce.grep(U.parentNode.childNodes,function(Y){return Y.tagName=="LI"});var W=U==V[V.length-1];var X=U.firstChild;return tinymce.isIE9&&W&&(X.nodeValue==String.fromCharCode(160)||X.nodeValue==String.fromCharCode(32))}function T(U){return U.keyCode===tinymce.VK.ENTER}function A(U){return T(U)&&!U.shiftKey}function M(U){if(E(U)){return v}else{if(A(U)&&w()){return N}else{if(A(U)&&F()){return s}else{return N}}}}function D(U,V){if(x==v||x==s||tinymce.isGecko&&x==J){r.cancel(V)}}function C(){var U=y.selection.getRng(true);var V=U.startContainer;if(V.nodeType==3){var W=V.nodeValue;if(tinymce.isIE9&&W.length>1&&W.charCodeAt(W.length-1)==32){return(U.endOffset==W.length-1)}else{return(U.endOffset==W.length)}}else{if(V.nodeType==1){return U.endOffset==V.childNodes.length}}return false}function I(){var W=y.selection.getNode();var V="h1,h2,h3,h4,h5,h6,p,div";var U=y.dom.is(W,V)&&W.parentNode.tagName==="LI"&&W.parentNode.lastChild===W;return y.selection.isCollapsed()&&U&&C()}function K(W,Y){if(A(Y)&&I()){var X=W.selection.getNode();var V=W.dom.create("li");var U=W.dom.getParent(X,"li");W.dom.insertAfter(V,U);if(tinymce.isIE6||tinymce.isIE7||tinyMCE.isIE8){W.selection.setCursorLocation(V,1)}else{W.selection.setCursorLocation(V,0)}Y.preventDefault()}}function u(X,Z){var ac;if(!tinymce.isGecko){return}var V=X.selection.getStart();if(Z.keyCode!=tinymce.VK.BACKSPACE||V.tagName!=="IMG"){return}function W(ag){var ah=ag.firstChild;var af=null;do{if(!ah){break}if(ah.tagName==="LI"){af=ah}}while(ah=ah.nextSibling);return af}function ae(ag,af){while(ag.childNodes.length>0){af.appendChild(ag.childNodes[0])}}ac=V.parentNode.previousSibling;if(!ac){return}var aa;if(ac.tagName==="UL"||ac.tagName==="OL"){aa=ac}else{if(ac.previousSibling&&(ac.previousSibling.tagName==="UL"||ac.previousSibling.tagName==="OL")){aa=ac.previousSibling}else{return}}var ad=W(aa);var U=X.dom.createRng();U.setStart(ad,1);U.setEnd(ad,1);X.selection.setRng(U);X.selection.collapse(true);var Y=X.selection.getBookmark();var ab=V.parentNode.cloneNode(true);if(ab.tagName==="P"||ab.tagName==="DIV"){ae(ab,ad)}else{ad.appendChild(ab)}V.parentNode.parentNode.removeChild(V.parentNode);X.selection.moveToBookmark(Y)}function G(U){var V=y.dom.getParent(U,"ol,ul");if(V!=null){var W=V.lastChild;y.selection.setCursorLocation(W,0)}}this.ed=y;y.addCommand("Indent",this.indent,this);y.addCommand("Outdent",this.outdent,this);y.addCommand("InsertUnorderedList",function(){this.applyList("UL","OL")},this);y.addCommand("InsertOrderedList",function(){this.applyList("OL","UL")},this);y.onInit.add(function(){y.editorCommands.addCommands({outdent:function(){var V=y.selection,W=y.dom;function U(X){X=W.getParent(X,W.isBlock);return X&&(parseInt(y.dom.getStyle(X,"margin-left")||0,10)+parseInt(y.dom.getStyle(X,"padding-left")||0,10))>0}return U(V.getStart())||U(V.getEnd())||y.queryCommandState("InsertOrderedList")||y.queryCommandState("InsertUnorderedList")}},"state")});y.onKeyUp.add(function(V,W){if(x==v){V.execCommand(W.shiftKey?"Outdent":"Indent",true,null);x=N;return r.cancel(W)}else{if(x==s){var U=B();var Y=V.settings.list_outdent_on_enter===true||W.shiftKey;V.execCommand(Y?"Outdent":"Indent",true,null);if(tinymce.isIE){G(U)}return r.cancel(W)}else{if(x==J){if(tinymce.isIE6||tinymce.isIE7||tinymce.isIE8){var X=V.getDoc().createTextNode("\uFEFF");V.selection.getNode().appendChild(X)}else{if(tinymce.isIE9||tinymce.isGecko){V.execCommand("Outdent");return r.cancel(W)}}}}}});function L(V,U){var W=y.getDoc().createTextNode("\uFEFF");V.insertBefore(W,U);y.selection.setCursorLocation(W,0);y.execCommand("mceRepaint")}function R(V,X){if(T(X)){var U=B();if(U){var W=U.parentNode;var Y=W&&W.parentNode;if(Y&&Y.nodeName=="LI"&&Y.firstChild==W&&U==W.firstChild){L(Y,W)}}}}function S(V,X){if(T(X)){var U=B();if(V.dom.select("ul li",U).length===1){var W=U.firstChild;L(U,W)}}}function Q(W,aa){function X(ab){var ad=[];var ae=new tinymce.dom.TreeWalker(ab.firstChild,ab);for(var ac=ae.current();ac;ac=ae.next()){if(W.dom.is(ac,"ol,ul,li")){ad.push(ac)}}return ad}if(aa.keyCode==tinymce.VK.BACKSPACE){var U=B();if(U){var Z=W.dom.getParent(U,"ol,ul"),V=W.selection.getRng();if(Z&&Z.firstChild===U&&V.startOffset==0){var Y=X(U);Y.unshift(U);W.execCommand("Outdent",false,Y);W.undoManager.add();return r.cancel(aa)}}}}function O(V,X){var U=B();if(X.keyCode===tinymce.VK.BACKSPACE&&V.dom.is(U,"li")&&U.parentNode.firstChild!==U){if(V.dom.select("ul,ol",U).length===1){var Z=U.previousSibling;V.dom.remove(V.dom.select("br",U));V.dom.remove(U,true);var W=tinymce.grep(Z.childNodes,function(aa){return aa.nodeType===3});if(W.length===1){var Y=W[0];V.selection.setCursorLocation(Y,Y.length)}V.undoManager.add();return r.cancel(X)}}}y.onKeyDown.add(function(U,V){x=M(V)});y.onKeyDown.add(D);y.onKeyDown.add(u);y.onKeyDown.add(K);if(tinymce.isGecko){y.onKeyUp.add(R)}if(tinymce.isIE8){y.onKeyUp.add(S)}if(tinymce.isGecko||tinymce.isWebKit){y.onKeyDown.add(Q)}if(tinymce.isWebKit){y.onKeyDown.add(O)}},applyList:function(y,v){var C=this,z=C.ed,I=z.dom,s=[],H=false,u=false,w=false,B,G=z.selection.getSelectedBlocks();function E(t){if(t&&t.tagName==="BR"){I.remove(t)}}function F(M){var N=I.create(y),t;function L(O){if(O.style.marginLeft||O.style.paddingLeft){C.adjustPaddingFunction(false)(O)}}if(M.tagName==="LI"){}else{if(M.tagName==="P"||M.tagName==="DIV"||M.tagName==="BODY"){K(M,function(P,O){J(P,O,M.tagName==="BODY"?null:P.parentNode);t=P.parentNode;L(t);E(O)});if(t){if(t.tagName==="LI"&&(M.tagName==="P"||G.length>1)){I.split(t.parentNode.parentNode,t.parentNode)}m(t.parentNode,true)}return}else{t=I.create("li");I.insertAfter(t,M);t.appendChild(M);L(M);M=t}}I.insertAfter(N,M);N.appendChild(M);m(N,true);s.push(M)}function J(P,L,N){var t,O=P,M;while(!I.isBlock(P.parentNode)&&P.parentNode!==I.getRoot()){P=I.split(P.parentNode,P.previousSibling);P=P.nextSibling;O=P}if(N){t=N.cloneNode(true);P.parentNode.insertBefore(t,P);while(t.firstChild){I.remove(t.firstChild)}t=I.rename(t,"li")}else{t=I.create("li");P.parentNode.insertBefore(t,P)}while(O&&O!=L){M=O.nextSibling;t.appendChild(O);O=M}if(t.childNodes.length===0){t.innerHTML='<br _mce_bogus="1" />'}F(t)}function K(Q,T){var N,R,O=3,L=1,t="br,ul,ol,p,div,h1,h2,h3,h4,h5,h6,table,blockquote,address,pre,form,center,dl";function P(X,U){var V=I.createRng(),W;g.keep=true;z.selection.moveToBookmark(g);g.keep=false;W=z.selection.getRng(true);if(!U){U=X.parentNode.lastChild}V.setStartBefore(X);V.setEndAfter(U);return !(V.compareBoundaryPoints(O,W)>0||V.compareBoundaryPoints(L,W)<=0)}function S(U){if(U.nextSibling){return U.nextSibling}if(!I.isBlock(U.parentNode)&&U.parentNode!==I.getRoot()){return S(U.parentNode)}}N=Q.firstChild;var M=false;e(I.select(t,Q),function(U){if(U.hasAttribute&&U.hasAttribute("_mce_bogus")){return true}if(P(N,U)){I.addClass(U,"_mce_tagged_br");N=S(U)}});M=(N&&P(N,undefined));N=Q.firstChild;e(I.select(t,Q),function(V){var U=S(V);if(V.hasAttribute&&V.hasAttribute("_mce_bogus")){return true}if(I.hasClass(V,"_mce_tagged_br")){T(N,V,R);R=null}else{R=V}N=U});if(M){T(N,undefined,R)}}function D(t){K(t,function(M,L,N){J(M,L);E(L);E(N)})}function A(t){if(tinymce.inArray(s,t)!==-1){return}if(t.parentNode.tagName===v){I.split(t.parentNode,t);F(t);o(t.parentNode,false)}s.push(t)}function x(M){var O,N,L,t;if(tinymce.inArray(s,M)!==-1){return}M=c(M,I);while(I.is(M.parentNode,"ol,ul,li")){I.split(M.parentNode,M)}s.push(M);M=I.rename(M,"p");L=m(M,false,z.settings.force_br_newlines);if(L===M){O=M.firstChild;while(O){if(I.isBlock(O)){O=I.split(O.parentNode,O);t=true;N=O.nextSibling&&O.nextSibling.firstChild}else{N=O.nextSibling;if(t&&O.tagName==="BR"){I.remove(O)}t=false}O=N}}}e(G,function(t){t=k(t,I);if(t.tagName===v||(t.tagName==="LI"&&t.parentNode.tagName===v)){u=true}else{if(t.tagName===y||(t.tagName==="LI"&&t.parentNode.tagName===y)){H=true}else{w=true}}});if(w&&!H||u||G.length===0){B={LI:A,H1:F,H2:F,H3:F,H4:F,H5:F,H6:F,P:F,BODY:F,DIV:G.length>1?F:D,defaultAction:D,elements:this.selectedBlocks()}}else{B={defaultAction:x,elements:this.selectedBlocks(),processEvenIfEmpty:true}}this.process(B)},indent:function(){var u=this.ed,w=u.dom,x=[];function s(z){var y=w.create("li",{style:"list-style-type: none;"});w.insertAfter(y,z);return y}function t(B){var y=s(B),D=w.getParent(B,"ol,ul"),C=D.tagName,E=w.getStyle(D,"list-style-type"),A={},z;if(E!==""){A.style="list-style-type: "+E+";"}z=w.create(C,A);y.appendChild(z);return z}function v(z){if(!d(u,z,x)){z=c(z,w);var y=t(z);y.appendChild(z);m(y.parentNode,false);m(y,false);x.push(z)}}this.process({LI:v,defaultAction:this.adjustPaddingFunction(true),elements:this.selectedBlocks()})},outdent:function(y,x){var w=this,u=w.ed,z=u.dom,s=[];function A(t){var C,B,D;if(!d(u,t,s)){if(z.getStyle(t,"margin-left")!==""||z.getStyle(t,"padding-left")!==""){return w.adjustPaddingFunction(false)(t)}D=z.getStyle(t,"text-align",true);if(D==="center"||D==="right"){z.setStyle(t,"text-align","left");return}t=c(t,z);C=t.parentNode;B=t.parentNode.parentNode;if(B.tagName==="P"){z.split(B,t.parentNode)}else{z.split(C,t);if(B.tagName==="LI"){z.split(B,t)}else{if(!z.is(B,"ol,ul")){z.rename(t,"p")}}}s.push(t)}}var v=x&&tinymce.is(x,"array")?x:this.selectedBlocks();this.process({LI:A,defaultAction:this.adjustPaddingFunction(false),elements:v});e(s,m)},process:function(y){var F=this,w=F.ed.selection,z=F.ed.dom,E,u;function B(t){var s=tinymce.grep(t.childNodes,function(H){return !(H.nodeName==="BR"||H.nodeName==="SPAN"&&z.getAttrib(H,"data-mce-type")=="bookmark"||H.nodeType==3&&(H.nodeValue==String.fromCharCode(160)||H.nodeValue==""))});return s.length===0}function x(s){z.removeClass(s,"_mce_act_on");if(!s||s.nodeType!==1||!y.processEvenIfEmpty&&E.length>1&&B(s)){return}s=k(s,z);var t=y[s.tagName];if(!t){t=y.defaultAction}t(s)}function v(s){F.splitSafeEach(s.childNodes,x,true)}function C(s,t){return t>=0&&s.hasChildNodes()&&t<s.childNodes.length&&s.childNodes[t].tagName==="BR"}function D(){var t=w.getNode();var s=z.getParent(t,"td");return s!==null}E=y.elements;u=w.getRng(true);if(!u.collapsed){if(C(u.endContainer,u.endOffset-1)){u.setEnd(u.endContainer,u.endOffset-1);w.setRng(u)}if(C(u.startContainer,u.startOffset)){u.setStart(u.startContainer,u.startOffset+1);w.setRng(u)}}if(tinymce.isIE8){var G=F.ed.selection.getNode();if(G.tagName==="LI"&&!(G.parentNode.lastChild===G)){var A=F.ed.getDoc().createTextNode("\uFEFF");G.appendChild(A)}}g=w.getBookmark();y.OL=y.UL=v;F.splitSafeEach(E,x);w.moveToBookmark(g);g=null;if(!D()){F.ed.execCommand("mceRepaint")}},splitSafeEach:function(u,t,s){if(s||(tinymce.isGecko&&(/Firefox\/[12]\.[0-9]/.test(navigator.userAgent)||/Firefox\/3\.[0-4]/.test(navigator.userAgent)))){this.classBasedEach(u,t)}else{e(u,t)}},classBasedEach:function(v,u){var w=this.ed.dom,s,t;e(v,function(x){w.addClass(x,"_mce_act_on")});s=w.select("._mce_act_on");while(s.length>0){t=s.shift();w.removeClass(t,"_mce_act_on");u(t);s=w.select("._mce_act_on")}},adjustPaddingFunction:function(u){var s,v,t=this.ed;s=t.settings.indentation;v=/[a-z%]+/i.exec(s);s=parseInt(s,10);return function(w){var y,x;y=parseInt(t.dom.getStyle(w,"margin-left")||0,10)+parseInt(t.dom.getStyle(w,"padding-left")||0,10);if(u){x=y+s}else{x=y-s}t.dom.setStyle(w,"padding-left","");t.dom.setStyle(w,"margin-left",x>0?x+v:"")}},selectedBlocks:function(){var s=this.ed,t=s.selection.getSelectedBlocks();return t.length==0?[s.dom.getRoot()]:t},getInfo:function(){return{longname:"Lists",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/lists",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("lists",tinymce.plugins.Lists)}()); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/lists/editor_plugin_src.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/lists/editor_plugin_src.js
new file mode 100644
index 00000000..1000ef74
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/lists/editor_plugin_src.js
@@ -0,0 +1,955 @@
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2011, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+ var each = tinymce.each, Event = tinymce.dom.Event, bookmark;
+
+ // Skips text nodes that only contain whitespace since they aren't semantically important.
+ function skipWhitespaceNodes(e, next) {
+ while (e && (e.nodeType === 8 || (e.nodeType === 3 && /^[ \t\n\r]*$/.test(e.nodeValue)))) {
+ e = next(e);
+ }
+ return e;
+ }
+
+ function skipWhitespaceNodesBackwards(e) {
+ return skipWhitespaceNodes(e, function(e) {
+ return e.previousSibling;
+ });
+ }
+
+ function skipWhitespaceNodesForwards(e) {
+ return skipWhitespaceNodes(e, function(e) {
+ return e.nextSibling;
+ });
+ }
+
+ function hasParentInList(ed, e, list) {
+ return ed.dom.getParent(e, function(p) {
+ return tinymce.inArray(list, p) !== -1;
+ });
+ }
+
+ function isList(e) {
+ return e && (e.tagName === 'OL' || e.tagName === 'UL');
+ }
+
+ function splitNestedLists(element, dom) {
+ var tmp, nested, wrapItem;
+ tmp = skipWhitespaceNodesBackwards(element.lastChild);
+ while (isList(tmp)) {
+ nested = tmp;
+ tmp = skipWhitespaceNodesBackwards(nested.previousSibling);
+ }
+ if (nested) {
+ wrapItem = dom.create('li', { style: 'list-style-type: none;'});
+ dom.split(element, nested);
+ dom.insertAfter(wrapItem, nested);
+ wrapItem.appendChild(nested);
+ wrapItem.appendChild(nested);
+ element = wrapItem.previousSibling;
+ }
+ return element;
+ }
+
+ function attemptMergeWithAdjacent(e, allowDifferentListStyles, mergeParagraphs) {
+ e = attemptMergeWithPrevious(e, allowDifferentListStyles, mergeParagraphs);
+ return attemptMergeWithNext(e, allowDifferentListStyles, mergeParagraphs);
+ }
+
+ function attemptMergeWithPrevious(e, allowDifferentListStyles, mergeParagraphs) {
+ var prev = skipWhitespaceNodesBackwards(e.previousSibling);
+ if (prev) {
+ return attemptMerge(prev, e, allowDifferentListStyles ? prev : false, mergeParagraphs);
+ } else {
+ return e;
+ }
+ }
+
+ function attemptMergeWithNext(e, allowDifferentListStyles, mergeParagraphs) {
+ var next = skipWhitespaceNodesForwards(e.nextSibling);
+ if (next) {
+ return attemptMerge(e, next, allowDifferentListStyles ? next : false, mergeParagraphs);
+ } else {
+ return e;
+ }
+ }
+
+ function attemptMerge(e1, e2, differentStylesMasterElement, mergeParagraphs) {
+ if (canMerge(e1, e2, !!differentStylesMasterElement, mergeParagraphs)) {
+ return merge(e1, e2, differentStylesMasterElement);
+ } else if (e1 && e1.tagName === 'LI' && isList(e2)) {
+ // Fix invalidly nested lists.
+ e1.appendChild(e2);
+ }
+ return e2;
+ }
+
+ function canMerge(e1, e2, allowDifferentListStyles, mergeParagraphs) {
+ if (!e1 || !e2) {
+ return false;
+ } else if (e1.tagName === 'LI' && e2.tagName === 'LI') {
+ return e2.style.listStyleType === 'none' || containsOnlyAList(e2);
+ } else if (isList(e1)) {
+ return (e1.tagName === e2.tagName && (allowDifferentListStyles || e1.style.listStyleType === e2.style.listStyleType)) || isListForIndent(e2);
+ } else return mergeParagraphs && e1.tagName === 'P' && e2.tagName === 'P';
+ }
+
+ function isListForIndent(e) {
+ var firstLI = skipWhitespaceNodesForwards(e.firstChild), lastLI = skipWhitespaceNodesBackwards(e.lastChild);
+ return firstLI && lastLI && isList(e) && firstLI === lastLI && (isList(firstLI) || firstLI.style.listStyleType === 'none' || containsOnlyAList(firstLI));
+ }
+
+ function containsOnlyAList(e) {
+ var firstChild = skipWhitespaceNodesForwards(e.firstChild), lastChild = skipWhitespaceNodesBackwards(e.lastChild);
+ return firstChild && lastChild && firstChild === lastChild && isList(firstChild);
+ }
+
+ function merge(e1, e2, masterElement) {
+ var lastOriginal = skipWhitespaceNodesBackwards(e1.lastChild), firstNew = skipWhitespaceNodesForwards(e2.firstChild);
+ if (e1.tagName === 'P') {
+ e1.appendChild(e1.ownerDocument.createElement('br'));
+ }
+ while (e2.firstChild) {
+ e1.appendChild(e2.firstChild);
+ }
+ if (masterElement) {
+ e1.style.listStyleType = masterElement.style.listStyleType;
+ }
+ e2.parentNode.removeChild(e2);
+ attemptMerge(lastOriginal, firstNew, false);
+ return e1;
+ }
+
+ function findItemToOperateOn(e, dom) {
+ var item;
+ if (!dom.is(e, 'li,ol,ul')) {
+ item = dom.getParent(e, 'li');
+ if (item) {
+ e = item;
+ }
+ }
+ return e;
+ }
+
+ tinymce.create('tinymce.plugins.Lists', {
+ init: function(ed) {
+ var LIST_TABBING = 'TABBING';
+ var LIST_EMPTY_ITEM = 'EMPTY';
+ var LIST_ESCAPE = 'ESCAPE';
+ var LIST_PARAGRAPH = 'PARAGRAPH';
+ var LIST_UNKNOWN = 'UNKNOWN';
+ var state = LIST_UNKNOWN;
+
+ function isTabInList(e) {
+ // Don't indent on Ctrl+Tab or Alt+Tab
+ return e.keyCode === tinymce.VK.TAB && !(e.altKey || e.ctrlKey) &&
+ (ed.queryCommandState('InsertUnorderedList') || ed.queryCommandState('InsertOrderedList'));
+ }
+
+ function isOnLastListItem() {
+ var li = getLi();
+ var grandParent = li.parentNode.parentNode;
+ var isLastItem = li.parentNode.lastChild === li;
+ return isLastItem && !isNestedList(grandParent) && isEmptyListItem(li);
+ }
+
+ function isNestedList(grandParent) {
+ if (isList(grandParent)) {
+ return grandParent.parentNode && grandParent.parentNode.tagName === 'LI';
+ } else {
+ return grandParent.tagName === 'LI';
+ }
+ }
+
+ function isInEmptyListItem() {
+ return ed.selection.isCollapsed() && isEmptyListItem(getLi());
+ }
+
+ function getLi() {
+ var n = ed.selection.getStart();
+ // Get start will return BR if the LI only contains a BR or an empty element as we use these to fix caret position
+ return ((n.tagName == 'BR' || n.tagName == '') && n.parentNode.tagName == 'LI') ? n.parentNode : n;
+ }
+
+ function isEmptyListItem(li) {
+ var numChildren = li.childNodes.length;
+ if (li.tagName === 'LI') {
+ return numChildren == 0 ? true : numChildren == 1 && (li.firstChild.tagName == '' || li.firstChild.tagName == 'BR' || isEmptyIE9Li(li));
+ }
+ return false;
+ }
+
+ function isEmptyIE9Li(li) {
+ // only consider this to be last item if there is no list item content or that content is nbsp or space since IE9 creates these
+ var lis = tinymce.grep(li.parentNode.childNodes, function(n) {return n.tagName == 'LI'});
+ var isLastLi = li == lis[lis.length - 1];
+ var child = li.firstChild;
+ return tinymce.isIE9 && isLastLi && (child.nodeValue == String.fromCharCode(160) || child.nodeValue == String.fromCharCode(32));
+ }
+
+ function isEnter(e) {
+ return e.keyCode === tinymce.VK.ENTER;
+ }
+
+ function isEnterWithoutShift(e) {
+ return isEnter(e) && !e.shiftKey;
+ }
+
+ function getListKeyState(e) {
+ if (isTabInList(e)) {
+ return LIST_TABBING;
+ } else if (isEnterWithoutShift(e) && isOnLastListItem()) {
+ // Returns LIST_UNKNOWN since breaking out of lists is handled by the EnterKey.js logic now
+ //return LIST_ESCAPE;
+ return LIST_UNKNOWN;
+ } else if (isEnterWithoutShift(e) && isInEmptyListItem()) {
+ return LIST_EMPTY_ITEM;
+ } else {
+ return LIST_UNKNOWN;
+ }
+ }
+
+ function cancelDefaultEvents(ed, e) {
+ // list escape is done manually using outdent as it does not create paragraphs correctly in td's
+ if (state == LIST_TABBING || state == LIST_EMPTY_ITEM || tinymce.isGecko && state == LIST_ESCAPE) {
+ Event.cancel(e);
+ }
+ }
+
+ function isCursorAtEndOfContainer() {
+ var range = ed.selection.getRng(true);
+ var startContainer = range.startContainer;
+ if (startContainer.nodeType == 3) {
+ var value = startContainer.nodeValue;
+ if (tinymce.isIE9 && value.length > 1 && value.charCodeAt(value.length-1) == 32) {
+ // IE9 places a space on the end of the text in some cases so ignore last char
+ return (range.endOffset == value.length-1);
+ } else {
+ return (range.endOffset == value.length);
+ }
+ } else if (startContainer.nodeType == 1) {
+ return range.endOffset == startContainer.childNodes.length;
+ }
+ return false;
+ }
+
+ /*
+ If we are at the end of a list item surrounded with an element, pressing enter should create a
+ new list item instead without splitting the element e.g. don't want to create new P or H1 tag
+ */
+ function isEndOfListItem() {
+ var node = ed.selection.getNode();
+ var validElements = 'h1,h2,h3,h4,h5,h6,p,div';
+ var isLastParagraphOfLi = ed.dom.is(node, validElements) && node.parentNode.tagName === 'LI' && node.parentNode.lastChild === node;
+ return ed.selection.isCollapsed() && isLastParagraphOfLi && isCursorAtEndOfContainer();
+ }
+
+ // Creates a new list item after the current selection's list item parent
+ function createNewLi(ed, e) {
+ if (isEnterWithoutShift(e) && isEndOfListItem()) {
+ var node = ed.selection.getNode();
+ var li = ed.dom.create("li");
+ var parentLi = ed.dom.getParent(node, 'li');
+ ed.dom.insertAfter(li, parentLi);
+
+ // Move caret to new list element.
+ if (tinymce.isIE6 || tinymce.isIE7 || tinyMCE.isIE8) {
+ // Removed this line since it would create an odd <&nbsp;> tag and placing the caret inside an empty LI is handled and should be handled by the selection logic
+ //li.appendChild(ed.dom.create("&nbsp;")); // IE needs an element within the bullet point
+ ed.selection.setCursorLocation(li, 1);
+ } else {
+ ed.selection.setCursorLocation(li, 0);
+ }
+ e.preventDefault();
+ }
+ }
+
+ function imageJoiningListItem(ed, e) {
+ var prevSibling;
+
+ if (!tinymce.isGecko)
+ return;
+
+ var n = ed.selection.getStart();
+ if (e.keyCode != tinymce.VK.BACKSPACE || n.tagName !== 'IMG')
+ return;
+
+ function lastLI(node) {
+ var child = node.firstChild;
+ var li = null;
+ do {
+ if (!child)
+ break;
+
+ if (child.tagName === 'LI')
+ li = child;
+ } while (child = child.nextSibling);
+
+ return li;
+ }
+
+ function addChildren(parentNode, destination) {
+ while (parentNode.childNodes.length > 0)
+ destination.appendChild(parentNode.childNodes[0]);
+ }
+
+ // Check if there is a previous sibling
+ prevSibling = n.parentNode.previousSibling;
+ if (!prevSibling)
+ return;
+
+ var ul;
+ if (prevSibling.tagName === 'UL' || prevSibling.tagName === 'OL')
+ ul = prevSibling;
+ else if (prevSibling.previousSibling && (prevSibling.previousSibling.tagName === 'UL' || prevSibling.previousSibling.tagName === 'OL'))
+ ul = prevSibling.previousSibling;
+ else
+ return;
+
+ var li = lastLI(ul);
+
+ // move the caret to the end of the list item
+ var rng = ed.dom.createRng();
+ rng.setStart(li, 1);
+ rng.setEnd(li, 1);
+ ed.selection.setRng(rng);
+ ed.selection.collapse(true);
+
+ // save a bookmark at the end of the list item
+ var bookmark = ed.selection.getBookmark();
+
+ // copy the image an its text to the list item
+ var clone = n.parentNode.cloneNode(true);
+ if (clone.tagName === 'P' || clone.tagName === 'DIV')
+ addChildren(clone, li);
+ else
+ li.appendChild(clone);
+
+ // remove the old copy of the image
+ n.parentNode.parentNode.removeChild(n.parentNode);
+
+ // move the caret where we saved the bookmark
+ ed.selection.moveToBookmark(bookmark);
+ }
+
+ // fix the cursor position to ensure it is correct in IE
+ function setCursorPositionToOriginalLi(li) {
+ var list = ed.dom.getParent(li, 'ol,ul');
+ if (list != null) {
+ var lastLi = list.lastChild;
+ // Removed this line since IE9 would report an DOM character error and placing the caret inside an empty LI is handled and should be handled by the selection logic
+ //lastLi.appendChild(ed.getDoc().createElement(''));
+ ed.selection.setCursorLocation(lastLi, 0);
+ }
+ }
+
+ this.ed = ed;
+ ed.addCommand('Indent', this.indent, this);
+ ed.addCommand('Outdent', this.outdent, this);
+ ed.addCommand('InsertUnorderedList', function() {
+ this.applyList('UL', 'OL');
+ }, this);
+ ed.addCommand('InsertOrderedList', function() {
+ this.applyList('OL', 'UL');
+ }, this);
+
+ ed.onInit.add(function() {
+ ed.editorCommands.addCommands({
+ 'outdent': function() {
+ var sel = ed.selection, dom = ed.dom;
+
+ function hasStyleIndent(n) {
+ n = dom.getParent(n, dom.isBlock);
+ return n && (parseInt(ed.dom.getStyle(n, 'margin-left') || 0, 10) + parseInt(ed.dom.getStyle(n, 'padding-left') || 0, 10)) > 0;
+ }
+
+ return hasStyleIndent(sel.getStart()) || hasStyleIndent(sel.getEnd()) || ed.queryCommandState('InsertOrderedList') || ed.queryCommandState('InsertUnorderedList');
+ }
+ }, 'state');
+ });
+
+ ed.onKeyUp.add(function(ed, e) {
+ if (state == LIST_TABBING) {
+ ed.execCommand(e.shiftKey ? 'Outdent' : 'Indent', true, null);
+ state = LIST_UNKNOWN;
+ return Event.cancel(e);
+ } else if (state == LIST_EMPTY_ITEM) {
+ var li = getLi();
+ var shouldOutdent = ed.settings.list_outdent_on_enter === true || e.shiftKey;
+ ed.execCommand(shouldOutdent ? 'Outdent' : 'Indent', true, null);
+ if (tinymce.isIE) {
+ setCursorPositionToOriginalLi(li);
+ }
+
+ return Event.cancel(e);
+ } else if (state == LIST_ESCAPE) {
+ if (tinymce.isIE6 || tinymce.isIE7 || tinymce.isIE8) {
+ // append a zero sized nbsp so that caret is positioned correctly in IE after escaping and applying formatting.
+ // if there is no text then applying formatting for e.g a H1 to the P tag immediately following list after
+ // escaping from it will cause the caret to be positioned on the last li instead of staying the in P tag.
+ var n = ed.getDoc().createTextNode('\uFEFF');
+ ed.selection.getNode().appendChild(n);
+ } else if (tinymce.isIE9 || tinymce.isGecko) {
+ // IE9 does not escape the list so we use outdent to do this and cancel the default behaviour
+ // Gecko does not create a paragraph outdenting inside a TD so default behaviour is cancelled and we outdent ourselves
+ ed.execCommand('Outdent');
+ return Event.cancel(e);
+ }
+ }
+ });
+
+ function fixListItem(parent, reference) {
+ // a zero-sized non-breaking space is placed in the empty list item so that the nested list is
+ // displayed on the below line instead of next to it
+ var n = ed.getDoc().createTextNode('\uFEFF');
+ parent.insertBefore(n, reference);
+ ed.selection.setCursorLocation(n, 0);
+ // repaint to remove rendering artifact. only visible when creating new list
+ ed.execCommand('mceRepaint');
+ }
+
+ function fixIndentedListItemForGecko(ed, e) {
+ if (isEnter(e)) {
+ var li = getLi();
+ if (li) {
+ var parent = li.parentNode;
+ var grandParent = parent && parent.parentNode;
+ if (grandParent && grandParent.nodeName == 'LI' && grandParent.firstChild == parent && li == parent.firstChild) {
+ fixListItem(grandParent, parent);
+ }
+ }
+ }
+ }
+
+ function fixIndentedListItemForIE8(ed, e) {
+ if (isEnter(e)) {
+ var li = getLi();
+ if (ed.dom.select('ul li', li).length === 1) {
+ var list = li.firstChild;
+ fixListItem(li, list);
+ }
+ }
+ }
+
+ function fixDeletingFirstCharOfList(ed, e) {
+ function listElements(li) {
+ var elements = [];
+ var walker = new tinymce.dom.TreeWalker(li.firstChild, li);
+ for (var node = walker.current(); node; node = walker.next()) {
+ if (ed.dom.is(node, 'ol,ul,li')) {
+ elements.push(node);
+ }
+ }
+ return elements;
+ }
+
+ if (e.keyCode == tinymce.VK.BACKSPACE) {
+ var li = getLi();
+ if (li) {
+ var list = ed.dom.getParent(li, 'ol,ul'),
+ rng = ed.selection.getRng();
+ if (list && list.firstChild === li && rng.startOffset == 0) {
+ var elements = listElements(li);
+ elements.unshift(li);
+ ed.execCommand("Outdent", false, elements);
+ ed.undoManager.add();
+ return Event.cancel(e);
+ }
+ }
+ }
+ }
+
+ function fixDeletingEmptyLiInWebkit(ed, e) {
+ var li = getLi();
+ if (e.keyCode === tinymce.VK.BACKSPACE && ed.dom.is(li, 'li') && li.parentNode.firstChild!==li) {
+ if (ed.dom.select('ul,ol', li).length === 1) {
+ var prevLi = li.previousSibling;
+ ed.dom.remove(ed.dom.select('br', li));
+ ed.dom.remove(li, true);
+ var textNodes = tinymce.grep(prevLi.childNodes, function(n){ return n.nodeType === 3 });
+ if (textNodes.length === 1) {
+ var textNode = textNodes[0];
+ ed.selection.setCursorLocation(textNode, textNode.length);
+ }
+ ed.undoManager.add();
+ return Event.cancel(e);
+ }
+ }
+ }
+
+ ed.onKeyDown.add(function(_, e) { state = getListKeyState(e); });
+ ed.onKeyDown.add(cancelDefaultEvents);
+ ed.onKeyDown.add(imageJoiningListItem);
+ ed.onKeyDown.add(createNewLi);
+
+ if (tinymce.isGecko) {
+ ed.onKeyUp.add(fixIndentedListItemForGecko);
+ }
+ if (tinymce.isIE8) {
+ ed.onKeyUp.add(fixIndentedListItemForIE8);
+ }
+ if (tinymce.isGecko || tinymce.isWebKit) {
+ ed.onKeyDown.add(fixDeletingFirstCharOfList);
+ }
+ if (tinymce.isWebKit) {
+ ed.onKeyDown.add(fixDeletingEmptyLiInWebkit);
+ }
+ },
+
+ applyList: function(targetListType, oppositeListType) {
+ var t = this, ed = t.ed, dom = ed.dom, applied = [], hasSameType = false, hasOppositeType = false, hasNonList = false, actions,
+ selectedBlocks = ed.selection.getSelectedBlocks();
+
+ function cleanupBr(e) {
+ if (e && e.tagName === 'BR') {
+ dom.remove(e);
+ }
+ }
+
+ function makeList(element) {
+ var list = dom.create(targetListType), li;
+
+ function adjustIndentForNewList(element) {
+ // If there's a margin-left, outdent one level to account for the extra list margin.
+ if (element.style.marginLeft || element.style.paddingLeft) {
+ t.adjustPaddingFunction(false)(element);
+ }
+ }
+
+ if (element.tagName === 'LI') {
+ // No change required.
+ } else if (element.tagName === 'P' || element.tagName === 'DIV' || element.tagName === 'BODY') {
+ processBrs(element, function(startSection, br) {
+ doWrapList(startSection, br, element.tagName === 'BODY' ? null : startSection.parentNode);
+ li = startSection.parentNode;
+ adjustIndentForNewList(li);
+ cleanupBr(br);
+ });
+ if (li) {
+ if (li.tagName === 'LI' && (element.tagName === 'P' || selectedBlocks.length > 1)) {
+ dom.split(li.parentNode.parentNode, li.parentNode);
+ }
+ attemptMergeWithAdjacent(li.parentNode, true);
+ }
+ return;
+ } else {
+ // Put the list around the element.
+ li = dom.create('li');
+ dom.insertAfter(li, element);
+ li.appendChild(element);
+ adjustIndentForNewList(element);
+ element = li;
+ }
+ dom.insertAfter(list, element);
+ list.appendChild(element);
+ attemptMergeWithAdjacent(list, true);
+ applied.push(element);
+ }
+
+ function doWrapList(start, end, template) {
+ var li, n = start, tmp;
+ while (!dom.isBlock(start.parentNode) && start.parentNode !== dom.getRoot()) {
+ start = dom.split(start.parentNode, start.previousSibling);
+ start = start.nextSibling;
+ n = start;
+ }
+ if (template) {
+ li = template.cloneNode(true);
+ start.parentNode.insertBefore(li, start);
+ while (li.firstChild) dom.remove(li.firstChild);
+ li = dom.rename(li, 'li');
+ } else {
+ li = dom.create('li');
+ start.parentNode.insertBefore(li, start);
+ }
+ while (n && n != end) {
+ tmp = n.nextSibling;
+ li.appendChild(n);
+ n = tmp;
+ }
+ if (li.childNodes.length === 0) {
+ li.innerHTML = '<br _mce_bogus="1" />';
+ }
+ makeList(li);
+ }
+
+ function processBrs(element, callback) {
+ var startSection, previousBR, END_TO_START = 3, START_TO_END = 1,
+ breakElements = 'br,ul,ol,p,div,h1,h2,h3,h4,h5,h6,table,blockquote,address,pre,form,center,dl';
+
+ function isAnyPartSelected(start, end) {
+ var r = dom.createRng(), sel;
+ bookmark.keep = true;
+ ed.selection.moveToBookmark(bookmark);
+ bookmark.keep = false;
+ sel = ed.selection.getRng(true);
+ if (!end) {
+ end = start.parentNode.lastChild;
+ }
+ r.setStartBefore(start);
+ r.setEndAfter(end);
+ return !(r.compareBoundaryPoints(END_TO_START, sel) > 0 || r.compareBoundaryPoints(START_TO_END, sel) <= 0);
+ }
+
+ function nextLeaf(br) {
+ if (br.nextSibling)
+ return br.nextSibling;
+ if (!dom.isBlock(br.parentNode) && br.parentNode !== dom.getRoot())
+ return nextLeaf(br.parentNode);
+ }
+
+ // Split on BRs within the range and process those.
+ startSection = element.firstChild;
+ // First mark the BRs that have any part of the previous section selected.
+ var trailingContentSelected = false;
+ each(dom.select(breakElements, element), function(br) {
+ if (br.hasAttribute && br.hasAttribute('_mce_bogus')) {
+ return true; // Skip the bogus Brs that are put in to appease Firefox and Safari.
+ }
+ if (isAnyPartSelected(startSection, br)) {
+ dom.addClass(br, '_mce_tagged_br');
+ startSection = nextLeaf(br);
+ }
+ });
+ trailingContentSelected = (startSection && isAnyPartSelected(startSection, undefined));
+ startSection = element.firstChild;
+ each(dom.select(breakElements, element), function(br) {
+ // Got a section from start to br.
+ var tmp = nextLeaf(br);
+ if (br.hasAttribute && br.hasAttribute('_mce_bogus')) {
+ return true; // Skip the bogus Brs that are put in to appease Firefox and Safari.
+ }
+ if (dom.hasClass(br, '_mce_tagged_br')) {
+ callback(startSection, br, previousBR);
+ previousBR = null;
+ } else {
+ previousBR = br;
+ }
+ startSection = tmp;
+ });
+ if (trailingContentSelected) {
+ callback(startSection, undefined, previousBR);
+ }
+ }
+
+ function wrapList(element) {
+ processBrs(element, function(startSection, br, previousBR) {
+ // Need to indent this part
+ doWrapList(startSection, br);
+ cleanupBr(br);
+ cleanupBr(previousBR);
+ });
+ }
+
+ function changeList(element) {
+ if (tinymce.inArray(applied, element) !== -1) {
+ return;
+ }
+ if (element.parentNode.tagName === oppositeListType) {
+ dom.split(element.parentNode, element);
+ makeList(element);
+ attemptMergeWithNext(element.parentNode, false);
+ }
+ applied.push(element);
+ }
+
+ function convertListItemToParagraph(element) {
+ var child, nextChild, mergedElement, splitLast;
+ if (tinymce.inArray(applied, element) !== -1) {
+ return;
+ }
+ element = splitNestedLists(element, dom);
+ while (dom.is(element.parentNode, 'ol,ul,li')) {
+ dom.split(element.parentNode, element);
+ }
+ // Push the original element we have from the selection, not the renamed one.
+ applied.push(element);
+ element = dom.rename(element, 'p');
+ mergedElement = attemptMergeWithAdjacent(element, false, ed.settings.force_br_newlines);
+ if (mergedElement === element) {
+ // Now split out any block elements that can't be contained within a P.
+ // Manually iterate to ensure we handle modifications correctly (doesn't work with tinymce.each)
+ child = element.firstChild;
+ while (child) {
+ if (dom.isBlock(child)) {
+ child = dom.split(child.parentNode, child);
+ splitLast = true;
+ nextChild = child.nextSibling && child.nextSibling.firstChild;
+ } else {
+ nextChild = child.nextSibling;
+ if (splitLast && child.tagName === 'BR') {
+ dom.remove(child);
+ }
+ splitLast = false;
+ }
+ child = nextChild;
+ }
+ }
+ }
+
+ each(selectedBlocks, function(e) {
+ e = findItemToOperateOn(e, dom);
+ if (e.tagName === oppositeListType || (e.tagName === 'LI' && e.parentNode.tagName === oppositeListType)) {
+ hasOppositeType = true;
+ } else if (e.tagName === targetListType || (e.tagName === 'LI' && e.parentNode.tagName === targetListType)) {
+ hasSameType = true;
+ } else {
+ hasNonList = true;
+ }
+ });
+
+ if (hasNonList &&!hasSameType || hasOppositeType || selectedBlocks.length === 0) {
+ actions = {
+ 'LI': changeList,
+ 'H1': makeList,
+ 'H2': makeList,
+ 'H3': makeList,
+ 'H4': makeList,
+ 'H5': makeList,
+ 'H6': makeList,
+ 'P': makeList,
+ 'BODY': makeList,
+ 'DIV': selectedBlocks.length > 1 ? makeList : wrapList,
+ defaultAction: wrapList,
+ elements: this.selectedBlocks()
+ };
+ } else {
+ actions = {
+ defaultAction: convertListItemToParagraph,
+ elements: this.selectedBlocks(),
+ processEvenIfEmpty: true
+ };
+ }
+ this.process(actions);
+ },
+
+ indent: function() {
+ var ed = this.ed, dom = ed.dom, indented = [];
+
+ function createWrapItem(element) {
+ var wrapItem = dom.create('li', { style: 'list-style-type: none;'});
+ dom.insertAfter(wrapItem, element);
+ return wrapItem;
+ }
+
+ function createWrapList(element) {
+ var wrapItem = createWrapItem(element),
+ list = dom.getParent(element, 'ol,ul'),
+ listType = list.tagName,
+ listStyle = dom.getStyle(list, 'list-style-type'),
+ attrs = {},
+ wrapList;
+ if (listStyle !== '') {
+ attrs.style = 'list-style-type: ' + listStyle + ';';
+ }
+ wrapList = dom.create(listType, attrs);
+ wrapItem.appendChild(wrapList);
+ return wrapList;
+ }
+
+ function indentLI(element) {
+ if (!hasParentInList(ed, element, indented)) {
+ element = splitNestedLists(element, dom);
+ var wrapList = createWrapList(element);
+ wrapList.appendChild(element);
+ attemptMergeWithAdjacent(wrapList.parentNode, false);
+ attemptMergeWithAdjacent(wrapList, false);
+ indented.push(element);
+ }
+ }
+
+ this.process({
+ 'LI': indentLI,
+ defaultAction: this.adjustPaddingFunction(true),
+ elements: this.selectedBlocks()
+ });
+
+ },
+
+ outdent: function(ui, elements) {
+ var t = this, ed = t.ed, dom = ed.dom, outdented = [];
+
+ function outdentLI(element) {
+ var listElement, targetParent, align;
+ if (!hasParentInList(ed, element, outdented)) {
+ if (dom.getStyle(element, 'margin-left') !== '' || dom.getStyle(element, 'padding-left') !== '') {
+ return t.adjustPaddingFunction(false)(element);
+ }
+ align = dom.getStyle(element, 'text-align', true);
+ if (align === 'center' || align === 'right') {
+ dom.setStyle(element, 'text-align', 'left');
+ return;
+ }
+ element = splitNestedLists(element, dom);
+ listElement = element.parentNode;
+ targetParent = element.parentNode.parentNode;
+ if (targetParent.tagName === 'P') {
+ dom.split(targetParent, element.parentNode);
+ } else {
+ dom.split(listElement, element);
+ if (targetParent.tagName === 'LI') {
+ // Nested list, need to split the LI and go back out to the OL/UL element.
+ dom.split(targetParent, element);
+ } else if (!dom.is(targetParent, 'ol,ul')) {
+ dom.rename(element, 'p');
+ }
+ }
+ outdented.push(element);
+ }
+ }
+
+ var listElements = elements && tinymce.is(elements, 'array') ? elements : this.selectedBlocks();
+ this.process({
+ 'LI': outdentLI,
+ defaultAction: this.adjustPaddingFunction(false),
+ elements: listElements
+ });
+
+ each(outdented, attemptMergeWithAdjacent);
+ },
+
+ process: function(actions) {
+ var t = this, sel = t.ed.selection, dom = t.ed.dom, selectedBlocks, r;
+
+ function isEmptyElement(element) {
+ var excludeBrsAndBookmarks = tinymce.grep(element.childNodes, function(n) {
+ return !(n.nodeName === 'BR' || n.nodeName === 'SPAN' && dom.getAttrib(n, 'data-mce-type') == 'bookmark'
+ || n.nodeType == 3 && (n.nodeValue == String.fromCharCode(160) || n.nodeValue == ''));
+ });
+ return excludeBrsAndBookmarks.length === 0;
+ }
+
+ function processElement(element) {
+ dom.removeClass(element, '_mce_act_on');
+ if (!element || element.nodeType !== 1 || ! actions.processEvenIfEmpty && selectedBlocks.length > 1 && isEmptyElement(element)) {
+ return;
+ }
+ element = findItemToOperateOn(element, dom);
+ var action = actions[element.tagName];
+ if (!action) {
+ action = actions.defaultAction;
+ }
+ action(element);
+ }
+
+ function recurse(element) {
+ t.splitSafeEach(element.childNodes, processElement, true);
+ }
+
+ function brAtEdgeOfSelection(container, offset) {
+ return offset >= 0 && container.hasChildNodes() && offset < container.childNodes.length &&
+ container.childNodes[offset].tagName === 'BR';
+ }
+
+ function isInTable() {
+ var n = sel.getNode();
+ var p = dom.getParent(n, 'td');
+ return p !== null;
+ }
+
+ selectedBlocks = actions.elements;
+
+ r = sel.getRng(true);
+ if (!r.collapsed) {
+ if (brAtEdgeOfSelection(r.endContainer, r.endOffset - 1)) {
+ r.setEnd(r.endContainer, r.endOffset - 1);
+ sel.setRng(r);
+ }
+ if (brAtEdgeOfSelection(r.startContainer, r.startOffset)) {
+ r.setStart(r.startContainer, r.startOffset + 1);
+ sel.setRng(r);
+ }
+ }
+
+
+ if (tinymce.isIE8) {
+ // append a zero sized nbsp so that caret is restored correctly using bookmark
+ var s = t.ed.selection.getNode();
+ if (s.tagName === 'LI' && !(s.parentNode.lastChild === s)) {
+ var i = t.ed.getDoc().createTextNode('\uFEFF');
+ s.appendChild(i);
+ }
+ }
+
+ bookmark = sel.getBookmark();
+ actions.OL = actions.UL = recurse;
+ t.splitSafeEach(selectedBlocks, processElement);
+ sel.moveToBookmark(bookmark);
+ bookmark = null;
+
+ // we avoid doing repaint in a table as this will move the caret out of the table in Firefox 3.6
+ if (!isInTable()) {
+ // Avoids table or image handles being left behind in Firefox.
+ t.ed.execCommand('mceRepaint');
+ }
+ },
+
+ splitSafeEach: function(elements, f, forceClassBase) {
+ if (forceClassBase ||
+ (tinymce.isGecko &&
+ (/Firefox\/[12]\.[0-9]/.test(navigator.userAgent) ||
+ /Firefox\/3\.[0-4]/.test(navigator.userAgent)))) {
+ this.classBasedEach(elements, f);
+ } else {
+ each(elements, f);
+ }
+ },
+
+ classBasedEach: function(elements, f) {
+ var dom = this.ed.dom, nodes, element;
+ // Mark nodes
+ each(elements, function(element) {
+ dom.addClass(element, '_mce_act_on');
+ });
+ nodes = dom.select('._mce_act_on');
+ while (nodes.length > 0) {
+ element = nodes.shift();
+ dom.removeClass(element, '_mce_act_on');
+ f(element);
+ nodes = dom.select('._mce_act_on');
+ }
+ },
+
+ adjustPaddingFunction: function(isIndent) {
+ var indentAmount, indentUnits, ed = this.ed;
+ indentAmount = ed.settings.indentation;
+ indentUnits = /[a-z%]+/i.exec(indentAmount);
+ indentAmount = parseInt(indentAmount, 10);
+ return function(element) {
+ var currentIndent, newIndentAmount;
+ currentIndent = parseInt(ed.dom.getStyle(element, 'margin-left') || 0, 10) + parseInt(ed.dom.getStyle(element, 'padding-left') || 0, 10);
+ if (isIndent) {
+ newIndentAmount = currentIndent + indentAmount;
+ } else {
+ newIndentAmount = currentIndent - indentAmount;
+ }
+ ed.dom.setStyle(element, 'padding-left', '');
+ ed.dom.setStyle(element, 'margin-left', newIndentAmount > 0 ? newIndentAmount + indentUnits : '');
+ };
+ },
+
+ selectedBlocks: function() {
+ var ed = this.ed, selectedBlocks = ed.selection.getSelectedBlocks();
+ return selectedBlocks.length == 0 ? [ ed.dom.getRoot() ] : selectedBlocks;
+ },
+
+ getInfo: function() {
+ return {
+ longname : 'Lists',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/lists',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ };
+ }
+ });
+ tinymce.PluginManager.add("lists", tinymce.plugins.Lists);
+}());
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/css/media.css b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/css/media.css
new file mode 100755
index 00000000..0c45c7ff
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/css/media.css
@@ -0,0 +1,17 @@
+#id, #name, #hspace, #vspace, #class_name, #align { width: 100px }
+#hspace, #vspace { width: 50px }
+#flash_quality, #flash_align, #flash_scale, #flash_salign, #flash_wmode { width: 100px }
+#flash_base, #flash_flashvars, #html5_altsource1, #html5_altsource2, #html5_poster { width: 240px }
+#width, #height { width: 40px }
+#src, #media_type { width: 250px }
+#class { width: 120px }
+#prev { margin: 0; border: 1px solid black; width: 380px; height: 260px; overflow: auto }
+.panel_wrapper div.current { height: 420px; overflow: auto }
+#flash_options, #shockwave_options, #qt_options, #wmp_options, #rmp_options { display: none }
+.mceAddSelectValue { background-color: #DDDDDD }
+#qt_starttime, #qt_endtime, #qt_fov, #qt_href, #qt_moveid, #qt_moviename, #qt_node, #qt_pan, #qt_qtsrc, #qt_qtsrcchokespeed, #qt_target, #qt_tilt, #qt_urlsubstituten, #qt_volume { width: 70px }
+#wmp_balance, #wmp_baseurl, #wmp_captioningid, #wmp_currentmarker, #wmp_currentposition, #wmp_defaultframe, #wmp_playcount, #wmp_rate, #wmp_uimode, #wmp_volume { width: 70px }
+#rmp_console, #rmp_numloop, #rmp_controls, #rmp_scriptcallbacks { width: 70px }
+#shockwave_swvolume, #shockwave_swframe, #shockwave_swurl, #shockwave_swstretchvalign, #shockwave_swstretchhalign, #shockwave_swstretchstyle { width: 90px }
+#qt_qtsrc { width: 200px }
+iframe {border: 1px solid gray}
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/editor_plugin.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/editor_plugin.js
new file mode 100755
index 00000000..9ac42e0d
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/editor_plugin.js
@@ -0,0 +1 @@
+(function(){var b=tinymce.explode("id,name,width,height,style,align,class,hspace,vspace,bgcolor,type"),a=tinymce.makeMap(b.join(",")),f=tinymce.html.Node,d,i,h=tinymce.util.JSON,g;d=[["Flash","d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],["ShockWave","166b1bca-3f9c-11cf-8075-444553540000","application/x-director","http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0"],["WindowsMedia","6bf52a52-394a-11d3-b153-00c04f79faa6,22d6f312-b0f6-11d0-94ab-0080c74c7e95,05589fa1-c356-11ce-bf01-00aa0055595a","application/x-mplayer2","http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"],["QuickTime","02bf25d5-8c17-4b23-bc80-d3488abddc6b","video/quicktime","http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"],["RealMedia","cfcdaa03-8be4-11cf-b84b-0020afbbccfa","audio/x-pn-realaudio-plugin","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],["Java","8ad9c840-044e-11d1-b3e9-00805f499d93","application/x-java-applet","http://java.sun.com/products/plugin/autodl/jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0"],["Silverlight","dfeaf541-f3e1-4c24-acac-99c30715084a","application/x-silverlight-2"],["Iframe"],["Video"],["EmbeddedAudio"],["Audio"]];function e(j){return typeof(j)=="string"?j.replace(/[^0-9%]/g,""):j}function c(m){var l,j,k;if(m&&!m.splice){j=[];for(k=0;true;k++){if(m[k]){j[k]=m[k]}else{break}}return j}return m}tinymce.create("tinymce.plugins.MediaPlugin",{init:function(n,j){var r=this,l={},m,p,q,k;function o(s){return s&&s.nodeName==="IMG"&&n.dom.hasClass(s,"mceItemMedia")}r.editor=n;r.url=j;i="";for(m=0;m<d.length;m++){k=d[m][0];q={name:k,clsids:tinymce.explode(d[m][1]||""),mimes:tinymce.explode(d[m][2]||""),codebase:d[m][3]};for(p=0;p<q.clsids.length;p++){l["clsid:"+q.clsids[p]]=q}for(p=0;p<q.mimes.length;p++){l[q.mimes[p]]=q}l["mceItem"+k]=q;l[k.toLowerCase()]=q;i+=(i?"|":"")+k}tinymce.each(n.getParam("media_types","video=mp4,m4v,ogv,webm;silverlight=xap;flash=swf,flv;shockwave=dcr;quicktime=mov,qt,mpg,mpeg;shockwave=dcr;windowsmedia=avi,wmv,wm,asf,asx,wmx,wvx;realmedia=rm,ra,ram;java=jar;audio=mp3,ogg").split(";"),function(v){var s,u,t;v=v.split(/=/);u=tinymce.explode(v[1].toLowerCase());for(s=0;s<u.length;s++){t=l[v[0].toLowerCase()];if(t){l[u[s]]=t}}});i=new RegExp("write("+i+")\\(([^)]+)\\)");r.lookup=l;n.onPreInit.add(function(){n.schema.addValidElements("object[id|style|width|height|classid|codebase|*],param[name|value],embed[id|style|width|height|type|src|*],video[*],audio[*],source[*]");n.parser.addNodeFilter("object,embed,video,audio,script,iframe",function(s){var t=s.length;while(t--){r.objectToImg(s[t])}});n.serializer.addNodeFilter("img",function(s,u,t){var v=s.length,w;while(v--){w=s[v];if((w.attr("class")||"").indexOf("mceItemMedia")!==-1){r.imgToObject(w,t)}}})});n.onInit.add(function(){if(n.theme&&n.theme.onResolveName){n.theme.onResolveName.add(function(s,t){if(t.name==="img"&&n.dom.hasClass(t.node,"mceItemMedia")){t.name="media"}})}if(n&&n.plugins.contextmenu){n.plugins.contextmenu.onContextMenu.add(function(t,u,s){if(s.nodeName==="IMG"&&s.className.indexOf("mceItemMedia")!==-1){u.add({title:"media.edit",icon:"media",cmd:"mceMedia"})}})}});n.addCommand("mceMedia",function(){var t,s;s=n.selection.getNode();if(o(s)){t=n.dom.getAttrib(s,"data-mce-json");if(t){t=h.parse(t);tinymce.each(b,function(u){var v=n.dom.getAttrib(s,u);if(v){t[u]=v}});t.type=r.getType(s.className).name.toLowerCase()}}if(!t){t={type:"flash",video:{sources:[]},params:{}}}n.windowManager.open({file:j+"/media.htm",width:430+parseInt(n.getLang("media.delta_width",0)),height:500+parseInt(n.getLang("media.delta_height",0)),inline:1},{plugin_url:j,data:t})});n.addButton("media",{title:"media.desc",cmd:"mceMedia"});n.onNodeChange.add(function(t,s,u){s.setActive("media",o(u))})},convertUrl:function(l,o){var k=this,n=k.editor,m=n.settings,p=m.url_converter,j=m.url_converter_scope||k;if(!l){return l}if(o){return n.documentBaseURI.toAbsolute(l)}return p.call(j,l,"src","object")},getInfo:function(){return{longname:"Media",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/media",version:tinymce.majorVersion+"."+tinymce.minorVersion}},dataToImg:function(m,k){var r=this,o=r.editor,p=o.documentBaseURI,j,q,n,l;m.params.src=r.convertUrl(m.params.src,k);q=m.video.attrs;if(q){q.src=r.convertUrl(q.src,k)}if(q){q.poster=r.convertUrl(q.poster,k)}j=c(m.video.sources);if(j){for(l=0;l<j.length;l++){j[l].src=r.convertUrl(j[l].src,k)}}n=r.editor.dom.create("img",{id:m.id,style:m.style,align:m.align,hspace:m.hspace,vspace:m.vspace,src:r.editor.theme.url+"/img/trans.gif","class":"mceItemMedia mceItem"+r.getType(m.type).name,"data-mce-json":h.serialize(m,"'")});n.width=m.width=e(m.width||(m.type=="audio"?"300":"320"));n.height=m.height=e(m.height||(m.type=="audio"?"32":"240"));return n},dataToHtml:function(j,k){return this.editor.serializer.serialize(this.dataToImg(j,k),{forced_root_block:"",force_absolute:k})},htmlToData:function(l){var k,j,m;m={type:"flash",video:{sources:[]},params:{}};k=this.editor.parser.parse(l);j=k.getAll("img")[0];if(j){m=h.parse(j.attr("data-mce-json"));m.type=this.getType(j.attr("class")).name.toLowerCase();tinymce.each(b,function(n){var o=j.attr(n);if(o){m[n]=o}})}return m},getType:function(m){var k,j,l;j=tinymce.explode(m," ");for(k=0;k<j.length;k++){l=this.lookup[j[k]];if(l){return l}}},imgToObject:function(z,o){var u=this,p=u.editor,C,H,j,t,I,y,G,w,k,E,s,q,A,D,m,x,l,B,F;function r(n,J){var N,M,O,L,K;K=p.getParam("flash_video_player_url",u.convertUrl(u.url+"/moxieplayer.swf"));if(K){N=p.documentBaseURI;G.params.src=K;if(p.getParam("flash_video_player_absvideourl",true)){n=N.toAbsolute(n||"",true);J=N.toAbsolute(J||"",true)}O="";M=p.getParam("flash_video_player_flashvars",{url:"$url",poster:"$poster"});tinymce.each(M,function(Q,P){Q=Q.replace(/\$url/,n||"");Q=Q.replace(/\$poster/,J||"");if(Q.length>0){O+=(O?"&":"")+P+"="+escape(Q)}});if(O.length){G.params.flashvars=O}L=p.getParam("flash_video_player_params",{allowfullscreen:true,allowscriptaccess:true});tinymce.each(L,function(Q,P){G.params[P]=""+Q})}}G=z.attr("data-mce-json");if(!G){return}G=h.parse(G);q=this.getType(z.attr("class"));B=z.attr("data-mce-style");if(!B){B=z.attr("style");if(B){B=p.dom.serializeStyle(p.dom.parseStyle(B,"img"))}}G.width=z.attr("width")||G.width;G.height=z.attr("height")||G.height;if(q.name==="Iframe"){x=new f("iframe",1);tinymce.each(b,function(n){var J=z.attr(n);if(n=="class"&&J){J=J.replace(/mceItem.+ ?/g,"")}if(J&&J.length>0){x.attr(n,J)}});for(I in G.params){x.attr(I,G.params[I])}x.attr({style:B,src:G.params.src});z.replace(x);return}if(this.editor.settings.media_use_script){x=new f("script",1).attr("type","text/javascript");y=new f("#text",3);y.value="write"+q.name+"("+h.serialize(tinymce.extend(G.params,{width:z.attr("width"),height:z.attr("height")}))+");";x.append(y);z.replace(x);return}if(q.name==="Video"&&G.video.sources[0]){C=new f("video",1).attr(tinymce.extend({id:z.attr("id"),width:e(z.attr("width")),height:e(z.attr("height")),style:B},G.video.attrs));if(G.video.attrs){l=G.video.attrs.poster}k=G.video.sources=c(G.video.sources);for(A=0;A<k.length;A++){if(/\.mp4$/.test(k[A].src)){m=k[A].src}}if(!k[0].type){C.attr("src",k[0].src);k.splice(0,1)}for(A=0;A<k.length;A++){w=new f("source",1).attr(k[A]);w.shortEnded=true;C.append(w)}if(m){r(m,l);q=u.getType("flash")}else{G.params.src=""}}if(q.name==="Audio"&&G.video.sources[0]){F=new f("audio",1).attr(tinymce.extend({id:z.attr("id"),width:e(z.attr("width")),height:e(z.attr("height")),style:B},G.video.attrs));if(G.video.attrs){l=G.video.attrs.poster}k=G.video.sources=c(G.video.sources);if(!k[0].type){F.attr("src",k[0].src);k.splice(0,1)}for(A=0;A<k.length;A++){w=new f("source",1).attr(k[A]);w.shortEnded=true;F.append(w)}G.params.src=""}if(q.name==="EmbeddedAudio"){j=new f("embed",1);j.shortEnded=true;j.attr({id:z.attr("id"),width:e(z.attr("width")),height:e(z.attr("height")),style:B,type:z.attr("type")});for(I in G.params){j.attr(I,G.params[I])}tinymce.each(b,function(n){if(G[n]&&n!="type"){j.attr(n,G[n])}});G.params.src=""}if(G.params.src){if(/\.flv$/i.test(G.params.src)){r(G.params.src,"")}if(o&&o.force_absolute){G.params.src=p.documentBaseURI.toAbsolute(G.params.src)}H=new f("object",1).attr({id:z.attr("id"),width:e(z.attr("width")),height:e(z.attr("height")),style:B});tinymce.each(b,function(n){var J=G[n];if(n=="class"&&J){J=J.replace(/mceItem.+ ?/g,"")}if(J&&n!="type"){H.attr(n,J)}});for(I in G.params){s=new f("param",1);s.shortEnded=true;y=G.params[I];if(I==="src"&&q.name==="WindowsMedia"){I="url"}s.attr({name:I,value:y});H.append(s)}if(this.editor.getParam("media_strict",true)){H.attr({data:G.params.src,type:q.mimes[0]})}else{H.attr({classid:"clsid:"+q.clsids[0],codebase:q.codebase});j=new f("embed",1);j.shortEnded=true;j.attr({id:z.attr("id"),width:e(z.attr("width")),height:e(z.attr("height")),style:B,type:q.mimes[0]});for(I in G.params){j.attr(I,G.params[I])}tinymce.each(b,function(n){if(G[n]&&n!="type"){j.attr(n,G[n])}});H.append(j)}if(G.object_html){y=new f("#text",3);y.raw=true;y.value=G.object_html;H.append(y)}if(C){C.append(H)}}if(C){if(G.video_html){y=new f("#text",3);y.raw=true;y.value=G.video_html;C.append(y)}}if(F){if(G.video_html){y=new f("#text",3);y.raw=true;y.value=G.video_html;F.append(y)}}var v=C||F||H||j;if(v){z.replace(v)}else{z.remove()}},objectToImg:function(C){var L,k,F,s,M,N,y,A,x,G,E,t,q,I,B,l,K,o,H=this.lookup,m,z,v=this.editor.settings.url_converter,n=this.editor.settings.url_converter_scope,w,r,D,j;function u(O){return new tinymce.html.Serializer({inner:true,validate:false}).serialize(O)}function J(P,O){return H[(P.attr(O)||"").toLowerCase()]}function p(P){var O=P.replace(/^.*\.([^.]+)$/,"$1");return H[O.toLowerCase()||""]}if(!C.parent){return}if(C.name==="script"){if(C.firstChild){m=i.exec(C.firstChild.value)}if(!m){return}o=m[1];K={video:{},params:h.parse(m[2])};A=K.params.width;x=K.params.height}K=K||{video:{},params:{}};M=new f("img",1);M.attr({src:this.editor.theme.url+"/img/trans.gif"});N=C.name;if(N==="video"||N=="audio"){F=C;L=C.getAll("object")[0];k=C.getAll("embed")[0];A=F.attr("width");x=F.attr("height");y=F.attr("id");K.video={attrs:{},sources:[]};z=K.video.attrs;for(N in F.attributes.map){z[N]=F.attributes.map[N]}B=C.attr("src");if(B){K.video.sources.push({src:v.call(n,B,"src",C.name)})}l=F.getAll("source");for(E=0;E<l.length;E++){B=l[E].remove();K.video.sources.push({src:v.call(n,B.attr("src"),"src","source"),type:B.attr("type"),media:B.attr("media")})}if(z.poster){z.poster=v.call(n,z.poster,"poster",C.name)}}if(C.name==="object"){L=C;k=C.getAll("embed")[0]}if(C.name==="embed"){k=C}if(C.name==="iframe"){s=C;o="Iframe"}if(L){A=A||L.attr("width");x=x||L.attr("height");G=G||L.attr("style");y=y||L.attr("id");w=w||L.attr("hspace");r=r||L.attr("vspace");D=D||L.attr("align");j=j||L.attr("bgcolor");K.name=L.attr("name");I=L.getAll("param");for(E=0;E<I.length;E++){q=I[E];N=q.remove().attr("name");if(!a[N]){K.params[N]=q.attr("value")}}K.params.src=K.params.src||L.attr("data")}if(k){A=A||k.attr("width");x=x||k.attr("height");G=G||k.attr("style");y=y||k.attr("id");w=w||k.attr("hspace");r=r||k.attr("vspace");D=D||k.attr("align");j=j||k.attr("bgcolor");for(N in k.attributes.map){if(!a[N]&&!K.params[N]){K.params[N]=k.attributes.map[N]}}}if(s){A=e(s.attr("width"));x=e(s.attr("height"));G=G||s.attr("style");y=s.attr("id");w=s.attr("hspace");r=s.attr("vspace");D=s.attr("align");j=s.attr("bgcolor");tinymce.each(b,function(O){M.attr(O,s.attr(O))});for(N in s.attributes.map){if(!a[N]&&!K.params[N]){K.params[N]=s.attributes.map[N]}}}if(K.params.movie){K.params.src=K.params.src||K.params.movie;delete K.params.movie}if(K.params.src){K.params.src=v.call(n,K.params.src,"src","object")}if(F){if(C.name==="video"){o=H.video.name}else{if(C.name==="audio"){o=H.audio.name}}}if(L&&!o){o=(J(L,"clsid")||J(L,"classid")||J(L,"type")||{}).name}if(k&&!o){o=(J(k,"type")||p(K.params.src)||{}).name}if(k&&o=="EmbeddedAudio"){K.params.type=k.attr("type")}C.replace(M);if(k){k.remove()}if(L){t=u(L.remove());if(t){K.object_html=t}}if(F){t=u(F.remove());if(t){K.video_html=t}}K.hspace=w;K.vspace=r;K.align=D;K.bgcolor=j;M.attr({id:y,"class":"mceItemMedia mceItem"+(o||"Flash"),style:G,width:A||(C.name=="audio"?"300":"320"),height:x||(C.name=="audio"?"32":"240"),hspace:w,vspace:r,align:D,bgcolor:j,"data-mce-json":h.serialize(K,"'")})}});tinymce.PluginManager.add("media",tinymce.plugins.MediaPlugin)})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/editor_plugin_src.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/editor_plugin_src.js
new file mode 100755
index 00000000..33a58050
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/editor_plugin_src.js
@@ -0,0 +1,898 @@
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+ var rootAttributes = tinymce.explode('id,name,width,height,style,align,class,hspace,vspace,bgcolor,type'), excludedAttrs = tinymce.makeMap(rootAttributes.join(',')), Node = tinymce.html.Node,
+ mediaTypes, scriptRegExp, JSON = tinymce.util.JSON, mimeTypes;
+
+ // Media types supported by this plugin
+ mediaTypes = [
+ // Type, clsid:s, mime types, codebase
+ ["Flash", "d27cdb6e-ae6d-11cf-96b8-444553540000", "application/x-shockwave-flash", "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],
+ ["ShockWave", "166b1bca-3f9c-11cf-8075-444553540000", "application/x-director", "http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0"],
+ ["WindowsMedia", "6bf52a52-394a-11d3-b153-00c04f79faa6,22d6f312-b0f6-11d0-94ab-0080c74c7e95,05589fa1-c356-11ce-bf01-00aa0055595a", "application/x-mplayer2", "http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"],
+ ["QuickTime", "02bf25d5-8c17-4b23-bc80-d3488abddc6b", "video/quicktime", "http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"],
+ ["RealMedia", "cfcdaa03-8be4-11cf-b84b-0020afbbccfa", "audio/x-pn-realaudio-plugin", "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],
+ ["Java", "8ad9c840-044e-11d1-b3e9-00805f499d93", "application/x-java-applet", "http://java.sun.com/products/plugin/autodl/jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0"],
+ ["Silverlight", "dfeaf541-f3e1-4c24-acac-99c30715084a", "application/x-silverlight-2"],
+ ["Iframe"],
+ ["Video"],
+ ["EmbeddedAudio"],
+ ["Audio"]
+ ];
+
+ function normalizeSize(size) {
+ return typeof(size) == "string" ? size.replace(/[^0-9%]/g, '') : size;
+ }
+
+ function toArray(obj) {
+ var undef, out, i;
+
+ if (obj && !obj.splice) {
+ out = [];
+
+ for (i = 0; true; i++) {
+ if (obj[i])
+ out[i] = obj[i];
+ else
+ break;
+ }
+
+ return out;
+ }
+
+ return obj;
+ };
+
+ tinymce.create('tinymce.plugins.MediaPlugin', {
+ init : function(ed, url) {
+ var self = this, lookup = {}, i, y, item, name;
+
+ function isMediaImg(node) {
+ return node && node.nodeName === 'IMG' && ed.dom.hasClass(node, 'mceItemMedia');
+ };
+
+ self.editor = ed;
+ self.url = url;
+
+ // Parse media types into a lookup table
+ scriptRegExp = '';
+ for (i = 0; i < mediaTypes.length; i++) {
+ name = mediaTypes[i][0];
+
+ item = {
+ name : name,
+ clsids : tinymce.explode(mediaTypes[i][1] || ''),
+ mimes : tinymce.explode(mediaTypes[i][2] || ''),
+ codebase : mediaTypes[i][3]
+ };
+
+ for (y = 0; y < item.clsids.length; y++)
+ lookup['clsid:' + item.clsids[y]] = item;
+
+ for (y = 0; y < item.mimes.length; y++)
+ lookup[item.mimes[y]] = item;
+
+ lookup['mceItem' + name] = item;
+ lookup[name.toLowerCase()] = item;
+
+ scriptRegExp += (scriptRegExp ? '|' : '') + name;
+ }
+
+ // Handle the media_types setting
+ tinymce.each(ed.getParam("media_types",
+ "video=mp4,m4v,ogv,webm;" +
+ "silverlight=xap;" +
+ "flash=swf,flv;" +
+ "shockwave=dcr;" +
+ "quicktime=mov,qt,mpg,mpeg;" +
+ "shockwave=dcr;" +
+ "windowsmedia=avi,wmv,wm,asf,asx,wmx,wvx;" +
+ "realmedia=rm,ra,ram;" +
+ "java=jar;" +
+ "audio=mp3,ogg"
+ ).split(';'), function(item) {
+ var i, extensions, type;
+
+ item = item.split(/=/);
+ extensions = tinymce.explode(item[1].toLowerCase());
+ for (i = 0; i < extensions.length; i++) {
+ type = lookup[item[0].toLowerCase()];
+
+ if (type)
+ lookup[extensions[i]] = type;
+ }
+ });
+
+ scriptRegExp = new RegExp('write(' + scriptRegExp + ')\\(([^)]+)\\)');
+ self.lookup = lookup;
+
+ ed.onPreInit.add(function() {
+ // Allow video elements
+ ed.schema.addValidElements('object[id|style|width|height|classid|codebase|*],param[name|value],embed[id|style|width|height|type|src|*],video[*],audio[*],source[*]');
+
+ // Convert video elements to image placeholder
+ ed.parser.addNodeFilter('object,embed,video,audio,script,iframe', function(nodes) {
+ var i = nodes.length;
+
+ while (i--)
+ self.objectToImg(nodes[i]);
+ });
+
+ // Convert image placeholders to video elements
+ ed.serializer.addNodeFilter('img', function(nodes, name, args) {
+ var i = nodes.length, node;
+
+ while (i--) {
+ node = nodes[i];
+ if ((node.attr('class') || '').indexOf('mceItemMedia') !== -1)
+ self.imgToObject(node, args);
+ }
+ });
+ });
+
+ ed.onInit.add(function() {
+ // Display "media" instead of "img" in element path
+ if (ed.theme && ed.theme.onResolveName) {
+ ed.theme.onResolveName.add(function(theme, path_object) {
+ if (path_object.name === 'img' && ed.dom.hasClass(path_object.node, 'mceItemMedia'))
+ path_object.name = 'media';
+ });
+ }
+
+ // Add contect menu if it's loaded
+ if (ed && ed.plugins.contextmenu) {
+ ed.plugins.contextmenu.onContextMenu.add(function(plugin, menu, element) {
+ if (element.nodeName === 'IMG' && element.className.indexOf('mceItemMedia') !== -1)
+ menu.add({title : 'media.edit', icon : 'media', cmd : 'mceMedia'});
+ });
+ }
+ });
+
+ // Register commands
+ ed.addCommand('mceMedia', function() {
+ var data, img;
+
+ img = ed.selection.getNode();
+ if (isMediaImg(img)) {
+ data = ed.dom.getAttrib(img, 'data-mce-json');
+ if (data) {
+ data = JSON.parse(data);
+
+ // Add some extra properties to the data object
+ tinymce.each(rootAttributes, function(name) {
+ var value = ed.dom.getAttrib(img, name);
+
+ if (value)
+ data[name] = value;
+ });
+
+ data.type = self.getType(img.className).name.toLowerCase();
+ }
+ }
+
+ if (!data) {
+ data = {
+ type : 'flash',
+ video: {sources:[]},
+ params: {}
+ };
+ }
+
+ ed.windowManager.open({
+ file : url + '/media.htm',
+ width : 430 + parseInt(ed.getLang('media.delta_width', 0)),
+ height : 500 + parseInt(ed.getLang('media.delta_height', 0)),
+ inline : 1
+ }, {
+ plugin_url : url,
+ data : data
+ });
+ });
+
+ // Register buttons
+ ed.addButton('media', {title : 'media.desc', cmd : 'mceMedia'});
+
+ // Update media selection status
+ ed.onNodeChange.add(function(ed, cm, node) {
+ cm.setActive('media', isMediaImg(node));
+ });
+ },
+
+ convertUrl : function(url, force_absolute) {
+ var self = this, editor = self.editor, settings = editor.settings,
+ urlConverter = settings.url_converter,
+ urlConverterScope = settings.url_converter_scope || self;
+
+ if (!url)
+ return url;
+
+ if (force_absolute)
+ return editor.documentBaseURI.toAbsolute(url);
+
+ return urlConverter.call(urlConverterScope, url, 'src', 'object');
+ },
+
+ getInfo : function() {
+ return {
+ longname : 'Media',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/media',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ };
+ },
+
+ /**
+ * Converts the JSON data object to an img node.
+ */
+ dataToImg : function(data, force_absolute) {
+ var self = this, editor = self.editor, baseUri = editor.documentBaseURI, sources, attrs, img, i;
+
+ data.params.src = self.convertUrl(data.params.src, force_absolute);
+
+ attrs = data.video.attrs;
+ if (attrs)
+ attrs.src = self.convertUrl(attrs.src, force_absolute);
+
+ if (attrs)
+ attrs.poster = self.convertUrl(attrs.poster, force_absolute);
+
+ sources = toArray(data.video.sources);
+ if (sources) {
+ for (i = 0; i < sources.length; i++)
+ sources[i].src = self.convertUrl(sources[i].src, force_absolute);
+ }
+
+ img = self.editor.dom.create('img', {
+ id : data.id,
+ style : data.style,
+ align : data.align,
+ hspace : data.hspace,
+ vspace : data.vspace,
+ src : self.editor.theme.url + '/img/trans.gif',
+ 'class' : 'mceItemMedia mceItem' + self.getType(data.type).name,
+ 'data-mce-json' : JSON.serialize(data, "'")
+ });
+
+ img.width = data.width = normalizeSize(data.width || (data.type == 'audio' ? "300" : "320"));
+ img.height = data.height = normalizeSize(data.height || (data.type == 'audio' ? "32" : "240"));
+
+ return img;
+ },
+
+ /**
+ * Converts the JSON data object to a HTML string.
+ */
+ dataToHtml : function(data, force_absolute) {
+ return this.editor.serializer.serialize(this.dataToImg(data, force_absolute), {forced_root_block : '', force_absolute : force_absolute});
+ },
+
+ /**
+ * Converts the JSON data object to a HTML string.
+ */
+ htmlToData : function(html) {
+ var fragment, img, data;
+
+ data = {
+ type : 'flash',
+ video: {sources:[]},
+ params: {}
+ };
+
+ fragment = this.editor.parser.parse(html);
+ img = fragment.getAll('img')[0];
+
+ if (img) {
+ data = JSON.parse(img.attr('data-mce-json'));
+ data.type = this.getType(img.attr('class')).name.toLowerCase();
+
+ // Add some extra properties to the data object
+ tinymce.each(rootAttributes, function(name) {
+ var value = img.attr(name);
+
+ if (value)
+ data[name] = value;
+ });
+ }
+
+ return data;
+ },
+
+ /**
+ * Get type item by extension, class, clsid or mime type.
+ *
+ * @method getType
+ * @param {String} value Value to get type item by.
+ * @return {Object} Type item object or undefined.
+ */
+ getType : function(value) {
+ var i, values, typeItem;
+
+ // Find type by checking the classes
+ values = tinymce.explode(value, ' ');
+ for (i = 0; i < values.length; i++) {
+ typeItem = this.lookup[values[i]];
+
+ if (typeItem)
+ return typeItem;
+ }
+ },
+
+ /**
+ * Converts a tinymce.html.Node image element to video/object/embed.
+ */
+ imgToObject : function(node, args) {
+ var self = this, editor = self.editor, video, object, embed, iframe, name, value, data,
+ source, sources, params, param, typeItem, i, item, mp4Source, replacement,
+ posterSrc, style, audio;
+
+ // Adds the flash player
+ function addPlayer(video_src, poster_src) {
+ var baseUri, flashVars, flashVarsOutput, params, flashPlayer;
+
+ flashPlayer = editor.getParam('flash_video_player_url', self.convertUrl(self.url + '/moxieplayer.swf'));
+ if (flashPlayer) {
+ baseUri = editor.documentBaseURI;
+ data.params.src = flashPlayer;
+
+ // Convert the movie url to absolute urls
+ if (editor.getParam('flash_video_player_absvideourl', true)) {
+ video_src = baseUri.toAbsolute(video_src || '', true);
+ poster_src = baseUri.toAbsolute(poster_src || '', true);
+ }
+
+ // Generate flash vars
+ flashVarsOutput = '';
+ flashVars = editor.getParam('flash_video_player_flashvars', {url : '$url', poster : '$poster'});
+ tinymce.each(flashVars, function(value, name) {
+ // Replace $url and $poster variables in flashvars value
+ value = value.replace(/\$url/, video_src || '');
+ value = value.replace(/\$poster/, poster_src || '');
+
+ if (value.length > 0)
+ flashVarsOutput += (flashVarsOutput ? '&' : '') + name + '=' + escape(value);
+ });
+
+ if (flashVarsOutput.length)
+ data.params.flashvars = flashVarsOutput;
+
+ params = editor.getParam('flash_video_player_params', {
+ allowfullscreen: true,
+ allowscriptaccess: true
+ });
+
+ tinymce.each(params, function(value, name) {
+ data.params[name] = "" + value;
+ });
+ }
+ };
+
+ data = node.attr('data-mce-json');
+ if (!data)
+ return;
+
+ data = JSON.parse(data);
+ typeItem = this.getType(node.attr('class'));
+
+ style = node.attr('data-mce-style');
+ if (!style) {
+ style = node.attr('style');
+
+ if (style)
+ style = editor.dom.serializeStyle(editor.dom.parseStyle(style, 'img'));
+ }
+
+ // Use node width/height to override the data width/height when the placeholder is resized
+ data.width = node.attr('width') || data.width;
+ data.height = node.attr('height') || data.height;
+
+ // Handle iframe
+ if (typeItem.name === 'Iframe') {
+ replacement = new Node('iframe', 1);
+
+ tinymce.each(rootAttributes, function(name) {
+ var value = node.attr(name);
+
+ if (name == 'class' && value)
+ value = value.replace(/mceItem.+ ?/g, '');
+
+ if (value && value.length > 0)
+ replacement.attr(name, value);
+ });
+
+ for (name in data.params)
+ replacement.attr(name, data.params[name]);
+
+ replacement.attr({
+ style: style,
+ src: data.params.src
+ });
+
+ node.replace(replacement);
+
+ return;
+ }
+
+ // Handle scripts
+ if (this.editor.settings.media_use_script) {
+ replacement = new Node('script', 1).attr('type', 'text/javascript');
+
+ value = new Node('#text', 3);
+ value.value = 'write' + typeItem.name + '(' + JSON.serialize(tinymce.extend(data.params, {
+ width: node.attr('width'),
+ height: node.attr('height')
+ })) + ');';
+
+ replacement.append(value);
+ node.replace(replacement);
+
+ return;
+ }
+
+ // Add HTML5 video element
+ if (typeItem.name === 'Video' && data.video.sources[0]) {
+ // Create new object element
+ video = new Node('video', 1).attr(tinymce.extend({
+ id : node.attr('id'),
+ width: normalizeSize(node.attr('width')),
+ height: normalizeSize(node.attr('height')),
+ style : style
+ }, data.video.attrs));
+
+ // Get poster source and use that for flash fallback
+ if (data.video.attrs)
+ posterSrc = data.video.attrs.poster;
+
+ sources = data.video.sources = toArray(data.video.sources);
+ for (i = 0; i < sources.length; i++) {
+ if (/\.mp4$/.test(sources[i].src))
+ mp4Source = sources[i].src;
+ }
+
+ if (!sources[0].type) {
+ video.attr('src', sources[0].src);
+ sources.splice(0, 1);
+ }
+
+ for (i = 0; i < sources.length; i++) {
+ source = new Node('source', 1).attr(sources[i]);
+ source.shortEnded = true;
+ video.append(source);
+ }
+
+ // Create flash fallback for video if we have a mp4 source
+ if (mp4Source) {
+ addPlayer(mp4Source, posterSrc);
+ typeItem = self.getType('flash');
+ } else
+ data.params.src = '';
+ }
+
+ // Add HTML5 audio element
+ if (typeItem.name === 'Audio' && data.video.sources[0]) {
+ // Create new object element
+ audio = new Node('audio', 1).attr(tinymce.extend({
+ id : node.attr('id'),
+ width: normalizeSize(node.attr('width')),
+ height: normalizeSize(node.attr('height')),
+ style : style
+ }, data.video.attrs));
+
+ // Get poster source and use that for flash fallback
+ if (data.video.attrs)
+ posterSrc = data.video.attrs.poster;
+
+ sources = data.video.sources = toArray(data.video.sources);
+ if (!sources[0].type) {
+ audio.attr('src', sources[0].src);
+ sources.splice(0, 1);
+ }
+
+ for (i = 0; i < sources.length; i++) {
+ source = new Node('source', 1).attr(sources[i]);
+ source.shortEnded = true;
+ audio.append(source);
+ }
+
+ data.params.src = '';
+ }
+
+ if (typeItem.name === 'EmbeddedAudio') {
+ embed = new Node('embed', 1);
+ embed.shortEnded = true;
+ embed.attr({
+ id: node.attr('id'),
+ width: normalizeSize(node.attr('width')),
+ height: normalizeSize(node.attr('height')),
+ style : style,
+ type: node.attr('type')
+ });
+
+ for (name in data.params)
+ embed.attr(name, data.params[name]);
+
+ tinymce.each(rootAttributes, function(name) {
+ if (data[name] && name != 'type')
+ embed.attr(name, data[name]);
+ });
+
+ data.params.src = '';
+ }
+
+ // Do we have a params src then we can generate object
+ if (data.params.src) {
+ // Is flv movie add player for it
+ if (/\.flv$/i.test(data.params.src))
+ addPlayer(data.params.src, '');
+
+ if (args && args.force_absolute)
+ data.params.src = editor.documentBaseURI.toAbsolute(data.params.src);
+
+ // Create new object element
+ object = new Node('object', 1).attr({
+ id : node.attr('id'),
+ width: normalizeSize(node.attr('width')),
+ height: normalizeSize(node.attr('height')),
+ style : style
+ });
+
+ tinymce.each(rootAttributes, function(name) {
+ var value = data[name];
+
+ if (name == 'class' && value)
+ value = value.replace(/mceItem.+ ?/g, '');
+
+ if (value && name != 'type')
+ object.attr(name, value);
+ });
+
+ // Add params
+ for (name in data.params) {
+ param = new Node('param', 1);
+ param.shortEnded = true;
+ value = data.params[name];
+
+ // Windows media needs to use url instead of src for the media URL
+ if (name === 'src' && typeItem.name === 'WindowsMedia')
+ name = 'url';
+
+ param.attr({name: name, value: value});
+ object.append(param);
+ }
+
+ // Setup add type and classid if strict is disabled
+ if (this.editor.getParam('media_strict', true)) {
+ object.attr({
+ data: data.params.src,
+ type: typeItem.mimes[0]
+ });
+ } else {
+ object.attr({
+ classid: "clsid:" + typeItem.clsids[0],
+ codebase: typeItem.codebase
+ });
+
+ embed = new Node('embed', 1);
+ embed.shortEnded = true;
+ embed.attr({
+ id: node.attr('id'),
+ width: normalizeSize(node.attr('width')),
+ height: normalizeSize(node.attr('height')),
+ style : style,
+ type: typeItem.mimes[0]
+ });
+
+ for (name in data.params)
+ embed.attr(name, data.params[name]);
+
+ tinymce.each(rootAttributes, function(name) {
+ if (data[name] && name != 'type')
+ embed.attr(name, data[name]);
+ });
+
+ object.append(embed);
+ }
+
+ // Insert raw HTML
+ if (data.object_html) {
+ value = new Node('#text', 3);
+ value.raw = true;
+ value.value = data.object_html;
+ object.append(value);
+ }
+
+ // Append object to video element if it exists
+ if (video)
+ video.append(object);
+ }
+
+ if (video) {
+ // Insert raw HTML
+ if (data.video_html) {
+ value = new Node('#text', 3);
+ value.raw = true;
+ value.value = data.video_html;
+ video.append(value);
+ }
+ }
+
+ if (audio) {
+ // Insert raw HTML
+ if (data.video_html) {
+ value = new Node('#text', 3);
+ value.raw = true;
+ value.value = data.video_html;
+ audio.append(value);
+ }
+ }
+
+ var n = video || audio || object || embed;
+ if (n)
+ node.replace(n);
+ else
+ node.remove();
+ },
+
+ /**
+ * Converts a tinymce.html.Node video/object/embed to an img element.
+ *
+ * The video/object/embed will be converted into an image placeholder with a JSON data attribute like this:
+ * <img class="mceItemMedia mceItemFlash" width="100" height="100" data-mce-json="{..}" />
+ *
+ * The JSON structure will be like this:
+ * {'params':{'flashvars':'something','quality':'high','src':'someurl'}, 'video':{'sources':[{src: 'someurl', type: 'video/mp4'}]}}
+ */
+ objectToImg : function(node) {
+ var object, embed, video, iframe, img, name, id, width, height, style, i, html,
+ param, params, source, sources, data, type, lookup = this.lookup,
+ matches, attrs, urlConverter = this.editor.settings.url_converter,
+ urlConverterScope = this.editor.settings.url_converter_scope,
+ hspace, vspace, align, bgcolor;
+
+ function getInnerHTML(node) {
+ return new tinymce.html.Serializer({
+ inner: true,
+ validate: false
+ }).serialize(node);
+ };
+
+ function lookupAttribute(o, attr) {
+ return lookup[(o.attr(attr) || '').toLowerCase()];
+ }
+
+ function lookupExtension(src) {
+ var ext = src.replace(/^.*\.([^.]+)$/, '$1');
+ return lookup[ext.toLowerCase() || ''];
+ }
+
+ // If node isn't in document
+ if (!node.parent)
+ return;
+
+ // Handle media scripts
+ if (node.name === 'script') {
+ if (node.firstChild)
+ matches = scriptRegExp.exec(node.firstChild.value);
+
+ if (!matches)
+ return;
+
+ type = matches[1];
+ data = {video : {}, params : JSON.parse(matches[2])};
+ width = data.params.width;
+ height = data.params.height;
+ }
+
+ // Setup data objects
+ data = data || {
+ video : {},
+ params : {}
+ };
+
+ // Setup new image object
+ img = new Node('img', 1);
+ img.attr({
+ src : this.editor.theme.url + '/img/trans.gif'
+ });
+
+ // Video element
+ name = node.name;
+ if (name === 'video' || name == 'audio') {
+ video = node;
+ object = node.getAll('object')[0];
+ embed = node.getAll('embed')[0];
+ width = video.attr('width');
+ height = video.attr('height');
+ id = video.attr('id');
+ data.video = {attrs : {}, sources : []};
+
+ // Get all video attributes
+ attrs = data.video.attrs;
+ for (name in video.attributes.map)
+ attrs[name] = video.attributes.map[name];
+
+ source = node.attr('src');
+ if (source)
+ data.video.sources.push({src : urlConverter.call(urlConverterScope, source, 'src', node.name)});
+
+ // Get all sources
+ sources = video.getAll("source");
+ for (i = 0; i < sources.length; i++) {
+ source = sources[i].remove();
+
+ data.video.sources.push({
+ src: urlConverter.call(urlConverterScope, source.attr('src'), 'src', 'source'),
+ type: source.attr('type'),
+ media: source.attr('media')
+ });
+ }
+
+ // Convert the poster URL
+ if (attrs.poster)
+ attrs.poster = urlConverter.call(urlConverterScope, attrs.poster, 'poster', node.name);
+ }
+
+ // Object element
+ if (node.name === 'object') {
+ object = node;
+ embed = node.getAll('embed')[0];
+ }
+
+ // Embed element
+ if (node.name === 'embed')
+ embed = node;
+
+ // Iframe element
+ if (node.name === 'iframe') {
+ iframe = node;
+ type = 'Iframe';
+ }
+
+ if (object) {
+ // Get width/height
+ width = width || object.attr('width');
+ height = height || object.attr('height');
+ style = style || object.attr('style');
+ id = id || object.attr('id');
+ hspace = hspace || object.attr('hspace');
+ vspace = vspace || object.attr('vspace');
+ align = align || object.attr('align');
+ bgcolor = bgcolor || object.attr('bgcolor');
+ data.name = object.attr('name');
+
+ // Get all object params
+ params = object.getAll("param");
+ for (i = 0; i < params.length; i++) {
+ param = params[i];
+ name = param.remove().attr('name');
+
+ if (!excludedAttrs[name])
+ data.params[name] = param.attr('value');
+ }
+
+ data.params.src = data.params.src || object.attr('data');
+ }
+
+ if (embed) {
+ // Get width/height
+ width = width || embed.attr('width');
+ height = height || embed.attr('height');
+ style = style || embed.attr('style');
+ id = id || embed.attr('id');
+ hspace = hspace || embed.attr('hspace');
+ vspace = vspace || embed.attr('vspace');
+ align = align || embed.attr('align');
+ bgcolor = bgcolor || embed.attr('bgcolor');
+
+ // Get all embed attributes
+ for (name in embed.attributes.map) {
+ if (!excludedAttrs[name] && !data.params[name])
+ data.params[name] = embed.attributes.map[name];
+ }
+ }
+
+ if (iframe) {
+ // Get width/height
+ width = normalizeSize(iframe.attr('width'));
+ height = normalizeSize(iframe.attr('height'));
+ style = style || iframe.attr('style');
+ id = iframe.attr('id');
+ hspace = iframe.attr('hspace');
+ vspace = iframe.attr('vspace');
+ align = iframe.attr('align');
+ bgcolor = iframe.attr('bgcolor');
+
+ tinymce.each(rootAttributes, function(name) {
+ img.attr(name, iframe.attr(name));
+ });
+
+ // Get all iframe attributes
+ for (name in iframe.attributes.map) {
+ if (!excludedAttrs[name] && !data.params[name])
+ data.params[name] = iframe.attributes.map[name];
+ }
+ }
+
+ // Use src not movie
+ if (data.params.movie) {
+ data.params.src = data.params.src || data.params.movie;
+ delete data.params.movie;
+ }
+
+ // Convert the URL to relative/absolute depending on configuration
+ if (data.params.src)
+ data.params.src = urlConverter.call(urlConverterScope, data.params.src, 'src', 'object');
+
+ if (video) {
+ if (node.name === 'video')
+ type = lookup.video.name;
+ else if (node.name === 'audio')
+ type = lookup.audio.name;
+ }
+
+ if (object && !type)
+ type = (lookupAttribute(object, 'clsid') || lookupAttribute(object, 'classid') || lookupAttribute(object, 'type') || {}).name;
+
+ if (embed && !type)
+ type = (lookupAttribute(embed, 'type') || lookupExtension(data.params.src) || {}).name;
+
+ // for embedded audio we preserve the original specified type
+ if (embed && type == 'EmbeddedAudio') {
+ data.params.type = embed.attr('type');
+ }
+
+ // Replace the video/object/embed element with a placeholder image containing the data
+ node.replace(img);
+
+ // Remove embed
+ if (embed)
+ embed.remove();
+
+ // Serialize the inner HTML of the object element
+ if (object) {
+ html = getInnerHTML(object.remove());
+
+ if (html)
+ data.object_html = html;
+ }
+
+ // Serialize the inner HTML of the video element
+ if (video) {
+ html = getInnerHTML(video.remove());
+
+ if (html)
+ data.video_html = html;
+ }
+
+ data.hspace = hspace;
+ data.vspace = vspace;
+ data.align = align;
+ data.bgcolor = bgcolor;
+
+ // Set width/height of placeholder
+ img.attr({
+ id : id,
+ 'class' : 'mceItemMedia mceItem' + (type || 'Flash'),
+ style : style,
+ width : width || (node.name == 'audio' ? "300" : "320"),
+ height : height || (node.name == 'audio' ? "32" : "240"),
+ hspace : hspace,
+ vspace : vspace,
+ align : align,
+ bgcolor : bgcolor,
+ "data-mce-json" : JSON.serialize(data, "'")
+ });
+ }
+ });
+
+ // Register plugin
+ tinymce.PluginManager.add('media', tinymce.plugins.MediaPlugin);
+})();
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/js/embed.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/js/embed.js
new file mode 100644
index 00000000..f8dc8105
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/js/embed.js
@@ -0,0 +1,73 @@
+/**
+ * This script contains embed functions for common plugins. This scripts are complety free to use for any purpose.
+ */
+
+function writeFlash(p) {
+ writeEmbed(
+ 'D27CDB6E-AE6D-11cf-96B8-444553540000',
+ 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0',
+ 'application/x-shockwave-flash',
+ p
+ );
+}
+
+function writeShockWave(p) {
+ writeEmbed(
+ '166B1BCA-3F9C-11CF-8075-444553540000',
+ 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0',
+ 'application/x-director',
+ p
+ );
+}
+
+function writeQuickTime(p) {
+ writeEmbed(
+ '02BF25D5-8C17-4B23-BC80-D3488ABDDC6B',
+ 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0',
+ 'video/quicktime',
+ p
+ );
+}
+
+function writeRealMedia(p) {
+ writeEmbed(
+ 'CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA',
+ 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0',
+ 'audio/x-pn-realaudio-plugin',
+ p
+ );
+}
+
+function writeWindowsMedia(p) {
+ p.url = p.src;
+ writeEmbed(
+ '6BF52A52-394A-11D3-B153-00C04F79FAA6',
+ 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701',
+ 'application/x-mplayer2',
+ p
+ );
+}
+
+function writeEmbed(cls, cb, mt, p) {
+ var h = '', n;
+
+ h += '<object classid="clsid:' + cls + '" codebase="' + cb + '"';
+ h += typeof(p.id) != "undefined" ? 'id="' + p.id + '"' : '';
+ h += typeof(p.name) != "undefined" ? 'name="' + p.name + '"' : '';
+ h += typeof(p.width) != "undefined" ? 'width="' + p.width + '"' : '';
+ h += typeof(p.height) != "undefined" ? 'height="' + p.height + '"' : '';
+ h += typeof(p.align) != "undefined" ? 'align="' + p.align + '"' : '';
+ h += '>';
+
+ for (n in p)
+ h += '<param name="' + n + '" value="' + p[n] + '">';
+
+ h += '<embed type="' + mt + '"';
+
+ for (n in p)
+ h += n + '="' + p[n] + '" ';
+
+ h += '></embed></object>';
+
+ document.write(h);
+}
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/js/media.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/js/media.js
new file mode 100644
index 00000000..f6a081a6
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/js/media.js
@@ -0,0 +1,503 @@
+(function() {
+ var url;
+
+ if (url = tinyMCEPopup.getParam("media_external_list_url"))
+ document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
+
+ function get(id) {
+ return document.getElementById(id);
+ }
+
+ function clone(obj) {
+ var i, len, copy, attr;
+
+ if (null == obj || "object" != typeof obj)
+ return obj;
+
+ // Handle Array
+ if ('length' in obj) {
+ copy = [];
+
+ for (i = 0, len = obj.length; i < len; ++i) {
+ copy[i] = clone(obj[i]);
+ }
+
+ return copy;
+ }
+
+ // Handle Object
+ copy = {};
+ for (attr in obj) {
+ if (obj.hasOwnProperty(attr))
+ copy[attr] = clone(obj[attr]);
+ }
+
+ return copy;
+ }
+
+ function getVal(id) {
+ var elm = get(id);
+
+ if (elm.nodeName == "SELECT")
+ return elm.options[elm.selectedIndex].value;
+
+ if (elm.type == "checkbox")
+ return elm.checked;
+
+ return elm.value;
+ }
+
+ function setVal(id, value, name) {
+ if (typeof(value) != 'undefined' && value != null) {
+ var elm = get(id);
+
+ if (elm.nodeName == "SELECT")
+ selectByValue(document.forms[0], id, value);
+ else if (elm.type == "checkbox") {
+ if (typeof(value) == 'string') {
+ value = value.toLowerCase();
+ value = (!name && value === 'true') || (name && value === name.toLowerCase());
+ }
+ elm.checked = !!value;
+ } else
+ elm.value = value;
+ }
+ }
+
+ window.Media = {
+ init : function() {
+ var html, editor, self = this;
+
+ self.editor = editor = tinyMCEPopup.editor;
+
+ // Setup file browsers and color pickers
+ get('filebrowsercontainer').innerHTML = getBrowserHTML('filebrowser','src','media','media');
+ get('qtsrcfilebrowsercontainer').innerHTML = getBrowserHTML('qtsrcfilebrowser','quicktime_qtsrc','media','media');
+ get('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
+ get('video_altsource1_filebrowser').innerHTML = getBrowserHTML('video_filebrowser_altsource1','video_altsource1','media','media');
+ get('video_altsource2_filebrowser').innerHTML = getBrowserHTML('video_filebrowser_altsource2','video_altsource2','media','media');
+ get('audio_altsource1_filebrowser').innerHTML = getBrowserHTML('audio_filebrowser_altsource1','audio_altsource1','media','media');
+ get('audio_altsource2_filebrowser').innerHTML = getBrowserHTML('audio_filebrowser_altsource2','audio_altsource2','media','media');
+ get('video_poster_filebrowser').innerHTML = getBrowserHTML('filebrowser_poster','video_poster','image','media');
+
+ html = self.getMediaListHTML('medialist', 'src', 'media', 'media');
+ if (html == "")
+ get("linklistrow").style.display = 'none';
+ else
+ get("linklistcontainer").innerHTML = html;
+
+ if (isVisible('filebrowser'))
+ get('src').style.width = '230px';
+
+ if (isVisible('video_filebrowser_altsource1'))
+ get('video_altsource1').style.width = '220px';
+
+ if (isVisible('video_filebrowser_altsource2'))
+ get('video_altsource2').style.width = '220px';
+
+ if (isVisible('audio_filebrowser_altsource1'))
+ get('audio_altsource1').style.width = '220px';
+
+ if (isVisible('audio_filebrowser_altsource2'))
+ get('audio_altsource2').style.width = '220px';
+
+ if (isVisible('filebrowser_poster'))
+ get('video_poster').style.width = '220px';
+
+ editor.dom.setOuterHTML(get('media_type'), self.getMediaTypeHTML(editor));
+
+ self.setDefaultDialogSettings(editor);
+ self.data = clone(tinyMCEPopup.getWindowArg('data'));
+ self.dataToForm();
+ self.preview();
+
+ updateColor('bgcolor_pick', 'bgcolor');
+ },
+
+ insert : function() {
+ var editor = tinyMCEPopup.editor;
+
+ this.formToData();
+ editor.execCommand('mceRepaint');
+ tinyMCEPopup.restoreSelection();
+ editor.selection.setNode(editor.plugins.media.dataToImg(this.data));
+ tinyMCEPopup.close();
+ },
+
+ preview : function() {
+ get('prev').innerHTML = this.editor.plugins.media.dataToHtml(this.data, true);
+ },
+
+ moveStates : function(to_form, field) {
+ var data = this.data, editor = this.editor,
+ mediaPlugin = editor.plugins.media, ext, src, typeInfo, defaultStates, src;
+
+ defaultStates = {
+ // QuickTime
+ quicktime_autoplay : true,
+ quicktime_controller : true,
+
+ // Flash
+ flash_play : true,
+ flash_loop : true,
+ flash_menu : true,
+
+ // WindowsMedia
+ windowsmedia_autostart : true,
+ windowsmedia_enablecontextmenu : true,
+ windowsmedia_invokeurls : true,
+
+ // RealMedia
+ realmedia_autogotourl : true,
+ realmedia_imagestatus : true
+ };
+
+ function parseQueryParams(str) {
+ var out = {};
+
+ if (str) {
+ tinymce.each(str.split('&'), function(item) {
+ var parts = item.split('=');
+
+ out[unescape(parts[0])] = unescape(parts[1]);
+ });
+ }
+
+ return out;
+ };
+
+ function setOptions(type, names) {
+ var i, name, formItemName, value, list;
+
+ if (type == data.type || type == 'global') {
+ names = tinymce.explode(names);
+ for (i = 0; i < names.length; i++) {
+ name = names[i];
+ formItemName = type == 'global' ? name : type + '_' + name;
+
+ if (type == 'global')
+ list = data;
+ else if (type == 'video' || type == 'audio') {
+ list = data.video.attrs;
+
+ if (!list && !to_form)
+ data.video.attrs = list = {};
+ } else
+ list = data.params;
+
+ if (list) {
+ if (to_form) {
+ setVal(formItemName, list[name], type == 'video' || type == 'audio' ? name : '');
+ } else {
+ delete list[name];
+
+ value = getVal(formItemName);
+ if ((type == 'video' || type == 'audio') && value === true)
+ value = name;
+
+ if (defaultStates[formItemName]) {
+ if (value !== defaultStates[formItemName]) {
+ value = "" + value;
+ list[name] = value;
+ }
+ } else if (value) {
+ value = "" + value;
+ list[name] = value;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ if (!to_form) {
+ data.type = get('media_type').options[get('media_type').selectedIndex].value;
+ data.width = getVal('width');
+ data.height = getVal('height');
+
+ // Switch type based on extension
+ src = getVal('src');
+ if (field == 'src') {
+ ext = src.replace(/^.*\.([^.]+)$/, '$1');
+ if (typeInfo = mediaPlugin.getType(ext))
+ data.type = typeInfo.name.toLowerCase();
+
+ setVal('media_type', data.type);
+ }
+
+ if (data.type == "video" || data.type == "audio") {
+ if (!data.video.sources)
+ data.video.sources = [];
+
+ data.video.sources[0] = {src: getVal('src')};
+ }
+ }
+
+ // Hide all fieldsets and show the one active
+ get('video_options').style.display = 'none';
+ get('audio_options').style.display = 'none';
+ get('flash_options').style.display = 'none';
+ get('quicktime_options').style.display = 'none';
+ get('shockwave_options').style.display = 'none';
+ get('windowsmedia_options').style.display = 'none';
+ get('realmedia_options').style.display = 'none';
+ get('embeddedaudio_options').style.display = 'none';
+
+ if (get(data.type + '_options'))
+ get(data.type + '_options').style.display = 'block';
+
+ setVal('media_type', data.type);
+
+ setOptions('flash', 'play,loop,menu,swliveconnect,quality,scale,salign,wmode,base,flashvars');
+ setOptions('quicktime', 'loop,autoplay,cache,controller,correction,enablejavascript,kioskmode,autohref,playeveryframe,targetcache,scale,starttime,endtime,target,qtsrcchokespeed,volume,qtsrc');
+ setOptions('shockwave', 'sound,progress,autostart,swliveconnect,swvolume,swstretchstyle,swstretchhalign,swstretchvalign');
+ setOptions('windowsmedia', 'autostart,enabled,enablecontextmenu,fullscreen,invokeurls,mute,stretchtofit,windowlessvideo,balance,baseurl,captioningid,currentmarker,currentposition,defaultframe,playcount,rate,uimode,volume');
+ setOptions('realmedia', 'autostart,loop,autogotourl,center,imagestatus,maintainaspect,nojava,prefetch,shuffle,console,controls,numloop,scriptcallbacks');
+ setOptions('video', 'poster,autoplay,loop,muted,preload,controls');
+ setOptions('audio', 'autoplay,loop,preload,controls');
+ setOptions('embeddedaudio', 'autoplay,loop,controls');
+ setOptions('global', 'id,name,vspace,hspace,bgcolor,align,width,height');
+
+ if (to_form) {
+ if (data.type == 'video') {
+ if (data.video.sources[0])
+ setVal('src', data.video.sources[0].src);
+
+ src = data.video.sources[1];
+ if (src)
+ setVal('video_altsource1', src.src);
+
+ src = data.video.sources[2];
+ if (src)
+ setVal('video_altsource2', src.src);
+ } else if (data.type == 'audio') {
+ if (data.video.sources[0])
+ setVal('src', data.video.sources[0].src);
+
+ src = data.video.sources[1];
+ if (src)
+ setVal('audio_altsource1', src.src);
+
+ src = data.video.sources[2];
+ if (src)
+ setVal('audio_altsource2', src.src);
+ } else {
+ // Check flash vars
+ if (data.type == 'flash') {
+ tinymce.each(editor.getParam('flash_video_player_flashvars', {url : '$url', poster : '$poster'}), function(value, name) {
+ if (value == '$url')
+ data.params.src = parseQueryParams(data.params.flashvars)[name] || data.params.src || '';
+ });
+ }
+
+ setVal('src', data.params.src);
+ }
+ } else {
+ src = getVal("src");
+
+ // YouTube *NEW*
+ if (src.match(/youtu.be\/[a-z1-9.-_]+/)) {
+ data.width = 425;
+ data.height = 350;
+ data.params.frameborder = '0';
+ data.type = 'iframe';
+ src = 'http://www.youtube.com/embed/' + src.match(/youtu.be\/([a-z1-9.-_]+)/)[1];
+ setVal('src', src);
+ setVal('media_type', data.type);
+ }
+
+ // YouTube
+ if (src.match(/youtube.com(.+)v=([^&]+)/)) {
+ data.width = 425;
+ data.height = 350;
+ data.params.frameborder = '0';
+ data.type = 'iframe';
+ src = 'http://www.youtube.com/embed/' + src.match(/v=([^&]+)/)[1];
+ setVal('src', src);
+ setVal('media_type', data.type);
+ }
+
+ // Google video
+ if (src.match(/video.google.com(.+)docid=([^&]+)/)) {
+ data.width = 425;
+ data.height = 326;
+ data.type = 'flash';
+ src = 'http://video.google.com/googleplayer.swf?docId=' + src.match(/docid=([^&]+)/)[1] + '&hl=en';
+ setVal('src', src);
+ setVal('media_type', data.type);
+ }
+
+ // Vimeo
+ if (src.match(/vimeo.com\/([0-9]+)/)) {
+ data.width = 425;
+ data.height = 350;
+ data.params.frameborder = '0';
+ data.type = 'iframe';
+ src = 'http://player.vimeo.com/video/' + src.match(/vimeo.com\/([0-9]+)/)[1];
+ setVal('src', src);
+ setVal('media_type', data.type);
+ }
+
+ // stream.cz
+ if (src.match(/stream.cz\/((?!object).)*\/([0-9]+)/)) {
+ data.width = 425;
+ data.height = 350;
+ data.params.frameborder = '0';
+ data.type = 'iframe';
+ src = 'http://www.stream.cz/object/' + src.match(/stream.cz\/[^/]+\/([0-9]+)/)[1];
+ setVal('src', src);
+ setVal('media_type', data.type);
+ }
+
+ // Google maps
+ if (src.match(/maps.google.([a-z]{2,3})\/maps\/(.+)msid=(.+)/)) {
+ data.width = 425;
+ data.height = 350;
+ data.params.frameborder = '0';
+ data.type = 'iframe';
+ src = 'http://maps.google.com/maps/ms?msid=' + src.match(/msid=(.+)/)[1] + "&output=embed";
+ setVal('src', src);
+ setVal('media_type', data.type);
+ }
+
+ if (data.type == 'video') {
+ if (!data.video.sources)
+ data.video.sources = [];
+
+ data.video.sources[0] = {src : src};
+
+ src = getVal("video_altsource1");
+ if (src)
+ data.video.sources[1] = {src : src};
+
+ src = getVal("video_altsource2");
+ if (src)
+ data.video.sources[2] = {src : src};
+ } else if (data.type == 'audio') {
+ if (!data.video.sources)
+ data.video.sources = [];
+
+ data.video.sources[0] = {src : src};
+
+ src = getVal("audio_altsource1");
+ if (src)
+ data.video.sources[1] = {src : src};
+
+ src = getVal("audio_altsource2");
+ if (src)
+ data.video.sources[2] = {src : src};
+ } else
+ data.params.src = src;
+
+ // Set default size
+ setVal('width', data.width || (data.type == 'audio' ? 300 : 320));
+ setVal('height', data.height || (data.type == 'audio' ? 32 : 240));
+ }
+ },
+
+ dataToForm : function() {
+ this.moveStates(true);
+ },
+
+ formToData : function(field) {
+ if (field == "width" || field == "height")
+ this.changeSize(field);
+
+ if (field == 'source') {
+ this.moveStates(false, field);
+ setVal('source', this.editor.plugins.media.dataToHtml(this.data));
+ this.panel = 'source';
+ } else {
+ if (this.panel == 'source') {
+ this.data = clone(this.editor.plugins.media.htmlToData(getVal('source')));
+ this.dataToForm();
+ this.panel = '';
+ }
+
+ this.moveStates(false, field);
+ this.preview();
+ }
+ },
+
+ beforeResize : function() {
+ this.width = parseInt(getVal('width') || (this.data.type == 'audio' ? "300" : "320"), 10);
+ this.height = parseInt(getVal('height') || (this.data.type == 'audio' ? "32" : "240"), 10);
+ },
+
+ changeSize : function(type) {
+ var width, height, scale, size;
+
+ if (get('constrain').checked) {
+ width = parseInt(getVal('width') || (this.data.type == 'audio' ? "300" : "320"), 10);
+ height = parseInt(getVal('height') || (this.data.type == 'audio' ? "32" : "240"), 10);
+
+ if (type == 'width') {
+ this.height = Math.round((width / this.width) * height);
+ setVal('height', this.height);
+ } else {
+ this.width = Math.round((height / this.height) * width);
+ setVal('width', this.width);
+ }
+ }
+ },
+
+ getMediaListHTML : function() {
+ if (typeof(tinyMCEMediaList) != "undefined" && tinyMCEMediaList.length > 0) {
+ var html = "";
+
+ html += '<select id="linklist" name="linklist" style="width: 250px" onchange="this.form.src.value=this.options[this.selectedIndex].value;Media.formToData(\'src\');">';
+ html += '<option value="">---</option>';
+
+ for (var i=0; i<tinyMCEMediaList.length; i++)
+ html += '<option value="' + tinyMCEMediaList[i][1] + '">' + tinyMCEMediaList[i][0] + '</option>';
+
+ html += '</select>';
+
+ return html;
+ }
+
+ return "";
+ },
+
+ getMediaTypeHTML : function(editor) {
+ function option(media_type, element) {
+ if (!editor.schema.getElementRule(element || media_type)) {
+ return '';
+ }
+
+ return '<option value="'+media_type+'">'+tinyMCEPopup.editor.translate("media_dlg."+media_type)+'</option>'
+ }
+
+ var html = "";
+
+ html += '<select id="media_type" name="media_type" onchange="Media.formToData(\'type\');">';
+ html += option("video");
+ html += option("audio");
+ html += option("flash", "object");
+ html += option("quicktime", "object");
+ html += option("shockwave", "object");
+ html += option("windowsmedia", "object");
+ html += option("realmedia", "object");
+ html += option("iframe");
+
+ if (editor.getParam('media_embedded_audio', false)) {
+ html += option('embeddedaudio', "object");
+ }
+
+ html += '</select>';
+ return html;
+ },
+
+ setDefaultDialogSettings : function(editor) {
+ var defaultDialogSettings = editor.getParam("media_dialog_defaults", {});
+ tinymce.each(defaultDialogSettings, function(v, k) {
+ setVal(k, v);
+ });
+ }
+ };
+
+ tinyMCEPopup.requireLangPack();
+ tinyMCEPopup.onInit.add(function() {
+ Media.init();
+ });
+})();
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/langs/de_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/langs/de_dlg.js
new file mode 100644
index 00000000..e64e083f
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/langs/de_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('de.media_dlg',{list:"Liste",file:"Datei/URL",advanced:"Erweitert",general:"Allgemein",title:"Multimedia-Inhalte einf\u00fcgen/bearbeiten","align_top_left":"Oben Links","align_center":"Zentriert","align_left":"Links","align_bottom":"Unten","align_right":"Rechts","align_top":"Oben","qt_stream_warn":"In den Erweiterten Einstellungen sollten im Feld \'QT Src\' gestreamte RTSP Resourcen hinzugef\u00fcgt werden.\nZus\u00e4tzlich sollte dort auch eine nicht-gestreamte Resource angegeben werden.",qtsrc:"Angabe zu QT Src",progress:"Fortschritt",sound:"Ton",swstretchvalign:"Stretch V-Ausrichtung",swstretchhalign:"Stretch H-Ausrichtung",swstretchstyle:"Stretch-Art",scriptcallbacks:"Script callbacks","align_top_right":"Oben Rechts",uimode:"UI Modus",rate:"Rate",playcount:"Z\u00e4hler",defaultframe:"Frame-Voreinstellung",currentposition:"Aktuelle Position",currentmarker:"Aktueller Marker",captioningid:"Captioning id",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Fensterloses Video",stretchtofit:"Anzeigefl\u00e4che an verf\u00fcgbaren Platz anpassen",mute:"Stumm",invokeurls:"Invoke URLs",fullscreen:"Vollbild",enabled:"Aktiviert",autostart:"Autostart",volume:"Lautst\u00e4rke",target:"Ziel",qtsrcchokespeed:"Choke speed",href:"Href",endtime:"Endzeitpunkt",starttime:"Startzeitpunkt",enablejavascript:"JavaScript aktivieren",correction:"Ohne Korrektur",targetcache:"Ziel zwischenspeichern",playeveryframe:"Jeden Frame abspielen",kioskmode:"Kioskmodus",controller:"Controller",menu:"Men\u00fc anzeigen",loop:"Wiederholung",play:"Automatisches Abspielen",hspace:"Horizontaler Abstand",vspace:"Vertikaler Abstand","class_name":"CSS-Klasse",name:"Name",id:"Id",type:"Typ",size:"Abmessungen",preview:"Vorschau","constrain_proportions":"Proportionen erhalten",controls:"Steuerung",numloop:"Anzahl Wiederholungen",console:"Konsole",cache:"Zwischenspeicher",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvariablen",base:"Base",bgcolor:"Hintergrund",wmode:"WMode",salign:"S-Ausrichtung",align:"Ausrichtung",scale:"Skalierung",quality:"Qualit\u00e4t",shuffle:"Zuf\u00e4llige Wiedergabe",prefetch:"Prefetch",nojava:"Kein Java",maintainaspect:"Bildverh\u00e4ltnis beibehalten",imagestatus:"Bildstatus",center:"Zentriert",autogotourl:"Auto goto URL","shockwave_options":"Shockwave-Optionen","rmp_options":"Optionen f\u00fcr Real Media Player","wmp_options":"Optionen f\u00fcr Windows Media Player","qt_options":"Quicktime-Optionen","flash_options":"Flash-Optionen",hidden:"Versteckt","align_bottom_left":"Unten Links","align_bottom_right":"Unten Rechts",flash:"Flash",quicktime:"QuickTime","embedded_audio_options":"Integrierte Audio Optionen",windowsmedia:"WindowsMedia",realmedia:"RealMedia",shockwave:"ShockWave",audio:"Audio",video:"Video","html5_video_options":"HTML5 Video Optionen",altsource1:"Alternative Quelle 1",altsource2:"Alternative Quelle 2",preload:"Preload",poster:"Poster",source:"Quelle","html5_audio_options":"Audio Optionen","preload_none":"Nicht vorladen","preload_metadata":"Video Metadaten vorladen","preload_auto":"Benutzer Browser entscheidet automatisch",iframe:"iFrame",embeddedaudio:"Audio (eingebunden)"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/langs/en_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/langs/en_dlg.js
new file mode 100644
index 00000000..b247f85c
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/langs/en_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('en.media_dlg',{list:"List",file:"File/URL",advanced:"Advanced",general:"General",title:"Insert/Edit Embedded Media","align_top_left":"Top Left","align_center":"Center","align_left":"Left","align_bottom":"Bottom","align_right":"Right","align_top":"Top","qt_stream_warn":"Streamed RTSP resources should be added to the QT Source field under the Advanced tab.\nYou should also add a non-streamed version to the Source field.",qtsrc:"QT Source",progress:"Progress",sound:"Sound",swstretchvalign:"Stretch V-Align",swstretchhalign:"Stretch H-Align",swstretchstyle:"Stretch Style",scriptcallbacks:"Script Callbacks","align_top_right":"Top Right",uimode:"UI Mode",rate:"Rate",playcount:"Play Count",defaultframe:"Default Frame",currentposition:"Current Position",currentmarker:"Current Marker",captioningid:"Captioning ID",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Windowless Video",stretchtofit:"Stretch to Fit",mute:"Mute",invokeurls:"Invoke URLs",fullscreen:"Full Screen",enabled:"Enabled",autostart:"Auto Start",volume:"Volume",target:"Target",qtsrcchokespeed:"Choke Speed",href:"HREF",endtime:"End Time",starttime:"Start Time",enablejavascript:"Enable JavaScript",correction:"No Correction",targetcache:"Target Cache",playeveryframe:"Play Every Frame",kioskmode:"Kiosk Mode",controller:"Controller",menu:"Show Menu",loop:"Loop",play:"Auto Play",hspace:"H-Space",vspace:"V-Space","class_name":"Class",name:"Name",id:"ID",type:"Type",size:"Dimensions",preview:"Preview","constrain_proportions":"Constrain Proportions",controls:"Controls",numloop:"Num Loops",console:"Console",cache:"Cache",autohref:"Auto HREF",liveconnect:"SWLiveConnect",flashvars:"Flash Vars",base:"Base",bgcolor:"Background",wmode:"WMode",salign:"SAlign",align:"Align",scale:"Scale",quality:"Quality",shuffle:"Shuffle",prefetch:"Prefetch",nojava:"No Java",maintainaspect:"Maintain Aspect",imagestatus:"Image Status",center:"Center",autogotourl:"Auto Goto URL","shockwave_options":"Shockwave Options","rmp_options":"Real Media Player Options","wmp_options":"Windows Media Player Options","qt_options":"QuickTime Options","flash_options":"Flash Options",hidden:"Hidden","align_bottom_left":"Bottom Left","align_bottom_right":"Bottom Right",flash:"",quicktime:"","embedded_audio_options":"Embedded Audio Options",windowsmedia:"",realmedia:"",shockwave:"",audio:"",video:"","html5_video_options":"HTML5 Video Options",altsource1:"Alternative source 1",altsource2:"Alternative source 2",preload:"Preload",poster:"Poster",source:"Source","html5_audio_options":"Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide",iframe:"",embeddedaudio:""}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/langs/hu_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/langs/hu_dlg.js
new file mode 100644
index 00000000..b42e07a1
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/langs/hu_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('hu.media_dlg',{list:"Lista",file:"F\u00e1jl/URL",advanced:"Halad\u00f3",general:"\u00c1ltal\u00e1nos",title:"Be\u00e1gyazott m\u00e9dia besz\u00far\u00e1sa/szerkeszt\u00e9se","align_top_left":"Bal-fent","align_center":"K\u00f6z\u00e9pen","align_left":"Balra","align_bottom":"Lent","align_right":"Jobbra","align_top":"Fent","qt_stream_warn":"Streamelt rtsp forr\u00e1sok a QT Src mez\u0151be val\u00f3k a halad\u00f3 lapon.\nHozz\u00e1 kellene adnia egy nem streamelt verzi\u00f3t a Src mez\u0151ben.",qtsrc:"QT Src",progress:"Folyamat",sound:"Hang",swstretchvalign:"Ny\u00fajt\u00e1s F-igaz\u00edt\u00e1s",swstretchhalign:"Ny\u00fajt\u00e1s V-igaz\u00edt\u00e1s",swstretchstyle:"Ny\u00fajt\u00e1s st\u00edlusa",scriptcallbacks:"Script callbacks","align_top_right":"Jobbra fent",uimode:"UI M\u00f3d",rate:"\u00c9rt\u00e9kel\u00e9s",playcount:"Lej\u00e1tsz\u00e1ssz\u00e1m",defaultframe:"Alap\u00e9rtelmezett frame",currentposition:"Aktu\u00e1lis poz\u00edci\u00f3",currentmarker:"Aktu\u00e1lis marker",captioningid:"Captioning id",baseurl:"Alap URL",balance:"Balance",windowlessvideo:"Ablak n\u00e9lk\u00fcli vide\u00f3",stretchtofit:"Ny\u00fajtva igaz\u00edt\u00e1s",mute:"N\u00e9ma",invokeurls:"URL-ek bevon\u00e1sa",fullscreen:"Teljes k\u00e9perny\u0151",enabled:"Enged\u00e9lyezve",autostart:"Automatikus kezd\u00e9s",volume:"Hanger\u0151",target:"C\u00e9l",qtsrcchokespeed:"Folyt\u00e1s sebess\u00e9ge",href:"Href",endtime:"Z\u00e1r\u00f3 id\u0151",starttime:"Kezd\u00e9si id\u0151",enablejavascript:"JavaScript enged\u00e9se",correction:"Nincs jav\u00edt\u00e1s",targetcache:"C\u00e9l cache",playeveryframe:"Minden kocka lej\u00e1tsz\u00e1sa",kioskmode:"Kiosk m\u00f3d",controller:"Vez\u00e9rl\u0151",menu:"Men\u00fc mutat\u00e1sa",loop:"Ism\u00e9tl\u00e9s",play:"Automatikus lej\u00e1tsz\u00e1s",hspace:"V\u00edzszintes-t\u00e1v",vspace:"F\u00fcgg\u0151leges-t\u00e1v","class_name":"Oszt\u00e1ly",name:"N\u00e9v",id:"ID",type:"T\u00edpus",size:"M\u00e9retek",preview:"El\u0151n\u00e9zet","constrain_proportions":"Ar\u00e1nytart\u00e1s",controls:"Kezel\u0151k",numloop:"Ism\u00e9tl\u00e9ssz\u00e1m",console:"Konzol",cache:"Cache",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flashvars",base:"Base",bgcolor:"H\u00e1tt\u00e9r",wmode:"WM\u00f3d",salign:"SElrendez\u00e9s",align:"Elrendez\u00e9s",scale:"Nagy\u00edt\u00e1s",quality:"Min\u0151s\u00e9g",shuffle:"V\u00e9letlenszer\u0171",prefetch:"El\u0151t\u00f6lt\u00e9s",nojava:"Nincs Java",maintainaspect:"Ar\u00e1nytart\u00e1s",imagestatus:"K\u00e9p \u00e1llapot",center:"K\u00f6z\u00e9pre",autogotourl:"Automatikus URL-re ugr\u00e1s","shockwave_options":"Shockwave be\u00e1ll\u00edt\u00e1sai","rmp_options":"Real Media Player be\u00e1ll\u00edt\u00e1sai","wmp_options":"Windows Media Player be\u00e1ll\u00edt\u00e1sai","qt_options":"Quicktime be\u00e1ll\u00edt\u00e1sai","flash_options":"Flash be\u00e1ll\u00edt\u00e1sai",hidden:"Rejtett","align_bottom_left":"Bal-lent","align_bottom_right":"Bal-jobbra",flash:"flash",quicktime:"quicktime","embedded_audio_options":"Be\u00e1gyazott hang be\u00e1ll\u00edt\u00e1sok",windowsmedia:"windows m\u00e9dia",realmedia:"realmedia",shockwave:"shockwave",audio:"hang",video:"vide\u00f3","html5_video_options":"HTML5 Vide\u00f3 Be\u00e1ll\u00edt\u00e1sok",altsource1:"Alternat\u00edv forr\u00e1s 1",altsource2:"Alternat\u00edv forr\u00e1s 2",preload:"El\u0151t\u00f6lt\u00e9s",poster:"Hozz\u00e1ad\u00f3",source:"Forr\u00e1s","html5_audio_options":"Audi\u00f3 Be\u00e1ll\u00edt\u00e1sok","preload_none":"Nincs el\u0151reolvas\u00e1s","preload_metadata":"Vide\u00f3 metaadatok el\u0151reolvas\u00e1sa","preload_auto":"Hagyjuk a felhaszn\u00e1l\u00f3 b\u00f6ng\u00e9sz\u0151j\u00e9nek eld\u00f6nteni",iframe:"iframe (keret)",embeddedaudio:"be\u00e1gyazott hang"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/langs/ja_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/langs/ja_dlg.js
new file mode 100644
index 00000000..9752ca22
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/langs/ja_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('ja.media_dlg',{list:"\u4e00\u89a7",file:"\u30d5\u30a1\u30a4\u30eb\u3084URL",advanced:"\u8a73\u7d30",general:"\u4e00\u822c",title:"\u57cb\u3081\u8fbc\u307f\u30e1\u30c7\u30a3\u30a2\u306e\u633f\u5165\u3084\u7de8\u96c6","align_top_left":"\u5de6\u4e0a","align_center":"\u4e2d\u592e","align_left":"\u5de6","align_bottom":"\u4e0b","align_right":"\u53f3","align_top":"\u4e0a","qt_stream_warn":"RTSP\u30b9\u30c8\u30ea\u30fc\u30df\u30f3\u30b0\u30ea\u30bd\u30fc\u30b9\u3092\u300c\u9ad8\u5ea6\u300d\u306e\u30bf\u30d6\u306e\u300cQT\u306e\u30bd\u30fc\u30b9\u300d\u6b04\u306b\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n\u307e\u305f\u3001\u300c\u30bd\u30fc\u30b9\u300d\u6b04\u306b\u306f\u30b9\u30c8\u30ea\u30fc\u30df\u30f3\u30b0\u3067\u306f\u306a\u3044\u30d0\u30fc\u30b8\u30e7\u30fc\u30f3\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002",qtsrc:"QT\u306e\u30bd\u30fc\u30b9",progress:"\u9032\u5c55",sound:"\u30b5\u30a6\u30f3\u30c9",swstretchvalign:"\u5782\u76f4\u306e\u914d\u7f6e",swstretchhalign:"\u6c34\u5e73\u306e\u914d\u7f6e",swstretchstyle:"\u4f38\u7e2e\u306e\u30b9\u30bf\u30a4\u30eb",scriptcallbacks:"\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u30b3\u30fc\u30eb\u30d0\u30c3\u30af","align_top_right":"\u53f3\u4e0a",uimode:"UI\u3092\u8868\u793a\u3059\u308b\u30e2\u30fc\u30c9",rate:"\u518d\u751f\u30ec\u30fc\u30c8",playcount:"\u518d\u751f\u56de\u6570",defaultframe:"\u521d\u671f\u72b6\u614b\u306e\u30d5\u30ec\u30fc\u30e0",currentposition:"\u518d\u751f\u4f4d\u7f6e(\u79d2\u5358\u4f4d)",currentmarker:"\u30de\u30fc\u30ab\u30fc\u756a\u53f7",captioningid:"\u30ad\u30e3\u30d7\u30b7\u30e7\u30f3\u8868\u793a\u8981\u7d20ID",baseurl:"\u57fa\u6e96\u306eURL",balance:"\u30b9\u30c6\u30ec\u30aa\u306e\u30d0\u30e9\u30f3\u30b9",windowlessvideo:"\u30a6\u30a3\u30f3\u30c9\u30a6\u306a\u3057\u306e\u52d5\u753b",stretchtofit:"\u5408\u308f\u305b\u3066\u62e1\u5927",mute:"\u6d88\u97f3",invokeurls:"URL\u3092\u958b\u304f",fullscreen:"\u5168\u753b\u9762",enabled:"\u6709\u52b9",autostart:"\u81ea\u52d5\u518d\u751f",volume:"\u97f3\u91cf",target:"\u30bf\u30fc\u30b2\u30c3\u30c8",qtsrcchokespeed:"\u518d\u751f\u30c7\u30fc\u30bf\u30ec\u30fc\u30c8",href:"\u30ea\u30f3\u30af\u5148URL",endtime:"\u7d42\u4e86\u6642\u9593",starttime:"\u958b\u59cb\u6642\u9593",enablejavascript:"JavaScript\u3092\u6709\u52b9",correction:"\u8a02\u6b63\u306a\u3057",targetcache:"\u30bf\u30fc\u30b2\u30c3\u30c8\u3092\u30ad\u30e3\u30c3\u30b7\u30e5",playeveryframe:"\u3059\u3079\u3066\u306e\u30d5\u30ec\u30fc\u30e0\u3092\u518d\u751f",kioskmode:"Kiosk\u30e2\u30fc\u30c9",controller:"\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u306e\u8868\u793a",menu:"\u30e1\u30cb\u30e5\u30fc\u3092\u8868\u793a",loop:"\u7e70\u308a\u8fd4\u3057",play:"\u81ea\u52d5\u518d\u751f",hspace:"\u5de6\u53f3\u306e\u4f59\u767d",vspace:"\u4e0a\u4e0b\u306e\u4f59\u767d","class_name":"\u30af\u30e9\u30b9",name:"\u540d\u524d",id:"ID",type:"\u30bf\u30a4\u30d7",size:"\u5bf8\u6cd5",preview:"\u30d7\u30ec\u30d3\u30e5\u30fc","constrain_proportions":"\u7e26\u6a2a\u6bd4\u3092\u7dad\u6301",controls:"\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u306e\u8868\u793a",numloop:"\u7e70\u308a\u8fd4\u3057\u306e\u56de\u6570",console:"\u30b3\u30f3\u30bd\u30fc\u30eb",cache:"\u30ad\u30e3\u30c3\u30b7\u30e5",autohref:"\u81ea\u52d5\u8aad\u8fbc",liveconnect:"SWLiveConnect\u5c5e\u6027",flashvars:"Flash Vars",base:"Base",bgcolor:"\u80cc\u666f\u8272",wmode:"WMode",salign:"SAlign",align:"\u914d\u7f6e",scale:"\u4f38\u7e2e",quality:"\u54c1\u8cea",shuffle:"\u30b7\u30e3\u30c3\u30d5\u30eb",prefetch:"\u5148\u8aad\u307f",nojava:"Java\u3092\u7981\u6b62",maintainaspect:"\u7e26\u6a2a\u6bd4\u306e\u7dad\u6301",imagestatus:"\u753b\u50cf\u306e\u72b6\u614b",center:"\u4e2d\u592e\u63c3\u3048",autogotourl:"URL\u306b\u81ea\u52d5\u79fb\u52d5","shockwave_options":"Shockwave\u306e\u30aa\u30d7\u30b7\u30e7\u30f3","rmp_options":"Real media player\u306e\u30aa\u30d7\u30b7\u30e7\u30f3","wmp_options":"Windows media player\u306e\u30aa\u30d7\u30b7\u30e7\u30f3","qt_options":"Quicktime\u306e\u30aa\u30d7\u30b7\u30e7\u30f3","flash_options":"Flash\u306e\u30aa\u30d7\u30b7\u30e7\u30f3",hidden:"\u975e\u8868\u793a","align_bottom_left":"\u5de6\u4e0b","align_bottom_right":"\u53f3\u4e0b",flash:"flash",quicktime:"quicktime","embedded_audio_options":"\u57cb\u3081\u8fbc\u307fAudio\u306e\u30aa\u30d7\u30b7\u30e7\u30f3",windowsmedia:"Windows\u30e1\u30c7\u30a3\u30a2",realmedia:"realmedia",shockwave:"shockwave",audio:"\u30aa\u30fc\u30c7\u30a3\u30aa",video:"\u52d5\u753b","html5_video_options":"HTML5 Video\u306e\u30aa\u30d7\u30b7\u30e7\u30f3",altsource1:"\u4ee3\u66ff\u30bd\u30fc\u30b91",altsource2:"\u4ee3\u66ff\u30bd\u30fc\u30b92",preload:"preload\u5c5e\u6027",poster:"poster\u5c5e\u6027",source:"HTML","html5_audio_options":"Audio \u30aa\u30d7\u30b7\u30e7\u30f3","preload_none":"\u5148\u8aad\u307f\u3057\u306a\u3044","preload_metadata":"\u52d5\u753b\u306e\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u5148\u8aad\u307f","preload_auto":"\u30e6\u30fc\u30b6\u30fc\u306e\u30d6\u30e9\u30a6\u30b6\u30fc\u306b\u5f93\u3046",iframe:"iframe",embeddedaudio:"\u57cb\u3081\u8fbc\u307f\u97f3\u58f0"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/media.htm b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/media.htm
new file mode 100755
index 00000000..957d83a6
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/media.htm
@@ -0,0 +1,922 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>{#media_dlg.title}</title>
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script type="text/javascript" src="js/media.js"></script>
+ <script type="text/javascript" src="../../utils/mctabs.js"></script>
+ <script type="text/javascript" src="../../utils/validate.js"></script>
+ <script type="text/javascript" src="../../utils/form_utils.js"></script>
+ <script type="text/javascript" src="../../utils/editable_selects.js"></script>
+ <link href="css/media.css" rel="stylesheet" type="text/css" />
+</head>
+<body style="display: none" role="application">
+<form onsubmit="Media.insert();return false;" action="#">
+ <div class="tabs" role="presentation">
+ <ul>
+ <li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');Media.formToData();" onmousedown="return false;">{#media_dlg.general}</a></span></li>
+ <li id="advanced_tab" aria-controls="advanced_panel"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');Media.formToData();" onmousedown="return false;">{#media_dlg.advanced}</a></span></li>
+ <li id="source_tab" aria-controls="source_panel"><span><a href="javascript:mcTabs.displayTab('source_tab','source_panel');Media.formToData('source');" onmousedown="return false;">{#media_dlg.source}</a></span></li>
+ </ul>
+ </div>
+
+ <div class="panel_wrapper">
+ <div id="general_panel" class="panel current">
+ <fieldset>
+ <legend>{#media_dlg.general}</legend>
+
+ <table role="presentation" border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td><label for="media_type">{#media_dlg.type}</label></td>
+ <td>
+ <select id="media_type"></select>
+ </td>
+ </tr>
+ <tr>
+ <td><label for="src">{#media_dlg.file}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input id="src" name="src" type="text" value="" class="mceFocus" onchange="Media.formToData();" /></td>
+ <td id="filebrowsercontainer">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr id="linklistrow">
+ <td><label for="linklist">{#media_dlg.list}</label></td>
+ <td id="linklistcontainer"><select id="linklist"><option value=""></option></select></td>
+ </tr>
+ <tr>
+ <td><label for="width">{#media_dlg.size}</label></td>
+ <td>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="text" id="width" name="width" value="" class="size" onchange="Media.formToData('width');" onfocus="Media.beforeResize();" /> x <input type="text" id="height" name="height" value="" class="size" onfocus="Media.beforeResize();" onchange="Media.formToData('height');" /></td>
+ <td>&nbsp;&nbsp;<input id="constrain" type="checkbox" name="constrain" class="checkbox" checked="checked" /></td>
+ <td><label id="constrainlabel" for="constrain">{#media_dlg.constrain_proportions}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+
+ <fieldset>
+ <legend>{#media_dlg.preview}</legend>
+ <div id="prev"></div>
+ </fieldset>
+ </div>
+
+ <div id="advanced_panel" class="panel">
+ <fieldset>
+ <legend>{#media_dlg.advanced}</legend>
+
+ <table role="presentation" border="0" cellpadding="4" cellspacing="0" width="100%">
+ <tr>
+ <td><label for="id">{#media_dlg.id}</label></td>
+ <td><input type="text" id="id" name="id" onchange="Media.formToData();" /></td>
+ <td><label for="name">{#media_dlg.name}</label></td>
+ <td><input type="text" id="name" name="name" onchange="Media.formToData();" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="align">{#media_dlg.align}</label></td>
+ <td>
+ <select id="align" name="align" onchange="Media.formToData();">
+ <option value="">{#not_set}</option>
+ <option value="top">{#media_dlg.align_top}</option>
+ <option value="right">{#media_dlg.align_right}</option>
+ <option value="bottom">{#media_dlg.align_bottom}</option>
+ <option value="left">{#media_dlg.align_left}</option>
+ </select>
+ </td>
+
+ <td><label for="bgcolor">{#media_dlg.bgcolor}</label></td>
+ <td>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');Media.formToData();" /></td>
+ <td id="bgcolor_pickcontainer">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td><label for="vspace">{#media_dlg.vspace}</label></td>
+ <td><input type="text" id="vspace" name="vspace" class="number" onchange="Media.formToData();" /></td>
+ <td><label for="hspace">{#media_dlg.hspace}</label></td>
+ <td><input type="text" id="hspace" name="hspace" class="number" onchange="Media.formToData();" /></td>
+ </tr>
+ </table>
+ </fieldset>
+
+ <fieldset id="video_options">
+ <legend>{#media_dlg.html5_video_options}</legend>
+
+ <table role="presentation">
+ <tr>
+ <td><label for="video_altsource1">{#media_dlg.altsource1}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="video_altsource1" name="video_altsource1" onchange="Media.formToData();" style="width: 240px" /></td>
+ <td id="video_altsource1_filebrowser">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td><label for="video_altsource2">{#media_dlg.altsource2}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="video_altsource2" name="video_altsource2" onchange="Media.formToData();" style="width: 240px" /></td>
+ <td id="video_altsource2_filebrowser">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td><label for="video_poster">{#media_dlg.poster}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="video_poster" name="video_poster" onchange="Media.formToData();" style="width: 240px" /></td>
+ <td id="video_poster_filebrowser">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td><label for="video_preload">{#media_dlg.preload}</label></td>
+ <td>
+ <select id="video_preload" name="video_preload" onchange="Media.formToData();">
+ <option value="none">{#media_dlg.preload_none}</option>
+ <option value="metadata">{#media_dlg.preload_metadata}</option>
+ <option value="auto">{#media_dlg.preload_auto}</option>
+ </select>
+ </td>
+ </tr>
+ </table>
+
+ <table role="presentation" border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="video_autoplay" name="video_autoplay" onchange="Media.formToData();" /></td>
+ <td><label for="video_autoplay">{#media_dlg.play}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="video_muted" name="video_muted" onchange="Media.formToData();" /></td>
+ <td><label for="video_muted">{#media_dlg.mute}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="video_loop" name="video_loop" onchange="Media.formToData();" /></td>
+ <td><label for="video_loop">{#media_dlg.loop}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="video_controls" name="video_controls" onchange="Media.formToData();" /></td>
+ <td><label for="video_controls">{#media_dlg.controls}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+
+ <fieldset id="embeddedaudio_options">
+ <legend>{#media_dlg.embedded_audio_options}</legend>
+
+ <table role="presentation" border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="embeddedaudio_autoplay" name="audio_autoplay" onchange="Media.formToData();" /></td>
+ <td><label for="audio_autoplay">{#media_dlg.play}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="embeddedaudio_loop" name="audio_loop" onchange="Media.formToData();" /></td>
+ <td><label for="audio_loop">{#media_dlg.loop}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="embeddedaudio_controls" name="audio_controls" onchange="Media.formToData();" /></td>
+ <td><label for="audio_controls">{#media_dlg.controls}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+
+ <fieldset id="audio_options">
+ <legend>{#media_dlg.html5_audio_options}</legend>
+
+ <table role="presentation">
+ <tr>
+ <td><label for="audio_altsource1">{#media_dlg.altsource1}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="audio_altsource1" name="audio_altsource1" onchange="Media.formToData();" style="width: 240px" /></td>
+ <td id="audio_altsource1_filebrowser">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td><label for="audio_altsource2">{#media_dlg.altsource2}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="audio_altsource2" name="audio_altsource2" onchange="Media.formToData();" style="width: 240px" /></td>
+ <td id="audio_altsource2_filebrowser">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td><label for="audio_preload">{#media_dlg.preload}</label></td>
+ <td>
+ <select id="audio_preload" name="audio_preload" onchange="Media.formToData();">
+ <option value="none">{#media_dlg.preload_none}</option>
+ <option value="metadata">{#media_dlg.preload_metadata}</option>
+ <option value="auto">{#media_dlg.preload_auto}</option>
+ </select>
+ </td>
+ </tr>
+ </table>
+
+ <table role="presentation" border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="audio_autoplay" name="audio_autoplay" onchange="Media.formToData();" /></td>
+ <td><label for="audio_autoplay">{#media_dlg.play}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="audio_loop" name="audio_loop" onchange="Media.formToData();" /></td>
+ <td><label for="audio_loop">{#media_dlg.loop}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="audio_controls" name="audio_controls" onchange="Media.formToData();" /></td>
+ <td><label for="audio_controls">{#media_dlg.controls}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+
+ <fieldset id="flash_options">
+ <legend>{#media_dlg.flash_options}</legend>
+
+ <table role="presentation" border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td><label for="flash_quality">{#media_dlg.quality}</label></td>
+ <td>
+ <select id="flash_quality" name="flash_quality" onchange="Media.formToData();">
+ <option value="">{#not_set}</option>
+ <option value="high">high</option>
+ <option value="low">low</option>
+ <option value="autolow">autolow</option>
+ <option value="autohigh">autohigh</option>
+ <option value="best">best</option>
+ </select>
+ </td>
+
+ <td><label for="flash_scale">{#media_dlg.scale}</label></td>
+ <td>
+ <select id="flash_scale" name="flash_scale" onchange="Media.formToData();">
+ <option value="">{#not_set}</option>
+ <option value="showall">showall</option>
+ <option value="noborder">noborder</option>
+ <option value="exactfit">exactfit</option>
+ <option value="noscale">noscale</option>
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <td><label for="flash_wmode">{#media_dlg.wmode}</label></td>
+ <td>
+ <select id="flash_wmode" name="flash_wmode" onchange="Media.formToData();">
+ <option value="">{#not_set}</option>
+ <option value="window">window</option>
+ <option value="opaque">opaque</option>
+ <option value="transparent">transparent</option>
+ </select>
+ </td>
+
+ <td><label for="flash_salign">{#media_dlg.salign}</label></td>
+ <td>
+ <select id="flash_salign" name="flash_salign" onchange="Media.formToData();">
+ <option value="">{#not_set}</option>
+ <option value="l">{#media_dlg.align_left}</option>
+ <option value="t">{#media_dlg.align_top}</option>
+ <option value="r">{#media_dlg.align_right}</option>
+ <option value="b">{#media_dlg.align_bottom}</option>
+ <option value="tl">{#media_dlg.align_top_left}</option>
+ <option value="tr">{#media_dlg.align_top_right}</option>
+ <option value="bl">{#media_dlg.align_bottom_left}</option>
+ <option value="br">{#media_dlg.align_bottom_right}</option>
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="flash_play" name="flash_play" checked="checked" onchange="Media.formToData();" /></td>
+ <td><label for="flash_play">{#media_dlg.play}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="flash_loop" name="flash_loop" checked="checked" onchange="Media.formToData();" /></td>
+ <td><label for="flash_loop">{#media_dlg.loop}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="flash_menu" name="flash_menu" checked="checked" onchange="Media.formToData();" /></td>
+ <td><label for="flash_menu">{#media_dlg.menu}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="flash_swliveconnect" name="flash_swliveconnect" onchange="Media.formToData();" /></td>
+ <td><label for="flash_swliveconnect">{#media_dlg.liveconnect}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+
+ <table role="presentation">
+ <tr>
+ <td><label for="flash_base">{#media_dlg.base}</label></td>
+ <td><input type="text" id="flash_base" name="flash_base" onchange="Media.formToData();" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="flash_flashvars">{#media_dlg.flashvars}</label></td>
+ <td><input type="text" id="flash_flashvars" name="flash_flashvars" onchange="Media.formToData();" /></td>
+ </tr>
+ </table>
+ </fieldset>
+
+ <fieldset id="quicktime_options">
+ <legend>{#media_dlg.qt_options}</legend>
+
+ <table role="presentation" border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="quicktime_loop" name="quicktime_loop" onchange="Media.formToData();" /></td>
+ <td><label for="quicktime_loop">{#media_dlg.loop}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="quicktime_autoplay" name="quicktime_autoplay" checked="checked" onchange="Media.formToData();" /></td>
+ <td><label for="quicktime_autoplay">{#media_dlg.play}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="quicktime_cache" name="quicktime_cache" onchange="Media.formToData();" /></td>
+ <td><label for="quicktime_cache">{#media_dlg.cache}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="quicktime_controller" name="quicktime_controller" checked="checked" onchange="Media.formToData();" /></td>
+ <td><label for="quicktime_controller">{#media_dlg.controller}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="quicktime_correction" name="quicktime_correction" onchange="Media.formToData();" /></td>
+ <td><label for="quicktime_correction">{#media_dlg.correction}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="quicktime_enablejavascript" name="quicktime_enablejavascript" onchange="Media.formToData();" /></td>
+ <td><label for="quicktime_enablejavascript">{#media_dlg.enablejavascript}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="quicktime_kioskmode" name="quicktime_kioskmode" onchange="Media.formToData();" /></td>
+ <td><label for="quicktime_kioskmode">{#media_dlg.kioskmode}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="quicktime_autohref" name="quicktime_autohref" onchange="Media.formToData();" /></td>
+ <td><label for="quicktime_autohref">{#media_dlg.autohref}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="quicktime_playeveryframe" name="quicktime_playeveryframe" onchange="Media.formToData();" /></td>
+ <td><label for="quicktime_playeveryframe">{#media_dlg.playeveryframe}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="quicktime_targetcache" name="quicktime_targetcache" onchange="Media.formToData();" /></td>
+ <td><label for="quicktime_targetcache">{#media_dlg.targetcache}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td><label for="quicktime_scale">{#media_dlg.scale}</label></td>
+ <td><select id="quicktime_scale" name="quicktime_scale" class="mceEditableSelect" onchange="Media.formToData();">
+ <option value="">{#not_set}</option>
+ <option value="tofit">tofit</option>
+ <option value="aspect">aspect</option>
+ </select>
+ </td>
+
+ <td colspan="2">&nbsp;</td>
+ </tr>
+
+ <tr>
+ <td><label for="quicktime_starttime">{#media_dlg.starttime}</label></td>
+ <td><input type="text" id="quicktime_starttime" name="quicktime_starttime" onchange="Media.formToData();" /></td>
+
+ <td><label for="quicktime_endtime">{#media_dlg.endtime}</label></td>
+ <td><input type="text" id="quicktime_endtime" name="quicktime_endtime" onchange="Media.formToData();" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="quicktime_target">{#media_dlg.target}</label></td>
+ <td><input type="text" id="quicktime_target" name="quicktime_target" onchange="Media.formToData();" /></td>
+
+ <td><label for="quicktime_href">{#media_dlg.href}</label></td>
+ <td><input type="text" id="quicktime_href" name="quicktime_href" onchange="Media.formToData();" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="quicktime_qtsrcchokespeed">{#media_dlg.qtsrcchokespeed}</label></td>
+ <td><input type="text" id="quicktime_qtsrcchokespeed" name="quicktime_qtsrcchokespeed" onchange="Media.formToData();" /></td>
+
+ <td><label for="quicktime_volume">{#media_dlg.volume}</label></td>
+ <td><input type="text" id="quicktime_volume" name="quicktime_volume" onchange="Media.formToData();" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="quicktime_qtsrc">{#media_dlg.qtsrc}</label></td>
+ <td colspan="4">
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="quicktime_qtsrc" name="quicktime_qtsrc" onchange="Media.formToData();" /></td>
+ <td id="qtsrcfilebrowsercontainer">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+
+ <fieldset id="windowsmedia_options">
+ <legend>{#media_dlg.wmp_options}</legend>
+
+ <table role="presentation" border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="windowsmedia_autostart" name="windowsmedia_autostart" checked="checked" onchange="Media.formToData();" /></td>
+ <td><label for="windowsmedia_autostart">{#media_dlg.autostart}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="windowsmedia_enabled" name="windowsmedia_enabled" onchange="Media.formToData();" /></td>
+ <td><label for="windowsmedia_enabled">{#media_dlg.enabled}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="windowsmedia_enablecontextmenu" name="windowsmedia_enablecontextmenu" checked="checked" onchange="Media.formToData();" /></td>
+ <td><label for="windowsmedia_enablecontextmenu">{#media_dlg.menu}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="windowsmedia_fullscreen" name="windowsmedia_fullscreen" onchange="Media.formToData();" /></td>
+ <td><label for="windowsmedia_fullscreen">{#media_dlg.fullscreen}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="windowsmedia_invokeurls" name="windowsmedia_invokeurls" checked="checked" onchange="Media.formToData();" /></td>
+ <td><label for="windowsmedia_invokeurls">{#media_dlg.invokeurls}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="windowsmedia_mute" name="windowsmedia_mute" onchange="Media.formToData();" /></td>
+ <td><label for="windowsmedia_mute">{#media_dlg.mute}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="windowsmedia_stretchtofit" name="windowsmedia_stretchtofit" onchange="Media.formToData();" /></td>
+ <td><label for="windowsmedia_stretchtofit">{#media_dlg.stretchtofit}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="windowsmedia_windowlessvideo" name="windowsmedia_windowlessvideo" onchange="Media.formToData();" /></td>
+ <td><label for="windowsmedia_windowlessvideo">{#media_dlg.windowlessvideo}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td><label for="windowsmedia_balance">{#media_dlg.balance}</label></td>
+ <td><input type="text" id="windowsmedia_balance" name="windowsmedia_balance" onchange="Media.formToData();" /></td>
+
+ <td><label for="windowsmedia_baseurl">{#media_dlg.baseurl}</label></td>
+ <td><input type="text" id="windowsmedia_baseurl" name="windowsmedia_baseurl" onchange="Media.formToData();" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="windowsmedia_captioningid">{#media_dlg.captioningid}</label></td>
+ <td><input type="text" id="windowsmedia_captioningid" name="windowsmedia_captioningid" onchange="Media.formToData();" /></td>
+
+ <td><label for="windowsmedia_currentmarker">{#media_dlg.currentmarker}</label></td>
+ <td><input type="text" id="windowsmedia_currentmarker" name="windowsmedia_currentmarker" onchange="Media.formToData();" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="windowsmedia_currentposition">{#media_dlg.currentposition}</label></td>
+ <td><input type="text" id="windowsmedia_currentposition" name="windowsmedia_currentposition" onchange="Media.formToData();" /></td>
+
+ <td><label for="windowsmedia_defaultframe">{#media_dlg.defaultframe}</label></td>
+ <td><input type="text" id="windowsmedia_defaultframe" name="windowsmedia_defaultframe" onchange="Media.formToData();" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="windowsmedia_playcount">{#media_dlg.playcount}</label></td>
+ <td><input type="text" id="windowsmedia_playcount" name="windowsmedia_playcount" onchange="Media.formToData();" /></td>
+
+ <td><label for="windowsmedia_rate">{#media_dlg.rate}</label></td>
+ <td><input type="text" id="windowsmedia_rate" name="windowsmedia_rate" onchange="Media.formToData();" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="windowsmedia_uimode">{#media_dlg.uimode}</label></td>
+ <td><input type="text" id="windowsmedia_uimode" name="windowsmedia_uimode" onchange="Media.formToData();" /></td>
+
+ <td><label for="windowsmedia_volume">{#media_dlg.volume}</label></td>
+ <td><input type="text" id="windowsmedia_volume" name="windowsmedia_volume" onchange="Media.formToData();" /></td>
+ </tr>
+
+ </table>
+ </fieldset>
+
+ <fieldset id="realmedia_options">
+ <legend>{#media_dlg.rmp_options}</legend>
+
+ <table role="presentation" border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="realmedia_autostart" name="realmedia_autostart" onchange="Media.formToData();" /></td>
+ <td><label for="realmedia_autostart">{#media_dlg.autostart}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="realmedia_loop" name="realmedia_loop" onchange="Media.formToData();" /></td>
+ <td><label for="realmedia_loop">{#media_dlg.loop}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="realmedia_autogotourl" name="realmedia_autogotourl" checked="checked" onchange="Media.formToData();" /></td>
+ <td><label for="realmedia_autogotourl">{#media_dlg.autogotourl}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="realmedia_center" name="realmedia_center" onchange="Media.formToData();" /></td>
+ <td><label for="realmedia_center">{#media_dlg.center}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="realmedia_imagestatus" name="realmedia_imagestatus" checked="checked" onchange="Media.formToData();" /></td>
+ <td><label for="realmedia_imagestatus">{#media_dlg.imagestatus}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="realmedia_maintainaspect" name="realmedia_maintainaspect" onchange="Media.formToData();" /></td>
+ <td><label for="realmedia_maintainaspect">{#media_dlg.maintainaspect}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="realmedia_nojava" name="realmedia_nojava" onchange="Media.formToData();" /></td>
+ <td><label for="realmedia_nojava">{#media_dlg.nojava}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="realmedia_prefetch" name="realmedia_prefetch" onchange="Media.formToData();" /></td>
+ <td><label for="realmedia_prefetch">{#media_dlg.prefetch}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="realmedia_shuffle" name="realmedia_shuffle" onchange="Media.formToData();" /></td>
+ <td><label for="realmedia_shuffle">{#media_dlg.shuffle}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ &nbsp;
+ </td>
+ </tr>
+
+ <tr>
+ <td><label for="realmedia_console">{#media_dlg.console}</label></td>
+ <td><input type="text" id="realmedia_console" name="realmedia_console" onchange="Media.formToData();" /></td>
+
+ <td><label for="realmedia_controls">{#media_dlg.controls}</label></td>
+ <td><input type="text" id="realmedia_controls" name="realmedia_controls" onchange="Media.formToData();" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="realmedia_numloop">{#media_dlg.numloop}</label></td>
+ <td><input type="text" id="realmedia_numloop" name="realmedia_numloop" onchange="Media.formToData();" /></td>
+
+ <td><label for="realmedia_scriptcallbacks">{#media_dlg.scriptcallbacks}</label></td>
+ <td><input type="text" id="realmedia_scriptcallbacks" name="realmedia_scriptcallbacks" onchange="Media.formToData();" /></td>
+ </tr>
+ </table>
+ </fieldset>
+
+ <fieldset id="shockwave_options">
+ <legend>{#media_dlg.shockwave_options}</legend>
+
+ <table role="presentation" border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td><label for="shockwave_swstretchstyle">{#media_dlg.swstretchstyle}</label></td>
+ <td>
+ <select id="shockwave_swstretchstyle" name="shockwave_swstretchstyle" onchange="Media.formToData();">
+ <option value="none">{#not_set}</option>
+ <option value="meet">Meet</option>
+ <option value="fill">Fill</option>
+ <option value="stage">Stage</option>
+ </select>
+ </td>
+
+ <td><label for="shockwave_swvolume">{#media_dlg.volume}</label></td>
+ <td><input type="text" id="shockwave_swvolume" name="shockwave_swvolume" onchange="Media.formToData();" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="shockwave_swstretchhalign">{#media_dlg.swstretchhalign}</label></td>
+ <td>
+ <select id="shockwave_swstretchhalign" name="shockwave_swstretchhalign" onchange="Media.formToData();">
+ <option value="none">{#not_set}</option>
+ <option value="left">{#media_dlg.align_left}</option>
+ <option value="center">{#media_dlg.align_center}</option>
+ <option value="right">{#media_dlg.align_right}</option>
+ </select>
+ </td>
+
+ <td><label for="shockwave_swstretchvalign">{#media_dlg.swstretchvalign}</label></td>
+ <td>
+ <select id="shockwave_swstretchvalign" name="shockwave_swstretchvalign" onchange="Media.formToData();">
+ <option value="none">{#not_set}</option>
+ <option value="meet">Meet</option>
+ <option value="fill">Fill</option>
+ <option value="stage">Stage</option>
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="shockwave_autostart" name="shockwave_autostart" onchange="Media.formToData();" checked="checked" /></td>
+ <td><label for="shockwave_autostart">{#media_dlg.autostart}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="shockwave_sound" name="shockwave_sound" onchange="Media.formToData();" checked="checked" /></td>
+ <td><label for="shockwave_sound">{#media_dlg.sound}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="shockwave_swliveconnect" name="shockwave_swliveconnect" onchange="Media.formToData();" /></td>
+ <td><label for="shockwave_swliveconnect">{#media_dlg.liveconnect}</label></td>
+ </tr>
+ </table>
+ </td>
+
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input type="checkbox" class="checkbox" id="shockwave_progress" name="shockwave_progress" onchange="Media.formToData();" checked="checked" /></td>
+ <td><label for="shockwave_progress">{#media_dlg.progress}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+ </div>
+
+ <div id="source_panel" class="panel">
+ <fieldset>
+ <legend>{#media_dlg.source}</legend>
+ <textarea id="source" style="width: 99%; height: 390px"></textarea>
+ </fieldset>
+ </div>
+ </div>
+
+ <div class="mceActionPanel">
+ <input type="submit" id="insert" name="insert" value="{#insert}" />
+ <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
+ </div>
+ </form>
+</body>
+</html>
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/moxieplayer.swf b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/moxieplayer.swf
new file mode 100644
index 00000000..585d772d
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/media/moxieplayer.swf
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/nonbreaking/editor_plugin.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/nonbreaking/editor_plugin.js
new file mode 100755
index 00000000..687f5486
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/nonbreaking/editor_plugin.js
@@ -0,0 +1 @@
+(function(){tinymce.create("tinymce.plugins.Nonbreaking",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceNonBreaking",function(){a.execCommand("mceInsertContent",false,(a.plugins.visualchars&&a.plugins.visualchars.state)?'<span data-mce-bogus="1" class="mceItemHidden mceItemNbsp">&nbsp;</span>':"&nbsp;")});a.addButton("nonbreaking",{title:"nonbreaking.nonbreaking_desc",cmd:"mceNonBreaking"});if(a.getParam("nonbreaking_force_tab")){a.onKeyDown.add(function(d,f){if(f.keyCode==9){f.preventDefault();d.execCommand("mceNonBreaking");d.execCommand("mceNonBreaking");d.execCommand("mceNonBreaking")}})}},getInfo:function(){return{longname:"Nonbreaking space",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("nonbreaking",tinymce.plugins.Nonbreaking)})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/nonbreaking/editor_plugin_src.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/nonbreaking/editor_plugin_src.js
new file mode 100755
index 00000000..d492fbef
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/nonbreaking/editor_plugin_src.js
@@ -0,0 +1,54 @@
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+ tinymce.create('tinymce.plugins.Nonbreaking', {
+ init : function(ed, url) {
+ var t = this;
+
+ t.editor = ed;
+
+ // Register commands
+ ed.addCommand('mceNonBreaking', function() {
+ ed.execCommand('mceInsertContent', false, (ed.plugins.visualchars && ed.plugins.visualchars.state) ? '<span data-mce-bogus="1" class="mceItemHidden mceItemNbsp">&nbsp;</span>' : '&nbsp;');
+ });
+
+ // Register buttons
+ ed.addButton('nonbreaking', {title : 'nonbreaking.nonbreaking_desc', cmd : 'mceNonBreaking'});
+
+ if (ed.getParam('nonbreaking_force_tab')) {
+ ed.onKeyDown.add(function(ed, e) {
+ if (e.keyCode == 9) {
+ e.preventDefault();
+
+ ed.execCommand('mceNonBreaking');
+ ed.execCommand('mceNonBreaking');
+ ed.execCommand('mceNonBreaking');
+ }
+ });
+ }
+ },
+
+ getInfo : function() {
+ return {
+ longname : 'Nonbreaking space',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ };
+ }
+
+ // Private methods
+ });
+
+ // Register plugin
+ tinymce.PluginManager.add('nonbreaking', tinymce.plugins.Nonbreaking);
+})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/noneditable/editor_plugin.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/noneditable/editor_plugin.js
new file mode 100755
index 00000000..da411ebc
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/noneditable/editor_plugin.js
@@ -0,0 +1 @@
+(function(){var c=tinymce.dom.TreeWalker;var a="contenteditable",d="data-mce-"+a;var e=tinymce.VK;function b(n){var j=n.dom,p=n.selection,r,o="mce_noneditablecaret",r="\uFEFF";function m(t){var s;if(t.nodeType===1){s=t.getAttribute(d);if(s&&s!=="inherit"){return s}s=t.contentEditable;if(s!=="inherit"){return s}}return null}function g(s){var t;while(s){t=m(s);if(t){return t==="false"?s:null}s=s.parentNode}}function l(s){while(s){if(s.id===o){return s}s=s.parentNode}}function k(s){var t;if(s){t=new c(s,s);for(s=t.current();s;s=t.next()){if(s.nodeType===3){return s}}}}function f(v,u){var s,t;if(m(v)==="false"){if(j.isBlock(v)){p.select(v);return}}t=j.createRng();if(m(v)==="true"){if(!v.firstChild){v.appendChild(n.getDoc().createTextNode("\u00a0"))}v=v.firstChild;u=true}s=j.create("span",{id:o,"data-mce-bogus":true},r);if(u){v.parentNode.insertBefore(s,v)}else{j.insertAfter(s,v)}t.setStart(s.firstChild,1);t.collapse(true);p.setRng(t);return s}function i(s){var v,t,u;if(s){rng=p.getRng(true);rng.setStartBefore(s);rng.setEndBefore(s);v=k(s);if(v&&v.nodeValue.charAt(0)==r){v=v.deleteData(0,1)}j.remove(s,true);p.setRng(rng)}else{t=l(p.getStart());while((s=j.get(o))&&s!==u){if(t!==s){v=k(s);if(v&&v.nodeValue.charAt(0)==r){v=v.deleteData(0,1)}j.remove(s,true)}u=s}}}function q(){var s,w,u,t,v;function x(B,D){var A,F,E,C,z;A=t.startContainer;F=t.startOffset;if(A.nodeType==3){z=A.nodeValue.length;if((F>0&&F<z)||(D?F==z:F==0)){return}}else{if(F<A.childNodes.length){var G=!D&&F>0?F-1:F;A=A.childNodes[G];if(A.hasChildNodes()){A=A.firstChild}}else{return !D?B:null}}E=new c(A,B);while(C=E[D?"prev":"next"]()){if(C.nodeType===3&&C.nodeValue.length>0){return}else{if(m(C)==="true"){return C}}}return B}i();u=p.isCollapsed();s=g(p.getStart());w=g(p.getEnd());if(s||w){t=p.getRng(true);if(u){s=s||w;var y=p.getStart();if(v=x(s,true)){f(v,true)}else{if(v=x(s,false)){f(v,false)}else{p.select(s)}}}else{t=p.getRng(true);if(s){t.setStartBefore(s)}if(w){t.setEndAfter(w)}p.setRng(t)}}}function h(z,B){var F=B.keyCode,x,C,D,v;function u(H,G){while(H=H[G?"previousSibling":"nextSibling"]){if(H.nodeType!==3||H.nodeValue.length>0){return H}}}function y(G,H){p.select(G);p.collapse(H)}function t(K){var J,I,M,H;function G(O){var N=I;while(N){if(N===O){return}N=N.parentNode}j.remove(O);q()}function L(){var O,P,N=z.schema.getNonEmptyElements();P=new tinymce.dom.TreeWalker(I,z.getBody());while(O=(K?P.prev():P.next())){if(N[O.nodeName.toLowerCase()]){break}if(O.nodeType===3&&tinymce.trim(O.nodeValue).length>0){break}if(m(O)==="false"){G(O);return true}}if(g(O)){return true}return false}if(p.isCollapsed()){J=p.getRng(true);I=J.startContainer;M=J.startOffset;I=l(I)||I;if(H=g(I)){G(H);return false}if(I.nodeType==3&&(K?M>0:M<I.nodeValue.length)){return true}if(I.nodeType==1){I=I.childNodes[M]||I}if(L()){return false}}return true}D=p.getStart();v=p.getEnd();x=g(D)||g(v);if(x&&(F<112||F>124)&&F!=e.DELETE&&F!=e.BACKSPACE){if((tinymce.isMac?B.metaKey:B.ctrlKey)&&(F==67||F==88||F==86)){return}B.preventDefault();if(F==e.LEFT||F==e.RIGHT){var w=F==e.LEFT;if(z.dom.isBlock(x)){var A=w?x.previousSibling:x.nextSibling;var s=new c(A,A);var E=w?s.prev():s.next();y(E,!w)}else{y(x,w)}}}else{if(F==e.LEFT||F==e.RIGHT||F==e.BACKSPACE||F==e.DELETE){C=l(D);if(C){if(F==e.LEFT||F==e.BACKSPACE){x=u(C,true);if(x&&m(x)==="false"){B.preventDefault();if(F==e.LEFT){y(x,true)}else{j.remove(x);return}}else{i(C)}}if(F==e.RIGHT||F==e.DELETE){x=u(C);if(x&&m(x)==="false"){B.preventDefault();if(F==e.RIGHT){y(x,false)}else{j.remove(x);return}}else{i(C)}}}if((F==e.BACKSPACE||F==e.DELETE)&&!t(F==e.BACKSPACE)){B.preventDefault();return false}}}}n.onMouseDown.addToTop(function(s,u){var t=s.selection.getNode();if(m(t)==="false"&&t==u.target){q()}});n.onMouseUp.addToTop(q);n.onKeyDown.addToTop(h);n.onKeyUp.addToTop(q)}tinymce.create("tinymce.plugins.NonEditablePlugin",{init:function(i,k){var h,g,j;function f(m,n){var o=j.length,p=n.content,l=tinymce.trim(g);if(n.format=="raw"){return}while(o--){p=p.replace(j[o],function(s){var r=arguments,q=r[r.length-2];if(q>0&&p.charAt(q-1)=='"'){return s}return'<span class="'+l+'" data-mce-content="'+m.dom.encode(r[0])+'">'+m.dom.encode(typeof(r[1])==="string"?r[1]:r[0])+"</span>"})}n.content=p}h=" "+tinymce.trim(i.getParam("noneditable_editable_class","mceEditable"))+" ";g=" "+tinymce.trim(i.getParam("noneditable_noneditable_class","mceNonEditable"))+" ";j=i.getParam("noneditable_regexp");if(j&&!j.length){j=[j]}i.onPreInit.add(function(){b(i);if(j){i.selection.onBeforeSetContent.add(f);i.onBeforeSetContent.add(f)}i.parser.addAttributeFilter("class",function(l){var m=l.length,n,o;while(m--){o=l[m];n=" "+o.attr("class")+" ";if(n.indexOf(h)!==-1){o.attr(d,"true")}else{if(n.indexOf(g)!==-1){o.attr(d,"false")}}}});i.serializer.addAttributeFilter(d,function(l,m){var n=l.length,o;while(n--){o=l[n];if(j&&o.attr("data-mce-content")){o.name="#text";o.type=3;o.raw=true;o.value=o.attr("data-mce-content")}else{o.attr(a,null);o.attr(d,null)}}});i.parser.addAttributeFilter(a,function(l,m){var n=l.length,o;while(n--){o=l[n];o.attr(d,o.attr(a));o.attr(a,null)}})})},getInfo:function(){return{longname:"Non editable elements",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/noneditable",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("noneditable",tinymce.plugins.NonEditablePlugin)})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/noneditable/editor_plugin_src.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/noneditable/editor_plugin_src.js
new file mode 100755
index 00000000..a18bcd78
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/noneditable/editor_plugin_src.js
@@ -0,0 +1,537 @@
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+ var TreeWalker = tinymce.dom.TreeWalker;
+ var externalName = 'contenteditable', internalName = 'data-mce-' + externalName;
+ var VK = tinymce.VK;
+
+ function handleContentEditableSelection(ed) {
+ var dom = ed.dom, selection = ed.selection, invisibleChar, caretContainerId = 'mce_noneditablecaret', invisibleChar = '\uFEFF';
+
+ // Returns the content editable state of a node "true/false" or null
+ function getContentEditable(node) {
+ var contentEditable;
+
+ // Ignore non elements
+ if (node.nodeType === 1) {
+ // Check for fake content editable
+ contentEditable = node.getAttribute(internalName);
+ if (contentEditable && contentEditable !== "inherit") {
+ return contentEditable;
+ }
+
+ // Check for real content editable
+ contentEditable = node.contentEditable;
+ if (contentEditable !== "inherit") {
+ return contentEditable;
+ }
+ }
+
+ return null;
+ };
+
+ // Returns the noneditable parent or null if there is a editable before it or if it wasn't found
+ function getNonEditableParent(node) {
+ var state;
+
+ while (node) {
+ state = getContentEditable(node);
+ if (state) {
+ return state === "false" ? node : null;
+ }
+
+ node = node.parentNode;
+ }
+ };
+
+ // Get caret container parent for the specified node
+ function getParentCaretContainer(node) {
+ while (node) {
+ if (node.id === caretContainerId) {
+ return node;
+ }
+
+ node = node.parentNode;
+ }
+ };
+
+ // Finds the first text node in the specified node
+ function findFirstTextNode(node) {
+ var walker;
+
+ if (node) {
+ walker = new TreeWalker(node, node);
+
+ for (node = walker.current(); node; node = walker.next()) {
+ if (node.nodeType === 3) {
+ return node;
+ }
+ }
+ }
+ };
+
+ // Insert caret container before/after target or expand selection to include block
+ function insertCaretContainerOrExpandToBlock(target, before) {
+ var caretContainer, rng;
+
+ // Select block
+ if (getContentEditable(target) === "false") {
+ if (dom.isBlock(target)) {
+ selection.select(target);
+ return;
+ }
+ }
+
+ rng = dom.createRng();
+
+ if (getContentEditable(target) === "true") {
+ if (!target.firstChild) {
+ target.appendChild(ed.getDoc().createTextNode('\u00a0'));
+ }
+
+ target = target.firstChild;
+ before = true;
+ }
+
+ //caretContainer = dom.create('span', {id: caretContainerId, 'data-mce-bogus': true, style:'border: 1px solid red'}, invisibleChar);
+ caretContainer = dom.create('span', {id: caretContainerId, 'data-mce-bogus': true}, invisibleChar);
+
+ if (before) {
+ target.parentNode.insertBefore(caretContainer, target);
+ } else {
+ dom.insertAfter(caretContainer, target);
+ }
+
+ rng.setStart(caretContainer.firstChild, 1);
+ rng.collapse(true);
+ selection.setRng(rng);
+
+ return caretContainer;
+ };
+
+ // Removes any caret container except the one we might be in
+ function removeCaretContainer(caretContainer) {
+ var child, currentCaretContainer, lastContainer;
+
+ if (caretContainer) {
+ rng = selection.getRng(true);
+ rng.setStartBefore(caretContainer);
+ rng.setEndBefore(caretContainer);
+
+ child = findFirstTextNode(caretContainer);
+ if (child && child.nodeValue.charAt(0) == invisibleChar) {
+ child = child.deleteData(0, 1);
+ }
+
+ dom.remove(caretContainer, true);
+
+ selection.setRng(rng);
+ } else {
+ currentCaretContainer = getParentCaretContainer(selection.getStart());
+ while ((caretContainer = dom.get(caretContainerId)) && caretContainer !== lastContainer) {
+ if (currentCaretContainer !== caretContainer) {
+ child = findFirstTextNode(caretContainer);
+ if (child && child.nodeValue.charAt(0) == invisibleChar) {
+ child = child.deleteData(0, 1);
+ }
+
+ dom.remove(caretContainer, true);
+ }
+
+ lastContainer = caretContainer;
+ }
+ }
+ };
+
+ // Modifies the selection to include contentEditable false elements or insert caret containers
+ function moveSelection() {
+ var nonEditableStart, nonEditableEnd, isCollapsed, rng, element;
+
+ // Checks if there is any contents to the left/right side of caret returns the noneditable element or any editable element if it finds one inside
+ function hasSideContent(element, left) {
+ var container, offset, walker, node, len;
+
+ container = rng.startContainer;
+ offset = rng.startOffset;
+
+ // If endpoint is in middle of text node then expand to beginning/end of element
+ if (container.nodeType == 3) {
+ len = container.nodeValue.length;
+ if ((offset > 0 && offset < len) || (left ? offset == len : offset == 0)) {
+ return;
+ }
+ } else {
+ // Can we resolve the node by index
+ if (offset < container.childNodes.length) {
+ // Browser represents caret position as the offset at the start of an element. When moving right
+ // this is the element we are moving into so we consider our container to be child node at offset-1
+ var pos = !left && offset > 0 ? offset-1 : offset;
+ container = container.childNodes[pos];
+ if (container.hasChildNodes()) {
+ container = container.firstChild;
+ }
+ } else {
+ // If not then the caret is at the last position in it's container and the caret container should be inserted after the noneditable element
+ return !left ? element : null;
+ }
+ }
+
+ // Walk left/right to look for contents
+ walker = new TreeWalker(container, element);
+ while (node = walker[left ? 'prev' : 'next']()) {
+ if (node.nodeType === 3 && node.nodeValue.length > 0) {
+ return;
+ } else if (getContentEditable(node) === "true") {
+ // Found contentEditable=true element return this one to we can move the caret inside it
+ return node;
+ }
+ }
+
+ return element;
+ };
+
+ // Remove any existing caret containers
+ removeCaretContainer();
+
+ // Get noneditable start/end elements
+ isCollapsed = selection.isCollapsed();
+ nonEditableStart = getNonEditableParent(selection.getStart());
+ nonEditableEnd = getNonEditableParent(selection.getEnd());
+
+ // Is any fo the range endpoints noneditable
+ if (nonEditableStart || nonEditableEnd) {
+ rng = selection.getRng(true);
+
+ // If it's a caret selection then look left/right to see if we need to move the caret out side or expand
+ if (isCollapsed) {
+ nonEditableStart = nonEditableStart || nonEditableEnd;
+ var start = selection.getStart();
+ if (element = hasSideContent(nonEditableStart, true)) {
+ // We have no contents to the left of the caret then insert a caret container before the noneditable element
+ insertCaretContainerOrExpandToBlock(element, true);
+ } else if (element = hasSideContent(nonEditableStart, false)) {
+ // We have no contents to the right of the caret then insert a caret container after the noneditable element
+ insertCaretContainerOrExpandToBlock(element, false);
+ } else {
+ // We are in the middle of a noneditable so expand to select it
+ selection.select(nonEditableStart);
+ }
+ } else {
+ rng = selection.getRng(true);
+
+ // Expand selection to include start non editable element
+ if (nonEditableStart) {
+ rng.setStartBefore(nonEditableStart);
+ }
+
+ // Expand selection to include end non editable element
+ if (nonEditableEnd) {
+ rng.setEndAfter(nonEditableEnd);
+ }
+
+ selection.setRng(rng);
+ }
+ }
+ };
+
+ function handleKey(ed, e) {
+ var keyCode = e.keyCode, nonEditableParent, caretContainer, startElement, endElement;
+
+ function getNonEmptyTextNodeSibling(node, prev) {
+ while (node = node[prev ? 'previousSibling' : 'nextSibling']) {
+ if (node.nodeType !== 3 || node.nodeValue.length > 0) {
+ return node;
+ }
+ }
+ };
+
+ function positionCaretOnElement(element, start) {
+ selection.select(element);
+ selection.collapse(start);
+ }
+
+ function canDelete(backspace) {
+ var rng, container, offset, nonEditableParent;
+
+ function removeNodeIfNotParent(node) {
+ var parent = container;
+
+ while (parent) {
+ if (parent === node) {
+ return;
+ }
+
+ parent = parent.parentNode;
+ }
+
+ dom.remove(node);
+ moveSelection();
+ }
+
+ function isNextPrevTreeNodeNonEditable() {
+ var node, walker, nonEmptyElements = ed.schema.getNonEmptyElements();
+
+ walker = new tinymce.dom.TreeWalker(container, ed.getBody());
+ while (node = (backspace ? walker.prev() : walker.next())) {
+ // Found IMG/INPUT etc
+ if (nonEmptyElements[node.nodeName.toLowerCase()]) {
+ break;
+ }
+
+ // Found text node with contents
+ if (node.nodeType === 3 && tinymce.trim(node.nodeValue).length > 0) {
+ break;
+ }
+
+ // Found non editable node
+ if (getContentEditable(node) === "false") {
+ removeNodeIfNotParent(node);
+ return true;
+ }
+ }
+
+ // Check if the content node is within a non editable parent
+ if (getNonEditableParent(node)) {
+ return true;
+ }
+
+ return false;
+ }
+
+ if (selection.isCollapsed()) {
+ rng = selection.getRng(true);
+ container = rng.startContainer;
+ offset = rng.startOffset;
+ container = getParentCaretContainer(container) || container;
+
+ // Is in noneditable parent
+ if (nonEditableParent = getNonEditableParent(container)) {
+ removeNodeIfNotParent(nonEditableParent);
+ return false;
+ }
+
+ // Check if the caret is in the middle of a text node
+ if (container.nodeType == 3 && (backspace ? offset > 0 : offset < container.nodeValue.length)) {
+ return true;
+ }
+
+ // Resolve container index
+ if (container.nodeType == 1) {
+ container = container.childNodes[offset] || container;
+ }
+
+ // Check if previous or next tree node is non editable then block the event
+ if (isNextPrevTreeNodeNonEditable()) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ startElement = selection.getStart()
+ endElement = selection.getEnd();
+
+ // Disable all key presses in contentEditable=false except delete or backspace
+ nonEditableParent = getNonEditableParent(startElement) || getNonEditableParent(endElement);
+ if (nonEditableParent && (keyCode < 112 || keyCode > 124) && keyCode != VK.DELETE && keyCode != VK.BACKSPACE) {
+ // Is Ctrl+c, Ctrl+v or Ctrl+x then use default browser behavior
+ if ((tinymce.isMac ? e.metaKey : e.ctrlKey) && (keyCode == 67 || keyCode == 88 || keyCode == 86)) {
+ return;
+ }
+
+ e.preventDefault();
+
+ // Arrow left/right select the element and collapse left/right
+ if (keyCode == VK.LEFT || keyCode == VK.RIGHT) {
+ var left = keyCode == VK.LEFT;
+ // If a block element find previous or next element to position the caret
+ if (ed.dom.isBlock(nonEditableParent)) {
+ var targetElement = left ? nonEditableParent.previousSibling : nonEditableParent.nextSibling;
+ var walker = new TreeWalker(targetElement, targetElement);
+ var caretElement = left ? walker.prev() : walker.next();
+ positionCaretOnElement(caretElement, !left);
+ } else {
+ positionCaretOnElement(nonEditableParent, left);
+ }
+ }
+ } else {
+ // Is arrow left/right, backspace or delete
+ if (keyCode == VK.LEFT || keyCode == VK.RIGHT || keyCode == VK.BACKSPACE || keyCode == VK.DELETE) {
+ caretContainer = getParentCaretContainer(startElement);
+ if (caretContainer) {
+ // Arrow left or backspace
+ if (keyCode == VK.LEFT || keyCode == VK.BACKSPACE) {
+ nonEditableParent = getNonEmptyTextNodeSibling(caretContainer, true);
+
+ if (nonEditableParent && getContentEditable(nonEditableParent) === "false") {
+ e.preventDefault();
+
+ if (keyCode == VK.LEFT) {
+ positionCaretOnElement(nonEditableParent, true);
+ } else {
+ dom.remove(nonEditableParent);
+ return;
+ }
+ } else {
+ removeCaretContainer(caretContainer);
+ }
+ }
+
+ // Arrow right or delete
+ if (keyCode == VK.RIGHT || keyCode == VK.DELETE) {
+ nonEditableParent = getNonEmptyTextNodeSibling(caretContainer);
+
+ if (nonEditableParent && getContentEditable(nonEditableParent) === "false") {
+ e.preventDefault();
+
+ if (keyCode == VK.RIGHT) {
+ positionCaretOnElement(nonEditableParent, false);
+ } else {
+ dom.remove(nonEditableParent);
+ return;
+ }
+ } else {
+ removeCaretContainer(caretContainer);
+ }
+ }
+ }
+
+ if ((keyCode == VK.BACKSPACE || keyCode == VK.DELETE) && !canDelete(keyCode == VK.BACKSPACE)) {
+ e.preventDefault();
+ return false;
+ }
+ }
+ }
+ };
+
+ ed.onMouseDown.addToTop(function(ed, e) {
+ var node = ed.selection.getNode();
+
+ if (getContentEditable(node) === "false" && node == e.target) {
+ // Expand selection on mouse down we can't block the default event since it's used for drag/drop
+ moveSelection();
+ }
+ });
+
+ ed.onMouseUp.addToTop(moveSelection);
+ ed.onKeyDown.addToTop(handleKey);
+ ed.onKeyUp.addToTop(moveSelection);
+ };
+
+ tinymce.create('tinymce.plugins.NonEditablePlugin', {
+ init : function(ed, url) {
+ var editClass, nonEditClass, nonEditableRegExps;
+
+ // Converts configured regexps to noneditable span items
+ function convertRegExpsToNonEditable(ed, args) {
+ var i = nonEditableRegExps.length, content = args.content, cls = tinymce.trim(nonEditClass);
+
+ // Don't replace the variables when raw is used for example on undo/redo
+ if (args.format == "raw") {
+ return;
+ }
+
+ while (i--) {
+ content = content.replace(nonEditableRegExps[i], function(match) {
+ var args = arguments, index = args[args.length - 2];
+
+ // Is value inside an attribute then don't replace
+ if (index > 0 && content.charAt(index - 1) == '"') {
+ return match;
+ }
+
+ return '<span class="' + cls + '" data-mce-content="' + ed.dom.encode(args[0]) + '">' + ed.dom.encode(typeof(args[1]) === "string" ? args[1] : args[0]) + '</span>';
+ });
+ }
+
+ args.content = content;
+ };
+
+ editClass = " " + tinymce.trim(ed.getParam("noneditable_editable_class", "mceEditable")) + " ";
+ nonEditClass = " " + tinymce.trim(ed.getParam("noneditable_noneditable_class", "mceNonEditable")) + " ";
+
+ // Setup noneditable regexps array
+ nonEditableRegExps = ed.getParam("noneditable_regexp");
+ if (nonEditableRegExps && !nonEditableRegExps.length) {
+ nonEditableRegExps = [nonEditableRegExps];
+ }
+
+ ed.onPreInit.add(function() {
+ handleContentEditableSelection(ed);
+
+ if (nonEditableRegExps) {
+ ed.selection.onBeforeSetContent.add(convertRegExpsToNonEditable);
+ ed.onBeforeSetContent.add(convertRegExpsToNonEditable);
+ }
+
+ // Apply contentEditable true/false on elements with the noneditable/editable classes
+ ed.parser.addAttributeFilter('class', function(nodes) {
+ var i = nodes.length, className, node;
+
+ while (i--) {
+ node = nodes[i];
+ className = " " + node.attr("class") + " ";
+
+ if (className.indexOf(editClass) !== -1) {
+ node.attr(internalName, "true");
+ } else if (className.indexOf(nonEditClass) !== -1) {
+ node.attr(internalName, "false");
+ }
+ }
+ });
+
+ // Remove internal name
+ ed.serializer.addAttributeFilter(internalName, function(nodes, name) {
+ var i = nodes.length, node;
+
+ while (i--) {
+ node = nodes[i];
+
+ if (nonEditableRegExps && node.attr('data-mce-content')) {
+ node.name = "#text";
+ node.type = 3;
+ node.raw = true;
+ node.value = node.attr('data-mce-content');
+ } else {
+ node.attr(externalName, null);
+ node.attr(internalName, null);
+ }
+ }
+ });
+
+ // Convert external name into internal name
+ ed.parser.addAttributeFilter(externalName, function(nodes, name) {
+ var i = nodes.length, node;
+
+ while (i--) {
+ node = nodes[i];
+ node.attr(internalName, node.attr(externalName));
+ node.attr(externalName, null);
+ }
+ });
+ });
+ },
+
+ getInfo : function() {
+ return {
+ longname : 'Non editable elements',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/noneditable',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ };
+ }
+ });
+
+ // Register plugin
+ tinymce.PluginManager.add('noneditable', tinymce.plugins.NonEditablePlugin);
+})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/pagebreak/editor_plugin.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/pagebreak/editor_plugin.js
new file mode 100644
index 00000000..35085e8a
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/pagebreak/editor_plugin.js
@@ -0,0 +1 @@
+(function(){tinymce.create("tinymce.plugins.PageBreakPlugin",{init:function(b,d){var f='<img src="'+b.theme.url+'/img/trans.gif" class="mcePageBreak mceItemNoResize" />',a="mcePageBreak",c=b.getParam("pagebreak_separator","<!-- pagebreak -->"),e;e=new RegExp(c.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(g){return"\\"+g}),"g");b.addCommand("mcePageBreak",function(){b.execCommand("mceInsertContent",0,f)});b.addButton("pagebreak",{title:"pagebreak.desc",cmd:a});b.onInit.add(function(){if(b.theme.onResolveName){b.theme.onResolveName.add(function(g,h){if(h.node.nodeName=="IMG"&&b.dom.hasClass(h.node,a)){h.name="pagebreak"}})}});b.onClick.add(function(g,h){h=h.target;if(h.nodeName==="IMG"&&g.dom.hasClass(h,a)){g.selection.select(h)}});b.onNodeChange.add(function(h,g,i){g.setActive("pagebreak",i.nodeName==="IMG"&&h.dom.hasClass(i,a))});b.onBeforeSetContent.add(function(g,h){h.content=h.content.replace(e,f)});b.onPostProcess.add(function(g,h){if(h.get){h.content=h.content.replace(/<img[^>]+>/g,function(i){if(i.indexOf('class="mcePageBreak')!==-1){i=c}return i})}})},getInfo:function(){return{longname:"PageBreak",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/pagebreak",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("pagebreak",tinymce.plugins.PageBreakPlugin)})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/pagebreak/editor_plugin_src.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/pagebreak/editor_plugin_src.js
new file mode 100644
index 00000000..a094c191
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/pagebreak/editor_plugin_src.js
@@ -0,0 +1,74 @@
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+ tinymce.create('tinymce.plugins.PageBreakPlugin', {
+ init : function(ed, url) {
+ var pb = '<img src="' + ed.theme.url + '/img/trans.gif" class="mcePageBreak mceItemNoResize" />', cls = 'mcePageBreak', sep = ed.getParam('pagebreak_separator', '<!-- pagebreak -->'), pbRE;
+
+ pbRE = new RegExp(sep.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g, function(a) {return '\\' + a;}), 'g');
+
+ // Register commands
+ ed.addCommand('mcePageBreak', function() {
+ ed.execCommand('mceInsertContent', 0, pb);
+ });
+
+ // Register buttons
+ ed.addButton('pagebreak', {title : 'pagebreak.desc', cmd : cls});
+
+ ed.onInit.add(function() {
+ if (ed.theme.onResolveName) {
+ ed.theme.onResolveName.add(function(th, o) {
+ if (o.node.nodeName == 'IMG' && ed.dom.hasClass(o.node, cls))
+ o.name = 'pagebreak';
+ });
+ }
+ });
+
+ ed.onClick.add(function(ed, e) {
+ e = e.target;
+
+ if (e.nodeName === 'IMG' && ed.dom.hasClass(e, cls))
+ ed.selection.select(e);
+ });
+
+ ed.onNodeChange.add(function(ed, cm, n) {
+ cm.setActive('pagebreak', n.nodeName === 'IMG' && ed.dom.hasClass(n, cls));
+ });
+
+ ed.onBeforeSetContent.add(function(ed, o) {
+ o.content = o.content.replace(pbRE, pb);
+ });
+
+ ed.onPostProcess.add(function(ed, o) {
+ if (o.get)
+ o.content = o.content.replace(/<img[^>]+>/g, function(im) {
+ if (im.indexOf('class="mcePageBreak') !== -1)
+ im = sep;
+
+ return im;
+ });
+ });
+ },
+
+ getInfo : function() {
+ return {
+ longname : 'PageBreak',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/pagebreak',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ };
+ }
+ });
+
+ // Register plugin
+ tinymce.PluginManager.add('pagebreak', tinymce.plugins.PageBreakPlugin);
+})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/paste/editor_plugin.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/paste/editor_plugin.js
new file mode 100755
index 00000000..0ab05ebb
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/paste/editor_plugin.js
@@ -0,0 +1 @@
+(function(){var c=tinymce.each,a={paste_auto_cleanup_on_paste:true,paste_enable_default_filters:true,paste_block_drop:false,paste_retain_style_properties:"none",paste_strip_class_attributes:"mso",paste_remove_spans:false,paste_remove_styles:false,paste_remove_styles_if_webkit:true,paste_convert_middot_lists:true,paste_convert_headers_to_strong:false,paste_dialog_width:"450",paste_dialog_height:"400",paste_max_consecutive_linebreaks:2,paste_text_use_dialog:false,paste_text_sticky:false,paste_text_sticky_default:false,paste_text_notifyalways:false,paste_text_linebreaktype:"combined",paste_text_replacements:[[/\u2026/g,"..."],[/[\x93\x94\u201c\u201d]/g,'"'],[/[\x60\x91\x92\u2018\u2019]/g,"'"]]};function b(d,e){return d.getParam(e,a[e])}tinymce.create("tinymce.plugins.PastePlugin",{init:function(d,e){var f=this;f.editor=d;f.url=e;f.onPreProcess=new tinymce.util.Dispatcher(f);f.onPostProcess=new tinymce.util.Dispatcher(f);f.onPreProcess.add(f._preProcess);f.onPostProcess.add(f._postProcess);f.onPreProcess.add(function(i,j){d.execCallback("paste_preprocess",i,j)});f.onPostProcess.add(function(i,j){d.execCallback("paste_postprocess",i,j)});d.onKeyDown.addToTop(function(i,j){if(((tinymce.isMac?j.metaKey:j.ctrlKey)&&j.keyCode==86)||(j.shiftKey&&j.keyCode==45)){return false}});d.pasteAsPlainText=b(d,"paste_text_sticky_default");function h(l,j){var k=d.dom,i;f.onPreProcess.dispatch(f,l);l.node=k.create("div",0,l.content);if(tinymce.isGecko){i=d.selection.getRng(true);if(i.startContainer==i.endContainer&&i.startContainer.nodeType==3){if(l.node.childNodes.length===1&&/^(p|h[1-6]|pre)$/i.test(l.node.firstChild.nodeName)&&l.content.indexOf("__MCE_ITEM__")===-1){k.remove(l.node.firstChild,true)}}}f.onPostProcess.dispatch(f,l);l.content=d.serializer.serialize(l.node,{getInner:1,forced_root_block:""});if((!j)&&(d.pasteAsPlainText)){f._insertPlainText(l.content);if(!b(d,"paste_text_sticky")){d.pasteAsPlainText=false;d.controlManager.setActive("pastetext",false)}}else{f._insert(l.content)}}d.addCommand("mceInsertClipboardContent",function(i,j){h(j,true)});if(!b(d,"paste_text_use_dialog")){d.addCommand("mcePasteText",function(j,i){var k=tinymce.util.Cookie;d.pasteAsPlainText=!d.pasteAsPlainText;d.controlManager.setActive("pastetext",d.pasteAsPlainText);if((d.pasteAsPlainText)&&(!k.get("tinymcePasteText"))){if(b(d,"paste_text_sticky")){d.windowManager.alert(d.translate("paste.plaintext_mode_sticky"))}else{d.windowManager.alert(d.translate("paste.plaintext_mode"))}if(!b(d,"paste_text_notifyalways")){k.set("tinymcePasteText","1",new Date(new Date().getFullYear()+1,12,31))}}})}d.addButton("pastetext",{title:"paste.paste_text_desc",cmd:"mcePasteText"});d.addButton("selectall",{title:"paste.selectall_desc",cmd:"selectall"});function g(s){var l,p,j,t,k=d.selection,o=d.dom,q=d.getBody(),i,r;if(s.clipboardData||o.doc.dataTransfer){r=(s.clipboardData||o.doc.dataTransfer).getData("Text");if(d.pasteAsPlainText){s.preventDefault();h({content:o.encode(r).replace(/\r?\n/g,"<br />")});return}}if(o.get("_mcePaste")){return}l=o.add(q,"div",{id:"_mcePaste","class":"mcePaste","data-mce-bogus":"1"},"\uFEFF\uFEFF");if(q!=d.getDoc().body){i=o.getPos(d.selection.getStart(),q).y}else{i=q.scrollTop+o.getViewPort(d.getWin()).y}o.setStyles(l,{position:"absolute",left:tinymce.isGecko?-40:0,top:i-25,width:1,height:1,overflow:"hidden"});if(tinymce.isIE){t=k.getRng();j=o.doc.body.createTextRange();j.moveToElementText(l);j.execCommand("Paste");o.remove(l);if(l.innerHTML==="\uFEFF\uFEFF"){d.execCommand("mcePasteWord");s.preventDefault();return}k.setRng(t);k.setContent("");setTimeout(function(){h({content:l.innerHTML})},0);return tinymce.dom.Event.cancel(s)}else{function m(n){n.preventDefault()}o.bind(d.getDoc(),"mousedown",m);o.bind(d.getDoc(),"keydown",m);p=d.selection.getRng();l=l.firstChild;j=d.getDoc().createRange();j.setStart(l,0);j.setEnd(l,2);k.setRng(j);window.setTimeout(function(){var u="",n;if(!o.select("div.mcePaste > div.mcePaste").length){n=o.select("div.mcePaste");c(n,function(w){var v=w.firstChild;if(v&&v.nodeName=="DIV"&&v.style.marginTop&&v.style.backgroundColor){o.remove(v,1)}c(o.select("span.Apple-style-span",w),function(x){o.remove(x,1)});c(o.select("br[data-mce-bogus]",w),function(x){o.remove(x)});if(w.parentNode.className!="mcePaste"){u+=w.innerHTML}})}else{u="<p>"+o.encode(r).replace(/\r?\n\r?\n/g,"</p><p>").replace(/\r?\n/g,"<br />")+"</p>"}c(o.select("div.mcePaste"),function(v){o.remove(v)});if(p){k.setRng(p)}h({content:u});o.unbind(d.getDoc(),"mousedown",m);o.unbind(d.getDoc(),"keydown",m)},0)}}if(b(d,"paste_auto_cleanup_on_paste")){if(tinymce.isOpera||/Firefox\/2/.test(navigator.userAgent)){d.onKeyDown.addToTop(function(i,j){if(((tinymce.isMac?j.metaKey:j.ctrlKey)&&j.keyCode==86)||(j.shiftKey&&j.keyCode==45)){g(j)}})}else{d.onPaste.addToTop(function(i,j){return g(j)})}}d.onInit.add(function(){d.controlManager.setActive("pastetext",d.pasteAsPlainText);if(b(d,"paste_block_drop")){d.dom.bind(d.getBody(),["dragend","dragover","draggesture","dragdrop","drop","drag"],function(i){i.preventDefault();i.stopPropagation();return false})}});f._legacySupport()},getInfo:function(){return{longname:"Paste text/word",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_preProcess:function(g,e){var k=this.editor,j=e.content,p=tinymce.grep,n=tinymce.explode,f=tinymce.trim,l,i;function d(h){c(h,function(o){if(o.constructor==RegExp){j=j.replace(o,"")}else{j=j.replace(o[0],o[1])}})}if(k.settings.paste_enable_default_filters==false){return}if(tinymce.isIE&&document.documentMode>=9&&/<(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)/.test(e.content)){d([[/(?:<br>&nbsp;[\s\r\n]+|<br>)*(<\/?(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)[^>]*>)(?:<br>&nbsp;[\s\r\n]+|<br>)*/g,"$1"]]);d([[/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]])}if(/class="?Mso|style="[^"]*\bmso-|w:WordDocument/i.test(j)||e.wordContent){e.wordContent=true;d([/^\s*(&nbsp;)+/gi,/(&nbsp;|<br[^>]*>)+\s*$/gi]);if(b(k,"paste_convert_headers_to_strong")){j=j.replace(/<p [^>]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi,"<p><strong>$1</strong></p>")}if(b(k,"paste_convert_middot_lists")){d([[/<!--\[if !supportLists\]-->/gi,"$&__MCE_ITEM__"],[/(<span[^>]+(?:mso-list:|:\s*symbol)[^>]+>)/gi,"$1__MCE_ITEM__"],[/(<p[^>]+(?:MsoListParagraph)[^>]+>)/gi,"$1__MCE_ITEM__"]])}d([/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/&nbsp;/gi,"\u00a0"]]);do{l=j.length;j=j.replace(/(<[a-z][^>]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi,"$1")}while(l!=j.length);if(b(k,"paste_retain_style_properties").replace(/^none$/i,"").length==0){j=j.replace(/<\/?span[^>]*>/gi,"")}else{d([[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(o,h){return(h.length>0)?h.replace(/./," ").slice(Math.floor(h.length/2)).split("").join("\u00a0"):""}],[/(<[a-z][^>]*)\sstyle="([^"]*)"/gi,function(t,h,r){var u=[],o=0,q=n(f(r).replace(/&quot;/gi,"'"),";");c(q,function(s){var w,y,z=n(s,":");function x(A){return A+((A!=="0")&&(/\d$/.test(A)))?"px":""}if(z.length==2){w=z[0].toLowerCase();y=z[1].toLowerCase();switch(w){case"mso-padding-alt":case"mso-padding-top-alt":case"mso-padding-right-alt":case"mso-padding-bottom-alt":case"mso-padding-left-alt":case"mso-margin-alt":case"mso-margin-top-alt":case"mso-margin-right-alt":case"mso-margin-bottom-alt":case"mso-margin-left-alt":case"mso-table-layout-alt":case"mso-height":case"mso-width":case"mso-vertical-align-alt":u[o++]=w.replace(/^mso-|-alt$/g,"")+":"+x(y);return;case"horiz-align":u[o++]="text-align:"+y;return;case"vert-align":u[o++]="vertical-align:"+y;return;case"font-color":case"mso-foreground":u[o++]="color:"+y;return;case"mso-background":case"mso-highlight":u[o++]="background:"+y;return;case"mso-default-height":u[o++]="min-height:"+x(y);return;case"mso-default-width":u[o++]="min-width:"+x(y);return;case"mso-padding-between-alt":u[o++]="border-collapse:separate;border-spacing:"+x(y);return;case"text-line-through":if((y=="single")||(y=="double")){u[o++]="text-decoration:line-through"}return;case"mso-zero-height":if(y=="yes"){u[o++]="display:none"}return}if(/^(mso|column|font-emph|lang|layout|line-break|list-image|nav|panose|punct|row|ruby|sep|size|src|tab-|table-border|text-(?!align|decor|indent|trans)|top-bar|version|vnd|word-break)/.test(w)){return}u[o++]=w+":"+z[1]}});if(o>0){return h+' style="'+u.join(";")+'"'}else{return h}}]])}}if(b(k,"paste_convert_headers_to_strong")){d([[/<h[1-6][^>]*>/gi,"<p><strong>"],[/<\/h[1-6][^>]*>/gi,"</strong></p>"]])}d([[/Version:[\d.]+\nStartHTML:\d+\nEndHTML:\d+\nStartFragment:\d+\nEndFragment:\d+/gi,""]]);i=b(k,"paste_strip_class_attributes");if(i!=="none"){function m(q,o){if(i==="all"){return""}var h=p(n(o.replace(/^(["'])(.*)\1$/,"$2")," "),function(r){return(/^(?!mso)/i.test(r))});return h.length?' class="'+h.join(" ")+'"':""}j=j.replace(/ class="([^"]+)"/gi,m);j=j.replace(/ class=([\-\w]+)/gi,m)}if(b(k,"paste_remove_spans")){j=j.replace(/<\/?span[^>]*>/gi,"")}e.content=j},_postProcess:function(g,i){var f=this,e=f.editor,h=e.dom,d;if(e.settings.paste_enable_default_filters==false){return}if(i.wordContent){c(h.select("a",i.node),function(j){if(!j.href||j.href.indexOf("#_Toc")!=-1){h.remove(j,1)}});if(b(e,"paste_convert_middot_lists")){f._convertLists(g,i)}d=b(e,"paste_retain_style_properties");if((tinymce.is(d,"string"))&&(d!=="all")&&(d!=="*")){d=tinymce.explode(d.replace(/^none$/i,""));c(h.select("*",i.node),function(m){var n={},k=0,l,o,j;if(d){for(l=0;l<d.length;l++){o=d[l];j=h.getStyle(m,o);if(j){n[o]=j;k++}}}h.setAttrib(m,"style","");if(d&&k>0){h.setStyles(m,n)}else{if(m.nodeName=="SPAN"&&!m.className){h.remove(m,true)}}})}}if(b(e,"paste_remove_styles")||(b(e,"paste_remove_styles_if_webkit")&&tinymce.isWebKit)){c(h.select("*[style]",i.node),function(j){j.removeAttribute("style");j.removeAttribute("data-mce-style")})}else{if(tinymce.isWebKit){c(h.select("*",i.node),function(j){j.removeAttribute("data-mce-style")})}}},_convertLists:function(g,e){var i=g.editor.dom,h,l,d=-1,f,m=[],k,j;c(i.select("p",e.node),function(t){var q,u="",s,r,n,o;for(q=t.firstChild;q&&q.nodeType==3;q=q.nextSibling){u+=q.nodeValue}u=t.innerHTML.replace(/<\/?\w+[^>]*>/gi,"").replace(/&nbsp;/g,"\u00a0");if(/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*\u00a0*/.test(u)){s="ul"}if(/^__MCE_ITEM__\s*\w+\.\s*\u00a0+/.test(u)){s="ol"}if(s){f=parseFloat(t.style.marginLeft||0);if(f>d){m.push(f)}if(!h||s!=k){h=i.create(s);i.insertAfter(h,t)}else{if(f>d){h=l.appendChild(i.create(s))}else{if(f<d){n=tinymce.inArray(m,f);o=i.getParents(h.parentNode,s);h=o[o.length-1-n]||h}}}c(i.select("span",t),function(v){var p=v.innerHTML.replace(/<\/?\w+[^>]*>/gi,"");if(s=="ul"&&/^__MCE_ITEM__[\u2022\u00b7\u00a7\u00d8o\u25CF]/.test(p)){i.remove(v)}else{if(/^__MCE_ITEM__[\s\S]*\w+\.(&nbsp;|\u00a0)*\s*/.test(p)){i.remove(v)}}});r=t.innerHTML;if(s=="ul"){r=t.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*(&nbsp;|\u00a0)+\s*/,"")}else{r=t.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^\s*\w+\.(&nbsp;|\u00a0)+\s*/,"")}l=h.appendChild(i.create("li",0,r));i.remove(t);d=f;k=s}else{h=d=0}});j=e.node.innerHTML;if(j.indexOf("__MCE_ITEM__")!=-1){e.node.innerHTML=j.replace(/__MCE_ITEM__/g,"")}},_insert:function(f,d){var e=this.editor,g=e.selection.getRng();if(!e.selection.isCollapsed()&&g.startContainer!=g.endContainer){e.getDoc().execCommand("Delete",false,null)}e.execCommand("mceInsertContent",false,f,{skip_undo:d})},_insertPlainText:function(j){var h=this.editor,f=b(h,"paste_text_linebreaktype"),k=b(h,"paste_text_replacements"),g=tinymce.is;function e(m){c(m,function(n){if(n.constructor==RegExp){j=j.replace(n,"")}else{j=j.replace(n[0],n[1])}})}if((typeof(j)==="string")&&(j.length>0)){if(/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(j)){e([/[\n\r]+/g])}else{e([/\r+/g])}e([[/<\/(?:p|h[1-6]|ul|ol|dl|table|div|blockquote|fieldset|pre|address|center)>/gi,"\n\n"],[/<br[^>]*>|<\/tr>/gi,"\n"],[/<\/t[dh]>\s*<t[dh][^>]*>/gi,"\t"],/<[a-z!\/?][^>]*>/gi,[/&nbsp;/gi," "],[/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi,"$1"]]);var d=Number(b(h,"paste_max_consecutive_linebreaks"));if(d>-1){var l=new RegExp("\n{"+(d+1)+",}","g");var i="";while(i.length<d){i+="\n"}e([[l,i]])}j=h.dom.decode(tinymce.html.Entities.encodeRaw(j));if(g(k,"array")){e(k)}else{if(g(k,"string")){e(new RegExp(k,"gi"))}}if(f=="none"){e([[/\n+/g," "]])}else{if(f=="br"){e([[/\n/g,"<br />"]])}else{if(f=="p"){e([[/\n+/g,"</p><p>"],[/^(.*<\/p>)(<p>)$/,"<p>$1"]])}else{e([[/\n\n/g,"</p><p>"],[/^(.*<\/p>)(<p>)$/,"<p>$1"],[/\n/g,"<br />"]])}}}h.execCommand("mceInsertContent",false,j)}},_legacySupport:function(){var e=this,d=e.editor;d.addCommand("mcePasteWord",function(){d.windowManager.open({file:e.url+"/pasteword.htm",width:parseInt(b(d,"paste_dialog_width")),height:parseInt(b(d,"paste_dialog_height")),inline:1})});if(b(d,"paste_text_use_dialog")){d.addCommand("mcePasteText",function(){d.windowManager.open({file:e.url+"/pastetext.htm",width:parseInt(b(d,"paste_dialog_width")),height:parseInt(b(d,"paste_dialog_height")),inline:1})})}d.addButton("pasteword",{title:"paste.paste_word_desc",cmd:"mcePasteWord"})}});tinymce.PluginManager.add("paste",tinymce.plugins.PastePlugin)})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/paste/editor_plugin_src.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/paste/editor_plugin_src.js
new file mode 100755
index 00000000..0154eceb
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/paste/editor_plugin_src.js
@@ -0,0 +1,885 @@
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+ var each = tinymce.each,
+ defs = {
+ paste_auto_cleanup_on_paste : true,
+ paste_enable_default_filters : true,
+ paste_block_drop : false,
+ paste_retain_style_properties : "none",
+ paste_strip_class_attributes : "mso",
+ paste_remove_spans : false,
+ paste_remove_styles : false,
+ paste_remove_styles_if_webkit : true,
+ paste_convert_middot_lists : true,
+ paste_convert_headers_to_strong : false,
+ paste_dialog_width : "450",
+ paste_dialog_height : "400",
+ paste_max_consecutive_linebreaks: 2,
+ paste_text_use_dialog : false,
+ paste_text_sticky : false,
+ paste_text_sticky_default : false,
+ paste_text_notifyalways : false,
+ paste_text_linebreaktype : "combined",
+ paste_text_replacements : [
+ [/\u2026/g, "..."],
+ [/[\x93\x94\u201c\u201d]/g, '"'],
+ [/[\x60\x91\x92\u2018\u2019]/g, "'"]
+ ]
+ };
+
+ function getParam(ed, name) {
+ return ed.getParam(name, defs[name]);
+ }
+
+ tinymce.create('tinymce.plugins.PastePlugin', {
+ init : function(ed, url) {
+ var t = this;
+
+ t.editor = ed;
+ t.url = url;
+
+ // Setup plugin events
+ t.onPreProcess = new tinymce.util.Dispatcher(t);
+ t.onPostProcess = new tinymce.util.Dispatcher(t);
+
+ // Register default handlers
+ t.onPreProcess.add(t._preProcess);
+ t.onPostProcess.add(t._postProcess);
+
+ // Register optional preprocess handler
+ t.onPreProcess.add(function(pl, o) {
+ ed.execCallback('paste_preprocess', pl, o);
+ });
+
+ // Register optional postprocess
+ t.onPostProcess.add(function(pl, o) {
+ ed.execCallback('paste_postprocess', pl, o);
+ });
+
+ ed.onKeyDown.addToTop(function(ed, e) {
+ // Block ctrl+v from adding an undo level since the default logic in tinymce.Editor will add that
+ if (((tinymce.isMac ? e.metaKey : e.ctrlKey) && e.keyCode == 86) || (e.shiftKey && e.keyCode == 45))
+ return false; // Stop other listeners
+ });
+
+ // Initialize plain text flag
+ ed.pasteAsPlainText = getParam(ed, 'paste_text_sticky_default');
+
+ // This function executes the process handlers and inserts the contents
+ // force_rich overrides plain text mode set by user, important for pasting with execCommand
+ function process(o, force_rich) {
+ var dom = ed.dom, rng;
+
+ // Execute pre process handlers
+ t.onPreProcess.dispatch(t, o);
+
+ // Create DOM structure
+ o.node = dom.create('div', 0, o.content);
+
+ // If pasting inside the same element and the contents is only one block
+ // remove the block and keep the text since Firefox will copy parts of pre and h1-h6 as a pre element
+ if (tinymce.isGecko) {
+ rng = ed.selection.getRng(true);
+ if (rng.startContainer == rng.endContainer && rng.startContainer.nodeType == 3) {
+ // Is only one block node and it doesn't contain word stuff
+ if (o.node.childNodes.length === 1 && /^(p|h[1-6]|pre)$/i.test(o.node.firstChild.nodeName) && o.content.indexOf('__MCE_ITEM__') === -1)
+ dom.remove(o.node.firstChild, true);
+ }
+ }
+
+ // Execute post process handlers
+ t.onPostProcess.dispatch(t, o);
+
+ // Serialize content
+ o.content = ed.serializer.serialize(o.node, {getInner : 1, forced_root_block : ''});
+
+ // Plain text option active?
+ if ((!force_rich) && (ed.pasteAsPlainText)) {
+ t._insertPlainText(o.content);
+
+ if (!getParam(ed, "paste_text_sticky")) {
+ ed.pasteAsPlainText = false;
+ ed.controlManager.setActive("pastetext", false);
+ }
+ } else {
+ t._insert(o.content);
+ }
+ }
+
+ // Add command for external usage
+ ed.addCommand('mceInsertClipboardContent', function(u, o) {
+ process(o, true);
+ });
+
+ if (!getParam(ed, "paste_text_use_dialog")) {
+ ed.addCommand('mcePasteText', function(u, v) {
+ var cookie = tinymce.util.Cookie;
+
+ ed.pasteAsPlainText = !ed.pasteAsPlainText;
+ ed.controlManager.setActive('pastetext', ed.pasteAsPlainText);
+
+ if ((ed.pasteAsPlainText) && (!cookie.get("tinymcePasteText"))) {
+ if (getParam(ed, "paste_text_sticky")) {
+ ed.windowManager.alert(ed.translate('paste.plaintext_mode_sticky'));
+ } else {
+ ed.windowManager.alert(ed.translate('paste.plaintext_mode'));
+ }
+
+ if (!getParam(ed, "paste_text_notifyalways")) {
+ cookie.set("tinymcePasteText", "1", new Date(new Date().getFullYear() + 1, 12, 31))
+ }
+ }
+ });
+ }
+
+ ed.addButton('pastetext', {title: 'paste.paste_text_desc', cmd: 'mcePasteText'});
+ ed.addButton('selectall', {title: 'paste.selectall_desc', cmd: 'selectall'});
+
+ // This function grabs the contents from the clipboard by adding a
+ // hidden div and placing the caret inside it and after the browser paste
+ // is done it grabs that contents and processes that
+ function grabContent(e) {
+ var n, or, rng, oldRng, sel = ed.selection, dom = ed.dom, body = ed.getBody(), posY, textContent;
+
+ // Check if browser supports direct plaintext access
+ if (e.clipboardData || dom.doc.dataTransfer) {
+ textContent = (e.clipboardData || dom.doc.dataTransfer).getData('Text');
+
+ if (ed.pasteAsPlainText) {
+ e.preventDefault();
+ process({content : dom.encode(textContent).replace(/\r?\n/g, '<br />')});
+ return;
+ }
+ }
+
+ if (dom.get('_mcePaste'))
+ return;
+
+ // Create container to paste into
+ n = dom.add(body, 'div', {id : '_mcePaste', 'class' : 'mcePaste', 'data-mce-bogus' : '1'}, '\uFEFF\uFEFF');
+
+ // If contentEditable mode we need to find out the position of the closest element
+ if (body != ed.getDoc().body)
+ posY = dom.getPos(ed.selection.getStart(), body).y;
+ else
+ posY = body.scrollTop + dom.getViewPort(ed.getWin()).y;
+
+ // Styles needs to be applied after the element is added to the document since WebKit will otherwise remove all styles
+ // If also needs to be in view on IE or the paste would fail
+ dom.setStyles(n, {
+ position : 'absolute',
+ left : tinymce.isGecko ? -40 : 0, // Need to move it out of site on Gecko since it will othewise display a ghost resize rect for the div
+ top : posY - 25,
+ width : 1,
+ height : 1,
+ overflow : 'hidden'
+ });
+
+ if (tinymce.isIE) {
+ // Store away the old range
+ oldRng = sel.getRng();
+
+ // Select the container
+ rng = dom.doc.body.createTextRange();
+ rng.moveToElementText(n);
+ rng.execCommand('Paste');
+
+ // Remove container
+ dom.remove(n);
+
+ // Check if the contents was changed, if it wasn't then clipboard extraction failed probably due
+ // to IE security settings so we pass the junk though better than nothing right
+ if (n.innerHTML === '\uFEFF\uFEFF') {
+ ed.execCommand('mcePasteWord');
+ e.preventDefault();
+ return;
+ }
+
+ // Restore the old range and clear the contents before pasting
+ sel.setRng(oldRng);
+ sel.setContent('');
+
+ // For some odd reason we need to detach the the mceInsertContent call from the paste event
+ // It's like IE has a reference to the parent element that you paste in and the selection gets messed up
+ // when it tries to restore the selection
+ setTimeout(function() {
+ // Process contents
+ process({content : n.innerHTML});
+ }, 0);
+
+ // Block the real paste event
+ return tinymce.dom.Event.cancel(e);
+ } else {
+ function block(e) {
+ e.preventDefault();
+ };
+
+ // Block mousedown and click to prevent selection change
+ dom.bind(ed.getDoc(), 'mousedown', block);
+ dom.bind(ed.getDoc(), 'keydown', block);
+
+ or = ed.selection.getRng();
+
+ // Move select contents inside DIV
+ n = n.firstChild;
+ rng = ed.getDoc().createRange();
+ rng.setStart(n, 0);
+ rng.setEnd(n, 2);
+ sel.setRng(rng);
+
+ // Wait a while and grab the pasted contents
+ window.setTimeout(function() {
+ var h = '', nl;
+
+ // Paste divs duplicated in paste divs seems to happen when you paste plain text so lets first look for that broken behavior in WebKit
+ if (!dom.select('div.mcePaste > div.mcePaste').length) {
+ nl = dom.select('div.mcePaste');
+
+ // WebKit will split the div into multiple ones so this will loop through then all and join them to get the whole HTML string
+ each(nl, function(n) {
+ var child = n.firstChild;
+
+ // WebKit inserts a DIV container with lots of odd styles
+ if (child && child.nodeName == 'DIV' && child.style.marginTop && child.style.backgroundColor) {
+ dom.remove(child, 1);
+ }
+
+ // Remove apply style spans
+ each(dom.select('span.Apple-style-span', n), function(n) {
+ dom.remove(n, 1);
+ });
+
+ // Remove bogus br elements
+ each(dom.select('br[data-mce-bogus]', n), function(n) {
+ dom.remove(n);
+ });
+
+ // WebKit will make a copy of the DIV for each line of plain text pasted and insert them into the DIV
+ if (n.parentNode.className != 'mcePaste')
+ h += n.innerHTML;
+ });
+ } else {
+ // Found WebKit weirdness so force the content into paragraphs this seems to happen when you paste plain text from Nodepad etc
+ // So this logic will replace double enter with paragraphs and single enter with br so it kind of looks the same
+ h = '<p>' + dom.encode(textContent).replace(/\r?\n\r?\n/g, '</p><p>').replace(/\r?\n/g, '<br />') + '</p>';
+ }
+
+ // Remove the nodes
+ each(dom.select('div.mcePaste'), function(n) {
+ dom.remove(n);
+ });
+
+ // Restore the old selection
+ if (or)
+ sel.setRng(or);
+
+ process({content : h});
+
+ // Unblock events ones we got the contents
+ dom.unbind(ed.getDoc(), 'mousedown', block);
+ dom.unbind(ed.getDoc(), 'keydown', block);
+ }, 0);
+ }
+ }
+
+ // Check if we should use the new auto process method
+ if (getParam(ed, "paste_auto_cleanup_on_paste")) {
+ // Is it's Opera or older FF use key handler
+ if (tinymce.isOpera || /Firefox\/2/.test(navigator.userAgent)) {
+ ed.onKeyDown.addToTop(function(ed, e) {
+ if (((tinymce.isMac ? e.metaKey : e.ctrlKey) && e.keyCode == 86) || (e.shiftKey && e.keyCode == 45))
+ grabContent(e);
+ });
+ } else {
+ // Grab contents on paste event on Gecko and WebKit
+ ed.onPaste.addToTop(function(ed, e) {
+ return grabContent(e);
+ });
+ }
+ }
+
+ ed.onInit.add(function() {
+ ed.controlManager.setActive("pastetext", ed.pasteAsPlainText);
+
+ // Block all drag/drop events
+ if (getParam(ed, "paste_block_drop")) {
+ ed.dom.bind(ed.getBody(), ['dragend', 'dragover', 'draggesture', 'dragdrop', 'drop', 'drag'], function(e) {
+ e.preventDefault();
+ e.stopPropagation();
+
+ return false;
+ });
+ }
+ });
+
+ // Add legacy support
+ t._legacySupport();
+ },
+
+ getInfo : function() {
+ return {
+ longname : 'Paste text/word',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ };
+ },
+
+ _preProcess : function(pl, o) {
+ var ed = this.editor,
+ h = o.content,
+ grep = tinymce.grep,
+ explode = tinymce.explode,
+ trim = tinymce.trim,
+ len, stripClass;
+
+ //console.log('Before preprocess:' + o.content);
+
+ function process(items) {
+ each(items, function(v) {
+ // Remove or replace
+ if (v.constructor == RegExp)
+ h = h.replace(v, '');
+ else
+ h = h.replace(v[0], v[1]);
+ });
+ }
+
+ if (ed.settings.paste_enable_default_filters == false) {
+ return;
+ }
+
+ // IE9 adds BRs before/after block elements when contents is pasted from word or for example another browser
+ if (tinymce.isIE && document.documentMode >= 9 && /<(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)/.test(o.content)) {
+ // IE9 adds BRs before/after block elements when contents is pasted from word or for example another browser
+ process([[/(?:<br>&nbsp;[\s\r\n]+|<br>)*(<\/?(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)[^>]*>)(?:<br>&nbsp;[\s\r\n]+|<br>)*/g, '$1']]);
+
+ // IE9 also adds an extra BR element for each soft-linefeed and it also adds a BR for each word wrap break
+ process([
+ [/<br><br>/g, '<BR><BR>'], // Replace multiple BR elements with uppercase BR to keep them intact
+ [/<br>/g, ' '], // Replace single br elements with space since they are word wrap BR:s
+ [/<BR><BR>/g, '<br>'] // Replace back the double brs but into a single BR
+ ]);
+ }
+
+ // Detect Word content and process it more aggressive
+ if (/class="?Mso|style="[^"]*\bmso-|w:WordDocument/i.test(h) || o.wordContent) {
+ o.wordContent = true; // Mark the pasted contents as word specific content
+ //console.log('Word contents detected.');
+
+ // Process away some basic content
+ process([
+ /^\s*(&nbsp;)+/gi, // &nbsp; entities at the start of contents
+ /(&nbsp;|<br[^>]*>)+\s*$/gi // &nbsp; entities at the end of contents
+ ]);
+
+ if (getParam(ed, "paste_convert_headers_to_strong")) {
+ h = h.replace(/<p [^>]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi, "<p><strong>$1</strong></p>");
+ }
+
+ if (getParam(ed, "paste_convert_middot_lists")) {
+ process([
+ [/<!--\[if !supportLists\]-->/gi, '$&__MCE_ITEM__'], // Convert supportLists to a list item marker
+ [/(<span[^>]+(?:mso-list:|:\s*symbol)[^>]+>)/gi, '$1__MCE_ITEM__'], // Convert mso-list and symbol spans to item markers
+ [/(<p[^>]+(?:MsoListParagraph)[^>]+>)/gi, '$1__MCE_ITEM__'] // Convert mso-list and symbol paragraphs to item markers (FF)
+ ]);
+ }
+
+ process([
+ // Word comments like conditional comments etc
+ /<!--[\s\S]+?-->/gi,
+
+ // Remove comments, scripts (e.g., msoShowComment), XML tag, VML content, MS Office namespaced tags, and a few other tags
+ /<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,
+
+ // Convert <s> into <strike> for line-though
+ [/<(\/?)s>/gi, "<$1strike>"],
+
+ // Replace nsbp entites to char since it's easier to handle
+ [/&nbsp;/gi, "\u00a0"]
+ ]);
+
+ // Remove bad attributes, with or without quotes, ensuring that attribute text is really inside a tag.
+ // If JavaScript had a RegExp look-behind, we could have integrated this with the last process() array and got rid of the loop. But alas, it does not, so we cannot.
+ do {
+ len = h.length;
+ h = h.replace(/(<[a-z][^>]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi, "$1");
+ } while (len != h.length);
+
+ // Remove all spans if no styles is to be retained
+ if (getParam(ed, "paste_retain_style_properties").replace(/^none$/i, "").length == 0) {
+ h = h.replace(/<\/?span[^>]*>/gi, "");
+ } else {
+ // We're keeping styles, so at least clean them up.
+ // CSS Reference: http://msdn.microsoft.com/en-us/library/aa155477.aspx
+
+ process([
+ // Convert <span style="mso-spacerun:yes">___</span> to string of alternating breaking/non-breaking spaces of same length
+ [/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,
+ function(str, spaces) {
+ return (spaces.length > 0)? spaces.replace(/./, " ").slice(Math.floor(spaces.length/2)).split("").join("\u00a0") : "";
+ }
+ ],
+
+ // Examine all styles: delete junk, transform some, and keep the rest
+ [/(<[a-z][^>]*)\sstyle="([^"]*)"/gi,
+ function(str, tag, style) {
+ var n = [],
+ i = 0,
+ s = explode(trim(style).replace(/&quot;/gi, "'"), ";");
+
+ // Examine each style definition within the tag's style attribute
+ each(s, function(v) {
+ var name, value,
+ parts = explode(v, ":");
+
+ function ensureUnits(v) {
+ return v + ((v !== "0") && (/\d$/.test(v)))? "px" : "";
+ }
+
+ if (parts.length == 2) {
+ name = parts[0].toLowerCase();
+ value = parts[1].toLowerCase();
+
+ // Translate certain MS Office styles into their CSS equivalents
+ switch (name) {
+ case "mso-padding-alt":
+ case "mso-padding-top-alt":
+ case "mso-padding-right-alt":
+ case "mso-padding-bottom-alt":
+ case "mso-padding-left-alt":
+ case "mso-margin-alt":
+ case "mso-margin-top-alt":
+ case "mso-margin-right-alt":
+ case "mso-margin-bottom-alt":
+ case "mso-margin-left-alt":
+ case "mso-table-layout-alt":
+ case "mso-height":
+ case "mso-width":
+ case "mso-vertical-align-alt":
+ n[i++] = name.replace(/^mso-|-alt$/g, "") + ":" + ensureUnits(value);
+ return;
+
+ case "horiz-align":
+ n[i++] = "text-align:" + value;
+ return;
+
+ case "vert-align":
+ n[i++] = "vertical-align:" + value;
+ return;
+
+ case "font-color":
+ case "mso-foreground":
+ n[i++] = "color:" + value;
+ return;
+
+ case "mso-background":
+ case "mso-highlight":
+ n[i++] = "background:" + value;
+ return;
+
+ case "mso-default-height":
+ n[i++] = "min-height:" + ensureUnits(value);
+ return;
+
+ case "mso-default-width":
+ n[i++] = "min-width:" + ensureUnits(value);
+ return;
+
+ case "mso-padding-between-alt":
+ n[i++] = "border-collapse:separate;border-spacing:" + ensureUnits(value);
+ return;
+
+ case "text-line-through":
+ if ((value == "single") || (value == "double")) {
+ n[i++] = "text-decoration:line-through";
+ }
+ return;
+
+ case "mso-zero-height":
+ if (value == "yes") {
+ n[i++] = "display:none";
+ }
+ return;
+ }
+
+ // Eliminate all MS Office style definitions that have no CSS equivalent by examining the first characters in the name
+ if (/^(mso|column|font-emph|lang|layout|line-break|list-image|nav|panose|punct|row|ruby|sep|size|src|tab-|table-border|text-(?!align|decor|indent|trans)|top-bar|version|vnd|word-break)/.test(name)) {
+ return;
+ }
+
+ // If it reached this point, it must be a valid CSS style
+ n[i++] = name + ":" + parts[1]; // Lower-case name, but keep value case
+ }
+ });
+
+ // If style attribute contained any valid styles the re-write it; otherwise delete style attribute.
+ if (i > 0) {
+ return tag + ' style="' + n.join(';') + '"';
+ } else {
+ return tag;
+ }
+ }
+ ]
+ ]);
+ }
+ }
+
+ // Replace headers with <strong>
+ if (getParam(ed, "paste_convert_headers_to_strong")) {
+ process([
+ [/<h[1-6][^>]*>/gi, "<p><strong>"],
+ [/<\/h[1-6][^>]*>/gi, "</strong></p>"]
+ ]);
+ }
+
+ process([
+ // Copy paste from Java like Open Office will produce this junk on FF
+ [/Version:[\d.]+\nStartHTML:\d+\nEndHTML:\d+\nStartFragment:\d+\nEndFragment:\d+/gi, '']
+ ]);
+
+ // Class attribute options are: leave all as-is ("none"), remove all ("all"), or remove only those starting with mso ("mso").
+ // Note:- paste_strip_class_attributes: "none", verify_css_classes: true is also a good variation.
+ stripClass = getParam(ed, "paste_strip_class_attributes");
+
+ if (stripClass !== "none") {
+ function removeClasses(match, g1) {
+ if (stripClass === "all")
+ return '';
+
+ var cls = grep(explode(g1.replace(/^(["'])(.*)\1$/, "$2"), " "),
+ function(v) {
+ return (/^(?!mso)/i.test(v));
+ }
+ );
+
+ return cls.length ? ' class="' + cls.join(" ") + '"' : '';
+ };
+
+ h = h.replace(/ class="([^"]+)"/gi, removeClasses);
+ h = h.replace(/ class=([\-\w]+)/gi, removeClasses);
+ }
+
+ // Remove spans option
+ if (getParam(ed, "paste_remove_spans")) {
+ h = h.replace(/<\/?span[^>]*>/gi, "");
+ }
+
+ //console.log('After preprocess:' + h);
+
+ o.content = h;
+ },
+
+ /**
+ * Various post process items.
+ */
+ _postProcess : function(pl, o) {
+ var t = this, ed = t.editor, dom = ed.dom, styleProps;
+
+ if (ed.settings.paste_enable_default_filters == false) {
+ return;
+ }
+
+ if (o.wordContent) {
+ // Remove named anchors or TOC links
+ each(dom.select('a', o.node), function(a) {
+ if (!a.href || a.href.indexOf('#_Toc') != -1)
+ dom.remove(a, 1);
+ });
+
+ if (getParam(ed, "paste_convert_middot_lists")) {
+ t._convertLists(pl, o);
+ }
+
+ // Process styles
+ styleProps = getParam(ed, "paste_retain_style_properties"); // retained properties
+
+ // Process only if a string was specified and not equal to "all" or "*"
+ if ((tinymce.is(styleProps, "string")) && (styleProps !== "all") && (styleProps !== "*")) {
+ styleProps = tinymce.explode(styleProps.replace(/^none$/i, ""));
+
+ // Retains some style properties
+ each(dom.select('*', o.node), function(el) {
+ var newStyle = {}, npc = 0, i, sp, sv;
+
+ // Store a subset of the existing styles
+ if (styleProps) {
+ for (i = 0; i < styleProps.length; i++) {
+ sp = styleProps[i];
+ sv = dom.getStyle(el, sp);
+
+ if (sv) {
+ newStyle[sp] = sv;
+ npc++;
+ }
+ }
+ }
+
+ // Remove all of the existing styles
+ dom.setAttrib(el, 'style', '');
+
+ if (styleProps && npc > 0)
+ dom.setStyles(el, newStyle); // Add back the stored subset of styles
+ else // Remove empty span tags that do not have class attributes
+ if (el.nodeName == 'SPAN' && !el.className)
+ dom.remove(el, true);
+ });
+ }
+ }
+
+ // Remove all style information or only specifically on WebKit to avoid the style bug on that browser
+ if (getParam(ed, "paste_remove_styles") || (getParam(ed, "paste_remove_styles_if_webkit") && tinymce.isWebKit)) {
+ each(dom.select('*[style]', o.node), function(el) {
+ el.removeAttribute('style');
+ el.removeAttribute('data-mce-style');
+ });
+ } else {
+ if (tinymce.isWebKit) {
+ // We need to compress the styles on WebKit since if you paste <img border="0" /> it will become <img border="0" style="... lots of junk ..." />
+ // Removing the mce_style that contains the real value will force the Serializer engine to compress the styles
+ each(dom.select('*', o.node), function(el) {
+ el.removeAttribute('data-mce-style');
+ });
+ }
+ }
+ },
+
+ /**
+ * Converts the most common bullet and number formats in Office into a real semantic UL/LI list.
+ */
+ _convertLists : function(pl, o) {
+ var dom = pl.editor.dom, listElm, li, lastMargin = -1, margin, levels = [], lastType, html;
+
+ // Convert middot lists into real semantic lists
+ each(dom.select('p', o.node), function(p) {
+ var sib, val = '', type, html, idx, parents;
+
+ // Get text node value at beginning of paragraph
+ for (sib = p.firstChild; sib && sib.nodeType == 3; sib = sib.nextSibling)
+ val += sib.nodeValue;
+
+ val = p.innerHTML.replace(/<\/?\w+[^>]*>/gi, '').replace(/&nbsp;/g, '\u00a0');
+
+ // Detect unordered lists look for bullets
+ if (/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*\u00a0*/.test(val))
+ type = 'ul';
+
+ // Detect ordered lists 1., a. or ixv.
+ if (/^__MCE_ITEM__\s*\w+\.\s*\u00a0+/.test(val))
+ type = 'ol';
+
+ // Check if node value matches the list pattern: o&nbsp;&nbsp;
+ if (type) {
+ margin = parseFloat(p.style.marginLeft || 0);
+
+ if (margin > lastMargin)
+ levels.push(margin);
+
+ if (!listElm || type != lastType) {
+ listElm = dom.create(type);
+ dom.insertAfter(listElm, p);
+ } else {
+ // Nested list element
+ if (margin > lastMargin) {
+ listElm = li.appendChild(dom.create(type));
+ } else if (margin < lastMargin) {
+ // Find parent level based on margin value
+ idx = tinymce.inArray(levels, margin);
+ parents = dom.getParents(listElm.parentNode, type);
+ listElm = parents[parents.length - 1 - idx] || listElm;
+ }
+ }
+
+ // Remove middot or number spans if they exists
+ each(dom.select('span', p), function(span) {
+ var html = span.innerHTML.replace(/<\/?\w+[^>]*>/gi, '');
+
+ // Remove span with the middot or the number
+ if (type == 'ul' && /^__MCE_ITEM__[\u2022\u00b7\u00a7\u00d8o\u25CF]/.test(html))
+ dom.remove(span);
+ else if (/^__MCE_ITEM__[\s\S]*\w+\.(&nbsp;|\u00a0)*\s*/.test(html))
+ dom.remove(span);
+ });
+
+ html = p.innerHTML;
+
+ // Remove middot/list items
+ if (type == 'ul')
+ html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*(&nbsp;|\u00a0)+\s*/, '');
+ else
+ html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^\s*\w+\.(&nbsp;|\u00a0)+\s*/, '');
+
+ // Create li and add paragraph data into the new li
+ li = listElm.appendChild(dom.create('li', 0, html));
+ dom.remove(p);
+
+ lastMargin = margin;
+ lastType = type;
+ } else
+ listElm = lastMargin = 0; // End list element
+ });
+
+ // Remove any left over makers
+ html = o.node.innerHTML;
+ if (html.indexOf('__MCE_ITEM__') != -1)
+ o.node.innerHTML = html.replace(/__MCE_ITEM__/g, '');
+ },
+
+ /**
+ * Inserts the specified contents at the caret position.
+ */
+ _insert : function(h, skip_undo) {
+ var ed = this.editor, r = ed.selection.getRng();
+
+ // First delete the contents seems to work better on WebKit when the selection spans multiple list items or multiple table cells.
+ if (!ed.selection.isCollapsed() && r.startContainer != r.endContainer)
+ ed.getDoc().execCommand('Delete', false, null);
+
+ ed.execCommand('mceInsertContent', false, h, {skip_undo : skip_undo});
+ },
+
+ /**
+ * Instead of the old plain text method which tried to re-create a paste operation, the
+ * new approach adds a plain text mode toggle switch that changes the behavior of paste.
+ * This function is passed the same input that the regular paste plugin produces.
+ * It performs additional scrubbing and produces (and inserts) the plain text.
+ * This approach leverages all of the great existing functionality in the paste
+ * plugin, and requires minimal changes to add the new functionality.
+ * Speednet - June 2009
+ */
+ _insertPlainText : function(content) {
+ var ed = this.editor,
+ linebr = getParam(ed, "paste_text_linebreaktype"),
+ rl = getParam(ed, "paste_text_replacements"),
+ is = tinymce.is;
+
+ function process(items) {
+ each(items, function(v) {
+ if (v.constructor == RegExp)
+ content = content.replace(v, "");
+ else
+ content = content.replace(v[0], v[1]);
+ });
+ };
+
+ if ((typeof(content) === "string") && (content.length > 0)) {
+ // If HTML content with line-breaking tags, then remove all cr/lf chars because only tags will break a line
+ if (/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(content)) {
+ process([
+ /[\n\r]+/g
+ ]);
+ } else {
+ // Otherwise just get rid of carriage returns (only need linefeeds)
+ process([
+ /\r+/g
+ ]);
+ }
+
+ process([
+ [/<\/(?:p|h[1-6]|ul|ol|dl|table|div|blockquote|fieldset|pre|address|center)>/gi, "\n\n"], // Block tags get a blank line after them
+ [/<br[^>]*>|<\/tr>/gi, "\n"], // Single linebreak for <br /> tags and table rows
+ [/<\/t[dh]>\s*<t[dh][^>]*>/gi, "\t"], // Table cells get tabs betweem them
+ /<[a-z!\/?][^>]*>/gi, // Delete all remaining tags
+ [/&nbsp;/gi, " "], // Convert non-break spaces to regular spaces (remember, *plain text*)
+ [/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi, "$1"] // Cool little RegExp deletes whitespace around linebreak chars.
+ ]);
+
+ var maxLinebreaks = Number(getParam(ed, "paste_max_consecutive_linebreaks"));
+ if (maxLinebreaks > -1) {
+ var maxLinebreaksRegex = new RegExp("\n{" + (maxLinebreaks + 1) + ",}", "g");
+ var linebreakReplacement = "";
+
+ while (linebreakReplacement.length < maxLinebreaks) {
+ linebreakReplacement += "\n";
+ }
+
+ process([
+ [maxLinebreaksRegex, linebreakReplacement] // Limit max consecutive linebreaks
+ ]);
+ }
+
+ content = ed.dom.decode(tinymce.html.Entities.encodeRaw(content));
+
+ // Perform default or custom replacements
+ if (is(rl, "array")) {
+ process(rl);
+ } else if (is(rl, "string")) {
+ process(new RegExp(rl, "gi"));
+ }
+
+ // Treat paragraphs as specified in the config
+ if (linebr == "none") {
+ // Convert all line breaks to space
+ process([
+ [/\n+/g, " "]
+ ]);
+ } else if (linebr == "br") {
+ // Convert all line breaks to <br />
+ process([
+ [/\n/g, "<br />"]
+ ]);
+ } else if (linebr == "p") {
+ // Convert all line breaks to <p>...</p>
+ process([
+ [/\n+/g, "</p><p>"],
+ [/^(.*<\/p>)(<p>)$/, '<p>$1']
+ ]);
+ } else {
+ // defaults to "combined"
+ // Convert single line breaks to <br /> and double line breaks to <p>...</p>
+ process([
+ [/\n\n/g, "</p><p>"],
+ [/^(.*<\/p>)(<p>)$/, '<p>$1'],
+ [/\n/g, "<br />"]
+ ]);
+ }
+
+ ed.execCommand('mceInsertContent', false, content);
+ }
+ },
+
+ /**
+ * This method will open the old style paste dialogs. Some users might want the old behavior but still use the new cleanup engine.
+ */
+ _legacySupport : function() {
+ var t = this, ed = t.editor;
+
+ // Register command(s) for backwards compatibility
+ ed.addCommand("mcePasteWord", function() {
+ ed.windowManager.open({
+ file: t.url + "/pasteword.htm",
+ width: parseInt(getParam(ed, "paste_dialog_width")),
+ height: parseInt(getParam(ed, "paste_dialog_height")),
+ inline: 1
+ });
+ });
+
+ if (getParam(ed, "paste_text_use_dialog")) {
+ ed.addCommand("mcePasteText", function() {
+ ed.windowManager.open({
+ file : t.url + "/pastetext.htm",
+ width: parseInt(getParam(ed, "paste_dialog_width")),
+ height: parseInt(getParam(ed, "paste_dialog_height")),
+ inline : 1
+ });
+ });
+ }
+
+ // Register button for backwards compatibility
+ ed.addButton("pasteword", {title : "paste.paste_word_desc", cmd : "mcePasteWord"});
+ }
+ });
+
+ // Register plugin
+ tinymce.PluginManager.add("paste", tinymce.plugins.PastePlugin);
+})();
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/paste/js/pastetext.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/paste/js/pastetext.js
new file mode 100644
index 00000000..c524f9eb
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/paste/js/pastetext.js
@@ -0,0 +1,36 @@
+tinyMCEPopup.requireLangPack();
+
+var PasteTextDialog = {
+ init : function() {
+ this.resize();
+ },
+
+ insert : function() {
+ var h = tinyMCEPopup.dom.encode(document.getElementById('content').value), lines;
+
+ // Convert linebreaks into paragraphs
+ if (document.getElementById('linebreaks').checked) {
+ lines = h.split(/\r?\n/);
+ if (lines.length > 1) {
+ h = '';
+ tinymce.each(lines, function(row) {
+ h += '<p>' + row + '</p>';
+ });
+ }
+ }
+
+ tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : h});
+ tinyMCEPopup.close();
+ },
+
+ resize : function() {
+ var vp = tinyMCEPopup.dom.getViewPort(window), el;
+
+ el = document.getElementById('content');
+
+ el.style.width = (vp.w - 20) + 'px';
+ el.style.height = (vp.h - 90) + 'px';
+ }
+};
+
+tinyMCEPopup.onInit.add(PasteTextDialog.init, PasteTextDialog);
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/paste/js/pasteword.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/paste/js/pasteword.js
new file mode 100644
index 00000000..a52731c3
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/paste/js/pasteword.js
@@ -0,0 +1,51 @@
+tinyMCEPopup.requireLangPack();
+
+var PasteWordDialog = {
+ init : function() {
+ var ed = tinyMCEPopup.editor, el = document.getElementById('iframecontainer'), ifr, doc, css, cssHTML = '';
+
+ // Create iframe
+ el.innerHTML = '<iframe id="iframe" src="javascript:\'\';" frameBorder="0" style="border: 1px solid gray"></iframe>';
+ ifr = document.getElementById('iframe');
+ doc = ifr.contentWindow.document;
+
+ // Force absolute CSS urls
+ css = [ed.baseURI.toAbsolute("themes/" + ed.settings.theme + "/skins/" + ed.settings.skin + "/content.css")];
+ css = css.concat(tinymce.explode(ed.settings.content_css) || []);
+ tinymce.each(css, function(u) {
+ cssHTML += '<link href="' + ed.documentBaseURI.toAbsolute('' + u) + '" rel="stylesheet" type="text/css" />';
+ });
+
+ // Write content into iframe
+ doc.open();
+ doc.write('<html><head>' + cssHTML + '</head><body class="mceContentBody" spellcheck="false"></body></html>');
+ doc.close();
+
+ doc.designMode = 'on';
+ this.resize();
+
+ window.setTimeout(function() {
+ ifr.contentWindow.focus();
+ }, 10);
+ },
+
+ insert : function() {
+ var h = document.getElementById('iframe').contentWindow.document.body.innerHTML;
+
+ tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : h, wordContent : true});
+ tinyMCEPopup.close();
+ },
+
+ resize : function() {
+ var vp = tinyMCEPopup.dom.getViewPort(window), el;
+
+ el = document.getElementById('iframe');
+
+ if (el) {
+ el.style.width = (vp.w - 20) + 'px';
+ el.style.height = (vp.h - 90) + 'px';
+ }
+ }
+};
+
+tinyMCEPopup.onInit.add(PasteWordDialog.init, PasteWordDialog);
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/paste/langs/de_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/paste/langs/de_dlg.js
new file mode 100644
index 00000000..d7bbe93d
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/paste/langs/de_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('de.paste_dlg',{"word_title":"Strg V auf der Tastatur dr\u00fccken, um den Text einzuf\u00fcgen.","text_linebreaks":"Zeilenumbr\u00fcche beibehalten","text_title":"Strg V auf der Tastatur dr\u00fccken, um den Text einzuf\u00fcgen."}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/paste/langs/en_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/paste/langs/en_dlg.js
new file mode 100644
index 00000000..bc74daf8
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/paste/langs/en_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('en.paste_dlg',{"word_title":"Use Ctrl+V on your keyboard to paste the text into the window.","text_linebreaks":"Keep Linebreaks","text_title":"Use Ctrl+V on your keyboard to paste the text into the window."}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/paste/langs/hu_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/paste/langs/hu_dlg.js
new file mode 100644
index 00000000..826a7bfb
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/paste/langs/hu_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('hu.paste_dlg',{"word_title":"Haszn\u00e1lja a Ctrl V-t a billenty\u0171zet\u00e9n a sz\u00f6veg beilleszt\u00e9shez.","text_linebreaks":"Sort\u00f6r\u00e9sek megtart\u00e1sa","text_title":"Haszn\u00e1lja a Ctrl V-t a billenty\u0171zet\u00e9n a sz\u00f6veg beilleszt\u00e9shez."}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/paste/langs/ja_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/paste/langs/ja_dlg.js
new file mode 100644
index 00000000..5af59822
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/paste/langs/ja_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('ja.paste_dlg',{"word_title":"Ctrl V(\u30ad\u30fc\u30dc\u30fc\u30c9)\u3092\u4f7f\u7528\u3057\u3066\u3001\u30c6\u30ad\u30b9\u30c8\u3092\u30a6\u30a3\u30f3\u30c9\u30a6\u306b\u8cbc\u308a\u4ed8\u3051\u3066\u304f\u3060\u3055\u3044\u3002","text_linebreaks":"\u6539\u884c\u3092\u4fdd\u6301","text_title":"Ctrl V(\u30ad\u30fc\u30dc\u30fc\u30c9)\u3092\u4f7f\u7528\u3057\u3066\u3001\u30c6\u30ad\u30b9\u30c8\u3092\u30a6\u30a3\u30f3\u30c9\u30a6\u306b\u8cbc\u308a\u4ed8\u3051\u3066\u304f\u3060\u3055\u3044\u3002"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/paste/pastetext.htm b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/paste/pastetext.htm
new file mode 100755
index 00000000..b6559454
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/paste/pastetext.htm
@@ -0,0 +1,27 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>{#paste.paste_text_desc}</title>
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script type="text/javascript" src="js/pastetext.js"></script>
+</head>
+<body onresize="PasteTextDialog.resize();" style="display:none; overflow:hidden;">
+ <form name="source" onsubmit="return PasteTextDialog.insert();" action="#">
+ <div style="float: left" class="title">{#paste.paste_text_desc}</div>
+
+ <div style="float: right">
+ <input type="checkbox" name="linebreaks" id="linebreaks" class="wordWrapCode" checked="checked" /><label for="linebreaks">{#paste_dlg.text_linebreaks}</label>
+ </div>
+
+ <br style="clear: both" />
+
+ <div>{#paste_dlg.text_title}</div>
+
+ <textarea id="content" name="content" rows="15" cols="100" style="width: 100%; height: 100%; font-family: 'Courier New',Courier,mono; font-size: 12px;" dir="ltr" wrap="soft" class="mceFocus"></textarea>
+
+ <div class="mceActionPanel">
+ <input type="submit" name="insert" value="{#insert}" id="insert" />
+ <input type="button" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" id="cancel" />
+ </div>
+ </form>
+</body>
+</html> \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/paste/pasteword.htm b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/paste/pasteword.htm
new file mode 100755
index 00000000..0f6bb412
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/paste/pasteword.htm
@@ -0,0 +1,21 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>{#paste.paste_word_desc}</title>
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script type="text/javascript" src="js/pasteword.js"></script>
+</head>
+<body onresize="PasteWordDialog.resize();" style="display:none; overflow:hidden;">
+ <form name="source" onsubmit="return PasteWordDialog.insert();" action="#">
+ <div class="title">{#paste.paste_word_desc}</div>
+
+ <div>{#paste_dlg.word_title}</div>
+
+ <div id="iframecontainer"></div>
+
+ <div class="mceActionPanel">
+ <input type="submit" id="insert" name="insert" value="{#insert}" />
+ <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
+ </div>
+ </form>
+</body>
+</html>
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/preview/editor_plugin.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/preview/editor_plugin.js
new file mode 100755
index 00000000..507909c5
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/preview/editor_plugin.js
@@ -0,0 +1 @@
+(function(){tinymce.create("tinymce.plugins.Preview",{init:function(a,b){var d=this,c=tinymce.explode(a.settings.content_css);d.editor=a;tinymce.each(c,function(f,e){c[e]=a.documentBaseURI.toAbsolute(f)});a.addCommand("mcePreview",function(){a.windowManager.open({file:a.getParam("plugin_preview_pageurl",b+"/preview.html"),width:parseInt(a.getParam("plugin_preview_width","550")),height:parseInt(a.getParam("plugin_preview_height","600")),resizable:"yes",scrollbars:"yes",popup_css:c?c.join(","):a.baseURI.toAbsolute("themes/"+a.settings.theme+"/skins/"+a.settings.skin+"/content.css"),inline:a.getParam("plugin_preview_inline",1)},{base:a.documentBaseURI.getURI()})});a.addButton("preview",{title:"preview.preview_desc",cmd:"mcePreview"})},getInfo:function(){return{longname:"Preview",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/preview",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("preview",tinymce.plugins.Preview)})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/preview/editor_plugin_src.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/preview/editor_plugin_src.js
new file mode 100755
index 00000000..80f00f0d
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/preview/editor_plugin_src.js
@@ -0,0 +1,53 @@
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+ tinymce.create('tinymce.plugins.Preview', {
+ init : function(ed, url) {
+ var t = this, css = tinymce.explode(ed.settings.content_css);
+
+ t.editor = ed;
+
+ // Force absolute CSS urls
+ tinymce.each(css, function(u, k) {
+ css[k] = ed.documentBaseURI.toAbsolute(u);
+ });
+
+ ed.addCommand('mcePreview', function() {
+ ed.windowManager.open({
+ file : ed.getParam("plugin_preview_pageurl", url + "/preview.html"),
+ width : parseInt(ed.getParam("plugin_preview_width", "550")),
+ height : parseInt(ed.getParam("plugin_preview_height", "600")),
+ resizable : "yes",
+ scrollbars : "yes",
+ popup_css : css ? css.join(',') : ed.baseURI.toAbsolute("themes/" + ed.settings.theme + "/skins/" + ed.settings.skin + "/content.css"),
+ inline : ed.getParam("plugin_preview_inline", 1)
+ }, {
+ base : ed.documentBaseURI.getURI()
+ });
+ });
+
+ ed.addButton('preview', {title : 'preview.preview_desc', cmd : 'mcePreview'});
+ },
+
+ getInfo : function() {
+ return {
+ longname : 'Preview',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/preview',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ };
+ }
+ });
+
+ // Register plugin
+ tinymce.PluginManager.add('preview', tinymce.plugins.Preview);
+})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/preview/example.html b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/preview/example.html
new file mode 100755
index 00000000..b2c3d90c
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/preview/example.html
@@ -0,0 +1,28 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<script language="javascript" src="../../tiny_mce_popup.js"></script>
+<script type="text/javascript" src="jscripts/embed.js"></script>
+<script type="text/javascript">
+tinyMCEPopup.onInit.add(function(ed) {
+ var dom = tinyMCEPopup.dom;
+
+ // Load editor content_css
+ tinymce.each(ed.settings.content_css.split(','), function(u) {
+ dom.loadCSS(ed.documentBaseURI.toAbsolute(u));
+ });
+
+ // Place contents inside div container
+ dom.setHTML('content', ed.getContent());
+});
+</script>
+<title>Example of a custom preview page</title>
+</head>
+<body>
+
+Editor contents: <br />
+<div id="content">
+<!-- Gets filled with editor contents -->
+</div>
+
+</body>
+</html>
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/preview/jscripts/embed.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/preview/jscripts/embed.js
new file mode 100755
index 00000000..f8dc8105
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/preview/jscripts/embed.js
@@ -0,0 +1,73 @@
+/**
+ * This script contains embed functions for common plugins. This scripts are complety free to use for any purpose.
+ */
+
+function writeFlash(p) {
+ writeEmbed(
+ 'D27CDB6E-AE6D-11cf-96B8-444553540000',
+ 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0',
+ 'application/x-shockwave-flash',
+ p
+ );
+}
+
+function writeShockWave(p) {
+ writeEmbed(
+ '166B1BCA-3F9C-11CF-8075-444553540000',
+ 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0',
+ 'application/x-director',
+ p
+ );
+}
+
+function writeQuickTime(p) {
+ writeEmbed(
+ '02BF25D5-8C17-4B23-BC80-D3488ABDDC6B',
+ 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0',
+ 'video/quicktime',
+ p
+ );
+}
+
+function writeRealMedia(p) {
+ writeEmbed(
+ 'CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA',
+ 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0',
+ 'audio/x-pn-realaudio-plugin',
+ p
+ );
+}
+
+function writeWindowsMedia(p) {
+ p.url = p.src;
+ writeEmbed(
+ '6BF52A52-394A-11D3-B153-00C04F79FAA6',
+ 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701',
+ 'application/x-mplayer2',
+ p
+ );
+}
+
+function writeEmbed(cls, cb, mt, p) {
+ var h = '', n;
+
+ h += '<object classid="clsid:' + cls + '" codebase="' + cb + '"';
+ h += typeof(p.id) != "undefined" ? 'id="' + p.id + '"' : '';
+ h += typeof(p.name) != "undefined" ? 'name="' + p.name + '"' : '';
+ h += typeof(p.width) != "undefined" ? 'width="' + p.width + '"' : '';
+ h += typeof(p.height) != "undefined" ? 'height="' + p.height + '"' : '';
+ h += typeof(p.align) != "undefined" ? 'align="' + p.align + '"' : '';
+ h += '>';
+
+ for (n in p)
+ h += '<param name="' + n + '" value="' + p[n] + '">';
+
+ h += '<embed type="' + mt + '"';
+
+ for (n in p)
+ h += n + '="' + p[n] + '" ';
+
+ h += '></embed></object>';
+
+ document.write(h);
+}
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/preview/preview.html b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/preview/preview.html
new file mode 100644
index 00000000..67e7b142
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/preview/preview.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
+<script type="text/javascript" src="jscripts/embed.js"></script>
+<script type="text/javascript"><!--
+document.write('<base href="' + tinyMCEPopup.getWindowArg("base") + '">');
+// -->
+</script>
+<title>{#preview.preview_desc}</title>
+</head>
+<body id="content">
+<script type="text/javascript">
+ document.write(tinyMCEPopup.editor.getContent());
+</script>
+</body>
+</html>
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/print/editor_plugin.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/print/editor_plugin.js
new file mode 100755
index 00000000..b5b3a55e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/print/editor_plugin.js
@@ -0,0 +1 @@
+(function(){tinymce.create("tinymce.plugins.Print",{init:function(a,b){a.addCommand("mcePrint",function(){a.getWin().print()});a.addButton("print",{title:"print.print_desc",cmd:"mcePrint"})},getInfo:function(){return{longname:"Print",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/print",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("print",tinymce.plugins.Print)})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/print/editor_plugin_src.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/print/editor_plugin_src.js
new file mode 100755
index 00000000..3933fe65
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/print/editor_plugin_src.js
@@ -0,0 +1,34 @@
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+ tinymce.create('tinymce.plugins.Print', {
+ init : function(ed, url) {
+ ed.addCommand('mcePrint', function() {
+ ed.getWin().print();
+ });
+
+ ed.addButton('print', {title : 'print.print_desc', cmd : 'mcePrint'});
+ },
+
+ getInfo : function() {
+ return {
+ longname : 'Print',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/print',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ };
+ }
+ });
+
+ // Register plugin
+ tinymce.PluginManager.add('print', tinymce.plugins.Print);
+})();
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/save/editor_plugin.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/save/editor_plugin.js
new file mode 100755
index 00000000..8e939966
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/save/editor_plugin.js
@@ -0,0 +1 @@
+(function(){tinymce.create("tinymce.plugins.Save",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceSave",c._save,c);a.addCommand("mceCancel",c._cancel,c);a.addButton("save",{title:"save.save_desc",cmd:"mceSave"});a.addButton("cancel",{title:"save.cancel_desc",cmd:"mceCancel"});a.onNodeChange.add(c._nodeChange,c);a.addShortcut("ctrl+s",a.getLang("save.save_desc"),"mceSave")},getInfo:function(){return{longname:"Save",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/save",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_nodeChange:function(b,a,c){var b=this.editor;if(b.getParam("save_enablewhendirty")){a.setDisabled("save",!b.isDirty());a.setDisabled("cancel",!b.isDirty())}},_save:function(){var c=this.editor,a,e,d,b;a=tinymce.DOM.get(c.id).form||tinymce.DOM.getParent(c.id,"form");if(c.getParam("save_enablewhendirty")&&!c.isDirty()){return}tinyMCE.triggerSave();if(e=c.getParam("save_onsavecallback")){if(c.execCallback("save_onsavecallback",c)){c.startContent=tinymce.trim(c.getContent({format:"raw"}));c.nodeChanged()}return}if(a){c.isNotDirty=true;if(a.onsubmit==null||a.onsubmit()!=false){a.submit()}c.nodeChanged()}else{c.windowManager.alert("Error: No form element found.")}},_cancel:function(){var a=this.editor,c,b=tinymce.trim(a.startContent);if(c=a.getParam("save_oncancelcallback")){a.execCallback("save_oncancelcallback",a);return}a.setContent(b);a.undoManager.clear();a.nodeChanged()}});tinymce.PluginManager.add("save",tinymce.plugins.Save)})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/save/editor_plugin_src.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/save/editor_plugin_src.js
new file mode 100755
index 00000000..f5a3de8f
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/save/editor_plugin_src.js
@@ -0,0 +1,101 @@
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+ tinymce.create('tinymce.plugins.Save', {
+ init : function(ed, url) {
+ var t = this;
+
+ t.editor = ed;
+
+ // Register commands
+ ed.addCommand('mceSave', t._save, t);
+ ed.addCommand('mceCancel', t._cancel, t);
+
+ // Register buttons
+ ed.addButton('save', {title : 'save.save_desc', cmd : 'mceSave'});
+ ed.addButton('cancel', {title : 'save.cancel_desc', cmd : 'mceCancel'});
+
+ ed.onNodeChange.add(t._nodeChange, t);
+ ed.addShortcut('ctrl+s', ed.getLang('save.save_desc'), 'mceSave');
+ },
+
+ getInfo : function() {
+ return {
+ longname : 'Save',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/save',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ };
+ },
+
+ // Private methods
+
+ _nodeChange : function(ed, cm, n) {
+ var ed = this.editor;
+
+ if (ed.getParam('save_enablewhendirty')) {
+ cm.setDisabled('save', !ed.isDirty());
+ cm.setDisabled('cancel', !ed.isDirty());
+ }
+ },
+
+ // Private methods
+
+ _save : function() {
+ var ed = this.editor, formObj, os, i, elementId;
+
+ formObj = tinymce.DOM.get(ed.id).form || tinymce.DOM.getParent(ed.id, 'form');
+
+ if (ed.getParam("save_enablewhendirty") && !ed.isDirty())
+ return;
+
+ tinyMCE.triggerSave();
+
+ // Use callback instead
+ if (os = ed.getParam("save_onsavecallback")) {
+ if (ed.execCallback('save_onsavecallback', ed)) {
+ ed.startContent = tinymce.trim(ed.getContent({format : 'raw'}));
+ ed.nodeChanged();
+ }
+
+ return;
+ }
+
+ if (formObj) {
+ ed.isNotDirty = true;
+
+ if (formObj.onsubmit == null || formObj.onsubmit() != false)
+ formObj.submit();
+
+ ed.nodeChanged();
+ } else
+ ed.windowManager.alert("Error: No form element found.");
+ },
+
+ _cancel : function() {
+ var ed = this.editor, os, h = tinymce.trim(ed.startContent);
+
+ // Use callback instead
+ if (os = ed.getParam("save_oncancelcallback")) {
+ ed.execCallback('save_oncancelcallback', ed);
+ return;
+ }
+
+ ed.setContent(h);
+ ed.undoManager.clear();
+ ed.nodeChanged();
+ }
+ });
+
+ // Register plugin
+ tinymce.PluginManager.add('save', tinymce.plugins.Save);
+})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/searchreplace/css/searchreplace.css b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/searchreplace/css/searchreplace.css
new file mode 100755
index 00000000..ecdf58c7
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/searchreplace/css/searchreplace.css
@@ -0,0 +1,6 @@
+.panel_wrapper {height:85px;}
+.panel_wrapper div.current {height:85px;}
+
+/* IE */
+* html .panel_wrapper {height:100px;}
+* html .panel_wrapper div.current {height:100px;}
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/searchreplace/editor_plugin.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/searchreplace/editor_plugin.js
new file mode 100755
index 00000000..165bc12d
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/searchreplace/editor_plugin.js
@@ -0,0 +1 @@
+(function(){tinymce.create("tinymce.plugins.SearchReplacePlugin",{init:function(a,c){function b(d){window.focus();a.windowManager.open({file:c+"/searchreplace.htm",width:420+parseInt(a.getLang("searchreplace.delta_width",0)),height:170+parseInt(a.getLang("searchreplace.delta_height",0)),inline:1,auto_focus:0},{mode:d,search_string:a.selection.getContent({format:"text"}),plugin_url:c})}a.addCommand("mceSearch",function(){b("search")});a.addCommand("mceReplace",function(){b("replace")});a.addButton("search",{title:"searchreplace.search_desc",cmd:"mceSearch"});a.addButton("replace",{title:"searchreplace.replace_desc",cmd:"mceReplace"});a.addShortcut("ctrl+f","searchreplace.search_desc","mceSearch")},getInfo:function(){return{longname:"Search/Replace",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/searchreplace",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("searchreplace",tinymce.plugins.SearchReplacePlugin)})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/searchreplace/editor_plugin_src.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/searchreplace/editor_plugin_src.js
new file mode 100755
index 00000000..4c87e8fa
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/searchreplace/editor_plugin_src.js
@@ -0,0 +1,61 @@
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+ tinymce.create('tinymce.plugins.SearchReplacePlugin', {
+ init : function(ed, url) {
+ function open(m) {
+ // Keep IE from writing out the f/r character to the editor
+ // instance while initializing a new dialog. See: #3131190
+ window.focus();
+
+ ed.windowManager.open({
+ file : url + '/searchreplace.htm',
+ width : 420 + parseInt(ed.getLang('searchreplace.delta_width', 0)),
+ height : 170 + parseInt(ed.getLang('searchreplace.delta_height', 0)),
+ inline : 1,
+ auto_focus : 0
+ }, {
+ mode : m,
+ search_string : ed.selection.getContent({format : 'text'}),
+ plugin_url : url
+ });
+ };
+
+ // Register commands
+ ed.addCommand('mceSearch', function() {
+ open('search');
+ });
+
+ ed.addCommand('mceReplace', function() {
+ open('replace');
+ });
+
+ // Register buttons
+ ed.addButton('search', {title : 'searchreplace.search_desc', cmd : 'mceSearch'});
+ ed.addButton('replace', {title : 'searchreplace.replace_desc', cmd : 'mceReplace'});
+
+ ed.addShortcut('ctrl+f', 'searchreplace.search_desc', 'mceSearch');
+ },
+
+ getInfo : function() {
+ return {
+ longname : 'Search/Replace',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/searchreplace',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ };
+ }
+ });
+
+ // Register plugin
+ tinymce.PluginManager.add('searchreplace', tinymce.plugins.SearchReplacePlugin);
+})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/searchreplace/js/searchreplace.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/searchreplace/js/searchreplace.js
new file mode 100644
index 00000000..80284b9f
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/searchreplace/js/searchreplace.js
@@ -0,0 +1,142 @@
+tinyMCEPopup.requireLangPack();
+
+var SearchReplaceDialog = {
+ init : function(ed) {
+ var t = this, f = document.forms[0], m = tinyMCEPopup.getWindowArg("mode");
+
+ t.switchMode(m);
+
+ f[m + '_panel_searchstring'].value = tinyMCEPopup.getWindowArg("search_string");
+
+ // Focus input field
+ f[m + '_panel_searchstring'].focus();
+
+ mcTabs.onChange.add(function(tab_id, panel_id) {
+ t.switchMode(tab_id.substring(0, tab_id.indexOf('_')));
+ });
+ },
+
+ switchMode : function(m) {
+ var f, lm = this.lastMode;
+
+ if (lm != m) {
+ f = document.forms[0];
+
+ if (lm) {
+ f[m + '_panel_searchstring'].value = f[lm + '_panel_searchstring'].value;
+ f[m + '_panel_backwardsu'].checked = f[lm + '_panel_backwardsu'].checked;
+ f[m + '_panel_backwardsd'].checked = f[lm + '_panel_backwardsd'].checked;
+ f[m + '_panel_casesensitivebox'].checked = f[lm + '_panel_casesensitivebox'].checked;
+ }
+
+ mcTabs.displayTab(m + '_tab', m + '_panel');
+ document.getElementById("replaceBtn").style.display = (m == "replace") ? "inline" : "none";
+ document.getElementById("replaceAllBtn").style.display = (m == "replace") ? "inline" : "none";
+ this.lastMode = m;
+ }
+ },
+
+ searchNext : function(a) {
+ var ed = tinyMCEPopup.editor, se = ed.selection, r = se.getRng(), f, m = this.lastMode, s, b, fl = 0, w = ed.getWin(), wm = ed.windowManager, fo = 0;
+
+ // Get input
+ f = document.forms[0];
+ s = f[m + '_panel_searchstring'].value;
+ b = f[m + '_panel_backwardsu'].checked;
+ ca = f[m + '_panel_casesensitivebox'].checked;
+ rs = f['replace_panel_replacestring'].value;
+
+ if (tinymce.isIE) {
+ r = ed.getDoc().selection.createRange();
+ }
+
+ if (s == '')
+ return;
+
+ function fix() {
+ // Correct Firefox graphics glitches
+ // TODO: Verify if this is actually needed any more, maybe it was for very old FF versions?
+ r = se.getRng().cloneRange();
+ ed.getDoc().execCommand('SelectAll', false, null);
+ se.setRng(r);
+ };
+
+ function replace() {
+ ed.selection.setContent(rs); // Needs to be duplicated due to selection bug in IE
+ };
+
+ // IE flags
+ if (ca)
+ fl = fl | 4;
+
+ switch (a) {
+ case 'all':
+ // Move caret to beginning of text
+ ed.execCommand('SelectAll');
+ ed.selection.collapse(true);
+
+ if (tinymce.isIE) {
+ ed.focus();
+ r = ed.getDoc().selection.createRange();
+
+ while (r.findText(s, b ? -1 : 1, fl)) {
+ r.scrollIntoView();
+ r.select();
+ replace();
+ fo = 1;
+
+ if (b) {
+ r.moveEnd("character", -(rs.length)); // Otherwise will loop forever
+ }
+ }
+
+ tinyMCEPopup.storeSelection();
+ } else {
+ while (w.find(s, ca, b, false, false, false, false)) {
+ replace();
+ fo = 1;
+ }
+ }
+
+ if (fo)
+ tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.allreplaced'));
+ else
+ tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound'));
+
+ return;
+
+ case 'current':
+ if (!ed.selection.isCollapsed())
+ replace();
+
+ break;
+ }
+
+ se.collapse(b);
+ r = se.getRng();
+
+ // Whats the point
+ if (!s)
+ return;
+
+ if (tinymce.isIE) {
+ ed.focus();
+ r = ed.getDoc().selection.createRange();
+
+ if (r.findText(s, b ? -1 : 1, fl)) {
+ r.scrollIntoView();
+ r.select();
+ } else
+ tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound'));
+
+ tinyMCEPopup.storeSelection();
+ } else {
+ if (!w.find(s, ca, b, false, false, false, false))
+ tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound'));
+ else
+ fix();
+ }
+ }
+};
+
+tinyMCEPopup.onInit.add(SearchReplaceDialog.init, SearchReplaceDialog);
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/searchreplace/langs/de_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/searchreplace/langs/de_dlg.js
new file mode 100644
index 00000000..7c40acd9
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/searchreplace/langs/de_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('de.searchreplace_dlg',{findwhat:"Zu suchender Text",replacewith:"Ersetzen durch",direction:"Suchrichtung",up:"Aufw\u00e4rts",down:"Abw\u00e4rts",mcase:"Gro\u00df-/Kleinschreibung beachten",findnext:"Weitersuchen",allreplaced:"Alle Vorkommen der Zeichenkette wurden ersetzt.","searchnext_desc":"Weitersuchen",notfound:"Die Suche ist am Ende angelangt. Die Zeichenkette konnte nicht gefunden werden.","search_title":"Suchen","replace_title":"Suchen/Ersetzen",replaceall:"Alle ersetzen",replace:"Ersetzen"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/searchreplace/langs/en_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/searchreplace/langs/en_dlg.js
new file mode 100644
index 00000000..8a659009
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/searchreplace/langs/en_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('en.searchreplace_dlg',{findwhat:"Find What",replacewith:"Replace with",direction:"Direction",up:"Up",down:"Down",mcase:"Match Case",findnext:"Find Next",allreplaced:"All occurrences of the search string were replaced.","searchnext_desc":"Find Again",notfound:"The search has been completed. The search string could not be found.","search_title":"Find","replace_title":"Find/Replace",replaceall:"Replace All",replace:"Replace"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/searchreplace/langs/hu_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/searchreplace/langs/hu_dlg.js
new file mode 100644
index 00000000..c34352d6
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/searchreplace/langs/hu_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('hu.searchreplace_dlg',{findwhat:"Mit keres",replacewith:"Mire cser\u00e9l",direction:"Ir\u00e1ny",up:"Fel",down:"Le",mcase:"Kis- \u00e9s nagybet\u0171k megk\u00fcl\u00f6nb\u00f6ztet\u00e9se",findnext:"K\u00f6vetkez\u0151 keres\u00e9se",allreplaced:"A keresett r\u00e9szsz\u00f6veg minden el\u0151fordul\u00e1sa cser\u00e9lve lett.","searchnext_desc":"Keres\u00e9s megint",notfound:"A keres\u00e9s v\u00e9get \u00e9rt. A keresett sz\u00f6vegr\u00e9sz nem tal\u00e1lhat\u00f3.","search_title":"Keres\u00e9s","replace_title":"Keres\u00e9s/Csere",replaceall:"\u00d6sszes cser\u00e9je",replace:"Csere"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/searchreplace/langs/ja_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/searchreplace/langs/ja_dlg.js
new file mode 100644
index 00000000..a12eb783
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/searchreplace/langs/ja_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('ja.searchreplace_dlg',{findwhat:"\u691c\u7d22\u3059\u308b\u6587\u5b57\u5217",replacewith:"\u7f6e\u63db\u5f8c\u306e\u6587\u5b57\u5217",direction:"\u65b9\u5411",up:"\u4e0a\u3078",down:"\u4e0b\u3078",mcase:"\u5927\u6587\u5b57\u30fb\u5c0f\u6587\u5b57\u306e\u533a\u5225",findnext:"\u6b21\u3092\u691c\u7d22",allreplaced:"\u3059\u3079\u3066\u7f6e\u63db\u3057\u307e\u3057\u305f\u3002","searchnext_desc":"\u518d\u691c\u7d22",notfound:"\u691c\u7d22\u3092\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002\u691c\u7d22\u6587\u5b57\u5217\u306f\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002","search_title":"\u691c\u7d22","replace_title":"\u691c\u7d22\u3068\u7f6e\u63db",replaceall:"\u3059\u3079\u3066\u7f6e\u63db",replace:"\u7f6e\u63db"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/searchreplace/searchreplace.htm b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/searchreplace/searchreplace.htm
new file mode 100755
index 00000000..2443a918
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/searchreplace/searchreplace.htm
@@ -0,0 +1,100 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>{#searchreplace_dlg.replace_title}</title>
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script type="text/javascript" src="../../utils/mctabs.js"></script>
+ <script type="text/javascript" src="../../utils/form_utils.js"></script>
+ <script type="text/javascript" src="js/searchreplace.js"></script>
+ <link rel="stylesheet" type="text/css" href="css/searchreplace.css" />
+</head>
+<body style="display:none;" role="application" aria-labelledby="app_title">
+<span id="app_title" style="display:none">{#searchreplace_dlg.replace_title}</span>
+<form onsubmit="SearchReplaceDialog.searchNext('none');return false;" action="#">
+ <div class="tabs">
+ <ul>
+ <li id="search_tab" aria-controls="search_panel"><span><a href="javascript:SearchReplaceDialog.switchMode('search');" onmousedown="return false;">{#searchreplace.search_desc}</a></span></li>
+ <li id="replace_tab" aria-controls="replace_panel"><span><a href="javascript:SearchReplaceDialog.switchMode('replace');" onmousedown="return false;">{#searchreplace_dlg.replace}</a></span></li>
+ </ul>
+ </div>
+
+ <div class="panel_wrapper">
+ <div id="search_panel" class="panel">
+ <table role="presentation" border="0" cellspacing="0" cellpadding="2">
+ <tr>
+ <td><label for="search_panel_searchstring">{#searchreplace_dlg.findwhat}</label></td>
+ <td><input type="text" id="search_panel_searchstring" name="search_panel_searchstring" style="width: 200px" aria-required="true" /></td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0" class="direction">
+ <tr role="group" aria-labelledby="search_panel_backwards_label">
+ <td><label id="search_panel_backwards_label">{#searchreplace_dlg.direction}</label></td>
+ <td><input id="search_panel_backwardsu" name="search_panel_backwards" class="radio" type="radio" /></td>
+ <td><label for="search_panel_backwardsu">{#searchreplace_dlg.up}</label></td>
+ <td><input id="search_panel_backwardsd" name="search_panel_backwards" class="radio" type="radio" checked="checked" /></td>
+ <td><label for="search_panel_backwardsd">{#searchreplace_dlg.down}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input id="search_panel_casesensitivebox" name="search_panel_casesensitivebox" class="checkbox" type="checkbox" /></td>
+ <td><label for="search_panel_casesensitivebox">{#searchreplace_dlg.mcase}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </div>
+
+ <div id="replace_panel" class="panel">
+ <table role="presentation" border="0" cellspacing="0" cellpadding="2">
+ <tr>
+ <td><label for="replace_panel_searchstring">{#searchreplace_dlg.findwhat}</label></td>
+ <td><input type="text" id="replace_panel_searchstring" name="replace_panel_searchstring" style="width: 200px" aria-required="true" /></td>
+ </tr>
+ <tr>
+ <td><label for="replace_panel_replacestring">{#searchreplace_dlg.replacewith}</label></td>
+ <td><input type="text" id="replace_panel_replacestring" name="replace_panel_replacestring" style="width: 200px" aria-required="true" /></td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0" class="direction">
+ <tr role="group" aria-labelledby="replace_panel_dir_label">
+ <td><label id="replace_panel_dir_label">{#searchreplace_dlg.direction}</label></td>
+ <td><input id="replace_panel_backwardsu" name="replace_panel_backwards" class="radio" type="radio" /></td>
+ <td><label for="replace_panel_backwardsu">{#searchreplace_dlg.up}</label></td>
+ <td><input id="replace_panel_backwardsd" name="replace_panel_backwards" class="radio" type="radio" checked="checked" /></td>
+ <td><label for="replace_panel_backwardsd">{#searchreplace_dlg.down}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input id="replace_panel_casesensitivebox" name="replace_panel_casesensitivebox" class="checkbox" type="checkbox" /></td>
+ <td><label for="replace_panel_casesensitivebox">{#searchreplace_dlg.mcase}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </div>
+
+ </div>
+
+ <div class="mceActionPanel">
+ <input type="submit" id="insert" name="insert" value="{#searchreplace_dlg.findnext}" />
+ <input type="button" class="button" id="replaceBtn" name="replaceBtn" value="{#searchreplace_dlg.replace}" onclick="SearchReplaceDialog.searchNext('current');" />
+ <input type="button" class="button" id="replaceAllBtn" name="replaceAllBtn" value="{#searchreplace_dlg.replaceall}" onclick="SearchReplaceDialog.searchNext('all');" />
+ <input type="button" id="cancel" name="close" value="{#close}" onclick="tinyMCEPopup.close();" />
+ </div>
+</form>
+</body>
+</html>
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/spellchecker/css/content.css b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/spellchecker/css/content.css
new file mode 100644
index 00000000..24efa021
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/spellchecker/css/content.css
@@ -0,0 +1 @@
+.mceItemHiddenSpellWord {background:url(../img/wline.gif) repeat-x bottom left; cursor:default;}
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/spellchecker/editor_plugin.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/spellchecker/editor_plugin.js
new file mode 100644
index 00000000..48549c92
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/spellchecker/editor_plugin.js
@@ -0,0 +1 @@
+(function(){var a=tinymce.util.JSONRequest,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.SpellcheckerPlugin",{getInfo:function(){return{longname:"Spellchecker",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker",version:tinymce.majorVersion+"."+tinymce.minorVersion}},init:function(e,f){var g=this,d;g.url=f;g.editor=e;g.rpcUrl=e.getParam("spellchecker_rpc_url","{backend}");if(g.rpcUrl=="{backend}"){if(tinymce.isIE){return}g.hasSupport=true;e.onContextMenu.addToTop(function(h,i){if(g.active){return false}})}e.addCommand("mceSpellCheck",function(){if(g.rpcUrl=="{backend}"){g.editor.getBody().spellcheck=g.active=!g.active;return}if(!g.active){e.setProgressState(1);g._sendRPC("checkWords",[g.selectedLang,g._getWords()],function(h){if(h.length>0){g.active=1;g._markWords(h);e.setProgressState(0);e.nodeChanged()}else{e.setProgressState(0);if(e.getParam("spellchecker_report_no_misspellings",true)){e.windowManager.alert("spellchecker.no_mpell")}}})}else{g._done()}});if(e.settings.content_css!==false){e.contentCSS.push(f+"/css/content.css")}e.onClick.add(g._showMenu,g);e.onContextMenu.add(g._showMenu,g);e.onBeforeGetContent.add(function(){if(g.active){g._removeWords()}});e.onNodeChange.add(function(i,h){h.setActive("spellchecker",g.active)});e.onSetContent.add(function(){g._done()});e.onBeforeGetContent.add(function(){g._done()});e.onBeforeExecCommand.add(function(h,i){if(i=="mceFullScreen"){g._done()}});g.languages={};c(e.getParam("spellchecker_languages","+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv","hash"),function(i,h){if(h.indexOf("+")===0){h=h.substring(1);g.selectedLang=i}g.languages[h]=i})},createControl:function(h,d){var f=this,g,e=f.editor;if(h=="spellchecker"){if(f.rpcUrl=="{backend}"){if(f.hasSupport){g=d.createButton(h,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:f})}return g}g=d.createSplitButton(h,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:f});g.onRenderMenu.add(function(j,i){i.add({title:"spellchecker.langs","class":"mceMenuItemTitle"}).setDisabled(1);c(f.languages,function(n,m){var p={icon:1},l;p.onclick=function(){if(n==f.selectedLang){return}l.setSelected(1);f.selectedItem.setSelected(0);f.selectedItem=l;f.selectedLang=n};p.title=m;l=i.add(p);l.setSelected(n==f.selectedLang);if(n==f.selectedLang){f.selectedItem=l}})});return g}},_walk:function(i,g){var h=this.editor.getDoc(),e;if(h.createTreeWalker){e=h.createTreeWalker(i,NodeFilter.SHOW_TEXT,null,false);while((i=e.nextNode())!=null){g.call(this,i)}}else{tinymce.walk(i,g,"childNodes")}},_getSeparators:function(){var e="",d,f=this.editor.getParam("spellchecker_word_separator_chars",'\\s!"#$%&()*+,-./:;<=>?@[]^_{|}\u201d\u201c');for(d=0;d<f.length;d++){e+="\\"+f.charAt(d)}return e},_getWords:function(){var e=this.editor,g=[],d="",f={},h=[];this._walk(e.getBody(),function(i){if(i.nodeType==3){d+=i.nodeValue+" "}});if(e.getParam("spellchecker_word_pattern")){h=d.match("("+e.getParam("spellchecker_word_pattern")+")","gi")}else{d=d.replace(new RegExp("([0-9]|["+this._getSeparators()+"])","g")," ");d=tinymce.trim(d.replace(/(\s+)/g," "));h=d.split(" ")}c(h,function(i){if(!f[i]){g.push(i);f[i]=1}});return g},_removeWords:function(d){var e=this.editor,h=e.dom,g=e.selection,f=g.getRng(true);c(h.select("span").reverse(),function(i){if(i&&(h.hasClass(i,"mceItemHiddenSpellWord")||h.hasClass(i,"mceItemHidden"))){if(!d||h.decode(i.innerHTML)==d){h.remove(i,1)}}});g.setRng(f)},_markWords:function(l){var h=this.editor,g=h.dom,j=h.getDoc(),i=h.selection,d=i.getRng(true),e=[],k=l.join("|"),m=this._getSeparators(),f=new RegExp("(^|["+m+"])("+k+")(?=["+m+"]|$)","g");this._walk(h.getBody(),function(o){if(o.nodeType==3){e.push(o)}});c(e,function(t){var r,q,o,s,p=t.nodeValue;if(f.test(p)){p=g.encode(p);q=g.create("span",{"class":"mceItemHidden"});if(tinymce.isIE){p=p.replace(f,"$1<mcespell>$2</mcespell>");while((s=p.indexOf("<mcespell>"))!=-1){o=p.substring(0,s);if(o.length){r=j.createTextNode(g.decode(o));q.appendChild(r)}p=p.substring(s+10);s=p.indexOf("</mcespell>");o=p.substring(0,s);p=p.substring(s+11);q.appendChild(g.create("span",{"class":"mceItemHiddenSpellWord"},o))}if(p.length){r=j.createTextNode(g.decode(p));q.appendChild(r)}}else{q.innerHTML=p.replace(f,'$1<span class="mceItemHiddenSpellWord">$2</span>')}g.replace(q,t)}});i.setRng(d)},_showMenu:function(h,j){var i=this,h=i.editor,d=i._menu,l,k=h.dom,g=k.getViewPort(h.getWin()),f=j.target;j=0;if(!d){d=h.controlManager.createDropMenu("spellcheckermenu",{"class":"mceNoIcons"});i._menu=d}if(k.hasClass(f,"mceItemHiddenSpellWord")){d.removeAll();d.add({title:"spellchecker.wait","class":"mceMenuItemTitle"}).setDisabled(1);i._sendRPC("getSuggestions",[i.selectedLang,k.decode(f.innerHTML)],function(m){var e;d.removeAll();if(m.length>0){d.add({title:"spellchecker.sug","class":"mceMenuItemTitle"}).setDisabled(1);c(m,function(n){d.add({title:n,onclick:function(){k.replace(h.getDoc().createTextNode(n),f);i._checkDone()}})});d.addSeparator()}else{d.add({title:"spellchecker.no_sug","class":"mceMenuItemTitle"}).setDisabled(1)}if(h.getParam("show_ignore_words",true)){e=i.editor.getParam("spellchecker_enable_ignore_rpc","");d.add({title:"spellchecker.ignore_word",onclick:function(){var n=f.innerHTML;k.remove(f,1);i._checkDone();if(e){h.setProgressState(1);i._sendRPC("ignoreWord",[i.selectedLang,n],function(o){h.setProgressState(0)})}}});d.add({title:"spellchecker.ignore_words",onclick:function(){var n=f.innerHTML;i._removeWords(k.decode(n));i._checkDone();if(e){h.setProgressState(1);i._sendRPC("ignoreWords",[i.selectedLang,n],function(o){h.setProgressState(0)})}}})}if(i.editor.getParam("spellchecker_enable_learn_rpc")){d.add({title:"spellchecker.learn_word",onclick:function(){var n=f.innerHTML;k.remove(f,1);i._checkDone();h.setProgressState(1);i._sendRPC("learnWord",[i.selectedLang,n],function(o){h.setProgressState(0)})}})}d.update()});l=b.getPos(h.getContentAreaContainer());d.settings.offset_x=l.x;d.settings.offset_y=l.y;h.selection.select(f);l=k.getPos(f);d.showMenu(l.x,l.y+f.offsetHeight-g.y);return tinymce.dom.Event.cancel(j)}else{d.hideMenu()}},_checkDone:function(){var e=this,d=e.editor,g=d.dom,f;c(g.select("span"),function(h){if(h&&g.hasClass(h,"mceItemHiddenSpellWord")){f=true;return false}});if(!f){e._done()}},_done:function(){var d=this,e=d.active;if(d.active){d.active=0;d._removeWords();if(d._menu){d._menu.hideMenu()}if(e){d.editor.nodeChanged()}}},_sendRPC:function(e,g,d){var f=this;a.sendRPC({url:f.rpcUrl,method:e,params:g,success:d,error:function(i,h){f.editor.setProgressState(0);f.editor.windowManager.alert(i.errstr||("Error response: "+h.responseText))}})}});tinymce.PluginManager.add("spellchecker",tinymce.plugins.SpellcheckerPlugin)})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/spellchecker/editor_plugin_src.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/spellchecker/editor_plugin_src.js
new file mode 100644
index 00000000..86fdfceb
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/spellchecker/editor_plugin_src.js
@@ -0,0 +1,436 @@
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+ var JSONRequest = tinymce.util.JSONRequest, each = tinymce.each, DOM = tinymce.DOM;
+
+ tinymce.create('tinymce.plugins.SpellcheckerPlugin', {
+ getInfo : function() {
+ return {
+ longname : 'Spellchecker',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ };
+ },
+
+ init : function(ed, url) {
+ var t = this, cm;
+
+ t.url = url;
+ t.editor = ed;
+ t.rpcUrl = ed.getParam("spellchecker_rpc_url", "{backend}");
+
+ if (t.rpcUrl == '{backend}') {
+ // Sniff if the browser supports native spellchecking (Don't know of a better way)
+ if (tinymce.isIE)
+ return;
+
+ t.hasSupport = true;
+
+ // Disable the context menu when spellchecking is active
+ ed.onContextMenu.addToTop(function(ed, e) {
+ if (t.active)
+ return false;
+ });
+ }
+
+ // Register commands
+ ed.addCommand('mceSpellCheck', function() {
+ if (t.rpcUrl == '{backend}') {
+ // Enable/disable native spellchecker
+ t.editor.getBody().spellcheck = t.active = !t.active;
+ return;
+ }
+
+ if (!t.active) {
+ ed.setProgressState(1);
+ t._sendRPC('checkWords', [t.selectedLang, t._getWords()], function(r) {
+ if (r.length > 0) {
+ t.active = 1;
+ t._markWords(r);
+ ed.setProgressState(0);
+ ed.nodeChanged();
+ } else {
+ ed.setProgressState(0);
+
+ if (ed.getParam('spellchecker_report_no_misspellings', true))
+ ed.windowManager.alert('spellchecker.no_mpell');
+ }
+ });
+ } else
+ t._done();
+ });
+
+ if (ed.settings.content_css !== false)
+ ed.contentCSS.push(url + '/css/content.css');
+
+ ed.onClick.add(t._showMenu, t);
+ ed.onContextMenu.add(t._showMenu, t);
+ ed.onBeforeGetContent.add(function() {
+ if (t.active)
+ t._removeWords();
+ });
+
+ ed.onNodeChange.add(function(ed, cm) {
+ cm.setActive('spellchecker', t.active);
+ });
+
+ ed.onSetContent.add(function() {
+ t._done();
+ });
+
+ ed.onBeforeGetContent.add(function() {
+ t._done();
+ });
+
+ ed.onBeforeExecCommand.add(function(ed, cmd) {
+ if (cmd == 'mceFullScreen')
+ t._done();
+ });
+
+ // Find selected language
+ t.languages = {};
+ each(ed.getParam('spellchecker_languages', '+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv', 'hash'), function(v, k) {
+ if (k.indexOf('+') === 0) {
+ k = k.substring(1);
+ t.selectedLang = v;
+ }
+
+ t.languages[k] = v;
+ });
+ },
+
+ createControl : function(n, cm) {
+ var t = this, c, ed = t.editor;
+
+ if (n == 'spellchecker') {
+ // Use basic button if we use the native spellchecker
+ if (t.rpcUrl == '{backend}') {
+ // Create simple toggle button if we have native support
+ if (t.hasSupport)
+ c = cm.createButton(n, {title : 'spellchecker.desc', cmd : 'mceSpellCheck', scope : t});
+
+ return c;
+ }
+
+ c = cm.createSplitButton(n, {title : 'spellchecker.desc', cmd : 'mceSpellCheck', scope : t});
+
+ c.onRenderMenu.add(function(c, m) {
+ m.add({title : 'spellchecker.langs', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
+ each(t.languages, function(v, k) {
+ var o = {icon : 1}, mi;
+
+ o.onclick = function() {
+ if (v == t.selectedLang) {
+ return;
+ }
+ mi.setSelected(1);
+ t.selectedItem.setSelected(0);
+ t.selectedItem = mi;
+ t.selectedLang = v;
+ };
+
+ o.title = k;
+ mi = m.add(o);
+ mi.setSelected(v == t.selectedLang);
+
+ if (v == t.selectedLang)
+ t.selectedItem = mi;
+ })
+ });
+
+ return c;
+ }
+ },
+
+ // Internal functions
+
+ _walk : function(n, f) {
+ var d = this.editor.getDoc(), w;
+
+ if (d.createTreeWalker) {
+ w = d.createTreeWalker(n, NodeFilter.SHOW_TEXT, null, false);
+
+ while ((n = w.nextNode()) != null)
+ f.call(this, n);
+ } else
+ tinymce.walk(n, f, 'childNodes');
+ },
+
+ _getSeparators : function() {
+ var re = '', i, str = this.editor.getParam('spellchecker_word_separator_chars', '\\s!"#$%&()*+,-./:;<=>?@[\]^_{|}\u201d\u201c');
+
+ // Build word separator regexp
+ for (i=0; i<str.length; i++)
+ re += '\\' + str.charAt(i);
+
+ return re;
+ },
+
+ _getWords : function() {
+ var ed = this.editor, wl = [], tx = '', lo = {}, rawWords = [];
+
+ // Get area text
+ this._walk(ed.getBody(), function(n) {
+ if (n.nodeType == 3)
+ tx += n.nodeValue + ' ';
+ });
+
+ // split the text up into individual words
+ if (ed.getParam('spellchecker_word_pattern')) {
+ // look for words that match the pattern
+ rawWords = tx.match('(' + ed.getParam('spellchecker_word_pattern') + ')', 'gi');
+ } else {
+ // Split words by separator
+ tx = tx.replace(new RegExp('([0-9]|[' + this._getSeparators() + '])', 'g'), ' ');
+ tx = tinymce.trim(tx.replace(/(\s+)/g, ' '));
+ rawWords = tx.split(' ');
+ }
+
+ // Build word array and remove duplicates
+ each(rawWords, function(v) {
+ if (!lo[v]) {
+ wl.push(v);
+ lo[v] = 1;
+ }
+ });
+
+ return wl;
+ },
+
+ _removeWords : function(w) {
+ var ed = this.editor, dom = ed.dom, se = ed.selection, r = se.getRng(true);
+
+ each(dom.select('span').reverse(), function(n) {
+ if (n && (dom.hasClass(n, 'mceItemHiddenSpellWord') || dom.hasClass(n, 'mceItemHidden'))) {
+ if (!w || dom.decode(n.innerHTML) == w)
+ dom.remove(n, 1);
+ }
+ });
+
+ se.setRng(r);
+ },
+
+ _markWords : function(wl) {
+ var ed = this.editor, dom = ed.dom, doc = ed.getDoc(), se = ed.selection, r = se.getRng(true), nl = [],
+ w = wl.join('|'), re = this._getSeparators(), rx = new RegExp('(^|[' + re + '])(' + w + ')(?=[' + re + ']|$)', 'g');
+
+ // Collect all text nodes
+ this._walk(ed.getBody(), function(n) {
+ if (n.nodeType == 3) {
+ nl.push(n);
+ }
+ });
+
+ // Wrap incorrect words in spans
+ each(nl, function(n) {
+ var node, elem, txt, pos, v = n.nodeValue;
+
+ if (rx.test(v)) {
+ // Encode the content
+ v = dom.encode(v);
+ // Create container element
+ elem = dom.create('span', {'class' : 'mceItemHidden'});
+
+ // Following code fixes IE issues by creating text nodes
+ // using DOM methods instead of innerHTML.
+ // Bug #3124: <PRE> elements content is broken after spellchecking.
+ // Bug #1408: Preceding whitespace characters are removed
+ // @TODO: I'm not sure that both are still issues on IE9.
+ if (tinymce.isIE) {
+ // Enclose mispelled words with temporal tag
+ v = v.replace(rx, '$1<mcespell>$2</mcespell>');
+ // Loop over the content finding mispelled words
+ while ((pos = v.indexOf('<mcespell>')) != -1) {
+ // Add text node for the content before the word
+ txt = v.substring(0, pos);
+ if (txt.length) {
+ node = doc.createTextNode(dom.decode(txt));
+ elem.appendChild(node);
+ }
+ v = v.substring(pos+10);
+ pos = v.indexOf('</mcespell>');
+ txt = v.substring(0, pos);
+ v = v.substring(pos+11);
+ // Add span element for the word
+ elem.appendChild(dom.create('span', {'class' : 'mceItemHiddenSpellWord'}, txt));
+ }
+ // Add text node for the rest of the content
+ if (v.length) {
+ node = doc.createTextNode(dom.decode(v));
+ elem.appendChild(node);
+ }
+ } else {
+ // Other browsers preserve whitespace characters on innerHTML usage
+ elem.innerHTML = v.replace(rx, '$1<span class="mceItemHiddenSpellWord">$2</span>');
+ }
+
+ // Finally, replace the node with the container
+ dom.replace(elem, n);
+ }
+ });
+
+ se.setRng(r);
+ },
+
+ _showMenu : function(ed, e) {
+ var t = this, ed = t.editor, m = t._menu, p1, dom = ed.dom, vp = dom.getViewPort(ed.getWin()), wordSpan = e.target;
+
+ e = 0; // Fixes IE memory leak
+
+ if (!m) {
+ m = ed.controlManager.createDropMenu('spellcheckermenu', {'class' : 'mceNoIcons'});
+ t._menu = m;
+ }
+
+ if (dom.hasClass(wordSpan, 'mceItemHiddenSpellWord')) {
+ m.removeAll();
+ m.add({title : 'spellchecker.wait', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
+
+ t._sendRPC('getSuggestions', [t.selectedLang, dom.decode(wordSpan.innerHTML)], function(r) {
+ var ignoreRpc;
+
+ m.removeAll();
+
+ if (r.length > 0) {
+ m.add({title : 'spellchecker.sug', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
+ each(r, function(v) {
+ m.add({title : v, onclick : function() {
+ dom.replace(ed.getDoc().createTextNode(v), wordSpan);
+ t._checkDone();
+ }});
+ });
+
+ m.addSeparator();
+ } else
+ m.add({title : 'spellchecker.no_sug', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
+
+ if (ed.getParam('show_ignore_words', true)) {
+ ignoreRpc = t.editor.getParam("spellchecker_enable_ignore_rpc", '');
+ m.add({
+ title : 'spellchecker.ignore_word',
+ onclick : function() {
+ var word = wordSpan.innerHTML;
+
+ dom.remove(wordSpan, 1);
+ t._checkDone();
+
+ // tell the server if we need to
+ if (ignoreRpc) {
+ ed.setProgressState(1);
+ t._sendRPC('ignoreWord', [t.selectedLang, word], function(r) {
+ ed.setProgressState(0);
+ });
+ }
+ }
+ });
+
+ m.add({
+ title : 'spellchecker.ignore_words',
+ onclick : function() {
+ var word = wordSpan.innerHTML;
+
+ t._removeWords(dom.decode(word));
+ t._checkDone();
+
+ // tell the server if we need to
+ if (ignoreRpc) {
+ ed.setProgressState(1);
+ t._sendRPC('ignoreWords', [t.selectedLang, word], function(r) {
+ ed.setProgressState(0);
+ });
+ }
+ }
+ });
+ }
+
+ if (t.editor.getParam("spellchecker_enable_learn_rpc")) {
+ m.add({
+ title : 'spellchecker.learn_word',
+ onclick : function() {
+ var word = wordSpan.innerHTML;
+
+ dom.remove(wordSpan, 1);
+ t._checkDone();
+
+ ed.setProgressState(1);
+ t._sendRPC('learnWord', [t.selectedLang, word], function(r) {
+ ed.setProgressState(0);
+ });
+ }
+ });
+ }
+
+ m.update();
+ });
+
+ p1 = DOM.getPos(ed.getContentAreaContainer());
+ m.settings.offset_x = p1.x;
+ m.settings.offset_y = p1.y;
+
+ ed.selection.select(wordSpan);
+ p1 = dom.getPos(wordSpan);
+ m.showMenu(p1.x, p1.y + wordSpan.offsetHeight - vp.y);
+
+ return tinymce.dom.Event.cancel(e);
+ } else
+ m.hideMenu();
+ },
+
+ _checkDone : function() {
+ var t = this, ed = t.editor, dom = ed.dom, o;
+
+ each(dom.select('span'), function(n) {
+ if (n && dom.hasClass(n, 'mceItemHiddenSpellWord')) {
+ o = true;
+ return false;
+ }
+ });
+
+ if (!o)
+ t._done();
+ },
+
+ _done : function() {
+ var t = this, la = t.active;
+
+ if (t.active) {
+ t.active = 0;
+ t._removeWords();
+
+ if (t._menu)
+ t._menu.hideMenu();
+
+ if (la)
+ t.editor.nodeChanged();
+ }
+ },
+
+ _sendRPC : function(m, p, cb) {
+ var t = this;
+
+ JSONRequest.sendRPC({
+ url : t.rpcUrl,
+ method : m,
+ params : p,
+ success : cb,
+ error : function(e, x) {
+ t.editor.setProgressState(0);
+ t.editor.windowManager.alert(e.errstr || ('Error response: ' + x.responseText));
+ }
+ });
+ }
+ });
+
+ // Register plugin
+ tinymce.PluginManager.add('spellchecker', tinymce.plugins.SpellcheckerPlugin);
+})();
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/spellchecker/img/wline.gif b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/spellchecker/img/wline.gif
new file mode 100644
index 00000000..7d0a4dbc
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/spellchecker/img/wline.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/style/css/props.css b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/style/css/props.css
new file mode 100755
index 00000000..3b8f0ee7
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/style/css/props.css
@@ -0,0 +1,14 @@
+#text_font {width:250px;}
+#text_size {width:70px;}
+.mceAddSelectValue {background:#DDD;}
+select, #block_text_indent, #box_width, #box_height, #box_padding_top, #box_padding_right, #box_padding_bottom, #box_padding_left {width:70px;}
+#box_margin_top, #box_margin_right, #box_margin_bottom, #box_margin_left, #positioning_width, #positioning_height, #positioning_zindex {width:70px;}
+#positioning_placement_top, #positioning_placement_right, #positioning_placement_bottom, #positioning_placement_left {width:70px;}
+#positioning_clip_top, #positioning_clip_right, #positioning_clip_bottom, #positioning_clip_left {width:70px;}
+.panel_toggle_insert_span {padding-top:10px;}
+.panel_wrapper div.current {padding-top:10px;height:230px;}
+.delim {border-left:1px solid gray;}
+.tdelim {border-bottom:1px solid gray;}
+#block_display {width:145px;}
+#list_type {width:115px;}
+.disabled {background:#EEE;}
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/style/editor_plugin.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/style/editor_plugin.js
new file mode 100755
index 00000000..dda9f928
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/style/editor_plugin.js
@@ -0,0 +1 @@
+(function(){tinymce.create("tinymce.plugins.StylePlugin",{init:function(a,b){a.addCommand("mceStyleProps",function(){var c=false;var f=a.selection.getSelectedBlocks();var d=[];if(f.length===1){d.push(a.selection.getNode().style.cssText)}else{tinymce.each(f,function(g){d.push(a.dom.getAttrib(g,"style"))});c=true}a.windowManager.open({file:b+"/props.htm",width:480+parseInt(a.getLang("style.delta_width",0)),height:340+parseInt(a.getLang("style.delta_height",0)),inline:1},{applyStyleToBlocks:c,plugin_url:b,styles:d})});a.addCommand("mceSetElementStyle",function(d,c){if(e=a.selection.getNode()){a.dom.setAttrib(e,"style",c);a.execCommand("mceRepaint")}});a.onNodeChange.add(function(d,c,f){c.setDisabled("styleprops",f.nodeName==="BODY")});a.addButton("styleprops",{title:"style.desc",cmd:"mceStyleProps"})},getInfo:function(){return{longname:"Style",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/style",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("style",tinymce.plugins.StylePlugin)})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/style/editor_plugin_src.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/style/editor_plugin_src.js
new file mode 100755
index 00000000..eaa7c771
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/style/editor_plugin_src.js
@@ -0,0 +1,71 @@
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+ tinymce.create('tinymce.plugins.StylePlugin', {
+ init : function(ed, url) {
+ // Register commands
+ ed.addCommand('mceStyleProps', function() {
+
+ var applyStyleToBlocks = false;
+ var blocks = ed.selection.getSelectedBlocks();
+ var styles = [];
+
+ if (blocks.length === 1) {
+ styles.push(ed.selection.getNode().style.cssText);
+ }
+ else {
+ tinymce.each(blocks, function(block) {
+ styles.push(ed.dom.getAttrib(block, 'style'));
+ });
+ applyStyleToBlocks = true;
+ }
+
+ ed.windowManager.open({
+ file : url + '/props.htm',
+ width : 480 + parseInt(ed.getLang('style.delta_width', 0)),
+ height : 340 + parseInt(ed.getLang('style.delta_height', 0)),
+ inline : 1
+ }, {
+ applyStyleToBlocks : applyStyleToBlocks,
+ plugin_url : url,
+ styles : styles
+ });
+ });
+
+ ed.addCommand('mceSetElementStyle', function(ui, v) {
+ if (e = ed.selection.getNode()) {
+ ed.dom.setAttrib(e, 'style', v);
+ ed.execCommand('mceRepaint');
+ }
+ });
+
+ ed.onNodeChange.add(function(ed, cm, n) {
+ cm.setDisabled('styleprops', n.nodeName === 'BODY');
+ });
+
+ // Register buttons
+ ed.addButton('styleprops', {title : 'style.desc', cmd : 'mceStyleProps'});
+ },
+
+ getInfo : function() {
+ return {
+ longname : 'Style',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/style',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ };
+ }
+ });
+
+ // Register plugin
+ tinymce.PluginManager.add('style', tinymce.plugins.StylePlugin);
+})();
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/style/js/props.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/style/js/props.js
new file mode 100644
index 00000000..0a8a8ec3
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/style/js/props.js
@@ -0,0 +1,709 @@
+tinyMCEPopup.requireLangPack();
+
+var defaultFonts = "" +
+ "Arial, Helvetica, sans-serif=Arial, Helvetica, sans-serif;" +
+ "Times New Roman, Times, serif=Times New Roman, Times, serif;" +
+ "Courier New, Courier, mono=Courier New, Courier, mono;" +
+ "Times New Roman, Times, serif=Times New Roman, Times, serif;" +
+ "Georgia, Times New Roman, Times, serif=Georgia, Times New Roman, Times, serif;" +
+ "Verdana, Arial, Helvetica, sans-serif=Verdana, Arial, Helvetica, sans-serif;" +
+ "Geneva, Arial, Helvetica, sans-serif=Geneva, Arial, Helvetica, sans-serif";
+
+var defaultSizes = "9;10;12;14;16;18;24;xx-small;x-small;small;medium;large;x-large;xx-large;smaller;larger";
+var defaultMeasurement = "+pixels=px;points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;ems=em;exs=ex;%";
+var defaultSpacingMeasurement = "pixels=px;points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;+ems=em;exs=ex;%";
+var defaultIndentMeasurement = "pixels=px;+points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;ems=em;exs=ex;%";
+var defaultWeight = "normal;bold;bolder;lighter;100;200;300;400;500;600;700;800;900";
+var defaultTextStyle = "normal;italic;oblique";
+var defaultVariant = "normal;small-caps";
+var defaultLineHeight = "normal";
+var defaultAttachment = "fixed;scroll";
+var defaultRepeat = "no-repeat;repeat;repeat-x;repeat-y";
+var defaultPosH = "left;center;right";
+var defaultPosV = "top;center;bottom";
+var defaultVAlign = "baseline;sub;super;top;text-top;middle;bottom;text-bottom";
+var defaultDisplay = "inline;block;list-item;run-in;compact;marker;table;inline-table;table-row-group;table-header-group;table-footer-group;table-row;table-column-group;table-column;table-cell;table-caption;none";
+var defaultBorderStyle = "none;solid;dashed;dotted;double;groove;ridge;inset;outset";
+var defaultBorderWidth = "thin;medium;thick";
+var defaultListType = "disc;circle;square;decimal;lower-roman;upper-roman;lower-alpha;upper-alpha;none";
+
+function aggregateStyles(allStyles) {
+ var mergedStyles = {};
+
+ tinymce.each(allStyles, function(style) {
+ if (style !== '') {
+ var parsedStyles = tinyMCEPopup.editor.dom.parseStyle(style);
+ for (var name in parsedStyles) {
+ if (parsedStyles.hasOwnProperty(name)) {
+ if (mergedStyles[name] === undefined) {
+ mergedStyles[name] = parsedStyles[name];
+ }
+ else if (name === 'text-decoration') {
+ if (mergedStyles[name].indexOf(parsedStyles[name]) === -1) {
+ mergedStyles[name] = mergedStyles[name] +' '+ parsedStyles[name];
+ }
+ }
+ }
+ }
+ }
+ });
+
+ return mergedStyles;
+}
+
+var applyActionIsInsert;
+var existingStyles;
+
+function init(ed) {
+ var ce = document.getElementById('container'), h;
+
+ existingStyles = aggregateStyles(tinyMCEPopup.getWindowArg('styles'));
+ ce.style.cssText = tinyMCEPopup.editor.dom.serializeStyle(existingStyles);
+
+ applyActionIsInsert = ed.getParam("edit_css_style_insert_span", false);
+ document.getElementById('toggle_insert_span').checked = applyActionIsInsert;
+
+ h = getBrowserHTML('background_image_browser','background_image','image','advimage');
+ document.getElementById("background_image_browser").innerHTML = h;
+
+ document.getElementById('text_color_pickcontainer').innerHTML = getColorPickerHTML('text_color_pick','text_color');
+ document.getElementById('background_color_pickcontainer').innerHTML = getColorPickerHTML('background_color_pick','background_color');
+ document.getElementById('border_color_top_pickcontainer').innerHTML = getColorPickerHTML('border_color_top_pick','border_color_top');
+ document.getElementById('border_color_right_pickcontainer').innerHTML = getColorPickerHTML('border_color_right_pick','border_color_right');
+ document.getElementById('border_color_bottom_pickcontainer').innerHTML = getColorPickerHTML('border_color_bottom_pick','border_color_bottom');
+ document.getElementById('border_color_left_pickcontainer').innerHTML = getColorPickerHTML('border_color_left_pick','border_color_left');
+
+ fillSelect(0, 'text_font', 'style_font', defaultFonts, ';', true);
+ fillSelect(0, 'text_size', 'style_font_size', defaultSizes, ';', true);
+ fillSelect(0, 'text_size_measurement', 'style_font_size_measurement', defaultMeasurement, ';', true);
+ fillSelect(0, 'text_case', 'style_text_case', "capitalize;uppercase;lowercase", ';', true);
+ fillSelect(0, 'text_weight', 'style_font_weight', defaultWeight, ';', true);
+ fillSelect(0, 'text_style', 'style_font_style', defaultTextStyle, ';', true);
+ fillSelect(0, 'text_variant', 'style_font_variant', defaultVariant, ';', true);
+ fillSelect(0, 'text_lineheight', 'style_font_line_height', defaultLineHeight, ';', true);
+ fillSelect(0, 'text_lineheight_measurement', 'style_font_line_height_measurement', defaultMeasurement, ';', true);
+
+ fillSelect(0, 'background_attachment', 'style_background_attachment', defaultAttachment, ';', true);
+ fillSelect(0, 'background_repeat', 'style_background_repeat', defaultRepeat, ';', true);
+
+ fillSelect(0, 'background_hpos_measurement', 'style_background_hpos_measurement', defaultMeasurement, ';', true);
+ fillSelect(0, 'background_vpos_measurement', 'style_background_vpos_measurement', defaultMeasurement, ';', true);
+
+ fillSelect(0, 'background_hpos', 'style_background_hpos', defaultPosH, ';', true);
+ fillSelect(0, 'background_vpos', 'style_background_vpos', defaultPosV, ';', true);
+
+ fillSelect(0, 'block_wordspacing', 'style_wordspacing', 'normal', ';', true);
+ fillSelect(0, 'block_wordspacing_measurement', 'style_wordspacing_measurement', defaultSpacingMeasurement, ';', true);
+ fillSelect(0, 'block_letterspacing', 'style_letterspacing', 'normal', ';', true);
+ fillSelect(0, 'block_letterspacing_measurement', 'style_letterspacing_measurement', defaultSpacingMeasurement, ';', true);
+ fillSelect(0, 'block_vertical_alignment', 'style_vertical_alignment', defaultVAlign, ';', true);
+ fillSelect(0, 'block_text_align', 'style_text_align', "left;right;center;justify", ';', true);
+ fillSelect(0, 'block_whitespace', 'style_whitespace', "normal;pre;nowrap", ';', true);
+ fillSelect(0, 'block_display', 'style_display', defaultDisplay, ';', true);
+ fillSelect(0, 'block_text_indent_measurement', 'style_text_indent_measurement', defaultIndentMeasurement, ';', true);
+
+ fillSelect(0, 'box_width_measurement', 'style_box_width_measurement', defaultMeasurement, ';', true);
+ fillSelect(0, 'box_height_measurement', 'style_box_height_measurement', defaultMeasurement, ';', true);
+ fillSelect(0, 'box_float', 'style_float', 'left;right;none', ';', true);
+ fillSelect(0, 'box_clear', 'style_clear', 'left;right;both;none', ';', true);
+ fillSelect(0, 'box_padding_left_measurement', 'style_padding_left_measurement', defaultMeasurement, ';', true);
+ fillSelect(0, 'box_padding_top_measurement', 'style_padding_top_measurement', defaultMeasurement, ';', true);
+ fillSelect(0, 'box_padding_bottom_measurement', 'style_padding_bottom_measurement', defaultMeasurement, ';', true);
+ fillSelect(0, 'box_padding_right_measurement', 'style_padding_right_measurement', defaultMeasurement, ';', true);
+ fillSelect(0, 'box_margin_left_measurement', 'style_margin_left_measurement', defaultMeasurement, ';', true);
+ fillSelect(0, 'box_margin_top_measurement', 'style_margin_top_measurement', defaultMeasurement, ';', true);
+ fillSelect(0, 'box_margin_bottom_measurement', 'style_margin_bottom_measurement', defaultMeasurement, ';', true);
+ fillSelect(0, 'box_margin_right_measurement', 'style_margin_right_measurement', defaultMeasurement, ';', true);
+
+ fillSelect(0, 'border_style_top', 'style_border_style_top', defaultBorderStyle, ';', true);
+ fillSelect(0, 'border_style_right', 'style_border_style_right', defaultBorderStyle, ';', true);
+ fillSelect(0, 'border_style_bottom', 'style_border_style_bottom', defaultBorderStyle, ';', true);
+ fillSelect(0, 'border_style_left', 'style_border_style_left', defaultBorderStyle, ';', true);
+
+ fillSelect(0, 'border_width_top', 'style_border_width_top', defaultBorderWidth, ';', true);
+ fillSelect(0, 'border_width_right', 'style_border_width_right', defaultBorderWidth, ';', true);
+ fillSelect(0, 'border_width_bottom', 'style_border_width_bottom', defaultBorderWidth, ';', true);
+ fillSelect(0, 'border_width_left', 'style_border_width_left', defaultBorderWidth, ';', true);
+
+ fillSelect(0, 'border_width_top_measurement', 'style_border_width_top_measurement', defaultMeasurement, ';', true);
+ fillSelect(0, 'border_width_right_measurement', 'style_border_width_right_measurement', defaultMeasurement, ';', true);
+ fillSelect(0, 'border_width_bottom_measurement', 'style_border_width_bottom_measurement', defaultMeasurement, ';', true);
+ fillSelect(0, 'border_width_left_measurement', 'style_border_width_left_measurement', defaultMeasurement, ';', true);
+
+ fillSelect(0, 'list_type', 'style_list_type', defaultListType, ';', true);
+ fillSelect(0, 'list_position', 'style_list_position', "inside;outside", ';', true);
+
+ fillSelect(0, 'positioning_type', 'style_positioning_type', "absolute;relative;static", ';', true);
+ fillSelect(0, 'positioning_visibility', 'style_positioning_visibility', "inherit;visible;hidden", ';', true);
+
+ fillSelect(0, 'positioning_width_measurement', 'style_positioning_width_measurement', defaultMeasurement, ';', true);
+ fillSelect(0, 'positioning_height_measurement', 'style_positioning_height_measurement', defaultMeasurement, ';', true);
+ fillSelect(0, 'positioning_overflow', 'style_positioning_overflow', "visible;hidden;scroll;auto", ';', true);
+
+ fillSelect(0, 'positioning_placement_top_measurement', 'style_positioning_placement_top_measurement', defaultMeasurement, ';', true);
+ fillSelect(0, 'positioning_placement_right_measurement', 'style_positioning_placement_right_measurement', defaultMeasurement, ';', true);
+ fillSelect(0, 'positioning_placement_bottom_measurement', 'style_positioning_placement_bottom_measurement', defaultMeasurement, ';', true);
+ fillSelect(0, 'positioning_placement_left_measurement', 'style_positioning_placement_left_measurement', defaultMeasurement, ';', true);
+
+ fillSelect(0, 'positioning_clip_top_measurement', 'style_positioning_clip_top_measurement', defaultMeasurement, ';', true);
+ fillSelect(0, 'positioning_clip_right_measurement', 'style_positioning_clip_right_measurement', defaultMeasurement, ';', true);
+ fillSelect(0, 'positioning_clip_bottom_measurement', 'style_positioning_clip_bottom_measurement', defaultMeasurement, ';', true);
+ fillSelect(0, 'positioning_clip_left_measurement', 'style_positioning_clip_left_measurement', defaultMeasurement, ';', true);
+
+ TinyMCE_EditableSelects.init();
+ setupFormData();
+ showDisabledControls();
+}
+
+function setupFormData() {
+ var ce = document.getElementById('container'), f = document.forms[0], s, b, i;
+
+ // Setup text fields
+
+ selectByValue(f, 'text_font', ce.style.fontFamily, true, true);
+ selectByValue(f, 'text_size', getNum(ce.style.fontSize), true, true);
+ selectByValue(f, 'text_size_measurement', getMeasurement(ce.style.fontSize));
+ selectByValue(f, 'text_weight', ce.style.fontWeight, true, true);
+ selectByValue(f, 'text_style', ce.style.fontStyle, true, true);
+ selectByValue(f, 'text_lineheight', getNum(ce.style.lineHeight), true, true);
+ selectByValue(f, 'text_lineheight_measurement', getMeasurement(ce.style.lineHeight));
+ selectByValue(f, 'text_case', ce.style.textTransform, true, true);
+ selectByValue(f, 'text_variant', ce.style.fontVariant, true, true);
+ f.text_color.value = tinyMCEPopup.editor.dom.toHex(ce.style.color);
+ updateColor('text_color_pick', 'text_color');
+ f.text_underline.checked = inStr(ce.style.textDecoration, 'underline');
+ f.text_overline.checked = inStr(ce.style.textDecoration, 'overline');
+ f.text_linethrough.checked = inStr(ce.style.textDecoration, 'line-through');
+ f.text_blink.checked = inStr(ce.style.textDecoration, 'blink');
+ f.text_none.checked = inStr(ce.style.textDecoration, 'none');
+ updateTextDecorations();
+
+ // Setup background fields
+
+ f.background_color.value = tinyMCEPopup.editor.dom.toHex(ce.style.backgroundColor);
+ updateColor('background_color_pick', 'background_color');
+ f.background_image.value = ce.style.backgroundImage.replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
+ selectByValue(f, 'background_repeat', ce.style.backgroundRepeat, true, true);
+ selectByValue(f, 'background_attachment', ce.style.backgroundAttachment, true, true);
+ selectByValue(f, 'background_hpos', getNum(getVal(ce.style.backgroundPosition, 0)), true, true);
+ selectByValue(f, 'background_hpos_measurement', getMeasurement(getVal(ce.style.backgroundPosition, 0)));
+ selectByValue(f, 'background_vpos', getNum(getVal(ce.style.backgroundPosition, 1)), true, true);
+ selectByValue(f, 'background_vpos_measurement', getMeasurement(getVal(ce.style.backgroundPosition, 1)));
+
+ // Setup block fields
+
+ selectByValue(f, 'block_wordspacing', getNum(ce.style.wordSpacing), true, true);
+ selectByValue(f, 'block_wordspacing_measurement', getMeasurement(ce.style.wordSpacing));
+ selectByValue(f, 'block_letterspacing', getNum(ce.style.letterSpacing), true, true);
+ selectByValue(f, 'block_letterspacing_measurement', getMeasurement(ce.style.letterSpacing));
+ selectByValue(f, 'block_vertical_alignment', ce.style.verticalAlign, true, true);
+ selectByValue(f, 'block_text_align', ce.style.textAlign, true, true);
+ f.block_text_indent.value = getNum(ce.style.textIndent);
+ selectByValue(f, 'block_text_indent_measurement', getMeasurement(ce.style.textIndent));
+ selectByValue(f, 'block_whitespace', ce.style.whiteSpace, true, true);
+ selectByValue(f, 'block_display', ce.style.display, true, true);
+
+ // Setup box fields
+
+ f.box_width.value = getNum(ce.style.width);
+ selectByValue(f, 'box_width_measurement', getMeasurement(ce.style.width));
+
+ f.box_height.value = getNum(ce.style.height);
+ selectByValue(f, 'box_height_measurement', getMeasurement(ce.style.height));
+ selectByValue(f, 'box_float', ce.style.cssFloat || ce.style.styleFloat, true, true);
+
+ selectByValue(f, 'box_clear', ce.style.clear, true, true);
+
+ setupBox(f, ce, 'box_padding', 'padding', '');
+ setupBox(f, ce, 'box_margin', 'margin', '');
+
+ // Setup border fields
+
+ setupBox(f, ce, 'border_style', 'border', 'Style');
+ setupBox(f, ce, 'border_width', 'border', 'Width');
+ setupBox(f, ce, 'border_color', 'border', 'Color');
+
+ updateColor('border_color_top_pick', 'border_color_top');
+ updateColor('border_color_right_pick', 'border_color_right');
+ updateColor('border_color_bottom_pick', 'border_color_bottom');
+ updateColor('border_color_left_pick', 'border_color_left');
+
+ f.elements.border_color_top.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_top.value);
+ f.elements.border_color_right.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_right.value);
+ f.elements.border_color_bottom.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_bottom.value);
+ f.elements.border_color_left.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_left.value);
+
+ // Setup list fields
+
+ selectByValue(f, 'list_type', ce.style.listStyleType, true, true);
+ selectByValue(f, 'list_position', ce.style.listStylePosition, true, true);
+ f.list_bullet_image.value = ce.style.listStyleImage.replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
+
+ // Setup box fields
+
+ selectByValue(f, 'positioning_type', ce.style.position, true, true);
+ selectByValue(f, 'positioning_visibility', ce.style.visibility, true, true);
+ selectByValue(f, 'positioning_overflow', ce.style.overflow, true, true);
+ f.positioning_zindex.value = ce.style.zIndex ? ce.style.zIndex : "";
+
+ f.positioning_width.value = getNum(ce.style.width);
+ selectByValue(f, 'positioning_width_measurement', getMeasurement(ce.style.width));
+
+ f.positioning_height.value = getNum(ce.style.height);
+ selectByValue(f, 'positioning_height_measurement', getMeasurement(ce.style.height));
+
+ setupBox(f, ce, 'positioning_placement', '', '', ['top', 'right', 'bottom', 'left']);
+
+ s = ce.style.clip.replace(new RegExp("rect\\('?([^']*)'?\\)", 'gi'), "$1");
+ s = s.replace(/,/g, ' ');
+
+ if (!hasEqualValues([getVal(s, 0), getVal(s, 1), getVal(s, 2), getVal(s, 3)])) {
+ f.positioning_clip_top.value = getNum(getVal(s, 0));
+ selectByValue(f, 'positioning_clip_top_measurement', getMeasurement(getVal(s, 0)));
+ f.positioning_clip_right.value = getNum(getVal(s, 1));
+ selectByValue(f, 'positioning_clip_right_measurement', getMeasurement(getVal(s, 1)));
+ f.positioning_clip_bottom.value = getNum(getVal(s, 2));
+ selectByValue(f, 'positioning_clip_bottom_measurement', getMeasurement(getVal(s, 2)));
+ f.positioning_clip_left.value = getNum(getVal(s, 3));
+ selectByValue(f, 'positioning_clip_left_measurement', getMeasurement(getVal(s, 3)));
+ } else {
+ f.positioning_clip_top.value = getNum(getVal(s, 0));
+ selectByValue(f, 'positioning_clip_top_measurement', getMeasurement(getVal(s, 0)));
+ f.positioning_clip_right.value = f.positioning_clip_bottom.value = f.positioning_clip_left.value;
+ }
+
+// setupBox(f, ce, '', 'border', 'Color');
+}
+
+function getMeasurement(s) {
+ return s.replace(/^([0-9.]+)(.*)$/, "$2");
+}
+
+function getNum(s) {
+ if (new RegExp('^(?:[0-9.]+)(?:[a-z%]+)$', 'gi').test(s))
+ return s.replace(/[^0-9.]/g, '');
+
+ return s;
+}
+
+function inStr(s, n) {
+ return new RegExp(n, 'gi').test(s);
+}
+
+function getVal(s, i) {
+ var a = s.split(' ');
+
+ if (a.length > 1)
+ return a[i];
+
+ return "";
+}
+
+function setValue(f, n, v) {
+ if (f.elements[n].type == "text")
+ f.elements[n].value = v;
+ else
+ selectByValue(f, n, v, true, true);
+}
+
+function setupBox(f, ce, fp, pr, sf, b) {
+ if (typeof(b) == "undefined")
+ b = ['Top', 'Right', 'Bottom', 'Left'];
+
+ if (isSame(ce, pr, sf, b)) {
+ f.elements[fp + "_same"].checked = true;
+
+ setValue(f, fp + "_top", getNum(ce.style[pr + b[0] + sf]));
+ f.elements[fp + "_top"].disabled = false;
+
+ f.elements[fp + "_right"].value = "";
+ f.elements[fp + "_right"].disabled = true;
+ f.elements[fp + "_bottom"].value = "";
+ f.elements[fp + "_bottom"].disabled = true;
+ f.elements[fp + "_left"].value = "";
+ f.elements[fp + "_left"].disabled = true;
+
+ if (f.elements[fp + "_top_measurement"]) {
+ selectByValue(f, fp + '_top_measurement', getMeasurement(ce.style[pr + b[0] + sf]));
+ f.elements[fp + "_left_measurement"].disabled = true;
+ f.elements[fp + "_bottom_measurement"].disabled = true;
+ f.elements[fp + "_right_measurement"].disabled = true;
+ }
+ } else {
+ f.elements[fp + "_same"].checked = false;
+
+ setValue(f, fp + "_top", getNum(ce.style[pr + b[0] + sf]));
+ f.elements[fp + "_top"].disabled = false;
+
+ setValue(f, fp + "_right", getNum(ce.style[pr + b[1] + sf]));
+ f.elements[fp + "_right"].disabled = false;
+
+ setValue(f, fp + "_bottom", getNum(ce.style[pr + b[2] + sf]));
+ f.elements[fp + "_bottom"].disabled = false;
+
+ setValue(f, fp + "_left", getNum(ce.style[pr + b[3] + sf]));
+ f.elements[fp + "_left"].disabled = false;
+
+ if (f.elements[fp + "_top_measurement"]) {
+ selectByValue(f, fp + '_top_measurement', getMeasurement(ce.style[pr + b[0] + sf]));
+ selectByValue(f, fp + '_right_measurement', getMeasurement(ce.style[pr + b[1] + sf]));
+ selectByValue(f, fp + '_bottom_measurement', getMeasurement(ce.style[pr + b[2] + sf]));
+ selectByValue(f, fp + '_left_measurement', getMeasurement(ce.style[pr + b[3] + sf]));
+ f.elements[fp + "_left_measurement"].disabled = false;
+ f.elements[fp + "_bottom_measurement"].disabled = false;
+ f.elements[fp + "_right_measurement"].disabled = false;
+ }
+ }
+}
+
+function isSame(e, pr, sf, b) {
+ var a = [], i, x;
+
+ if (typeof(b) == "undefined")
+ b = ['Top', 'Right', 'Bottom', 'Left'];
+
+ if (typeof(sf) == "undefined" || sf == null)
+ sf = "";
+
+ a[0] = e.style[pr + b[0] + sf];
+ a[1] = e.style[pr + b[1] + sf];
+ a[2] = e.style[pr + b[2] + sf];
+ a[3] = e.style[pr + b[3] + sf];
+
+ for (i=0; i<a.length; i++) {
+ if (a[i] == null)
+ return false;
+
+ for (x=0; x<a.length; x++) {
+ if (a[x] != a[i])
+ return false;
+ }
+ }
+
+ return true;
+};
+
+function hasEqualValues(a) {
+ var i, x;
+
+ for (i=0; i<a.length; i++) {
+ if (a[i] == null)
+ return false;
+
+ for (x=0; x<a.length; x++) {
+ if (a[x] != a[i])
+ return false;
+ }
+ }
+
+ return true;
+}
+
+function toggleApplyAction() {
+ applyActionIsInsert = ! applyActionIsInsert;
+}
+
+function applyAction() {
+ var ce = document.getElementById('container'), ed = tinyMCEPopup.editor;
+
+ generateCSS();
+
+ tinyMCEPopup.restoreSelection();
+
+ var newStyles = tinyMCEPopup.editor.dom.parseStyle(ce.style.cssText);
+
+ if (applyActionIsInsert) {
+ ed.formatter.register('plugin_style', {
+ inline: 'span', styles: existingStyles
+ });
+ ed.formatter.remove('plugin_style');
+
+ ed.formatter.register('plugin_style', {
+ inline: 'span', styles: newStyles
+ });
+ ed.formatter.apply('plugin_style');
+ } else {
+ var nodes;
+
+ if (tinyMCEPopup.getWindowArg('applyStyleToBlocks')) {
+ nodes = ed.selection.getSelectedBlocks();
+ }
+ else {
+ nodes = ed.selection.getNode();
+ }
+
+ ed.dom.setAttrib(nodes, 'style', tinyMCEPopup.editor.dom.serializeStyle(newStyles));
+ }
+}
+
+function updateAction() {
+ applyAction();
+ tinyMCEPopup.close();
+}
+
+function generateCSS() {
+ var ce = document.getElementById('container'), f = document.forms[0], num = new RegExp('[0-9]+', 'g'), s, t;
+
+ ce.style.cssText = "";
+
+ // Build text styles
+ ce.style.fontFamily = f.text_font.value;
+ ce.style.fontSize = f.text_size.value + (isNum(f.text_size.value) ? (f.text_size_measurement.value || 'px') : "");
+ ce.style.fontStyle = f.text_style.value;
+ ce.style.lineHeight = f.text_lineheight.value + (isNum(f.text_lineheight.value) ? f.text_lineheight_measurement.value : "");
+ ce.style.textTransform = f.text_case.value;
+ ce.style.fontWeight = f.text_weight.value;
+ ce.style.fontVariant = f.text_variant.value;
+ ce.style.color = f.text_color.value;
+
+ s = "";
+ s += f.text_underline.checked ? " underline" : "";
+ s += f.text_overline.checked ? " overline" : "";
+ s += f.text_linethrough.checked ? " line-through" : "";
+ s += f.text_blink.checked ? " blink" : "";
+ s = s.length > 0 ? s.substring(1) : s;
+
+ if (f.text_none.checked)
+ s = "none";
+
+ ce.style.textDecoration = s;
+
+ // Build background styles
+
+ ce.style.backgroundColor = f.background_color.value;
+ ce.style.backgroundImage = f.background_image.value != "" ? "url(" + f.background_image.value + ")" : "";
+ ce.style.backgroundRepeat = f.background_repeat.value;
+ ce.style.backgroundAttachment = f.background_attachment.value;
+
+ if (f.background_hpos.value != "") {
+ s = "";
+ s += f.background_hpos.value + (isNum(f.background_hpos.value) ? f.background_hpos_measurement.value : "") + " ";
+ s += f.background_vpos.value + (isNum(f.background_vpos.value) ? f.background_vpos_measurement.value : "");
+ ce.style.backgroundPosition = s;
+ }
+
+ // Build block styles
+
+ ce.style.wordSpacing = f.block_wordspacing.value + (isNum(f.block_wordspacing.value) ? f.block_wordspacing_measurement.value : "");
+ ce.style.letterSpacing = f.block_letterspacing.value + (isNum(f.block_letterspacing.value) ? f.block_letterspacing_measurement.value : "");
+ ce.style.verticalAlign = f.block_vertical_alignment.value;
+ ce.style.textAlign = f.block_text_align.value;
+ ce.style.textIndent = f.block_text_indent.value + (isNum(f.block_text_indent.value) ? f.block_text_indent_measurement.value : "");
+ ce.style.whiteSpace = f.block_whitespace.value;
+ ce.style.display = f.block_display.value;
+
+ // Build box styles
+
+ ce.style.width = f.box_width.value + (isNum(f.box_width.value) ? f.box_width_measurement.value : "");
+ ce.style.height = f.box_height.value + (isNum(f.box_height.value) ? f.box_height_measurement.value : "");
+ ce.style.styleFloat = f.box_float.value;
+ ce.style.cssFloat = f.box_float.value;
+
+ ce.style.clear = f.box_clear.value;
+
+ if (!f.box_padding_same.checked) {
+ ce.style.paddingTop = f.box_padding_top.value + (isNum(f.box_padding_top.value) ? f.box_padding_top_measurement.value : "");
+ ce.style.paddingRight = f.box_padding_right.value + (isNum(f.box_padding_right.value) ? f.box_padding_right_measurement.value : "");
+ ce.style.paddingBottom = f.box_padding_bottom.value + (isNum(f.box_padding_bottom.value) ? f.box_padding_bottom_measurement.value : "");
+ ce.style.paddingLeft = f.box_padding_left.value + (isNum(f.box_padding_left.value) ? f.box_padding_left_measurement.value : "");
+ } else
+ ce.style.padding = f.box_padding_top.value + (isNum(f.box_padding_top.value) ? f.box_padding_top_measurement.value : "");
+
+ if (!f.box_margin_same.checked) {
+ ce.style.marginTop = f.box_margin_top.value + (isNum(f.box_margin_top.value) ? f.box_margin_top_measurement.value : "");
+ ce.style.marginRight = f.box_margin_right.value + (isNum(f.box_margin_right.value) ? f.box_margin_right_measurement.value : "");
+ ce.style.marginBottom = f.box_margin_bottom.value + (isNum(f.box_margin_bottom.value) ? f.box_margin_bottom_measurement.value : "");
+ ce.style.marginLeft = f.box_margin_left.value + (isNum(f.box_margin_left.value) ? f.box_margin_left_measurement.value : "");
+ } else
+ ce.style.margin = f.box_margin_top.value + (isNum(f.box_margin_top.value) ? f.box_margin_top_measurement.value : "");
+
+ // Build border styles
+
+ if (!f.border_style_same.checked) {
+ ce.style.borderTopStyle = f.border_style_top.value;
+ ce.style.borderRightStyle = f.border_style_right.value;
+ ce.style.borderBottomStyle = f.border_style_bottom.value;
+ ce.style.borderLeftStyle = f.border_style_left.value;
+ } else
+ ce.style.borderStyle = f.border_style_top.value;
+
+ if (!f.border_width_same.checked) {
+ ce.style.borderTopWidth = f.border_width_top.value + (isNum(f.border_width_top.value) ? f.border_width_top_measurement.value : "");
+ ce.style.borderRightWidth = f.border_width_right.value + (isNum(f.border_width_right.value) ? f.border_width_right_measurement.value : "");
+ ce.style.borderBottomWidth = f.border_width_bottom.value + (isNum(f.border_width_bottom.value) ? f.border_width_bottom_measurement.value : "");
+ ce.style.borderLeftWidth = f.border_width_left.value + (isNum(f.border_width_left.value) ? f.border_width_left_measurement.value : "");
+ } else
+ ce.style.borderWidth = f.border_width_top.value + (isNum(f.border_width_top.value) ? f.border_width_top_measurement.value : "");
+
+ if (!f.border_color_same.checked) {
+ ce.style.borderTopColor = f.border_color_top.value;
+ ce.style.borderRightColor = f.border_color_right.value;
+ ce.style.borderBottomColor = f.border_color_bottom.value;
+ ce.style.borderLeftColor = f.border_color_left.value;
+ } else
+ ce.style.borderColor = f.border_color_top.value;
+
+ // Build list styles
+
+ ce.style.listStyleType = f.list_type.value;
+ ce.style.listStylePosition = f.list_position.value;
+ ce.style.listStyleImage = f.list_bullet_image.value != "" ? "url(" + f.list_bullet_image.value + ")" : "";
+
+ // Build positioning styles
+
+ ce.style.position = f.positioning_type.value;
+ ce.style.visibility = f.positioning_visibility.value;
+
+ if (ce.style.width == "")
+ ce.style.width = f.positioning_width.value + (isNum(f.positioning_width.value) ? f.positioning_width_measurement.value : "");
+
+ if (ce.style.height == "")
+ ce.style.height = f.positioning_height.value + (isNum(f.positioning_height.value) ? f.positioning_height_measurement.value : "");
+
+ ce.style.zIndex = f.positioning_zindex.value;
+ ce.style.overflow = f.positioning_overflow.value;
+
+ if (!f.positioning_placement_same.checked) {
+ ce.style.top = f.positioning_placement_top.value + (isNum(f.positioning_placement_top.value) ? f.positioning_placement_top_measurement.value : "");
+ ce.style.right = f.positioning_placement_right.value + (isNum(f.positioning_placement_right.value) ? f.positioning_placement_right_measurement.value : "");
+ ce.style.bottom = f.positioning_placement_bottom.value + (isNum(f.positioning_placement_bottom.value) ? f.positioning_placement_bottom_measurement.value : "");
+ ce.style.left = f.positioning_placement_left.value + (isNum(f.positioning_placement_left.value) ? f.positioning_placement_left_measurement.value : "");
+ } else {
+ s = f.positioning_placement_top.value + (isNum(f.positioning_placement_top.value) ? f.positioning_placement_top_measurement.value : "");
+ ce.style.top = s;
+ ce.style.right = s;
+ ce.style.bottom = s;
+ ce.style.left = s;
+ }
+
+ if (!f.positioning_clip_same.checked) {
+ s = "rect(";
+ s += (isNum(f.positioning_clip_top.value) ? f.positioning_clip_top.value + f.positioning_clip_top_measurement.value : "auto") + " ";
+ s += (isNum(f.positioning_clip_right.value) ? f.positioning_clip_right.value + f.positioning_clip_right_measurement.value : "auto") + " ";
+ s += (isNum(f.positioning_clip_bottom.value) ? f.positioning_clip_bottom.value + f.positioning_clip_bottom_measurement.value : "auto") + " ";
+ s += (isNum(f.positioning_clip_left.value) ? f.positioning_clip_left.value + f.positioning_clip_left_measurement.value : "auto");
+ s += ")";
+
+ if (s != "rect(auto auto auto auto)")
+ ce.style.clip = s;
+ } else {
+ s = "rect(";
+ t = isNum(f.positioning_clip_top.value) ? f.positioning_clip_top.value + f.positioning_clip_top_measurement.value : "auto";
+ s += t + " ";
+ s += t + " ";
+ s += t + " ";
+ s += t + ")";
+
+ if (s != "rect(auto auto auto auto)")
+ ce.style.clip = s;
+ }
+
+ ce.style.cssText = ce.style.cssText;
+}
+
+function isNum(s) {
+ return new RegExp('[0-9]+', 'g').test(s);
+}
+
+function showDisabledControls() {
+ var f = document.forms, i, a;
+
+ for (i=0; i<f.length; i++) {
+ for (a=0; a<f[i].elements.length; a++) {
+ if (f[i].elements[a].disabled)
+ tinyMCEPopup.editor.dom.addClass(f[i].elements[a], "disabled");
+ else
+ tinyMCEPopup.editor.dom.removeClass(f[i].elements[a], "disabled");
+ }
+ }
+}
+
+function fillSelect(f, s, param, dval, sep, em) {
+ var i, ar, p, se;
+
+ f = document.forms[f];
+ sep = typeof(sep) == "undefined" ? ";" : sep;
+
+ if (em)
+ addSelectValue(f, s, "", "");
+
+ ar = tinyMCEPopup.getParam(param, dval).split(sep);
+ for (i=0; i<ar.length; i++) {
+ se = false;
+
+ if (ar[i].charAt(0) == '+') {
+ ar[i] = ar[i].substring(1);
+ se = true;
+ }
+
+ p = ar[i].split('=');
+
+ if (p.length > 1) {
+ addSelectValue(f, s, p[0], p[1]);
+
+ if (se)
+ selectByValue(f, s, p[1]);
+ } else {
+ addSelectValue(f, s, p[0], p[0]);
+
+ if (se)
+ selectByValue(f, s, p[0]);
+ }
+ }
+}
+
+function toggleSame(ce, pre) {
+ var el = document.forms[0].elements, i;
+
+ if (ce.checked) {
+ el[pre + "_top"].disabled = false;
+ el[pre + "_right"].disabled = true;
+ el[pre + "_bottom"].disabled = true;
+ el[pre + "_left"].disabled = true;
+
+ if (el[pre + "_top_measurement"]) {
+ el[pre + "_top_measurement"].disabled = false;
+ el[pre + "_right_measurement"].disabled = true;
+ el[pre + "_bottom_measurement"].disabled = true;
+ el[pre + "_left_measurement"].disabled = true;
+ }
+ } else {
+ el[pre + "_top"].disabled = false;
+ el[pre + "_right"].disabled = false;
+ el[pre + "_bottom"].disabled = false;
+ el[pre + "_left"].disabled = false;
+
+ if (el[pre + "_top_measurement"]) {
+ el[pre + "_top_measurement"].disabled = false;
+ el[pre + "_right_measurement"].disabled = false;
+ el[pre + "_bottom_measurement"].disabled = false;
+ el[pre + "_left_measurement"].disabled = false;
+ }
+ }
+
+ showDisabledControls();
+}
+
+function synch(fr, to) {
+ var f = document.forms[0];
+
+ f.elements[to].value = f.elements[fr].value;
+
+ if (f.elements[fr + "_measurement"])
+ selectByValue(f, to + "_measurement", f.elements[fr + "_measurement"].value);
+}
+
+function updateTextDecorations(){
+ var el = document.forms[0].elements;
+
+ var textDecorations = ["text_underline", "text_overline", "text_linethrough", "text_blink"];
+ var noneChecked = el["text_none"].checked;
+ tinymce.each(textDecorations, function(id) {
+ el[id].disabled = noneChecked;
+ if (noneChecked) {
+ el[id].checked = false;
+ }
+ });
+}
+
+tinyMCEPopup.onInit.add(init);
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/style/langs/de_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/style/langs/de_dlg.js
new file mode 100644
index 00000000..ad04664e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/style/langs/de_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('de.style_dlg',{"text_lineheight":"Zeilenh\u00f6he","text_variant":"Variante","text_style":"Stil","text_weight":"Dicke","text_size":"Gr\u00f6\u00dfe","text_font":"Schriftart","text_props":"Text","positioning_tab":"Positionierung","list_tab":"Liste","border_tab":"Rahmen","box_tab":"Box","block_tab":"Block","background_tab":"Hintergrund","text_tab":"Text",apply:"\u00dcbernehmen",title:"CSS-Styles bearbeiten",clip:"Ausschnitt",placement:"Platzierung",overflow:"Verhalten bei \u00dcbergr\u00f6\u00dfe",zindex:"Z-Wert",visibility:"Sichtbar","positioning_type":"Art der Positionierung",position:"Positionierung","bullet_image":"Listenpunkt-Grafik","list_type":"Listenpunkt-Art",color:"Textfarbe",height:"H\u00f6he",width:"Breite",style:"Format",margin:"\u00c4u\u00dferer Abstand",left:"Links",bottom:"Unten",right:"Rechts",top:"Oben",same:"Alle gleich",padding:"Innerer Abstand","box_clear":"Umflie\u00dfung verhindern","box_float":"Umflie\u00dfung","box_height":"H\u00f6he","box_width":"Breite","block_display":"Umbruchverhalten","block_whitespace":"Automatischer Umbruch","block_text_indent":"Einr\u00fcckung","block_text_align":"Ausrichtung","block_vertical_alignment":"Vertikale Ausrichtung","block_letterspacing":"Buchstabenabstand","block_wordspacing":"Wortabstand","background_vpos":"Position Y","background_hpos":"Position X","background_attachment":"Wasserzeicheneffekt","background_repeat":"Wiederholung","background_image":"Hintergrundbild","background_color":"Hintergrundfarbe","text_none":"keine","text_blink":"blinkend","text_case":"Schreibung","text_striketrough":"durchgestrichen","text_underline":"unterstrichen","text_overline":"\u00fcberstrichen","text_decoration":"Gestaltung","text_color":"Farbe",text:"Text",background:"Hintergrund",block:"Block",box:"Box",border:"Rahmen",list:"Liste"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/style/langs/en_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/style/langs/en_dlg.js
new file mode 100644
index 00000000..9a1d4a22
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/style/langs/en_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('en.style_dlg',{"text_lineheight":"Line Height","text_variant":"Variant","text_style":"Style","text_weight":"Weight","text_size":"Size","text_font":"Font","text_props":"Text","positioning_tab":"Positioning","list_tab":"List","border_tab":"Border","box_tab":"Box","block_tab":"Block","background_tab":"Background","text_tab":"Text",apply:"Apply",title:"Edit CSS Style",clip:"Clip",placement:"Placement",overflow:"Overflow",zindex:"Z-index",visibility:"Visibility","positioning_type":"Type",position:"Position","bullet_image":"Bullet Image","list_type":"Type",color:"Color",height:"Height",width:"Width",style:"Style",margin:"Margin",left:"Left",bottom:"Bottom",right:"Right",top:"Top",same:"Same for All",padding:"Padding","box_clear":"Clear","box_float":"Float","box_height":"Height","box_width":"Width","block_display":"Display","block_whitespace":"Whitespace","block_text_indent":"Text Indent","block_text_align":"Text Align","block_vertical_alignment":"Vertical Alignment","block_letterspacing":"Letter Spacing","block_wordspacing":"Word Spacing","background_vpos":"Vertical Position","background_hpos":"Horizontal Position","background_attachment":"Attachment","background_repeat":"Repeat","background_image":"Background Image","background_color":"Background Color","text_none":"None","text_blink":"Blink","text_case":"Case","text_striketrough":"Strikethrough","text_underline":"Underline","text_overline":"Overline","text_decoration":"Decoration","text_color":"Color",text:"Text",background:"Background",block:"Block",box:"Box",border:"Border",list:"List"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/style/langs/hu_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/style/langs/hu_dlg.js
new file mode 100644
index 00000000..b60f3f73
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/style/langs/hu_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('hu.style_dlg',{"text_lineheight":"Sormagass\u00e1g","text_variant":"V\u00e1ltozat","text_style":"St\u00edlus","text_weight":"Sz\u00e9less\u00e9g","text_size":"M\u00e9ret","text_font":"Bet\u0171t\u00edpus","text_props":"Sz\u00f6veg","positioning_tab":"Poz\u00edci\u00f3","list_tab":"Lista","border_tab":"Keret","box_tab":"Doboz","block_tab":"Blokk","background_tab":"H\u00e1tt\u00e9r","text_tab":"Sz\u00f6veg",apply:"Alkalmaz",title:"CSS st\u00edlus szerkest\u00e9se",clip:"Lev\u00e1g\u00e1s",placement:"Elhelyez\u00e9s",overflow:"Kifut\u00e1s",zindex:"Z-index",visibility:"L\u00e1that\u00f3s\u00e1g","positioning_type":"T\u00edpus",position:"Poz\u00edci\u00f3","bullet_image":"Elemk\u00e9p","list_type":"T\u00edpus",color:"Sz\u00edn",height:"Magass\u00e1g",width:"Sz\u00e9less\u00e9g",style:"St\u00edlus",margin:"Marg\u00f3",left:"Balra",bottom:"Lent",right:"Jobbra",top:"Fel\u00fcl",same:"Mindenhol ugyanaz",padding:"Bels\u0151 marg\u00f3","box_clear":"Lebeg\u00e9s (float) t\u00f6rl\u00e9se","box_float":"Lebeg\u00e9s (float)","box_height":"Magass\u00e1g","box_width":"Sz\u00e9less\u00e9g","block_display":"Megjelen\u00edt\u00e9s","block_whitespace":"T\u00e9rk\u00f6z","block_text_indent":"Sz\u00f6veg beh\u00faz\u00e1sa","block_text_align":"Sz\u00f6veg igaz\u00edt\u00e1sa","block_vertical_alignment":"F\u00fcgg\u0151leges igaz\u00edt\u00e1s","block_letterspacing":"Bet\u0171t\u00e1vols\u00e1g","block_wordspacing":"Sz\u00f3t\u00e1vols\u00e1g","background_vpos":"F\u00fcgg\u0151leges hely","background_hpos":"V\u00edzszintes hely","background_attachment":"Csatolm\u00e1ny","background_repeat":"Ism\u00e9tl\u00e9s","background_image":"H\u00e1tt\u00e9rk\u00e9p","background_color":"H\u00e1tt\u00e9rsz\u00edn","text_none":"egyik sem","text_blink":"villog\u00e1s","text_case":"eset","text_striketrough":"\u00e1th\u00fazott","text_underline":"al\u00e1h\u00fazott","text_overline":"fel\u00fclh\u00fazott","text_decoration":"dekor\u00e1ci\u00f3","text_color":"sz\u00edn",text:"Sz\u00f6veg",background:"H\u00e1tt\u00e9r",block:"Blokk",box:"Doboz",border:"Keret",list:"Lista"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/style/langs/ja_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/style/langs/ja_dlg.js
new file mode 100644
index 00000000..4d5953cf
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/style/langs/ja_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('ja.style_dlg',{"text_lineheight":"\u884c\u306e\u9ad8\u3055","text_variant":"\u5909\u5f62","text_style":"\u30b9\u30bf\u30a4\u30eb","text_weight":"\u592a\u3055","text_size":"\u5927\u304d\u3055","text_font":"\u30d5\u30a9\u30f3\u30c8","text_props":"\u30c6\u30ad\u30b9\u30c8","positioning_tab":"\u4f4d\u7f6e","list_tab":"\u7b87\u6761\u66f8\u304d","border_tab":"\u67a0\u7dda","box_tab":"\u30dc\u30c3\u30af\u30b9","block_tab":"\u30d6\u30ed\u30c3\u30af","background_tab":"\u80cc\u666f","text_tab":"\u6587\u5b57",apply:"\u9069\u7528",title:"CSS\u306e\u30b9\u30bf\u30a4\u30eb\u3092\u7de8\u96c6",clip:"\u5207\u308a\u629c\u304d",placement:"\u914d\u7f6e",overflow:"\u30aa\u30fc\u30d0\u30fc\u30d5\u30ed\u30fc",zindex:"Z-index",visibility:"\u53ef\u8996\u6027","positioning_type":"\u914d\u7f6e\u65b9\u6cd5",position:"\u8868\u793a\u4f4d\u7f6e","bullet_image":"\u884c\u982d\u6587\u5b57","list_type":"\u7b87\u6761\u66f8\u304d\u306e\u7a2e\u985e",color:"\u8272",height:"\u9ad8\u3055",width:"\u5e45",style:"\u30b9\u30bf\u30a4\u30eb",margin:"\u30de\u30fc\u30b8\u30f3",left:"\u5de6",bottom:"\u4e0b",right:"\u53f3",top:"\u4e0a",same:"\u3059\u3079\u3066\u540c\u3058",padding:"\u30d1\u30c7\u30a3\u30f3\u30b0","box_clear":"\u56de\u308a\u8fbc\u307f\u89e3\u9664","box_float":"\u56de\u308a\u8fbc\u307f","box_height":"\u9ad8\u3055","box_width":"\u5e45","block_display":"\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4","block_whitespace":"\u7a7a\u767d\u6587\u5b57","block_text_indent":"\u30c6\u30ad\u30b9\u30c8\u306e\u5b57\u4e0b\u3052","block_text_align":"\u30c6\u30ad\u30b9\u30c8\u306e\u6c34\u5e73\u914d\u7f6e","block_vertical_alignment":"\u5782\u76f4\u914d\u7f6e","block_letterspacing":"\u6587\u5b57\u9593\u9694","block_wordspacing":"\u5358\u8a9e\u9593\u9694","background_vpos":"\u5782\u76f4\u4f4d\u7f6e","background_hpos":"\u6c34\u5e73\u4f4d\u7f6e","background_attachment":"\u6dfb\u4ed8","background_repeat":"\u7e70\u308a\u8fd4\u3057","background_image":"\u80cc\u666f\u753b\u50cf","background_color":"\u80cc\u666f\u8272","text_none":"\u306a\u3057","text_blink":"\u70b9\u6ec5","text_case":"\u5927\u6587\u5b57/\u5c0f\u6587\u5b57","text_striketrough":"\u6253\u6d88\u3057\u7dda","text_underline":"\u4e0b\u7dda","text_overline":"\u4e0a\u7dda","text_decoration":"\u88c5\u98fe","text_color":"\u8272",text:"\u6587\u5b57",background:"\u80cc\u666f",block:"\u30d6\u30ed\u30c3\u30af",box:"\u30dc\u30c3\u30af\u30b9",border:"\u67a0\u7dda",list:"\u7b87\u6761\u66f8\u304d"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/style/props.htm b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/style/props.htm
new file mode 100755
index 00000000..7dc087a3
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/style/props.htm
@@ -0,0 +1,845 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>{#style_dlg.title}</title>
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script type="text/javascript" src="../../utils/mctabs.js"></script>
+ <script type="text/javascript" src="../../utils/editable_selects.js"></script>
+ <script type="text/javascript" src="../../utils/form_utils.js"></script>
+ <script type="text/javascript" src="js/props.js"></script>
+ <link href="css/props.css" rel="stylesheet" type="text/css" />
+</head>
+
+<body id="styleprops" style="display: none" role="application" aria-labelledby="app_title">
+<span id="app_title" style="display:none">{#style_dlg.title}</span>
+<form onsubmit="updateAction();return false;" action="#">
+<div class="tabs">
+ <ul>
+ <li id="text_tab" class="current" aria-controls="text_panel"><span><a href="javascript:mcTabs.displayTab('text_tab','text_panel');" onMouseDown="return false;">{#style_dlg.text_tab}</a></span></li>
+ <li id="background_tab" aria-controls="background_panel"><span><a href="javascript:mcTabs.displayTab('background_tab','background_panel');" onMouseDown="return false;">{#style_dlg.background_tab}</a></span></li>
+ <li id="block_tab" aria-controls="block_panel"><span><a href="javascript:mcTabs.displayTab('block_tab','block_panel');" onMouseDown="return false;">{#style_dlg.block_tab}</a></span></li>
+ <li id="box_tab" aria-controls="box_panel"><span><a href="javascript:mcTabs.displayTab('box_tab','box_panel');" onMouseDown="return false;">{#style_dlg.box_tab}</a></span></li>
+ <li id="border_tab" aria-controls="border_panel"><span><a href="javascript:mcTabs.displayTab('border_tab','border_panel');" onMouseDown="return false;">{#style_dlg.border_tab}</a></span></li>
+ <li id="list_tab" aria-controls="list_panel"><span><a href="javascript:mcTabs.displayTab('list_tab','list_panel');" onMouseDown="return false;">{#style_dlg.list_tab}</a></span></li>
+ <li id="positioning_tab" aria-controls="positioning_panel"><span><a href="javascript:mcTabs.displayTab('positioning_tab','positioning_panel');" onMouseDown="return false;">{#style_dlg.positioning_tab}</a></span></li>
+ </ul>
+</div>
+
+<div class="panel_wrapper">
+<div id="text_panel" class="panel current">
+ <fieldset>
+ <legend>{#style_dlg.text}</legend>
+ <table role="presentation" border="0" width="100%">
+ <tr>
+ <td><label for="text_font">{#style_dlg.text_font}</label></td>
+ <td colspan="3">
+ <select id="text_font" name="text_font" class="mceEditableSelect mceFocus"></select>
+ </td>
+ </tr>
+ <tr>
+ <td><label for="text_size">{#style_dlg.text_size}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><select id="text_size" name="text_size" class="mceEditableSelect"></select></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="text_size_measurement_label" for="text_size_measurement" style="display: none; visibility: hidden;">Text Size Measurement Unit</label>
+ <select id="text_size_measurement" name="text_size_measurement" aria-labelledby="text_size_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td><label for="text_weight">{#style_dlg.text_weight}</label></td>
+ <td>
+ <select id="text_weight" name="text_weight"></select>
+ </td>
+ </tr>
+ <tr>
+ <td><label for="text_style">{#style_dlg.text_style}</label></td>
+ <td>
+ <select id="text_style" name="text_style" class="mceEditableSelect"></select>
+ </td>
+ <td><label for="text_variant">{#style_dlg.text_variant}</label></td>
+ <td>
+ <select id="text_variant" name="text_variant"></select>
+ </td>
+ </tr>
+ <tr>
+ <td><label for="text_lineheight">{#style_dlg.text_lineheight}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td>
+ <select id="text_lineheight" name="text_lineheight" class="mceEditableSelect"></select>
+ </td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="text_lineheight_measurement_label" for="text_lineheight_measurement" style="display: none; visibility: hidden;">Line Height Measurement Unit</label>
+ <select id="text_lineheight_measurement" name="text_lineheight_measurement" aria-labelledby="text_lineheight_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td><label for="text_case">{#style_dlg.text_case}</label></td>
+ <td>
+ <select id="text_case" name="text_case"></select>
+ </td>
+ </tr>
+ <tr>
+ <td><label for="text_color">{#style_dlg.text_color}</label></td>
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input id="text_color" name="text_color" type="text" value="" size="9" onChange="updateColor('text_color_pick','text_color');" /></td>
+ <td id="text_color_pickcontainer">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" style="vertical-align: top; padding-top: 3px;">{#style_dlg.text_decoration}</td>
+ <td colspan="2">
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input id="text_underline" name="text_underline" class="checkbox" type="checkbox" /></td>
+ <td><label for="text_underline">{#style_dlg.text_underline}</label></td>
+ </tr>
+ <tr>
+ <td><input id="text_overline" name="text_overline" class="checkbox" type="checkbox" /></td>
+ <td><label for="text_overline">{#style_dlg.text_overline}</label></td>
+ </tr>
+ <tr>
+ <td><input id="text_linethrough" name="text_linethrough" class="checkbox" type="checkbox" /></td>
+ <td><label for="text_linethrough">{#style_dlg.text_striketrough}</label></td>
+ </tr>
+ <tr>
+ <td><input id="text_blink" name="text_blink" class="checkbox" type="checkbox" /></td>
+ <td><label for="text_blink">{#style_dlg.text_blink}</label></td>
+ </tr>
+ <tr>
+ <td><input id="text_none" name="text_none" class="checkbox" type="checkbox" onclick="updateTextDecorations();"/></td>
+ <td><label for="text_none">{#style_dlg.text_none}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+</div>
+
+<div id="background_panel" class="panel">
+ <fieldset>
+ <legend>{#style_dlg.background}</legend>
+ <table role="presentation" border="0">
+ <tr>
+ <td><label for="background_color">{#style_dlg.background_color}</label></td>
+ <td>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input id="background_color" name="background_color" type="text" value="" size="9" onChange="updateColor('background_color_pick','background_color');" /></td>
+ <td id="background_color_pickcontainer">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td><label for="background_image">{#style_dlg.background_image}</label></td>
+ <td><table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input id="background_image" name="background_image" type="text" /></td>
+ <td id="background_image_browser">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td><label for="background_repeat">{#style_dlg.background_repeat}</label></td>
+ <td><select id="background_repeat" name="background_repeat" class="mceEditableSelect"></select></td>
+ </tr>
+
+ <tr>
+ <td><label for="background_attachment">{#style_dlg.background_attachment}</label></td>
+ <td><select id="background_attachment" name="background_attachment" class="mceEditableSelect"></select></td>
+ </tr>
+
+ <tr>
+ <td><label for="background_hpos">{#style_dlg.background_hpos}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><select id="background_hpos" name="background_hpos" class="mceEditableSelect"></select></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="background_hpos_measurement_label" for="background_hpos_measurement" style="display: none; visibility: hidden;">Horizontal position measurement unit</label>
+ <select id="background_hpos_measurement" name="background_hpos_measurement" aria-labelledby="background_hpos_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td><label for="background_vpos">{#style_dlg.background_vpos}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><select id="background_vpos" name="background_vpos" class="mceEditableSelect"></select></td>
+ <td>&nbsp;</td>
+ <td>
+
+ <label id="background_vpos_measurement_label" for="background_vpos_measurement" style="display: none; visibility: hidden;">Vertical position measurement unit</label>
+ <select id="background_vpos_measurement" name="background_vpos_measurement" aria-labelledby="background_vpos_measurement_label">></select></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+</div>
+
+<div id="block_panel" class="panel">
+ <fieldset>
+ <legend>{#style_dlg.block}</legend>
+ <table role="presentation" border="0">
+ <tr>
+ <td><label for="block_wordspacing">{#style_dlg.block_wordspacing}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><select id="block_wordspacing" name="block_wordspacing" class="mceEditableSelect"></select></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="block_wordspacing_measurement_label" for="block_wordspacing_measurement" style="display: none; visibility: hidden;">Word spacing measurement unit</label>
+ <select id="block_wordspacing_measurement" name="block_wordspacing_measurement" aria-labelledby="block_wordspacing_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td><label for="block_letterspacing">{#style_dlg.block_letterspacing}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><select id="block_letterspacing" name="block_letterspacing" class="mceEditableSelect"></select></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="block_letterspacing_measurement_label" for="block_letterspacing_measurement" style="display: none; visibility: hidden;">Letter spacing measurement unit</label>
+ <select id="block_letterspacing_measurement" name="block_letterspacing_measurement" aria-labelledby="block_letterspacing_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td><label for="block_vertical_alignment">{#style_dlg.block_vertical_alignment}</label></td>
+ <td><select id="block_vertical_alignment" name="block_vertical_alignment" class="mceEditableSelect"></select></td>
+ </tr>
+
+ <tr>
+ <td><label for="block_text_align">{#style_dlg.block_text_align}</label></td>
+ <td><select id="block_text_align" name="block_text_align" class="mceEditableSelect"></select></td>
+ </tr>
+
+ <tr>
+ <td><label for="block_text_indent">{#style_dlg.block_text_indent}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="block_text_indent" name="block_text_indent" /></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="block_text_indent_measurement_label" for="block_text_indent_measurement" style="display: none; visibility: hidden;">Text Indent Measurement Unit</label>
+
+ <select id="block_text_indent_measurement" name="block_text_indent_measurement" aria-labelledby="block_text_indent_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td><label for="block_whitespace">{#style_dlg.block_whitespace}</label></td>
+ <td><select id="block_whitespace" name="block_whitespace" class="mceEditableSelect"></select></td>
+ </tr>
+
+ <tr>
+ <td><label for="block_display">{#style_dlg.block_display}</label></td>
+ <td><select id="block_display" name="block_display" class="mceEditableSelect"></select></td>
+ </tr>
+ </table>
+ </fieldset>
+</div>
+
+<div id="box_panel" class="panel">
+ <fieldset>
+ <legend>{#style_dlg.box}</legend>
+ <table role="presentation" border="0">
+ <tr>
+ <td><label for="box_width">{#style_dlg.box_width}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="box_width" name="box_width" class="mceEditableSelect" onChange="synch('box_width','positioning_width');" /></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="box_width_measurement_label" for="box_width_measurement" style="display: none; visibility: hidden;">Box Width Measurement Unit</label>
+ <select id="box_width_measurement" name="box_width_measurement" aria-labelledby="box_width_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td>&nbsp;&nbsp;&nbsp;<label for="box_float">{#style_dlg.box_float}</label></td>
+ <td><select id="box_float" name="box_float" class="mceEditableSelect"></select></td>
+ </tr>
+
+ <tr>
+ <td><label for="box_height">{#style_dlg.box_height}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="box_height" name="box_height" class="mceEditableSelect" onChange="synch('box_height','positioning_height');" /></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="box_height_measurement_label" for="box_height_measurement" style="display: none; visibility: hidden;">Box Height Measurement Unit</label>
+ <select id="box_height_measurement" name="box_height_measurement" aria-labelledby="box_height_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td>&nbsp;&nbsp;&nbsp;<label for="box_clear">{#style_dlg.box_clear}</label></td>
+ <td><select id="box_clear" name="box_clear" class="mceEditableSelect"></select></td>
+ </tr>
+ </table>
+ </fieldset>
+
+<div style="float: left; width: 49%">
+ <fieldset>
+ <legend>{#style_dlg.padding}</legend>
+
+ <table role="presentation" border="0">
+ <tr>
+ <td>&nbsp;</td>
+ <td><input type="checkbox" id="box_padding_same" name="box_padding_same" class="checkbox" checked="checked" onClick="toggleSame(this,'box_padding');" /> <label for="box_padding_same">{#style_dlg.same}</label></td>
+ </tr>
+ <tr>
+ <td><label for="box_padding_top">{#style_dlg.top}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="box_padding_top" name="box_padding_top" class="mceEditableSelect" /></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="box_padding_top_measurement_label" for="box_padding_top_measurement" style="display: none; visibility: hidden;">Padding Top Measurement Unit</label>
+ <select id="box_padding_top_measurement" name="box_padding_top_measurement" aria-labelledby="box_padding_top_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><label for="box_padding_right">{#style_dlg.right}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="box_padding_right" name="box_padding_right" class="mceEditableSelect" disabled="disabled" /></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="box_padding_right_measurement_label" for="box_padding_right_measurement" style="display: none; visibility: hidden;">Padding Right Measurement Unit</label>
+ <select id="box_padding_right_measurement" name="box_padding_right_measurement" disabled="disabled" aria-labelledby="box_padding_right_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><label for="box_padding_bottom">{#style_dlg.bottom}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="box_padding_bottom" name="box_padding_bottom" class="mceEditableSelect" disabled="disabled" /></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="box_padding_bottom_measurement_label" for="box_padding_bottom_measurement" style="display: none; visibility: hidden;">Padding Bottom Measurement Unit</label>
+ <select id="box_padding_bottom_measurement" name="box_padding_bottom_measurement" disabled="disabled" aria-labelledby="box_padding_bottom_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><label for="box_padding_left">{#style_dlg.left}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="box_padding_left" name="box_padding_left" class="mceEditableSelect" disabled="disabled" /></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="box_padding_left_measurement_label" for="box_padding_left_measurement" style="display: none; visibility: hidden;">Padding Left Measurement Unit</label>
+ <select id="box_padding_left_measurement" name="box_padding_left_measurement" disabled="disabled" aria-labelledby="box_padding_left_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+</div>
+
+<div style="float: right; width: 49%">
+ <fieldset>
+ <legend>{#style_dlg.margin}</legend>
+
+ <table role="presentation" border="0">
+ <tr>
+ <td>&nbsp;</td>
+ <td><input type="checkbox" id="box_margin_same" name="box_margin_same" class="checkbox" checked="checked" onClick="toggleSame(this,'box_margin');" /> <label for="box_margin_same">{#style_dlg.same}</label></td>
+ </tr>
+ <tr>
+ <td><label for="box_margin_top">{#style_dlg.top}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="box_margin_top" name="box_margin_top" class="mceEditableSelect" /></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="box_margin_top_measurement_label" for="box_margin_top_measurement" style="display: none; visibility: hidden;">Margin Top Measurement Unit</label>
+ <select id="box_margin_top_measurement" name="box_margin_top_measurement" aria-labelledby="box_margin_top_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><label for="box_margin_right">{#style_dlg.right}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="box_margin_right" name="box_margin_right" class="mceEditableSelect" disabled="disabled" /></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="box_margin_right_measurement_label" for="box_margin_right_measurement" style="display: none; visibility: hidden;">Margin Right Measurement Unit</label>
+ <select id="box_margin_right_measurement" name="box_margin_right_measurement" disabled="disabled" aria-labelledby="box_margin_right_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><label for="box_margin_bottom">{#style_dlg.bottom}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="box_margin_bottom" name="box_margin_bottom" class="mceEditableSelect" disabled="disabled" /></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="box_margin_bottom_measurement_label" for="box_margin_bottom_measurement" style="display: none; visibility: hidden;">Margin Bottom Measurement Unit</label>
+ <select id="box_margin_bottom_measurement" name="box_margin_bottom_measurement" disabled="disabled" aria-labelledby="box_margin_bottom_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><label for="box_margin_left">{#style_dlg.left}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="box_margin_left" name="box_margin_left" class="mceEditableSelect" disabled="disabled" /></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="box_margin_left_measurement_label" for="box_margin_left_measurement" style="display: none; visibility: hidden;">Margin Left Measurement Unit</label>
+ <select id="box_margin_left_measurement" name="box_margin_left_measurement" disabled="disabled" aria-labelledby="box_margin_left_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+</div>
+<br style="clear: both" />
+</div>
+
+<div id="border_panel" class="panel">
+ <fieldset>
+ <legend>{#style_dlg.border}</legend>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0" width="100%">
+ <tr>
+ <td class="tdelim">&nbsp;</td>
+ <td class="tdelim delim">&nbsp;</td>
+ <td class="tdelim">{#style_dlg.style}</td>
+ <td class="tdelim delim">&nbsp;</td>
+ <td class="tdelim">{#style_dlg.width}</td>
+ <td class="tdelim delim">&nbsp;</td>
+ <td class="tdelim">{#style_dlg.color}</td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ <td class="delim">&nbsp;</td>
+ <td><input type="checkbox" id="border_style_same" name="border_style_same" class="checkbox" checked="checked" onClick="toggleSame(this,'border_style');" /> <label for="border_style_same">{#style_dlg.same}</label></td>
+ <td class="delim">&nbsp;</td>
+ <td><input type="checkbox" id="border_width_same" name="border_width_same" class="checkbox" checked="checked" onClick="toggleSame(this,'border_width');" /> <label for="border_width_same">{#style_dlg.same}</label></td>
+ <td class="delim">&nbsp;</td>
+ <td><input type="checkbox" id="border_color_same" name="border_color_same" class="checkbox" checked="checked" onClick="toggleSame(this,'border_color');" /> <label for="border_color_same">{#style_dlg.same}</label></td>
+ </tr>
+
+ <tr>
+ <td>{#style_dlg.top}</td>
+ <td class="delim">&nbsp;</td>
+ <td><select id="border_style_top" name="border_style_top" class="mceEditableSelect"></select></td>
+ <td class="delim">&nbsp;</td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><select id="border_width_top" name="border_width_top" class="mceEditableSelect"></select></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="border_width_top_measurement_label" for="border_width_top_measurement" style="display: none; visibility: hidden;">Width top Measurement Unit</label>
+ <select id="border_width_top_measurement" name="border_width_top_measurement" aria-labelledby="border_width_top_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td class="delim">&nbsp;</td>
+ <td>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input id="border_color_top" name="border_color_top" type="text" value="" size="9" onChange="updateColor('border_color_top_pick','border_color_top');" /></td>
+ <td id="border_color_top_pickcontainer">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>{#style_dlg.right}</td>
+ <td class="delim">&nbsp;</td>
+ <td><select id="border_style_right" name="border_style_right" class="mceEditableSelect" disabled="disabled"></select></td>
+ <td class="delim">&nbsp;</td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><select id="border_width_right" name="border_width_right" class="mceEditableSelect" disabled="disabled"></select></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="border_width_right_measurement_label" for="border_width_right_measurement" style="display: none; visibility: hidden;">Width Right Measurement Unit</label>
+ <select id="border_width_right_measurement" name="border_width_right_measurement" disabled="disabled" aria-labelledby="border_width_right_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td class="delim">&nbsp;</td>
+ <td>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input id="border_color_right" name="border_color_right" type="text" value="" size="9" onChange="updateColor('border_color_right_pick','border_color_right');" disabled="disabled" /></td>
+ <td id="border_color_right_pickcontainer">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>{#style_dlg.bottom}</td>
+ <td class="delim">&nbsp;</td>
+ <td><select id="border_style_bottom" name="border_style_bottom" class="mceEditableSelect" disabled="disabled"></select></td>
+ <td class="delim">&nbsp;</td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><select id="border_width_bottom" name="border_width_bottom" class="mceEditableSelect" disabled="disabled"></select></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="border_width_bottom_measurement_label" for="border_width_bottom_measurement" style="display: none; visibility: hidden;">Width Bottom Measurement Unit</label>
+ <select id="border_width_bottom_measurement" name="border_width_bottom_measurement" disabled="disabled" aria-labelledby="border_width_bottom_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td class="delim">&nbsp;</td>
+ <td>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input id="border_color_bottom" name="border_color_bottom" type="text" value="" size="9" onChange="updateColor('border_color_bottom_pick','border_color_bottom');" disabled="disabled" /></td>
+ <td id="border_color_bottom_pickcontainer">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>{#style_dlg.left}</td>
+ <td class="delim">&nbsp;</td>
+ <td><select id="border_style_left" name="border_style_left" class="mceEditableSelect" disabled="disabled"></select></td>
+ <td class="delim">&nbsp;</td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><select id="border_width_left" name="border_width_left" class="mceEditableSelect" disabled="disabled"></select></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="border_width_left_measurement_label" for="border_width_left_measurement" style="display: none; visibility: hidden;">Width Left Measurement Unit</label>
+ <select id="border_width_left_measurement" name="border_width_left_measurement" disabled="disabled" aria-labelledby="border_width_left_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td class="delim">&nbsp;</td>
+ <td>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input id="border_color_left" name="border_color_left" type="text" value="" size="9" onChange="updateColor('border_color_left_pick','border_color_left');" disabled="disabled" /></td>
+ <td id="border_color_left_pickcontainer">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+</div>
+
+<div id="list_panel" class="panel">
+<fieldset>
+ <legend>{#style_dlg.list}</legend>
+ <table role="presentation" border="0">
+ <tr>
+ <td><label for="list_type">{#style_dlg.list_type}</label></td>
+ <td><select id="list_type" name="list_type" class="mceEditableSelect"></select></td>
+ </tr>
+
+ <tr>
+ <td><label for="list_bullet_image">{#style_dlg.bullet_image}</label></td>
+ <td><input id="list_bullet_image" name="list_bullet_image" type="text" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="list_position">{#style_dlg.position}</label></td>
+ <td><select id="list_position" name="list_position" class="mceEditableSelect"></select></td>
+ </tr>
+ </table>
+</fieldset>
+</div>
+
+<div id="positioning_panel" class="panel">
+<fieldset>
+ <legend>{#style_dlg.position}</legend>
+<table role="presentation" border="0">
+ <tr>
+ <td><label for="positioning_type">{#style_dlg.positioning_type}</label></td>
+ <td><select id="positioning_type" name="positioning_type" class="mceEditableSelect"></select></td>
+ <td>&nbsp;&nbsp;&nbsp;<label for="positioning_visibility">{#style_dlg.visibility}</label></td>
+ <td><select id="positioning_visibility" name="positioning_visibility" class="mceEditableSelect"></select></td>
+ </tr>
+
+ <tr>
+ <td><label for="positioning_width">{#style_dlg.width}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="positioning_width" name="positioning_width" onChange="synch('positioning_width','box_width');" /></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="positioning_width_measurement_label" for="positioning_width_measurement" style="display: none; visibility: hidden;">Positioning width Measurement Unit</label>
+ <select id="positioning_width_measurement" name="positioning_width_measurement" aria-labelledby="positioning_width_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td>&nbsp;&nbsp;&nbsp;<label for="positioning_zindex">{#style_dlg.zindex}</label></td>
+ <td><input type="text" id="positioning_zindex" name="positioning_zindex" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="positioning_height">{#style_dlg.height}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="positioning_height" name="positioning_height" onChange="synch('positioning_height','box_height');" /></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="positioning_height_measurement_label" for="positioning_height_measurement" style="display: none; visibility: hidden;">Positioning Height Measurement Unit</label>
+ <select id="positioning_height_measurement" name="positioning_height_measurement" aria-labelledby="positioning_height_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td>&nbsp;&nbsp;&nbsp;<label for="positioning_overflow">{#style_dlg.overflow}</label></td>
+ <td><select id="positioning_overflow" name="positioning_overflow" class="mceEditableSelect"></select></td>
+ </tr>
+</table>
+</fieldset>
+
+<div style="float: left; width: 49%">
+ <fieldset>
+ <legend>{#style_dlg.placement}</legend>
+
+ <table role="presentation" border="0">
+ <tr>
+ <td>&nbsp;</td>
+ <td><input type="checkbox" id="positioning_placement_same" name="positioning_placement_same" class="checkbox" checked="checked" onClick="toggleSame(this,'positioning_placement');" /> <label for="positioning_placement_same">{#style_dlg.same}</label></td>
+ </tr>
+ <tr>
+ <td>{#style_dlg.top}</td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="positioning_placement_top" name="positioning_placement_top" /></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="positioning_placement_top_measurement_label" for="positioning_placement_top_measurement" style="display: none; visibility: hidden;">Placement Top Measurement Unit</label>
+ <select id="positioning_placement_top_measurement" name="positioning_placement_top_measurement" aria-labelledby="positioning_placement_top_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>{#style_dlg.right}</td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="positioning_placement_right" name="positioning_placement_right" disabled="disabled" /></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="positioning_placement_right_measurement_label" for="positioning_placement_right_measurement" style="display: none; visibility: hidden;">Placement Right Measurement Unit</label>
+ <select id="positioning_placement_right_measurement" name="positioning_placement_right_measurement" disabled="disabled" aria-labelledby="positioning_placement_right_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>{#style_dlg.bottom}</td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="positioning_placement_bottom" name="positioning_placement_bottom" disabled="disabled" /></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="positioning_placement_bottom_measurement_label" for="positioning_placement_bottom_measurement" style="display: none; visibility: hidden;">Placement Bottom Measurement Unit</label>
+ <select id="positioning_placement_bottom_measurement" name="positioning_placement_bottom_measurement" disabled="disabled" aria-labelledby="positioning_placement_bottom_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>{#style_dlg.left}</td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="positioning_placement_left" name="positioning_placement_left" disabled="disabled" /></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="positioning_placement_left_measurement_label" for="positioning_placement_left_measurement" style="display: none; visibility: hidden;">Placement Left Measurement Unit</label>
+ <select id="positioning_placement_left_measurement" name="positioning_placement_left_measurement" disabled="disabled" aria-labelledby="positioning_placement_left_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+</div>
+
+<div style="float: right; width: 49%">
+ <fieldset>
+ <legend>{#style_dlg.clip}</legend>
+
+ <table role="presentation" border="0">
+ <tr>
+ <td>&nbsp;</td>
+ <td><input type="checkbox" id="positioning_clip_same" name="positioning_clip_same" class="checkbox" checked="checked" onClick="toggleSame(this,'positioning_clip');" /> <label for="positioning_clip_same">{#style_dlg.same}</label></td>
+ </tr>
+ <tr>
+ <td>{#style_dlg.top}</td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="positioning_clip_top" name="positioning_clip_top" /></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="positioning_clip_top_measurement_label" for="positioning_clip_top_measurement" style="display: none; visibility: hidden;">Clip Top Measurement Unit</label>
+ <select id="positioning_clip_top_measurement" name="positioning_clip_top_measurement" aria-labelledby="positioning_clip_top_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>{#style_dlg.right}</td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="positioning_clip_right" name="positioning_clip_right" disabled="disabled" /></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="positioning_clip_right_measurement_label" for="positioning_clip_right_measurement" style="display: none; visibility: hidden;">Clip Right Measurement Unit</label>
+ <select id="positioning_clip_right_measurement" name="positioning_clip_right_measurement" disabled="disabled" aria-labelledby="positioning_clip_right_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>{#style_dlg.bottom}</td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="positioning_clip_bottom" name="positioning_clip_bottom" disabled="disabled" /></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="positioning_clip_bottom_measurement_label" for="positioning_clip_bottom_measurement" style="display: none; visibility: hidden;">Clip Bottom Measurement Unit</label>
+ <select id="positioning_clip_bottom_measurement" name="positioning_clip_bottom_measurement" disabled="disabled" aria-labelledby="positioning_clip_bottom_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>{#style_dlg.left}</td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="positioning_clip_left" name="positioning_clip_left" disabled="disabled" /></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="positioning_clip_left_measurement_label" for="positioning_clip_left_measurement" style="display: none; visibility: hidden;">Clip Left Measurement Unit</label>
+ <select id="positioning_clip_left_measurement" name="positioning_clip_left_measurement" disabled="disabled" aria-labelledby="positioning_clip_left_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+</div>
+<br style="clear: both" />
+</div>
+</div>
+
+<div class="panel_toggle_insert_span">
+ <input type="checkbox" class="checkbox" id="toggle_insert_span" name="toggle_insert_span" onClick="toggleApplyAction();" />
+ <label for="toggle_insert_span">{#style_dlg.toggle_insert_span}</label>
+</div>
+
+<div class="mceActionPanel">
+ <input type="submit" id="insert" name="insert" value="{#update}" />
+ <input type="button" class="button" id="apply" name="apply" value="{#style_dlg.apply}" onClick="applyAction();" />
+ <input type="button" id="cancel" name="cancel" value="{#cancel}" onClick="tinyMCEPopup.close();" />
+</div>
+</form>
+
+<div style="display: none">
+ <div id="container"></div>
+</div>
+
+</body>
+</html>
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/style/readme.txt b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/style/readme.txt
new file mode 100755
index 00000000..5bac3020
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/style/readme.txt
@@ -0,0 +1,19 @@
+Edit CSS Style plug-in notes
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Unlike WYSIWYG editor functionality that operates only on the selected text,
+typically by inserting new HTML elements with the specified styles.
+This plug-in operates on the HTML blocks surrounding the selected text.
+No new HTML elements are created.
+
+This plug-in only operates on the surrounding blocks and not the nearest
+parent node. This means that if a block encapsulates a node,
+e.g <p><span>text</span></p>, then only the styles in the block are
+recognized, not those in the span.
+
+When selecting text that includes multiple blocks at the same level (peers),
+this plug-in accumulates the specified styles in all of the surrounding blocks
+and populates the dialogue checkboxes accordingly. There is no differentiation
+between styles set in all the blocks versus styles set in some of the blocks.
+
+When the [Update] or [Apply] buttons are pressed, the styles selected in the
+checkboxes are applied to all blocks that surround the selected text.
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/tabfocus/editor_plugin.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/tabfocus/editor_plugin.js
new file mode 100644
index 00000000..2c512916
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/tabfocus/editor_plugin.js
@@ -0,0 +1 @@
+(function(){var c=tinymce.DOM,a=tinymce.dom.Event,d=tinymce.each,b=tinymce.explode;tinymce.create("tinymce.plugins.TabFocusPlugin",{init:function(f,g){function e(i,j){if(j.keyCode===9){return a.cancel(j)}}function h(l,p){var j,m,o,n,k;function q(t){n=c.select(":input:enabled,*[tabindex]:not(iframe)");function s(v){return v.nodeName==="BODY"||(v.type!="hidden"&&!(v.style.display=="none")&&!(v.style.visibility=="hidden")&&s(v.parentNode))}function i(v){return v.attributes.tabIndex.specified||v.nodeName=="INPUT"||v.nodeName=="TEXTAREA"}function u(){return tinymce.isIE6||tinymce.isIE7}function r(v){return((!u()||i(v)))&&v.getAttribute("tabindex")!="-1"&&s(v)}d(n,function(w,v){if(w.id==l.id){j=v;return false}});if(t>0){for(m=j+1;m<n.length;m++){if(r(n[m])){return n[m]}}}else{for(m=j-1;m>=0;m--){if(r(n[m])){return n[m]}}}return null}if(p.keyCode===9){k=b(l.getParam("tab_focus",l.getParam("tabfocus_elements",":prev,:next")));if(k.length==1){k[1]=k[0];k[0]=":prev"}if(p.shiftKey){if(k[0]==":prev"){n=q(-1)}else{n=c.get(k[0])}}else{if(k[1]==":next"){n=q(1)}else{n=c.get(k[1])}}if(n){if(n.id&&(l=tinymce.get(n.id||n.name))){l.focus()}else{window.setTimeout(function(){if(!tinymce.isWebKit){window.focus()}n.focus()},10)}return a.cancel(p)}}}f.onKeyUp.add(e);if(tinymce.isGecko){f.onKeyPress.add(h);f.onKeyDown.add(e)}else{f.onKeyDown.add(h)}},getInfo:function(){return{longname:"Tabfocus",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("tabfocus",tinymce.plugins.TabFocusPlugin)})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/tabfocus/editor_plugin_src.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/tabfocus/editor_plugin_src.js
new file mode 100644
index 00000000..94f45320
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/tabfocus/editor_plugin_src.js
@@ -0,0 +1,122 @@
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+ var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, explode = tinymce.explode;
+
+ tinymce.create('tinymce.plugins.TabFocusPlugin', {
+ init : function(ed, url) {
+ function tabCancel(ed, e) {
+ if (e.keyCode === 9)
+ return Event.cancel(e);
+ }
+
+ function tabHandler(ed, e) {
+ var x, i, f, el, v;
+
+ function find(d) {
+ el = DOM.select(':input:enabled,*[tabindex]:not(iframe)');
+
+ function canSelectRecursive(e) {
+ return e.nodeName==="BODY" || (e.type != 'hidden' &&
+ !(e.style.display == "none") &&
+ !(e.style.visibility == "hidden") && canSelectRecursive(e.parentNode));
+ }
+ function canSelectInOldIe(el) {
+ return el.attributes["tabIndex"].specified || el.nodeName == "INPUT" || el.nodeName == "TEXTAREA";
+ }
+ function isOldIe() {
+ return tinymce.isIE6 || tinymce.isIE7;
+ }
+ function canSelect(el) {
+ return ((!isOldIe() || canSelectInOldIe(el))) && el.getAttribute("tabindex") != '-1' && canSelectRecursive(el);
+ }
+
+ each(el, function(e, i) {
+ if (e.id == ed.id) {
+ x = i;
+ return false;
+ }
+ });
+ if (d > 0) {
+ for (i = x + 1; i < el.length; i++) {
+ if (canSelect(el[i]))
+ return el[i];
+ }
+ } else {
+ for (i = x - 1; i >= 0; i--) {
+ if (canSelect(el[i]))
+ return el[i];
+ }
+ }
+
+ return null;
+ }
+
+ if (e.keyCode === 9) {
+ v = explode(ed.getParam('tab_focus', ed.getParam('tabfocus_elements', ':prev,:next')));
+
+ if (v.length == 1) {
+ v[1] = v[0];
+ v[0] = ':prev';
+ }
+
+ // Find element to focus
+ if (e.shiftKey) {
+ if (v[0] == ':prev')
+ el = find(-1);
+ else
+ el = DOM.get(v[0]);
+ } else {
+ if (v[1] == ':next')
+ el = find(1);
+ else
+ el = DOM.get(v[1]);
+ }
+
+ if (el) {
+ if (el.id && (ed = tinymce.get(el.id || el.name)))
+ ed.focus();
+ else
+ window.setTimeout(function() {
+ if (!tinymce.isWebKit)
+ window.focus();
+ el.focus();
+ }, 10);
+
+ return Event.cancel(e);
+ }
+ }
+ }
+
+ ed.onKeyUp.add(tabCancel);
+
+ if (tinymce.isGecko) {
+ ed.onKeyPress.add(tabHandler);
+ ed.onKeyDown.add(tabCancel);
+ } else
+ ed.onKeyDown.add(tabHandler);
+
+ },
+
+ getInfo : function() {
+ return {
+ longname : 'Tabfocus',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ };
+ }
+ });
+
+ // Register plugin
+ tinymce.PluginManager.add('tabfocus', tinymce.plugins.TabFocusPlugin);
+})();
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/cell.htm b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/cell.htm
new file mode 100755
index 00000000..a72a8d69
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/cell.htm
@@ -0,0 +1,180 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>{#table_dlg.cell_title}</title>
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script type="text/javascript" src="../../utils/mctabs.js"></script>
+ <script type="text/javascript" src="../../utils/form_utils.js"></script>
+ <script type="text/javascript" src="../../utils/validate.js"></script>
+ <script type="text/javascript" src="../../utils/editable_selects.js"></script>
+ <script type="text/javascript" src="js/cell.js"></script>
+ <link href="css/cell.css" rel="stylesheet" type="text/css" />
+</head>
+<body id="tablecell" style="display: none" role="application">
+ <form onsubmit="updateAction();return false;" action="#">
+ <div class="tabs">
+ <ul>
+ <li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#table_dlg.general_tab}</a></span></li>
+ <li id="advanced_tab" aria-controls="advanced_panel"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#table_dlg.advanced_tab}</a></span></li>
+ </ul>
+ </div>
+
+ <div class="panel_wrapper">
+ <div id="general_panel" class="panel current">
+ <fieldset>
+ <legend>{#table_dlg.general_props}</legend>
+
+ <table role="presentation" border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td><label for="align">{#table_dlg.align}</label></td>
+ <td>
+ <select id="align" name="align" class="mceFocus">
+ <option value="">{#not_set}</option>
+ <option value="center">{#table_dlg.align_middle}</option>
+ <option value="left">{#table_dlg.align_left}</option>
+ <option value="right">{#table_dlg.align_right}</option>
+ </select>
+ </td>
+
+ <td><label for="celltype">{#table_dlg.cell_type}</label></td>
+ <td>
+ <select id="celltype" name="celltype">
+ <option value="td">{#table_dlg.td}</option>
+ <option value="th">{#table_dlg.th}</option>
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <td><label for="valign">{#table_dlg.valign}</label></td>
+ <td>
+ <select id="valign" name="valign">
+ <option value="">{#not_set}</option>
+ <option value="top">{#table_dlg.align_top}</option>
+ <option value="middle">{#table_dlg.align_middle}</option>
+ <option value="bottom">{#table_dlg.align_bottom}</option>
+ </select>
+ </td>
+
+ <td><label for="scope">{#table_dlg.scope}</label></td>
+ <td>
+ <select id="scope" name="scope">
+ <option value="">{#not_set}</option>
+ <option value="col">{#table.col}</option>
+ <option value="row">{#table.row}</option>
+ <option value="rowgroup">{#table_dlg.rowgroup}</option>
+ <option value="colgroup">{#table_dlg.colgroup}</option>
+ </select>
+ </td>
+
+ </tr>
+
+ <tr>
+ <td><label for="width">{#table_dlg.width}</label></td>
+ <td><input id="width" name="width" type="text" value="" size="7" maxlength="7" onchange="changedSize();" class="size" /></td>
+
+ <td><label for="height">{#table_dlg.height}</label></td>
+ <td><input id="height" name="height" type="text" value="" size="7" maxlength="7" onchange="changedSize();" class="size" /></td>
+ </tr>
+
+ <tr id="styleSelectRow">
+ <td><label for="class">{#class_name}</label></td>
+ <td colspan="3">
+ <select id="class" name="class" class="mceEditableSelect">
+ <option value="" selected="selected">{#not_set}</option>
+ </select>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+ </div>
+
+ <div id="advanced_panel" class="panel">
+ <fieldset>
+ <legend>{#table_dlg.advanced_props}</legend>
+
+ <table role="presentation" border="0" cellpadding="0" cellspacing="4">
+ <tr>
+ <td class="column1"><label for="id">{#table_dlg.id}</label></td>
+ <td><input id="id" name="id" type="text" value="" style="width: 200px" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="style">{#table_dlg.style}</label></td>
+ <td><input type="text" id="style" name="style" value="" style="width: 200px;" onchange="changedStyle();" /></td>
+ </tr>
+
+ <tr>
+ <td class="column1"><label for="dir">{#table_dlg.langdir}</label></td>
+ <td>
+ <select id="dir" name="dir" style="width: 200px">
+ <option value="">{#not_set}</option>
+ <option value="ltr">{#table_dlg.ltr}</option>
+ <option value="rtl">{#table_dlg.rtl}</option>
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="column1"><label for="lang">{#table_dlg.langcode}</label></td>
+ <td>
+ <input id="lang" name="lang" type="text" value="" style="width: 200px" />
+ </td>
+ </tr>
+
+ <tr>
+ <td class="column1"><label for="backgroundimage">{#table_dlg.bgimage}</label></td>
+ <td>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input id="backgroundimage" name="backgroundimage" type="text" value="" style="width: 200px" onchange="changedBackgroundImage();" /></td>
+ <td id="backgroundimagebrowsercontainer">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr role="group" aria-labelledby="bordercolor_label">
+ <td class="column1"><label id="bordercolor_label" for="bordercolor">{#table_dlg.bordercolor}</label></td>
+ <td>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input id="bordercolor" name="bordercolor" type="text" value="" size="9" onchange="updateColor('bordercolor_pick','bordercolor');changedColor();" /></td>
+ <td id="bordercolor_pickcontainer">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr role="group" aria-labelledby="bgcolor_label">
+ <td class="column1"><label id="bgcolor_label" for="bgcolor">{#table_dlg.bgcolor}</label></td>
+ <td>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" /></td>
+ <td id="bgcolor_pickcontainer">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+ </div>
+ </div>
+
+ <div class="mceActionPanel">
+ <div>
+ <select id="action" name="action">
+ <option value="cell">{#table_dlg.cell_cell}</option>
+ <option value="row">{#table_dlg.cell_row}</option>
+ <option value="col">{#table_dlg.cell_col}</option>
+ <option value="all">{#table_dlg.cell_all}</option>
+ </select>
+ </div>
+
+ <input type="submit" id="insert" name="insert" value="{#update}" />
+ <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
+ </div>
+ </form>
+</body>
+</html>
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/css/cell.css b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/css/cell.css
new file mode 100755
index 00000000..a067ecdf
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/css/cell.css
@@ -0,0 +1,17 @@
+/* CSS file for cell dialog in the table plugin */
+
+.panel_wrapper div.current {
+ height: 200px;
+}
+
+.advfield {
+ width: 200px;
+}
+
+#action {
+ margin-bottom: 3px;
+}
+
+#class {
+ width: 150px;
+} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/css/row.css b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/css/row.css
new file mode 100755
index 00000000..1f7755da
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/css/row.css
@@ -0,0 +1,25 @@
+/* CSS file for row dialog in the table plugin */
+
+.panel_wrapper div.current {
+ height: 200px;
+}
+
+.advfield {
+ width: 200px;
+}
+
+#action {
+ margin-bottom: 3px;
+}
+
+#rowtype,#align,#valign,#class,#height {
+ width: 150px;
+}
+
+#height {
+ width: 50px;
+}
+
+.col2 {
+ padding-left: 20px;
+}
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/css/table.css b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/css/table.css
new file mode 100755
index 00000000..d11c3f69
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/css/table.css
@@ -0,0 +1,13 @@
+/* CSS file for table dialog in the table plugin */
+
+.panel_wrapper div.current {
+ height: 245px;
+}
+
+.advfield {
+ width: 200px;
+}
+
+#class {
+ width: 150px;
+}
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/editor_plugin.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/editor_plugin.js
new file mode 100755
index 00000000..c4c3264e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/editor_plugin.js
@@ -0,0 +1 @@
+(function(d){var e=d.each;function c(g,h){var j=h.ownerDocument,f=j.createRange(),k;f.setStartBefore(h);f.setEnd(g.endContainer,g.endOffset);k=j.createElement("body");k.appendChild(f.cloneContents());return k.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi,"-").replace(/<[^>]+>/g,"").length==0}function a(g,f){return parseInt(g.getAttribute(f)||1)}function b(H,G,K){var g,L,D,o;t();o=G.getParent(K.getStart(),"th,td");if(o){L=F(o);D=I();o=z(L.x,L.y)}function A(N,M){N=N.cloneNode(M);N.removeAttribute("id");return N}function t(){var M=0;g=[];e(["thead","tbody","tfoot"],function(N){var O=G.select("> "+N+" tr",H);e(O,function(P,Q){Q+=M;e(G.select("> td, > th",P),function(W,R){var S,T,U,V;if(g[Q]){while(g[Q][R]){R++}}U=a(W,"rowspan");V=a(W,"colspan");for(T=Q;T<Q+U;T++){if(!g[T]){g[T]=[]}for(S=R;S<R+V;S++){g[T][S]={part:N,real:T==Q&&S==R,elm:W,rowspan:U,colspan:V}}}})});M+=O.length})}function z(M,O){var N;N=g[O];if(N){return N[M]}}function s(O,M,N){if(O){N=parseInt(N);if(N===1){O.removeAttribute(M,1)}else{O.setAttribute(M,N,1)}}}function j(M){return M&&(G.hasClass(M.elm,"mceSelected")||M==o)}function k(){var M=[];e(H.rows,function(N){e(N.cells,function(O){if(G.hasClass(O,"mceSelected")||O==o.elm){M.push(N);return false}})});return M}function r(){var M=G.createRng();M.setStartAfter(H);M.setEndAfter(H);K.setRng(M);G.remove(H)}function f(M){var N;d.walk(M,function(P){var O;if(P.nodeType==3){e(G.getParents(P.parentNode,null,M).reverse(),function(Q){Q=A(Q,false);if(!N){N=O=Q}else{if(O){O.appendChild(Q)}}O=Q});if(O){O.innerHTML=d.isIE?"&nbsp;":'<br data-mce-bogus="1" />'}return false}},"childNodes");M=A(M,false);s(M,"rowSpan",1);s(M,"colSpan",1);if(N){M.appendChild(N)}else{if(!d.isIE){M.innerHTML='<br data-mce-bogus="1" />'}}return M}function q(){var M=G.createRng();e(G.select("tr",H),function(N){if(N.cells.length==0){G.remove(N)}});if(G.select("tr",H).length==0){M.setStartAfter(H);M.setEndAfter(H);K.setRng(M);G.remove(H);return}e(G.select("thead,tbody,tfoot",H),function(N){if(N.rows.length==0){G.remove(N)}});t();row=g[Math.min(g.length-1,L.y)];if(row){K.select(row[Math.min(row.length-1,L.x)].elm,true);K.collapse(true)}}function u(S,Q,U,R){var P,N,M,O,T;P=g[Q][S].elm.parentNode;for(M=1;M<=U;M++){P=G.getNext(P,"tr");if(P){for(N=S;N>=0;N--){T=g[Q+M][N].elm;if(T.parentNode==P){for(O=1;O<=R;O++){G.insertAfter(f(T),T)}break}}if(N==-1){for(O=1;O<=R;O++){P.insertBefore(f(P.cells[0]),P.cells[0])}}}}}function C(){e(g,function(M,N){e(M,function(P,O){var S,R,T,Q;if(j(P)){P=P.elm;S=a(P,"colspan");R=a(P,"rowspan");if(S>1||R>1){s(P,"rowSpan",1);s(P,"colSpan",1);for(Q=0;Q<S-1;Q++){G.insertAfter(f(P),P)}u(O,N,R-1,S)}}})})}function p(V,S,Y){var P,O,X,W,U,R,T,M,V,N,Q;if(V){pos=F(V);P=pos.x;O=pos.y;X=P+(S-1);W=O+(Y-1)}else{L=D=null;e(g,function(Z,aa){e(Z,function(ac,ab){if(j(ac)){if(!L){L={x:ab,y:aa}}D={x:ab,y:aa}}})});P=L.x;O=L.y;X=D.x;W=D.y}T=z(P,O);M=z(X,W);if(T&&M&&T.part==M.part){C();t();T=z(P,O).elm;s(T,"colSpan",(X-P)+1);s(T,"rowSpan",(W-O)+1);for(R=O;R<=W;R++){for(U=P;U<=X;U++){if(!g[R]||!g[R][U]){continue}V=g[R][U].elm;if(V!=T){N=d.grep(V.childNodes);e(N,function(Z){T.appendChild(Z)});if(N.length){N=d.grep(T.childNodes);Q=0;e(N,function(Z){if(Z.nodeName=="BR"&&G.getAttrib(Z,"data-mce-bogus")&&Q++<N.length-1){T.removeChild(Z)}})}G.remove(V)}}}q()}}function l(Q){var M,S,P,R,T,U,N,V,O;e(g,function(W,X){e(W,function(Z,Y){if(j(Z)){Z=Z.elm;T=Z.parentNode;U=A(T,false);M=X;if(Q){return false}}});if(Q){return !M}});for(R=0;R<g[0].length;R++){if(!g[M][R]){continue}S=g[M][R].elm;if(S!=P){if(!Q){O=a(S,"rowspan");if(O>1){s(S,"rowSpan",O+1);continue}}else{if(M>0&&g[M-1][R]){V=g[M-1][R].elm;O=a(V,"rowSpan");if(O>1){s(V,"rowSpan",O+1);continue}}}N=f(S);s(N,"colSpan",S.colSpan);U.appendChild(N);P=S}}if(U.hasChildNodes()){if(!Q){G.insertAfter(U,T)}else{T.parentNode.insertBefore(U,T)}}}function h(N){var O,M;e(g,function(P,Q){e(P,function(S,R){if(j(S)){O=R;if(N){return false}}});if(N){return !O}});e(g,function(S,T){var P,Q,R;if(!S[O]){return}P=S[O].elm;if(P!=M){R=a(P,"colspan");Q=a(P,"rowspan");if(R==1){if(!N){G.insertAfter(f(P),P);u(O,T,Q-1,R)}else{P.parentNode.insertBefore(f(P),P);u(O,T,Q-1,R)}}else{s(P,"colSpan",P.colSpan+1)}M=P}})}function n(){var M=[];e(g,function(N,O){e(N,function(Q,P){if(j(Q)&&d.inArray(M,P)===-1){e(g,function(T){var R=T[P].elm,S;S=a(R,"colSpan");if(S>1){s(R,"colSpan",S-1)}else{G.remove(R)}});M.push(P)}})});q()}function m(){var N;function M(Q){var P,R,O;P=G.getNext(Q,"tr");e(Q.cells,function(S){var T=a(S,"rowSpan");if(T>1){s(S,"rowSpan",T-1);R=F(S);u(R.x,R.y,1,1)}});R=F(Q.cells[0]);e(g[R.y],function(S){var T;S=S.elm;if(S!=O){T=a(S,"rowSpan");if(T<=1){G.remove(S)}else{s(S,"rowSpan",T-1)}O=S}})}N=k();e(N.reverse(),function(O){M(O)});q()}function E(){var M=k();G.remove(M);q();return M}function J(){var M=k();e(M,function(O,N){M[N]=A(O,true)});return M}function B(O,N){var P=k(),M=P[N?0:P.length-1],Q=M.cells.length;e(g,function(S){var R;Q=0;e(S,function(U,T){if(U.real){Q+=U.colspan}if(U.elm.parentNode==M){R=1}});if(R){return false}});if(!N){O.reverse()}e(O,function(T){var S=T.cells.length,R;for(i=0;i<S;i++){R=T.cells[i];s(R,"colSpan",1);s(R,"rowSpan",1)}for(i=S;i<Q;i++){T.appendChild(f(T.cells[S-1]))}for(i=Q;i<S;i++){G.remove(T.cells[i])}if(N){M.parentNode.insertBefore(T,M)}else{G.insertAfter(T,M)}});G.removeClass(G.select("td.mceSelected,th.mceSelected"),"mceSelected")}function F(M){var N;e(g,function(O,P){e(O,function(R,Q){if(R.elm==M){N={x:Q,y:P};return false}});return !N});return N}function w(M){L=F(M)}function I(){var O,N,M;N=M=0;e(g,function(P,Q){e(P,function(S,R){var U,T;if(j(S)){S=g[Q][R];if(R>N){N=R}if(Q>M){M=Q}if(S.real){U=S.colspan-1;T=S.rowspan-1;if(U){if(R+U>N){N=R+U}}if(T){if(Q+T>M){M=Q+T}}}}})});return{x:N,y:M}}function v(S){var P,O,U,T,N,M,Q,R;D=F(S);if(L&&D){P=Math.min(L.x,D.x);O=Math.min(L.y,D.y);U=Math.max(L.x,D.x);T=Math.max(L.y,D.y);N=U;M=T;for(y=O;y<=M;y++){S=g[y][P];if(!S.real){if(P-(S.colspan-1)<P){P-=S.colspan-1}}}for(x=P;x<=N;x++){S=g[O][x];if(!S.real){if(O-(S.rowspan-1)<O){O-=S.rowspan-1}}}for(y=O;y<=T;y++){for(x=P;x<=U;x++){S=g[y][x];if(S.real){Q=S.colspan-1;R=S.rowspan-1;if(Q){if(x+Q>N){N=x+Q}}if(R){if(y+R>M){M=y+R}}}}}G.removeClass(G.select("td.mceSelected,th.mceSelected"),"mceSelected");for(y=O;y<=M;y++){for(x=P;x<=N;x++){if(g[y][x]){G.addClass(g[y][x].elm,"mceSelected")}}}}}d.extend(this,{deleteTable:r,split:C,merge:p,insertRow:l,insertCol:h,deleteCols:n,deleteRows:m,cutRows:E,copyRows:J,pasteRows:B,getPos:F,setStartCell:w,setEndCell:v})}d.create("tinymce.plugins.TablePlugin",{init:function(g,h){var f,m,j=true;function l(p){var o=g.selection,n=g.dom.getParent(p||o.getNode(),"table");if(n){return new b(n,g.dom,o)}}function k(){g.getBody().style.webkitUserSelect="";if(j){g.dom.removeClass(g.dom.select("td.mceSelected,th.mceSelected"),"mceSelected");j=false}}e([["table","table.desc","mceInsertTable",true],["delete_table","table.del","mceTableDelete"],["delete_col","table.delete_col_desc","mceTableDeleteCol"],["delete_row","table.delete_row_desc","mceTableDeleteRow"],["col_after","table.col_after_desc","mceTableInsertColAfter"],["col_before","table.col_before_desc","mceTableInsertColBefore"],["row_after","table.row_after_desc","mceTableInsertRowAfter"],["row_before","table.row_before_desc","mceTableInsertRowBefore"],["row_props","table.row_desc","mceTableRowProps",true],["cell_props","table.cell_desc","mceTableCellProps",true],["split_cells","table.split_cells_desc","mceTableSplitCells",true],["merge_cells","table.merge_cells_desc","mceTableMergeCells",true]],function(n){g.addButton(n[0],{title:n[1],cmd:n[2],ui:n[3]})});if(!d.isIE){g.onClick.add(function(n,o){o=o.target;if(o.nodeName==="TABLE"){n.selection.select(o);n.nodeChanged()}})}g.onPreProcess.add(function(o,p){var n,q,r,t=o.dom,s;n=t.select("table",p.node);q=n.length;while(q--){r=n[q];t.setAttrib(r,"data-mce-style","");if((s=t.getAttrib(r,"width"))){t.setStyle(r,"width",s);t.setAttrib(r,"width","")}if((s=t.getAttrib(r,"height"))){t.setStyle(r,"height",s);t.setAttrib(r,"height","")}}});g.onNodeChange.add(function(q,o,s){var r;s=q.selection.getStart();r=q.dom.getParent(s,"td,th,caption");o.setActive("table",s.nodeName==="TABLE"||!!r);if(r&&r.nodeName==="CAPTION"){r=0}o.setDisabled("delete_table",!r);o.setDisabled("delete_col",!r);o.setDisabled("delete_table",!r);o.setDisabled("delete_row",!r);o.setDisabled("col_after",!r);o.setDisabled("col_before",!r);o.setDisabled("row_after",!r);o.setDisabled("row_before",!r);o.setDisabled("row_props",!r);o.setDisabled("cell_props",!r);o.setDisabled("split_cells",!r);o.setDisabled("merge_cells",!r)});g.onInit.add(function(r){var p,t,q=r.dom,u;f=r.windowManager;r.onMouseDown.add(function(w,z){if(z.button!=2){k();t=q.getParent(z.target,"td,th");p=q.getParent(t,"table")}});q.bind(r.getDoc(),"mouseover",function(C){var A,z,B=C.target;if(t&&(u||B!=t)&&(B.nodeName=="TD"||B.nodeName=="TH")){z=q.getParent(B,"table");if(z==p){if(!u){u=l(z);u.setStartCell(t);r.getBody().style.webkitUserSelect="none"}u.setEndCell(B);j=true}A=r.selection.getSel();try{if(A.removeAllRanges){A.removeAllRanges()}else{A.empty()}}catch(w){}C.preventDefault()}});r.onMouseUp.add(function(F,G){var z,B=F.selection,H,I=B.getSel(),w,C,A,E;if(t){if(u){F.getBody().style.webkitUserSelect=""}function D(J,L){var K=new d.dom.TreeWalker(J,J);do{if(J.nodeType==3&&d.trim(J.nodeValue).length!=0){if(L){z.setStart(J,0)}else{z.setEnd(J,J.nodeValue.length)}return}if(J.nodeName=="BR"){if(L){z.setStartBefore(J)}else{z.setEndBefore(J)}return}}while(J=(L?K.next():K.prev()))}H=q.select("td.mceSelected,th.mceSelected");if(H.length>0){z=q.createRng();C=H[0];E=H[H.length-1];z.setStartBefore(C);z.setEndAfter(C);D(C,1);w=new d.dom.TreeWalker(C,q.getParent(H[0],"table"));do{if(C.nodeName=="TD"||C.nodeName=="TH"){if(!q.hasClass(C,"mceSelected")){break}A=C}}while(C=w.next());D(A);B.setRng(z)}F.nodeChanged();t=u=p=null}});r.onKeyUp.add(function(w,z){k()});r.onKeyDown.add(function(w,z){n(w)});r.onMouseDown.add(function(w,z){if(z.button!=2){n(w)}});function o(D,z,A,F){var B=3,G=D.dom.getParent(z.startContainer,"TABLE"),C,w,E;if(G){C=G.parentNode}w=z.startContainer.nodeType==B&&z.startOffset==0&&z.endOffset==0&&F&&(A.nodeName=="TR"||A==C);E=(A.nodeName=="TD"||A.nodeName=="TH")&&!F;return w||E}function n(A){if(!d.isWebKit){return}var z=A.selection.getRng();var C=A.selection.getNode();var B=A.dom.getParent(z.startContainer,"TD,TH");if(!o(A,z,C,B)){return}if(!B){B=C}var w=B.lastChild;while(w.lastChild){w=w.lastChild}z.setEnd(w,w.nodeValue.length);A.selection.setRng(z)}r.plugins.table.fixTableCellSelection=n;if(r&&r.plugins.contextmenu){r.plugins.contextmenu.onContextMenu.add(function(A,w,C){var D,B=r.selection,z=B.getNode()||r.getBody();if(r.dom.getParent(C,"td")||r.dom.getParent(C,"th")||r.dom.select("td.mceSelected,th.mceSelected").length){w.removeAll();if(z.nodeName=="A"&&!r.dom.getAttrib(z,"name")){w.add({title:"advanced.link_desc",icon:"link",cmd:r.plugins.advlink?"mceAdvLink":"mceLink",ui:true});w.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"});w.addSeparator()}if(z.nodeName=="IMG"&&z.className.indexOf("mceItem")==-1){w.add({title:"advanced.image_desc",icon:"image",cmd:r.plugins.advimage?"mceAdvImage":"mceImage",ui:true});w.addSeparator()}w.add({title:"table.desc",icon:"table",cmd:"mceInsertTable",value:{action:"insert"}});w.add({title:"table.props_desc",icon:"table_props",cmd:"mceInsertTable"});w.add({title:"table.del",icon:"delete_table",cmd:"mceTableDelete"});w.addSeparator();D=w.addMenu({title:"table.cell"});D.add({title:"table.cell_desc",icon:"cell_props",cmd:"mceTableCellProps"});D.add({title:"table.split_cells_desc",icon:"split_cells",cmd:"mceTableSplitCells"});D.add({title:"table.merge_cells_desc",icon:"merge_cells",cmd:"mceTableMergeCells"});D=w.addMenu({title:"table.row"});D.add({title:"table.row_desc",icon:"row_props",cmd:"mceTableRowProps"});D.add({title:"table.row_before_desc",icon:"row_before",cmd:"mceTableInsertRowBefore"});D.add({title:"table.row_after_desc",icon:"row_after",cmd:"mceTableInsertRowAfter"});D.add({title:"table.delete_row_desc",icon:"delete_row",cmd:"mceTableDeleteRow"});D.addSeparator();D.add({title:"table.cut_row_desc",icon:"cut",cmd:"mceTableCutRow"});D.add({title:"table.copy_row_desc",icon:"copy",cmd:"mceTableCopyRow"});D.add({title:"table.paste_row_before_desc",icon:"paste",cmd:"mceTablePasteRowBefore"}).setDisabled(!m);D.add({title:"table.paste_row_after_desc",icon:"paste",cmd:"mceTablePasteRowAfter"}).setDisabled(!m);D=w.addMenu({title:"table.col"});D.add({title:"table.col_before_desc",icon:"col_before",cmd:"mceTableInsertColBefore"});D.add({title:"table.col_after_desc",icon:"col_after",cmd:"mceTableInsertColAfter"});D.add({title:"table.delete_col_desc",icon:"delete_col",cmd:"mceTableDeleteCol"})}else{w.add({title:"table.desc",icon:"table",cmd:"mceInsertTable"})}})}if(d.isWebKit){function v(C,N){var L=d.VK;var Q=N.keyCode;function O(Y,U,S){var T=Y?"previousSibling":"nextSibling";var Z=C.dom.getParent(U,"tr");var X=Z[T];if(X){z(C,U,X,Y);d.dom.Event.cancel(S);return true}else{var aa=C.dom.getParent(Z,"table");var W=Z.parentNode;var R=W.nodeName.toLowerCase();if(R==="tbody"||R===(Y?"tfoot":"thead")){var V=w(Y,aa,W,"tbody");if(V!==null){return K(Y,V,U,S)}}return M(Y,Z,T,aa,S)}}function w(V,T,U,X){var S=C.dom.select(">"+X,T);var R=S.indexOf(U);if(V&&R===0||!V&&R===S.length-1){return B(V,T)}else{if(R===-1){var W=U.tagName.toLowerCase()==="thead"?0:S.length-1;return S[W]}else{return S[R+(V?-1:1)]}}}function B(U,T){var S=U?"thead":"tfoot";var R=C.dom.select(">"+S,T);return R.length!==0?R[0]:null}function K(V,T,S,U){var R=J(T,V);R&&z(C,S,R,V);d.dom.Event.cancel(U);return true}function M(Y,U,R,X,W){var S=X[R];if(S){F(S);return true}else{var V=C.dom.getParent(X,"td,th");if(V){return O(Y,V,W)}else{var T=J(U,!Y);F(T);return d.dom.Event.cancel(W)}}}function J(S,R){var T=S&&S[R?"lastChild":"firstChild"];return T&&T.nodeName==="BR"?C.dom.getParent(T,"td,th"):T}function F(R){C.selection.setCursorLocation(R,0)}function A(){return Q==L.UP||Q==L.DOWN}function D(R){var T=R.selection.getNode();var S=R.dom.getParent(T,"tr");return S!==null}function P(S){var R=0;var T=S;while(T.previousSibling){T=T.previousSibling;R=R+a(T,"colspan")}return R}function E(T,R){var U=0;var S=0;e(T.children,function(V,W){U=U+a(V,"colspan");S=W;if(U>R){return false}});return S}function z(T,W,Y,V){var X=P(T.dom.getParent(W,"td,th"));var S=E(Y,X);var R=Y.childNodes[S];var U=J(R,V);F(U||R)}function H(R){var T=C.selection.getNode();var U=C.dom.getParent(T,"td,th");var S=C.dom.getParent(R,"td,th");return U&&U!==S&&I(U,S)}function I(S,R){return C.dom.getParent(S,"TABLE")===C.dom.getParent(R,"TABLE")}if(A()&&D(C)){var G=C.selection.getNode();setTimeout(function(){if(H(G)){O(!N.shiftKey&&Q===L.UP,G,N)}},0)}}r.onKeyDown.add(v)}function s(){var w;for(w=r.getBody().lastChild;w&&w.nodeType==3&&!w.nodeValue.length;w=w.previousSibling){}if(w&&w.nodeName=="TABLE"){if(r.settings.forced_root_block){r.dom.add(r.getBody(),r.settings.forced_root_block,null,d.isIE?"&nbsp;":'<br data-mce-bogus="1" />')}else{r.dom.add(r.getBody(),"br",{"data-mce-bogus":"1"})}}}if(d.isGecko){r.onKeyDown.add(function(z,B){var w,A,C=z.dom;if(B.keyCode==37||B.keyCode==38){w=z.selection.getRng();A=C.getParent(w.startContainer,"table");if(A&&z.getBody().firstChild==A){if(c(w,A)){w=C.createRng();w.setStartBefore(A);w.setEndBefore(A);z.selection.setRng(w);B.preventDefault()}}}})}r.onKeyUp.add(s);r.onSetContent.add(s);r.onVisualAid.add(s);r.onPreProcess.add(function(w,A){var z=A.node.lastChild;if(z&&(z.nodeName=="BR"||(z.childNodes.length==1&&(z.firstChild.nodeName=="BR"||z.firstChild.nodeValue=="\u00a0")))&&z.previousSibling&&z.previousSibling.nodeName=="TABLE"){w.dom.remove(z)}});s();r.startContent=r.getContent({format:"raw"})});e({mceTableSplitCells:function(n){n.split()},mceTableMergeCells:function(o){var p,q,n;n=g.dom.getParent(g.selection.getNode(),"th,td");if(n){p=n.rowSpan;q=n.colSpan}if(!g.dom.select("td.mceSelected,th.mceSelected").length){f.open({url:h+"/merge_cells.htm",width:240+parseInt(g.getLang("table.merge_cells_delta_width",0)),height:110+parseInt(g.getLang("table.merge_cells_delta_height",0)),inline:1},{rows:p,cols:q,onaction:function(r){o.merge(n,r.cols,r.rows)},plugin_url:h})}else{o.merge()}},mceTableInsertRowBefore:function(n){n.insertRow(true)},mceTableInsertRowAfter:function(n){n.insertRow()},mceTableInsertColBefore:function(n){n.insertCol(true)},mceTableInsertColAfter:function(n){n.insertCol()},mceTableDeleteCol:function(n){n.deleteCols()},mceTableDeleteRow:function(n){n.deleteRows()},mceTableCutRow:function(n){m=n.cutRows()},mceTableCopyRow:function(n){m=n.copyRows()},mceTablePasteRowBefore:function(n){n.pasteRows(m,true)},mceTablePasteRowAfter:function(n){n.pasteRows(m)},mceTableDelete:function(n){n.deleteTable()}},function(o,n){g.addCommand(n,function(){var p=l();if(p){o(p);g.execCommand("mceRepaint");k()}})});e({mceInsertTable:function(n){f.open({url:h+"/table.htm",width:400+parseInt(g.getLang("table.table_delta_width",0)),height:320+parseInt(g.getLang("table.table_delta_height",0)),inline:1},{plugin_url:h,action:n?n.action:0})},mceTableRowProps:function(){f.open({url:h+"/row.htm",width:400+parseInt(g.getLang("table.rowprops_delta_width",0)),height:295+parseInt(g.getLang("table.rowprops_delta_height",0)),inline:1},{plugin_url:h})},mceTableCellProps:function(){f.open({url:h+"/cell.htm",width:400+parseInt(g.getLang("table.cellprops_delta_width",0)),height:295+parseInt(g.getLang("table.cellprops_delta_height",0)),inline:1},{plugin_url:h})}},function(o,n){g.addCommand(n,function(p,q){o(q)})})}});d.PluginManager.add("table",d.plugins.TablePlugin)})(tinymce); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/editor_plugin_src.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/editor_plugin_src.js
new file mode 100755
index 00000000..dc20b386
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/editor_plugin_src.js
@@ -0,0 +1,1452 @@
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function(tinymce) {
+ var each = tinymce.each;
+
+ // Checks if the selection/caret is at the start of the specified block element
+ function isAtStart(rng, par) {
+ var doc = par.ownerDocument, rng2 = doc.createRange(), elm;
+
+ rng2.setStartBefore(par);
+ rng2.setEnd(rng.endContainer, rng.endOffset);
+
+ elm = doc.createElement('body');
+ elm.appendChild(rng2.cloneContents());
+
+ // Check for text characters of other elements that should be treated as content
+ return elm.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi, '-').replace(/<[^>]+>/g, '').length == 0;
+ };
+
+ function getSpanVal(td, name) {
+ return parseInt(td.getAttribute(name) || 1);
+ }
+
+ /**
+ * Table Grid class.
+ */
+ function TableGrid(table, dom, selection) {
+ var grid, startPos, endPos, selectedCell;
+
+ buildGrid();
+ selectedCell = dom.getParent(selection.getStart(), 'th,td');
+ if (selectedCell) {
+ startPos = getPos(selectedCell);
+ endPos = findEndPos();
+ selectedCell = getCell(startPos.x, startPos.y);
+ }
+
+ function cloneNode(node, children) {
+ node = node.cloneNode(children);
+ node.removeAttribute('id');
+
+ return node;
+ }
+
+ function buildGrid() {
+ var startY = 0;
+
+ grid = [];
+
+ each(['thead', 'tbody', 'tfoot'], function(part) {
+ var rows = dom.select('> ' + part + ' tr', table);
+
+ each(rows, function(tr, y) {
+ y += startY;
+
+ each(dom.select('> td, > th', tr), function(td, x) {
+ var x2, y2, rowspan, colspan;
+
+ // Skip over existing cells produced by rowspan
+ if (grid[y]) {
+ while (grid[y][x])
+ x++;
+ }
+
+ // Get col/rowspan from cell
+ rowspan = getSpanVal(td, 'rowspan');
+ colspan = getSpanVal(td, 'colspan');
+
+ // Fill out rowspan/colspan right and down
+ for (y2 = y; y2 < y + rowspan; y2++) {
+ if (!grid[y2])
+ grid[y2] = [];
+
+ for (x2 = x; x2 < x + colspan; x2++) {
+ grid[y2][x2] = {
+ part : part,
+ real : y2 == y && x2 == x,
+ elm : td,
+ rowspan : rowspan,
+ colspan : colspan
+ };
+ }
+ }
+ });
+ });
+
+ startY += rows.length;
+ });
+ };
+
+ function getCell(x, y) {
+ var row;
+
+ row = grid[y];
+ if (row)
+ return row[x];
+ };
+
+ function setSpanVal(td, name, val) {
+ if (td) {
+ val = parseInt(val);
+
+ if (val === 1)
+ td.removeAttribute(name, 1);
+ else
+ td.setAttribute(name, val, 1);
+ }
+ }
+
+ function isCellSelected(cell) {
+ return cell && (dom.hasClass(cell.elm, 'mceSelected') || cell == selectedCell);
+ };
+
+ function getSelectedRows() {
+ var rows = [];
+
+ each(table.rows, function(row) {
+ each(row.cells, function(cell) {
+ if (dom.hasClass(cell, 'mceSelected') || cell == selectedCell.elm) {
+ rows.push(row);
+ return false;
+ }
+ });
+ });
+
+ return rows;
+ };
+
+ function deleteTable() {
+ var rng = dom.createRng();
+
+ rng.setStartAfter(table);
+ rng.setEndAfter(table);
+
+ selection.setRng(rng);
+
+ dom.remove(table);
+ };
+
+ function cloneCell(cell) {
+ var formatNode;
+
+ // Clone formats
+ tinymce.walk(cell, function(node) {
+ var curNode;
+
+ if (node.nodeType == 3) {
+ each(dom.getParents(node.parentNode, null, cell).reverse(), function(node) {
+ node = cloneNode(node, false);
+
+ if (!formatNode)
+ formatNode = curNode = node;
+ else if (curNode)
+ curNode.appendChild(node);
+
+ curNode = node;
+ });
+
+ // Add something to the inner node
+ if (curNode)
+ curNode.innerHTML = tinymce.isIE ? '&nbsp;' : '<br data-mce-bogus="1" />';
+
+ return false;
+ }
+ }, 'childNodes');
+
+ cell = cloneNode(cell, false);
+ setSpanVal(cell, 'rowSpan', 1);
+ setSpanVal(cell, 'colSpan', 1);
+
+ if (formatNode) {
+ cell.appendChild(formatNode);
+ } else {
+ if (!tinymce.isIE)
+ cell.innerHTML = '<br data-mce-bogus="1" />';
+ }
+
+ return cell;
+ };
+
+ function cleanup() {
+ var rng = dom.createRng();
+
+ // Empty rows
+ each(dom.select('tr', table), function(tr) {
+ if (tr.cells.length == 0)
+ dom.remove(tr);
+ });
+
+ // Empty table
+ if (dom.select('tr', table).length == 0) {
+ rng.setStartAfter(table);
+ rng.setEndAfter(table);
+ selection.setRng(rng);
+ dom.remove(table);
+ return;
+ }
+
+ // Empty header/body/footer
+ each(dom.select('thead,tbody,tfoot', table), function(part) {
+ if (part.rows.length == 0)
+ dom.remove(part);
+ });
+
+ // Restore selection to start position if it still exists
+ buildGrid();
+
+ // Restore the selection to the closest table position
+ row = grid[Math.min(grid.length - 1, startPos.y)];
+ if (row) {
+ selection.select(row[Math.min(row.length - 1, startPos.x)].elm, true);
+ selection.collapse(true);
+ }
+ };
+
+ function fillLeftDown(x, y, rows, cols) {
+ var tr, x2, r, c, cell;
+
+ tr = grid[y][x].elm.parentNode;
+ for (r = 1; r <= rows; r++) {
+ tr = dom.getNext(tr, 'tr');
+
+ if (tr) {
+ // Loop left to find real cell
+ for (x2 = x; x2 >= 0; x2--) {
+ cell = grid[y + r][x2].elm;
+
+ if (cell.parentNode == tr) {
+ // Append clones after
+ for (c = 1; c <= cols; c++)
+ dom.insertAfter(cloneCell(cell), cell);
+
+ break;
+ }
+ }
+
+ if (x2 == -1) {
+ // Insert nodes before first cell
+ for (c = 1; c <= cols; c++)
+ tr.insertBefore(cloneCell(tr.cells[0]), tr.cells[0]);
+ }
+ }
+ }
+ };
+
+ function split() {
+ each(grid, function(row, y) {
+ each(row, function(cell, x) {
+ var colSpan, rowSpan, newCell, i;
+
+ if (isCellSelected(cell)) {
+ cell = cell.elm;
+ colSpan = getSpanVal(cell, 'colspan');
+ rowSpan = getSpanVal(cell, 'rowspan');
+
+ if (colSpan > 1 || rowSpan > 1) {
+ setSpanVal(cell, 'rowSpan', 1);
+ setSpanVal(cell, 'colSpan', 1);
+
+ // Insert cells right
+ for (i = 0; i < colSpan - 1; i++)
+ dom.insertAfter(cloneCell(cell), cell);
+
+ fillLeftDown(x, y, rowSpan - 1, colSpan);
+ }
+ }
+ });
+ });
+ };
+
+ function merge(cell, cols, rows) {
+ var startX, startY, endX, endY, x, y, startCell, endCell, cell, children, count;
+
+ // Use specified cell and cols/rows
+ if (cell) {
+ pos = getPos(cell);
+ startX = pos.x;
+ startY = pos.y;
+ endX = startX + (cols - 1);
+ endY = startY + (rows - 1);
+ } else {
+ startPos = endPos = null;
+
+ // Calculate start/end pos by checking for selected cells in grid works better with context menu
+ each(grid, function(row, y) {
+ each(row, function(cell, x) {
+ if (isCellSelected(cell)) {
+ if (!startPos) {
+ startPos = {x: x, y: y};
+ }
+
+ endPos = {x: x, y: y};
+ }
+ });
+ });
+
+ // Use selection
+ startX = startPos.x;
+ startY = startPos.y;
+ endX = endPos.x;
+ endY = endPos.y;
+ }
+
+ // Find start/end cells
+ startCell = getCell(startX, startY);
+ endCell = getCell(endX, endY);
+
+ // Check if the cells exists and if they are of the same part for example tbody = tbody
+ if (startCell && endCell && startCell.part == endCell.part) {
+ // Split and rebuild grid
+ split();
+ buildGrid();
+
+ // Set row/col span to start cell
+ startCell = getCell(startX, startY).elm;
+ setSpanVal(startCell, 'colSpan', (endX - startX) + 1);
+ setSpanVal(startCell, 'rowSpan', (endY - startY) + 1);
+
+ // Remove other cells and add it's contents to the start cell
+ for (y = startY; y <= endY; y++) {
+ for (x = startX; x <= endX; x++) {
+ if (!grid[y] || !grid[y][x])
+ continue;
+
+ cell = grid[y][x].elm;
+
+ if (cell != startCell) {
+ // Move children to startCell
+ children = tinymce.grep(cell.childNodes);
+ each(children, function(node) {
+ startCell.appendChild(node);
+ });
+
+ // Remove bogus nodes if there is children in the target cell
+ if (children.length) {
+ children = tinymce.grep(startCell.childNodes);
+ count = 0;
+ each(children, function(node) {
+ if (node.nodeName == 'BR' && dom.getAttrib(node, 'data-mce-bogus') && count++ < children.length - 1)
+ startCell.removeChild(node);
+ });
+ }
+
+ // Remove cell
+ dom.remove(cell);
+ }
+ }
+ }
+
+ // Remove empty rows etc and restore caret location
+ cleanup();
+ }
+ };
+
+ function insertRow(before) {
+ var posY, cell, lastCell, x, rowElm, newRow, newCell, otherCell, rowSpan;
+
+ // Find first/last row
+ each(grid, function(row, y) {
+ each(row, function(cell, x) {
+ if (isCellSelected(cell)) {
+ cell = cell.elm;
+ rowElm = cell.parentNode;
+ newRow = cloneNode(rowElm, false);
+ posY = y;
+
+ if (before)
+ return false;
+ }
+ });
+
+ if (before)
+ return !posY;
+ });
+
+ for (x = 0; x < grid[0].length; x++) {
+ // Cell not found could be because of an invalid table structure
+ if (!grid[posY][x])
+ continue;
+
+ cell = grid[posY][x].elm;
+
+ if (cell != lastCell) {
+ if (!before) {
+ rowSpan = getSpanVal(cell, 'rowspan');
+ if (rowSpan > 1) {
+ setSpanVal(cell, 'rowSpan', rowSpan + 1);
+ continue;
+ }
+ } else {
+ // Check if cell above can be expanded
+ if (posY > 0 && grid[posY - 1][x]) {
+ otherCell = grid[posY - 1][x].elm;
+ rowSpan = getSpanVal(otherCell, 'rowSpan');
+ if (rowSpan > 1) {
+ setSpanVal(otherCell, 'rowSpan', rowSpan + 1);
+ continue;
+ }
+ }
+ }
+
+ // Insert new cell into new row
+ newCell = cloneCell(cell);
+ setSpanVal(newCell, 'colSpan', cell.colSpan);
+
+ newRow.appendChild(newCell);
+
+ lastCell = cell;
+ }
+ }
+
+ if (newRow.hasChildNodes()) {
+ if (!before)
+ dom.insertAfter(newRow, rowElm);
+ else
+ rowElm.parentNode.insertBefore(newRow, rowElm);
+ }
+ };
+
+ function insertCol(before) {
+ var posX, lastCell;
+
+ // Find first/last column
+ each(grid, function(row, y) {
+ each(row, function(cell, x) {
+ if (isCellSelected(cell)) {
+ posX = x;
+
+ if (before)
+ return false;
+ }
+ });
+
+ if (before)
+ return !posX;
+ });
+
+ each(grid, function(row, y) {
+ var cell, rowSpan, colSpan;
+
+ if (!row[posX])
+ return;
+
+ cell = row[posX].elm;
+ if (cell != lastCell) {
+ colSpan = getSpanVal(cell, 'colspan');
+ rowSpan = getSpanVal(cell, 'rowspan');
+
+ if (colSpan == 1) {
+ if (!before) {
+ dom.insertAfter(cloneCell(cell), cell);
+ fillLeftDown(posX, y, rowSpan - 1, colSpan);
+ } else {
+ cell.parentNode.insertBefore(cloneCell(cell), cell);
+ fillLeftDown(posX, y, rowSpan - 1, colSpan);
+ }
+ } else
+ setSpanVal(cell, 'colSpan', cell.colSpan + 1);
+
+ lastCell = cell;
+ }
+ });
+ };
+
+ function deleteCols() {
+ var cols = [];
+
+ // Get selected column indexes
+ each(grid, function(row, y) {
+ each(row, function(cell, x) {
+ if (isCellSelected(cell) && tinymce.inArray(cols, x) === -1) {
+ each(grid, function(row) {
+ var cell = row[x].elm, colSpan;
+
+ colSpan = getSpanVal(cell, 'colSpan');
+
+ if (colSpan > 1)
+ setSpanVal(cell, 'colSpan', colSpan - 1);
+ else
+ dom.remove(cell);
+ });
+
+ cols.push(x);
+ }
+ });
+ });
+
+ cleanup();
+ };
+
+ function deleteRows() {
+ var rows;
+
+ function deleteRow(tr) {
+ var nextTr, pos, lastCell;
+
+ nextTr = dom.getNext(tr, 'tr');
+
+ // Move down row spanned cells
+ each(tr.cells, function(cell) {
+ var rowSpan = getSpanVal(cell, 'rowSpan');
+
+ if (rowSpan > 1) {
+ setSpanVal(cell, 'rowSpan', rowSpan - 1);
+ pos = getPos(cell);
+ fillLeftDown(pos.x, pos.y, 1, 1);
+ }
+ });
+
+ // Delete cells
+ pos = getPos(tr.cells[0]);
+ each(grid[pos.y], function(cell) {
+ var rowSpan;
+
+ cell = cell.elm;
+
+ if (cell != lastCell) {
+ rowSpan = getSpanVal(cell, 'rowSpan');
+
+ if (rowSpan <= 1)
+ dom.remove(cell);
+ else
+ setSpanVal(cell, 'rowSpan', rowSpan - 1);
+
+ lastCell = cell;
+ }
+ });
+ };
+
+ // Get selected rows and move selection out of scope
+ rows = getSelectedRows();
+
+ // Delete all selected rows
+ each(rows.reverse(), function(tr) {
+ deleteRow(tr);
+ });
+
+ cleanup();
+ };
+
+ function cutRows() {
+ var rows = getSelectedRows();
+
+ dom.remove(rows);
+ cleanup();
+
+ return rows;
+ };
+
+ function copyRows() {
+ var rows = getSelectedRows();
+
+ each(rows, function(row, i) {
+ rows[i] = cloneNode(row, true);
+ });
+
+ return rows;
+ };
+
+ function pasteRows(rows, before) {
+ var selectedRows = getSelectedRows(),
+ targetRow = selectedRows[before ? 0 : selectedRows.length - 1],
+ targetCellCount = targetRow.cells.length;
+
+ // Calc target cell count
+ each(grid, function(row) {
+ var match;
+
+ targetCellCount = 0;
+ each(row, function(cell, x) {
+ if (cell.real)
+ targetCellCount += cell.colspan;
+
+ if (cell.elm.parentNode == targetRow)
+ match = 1;
+ });
+
+ if (match)
+ return false;
+ });
+
+ if (!before)
+ rows.reverse();
+
+ each(rows, function(row) {
+ var cellCount = row.cells.length, cell;
+
+ // Remove col/rowspans
+ for (i = 0; i < cellCount; i++) {
+ cell = row.cells[i];
+ setSpanVal(cell, 'colSpan', 1);
+ setSpanVal(cell, 'rowSpan', 1);
+ }
+
+ // Needs more cells
+ for (i = cellCount; i < targetCellCount; i++)
+ row.appendChild(cloneCell(row.cells[cellCount - 1]));
+
+ // Needs less cells
+ for (i = targetCellCount; i < cellCount; i++)
+ dom.remove(row.cells[i]);
+
+ // Add before/after
+ if (before)
+ targetRow.parentNode.insertBefore(row, targetRow);
+ else
+ dom.insertAfter(row, targetRow);
+ });
+
+ // Remove current selection
+ dom.removeClass(dom.select('td.mceSelected,th.mceSelected'), 'mceSelected');
+ };
+
+ function getPos(target) {
+ var pos;
+
+ each(grid, function(row, y) {
+ each(row, function(cell, x) {
+ if (cell.elm == target) {
+ pos = {x : x, y : y};
+ return false;
+ }
+ });
+
+ return !pos;
+ });
+
+ return pos;
+ };
+
+ function setStartCell(cell) {
+ startPos = getPos(cell);
+ };
+
+ function findEndPos() {
+ var pos, maxX, maxY;
+
+ maxX = maxY = 0;
+
+ each(grid, function(row, y) {
+ each(row, function(cell, x) {
+ var colSpan, rowSpan;
+
+ if (isCellSelected(cell)) {
+ cell = grid[y][x];
+
+ if (x > maxX)
+ maxX = x;
+
+ if (y > maxY)
+ maxY = y;
+
+ if (cell.real) {
+ colSpan = cell.colspan - 1;
+ rowSpan = cell.rowspan - 1;
+
+ if (colSpan) {
+ if (x + colSpan > maxX)
+ maxX = x + colSpan;
+ }
+
+ if (rowSpan) {
+ if (y + rowSpan > maxY)
+ maxY = y + rowSpan;
+ }
+ }
+ }
+ });
+ });
+
+ return {x : maxX, y : maxY};
+ };
+
+ function setEndCell(cell) {
+ var startX, startY, endX, endY, maxX, maxY, colSpan, rowSpan;
+
+ endPos = getPos(cell);
+
+ if (startPos && endPos) {
+ // Get start/end positions
+ startX = Math.min(startPos.x, endPos.x);
+ startY = Math.min(startPos.y, endPos.y);
+ endX = Math.max(startPos.x, endPos.x);
+ endY = Math.max(startPos.y, endPos.y);
+
+ // Expand end positon to include spans
+ maxX = endX;
+ maxY = endY;
+
+ // Expand startX
+ for (y = startY; y <= maxY; y++) {
+ cell = grid[y][startX];
+
+ if (!cell.real) {
+ if (startX - (cell.colspan - 1) < startX)
+ startX -= cell.colspan - 1;
+ }
+ }
+
+ // Expand startY
+ for (x = startX; x <= maxX; x++) {
+ cell = grid[startY][x];
+
+ if (!cell.real) {
+ if (startY - (cell.rowspan - 1) < startY)
+ startY -= cell.rowspan - 1;
+ }
+ }
+
+ // Find max X, Y
+ for (y = startY; y <= endY; y++) {
+ for (x = startX; x <= endX; x++) {
+ cell = grid[y][x];
+
+ if (cell.real) {
+ colSpan = cell.colspan - 1;
+ rowSpan = cell.rowspan - 1;
+
+ if (colSpan) {
+ if (x + colSpan > maxX)
+ maxX = x + colSpan;
+ }
+
+ if (rowSpan) {
+ if (y + rowSpan > maxY)
+ maxY = y + rowSpan;
+ }
+ }
+ }
+ }
+
+ // Remove current selection
+ dom.removeClass(dom.select('td.mceSelected,th.mceSelected'), 'mceSelected');
+
+ // Add new selection
+ for (y = startY; y <= maxY; y++) {
+ for (x = startX; x <= maxX; x++) {
+ if (grid[y][x])
+ dom.addClass(grid[y][x].elm, 'mceSelected');
+ }
+ }
+ }
+ };
+
+ // Expose to public
+ tinymce.extend(this, {
+ deleteTable : deleteTable,
+ split : split,
+ merge : merge,
+ insertRow : insertRow,
+ insertCol : insertCol,
+ deleteCols : deleteCols,
+ deleteRows : deleteRows,
+ cutRows : cutRows,
+ copyRows : copyRows,
+ pasteRows : pasteRows,
+ getPos : getPos,
+ setStartCell : setStartCell,
+ setEndCell : setEndCell
+ });
+ };
+
+ tinymce.create('tinymce.plugins.TablePlugin', {
+ init : function(ed, url) {
+ var winMan, clipboardRows, hasCellSelection = true; // Might be selected cells on reload
+
+ function createTableGrid(node) {
+ var selection = ed.selection, tblElm = ed.dom.getParent(node || selection.getNode(), 'table');
+
+ if (tblElm)
+ return new TableGrid(tblElm, ed.dom, selection);
+ };
+
+ function cleanup() {
+ // Restore selection possibilities
+ ed.getBody().style.webkitUserSelect = '';
+
+ if (hasCellSelection) {
+ ed.dom.removeClass(ed.dom.select('td.mceSelected,th.mceSelected'), 'mceSelected');
+ hasCellSelection = false;
+ }
+ };
+
+ // Register buttons
+ each([
+ ['table', 'table.desc', 'mceInsertTable', true],
+ ['delete_table', 'table.del', 'mceTableDelete'],
+ ['delete_col', 'table.delete_col_desc', 'mceTableDeleteCol'],
+ ['delete_row', 'table.delete_row_desc', 'mceTableDeleteRow'],
+ ['col_after', 'table.col_after_desc', 'mceTableInsertColAfter'],
+ ['col_before', 'table.col_before_desc', 'mceTableInsertColBefore'],
+ ['row_after', 'table.row_after_desc', 'mceTableInsertRowAfter'],
+ ['row_before', 'table.row_before_desc', 'mceTableInsertRowBefore'],
+ ['row_props', 'table.row_desc', 'mceTableRowProps', true],
+ ['cell_props', 'table.cell_desc', 'mceTableCellProps', true],
+ ['split_cells', 'table.split_cells_desc', 'mceTableSplitCells', true],
+ ['merge_cells', 'table.merge_cells_desc', 'mceTableMergeCells', true]
+ ], function(c) {
+ ed.addButton(c[0], {title : c[1], cmd : c[2], ui : c[3]});
+ });
+
+ // Select whole table is a table border is clicked
+ if (!tinymce.isIE) {
+ ed.onClick.add(function(ed, e) {
+ e = e.target;
+
+ if (e.nodeName === 'TABLE') {
+ ed.selection.select(e);
+ ed.nodeChanged();
+ }
+ });
+ }
+
+ ed.onPreProcess.add(function(ed, args) {
+ var nodes, i, node, dom = ed.dom, value;
+
+ nodes = dom.select('table', args.node);
+ i = nodes.length;
+ while (i--) {
+ node = nodes[i];
+ dom.setAttrib(node, 'data-mce-style', '');
+
+ if ((value = dom.getAttrib(node, 'width'))) {
+ dom.setStyle(node, 'width', value);
+ dom.setAttrib(node, 'width', '');
+ }
+
+ if ((value = dom.getAttrib(node, 'height'))) {
+ dom.setStyle(node, 'height', value);
+ dom.setAttrib(node, 'height', '');
+ }
+ }
+ });
+
+ // Handle node change updates
+ ed.onNodeChange.add(function(ed, cm, n) {
+ var p;
+
+ n = ed.selection.getStart();
+ p = ed.dom.getParent(n, 'td,th,caption');
+ cm.setActive('table', n.nodeName === 'TABLE' || !!p);
+
+ // Disable table tools if we are in caption
+ if (p && p.nodeName === 'CAPTION')
+ p = 0;
+
+ cm.setDisabled('delete_table', !p);
+ cm.setDisabled('delete_col', !p);
+ cm.setDisabled('delete_table', !p);
+ cm.setDisabled('delete_row', !p);
+ cm.setDisabled('col_after', !p);
+ cm.setDisabled('col_before', !p);
+ cm.setDisabled('row_after', !p);
+ cm.setDisabled('row_before', !p);
+ cm.setDisabled('row_props', !p);
+ cm.setDisabled('cell_props', !p);
+ cm.setDisabled('split_cells', !p);
+ cm.setDisabled('merge_cells', !p);
+ });
+
+ ed.onInit.add(function(ed) {
+ var startTable, startCell, dom = ed.dom, tableGrid;
+
+ winMan = ed.windowManager;
+
+ // Add cell selection logic
+ ed.onMouseDown.add(function(ed, e) {
+ if (e.button != 2) {
+ cleanup();
+
+ startCell = dom.getParent(e.target, 'td,th');
+ startTable = dom.getParent(startCell, 'table');
+ }
+ });
+
+ dom.bind(ed.getDoc(), 'mouseover', function(e) {
+ var sel, table, target = e.target;
+
+ if (startCell && (tableGrid || target != startCell) && (target.nodeName == 'TD' || target.nodeName == 'TH')) {
+ table = dom.getParent(target, 'table');
+ if (table == startTable) {
+ if (!tableGrid) {
+ tableGrid = createTableGrid(table);
+ tableGrid.setStartCell(startCell);
+
+ ed.getBody().style.webkitUserSelect = 'none';
+ }
+
+ tableGrid.setEndCell(target);
+ hasCellSelection = true;
+ }
+
+ // Remove current selection
+ sel = ed.selection.getSel();
+
+ try {
+ if (sel.removeAllRanges)
+ sel.removeAllRanges();
+ else
+ sel.empty();
+ } catch (ex) {
+ // IE9 might throw errors here
+ }
+
+ e.preventDefault();
+ }
+ });
+
+ ed.onMouseUp.add(function(ed, e) {
+ var rng, sel = ed.selection, selectedCells, nativeSel = sel.getSel(), walker, node, lastNode, endNode;
+
+ // Move selection to startCell
+ if (startCell) {
+ if (tableGrid)
+ ed.getBody().style.webkitUserSelect = '';
+
+ function setPoint(node, start) {
+ var walker = new tinymce.dom.TreeWalker(node, node);
+
+ do {
+ // Text node
+ if (node.nodeType == 3 && tinymce.trim(node.nodeValue).length != 0) {
+ if (start)
+ rng.setStart(node, 0);
+ else
+ rng.setEnd(node, node.nodeValue.length);
+
+ return;
+ }
+
+ // BR element
+ if (node.nodeName == 'BR') {
+ if (start)
+ rng.setStartBefore(node);
+ else
+ rng.setEndBefore(node);
+
+ return;
+ }
+ } while (node = (start ? walker.next() : walker.prev()));
+ }
+
+ // Try to expand text selection as much as we can only Gecko supports cell selection
+ selectedCells = dom.select('td.mceSelected,th.mceSelected');
+ if (selectedCells.length > 0) {
+ rng = dom.createRng();
+ node = selectedCells[0];
+ endNode = selectedCells[selectedCells.length - 1];
+ rng.setStartBefore(node);
+ rng.setEndAfter(node);
+
+ setPoint(node, 1);
+ walker = new tinymce.dom.TreeWalker(node, dom.getParent(selectedCells[0], 'table'));
+
+ do {
+ if (node.nodeName == 'TD' || node.nodeName == 'TH') {
+ if (!dom.hasClass(node, 'mceSelected'))
+ break;
+
+ lastNode = node;
+ }
+ } while (node = walker.next());
+
+ setPoint(lastNode);
+
+ sel.setRng(rng);
+ }
+
+ ed.nodeChanged();
+ startCell = tableGrid = startTable = null;
+ }
+ });
+
+ ed.onKeyUp.add(function(ed, e) {
+ cleanup();
+ });
+
+ ed.onKeyDown.add(function (ed, e) {
+ fixTableCellSelection(ed);
+ });
+
+ ed.onMouseDown.add(function (ed, e) {
+ if (e.button != 2) {
+ fixTableCellSelection(ed);
+ }
+ });
+ function tableCellSelected(ed, rng, n, currentCell) {
+ // The decision of when a table cell is selected is somewhat involved. The fact that this code is
+ // required is actually a pointer to the root cause of this bug. A cell is selected when the start
+ // and end offsets are 0, the start container is a text, and the selection node is either a TR (most cases)
+ // or the parent of the table (in the case of the selection containing the last cell of a table).
+ var TEXT_NODE = 3, table = ed.dom.getParent(rng.startContainer, 'TABLE'),
+ tableParent, allOfCellSelected, tableCellSelection;
+ if (table)
+ tableParent = table.parentNode;
+ allOfCellSelected =rng.startContainer.nodeType == TEXT_NODE &&
+ rng.startOffset == 0 &&
+ rng.endOffset == 0 &&
+ currentCell &&
+ (n.nodeName=="TR" || n==tableParent);
+ tableCellSelection = (n.nodeName=="TD"||n.nodeName=="TH")&& !currentCell;
+ return allOfCellSelected || tableCellSelection;
+ // return false;
+ }
+
+ // this nasty hack is here to work around some WebKit selection bugs.
+ function fixTableCellSelection(ed) {
+ if (!tinymce.isWebKit)
+ return;
+
+ var rng = ed.selection.getRng();
+ var n = ed.selection.getNode();
+ var currentCell = ed.dom.getParent(rng.startContainer, 'TD,TH');
+
+ if (!tableCellSelected(ed, rng, n, currentCell))
+ return;
+ if (!currentCell) {
+ currentCell=n;
+ }
+
+ // Get the very last node inside the table cell
+ var end = currentCell.lastChild;
+ while (end.lastChild)
+ end = end.lastChild;
+
+ // Select the entire table cell. Nothing outside of the table cell should be selected.
+ rng.setEnd(end, end.nodeValue.length);
+ ed.selection.setRng(rng);
+ }
+ ed.plugins.table.fixTableCellSelection=fixTableCellSelection;
+
+ // Add context menu
+ if (ed && ed.plugins.contextmenu) {
+ ed.plugins.contextmenu.onContextMenu.add(function(th, m, e) {
+ var sm, se = ed.selection, el = se.getNode() || ed.getBody();
+
+ if (ed.dom.getParent(e, 'td') || ed.dom.getParent(e, 'th') || ed.dom.select('td.mceSelected,th.mceSelected').length) {
+ m.removeAll();
+
+ if (el.nodeName == 'A' && !ed.dom.getAttrib(el, 'name')) {
+ m.add({title : 'advanced.link_desc', icon : 'link', cmd : ed.plugins.advlink ? 'mceAdvLink' : 'mceLink', ui : true});
+ m.add({title : 'advanced.unlink_desc', icon : 'unlink', cmd : 'UnLink'});
+ m.addSeparator();
+ }
+
+ if (el.nodeName == 'IMG' && el.className.indexOf('mceItem') == -1) {
+ m.add({title : 'advanced.image_desc', icon : 'image', cmd : ed.plugins.advimage ? 'mceAdvImage' : 'mceImage', ui : true});
+ m.addSeparator();
+ }
+
+ m.add({title : 'table.desc', icon : 'table', cmd : 'mceInsertTable', value : {action : 'insert'}});
+ m.add({title : 'table.props_desc', icon : 'table_props', cmd : 'mceInsertTable'});
+ m.add({title : 'table.del', icon : 'delete_table', cmd : 'mceTableDelete'});
+ m.addSeparator();
+
+ // Cell menu
+ sm = m.addMenu({title : 'table.cell'});
+ sm.add({title : 'table.cell_desc', icon : 'cell_props', cmd : 'mceTableCellProps'});
+ sm.add({title : 'table.split_cells_desc', icon : 'split_cells', cmd : 'mceTableSplitCells'});
+ sm.add({title : 'table.merge_cells_desc', icon : 'merge_cells', cmd : 'mceTableMergeCells'});
+
+ // Row menu
+ sm = m.addMenu({title : 'table.row'});
+ sm.add({title : 'table.row_desc', icon : 'row_props', cmd : 'mceTableRowProps'});
+ sm.add({title : 'table.row_before_desc', icon : 'row_before', cmd : 'mceTableInsertRowBefore'});
+ sm.add({title : 'table.row_after_desc', icon : 'row_after', cmd : 'mceTableInsertRowAfter'});
+ sm.add({title : 'table.delete_row_desc', icon : 'delete_row', cmd : 'mceTableDeleteRow'});
+ sm.addSeparator();
+ sm.add({title : 'table.cut_row_desc', icon : 'cut', cmd : 'mceTableCutRow'});
+ sm.add({title : 'table.copy_row_desc', icon : 'copy', cmd : 'mceTableCopyRow'});
+ sm.add({title : 'table.paste_row_before_desc', icon : 'paste', cmd : 'mceTablePasteRowBefore'}).setDisabled(!clipboardRows);
+ sm.add({title : 'table.paste_row_after_desc', icon : 'paste', cmd : 'mceTablePasteRowAfter'}).setDisabled(!clipboardRows);
+
+ // Column menu
+ sm = m.addMenu({title : 'table.col'});
+ sm.add({title : 'table.col_before_desc', icon : 'col_before', cmd : 'mceTableInsertColBefore'});
+ sm.add({title : 'table.col_after_desc', icon : 'col_after', cmd : 'mceTableInsertColAfter'});
+ sm.add({title : 'table.delete_col_desc', icon : 'delete_col', cmd : 'mceTableDeleteCol'});
+ } else
+ m.add({title : 'table.desc', icon : 'table', cmd : 'mceInsertTable'});
+ });
+ }
+
+ // Fix to allow navigating up and down in a table in WebKit browsers.
+ if (tinymce.isWebKit) {
+ function moveSelection(ed, e) {
+ var VK = tinymce.VK;
+ var key = e.keyCode;
+
+ function handle(upBool, sourceNode, event) {
+ var siblingDirection = upBool ? 'previousSibling' : 'nextSibling';
+ var currentRow = ed.dom.getParent(sourceNode, 'tr');
+ var siblingRow = currentRow[siblingDirection];
+
+ if (siblingRow) {
+ moveCursorToRow(ed, sourceNode, siblingRow, upBool);
+ tinymce.dom.Event.cancel(event);
+ return true;
+ } else {
+ var tableNode = ed.dom.getParent(currentRow, 'table');
+ var middleNode = currentRow.parentNode;
+ var parentNodeName = middleNode.nodeName.toLowerCase();
+ if (parentNodeName === 'tbody' || parentNodeName === (upBool ? 'tfoot' : 'thead')) {
+ var targetParent = getTargetParent(upBool, tableNode, middleNode, 'tbody');
+ if (targetParent !== null) {
+ return moveToRowInTarget(upBool, targetParent, sourceNode, event);
+ }
+ }
+ return escapeTable(upBool, currentRow, siblingDirection, tableNode, event);
+ }
+ }
+
+ function getTargetParent(upBool, topNode, secondNode, nodeName) {
+ var tbodies = ed.dom.select('>' + nodeName, topNode);
+ var position = tbodies.indexOf(secondNode);
+ if (upBool && position === 0 || !upBool && position === tbodies.length - 1) {
+ return getFirstHeadOrFoot(upBool, topNode);
+ } else if (position === -1) {
+ var topOrBottom = secondNode.tagName.toLowerCase() === 'thead' ? 0 : tbodies.length - 1;
+ return tbodies[topOrBottom];
+ } else {
+ return tbodies[position + (upBool ? -1 : 1)];
+ }
+ }
+
+ function getFirstHeadOrFoot(upBool, parent) {
+ var tagName = upBool ? 'thead' : 'tfoot';
+ var headOrFoot = ed.dom.select('>' + tagName, parent);
+ return headOrFoot.length !== 0 ? headOrFoot[0] : null;
+ }
+
+ function moveToRowInTarget(upBool, targetParent, sourceNode, event) {
+ var targetRow = getChildForDirection(targetParent, upBool);
+ targetRow && moveCursorToRow(ed, sourceNode, targetRow, upBool);
+ tinymce.dom.Event.cancel(event);
+ return true;
+ }
+
+ function escapeTable(upBool, currentRow, siblingDirection, table, event) {
+ var tableSibling = table[siblingDirection];
+ if (tableSibling) {
+ moveCursorToStartOfElement(tableSibling);
+ return true;
+ } else {
+ var parentCell = ed.dom.getParent(table, 'td,th');
+ if (parentCell) {
+ return handle(upBool, parentCell, event);
+ } else {
+ var backUpSibling = getChildForDirection(currentRow, !upBool);
+ moveCursorToStartOfElement(backUpSibling);
+ return tinymce.dom.Event.cancel(event);
+ }
+ }
+ }
+
+ function getChildForDirection(parent, up) {
+ var child = parent && parent[up ? 'lastChild' : 'firstChild'];
+ // BR is not a valid table child to return in this case we return the table cell
+ return child && child.nodeName === 'BR' ? ed.dom.getParent(child, 'td,th') : child;
+ }
+
+ function moveCursorToStartOfElement(n) {
+ ed.selection.setCursorLocation(n, 0);
+ }
+
+ function isVerticalMovement() {
+ return key == VK.UP || key == VK.DOWN;
+ }
+
+ function isInTable(ed) {
+ var node = ed.selection.getNode();
+ var currentRow = ed.dom.getParent(node, 'tr');
+ return currentRow !== null;
+ }
+
+ function columnIndex(column) {
+ var colIndex = 0;
+ var c = column;
+ while (c.previousSibling) {
+ c = c.previousSibling;
+ colIndex = colIndex + getSpanVal(c, "colspan");
+ }
+ return colIndex;
+ }
+
+ function findColumn(rowElement, columnIndex) {
+ var c = 0;
+ var r = 0;
+ each(rowElement.children, function(cell, i) {
+ c = c + getSpanVal(cell, "colspan");
+ r = i;
+ if (c > columnIndex)
+ return false;
+ });
+ return r;
+ }
+
+ function moveCursorToRow(ed, node, row, upBool) {
+ var srcColumnIndex = columnIndex(ed.dom.getParent(node, 'td,th'));
+ var tgtColumnIndex = findColumn(row, srcColumnIndex);
+ var tgtNode = row.childNodes[tgtColumnIndex];
+ var rowCellTarget = getChildForDirection(tgtNode, upBool);
+ moveCursorToStartOfElement(rowCellTarget || tgtNode);
+ }
+
+ function shouldFixCaret(preBrowserNode) {
+ var newNode = ed.selection.getNode();
+ var newParent = ed.dom.getParent(newNode, 'td,th');
+ var oldParent = ed.dom.getParent(preBrowserNode, 'td,th');
+ return newParent && newParent !== oldParent && checkSameParentTable(newParent, oldParent)
+ }
+
+ function checkSameParentTable(nodeOne, NodeTwo) {
+ return ed.dom.getParent(nodeOne, 'TABLE') === ed.dom.getParent(NodeTwo, 'TABLE');
+ }
+
+ if (isVerticalMovement() && isInTable(ed)) {
+ var preBrowserNode = ed.selection.getNode();
+ setTimeout(function() {
+ if (shouldFixCaret(preBrowserNode)) {
+ handle(!e.shiftKey && key === VK.UP, preBrowserNode, e);
+ }
+ }, 0);
+ }
+ }
+
+ ed.onKeyDown.add(moveSelection);
+ }
+
+ // Fixes an issue on Gecko where it's impossible to place the caret behind a table
+ // This fix will force a paragraph element after the table but only when the forced_root_block setting is enabled
+ function fixTableCaretPos() {
+ var last;
+
+ // Skip empty text nodes form the end
+ for (last = ed.getBody().lastChild; last && last.nodeType == 3 && !last.nodeValue.length; last = last.previousSibling) ;
+
+ if (last && last.nodeName == 'TABLE') {
+ if (ed.settings.forced_root_block)
+ ed.dom.add(ed.getBody(), ed.settings.forced_root_block, null, tinymce.isIE ? '&nbsp;' : '<br data-mce-bogus="1" />');
+ else
+ ed.dom.add(ed.getBody(), 'br', {'data-mce-bogus': '1'});
+ }
+ };
+
+ // Fixes an bug where it's impossible to place the caret before a table in Gecko
+ // this fix solves it by detecting when the caret is at the beginning of such a table
+ // and then manually moves the caret infront of the table
+ if (tinymce.isGecko) {
+ ed.onKeyDown.add(function(ed, e) {
+ var rng, table, dom = ed.dom;
+
+ // On gecko it's not possible to place the caret before a table
+ if (e.keyCode == 37 || e.keyCode == 38) {
+ rng = ed.selection.getRng();
+ table = dom.getParent(rng.startContainer, 'table');
+
+ if (table && ed.getBody().firstChild == table) {
+ if (isAtStart(rng, table)) {
+ rng = dom.createRng();
+
+ rng.setStartBefore(table);
+ rng.setEndBefore(table);
+
+ ed.selection.setRng(rng);
+
+ e.preventDefault();
+ }
+ }
+ }
+ });
+ }
+
+ ed.onKeyUp.add(fixTableCaretPos);
+ ed.onSetContent.add(fixTableCaretPos);
+ ed.onVisualAid.add(fixTableCaretPos);
+
+ ed.onPreProcess.add(function(ed, o) {
+ var last = o.node.lastChild;
+
+ if (last && (last.nodeName == "BR" || (last.childNodes.length == 1 && (last.firstChild.nodeName == 'BR' || last.firstChild.nodeValue == '\u00a0'))) && last.previousSibling && last.previousSibling.nodeName == "TABLE") {
+ ed.dom.remove(last);
+ }
+ });
+
+
+ /**
+ * Fixes bug in Gecko where shift-enter in table cell does not place caret on new line
+ *
+ * Removed: Since the new enter logic seems to fix this one.
+ */
+ /*
+ if (tinymce.isGecko) {
+ ed.onKeyDown.add(function(ed, e) {
+ if (e.keyCode === tinymce.VK.ENTER && e.shiftKey) {
+ var node = ed.selection.getRng().startContainer;
+ var tableCell = dom.getParent(node, 'td,th');
+ if (tableCell) {
+ var zeroSizedNbsp = ed.getDoc().createTextNode("\uFEFF");
+ dom.insertAfter(zeroSizedNbsp, node);
+ }
+ }
+ });
+ }
+ */
+
+ fixTableCaretPos();
+ ed.startContent = ed.getContent({format : 'raw'});
+ });
+
+ // Register action commands
+ each({
+ mceTableSplitCells : function(grid) {
+ grid.split();
+ },
+
+ mceTableMergeCells : function(grid) {
+ var rowSpan, colSpan, cell;
+
+ cell = ed.dom.getParent(ed.selection.getNode(), 'th,td');
+ if (cell) {
+ rowSpan = cell.rowSpan;
+ colSpan = cell.colSpan;
+ }
+
+ if (!ed.dom.select('td.mceSelected,th.mceSelected').length) {
+ winMan.open({
+ url : url + '/merge_cells.htm',
+ width : 240 + parseInt(ed.getLang('table.merge_cells_delta_width', 0)),
+ height : 110 + parseInt(ed.getLang('table.merge_cells_delta_height', 0)),
+ inline : 1
+ }, {
+ rows : rowSpan,
+ cols : colSpan,
+ onaction : function(data) {
+ grid.merge(cell, data.cols, data.rows);
+ },
+ plugin_url : url
+ });
+ } else
+ grid.merge();
+ },
+
+ mceTableInsertRowBefore : function(grid) {
+ grid.insertRow(true);
+ },
+
+ mceTableInsertRowAfter : function(grid) {
+ grid.insertRow();
+ },
+
+ mceTableInsertColBefore : function(grid) {
+ grid.insertCol(true);
+ },
+
+ mceTableInsertColAfter : function(grid) {
+ grid.insertCol();
+ },
+
+ mceTableDeleteCol : function(grid) {
+ grid.deleteCols();
+ },
+
+ mceTableDeleteRow : function(grid) {
+ grid.deleteRows();
+ },
+
+ mceTableCutRow : function(grid) {
+ clipboardRows = grid.cutRows();
+ },
+
+ mceTableCopyRow : function(grid) {
+ clipboardRows = grid.copyRows();
+ },
+
+ mceTablePasteRowBefore : function(grid) {
+ grid.pasteRows(clipboardRows, true);
+ },
+
+ mceTablePasteRowAfter : function(grid) {
+ grid.pasteRows(clipboardRows);
+ },
+
+ mceTableDelete : function(grid) {
+ grid.deleteTable();
+ }
+ }, function(func, name) {
+ ed.addCommand(name, function() {
+ var grid = createTableGrid();
+
+ if (grid) {
+ func(grid);
+ ed.execCommand('mceRepaint');
+ cleanup();
+ }
+ });
+ });
+
+ // Register dialog commands
+ each({
+ mceInsertTable : function(val) {
+ winMan.open({
+ url : url + '/table.htm',
+ width : 400 + parseInt(ed.getLang('table.table_delta_width', 0)),
+ height : 320 + parseInt(ed.getLang('table.table_delta_height', 0)),
+ inline : 1
+ }, {
+ plugin_url : url,
+ action : val ? val.action : 0
+ });
+ },
+
+ mceTableRowProps : function() {
+ winMan.open({
+ url : url + '/row.htm',
+ width : 400 + parseInt(ed.getLang('table.rowprops_delta_width', 0)),
+ height : 295 + parseInt(ed.getLang('table.rowprops_delta_height', 0)),
+ inline : 1
+ }, {
+ plugin_url : url
+ });
+ },
+
+ mceTableCellProps : function() {
+ winMan.open({
+ url : url + '/cell.htm',
+ width : 400 + parseInt(ed.getLang('table.cellprops_delta_width', 0)),
+ height : 295 + parseInt(ed.getLang('table.cellprops_delta_height', 0)),
+ inline : 1
+ }, {
+ plugin_url : url
+ });
+ }
+ }, function(func, name) {
+ ed.addCommand(name, function(ui, val) {
+ func(val);
+ });
+ });
+ }
+ });
+
+ // Register plugin
+ tinymce.PluginManager.add('table', tinymce.plugins.TablePlugin);
+})(tinymce);
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/js/cell.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/js/cell.js
new file mode 100644
index 00000000..02ecf22c
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/js/cell.js
@@ -0,0 +1,319 @@
+tinyMCEPopup.requireLangPack();
+
+var ed;
+
+function init() {
+ ed = tinyMCEPopup.editor;
+ tinyMCEPopup.resizeToInnerSize();
+
+ document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
+ document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor');
+ document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor')
+
+ var inst = ed;
+ var tdElm = ed.dom.getParent(ed.selection.getStart(), "td,th");
+ var formObj = document.forms[0];
+ var st = ed.dom.parseStyle(ed.dom.getAttrib(tdElm, "style"));
+
+ // Get table cell data
+ var celltype = tdElm.nodeName.toLowerCase();
+ var align = ed.dom.getAttrib(tdElm, 'align');
+ var valign = ed.dom.getAttrib(tdElm, 'valign');
+ var width = trimSize(getStyle(tdElm, 'width', 'width'));
+ var height = trimSize(getStyle(tdElm, 'height', 'height'));
+ var bordercolor = convertRGBToHex(getStyle(tdElm, 'bordercolor', 'borderLeftColor'));
+ var bgcolor = convertRGBToHex(getStyle(tdElm, 'bgcolor', 'backgroundColor'));
+ var className = ed.dom.getAttrib(tdElm, 'class');
+ var backgroundimage = getStyle(tdElm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
+ var id = ed.dom.getAttrib(tdElm, 'id');
+ var lang = ed.dom.getAttrib(tdElm, 'lang');
+ var dir = ed.dom.getAttrib(tdElm, 'dir');
+ var scope = ed.dom.getAttrib(tdElm, 'scope');
+
+ // Setup form
+ addClassesToList('class', 'table_cell_styles');
+ TinyMCE_EditableSelects.init();
+
+ if (!ed.dom.hasClass(tdElm, 'mceSelected')) {
+ formObj.bordercolor.value = bordercolor;
+ formObj.bgcolor.value = bgcolor;
+ formObj.backgroundimage.value = backgroundimage;
+ formObj.width.value = width;
+ formObj.height.value = height;
+ formObj.id.value = id;
+ formObj.lang.value = lang;
+ formObj.style.value = ed.dom.serializeStyle(st);
+ selectByValue(formObj, 'align', align);
+ selectByValue(formObj, 'valign', valign);
+ selectByValue(formObj, 'class', className, true, true);
+ selectByValue(formObj, 'celltype', celltype);
+ selectByValue(formObj, 'dir', dir);
+ selectByValue(formObj, 'scope', scope);
+
+ // Resize some elements
+ if (isVisible('backgroundimagebrowser'))
+ document.getElementById('backgroundimage').style.width = '180px';
+
+ updateColor('bordercolor_pick', 'bordercolor');
+ updateColor('bgcolor_pick', 'bgcolor');
+ } else
+ tinyMCEPopup.dom.hide('action');
+}
+
+function updateAction() {
+ var el, inst = ed, tdElm, trElm, tableElm, formObj = document.forms[0];
+
+ if (!AutoValidator.validate(formObj)) {
+ tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.');
+ return false;
+ }
+
+ tinyMCEPopup.restoreSelection();
+ el = ed.selection.getStart();
+ tdElm = ed.dom.getParent(el, "td,th");
+ trElm = ed.dom.getParent(el, "tr");
+ tableElm = ed.dom.getParent(el, "table");
+
+ // Cell is selected
+ if (ed.dom.hasClass(tdElm, 'mceSelected')) {
+ // Update all selected sells
+ tinymce.each(ed.dom.select('td.mceSelected,th.mceSelected'), function(td) {
+ updateCell(td);
+ });
+
+ ed.addVisual();
+ ed.nodeChanged();
+ inst.execCommand('mceEndUndoLevel');
+ tinyMCEPopup.close();
+ return;
+ }
+
+ switch (getSelectValue(formObj, 'action')) {
+ case "cell":
+ var celltype = getSelectValue(formObj, 'celltype');
+ var scope = getSelectValue(formObj, 'scope');
+
+ function doUpdate(s) {
+ if (s) {
+ updateCell(tdElm);
+
+ ed.addVisual();
+ ed.nodeChanged();
+ inst.execCommand('mceEndUndoLevel');
+ tinyMCEPopup.close();
+ }
+ };
+
+ if (ed.getParam("accessibility_warnings", 1)) {
+ if (celltype == "th" && scope == "")
+ tinyMCEPopup.confirm(ed.getLang('table_dlg.missing_scope', '', true), doUpdate);
+ else
+ doUpdate(1);
+
+ return;
+ }
+
+ updateCell(tdElm);
+ break;
+
+ case "row":
+ var cell = trElm.firstChild;
+
+ if (cell.nodeName != "TD" && cell.nodeName != "TH")
+ cell = nextCell(cell);
+
+ do {
+ cell = updateCell(cell, true);
+ } while ((cell = nextCell(cell)) != null);
+
+ break;
+
+ case "col":
+ var curr, col = 0, cell = trElm.firstChild, rows = tableElm.getElementsByTagName("tr");
+
+ if (cell.nodeName != "TD" && cell.nodeName != "TH")
+ cell = nextCell(cell);
+
+ do {
+ if (cell == tdElm)
+ break;
+ col += cell.getAttribute("colspan")?cell.getAttribute("colspan"):1;
+ } while ((cell = nextCell(cell)) != null);
+
+ for (var i=0; i<rows.length; i++) {
+ cell = rows[i].firstChild;
+
+ if (cell.nodeName != "TD" && cell.nodeName != "TH")
+ cell = nextCell(cell);
+
+ curr = 0;
+ do {
+ if (curr == col) {
+ cell = updateCell(cell, true);
+ break;
+ }
+ curr += cell.getAttribute("colspan")?cell.getAttribute("colspan"):1;
+ } while ((cell = nextCell(cell)) != null);
+ }
+
+ break;
+
+ case "all":
+ var rows = tableElm.getElementsByTagName("tr");
+
+ for (var i=0; i<rows.length; i++) {
+ var cell = rows[i].firstChild;
+
+ if (cell.nodeName != "TD" && cell.nodeName != "TH")
+ cell = nextCell(cell);
+
+ do {
+ cell = updateCell(cell, true);
+ } while ((cell = nextCell(cell)) != null);
+ }
+
+ break;
+ }
+
+ ed.addVisual();
+ ed.nodeChanged();
+ inst.execCommand('mceEndUndoLevel');
+ tinyMCEPopup.close();
+}
+
+function nextCell(elm) {
+ while ((elm = elm.nextSibling) != null) {
+ if (elm.nodeName == "TD" || elm.nodeName == "TH")
+ return elm;
+ }
+
+ return null;
+}
+
+function updateCell(td, skip_id) {
+ var inst = ed;
+ var formObj = document.forms[0];
+ var curCellType = td.nodeName.toLowerCase();
+ var celltype = getSelectValue(formObj, 'celltype');
+ var doc = inst.getDoc();
+ var dom = ed.dom;
+
+ if (!skip_id)
+ dom.setAttrib(td, 'id', formObj.id.value);
+
+ dom.setAttrib(td, 'align', formObj.align.value);
+ dom.setAttrib(td, 'vAlign', formObj.valign.value);
+ dom.setAttrib(td, 'lang', formObj.lang.value);
+ dom.setAttrib(td, 'dir', getSelectValue(formObj, 'dir'));
+ dom.setAttrib(td, 'style', ed.dom.serializeStyle(ed.dom.parseStyle(formObj.style.value)));
+ dom.setAttrib(td, 'scope', formObj.scope.value);
+ dom.setAttrib(td, 'class', getSelectValue(formObj, 'class'));
+
+ // Clear deprecated attributes
+ ed.dom.setAttrib(td, 'width', '');
+ ed.dom.setAttrib(td, 'height', '');
+ ed.dom.setAttrib(td, 'bgColor', '');
+ ed.dom.setAttrib(td, 'borderColor', '');
+ ed.dom.setAttrib(td, 'background', '');
+
+ // Set styles
+ td.style.width = getCSSSize(formObj.width.value);
+ td.style.height = getCSSSize(formObj.height.value);
+ if (formObj.bordercolor.value != "") {
+ td.style.borderColor = formObj.bordercolor.value;
+ td.style.borderStyle = td.style.borderStyle == "" ? "solid" : td.style.borderStyle;
+ td.style.borderWidth = td.style.borderWidth == "" ? "1px" : td.style.borderWidth;
+ } else
+ td.style.borderColor = '';
+
+ td.style.backgroundColor = formObj.bgcolor.value;
+
+ if (formObj.backgroundimage.value != "")
+ td.style.backgroundImage = "url('" + formObj.backgroundimage.value + "')";
+ else
+ td.style.backgroundImage = '';
+
+ if (curCellType != celltype) {
+ // changing to a different node type
+ var newCell = doc.createElement(celltype);
+
+ for (var c=0; c<td.childNodes.length; c++)
+ newCell.appendChild(td.childNodes[c].cloneNode(1));
+
+ for (var a=0; a<td.attributes.length; a++)
+ ed.dom.setAttrib(newCell, td.attributes[a].name, ed.dom.getAttrib(td, td.attributes[a].name));
+
+ td.parentNode.replaceChild(newCell, td);
+ td = newCell;
+ }
+
+ dom.setAttrib(td, 'style', dom.serializeStyle(dom.parseStyle(td.style.cssText)));
+
+ return td;
+}
+
+function changedBackgroundImage() {
+ var formObj = document.forms[0];
+ var st = ed.dom.parseStyle(formObj.style.value);
+
+ st['background-image'] = "url('" + formObj.backgroundimage.value + "')";
+
+ formObj.style.value = ed.dom.serializeStyle(st);
+}
+
+function changedSize() {
+ var formObj = document.forms[0];
+ var st = ed.dom.parseStyle(formObj.style.value);
+
+ var width = formObj.width.value;
+ if (width != "")
+ st['width'] = getCSSSize(width);
+ else
+ st['width'] = "";
+
+ var height = formObj.height.value;
+ if (height != "")
+ st['height'] = getCSSSize(height);
+ else
+ st['height'] = "";
+
+ formObj.style.value = ed.dom.serializeStyle(st);
+}
+
+function changedColor() {
+ var formObj = document.forms[0];
+ var st = ed.dom.parseStyle(formObj.style.value);
+
+ st['background-color'] = formObj.bgcolor.value;
+ st['border-color'] = formObj.bordercolor.value;
+
+ formObj.style.value = ed.dom.serializeStyle(st);
+}
+
+function changedStyle() {
+ var formObj = document.forms[0];
+ var st = ed.dom.parseStyle(formObj.style.value);
+
+ if (st['background-image'])
+ formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
+ else
+ formObj.backgroundimage.value = '';
+
+ if (st['width'])
+ formObj.width.value = trimSize(st['width']);
+
+ if (st['height'])
+ formObj.height.value = trimSize(st['height']);
+
+ if (st['background-color']) {
+ formObj.bgcolor.value = st['background-color'];
+ updateColor('bgcolor_pick','bgcolor');
+ }
+
+ if (st['border-color']) {
+ formObj.bordercolor.value = st['border-color'];
+ updateColor('bordercolor_pick','bordercolor');
+ }
+}
+
+tinyMCEPopup.onInit.add(init);
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/js/merge_cells.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/js/merge_cells.js
new file mode 100644
index 00000000..7ee4bf04
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/js/merge_cells.js
@@ -0,0 +1,27 @@
+tinyMCEPopup.requireLangPack();
+
+var MergeCellsDialog = {
+ init : function() {
+ var f = document.forms[0];
+
+ f.numcols.value = tinyMCEPopup.getWindowArg('cols', 1);
+ f.numrows.value = tinyMCEPopup.getWindowArg('rows', 1);
+ },
+
+ merge : function() {
+ var func, f = document.forms[0];
+
+ tinyMCEPopup.restoreSelection();
+
+ func = tinyMCEPopup.getWindowArg('onaction');
+
+ func({
+ cols : f.numcols.value,
+ rows : f.numrows.value
+ });
+
+ tinyMCEPopup.close();
+ }
+};
+
+tinyMCEPopup.onInit.add(MergeCellsDialog.init, MergeCellsDialog);
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/js/row.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/js/row.js
new file mode 100644
index 00000000..a13d6959
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/js/row.js
@@ -0,0 +1,237 @@
+tinyMCEPopup.requireLangPack();
+
+function init() {
+ tinyMCEPopup.resizeToInnerSize();
+
+ document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
+ document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
+
+ var inst = tinyMCEPopup.editor;
+ var dom = inst.dom;
+ var trElm = dom.getParent(inst.selection.getStart(), "tr");
+ var formObj = document.forms[0];
+ var st = dom.parseStyle(dom.getAttrib(trElm, "style"));
+
+ // Get table row data
+ var rowtype = trElm.parentNode.nodeName.toLowerCase();
+ var align = dom.getAttrib(trElm, 'align');
+ var valign = dom.getAttrib(trElm, 'valign');
+ var height = trimSize(getStyle(trElm, 'height', 'height'));
+ var className = dom.getAttrib(trElm, 'class');
+ var bgcolor = convertRGBToHex(getStyle(trElm, 'bgcolor', 'backgroundColor'));
+ var backgroundimage = getStyle(trElm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
+ var id = dom.getAttrib(trElm, 'id');
+ var lang = dom.getAttrib(trElm, 'lang');
+ var dir = dom.getAttrib(trElm, 'dir');
+
+ selectByValue(formObj, 'rowtype', rowtype);
+
+ // Any cells selected
+ if (dom.select('td.mceSelected,th.mceSelected', trElm).length == 0) {
+ // Setup form
+ addClassesToList('class', 'table_row_styles');
+ TinyMCE_EditableSelects.init();
+
+ formObj.bgcolor.value = bgcolor;
+ formObj.backgroundimage.value = backgroundimage;
+ formObj.height.value = height;
+ formObj.id.value = id;
+ formObj.lang.value = lang;
+ formObj.style.value = dom.serializeStyle(st);
+ selectByValue(formObj, 'align', align);
+ selectByValue(formObj, 'valign', valign);
+ selectByValue(formObj, 'class', className, true, true);
+ selectByValue(formObj, 'dir', dir);
+
+ // Resize some elements
+ if (isVisible('backgroundimagebrowser'))
+ document.getElementById('backgroundimage').style.width = '180px';
+
+ updateColor('bgcolor_pick', 'bgcolor');
+ } else
+ tinyMCEPopup.dom.hide('action');
+}
+
+function updateAction() {
+ var inst = tinyMCEPopup.editor, dom = inst.dom, trElm, tableElm, formObj = document.forms[0];
+ var action = getSelectValue(formObj, 'action');
+
+ if (!AutoValidator.validate(formObj)) {
+ tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.');
+ return false;
+ }
+
+ tinyMCEPopup.restoreSelection();
+ trElm = dom.getParent(inst.selection.getStart(), "tr");
+ tableElm = dom.getParent(inst.selection.getStart(), "table");
+
+ // Update all selected rows
+ if (dom.select('td.mceSelected,th.mceSelected', trElm).length > 0) {
+ tinymce.each(tableElm.rows, function(tr) {
+ var i;
+
+ for (i = 0; i < tr.cells.length; i++) {
+ if (dom.hasClass(tr.cells[i], 'mceSelected')) {
+ updateRow(tr, true);
+ return;
+ }
+ }
+ });
+
+ inst.addVisual();
+ inst.nodeChanged();
+ inst.execCommand('mceEndUndoLevel');
+ tinyMCEPopup.close();
+ return;
+ }
+
+ switch (action) {
+ case "row":
+ updateRow(trElm);
+ break;
+
+ case "all":
+ var rows = tableElm.getElementsByTagName("tr");
+
+ for (var i=0; i<rows.length; i++)
+ updateRow(rows[i], true);
+
+ break;
+
+ case "odd":
+ case "even":
+ var rows = tableElm.getElementsByTagName("tr");
+
+ for (var i=0; i<rows.length; i++) {
+ if ((i % 2 == 0 && action == "odd") || (i % 2 != 0 && action == "even"))
+ updateRow(rows[i], true, true);
+ }
+
+ break;
+ }
+
+ inst.addVisual();
+ inst.nodeChanged();
+ inst.execCommand('mceEndUndoLevel');
+ tinyMCEPopup.close();
+}
+
+function updateRow(tr_elm, skip_id, skip_parent) {
+ var inst = tinyMCEPopup.editor;
+ var formObj = document.forms[0];
+ var dom = inst.dom;
+ var curRowType = tr_elm.parentNode.nodeName.toLowerCase();
+ var rowtype = getSelectValue(formObj, 'rowtype');
+ var doc = inst.getDoc();
+
+ // Update row element
+ if (!skip_id)
+ dom.setAttrib(tr_elm, 'id', formObj.id.value);
+
+ dom.setAttrib(tr_elm, 'align', getSelectValue(formObj, 'align'));
+ dom.setAttrib(tr_elm, 'vAlign', getSelectValue(formObj, 'valign'));
+ dom.setAttrib(tr_elm, 'lang', formObj.lang.value);
+ dom.setAttrib(tr_elm, 'dir', getSelectValue(formObj, 'dir'));
+ dom.setAttrib(tr_elm, 'style', dom.serializeStyle(dom.parseStyle(formObj.style.value)));
+ dom.setAttrib(tr_elm, 'class', getSelectValue(formObj, 'class'));
+
+ // Clear deprecated attributes
+ dom.setAttrib(tr_elm, 'background', '');
+ dom.setAttrib(tr_elm, 'bgColor', '');
+ dom.setAttrib(tr_elm, 'height', '');
+
+ // Set styles
+ tr_elm.style.height = getCSSSize(formObj.height.value);
+ tr_elm.style.backgroundColor = formObj.bgcolor.value;
+
+ if (formObj.backgroundimage.value != "")
+ tr_elm.style.backgroundImage = "url('" + formObj.backgroundimage.value + "')";
+ else
+ tr_elm.style.backgroundImage = '';
+
+ // Setup new rowtype
+ if (curRowType != rowtype && !skip_parent) {
+ // first, clone the node we are working on
+ var newRow = tr_elm.cloneNode(1);
+
+ // next, find the parent of its new destination (creating it if necessary)
+ var theTable = dom.getParent(tr_elm, "table");
+ var dest = rowtype;
+ var newParent = null;
+ for (var i = 0; i < theTable.childNodes.length; i++) {
+ if (theTable.childNodes[i].nodeName.toLowerCase() == dest)
+ newParent = theTable.childNodes[i];
+ }
+
+ if (newParent == null) {
+ newParent = doc.createElement(dest);
+
+ if (theTable.firstChild.nodeName == 'CAPTION')
+ inst.dom.insertAfter(newParent, theTable.firstChild);
+ else
+ theTable.insertBefore(newParent, theTable.firstChild);
+ }
+
+ // append the row to the new parent
+ newParent.appendChild(newRow);
+
+ // remove the original
+ tr_elm.parentNode.removeChild(tr_elm);
+
+ // set tr_elm to the new node
+ tr_elm = newRow;
+ }
+
+ dom.setAttrib(tr_elm, 'style', dom.serializeStyle(dom.parseStyle(tr_elm.style.cssText)));
+}
+
+function changedBackgroundImage() {
+ var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
+ var st = dom.parseStyle(formObj.style.value);
+
+ st['background-image'] = "url('" + formObj.backgroundimage.value + "')";
+
+ formObj.style.value = dom.serializeStyle(st);
+}
+
+function changedStyle() {
+ var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
+ var st = dom.parseStyle(formObj.style.value);
+
+ if (st['background-image'])
+ formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
+ else
+ formObj.backgroundimage.value = '';
+
+ if (st['height'])
+ formObj.height.value = trimSize(st['height']);
+
+ if (st['background-color']) {
+ formObj.bgcolor.value = st['background-color'];
+ updateColor('bgcolor_pick','bgcolor');
+ }
+}
+
+function changedSize() {
+ var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
+ var st = dom.parseStyle(formObj.style.value);
+
+ var height = formObj.height.value;
+ if (height != "")
+ st['height'] = getCSSSize(height);
+ else
+ st['height'] = "";
+
+ formObj.style.value = dom.serializeStyle(st);
+}
+
+function changedColor() {
+ var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
+ var st = dom.parseStyle(formObj.style.value);
+
+ st['background-color'] = formObj.bgcolor.value;
+
+ formObj.style.value = dom.serializeStyle(st);
+}
+
+tinyMCEPopup.onInit.add(init);
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/js/table.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/js/table.js
new file mode 100644
index 00000000..1db243b6
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/js/table.js
@@ -0,0 +1,501 @@
+tinyMCEPopup.requireLangPack();
+
+var action, orgTableWidth, orgTableHeight, dom = tinyMCEPopup.editor.dom;
+
+function insertTable() {
+ var formObj = document.forms[0];
+ var inst = tinyMCEPopup.editor, dom = inst.dom;
+ var cols = 2, rows = 2, border = 0, cellpadding = -1, cellspacing = -1, align, width, height, className, caption, frame, rules;
+ var html = '', capEl, elm;
+ var cellLimit, rowLimit, colLimit;
+
+ tinyMCEPopup.restoreSelection();
+
+ if (!AutoValidator.validate(formObj)) {
+ tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.');
+ return false;
+ }
+
+ elm = dom.getParent(inst.selection.getNode(), 'table');
+
+ // Get form data
+ cols = formObj.elements['cols'].value;
+ rows = formObj.elements['rows'].value;
+ border = formObj.elements['border'].value != "" ? formObj.elements['border'].value : 0;
+ cellpadding = formObj.elements['cellpadding'].value != "" ? formObj.elements['cellpadding'].value : "";
+ cellspacing = formObj.elements['cellspacing'].value != "" ? formObj.elements['cellspacing'].value : "";
+ align = getSelectValue(formObj, "align");
+ frame = getSelectValue(formObj, "tframe");
+ rules = getSelectValue(formObj, "rules");
+ width = formObj.elements['width'].value;
+ height = formObj.elements['height'].value;
+ bordercolor = formObj.elements['bordercolor'].value;
+ bgcolor = formObj.elements['bgcolor'].value;
+ className = getSelectValue(formObj, "class");
+ id = formObj.elements['id'].value;
+ summary = formObj.elements['summary'].value;
+ style = formObj.elements['style'].value;
+ dir = formObj.elements['dir'].value;
+ lang = formObj.elements['lang'].value;
+ background = formObj.elements['backgroundimage'].value;
+ caption = formObj.elements['caption'].checked;
+
+ cellLimit = tinyMCEPopup.getParam('table_cell_limit', false);
+ rowLimit = tinyMCEPopup.getParam('table_row_limit', false);
+ colLimit = tinyMCEPopup.getParam('table_col_limit', false);
+
+ // Validate table size
+ if (colLimit && cols > colLimit) {
+ tinyMCEPopup.alert(inst.getLang('table_dlg.col_limit').replace(/\{\$cols\}/g, colLimit));
+ return false;
+ } else if (rowLimit && rows > rowLimit) {
+ tinyMCEPopup.alert(inst.getLang('table_dlg.row_limit').replace(/\{\$rows\}/g, rowLimit));
+ return false;
+ } else if (cellLimit && cols * rows > cellLimit) {
+ tinyMCEPopup.alert(inst.getLang('table_dlg.cell_limit').replace(/\{\$cells\}/g, cellLimit));
+ return false;
+ }
+
+ // Update table
+ if (action == "update") {
+ dom.setAttrib(elm, 'cellPadding', cellpadding, true);
+ dom.setAttrib(elm, 'cellSpacing', cellspacing, true);
+
+ if (!isCssSize(border)) {
+ dom.setAttrib(elm, 'border', border);
+ } else {
+ dom.setAttrib(elm, 'border', '');
+ }
+
+ if (border == '') {
+ dom.setStyle(elm, 'border-width', '');
+ dom.setStyle(elm, 'border', '');
+ dom.setAttrib(elm, 'border', '');
+ }
+
+ dom.setAttrib(elm, 'align', align);
+ dom.setAttrib(elm, 'frame', frame);
+ dom.setAttrib(elm, 'rules', rules);
+ dom.setAttrib(elm, 'class', className);
+ dom.setAttrib(elm, 'style', style);
+ dom.setAttrib(elm, 'id', id);
+ dom.setAttrib(elm, 'summary', summary);
+ dom.setAttrib(elm, 'dir', dir);
+ dom.setAttrib(elm, 'lang', lang);
+
+ capEl = inst.dom.select('caption', elm)[0];
+
+ if (capEl && !caption)
+ capEl.parentNode.removeChild(capEl);
+
+ if (!capEl && caption) {
+ capEl = elm.ownerDocument.createElement('caption');
+
+ if (!tinymce.isIE)
+ capEl.innerHTML = '<br data-mce-bogus="1"/>';
+
+ elm.insertBefore(capEl, elm.firstChild);
+ }
+
+ if (width && inst.settings.inline_styles) {
+ dom.setStyle(elm, 'width', width);
+ dom.setAttrib(elm, 'width', '');
+ } else {
+ dom.setAttrib(elm, 'width', width, true);
+ dom.setStyle(elm, 'width', '');
+ }
+
+ // Remove these since they are not valid XHTML
+ dom.setAttrib(elm, 'borderColor', '');
+ dom.setAttrib(elm, 'bgColor', '');
+ dom.setAttrib(elm, 'background', '');
+
+ if (height && inst.settings.inline_styles) {
+ dom.setStyle(elm, 'height', height);
+ dom.setAttrib(elm, 'height', '');
+ } else {
+ dom.setAttrib(elm, 'height', height, true);
+ dom.setStyle(elm, 'height', '');
+ }
+
+ if (background != '')
+ elm.style.backgroundImage = "url('" + background + "')";
+ else
+ elm.style.backgroundImage = '';
+
+/* if (tinyMCEPopup.getParam("inline_styles")) {
+ if (width != '')
+ elm.style.width = getCSSSize(width);
+ }*/
+
+ if (bordercolor != "") {
+ elm.style.borderColor = bordercolor;
+ elm.style.borderStyle = elm.style.borderStyle == "" ? "solid" : elm.style.borderStyle;
+ elm.style.borderWidth = cssSize(border);
+ } else
+ elm.style.borderColor = '';
+
+ elm.style.backgroundColor = bgcolor;
+ elm.style.height = getCSSSize(height);
+
+ inst.addVisual();
+
+ // Fix for stange MSIE align bug
+ //elm.outerHTML = elm.outerHTML;
+
+ inst.nodeChanged();
+ inst.execCommand('mceEndUndoLevel', false, {}, {skip_undo: true});
+
+ // Repaint if dimensions changed
+ if (formObj.width.value != orgTableWidth || formObj.height.value != orgTableHeight)
+ inst.execCommand('mceRepaint');
+
+ tinyMCEPopup.close();
+ return true;
+ }
+
+ // Create new table
+ html += '<table';
+
+ html += makeAttrib('id', id);
+ if (!isCssSize(border)) {
+ html += makeAttrib('border', border);
+ }
+
+ html += makeAttrib('cellpadding', cellpadding);
+ html += makeAttrib('cellspacing', cellspacing);
+ html += makeAttrib('data-mce-new', '1');
+
+ if (width && inst.settings.inline_styles) {
+ if (style)
+ style += '; ';
+
+ // Force px
+ if (/^[0-9\.]+$/.test(width))
+ width += 'px';
+
+ style += 'width: ' + width;
+ } else
+ html += makeAttrib('width', width);
+
+/* if (height) {
+ if (style)
+ style += '; ';
+
+ style += 'height: ' + height;
+ }*/
+
+ //html += makeAttrib('height', height);
+ //html += makeAttrib('bordercolor', bordercolor);
+ //html += makeAttrib('bgcolor', bgcolor);
+ html += makeAttrib('align', align);
+ html += makeAttrib('frame', frame);
+ html += makeAttrib('rules', rules);
+ html += makeAttrib('class', className);
+ html += makeAttrib('style', style);
+ html += makeAttrib('summary', summary);
+ html += makeAttrib('dir', dir);
+ html += makeAttrib('lang', lang);
+ html += '>';
+
+ if (caption) {
+ if (!tinymce.isIE)
+ html += '<caption><br data-mce-bogus="1"/></caption>';
+ else
+ html += '<caption></caption>';
+ }
+
+ for (var y=0; y<rows; y++) {
+ html += "<tr>";
+
+ for (var x=0; x<cols; x++) {
+ if (!tinymce.isIE)
+ html += '<td><br data-mce-bogus="1"/></td>';
+ else
+ html += '<td></td>';
+ }
+
+ html += "</tr>";
+ }
+
+ html += "</table>";
+
+ // Move table
+ if (inst.settings.fix_table_elements) {
+ var patt = '';
+
+ inst.focus();
+ inst.selection.setContent('<br class="_mce_marker" />');
+
+ tinymce.each('h1,h2,h3,h4,h5,h6,p'.split(','), function(n) {
+ if (patt)
+ patt += ',';
+
+ patt += n + ' ._mce_marker';
+ });
+
+ tinymce.each(inst.dom.select(patt), function(n) {
+ inst.dom.split(inst.dom.getParent(n, 'h1,h2,h3,h4,h5,h6,p'), n);
+ });
+
+ dom.setOuterHTML(dom.select('br._mce_marker')[0], html);
+ } else
+ inst.execCommand('mceInsertContent', false, html);
+
+ tinymce.each(dom.select('table[data-mce-new]'), function(node) {
+ var tdorth = dom.select('td,th', node);
+
+ // Fixes a bug in IE where the caret cannot be placed after the table if the table is at the end of the document
+ if (tinymce.isIE && node.nextSibling == null) {
+ if (inst.settings.forced_root_block)
+ dom.insertAfter(dom.create(inst.settings.forced_root_block), node);
+ else
+ dom.insertAfter(dom.create('br', {'data-mce-bogus': '1'}), node);
+ }
+
+ try {
+ // IE9 might fail to do this selection
+ inst.selection.setCursorLocation(tdorth[0], 0);
+ } catch (ex) {
+ // Ignore
+ }
+
+ dom.setAttrib(node, 'data-mce-new', '');
+ });
+
+ inst.addVisual();
+ inst.execCommand('mceEndUndoLevel', false, {}, {skip_undo: true});
+
+ tinyMCEPopup.close();
+}
+
+function makeAttrib(attrib, value) {
+ var formObj = document.forms[0];
+ var valueElm = formObj.elements[attrib];
+
+ if (typeof(value) == "undefined" || value == null) {
+ value = "";
+
+ if (valueElm)
+ value = valueElm.value;
+ }
+
+ if (value == "")
+ return "";
+
+ // XML encode it
+ value = value.replace(/&/g, '&amp;');
+ value = value.replace(/\"/g, '&quot;');
+ value = value.replace(/</g, '&lt;');
+ value = value.replace(/>/g, '&gt;');
+
+ return ' ' + attrib + '="' + value + '"';
+}
+
+function init() {
+ tinyMCEPopup.resizeToInnerSize();
+
+ document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
+ document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
+ document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor');
+ document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
+
+ var cols = 2, rows = 2, border = tinyMCEPopup.getParam('table_default_border', '0'), cellpadding = tinyMCEPopup.getParam('table_default_cellpadding', ''), cellspacing = tinyMCEPopup.getParam('table_default_cellspacing', '');
+ var align = "", width = "", height = "", bordercolor = "", bgcolor = "", className = "";
+ var id = "", summary = "", style = "", dir = "", lang = "", background = "", bgcolor = "", bordercolor = "", rules = "", frame = "";
+ var inst = tinyMCEPopup.editor, dom = inst.dom;
+ var formObj = document.forms[0];
+ var elm = dom.getParent(inst.selection.getNode(), "table");
+
+ // Hide advanced fields that isn't available in the schema
+ tinymce.each("summary id rules dir style frame".split(" "), function(name) {
+ var tr = tinyMCEPopup.dom.getParent(name, "tr") || tinyMCEPopup.dom.getParent("t" + name, "tr");
+
+ if (tr && !tinyMCEPopup.editor.schema.isValid("table", name)) {
+ tr.style.display = 'none';
+ }
+ });
+
+ action = tinyMCEPopup.getWindowArg('action');
+
+ if (!action)
+ action = elm ? "update" : "insert";
+
+ if (elm && action != "insert") {
+ var rowsAr = elm.rows;
+ var cols = 0;
+ for (var i=0; i<rowsAr.length; i++)
+ if (rowsAr[i].cells.length > cols)
+ cols = rowsAr[i].cells.length;
+
+ cols = cols;
+ rows = rowsAr.length;
+
+ st = dom.parseStyle(dom.getAttrib(elm, "style"));
+ border = trimSize(getStyle(elm, 'border', 'borderWidth'));
+ cellpadding = dom.getAttrib(elm, 'cellpadding', "");
+ cellspacing = dom.getAttrib(elm, 'cellspacing', "");
+ width = trimSize(getStyle(elm, 'width', 'width'));
+ height = trimSize(getStyle(elm, 'height', 'height'));
+ bordercolor = convertRGBToHex(getStyle(elm, 'bordercolor', 'borderLeftColor'));
+ bgcolor = convertRGBToHex(getStyle(elm, 'bgcolor', 'backgroundColor'));
+ align = dom.getAttrib(elm, 'align', align);
+ frame = dom.getAttrib(elm, 'frame');
+ rules = dom.getAttrib(elm, 'rules');
+ className = tinymce.trim(dom.getAttrib(elm, 'class').replace(/mceItem.+/g, ''));
+ id = dom.getAttrib(elm, 'id');
+ summary = dom.getAttrib(elm, 'summary');
+ style = dom.serializeStyle(st);
+ dir = dom.getAttrib(elm, 'dir');
+ lang = dom.getAttrib(elm, 'lang');
+ background = getStyle(elm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
+ formObj.caption.checked = elm.getElementsByTagName('caption').length > 0;
+
+ orgTableWidth = width;
+ orgTableHeight = height;
+
+ action = "update";
+ formObj.insert.value = inst.getLang('update');
+ }
+
+ addClassesToList('class', "table_styles");
+ TinyMCE_EditableSelects.init();
+
+ // Update form
+ selectByValue(formObj, 'align', align);
+ selectByValue(formObj, 'tframe', frame);
+ selectByValue(formObj, 'rules', rules);
+ selectByValue(formObj, 'class', className, true, true);
+ formObj.cols.value = cols;
+ formObj.rows.value = rows;
+ formObj.border.value = border;
+ formObj.cellpadding.value = cellpadding;
+ formObj.cellspacing.value = cellspacing;
+ formObj.width.value = width;
+ formObj.height.value = height;
+ formObj.bordercolor.value = bordercolor;
+ formObj.bgcolor.value = bgcolor;
+ formObj.id.value = id;
+ formObj.summary.value = summary;
+ formObj.style.value = style;
+ formObj.dir.value = dir;
+ formObj.lang.value = lang;
+ formObj.backgroundimage.value = background;
+
+ updateColor('bordercolor_pick', 'bordercolor');
+ updateColor('bgcolor_pick', 'bgcolor');
+
+ // Resize some elements
+ if (isVisible('backgroundimagebrowser'))
+ document.getElementById('backgroundimage').style.width = '180px';
+
+ // Disable some fields in update mode
+ if (action == "update") {
+ formObj.cols.disabled = true;
+ formObj.rows.disabled = true;
+ }
+}
+
+function changedSize() {
+ var formObj = document.forms[0];
+ var st = dom.parseStyle(formObj.style.value);
+
+/* var width = formObj.width.value;
+ if (width != "")
+ st['width'] = tinyMCEPopup.getParam("inline_styles") ? getCSSSize(width) : "";
+ else
+ st['width'] = "";*/
+
+ var height = formObj.height.value;
+ if (height != "")
+ st['height'] = getCSSSize(height);
+ else
+ st['height'] = "";
+
+ formObj.style.value = dom.serializeStyle(st);
+}
+
+function isCssSize(value) {
+ return /^[0-9.]+(%|in|cm|mm|em|ex|pt|pc|px)$/.test(value);
+}
+
+function cssSize(value, def) {
+ value = tinymce.trim(value || def);
+
+ if (!isCssSize(value)) {
+ return parseInt(value, 10) + 'px';
+ }
+
+ return value;
+}
+
+function changedBackgroundImage() {
+ var formObj = document.forms[0];
+ var st = dom.parseStyle(formObj.style.value);
+
+ st['background-image'] = "url('" + formObj.backgroundimage.value + "')";
+
+ formObj.style.value = dom.serializeStyle(st);
+}
+
+function changedBorder() {
+ var formObj = document.forms[0];
+ var st = dom.parseStyle(formObj.style.value);
+
+ // Update border width if the element has a color
+ if (formObj.border.value != "" && (isCssSize(formObj.border.value) || formObj.bordercolor.value != ""))
+ st['border-width'] = cssSize(formObj.border.value);
+ else {
+ if (!formObj.border.value) {
+ st['border'] = '';
+ st['border-width'] = '';
+ }
+ }
+
+ formObj.style.value = dom.serializeStyle(st);
+}
+
+function changedColor() {
+ var formObj = document.forms[0];
+ var st = dom.parseStyle(formObj.style.value);
+
+ st['background-color'] = formObj.bgcolor.value;
+
+ if (formObj.bordercolor.value != "") {
+ st['border-color'] = formObj.bordercolor.value;
+
+ // Add border-width if it's missing
+ if (!st['border-width'])
+ st['border-width'] = cssSize(formObj.border.value, 1);
+ }
+
+ formObj.style.value = dom.serializeStyle(st);
+}
+
+function changedStyle() {
+ var formObj = document.forms[0];
+ var st = dom.parseStyle(formObj.style.value);
+
+ if (st['background-image'])
+ formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
+ else
+ formObj.backgroundimage.value = '';
+
+ if (st['width'])
+ formObj.width.value = trimSize(st['width']);
+
+ if (st['height'])
+ formObj.height.value = trimSize(st['height']);
+
+ if (st['background-color']) {
+ formObj.bgcolor.value = st['background-color'];
+ updateColor('bgcolor_pick','bgcolor');
+ }
+
+ if (st['border-color']) {
+ formObj.bordercolor.value = st['border-color'];
+ updateColor('bordercolor_pick','bordercolor');
+ }
+}
+
+tinyMCEPopup.onInit.add(init);
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/langs/de_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/langs/de_dlg.js
new file mode 100644
index 00000000..1498c148
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/langs/de_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('de.table_dlg',{"rules_border":"alle 4 Seiten (Border)","rules_box":"alle 4 Seiten (Box)","rules_vsides":"links und rechts","rules_rhs":"nur rechts","rules_lhs":"nur links","rules_hsides":"oben und unten","rules_below":"nur unten","rules_above":"nur oben","rules_void":"keins",rules:"Gitter","frame_all":"zwischen allen Zellen","frame_cols":"zwischen Spalten","frame_rows":"zwischen Zeilen","frame_groups":"zwischen Gruppen","frame_none":"keine",frame:"Rahmen",caption:"Beschriftung der Tabelle","missing_scope":"Soll f\u00fcr diese \u00dcberschrift wirklich kein Bereich angegeben werden? Benutzer mit k\u00f6rperlichen Einschr\u00e4nkungen k\u00f6nnten Schwierigkeiten haben, den Inhalt der Tabelle zu verstehen.","cell_limit":"Die maximale Zellenzahl von {$cells} wurde \u00fcberschritten.","row_limit":"Die maximale Zeilenzahl von {$rows} wurde \u00fcberschritten.","col_limit":"Die maximale Spaltenzahl von {$cols} wurde \u00fcberschritten.",colgroup:"Horizontal gruppieren",rowgroup:"Vertikal gruppieren",scope:"Bezug",tfoot:"Tabellenfu\u00df",tbody:"Tabelleninhalt",thead:"Tabellenkopf","row_all":"Alle Zeilen ver\u00e4ndern","row_even":"Gerade Zeilen ver\u00e4ndern","row_odd":"Ungerade Zeilen ver\u00e4ndern","row_row":"Diese Zeile ver\u00e4ndern","cell_all":"Alle Zellen der Tabelle ver\u00e4ndern","cell_row":"Alle Zellen in dieser Zeile ver\u00e4ndern","cell_cell":"Diese Zelle ver\u00e4ndern",th:"\u00dcberschrift",td:"Textzelle",summary:"Zusammenfassung",bgimage:"Hintergrundbild",rtl:"Rechts nach links",ltr:"Links nach rechts",mime:"MIME-Type des Inhalts",langcode:"Sprachcode",langdir:"Schriftrichtung",style:"Format",id:"ID","merge_cells_title":"Zellen vereinen",bgcolor:"Hintergrundfarbe",bordercolor:"Rahmenfarbe","align_bottom":"Unten","align_top":"Oben",valign:"Vertikale Ausrichtung","cell_type":"Zellentyp","cell_title":"Eigenschaften der Zelle","row_title":"Eigenschaften der Zeile","align_middle":"Mittig","align_right":"Rechts","align_left":"Links","align_default":"Standard",align:"Ausrichtung",border:"Rahmen",cellpadding:"Abstand innerhalb der Zellen",cellspacing:"Zellenabstand",rows:"Zeilen",cols:"Spalten",height:"H\u00f6he",width:"Breite",title:"Tabelle einf\u00fcgen/bearbeiten",rowtype:"Gruppierung","advanced_props":"Erweiterte Einstellungen","general_props":"Allgemeine Einstellungen","advanced_tab":"Erweitert","general_tab":"Allgemein","cell_col":"Alle Zellen in dieser Spalte aktualisieren"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/langs/en_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/langs/en_dlg.js
new file mode 100644
index 00000000..463e09ee
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/langs/en_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('en.table_dlg',{"rules_border":"border","rules_box":"box","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"below","rules_above":"above","rules_void":"void",rules:"Rules","frame_all":"all","frame_cols":"cols","frame_rows":"rows","frame_groups":"groups","frame_none":"none",frame:"Frame",caption:"Table Caption","missing_scope":"Are you sure you want to continue without specifying a scope for this table header cell. Without it, it may be difficult for some users with disabilities to understand the content or data displayed of the table.","cell_limit":"You\'ve exceeded the maximum number of cells of {$cells}.","row_limit":"You\'ve exceeded the maximum number of rows of {$rows}.","col_limit":"You\'ve exceeded the maximum number of columns of {$cols}.",colgroup:"Col Group",rowgroup:"Row Group",scope:"Scope",tfoot:"Footer",tbody:"Body",thead:"Header","row_all":"Update All Rows in Table","row_even":"Update Even Rows in Table","row_odd":"Update Odd Rows in Table","row_row":"Update Current Row","cell_all":"Update All Cells in Table","cell_row":"Update All Cells in Row","cell_cell":"Update Current Cell",th:"Header",td:"Data",summary:"Summary",bgimage:"Background Image",rtl:"Right to Left",ltr:"Left to Right",mime:"Target MIME Type",langcode:"Language Code",langdir:"Language Direction",style:"Style",id:"ID","merge_cells_title":"Merge Table Cells",bgcolor:"Background Color",bordercolor:"Border Color","align_bottom":"Bottom","align_top":"Top",valign:"Vertical Alignment","cell_type":"Cell Type","cell_title":"Table Cell Properties","row_title":"Table Row Properties","align_middle":"Center","align_right":"Right","align_left":"Left","align_default":"Default",align:"Alignment",border:"Border",cellpadding:"Cell Padding",cellspacing:"Cell Spacing",rows:"Rows",cols:"Columns",height:"Height",width:"Width",title:"Insert/Edit Table",rowtype:"Row Type","advanced_props":"Advanced Properties","general_props":"General Properties","advanced_tab":"Advanced","general_tab":"General","cell_col":"Update all cells in column"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/langs/hu_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/langs/hu_dlg.js
new file mode 100644
index 00000000..1dd89fdb
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/langs/hu_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('hu.table_dlg',{"rules_border":"keret","rules_box":"doboz","rules_vsides":"f. oldalak","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"v. oldalak","rules_below":"alatta","rules_above":"f\u00f6l\u00f6tte","rules_void":"sehol/\u00fcres",rules:"Vonalak","frame_all":"mind","frame_cols":"oszlopok","frame_rows":"sorok","frame_groups":"csoportok","frame_none":"nincs",frame:"Keret",caption:"C\u00edmsor","missing_scope":"Biztosan folytatni akarja an\u00e9lk\u00fcl, hogy hat\u00f3k\u00f6rt adna ennek a fejl\u00e9ccell\u00e1nak? Korl\u00e1toz\u00e1sokkal \u00e9l\u0151k sz\u00e1m\u00e1ra neh\u00e9z lesz meg\u00e9rteni a t\u00e1bl\u00e1zat tartalm\u00e1t.","cell_limit":"T\u00fall\u00e9pte a maxim\u00e1lis cellasz\u00e1mot, ami {$cells}.","row_limit":"T\u00fall\u00e9pte a maxim\u00e1lis sorsz\u00e1mot, ami {$rows}.","col_limit":"T\u00fall\u00e9pte a maxim\u00e1lis oszlopsz\u00e1mot, ami {$cols}.",colgroup:"Oszlop csoport",rowgroup:"Sor csoport",scope:"Hat\u00f3k\u00f6r",tfoot:"T\u00e1bl\u00e1zat l\u00e1bl\u00e9c",tbody:"T\u00e1bl\u00e1zat tartalom",thead:"T\u00e1bl\u00e1zat fejl\u00e9c","row_all":"Minden sor friss\u00edt\u00e9se","row_even":"P\u00e1ros sorok friss\u00edt\u00e9se","row_odd":"P\u00e1ratlan sorok friss\u00edt\u00e9se","row_row":"Sor friss\u00edt\u00e9se","cell_all":"T\u00e1bl\u00e1zat \u00f6sszes cell\u00e1j\u00e1nak friss\u00edt\u00e9se","cell_row":"Sor \u00f6sszes cell\u00e1j\u00e1nak friss\u00edt\u00e9se","cell_cell":"Cella friss\u00edt\u00e9se",th:"Fejl\u00e9c",td:"Adat",summary:"\u00d6sszegz\u00e9s",bgimage:"H\u00e1tt\u00e9rk\u00e9p",rtl:"Jobbr\u00f3l balra",ltr:"Balr\u00f3l jobbra",mime:"C\u00e9l MIME t\u00edpus",langcode:"Nyelvk\u00f3d",langdir:"\u00cdr\u00e1s ir\u00e1ny",style:"St\u00edlus",id:"ID","merge_cells_title":"Cell\u00e1k Egyes\u00edt\u00e9se",bgcolor:"H\u00e1tt\u00e9rsz\u00edn",bordercolor:"Keretsz\u00edn","align_bottom":"Le","align_top":"Fel",valign:"F\u00fcgg\u0151leges igaz\u00edt\u00e1s","cell_type":"Cellat\u00edpus","cell_title":"Cella tulajdons\u00e1gai","row_title":"Sor tulajdons\u00e1gai","align_middle":"K\u00f6z\u00e9pre","align_right":"Jobbra","align_left":"Balra","align_default":"Alap\u00e9rtelmezett",align:"Igaz\u00edt\u00e1s",border:"Keret",cellpadding:"Cella bels\u0151 marg\u00f3",cellspacing:"Cella t\u00e1vols\u00e1g",rows:"Sorok",cols:"Oszlopok",height:"Magass\u00e1g",width:"Sz\u00e9less\u00e9g",title:"T\u00e1bl\u00e1zat besz\u00far\u00e1sa/szerkeszt\u00e9se",rowtype:"Sor a t\u00e1bl\u00e1ban","advanced_props":"Halad\u00f3 tulajdons\u00e1gok","general_props":"\u00c1ltal\u00e1nos tulajdons\u00e1gok","advanced_tab":"Halad\u00f3","general_tab":"\u00c1ltal\u00e1nos","cell_col":"\u00d6sszes cella friss\u00edt\u00e9se az oszlopban"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/langs/ja_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/langs/ja_dlg.js
new file mode 100644
index 00000000..ad335864
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/langs/ja_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('ja.table_dlg',{"rules_border":"\u67a0\u7dda(\u4e0a\u4e0b\u5de6\u53f3)","rules_box":"\u30dc\u30c3\u30af\u30b9(\u4e0a\u4e0b\u5de6\u53f3)","rules_vsides":"\u5de6\u53f3\u306e\u7e26\u7dda","rules_rhs":"\u53f3\u306e\u7e26\u7dda","rules_lhs":"\u5de6\u306e\u7e26\u7dda","rules_hsides":"\u4e0a\u4e0b\u306e\u6a2a\u7dda","rules_below":"\u4e0b\u306e\u6a2a\u7dda","rules_above":"\u4e0a\u306e\u6a2a\u7dda","rules_void":"\u306a\u3057",rules:"\u8868\u306e\u5916\u67a0","frame_all":"\u3059\u3079\u3066","frame_cols":"\u5217","frame_rows":"\u884c","frame_groups":"\u30b0\u30eb\u30fc\u30d7\u6bce","frame_none":"\u306a\u3057",frame:"\u30bb\u30eb\u306e\u67a0",caption:"\u8868\u306e\u898b\u51fa\u3057","missing_scope":"\u3053\u306e\u8868\u306e\u30d8\u30c3\u30c0\u30fc\u306e\u30bb\u30eb\u306e\u7bc4\u56f2\u3092\u8a2d\u5b9a\u3057\u306a\u3044\u3067\u672c\u5f53\u306b\u7d9a\u3051\u307e\u3059\u304b? \u3053\u306e\u307e\u307e\u3067\u306f\u76ee\u306e\u4e0d\u81ea\u7531\u306a\u65b9\u304c\u8868\u306e\u5185\u5bb9\u3084\u8868\u793a\u3055\u308c\u308b\u30c7\u30fc\u30bf\u3092\u7406\u89e3\u3059\u308b\u306e\u304c\u56f0\u96e3\u306b\u306a\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002","cell_limit":"\u30bb\u30eb\u306e\u6700\u5927\u6570\u306e${cells}\u3092\u8d85\u3048\u307e\u3057\u305f\u3002","row_limit":"\u884c\u306e\u6700\u5927\u6570\u306e${rows}\u3092\u8d85\u3048\u307e\u3057\u305f\u3002","col_limit":"\u5217\u306e\u6700\u5927\u6570\u306e${cols}\u3092\u8d85\u3048\u307e\u3057\u305f\u3002",colgroup:"\u5217\u30b0\u30eb\u30fc\u30d7",rowgroup:"\u884c\u30b0\u30eb\u30fc\u30d7",scope:"\u30b9\u30b3\u30fc\u30d7",tfoot:"\u8868\u306e\u30d5\u30c3\u30bf\u30fc",tbody:"\u8868\u306e\u30dc\u30c7\u30a3",thead:"\u8868\u306e\u30d8\u30c3\u30c0\u30fc","row_all":"\u3059\u3079\u3066\u306e\u884c\u3092\u66f4\u65b0","row_even":"\u5076\u6570\u884c\u3092\u66f4\u65b0","row_odd":"\u5947\u6570\u884c\u3092\u66f4\u65b0","row_row":"\u9078\u629e\u3057\u3066\u3044\u308b\u884c\u3092\u66f4\u65b0","cell_all":"\u3059\u3079\u3066\u306e\u30bb\u30eb\u3092\u66f4\u65b0","cell_row":"\u884c\u5185\u306e\u30bb\u30eb\u3092\u66f4\u65b0","cell_cell":"\u9078\u629e\u3057\u3066\u3044\u308b\u30bb\u30eb\u3092\u66f4\u65b0",th:"\u30d8\u30c3\u30c0\u30fc",td:"\u30c7\u30fc\u30bf",summary:"\u30b5\u30de\u30ea\u30fc",bgimage:"\u80cc\u666f\u306e\u753b\u50cf",rtl:"\u53f3\u304b\u3089\u5de6",ltr:"\u5de6\u304b\u3089\u53f3",mime:"\u30bf\u30fc\u30b2\u30c3\u30c8\u306eMIME\u30bf\u30a4\u30d7",langcode:"\u8a00\u8a9e\u30b3\u30fc\u30c9",langdir:"\u6587\u7ae0\u306e\u65b9\u5411",style:"\u30b9\u30bf\u30a4\u30eb",id:"ID","merge_cells_title":"\u30bb\u30eb\u3092\u7d50\u5408",bgcolor:"\u80cc\u666f\u306e\u8272",bordercolor:"\u67a0\u7dda\u306e\u8272","align_bottom":"\u4e0b\u63c3\u3048","align_top":"\u4e0a\u63c3\u3048",valign:"\u5782\u76f4\u65b9\u5411\u306e\u914d\u7f6e","cell_type":"\u30bb\u30eb\u306e\u7a2e\u985e","cell_title":"\u30bb\u30eb\u306e\u5c5e\u6027","row_title":"\u884c\u306e\u5c5e\u6027","align_middle":"\u4e2d\u592e\u63c3\u3048","align_right":"\u53f3\u63c3\u3048","align_left":"\u5de6\u63c3\u3048","align_default":"\u521d\u671f\u72b6\u614b",align:"\u914d\u7f6e",border:"\u67a0\u7dda",cellpadding:"\u30bb\u30eb\u306e\u30d1\u30c7\u30a3\u30f3\u30b0(cellpadding)",cellspacing:"\u30bb\u30eb\u306e\u9593\u9694(cellspacing)",rows:"\u884c",cols:"\u5217",height:"\u9ad8\u3055",width:"\u5e45",title:"\u8868\u306e\u633f\u5165\u3084\u7de8\u96c6",rowtype:"\u884c","advanced_props":"\u9ad8\u5ea6\u306a\u5c5e\u6027","general_props":"\u4e00\u822c\u7684\u306a\u5c5e\u6027","advanced_tab":"\u9ad8\u5ea6","general_tab":"\u4e00\u822c","cell_col":"\u3059\u3079\u3066\u306e\u30bb\u30eb\u3092\u66f4\u65b0"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/merge_cells.htm b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/merge_cells.htm
new file mode 100755
index 00000000..d231090e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/merge_cells.htm
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>{#table_dlg.merge_cells_title}</title>
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script type="text/javascript" src="../../utils/mctabs.js"></script>
+ <script type="text/javascript" src="../../utils/validate.js"></script>
+ <script type="text/javascript" src="js/merge_cells.js"></script>
+</head>
+<body style="margin: 8px" role="application">
+<form onsubmit="MergeCellsDialog.merge();return false;" action="#">
+ <fieldset>
+ <legend>{#table_dlg.merge_cells_title}</legend>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="3" width="100%">
+ <tr>
+ <td><label for="numcols">{#table_dlg.cols}</label>:</td>
+ <td align="right"><input type="text" id="numcols" name="numcols" value="" class="number min1 mceFocus" style="width: 30px" aria-required="true" /></td>
+ </tr>
+ <tr>
+ <td><label for="numrows">{#table_dlg.rows}</label>:</td>
+ <td align="right"><input type="text" id="numrows" name="numrows" value="" class="number min1" style="width: 30px" aria-required="true" /></td>
+ </tr>
+ </table>
+ </fieldset>
+
+ <div class="mceActionPanel">
+ <input type="submit" id="insert" name="insert" value="{#update}" />
+ <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
+ </div>
+</form>
+</body>
+</html>
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/row.htm b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/row.htm
new file mode 100755
index 00000000..1885401f
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/row.htm
@@ -0,0 +1,158 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>{#table_dlg.row_title}</title>
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script type="text/javascript" src="../../utils/mctabs.js"></script>
+ <script type="text/javascript" src="../../utils/form_utils.js"></script>
+ <script type="text/javascript" src="../../utils/validate.js"></script>
+ <script type="text/javascript" src="../../utils/editable_selects.js"></script>
+ <script type="text/javascript" src="js/row.js"></script>
+ <link href="css/row.css" rel="stylesheet" type="text/css" />
+</head>
+<body id="tablerow" style="display: none" role="application">
+ <form onsubmit="updateAction();return false;" action="#">
+ <div class="tabs">
+ <ul>
+ <li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#table_dlg.general_tab}</a></span></li>
+ <li id="advanced_tab" aria-controls="advanced_panel"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#table_dlg.advanced_tab}</a></span></li>
+ </ul>
+ </div>
+
+ <div class="panel_wrapper">
+ <div id="general_panel" class="panel current">
+ <fieldset>
+ <legend>{#table_dlg.general_props}</legend>
+
+ <table role="presentation" border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td><label for="rowtype">{#table_dlg.rowtype}</label></td>
+ <td class="col2">
+ <select id="rowtype" name="rowtype" class="mceFocus">
+ <option value="thead">{#table_dlg.thead}</option>
+ <option value="tbody">{#table_dlg.tbody}</option>
+ <option value="tfoot">{#table_dlg.tfoot}</option>
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <td><label for="align">{#table_dlg.align}</label></td>
+ <td class="col2">
+ <select id="align" name="align">
+ <option value="">{#not_set}</option>
+ <option value="center">{#table_dlg.align_middle}</option>
+ <option value="left">{#table_dlg.align_left}</option>
+ <option value="right">{#table_dlg.align_right}</option>
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <td><label for="valign">{#table_dlg.valign}</label></td>
+ <td class="col2">
+ <select id="valign" name="valign">
+ <option value="">{#not_set}</option>
+ <option value="top">{#table_dlg.align_top}</option>
+ <option value="middle">{#table_dlg.align_middle}</option>
+ <option value="bottom">{#table_dlg.align_bottom}</option>
+ </select>
+ </td>
+ </tr>
+
+ <tr id="styleSelectRow">
+ <td><label for="class">{#class_name}</label></td>
+ <td class="col2">
+ <select id="class" name="class" class="mceEditableSelect">
+ <option value="" selected="selected">{#not_set}</option>
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <td><label for="height">{#table_dlg.height}</label></td>
+ <td class="col2"><input name="height" type="text" id="height" value="" size="7" maxlength="7" onchange="changedSize();" class="size" /></td>
+ </tr>
+ </table>
+ </fieldset>
+ </div>
+
+ <div id="advanced_panel" class="panel">
+ <fieldset>
+ <legend>{#table_dlg.advanced_props}</legend>
+
+ <table role="presentation" border="0" cellpadding="0" cellspacing="4">
+ <tr>
+ <td class="column1"><label for="id">{#table_dlg.id}</label></td>
+ <td><input id="id" name="id" type="text" value="" style="width: 200px" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="style">{#table_dlg.style}</label></td>
+ <td><input type="text" id="style" name="style" value="" style="width: 200px;" onchange="changedStyle();" /></td>
+ </tr>
+
+ <tr>
+ <td class="column1"><label for="dir">{#table_dlg.langdir}</label></td>
+ <td>
+ <select id="dir" name="dir" style="width: 200px">
+ <option value="">{#not_set}</option>
+ <option value="ltr">{#table_dlg.ltr}</option>
+ <option value="rtl">{#table_dlg.rtl}</option>
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="column1"><label for="lang">{#table_dlg.langcode}</label></td>
+ <td>
+ <input id="lang" name="lang" type="text" value="" style="width: 200px" />
+ </td>
+ </tr>
+
+ <tr>
+ <td class="column1"><label for="backgroundimage">{#table_dlg.bgimage}</label></td>
+ <td>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input id="backgroundimage" name="backgroundimage" type="text" value="" style="width: 200px" onchange="changedBackgroundImage();" /></td>
+ <td id="backgroundimagebrowsercontainer">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="column1"><label for="bgcolor" id="bgcolor_label">{#table_dlg.bgcolor}</label></td>
+ <td>
+ <span role="group" aria-labelledby="bgcolor_label">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" /></td>
+ <td id="bgcolor_pickcontainer">&nbsp;</td>
+ </tr>
+ </table>
+ </span>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+ </div>
+ </div>
+
+ <div class="mceActionPanel">
+ <div>
+ <select id="action" name="action">
+ <option value="row">{#table_dlg.row_row}</option>
+ <option value="odd">{#table_dlg.row_odd}</option>
+ <option value="even">{#table_dlg.row_even}</option>
+ <option value="all">{#table_dlg.row_all}</option>
+ </select>
+ </div>
+
+ <input type="submit" id="insert" name="insert" value="{#update}" />
+ <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
+ </div>
+ </form>
+</body>
+</html>
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/table.htm b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/table.htm
new file mode 100755
index 00000000..b92fa741
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/table/table.htm
@@ -0,0 +1,188 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>{#table_dlg.title}</title>
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script type="text/javascript" src="../../utils/mctabs.js"></script>
+ <script type="text/javascript" src="../../utils/form_utils.js"></script>
+ <script type="text/javascript" src="../../utils/validate.js"></script>
+ <script type="text/javascript" src="../../utils/editable_selects.js"></script>
+ <script type="text/javascript" src="js/table.js"></script>
+ <link href="css/table.css" rel="stylesheet" type="text/css" />
+</head>
+<body id="table" style="display: none" role="application" aria-labelledby="app_title">
+ <span style="display:none;" id="app_title">{#table_dlg.title}</span>
+ <form onsubmit="insertTable();return false;" action="#">
+ <div class="tabs">
+ <ul>
+ <li id="general_tab" aria-controls="general_panel" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#table_dlg.general_tab}</a></span></li>
+ <li id="advanced_tab" aria-controls="advanced_panel"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#table_dlg.advanced_tab}</a></span></li>
+ </ul>
+ </div>
+
+ <div class="panel_wrapper">
+ <div id="general_panel" class="panel current">
+ <fieldset>
+ <legend>{#table_dlg.general_props}</legend>
+ <table role="presentation" border="0" cellpadding="4" cellspacing="0" width="100%">
+ <tr>
+ <td><label id="colslabel" for="cols">{#table_dlg.cols}</label></td>
+ <td><input id="cols" name="cols" type="text" value="" size="3" maxlength="3" class="required number min1 mceFocus" aria-required="true" /></td>
+ <td><label id="rowslabel" for="rows">{#table_dlg.rows}</label></td>
+ <td><input id="rows" name="rows" type="text" value="" size="3" maxlength="3" class="required number min1" aria-required="true" /></td>
+ </tr>
+ <tr>
+ <td><label id="cellpaddinglabel" for="cellpadding">{#table_dlg.cellpadding}</label></td>
+ <td><input id="cellpadding" name="cellpadding" type="text" value="" size="3" maxlength="3" class="number" /></td>
+ <td><label id="cellspacinglabel" for="cellspacing">{#table_dlg.cellspacing}</label></td>
+ <td><input id="cellspacing" name="cellspacing" type="text" value="" size="3" maxlength="3" class="number" /></td>
+ </tr>
+ <tr>
+ <td><label id="alignlabel" for="align">{#table_dlg.align}</label></td>
+ <td><select id="align" name="align">
+ <option value="">{#not_set}</option>
+ <option value="center">{#table_dlg.align_middle}</option>
+ <option value="left">{#table_dlg.align_left}</option>
+ <option value="right">{#table_dlg.align_right}</option>
+ </select></td>
+ <td><label id="borderlabel" for="border">{#table_dlg.border}</label></td>
+ <td><input id="border" name="border" type="text" value="" size="3" maxlength="5" onchange="changedBorder();" class="size" /></td>
+ </tr>
+ <tr id="width_row">
+ <td><label id="widthlabel" for="width">{#table_dlg.width}</label></td>
+ <td><input name="width" type="text" id="width" value="" size="7" maxlength="7" onchange="changedSize();" class="size" /></td>
+ <td><label id="heightlabel" for="height">{#table_dlg.height}</label></td>
+ <td><input name="height" type="text" id="height" value="" size="7" maxlength="7" onchange="changedSize();" class="size" /></td>
+ </tr>
+ <tr id="styleSelectRow" >
+ <td><label id="classlabel" for="class">{#class_name}</label></td>
+ <td colspan="3" >
+ <select id="class" name="class" class="mceEditableSelect">
+ <option value="" selected="selected">{#not_set}</option>
+ </select></td>
+ </tr>
+ <tr>
+ <td class="column1" ><label for="caption">{#table_dlg.caption}</label></td>
+ <td><input id="caption" name="caption" type="checkbox" class="checkbox" value="true" /></td>
+ </tr>
+ </table>
+ </fieldset>
+ </div>
+
+ <div id="advanced_panel" class="panel">
+ <fieldset>
+ <legend>{#table_dlg.advanced_props}</legend>
+
+ <table role="presentation" border="0" cellpadding="0" cellspacing="4">
+ <tr>
+ <td class="column1"><label for="id">{#table_dlg.id}</label></td>
+ <td><input id="id" name="id" type="text" value="" class="advfield" /></td>
+ </tr>
+
+ <tr>
+ <td class="column1"><label for="summary">{#table_dlg.summary}</label></td>
+ <td><input id="summary" name="summary" type="text" value="" class="advfield" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="style">{#table_dlg.style}</label></td>
+ <td><input type="text" id="style" name="style" value="" class="advfield" onchange="changedStyle();" /></td>
+ </tr>
+
+ <tr>
+ <td class="column1"><label id="langlabel" for="lang">{#table_dlg.langcode}</label></td>
+ <td>
+ <input id="lang" name="lang" type="text" value="" class="advfield" />
+ </td>
+ </tr>
+
+ <tr>
+ <td class="column1"><label for="backgroundimage">{#table_dlg.bgimage}</label></td>
+ <td>
+ <table role="presentation" aria-labelledby="backgroundimage_label" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input id="backgroundimage" name="backgroundimage" type="text" value="" class="advfield" onchange="changedBackgroundImage();" /></td>
+ <td id="backgroundimagebrowsercontainer">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="column1"><label for="tframe">{#table_dlg.frame}</label></td>
+ <td>
+ <select id="tframe" name="tframe" class="advfield">
+ <option value="">{#not_set}</option>
+ <option value="void">{#table_dlg.rules_void}</option>
+ <option value="above">{#table_dlg.rules_above}</option>
+ <option value="below">{#table_dlg.rules_below}</option>
+ <option value="hsides">{#table_dlg.rules_hsides}</option>
+ <option value="lhs">{#table_dlg.rules_lhs}</option>
+ <option value="rhs">{#table_dlg.rules_rhs}</option>
+ <option value="vsides">{#table_dlg.rules_vsides}</option>
+ <option value="box">{#table_dlg.rules_box}</option>
+ <option value="border">{#table_dlg.rules_border}</option>
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="column1"><label for="rules">{#table_dlg.rules}</label></td>
+ <td>
+ <select id="rules" name="rules" class="advfield">
+ <option value="">{#not_set}</option>
+ <option value="none">{#table_dlg.frame_none}</option>
+ <option value="groups">{#table_dlg.frame_groups}</option>
+ <option value="rows">{#table_dlg.frame_rows}</option>
+ <option value="cols">{#table_dlg.frame_cols}</option>
+ <option value="all">{#table_dlg.frame_all}</option>
+ </select>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="column1"><label for="dir">{#table_dlg.langdir}</label></td>
+ <td>
+ <select id="dir" name="dir" class="advfield">
+ <option value="">{#not_set}</option>
+ <option value="ltr">{#table_dlg.ltr}</option>
+ <option value="rtl">{#table_dlg.rtl}</option>
+ </select>
+ </td>
+ </tr>
+
+ <tr role="group" aria-labelledby="bordercolor_label">
+ <td class="column1"><label id="bordercolor_label" for="bordercolor">{#table_dlg.bordercolor}</label></td>
+ <td>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input id="bordercolor" name="bordercolor" type="text" value="" size="9" onchange="updateColor('bordercolor_pick','bordercolor');changedColor();" /></td>
+ <td id="bordercolor_pickcontainer">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr role="group" aria-labelledby="bgcolor_label">
+ <td class="column1"><label id="bgcolor_label" for="bgcolor">{#table_dlg.bgcolor}</label></td>
+ <td>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" /></td>
+ <td id="bgcolor_pickcontainer">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+ </div>
+ </div>
+
+ <div class="mceActionPanel">
+ <input type="submit" id="insert" name="insert" value="{#insert}" />
+ <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
+ </div>
+ </form>
+</body>
+</html>
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/template/blank.htm b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/template/blank.htm
new file mode 100755
index 00000000..ecde53fa
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/template/blank.htm
@@ -0,0 +1,12 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>blank_page</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <script type="text/javascript">
+ parent.TemplateDialog.loadCSSFiles(document);
+ </script>
+</head>
+<body id="mceTemplatePreview" class="mceContentBody">
+
+</body>
+</html>
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/template/css/template.css b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/template/css/template.css
new file mode 100755
index 00000000..2d23a493
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/template/css/template.css
@@ -0,0 +1,23 @@
+#frmbody {
+ padding: 10px;
+ background-color: #FFF;
+ border: 1px solid #CCC;
+}
+
+.frmRow {
+ margin-bottom: 10px;
+}
+
+#templatesrc {
+ border: none;
+ width: 320px;
+ height: 240px;
+}
+
+.title {
+ padding-bottom: 5px;
+}
+
+.mceActionPanel {
+ padding-top: 5px;
+}
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/template/editor_plugin.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/template/editor_plugin.js
new file mode 100755
index 00000000..ebe3c27d
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/template/editor_plugin.js
@@ -0,0 +1 @@
+(function(){var a=tinymce.each;tinymce.create("tinymce.plugins.TemplatePlugin",{init:function(b,c){var d=this;d.editor=b;b.addCommand("mceTemplate",function(e){b.windowManager.open({file:c+"/template.htm",width:b.getParam("template_popup_width",750),height:b.getParam("template_popup_height",600),inline:1},{plugin_url:c})});b.addCommand("mceInsertTemplate",d._insertTemplate,d);b.addButton("template",{title:"template.desc",cmd:"mceTemplate"});b.onPreProcess.add(function(e,g){var f=e.dom;a(f.select("div",g.node),function(h){if(f.hasClass(h,"mceTmpl")){a(f.select("*",h),function(i){if(f.hasClass(i,e.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))){i.innerHTML=d._getDateTime(new Date(),e.getParam("template_mdate_format",e.getLang("template.mdate_format")))}});d._replaceVals(h)}})})},getInfo:function(){return{longname:"Template plugin",author:"Moxiecode Systems AB",authorurl:"http://www.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/template",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_insertTemplate:function(i,j){var k=this,g=k.editor,f,c,d=g.dom,b=g.selection.getContent();f=j.content;a(k.editor.getParam("template_replace_values"),function(l,h){if(typeof(l)!="function"){f=f.replace(new RegExp("\\{\\$"+h+"\\}","g"),l)}});c=d.create("div",null,f);n=d.select(".mceTmpl",c);if(n&&n.length>0){c=d.create("div",null);c.appendChild(n[0].cloneNode(true))}function e(l,h){return new RegExp("\\b"+h+"\\b","g").test(l.className)}a(d.select("*",c),function(h){if(e(h,g.getParam("template_cdate_classes","cdate").replace(/\s+/g,"|"))){h.innerHTML=k._getDateTime(new Date(),g.getParam("template_cdate_format",g.getLang("template.cdate_format")))}if(e(h,g.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))){h.innerHTML=k._getDateTime(new Date(),g.getParam("template_mdate_format",g.getLang("template.mdate_format")))}if(e(h,g.getParam("template_selected_content_classes","selcontent").replace(/\s+/g,"|"))){h.innerHTML=b}});k._replaceVals(c);g.execCommand("mceInsertContent",false,c.innerHTML);g.addVisual()},_replaceVals:function(c){var d=this.editor.dom,b=this.editor.getParam("template_replace_values");a(d.select("*",c),function(f){a(b,function(g,e){if(d.hasClass(f,e)){if(typeof(b[e])=="function"){b[e](f)}}})})},_getDateTime:function(e,b){if(!b){return""}function c(g,d){var f;g=""+g;if(g.length<d){for(f=0;f<(d-g.length);f++){g="0"+g}}return g}b=b.replace("%D","%m/%d/%y");b=b.replace("%r","%I:%M:%S %p");b=b.replace("%Y",""+e.getFullYear());b=b.replace("%y",""+e.getYear());b=b.replace("%m",c(e.getMonth()+1,2));b=b.replace("%d",c(e.getDate(),2));b=b.replace("%H",""+c(e.getHours(),2));b=b.replace("%M",""+c(e.getMinutes(),2));b=b.replace("%S",""+c(e.getSeconds(),2));b=b.replace("%I",""+((e.getHours()+11)%12+1));b=b.replace("%p",""+(e.getHours()<12?"AM":"PM"));b=b.replace("%B",""+this.editor.getLang("template_months_long").split(",")[e.getMonth()]);b=b.replace("%b",""+this.editor.getLang("template_months_short").split(",")[e.getMonth()]);b=b.replace("%A",""+this.editor.getLang("template_day_long").split(",")[e.getDay()]);b=b.replace("%a",""+this.editor.getLang("template_day_short").split(",")[e.getDay()]);b=b.replace("%%","%");return b}});tinymce.PluginManager.add("template",tinymce.plugins.TemplatePlugin)})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/template/editor_plugin_src.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/template/editor_plugin_src.js
new file mode 100755
index 00000000..9cac2699
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/template/editor_plugin_src.js
@@ -0,0 +1,159 @@
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+ var each = tinymce.each;
+
+ tinymce.create('tinymce.plugins.TemplatePlugin', {
+ init : function(ed, url) {
+ var t = this;
+
+ t.editor = ed;
+
+ // Register commands
+ ed.addCommand('mceTemplate', function(ui) {
+ ed.windowManager.open({
+ file : url + '/template.htm',
+ width : ed.getParam('template_popup_width', 750),
+ height : ed.getParam('template_popup_height', 600),
+ inline : 1
+ }, {
+ plugin_url : url
+ });
+ });
+
+ ed.addCommand('mceInsertTemplate', t._insertTemplate, t);
+
+ // Register buttons
+ ed.addButton('template', {title : 'template.desc', cmd : 'mceTemplate'});
+
+ ed.onPreProcess.add(function(ed, o) {
+ var dom = ed.dom;
+
+ each(dom.select('div', o.node), function(e) {
+ if (dom.hasClass(e, 'mceTmpl')) {
+ each(dom.select('*', e), function(e) {
+ if (dom.hasClass(e, ed.getParam('template_mdate_classes', 'mdate').replace(/\s+/g, '|')))
+ e.innerHTML = t._getDateTime(new Date(), ed.getParam("template_mdate_format", ed.getLang("template.mdate_format")));
+ });
+
+ t._replaceVals(e);
+ }
+ });
+ });
+ },
+
+ getInfo : function() {
+ return {
+ longname : 'Template plugin',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://www.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/template',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ };
+ },
+
+ _insertTemplate : function(ui, v) {
+ var t = this, ed = t.editor, h, el, dom = ed.dom, sel = ed.selection.getContent();
+
+ h = v.content;
+
+ each(t.editor.getParam('template_replace_values'), function(v, k) {
+ if (typeof(v) != 'function')
+ h = h.replace(new RegExp('\\{\\$' + k + '\\}', 'g'), v);
+ });
+
+ el = dom.create('div', null, h);
+
+ // Find template element within div
+ n = dom.select('.mceTmpl', el);
+ if (n && n.length > 0) {
+ el = dom.create('div', null);
+ el.appendChild(n[0].cloneNode(true));
+ }
+
+ function hasClass(n, c) {
+ return new RegExp('\\b' + c + '\\b', 'g').test(n.className);
+ };
+
+ each(dom.select('*', el), function(n) {
+ // Replace cdate
+ if (hasClass(n, ed.getParam('template_cdate_classes', 'cdate').replace(/\s+/g, '|')))
+ n.innerHTML = t._getDateTime(new Date(), ed.getParam("template_cdate_format", ed.getLang("template.cdate_format")));
+
+ // Replace mdate
+ if (hasClass(n, ed.getParam('template_mdate_classes', 'mdate').replace(/\s+/g, '|')))
+ n.innerHTML = t._getDateTime(new Date(), ed.getParam("template_mdate_format", ed.getLang("template.mdate_format")));
+
+ // Replace selection
+ if (hasClass(n, ed.getParam('template_selected_content_classes', 'selcontent').replace(/\s+/g, '|')))
+ n.innerHTML = sel;
+ });
+
+ t._replaceVals(el);
+
+ ed.execCommand('mceInsertContent', false, el.innerHTML);
+ ed.addVisual();
+ },
+
+ _replaceVals : function(e) {
+ var dom = this.editor.dom, vl = this.editor.getParam('template_replace_values');
+
+ each(dom.select('*', e), function(e) {
+ each(vl, function(v, k) {
+ if (dom.hasClass(e, k)) {
+ if (typeof(vl[k]) == 'function')
+ vl[k](e);
+ }
+ });
+ });
+ },
+
+ _getDateTime : function(d, fmt) {
+ if (!fmt)
+ return "";
+
+ function addZeros(value, len) {
+ var i;
+
+ value = "" + value;
+
+ if (value.length < len) {
+ for (i=0; i<(len-value.length); i++)
+ value = "0" + value;
+ }
+
+ return value;
+ }
+
+ fmt = fmt.replace("%D", "%m/%d/%y");
+ fmt = fmt.replace("%r", "%I:%M:%S %p");
+ fmt = fmt.replace("%Y", "" + d.getFullYear());
+ fmt = fmt.replace("%y", "" + d.getYear());
+ fmt = fmt.replace("%m", addZeros(d.getMonth()+1, 2));
+ fmt = fmt.replace("%d", addZeros(d.getDate(), 2));
+ fmt = fmt.replace("%H", "" + addZeros(d.getHours(), 2));
+ fmt = fmt.replace("%M", "" + addZeros(d.getMinutes(), 2));
+ fmt = fmt.replace("%S", "" + addZeros(d.getSeconds(), 2));
+ fmt = fmt.replace("%I", "" + ((d.getHours() + 11) % 12 + 1));
+ fmt = fmt.replace("%p", "" + (d.getHours() < 12 ? "AM" : "PM"));
+ fmt = fmt.replace("%B", "" + this.editor.getLang("template_months_long").split(',')[d.getMonth()]);
+ fmt = fmt.replace("%b", "" + this.editor.getLang("template_months_short").split(',')[d.getMonth()]);
+ fmt = fmt.replace("%A", "" + this.editor.getLang("template_day_long").split(',')[d.getDay()]);
+ fmt = fmt.replace("%a", "" + this.editor.getLang("template_day_short").split(',')[d.getDay()]);
+ fmt = fmt.replace("%%", "%");
+
+ return fmt;
+ }
+ });
+
+ // Register plugin
+ tinymce.PluginManager.add('template', tinymce.plugins.TemplatePlugin);
+})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/template/js/template.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/template/js/template.js
new file mode 100644
index 00000000..bc3045d2
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/template/js/template.js
@@ -0,0 +1,106 @@
+tinyMCEPopup.requireLangPack();
+
+var TemplateDialog = {
+ preInit : function() {
+ var url = tinyMCEPopup.getParam("template_external_list_url");
+
+ if (url != null)
+ document.write('<sc'+'ript language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></sc'+'ript>');
+ },
+
+ init : function() {
+ var ed = tinyMCEPopup.editor, tsrc, sel, x, u;
+
+ tsrc = ed.getParam("template_templates", false);
+ sel = document.getElementById('tpath');
+
+ // Setup external template list
+ if (!tsrc && typeof(tinyMCETemplateList) != 'undefined') {
+ for (x=0, tsrc = []; x<tinyMCETemplateList.length; x++)
+ tsrc.push({title : tinyMCETemplateList[x][0], src : tinyMCETemplateList[x][1], description : tinyMCETemplateList[x][2]});
+ }
+
+ for (x=0; x<tsrc.length; x++)
+ sel.options[sel.options.length] = new Option(tsrc[x].title, tinyMCEPopup.editor.documentBaseURI.toAbsolute(tsrc[x].src));
+
+ this.resize();
+ this.tsrc = tsrc;
+ },
+
+ resize : function() {
+ var w, h, e;
+
+ if (!self.innerWidth) {
+ w = document.body.clientWidth - 50;
+ h = document.body.clientHeight - 160;
+ } else {
+ w = self.innerWidth - 50;
+ h = self.innerHeight - 170;
+ }
+
+ e = document.getElementById('templatesrc');
+
+ if (e) {
+ e.style.height = Math.abs(h) + 'px';
+ e.style.width = Math.abs(w - 5) + 'px';
+ }
+ },
+
+ loadCSSFiles : function(d) {
+ var ed = tinyMCEPopup.editor;
+
+ tinymce.each(ed.getParam("content_css", '').split(','), function(u) {
+ d.write('<link href="' + ed.documentBaseURI.toAbsolute(u) + '" rel="stylesheet" type="text/css" />');
+ });
+ },
+
+ selectTemplate : function(u, ti) {
+ var d = window.frames['templatesrc'].document, x, tsrc = this.tsrc;
+
+ if (!u)
+ return;
+
+ d.body.innerHTML = this.templateHTML = this.getFileContents(u);
+
+ for (x=0; x<tsrc.length; x++) {
+ if (tsrc[x].title == ti)
+ document.getElementById('tmpldesc').innerHTML = tsrc[x].description || '';
+ }
+ },
+
+ insert : function() {
+ tinyMCEPopup.execCommand('mceInsertTemplate', false, {
+ content : this.templateHTML,
+ selection : tinyMCEPopup.editor.selection.getContent()
+ });
+
+ tinyMCEPopup.close();
+ },
+
+ getFileContents : function(u) {
+ var x, d, t = 'text/plain';
+
+ function g(s) {
+ x = 0;
+
+ try {
+ x = new ActiveXObject(s);
+ } catch (s) {
+ }
+
+ return x;
+ };
+
+ x = window.ActiveXObject ? g('Msxml2.XMLHTTP') || g('Microsoft.XMLHTTP') : new XMLHttpRequest();
+
+ // Synchronous AJAX load file
+ x.overrideMimeType && x.overrideMimeType(t);
+ x.open("GET", u, false);
+ x.send(null);
+
+ return x.responseText;
+ }
+};
+
+TemplateDialog.preInit();
+tinyMCEPopup.onInit.add(TemplateDialog.init, TemplateDialog);
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/template/langs/de_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/template/langs/de_dlg.js
new file mode 100644
index 00000000..04c9fa1a
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/template/langs/de_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('de.template_dlg',{title:"Vorlagen",label:"Vorlage","desc_label":"Beschreibung",desc:"Inhalt aus Vorlage einf\u00fcgen",select:"Vorlage ausw\u00e4hlen",preview:"Vorschau",warning:"Warnung: Eine Vorlage mit einer anderen zu aktualisieren kann zu einem Datenverlust f\u00fchren!","mdate_format":"%Y-%m-%d %H:%M:%S","cdate_format":"%Y-%m-%d %H:%M:%S","months_long":"Januar,Februar,M\u00e4rz,April,Mai,Juni,Juli,August,September,Oktober,November,Dezember","months_short":"Jan,Feb,M\u00e4r,Apr,Mai,Juni,Juli,Aug,Sept,Okt,Nov,Dez","day_long":"Sonntag,Montag,Dienstag,Mittwoch,Donnerstag,Freitag,Samstag,Sonntag","day_short":"So,Mo,Di,Mi,Do,Fr,Sa,So"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/template/langs/en_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/template/langs/en_dlg.js
new file mode 100644
index 00000000..83e599d6
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/template/langs/en_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('en.template_dlg',{title:"Templates",label:"Template","desc_label":"Description",desc:"Insert Predefined Template Content",select:"Select a Template",preview:"Preview",warning:"Warning: Updating a template with a different one may cause data loss.","mdate_format":"%Y-%m-%d %H:%M:%S","cdate_format":"%Y-%m-%d %H:%M:%S","months_long":"January,February,March,April,May,June,July,August,September,October,November,December","months_short":"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec","day_long":"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday","day_short":"Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/template/langs/hu_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/template/langs/hu_dlg.js
new file mode 100644
index 00000000..3f272a9e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/template/langs/hu_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('hu.template_dlg',{title:"Sablon beilleszt\u00e9se",label:"Sablon","desc_label":"Le\u00edr\u00e1s",desc:"Sablon beilleszt\u00e9se",select:"Sablon v\u00e1laszt\u00e1sa",preview:"El\u0151n\u00e9zet",warning:"Figyelem: Egy m\u00e1r alkalmazott sablon friss\u00edt\u00e9se m\u00e1sikkal adatveszt\u00e9ssel j\u00e1rhat.","mdate_format":"%Y.%m.%d. %H:%M:%S","cdate_format":"%Y.%m.%d. %H:%M:%S","months_long":"janu\u00e1r,febru\u00e1r,m\u00e1rcius,\u00e1prilis,m\u00e1jus,j\u00fanius,j\u00falius,augusztus,szeptember,okt\u00f3ber,november,december","months_short":"Jan,Feb,M\u00e1r,\u00c1pr,M\u00e1j,J\u00fan,J\u00fal,Aug,Szept,Okt,Nov,Dec","day_long":"vas\u00e1rnap,h\u00e9tf\u0151,kedd,szerda,cs\u00fct\u00f6rt\u00f6k,p\u00e9ntek,szombat,vas\u00e1rnap","day_short":"V,H,K,Sze,Cs,P,Szo,V"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/template/langs/ja_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/template/langs/ja_dlg.js
new file mode 100644
index 00000000..4aae9337
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/template/langs/ja_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('ja.template_dlg',{title:"\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8",label:"\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8","desc_label":"\u8aac\u660e",desc:"\u5b9a\u7fa9\u6e08\u307f\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u633f\u5165",select:"\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u9078\u629e",preview:"\u30d7\u30ec\u30d3\u30e5\u30fc",warning:"\u8b66\u544a\uff1a\u7570\u306a\u308b\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306b\u66f4\u65b0\u3059\u308b\u3068\u30c7\u30fc\u30bf\u3092\u5931\u3046\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002","mdate_format":"%Y-%m-%d %H:%M:%S","cdate_format":"%Y-%m-%d %H:%M:%S","months_long":"1\u6708,2\u6708,3\u6708,4\u6708,5\u6708,6\u6708,7\u6708,8\u6708,9\u6708,10\u6708,11\u6708,12\u6708","months_short":"1,2,3,4,5,6,7,8,9,10,11,12","day_long":"\u65e5\u66dc\u65e5,\u6708\u66dc\u65e5,\u706b\u66dc\u65e5,\u6c34\u66dc\u65e5,\u6728\u66dc\u65e5,\u91d1\u66dc\u65e5,\u571f\u66dc\u65e5,\u65e5\u66dc\u65e5","day_short":"(\u65e5),(\u6708),(\u706b),(\u6c34),(\u6728),(\u91d1),(\u571f),(\u65e5)"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/template/template.htm b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/template/template.htm
new file mode 100755
index 00000000..b2182e63
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/template/template.htm
@@ -0,0 +1,31 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>{#template_dlg.title}</title>
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script type="text/javascript" src="js/template.js"></script>
+ <link href="css/template.css" rel="stylesheet" type="text/css" />
+</head>
+<body onresize="TemplateDialog.resize();">
+ <form onsubmit="TemplateDialog.insert();return false;">
+ <div id="frmbody">
+ <div class="title">{#template_dlg.desc}</div>
+ <div class="frmRow"><label for="tpath" title="{#template_dlg.select}">{#template_dlg.label}:</label>
+ <select id="tpath" name="tpath" onchange="TemplateDialog.selectTemplate(this.options[this.selectedIndex].value, this.options[this.selectedIndex].text);" class="mceFocus">
+ <option value="">{#template_dlg.select}...</option>
+ </select>
+ <span id="warning"></span></div>
+ <div class="frmRow"><label for="tdesc">{#template_dlg.desc_label}:</label>
+ <span id="tmpldesc"></span></div>
+ <fieldset>
+ <legend>{#template_dlg.preview}</legend>
+ <iframe id="templatesrc" name="templatesrc" src="blank.htm" width="690" height="400" frameborder="0"></iframe>
+ </fieldset>
+ </div>
+
+ <div class="mceActionPanel">
+ <input type="submit" id="insert" name="insert" value="{#insert}" />
+ <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
+ </div>
+ </form>
+</body>
+</html>
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/visualblocks/css/visualblocks.css b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/visualblocks/css/visualblocks.css
new file mode 100644
index 00000000..76bc92b5
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/visualblocks/css/visualblocks.css
@@ -0,0 +1,21 @@
+p, h1, h2, h3, h4, h5, h6, hgroup, aside, div, section, article, blockquote, address, pre, figure {display: block; padding-top: 10px; border: 1px dashed #BBB; background: transparent no-repeat}
+p, h1, h2, h3, h4, h5, h6, hgroup, aside, div, section, article, address, pre, figure {margin-left: 3px}
+section, article, address, hgroup, aside, figure {margin: 0 0 1em 3px}
+
+p {background-image: url(data:image/gif;base64,R0lGODlhCQAJAJEAAAAAAP///7u7u////yH5BAEAAAMALAAAAAAJAAkAAAIQnG+CqCN/mlyvsRUpThG6AgA7)}
+h1 {background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGu1JuxHoAfRNRW3TWXyF2YiRUAOw==)}
+h2 {background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8Hybbx4oOuqgTynJd6bGlWg3DkJzoaUAAAOw==)}
+h3 {background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIZjI8Hybbx4oOuqgTynJf2Ln2NOHpQpmhAAQA7)}
+h4 {background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxInR0zqeAdhtJlXwV1oCll2HaWgAAOw==)}
+h5 {background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjane4iq5GlW05GgIkIZUAAAOw==)}
+h6 {background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjan04jep1iZ1XRlAo5bVgAAOw==)}
+div {background-image: url(data:image/gif;base64,R0lGODlhEgAKAIABALu7u////yH5BAEAAAEALAAAAAASAAoAAAIfjI9poI0cgDywrhuxfbrzDEbQM2Ei5aRjmoySW4pAAQA7)}
+section {background-image: url(data:image/gif;base64,R0lGODlhKAAKAIABALu7u////yH5BAEAAAEALAAAAAAoAAoAAAI5jI+pywcNY3sBWHdNrplytD2ellDeSVbp+GmWqaDqDMepc8t17Y4vBsK5hDyJMcI6KkuYU+jpjLoKADs=)}
+article {background-image: url(data:image/gif;base64,R0lGODlhKgAKAIABALu7u////yH5BAEAAAEALAAAAAAqAAoAAAI6jI+pywkNY3wG0GBvrsd2tXGYSGnfiF7ikpXemTpOiJScasYoDJJrjsG9gkCJ0ag6KhmaIe3pjDYBBQA7)}
+blockquote {background-image: url(data:image/gif;base64,R0lGODlhPgAKAIABALu7u////yH5BAEAAAEALAAAAAA+AAoAAAJPjI+py+0Knpz0xQDyuUhvfoGgIX5iSKZYgq5uNL5q69asZ8s5rrf0yZmpNkJZzFesBTu8TOlDVAabUyatguVhWduud3EyiUk45xhTTgMBBQA7)}
+address {background-image: url(data:image/gif;base64,R0lGODlhLQAKAIABALu7u////yH5BAEAAAEALAAAAAAtAAoAAAI/jI+pywwNozSP1gDyyZcjb3UaRpXkWaXmZW4OqKLhBmLs+K263DkJK7OJeifh7FicKD9A1/IpGdKkyFpNmCkAADs=)}
+pre {background-image: url(data:image/gif;base64,R0lGODlhFQAKAIABALu7uwAAACH5BAEAAAEALAAAAAAVAAoAAAIjjI+ZoN0cgDwSmnpz1NCueYERhnibZVKLNnbOq8IvKpJtVQAAOw==)}
+hgroup {background-image: url(data:image/gif;base64,R0lGODlhJwAKAIABALu7uwAAACH5BAEAAAEALAAAAAAnAAoAAAI3jI+pywYNI3uB0gpsRtt5fFnfNZaVSYJil4Wo03Hv6Z62uOCgiXH1kZIIJ8NiIxRrAZNMZAtQAAA7)}
+aside {background-image: url(data:image/gif;base64,R0lGODlhHgAKAIABAKqqqv///yH5BAEAAAEALAAAAAAeAAoAAAItjI+pG8APjZOTzgtqy7I3f1yehmQcFY4WKZbqByutmW4aHUd6vfcVbgudgpYCADs=)}
+figure {background-image: url(data:image/gif;base64,R0lGODlhJAAKAIAAALu7u////yH5BAEAAAEALAAAAAAkAAoAAAI0jI+py+2fwAHUSFvD3RlvG4HIp4nX5JFSpnZUJ6LlrM52OE7uSWosBHScgkSZj7dDKnWAAgA7)}
+figcaption {border: 1px dashed #BBB}
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/visualblocks/editor_plugin.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/visualblocks/editor_plugin.js
new file mode 100644
index 00000000..c65eaf2b
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/visualblocks/editor_plugin.js
@@ -0,0 +1 @@
+(function(){tinymce.create("tinymce.plugins.VisualBlocks",{init:function(a,b){var c;if(!window.NodeList){return}a.addCommand("mceVisualBlocks",function(){var e=a.dom,d;if(!c){c=e.uniqueId();d=e.create("link",{id:c,rel:"stylesheet",href:b+"/css/visualblocks.css"});a.getDoc().getElementsByTagName("head")[0].appendChild(d)}else{d=e.get(c);d.disabled=!d.disabled}a.controlManager.setActive("visualblocks",!d.disabled)});a.addButton("visualblocks",{title:"visualblocks.desc",cmd:"mceVisualBlocks"});a.onInit.add(function(){if(a.settings.visualblocks_default_state){a.execCommand("mceVisualBlocks",false,null,{skip_focus:true})}})},getInfo:function(){return{longname:"Visual blocks",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/visualblocks",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("visualblocks",tinymce.plugins.VisualBlocks)})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/visualblocks/editor_plugin_src.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/visualblocks/editor_plugin_src.js
new file mode 100644
index 00000000..b9d2ab2e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/visualblocks/editor_plugin_src.js
@@ -0,0 +1,63 @@
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2012, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+ tinymce.create('tinymce.plugins.VisualBlocks', {
+ init : function(ed, url) {
+ var cssId;
+
+ // We don't support older browsers like IE6/7 and they don't provide prototypes for DOM objects
+ if (!window.NodeList) {
+ return;
+ }
+
+ ed.addCommand('mceVisualBlocks', function() {
+ var dom = ed.dom, linkElm;
+
+ if (!cssId) {
+ cssId = dom.uniqueId();
+ linkElm = dom.create('link', {
+ id: cssId,
+ rel : 'stylesheet',
+ href : url + '/css/visualblocks.css'
+ });
+
+ ed.getDoc().getElementsByTagName('head')[0].appendChild(linkElm);
+ } else {
+ linkElm = dom.get(cssId);
+ linkElm.disabled = !linkElm.disabled;
+ }
+
+ ed.controlManager.setActive('visualblocks', !linkElm.disabled);
+ });
+
+ ed.addButton('visualblocks', {title : 'visualblocks.desc', cmd : 'mceVisualBlocks'});
+
+ ed.onInit.add(function() {
+ if (ed.settings.visualblocks_default_state) {
+ ed.execCommand('mceVisualBlocks', false, null, {skip_focus : true});
+ }
+ });
+ },
+
+ getInfo : function() {
+ return {
+ longname : 'Visual blocks',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/visualblocks',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ };
+ }
+ });
+
+ // Register plugin
+ tinymce.PluginManager.add('visualblocks', tinymce.plugins.VisualBlocks);
+})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/visualchars/editor_plugin.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/visualchars/editor_plugin.js
new file mode 100755
index 00000000..1a148e8b
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/visualchars/editor_plugin.js
@@ -0,0 +1 @@
+(function(){tinymce.create("tinymce.plugins.VisualChars",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceVisualChars",c._toggleVisualChars,c);a.addButton("visualchars",{title:"visualchars.desc",cmd:"mceVisualChars"});a.onBeforeGetContent.add(function(d,e){if(c.state&&e.format!="raw"&&!e.draft){c.state=true;c._toggleVisualChars(false)}})},getInfo:function(){return{longname:"Visual characters",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/visualchars",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_toggleVisualChars:function(m){var p=this,k=p.editor,a,g,j,n=k.getDoc(),o=k.getBody(),l,q=k.selection,e,c,f;p.state=!p.state;k.controlManager.setActive("visualchars",p.state);if(m){f=q.getBookmark()}if(p.state){a=[];tinymce.walk(o,function(b){if(b.nodeType==3&&b.nodeValue&&b.nodeValue.indexOf("\u00a0")!=-1){a.push(b)}},"childNodes");for(g=0;g<a.length;g++){l=a[g].nodeValue;l=l.replace(/(\u00a0)/g,'<span data-mce-bogus="1" class="mceItemHidden mceItemNbsp">$1</span>');c=k.dom.create("div",null,l);while(node=c.lastChild){k.dom.insertAfter(node,a[g])}k.dom.remove(a[g])}}else{a=k.dom.select("span.mceItemNbsp",o);for(g=a.length-1;g>=0;g--){k.dom.remove(a[g],1)}}q.moveToBookmark(f)}});tinymce.PluginManager.add("visualchars",tinymce.plugins.VisualChars)})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/visualchars/editor_plugin_src.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/visualchars/editor_plugin_src.js
new file mode 100755
index 00000000..df985905
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/visualchars/editor_plugin_src.js
@@ -0,0 +1,83 @@
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+ tinymce.create('tinymce.plugins.VisualChars', {
+ init : function(ed, url) {
+ var t = this;
+
+ t.editor = ed;
+
+ // Register commands
+ ed.addCommand('mceVisualChars', t._toggleVisualChars, t);
+
+ // Register buttons
+ ed.addButton('visualchars', {title : 'visualchars.desc', cmd : 'mceVisualChars'});
+
+ ed.onBeforeGetContent.add(function(ed, o) {
+ if (t.state && o.format != 'raw' && !o.draft) {
+ t.state = true;
+ t._toggleVisualChars(false);
+ }
+ });
+ },
+
+ getInfo : function() {
+ return {
+ longname : 'Visual characters',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/visualchars',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ };
+ },
+
+ // Private methods
+
+ _toggleVisualChars : function(bookmark) {
+ var t = this, ed = t.editor, nl, i, h, d = ed.getDoc(), b = ed.getBody(), nv, s = ed.selection, bo, div, bm;
+
+ t.state = !t.state;
+ ed.controlManager.setActive('visualchars', t.state);
+
+ if (bookmark)
+ bm = s.getBookmark();
+
+ if (t.state) {
+ nl = [];
+ tinymce.walk(b, function(n) {
+ if (n.nodeType == 3 && n.nodeValue && n.nodeValue.indexOf('\u00a0') != -1)
+ nl.push(n);
+ }, 'childNodes');
+
+ for (i = 0; i < nl.length; i++) {
+ nv = nl[i].nodeValue;
+ nv = nv.replace(/(\u00a0)/g, '<span data-mce-bogus="1" class="mceItemHidden mceItemNbsp">$1</span>');
+
+ div = ed.dom.create('div', null, nv);
+ while (node = div.lastChild)
+ ed.dom.insertAfter(node, nl[i]);
+
+ ed.dom.remove(nl[i]);
+ }
+ } else {
+ nl = ed.dom.select('span.mceItemNbsp', b);
+
+ for (i = nl.length - 1; i >= 0; i--)
+ ed.dom.remove(nl[i], 1);
+ }
+
+ s.moveToBookmark(bm);
+ }
+ });
+
+ // Register plugin
+ tinymce.PluginManager.add('visualchars', tinymce.plugins.VisualChars);
+})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/wordcount/editor_plugin.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/wordcount/editor_plugin.js
new file mode 100644
index 00000000..42ece209
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/wordcount/editor_plugin.js
@@ -0,0 +1 @@
+(function(){tinymce.create("tinymce.plugins.WordCount",{block:0,id:null,countre:null,cleanre:null,init:function(c,d){var e=this,f=0,g=tinymce.VK;e.countre=c.getParam("wordcount_countregex",/[\w\u2019\'-]+/g);e.cleanre=c.getParam("wordcount_cleanregex",/[0-9.(),;:!?%#$?\'\"_+=\\\/-]*/g);e.update_rate=c.getParam("wordcount_update_rate",2000);e.update_on_delete=c.getParam("wordcount_update_on_delete",false);e.id=c.id+"-word-count";c.onPostRender.add(function(i,h){var j,k;k=i.getParam("wordcount_target_id");if(!k){j=tinymce.DOM.get(i.id+"_path_row");if(j){tinymce.DOM.add(j.parentNode,"div",{style:"float: right"},i.getLang("wordcount.words","Words: ")+'<span id="'+e.id+'">0</span>')}}else{tinymce.DOM.add(k,"span",{},'<span id="'+e.id+'">0</span>')}});c.onInit.add(function(h){h.selection.onSetContent.add(function(){e._count(h)});e._count(h)});c.onSetContent.add(function(h){e._count(h)});function b(h){return h!==f&&(h===g.ENTER||f===g.SPACEBAR||a(f))}function a(h){return h===g.DELETE||h===g.BACKSPACE}c.onKeyUp.add(function(h,i){if(b(i.keyCode)||e.update_on_delete&&a(i.keyCode)){e._count(h)}f=i.keyCode})},_getCount:function(c){var a=0;var b=c.getContent({format:"raw"});if(b){b=b.replace(/\.\.\./g," ");b=b.replace(/<.[^<>]*?>/g," ").replace(/&nbsp;|&#160;/gi," ");b=b.replace(/(\w+)(&.+?;)+(\w+)/,"$1$3").replace(/&.+?;/g," ");b=b.replace(this.cleanre,"");var d=b.match(this.countre);if(d){a=d.length}}return a},_count:function(a){var b=this;if(b.block){return}b.block=1;setTimeout(function(){if(!a.destroyed){var c=b._getCount(a);tinymce.DOM.setHTML(b.id,c.toString());setTimeout(function(){b.block=0},b.update_rate)}},1)},getInfo:function(){return{longname:"Word Count plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/wordcount",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("wordcount",tinymce.plugins.WordCount)})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/wordcount/editor_plugin_src.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/wordcount/editor_plugin_src.js
new file mode 100644
index 00000000..34b26555
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/wordcount/editor_plugin_src.js
@@ -0,0 +1,122 @@
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+ tinymce.create('tinymce.plugins.WordCount', {
+ block : 0,
+ id : null,
+ countre : null,
+ cleanre : null,
+
+ init : function(ed, url) {
+ var t = this, last = 0, VK = tinymce.VK;
+
+ t.countre = ed.getParam('wordcount_countregex', /[\w\u2019\'-]+/g); // u2019 == &rsquo;
+ t.cleanre = ed.getParam('wordcount_cleanregex', /[0-9.(),;:!?%#$?\'\"_+=\\\/-]*/g);
+ t.update_rate = ed.getParam('wordcount_update_rate', 2000);
+ t.update_on_delete = ed.getParam('wordcount_update_on_delete', false);
+ t.id = ed.id + '-word-count';
+
+ ed.onPostRender.add(function(ed, cm) {
+ var row, id;
+
+ // Add it to the specified id or the theme advanced path
+ id = ed.getParam('wordcount_target_id');
+ if (!id) {
+ row = tinymce.DOM.get(ed.id + '_path_row');
+
+ if (row)
+ tinymce.DOM.add(row.parentNode, 'div', {'style': 'float: right'}, ed.getLang('wordcount.words', 'Words: ') + '<span id="' + t.id + '">0</span>');
+ } else {
+ tinymce.DOM.add(id, 'span', {}, '<span id="' + t.id + '">0</span>');
+ }
+ });
+
+ ed.onInit.add(function(ed) {
+ ed.selection.onSetContent.add(function() {
+ t._count(ed);
+ });
+
+ t._count(ed);
+ });
+
+ ed.onSetContent.add(function(ed) {
+ t._count(ed);
+ });
+
+ function checkKeys(key) {
+ return key !== last && (key === VK.ENTER || last === VK.SPACEBAR || checkDelOrBksp(last));
+ }
+
+ function checkDelOrBksp(key) {
+ return key === VK.DELETE || key === VK.BACKSPACE;
+ }
+
+ ed.onKeyUp.add(function(ed, e) {
+ if (checkKeys(e.keyCode) || t.update_on_delete && checkDelOrBksp(e.keyCode)) {
+ t._count(ed);
+ }
+
+ last = e.keyCode;
+ });
+ },
+
+ _getCount : function(ed) {
+ var tc = 0;
+ var tx = ed.getContent({ format: 'raw' });
+
+ if (tx) {
+ tx = tx.replace(/\.\.\./g, ' '); // convert ellipses to spaces
+ tx = tx.replace(/<.[^<>]*?>/g, ' ').replace(/&nbsp;|&#160;/gi, ' '); // remove html tags and space chars
+
+ // deal with html entities
+ tx = tx.replace(/(\w+)(&.+?;)+(\w+)/, "$1$3").replace(/&.+?;/g, ' ');
+ tx = tx.replace(this.cleanre, ''); // remove numbers and punctuation
+
+ var wordArray = tx.match(this.countre);
+ if (wordArray) {
+ tc = wordArray.length;
+ }
+ }
+
+ return tc;
+ },
+
+ _count : function(ed) {
+ var t = this;
+
+ // Keep multiple calls from happening at the same time
+ if (t.block)
+ return;
+
+ t.block = 1;
+
+ setTimeout(function() {
+ if (!ed.destroyed) {
+ var tc = t._getCount(ed);
+ tinymce.DOM.setHTML(t.id, tc.toString());
+ setTimeout(function() {t.block = 0;}, t.update_rate);
+ }
+ }, 1);
+ },
+
+ getInfo: function() {
+ return {
+ longname : 'Word Count plugin',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/wordcount',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ };
+ }
+ });
+
+ tinymce.PluginManager.add('wordcount', tinymce.plugins.WordCount);
+})();
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/abbr.htm b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/abbr.htm
new file mode 100755
index 00000000..30a894f7
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/abbr.htm
@@ -0,0 +1,142 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>{#xhtmlxtras_dlg.title_abbr_element}</title>
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script type="text/javascript" src="../../utils/mctabs.js"></script>
+ <script type="text/javascript" src="../../utils/form_utils.js"></script>
+ <script type="text/javascript" src="../../utils/editable_selects.js"></script>
+ <script type="text/javascript" src="js/element_common.js"></script>
+ <script type="text/javascript" src="js/abbr.js"></script>
+ <link rel="stylesheet" type="text/css" href="css/popup.css" />
+</head>
+<body style="display: none" role="application" aria-labelledby="app_title">
+<span style="display:none;" id="app_title">{#xhtmlxtras_dlg.title_abbr_element}</span>
+<form onsubmit="insertAbbr();return false;" action="#">
+ <div class="tabs">
+ <ul>
+ <li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.general_tab}</a></span></li>
+ <!-- <li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.events_tab}</a></span></li> -->
+ </ul>
+ </div>
+
+ <div class="panel_wrapper">
+ <div id="general_panel" class="panel current">
+ <fieldset>
+ <legend>{#xhtmlxtras_dlg.fieldset_attrib_tab}</legend>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="4">
+ <tr>
+ <td class="label"><label id="titlelabel" for="title">{#xhtmlxtras_dlg.attribute_label_title}</label>:</td>
+ <td><input id="title" name="title" type="text" value="" class="field mceFocus" /></td>
+ </tr>
+ <tr>
+ <td class="label"><label id="idlabel" for="id">{#xhtmlxtras_dlg.attribute_label_id}</label>:</td>
+ <td><input id="id" name="id" type="text" value="" class="field" /></td>
+ </tr>
+ <tr>
+ <td class="label"><label id="classlabel" for="class">{#xhtmlxtras_dlg.attribute_label_class}</label>:</td>
+ <td>
+ <select id="class" name="class" class="field mceEditableSelect">
+ <option value="">{#not_set}</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td class="label"><label id="stylelabel" for="style">{#xhtmlxtras_dlg.attribute_label_style}</label>:</td>
+ <td><input id="style" name="style" type="text" value="" class="field" /></td>
+ </tr>
+ <tr>
+ <td class="label"><label id="dirlabel" for="dir">{#xhtmlxtras_dlg.attribute_label_langdir}</label>:</td>
+ <td>
+ <select id="dir" name="dir" class="field">
+ <option value="">{#not_set}</option>
+ <option value="ltr">{#xhtmlxtras_dlg.attribute_option_ltr}</option>
+ <option value="rtl">{#xhtmlxtras_dlg.attribute_option_rtl}</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td class="label"><label id="langlabel" for="lang">{#xhtmlxtras_dlg.attribute_label_langcode}</label>:</td>
+ <td>
+ <input id="lang" name="lang" type="text" value="" class="field" />
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+ </div>
+ <div id="events_panel" class="panel">
+ <fieldset>
+ <legend>{#xhtmlxtras_dlg.fieldset_events_tab}</legend>
+
+ <table role="presentation" border="0" cellpadding="0" cellspacing="4">
+ <tr>
+ <td class="label"><label for="onfocus">onfocus</label>:</td>
+ <td><input id="onfocus" name="onfocus" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onblur">onblur</label>:</td>
+ <td><input id="onblur" name="onblur" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onclick">onclick</label>:</td>
+ <td><input id="onclick" name="onclick" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="ondblclick">ondblclick</label>:</td>
+ <td><input id="ondblclick" name="ondblclick" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onmousedown">onmousedown</label>:</td>
+ <td><input id="onmousedown" name="onmousedown" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onmouseup">onmouseup</label>:</td>
+ <td><input id="onmouseup" name="onmouseup" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onmouseover">onmouseover</label>:</td>
+ <td><input id="onmouseover" name="onmouseover" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onmousemove">onmousemove</label>:</td>
+ <td><input id="onmousemove" name="onmousemove" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onmouseout">onmouseout</label>:</td>
+ <td><input id="onmouseout" name="onmouseout" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onkeypress">onkeypress</label>:</td>
+ <td><input id="onkeypress" name="onkeypress" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onkeydown">onkeydown</label>:</td>
+ <td><input id="onkeydown" name="onkeydown" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onkeyup">onkeyup</label>:</td>
+ <td><input id="onkeyup" name="onkeyup" type="text" value="" class="field" /></td>
+ </tr>
+ </table>
+ </fieldset>
+ </div>
+ </div>
+ <div class="mceActionPanel">
+ <input type="submit" id="insert" name="insert" value="{#update}" />
+ <input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeAbbr();" style="display: none;" />
+ <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
+ </div>
+</form>
+</body>
+</html>
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/acronym.htm b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/acronym.htm
new file mode 100755
index 00000000..c1093459
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/acronym.htm
@@ -0,0 +1,142 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>{#xhtmlxtras_dlg.title_acronym_element}</title>
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script type="text/javascript" src="../../utils/mctabs.js"></script>
+ <script type="text/javascript" src="../../utils/form_utils.js"></script>
+ <script type="text/javascript" src="../../utils/editable_selects.js"></script>
+ <script type="text/javascript" src="js/element_common.js"></script>
+ <script type="text/javascript" src="js/acronym.js"></script>
+ <link rel="stylesheet" type="text/css" href="css/popup.css" />
+</head>
+<body style="display: none" role="application" aria-labelledby="app_title">
+<span style="display:none;" id="app_title">{#xhtmlxtras_dlg.title_acronym_element}</span>
+<form onsubmit="insertAcronym();return false;" action="#">
+ <div class="tabs">
+ <ul>
+ <li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.general_tab}</a></span></li>
+ <!-- <li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.events_tab}</a></span></li> -->
+ </ul>
+ </div>
+
+ <div class="panel_wrapper">
+ <div id="general_panel" class="panel current">
+ <fieldset>
+ <legend>{#xhtmlxtras_dlg.fieldset_attrib_tab}</legend>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="4">
+ <tr>
+ <td class="label"><label id="titlelabel" for="title">{#xhtmlxtras_dlg.attribute_label_title}</label>:</td>
+ <td><input id="title" name="title" type="text" value="" class="field mceFocus" /></td>
+ </tr>
+ <tr>
+ <td class="label"><label id="idlabel" for="id">{#xhtmlxtras_dlg.attribute_label_id}</label>:</td>
+ <td><input id="id" name="id" type="text" value="" class="field" /></td>
+ </tr>
+ <tr>
+ <td class="label"><label id="classlabel" for="class">{#xhtmlxtras_dlg.attribute_label_class}</label>:</td>
+ <td>
+ <select id="class" name="class" class="field mceEditableSelect">
+ <option value="">{#not_set}</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td class="label"><label id="stylelabel" for="style">{#xhtmlxtras_dlg.attribute_label_style}</label>:</td>
+ <td><input id="style" name="style" type="text" value="" class="field" /></td>
+ </tr>
+ <tr>
+ <td class="label"><label id="dirlabel" for="dir">{#xhtmlxtras_dlg.attribute_label_langdir}</label>:</td>
+ <td>
+ <select id="dir" name="dir" class="field">
+ <option value="">{#not_set}</option>
+ <option value="ltr">{#xhtmlxtras_dlg.attribute_option_ltr}</option>
+ <option value="rtl">{#xhtmlxtras_dlg.attribute_option_rtl}</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td class="label"><label id="langlabel" for="lang">{#xhtmlxtras_dlg.attribute_label_langcode}</label>:</td>
+ <td>
+ <input id="lang" name="lang" type="text" value="" class="field" />
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+ </div>
+ <div id="events_panel" class="panel">
+ <fieldset>
+ <legend>{#xhtmlxtras_dlg.fieldset_events_tab}</legend>
+
+ <table role="presentation" border="0" cellpadding="0" cellspacing="4">
+ <tr>
+ <td class="label"><label for="onfocus">onfocus</label>:</td>
+ <td><input id="onfocus" name="onfocus" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onblur">onblur</label>:</td>
+ <td><input id="onblur" name="onblur" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onclick">onclick</label>:</td>
+ <td><input id="onclick" name="onclick" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="ondblclick">ondblclick</label>:</td>
+ <td><input id="ondblclick" name="ondblclick" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onmousedown">onmousedown</label>:</td>
+ <td><input id="onmousedown" name="onmousedown" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onmouseup">onmouseup</label>:</td>
+ <td><input id="onmouseup" name="onmouseup" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onmouseover">onmouseover</label>:</td>
+ <td><input id="onmouseover" name="onmouseover" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onmousemove">onmousemove</label>:</td>
+ <td><input id="onmousemove" name="onmousemove" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onmouseout">onmouseout</label>:</td>
+ <td><input id="onmouseout" name="onmouseout" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onkeypress">onkeypress</label>:</td>
+ <td><input id="onkeypress" name="onkeypress" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onkeydown">onkeydown</label>:</td>
+ <td><input id="onkeydown" name="onkeydown" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onkeyup">onkeyup</label>:</td>
+ <td><input id="onkeyup" name="onkeyup" type="text" value="" class="field" /></td>
+ </tr>
+ </table>
+ </fieldset>
+ </div>
+ </div>
+ <div class="mceActionPanel">
+ <input type="submit" id="insert" name="insert" value="{#update}" />
+ <input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeAcronym();" style="display: none;" />
+ <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
+ </div>
+</form>
+</body>
+</html>
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/attributes.htm b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/attributes.htm
new file mode 100755
index 00000000..e8d606a3
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/attributes.htm
@@ -0,0 +1,149 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>{#xhtmlxtras_dlg.attribs_title}</title>
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script type="text/javascript" src="../../utils/mctabs.js"></script>
+ <script type="text/javascript" src="../../utils/editable_selects.js"></script>
+ <script type="text/javascript" src="../../utils/form_utils.js"></script>
+ <script type="text/javascript" src="js/attributes.js"></script>
+ <link rel="stylesheet" type="text/css" href="css/attributes.css" />
+</head>
+<body style="display: none" role="application" aria-labelledby="app_title">
+<span style="display:none;" id="app_title">{#xhtmlxtras_dlg.attribs_title}</span>
+<form onsubmit="insertAction();return false;" action="#">
+ <div class="tabs">
+ <ul>
+ <li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.attribute_attrib_tab}</a></span></li>
+ <li id="events_tab" aria-controls="events_panel"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.attribute_events_tab}</a></span></li>
+ </ul>
+ </div>
+
+ <div class="panel_wrapper">
+ <div id="general_panel" class="panel current">
+ <fieldset>
+ <legend>{#xhtmlxtras_dlg.attribute_attrib_tab}</legend>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="4">
+ <tr>
+ <td class="label"><label id="titlelabel" for="title">{#xhtmlxtras_dlg.attribute_label_title}</label>:</td>
+ <td><input id="title" name="title" type="text" value="" class="mceFocus" /></td>
+ </tr>
+ <tr>
+ <td class="label"><label id="idlabel" for="id">{#xhtmlxtras_dlg.attribute_label_id}</label>:</td>
+ <td><input id="id" name="id" type="text" value="" /></td>
+ </tr>
+ <tr>
+ <td><label id="classlabel" for="classlist">{#class_name}</label></td>
+ <td>
+ <select id="classlist" name="classlist" class="mceEditableSelect">
+ <option value="" selected="selected">{#not_set}</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td class="label"><label id="stylelabel" for="style">{#xhtmlxtras_dlg.attribute_label_style}</label>:</td>
+ <td><input id="style" name="style" type="text" value="" /></td>
+ </tr>
+ <tr>
+ <td class="label"><label id="dirlabel" for="dir">{#xhtmlxtras_dlg.attribute_label_langdir}</label>:</td>
+ <td>
+ <select id="dir" name="dir">
+ <option value="">{#not_set}</option>
+ <option value="ltr">{#xhtmlxtras_dlg.option_ltr}</option>
+ <option value="rtl">{#xhtmlxtras_dlg.option_rtl}</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td class="label"><label id="langlabel" for="lang">{#xhtmlxtras_dlg.attribute_label_langcode}</label>:</td>
+ <td>
+ <input id="lang" name="lang" type="text" value="" />
+ </td>
+ </tr>
+ <tr>
+ <td><label id="tabindexlabel" for="tabindex">{#xhtmlxtras_dlg.attribute_label_tabindex}</label></td>
+ <td><input type="text" id="tabindex" name="tabindex" value="" /></td>
+ </tr>
+
+ <tr>
+ <td><label id="accesskeylabel" for="accesskey">{#xhtmlxtras_dlg.attribute_label_accesskey}</label></td>
+ <td><input type="text" id="accesskey" name="accesskey" value="" /></td>
+ </tr>
+ </table>
+ </fieldset>
+ </div>
+ <div id="events_panel" class="panel">
+ <fieldset>
+ <legend>{#xhtmlxtras_dlg.attribute_events_tab}</legend>
+
+ <table role="presentation" border="0" cellpadding="0" cellspacing="4">
+ <tr>
+ <td class="label"><label for="onfocus">onfocus</label>:</td>
+ <td><input id="onfocus" name="onfocus" type="text" value="" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onblur">onblur</label>:</td>
+ <td><input id="onblur" name="onblur" type="text" value="" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onclick">onclick</label>:</td>
+ <td><input id="onclick" name="onclick" type="text" value="" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="ondblclick">ondblclick</label>:</td>
+ <td><input id="ondblclick" name="ondblclick" type="text" value="" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onmousedown">onmousedown</label>:</td>
+ <td><input id="onmousedown" name="onmousedown" type="text" value="" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onmouseup">onmouseup</label>:</td>
+ <td><input id="onmouseup" name="onmouseup" type="text" value="" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onmouseover">onmouseover</label>:</td>
+ <td><input id="onmouseover" name="onmouseover" type="text" value="" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onmousemove">onmousemove</label>:</td>
+ <td><input id="onmousemove" name="onmousemove" type="text" value="" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onmouseout">onmouseout</label>:</td>
+ <td><input id="onmouseout" name="onmouseout" type="text" value="" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onkeypress">onkeypress</label>:</td>
+ <td><input id="onkeypress" name="onkeypress" type="text" value="" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onkeydown">onkeydown</label>:</td>
+ <td><input id="onkeydown" name="onkeydown" type="text" value="" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onkeyup">onkeyup</label>:</td>
+ <td><input id="onkeyup" name="onkeyup" type="text" value="" /></td>
+ </tr>
+ </table>
+ </fieldset>
+ </div>
+ </div>
+ <div class="mceActionPanel">
+ <input type="submit" id="insert" name="insert" value="{#insert}" />
+ <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
+ </div>
+</form>
+</body>
+</html>
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/cite.htm b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/cite.htm
new file mode 100755
index 00000000..0ac6bdb6
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/cite.htm
@@ -0,0 +1,142 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>{#xhtmlxtras_dlg.title_cite_element}</title>
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script type="text/javascript" src="../../utils/mctabs.js"></script>
+ <script type="text/javascript" src="../../utils/form_utils.js"></script>
+ <script type="text/javascript" src="../../utils/editable_selects.js"></script>
+ <script type="text/javascript" src="js/element_common.js"></script>
+ <script type="text/javascript" src="js/cite.js"></script>
+ <link rel="stylesheet" type="text/css" href="css/popup.css" />
+</head>
+<body style="display: none" role="application" aria-labelledby="app_title">
+<span style="display:none;" id="app_title">{#xhtmlxtras_dlg.title_cite_element}</span>
+<form onsubmit="insertCite();return false;" action="#">
+ <div class="tabs">
+ <ul>
+ <li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.general_tab}</a></span></li>
+ <!-- <li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.events_tab}</a></span></li> -->
+ </ul>
+ </div>
+
+ <div class="panel_wrapper">
+ <div id="general_panel" class="panel current">
+ <fieldset>
+ <legend>{#xhtmlxtras_dlg.fieldset_attrib_tab}</legend>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="4">
+ <tr>
+ <td class="label"><label id="titlelabel" for="title">{#xhtmlxtras_dlg.attribute_label_title}</label>:</td>
+ <td><input id="title" name="title" type="text" value="" class="field mceFocus" /></td>
+ </tr>
+ <tr>
+ <td class="label"><label id="idlabel" for="id">{#xhtmlxtras_dlg.attribute_label_id}</label>:</td>
+ <td><input id="id" name="id" type="text" value="" class="field" /></td>
+ </tr>
+ <tr>
+ <td class="label"><label id="classlabel" for="class">{#xhtmlxtras_dlg.attribute_label_class}</label>:</td>
+ <td>
+ <select id="class" name="class" class="field mceEditableSelect">
+ <option value="">{#not_set}</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td class="label"><label id="stylelabel" for="class">{#xhtmlxtras_dlg.attribute_label_style}</label>:</td>
+ <td><input id="style" name="style" type="text" value="" class="field" /></td>
+ </tr>
+ <tr>
+ <td class="label"><label id="dirlabel" for="dir">{#xhtmlxtras_dlg.attribute_label_langdir}</label>:</td>
+ <td>
+ <select id="dir" name="dir" class="field">
+ <option value="">{#not_set}</option>
+ <option value="ltr">{#xhtmlxtras_dlg.attribute_option_ltr}</option>
+ <option value="rtl">{#xhtmlxtras_dlg.attribute_option_rtl}</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td class="label"><label id="langlabel" for="lang">{#xhtmlxtras_dlg.attribute_label_langcode}</label>:</td>
+ <td>
+ <input id="lang" name="lang" type="text" value="" class="field" />
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+ </div>
+ <div id="events_panel" class="panel">
+ <fieldset>
+ <legend>{#xhtmlxtras_dlg.fieldset_events_tab}</legend>
+
+ <table role="presentation" border="0" cellpadding="0" cellspacing="4">
+ <tr>
+ <td class="label"><label for="onfocus">onfocus</label>:</td>
+ <td><input id="onfocus" name="onfocus" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onblur">onblur</label>:</td>
+ <td><input id="onblur" name="onblur" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onclick">onclick</label>:</td>
+ <td><input id="onclick" name="onclick" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="ondblclick">ondblclick</label>:</td>
+ <td><input id="ondblclick" name="ondblclick" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onmousedown">onmousedown</label>:</td>
+ <td><input id="onmousedown" name="onmousedown" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onmouseup">onmouseup</label>:</td>
+ <td><input id="onmouseup" name="onmouseup" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onmouseover">onmouseover</label>:</td>
+ <td><input id="onmouseover" name="onmouseover" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onmousemove">onmousemove</label>:</td>
+ <td><input id="onmousemove" name="onmousemove" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onmouseout">onmouseout</label>:</td>
+ <td><input id="onmouseout" name="onmouseout" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onkeypress">onkeypress</label>:</td>
+ <td><input id="onkeypress" name="onkeypress" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onkeydown">onkeydown</label>:</td>
+ <td><input id="onkeydown" name="onkeydown" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onkeyup">onkeyup</label>:</td>
+ <td><input id="onkeyup" name="onkeyup" type="text" value="" class="field" /></td>
+ </tr>
+ </table>
+ </fieldset>
+ </div>
+ </div>
+ <div class="mceActionPanel">
+ <input type="submit" id="insert" name="insert" value="{#update}" />
+ <input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeCite();" style="display: none;" />
+ <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
+ </div>
+</form>
+</body>
+</html>
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/css/attributes.css b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/css/attributes.css
new file mode 100755
index 00000000..9a6a235c
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/css/attributes.css
@@ -0,0 +1,11 @@
+.panel_wrapper div.current {
+ height: 290px;
+}
+
+#id, #style, #title, #dir, #hreflang, #lang, #classlist, #tabindex, #accesskey {
+ width: 200px;
+}
+
+#events_panel input {
+ width: 200px;
+}
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/css/popup.css b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/css/popup.css
new file mode 100755
index 00000000..e67114db
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/css/popup.css
@@ -0,0 +1,9 @@
+input.field, select.field {width:200px;}
+input.picker {width:179px; margin-left: 5px;}
+input.disabled {border-color:#F2F2F2;}
+img.picker {vertical-align:text-bottom; cursor:pointer;}
+h1 {padding: 0 0 5px 0;}
+.panel_wrapper div.current {height:160px;}
+#xhtmlxtrasdel .panel_wrapper div.current, #xhtmlxtrasins .panel_wrapper div.current {height: 230px;}
+a.browse span {display:block; width:20px; height:20px; background:url('../../../themes/advanced/img/icons.gif') -140px -20px;}
+#datetime {width:180px;}
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/del.htm b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/del.htm
new file mode 100755
index 00000000..5f667510
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/del.htm
@@ -0,0 +1,162 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>{#xhtmlxtras_dlg.title_del_element}</title>
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script type="text/javascript" src="../../utils/mctabs.js"></script>
+ <script type="text/javascript" src="../../utils/form_utils.js"></script>
+ <script type="text/javascript" src="../../utils/editable_selects.js"></script>
+ <script type="text/javascript" src="js/element_common.js"></script>
+ <script type="text/javascript" src="js/del.js"></script>
+ <link rel="stylesheet" type="text/css" href="css/popup.css" />
+</head>
+<body id="xhtmlxtrasins" style="display: none" role="application" aria-labelledby="app_title">
+<span style="display:none;" id="app_title">{#xhtmlxtras_dlg.title_del_element}</span>
+<form onsubmit="insertDel();return false;" action="#">
+ <div class="tabs">
+ <ul>
+ <li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.general_tab}</a></span></li>
+ <!-- <li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.events_tab}</a></span></li> -->
+ </ul>
+ </div>
+
+ <div class="panel_wrapper">
+ <div id="general_panel" class="panel current">
+ <fieldset>
+ <legend>{#xhtmlxtras_dlg.fieldset_general_tab}</legend>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="4">
+ <tr>
+ <td class="label"><label id="datetimelabel" for="datetime">{#xhtmlxtras_dlg.attribute_label_datetime}</label>:</td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input id="datetime" name="datetime" type="text" value="" maxlength="19" class="field mceFocus" /></td>
+ <td><a href="javascript:insertDateTime('datetime');" onmousedown="return false;" class="browse" role="button" aria-labelledby="datetimelabel"><span class="datetime" title="{#xhtmlxtras_dlg.insert_date}"></span></a></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td class="label"><label id="citelabel" for="cite">{#xhtmlxtras_dlg.attribute_label_cite}</label>:</td>
+ <td><input id="cite" name="cite" type="text" value="" class="field" /></td>
+ </tr>
+ </table>
+ </fieldset>
+ <fieldset>
+ <legend>{#xhtmlxtras_dlg.fieldset_attrib_tab}</legend>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="4">
+ <tr>
+ <td class="label"><label id="titlelabel" for="title">{#xhtmlxtras_dlg.attribute_label_title}</label>:</td>
+ <td><input id="title" name="title" type="text" value="" class="field" /></td>
+ </tr>
+ <tr>
+ <td class="label"><label id="idlabel" for="id">{#xhtmlxtras_dlg.attribute_label_id}</label>:</td>
+ <td><input id="id" name="id" type="text" value="" class="field" /></td>
+ </tr>
+ <tr>
+ <td class="label"><label id="classlabel" for="class">{#xhtmlxtras_dlg.attribute_label_class}</label>:</td>
+ <td>
+ <select id="class" name="class" class="field mceEditableSelect">
+ <option value="">{#not_set}</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td class="label"><label id="stylelabel" for="style">{#xhtmlxtras_dlg.attribute_label_style}</label>:</td>
+ <td><input id="style" name="style" type="text" value="" class="field" /></td>
+ </tr>
+ <tr>
+ <td class="label"><label id="dirlabel" for="dir">{#xhtmlxtras_dlg.attribute_label_langdir}</label>:</td>
+ <td>
+ <select id="dir" name="dir" class="field">
+ <option value="">{#not_set}</option>
+ <option value="ltr">{#xhtmlxtras_dlg.attribute_option_ltr}</option>
+ <option value="rtl">{#xhtmlxtras_dlg.attribute_option_rtl}</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td class="label"><label id="langlabel" for="lang">{#xhtmlxtras_dlg.attribute_label_langcode}</label>:</td>
+ <td>
+ <input id="lang" name="lang" type="text" value="" class="field" />
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+ </div>
+ <div id="events_panel" class="panel">
+ <fieldset>
+ <legend>{#xhtmlxtras_dlg.fieldset_events_tab}</legend>
+
+ <table role="presentation" border="0" cellpadding="0" cellspacing="4">
+ <tr>
+ <td class="label"><label for="onfocus">onfocus</label>:</td>
+ <td><input id="onfocus" name="onfocus" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onblur">onblur</label>:</td>
+ <td><input id="onblur" name="onblur" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onclick">onclick</label>:</td>
+ <td><input id="onclick" name="onclick" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="ondblclick">ondblclick</label>:</td>
+ <td><input id="ondblclick" name="ondblclick" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onmousedown">onmousedown</label>:</td>
+ <td><input id="onmousedown" name="onmousedown" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onmouseup">onmouseup</label>:</td>
+ <td><input id="onmouseup" name="onmouseup" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onmouseover">onmouseover</label>:</td>
+ <td><input id="onmouseover" name="onmouseover" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onmousemove">onmousemove</label>:</td>
+ <td><input id="onmousemove" name="onmousemove" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onmouseout">onmouseout</label>:</td>
+ <td><input id="onmouseout" name="onmouseout" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onkeypress">onkeypress</label>:</td>
+ <td><input id="onkeypress" name="onkeypress" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onkeydown">onkeydown</label>:</td>
+ <td><input id="onkeydown" name="onkeydown" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onkeyup">onkeyup</label>:</td>
+ <td><input id="onkeyup" name="onkeyup" type="text" value="" class="field" /></td>
+ </tr>
+ </table>
+ </fieldset>
+ </div>
+ </div>
+ <div class="mceActionPanel">
+ <input type="submit" id="insert" name="insert" value="{#update}" />
+ <input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeDel();" style="display: none;" />
+ <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
+ </div>
+</form>
+</body>
+</html>
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/editor_plugin.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/editor_plugin.js
new file mode 100755
index 00000000..9b98a515
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/editor_plugin.js
@@ -0,0 +1 @@
+(function(){tinymce.create("tinymce.plugins.XHTMLXtrasPlugin",{init:function(a,b){a.addCommand("mceCite",function(){a.windowManager.open({file:b+"/cite.htm",width:350+parseInt(a.getLang("xhtmlxtras.cite_delta_width",0)),height:250+parseInt(a.getLang("xhtmlxtras.cite_delta_height",0)),inline:1},{plugin_url:b})});a.addCommand("mceAcronym",function(){a.windowManager.open({file:b+"/acronym.htm",width:350+parseInt(a.getLang("xhtmlxtras.acronym_delta_width",0)),height:250+parseInt(a.getLang("xhtmlxtras.acronym_delta_height",0)),inline:1},{plugin_url:b})});a.addCommand("mceAbbr",function(){a.windowManager.open({file:b+"/abbr.htm",width:350+parseInt(a.getLang("xhtmlxtras.abbr_delta_width",0)),height:250+parseInt(a.getLang("xhtmlxtras.abbr_delta_height",0)),inline:1},{plugin_url:b})});a.addCommand("mceDel",function(){a.windowManager.open({file:b+"/del.htm",width:340+parseInt(a.getLang("xhtmlxtras.del_delta_width",0)),height:310+parseInt(a.getLang("xhtmlxtras.del_delta_height",0)),inline:1},{plugin_url:b})});a.addCommand("mceIns",function(){a.windowManager.open({file:b+"/ins.htm",width:340+parseInt(a.getLang("xhtmlxtras.ins_delta_width",0)),height:310+parseInt(a.getLang("xhtmlxtras.ins_delta_height",0)),inline:1},{plugin_url:b})});a.addCommand("mceAttributes",function(){a.windowManager.open({file:b+"/attributes.htm",width:380+parseInt(a.getLang("xhtmlxtras.attr_delta_width",0)),height:370+parseInt(a.getLang("xhtmlxtras.attr_delta_height",0)),inline:1},{plugin_url:b})});a.addButton("cite",{title:"xhtmlxtras.cite_desc",cmd:"mceCite"});a.addButton("acronym",{title:"xhtmlxtras.acronym_desc",cmd:"mceAcronym"});a.addButton("abbr",{title:"xhtmlxtras.abbr_desc",cmd:"mceAbbr"});a.addButton("del",{title:"xhtmlxtras.del_desc",cmd:"mceDel"});a.addButton("ins",{title:"xhtmlxtras.ins_desc",cmd:"mceIns"});a.addButton("attribs",{title:"xhtmlxtras.attribs_desc",cmd:"mceAttributes"});a.onNodeChange.add(function(d,c,f,e){f=d.dom.getParent(f,"CITE,ACRONYM,ABBR,DEL,INS");c.setDisabled("cite",e);c.setDisabled("acronym",e);c.setDisabled("abbr",e);c.setDisabled("del",e);c.setDisabled("ins",e);c.setDisabled("attribs",f&&f.nodeName=="BODY");c.setActive("cite",0);c.setActive("acronym",0);c.setActive("abbr",0);c.setActive("del",0);c.setActive("ins",0);if(f){do{c.setDisabled(f.nodeName.toLowerCase(),0);c.setActive(f.nodeName.toLowerCase(),1)}while(f=f.parentNode)}});a.onPreInit.add(function(){a.dom.create("abbr")})},getInfo:function(){return{longname:"XHTML Xtras Plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/xhtmlxtras",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("xhtmlxtras",tinymce.plugins.XHTMLXtrasPlugin)})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js
new file mode 100755
index 00000000..f2405721
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js
@@ -0,0 +1,132 @@
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+ tinymce.create('tinymce.plugins.XHTMLXtrasPlugin', {
+ init : function(ed, url) {
+ // Register commands
+ ed.addCommand('mceCite', function() {
+ ed.windowManager.open({
+ file : url + '/cite.htm',
+ width : 350 + parseInt(ed.getLang('xhtmlxtras.cite_delta_width', 0)),
+ height : 250 + parseInt(ed.getLang('xhtmlxtras.cite_delta_height', 0)),
+ inline : 1
+ }, {
+ plugin_url : url
+ });
+ });
+
+ ed.addCommand('mceAcronym', function() {
+ ed.windowManager.open({
+ file : url + '/acronym.htm',
+ width : 350 + parseInt(ed.getLang('xhtmlxtras.acronym_delta_width', 0)),
+ height : 250 + parseInt(ed.getLang('xhtmlxtras.acronym_delta_height', 0)),
+ inline : 1
+ }, {
+ plugin_url : url
+ });
+ });
+
+ ed.addCommand('mceAbbr', function() {
+ ed.windowManager.open({
+ file : url + '/abbr.htm',
+ width : 350 + parseInt(ed.getLang('xhtmlxtras.abbr_delta_width', 0)),
+ height : 250 + parseInt(ed.getLang('xhtmlxtras.abbr_delta_height', 0)),
+ inline : 1
+ }, {
+ plugin_url : url
+ });
+ });
+
+ ed.addCommand('mceDel', function() {
+ ed.windowManager.open({
+ file : url + '/del.htm',
+ width : 340 + parseInt(ed.getLang('xhtmlxtras.del_delta_width', 0)),
+ height : 310 + parseInt(ed.getLang('xhtmlxtras.del_delta_height', 0)),
+ inline : 1
+ }, {
+ plugin_url : url
+ });
+ });
+
+ ed.addCommand('mceIns', function() {
+ ed.windowManager.open({
+ file : url + '/ins.htm',
+ width : 340 + parseInt(ed.getLang('xhtmlxtras.ins_delta_width', 0)),
+ height : 310 + parseInt(ed.getLang('xhtmlxtras.ins_delta_height', 0)),
+ inline : 1
+ }, {
+ plugin_url : url
+ });
+ });
+
+ ed.addCommand('mceAttributes', function() {
+ ed.windowManager.open({
+ file : url + '/attributes.htm',
+ width : 380 + parseInt(ed.getLang('xhtmlxtras.attr_delta_width', 0)),
+ height : 370 + parseInt(ed.getLang('xhtmlxtras.attr_delta_height', 0)),
+ inline : 1
+ }, {
+ plugin_url : url
+ });
+ });
+
+ // Register buttons
+ ed.addButton('cite', {title : 'xhtmlxtras.cite_desc', cmd : 'mceCite'});
+ ed.addButton('acronym', {title : 'xhtmlxtras.acronym_desc', cmd : 'mceAcronym'});
+ ed.addButton('abbr', {title : 'xhtmlxtras.abbr_desc', cmd : 'mceAbbr'});
+ ed.addButton('del', {title : 'xhtmlxtras.del_desc', cmd : 'mceDel'});
+ ed.addButton('ins', {title : 'xhtmlxtras.ins_desc', cmd : 'mceIns'});
+ ed.addButton('attribs', {title : 'xhtmlxtras.attribs_desc', cmd : 'mceAttributes'});
+
+ ed.onNodeChange.add(function(ed, cm, n, co) {
+ n = ed.dom.getParent(n, 'CITE,ACRONYM,ABBR,DEL,INS');
+
+ cm.setDisabled('cite', co);
+ cm.setDisabled('acronym', co);
+ cm.setDisabled('abbr', co);
+ cm.setDisabled('del', co);
+ cm.setDisabled('ins', co);
+ cm.setDisabled('attribs', n && n.nodeName == 'BODY');
+ cm.setActive('cite', 0);
+ cm.setActive('acronym', 0);
+ cm.setActive('abbr', 0);
+ cm.setActive('del', 0);
+ cm.setActive('ins', 0);
+
+ // Activate all
+ if (n) {
+ do {
+ cm.setDisabled(n.nodeName.toLowerCase(), 0);
+ cm.setActive(n.nodeName.toLowerCase(), 1);
+ } while (n = n.parentNode);
+ }
+ });
+
+ ed.onPreInit.add(function() {
+ // Fixed IE issue where it can't handle these elements correctly
+ ed.dom.create('abbr');
+ });
+ },
+
+ getInfo : function() {
+ return {
+ longname : 'XHTML Xtras Plugin',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/xhtmlxtras',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ };
+ }
+ });
+
+ // Register plugin
+ tinymce.PluginManager.add('xhtmlxtras', tinymce.plugins.XHTMLXtrasPlugin);
+})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/ins.htm b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/ins.htm
new file mode 100755
index 00000000..d001ac7c
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/ins.htm
@@ -0,0 +1,162 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>{#xhtmlxtras_dlg.title_ins_element}</title>
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script type="text/javascript" src="../../utils/mctabs.js"></script>
+ <script type="text/javascript" src="../../utils/form_utils.js"></script>
+ <script type="text/javascript" src="../../utils/editable_selects.js"></script>
+ <script type="text/javascript" src="js/element_common.js"></script>
+ <script type="text/javascript" src="js/ins.js"></script>
+ <link rel="stylesheet" type="text/css" href="css/popup.css" />
+</head>
+<body id="xhtmlxtrasins" style="display: none" role="application" aria-labelledby="app_title">
+<span style="display:none;" id="app_title">{#xhtmlxtras_dlg.title_ins_element}</span>
+<form onsubmit="insertIns();return false;" action="#">
+ <div class="tabs">
+ <ul>
+ <li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.general_tab}</a></span></li>
+ <!-- <li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.events_tab}</a></span></li> -->
+ </ul>
+ </div>
+
+ <div class="panel_wrapper">
+ <div id="general_panel" class="panel current">
+ <fieldset>
+ <legend>{#xhtmlxtras_dlg.fieldset_general_tab}</legend>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="4">
+ <tr>
+ <td class="label"><label id="datetimelabel" for="datetime">{#xhtmlxtras_dlg.attribute_label_datetime}</label>:</td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input id="datetime" name="datetime" type="text" value="" maxlength="19" class="field mceFocus" /></td>
+ <td ><a href="javascript:insertDateTime('datetime');" onmousedown="return false;" class="browse" role="button" aria-labelledby="datetimelabel"><span class="datetime" title="{#xhtmlxtras_dlg.insert_date}"></span></a></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr >
+ <td class="label"><label id="citelabel" for="cite">{#xhtmlxtras_dlg.attribute_label_cite}</label>:</td>
+ <td><input id="cite" name="cite" type="text" value="" class="field" /></td>
+ </tr>
+ </table>
+ </fieldset>
+ <fieldset>
+ <legend>{#xhtmlxtras_dlg.fieldset_attrib_tab}</legend>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="4">
+ <tr>
+ <td class="label"><label id="titlelabel" for="title">{#xhtmlxtras_dlg.attribute_label_title}</label>:</td>
+ <td><input id="title" name="title" type="text" value="" class="field" /></td>
+ </tr>
+ <tr>
+ <td class="label"><label id="idlabel" for="id">{#xhtmlxtras_dlg.attribute_label_id}</label>:</td>
+ <td><input id="id" name="id" type="text" value="" class="field" /></td>
+ </tr>
+ <tr>
+ <td class="label"><label id="classlabel" for="class">{#xhtmlxtras_dlg.attribute_label_class}</label>:</td>
+ <td>
+ <select id="class" name="class" class="field mceEditableSelect">
+ <option value="">{#not_set}</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td class="label"><label id="stylelabel" for="style">{#xhtmlxtras_dlg.attribute_label_style}</label>:</td>
+ <td><input id="style" name="style" type="text" value="" class="field" /></td>
+ </tr>
+ <tr>
+ <td class="label"><label id="dirlabel" for="dir">{#xhtmlxtras_dlg.attribute_label_langdir}</label>:</td>
+ <td>
+ <select id="dir" name="dir" class="field">
+ <option value="">{#not_set}</option>
+ <option value="ltr">{#xhtmlxtras_dlg.attribute_option_ltr}</option>
+ <option value="rtl">{#xhtmlxtras_dlg.attribute_option_rtl}</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td class="label"><label id="langlabel" for="lang">{#xhtmlxtras_dlg.attribute_label_langcode}</label>:</td>
+ <td>
+ <input id="lang" name="lang" type="text" value="" class="field" />
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+ </div>
+ <div id="events_panel" class="panel">
+ <fieldset>
+ <legend>{#xhtmlxtras_dlg.fieldset_events_tab}</legend>
+
+ <table role="presentation" border="0" cellpadding="0" cellspacing="4">
+ <tr>
+ <td class="label"><label for="onfocus">onfocus</label>:</td>
+ <td><input id="onfocus" name="onfocus" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onblur">onblur</label>:</td>
+ <td><input id="onblur" name="onblur" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onclick">onclick</label>:</td>
+ <td><input id="onclick" name="onclick" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="ondblclick">ondblclick</label>:</td>
+ <td><input id="ondblclick" name="ondblclick" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onmousedown">onmousedown</label>:</td>
+ <td><input id="onmousedown" name="onmousedown" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onmouseup">onmouseup</label>:</td>
+ <td><input id="onmouseup" name="onmouseup" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onmouseover">onmouseover</label>:</td>
+ <td><input id="onmouseover" name="onmouseover" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onmousemove">onmousemove</label>:</td>
+ <td><input id="onmousemove" name="onmousemove" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onmouseout">onmouseout</label>:</td>
+ <td><input id="onmouseout" name="onmouseout" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onkeypress">onkeypress</label>:</td>
+ <td><input id="onkeypress" name="onkeypress" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onkeydown">onkeydown</label>:</td>
+ <td><input id="onkeydown" name="onkeydown" type="text" value="" class="field" /></td>
+ </tr>
+
+ <tr>
+ <td class="label"><label for="onkeyup">onkeyup</label>:</td>
+ <td><input id="onkeyup" name="onkeyup" type="text" value="" class="field" /></td>
+ </tr>
+ </table>
+ </fieldset>
+ </div>
+ </div>
+ <div class="mceActionPanel">
+ <input type="submit" id="insert" name="insert" value="{#update}" />
+ <input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeIns();" style="display: none;" />
+ <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
+ </div>
+</form>
+</body>
+</html>
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/js/abbr.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/js/abbr.js
new file mode 100644
index 00000000..4b51a257
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/js/abbr.js
@@ -0,0 +1,28 @@
+/**
+ * abbr.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+function init() {
+ SXE.initElementDialog('abbr');
+ if (SXE.currentAction == "update") {
+ SXE.showRemoveButton();
+ }
+}
+
+function insertAbbr() {
+ SXE.insertElement('abbr');
+ tinyMCEPopup.close();
+}
+
+function removeAbbr() {
+ SXE.removeElement('abbr');
+ tinyMCEPopup.close();
+}
+
+tinyMCEPopup.onInit.add(init);
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/js/acronym.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/js/acronym.js
new file mode 100644
index 00000000..6ec2f887
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/js/acronym.js
@@ -0,0 +1,28 @@
+/**
+ * acronym.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+function init() {
+ SXE.initElementDialog('acronym');
+ if (SXE.currentAction == "update") {
+ SXE.showRemoveButton();
+ }
+}
+
+function insertAcronym() {
+ SXE.insertElement('acronym');
+ tinyMCEPopup.close();
+}
+
+function removeAcronym() {
+ SXE.removeElement('acronym');
+ tinyMCEPopup.close();
+}
+
+tinyMCEPopup.onInit.add(init);
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/js/attributes.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/js/attributes.js
new file mode 100644
index 00000000..9c99995a
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/js/attributes.js
@@ -0,0 +1,111 @@
+/**
+ * attributes.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+function init() {
+ tinyMCEPopup.resizeToInnerSize();
+ var inst = tinyMCEPopup.editor;
+ var dom = inst.dom;
+ var elm = inst.selection.getNode();
+ var f = document.forms[0];
+ var onclick = dom.getAttrib(elm, 'onclick');
+
+ setFormValue('title', dom.getAttrib(elm, 'title'));
+ setFormValue('id', dom.getAttrib(elm, 'id'));
+ setFormValue('style', dom.getAttrib(elm, "style"));
+ setFormValue('dir', dom.getAttrib(elm, 'dir'));
+ setFormValue('lang', dom.getAttrib(elm, 'lang'));
+ setFormValue('tabindex', dom.getAttrib(elm, 'tabindex', typeof(elm.tabindex) != "undefined" ? elm.tabindex : ""));
+ setFormValue('accesskey', dom.getAttrib(elm, 'accesskey', typeof(elm.accesskey) != "undefined" ? elm.accesskey : ""));
+ setFormValue('onfocus', dom.getAttrib(elm, 'onfocus'));
+ setFormValue('onblur', dom.getAttrib(elm, 'onblur'));
+ setFormValue('onclick', onclick);
+ setFormValue('ondblclick', dom.getAttrib(elm, 'ondblclick'));
+ setFormValue('onmousedown', dom.getAttrib(elm, 'onmousedown'));
+ setFormValue('onmouseup', dom.getAttrib(elm, 'onmouseup'));
+ setFormValue('onmouseover', dom.getAttrib(elm, 'onmouseover'));
+ setFormValue('onmousemove', dom.getAttrib(elm, 'onmousemove'));
+ setFormValue('onmouseout', dom.getAttrib(elm, 'onmouseout'));
+ setFormValue('onkeypress', dom.getAttrib(elm, 'onkeypress'));
+ setFormValue('onkeydown', dom.getAttrib(elm, 'onkeydown'));
+ setFormValue('onkeyup', dom.getAttrib(elm, 'onkeyup'));
+ className = dom.getAttrib(elm, 'class');
+
+ addClassesToList('classlist', 'advlink_styles');
+ selectByValue(f, 'classlist', className, true);
+
+ TinyMCE_EditableSelects.init();
+}
+
+function setFormValue(name, value) {
+ if(value && document.forms[0].elements[name]){
+ document.forms[0].elements[name].value = value;
+ }
+}
+
+function insertAction() {
+ var inst = tinyMCEPopup.editor;
+ var elm = inst.selection.getNode();
+
+ setAllAttribs(elm);
+ tinyMCEPopup.execCommand("mceEndUndoLevel");
+ tinyMCEPopup.close();
+}
+
+function setAttrib(elm, attrib, value) {
+ var formObj = document.forms[0];
+ var valueElm = formObj.elements[attrib.toLowerCase()];
+ var inst = tinyMCEPopup.editor;
+ var dom = inst.dom;
+
+ if (typeof(value) == "undefined" || value == null) {
+ value = "";
+
+ if (valueElm)
+ value = valueElm.value;
+ }
+
+ dom.setAttrib(elm, attrib.toLowerCase(), value);
+}
+
+function setAllAttribs(elm) {
+ var f = document.forms[0];
+
+ setAttrib(elm, 'title');
+ setAttrib(elm, 'id');
+ setAttrib(elm, 'style');
+ setAttrib(elm, 'class', getSelectValue(f, 'classlist'));
+ setAttrib(elm, 'dir');
+ setAttrib(elm, 'lang');
+ setAttrib(elm, 'tabindex');
+ setAttrib(elm, 'accesskey');
+ setAttrib(elm, 'onfocus');
+ setAttrib(elm, 'onblur');
+ setAttrib(elm, 'onclick');
+ setAttrib(elm, 'ondblclick');
+ setAttrib(elm, 'onmousedown');
+ setAttrib(elm, 'onmouseup');
+ setAttrib(elm, 'onmouseover');
+ setAttrib(elm, 'onmousemove');
+ setAttrib(elm, 'onmouseout');
+ setAttrib(elm, 'onkeypress');
+ setAttrib(elm, 'onkeydown');
+ setAttrib(elm, 'onkeyup');
+
+ // Refresh in old MSIE
+// if (tinyMCE.isMSIE5)
+// elm.outerHTML = elm.outerHTML;
+}
+
+function insertAttribute() {
+ tinyMCEPopup.close();
+}
+
+tinyMCEPopup.onInit.add(init);
+tinyMCEPopup.requireLangPack();
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/js/cite.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/js/cite.js
new file mode 100644
index 00000000..009b7154
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/js/cite.js
@@ -0,0 +1,28 @@
+/**
+ * cite.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+function init() {
+ SXE.initElementDialog('cite');
+ if (SXE.currentAction == "update") {
+ SXE.showRemoveButton();
+ }
+}
+
+function insertCite() {
+ SXE.insertElement('cite');
+ tinyMCEPopup.close();
+}
+
+function removeCite() {
+ SXE.removeElement('cite');
+ tinyMCEPopup.close();
+}
+
+tinyMCEPopup.onInit.add(init);
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/js/del.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/js/del.js
new file mode 100644
index 00000000..1f957dc7
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/js/del.js
@@ -0,0 +1,53 @@
+/**
+ * del.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+function init() {
+ SXE.initElementDialog('del');
+ if (SXE.currentAction == "update") {
+ setFormValue('datetime', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'datetime'));
+ setFormValue('cite', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'cite'));
+ SXE.showRemoveButton();
+ }
+}
+
+function setElementAttribs(elm) {
+ setAllCommonAttribs(elm);
+ setAttrib(elm, 'datetime');
+ setAttrib(elm, 'cite');
+ elm.removeAttribute('data-mce-new');
+}
+
+function insertDel() {
+ var elm = tinyMCEPopup.editor.dom.getParent(SXE.focusElement, 'DEL');
+
+ if (elm == null) {
+ var s = SXE.inst.selection.getContent();
+ if(s.length > 0) {
+ insertInlineElement('del');
+ var elementArray = SXE.inst.dom.select('del[data-mce-new]');
+ for (var i=0; i<elementArray.length; i++) {
+ var elm = elementArray[i];
+ setElementAttribs(elm);
+ }
+ }
+ } else {
+ setElementAttribs(elm);
+ }
+ tinyMCEPopup.editor.nodeChanged();
+ tinyMCEPopup.execCommand('mceEndUndoLevel');
+ tinyMCEPopup.close();
+}
+
+function removeDel() {
+ SXE.removeElement('del');
+ tinyMCEPopup.close();
+}
+
+tinyMCEPopup.onInit.add(init);
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/js/element_common.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/js/element_common.js
new file mode 100644
index 00000000..4e5d9c3b
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/js/element_common.js
@@ -0,0 +1,229 @@
+/**
+ * element_common.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+tinyMCEPopup.requireLangPack();
+
+function initCommonAttributes(elm) {
+ var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
+
+ // Setup form data for common element attributes
+ setFormValue('title', dom.getAttrib(elm, 'title'));
+ setFormValue('id', dom.getAttrib(elm, 'id'));
+ selectByValue(formObj, 'class', dom.getAttrib(elm, 'class'), true);
+ setFormValue('style', dom.getAttrib(elm, 'style'));
+ selectByValue(formObj, 'dir', dom.getAttrib(elm, 'dir'));
+ setFormValue('lang', dom.getAttrib(elm, 'lang'));
+ setFormValue('onfocus', dom.getAttrib(elm, 'onfocus'));
+ setFormValue('onblur', dom.getAttrib(elm, 'onblur'));
+ setFormValue('onclick', dom.getAttrib(elm, 'onclick'));
+ setFormValue('ondblclick', dom.getAttrib(elm, 'ondblclick'));
+ setFormValue('onmousedown', dom.getAttrib(elm, 'onmousedown'));
+ setFormValue('onmouseup', dom.getAttrib(elm, 'onmouseup'));
+ setFormValue('onmouseover', dom.getAttrib(elm, 'onmouseover'));
+ setFormValue('onmousemove', dom.getAttrib(elm, 'onmousemove'));
+ setFormValue('onmouseout', dom.getAttrib(elm, 'onmouseout'));
+ setFormValue('onkeypress', dom.getAttrib(elm, 'onkeypress'));
+ setFormValue('onkeydown', dom.getAttrib(elm, 'onkeydown'));
+ setFormValue('onkeyup', dom.getAttrib(elm, 'onkeyup'));
+}
+
+function setFormValue(name, value) {
+ if(document.forms[0].elements[name]) document.forms[0].elements[name].value = value;
+}
+
+function insertDateTime(id) {
+ document.getElementById(id).value = getDateTime(new Date(), "%Y-%m-%dT%H:%M:%S");
+}
+
+function getDateTime(d, fmt) {
+ fmt = fmt.replace("%D", "%m/%d/%y");
+ fmt = fmt.replace("%r", "%I:%M:%S %p");
+ fmt = fmt.replace("%Y", "" + d.getFullYear());
+ fmt = fmt.replace("%y", "" + d.getYear());
+ fmt = fmt.replace("%m", addZeros(d.getMonth()+1, 2));
+ fmt = fmt.replace("%d", addZeros(d.getDate(), 2));
+ fmt = fmt.replace("%H", "" + addZeros(d.getHours(), 2));
+ fmt = fmt.replace("%M", "" + addZeros(d.getMinutes(), 2));
+ fmt = fmt.replace("%S", "" + addZeros(d.getSeconds(), 2));
+ fmt = fmt.replace("%I", "" + ((d.getHours() + 11) % 12 + 1));
+ fmt = fmt.replace("%p", "" + (d.getHours() < 12 ? "AM" : "PM"));
+ fmt = fmt.replace("%%", "%");
+
+ return fmt;
+}
+
+function addZeros(value, len) {
+ var i;
+
+ value = "" + value;
+
+ if (value.length < len) {
+ for (i=0; i<(len-value.length); i++)
+ value = "0" + value;
+ }
+
+ return value;
+}
+
+function selectByValue(form_obj, field_name, value, add_custom, ignore_case) {
+ if (!form_obj || !form_obj.elements[field_name])
+ return;
+
+ var sel = form_obj.elements[field_name];
+
+ var found = false;
+ for (var i=0; i<sel.options.length; i++) {
+ var option = sel.options[i];
+
+ if (option.value == value || (ignore_case && option.value.toLowerCase() == value.toLowerCase())) {
+ option.selected = true;
+ found = true;
+ } else
+ option.selected = false;
+ }
+
+ if (!found && add_custom && value != '') {
+ var option = new Option('Value: ' + value, value);
+ option.selected = true;
+ sel.options[sel.options.length] = option;
+ }
+
+ return found;
+}
+
+function setAttrib(elm, attrib, value) {
+ var formObj = document.forms[0];
+ var valueElm = formObj.elements[attrib.toLowerCase()];
+ tinyMCEPopup.editor.dom.setAttrib(elm, attrib, value || valueElm.value);
+}
+
+function setAllCommonAttribs(elm) {
+ setAttrib(elm, 'title');
+ setAttrib(elm, 'id');
+ setAttrib(elm, 'class');
+ setAttrib(elm, 'style');
+ setAttrib(elm, 'dir');
+ setAttrib(elm, 'lang');
+ /*setAttrib(elm, 'onfocus');
+ setAttrib(elm, 'onblur');
+ setAttrib(elm, 'onclick');
+ setAttrib(elm, 'ondblclick');
+ setAttrib(elm, 'onmousedown');
+ setAttrib(elm, 'onmouseup');
+ setAttrib(elm, 'onmouseover');
+ setAttrib(elm, 'onmousemove');
+ setAttrib(elm, 'onmouseout');
+ setAttrib(elm, 'onkeypress');
+ setAttrib(elm, 'onkeydown');
+ setAttrib(elm, 'onkeyup');*/
+}
+
+SXE = {
+ currentAction : "insert",
+ inst : tinyMCEPopup.editor,
+ updateElement : null
+}
+
+SXE.focusElement = SXE.inst.selection.getNode();
+
+SXE.initElementDialog = function(element_name) {
+ addClassesToList('class', 'xhtmlxtras_styles');
+ TinyMCE_EditableSelects.init();
+
+ element_name = element_name.toLowerCase();
+ var elm = SXE.inst.dom.getParent(SXE.focusElement, element_name.toUpperCase());
+ if (elm != null && elm.nodeName.toUpperCase() == element_name.toUpperCase()) {
+ SXE.currentAction = "update";
+ }
+
+ if (SXE.currentAction == "update") {
+ initCommonAttributes(elm);
+ SXE.updateElement = elm;
+ }
+
+ document.forms[0].insert.value = tinyMCEPopup.getLang(SXE.currentAction, 'Insert', true);
+}
+
+SXE.insertElement = function(element_name) {
+ var elm = SXE.inst.dom.getParent(SXE.focusElement, element_name.toUpperCase()), h, tagName;
+
+ if (elm == null) {
+ var s = SXE.inst.selection.getContent();
+ if(s.length > 0) {
+ tagName = element_name;
+
+ insertInlineElement(element_name);
+ var elementArray = tinymce.grep(SXE.inst.dom.select(element_name));
+ for (var i=0; i<elementArray.length; i++) {
+ var elm = elementArray[i];
+
+ if (SXE.inst.dom.getAttrib(elm, 'data-mce-new')) {
+ elm.id = '';
+ elm.setAttribute('id', '');
+ elm.removeAttribute('id');
+ elm.removeAttribute('data-mce-new');
+
+ setAllCommonAttribs(elm);
+ }
+ }
+ }
+ } else {
+ setAllCommonAttribs(elm);
+ }
+ SXE.inst.nodeChanged();
+ tinyMCEPopup.execCommand('mceEndUndoLevel');
+}
+
+SXE.removeElement = function(element_name){
+ element_name = element_name.toLowerCase();
+ elm = SXE.inst.dom.getParent(SXE.focusElement, element_name.toUpperCase());
+ if(elm && elm.nodeName.toUpperCase() == element_name.toUpperCase()){
+ tinyMCE.execCommand('mceRemoveNode', false, elm);
+ SXE.inst.nodeChanged();
+ tinyMCEPopup.execCommand('mceEndUndoLevel');
+ }
+}
+
+SXE.showRemoveButton = function() {
+ document.getElementById("remove").style.display = '';
+}
+
+SXE.containsClass = function(elm,cl) {
+ return (elm.className.indexOf(cl) > -1) ? true : false;
+}
+
+SXE.removeClass = function(elm,cl) {
+ if(elm.className == null || elm.className == "" || !SXE.containsClass(elm,cl)) {
+ return true;
+ }
+ var classNames = elm.className.split(" ");
+ var newClassNames = "";
+ for (var x = 0, cnl = classNames.length; x < cnl; x++) {
+ if (classNames[x] != cl) {
+ newClassNames += (classNames[x] + " ");
+ }
+ }
+ elm.className = newClassNames.substring(0,newClassNames.length-1); //removes extra space at the end
+}
+
+SXE.addClass = function(elm,cl) {
+ if(!SXE.containsClass(elm,cl)) elm.className ? elm.className += " " + cl : elm.className = cl;
+ return true;
+}
+
+function insertInlineElement(en) {
+ var ed = tinyMCEPopup.editor, dom = ed.dom;
+
+ ed.getDoc().execCommand('FontName', false, 'mceinline');
+ tinymce.each(dom.select('span,font'), function(n) {
+ if (n.style.fontFamily == 'mceinline' || n.face == 'mceinline')
+ dom.replace(dom.create(en, {'data-mce-new' : 1}), n, 1);
+ });
+}
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/js/ins.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/js/ins.js
new file mode 100644
index 00000000..c4addfb0
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/js/ins.js
@@ -0,0 +1,53 @@
+/**
+ * ins.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+function init() {
+ SXE.initElementDialog('ins');
+ if (SXE.currentAction == "update") {
+ setFormValue('datetime', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'datetime'));
+ setFormValue('cite', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'cite'));
+ SXE.showRemoveButton();
+ }
+}
+
+function setElementAttribs(elm) {
+ setAllCommonAttribs(elm);
+ setAttrib(elm, 'datetime');
+ setAttrib(elm, 'cite');
+ elm.removeAttribute('data-mce-new');
+}
+
+function insertIns() {
+ var elm = tinyMCEPopup.editor.dom.getParent(SXE.focusElement, 'INS');
+
+ if (elm == null) {
+ var s = SXE.inst.selection.getContent();
+ if(s.length > 0) {
+ insertInlineElement('ins');
+ var elementArray = SXE.inst.dom.select('ins[data-mce-new]');
+ for (var i=0; i<elementArray.length; i++) {
+ var elm = elementArray[i];
+ setElementAttribs(elm);
+ }
+ }
+ } else {
+ setElementAttribs(elm);
+ }
+ tinyMCEPopup.editor.nodeChanged();
+ tinyMCEPopup.execCommand('mceEndUndoLevel');
+ tinyMCEPopup.close();
+}
+
+function removeIns() {
+ SXE.removeElement('ins');
+ tinyMCEPopup.close();
+}
+
+tinyMCEPopup.onInit.add(init);
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/langs/de_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/langs/de_dlg.js
new file mode 100644
index 00000000..4994355b
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/langs/de_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('de.xhtmlxtras_dlg',{"attribs_title":"Attribute einf\u00fcgen/bearbeiten","option_rtl":"Rechts nach links","option_ltr":"Links nach rechts","insert_date":"Aktuelle Zeit/Datum einf\u00fcgen",remove:"Entfernen","title_cite_element":"Quellenangabe","title_abbr_element":"Abk\u00fcrzung","title_acronym_element":"Akronym","title_del_element":"Entfernter Text","title_ins_element":"Eingef\u00fcgter Text","fieldset_events_tab":"Ereignisse","fieldset_attrib_tab":"Attribute","fieldset_general_tab":"Allgemeine Einstellungen","events_tab":"Ereignisse","attrib_tab":"Attribute","general_tab":"Allgemein","attribute_attrib_tab":"Attribute","attribute_events_tab":"Ereignisse","attribute_label_accesskey":"Tastenk\u00fcrzel","attribute_label_tabindex":"Tabindex","attribute_label_langcode":"Sprache","attribute_option_rtl":"Rechts nach links","attribute_option_ltr":"Links nach rechts","attribute_label_langdir":"Schriftrichtung","attribute_label_datetime":"Zeit/Datum","attribute_label_cite":"Quellenangabe","attribute_label_style":"Format","attribute_label_class":"Klasse","attribute_label_id":"ID","attribute_label_title":"Titel"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/langs/en_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/langs/en_dlg.js
new file mode 100644
index 00000000..c4569f85
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/langs/en_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('en.xhtmlxtras_dlg',{"attribs_title":"Insert/Edit Attributes","option_rtl":"Right to Left","option_ltr":"Left to Right","insert_date":"Insert Current Date/Time",remove:"Remove","title_cite_element":"Citation Element","title_abbr_element":"Abbreviation Element","title_acronym_element":"Acronym Element","title_del_element":"Deletion Element","title_ins_element":"Insertion Element","fieldset_events_tab":"Element Events","fieldset_attrib_tab":"Element Attributes","fieldset_general_tab":"General Settings","events_tab":"Events","attrib_tab":"Attributes","general_tab":"General","attribute_attrib_tab":"Attributes","attribute_events_tab":"Events","attribute_label_accesskey":"AccessKey","attribute_label_tabindex":"TabIndex","attribute_label_langcode":"Language","attribute_option_rtl":"Right to Left","attribute_option_ltr":"Left to Right","attribute_label_langdir":"Text Direction","attribute_label_datetime":"Date/Time","attribute_label_cite":"Cite","attribute_label_style":"Style","attribute_label_class":"Class","attribute_label_id":"ID","attribute_label_title":"Title"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/langs/hu_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/langs/hu_dlg.js
new file mode 100644
index 00000000..28b5cb8a
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/langs/hu_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('hu.xhtmlxtras_dlg',{"attribs_title":"Tulajdons\u00e1gok besz\u00far\u00e1sa/szerkeszt\u00e9se","option_rtl":"Jobbr\u00f3l balra","option_ltr":"Balr\u00f3l jobra","insert_date":"Aktu\u00e1lis d\u00e1tum/id\u0151 besz\u00far\u00e1sa",remove:"Elt\u00e1vol\u00edt\u00e1s","title_cite_element":"Id\u00e9zet elem","title_abbr_element":"R\u00f6vid\u00edt\u00e9s elem","title_acronym_element":"Bet\u0171sz\u00f3 elem","title_del_element":"T\u00f6r\u00f6lt elem","title_ins_element":"Besz\u00fart elem","fieldset_events_tab":"Elem esem\u00e9nyek","fieldset_attrib_tab":"Elem tulajdons\u00e1gok","fieldset_general_tab":"\u00c1ltal\u00e1nos be\u00e1ll\u00edt\u00e1sok","events_tab":"Esem\u00e9nyek","attrib_tab":"Tulajdons\u00e1gok","general_tab":"\u00c1ltal\u00e1nos","attribute_attrib_tab":"Tulajdons\u00e1gok","attribute_events_tab":"Esem\u00e9nyek","attribute_label_accesskey":"Gyorsbilenty\u0171","attribute_label_tabindex":"TabIndex","attribute_label_langcode":"Nyelv","attribute_option_rtl":"Jobbr\u00f3l balra","attribute_option_ltr":"Balr\u00f3l jobbra","attribute_label_langdir":"Sz\u00f6veg ir\u00e1nya","attribute_label_datetime":"D\u00e1tum/Id\u0151","attribute_label_cite":"Id\u00e9zet","attribute_label_style":"Style","attribute_label_class":"Oszt\u00e1ly (class)","attribute_label_id":"ID","attribute_label_title":"C\u00edm"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/langs/ja_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/langs/ja_dlg.js
new file mode 100644
index 00000000..888522c9
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/plugins/xhtmlxtras/langs/ja_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('ja.xhtmlxtras_dlg',{"attribs_title":"\u5c5e\u6027\u306e\u633f\u5165\u3084\u524a\u9664","option_rtl":"\u53f3\u304b\u3089\u5de6","option_ltr":"\u5de6\u304b\u3089\u53f3","insert_date":"\u73fe\u5728\u306e\u65e5\u4ed8\u3084\u6642\u523b\u3092\u633f\u5165",remove:"\u524a\u9664","title_cite_element":"\u5f15\u7528\u8981\u7d20","title_abbr_element":"\u7565\u8a9e\u8981\u7d20","title_acronym_element":"\u982d\u5b57\u8a9e\u8981\u7d20","title_del_element":"\u8981\u7d20\u3092\u524a\u9664","title_ins_element":"\u8981\u7d20\u3092\u633f\u5165","fieldset_events_tab":"\u8981\u7d20\u306e\u30a4\u30d9\u30f3\u30c8","fieldset_attrib_tab":"\u8981\u7d20\u306e\u5c5e\u6027","fieldset_general_tab":"\u4e00\u822c\u7684\u306a\u8a2d\u5b9a","events_tab":"\u30a4\u30d9\u30f3\u30c8","attrib_tab":"\u5c5e\u6027","general_tab":"\u4e00\u822c","attribute_attrib_tab":"\u5c5e\u6027","attribute_events_tab":"\u30a4\u30d9\u30f3\u30c8","attribute_label_accesskey":"\u30a2\u30af\u30bb\u30b9\u30ad\u30fc","attribute_label_tabindex":"\u30bf\u30d6\u30a4\u30f3\u30c7\u30c3\u30af\u30b9","attribute_label_langcode":"\u8a00\u8a9e","attribute_option_rtl":"\u53f3\u304b\u3089\u5de6","attribute_option_ltr":"\u5de6\u304b\u3089\u53f3","attribute_label_langdir":"\u6587\u7ae0\u306e\u65b9\u5411","attribute_label_datetime":"\u65e5\u4ed8/\u6642\u523b","attribute_label_cite":"\u5f15\u7528","attribute_label_style":"\u30b9\u30bf\u30a4\u30eb","attribute_label_class":"\u30af\u30e9\u30b9","attribute_label_id":"ID","attribute_label_title":"\u30bf\u30a4\u30c8\u30eb"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/about.htm b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/about.htm
new file mode 100755
index 00000000..7a97cb71
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/about.htm
@@ -0,0 +1,52 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>{#advanced_dlg.about_title}</title>
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script type="text/javascript" src="../../utils/mctabs.js"></script>
+ <script type="text/javascript" src="js/about.js"></script>
+</head>
+<body id="about" style="display: none">
+ <div class="tabs">
+ <ul>
+ <li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advanced_dlg.about_general}</a></span></li>
+ <li id="help_tab" style="display:none" aria-hidden="true" aria-controls="help_panel"><span><a href="javascript:mcTabs.displayTab('help_tab','help_panel');" onmousedown="return false;">{#advanced_dlg.about_help}</a></span></li>
+ <li id="plugins_tab" aria-controls="plugins_panel"><span><a href="javascript:mcTabs.displayTab('plugins_tab','plugins_panel');" onmousedown="return false;">{#advanced_dlg.about_plugins}</a></span></li>
+ </ul>
+ </div>
+
+ <div class="panel_wrapper">
+ <div id="general_panel" class="panel current">
+ <h3>{#advanced_dlg.about_title}</h3>
+ <p>Version: <span id="version"></span> (<span id="date"></span>)</p>
+ <p>TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under <a href="../../license.txt" target="_blank">LGPL</a>
+ by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.</p>
+ <p>Copyright &copy; 2003-2008, <a href="http://www.moxiecode.com" target="_blank">Moxiecode Systems AB</a>, All rights reserved.</p>
+ <p>For more information about this software visit the <a href="http://tinymce.moxiecode.com" target="_blank">TinyMCE website</a>.</p>
+
+ <div id="buttoncontainer">
+ <a href="http://www.moxiecode.com" target="_blank"><img src="http://tinymce.moxiecode.com/images/gotmoxie.png" alt="Got Moxie?" border="0" /></a>
+ </div>
+ </div>
+
+ <div id="plugins_panel" class="panel">
+ <div id="pluginscontainer">
+ <h3>{#advanced_dlg.about_loaded}</h3>
+
+ <div id="plugintablecontainer">
+ </div>
+
+ <p>&nbsp;</p>
+ </div>
+ </div>
+
+ <div id="help_panel" class="panel noscroll" style="overflow: visible;">
+ <div id="iframecontainer"></div>
+ </div>
+ </div>
+
+ <div class="mceActionPanel">
+ <input type="button" id="cancel" name="cancel" value="{#close}" onclick="tinyMCEPopup.close();" />
+ </div>
+</body>
+</html>
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/anchor.htm b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/anchor.htm
new file mode 100755
index 00000000..75c93b79
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/anchor.htm
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>{#advanced_dlg.anchor_title}</title>
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script type="text/javascript" src="js/anchor.js"></script>
+</head>
+<body style="display: none" role="application" aria-labelledby="app_title">
+<form onsubmit="AnchorDialog.update();return false;" action="#">
+ <table border="0" cellpadding="4" cellspacing="0" role="presentation">
+ <tr>
+ <td colspan="2" class="title" id="app_title">{#advanced_dlg.anchor_title}</td>
+ </tr>
+ <tr>
+ <td class="nowrap"><label for="anchorName">{#advanced_dlg.anchor_name}:</label></td>
+ <td><input name="anchorName" type="text" class="mceFocus" id="anchorName" value="" style="width: 200px" aria-required="true" /></td>
+ </tr>
+ </table>
+
+ <div class="mceActionPanel">
+ <input type="submit" id="insert" name="insert" value="{#update}" />
+ <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
+ </div>
+</form>
+</body>
+</html>
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/charmap.htm b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/charmap.htm
new file mode 100755
index 00000000..d4b6bdfb
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/charmap.htm
@@ -0,0 +1,55 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>{#advanced_dlg.charmap_title}</title>
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script type="text/javascript" src="js/charmap.js"></script>
+</head>
+<body id="charmap" style="display:none" role="application">
+<table align="center" border="0" cellspacing="0" cellpadding="2" role="presentation">
+ <tr>
+ <td colspan="2" class="title" ><label for="charmapView" id="charmap_label">{#advanced_dlg.charmap_title}</label></td>
+ </tr>
+ <tr>
+ <td id="charmapView" rowspan="2" align="left" valign="top">
+ <!-- Chars will be rendered here -->
+ </td>
+ <td width="100" align="center" valign="top">
+ <table border="0" cellpadding="0" cellspacing="0" width="100" style="height:100px" role="presentation">
+ <tr>
+ <td id="codeV">&nbsp;</td>
+ </tr>
+ <tr>
+ <td id="codeN">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td valign="bottom" style="padding-bottom: 3px;">
+ <table width="100" align="center" border="0" cellpadding="2" cellspacing="0" role="presentation">
+ <tr>
+ <td align="center" style="border-left: 1px solid #666699; border-top: 1px solid #666699; border-right: 1px solid #666699;"><label for="codeA">HTML-Code</label></td>
+ </tr>
+ <tr>
+ <td style="font-size: 16px; font-weight: bold; border-left: 1px solid #666699; border-bottom: 1px solid #666699; border-right: 1px solid #666699;" id="codeA" align="center">&nbsp;</td>
+ </tr>
+ <tr>
+ <td style="font-size: 1px;">&nbsp;</td>
+ </tr>
+ <tr>
+ <td align="center" style="border-left: 1px solid #666699; border-top: 1px solid #666699; border-right: 1px solid #666699;"><label for="codeB">NUM-Code</label></td>
+ </tr>
+ <tr>
+ <td style="font-size: 16px; font-weight: bold; border-left: 1px solid #666699; border-bottom: 1px solid #666699; border-right: 1px solid #666699;" id="codeB" align="center">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" id="charmap_usage">{#advanced_dlg.charmap_usage}</td>
+ </tr>
+
+</table>
+</body>
+</html>
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/color_picker.htm b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/color_picker.htm
new file mode 100755
index 00000000..b625531a
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/color_picker.htm
@@ -0,0 +1,70 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>{#advanced_dlg.colorpicker_title}</title>
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script type="text/javascript" src="../../utils/mctabs.js"></script>
+ <script type="text/javascript" src="js/color_picker.js"></script>
+</head>
+<body id="colorpicker" style="display: none" role="application" aria-labelledby="app_label">
+ <span class="mceVoiceLabel" id="app_label" style="display:none;">{#advanced_dlg.colorpicker_title}</span>
+<form onsubmit="insertAction();return false" action="#">
+ <div class="tabs">
+ <ul>
+ <li id="picker_tab" aria-controls="picker_panel" class="current"><span><a href="javascript:mcTabs.displayTab('picker_tab','picker_panel');" onmousedown="return false;">{#advanced_dlg.colorpicker_picker_tab}</a></span></li>
+ <li id="rgb_tab" aria-controls="rgb_panel"><span><a href="javascript:;" onclick="mcTabs.displayTab('rgb_tab','rgb_panel');" onmousedown="return false;">{#advanced_dlg.colorpicker_palette_tab}</a></span></li>
+ <li id="named_tab" aria-controls="named_panel"><span><a href="javascript:;" onclick="javascript:mcTabs.displayTab('named_tab','named_panel');" onmousedown="return false;">{#advanced_dlg.colorpicker_named_tab}</a></span></li>
+ </ul>
+ </div>
+
+ <div class="panel_wrapper">
+ <div id="picker_panel" class="panel current">
+ <fieldset>
+ <legend>{#advanced_dlg.colorpicker_picker_title}</legend>
+ <div id="picker">
+ <img id="colors" src="img/colorpicker.jpg" onclick="computeColor(event)" onmousedown="isMouseDown = true;return false;" onmouseup="isMouseDown = false;" onmousemove="if (isMouseDown && isMouseOver) computeColor(event); return false;" onmouseover="isMouseOver=true;" onmouseout="isMouseOver=false;" alt="" />
+
+ <div id="light">
+ <!-- Will be filled with divs -->
+ </div>
+
+ <br style="clear: both" />
+ </div>
+ </fieldset>
+ </div>
+
+ <div id="rgb_panel" class="panel">
+ <fieldset>
+ <legend id="webcolors_title">{#advanced_dlg.colorpicker_palette_title}</legend>
+ <div id="webcolors">
+ <!-- Gets filled with web safe colors-->
+ </div>
+
+ <br style="clear: both" />
+ </fieldset>
+ </div>
+
+ <div id="named_panel" class="panel">
+ <fieldset id="named_picker_label">
+ <legend id="named_title">{#advanced_dlg.colorpicker_named_title}</legend>
+ <div id="namedcolors" role="listbox" tabindex="0" aria-labelledby="named_picker_label">
+ <!-- Gets filled with named colors-->
+ </div>
+
+ <br style="clear: both" />
+
+ <div id="colornamecontainer">
+ {#advanced_dlg.colorpicker_name} <span id="colorname"></span>
+ </div>
+ </fieldset>
+ </div>
+ </div>
+
+ <div class="mceActionPanel">
+ <input type="submit" id="insert" name="insert" value="{#apply}" />
+ <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();"/>
+ <div id="preview_wrapper"><div id="previewblock"><label for="color">{#advanced_dlg.colorpicker_color}</label> <input id="color" type="text" size="8" class="text mceFocus" aria-required="true" /></div><span id="preview"></span></div>
+ </div>
+</form>
+</body>
+</html>
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/editor_template.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/editor_template.js
new file mode 100755
index 00000000..cbae1c88
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/editor_template.js
@@ -0,0 +1 @@
+(function(h){var i=h.DOM,g=h.dom.Event,c=h.extend,f=h.each,a=h.util.Cookie,e,d=h.explode;function b(p,m){var k,l,o=p.dom,j="",n,r;previewStyles=p.settings.preview_styles;if(previewStyles===false){return""}if(!previewStyles){previewStyles="font-family font-size font-weight text-decoration text-transform color background-color"}function q(s){return s.replace(/%(\w+)/g,"")}k=m.block||m.inline||"span";l=o.create(k);f(m.styles,function(t,s){t=q(t);if(t){o.setStyle(l,s,t)}});f(m.attributes,function(t,s){t=q(t);if(t){o.setAttrib(l,s,t)}});f(m.classes,function(s){s=q(s);if(!o.hasClass(l,s)){o.addClass(l,s)}});o.setStyles(l,{position:"absolute",left:-65535});p.getBody().appendChild(l);n=o.getStyle(p.getBody(),"fontSize",true);n=/px$/.test(n)?parseInt(n,10):0;f(previewStyles.split(" "),function(s){var t=o.getStyle(l,s,true);if(s=="background-color"&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(t)){t=o.getStyle(p.getBody(),s,true);if(o.toHex(t).toLowerCase()=="#ffffff"){return}}if(s=="font-size"){if(/em|%$/.test(t)){if(n===0){return}t=parseFloat(t,10)/(/%$/.test(t)?100:1);t=(t*n)+"px"}}j+=s+":"+t+";"});o.remove(l);return j}h.ThemeManager.requireLangPack("advanced");h.create("tinymce.themes.AdvancedTheme",{sizes:[8,10,12,14,18,24,36],controls:{bold:["bold_desc","Bold"],italic:["italic_desc","Italic"],underline:["underline_desc","Underline"],strikethrough:["striketrough_desc","Strikethrough"],justifyleft:["justifyleft_desc","JustifyLeft"],justifycenter:["justifycenter_desc","JustifyCenter"],justifyright:["justifyright_desc","JustifyRight"],justifyfull:["justifyfull_desc","JustifyFull"],bullist:["bullist_desc","InsertUnorderedList"],numlist:["numlist_desc","InsertOrderedList"],outdent:["outdent_desc","Outdent"],indent:["indent_desc","Indent"],cut:["cut_desc","Cut"],copy:["copy_desc","Copy"],paste:["paste_desc","Paste"],undo:["undo_desc","Undo"],redo:["redo_desc","Redo"],link:["link_desc","mceLink"],unlink:["unlink_desc","unlink"],image:["image_desc","mceImage"],cleanup:["cleanup_desc","mceCleanup"],help:["help_desc","mceHelp"],code:["code_desc","mceCodeEditor"],hr:["hr_desc","InsertHorizontalRule"],removeformat:["removeformat_desc","RemoveFormat"],sub:["sub_desc","subscript"],sup:["sup_desc","superscript"],forecolor:["forecolor_desc","ForeColor"],forecolorpicker:["forecolor_desc","mceForeColor"],backcolor:["backcolor_desc","HiliteColor"],backcolorpicker:["backcolor_desc","mceBackColor"],charmap:["charmap_desc","mceCharMap"],visualaid:["visualaid_desc","mceToggleVisualAid"],anchor:["anchor_desc","mceInsertAnchor"],newdocument:["newdocument_desc","mceNewDocument"],blockquote:["blockquote_desc","mceBlockQuote"]},stateControls:["bold","italic","underline","strikethrough","bullist","numlist","justifyleft","justifycenter","justifyright","justifyfull","sub","sup","blockquote"],init:function(k,l){var m=this,n,j,p;m.editor=k;m.url=l;m.onResolveName=new h.util.Dispatcher(this);n=k.settings;k.forcedHighContrastMode=k.settings.detect_highcontrast&&m._isHighContrast();k.settings.skin=k.forcedHighContrastMode?"highcontrast":k.settings.skin;if(!n.theme_advanced_buttons1){n=c({theme_advanced_buttons1:"bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",theme_advanced_buttons2:"bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",theme_advanced_buttons3:"hr,removeformat,visualaid,|,sub,sup,|,charmap"},n)}m.settings=n=c({theme_advanced_path:true,theme_advanced_toolbar_location:"top",theme_advanced_blockformats:"p,address,pre,h1,h2,h3,h4,h5,h6",theme_advanced_toolbar_align:"left",theme_advanced_statusbar_location:"bottom",theme_advanced_fonts:"Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",theme_advanced_more_colors:1,theme_advanced_row_height:23,theme_advanced_resize_horizontal:1,theme_advanced_resizing_use_cookie:1,theme_advanced_font_sizes:"1,2,3,4,5,6,7",theme_advanced_font_selector:"span",theme_advanced_show_current_color:0,readonly:k.settings.readonly},n);if(!n.font_size_style_values){n.font_size_style_values="8pt,10pt,12pt,14pt,18pt,24pt,36pt"}if(h.is(n.theme_advanced_font_sizes,"string")){n.font_size_style_values=h.explode(n.font_size_style_values);n.font_size_classes=h.explode(n.font_size_classes||"");p={};k.settings.theme_advanced_font_sizes=n.theme_advanced_font_sizes;f(k.getParam("theme_advanced_font_sizes","","hash"),function(r,q){var o;if(q==r&&r>=1&&r<=7){q=r+" ("+m.sizes[r-1]+"pt)";o=n.font_size_classes[r-1];r=n.font_size_style_values[r-1]||(m.sizes[r-1]+"pt")}if(/^\s*\./.test(r)){o=r.replace(/\./g,"")}p[q]=o?{"class":o}:{fontSize:r}});n.theme_advanced_font_sizes=p}if((j=n.theme_advanced_path_location)&&j!="none"){n.theme_advanced_statusbar_location=n.theme_advanced_path_location}if(n.theme_advanced_statusbar_location=="none"){n.theme_advanced_statusbar_location=0}if(k.settings.content_css!==false){k.contentCSS.push(k.baseURI.toAbsolute(l+"/skins/"+k.settings.skin+"/content.css"))}k.onInit.add(function(){if(!k.settings.readonly){k.onNodeChange.add(m._nodeChanged,m);k.onKeyUp.add(m._updateUndoStatus,m);k.onMouseUp.add(m._updateUndoStatus,m);k.dom.bind(k.dom.getRoot(),"dragend",function(){m._updateUndoStatus(k)})}});k.onSetProgressState.add(function(r,o,s){var t,u=r.id,q;if(o){m.progressTimer=setTimeout(function(){t=r.getContainer();t=t.insertBefore(i.create("DIV",{style:"position:relative"}),t.firstChild);q=i.get(r.id+"_tbl");i.add(t,"div",{id:u+"_blocker","class":"mceBlocker",style:{width:q.clientWidth+2,height:q.clientHeight+2}});i.add(t,"div",{id:u+"_progress","class":"mceProgress",style:{left:q.clientWidth/2,top:q.clientHeight/2}})},s||0)}else{i.remove(u+"_blocker");i.remove(u+"_progress");clearTimeout(m.progressTimer)}});i.loadCSS(n.editor_css?k.documentBaseURI.toAbsolute(n.editor_css):l+"/skins/"+k.settings.skin+"/ui.css");if(n.skin_variant){i.loadCSS(l+"/skins/"+k.settings.skin+"/ui_"+n.skin_variant+".css")}},_isHighContrast:function(){var j,k=i.add(i.getRoot(),"div",{style:"background-color: rgb(171,239,86);"});j=(i.getStyle(k,"background-color",true)+"").toLowerCase().replace(/ /g,"");i.remove(k);return j!="rgb(171,239,86)"&&j!="#abef56"},createControl:function(m,j){var k,l;if(l=j.createControl(m)){return l}switch(m){case"styleselect":return this._createStyleSelect();case"formatselect":return this._createBlockFormats();case"fontselect":return this._createFontSelect();case"fontsizeselect":return this._createFontSizeSelect();case"forecolor":return this._createForeColorMenu();case"backcolor":return this._createBackColorMenu()}if((k=this.controls[m])){return j.createButton(m,{title:"advanced."+k[0],cmd:k[1],ui:k[2],value:k[3]})}},execCommand:function(l,k,m){var j=this["_"+l];if(j){j.call(this,k,m);return true}return false},_importClasses:function(l){var j=this.editor,k=j.controlManager.get("styleselect");if(k.getLength()==0){f(j.dom.getClasses(),function(q,m){var p="style_"+m,n;n={inline:"span",attributes:{"class":q["class"]},selector:"*"};j.formatter.register(p,n);k.add(q["class"],p,{style:function(){return b(j,n)}})})}},_createStyleSelect:function(o){var l=this,j=l.editor,k=j.controlManager,m;m=k.createListBox("styleselect",{title:"advanced.style_select",onselect:function(q){var r,n=[],p;f(m.items,function(s){n.push(s.value)});j.focus();j.undoManager.add();r=j.formatter.matchAll(n);h.each(r,function(s){if(!q||s==q){if(s){j.formatter.remove(s)}p=true}});if(!p){j.formatter.apply(q)}j.undoManager.add();j.nodeChanged();return false}});j.onPreInit.add(function(){var p=0,n=j.getParam("style_formats");if(n){f(n,function(q){var r,s=0;f(q,function(){s++});if(s>1){r=q.name=q.name||"style_"+(p++);j.formatter.register(r,q);m.add(q.title,r,{style:function(){return b(j,q)}})}else{m.add(q.title)}})}else{f(j.getParam("theme_advanced_styles","","hash"),function(t,s){var r,q;if(t){r="style_"+(p++);q={inline:"span",classes:t,selector:"*"};j.formatter.register(r,q);m.add(l.editor.translate(s),r,{style:function(){return b(j,q)}})}})}});if(m.getLength()==0){m.onPostRender.add(function(p,q){if(!m.NativeListBox){g.add(q.id+"_text","focus",l._importClasses,l);g.add(q.id+"_text","mousedown",l._importClasses,l);g.add(q.id+"_open","focus",l._importClasses,l);g.add(q.id+"_open","mousedown",l._importClasses,l)}else{g.add(q.id,"focus",l._importClasses,l)}})}return m},_createFontSelect:function(){var l,k=this,j=k.editor;l=j.controlManager.createListBox("fontselect",{title:"advanced.fontdefault",onselect:function(m){var n=l.items[l.selectedIndex];if(!m&&n){j.execCommand("FontName",false,n.value);return}j.execCommand("FontName",false,m);l.select(function(o){return m==o});if(n&&n.value==m){l.select(null)}return false}});if(l){f(j.getParam("theme_advanced_fonts",k.settings.theme_advanced_fonts,"hash"),function(n,m){l.add(j.translate(m),n,{style:n.indexOf("dings")==-1?"font-family:"+n:""})})}return l},_createFontSizeSelect:function(){var m=this,k=m.editor,n,l=0,j=[];n=k.controlManager.createListBox("fontsizeselect",{title:"advanced.font_size",onselect:function(o){var p=n.items[n.selectedIndex];if(!o&&p){p=p.value;if(p["class"]){k.formatter.toggle("fontsize_class",{value:p["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,p.fontSize)}return}if(o["class"]){k.focus();k.undoManager.add();k.formatter.toggle("fontsize_class",{value:o["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,o.fontSize)}n.select(function(q){return o==q});if(p&&(p.value.fontSize==o.fontSize||p.value["class"]&&p.value["class"]==o["class"])){n.select(null)}return false}});if(n){f(m.settings.theme_advanced_font_sizes,function(p,o){var q=p.fontSize;if(q>=1&&q<=7){q=m.sizes[parseInt(q)-1]+"pt"}n.add(o,p,{style:"font-size:"+q,"class":"mceFontSize"+(l++)+(" "+(p["class"]||""))})})}return n},_createBlockFormats:function(){var l,j={p:"advanced.paragraph",address:"advanced.address",pre:"advanced.pre",h1:"advanced.h1",h2:"advanced.h2",h3:"advanced.h3",h4:"advanced.h4",h5:"advanced.h5",h6:"advanced.h6",div:"advanced.div",blockquote:"advanced.blockquote",code:"advanced.code",dt:"advanced.dt",dd:"advanced.dd",samp:"advanced.samp"},k=this;l=k.editor.controlManager.createListBox("formatselect",{title:"advanced.block",onselect:function(m){k.editor.execCommand("FormatBlock",false,m);return false}});if(l){f(k.editor.getParam("theme_advanced_blockformats",k.settings.theme_advanced_blockformats,"hash"),function(n,m){l.add(k.editor.translate(m!=n?m:j[n]),n,{"class":"mce_formatPreview mce_"+n,style:function(){return b(k.editor,{block:n})}})})}return l},_createForeColorMenu:function(){var n,k=this,l=k.settings,m={},j;if(l.theme_advanced_more_colors){m.more_colors_func=function(){k._mceColorPicker(0,{color:n.value,func:function(o){n.setColor(o)}})}}if(j=l.theme_advanced_text_colors){m.colors=j}if(l.theme_advanced_default_foreground_color){m.default_color=l.theme_advanced_default_foreground_color}m.title="advanced.forecolor_desc";m.cmd="ForeColor";m.scope=this;n=k.editor.controlManager.createColorSplitButton("forecolor",m);return n},_createBackColorMenu:function(){var n,k=this,l=k.settings,m={},j;if(l.theme_advanced_more_colors){m.more_colors_func=function(){k._mceColorPicker(0,{color:n.value,func:function(o){n.setColor(o)}})}}if(j=l.theme_advanced_background_colors){m.colors=j}if(l.theme_advanced_default_background_color){m.default_color=l.theme_advanced_default_background_color}m.title="advanced.backcolor_desc";m.cmd="HiliteColor";m.scope=this;n=k.editor.controlManager.createColorSplitButton("backcolor",m);return n},renderUI:function(l){var q,m,r,w=this,u=w.editor,x=w.settings,v,k,j;if(u.settings){u.settings.aria_label=x.aria_label+u.getLang("advanced.help_shortcut")}q=k=i.create("span",{role:"application","aria-labelledby":u.id+"_voice",id:u.id+"_parent","class":"mceEditor "+u.settings.skin+"Skin"+(x.skin_variant?" "+u.settings.skin+"Skin"+w._ufirst(x.skin_variant):"")+(u.settings.directionality=="rtl"?" mceRtl":"")});i.add(q,"span",{"class":"mceVoiceLabel",style:"display:none;",id:u.id+"_voice"},x.aria_label);if(!i.boxModel){q=i.add(q,"div",{"class":"mceOldBoxModel"})}q=v=i.add(q,"table",{role:"presentation",id:u.id+"_tbl","class":"mceLayout",cellSpacing:0,cellPadding:0});q=r=i.add(q,"tbody");switch((x.theme_advanced_layout_manager||"").toLowerCase()){case"rowlayout":m=w._rowLayout(x,r,l);break;case"customlayout":m=u.execCallback("theme_advanced_custom_layout",x,r,l,k);break;default:m=w._simpleLayout(x,r,l,k)}q=l.targetNode;j=v.rows;i.addClass(j[0],"mceFirst");i.addClass(j[j.length-1],"mceLast");f(i.select("tr",r),function(o){i.addClass(o.firstChild,"mceFirst");i.addClass(o.childNodes[o.childNodes.length-1],"mceLast")});if(i.get(x.theme_advanced_toolbar_container)){i.get(x.theme_advanced_toolbar_container).appendChild(k)}else{i.insertAfter(k,q)}g.add(u.id+"_path_row","click",function(n){n=n.target;if(n.nodeName=="A"){w._sel(n.className.replace(/^.*mcePath_([0-9]+).*$/,"$1"));return false}});if(!u.getParam("accessibility_focus")){g.add(i.add(k,"a",{href:"#"},"<!-- IE -->"),"focus",function(){tinyMCE.get(u.id).focus()})}if(x.theme_advanced_toolbar_location=="external"){l.deltaHeight=0}w.deltaHeight=l.deltaHeight;l.targetNode=null;u.onKeyDown.add(function(p,n){var s=121,o=122;if(n.altKey){if(n.keyCode===s){if(h.isWebKit){window.focus()}w.toolbarGroup.focus();return g.cancel(n)}else{if(n.keyCode===o){i.get(p.id+"_path_row").focus();return g.cancel(n)}}}});u.addShortcut("alt+0","","mceShortcuts",w);return{iframeContainer:m,editorContainer:u.id+"_parent",sizeContainer:v,deltaHeight:l.deltaHeight}},getInfo:function(){return{longname:"Advanced theme",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",version:h.majorVersion+"."+h.minorVersion}},resizeBy:function(j,k){var l=i.get(this.editor.id+"_ifr");this.resizeTo(l.clientWidth+j,l.clientHeight+k)},resizeTo:function(j,n,l){var k=this.editor,m=this.settings,o=i.get(k.id+"_tbl"),p=i.get(k.id+"_ifr");j=Math.max(m.theme_advanced_resizing_min_width||100,j);n=Math.max(m.theme_advanced_resizing_min_height||100,n);j=Math.min(m.theme_advanced_resizing_max_width||65535,j);n=Math.min(m.theme_advanced_resizing_max_height||65535,n);i.setStyle(o,"height","");i.setStyle(p,"height",n);if(m.theme_advanced_resize_horizontal){i.setStyle(o,"width","");i.setStyle(p,"width",j);if(j<o.clientWidth){j=o.clientWidth;i.setStyle(p,"width",o.clientWidth)}}if(l&&m.theme_advanced_resizing_use_cookie){a.setHash("TinyMCE_"+k.id+"_size",{cw:j,ch:n})}},destroy:function(){var j=this.editor.id;g.clear(j+"_resize");g.clear(j+"_path_row");g.clear(j+"_external_close")},_simpleLayout:function(z,u,l,j){var y=this,v=y.editor,w=z.theme_advanced_toolbar_location,q=z.theme_advanced_statusbar_location,m,k,r,x;if(z.readonly){m=i.add(u,"tr");m=k=i.add(m,"td",{"class":"mceIframeContainer"});return k}if(w=="top"){y._addToolbars(u,l)}if(w=="external"){m=x=i.create("div",{style:"position:relative"});m=i.add(m,"div",{id:v.id+"_external","class":"mceExternalToolbar"});i.add(m,"a",{id:v.id+"_external_close",href:"javascript:;","class":"mceExternalClose"});m=i.add(m,"table",{id:v.id+"_tblext",cellSpacing:0,cellPadding:0});r=i.add(m,"tbody");if(j.firstChild.className=="mceOldBoxModel"){j.firstChild.appendChild(x)}else{j.insertBefore(x,j.firstChild)}y._addToolbars(r,l);v.onMouseUp.add(function(){var o=i.get(v.id+"_external");i.show(o);i.hide(e);var n=g.add(v.id+"_external_close","click",function(){i.hide(v.id+"_external");g.remove(v.id+"_external_close","click",n);return false});i.show(o);i.setStyle(o,"top",0-i.getRect(v.id+"_tblext").h-1);i.hide(o);i.show(o);o.style.filter="";e=v.id+"_external";o=null})}if(q=="top"){y._addStatusBar(u,l)}if(!z.theme_advanced_toolbar_container){m=i.add(u,"tr");m=k=i.add(m,"td",{"class":"mceIframeContainer"})}if(w=="bottom"){y._addToolbars(u,l)}if(q=="bottom"){y._addStatusBar(u,l)}return k},_rowLayout:function(x,p,l){var w=this,q=w.editor,v,y,j=q.controlManager,m,k,u,r;v=x.theme_advanced_containers_default_class||"";y=x.theme_advanced_containers_default_align||"center";f(d(x.theme_advanced_containers||""),function(s,o){var n=x["theme_advanced_container_"+s]||"";switch(s.toLowerCase()){case"mceeditor":m=i.add(p,"tr");m=k=i.add(m,"td",{"class":"mceIframeContainer"});break;case"mceelementpath":w._addStatusBar(p,l);break;default:r=(x["theme_advanced_container_"+s+"_align"]||y).toLowerCase();r="mce"+w._ufirst(r);m=i.add(i.add(p,"tr"),"td",{"class":"mceToolbar "+(x["theme_advanced_container_"+s+"_class"]||v)+" "+r||y});u=j.createToolbar("toolbar"+o);w._addControls(n,u);i.setHTML(m,u.renderHTML());l.deltaHeight-=x.theme_advanced_row_height}});return k},_addControls:function(k,j){var l=this,m=l.settings,n,o=l.editor.controlManager;if(m.theme_advanced_disable&&!l._disabled){n={};f(d(m.theme_advanced_disable),function(p){n[p]=1});l._disabled=n}else{n=l._disabled}f(d(k),function(q){var p;if(n&&n[q]){return}if(q=="tablecontrols"){f(["table","|","row_props","cell_props","|","row_before","row_after","delete_row","|","col_before","col_after","delete_col","|","split_cells","merge_cells"],function(r){r=l.createControl(r,o);if(r){j.add(r)}});return}p=l.createControl(q,o);if(p){j.add(p)}})},_addToolbars:function(y,k){var B=this,q,p,u=B.editor,C=B.settings,A,j=u.controlManager,w,l,r=[],z,x,m=false;x=j.createToolbarGroup("toolbargroup",{name:u.getLang("advanced.toolbar"),tab_focus_toolbar:u.getParam("theme_advanced_tab_focus_toolbar")});B.toolbarGroup=x;z=C.theme_advanced_toolbar_align.toLowerCase();z="mce"+B._ufirst(z);l=i.add(i.add(y,"tr",{role:"toolbar"}),"td",{"class":"mceToolbar "+z,role:"toolbar"});for(q=1;(A=C["theme_advanced_buttons"+q]);q++){m=true;p=j.createToolbar("toolbar"+q,{"class":"mceToolbarRow"+q});if(C["theme_advanced_buttons"+q+"_add"]){A+=","+C["theme_advanced_buttons"+q+"_add"]}if(C["theme_advanced_buttons"+q+"_add_before"]){A=C["theme_advanced_buttons"+q+"_add_before"]+","+A}B._addControls(A,p);x.add(p);k.deltaHeight-=C.theme_advanced_row_height}if(!m){k.deltaHeight-=C.theme_advanced_row_height}r.push(x.renderHTML());r.push(i.createHTML("a",{href:"#",accesskey:"z",title:u.getLang("advanced.toolbar_focus"),onfocus:"tinyMCE.getInstanceById('"+u.id+"').focus();"},"<!-- IE -->"));i.setHTML(l,r.join(""))},_addStatusBar:function(p,k){var l,w=this,q=w.editor,x=w.settings,j,u,v,m;l=i.add(p,"tr");l=m=i.add(l,"td",{"class":"mceStatusbar"});l=i.add(l,"div",{id:q.id+"_path_row",role:"group","aria-labelledby":q.id+"_path_voice"});if(x.theme_advanced_path){i.add(l,"span",{id:q.id+"_path_voice"},q.translate("advanced.path"));i.add(l,"span",{},": ")}else{i.add(l,"span",{},"&#160;")}if(x.theme_advanced_resizing){i.add(m,"a",{id:q.id+"_resize",href:"javascript:;",onclick:"return false;","class":"mceResize",tabIndex:"-1"});if(x.theme_advanced_resizing_use_cookie){q.onPostRender.add(function(){var n=a.getHash("TinyMCE_"+q.id+"_size"),r=i.get(q.id+"_tbl");if(!n){return}w.resizeTo(n.cw,n.ch)})}q.onPostRender.add(function(){g.add(q.id+"_resize","click",function(n){n.preventDefault()});g.add(q.id+"_resize","mousedown",function(E){var t,r,s,o,D,A,B,G,n,F,y;function z(H){H.preventDefault();n=B+(H.screenX-D);F=G+(H.screenY-A);w.resizeTo(n,F)}function C(H){g.remove(i.doc,"mousemove",t);g.remove(q.getDoc(),"mousemove",r);g.remove(i.doc,"mouseup",s);g.remove(q.getDoc(),"mouseup",o);n=B+(H.screenX-D);F=G+(H.screenY-A);w.resizeTo(n,F,true);q.nodeChanged()}E.preventDefault();D=E.screenX;A=E.screenY;y=i.get(w.editor.id+"_ifr");B=n=y.clientWidth;G=F=y.clientHeight;t=g.add(i.doc,"mousemove",z);r=g.add(q.getDoc(),"mousemove",z);s=g.add(i.doc,"mouseup",C);o=g.add(q.getDoc(),"mouseup",C)})})}k.deltaHeight-=21;l=p=null},_updateUndoStatus:function(k){var j=k.controlManager,l=k.undoManager;j.setDisabled("undo",!l.hasUndo()&&!l.typing);j.setDisabled("redo",!l.hasRedo())},_nodeChanged:function(o,u,E,r,F){var z=this,D,G=0,y,H,A=z.settings,x,l,w,C,m,k,j;h.each(z.stateControls,function(n){u.setActive(n,o.queryCommandState(z.controls[n][1]))});function q(p){var s,n=F.parents,t=p;if(typeof(p)=="string"){t=function(v){return v.nodeName==p}}for(s=0;s<n.length;s++){if(t(n[s])){return n[s]}}}u.setActive("visualaid",o.hasVisual);z._updateUndoStatus(o);u.setDisabled("outdent",!o.queryCommandState("Outdent"));D=q("A");if(H=u.get("link")){H.setDisabled((!D&&r)||(D&&!D.href));H.setActive(!!D&&(!D.name&&!D.id))}if(H=u.get("unlink")){H.setDisabled(!D&&r);H.setActive(!!D&&!D.name&&!D.id)}if(H=u.get("anchor")){H.setActive(!r&&!!D&&(D.name||(D.id&&!D.href)))}D=q("IMG");if(H=u.get("image")){H.setActive(!r&&!!D&&E.className.indexOf("mceItem")==-1)}if(H=u.get("styleselect")){z._importClasses();k=[];f(H.items,function(n){k.push(n.value)});j=o.formatter.matchAll(k);H.select(j[0]);h.each(j,function(p,n){if(n>0){H.mark(p)}})}if(H=u.get("formatselect")){D=q(o.dom.isBlock);if(D){H.select(D.nodeName.toLowerCase())}}q(function(p){if(p.nodeName==="SPAN"){if(!x&&p.className){x=p.className}}if(o.dom.is(p,A.theme_advanced_font_selector)){if(!l&&p.style.fontSize){l=p.style.fontSize}if(!w&&p.style.fontFamily){w=p.style.fontFamily.replace(/[\"\']+/g,"").replace(/^([^,]+).*/,"$1").toLowerCase()}if(!C&&p.style.color){C=p.style.color}if(!m&&p.style.backgroundColor){m=p.style.backgroundColor}}return false});if(H=u.get("fontselect")){H.select(function(n){return n.replace(/^([^,]+).*/,"$1").toLowerCase()==w})}if(H=u.get("fontsizeselect")){if(A.theme_advanced_runtime_fontsize&&!l&&!x){l=o.dom.getStyle(E,"fontSize",true)}H.select(function(n){if(n.fontSize&&n.fontSize===l){return true}if(n["class"]&&n["class"]===x){return true}})}if(A.theme_advanced_show_current_color){function B(p,n){if(H=u.get(p)){if(!n){n=H.settings.default_color}if(n!==H.value){H.displayColor(n)}}}B("forecolor",C);B("backcolor",m)}if(A.theme_advanced_show_current_color){function B(p,n){if(H=u.get(p)){if(!n){n=H.settings.default_color}if(n!==H.value){H.displayColor(n)}}}B("forecolor",C);B("backcolor",m)}if(A.theme_advanced_path&&A.theme_advanced_statusbar_location){D=i.get(o.id+"_path")||i.add(o.id+"_path_row","span",{id:o.id+"_path"});if(z.statusKeyboardNavigation){z.statusKeyboardNavigation.destroy();z.statusKeyboardNavigation=null}i.setHTML(D,"");q(function(I){var p=I.nodeName.toLowerCase(),s,v,t="";if(I.nodeType!=1||p==="br"||I.getAttribute("data-mce-bogus")||i.hasClass(I,"mceItemHidden")||i.hasClass(I,"mceItemRemoved")){return}if(h.isIE&&I.scopeName!=="HTML"&&I.scopeName){p=I.scopeName+":"+p}p=p.replace(/mce\:/g,"");switch(p){case"b":p="strong";break;case"i":p="em";break;case"img":if(y=i.getAttrib(I,"src")){t+="src: "+y+" "}break;case"a":if(y=i.getAttrib(I,"name")){t+="name: "+y+" ";p+="#"+y}if(y=i.getAttrib(I,"href")){t+="href: "+y+" "}break;case"font":if(y=i.getAttrib(I,"face")){t+="font: "+y+" "}if(y=i.getAttrib(I,"size")){t+="size: "+y+" "}if(y=i.getAttrib(I,"color")){t+="color: "+y+" "}break;case"span":if(y=i.getAttrib(I,"style")){t+="style: "+y+" "}break}if(y=i.getAttrib(I,"id")){t+="id: "+y+" "}if(y=I.className){y=y.replace(/\b\s*(webkit|mce|Apple-)\w+\s*\b/g,"");if(y){t+="class: "+y+" ";if(o.dom.isBlock(I)||p=="img"||p=="span"){p+="."+y}}}p=p.replace(/(html:)/g,"");p={name:p,node:I,title:t};z.onResolveName.dispatch(z,p);t=p.title;p=p.name;v=i.create("a",{href:"javascript:;",role:"button",onmousedown:"return false;",title:t,"class":"mcePath_"+(G++)},p);if(D.hasChildNodes()){D.insertBefore(i.create("span",{"aria-hidden":"true"},"\u00a0\u00bb "),D.firstChild);D.insertBefore(v,D.firstChild)}else{D.appendChild(v)}},o.getBody());if(i.select("a",D).length>0){z.statusKeyboardNavigation=new h.ui.KeyboardNavigation({root:o.id+"_path_row",items:i.select("a",D),excludeFromTabOrder:true,onCancel:function(){o.focus()}},i)}}},_sel:function(j){this.editor.execCommand("mceSelectNodeDepth",false,j)},_mceInsertAnchor:function(l,k){var j=this.editor;j.windowManager.open({url:this.url+"/anchor.htm",width:320+parseInt(j.getLang("advanced.anchor_delta_width",0)),height:90+parseInt(j.getLang("advanced.anchor_delta_height",0)),inline:true},{theme_url:this.url})},_mceCharMap:function(){var j=this.editor;j.windowManager.open({url:this.url+"/charmap.htm",width:550+parseInt(j.getLang("advanced.charmap_delta_width",0)),height:265+parseInt(j.getLang("advanced.charmap_delta_height",0)),inline:true},{theme_url:this.url})},_mceHelp:function(){var j=this.editor;j.windowManager.open({url:this.url+"/about.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceShortcuts:function(){var j=this.editor;j.windowManager.open({url:this.url+"/shortcuts.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceColorPicker:function(l,k){var j=this.editor;k=k||{};j.windowManager.open({url:this.url+"/color_picker.htm",width:375+parseInt(j.getLang("advanced.colorpicker_delta_width",0)),height:250+parseInt(j.getLang("advanced.colorpicker_delta_height",0)),close_previous:false,inline:true},{input_color:k.color,func:k.func,theme_url:this.url})},_mceCodeEditor:function(k,l){var j=this.editor;j.windowManager.open({url:this.url+"/source_editor.htm",width:parseInt(j.getParam("theme_advanced_source_editor_width",720)),height:parseInt(j.getParam("theme_advanced_source_editor_height",580)),inline:true,resizable:true,maximizable:true},{theme_url:this.url})},_mceImage:function(k,l){var j=this.editor;if(j.dom.getAttrib(j.selection.getNode(),"class","").indexOf("mceItem")!=-1){return}j.windowManager.open({url:this.url+"/image.htm",width:355+parseInt(j.getLang("advanced.image_delta_width",0)),height:275+parseInt(j.getLang("advanced.image_delta_height",0)),inline:true},{theme_url:this.url})},_mceLink:function(k,l){var j=this.editor;j.windowManager.open({url:this.url+"/link.htm",width:310+parseInt(j.getLang("advanced.link_delta_width",0)),height:200+parseInt(j.getLang("advanced.link_delta_height",0)),inline:true},{theme_url:this.url})},_mceNewDocument:function(){var j=this.editor;j.windowManager.confirm("advanced.newdocument",function(k){if(k){j.execCommand("mceSetContent",false,"")}})},_mceForeColor:function(){var j=this;this._mceColorPicker(0,{color:j.fgColor,func:function(k){j.fgColor=k;j.editor.execCommand("ForeColor",false,k)}})},_mceBackColor:function(){var j=this;this._mceColorPicker(0,{color:j.bgColor,func:function(k){j.bgColor=k;j.editor.execCommand("HiliteColor",false,k)}})},_ufirst:function(j){return j.substring(0,1).toUpperCase()+j.substring(1)}});h.ThemeManager.add("advanced",h.themes.AdvancedTheme)}(tinymce)); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/editor_template_src.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/editor_template_src.js
new file mode 100755
index 00000000..12deb49c
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/editor_template_src.js
@@ -0,0 +1,1490 @@
+/**
+ * editor_template_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function(tinymce) {
+ var DOM = tinymce.DOM, Event = tinymce.dom.Event, extend = tinymce.extend, each = tinymce.each, Cookie = tinymce.util.Cookie, lastExtID, explode = tinymce.explode;
+
+ // Generates a preview for a format
+ function getPreviewCss(ed, fmt) {
+ var name, previewElm, dom = ed.dom, previewCss = '', parentFontSize, previewStylesName;
+
+ previewStyles = ed.settings.preview_styles;
+
+ // No preview forced
+ if (previewStyles === false)
+ return '';
+
+ // Default preview
+ if (!previewStyles)
+ previewStyles = 'font-family font-size font-weight text-decoration text-transform color background-color';
+
+ // Removes any variables since these can't be previewed
+ function removeVars(val) {
+ return val.replace(/%(\w+)/g, '');
+ };
+
+ // Create block/inline element to use for preview
+ name = fmt.block || fmt.inline || 'span';
+ previewElm = dom.create(name);
+
+ // Add format styles to preview element
+ each(fmt.styles, function(value, name) {
+ value = removeVars(value);
+
+ if (value)
+ dom.setStyle(previewElm, name, value);
+ });
+
+ // Add attributes to preview element
+ each(fmt.attributes, function(value, name) {
+ value = removeVars(value);
+
+ if (value)
+ dom.setAttrib(previewElm, name, value);
+ });
+
+ // Add classes to preview element
+ each(fmt.classes, function(value) {
+ value = removeVars(value);
+
+ if (!dom.hasClass(previewElm, value))
+ dom.addClass(previewElm, value);
+ });
+
+ // Add the previewElm outside the visual area
+ dom.setStyles(previewElm, {position: 'absolute', left: -0xFFFF});
+ ed.getBody().appendChild(previewElm);
+
+ // Get parent container font size so we can compute px values out of em/% for older IE:s
+ parentFontSize = dom.getStyle(ed.getBody(), 'fontSize', true);
+ parentFontSize = /px$/.test(parentFontSize) ? parseInt(parentFontSize, 10) : 0;
+
+ each(previewStyles.split(' '), function(name) {
+ var value = dom.getStyle(previewElm, name, true);
+
+ // If background is transparent then check if the body has a background color we can use
+ if (name == 'background-color' && /transparent|rgba\s*\([^)]+,\s*0\)/.test(value)) {
+ value = dom.getStyle(ed.getBody(), name, true);
+
+ // Ignore white since it's the default color, not the nicest fix
+ if (dom.toHex(value).toLowerCase() == '#ffffff') {
+ return;
+ }
+ }
+
+ // Old IE won't calculate the font size so we need to do that manually
+ if (name == 'font-size') {
+ if (/em|%$/.test(value)) {
+ if (parentFontSize === 0) {
+ return;
+ }
+
+ // Convert font size from em/% to px
+ value = parseFloat(value, 10) / (/%$/.test(value) ? 100 : 1);
+ value = (value * parentFontSize) + 'px';
+ }
+ }
+
+ previewCss += name + ':' + value + ';';
+ });
+
+ dom.remove(previewElm);
+
+ return previewCss;
+ };
+
+ // Tell it to load theme specific language pack(s)
+ tinymce.ThemeManager.requireLangPack('advanced');
+
+ tinymce.create('tinymce.themes.AdvancedTheme', {
+ sizes : [8, 10, 12, 14, 18, 24, 36],
+
+ // Control name lookup, format: title, command
+ controls : {
+ bold : ['bold_desc', 'Bold'],
+ italic : ['italic_desc', 'Italic'],
+ underline : ['underline_desc', 'Underline'],
+ strikethrough : ['striketrough_desc', 'Strikethrough'],
+ justifyleft : ['justifyleft_desc', 'JustifyLeft'],
+ justifycenter : ['justifycenter_desc', 'JustifyCenter'],
+ justifyright : ['justifyright_desc', 'JustifyRight'],
+ justifyfull : ['justifyfull_desc', 'JustifyFull'],
+ bullist : ['bullist_desc', 'InsertUnorderedList'],
+ numlist : ['numlist_desc', 'InsertOrderedList'],
+ outdent : ['outdent_desc', 'Outdent'],
+ indent : ['indent_desc', 'Indent'],
+ cut : ['cut_desc', 'Cut'],
+ copy : ['copy_desc', 'Copy'],
+ paste : ['paste_desc', 'Paste'],
+ undo : ['undo_desc', 'Undo'],
+ redo : ['redo_desc', 'Redo'],
+ link : ['link_desc', 'mceLink'],
+ unlink : ['unlink_desc', 'unlink'],
+ image : ['image_desc', 'mceImage'],
+ cleanup : ['cleanup_desc', 'mceCleanup'],
+ help : ['help_desc', 'mceHelp'],
+ code : ['code_desc', 'mceCodeEditor'],
+ hr : ['hr_desc', 'InsertHorizontalRule'],
+ removeformat : ['removeformat_desc', 'RemoveFormat'],
+ sub : ['sub_desc', 'subscript'],
+ sup : ['sup_desc', 'superscript'],
+ forecolor : ['forecolor_desc', 'ForeColor'],
+ forecolorpicker : ['forecolor_desc', 'mceForeColor'],
+ backcolor : ['backcolor_desc', 'HiliteColor'],
+ backcolorpicker : ['backcolor_desc', 'mceBackColor'],
+ charmap : ['charmap_desc', 'mceCharMap'],
+ visualaid : ['visualaid_desc', 'mceToggleVisualAid'],
+ anchor : ['anchor_desc', 'mceInsertAnchor'],
+ newdocument : ['newdocument_desc', 'mceNewDocument'],
+ blockquote : ['blockquote_desc', 'mceBlockQuote']
+ },
+
+ stateControls : ['bold', 'italic', 'underline', 'strikethrough', 'bullist', 'numlist', 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', 'sub', 'sup', 'blockquote'],
+
+ init : function(ed, url) {
+ var t = this, s, v, o;
+
+ t.editor = ed;
+ t.url = url;
+ t.onResolveName = new tinymce.util.Dispatcher(this);
+ s = ed.settings;
+
+ ed.forcedHighContrastMode = ed.settings.detect_highcontrast && t._isHighContrast();
+ ed.settings.skin = ed.forcedHighContrastMode ? 'highcontrast' : ed.settings.skin;
+
+ // Setup default buttons
+ if (!s.theme_advanced_buttons1) {
+ s = extend({
+ theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",
+ theme_advanced_buttons2 : "bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",
+ theme_advanced_buttons3 : "hr,removeformat,visualaid,|,sub,sup,|,charmap"
+ }, s);
+ }
+
+ // Default settings
+ t.settings = s = extend({
+ theme_advanced_path : true,
+ theme_advanced_toolbar_location : 'top',
+ theme_advanced_blockformats : "p,address,pre,h1,h2,h3,h4,h5,h6",
+ theme_advanced_toolbar_align : "left",
+ theme_advanced_statusbar_location : "bottom",
+ theme_advanced_fonts : "Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",
+ theme_advanced_more_colors : 1,
+ theme_advanced_row_height : 23,
+ theme_advanced_resize_horizontal : 1,
+ theme_advanced_resizing_use_cookie : 1,
+ theme_advanced_font_sizes : "1,2,3,4,5,6,7",
+ theme_advanced_font_selector : "span",
+ theme_advanced_show_current_color: 0,
+ readonly : ed.settings.readonly
+ }, s);
+
+ // Setup default font_size_style_values
+ if (!s.font_size_style_values)
+ s.font_size_style_values = "8pt,10pt,12pt,14pt,18pt,24pt,36pt";
+
+ if (tinymce.is(s.theme_advanced_font_sizes, 'string')) {
+ s.font_size_style_values = tinymce.explode(s.font_size_style_values);
+ s.font_size_classes = tinymce.explode(s.font_size_classes || '');
+
+ // Parse string value
+ o = {};
+ ed.settings.theme_advanced_font_sizes = s.theme_advanced_font_sizes;
+ each(ed.getParam('theme_advanced_font_sizes', '', 'hash'), function(v, k) {
+ var cl;
+
+ if (k == v && v >= 1 && v <= 7) {
+ k = v + ' (' + t.sizes[v - 1] + 'pt)';
+ cl = s.font_size_classes[v - 1];
+ v = s.font_size_style_values[v - 1] || (t.sizes[v - 1] + 'pt');
+ }
+
+ if (/^\s*\./.test(v))
+ cl = v.replace(/\./g, '');
+
+ o[k] = cl ? {'class' : cl} : {fontSize : v};
+ });
+
+ s.theme_advanced_font_sizes = o;
+ }
+
+ if ((v = s.theme_advanced_path_location) && v != 'none')
+ s.theme_advanced_statusbar_location = s.theme_advanced_path_location;
+
+ if (s.theme_advanced_statusbar_location == 'none')
+ s.theme_advanced_statusbar_location = 0;
+
+ if (ed.settings.content_css !== false)
+ ed.contentCSS.push(ed.baseURI.toAbsolute(url + "/skins/" + ed.settings.skin + "/content.css"));
+
+ // Init editor
+ ed.onInit.add(function() {
+ if (!ed.settings.readonly) {
+ ed.onNodeChange.add(t._nodeChanged, t);
+ ed.onKeyUp.add(t._updateUndoStatus, t);
+ ed.onMouseUp.add(t._updateUndoStatus, t);
+ ed.dom.bind(ed.dom.getRoot(), 'dragend', function() {
+ t._updateUndoStatus(ed);
+ });
+ }
+ });
+
+ ed.onSetProgressState.add(function(ed, b, ti) {
+ var co, id = ed.id, tb;
+
+ if (b) {
+ t.progressTimer = setTimeout(function() {
+ co = ed.getContainer();
+ co = co.insertBefore(DOM.create('DIV', {style : 'position:relative'}), co.firstChild);
+ tb = DOM.get(ed.id + '_tbl');
+
+ DOM.add(co, 'div', {id : id + '_blocker', 'class' : 'mceBlocker', style : {width : tb.clientWidth + 2, height : tb.clientHeight + 2}});
+ DOM.add(co, 'div', {id : id + '_progress', 'class' : 'mceProgress', style : {left : tb.clientWidth / 2, top : tb.clientHeight / 2}});
+ }, ti || 0);
+ } else {
+ DOM.remove(id + '_blocker');
+ DOM.remove(id + '_progress');
+ clearTimeout(t.progressTimer);
+ }
+ });
+
+ DOM.loadCSS(s.editor_css ? ed.documentBaseURI.toAbsolute(s.editor_css) : url + "/skins/" + ed.settings.skin + "/ui.css");
+
+ if (s.skin_variant)
+ DOM.loadCSS(url + "/skins/" + ed.settings.skin + "/ui_" + s.skin_variant + ".css");
+ },
+
+ _isHighContrast : function() {
+ var actualColor, div = DOM.add(DOM.getRoot(), 'div', {'style': 'background-color: rgb(171,239,86);'});
+
+ actualColor = (DOM.getStyle(div, 'background-color', true) + '').toLowerCase().replace(/ /g, '');
+ DOM.remove(div);
+
+ return actualColor != 'rgb(171,239,86)' && actualColor != '#abef56';
+ },
+
+ createControl : function(n, cf) {
+ var cd, c;
+
+ if (c = cf.createControl(n))
+ return c;
+
+ switch (n) {
+ case "styleselect":
+ return this._createStyleSelect();
+
+ case "formatselect":
+ return this._createBlockFormats();
+
+ case "fontselect":
+ return this._createFontSelect();
+
+ case "fontsizeselect":
+ return this._createFontSizeSelect();
+
+ case "forecolor":
+ return this._createForeColorMenu();
+
+ case "backcolor":
+ return this._createBackColorMenu();
+ }
+
+ if ((cd = this.controls[n]))
+ return cf.createButton(n, {title : "advanced." + cd[0], cmd : cd[1], ui : cd[2], value : cd[3]});
+ },
+
+ execCommand : function(cmd, ui, val) {
+ var f = this['_' + cmd];
+
+ if (f) {
+ f.call(this, ui, val);
+ return true;
+ }
+
+ return false;
+ },
+
+ _importClasses : function(e) {
+ var ed = this.editor, ctrl = ed.controlManager.get('styleselect');
+
+ if (ctrl.getLength() == 0) {
+ each(ed.dom.getClasses(), function(o, idx) {
+ var name = 'style_' + idx, fmt;
+
+ fmt = {
+ inline : 'span',
+ attributes : {'class' : o['class']},
+ selector : '*'
+ };
+
+ ed.formatter.register(name, fmt);
+
+ ctrl.add(o['class'], name, {
+ style: function() {
+ return getPreviewCss(ed, fmt);
+ }
+ });
+ });
+ }
+ },
+
+ _createStyleSelect : function(n) {
+ var t = this, ed = t.editor, ctrlMan = ed.controlManager, ctrl;
+
+ // Setup style select box
+ ctrl = ctrlMan.createListBox('styleselect', {
+ title : 'advanced.style_select',
+ onselect : function(name) {
+ var matches, formatNames = [], removedFormat;
+
+ each(ctrl.items, function(item) {
+ formatNames.push(item.value);
+ });
+
+ ed.focus();
+ ed.undoManager.add();
+
+ // Toggle off the current format(s)
+ matches = ed.formatter.matchAll(formatNames);
+ tinymce.each(matches, function(match) {
+ if (!name || match == name) {
+ if (match)
+ ed.formatter.remove(match);
+
+ removedFormat = true;
+ }
+ });
+
+ if (!removedFormat)
+ ed.formatter.apply(name);
+
+ ed.undoManager.add();
+ ed.nodeChanged();
+
+ return false; // No auto select
+ }
+ });
+
+ // Handle specified format
+ ed.onPreInit.add(function() {
+ var counter = 0, formats = ed.getParam('style_formats');
+
+ if (formats) {
+ each(formats, function(fmt) {
+ var name, keys = 0;
+
+ each(fmt, function() {keys++;});
+
+ if (keys > 1) {
+ name = fmt.name = fmt.name || 'style_' + (counter++);
+ ed.formatter.register(name, fmt);
+ ctrl.add(fmt.title, name, {
+ style: function() {
+ return getPreviewCss(ed, fmt);
+ }
+ });
+ } else
+ ctrl.add(fmt.title);
+ });
+ } else {
+ each(ed.getParam('theme_advanced_styles', '', 'hash'), function(val, key) {
+ var name, fmt;
+
+ if (val) {
+ name = 'style_' + (counter++);
+ fmt = {
+ inline : 'span',
+ classes : val,
+ selector : '*'
+ };
+
+ ed.formatter.register(name, fmt);
+ ctrl.add(t.editor.translate(key), name, {
+ style: function() {
+ return getPreviewCss(ed, fmt);
+ }
+ });
+ }
+ });
+ }
+ });
+
+ // Auto import classes if the ctrl box is empty
+ if (ctrl.getLength() == 0) {
+ ctrl.onPostRender.add(function(ed, n) {
+ if (!ctrl.NativeListBox) {
+ Event.add(n.id + '_text', 'focus', t._importClasses, t);
+ Event.add(n.id + '_text', 'mousedown', t._importClasses, t);
+ Event.add(n.id + '_open', 'focus', t._importClasses, t);
+ Event.add(n.id + '_open', 'mousedown', t._importClasses, t);
+ } else
+ Event.add(n.id, 'focus', t._importClasses, t);
+ });
+ }
+
+ return ctrl;
+ },
+
+ _createFontSelect : function() {
+ var c, t = this, ed = t.editor;
+
+ c = ed.controlManager.createListBox('fontselect', {
+ title : 'advanced.fontdefault',
+ onselect : function(v) {
+ var cur = c.items[c.selectedIndex];
+
+ if (!v && cur) {
+ ed.execCommand('FontName', false, cur.value);
+ return;
+ }
+
+ ed.execCommand('FontName', false, v);
+
+ // Fake selection, execCommand will fire a nodeChange and update the selection
+ c.select(function(sv) {
+ return v == sv;
+ });
+
+ if (cur && cur.value == v) {
+ c.select(null);
+ }
+
+ return false; // No auto select
+ }
+ });
+
+ if (c) {
+ each(ed.getParam('theme_advanced_fonts', t.settings.theme_advanced_fonts, 'hash'), function(v, k) {
+ c.add(ed.translate(k), v, {style : v.indexOf('dings') == -1 ? 'font-family:' + v : ''});
+ });
+ }
+
+ return c;
+ },
+
+ _createFontSizeSelect : function() {
+ var t = this, ed = t.editor, c, i = 0, cl = [];
+
+ c = ed.controlManager.createListBox('fontsizeselect', {title : 'advanced.font_size', onselect : function(v) {
+ var cur = c.items[c.selectedIndex];
+
+ if (!v && cur) {
+ cur = cur.value;
+
+ if (cur['class']) {
+ ed.formatter.toggle('fontsize_class', {value : cur['class']});
+ ed.undoManager.add();
+ ed.nodeChanged();
+ } else {
+ ed.execCommand('FontSize', false, cur.fontSize);
+ }
+
+ return;
+ }
+
+ if (v['class']) {
+ ed.focus();
+ ed.undoManager.add();
+ ed.formatter.toggle('fontsize_class', {value : v['class']});
+ ed.undoManager.add();
+ ed.nodeChanged();
+ } else
+ ed.execCommand('FontSize', false, v.fontSize);
+
+ // Fake selection, execCommand will fire a nodeChange and update the selection
+ c.select(function(sv) {
+ return v == sv;
+ });
+
+ if (cur && (cur.value.fontSize == v.fontSize || cur.value['class'] && cur.value['class'] == v['class'])) {
+ c.select(null);
+ }
+
+ return false; // No auto select
+ }});
+
+ if (c) {
+ each(t.settings.theme_advanced_font_sizes, function(v, k) {
+ var fz = v.fontSize;
+
+ if (fz >= 1 && fz <= 7)
+ fz = t.sizes[parseInt(fz) - 1] + 'pt';
+
+ c.add(k, v, {'style' : 'font-size:' + fz, 'class' : 'mceFontSize' + (i++) + (' ' + (v['class'] || ''))});
+ });
+ }
+
+ return c;
+ },
+
+ _createBlockFormats : function() {
+ var c, fmts = {
+ p : 'advanced.paragraph',
+ address : 'advanced.address',
+ pre : 'advanced.pre',
+ h1 : 'advanced.h1',
+ h2 : 'advanced.h2',
+ h3 : 'advanced.h3',
+ h4 : 'advanced.h4',
+ h5 : 'advanced.h5',
+ h6 : 'advanced.h6',
+ div : 'advanced.div',
+ blockquote : 'advanced.blockquote',
+ code : 'advanced.code',
+ dt : 'advanced.dt',
+ dd : 'advanced.dd',
+ samp : 'advanced.samp'
+ }, t = this;
+
+ c = t.editor.controlManager.createListBox('formatselect', {title : 'advanced.block', onselect : function(v) {
+ t.editor.execCommand('FormatBlock', false, v);
+ return false;
+ }});
+
+ if (c) {
+ each(t.editor.getParam('theme_advanced_blockformats', t.settings.theme_advanced_blockformats, 'hash'), function(v, k) {
+ c.add(t.editor.translate(k != v ? k : fmts[v]), v, {'class' : 'mce_formatPreview mce_' + v, style: function() {
+ return getPreviewCss(t.editor, {block: v});
+ }});
+ });
+ }
+
+ return c;
+ },
+
+ _createForeColorMenu : function() {
+ var c, t = this, s = t.settings, o = {}, v;
+
+ if (s.theme_advanced_more_colors) {
+ o.more_colors_func = function() {
+ t._mceColorPicker(0, {
+ color : c.value,
+ func : function(co) {
+ c.setColor(co);
+ }
+ });
+ };
+ }
+
+ if (v = s.theme_advanced_text_colors)
+ o.colors = v;
+
+ if (s.theme_advanced_default_foreground_color)
+ o.default_color = s.theme_advanced_default_foreground_color;
+
+ o.title = 'advanced.forecolor_desc';
+ o.cmd = 'ForeColor';
+ o.scope = this;
+
+ c = t.editor.controlManager.createColorSplitButton('forecolor', o);
+
+ return c;
+ },
+
+ _createBackColorMenu : function() {
+ var c, t = this, s = t.settings, o = {}, v;
+
+ if (s.theme_advanced_more_colors) {
+ o.more_colors_func = function() {
+ t._mceColorPicker(0, {
+ color : c.value,
+ func : function(co) {
+ c.setColor(co);
+ }
+ });
+ };
+ }
+
+ if (v = s.theme_advanced_background_colors)
+ o.colors = v;
+
+ if (s.theme_advanced_default_background_color)
+ o.default_color = s.theme_advanced_default_background_color;
+
+ o.title = 'advanced.backcolor_desc';
+ o.cmd = 'HiliteColor';
+ o.scope = this;
+
+ c = t.editor.controlManager.createColorSplitButton('backcolor', o);
+
+ return c;
+ },
+
+ renderUI : function(o) {
+ var n, ic, tb, t = this, ed = t.editor, s = t.settings, sc, p, nl;
+
+ if (ed.settings) {
+ ed.settings.aria_label = s.aria_label + ed.getLang('advanced.help_shortcut');
+ }
+
+ // TODO: ACC Should have an aria-describedby attribute which is user-configurable to describe what this field is actually for.
+ // Maybe actually inherit it from the original textara?
+ n = p = DOM.create('span', {role : 'application', 'aria-labelledby' : ed.id + '_voice', id : ed.id + '_parent', 'class' : 'mceEditor ' + ed.settings.skin + 'Skin' + (s.skin_variant ? ' ' + ed.settings.skin + 'Skin' + t._ufirst(s.skin_variant) : '') + (ed.settings.directionality == "rtl" ? ' mceRtl' : '')});
+ DOM.add(n, 'span', {'class': 'mceVoiceLabel', 'style': 'display:none;', id: ed.id + '_voice'}, s.aria_label);
+
+ if (!DOM.boxModel)
+ n = DOM.add(n, 'div', {'class' : 'mceOldBoxModel'});
+
+ n = sc = DOM.add(n, 'table', {role : "presentation", id : ed.id + '_tbl', 'class' : 'mceLayout', cellSpacing : 0, cellPadding : 0});
+ n = tb = DOM.add(n, 'tbody');
+
+ switch ((s.theme_advanced_layout_manager || '').toLowerCase()) {
+ case "rowlayout":
+ ic = t._rowLayout(s, tb, o);
+ break;
+
+ case "customlayout":
+ ic = ed.execCallback("theme_advanced_custom_layout", s, tb, o, p);
+ break;
+
+ default:
+ ic = t._simpleLayout(s, tb, o, p);
+ }
+
+ n = o.targetNode;
+
+ // Add classes to first and last TRs
+ nl = sc.rows;
+ DOM.addClass(nl[0], 'mceFirst');
+ DOM.addClass(nl[nl.length - 1], 'mceLast');
+
+ // Add classes to first and last TDs
+ each(DOM.select('tr', tb), function(n) {
+ DOM.addClass(n.firstChild, 'mceFirst');
+ DOM.addClass(n.childNodes[n.childNodes.length - 1], 'mceLast');
+ });
+
+ if (DOM.get(s.theme_advanced_toolbar_container))
+ DOM.get(s.theme_advanced_toolbar_container).appendChild(p);
+ else
+ DOM.insertAfter(p, n);
+
+ Event.add(ed.id + '_path_row', 'click', function(e) {
+ e = e.target;
+
+ if (e.nodeName == 'A') {
+ t._sel(e.className.replace(/^.*mcePath_([0-9]+).*$/, '$1'));
+ return false;
+ }
+ });
+/*
+ if (DOM.get(ed.id + '_path_row')) {
+ Event.add(ed.id + '_tbl', 'mouseover', function(e) {
+ var re;
+
+ e = e.target;
+
+ if (e.nodeName == 'SPAN' && DOM.hasClass(e.parentNode, 'mceButton')) {
+ re = DOM.get(ed.id + '_path_row');
+ t.lastPath = re.innerHTML;
+ DOM.setHTML(re, e.parentNode.title);
+ }
+ });
+
+ Event.add(ed.id + '_tbl', 'mouseout', function(e) {
+ if (t.lastPath) {
+ DOM.setHTML(ed.id + '_path_row', t.lastPath);
+ t.lastPath = 0;
+ }
+ });
+ }
+*/
+
+ if (!ed.getParam('accessibility_focus'))
+ Event.add(DOM.add(p, 'a', {href : '#'}, '<!-- IE -->'), 'focus', function() {tinyMCE.get(ed.id).focus();});
+
+ if (s.theme_advanced_toolbar_location == 'external')
+ o.deltaHeight = 0;
+
+ t.deltaHeight = o.deltaHeight;
+ o.targetNode = null;
+
+ ed.onKeyDown.add(function(ed, evt) {
+ var DOM_VK_F10 = 121, DOM_VK_F11 = 122;
+
+ if (evt.altKey) {
+ if (evt.keyCode === DOM_VK_F10) {
+ // Make sure focus is given to toolbar in Safari.
+ // We can't do this in IE as it prevents giving focus to toolbar when editor is in a frame
+ if (tinymce.isWebKit) {
+ window.focus();
+ }
+ t.toolbarGroup.focus();
+ return Event.cancel(evt);
+ } else if (evt.keyCode === DOM_VK_F11) {
+ DOM.get(ed.id + '_path_row').focus();
+ return Event.cancel(evt);
+ }
+ }
+ });
+
+ // alt+0 is the UK recommended shortcut for accessing the list of access controls.
+ ed.addShortcut('alt+0', '', 'mceShortcuts', t);
+
+ return {
+ iframeContainer : ic,
+ editorContainer : ed.id + '_parent',
+ sizeContainer : sc,
+ deltaHeight : o.deltaHeight
+ };
+ },
+
+ getInfo : function() {
+ return {
+ longname : 'Advanced theme',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ }
+ },
+
+ resizeBy : function(dw, dh) {
+ var e = DOM.get(this.editor.id + '_ifr');
+
+ this.resizeTo(e.clientWidth + dw, e.clientHeight + dh);
+ },
+
+ resizeTo : function(w, h, store) {
+ var ed = this.editor, s = this.settings, e = DOM.get(ed.id + '_tbl'), ifr = DOM.get(ed.id + '_ifr');
+
+ // Boundery fix box
+ w = Math.max(s.theme_advanced_resizing_min_width || 100, w);
+ h = Math.max(s.theme_advanced_resizing_min_height || 100, h);
+ w = Math.min(s.theme_advanced_resizing_max_width || 0xFFFF, w);
+ h = Math.min(s.theme_advanced_resizing_max_height || 0xFFFF, h);
+
+ // Resize iframe and container
+ DOM.setStyle(e, 'height', '');
+ DOM.setStyle(ifr, 'height', h);
+
+ if (s.theme_advanced_resize_horizontal) {
+ DOM.setStyle(e, 'width', '');
+ DOM.setStyle(ifr, 'width', w);
+
+ // Make sure that the size is never smaller than the over all ui
+ if (w < e.clientWidth) {
+ w = e.clientWidth;
+ DOM.setStyle(ifr, 'width', e.clientWidth);
+ }
+ }
+
+ // Store away the size
+ if (store && s.theme_advanced_resizing_use_cookie) {
+ Cookie.setHash("TinyMCE_" + ed.id + "_size", {
+ cw : w,
+ ch : h
+ });
+ }
+ },
+
+ destroy : function() {
+ var id = this.editor.id;
+
+ Event.clear(id + '_resize');
+ Event.clear(id + '_path_row');
+ Event.clear(id + '_external_close');
+ },
+
+ // Internal functions
+
+ _simpleLayout : function(s, tb, o, p) {
+ var t = this, ed = t.editor, lo = s.theme_advanced_toolbar_location, sl = s.theme_advanced_statusbar_location, n, ic, etb, c;
+
+ if (s.readonly) {
+ n = DOM.add(tb, 'tr');
+ n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'});
+ return ic;
+ }
+
+ // Create toolbar container at top
+ if (lo == 'top')
+ t._addToolbars(tb, o);
+
+ // Create external toolbar
+ if (lo == 'external') {
+ n = c = DOM.create('div', {style : 'position:relative'});
+ n = DOM.add(n, 'div', {id : ed.id + '_external', 'class' : 'mceExternalToolbar'});
+ DOM.add(n, 'a', {id : ed.id + '_external_close', href : 'javascript:;', 'class' : 'mceExternalClose'});
+ n = DOM.add(n, 'table', {id : ed.id + '_tblext', cellSpacing : 0, cellPadding : 0});
+ etb = DOM.add(n, 'tbody');
+
+ if (p.firstChild.className == 'mceOldBoxModel')
+ p.firstChild.appendChild(c);
+ else
+ p.insertBefore(c, p.firstChild);
+
+ t._addToolbars(etb, o);
+
+ ed.onMouseUp.add(function() {
+ var e = DOM.get(ed.id + '_external');
+ DOM.show(e);
+
+ DOM.hide(lastExtID);
+
+ var f = Event.add(ed.id + '_external_close', 'click', function() {
+ DOM.hide(ed.id + '_external');
+ Event.remove(ed.id + '_external_close', 'click', f);
+ return false;
+ });
+
+ DOM.show(e);
+ DOM.setStyle(e, 'top', 0 - DOM.getRect(ed.id + '_tblext').h - 1);
+
+ // Fixes IE rendering bug
+ DOM.hide(e);
+ DOM.show(e);
+ e.style.filter = '';
+
+ lastExtID = ed.id + '_external';
+
+ e = null;
+ });
+ }
+
+ if (sl == 'top')
+ t._addStatusBar(tb, o);
+
+ // Create iframe container
+ if (!s.theme_advanced_toolbar_container) {
+ n = DOM.add(tb, 'tr');
+ n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'});
+ }
+
+ // Create toolbar container at bottom
+ if (lo == 'bottom')
+ t._addToolbars(tb, o);
+
+ if (sl == 'bottom')
+ t._addStatusBar(tb, o);
+
+ return ic;
+ },
+
+ _rowLayout : function(s, tb, o) {
+ var t = this, ed = t.editor, dc, da, cf = ed.controlManager, n, ic, to, a;
+
+ dc = s.theme_advanced_containers_default_class || '';
+ da = s.theme_advanced_containers_default_align || 'center';
+
+ each(explode(s.theme_advanced_containers || ''), function(c, i) {
+ var v = s['theme_advanced_container_' + c] || '';
+
+ switch (c.toLowerCase()) {
+ case 'mceeditor':
+ n = DOM.add(tb, 'tr');
+ n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'});
+ break;
+
+ case 'mceelementpath':
+ t._addStatusBar(tb, o);
+ break;
+
+ default:
+ a = (s['theme_advanced_container_' + c + '_align'] || da).toLowerCase();
+ a = 'mce' + t._ufirst(a);
+
+ n = DOM.add(DOM.add(tb, 'tr'), 'td', {
+ 'class' : 'mceToolbar ' + (s['theme_advanced_container_' + c + '_class'] || dc) + ' ' + a || da
+ });
+
+ to = cf.createToolbar("toolbar" + i);
+ t._addControls(v, to);
+ DOM.setHTML(n, to.renderHTML());
+ o.deltaHeight -= s.theme_advanced_row_height;
+ }
+ });
+
+ return ic;
+ },
+
+ _addControls : function(v, tb) {
+ var t = this, s = t.settings, di, cf = t.editor.controlManager;
+
+ if (s.theme_advanced_disable && !t._disabled) {
+ di = {};
+
+ each(explode(s.theme_advanced_disable), function(v) {
+ di[v] = 1;
+ });
+
+ t._disabled = di;
+ } else
+ di = t._disabled;
+
+ each(explode(v), function(n) {
+ var c;
+
+ if (di && di[n])
+ return;
+
+ // Compatiblity with 2.x
+ if (n == 'tablecontrols') {
+ each(["table","|","row_props","cell_props","|","row_before","row_after","delete_row","|","col_before","col_after","delete_col","|","split_cells","merge_cells"], function(n) {
+ n = t.createControl(n, cf);
+
+ if (n)
+ tb.add(n);
+ });
+
+ return;
+ }
+
+ c = t.createControl(n, cf);
+
+ if (c)
+ tb.add(c);
+ });
+ },
+
+ _addToolbars : function(c, o) {
+ var t = this, i, tb, ed = t.editor, s = t.settings, v, cf = ed.controlManager, di, n, h = [], a, toolbarGroup, toolbarsExist = false;
+
+ toolbarGroup = cf.createToolbarGroup('toolbargroup', {
+ 'name': ed.getLang('advanced.toolbar'),
+ 'tab_focus_toolbar':ed.getParam('theme_advanced_tab_focus_toolbar')
+ });
+
+ t.toolbarGroup = toolbarGroup;
+
+ a = s.theme_advanced_toolbar_align.toLowerCase();
+ a = 'mce' + t._ufirst(a);
+
+ n = DOM.add(DOM.add(c, 'tr', {role: 'toolbar'}), 'td', {'class' : 'mceToolbar ' + a, "role":"toolbar"});
+
+ // Create toolbar and add the controls
+ for (i=1; (v = s['theme_advanced_buttons' + i]); i++) {
+ toolbarsExist = true;
+ tb = cf.createToolbar("toolbar" + i, {'class' : 'mceToolbarRow' + i});
+
+ if (s['theme_advanced_buttons' + i + '_add'])
+ v += ',' + s['theme_advanced_buttons' + i + '_add'];
+
+ if (s['theme_advanced_buttons' + i + '_add_before'])
+ v = s['theme_advanced_buttons' + i + '_add_before'] + ',' + v;
+
+ t._addControls(v, tb);
+ toolbarGroup.add(tb);
+
+ o.deltaHeight -= s.theme_advanced_row_height;
+ }
+ // Handle case when there are no toolbar buttons and ensure editor height is adjusted accordingly
+ if (!toolbarsExist)
+ o.deltaHeight -= s.theme_advanced_row_height;
+ h.push(toolbarGroup.renderHTML());
+ h.push(DOM.createHTML('a', {href : '#', accesskey : 'z', title : ed.getLang("advanced.toolbar_focus"), onfocus : 'tinyMCE.getInstanceById(\'' + ed.id + '\').focus();'}, '<!-- IE -->'));
+ DOM.setHTML(n, h.join(''));
+ },
+
+ _addStatusBar : function(tb, o) {
+ var n, t = this, ed = t.editor, s = t.settings, r, mf, me, td;
+
+ n = DOM.add(tb, 'tr');
+ n = td = DOM.add(n, 'td', {'class' : 'mceStatusbar'});
+ n = DOM.add(n, 'div', {id : ed.id + '_path_row', 'role': 'group', 'aria-labelledby': ed.id + '_path_voice'});
+ if (s.theme_advanced_path) {
+ DOM.add(n, 'span', {id: ed.id + '_path_voice'}, ed.translate('advanced.path'));
+ DOM.add(n, 'span', {}, ': ');
+ } else {
+ DOM.add(n, 'span', {}, '&#160;');
+ }
+
+
+ if (s.theme_advanced_resizing) {
+ DOM.add(td, 'a', {id : ed.id + '_resize', href : 'javascript:;', onclick : "return false;", 'class' : 'mceResize', tabIndex:"-1"});
+
+ if (s.theme_advanced_resizing_use_cookie) {
+ ed.onPostRender.add(function() {
+ var o = Cookie.getHash("TinyMCE_" + ed.id + "_size"), c = DOM.get(ed.id + '_tbl');
+
+ if (!o)
+ return;
+
+ t.resizeTo(o.cw, o.ch);
+ });
+ }
+
+ ed.onPostRender.add(function() {
+ Event.add(ed.id + '_resize', 'click', function(e) {
+ e.preventDefault();
+ });
+
+ Event.add(ed.id + '_resize', 'mousedown', function(e) {
+ var mouseMoveHandler1, mouseMoveHandler2,
+ mouseUpHandler1, mouseUpHandler2,
+ startX, startY, startWidth, startHeight, width, height, ifrElm;
+
+ function resizeOnMove(e) {
+ e.preventDefault();
+
+ width = startWidth + (e.screenX - startX);
+ height = startHeight + (e.screenY - startY);
+
+ t.resizeTo(width, height);
+ };
+
+ function endResize(e) {
+ // Stop listening
+ Event.remove(DOM.doc, 'mousemove', mouseMoveHandler1);
+ Event.remove(ed.getDoc(), 'mousemove', mouseMoveHandler2);
+ Event.remove(DOM.doc, 'mouseup', mouseUpHandler1);
+ Event.remove(ed.getDoc(), 'mouseup', mouseUpHandler2);
+
+ width = startWidth + (e.screenX - startX);
+ height = startHeight + (e.screenY - startY);
+ t.resizeTo(width, height, true);
+
+ ed.nodeChanged();
+ };
+
+ e.preventDefault();
+
+ // Get the current rect size
+ startX = e.screenX;
+ startY = e.screenY;
+ ifrElm = DOM.get(t.editor.id + '_ifr');
+ startWidth = width = ifrElm.clientWidth;
+ startHeight = height = ifrElm.clientHeight;
+
+ // Register envent handlers
+ mouseMoveHandler1 = Event.add(DOM.doc, 'mousemove', resizeOnMove);
+ mouseMoveHandler2 = Event.add(ed.getDoc(), 'mousemove', resizeOnMove);
+ mouseUpHandler1 = Event.add(DOM.doc, 'mouseup', endResize);
+ mouseUpHandler2 = Event.add(ed.getDoc(), 'mouseup', endResize);
+ });
+ });
+ }
+
+ o.deltaHeight -= 21;
+ n = tb = null;
+ },
+
+ _updateUndoStatus : function(ed) {
+ var cm = ed.controlManager, um = ed.undoManager;
+
+ cm.setDisabled('undo', !um.hasUndo() && !um.typing);
+ cm.setDisabled('redo', !um.hasRedo());
+ },
+
+ _nodeChanged : function(ed, cm, n, co, ob) {
+ var t = this, p, de = 0, v, c, s = t.settings, cl, fz, fn, fc, bc, formatNames, matches;
+
+ tinymce.each(t.stateControls, function(c) {
+ cm.setActive(c, ed.queryCommandState(t.controls[c][1]));
+ });
+
+ function getParent(name) {
+ var i, parents = ob.parents, func = name;
+
+ if (typeof(name) == 'string') {
+ func = function(node) {
+ return node.nodeName == name;
+ };
+ }
+
+ for (i = 0; i < parents.length; i++) {
+ if (func(parents[i]))
+ return parents[i];
+ }
+ };
+
+ cm.setActive('visualaid', ed.hasVisual);
+ t._updateUndoStatus(ed);
+ cm.setDisabled('outdent', !ed.queryCommandState('Outdent'));
+
+ p = getParent('A');
+ if (c = cm.get('link')) {
+ c.setDisabled((!p && co) || (p && !p.href));
+ c.setActive(!!p && (!p.name && !p.id));
+ }
+
+ if (c = cm.get('unlink')) {
+ c.setDisabled(!p && co);
+ c.setActive(!!p && !p.name && !p.id);
+ }
+
+ if (c = cm.get('anchor')) {
+ c.setActive(!co && !!p && (p.name || (p.id && !p.href)));
+ }
+
+ p = getParent('IMG');
+ if (c = cm.get('image'))
+ c.setActive(!co && !!p && n.className.indexOf('mceItem') == -1);
+
+ if (c = cm.get('styleselect')) {
+ t._importClasses();
+
+ formatNames = [];
+ each(c.items, function(item) {
+ formatNames.push(item.value);
+ });
+
+ matches = ed.formatter.matchAll(formatNames);
+ c.select(matches[0]);
+ tinymce.each(matches, function(match, index) {
+ if (index > 0) {
+ c.mark(match);
+ }
+ });
+ }
+
+ if (c = cm.get('formatselect')) {
+ p = getParent(ed.dom.isBlock);
+
+ if (p)
+ c.select(p.nodeName.toLowerCase());
+ }
+
+ // Find out current fontSize, fontFamily and fontClass
+ getParent(function(n) {
+ if (n.nodeName === 'SPAN') {
+ if (!cl && n.className)
+ cl = n.className;
+ }
+
+ if (ed.dom.is(n, s.theme_advanced_font_selector)) {
+ if (!fz && n.style.fontSize)
+ fz = n.style.fontSize;
+
+ if (!fn && n.style.fontFamily)
+ fn = n.style.fontFamily.replace(/[\"\']+/g, '').replace(/^([^,]+).*/, '$1').toLowerCase();
+
+ if (!fc && n.style.color)
+ fc = n.style.color;
+
+ if (!bc && n.style.backgroundColor)
+ bc = n.style.backgroundColor;
+ }
+
+ return false;
+ });
+
+ if (c = cm.get('fontselect')) {
+ c.select(function(v) {
+ return v.replace(/^([^,]+).*/, '$1').toLowerCase() == fn;
+ });
+ }
+
+ // Select font size
+ if (c = cm.get('fontsizeselect')) {
+ // Use computed style
+ if (s.theme_advanced_runtime_fontsize && !fz && !cl)
+ fz = ed.dom.getStyle(n, 'fontSize', true);
+
+ c.select(function(v) {
+ if (v.fontSize && v.fontSize === fz)
+ return true;
+
+ if (v['class'] && v['class'] === cl)
+ return true;
+ });
+ }
+
+ if (s.theme_advanced_show_current_color) {
+ function updateColor(controlId, color) {
+ if (c = cm.get(controlId)) {
+ if (!color)
+ color = c.settings.default_color;
+ if (color !== c.value) {
+ c.displayColor(color);
+ }
+ }
+ }
+ updateColor('forecolor', fc);
+ updateColor('backcolor', bc);
+ }
+
+ if (s.theme_advanced_show_current_color) {
+ function updateColor(controlId, color) {
+ if (c = cm.get(controlId)) {
+ if (!color)
+ color = c.settings.default_color;
+ if (color !== c.value) {
+ c.displayColor(color);
+ }
+ }
+ };
+
+ updateColor('forecolor', fc);
+ updateColor('backcolor', bc);
+ }
+
+ if (s.theme_advanced_path && s.theme_advanced_statusbar_location) {
+ p = DOM.get(ed.id + '_path') || DOM.add(ed.id + '_path_row', 'span', {id : ed.id + '_path'});
+
+ if (t.statusKeyboardNavigation) {
+ t.statusKeyboardNavigation.destroy();
+ t.statusKeyboardNavigation = null;
+ }
+
+ DOM.setHTML(p, '');
+
+ getParent(function(n) {
+ var na = n.nodeName.toLowerCase(), u, pi, ti = '';
+
+ // Ignore non element and bogus/hidden elements
+ if (n.nodeType != 1 || na === 'br' || n.getAttribute('data-mce-bogus') || DOM.hasClass(n, 'mceItemHidden') || DOM.hasClass(n, 'mceItemRemoved'))
+ return;
+
+ // Handle prefix
+ if (tinymce.isIE && n.scopeName !== 'HTML' && n.scopeName)
+ na = n.scopeName + ':' + na;
+
+ // Remove internal prefix
+ na = na.replace(/mce\:/g, '');
+
+ // Handle node name
+ switch (na) {
+ case 'b':
+ na = 'strong';
+ break;
+
+ case 'i':
+ na = 'em';
+ break;
+
+ case 'img':
+ if (v = DOM.getAttrib(n, 'src'))
+ ti += 'src: ' + v + ' ';
+
+ break;
+
+ case 'a':
+ if (v = DOM.getAttrib(n, 'name')) {
+ ti += 'name: ' + v + ' ';
+ na += '#' + v;
+ }
+
+ if (v = DOM.getAttrib(n, 'href'))
+ ti += 'href: ' + v + ' ';
+
+ break;
+
+ case 'font':
+ if (v = DOM.getAttrib(n, 'face'))
+ ti += 'font: ' + v + ' ';
+
+ if (v = DOM.getAttrib(n, 'size'))
+ ti += 'size: ' + v + ' ';
+
+ if (v = DOM.getAttrib(n, 'color'))
+ ti += 'color: ' + v + ' ';
+
+ break;
+
+ case 'span':
+ if (v = DOM.getAttrib(n, 'style'))
+ ti += 'style: ' + v + ' ';
+
+ break;
+ }
+
+ if (v = DOM.getAttrib(n, 'id'))
+ ti += 'id: ' + v + ' ';
+
+ if (v = n.className) {
+ v = v.replace(/\b\s*(webkit|mce|Apple-)\w+\s*\b/g, '');
+
+ if (v) {
+ ti += 'class: ' + v + ' ';
+
+ if (ed.dom.isBlock(n) || na == 'img' || na == 'span')
+ na += '.' + v;
+ }
+ }
+
+ na = na.replace(/(html:)/g, '');
+ na = {name : na, node : n, title : ti};
+ t.onResolveName.dispatch(t, na);
+ ti = na.title;
+ na = na.name;
+
+ //u = "javascript:tinymce.EditorManager.get('" + ed.id + "').theme._sel('" + (de++) + "');";
+ pi = DOM.create('a', {'href' : "javascript:;", role: 'button', onmousedown : "return false;", title : ti, 'class' : 'mcePath_' + (de++)}, na);
+
+ if (p.hasChildNodes()) {
+ p.insertBefore(DOM.create('span', {'aria-hidden': 'true'}, '\u00a0\u00bb '), p.firstChild);
+ p.insertBefore(pi, p.firstChild);
+ } else
+ p.appendChild(pi);
+ }, ed.getBody());
+
+ if (DOM.select('a', p).length > 0) {
+ t.statusKeyboardNavigation = new tinymce.ui.KeyboardNavigation({
+ root: ed.id + "_path_row",
+ items: DOM.select('a', p),
+ excludeFromTabOrder: true,
+ onCancel: function() {
+ ed.focus();
+ }
+ }, DOM);
+ }
+ }
+ },
+
+ // Commands gets called by execCommand
+
+ _sel : function(v) {
+ this.editor.execCommand('mceSelectNodeDepth', false, v);
+ },
+
+ _mceInsertAnchor : function(ui, v) {
+ var ed = this.editor;
+
+ ed.windowManager.open({
+ url : this.url + '/anchor.htm',
+ width : 320 + parseInt(ed.getLang('advanced.anchor_delta_width', 0)),
+ height : 90 + parseInt(ed.getLang('advanced.anchor_delta_height', 0)),
+ inline : true
+ }, {
+ theme_url : this.url
+ });
+ },
+
+ _mceCharMap : function() {
+ var ed = this.editor;
+
+ ed.windowManager.open({
+ url : this.url + '/charmap.htm',
+ width : 550 + parseInt(ed.getLang('advanced.charmap_delta_width', 0)),
+ height : 265 + parseInt(ed.getLang('advanced.charmap_delta_height', 0)),
+ inline : true
+ }, {
+ theme_url : this.url
+ });
+ },
+
+ _mceHelp : function() {
+ var ed = this.editor;
+
+ ed.windowManager.open({
+ url : this.url + '/about.htm',
+ width : 480,
+ height : 380,
+ inline : true
+ }, {
+ theme_url : this.url
+ });
+ },
+
+ _mceShortcuts : function() {
+ var ed = this.editor;
+ ed.windowManager.open({
+ url: this.url + '/shortcuts.htm',
+ width: 480,
+ height: 380,
+ inline: true
+ }, {
+ theme_url: this.url
+ });
+ },
+
+ _mceColorPicker : function(u, v) {
+ var ed = this.editor;
+
+ v = v || {};
+
+ ed.windowManager.open({
+ url : this.url + '/color_picker.htm',
+ width : 375 + parseInt(ed.getLang('advanced.colorpicker_delta_width', 0)),
+ height : 250 + parseInt(ed.getLang('advanced.colorpicker_delta_height', 0)),
+ close_previous : false,
+ inline : true
+ }, {
+ input_color : v.color,
+ func : v.func,
+ theme_url : this.url
+ });
+ },
+
+ _mceCodeEditor : function(ui, val) {
+ var ed = this.editor;
+
+ ed.windowManager.open({
+ url : this.url + '/source_editor.htm',
+ width : parseInt(ed.getParam("theme_advanced_source_editor_width", 720)),
+ height : parseInt(ed.getParam("theme_advanced_source_editor_height", 580)),
+ inline : true,
+ resizable : true,
+ maximizable : true
+ }, {
+ theme_url : this.url
+ });
+ },
+
+ _mceImage : function(ui, val) {
+ var ed = this.editor;
+
+ // Internal image object like a flash placeholder
+ if (ed.dom.getAttrib(ed.selection.getNode(), 'class', '').indexOf('mceItem') != -1)
+ return;
+
+ ed.windowManager.open({
+ url : this.url + '/image.htm',
+ width : 355 + parseInt(ed.getLang('advanced.image_delta_width', 0)),
+ height : 275 + parseInt(ed.getLang('advanced.image_delta_height', 0)),
+ inline : true
+ }, {
+ theme_url : this.url
+ });
+ },
+
+ _mceLink : function(ui, val) {
+ var ed = this.editor;
+
+ ed.windowManager.open({
+ url : this.url + '/link.htm',
+ width : 310 + parseInt(ed.getLang('advanced.link_delta_width', 0)),
+ height : 200 + parseInt(ed.getLang('advanced.link_delta_height', 0)),
+ inline : true
+ }, {
+ theme_url : this.url
+ });
+ },
+
+ _mceNewDocument : function() {
+ var ed = this.editor;
+
+ ed.windowManager.confirm('advanced.newdocument', function(s) {
+ if (s)
+ ed.execCommand('mceSetContent', false, '');
+ });
+ },
+
+ _mceForeColor : function() {
+ var t = this;
+
+ this._mceColorPicker(0, {
+ color: t.fgColor,
+ func : function(co) {
+ t.fgColor = co;
+ t.editor.execCommand('ForeColor', false, co);
+ }
+ });
+ },
+
+ _mceBackColor : function() {
+ var t = this;
+
+ this._mceColorPicker(0, {
+ color: t.bgColor,
+ func : function(co) {
+ t.bgColor = co;
+ t.editor.execCommand('HiliteColor', false, co);
+ }
+ });
+ },
+
+ _ufirst : function(s) {
+ return s.substring(0, 1).toUpperCase() + s.substring(1);
+ }
+ });
+
+ tinymce.ThemeManager.add('advanced', tinymce.themes.AdvancedTheme);
+}(tinymce));
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/image.htm b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/image.htm
new file mode 100755
index 00000000..b8ba729f
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/image.htm
@@ -0,0 +1,80 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>{#advanced_dlg.image_title}</title>
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script type="text/javascript" src="../../utils/mctabs.js"></script>
+ <script type="text/javascript" src="../../utils/form_utils.js"></script>
+ <script type="text/javascript" src="js/image.js"></script>
+</head>
+<body id="image" style="display: none">
+<form onsubmit="ImageDialog.update();return false;" action="#">
+ <div class="tabs">
+ <ul>
+ <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advanced_dlg.image_title}</a></span></li>
+ </ul>
+ </div>
+
+ <div class="panel_wrapper">
+ <div id="general_panel" class="panel current">
+ <table border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td class="nowrap"><label for="src">{#advanced_dlg.image_src}</label></td>
+ <td><table border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input id="src" name="src" type="text" class="mceFocus" value="" style="width: 200px" onchange="ImageDialog.getImageData();" /></td>
+ <td id="srcbrowsercontainer">&nbsp;</td>
+ </tr>
+ </table></td>
+ </tr>
+ <tr>
+ <td><label for="image_list">{#advanced_dlg.image_list}</label></td>
+ <td><select id="image_list" name="image_list" onchange="document.getElementById('src').value=this.options[this.selectedIndex].value;document.getElementById('alt').value=this.options[this.selectedIndex].text;"></select></td>
+ </tr>
+ <tr>
+ <td class="nowrap"><label for="alt">{#advanced_dlg.image_alt}</label></td>
+ <td><input id="alt" name="alt" type="text" value="" style="width: 200px" /></td>
+ </tr>
+ <tr>
+ <td class="nowrap"><label for="align">{#advanced_dlg.image_align}</label></td>
+ <td><select id="align" name="align" onchange="ImageDialog.updateStyle();">
+ <option value="">{#not_set}</option>
+ <option value="baseline">{#advanced_dlg.image_align_baseline}</option>
+ <option value="top">{#advanced_dlg.image_align_top}</option>
+ <option value="middle">{#advanced_dlg.image_align_middle}</option>
+ <option value="bottom">{#advanced_dlg.image_align_bottom}</option>
+ <option value="text-top">{#advanced_dlg.image_align_texttop}</option>
+ <option value="text-bottom">{#advanced_dlg.image_align_textbottom}</option>
+ <option value="left">{#advanced_dlg.image_align_left}</option>
+ <option value="right">{#advanced_dlg.image_align_right}</option>
+ </select></td>
+ </tr>
+ <tr>
+ <td class="nowrap"><label for="width">{#advanced_dlg.image_dimensions}</label></td>
+ <td><input id="width" name="width" type="text" value="" size="3" maxlength="5" />
+ x
+ <input id="height" name="height" type="text" value="" size="3" maxlength="5" /></td>
+ </tr>
+ <tr>
+ <td class="nowrap"><label for="border">{#advanced_dlg.image_border}</label></td>
+ <td><input id="border" name="border" type="text" value="" size="3" maxlength="3" onchange="ImageDialog.updateStyle();" /></td>
+ </tr>
+ <tr>
+ <td class="nowrap"><label for="vspace">{#advanced_dlg.image_vspace}</label></td>
+ <td><input id="vspace" name="vspace" type="text" value="" size="3" maxlength="3" onchange="ImageDialog.updateStyle();" /></td>
+ </tr>
+ <tr>
+ <td class="nowrap"><label for="hspace">{#advanced_dlg.image_hspace}</label></td>
+ <td><input id="hspace" name="hspace" type="text" value="" size="3" maxlength="3" onchange="ImageDialog.updateStyle();" /></td>
+ </tr>
+ </table>
+ </div>
+ </div>
+
+ <div class="mceActionPanel">
+ <input type="submit" id="insert" name="insert" value="{#insert}" />
+ <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
+ </div>
+</form>
+</body>
+</html>
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/colorpicker.jpg b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/colorpicker.jpg
new file mode 100644
index 00000000..b1a377ab
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/colorpicker.jpg
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/flash.gif b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/flash.gif
new file mode 100644
index 00000000..dec3f7c7
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/flash.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/icons.gif b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/icons.gif
new file mode 100644
index 00000000..ca222490
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/icons.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/iframe.gif b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/iframe.gif
new file mode 100644
index 00000000..410c7ad0
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/iframe.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/pagebreak.gif b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/pagebreak.gif
new file mode 100644
index 00000000..acdf4085
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/pagebreak.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/quicktime.gif b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/quicktime.gif
new file mode 100644
index 00000000..8f10e7aa
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/quicktime.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/realmedia.gif b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/realmedia.gif
new file mode 100644
index 00000000..fdfe0b9a
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/realmedia.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/shockwave.gif b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/shockwave.gif
new file mode 100644
index 00000000..9314d044
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/shockwave.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/trans.gif b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/trans.gif
new file mode 100644
index 00000000..38848651
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/trans.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/video.gif b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/video.gif
new file mode 100644
index 00000000..35701040
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/video.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/windowsmedia.gif b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/windowsmedia.gif
new file mode 100644
index 00000000..ab50f2d8
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/img/windowsmedia.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/js/about.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/js/about.js
new file mode 100644
index 00000000..5b358457
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/js/about.js
@@ -0,0 +1,73 @@
+tinyMCEPopup.requireLangPack();
+
+function init() {
+ var ed, tcont;
+
+ tinyMCEPopup.resizeToInnerSize();
+ ed = tinyMCEPopup.editor;
+
+ // Give FF some time
+ window.setTimeout(insertHelpIFrame, 10);
+
+ tcont = document.getElementById('plugintablecontainer');
+ document.getElementById('plugins_tab').style.display = 'none';
+
+ var html = "";
+ html += '<table id="plugintable">';
+ html += '<thead>';
+ html += '<tr>';
+ html += '<td>' + ed.getLang('advanced_dlg.about_plugin') + '</td>';
+ html += '<td>' + ed.getLang('advanced_dlg.about_author') + '</td>';
+ html += '<td>' + ed.getLang('advanced_dlg.about_version') + '</td>';
+ html += '</tr>';
+ html += '</thead>';
+ html += '<tbody>';
+
+ tinymce.each(ed.plugins, function(p, n) {
+ var info;
+
+ if (!p.getInfo)
+ return;
+
+ html += '<tr>';
+
+ info = p.getInfo();
+
+ if (info.infourl != null && info.infourl != '')
+ html += '<td width="50%" title="' + n + '"><a href="' + info.infourl + '" target="_blank">' + info.longname + '</a></td>';
+ else
+ html += '<td width="50%" title="' + n + '">' + info.longname + '</td>';
+
+ if (info.authorurl != null && info.authorurl != '')
+ html += '<td width="35%"><a href="' + info.authorurl + '" target="_blank">' + info.author + '</a></td>';
+ else
+ html += '<td width="35%">' + info.author + '</td>';
+
+ html += '<td width="15%">' + info.version + '</td>';
+ html += '</tr>';
+
+ document.getElementById('plugins_tab').style.display = '';
+
+ });
+
+ html += '</tbody>';
+ html += '</table>';
+
+ tcont.innerHTML = html;
+
+ tinyMCEPopup.dom.get('version').innerHTML = tinymce.majorVersion + "." + tinymce.minorVersion;
+ tinyMCEPopup.dom.get('date').innerHTML = tinymce.releaseDate;
+}
+
+function insertHelpIFrame() {
+ var html;
+
+ if (tinyMCEPopup.getParam('docs_url')) {
+ html = '<iframe width="100%" height="300" src="' + tinyMCEPopup.editor.baseURI.toAbsolute(tinyMCEPopup.getParam('docs_url')) + '"></iframe>';
+ document.getElementById('iframecontainer').innerHTML = html;
+ document.getElementById('help_tab').style.display = 'block';
+ document.getElementById('help_tab').setAttribute("aria-hidden", "false");
+ }
+}
+
+tinyMCEPopup.onInit.add(init);
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/js/anchor.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/js/anchor.js
new file mode 100644
index 00000000..2909a3a4
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/js/anchor.js
@@ -0,0 +1,56 @@
+tinyMCEPopup.requireLangPack();
+
+var AnchorDialog = {
+ init : function(ed) {
+ var action, elm, f = document.forms[0];
+
+ this.editor = ed;
+ elm = ed.dom.getParent(ed.selection.getNode(), 'A');
+ v = ed.dom.getAttrib(elm, 'name') || ed.dom.getAttrib(elm, 'id');
+
+ if (v) {
+ this.action = 'update';
+ f.anchorName.value = v;
+ }
+
+ f.insert.value = ed.getLang(elm ? 'update' : 'insert');
+ },
+
+ update : function() {
+ var ed = this.editor, elm, name = document.forms[0].anchorName.value, attribName;
+
+ if (!name || !/^[a-z][a-z0-9\-\_:\.]*$/i.test(name)) {
+ tinyMCEPopup.alert('advanced_dlg.anchor_invalid');
+ return;
+ }
+
+ tinyMCEPopup.restoreSelection();
+
+ if (this.action != 'update')
+ ed.selection.collapse(1);
+
+ var aRule = ed.schema.getElementRule('a');
+ if (!aRule || aRule.attributes.name) {
+ attribName = 'name';
+ } else {
+ attribName = 'id';
+ }
+
+ elm = ed.dom.getParent(ed.selection.getNode(), 'A');
+ if (elm) {
+ elm.setAttribute(attribName, name);
+ elm[attribName] = name;
+ ed.undoManager.add();
+ } else {
+ // create with zero-sized nbsp so that in Webkit where anchor is on last line by itself caret cannot be placed after it
+ var attrs = {'class' : 'mceItemAnchor'};
+ attrs[attribName] = name;
+ ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('a', attrs, '\uFEFF'));
+ ed.nodeChanged();
+ }
+
+ tinyMCEPopup.close();
+ }
+};
+
+tinyMCEPopup.onInit.add(AnchorDialog.init, AnchorDialog);
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/js/charmap.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/js/charmap.js
new file mode 100644
index 00000000..bb186955
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/js/charmap.js
@@ -0,0 +1,363 @@
+/**
+ * charmap.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+tinyMCEPopup.requireLangPack();
+
+var charmap = [
+ ['&nbsp;', '&#160;', true, 'no-break space'],
+ ['&amp;', '&#38;', true, 'ampersand'],
+ ['&quot;', '&#34;', true, 'quotation mark'],
+// finance
+ ['&cent;', '&#162;', true, 'cent sign'],
+ ['&euro;', '&#8364;', true, 'euro sign'],
+ ['&pound;', '&#163;', true, 'pound sign'],
+ ['&yen;', '&#165;', true, 'yen sign'],
+// signs
+ ['&copy;', '&#169;', true, 'copyright sign'],
+ ['&reg;', '&#174;', true, 'registered sign'],
+ ['&trade;', '&#8482;', true, 'trade mark sign'],
+ ['&permil;', '&#8240;', true, 'per mille sign'],
+ ['&micro;', '&#181;', true, 'micro sign'],
+ ['&middot;', '&#183;', true, 'middle dot'],
+ ['&bull;', '&#8226;', true, 'bullet'],
+ ['&hellip;', '&#8230;', true, 'three dot leader'],
+ ['&prime;', '&#8242;', true, 'minutes / feet'],
+ ['&Prime;', '&#8243;', true, 'seconds / inches'],
+ ['&sect;', '&#167;', true, 'section sign'],
+ ['&para;', '&#182;', true, 'paragraph sign'],
+ ['&szlig;', '&#223;', true, 'sharp s / ess-zed'],
+// quotations
+ ['&lsaquo;', '&#8249;', true, 'single left-pointing angle quotation mark'],
+ ['&rsaquo;', '&#8250;', true, 'single right-pointing angle quotation mark'],
+ ['&laquo;', '&#171;', true, 'left pointing guillemet'],
+ ['&raquo;', '&#187;', true, 'right pointing guillemet'],
+ ['&lsquo;', '&#8216;', true, 'left single quotation mark'],
+ ['&rsquo;', '&#8217;', true, 'right single quotation mark'],
+ ['&ldquo;', '&#8220;', true, 'left double quotation mark'],
+ ['&rdquo;', '&#8221;', true, 'right double quotation mark'],
+ ['&sbquo;', '&#8218;', true, 'single low-9 quotation mark'],
+ ['&bdquo;', '&#8222;', true, 'double low-9 quotation mark'],
+ ['&lt;', '&#60;', true, 'less-than sign'],
+ ['&gt;', '&#62;', true, 'greater-than sign'],
+ ['&le;', '&#8804;', true, 'less-than or equal to'],
+ ['&ge;', '&#8805;', true, 'greater-than or equal to'],
+ ['&ndash;', '&#8211;', true, 'en dash'],
+ ['&mdash;', '&#8212;', true, 'em dash'],
+ ['&macr;', '&#175;', true, 'macron'],
+ ['&oline;', '&#8254;', true, 'overline'],
+ ['&curren;', '&#164;', true, 'currency sign'],
+ ['&brvbar;', '&#166;', true, 'broken bar'],
+ ['&uml;', '&#168;', true, 'diaeresis'],
+ ['&iexcl;', '&#161;', true, 'inverted exclamation mark'],
+ ['&iquest;', '&#191;', true, 'turned question mark'],
+ ['&circ;', '&#710;', true, 'circumflex accent'],
+ ['&tilde;', '&#732;', true, 'small tilde'],
+ ['&deg;', '&#176;', true, 'degree sign'],
+ ['&minus;', '&#8722;', true, 'minus sign'],
+ ['&plusmn;', '&#177;', true, 'plus-minus sign'],
+ ['&divide;', '&#247;', true, 'division sign'],
+ ['&frasl;', '&#8260;', true, 'fraction slash'],
+ ['&times;', '&#215;', true, 'multiplication sign'],
+ ['&sup1;', '&#185;', true, 'superscript one'],
+ ['&sup2;', '&#178;', true, 'superscript two'],
+ ['&sup3;', '&#179;', true, 'superscript three'],
+ ['&frac14;', '&#188;', true, 'fraction one quarter'],
+ ['&frac12;', '&#189;', true, 'fraction one half'],
+ ['&frac34;', '&#190;', true, 'fraction three quarters'],
+// math / logical
+ ['&fnof;', '&#402;', true, 'function / florin'],
+ ['&int;', '&#8747;', true, 'integral'],
+ ['&sum;', '&#8721;', true, 'n-ary sumation'],
+ ['&infin;', '&#8734;', true, 'infinity'],
+ ['&radic;', '&#8730;', true, 'square root'],
+ ['&sim;', '&#8764;', false,'similar to'],
+ ['&cong;', '&#8773;', false,'approximately equal to'],
+ ['&asymp;', '&#8776;', true, 'almost equal to'],
+ ['&ne;', '&#8800;', true, 'not equal to'],
+ ['&equiv;', '&#8801;', true, 'identical to'],
+ ['&isin;', '&#8712;', false,'element of'],
+ ['&notin;', '&#8713;', false,'not an element of'],
+ ['&ni;', '&#8715;', false,'contains as member'],
+ ['&prod;', '&#8719;', true, 'n-ary product'],
+ ['&and;', '&#8743;', false,'logical and'],
+ ['&or;', '&#8744;', false,'logical or'],
+ ['&not;', '&#172;', true, 'not sign'],
+ ['&cap;', '&#8745;', true, 'intersection'],
+ ['&cup;', '&#8746;', false,'union'],
+ ['&part;', '&#8706;', true, 'partial differential'],
+ ['&forall;', '&#8704;', false,'for all'],
+ ['&exist;', '&#8707;', false,'there exists'],
+ ['&empty;', '&#8709;', false,'diameter'],
+ ['&nabla;', '&#8711;', false,'backward difference'],
+ ['&lowast;', '&#8727;', false,'asterisk operator'],
+ ['&prop;', '&#8733;', false,'proportional to'],
+ ['&ang;', '&#8736;', false,'angle'],
+// undefined
+ ['&acute;', '&#180;', true, 'acute accent'],
+ ['&cedil;', '&#184;', true, 'cedilla'],
+ ['&ordf;', '&#170;', true, 'feminine ordinal indicator'],
+ ['&ordm;', '&#186;', true, 'masculine ordinal indicator'],
+ ['&dagger;', '&#8224;', true, 'dagger'],
+ ['&Dagger;', '&#8225;', true, 'double dagger'],
+// alphabetical special chars
+ ['&Agrave;', '&#192;', true, 'A - grave'],
+ ['&Aacute;', '&#193;', true, 'A - acute'],
+ ['&Acirc;', '&#194;', true, 'A - circumflex'],
+ ['&Atilde;', '&#195;', true, 'A - tilde'],
+ ['&Auml;', '&#196;', true, 'A - diaeresis'],
+ ['&Aring;', '&#197;', true, 'A - ring above'],
+ ['&AElig;', '&#198;', true, 'ligature AE'],
+ ['&Ccedil;', '&#199;', true, 'C - cedilla'],
+ ['&Egrave;', '&#200;', true, 'E - grave'],
+ ['&Eacute;', '&#201;', true, 'E - acute'],
+ ['&Ecirc;', '&#202;', true, 'E - circumflex'],
+ ['&Euml;', '&#203;', true, 'E - diaeresis'],
+ ['&Igrave;', '&#204;', true, 'I - grave'],
+ ['&Iacute;', '&#205;', true, 'I - acute'],
+ ['&Icirc;', '&#206;', true, 'I - circumflex'],
+ ['&Iuml;', '&#207;', true, 'I - diaeresis'],
+ ['&ETH;', '&#208;', true, 'ETH'],
+ ['&Ntilde;', '&#209;', true, 'N - tilde'],
+ ['&Ograve;', '&#210;', true, 'O - grave'],
+ ['&Oacute;', '&#211;', true, 'O - acute'],
+ ['&Ocirc;', '&#212;', true, 'O - circumflex'],
+ ['&Otilde;', '&#213;', true, 'O - tilde'],
+ ['&Ouml;', '&#214;', true, 'O - diaeresis'],
+ ['&Oslash;', '&#216;', true, 'O - slash'],
+ ['&OElig;', '&#338;', true, 'ligature OE'],
+ ['&Scaron;', '&#352;', true, 'S - caron'],
+ ['&Ugrave;', '&#217;', true, 'U - grave'],
+ ['&Uacute;', '&#218;', true, 'U - acute'],
+ ['&Ucirc;', '&#219;', true, 'U - circumflex'],
+ ['&Uuml;', '&#220;', true, 'U - diaeresis'],
+ ['&Yacute;', '&#221;', true, 'Y - acute'],
+ ['&Yuml;', '&#376;', true, 'Y - diaeresis'],
+ ['&THORN;', '&#222;', true, 'THORN'],
+ ['&agrave;', '&#224;', true, 'a - grave'],
+ ['&aacute;', '&#225;', true, 'a - acute'],
+ ['&acirc;', '&#226;', true, 'a - circumflex'],
+ ['&atilde;', '&#227;', true, 'a - tilde'],
+ ['&auml;', '&#228;', true, 'a - diaeresis'],
+ ['&aring;', '&#229;', true, 'a - ring above'],
+ ['&aelig;', '&#230;', true, 'ligature ae'],
+ ['&ccedil;', '&#231;', true, 'c - cedilla'],
+ ['&egrave;', '&#232;', true, 'e - grave'],
+ ['&eacute;', '&#233;', true, 'e - acute'],
+ ['&ecirc;', '&#234;', true, 'e - circumflex'],
+ ['&euml;', '&#235;', true, 'e - diaeresis'],
+ ['&igrave;', '&#236;', true, 'i - grave'],
+ ['&iacute;', '&#237;', true, 'i - acute'],
+ ['&icirc;', '&#238;', true, 'i - circumflex'],
+ ['&iuml;', '&#239;', true, 'i - diaeresis'],
+ ['&eth;', '&#240;', true, 'eth'],
+ ['&ntilde;', '&#241;', true, 'n - tilde'],
+ ['&ograve;', '&#242;', true, 'o - grave'],
+ ['&oacute;', '&#243;', true, 'o - acute'],
+ ['&ocirc;', '&#244;', true, 'o - circumflex'],
+ ['&otilde;', '&#245;', true, 'o - tilde'],
+ ['&ouml;', '&#246;', true, 'o - diaeresis'],
+ ['&oslash;', '&#248;', true, 'o slash'],
+ ['&oelig;', '&#339;', true, 'ligature oe'],
+ ['&scaron;', '&#353;', true, 's - caron'],
+ ['&ugrave;', '&#249;', true, 'u - grave'],
+ ['&uacute;', '&#250;', true, 'u - acute'],
+ ['&ucirc;', '&#251;', true, 'u - circumflex'],
+ ['&uuml;', '&#252;', true, 'u - diaeresis'],
+ ['&yacute;', '&#253;', true, 'y - acute'],
+ ['&thorn;', '&#254;', true, 'thorn'],
+ ['&yuml;', '&#255;', true, 'y - diaeresis'],
+ ['&Alpha;', '&#913;', true, 'Alpha'],
+ ['&Beta;', '&#914;', true, 'Beta'],
+ ['&Gamma;', '&#915;', true, 'Gamma'],
+ ['&Delta;', '&#916;', true, 'Delta'],
+ ['&Epsilon;', '&#917;', true, 'Epsilon'],
+ ['&Zeta;', '&#918;', true, 'Zeta'],
+ ['&Eta;', '&#919;', true, 'Eta'],
+ ['&Theta;', '&#920;', true, 'Theta'],
+ ['&Iota;', '&#921;', true, 'Iota'],
+ ['&Kappa;', '&#922;', true, 'Kappa'],
+ ['&Lambda;', '&#923;', true, 'Lambda'],
+ ['&Mu;', '&#924;', true, 'Mu'],
+ ['&Nu;', '&#925;', true, 'Nu'],
+ ['&Xi;', '&#926;', true, 'Xi'],
+ ['&Omicron;', '&#927;', true, 'Omicron'],
+ ['&Pi;', '&#928;', true, 'Pi'],
+ ['&Rho;', '&#929;', true, 'Rho'],
+ ['&Sigma;', '&#931;', true, 'Sigma'],
+ ['&Tau;', '&#932;', true, 'Tau'],
+ ['&Upsilon;', '&#933;', true, 'Upsilon'],
+ ['&Phi;', '&#934;', true, 'Phi'],
+ ['&Chi;', '&#935;', true, 'Chi'],
+ ['&Psi;', '&#936;', true, 'Psi'],
+ ['&Omega;', '&#937;', true, 'Omega'],
+ ['&alpha;', '&#945;', true, 'alpha'],
+ ['&beta;', '&#946;', true, 'beta'],
+ ['&gamma;', '&#947;', true, 'gamma'],
+ ['&delta;', '&#948;', true, 'delta'],
+ ['&epsilon;', '&#949;', true, 'epsilon'],
+ ['&zeta;', '&#950;', true, 'zeta'],
+ ['&eta;', '&#951;', true, 'eta'],
+ ['&theta;', '&#952;', true, 'theta'],
+ ['&iota;', '&#953;', true, 'iota'],
+ ['&kappa;', '&#954;', true, 'kappa'],
+ ['&lambda;', '&#955;', true, 'lambda'],
+ ['&mu;', '&#956;', true, 'mu'],
+ ['&nu;', '&#957;', true, 'nu'],
+ ['&xi;', '&#958;', true, 'xi'],
+ ['&omicron;', '&#959;', true, 'omicron'],
+ ['&pi;', '&#960;', true, 'pi'],
+ ['&rho;', '&#961;', true, 'rho'],
+ ['&sigmaf;', '&#962;', true, 'final sigma'],
+ ['&sigma;', '&#963;', true, 'sigma'],
+ ['&tau;', '&#964;', true, 'tau'],
+ ['&upsilon;', '&#965;', true, 'upsilon'],
+ ['&phi;', '&#966;', true, 'phi'],
+ ['&chi;', '&#967;', true, 'chi'],
+ ['&psi;', '&#968;', true, 'psi'],
+ ['&omega;', '&#969;', true, 'omega'],
+// symbols
+ ['&alefsym;', '&#8501;', false,'alef symbol'],
+ ['&piv;', '&#982;', false,'pi symbol'],
+ ['&real;', '&#8476;', false,'real part symbol'],
+ ['&thetasym;','&#977;', false,'theta symbol'],
+ ['&upsih;', '&#978;', false,'upsilon - hook symbol'],
+ ['&weierp;', '&#8472;', false,'Weierstrass p'],
+ ['&image;', '&#8465;', false,'imaginary part'],
+// arrows
+ ['&larr;', '&#8592;', true, 'leftwards arrow'],
+ ['&uarr;', '&#8593;', true, 'upwards arrow'],
+ ['&rarr;', '&#8594;', true, 'rightwards arrow'],
+ ['&darr;', '&#8595;', true, 'downwards arrow'],
+ ['&harr;', '&#8596;', true, 'left right arrow'],
+ ['&crarr;', '&#8629;', false,'carriage return'],
+ ['&lArr;', '&#8656;', false,'leftwards double arrow'],
+ ['&uArr;', '&#8657;', false,'upwards double arrow'],
+ ['&rArr;', '&#8658;', false,'rightwards double arrow'],
+ ['&dArr;', '&#8659;', false,'downwards double arrow'],
+ ['&hArr;', '&#8660;', false,'left right double arrow'],
+ ['&there4;', '&#8756;', false,'therefore'],
+ ['&sub;', '&#8834;', false,'subset of'],
+ ['&sup;', '&#8835;', false,'superset of'],
+ ['&nsub;', '&#8836;', false,'not a subset of'],
+ ['&sube;', '&#8838;', false,'subset of or equal to'],
+ ['&supe;', '&#8839;', false,'superset of or equal to'],
+ ['&oplus;', '&#8853;', false,'circled plus'],
+ ['&otimes;', '&#8855;', false,'circled times'],
+ ['&perp;', '&#8869;', false,'perpendicular'],
+ ['&sdot;', '&#8901;', false,'dot operator'],
+ ['&lceil;', '&#8968;', false,'left ceiling'],
+ ['&rceil;', '&#8969;', false,'right ceiling'],
+ ['&lfloor;', '&#8970;', false,'left floor'],
+ ['&rfloor;', '&#8971;', false,'right floor'],
+ ['&lang;', '&#9001;', false,'left-pointing angle bracket'],
+ ['&rang;', '&#9002;', false,'right-pointing angle bracket'],
+ ['&loz;', '&#9674;', true, 'lozenge'],
+ ['&spades;', '&#9824;', true, 'black spade suit'],
+ ['&clubs;', '&#9827;', true, 'black club suit'],
+ ['&hearts;', '&#9829;', true, 'black heart suit'],
+ ['&diams;', '&#9830;', true, 'black diamond suit'],
+ ['&ensp;', '&#8194;', false,'en space'],
+ ['&emsp;', '&#8195;', false,'em space'],
+ ['&thinsp;', '&#8201;', false,'thin space'],
+ ['&zwnj;', '&#8204;', false,'zero width non-joiner'],
+ ['&zwj;', '&#8205;', false,'zero width joiner'],
+ ['&lrm;', '&#8206;', false,'left-to-right mark'],
+ ['&rlm;', '&#8207;', false,'right-to-left mark'],
+ ['&shy;', '&#173;', false,'soft hyphen']
+];
+
+tinyMCEPopup.onInit.add(function() {
+ tinyMCEPopup.dom.setHTML('charmapView', renderCharMapHTML());
+ addKeyboardNavigation();
+});
+
+function addKeyboardNavigation(){
+ var tableElm, cells, settings;
+
+ cells = tinyMCEPopup.dom.select("a.charmaplink", "charmapgroup");
+
+ settings ={
+ root: "charmapgroup",
+ items: cells
+ };
+ cells[0].tabindex=0;
+ tinyMCEPopup.dom.addClass(cells[0], "mceFocus");
+ if (tinymce.isGecko) {
+ cells[0].focus();
+ } else {
+ setTimeout(function(){
+ cells[0].focus();
+ }, 100);
+ }
+ tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', settings, tinyMCEPopup.dom);
+}
+
+function renderCharMapHTML() {
+ var charsPerRow = 20, tdWidth=20, tdHeight=20, i;
+ var html = '<div id="charmapgroup" aria-labelledby="charmap_label" tabindex="0" role="listbox">'+
+ '<table role="presentation" border="0" cellspacing="1" cellpadding="0" width="' + (tdWidth*charsPerRow) +
+ '"><tr height="' + tdHeight + '">';
+ var cols=-1;
+
+ for (i=0; i<charmap.length; i++) {
+ var previewCharFn;
+
+ if (charmap[i][2]==true) {
+ cols++;
+ previewCharFn = 'previewChar(\'' + charmap[i][1].substring(1,charmap[i][1].length) + '\',\'' + charmap[i][0].substring(1,charmap[i][0].length) + '\',\'' + charmap[i][3] + '\');';
+ html += ''
+ + '<td class="charmap">'
+ + '<a class="charmaplink" role="button" onmouseover="'+previewCharFn+'" onfocus="'+previewCharFn+'" href="javascript:void(0)" onclick="insertChar(\'' + charmap[i][1].substring(2,charmap[i][1].length-1) + '\');" onclick="return false;" onmousedown="return false;" title="' + charmap[i][3] + ' '+ tinyMCEPopup.editor.translate("advanced_dlg.charmap_usage")+'">'
+ + charmap[i][1]
+ + '</a></td>';
+ if ((cols+1) % charsPerRow == 0)
+ html += '</tr><tr height="' + tdHeight + '">';
+ }
+ }
+
+ if (cols % charsPerRow > 0) {
+ var padd = charsPerRow - (cols % charsPerRow);
+ for (var i=0; i<padd-1; i++)
+ html += '<td width="' + tdWidth + '" height="' + tdHeight + '" class="charmap">&nbsp;</td>';
+ }
+
+ html += '</tr></table></div>';
+ html = html.replace(/<tr height="20"><\/tr>/g, '');
+
+ return html;
+}
+
+function insertChar(chr) {
+ tinyMCEPopup.execCommand('mceInsertContent', false, '&#' + chr + ';');
+
+ // Refocus in window
+ if (tinyMCEPopup.isWindow)
+ window.focus();
+
+ tinyMCEPopup.editor.focus();
+ tinyMCEPopup.close();
+}
+
+function previewChar(codeA, codeB, codeN) {
+ var elmA = document.getElementById('codeA');
+ var elmB = document.getElementById('codeB');
+ var elmV = document.getElementById('codeV');
+ var elmN = document.getElementById('codeN');
+
+ if (codeA=='#160;') {
+ elmV.innerHTML = '__';
+ } else {
+ elmV.innerHTML = '&' + codeA;
+ }
+
+ elmB.innerHTML = '&amp;' + codeA;
+ elmA.innerHTML = '&amp;' + codeB;
+ elmN.innerHTML = codeN;
+}
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/js/color_picker.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/js/color_picker.js
new file mode 100644
index 00000000..cc891c17
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/js/color_picker.js
@@ -0,0 +1,345 @@
+tinyMCEPopup.requireLangPack();
+
+var detail = 50, strhex = "0123456789abcdef", i, isMouseDown = false, isMouseOver = false;
+
+var colors = [
+ "#000000","#000033","#000066","#000099","#0000cc","#0000ff","#330000","#330033",
+ "#330066","#330099","#3300cc","#3300ff","#660000","#660033","#660066","#660099",
+ "#6600cc","#6600ff","#990000","#990033","#990066","#990099","#9900cc","#9900ff",
+ "#cc0000","#cc0033","#cc0066","#cc0099","#cc00cc","#cc00ff","#ff0000","#ff0033",
+ "#ff0066","#ff0099","#ff00cc","#ff00ff","#003300","#003333","#003366","#003399",
+ "#0033cc","#0033ff","#333300","#333333","#333366","#333399","#3333cc","#3333ff",
+ "#663300","#663333","#663366","#663399","#6633cc","#6633ff","#993300","#993333",
+ "#993366","#993399","#9933cc","#9933ff","#cc3300","#cc3333","#cc3366","#cc3399",
+ "#cc33cc","#cc33ff","#ff3300","#ff3333","#ff3366","#ff3399","#ff33cc","#ff33ff",
+ "#006600","#006633","#006666","#006699","#0066cc","#0066ff","#336600","#336633",
+ "#336666","#336699","#3366cc","#3366ff","#666600","#666633","#666666","#666699",
+ "#6666cc","#6666ff","#996600","#996633","#996666","#996699","#9966cc","#9966ff",
+ "#cc6600","#cc6633","#cc6666","#cc6699","#cc66cc","#cc66ff","#ff6600","#ff6633",
+ "#ff6666","#ff6699","#ff66cc","#ff66ff","#009900","#009933","#009966","#009999",
+ "#0099cc","#0099ff","#339900","#339933","#339966","#339999","#3399cc","#3399ff",
+ "#669900","#669933","#669966","#669999","#6699cc","#6699ff","#999900","#999933",
+ "#999966","#999999","#9999cc","#9999ff","#cc9900","#cc9933","#cc9966","#cc9999",
+ "#cc99cc","#cc99ff","#ff9900","#ff9933","#ff9966","#ff9999","#ff99cc","#ff99ff",
+ "#00cc00","#00cc33","#00cc66","#00cc99","#00cccc","#00ccff","#33cc00","#33cc33",
+ "#33cc66","#33cc99","#33cccc","#33ccff","#66cc00","#66cc33","#66cc66","#66cc99",
+ "#66cccc","#66ccff","#99cc00","#99cc33","#99cc66","#99cc99","#99cccc","#99ccff",
+ "#cccc00","#cccc33","#cccc66","#cccc99","#cccccc","#ccccff","#ffcc00","#ffcc33",
+ "#ffcc66","#ffcc99","#ffcccc","#ffccff","#00ff00","#00ff33","#00ff66","#00ff99",
+ "#00ffcc","#00ffff","#33ff00","#33ff33","#33ff66","#33ff99","#33ffcc","#33ffff",
+ "#66ff00","#66ff33","#66ff66","#66ff99","#66ffcc","#66ffff","#99ff00","#99ff33",
+ "#99ff66","#99ff99","#99ffcc","#99ffff","#ccff00","#ccff33","#ccff66","#ccff99",
+ "#ccffcc","#ccffff","#ffff00","#ffff33","#ffff66","#ffff99","#ffffcc","#ffffff"
+];
+
+var named = {
+ '#F0F8FF':'Alice Blue','#FAEBD7':'Antique White','#00FFFF':'Aqua','#7FFFD4':'Aquamarine','#F0FFFF':'Azure','#F5F5DC':'Beige',
+ '#FFE4C4':'Bisque','#000000':'Black','#FFEBCD':'Blanched Almond','#0000FF':'Blue','#8A2BE2':'Blue Violet','#A52A2A':'Brown',
+ '#DEB887':'Burly Wood','#5F9EA0':'Cadet Blue','#7FFF00':'Chartreuse','#D2691E':'Chocolate','#FF7F50':'Coral','#6495ED':'Cornflower Blue',
+ '#FFF8DC':'Cornsilk','#DC143C':'Crimson','#00FFFF':'Cyan','#00008B':'Dark Blue','#008B8B':'Dark Cyan','#B8860B':'Dark Golden Rod',
+ '#A9A9A9':'Dark Gray','#A9A9A9':'Dark Grey','#006400':'Dark Green','#BDB76B':'Dark Khaki','#8B008B':'Dark Magenta','#556B2F':'Dark Olive Green',
+ '#FF8C00':'Darkorange','#9932CC':'Dark Orchid','#8B0000':'Dark Red','#E9967A':'Dark Salmon','#8FBC8F':'Dark Sea Green','#483D8B':'Dark Slate Blue',
+ '#2F4F4F':'Dark Slate Gray','#2F4F4F':'Dark Slate Grey','#00CED1':'Dark Turquoise','#9400D3':'Dark Violet','#FF1493':'Deep Pink','#00BFFF':'Deep Sky Blue',
+ '#696969':'Dim Gray','#696969':'Dim Grey','#1E90FF':'Dodger Blue','#B22222':'Fire Brick','#FFFAF0':'Floral White','#228B22':'Forest Green',
+ '#FF00FF':'Fuchsia','#DCDCDC':'Gainsboro','#F8F8FF':'Ghost White','#FFD700':'Gold','#DAA520':'Golden Rod','#808080':'Gray','#808080':'Grey',
+ '#008000':'Green','#ADFF2F':'Green Yellow','#F0FFF0':'Honey Dew','#FF69B4':'Hot Pink','#CD5C5C':'Indian Red','#4B0082':'Indigo','#FFFFF0':'Ivory',
+ '#F0E68C':'Khaki','#E6E6FA':'Lavender','#FFF0F5':'Lavender Blush','#7CFC00':'Lawn Green','#FFFACD':'Lemon Chiffon','#ADD8E6':'Light Blue',
+ '#F08080':'Light Coral','#E0FFFF':'Light Cyan','#FAFAD2':'Light Golden Rod Yellow','#D3D3D3':'Light Gray','#D3D3D3':'Light Grey','#90EE90':'Light Green',
+ '#FFB6C1':'Light Pink','#FFA07A':'Light Salmon','#20B2AA':'Light Sea Green','#87CEFA':'Light Sky Blue','#778899':'Light Slate Gray','#778899':'Light Slate Grey',
+ '#B0C4DE':'Light Steel Blue','#FFFFE0':'Light Yellow','#00FF00':'Lime','#32CD32':'Lime Green','#FAF0E6':'Linen','#FF00FF':'Magenta','#800000':'Maroon',
+ '#66CDAA':'Medium Aqua Marine','#0000CD':'Medium Blue','#BA55D3':'Medium Orchid','#9370D8':'Medium Purple','#3CB371':'Medium Sea Green','#7B68EE':'Medium Slate Blue',
+ '#00FA9A':'Medium Spring Green','#48D1CC':'Medium Turquoise','#C71585':'Medium Violet Red','#191970':'Midnight Blue','#F5FFFA':'Mint Cream','#FFE4E1':'Misty Rose','#FFE4B5':'Moccasin',
+ '#FFDEAD':'Navajo White','#000080':'Navy','#FDF5E6':'Old Lace','#808000':'Olive','#6B8E23':'Olive Drab','#FFA500':'Orange','#FF4500':'Orange Red','#DA70D6':'Orchid',
+ '#EEE8AA':'Pale Golden Rod','#98FB98':'Pale Green','#AFEEEE':'Pale Turquoise','#D87093':'Pale Violet Red','#FFEFD5':'Papaya Whip','#FFDAB9':'Peach Puff',
+ '#CD853F':'Peru','#FFC0CB':'Pink','#DDA0DD':'Plum','#B0E0E6':'Powder Blue','#800080':'Purple','#FF0000':'Red','#BC8F8F':'Rosy Brown','#4169E1':'Royal Blue',
+ '#8B4513':'Saddle Brown','#FA8072':'Salmon','#F4A460':'Sandy Brown','#2E8B57':'Sea Green','#FFF5EE':'Sea Shell','#A0522D':'Sienna','#C0C0C0':'Silver',
+ '#87CEEB':'Sky Blue','#6A5ACD':'Slate Blue','#708090':'Slate Gray','#708090':'Slate Grey','#FFFAFA':'Snow','#00FF7F':'Spring Green',
+ '#4682B4':'Steel Blue','#D2B48C':'Tan','#008080':'Teal','#D8BFD8':'Thistle','#FF6347':'Tomato','#40E0D0':'Turquoise','#EE82EE':'Violet',
+ '#F5DEB3':'Wheat','#FFFFFF':'White','#F5F5F5':'White Smoke','#FFFF00':'Yellow','#9ACD32':'Yellow Green'
+};
+
+var namedLookup = {};
+
+function init() {
+ var inputColor = convertRGBToHex(tinyMCEPopup.getWindowArg('input_color')), key, value;
+
+ tinyMCEPopup.resizeToInnerSize();
+
+ generatePicker();
+ generateWebColors();
+ generateNamedColors();
+
+ if (inputColor) {
+ changeFinalColor(inputColor);
+
+ col = convertHexToRGB(inputColor);
+
+ if (col)
+ updateLight(col.r, col.g, col.b);
+ }
+
+ for (key in named) {
+ value = named[key];
+ namedLookup[value.replace(/\s+/, '').toLowerCase()] = key.replace(/#/, '').toLowerCase();
+ }
+}
+
+function toHexColor(color) {
+ var matches, red, green, blue, toInt = parseInt;
+
+ function hex(value) {
+ value = parseInt(value).toString(16);
+
+ return value.length > 1 ? value : '0' + value; // Padd with leading zero
+ };
+
+ color = tinymce.trim(color);
+ color = color.replace(/^[#]/, '').toLowerCase(); // remove leading '#'
+ color = namedLookup[color] || color;
+
+ matches = /^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/.exec(color);
+
+ if (matches) {
+ red = toInt(matches[1]);
+ green = toInt(matches[2]);
+ blue = toInt(matches[3]);
+ } else {
+ matches = /^([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/.exec(color);
+
+ if (matches) {
+ red = toInt(matches[1], 16);
+ green = toInt(matches[2], 16);
+ blue = toInt(matches[3], 16);
+ } else {
+ matches = /^([0-9a-f])([0-9a-f])([0-9a-f])$/.exec(color);
+
+ if (matches) {
+ red = toInt(matches[1] + matches[1], 16);
+ green = toInt(matches[2] + matches[2], 16);
+ blue = toInt(matches[3] + matches[3], 16);
+ } else {
+ return '';
+ }
+ }
+ }
+
+ return '#' + hex(red) + hex(green) + hex(blue);
+}
+
+function insertAction() {
+ var color = document.getElementById("color").value, f = tinyMCEPopup.getWindowArg('func');
+
+ var hexColor = toHexColor(color);
+
+ if (hexColor === '') {
+ var text = tinyMCEPopup.editor.getLang('advanced_dlg.invalid_color_value');
+ tinyMCEPopup.alert(text + ': ' + color);
+ }
+ else {
+ tinyMCEPopup.restoreSelection();
+
+ if (f)
+ f(hexColor);
+
+ tinyMCEPopup.close();
+ }
+}
+
+function showColor(color, name) {
+ if (name)
+ document.getElementById("colorname").innerHTML = name;
+
+ document.getElementById("preview").style.backgroundColor = color;
+ document.getElementById("color").value = color.toUpperCase();
+}
+
+function convertRGBToHex(col) {
+ var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi");
+
+ if (!col)
+ return col;
+
+ var rgb = col.replace(re, "$1,$2,$3").split(',');
+ if (rgb.length == 3) {
+ r = parseInt(rgb[0]).toString(16);
+ g = parseInt(rgb[1]).toString(16);
+ b = parseInt(rgb[2]).toString(16);
+
+ r = r.length == 1 ? '0' + r : r;
+ g = g.length == 1 ? '0' + g : g;
+ b = b.length == 1 ? '0' + b : b;
+
+ return "#" + r + g + b;
+ }
+
+ return col;
+}
+
+function convertHexToRGB(col) {
+ if (col.indexOf('#') != -1) {
+ col = col.replace(new RegExp('[^0-9A-F]', 'gi'), '');
+
+ r = parseInt(col.substring(0, 2), 16);
+ g = parseInt(col.substring(2, 4), 16);
+ b = parseInt(col.substring(4, 6), 16);
+
+ return {r : r, g : g, b : b};
+ }
+
+ return null;
+}
+
+function generatePicker() {
+ var el = document.getElementById('light'), h = '', i;
+
+ for (i = 0; i < detail; i++){
+ h += '<div id="gs'+i+'" style="background-color:#000000; width:15px; height:3px; border-style:none; border-width:0px;"'
+ + ' onclick="changeFinalColor(this.style.backgroundColor)"'
+ + ' onmousedown="isMouseDown = true; return false;"'
+ + ' onmouseup="isMouseDown = false;"'
+ + ' onmousemove="if (isMouseDown && isMouseOver) changeFinalColor(this.style.backgroundColor); return false;"'
+ + ' onmouseover="isMouseOver = true;"'
+ + ' onmouseout="isMouseOver = false;"'
+ + '></div>';
+ }
+
+ el.innerHTML = h;
+}
+
+function generateWebColors() {
+ var el = document.getElementById('webcolors'), h = '', i;
+
+ if (el.className == 'generated')
+ return;
+
+ // TODO: VoiceOver doesn't seem to support legend as a label referenced by labelledby.
+ h += '<div role="listbox" aria-labelledby="webcolors_title" tabindex="0"><table role="presentation" border="0" cellspacing="1" cellpadding="0">'
+ + '<tr>';
+
+ for (i=0; i<colors.length; i++) {
+ h += '<td bgcolor="' + colors[i] + '" width="10" height="10">'
+ + '<a href="javascript:insertAction();" role="option" tabindex="-1" aria-labelledby="web_colors_' + i + '" onfocus="showColor(\'' + colors[i] + '\');" onmouseover="showColor(\'' + colors[i] + '\');" style="display:block;width:10px;height:10px;overflow:hidden;">';
+ if (tinyMCEPopup.editor.forcedHighContrastMode) {
+ h += '<canvas class="mceColorSwatch" height="10" width="10" data-color="' + colors[i] + '"></canvas>';
+ }
+ h += '<span class="mceVoiceLabel" style="display:none;" id="web_colors_' + i + '">' + colors[i].toUpperCase() + '</span>';
+ h += '</a></td>';
+ if ((i+1) % 18 == 0)
+ h += '</tr><tr>';
+ }
+
+ h += '</table></div>';
+
+ el.innerHTML = h;
+ el.className = 'generated';
+
+ paintCanvas(el);
+ enableKeyboardNavigation(el.firstChild);
+}
+
+function paintCanvas(el) {
+ tinyMCEPopup.getWin().tinymce.each(tinyMCEPopup.dom.select('canvas.mceColorSwatch', el), function(canvas) {
+ var context;
+ if (canvas.getContext && (context = canvas.getContext("2d"))) {
+ context.fillStyle = canvas.getAttribute('data-color');
+ context.fillRect(0, 0, 10, 10);
+ }
+ });
+}
+function generateNamedColors() {
+ var el = document.getElementById('namedcolors'), h = '', n, v, i = 0;
+
+ if (el.className == 'generated')
+ return;
+
+ for (n in named) {
+ v = named[n];
+ h += '<a href="javascript:insertAction();" role="option" tabindex="-1" aria-labelledby="named_colors_' + i + '" onfocus="showColor(\'' + n + '\',\'' + v + '\');" onmouseover="showColor(\'' + n + '\',\'' + v + '\');" style="background-color: ' + n + '">';
+ if (tinyMCEPopup.editor.forcedHighContrastMode) {
+ h += '<canvas class="mceColorSwatch" height="10" width="10" data-color="' + colors[i] + '"></canvas>';
+ }
+ h += '<span class="mceVoiceLabel" style="display:none;" id="named_colors_' + i + '">' + v + '</span>';
+ h += '</a>';
+ i++;
+ }
+
+ el.innerHTML = h;
+ el.className = 'generated';
+
+ paintCanvas(el);
+ enableKeyboardNavigation(el);
+}
+
+function enableKeyboardNavigation(el) {
+ tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', {
+ root: el,
+ items: tinyMCEPopup.dom.select('a', el)
+ }, tinyMCEPopup.dom);
+}
+
+function dechex(n) {
+ return strhex.charAt(Math.floor(n / 16)) + strhex.charAt(n % 16);
+}
+
+function computeColor(e) {
+ var x, y, partWidth, partDetail, imHeight, r, g, b, coef, i, finalCoef, finalR, finalG, finalB, pos = tinyMCEPopup.dom.getPos(e.target);
+
+ x = e.offsetX ? e.offsetX : (e.target ? e.clientX - pos.x : 0);
+ y = e.offsetY ? e.offsetY : (e.target ? e.clientY - pos.y : 0);
+
+ partWidth = document.getElementById('colors').width / 6;
+ partDetail = detail / 2;
+ imHeight = document.getElementById('colors').height;
+
+ r = (x >= 0)*(x < partWidth)*255 + (x >= partWidth)*(x < 2*partWidth)*(2*255 - x * 255 / partWidth) + (x >= 4*partWidth)*(x < 5*partWidth)*(-4*255 + x * 255 / partWidth) + (x >= 5*partWidth)*(x < 6*partWidth)*255;
+ g = (x >= 0)*(x < partWidth)*(x * 255 / partWidth) + (x >= partWidth)*(x < 3*partWidth)*255 + (x >= 3*partWidth)*(x < 4*partWidth)*(4*255 - x * 255 / partWidth);
+ b = (x >= 2*partWidth)*(x < 3*partWidth)*(-2*255 + x * 255 / partWidth) + (x >= 3*partWidth)*(x < 5*partWidth)*255 + (x >= 5*partWidth)*(x < 6*partWidth)*(6*255 - x * 255 / partWidth);
+
+ coef = (imHeight - y) / imHeight;
+ r = 128 + (r - 128) * coef;
+ g = 128 + (g - 128) * coef;
+ b = 128 + (b - 128) * coef;
+
+ changeFinalColor('#' + dechex(r) + dechex(g) + dechex(b));
+ updateLight(r, g, b);
+}
+
+function updateLight(r, g, b) {
+ var i, partDetail = detail / 2, finalCoef, finalR, finalG, finalB, color;
+
+ for (i=0; i<detail; i++) {
+ if ((i>=0) && (i<partDetail)) {
+ finalCoef = i / partDetail;
+ finalR = dechex(255 - (255 - r) * finalCoef);
+ finalG = dechex(255 - (255 - g) * finalCoef);
+ finalB = dechex(255 - (255 - b) * finalCoef);
+ } else {
+ finalCoef = 2 - i / partDetail;
+ finalR = dechex(r * finalCoef);
+ finalG = dechex(g * finalCoef);
+ finalB = dechex(b * finalCoef);
+ }
+
+ color = finalR + finalG + finalB;
+
+ setCol('gs' + i, '#'+color);
+ }
+}
+
+function changeFinalColor(color) {
+ if (color.indexOf('#') == -1)
+ color = convertRGBToHex(color);
+
+ setCol('preview', color);
+ document.getElementById('color').value = color;
+}
+
+function setCol(e, c) {
+ try {
+ document.getElementById(e).style.backgroundColor = c;
+ } catch (ex) {
+ // Ignore IE warning
+ }
+}
+
+tinyMCEPopup.onInit.add(init);
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/js/image.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/js/image.js
new file mode 100644
index 00000000..bb09e75b
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/js/image.js
@@ -0,0 +1,253 @@
+var ImageDialog = {
+ preInit : function() {
+ var url;
+
+ tinyMCEPopup.requireLangPack();
+
+ if (url = tinyMCEPopup.getParam("external_image_list_url"))
+ document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
+ },
+
+ init : function() {
+ var f = document.forms[0], ed = tinyMCEPopup.editor;
+
+ // Setup browse button
+ document.getElementById('srcbrowsercontainer').innerHTML = getBrowserHTML('srcbrowser','src','image','theme_advanced_image');
+ if (isVisible('srcbrowser'))
+ document.getElementById('src').style.width = '180px';
+
+ e = ed.selection.getNode();
+
+ this.fillFileList('image_list', tinyMCEPopup.getParam('external_image_list', 'tinyMCEImageList'));
+
+ if (e.nodeName == 'IMG') {
+ f.src.value = ed.dom.getAttrib(e, 'src');
+ f.alt.value = ed.dom.getAttrib(e, 'alt');
+ f.border.value = this.getAttrib(e, 'border');
+ f.vspace.value = this.getAttrib(e, 'vspace');
+ f.hspace.value = this.getAttrib(e, 'hspace');
+ f.width.value = ed.dom.getAttrib(e, 'width');
+ f.height.value = ed.dom.getAttrib(e, 'height');
+ f.insert.value = ed.getLang('update');
+ this.styleVal = ed.dom.getAttrib(e, 'style');
+ selectByValue(f, 'image_list', f.src.value);
+ selectByValue(f, 'align', this.getAttrib(e, 'align'));
+ this.updateStyle();
+ }
+ },
+
+ fillFileList : function(id, l) {
+ var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
+
+ l = typeof(l) === 'function' ? l() : window[l];
+
+ if (l && l.length > 0) {
+ lst.options[lst.options.length] = new Option('', '');
+
+ tinymce.each(l, function(o) {
+ lst.options[lst.options.length] = new Option(o[0], o[1]);
+ });
+ } else
+ dom.remove(dom.getParent(id, 'tr'));
+ },
+
+ update : function() {
+ var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, args = {}, el;
+
+ tinyMCEPopup.restoreSelection();
+
+ if (f.src.value === '') {
+ if (ed.selection.getNode().nodeName == 'IMG') {
+ ed.dom.remove(ed.selection.getNode());
+ ed.execCommand('mceRepaint');
+ }
+
+ tinyMCEPopup.close();
+ return;
+ }
+
+ if (!ed.settings.inline_styles) {
+ args = tinymce.extend(args, {
+ vspace : nl.vspace.value,
+ hspace : nl.hspace.value,
+ border : nl.border.value,
+ align : getSelectValue(f, 'align')
+ });
+ } else
+ args.style = this.styleVal;
+
+ tinymce.extend(args, {
+ src : f.src.value.replace(/ /g, '%20'),
+ alt : f.alt.value,
+ width : f.width.value,
+ height : f.height.value
+ });
+
+ el = ed.selection.getNode();
+
+ if (el && el.nodeName == 'IMG') {
+ ed.dom.setAttribs(el, args);
+ tinyMCEPopup.editor.execCommand('mceRepaint');
+ tinyMCEPopup.editor.focus();
+ } else {
+ tinymce.each(args, function(value, name) {
+ if (value === "") {
+ delete args[name];
+ }
+ });
+
+ ed.execCommand('mceInsertContent', false, tinyMCEPopup.editor.dom.createHTML('img', args), {skip_undo : 1});
+ ed.undoManager.add();
+ }
+
+ tinyMCEPopup.close();
+ },
+
+ updateStyle : function() {
+ var dom = tinyMCEPopup.dom, st = {}, v, f = document.forms[0];
+
+ if (tinyMCEPopup.editor.settings.inline_styles) {
+ tinymce.each(tinyMCEPopup.dom.parseStyle(this.styleVal), function(value, key) {
+ st[key] = value;
+ });
+
+ // Handle align
+ v = getSelectValue(f, 'align');
+ if (v) {
+ if (v == 'left' || v == 'right') {
+ st['float'] = v;
+ delete st['vertical-align'];
+ } else {
+ st['vertical-align'] = v;
+ delete st['float'];
+ }
+ } else {
+ delete st['float'];
+ delete st['vertical-align'];
+ }
+
+ // Handle border
+ v = f.border.value;
+ if (v || v == '0') {
+ if (v == '0')
+ st['border'] = '0';
+ else
+ st['border'] = v + 'px solid black';
+ } else
+ delete st['border'];
+
+ // Handle hspace
+ v = f.hspace.value;
+ if (v) {
+ delete st['margin'];
+ st['margin-left'] = v + 'px';
+ st['margin-right'] = v + 'px';
+ } else {
+ delete st['margin-left'];
+ delete st['margin-right'];
+ }
+
+ // Handle vspace
+ v = f.vspace.value;
+ if (v) {
+ delete st['margin'];
+ st['margin-top'] = v + 'px';
+ st['margin-bottom'] = v + 'px';
+ } else {
+ delete st['margin-top'];
+ delete st['margin-bottom'];
+ }
+
+ // Merge
+ st = tinyMCEPopup.dom.parseStyle(dom.serializeStyle(st), 'img');
+ this.styleVal = dom.serializeStyle(st, 'img');
+ }
+ },
+
+ getAttrib : function(e, at) {
+ var ed = tinyMCEPopup.editor, dom = ed.dom, v, v2;
+
+ if (ed.settings.inline_styles) {
+ switch (at) {
+ case 'align':
+ if (v = dom.getStyle(e, 'float'))
+ return v;
+
+ if (v = dom.getStyle(e, 'vertical-align'))
+ return v;
+
+ break;
+
+ case 'hspace':
+ v = dom.getStyle(e, 'margin-left')
+ v2 = dom.getStyle(e, 'margin-right');
+ if (v && v == v2)
+ return parseInt(v.replace(/[^0-9]/g, ''));
+
+ break;
+
+ case 'vspace':
+ v = dom.getStyle(e, 'margin-top')
+ v2 = dom.getStyle(e, 'margin-bottom');
+ if (v && v == v2)
+ return parseInt(v.replace(/[^0-9]/g, ''));
+
+ break;
+
+ case 'border':
+ v = 0;
+
+ tinymce.each(['top', 'right', 'bottom', 'left'], function(sv) {
+ sv = dom.getStyle(e, 'border-' + sv + '-width');
+
+ // False or not the same as prev
+ if (!sv || (sv != v && v !== 0)) {
+ v = 0;
+ return false;
+ }
+
+ if (sv)
+ v = sv;
+ });
+
+ if (v)
+ return parseInt(v.replace(/[^0-9]/g, ''));
+
+ break;
+ }
+ }
+
+ if (v = dom.getAttrib(e, at))
+ return v;
+
+ return '';
+ },
+
+ resetImageData : function() {
+ var f = document.forms[0];
+
+ f.width.value = f.height.value = "";
+ },
+
+ updateImageData : function() {
+ var f = document.forms[0], t = ImageDialog;
+
+ if (f.width.value == "")
+ f.width.value = t.preloadImg.width;
+
+ if (f.height.value == "")
+ f.height.value = t.preloadImg.height;
+ },
+
+ getImageData : function() {
+ var f = document.forms[0];
+
+ this.preloadImg = new Image();
+ this.preloadImg.onload = this.updateImageData;
+ this.preloadImg.onerror = this.resetImageData;
+ this.preloadImg.src = tinyMCEPopup.editor.documentBaseURI.toAbsolute(f.src.value);
+ }
+};
+
+ImageDialog.preInit();
+tinyMCEPopup.onInit.add(ImageDialog.init, ImageDialog);
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/js/link.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/js/link.js
new file mode 100644
index 00000000..8c1d73c5
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/js/link.js
@@ -0,0 +1,159 @@
+tinyMCEPopup.requireLangPack();
+
+var LinkDialog = {
+ preInit : function() {
+ var url;
+
+ if (url = tinyMCEPopup.getParam("external_link_list_url"))
+ document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
+ },
+
+ init : function() {
+ var f = document.forms[0], ed = tinyMCEPopup.editor;
+
+ // Setup browse button
+ document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser', 'href', 'file', 'theme_advanced_link');
+ if (isVisible('hrefbrowser'))
+ document.getElementById('href').style.width = '180px';
+
+ this.fillClassList('class_list');
+ this.fillFileList('link_list', 'tinyMCELinkList');
+ this.fillTargetList('target_list');
+
+ if (e = ed.dom.getParent(ed.selection.getNode(), 'A')) {
+ f.href.value = ed.dom.getAttrib(e, 'href');
+ f.linktitle.value = ed.dom.getAttrib(e, 'title');
+ f.insert.value = ed.getLang('update');
+ selectByValue(f, 'link_list', f.href.value);
+ selectByValue(f, 'target_list', ed.dom.getAttrib(e, 'target'));
+ selectByValue(f, 'class_list', ed.dom.getAttrib(e, 'class'));
+ }
+ },
+
+ update : function() {
+ var f = document.forms[0], ed = tinyMCEPopup.editor, e, b, href = f.href.value.replace(/ /g, '%20');
+
+ tinyMCEPopup.restoreSelection();
+ e = ed.dom.getParent(ed.selection.getNode(), 'A');
+
+ // Remove element if there is no href
+ if (!f.href.value) {
+ if (e) {
+ b = ed.selection.getBookmark();
+ ed.dom.remove(e, 1);
+ ed.selection.moveToBookmark(b);
+ tinyMCEPopup.execCommand("mceEndUndoLevel");
+ tinyMCEPopup.close();
+ return;
+ }
+ }
+
+ // Create new anchor elements
+ if (e == null) {
+ ed.getDoc().execCommand("unlink", false, null);
+ tinyMCEPopup.execCommand("mceInsertLink", false, "#mce_temp_url#", {skip_undo : 1});
+
+ tinymce.each(ed.dom.select("a"), function(n) {
+ if (ed.dom.getAttrib(n, 'href') == '#mce_temp_url#') {
+ e = n;
+
+ ed.dom.setAttribs(e, {
+ href : href,
+ title : f.linktitle.value,
+ target : f.target_list ? getSelectValue(f, "target_list") : null,
+ 'class' : f.class_list ? getSelectValue(f, "class_list") : null
+ });
+ }
+ });
+ } else {
+ ed.dom.setAttribs(e, {
+ href : href,
+ title : f.linktitle.value
+ });
+
+ if (f.target_list) {
+ ed.dom.setAttrib(e, 'target', getSelectValue(f, "target_list"));
+ }
+
+ if (f.class_list) {
+ ed.dom.setAttrib(e, 'class', getSelectValue(f, "class_list"));
+ }
+ }
+
+ // Don't move caret if selection was image
+ if (e.childNodes.length != 1 || e.firstChild.nodeName != 'IMG') {
+ ed.focus();
+ ed.selection.select(e);
+ ed.selection.collapse(0);
+ tinyMCEPopup.storeSelection();
+ }
+
+ tinyMCEPopup.execCommand("mceEndUndoLevel");
+ tinyMCEPopup.close();
+ },
+
+ checkPrefix : function(n) {
+ if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_email')))
+ n.value = 'mailto:' + n.value;
+
+ if (/^\s*www\./i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_external')))
+ n.value = 'http://' + n.value;
+ },
+
+ fillFileList : function(id, l) {
+ var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
+
+ l = window[l];
+
+ if (l && l.length > 0) {
+ lst.options[lst.options.length] = new Option('', '');
+
+ tinymce.each(l, function(o) {
+ lst.options[lst.options.length] = new Option(o[0], o[1]);
+ });
+ } else
+ dom.remove(dom.getParent(id, 'tr'));
+ },
+
+ fillClassList : function(id) {
+ var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
+
+ if (v = tinyMCEPopup.getParam('theme_advanced_styles')) {
+ cl = [];
+
+ tinymce.each(v.split(';'), function(v) {
+ var p = v.split('=');
+
+ cl.push({'title' : p[0], 'class' : p[1]});
+ });
+ } else
+ cl = tinyMCEPopup.editor.dom.getClasses();
+
+ if (cl.length > 0) {
+ lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), '');
+
+ tinymce.each(cl, function(o) {
+ lst.options[lst.options.length] = new Option(o.title || o['class'], o['class']);
+ });
+ } else
+ dom.remove(dom.getParent(id, 'tr'));
+ },
+
+ fillTargetList : function(id) {
+ var dom = tinyMCEPopup.dom, lst = dom.get(id), v;
+
+ lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), '');
+ lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('advanced_dlg.link_target_same'), '_self');
+ lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('advanced_dlg.link_target_blank'), '_blank');
+
+ if (v = tinyMCEPopup.getParam('theme_advanced_link_targets')) {
+ tinymce.each(v.split(','), function(v) {
+ v = v.split('=');
+ lst.options[lst.options.length] = new Option(v[0], v[1]);
+ });
+ }
+ }
+};
+
+LinkDialog.preInit();
+tinyMCEPopup.onInit.add(LinkDialog.init, LinkDialog);
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/js/source_editor.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/js/source_editor.js
new file mode 100644
index 00000000..dd5e366f
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/js/source_editor.js
@@ -0,0 +1,78 @@
+tinyMCEPopup.requireLangPack();
+tinyMCEPopup.onInit.add(onLoadInit);
+
+function saveContent() {
+ tinyMCEPopup.editor.setContent(document.getElementById('htmlSource').value, {source_view : true});
+ tinyMCEPopup.close();
+}
+
+function onLoadInit() {
+ tinyMCEPopup.resizeToInnerSize();
+
+ // Remove Gecko spellchecking
+ if (tinymce.isGecko)
+ document.body.spellcheck = tinyMCEPopup.editor.getParam("gecko_spellcheck");
+
+ document.getElementById('htmlSource').value = tinyMCEPopup.editor.getContent({source_view : true});
+
+ if (tinyMCEPopup.editor.getParam("theme_advanced_source_editor_wrap", true)) {
+ turnWrapOn();
+ document.getElementById('wraped').checked = true;
+ }
+
+ resizeInputs();
+}
+
+function setWrap(val) {
+ var v, n, s = document.getElementById('htmlSource');
+
+ s.wrap = val;
+
+ if (!tinymce.isIE) {
+ v = s.value;
+ n = s.cloneNode(false);
+ n.setAttribute("wrap", val);
+ s.parentNode.replaceChild(n, s);
+ n.value = v;
+ }
+}
+
+function setWhiteSpaceCss(value) {
+ var el = document.getElementById('htmlSource');
+ tinymce.DOM.setStyle(el, 'white-space', value);
+}
+
+function turnWrapOff() {
+ if (tinymce.isWebKit) {
+ setWhiteSpaceCss('pre');
+ } else {
+ setWrap('off');
+ }
+}
+
+function turnWrapOn() {
+ if (tinymce.isWebKit) {
+ setWhiteSpaceCss('pre-wrap');
+ } else {
+ setWrap('soft');
+ }
+}
+
+function toggleWordWrap(elm) {
+ if (elm.checked) {
+ turnWrapOn();
+ } else {
+ turnWrapOff();
+ }
+}
+
+function resizeInputs() {
+ var vp = tinyMCEPopup.dom.getViewPort(window), el;
+
+ el = document.getElementById('htmlSource');
+
+ if (el) {
+ el.style.width = (vp.w - 20) + 'px';
+ el.style.height = (vp.h - 65) + 'px';
+ }
+}
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/langs/de.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/langs/de.js
new file mode 100755
index 00000000..4bd5419f
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/langs/de.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('de.advanced',{"underline_desc":"Unterstrichen (Strg+U)","italic_desc":"Kursiv (Strg+I)","bold_desc":"Fett (Strg+B)",dd:"Definitionsbeschreibung",dt:"Definitionsbegriff",samp:"Beispiel",code:"Code",blockquote:"Zitatblock",h6:"\u00dcberschrift 6",h5:"\u00dcberschrift 5",h4:"\u00dcberschrift 4",h3:"\u00dcberschrift 3",h2:"\u00dcberschrift 2",h1:"\u00dcberschrift 1",pre:"Rohdaten",address:"Adresse",div:"Zusammenh\u00e4ngender Bereich",paragraph:"Absatz",block:"Vorlage",fontdefault:"Schriftart","font_size":"Schriftgr\u00f6\u00dfe","style_select":"Format","anchor_delta_width":"13","more_colors":"Weitere Farben","toolbar_focus":"Zur Werkzeugleiste springen: Alt+Q; Zum Editor springen: Alt-Z; Zum Elementpfad springen: Alt-X",newdocument:"Soll wirklich der ganze Inhalt gel\u00f6scht werden?",path:"Pfad","clipboard_msg":"Kopieren, Ausschneiden und Einf\u00fcgen sind im Mozilla Firefox nicht m\u00f6glich. Mehr \u00fcber dieses Problem erfahren?","blockquote_desc":"Zitatblock","help_desc":"Hilfe","newdocument_desc":"Neues Dokument","image_props_desc":"Bildeigenschaften","paste_desc":"Einf\u00fcgen","copy_desc":"Kopieren","cut_desc":"Ausschneiden","anchor_desc":"Anker einf\u00fcgen/ver\u00e4ndern","visualaid_desc":"Hilfslinien und unsichtbare Elemente ein-/ausblenden","charmap_desc":"Sonderzeichen einf\u00fcgen","backcolor_desc":"Hintergrundfarbe","forecolor_desc":"Textfarbe","custom1_desc":"Benutzerdefinierte Beschreibung","removeformat_desc":"Formatierungen zur\u00fccksetzen","hr_desc":"Trennlinie einf\u00fcgen","sup_desc":"Hochgestellt","sub_desc":"Tiefgestellt","code_desc":"HTML-Quellcode bearbeiten","cleanup_desc":"Quellcode aufr\u00e4umen","image_desc":"Bild einf\u00fcgen/ver\u00e4ndern","unlink_desc":"Link entfernen","link_desc":"Link einf\u00fcgen/ver\u00e4ndern","redo_desc":"Wiederholen (Strg+Y)","undo_desc":"R\u00fcckg\u00e4ngig (Strg+Z)","indent_desc":"Einr\u00fccken","outdent_desc":"Ausr\u00fccken","numlist_desc":"Sortierte Liste","bullist_desc":"Unsortierte Liste","justifyfull_desc":"Blocksatz","justifyright_desc":"Rechtsb\u00fcndig","justifycenter_desc":"Zentriert","justifyleft_desc":"Linksb\u00fcndig","striketrough_desc":"Durchgestrichen","help_shortcut":"F\u00fcr die Toolbar ALT-F10 dr\u00fccken. F\u00fcr die Hilfe ALT-0 dr\u00fccken","rich_text_area":"Rich Text Feld","shortcuts_desc":"Eingabehilfe",toolbar:"Pfeiltasten verwenden um Funktionen auszuw\u00e4hlen","anchor_delta_height":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/langs/de_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/langs/de_dlg.js
new file mode 100644
index 00000000..0ee5af90
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/langs/de_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('de.advanced_dlg',{"link_list":"Linkliste","link_is_external":"Diese Adresse scheint ein externer Link zu sein. Soll das dazu ben\u00f6tigte \"http://\" vorangestellt werden?","link_is_email":"Diese Adresse scheint eine E-Mail Adresse zu sein. Soll das dazu ben\u00f6tigte \"mailto:\" vorangestellt werden?","link_titlefield":"Titel","link_target_blank":"In neuem Fenster \u00f6ffnen","link_target_same":"Im selben Fenster \u00f6ffnen","link_target":"Fenster","link_url":"Adresse","link_title":"Link einf\u00fcgen/ver\u00e4ndern","image_align_right":"Rechts","image_align_left":"Links","image_align_textbottom":"Unten im Text","image_align_texttop":"Oben im Text","image_align_bottom":"Unten","image_align_middle":"Mittig","image_align_top":"Oben","image_align_baseline":"Zeile","image_align":"Ausrichtung","image_hspace":"Horizontaler Abstand","image_vspace":"Vertikaler Abstand","image_dimensions":"Abmessungen","image_alt":"Alternativtext","image_list":"Bilderliste","image_border":"Rahmen","image_src":"Adresse","image_title":"Bild einf\u00fcgen/ver\u00e4ndern","charmap_title":"Sonderzeichen","colorpicker_name":"Name:","colorpicker_color":"Farbe:","colorpicker_named_title":"Benannte Farben","colorpicker_named_tab":"Benannte Farben","colorpicker_palette_title":"Farbpalette","colorpicker_palette_tab":"Palette","colorpicker_picker_title":"Farbwahl","colorpicker_picker_tab":"Farbwahl","colorpicker_title":"Farbe","code_wordwrap":"Automatischer Zeilenumbruch","code_title":"HTML-Quellcode bearbeiten","anchor_name":"Name des Ankers","anchor_title":"Anker einf\u00fcgen/ver\u00e4ndern","about_loaded":"Geladene Plugins","about_version":"Version","about_author":"Urheber","about_plugin":"Plugin","about_plugins":"Plugins","about_license":"Lizenzbedingungen","about_help":"Hilfe","about_general":"\u00dcber","about_title":"\u00dcber TinyMCE","charmap_usage":"Navigation mit linken und rechten Pfeiltasten.","anchor_invalid":"Bitte einen g\u00fcltigen Namen f\u00fcr den Anker eingeben!","accessibility_help":"Eingabehilfe","accessibility_usage_title":"Allgemeine Verwendung","invalid_color_value":"Ung\u00fcltige Farbangabe"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/langs/en.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/langs/en.js
new file mode 100755
index 00000000..f89eb92a
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/langs/en.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('en.advanced',{"underline_desc":"Underline (Ctrl+U)","italic_desc":"Italic (Ctrl+I)","bold_desc":"Bold (Ctrl+B)",dd:"Definition Description",dt:"Definition Term ",samp:"Code Sample",code:"Code",blockquote:"Block Quote",h6:"Heading 6",h5:"Heading 5",h4:"Heading 4",h3:"Heading 3",h2:"Heading 2",h1:"Heading 1",pre:"Preformatted",address:"Address",div:"DIV",paragraph:"Paragraph",block:"Format",fontdefault:"Font Family","font_size":"Font Size","style_select":"Styles","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":"","more_colors":"More Colors...","toolbar_focus":"Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X",newdocument:"Are you sure you want clear all contents?",path:"Path","clipboard_msg":"Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?","blockquote_desc":"Block Quote","help_desc":"Help","newdocument_desc":"New Document","image_props_desc":"Image Properties","paste_desc":"Paste (Ctrl+V)","copy_desc":"Copy (Ctrl+C)","cut_desc":"Cut (Ctrl+X)","anchor_desc":"Insert/Edit Anchor","visualaid_desc":"show/Hide Guidelines/Invisible Elements","charmap_desc":"Insert Special Character","backcolor_desc":"Select Background Color","forecolor_desc":"Select Text Color","custom1_desc":"Your Custom Description Here","removeformat_desc":"Remove Formatting","hr_desc":"Insert Horizontal Line","sup_desc":"Superscript","sub_desc":"Subscript","code_desc":"Edit HTML Source","cleanup_desc":"Cleanup Messy Code","image_desc":"Insert/Edit Image","unlink_desc":"Unlink","link_desc":"Insert/Edit Link","redo_desc":"Redo (Ctrl+Y)","undo_desc":"Undo (Ctrl+Z)","indent_desc":"Increase Indent","outdent_desc":"Decrease Indent","numlist_desc":"Insert/Remove Numbered List","bullist_desc":"Insert/Remove Bulleted List","justifyfull_desc":"Align Full","justifyright_desc":"Align Right","justifycenter_desc":"Align Center","justifyleft_desc":"Align Left","striketrough_desc":"Strikethrough","help_shortcut":"Press ALT-F10 for toolbar. Press ALT-0 for help","rich_text_area":"Rich Text Area","shortcuts_desc":"Accessability Help",toolbar:"Use arrow keys to select functions"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/langs/en_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/langs/en_dlg.js
new file mode 100644
index 00000000..e451f377
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/langs/en_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('en.advanced_dlg',{"link_list":"Link List","link_is_external":"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?","link_is_email":"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?","link_titlefield":"Title","link_target_blank":"Open Link in a New Window","link_target_same":"Open Link in the Same Window","link_target":"Target","link_url":"Link URL","link_title":"Insert/Edit Link","image_align_right":"Right","image_align_left":"Left","image_align_textbottom":"Text Bottom","image_align_texttop":"Text Top","image_align_bottom":"Bottom","image_align_middle":"Middle","image_align_top":"Top","image_align_baseline":"Baseline","image_align":"Alignment","image_hspace":"Horizontal Space","image_vspace":"Vertical Space","image_dimensions":"Dimensions","image_alt":"Image Description","image_list":"Image List","image_border":"Border","image_src":"Image URL","image_title":"Insert/Edit Image","charmap_title":"Select Special Character","colorpicker_name":"Name:","colorpicker_color":"Color:","colorpicker_named_title":"Named Colors","colorpicker_named_tab":"Named","colorpicker_palette_title":"Palette Colors","colorpicker_palette_tab":"Palette","colorpicker_picker_title":"Color Picker","colorpicker_picker_tab":"Picker","colorpicker_title":"Select a Color","code_wordwrap":"Word Wrap","code_title":"HTML Source Editor","anchor_name":"Anchor Name","anchor_title":"Insert/Edit Anchor","about_loaded":"Loaded Plugins","about_version":"Version","about_author":"Author","about_plugin":"Plugin","about_plugins":"Plugins","about_license":"License","about_help":"Help","about_general":"About","about_title":"About TinyMCE","charmap_usage":"Use left and right arrows to navigate.","anchor_invalid":"Please specify a valid anchor name.","accessibility_help":"Accessibility Help","accessibility_usage_title":"General Usage","invalid_color_value":"Invalid color value"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/langs/hu.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/langs/hu.js
new file mode 100644
index 00000000..ddd85347
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/langs/hu.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('hu.advanced',{"underline_desc":"Al\u00e1h\u00fazott (Ctrl+U)","italic_desc":"D\u0151lt (Ctrl+I)","bold_desc":"F\u00e9lk\u00f6v\u00e9r (Ctrl+B)",dd:"Defin\u00edci\u00f3 a defin\u00edci\u00f3s list\u00e1ban",dt:"Defini\u00e1lt kifejez\u00e9s a defin\u00edci\u00f3s list\u00e1ban",samp:"K\u00f3d minta",code:"K\u00f3d",blockquote:"Id\u00e9zet",h6:"C\u00edmsor 6",h5:"C\u00edmsor 5",h4:"C\u00edmsor 4",h3:"C\u00edmsor 3",h2:"C\u00edmsor 2",h1:"C\u00edmsor 1",pre:"El\u0151form\u00e1zott",address:"C\u00edm",div:"DIV",paragraph:"Bekezd\u00e9s",block:"Form\u00e1tum",fontdefault:"Bet\u0171t\u00edpus","font_size":"Bet\u0171m\u00e9ret","style_select":"St\u00edlusok","image_delta_height":"","image_delta_width":"","more_colors":"Tov\u00e1bbi sz\u00ednek...","toolbar_focus":"Eszk\u00f6z-gombokra ugr\u00e1s - Alt Q, Szerkeszt\u0151h\u00f6z ugr\u00e1s - Alt-Z, Elem\u00fatvonalhoz ugr\u00e1s - Alt-X",newdocument:"Biztosan t\u00f6rli az \u00f6sszes tartalmat?",path:"\u00datvonal","clipboard_msg":"A M\u00e1sol\u00e1s/Kiv\u00e1g\u00e1s/Besz\u00far\u00e1s funkci\u00f3k nem \u00e9rhet\u0151ek el Mozilla \u00e9s Firefox alatt. Szeretne t\u00f6bbet megtudni err\u0151l?","blockquote_desc":"Id\u00e9zet","help_desc":"Seg\u00edts\u00e9g","newdocument_desc":"\u00daj dokumentum","image_props_desc":"K\u00e9p tulajdons\u00e1gai","paste_desc":"Besz\u00far\u00e1s (Ctrl V)","copy_desc":"M\u00e1sol\u00e1s (Ctrl C)","cut_desc":"Kiv\u00e1g\u00e1s (Ctrl X) ","anchor_desc":"Horgony besz\u00far\u00e1sa/szerkeszt\u00e9se","visualaid_desc":"Vezet\u0151vonalak/nem l\u00e1that\u00f3 elemek ki-/bekapcsol\u00e1sa","charmap_desc":"Speci\u00e1lis karakter besz\u00far\u00e1sa","backcolor_desc":"H\u00e1tt\u00e9rsz\u00edn v\u00e1laszt\u00e1sa","forecolor_desc":"Sz\u00f6vegsz\u00edn v\u00e1laszt\u00e1sa","custom1_desc":"Az \u00f6n egyedi le\u00edr\u00e1sa","removeformat_desc":"Form\u00e1z\u00e1s elt\u00e1vol\u00edt\u00e1sa","hr_desc":"V\u00edzszintes elv\u00e1laszt\u00f3 vonal besz\u00far\u00e1sa","sup_desc":"Fels\u0151 index","sub_desc":"Als\u00f3 index","code_desc":"HTML forr\u00e1sk\u00f3d szerkeszt\u00e9se","cleanup_desc":"Minden form\u00e1z\u00e1s elt\u00e1vol\u00edt\u00e1sa","image_desc":"K\u00e9p besz\u00far\u00e1sa/szerkeszt\u00e9se","unlink_desc":"Link elt\u00e1vol\u00edt\u00e1sa","link_desc":"Link besz\u00far\u00e1sa/szerkeszt\u00e9se","redo_desc":"M\u00e9gis v\u00e9grehajt (Ctrl+Y)","undo_desc":"Visszavon\u00e1s (Ctrl+Z)","indent_desc":"Beh\u00faz\u00e1s n\u00f6vel\u00e9se","outdent_desc":"Beh\u00faz\u00e1s cs\u00f6kkent\u00e9se","numlist_desc":"Sz\u00e1mozott lista besz\u00far\u00e1sa/elt\u00e1vol\u00edt\u00e1sa","bullist_desc":"Felsorol\u00e1s besz\u00far\u00e1sa/elt\u00e1vol\u00edt\u00e1sa","justifyfull_desc":"Sorkiz\u00e1rt","justifyright_desc":"Jobbra z\u00e1rt","justifycenter_desc":"K\u00f6z\u00e9pre z\u00e1rt","justifyleft_desc":"Balra z\u00e1rt","striketrough_desc":"\u00c1th\u00fazott","help_shortcut":"Ugr\u00e1s az eszk\u00f6zt\u00e1rhoz: ALT-F10. Seg\u00edts\u00e9g: ALT-0.","rich_text_area":"Rich Text ter\u00fclet","shortcuts_desc":"El\u00e9rhet\u0151s\u00e9g s\u00fag\u00f3",toolbar:"Eszk\u00f6zt\u00e1r","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":""}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/langs/hu_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/langs/hu_dlg.js
new file mode 100644
index 00000000..4322cb69
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/langs/hu_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('hu.advanced_dlg',{"link_list":"Link lista","link_is_external":"A be\u00edrt internet c\u00edm k\u00fcls\u0151 hivatkoz\u00e1snak t\u0171nik, k\u00edv\u00e1nja a sz\u00fcks\u00e9ges http:// el\u0151taggal kieg\u00e9sz\u00edteni?","link_is_email":"A be\u00edrt internet c\u00edm e-mail c\u00edmnek t\u0171nik, k\u00edv\u00e1nja a sz\u00fcks\u00e9ges mailto: el\u0151taggal kieg\u00e9sz\u00edteni?","link_titlefield":"C\u00edm","link_target_blank":"Hivatkoz\u00e1s megnyit\u00e1sa \u00faj ablakban","link_target_same":"Hivatkoz\u00e1s megnyit\u00e1sa ugyanabban az ablakban","link_target":"Hivatkoz\u00e1s c\u00e9lja","link_url":"Internet c\u00edm","link_title":"Link besz\u00far\u00e1sa/szerkeszt\u00e9se","image_align_right":"Jobbra","image_align_left":"Balra","image_align_textbottom":"Sz\u00f6veg alj\u00e1hoz","image_align_texttop":"Sz\u00f6veg tetej\u00e9hez","image_align_bottom":"Lentre","image_align_middle":"K\u00f6z\u00e9pre","image_align_top":"Fentre","image_align_baseline":"Alapvonalhoz","image_align":"Igaz\u00edt\u00e1s","image_hspace":"V\u00edzszintes t\u00e1v","image_vspace":"F\u00fcgg\u0151leges t\u00e1v","image_dimensions":"M\u00e9retek","image_alt":"K\u00e9p le\u00edr\u00e1s","image_list":"K\u00e9p lista","image_border":"Keret","image_src":"K\u00e9p URL","image_title":"K\u00e9p besz\u00far\u00e1sa/szerkeszt\u00e9se","charmap_title":"Speci\u00e1lis karakter v\u00e1laszt\u00e1sa","colorpicker_name":"N\u00e9v:","colorpicker_color":"Sz\u00edn:","colorpicker_named_title":"Elnevezett sz\u00ednek","colorpicker_named_tab":"Elnevezett","colorpicker_palette_title":"Paletta sz\u00ednek","colorpicker_palette_tab":"Paletta","colorpicker_picker_title":"Sz\u00ednv\u00e1laszt\u00f3","colorpicker_picker_tab":"V\u00e1laszt\u00f3","colorpicker_title":"Sz\u00ednv\u00e1laszt\u00e1s","code_wordwrap":"Sz\u00f6veg t\u00f6rdel\u00e9se","code_title":"HTML forr\u00e1s szerkeszt\u00e9se","anchor_name":"Horgonyn\u00e9v","anchor_title":"Horgony besz\u00far\u00e1sa/szerkeszt\u00e9se","about_loaded":"Bet\u00f6lt\u00f6tt pluginok","about_version":"Verzi\u00f3","about_author":"Szerz\u0151","about_plugin":"Plugin","about_plugins":"Pluginok","about_license":"Licensz","about_help":"Seg\u00edts\u00e9g","about_general":"R\u00f3lunk","about_title":"A TinyMCE-r\u0151l","charmap_usage":"A navig\u00e1l\u00e1shoz haszn\u00e1ld a bal \u00e9s jobb oldali nyilat.","anchor_invalid":"Adjon meg egy helyes horgony nevet.","accessibility_help":"El\u00e9rhet\u0151s\u00e9g s\u00fag\u00f3","accessibility_usage_title":"\u00c1ltal\u00e1nos haszn\u00e1lat","invalid_color_value":"\u00c9rv\u00e9nytelen sz\u00edn \u00e9rt\u00e9k"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/langs/ja.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/langs/ja.js
new file mode 100755
index 00000000..f5533c54
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/langs/ja.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('ja.advanced',{"underline_desc":"\u4e0b\u7dda (Ctrl+U)","italic_desc":"\u659c\u4f53 (Ctrl+I)","bold_desc":"\u592a\u5b57 (Ctrl+B)",dd:"\u8a9e\u53e5\u306e\u8aac\u660e",dt:"\u8a9e\u53e5\u306e\u5b9a\u7fa9",samp:"\u30b3\u30fc\u30c9\u306e\u4f8b",code:"\u30b3\u30fc\u30c9",blockquote:"\u5f15\u7528",h6:"\u898b\u51fa\u30576",h5:"\u898b\u51fa\u30575",h4:"\u898b\u51fa\u30574",h3:"\u898b\u51fa\u30573",h2:"\u898b\u51fa\u30572",h1:"\u898b\u51fa\u30571",pre:"\u6574\u5f62\u6e08\u307f",address:"\u4f4f\u6240",div:"div\u8981\u7d20",paragraph:"\u6bb5\u843d",block:"\u66f8\u5f0f",fontdefault:"\u30d5\u30a9\u30f3\u30c8","font_size":"\u30d5\u30a9\u30f3\u30c8\u306e\u5927\u304d\u3055","style_select":"\u30b9\u30bf\u30a4\u30eb","more_colors":"\u3055\u3089\u306b\u8272\u3092\u4f7f\u7528...","toolbar_focus":"\u30c4\u30fc\u30eb\u30dc\u30bf\u30f3\u3078\u79fb\u52d5 - Alt Q, \u30a8\u30c7\u30a3\u30bf\u306b\u79fb\u52d5 - Alt-Z, \u8981\u7d20\u306e\u30d1\u30b9\u3078\u79fb\u52d5 - Alt-X",newdocument:"\u672c\u5f53\u306b\u3059\u3079\u3066\u306e\u5185\u5bb9\u3092\u6d88\u53bb\u3057\u3066\u3088\u3044\u3067\u3059\u304b?",path:"\u30d1\u30b9","clipboard_msg":"\u30b3\u30d4\u30fc/\u5207\u308a\u53d6\u308a/\u8cbc\u308a\u4ed8\u3051\u306fMozilla\u3068Firefox\u3067\u306f\u4f7f\u7528\u3067\u304d\u307e\u305b\u3093\u3002\n\u3053\u306e\u554f\u984c\u306e\u8a73\u7d30\u3092\u77e5\u308a\u305f\u3044\u3067\u3059\u304b?","blockquote_desc":"\u5f15\u7528\u30d6\u30ed\u30c3\u30af","help_desc":"\u30d8\u30eb\u30d7","newdocument_desc":"\u65b0\u3057\u3044\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8","image_props_desc":"\u753b\u50cf\u306e\u5c5e\u6027","paste_desc":"\u8cbc\u308a\u4ed8\u3051","copy_desc":"\u30b3\u30d4\u30fc","cut_desc":"\u5207\u308a\u53d6\u308a","anchor_desc":"\u30a2\u30f3\u30ab\u30fc\u306e\u633f\u5165/\u7de8\u96c6","visualaid_desc":"\u30ac\u30a4\u30c9\u30e9\u30a4\u30f3\u3068\u975e\u8868\u793a\u8981\u7d20\u306e\u8868\u793a\u3092\u5207\u66ff","charmap_desc":"\u7279\u6b8a\u6587\u5b57","backcolor_desc":"\u80cc\u666f\u306e\u8272","forecolor_desc":"\u6587\u5b57\u306e\u8272","custom1_desc":"\u8aac\u660e\u6587\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002","removeformat_desc":"\u66f8\u5f0f\u306e\u524a\u9664","hr_desc":"\u6c34\u5e73\u7dda\u3092\u633f\u5165","sup_desc":"\u4e0a\u4ed8\u304d\u6587\u5b57","sub_desc":"\u4e0b\u4ed8\u304d\u6587\u5b57","code_desc":"HTML\u306e\u30bd\u30fc\u30b9\u3092\u7de8\u96c6","cleanup_desc":"\u4e71\u96d1\u306a\u30b3\u30fc\u30c9\u3092\u6574\u5f62","image_desc":"\u753b\u50cf\u306e\u633f\u5165/\u7de8\u96c6","unlink_desc":"\u30ea\u30f3\u30af\u3092\u89e3\u9664","link_desc":"\u30ea\u30f3\u30af\u306e\u633f\u5165/\u7de8\u96c6","redo_desc":"\u3084\u308a\u76f4\u3059 (Ctrl+Y)","undo_desc":"\u5143\u306b\u623b\u3059 (Ctrl+Z)","indent_desc":"\u5b57\u4e0b\u3052\u3092\u5897\u3084\u3059","outdent_desc":"\u5b57\u4e0b\u3052\u3092\u6e1b\u3089\u3059","numlist_desc":"\u756a\u53f7\u3064\u304d\u30ea\u30b9\u30c8","bullist_desc":"\u756a\u53f7\u306a\u3057\u30ea\u30b9\u30c8","justifyfull_desc":"\u5747\u7b49\u5272\u4ed8","justifyright_desc":"\u53f3\u63c3\u3048","justifycenter_desc":"\u4e2d\u592e\u63c3\u3048","justifyleft_desc":"\u5de6\u63c3\u3048","striketrough_desc":"\u53d6\u308a\u6d88\u3057\u7dda","help_shortcut":"ALT-F10 \u3067\u30c4\u30fc\u30eb\u30d0\u30fc\u3001ALT-0 \u3067\u30d8\u30eb\u30d7","rich_text_area":"\u30ea\u30c3\u30c1\u30c6\u30ad\u30b9\u30c8\u30a8\u30ea\u30a2","shortcuts_desc":"\u30a2\u30af\u30bb\u30b7\u30d3\u30ea\u30c6\u30a3\u306e\u30d8\u30eb\u30d7",toolbar:"\u30c4\u30fc\u30eb\u30d0\u30fc","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/langs/ja_dlg.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/langs/ja_dlg.js
new file mode 100644
index 00000000..234fb71a
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/langs/ja_dlg.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('ja.advanced_dlg',{"link_list":"\u30ea\u30f3\u30af\u306e\u4e00\u89a7","link_is_external":"\u5165\u529b\u3057\u305fURL\u306f\u5916\u90e8\u306e\u30ea\u30f3\u30af\u306e\u3088\u3046\u3067\u3059\u3002\u30ea\u30f3\u30af\u306b http:// \u3092\u8ffd\u52a0\u3057\u307e\u3059\u304b?","link_is_email":"\u5165\u529b\u3057\u305fURL\u306f\u96fb\u5b50\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306e\u3088\u3046\u3067\u3059\u3002\u30ea\u30f3\u30af\u306b mailto: \u3092\u8ffd\u52a0\u3057\u307e\u3059\u304b?","link_titlefield":"\u30bf\u30a4\u30c8\u30eb","link_target_blank":"\u65b0\u3057\u3044\u30a6\u30a4\u30f3\u30c9\u30a6\u3067\u958b\u304f","link_target_same":"\u540c\u3058\u30a6\u30a4\u30f3\u30c9\u30a6\u3067\u958b\u304f","link_target":"\u30bf\u30fc\u30b2\u30c3\u30c8","link_url":"\u30ea\u30f3\u30af\u306eURL","link_title":"\u30ea\u30f3\u30af\u306e\u633f\u5165\u3084\u7de8\u96c6","image_align_right":"\u53f3\u63c3\u3048","image_align_left":"\u5de6\u63c3\u3048","image_align_textbottom":"\u30c6\u30ad\u30b9\u30c8\u306e\u4e0b\u7aef\u63c3\u3048","image_align_texttop":"\u30c6\u30ad\u30b9\u30c8\u306e\u4e0a\u7aef\u63c3\u3048","image_align_bottom":"\u4e0b\u63c3\u3048","image_align_middle":"\u4e2d\u592e\u63c3\u3048","image_align_top":"\u4e0a\u63c3\u3048","image_align_baseline":"\u30d9\u30fc\u30b9\u30e9\u30a4\u30f3\u63c3\u3048","image_align":"\u914d\u7f6e","image_hspace":"\u5de6\u53f3\u306e\u4f59\u767d","image_vspace":"\u4e0a\u4e0b\u306e\u4f59\u767d","image_dimensions":"\u5bf8\u6cd5","image_alt":"\u753b\u50cf\u306e\u8aac\u660e","image_list":"\u753b\u50cf\u306e\u4e00\u89a7","image_border":"\u67a0\u7dda","image_src":"\u753b\u50cf\u306eURL","image_title":"\u753b\u50cf\u306e\u633f\u5165\u3084\u7de8\u96c6","charmap_title":"\u7279\u6b8a\u6587\u5b57","colorpicker_name":"\u540d\u524d:","colorpicker_color":"\u8272:","colorpicker_named_title":"\u5b9a\u7fa9\u6e08\u307f\u306e\u8272","colorpicker_named_tab":"\u5b9a\u7fa9\u6e08\u307f","colorpicker_palette_title":"\u30d1\u30ec\u30c3\u30c8\u306e\u8272","colorpicker_palette_tab":"\u30d1\u30ec\u30c3\u30c8","colorpicker_picker_title":"\u8272\u9078\u629e","colorpicker_picker_tab":"\u9078\u629e","colorpicker_title":"\u8272\u3092\u9078\u629e","code_wordwrap":"\u884c\u306e\u6298\u308a\u8fd4\u3057","code_title":"HTML\u306e\u30bd\u30fc\u30b9\u30a8\u30c7\u30a3\u30bf","anchor_name":"\u30a2\u30f3\u30ab\u30fc\u306e\u540d\u524d","anchor_title":"\u30a2\u30f3\u30ab\u30fc\u306e\u633f\u5165\u3084\u7de8\u96c6","about_loaded":"\u8aad\u307f\u8fbc\u307f\u6e08\u307f\u306e\u30d7\u30e9\u30b0\u30a4\u30f3","about_version":"\u30d0\u30fc\u30b8\u30e7\u30f3","about_author":"\u4f5c\u6210\u8005","about_plugin":"\u30d7\u30e9\u30b0\u30a4\u30f3","about_plugins":"\u30d7\u30e9\u30b0\u30a4\u30f3","about_license":"\u30e9\u30a4\u30bb\u30f3\u30b9","about_help":"\u30d8\u30eb\u30d7","about_general":"TinyMCE\u306b\u3064\u3044\u3066","about_title":"TinyMCE\u306b\u3064\u3044\u3066","charmap_usage":"\u5de6\u53f3\u306e\u30ab\u30fc\u30bd\u30eb\u30ad\u30fc\u3092\u4f7f\u7528\u3057\u3066\u79fb\u52d5\u3057\u3066\u304f\u3060\u3055\u3044\u3002","anchor_invalid":"\u6709\u52b9\u306a\u30a2\u30f3\u30ab\u30fc\u306e\u540d\u524d\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002","accessibility_help":"\u30a2\u30af\u30bb\u30b7\u30d3\u30ea\u30c6\u30a3\u306e\u30d8\u30eb\u30d7","accessibility_usage_title":"\u5168\u822c\u7684\u306a\u4f7f\u3044\u65b9","invalid_color_value":"\u7121\u52b9\u306a\u5024"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/link.htm b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/link.htm
new file mode 100755
index 00000000..5d9dea9b
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/link.htm
@@ -0,0 +1,57 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>{#advanced_dlg.link_title}</title>
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script type="text/javascript" src="../../utils/mctabs.js"></script>
+ <script type="text/javascript" src="../../utils/form_utils.js"></script>
+ <script type="text/javascript" src="../../utils/validate.js"></script>
+ <script type="text/javascript" src="js/link.js"></script>
+</head>
+<body id="link" style="display: none">
+<form onsubmit="LinkDialog.update();return false;" action="#">
+ <div class="tabs">
+ <ul>
+ <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advanced_dlg.link_title}</a></span></li>
+ </ul>
+ </div>
+
+ <div class="panel_wrapper">
+ <div id="general_panel" class="panel current">
+ <table border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td class="nowrap"><label for="href">{#advanced_dlg.link_url}</label></td>
+ <td><table border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input id="href" name="href" type="text" class="mceFocus" value="" style="width: 200px" onchange="LinkDialog.checkPrefix(this);" /></td>
+ <td id="hrefbrowsercontainer">&nbsp;</td>
+ </tr>
+ </table></td>
+ </tr>
+ <tr>
+ <td><label for="link_list">{#advanced_dlg.link_list}</label></td>
+ <td><select id="link_list" name="link_list" onchange="document.getElementById('href').value=this.options[this.selectedIndex].value;"></select></td>
+ </tr>
+ <tr>
+ <td><label id="targetlistlabel" for="targetlist">{#advanced_dlg.link_target}</label></td>
+ <td><select id="target_list" name="target_list"></select></td>
+ </tr>
+ <tr>
+ <td class="nowrap"><label for="linktitle">{#advanced_dlg.link_titlefield}</label></td>
+ <td><input id="linktitle" name="linktitle" type="text" value="" style="width: 200px" /></td>
+ </tr>
+ <tr>
+ <td><label for="class_list">{#class_name}</label></td>
+ <td><select id="class_list" name="class_list"></select></td>
+ </tr>
+ </table>
+ </div>
+ </div>
+
+ <div class="mceActionPanel">
+ <input type="submit" id="insert" name="insert" value="{#insert}" />
+ <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
+ </div>
+</form>
+</body>
+</html>
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/shortcuts.htm b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/shortcuts.htm
new file mode 100644
index 00000000..20ec2f5a
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/shortcuts.htm
@@ -0,0 +1,47 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>{#advanced_dlg.accessibility_help}</title>
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script type="text/javascript">tinyMCEPopup.requireLangPack();</script>
+ </head>
+ <body id="content">
+ <h1>{#advanced_dlg.accessibility_usage_title}</h1>
+ <h2>Toolbars</h2>
+ <p>Press ALT-F10 to move focus to the toolbars. Navigate through the buttons using the arrow keys.
+ Press enter to activate a button and return focus to the editor.
+ Press escape to return focus to the editor without performing any actions.</p>
+
+ <h2>Status Bar</h2>
+ <p>To access the editor status bar, press ALT-F11. Use the left and right arrow keys to navigate between elements in the path.
+ Press enter or space to select an element. Press escape to return focus to the editor without changing the selection.</p>
+
+ <h2>Context Menu</h2>
+ <p>Press shift-F10 to activate the context menu. Use the up and down arrow keys to move between menu items. To open sub-menus press the right arrow key.
+ To close submenus press the left arrow key. Press escape to close the context menu.</p>
+
+ <h1>Keyboard Shortcuts</h1>
+ <table>
+ <thead>
+ <tr>
+ <th>Keystroke</th>
+ <th>Function</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>Control-B</td><td>Bold</td>
+ </tr>
+ <tr>
+ <td>Control-I</td><td>Italic</td>
+ </tr>
+ <tr>
+ <td>Control-Z</td><td>Undo</td>
+ </tr>
+ <tr>
+ <td>Control-Y</td><td>Redo</td>
+ </tr>
+ </tbody>
+ </table>
+ </body>
+</html>
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/default/content.css b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/default/content.css
new file mode 100644
index 00000000..2fd94a1f
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/default/content.css
@@ -0,0 +1,50 @@
+body, td, pre {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;}
+body {background:#FFF;}
+body.mceForceColors {background:#FFF; color:#000;}
+body.mceBrowserDefaults {background:transparent; color:inherit; font-size:inherit; font-family:inherit;}
+h1 {font-size: 2em}
+h2 {font-size: 1.5em}
+h3 {font-size: 1.17em}
+h4 {font-size: 1em}
+h5 {font-size: .83em}
+h6 {font-size: .75em}
+.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;}
+a.mceItemAnchor {display:inline-block; -webkit-user-select:all; -webkit-user-modify:read-only; -moz-user-select:all; -moz-user-modify:read-only; width:11px !important; height:11px !important; background:url(img/items.gif) no-repeat center center}
+span.mceItemNbsp {background: #DDD}
+td.mceSelected, th.mceSelected {background-color:#3399ff !important}
+img {border:0;}
+table, img, hr, .mceItemAnchor {cursor:default}
+table td, table th {cursor:text}
+ins {border-bottom:1px solid green; text-decoration: none; color:green}
+del {color:red; text-decoration:line-through}
+cite {border-bottom:1px dashed blue}
+acronym {border-bottom:1px dotted #CCC; cursor:help}
+abbr {border-bottom:1px dashed #CCC; cursor:help}
+
+/* IE */
+* html body {
+scrollbar-3dlight-color:#F0F0EE;
+scrollbar-arrow-color:#676662;
+scrollbar-base-color:#F0F0EE;
+scrollbar-darkshadow-color:#DDD;
+scrollbar-face-color:#E0E0DD;
+scrollbar-highlight-color:#F0F0EE;
+scrollbar-shadow-color:#F0F0EE;
+scrollbar-track-color:#F5F5F5;
+}
+
+img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px}
+font[face=mceinline] {font-family:inherit !important}
+*[contentEditable]:focus {outline:0}
+
+.mceItemMedia {border:1px dotted #cc0000; background-position:center; background-repeat:no-repeat; background-color:#ffffcc}
+.mceItemShockWave {background-image:url(../../img/shockwave.gif)}
+.mceItemFlash {background-image:url(../../img/flash.gif)}
+.mceItemQuickTime {background-image:url(../../img/quicktime.gif)}
+.mceItemWindowsMedia {background-image:url(../../img/windowsmedia.gif)}
+.mceItemRealMedia {background-image:url(../../img/realmedia.gif)}
+.mceItemVideo {background-image:url(../../img/video.gif)}
+.mceItemAudio {background-image:url(../../img/video.gif)}
+.mceItemEmbeddedAudio {background-image:url(../../img/video.gif)}
+.mceItemIframe {background-image:url(../../img/iframe.gif)}
+.mcePageBreak {display:block;border:0;width:100%;height:12px;border-top:1px dotted #ccc;margin-top:15px;background:#fff url(../../img/pagebreak.gif) no-repeat center top;}
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/default/dialog.css b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/default/dialog.css
new file mode 100644
index 00000000..879786fc
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/default/dialog.css
@@ -0,0 +1,118 @@
+/* Generic */
+body {
+font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;
+scrollbar-3dlight-color:#F0F0EE;
+scrollbar-arrow-color:#676662;
+scrollbar-base-color:#F0F0EE;
+scrollbar-darkshadow-color:#DDDDDD;
+scrollbar-face-color:#E0E0DD;
+scrollbar-highlight-color:#F0F0EE;
+scrollbar-shadow-color:#F0F0EE;
+scrollbar-track-color:#F5F5F5;
+background:#F0F0EE;
+padding:0;
+margin:8px 8px 0 8px;
+}
+
+html {background:#F0F0EE;}
+td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
+textarea {resize:none;outline:none;}
+a:link, a:visited {color:black;}
+a:hover {color:#2B6FB6;}
+.nowrap {white-space: nowrap}
+
+/* Forms */
+fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;}
+legend {color:#2B6FB6; font-weight:bold;}
+label.msg {display:none;}
+label.invalid {color:#EE0000; display:inline;}
+input.invalid {border:1px solid #EE0000;}
+input {background:#FFF; border:1px solid #CCC;}
+input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
+input, select, textarea {border:1px solid #808080;}
+input.radio {border:1px none #000000; background:transparent; vertical-align:middle;}
+input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;}
+.input_noborder {border:0;}
+
+/* Buttons */
+#insert, #cancel, input.button, .updateButton {
+border:0; margin:0; padding:0;
+font-weight:bold;
+width:94px; height:26px;
+background:url(img/buttons.png) 0 -26px;
+cursor:pointer;
+padding-bottom:2px;
+float:left;
+}
+
+#insert {background:url(img/buttons.png) 0 -52px}
+#cancel {background:url(img/buttons.png) 0 0; float:right}
+
+/* Browse */
+a.pickcolor, a.browse {text-decoration:none}
+a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;}
+.mceOldBoxModel a.browse span {width:22px; height:20px;}
+a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;}
+a.browse span.disabled {border:1px solid white; opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
+a.browse:hover span.disabled {border:1px solid white; background-color:transparent;}
+a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;}
+.mceOldBoxModel a.pickcolor span {width:21px; height:17px;}
+a.pickcolor:hover span {background-color:#B2BBD0;}
+a.pickcolor:hover span.disabled {}
+
+/* Charmap */
+table.charmap {border:1px solid #AAA; text-align:center}
+td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;}
+#charmap a {display:block; color:#000; text-decoration:none; border:0}
+#charmap a:hover {background:#CCC;color:#2B6FB6}
+#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center}
+#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center}
+
+/* Source */
+.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;}
+.mceActionPanel {margin-top:5px;}
+
+/* Tabs classes */
+.tabs {width:100%; height:18px; line-height:normal; background:url(img/tabs.gif) repeat-x 0 -72px;}
+.tabs ul {margin:0; padding:0; list-style:none;}
+.tabs li {float:left; background:url(img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;}
+.tabs li.current {background:url(img/tabs.gif) no-repeat 0 -18px; margin-right:2px;}
+.tabs span {float:left; display:block; background:url(img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;}
+.tabs .current span {background:url(img/tabs.gif) no-repeat right -54px;}
+.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;}
+.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;}
+
+/* Panels */
+.panel_wrapper div.panel {display:none;}
+.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;}
+.panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;}
+
+/* Columns */
+.column {float:left;}
+.properties {width:100%;}
+.properties .column1 {}
+.properties .column2 {text-align:left;}
+
+/* Titles */
+h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;}
+h3 {font-size:14px;}
+.title {font-size:12px; font-weight:bold; color:#2B6FB6;}
+
+/* Dialog specific */
+#link .panel_wrapper, #link div.current {height:125px;}
+#image .panel_wrapper, #image div.current {height:200px;}
+#plugintable thead {font-weight:bold; background:#DDD;}
+#plugintable, #about #plugintable td {border:1px solid #919B9C;}
+#plugintable {width:96%; margin-top:10px;}
+#pluginscontainer {height:290px; overflow:auto;}
+#colorpicker #preview {display:inline-block; padding-left:40px; height:14px; border:1px solid black; margin-left:5px; margin-right: 5px}
+#colorpicker #previewblock {position: relative; top: -3px; padding-left:5px; padding-top: 0px; display:inline}
+#colorpicker #preview_wrapper { text-align:center; padding-top:4px; white-space: nowrap}
+#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;}
+#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;}
+#colorpicker #light div {overflow:hidden;}
+#colorpicker .panel_wrapper div.current {height:175px;}
+#colorpicker #namedcolors {width:150px;}
+#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;}
+#colorpicker #colornamecontainer {margin-top:5px;}
+#colorpicker #picker_panel fieldset {margin:auto;width:325px;}
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/default/img/buttons.png b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/default/img/buttons.png
new file mode 100644
index 00000000..1e53560e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/default/img/buttons.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/default/img/items.gif b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/default/img/items.gif
new file mode 100644
index 00000000..d2f93671
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/default/img/items.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif
new file mode 100644
index 00000000..85e31dfb
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/default/img/menu_check.gif b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/default/img/menu_check.gif
new file mode 100644
index 00000000..adfdddcc
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/default/img/menu_check.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/default/img/progress.gif b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/default/img/progress.gif
new file mode 100644
index 00000000..5bb90fd6
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/default/img/progress.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/default/img/tabs.gif b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/default/img/tabs.gif
new file mode 100644
index 00000000..06812cb4
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/default/img/tabs.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/default/ui.css b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/default/ui.css
new file mode 100644
index 00000000..77083f31
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/default/ui.css
@@ -0,0 +1,219 @@
+/* Reset */
+.defaultSkin table, .defaultSkin tbody, .defaultSkin a, .defaultSkin img, .defaultSkin tr, .defaultSkin div, .defaultSkin td, .defaultSkin iframe, .defaultSkin span, .defaultSkin *, .defaultSkin .mceText {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000; vertical-align:baseline; width:auto; border-collapse:separate; text-align:left}
+.defaultSkin a:hover, .defaultSkin a:link, .defaultSkin a:visited, .defaultSkin a:active {text-decoration:none; font-weight:normal; cursor:default; color:#000}
+.defaultSkin table td {vertical-align:middle}
+
+/* Containers */
+.defaultSkin table {direction:ltr;background:transparent}
+.defaultSkin iframe {display:block;}
+.defaultSkin .mceToolbar {height:26px}
+.defaultSkin .mceLeft {text-align:left}
+.defaultSkin .mceRight {text-align:right}
+
+/* External */
+.defaultSkin .mceExternalToolbar {position:absolute; border:1px solid #CCC; border-bottom:0; display:none;}
+.defaultSkin .mceExternalToolbar td.mceToolbar {padding-right:13px;}
+.defaultSkin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px; background:url(../../img/icons.gif) -820px 0}
+
+/* Layout */
+.defaultSkin table.mceLayout {border:0; border-left:1px solid #CCC; border-right:1px solid #CCC}
+.defaultSkin table.mceLayout tr.mceFirst td {border-top:1px solid #CCC}
+.defaultSkin table.mceLayout tr.mceLast td {border-bottom:1px solid #CCC}
+.defaultSkin table.mceToolbar, .defaultSkin tr.mceFirst .mceToolbar tr td, .defaultSkin tr.mceLast .mceToolbar tr td {border:0; margin:0; padding:0;}
+.defaultSkin td.mceToolbar {background:#F0F0EE; padding-top:1px; vertical-align:top}
+.defaultSkin .mceIframeContainer {border-top:1px solid #CCC; border-bottom:1px solid #CCC}
+.defaultSkin .mceStatusbar {background:#F0F0EE; font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; display:block; height:20px}
+.defaultSkin .mceStatusbar div {float:left; margin:2px}
+.defaultSkin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize; outline:0}
+.defaultSkin .mceStatusbar a:hover {text-decoration:underline}
+.defaultSkin table.mceToolbar {margin-left:3px}
+.defaultSkin span.mceIcon, .defaultSkin img.mceIcon {display:block; width:20px; height:20px}
+.defaultSkin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px}
+.defaultSkin td.mceCenter {text-align:center;}
+.defaultSkin td.mceCenter table {margin:0 auto; text-align:left;}
+.defaultSkin td.mceRight table {margin:0 0 0 auto;}
+
+/* Button */
+.defaultSkin .mceButton {display:block; border:1px solid #F0F0EE; width:20px; height:20px; margin-right:1px}
+.defaultSkin a.mceButtonEnabled:hover {border:1px solid #0A246A; background-color:#B2BBD0}
+.defaultSkin a.mceButtonActive, .defaultSkin a.mceButtonSelected {border:1px solid #0A246A; background-color:#C2CBE0}
+.defaultSkin .mceButtonDisabled .mceIcon {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
+.defaultSkin .mceButtonLabeled {width:auto}
+.defaultSkin .mceButtonLabeled span.mceIcon {float:left}
+.defaultSkin span.mceButtonLabel {display:block; font-size:10px; padding:4px 6px 0 22px; font-family:Tahoma,Verdana,Arial,Helvetica}
+.defaultSkin .mceButtonDisabled .mceButtonLabel {color:#888}
+
+/* Separator */
+.defaultSkin .mceSeparator {display:block; background:url(../../img/icons.gif) -180px 0; width:2px; height:20px; margin:2px 2px 0 4px}
+
+/* ListBox */
+.defaultSkin .mceListBox, .defaultSkin .mceListBox a {display:block}
+.defaultSkin .mceListBox .mceText {padding-left:4px; width:70px; text-align:left; border:1px solid #CCC; border-right:0; background:#FFF; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; height:20px; line-height:20px; overflow:hidden}
+.defaultSkin .mceListBox .mceOpen {width:9px; height:20px; background:url(../../img/icons.gif) -741px 0; margin-right:2px; border:1px solid #CCC;}
+.defaultSkin table.mceListBoxEnabled:hover .mceText, .defaultSkin .mceListBoxHover .mceText, .defaultSkin .mceListBoxSelected .mceText {border:1px solid #A2ABC0; border-right:0; background:#FFF}
+.defaultSkin table.mceListBoxEnabled:hover .mceOpen, .defaultSkin .mceListBoxHover .mceOpen, .defaultSkin .mceListBoxSelected .mceOpen {background-color:#FFF; border:1px solid #A2ABC0}
+.defaultSkin .mceListBoxDisabled a.mceText {color:gray; background-color:transparent;}
+.defaultSkin .mceListBoxMenu {overflow:auto; overflow-x:hidden}
+.defaultSkin .mceOldBoxModel .mceListBox .mceText {height:22px}
+.defaultSkin .mceOldBoxModel .mceListBox .mceOpen {width:11px; height:22px;}
+.defaultSkin select.mceNativeListBox {font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:7pt; background:#F0F0EE; border:1px solid gray; margin-right:2px;}
+
+/* SplitButton */
+.defaultSkin .mceSplitButton {width:32px; height:20px; direction:ltr}
+.defaultSkin .mceSplitButton a, .defaultSkin .mceSplitButton span {height:20px; display:block}
+.defaultSkin .mceSplitButton a.mceAction {width:20px; border:1px solid #F0F0EE; border-right:0;}
+.defaultSkin .mceSplitButton span.mceAction {width:20px; background-image:url(../../img/icons.gif);}
+.defaultSkin .mceSplitButton a.mceOpen {width:9px; background:url(../../img/icons.gif) -741px 0; border:1px solid #F0F0EE;}
+.defaultSkin .mceSplitButton span.mceOpen {display:none}
+.defaultSkin table.mceSplitButtonEnabled:hover a.mceAction, .defaultSkin .mceSplitButtonHover a.mceAction, .defaultSkin .mceSplitButtonSelected a.mceAction {border:1px solid #0A246A; border-right:0; background-color:#B2BBD0}
+.defaultSkin table.mceSplitButtonEnabled:hover a.mceOpen, .defaultSkin .mceSplitButtonHover a.mceOpen, .defaultSkin .mceSplitButtonSelected a.mceOpen {background-color:#B2BBD0; border:1px solid #0A246A;}
+.defaultSkin .mceSplitButtonDisabled .mceAction, .defaultSkin .mceSplitButtonDisabled a.mceOpen {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
+.defaultSkin .mceSplitButtonActive a.mceAction {border:1px solid #0A246A; background-color:#C2CBE0}
+.defaultSkin .mceSplitButtonActive a.mceOpen {border-left:0;}
+
+/* ColorSplitButton */
+.defaultSkin div.mceColorSplitMenu table {background:#FFF; border:1px solid gray}
+.defaultSkin .mceColorSplitMenu td {padding:2px}
+.defaultSkin .mceColorSplitMenu a {display:block; width:9px; height:9px; overflow:hidden; border:1px solid #808080}
+.defaultSkin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px}
+.defaultSkin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF}
+.defaultSkin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid #0A246A; background-color:#B6BDD2}
+.defaultSkin a.mceMoreColors:hover {border:1px solid #0A246A}
+.defaultSkin .mceColorPreview {margin-left:2px; width:16px; height:4px; overflow:hidden; background:#9a9b9a}
+.defaultSkin .mce_forecolor span.mceAction, .defaultSkin .mce_backcolor span.mceAction {overflow:hidden; height:16px}
+
+/* Menu */
+.defaultSkin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #D4D0C8; direction:ltr}
+.defaultSkin .mceNoIcons span.mceIcon {width:0;}
+.defaultSkin .mceNoIcons a .mceText {padding-left:10px}
+.defaultSkin .mceMenu table {background:#FFF}
+.defaultSkin .mceMenu a, .defaultSkin .mceMenu span, .defaultSkin .mceMenu {display:block}
+.defaultSkin .mceMenu td {height:20px}
+.defaultSkin .mceMenu a {position:relative;padding:3px 0 4px 0}
+.defaultSkin .mceMenu .mceText {position:relative; display:block; font-family:Tahoma,Verdana,Arial,Helvetica; color:#000; cursor:default; margin:0; padding:0 25px 0 25px; display:block}
+.defaultSkin .mceMenu span.mceText, .defaultSkin .mceMenu .mcePreview {font-size:11px}
+.defaultSkin .mceMenu pre.mceText {font-family:Monospace}
+.defaultSkin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:22px;}
+.defaultSkin .mceMenu .mceMenuItemEnabled a:hover, .defaultSkin .mceMenu .mceMenuItemActive {background-color:#dbecf3}
+.defaultSkin td.mceMenuItemSeparator {background:#DDD; height:1px}
+.defaultSkin .mceMenuItemTitle a {border:0; background:#EEE; border-bottom:1px solid #DDD}
+.defaultSkin .mceMenuItemTitle span.mceText {color:#000; font-weight:bold; padding-left:4px}
+.defaultSkin .mceMenuItemDisabled .mceText {color:#888}
+.defaultSkin .mceMenuItemSelected .mceIcon {background:url(img/menu_check.gif)}
+.defaultSkin .mceNoIcons .mceMenuItemSelected a {background:url(img/menu_arrow.gif) no-repeat -6px center}
+.defaultSkin .mceMenu span.mceMenuLine {display:none}
+.defaultSkin .mceMenuItemSub a {background:url(img/menu_arrow.gif) no-repeat top right;}
+.defaultSkin .mceMenuItem td, .defaultSkin .mceMenuItem th {line-height: normal}
+
+/* Progress,Resize */
+.defaultSkin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50); background:#FFF}
+.defaultSkin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px}
+
+/* Rtl */
+.mceRtl .mceListBox .mceText {text-align: right; padding: 0 4px 0 0}
+.mceRtl .mceMenuItem .mceText {text-align: right}
+
+/* Formats */
+.defaultSkin .mce_formatPreview a {font-size:10px}
+.defaultSkin .mce_p span.mceText {}
+.defaultSkin .mce_address span.mceText {font-style:italic}
+.defaultSkin .mce_pre span.mceText {font-family:monospace}
+.defaultSkin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em}
+.defaultSkin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em}
+.defaultSkin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em}
+.defaultSkin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em}
+.defaultSkin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em}
+.defaultSkin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em}
+
+/* Theme */
+.defaultSkin span.mce_bold {background-position:0 0}
+.defaultSkin span.mce_italic {background-position:-60px 0}
+.defaultSkin span.mce_underline {background-position:-140px 0}
+.defaultSkin span.mce_strikethrough {background-position:-120px 0}
+.defaultSkin span.mce_undo {background-position:-160px 0}
+.defaultSkin span.mce_redo {background-position:-100px 0}
+.defaultSkin span.mce_cleanup {background-position:-40px 0}
+.defaultSkin span.mce_bullist {background-position:-20px 0}
+.defaultSkin span.mce_numlist {background-position:-80px 0}
+.defaultSkin span.mce_justifyleft {background-position:-460px 0}
+.defaultSkin span.mce_justifyright {background-position:-480px 0}
+.defaultSkin span.mce_justifycenter {background-position:-420px 0}
+.defaultSkin span.mce_justifyfull {background-position:-440px 0}
+.defaultSkin span.mce_anchor {background-position:-200px 0}
+.defaultSkin span.mce_indent {background-position:-400px 0}
+.defaultSkin span.mce_outdent {background-position:-540px 0}
+.defaultSkin span.mce_link {background-position:-500px 0}
+.defaultSkin span.mce_unlink {background-position:-640px 0}
+.defaultSkin span.mce_sub {background-position:-600px 0}
+.defaultSkin span.mce_sup {background-position:-620px 0}
+.defaultSkin span.mce_removeformat {background-position:-580px 0}
+.defaultSkin span.mce_newdocument {background-position:-520px 0}
+.defaultSkin span.mce_image {background-position:-380px 0}
+.defaultSkin span.mce_help {background-position:-340px 0}
+.defaultSkin span.mce_code {background-position:-260px 0}
+.defaultSkin span.mce_hr {background-position:-360px 0}
+.defaultSkin span.mce_visualaid {background-position:-660px 0}
+.defaultSkin span.mce_charmap {background-position:-240px 0}
+.defaultSkin span.mce_paste {background-position:-560px 0}
+.defaultSkin span.mce_copy {background-position:-700px 0}
+.defaultSkin span.mce_cut {background-position:-680px 0}
+.defaultSkin span.mce_blockquote {background-position:-220px 0}
+.defaultSkin .mce_forecolor span.mceAction {background-position:-720px 0}
+.defaultSkin .mce_backcolor span.mceAction {background-position:-760px 0}
+.defaultSkin span.mce_forecolorpicker {background-position:-720px 0}
+.defaultSkin span.mce_backcolorpicker {background-position:-760px 0}
+
+/* Plugins */
+.defaultSkin span.mce_advhr {background-position:-0px -20px}
+.defaultSkin span.mce_ltr {background-position:-20px -20px}
+.defaultSkin span.mce_rtl {background-position:-40px -20px}
+.defaultSkin span.mce_emotions {background-position:-60px -20px}
+.defaultSkin span.mce_fullpage {background-position:-80px -20px}
+.defaultSkin span.mce_fullscreen {background-position:-100px -20px}
+.defaultSkin span.mce_iespell {background-position:-120px -20px}
+.defaultSkin span.mce_insertdate {background-position:-140px -20px}
+.defaultSkin span.mce_inserttime {background-position:-160px -20px}
+.defaultSkin span.mce_absolute {background-position:-180px -20px}
+.defaultSkin span.mce_backward {background-position:-200px -20px}
+.defaultSkin span.mce_forward {background-position:-220px -20px}
+.defaultSkin span.mce_insert_layer {background-position:-240px -20px}
+.defaultSkin span.mce_insertlayer {background-position:-260px -20px}
+.defaultSkin span.mce_movebackward {background-position:-280px -20px}
+.defaultSkin span.mce_moveforward {background-position:-300px -20px}
+.defaultSkin span.mce_media {background-position:-320px -20px}
+.defaultSkin span.mce_nonbreaking {background-position:-340px -20px}
+.defaultSkin span.mce_pastetext {background-position:-360px -20px}
+.defaultSkin span.mce_pasteword {background-position:-380px -20px}
+.defaultSkin span.mce_selectall {background-position:-400px -20px}
+.defaultSkin span.mce_preview {background-position:-420px -20px}
+.defaultSkin span.mce_print {background-position:-440px -20px}
+.defaultSkin span.mce_cancel {background-position:-460px -20px}
+.defaultSkin span.mce_save {background-position:-480px -20px}
+.defaultSkin span.mce_replace {background-position:-500px -20px}
+.defaultSkin span.mce_search {background-position:-520px -20px}
+.defaultSkin span.mce_styleprops {background-position:-560px -20px}
+.defaultSkin span.mce_table {background-position:-580px -20px}
+.defaultSkin span.mce_cell_props {background-position:-600px -20px}
+.defaultSkin span.mce_delete_table {background-position:-620px -20px}
+.defaultSkin span.mce_delete_col {background-position:-640px -20px}
+.defaultSkin span.mce_delete_row {background-position:-660px -20px}
+.defaultSkin span.mce_col_after {background-position:-680px -20px}
+.defaultSkin span.mce_col_before {background-position:-700px -20px}
+.defaultSkin span.mce_row_after {background-position:-720px -20px}
+.defaultSkin span.mce_row_before {background-position:-740px -20px}
+.defaultSkin span.mce_merge_cells {background-position:-760px -20px}
+.defaultSkin span.mce_table_props {background-position:-980px -20px}
+.defaultSkin span.mce_row_props {background-position:-780px -20px}
+.defaultSkin span.mce_split_cells {background-position:-800px -20px}
+.defaultSkin span.mce_template {background-position:-820px -20px}
+.defaultSkin span.mce_visualchars {background-position:-840px -20px}
+.defaultSkin span.mce_abbr {background-position:-860px -20px}
+.defaultSkin span.mce_acronym {background-position:-880px -20px}
+.defaultSkin span.mce_attribs {background-position:-900px -20px}
+.defaultSkin span.mce_cite {background-position:-920px -20px}
+.defaultSkin span.mce_del {background-position:-940px -20px}
+.defaultSkin span.mce_ins {background-position:-960px -20px}
+.defaultSkin span.mce_pagebreak {background-position:0 -40px}
+.defaultSkin span.mce_restoredraft {background-position:-20px -40px}
+.defaultSkin span.mce_spellchecker {background-position:-540px -20px}
+.defaultSkin span.mce_visualblocks {background-position: -40px -40px}
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/highcontrast/content.css b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/highcontrast/content.css
new file mode 100644
index 00000000..cbce6c6a
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/highcontrast/content.css
@@ -0,0 +1,24 @@
+body, td, pre { margin:8px;}
+body.mceForceColors {background:#FFF; color:#000;}
+h1 {font-size: 2em}
+h2 {font-size: 1.5em}
+h3 {font-size: 1.17em}
+h4 {font-size: 1em}
+h5 {font-size: .83em}
+h6 {font-size: .75em}
+.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;}
+a.mceItemAnchor {display:inline-block; width:11px !important; height:11px !important; background:url(../default/img/items.gif) no-repeat 0 0;}
+span.mceItemNbsp {background: #DDD}
+td.mceSelected, th.mceSelected {background-color:#3399ff !important}
+img {border:0;}
+table, img, hr, .mceItemAnchor {cursor:default}
+table td, table th {cursor:text}
+ins {border-bottom:1px solid green; text-decoration: none; color:green}
+del {color:red; text-decoration:line-through}
+cite {border-bottom:1px dashed blue}
+acronym {border-bottom:1px dotted #CCC; cursor:help}
+abbr {border-bottom:1px dashed #CCC; cursor:help}
+
+img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px}
+font[face=mceinline] {font-family:inherit !important}
+*[contentEditable]:focus {outline:0}
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/highcontrast/dialog.css b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/highcontrast/dialog.css
new file mode 100644
index 00000000..6d9fc8dd
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/highcontrast/dialog.css
@@ -0,0 +1,106 @@
+/* Generic */
+body {
+font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;
+background:#F0F0EE;
+color: black;
+padding:0;
+margin:8px 8px 0 8px;
+}
+
+html {background:#F0F0EE; color:#000;}
+td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
+textarea {resize:none;outline:none;}
+a:link, a:visited {color:black;background-color:transparent;}
+a:hover {color:#2B6FB6;background-color:transparent;}
+.nowrap {white-space: nowrap}
+
+/* Forms */
+fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;}
+legend {color:#2B6FB6; font-weight:bold;}
+label.msg {display:none;}
+label.invalid {color:#EE0000; display:inline;background-color:transparent;}
+input.invalid {border:1px solid #EE0000;background-color:transparent;}
+input {background:#FFF; border:1px solid #CCC;color:black;}
+input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
+input, select, textarea {border:1px solid #808080;}
+input.radio {border:1px none #000000; background:transparent; vertical-align:middle;}
+input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;}
+.input_noborder {border:0;}
+
+/* Buttons */
+#insert, #cancel, input.button, .updateButton {
+font-weight:bold;
+width:94px; height:23px;
+cursor:pointer;
+padding-bottom:2px;
+float:left;
+}
+
+#cancel {float:right}
+
+/* Browse */
+a.pickcolor, a.browse {text-decoration:none}
+a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;}
+.mceOldBoxModel a.browse span {width:22px; height:20px;}
+a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;}
+a.browse span.disabled {border:1px solid white; opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
+a.browse:hover span.disabled {border:1px solid white; background-color:transparent;}
+a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;}
+.mceOldBoxModel a.pickcolor span {width:21px; height:17px;}
+a.pickcolor:hover span {background-color:#B2BBD0;}
+a.pickcolor:hover span.disabled {}
+
+/* Charmap */
+table.charmap {border:1px solid #AAA; text-align:center}
+td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;}
+#charmap a {display:block; color:#000; text-decoration:none; border:0}
+#charmap a:hover {background:#CCC;color:#2B6FB6}
+#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center}
+#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center}
+
+/* Source */
+.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;}
+.mceActionPanel {margin-top:5px;}
+
+/* Tabs classes */
+.tabs {width:100%; height:18px; line-height:normal;}
+.tabs ul {margin:0; padding:0; list-style:none;}
+.tabs li {float:left; border: 1px solid black; border-bottom:0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block; cursor:pointer;}
+.tabs li.current {font-weight: bold; margin-right:2px;}
+.tabs span {float:left; display:block; padding:0px 10px 0 0;}
+.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;}
+.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;}
+
+/* Panels */
+.panel_wrapper div.panel {display:none;}
+.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;}
+.panel_wrapper {border:1px solid #919B9C; padding:10px; padding-top:5px; clear:both; background:white;}
+
+/* Columns */
+.column {float:left;}
+.properties {width:100%;}
+.properties .column1 {}
+.properties .column2 {text-align:left;}
+
+/* Titles */
+h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;}
+h3 {font-size:14px;}
+.title {font-size:12px; font-weight:bold; color:#2B6FB6;}
+
+/* Dialog specific */
+#link .panel_wrapper, #link div.current {height:125px;}
+#image .panel_wrapper, #image div.current {height:200px;}
+#plugintable thead {font-weight:bold; background:#DDD;}
+#plugintable, #about #plugintable td {border:1px solid #919B9C;}
+#plugintable {width:96%; margin-top:10px;}
+#pluginscontainer {height:290px; overflow:auto;}
+#colorpicker #preview {display:inline-block; padding-left:40px; height:14px; border:1px solid black; margin-left:5px; margin-right: 5px}
+#colorpicker #previewblock {position: relative; top: -3px; padding-left:5px; padding-top: 0px; display:inline}
+#colorpicker #preview_wrapper { text-align:center; padding-top:4px; white-space: nowrap}
+#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;}
+#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;}
+#colorpicker #light div {overflow:hidden;}
+#colorpicker .panel_wrapper div.current {height:175px;}
+#colorpicker #namedcolors {width:150px;}
+#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;}
+#colorpicker #colornamecontainer {margin-top:5px;}
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/highcontrast/ui.css b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/highcontrast/ui.css
new file mode 100644
index 00000000..effbbe15
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/highcontrast/ui.css
@@ -0,0 +1,106 @@
+/* Reset */
+.highcontrastSkin table, .highcontrastSkin tbody, .highcontrastSkin a, .highcontrastSkin img, .highcontrastSkin tr, .highcontrastSkin div, .highcontrastSkin td, .highcontrastSkin iframe, .highcontrastSkin span, .highcontrastSkin *, .highcontrastSkin .mceText {border:0; margin:0; padding:0; vertical-align:baseline; border-collapse:separate;}
+.highcontrastSkin a:hover, .highcontrastSkin a:link, .highcontrastSkin a:visited, .highcontrastSkin a:active {text-decoration:none; font-weight:normal; cursor:default;}
+.highcontrastSkin table td {vertical-align:middle}
+
+.highcontrastSkin .mceIconOnly {display: block !important;}
+
+/* External */
+.highcontrastSkin .mceExternalToolbar {position:absolute; border:1px solid; border-bottom:0; display:none; background-color: white;}
+.highcontrastSkin .mceExternalToolbar td.mceToolbar {padding-right:13px;}
+.highcontrastSkin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px;}
+
+/* Layout */
+.highcontrastSkin table.mceLayout {border: 1px solid;}
+.highcontrastSkin .mceIframeContainer {border-top:1px solid; border-bottom:1px solid}
+.highcontrastSkin .mceStatusbar a:hover {text-decoration:underline}
+.highcontrastSkin .mceStatusbar {display:block; line-height:1.5em; overflow:visible;}
+.highcontrastSkin .mceStatusbar div {float:left}
+.highcontrastSkin .mceStatusbar a.mceResize {display:block; float:right; width:20px; height:20px; cursor:se-resize; outline:0}
+
+.highcontrastSkin .mceToolbar td { display: inline-block; float: left;}
+.highcontrastSkin .mceToolbar tr { display: block;}
+.highcontrastSkin .mceToolbar table { display: block; }
+
+/* Button */
+
+.highcontrastSkin .mceButton { display:block; margin: 2px; padding: 5px 10px;border: 1px solid; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; -ms-border-radius: 3px; height: 2em;}
+.highcontrastSkin .mceButton .mceVoiceLabel { height: 100%; vertical-align: center; line-height: 2em}
+.highcontrastSkin .mceButtonDisabled .mceVoiceLabel { opacity:0.6; -ms-filter:'alpha(opacity=60)'; filter:alpha(opacity=60);}
+.highcontrastSkin .mceButtonActive, .highcontrastSkin .mceButton:focus, .highcontrastSkin .mceButton:active { border: 5px solid; padding: 1px 6px;-webkit-focus-ring-color:none;outline:none;}
+
+/* Separator */
+.highcontrastSkin .mceSeparator {display:block; width:16px; height:26px;}
+
+/* ListBox */
+.highcontrastSkin .mceListBox { display: block; margin:2px;-webkit-focus-ring-color:none;outline:none;}
+.highcontrastSkin .mceListBox .mceText {padding: 5px 6px; line-height: 2em; width: 15ex; overflow: hidden;}
+.highcontrastSkin .mceListBoxDisabled .mceText { opacity:0.6; -ms-filter:'alpha(opacity=60)'; filter:alpha(opacity=60);}
+.highcontrastSkin .mceListBox a.mceText { padding: 5px 10px; display: block; height: 2em; line-height: 2em; border: 1px solid; border-right: 0; border-radius: 3px 0px 0px 3px; -moz-border-radius: 3px 0px 0px 3px; -webkit-border-radius: 3px 0px 0px 3px; -ms-border-radius: 3px 0px 0px 3px;}
+.highcontrastSkin .mceListBox a.mceOpen { padding: 5px 4px; display: block; height: 2em; line-height: 2em; border: 1px solid; border-left: 0; border-radius: 0px 3px 3px 0px; -moz-border-radius: 0px 3px 3px 0px; -webkit-border-radius: 0px 3px 3px 0px; -ms-border-radius: 0px 3px 3px 0px;}
+.highcontrastSkin .mceListBox:focus a.mceText, .highcontrastSkin .mceListBox:active a.mceText { border-width: 5px; padding: 1px 10px 1px 6px;}
+.highcontrastSkin .mceListBox:focus a.mceOpen, .highcontrastSkin .mceListBox:active a.mceOpen { border-width: 5px; padding: 1px 0px 1px 4px;}
+
+.highcontrastSkin .mceListBoxMenu {overflow-y:auto}
+
+/* SplitButton */
+.highcontrastSkin .mceSplitButtonDisabled .mceAction {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
+
+.highcontrastSkin .mceSplitButton { border-collapse: collapse; margin: 2px; height: 2em; line-height: 2em;-webkit-focus-ring-color:none;outline:none;}
+.highcontrastSkin .mceSplitButton td { display: table-cell; float: none; margin: 0; padding: 0; height: 2em;}
+.highcontrastSkin .mceSplitButton tr { display: table-row; }
+.highcontrastSkin table.mceSplitButton { display: table; }
+.highcontrastSkin .mceSplitButton a.mceAction { padding: 5px 10px; display: block; height: 2em; line-height: 2em; overflow: hidden; border: 1px solid; border-right: 0; border-radius: 3px 0px 0px 3px; -moz-border-radius: 3px 0px 0px 3px; -webkit-border-radius: 3px 0px 0px 3px; -ms-border-radius: 3px 0px 0px 3px;}
+.highcontrastSkin .mceSplitButton a.mceOpen { padding: 5px 4px; display: block; height: 2em; line-height: 2em; border: 1px solid; border-radius: 0px 3px 3px 0px; -moz-border-radius: 0px 3px 3px 0px; -webkit-border-radius: 0px 3px 3px 0px; -ms-border-radius: 0px 3px 3px 0px;}
+.highcontrastSkin .mceSplitButton .mceVoiceLabel { height: 2em; vertical-align: center; line-height: 2em; }
+.highcontrastSkin .mceSplitButton:focus a.mceAction, .highcontrastSkin .mceSplitButton:active a.mceAction { border-width: 5px; border-right-width: 1px; padding: 1px 10px 1px 6px;-webkit-focus-ring-color:none;outline:none;}
+.highcontrastSkin .mceSplitButton:focus a.mceOpen, .highcontrastSkin .mceSplitButton:active a.mceOpen { border-width: 5px; border-left-width: 1px; padding: 1px 0px 1px 4px;-webkit-focus-ring-color:none;outline:none;}
+
+/* Menu */
+.highcontrastSkin .mceNoIcons span.mceIcon {width:0;}
+.highcontrastSkin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid; direction:ltr}
+.highcontrastSkin .mceMenu table {background:white; color: black}
+.highcontrastSkin .mceNoIcons a .mceText {padding-left:10px}
+.highcontrastSkin .mceMenu a, .highcontrastSkin .mceMenu span, .highcontrastSkin .mceMenu {display:block;background:white; color: black}
+.highcontrastSkin .mceMenu td {height:2em}
+.highcontrastSkin .mceMenu a {position:relative;padding:3px 0 4px 0; display: block;}
+.highcontrastSkin .mceMenu .mceText {position:relative; display:block; cursor:default; margin:0; padding:0 25px 0 25px;}
+.highcontrastSkin .mceMenu pre.mceText {font-family:Monospace}
+.highcontrastSkin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:26px;}
+.highcontrastSkin td.mceMenuItemSeparator {border-top:1px solid; height:1px}
+.highcontrastSkin .mceMenuItemTitle a {border:0; border-bottom:1px solid}
+.highcontrastSkin .mceMenuItemTitle span.mceText {font-weight:bold; padding-left:4px}
+.highcontrastSkin .mceNoIcons .mceMenuItemSelected span.mceText:before {content: "\2713\A0";}
+.highcontrastSkin .mceMenu span.mceMenuLine {display:none}
+.highcontrastSkin .mceMenuItemSub a .mceText:after {content: "\A0\25B8"}
+.highcontrastSkin .mceMenuItem td, .highcontrastSkin .mceMenuItem th {line-height: normal}
+
+/* ColorSplitButton */
+.highcontrastSkin div.mceColorSplitMenu table {background:#FFF; border:1px solid; color: #000}
+.highcontrastSkin .mceColorSplitMenu td {padding:2px}
+.highcontrastSkin .mceColorSplitMenu a {display:block; width:16px; height:16px; overflow:hidden; color:#000; margin: 0; padding: 0;}
+.highcontrastSkin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px}
+.highcontrastSkin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF}
+.highcontrastSkin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid; background-color:#B6BDD2}
+.highcontrastSkin a.mceMoreColors:hover {border:1px solid #0A246A; color: #000;}
+.highcontrastSkin .mceColorPreview {display:none;}
+.highcontrastSkin .mce_forecolor span.mceAction, .highcontrastSkin .mce_backcolor span.mceAction {height:17px;overflow:hidden}
+
+/* Progress,Resize */
+.highcontrastSkin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=50); background:#FFF}
+.highcontrastSkin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(../default/img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px}
+
+/* Rtl */
+.mceRtl .mceListBox .mceText {text-align: right; padding: 0 4px 0 0}
+.mceRtl .mceMenuItem .mceText {text-align: right}
+
+/* Formats */
+.highcontrastSkin .mce_p span.mceText {}
+.highcontrastSkin .mce_address span.mceText {font-style:italic}
+.highcontrastSkin .mce_pre span.mceText {font-family:monospace}
+.highcontrastSkin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em}
+.highcontrastSkin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em}
+.highcontrastSkin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em}
+.highcontrastSkin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em}
+.highcontrastSkin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em}
+.highcontrastSkin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em}
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/o2k7/content.css b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/o2k7/content.css
new file mode 100644
index 00000000..a1a8f9bd
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/o2k7/content.css
@@ -0,0 +1,48 @@
+body, td, pre {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;}
+body {background:#FFF;}
+body.mceForceColors {background:#FFF; color:#000;}
+h1 {font-size: 2em}
+h2 {font-size: 1.5em}
+h3 {font-size: 1.17em}
+h4 {font-size: 1em}
+h5 {font-size: .83em}
+h6 {font-size: .75em}
+.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;}
+a.mceItemAnchor {display:inline-block; width:11px !important; height:11px !important; background:url(../default/img/items.gif) no-repeat 0 0;}
+span.mceItemNbsp {background: #DDD}
+td.mceSelected, th.mceSelected {background-color:#3399ff !important}
+img {border:0;}
+table, img, hr, .mceItemAnchor {cursor:default}
+table td, table th {cursor:text}
+ins {border-bottom:1px solid green; text-decoration: none; color:green}
+del {color:red; text-decoration:line-through}
+cite {border-bottom:1px dashed blue}
+acronym {border-bottom:1px dotted #CCC; cursor:help}
+abbr {border-bottom:1px dashed #CCC; cursor:help}
+
+/* IE */
+* html body {
+scrollbar-3dlight-color:#F0F0EE;
+scrollbar-arrow-color:#676662;
+scrollbar-base-color:#F0F0EE;
+scrollbar-darkshadow-color:#DDD;
+scrollbar-face-color:#E0E0DD;
+scrollbar-highlight-color:#F0F0EE;
+scrollbar-shadow-color:#F0F0EE;
+scrollbar-track-color:#F5F5F5;
+}
+
+img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px}
+font[face=mceinline] {font-family:inherit !important}
+*[contentEditable]:focus {outline:0}
+
+.mceItemMedia {border:1px dotted #cc0000; background-position:center; background-repeat:no-repeat; background-color:#ffffcc}
+.mceItemShockWave {background-image:url(../../img/shockwave.gif)}
+.mceItemFlash {background-image:url(../../img/flash.gif)}
+.mceItemQuickTime {background-image:url(../../img/quicktime.gif)}
+.mceItemWindowsMedia {background-image:url(../../img/windowsmedia.gif)}
+.mceItemRealMedia {background-image:url(../../img/realmedia.gif)}
+.mceItemVideo {background-image:url(../../img/video.gif)}
+.mceItemAudio {background-image:url(../../img/video.gif)}
+.mceItemIframe {background-image:url(../../img/iframe.gif)}
+.mcePageBreak {display:block;border:0;width:100%;height:12px;border-top:1px dotted #ccc;margin-top:15px;background:#fff url(../../img/pagebreak.gif) no-repeat center top;}
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/o2k7/dialog.css b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/o2k7/dialog.css
new file mode 100644
index 00000000..a54db98d
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/o2k7/dialog.css
@@ -0,0 +1,118 @@
+/* Generic */
+body {
+font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;
+scrollbar-3dlight-color:#F0F0EE;
+scrollbar-arrow-color:#676662;
+scrollbar-base-color:#F0F0EE;
+scrollbar-darkshadow-color:#DDDDDD;
+scrollbar-face-color:#E0E0DD;
+scrollbar-highlight-color:#F0F0EE;
+scrollbar-shadow-color:#F0F0EE;
+scrollbar-track-color:#F5F5F5;
+background:#F0F0EE;
+padding:0;
+margin:8px 8px 0 8px;
+}
+
+html {background:#F0F0EE;}
+td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
+textarea {resize:none;outline:none;}
+a:link, a:visited {color:black;}
+a:hover {color:#2B6FB6;}
+.nowrap {white-space: nowrap}
+
+/* Forms */
+fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;}
+legend {color:#2B6FB6; font-weight:bold;}
+label.msg {display:none;}
+label.invalid {color:#EE0000; display:inline;}
+input.invalid {border:1px solid #EE0000;}
+input {background:#FFF; border:1px solid #CCC;}
+input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
+input, select, textarea {border:1px solid #808080;}
+input.radio {border:1px none #000000; background:transparent; vertical-align:middle;}
+input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;}
+.input_noborder {border:0;}
+
+/* Buttons */
+#insert, #cancel, input.button, .updateButton {
+border:0; margin:0; padding:0;
+font-weight:bold;
+width:94px; height:26px;
+background:url(../default/img/buttons.png) 0 -26px;
+cursor:pointer;
+padding-bottom:2px;
+float:left;
+}
+
+#insert {background:url(../default/img/buttons.png) 0 -52px}
+#cancel {background:url(../default/img/buttons.png) 0 0; float:right}
+
+/* Browse */
+a.pickcolor, a.browse {text-decoration:none}
+a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;}
+.mceOldBoxModel a.browse span {width:22px; height:20px;}
+a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;}
+a.browse span.disabled {border:1px solid white; opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
+a.browse:hover span.disabled {border:1px solid white; background-color:transparent;}
+a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;}
+.mceOldBoxModel a.pickcolor span {width:21px; height:17px;}
+a.pickcolor:hover span {background-color:#B2BBD0;}
+a.pickcolor:hover span.disabled {}
+
+/* Charmap */
+table.charmap {border:1px solid #AAA; text-align:center}
+td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;}
+#charmap a {display:block; color:#000; text-decoration:none; border:0}
+#charmap a:hover {background:#CCC;color:#2B6FB6}
+#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center}
+#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center}
+
+/* Source */
+.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;}
+.mceActionPanel {margin-top:5px;}
+
+/* Tabs classes */
+.tabs {width:100%; height:18px; line-height:normal; background:url(../default/img/tabs.gif) repeat-x 0 -72px;}
+.tabs ul {margin:0; padding:0; list-style:none;}
+.tabs li {float:left; background:url(../default/img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;}
+.tabs li.current {background:url(../default/img/tabs.gif) no-repeat 0 -18px; margin-right:2px;}
+.tabs span {float:left; display:block; background:url(../default/img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;}
+.tabs .current span {background:url(../default/img/tabs.gif) no-repeat right -54px;}
+.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;}
+.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;}
+
+/* Panels */
+.panel_wrapper div.panel {display:none;}
+.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;}
+.panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;}
+
+/* Columns */
+.column {float:left;}
+.properties {width:100%;}
+.properties .column1 {}
+.properties .column2 {text-align:left;}
+
+/* Titles */
+h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;}
+h3 {font-size:14px;}
+.title {font-size:12px; font-weight:bold; color:#2B6FB6;}
+
+/* Dialog specific */
+#link .panel_wrapper, #link div.current {height:125px;}
+#image .panel_wrapper, #image div.current {height:200px;}
+#plugintable thead {font-weight:bold; background:#DDD;}
+#plugintable, #about #plugintable td {border:1px solid #919B9C;}
+#plugintable {width:96%; margin-top:10px;}
+#pluginscontainer {height:290px; overflow:auto;}
+#colorpicker #preview {display:inline-block; padding-left:40px; height:14px; border:1px solid black; margin-left:5px; margin-right: 5px}
+#colorpicker #previewblock {position: relative; top: -3px; padding-left:5px; padding-top: 0px; display:inline}
+#colorpicker #preview_wrapper { text-align:center; padding-top:4px; white-space: nowrap}
+#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;}
+#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;}
+#colorpicker #light div {overflow:hidden;}
+#colorpicker .panel_wrapper div.current {height:175px;}
+#colorpicker #namedcolors {width:150px;}
+#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;}
+#colorpicker #colornamecontainer {margin-top:5px;}
+#colorpicker #picker_panel fieldset {margin:auto;width:325px;}
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png
new file mode 100644
index 00000000..13a5cb03
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png
new file mode 100644
index 00000000..7fc57f2b
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png
new file mode 100644
index 00000000..c0dcc6ca
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/o2k7/ui.css b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/o2k7/ui.css
new file mode 100644
index 00000000..a3102237
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/o2k7/ui.css
@@ -0,0 +1,222 @@
+/* Reset */
+.o2k7Skin table, .o2k7Skin tbody, .o2k7Skin a, .o2k7Skin img, .o2k7Skin tr, .o2k7Skin div, .o2k7Skin td, .o2k7Skin iframe, .o2k7Skin span, .o2k7Skin *, .o2k7Skin .mceText {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000; vertical-align:baseline; width:auto; border-collapse:separate; text-align:left}
+.o2k7Skin a:hover, .o2k7Skin a:link, .o2k7Skin a:visited, .o2k7Skin a:active {text-decoration:none; font-weight:normal; cursor:default; color:#000}
+.o2k7Skin table td {vertical-align:middle}
+
+/* Containers */
+.o2k7Skin table {background:transparent}
+.o2k7Skin iframe {display:block;}
+.o2k7Skin .mceToolbar {height:26px}
+
+/* External */
+.o2k7Skin .mceExternalToolbar {position:absolute; border:1px solid #ABC6DD; border-bottom:0; display:none}
+.o2k7Skin .mceExternalToolbar td.mceToolbar {padding-right:13px;}
+.o2k7Skin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px; background:url(../../img/icons.gif) -820px 0}
+
+/* Layout */
+.o2k7Skin table.mceLayout {border:0; border-left:1px solid #ABC6DD; border-right:1px solid #ABC6DD}
+.o2k7Skin table.mceLayout tr.mceFirst td {border-top:1px solid #ABC6DD}
+.o2k7Skin table.mceLayout tr.mceLast td {border-bottom:1px solid #ABC6DD}
+.o2k7Skin table.mceToolbar, .o2k7Skin tr.mceFirst .mceToolbar tr td, .o2k7Skin tr.mceLast .mceToolbar tr td {border:0; margin:0; padding:0}
+.o2k7Skin .mceIframeContainer {border-top:1px solid #ABC6DD; border-bottom:1px solid #ABC6DD}
+.o2k7Skin td.mceToolbar{background:#E5EFFD}
+.o2k7Skin .mceStatusbar {background:#E5EFFD; display:block; font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; height:20px}
+.o2k7Skin .mceStatusbar div {float:left; padding:2px}
+.o2k7Skin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize; outline:0}
+.o2k7Skin .mceStatusbar a:hover {text-decoration:underline}
+.o2k7Skin table.mceToolbar {margin-left:3px}
+.o2k7Skin .mceToolbar .mceToolbarStart span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px; margin-left:3px;}
+.o2k7Skin .mceToolbar td.mceFirst span {margin:0}
+.o2k7Skin .mceToolbar .mceToolbarEnd span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px}
+.o2k7Skin .mceToolbar .mceToolbarEndListBox span, .o2k7Skin .mceToolbar .mceToolbarStartListBox span {display:none}
+.o2k7Skin span.mceIcon, .o2k7Skin img.mceIcon {display:block; width:20px; height:20px}
+.o2k7Skin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px}
+.o2k7Skin td.mceCenter {text-align:center;}
+.o2k7Skin td.mceCenter table {margin:0 auto; text-align:left;}
+.o2k7Skin td.mceRight table {margin:0 0 0 auto;}
+
+/* Button */
+.o2k7Skin .mceButton {display:block; background:url(img/button_bg.png); width:22px; height:22px}
+.o2k7Skin a.mceButton span, .o2k7Skin a.mceButton img {margin-left:1px}
+.o2k7Skin .mceOldBoxModel a.mceButton span, .o2k7Skin .mceOldBoxModel a.mceButton img {margin:0 0 0 1px}
+.o2k7Skin a.mceButtonEnabled:hover {background-color:#B2BBD0; background-position:0 -22px}
+.o2k7Skin a.mceButtonActive, .o2k7Skin a.mceButtonSelected {background-position:0 -44px}
+.o2k7Skin .mceButtonDisabled .mceIcon {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
+.o2k7Skin .mceButtonLabeled {width:auto}
+.o2k7Skin .mceButtonLabeled span.mceIcon {float:left}
+.o2k7Skin span.mceButtonLabel {display:block; font-size:10px; padding:4px 6px 0 22px; font-family:Tahoma,Verdana,Arial,Helvetica}
+.o2k7Skin .mceButtonDisabled .mceButtonLabel {color:#888}
+
+/* Separator */
+.o2k7Skin .mceSeparator {display:block; background:url(img/button_bg.png) -22px 0; width:5px; height:22px}
+
+/* ListBox */
+.o2k7Skin .mceListBox {padding-left: 3px}
+.o2k7Skin .mceListBox, .o2k7Skin .mceListBox a {display:block}
+.o2k7Skin .mceListBox .mceText {padding-left:4px; text-align:left; width:70px; border:1px solid #b3c7e1; border-right:0; background:#eaf2fb; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; height:20px; line-height:20px; overflow:hidden}
+.o2k7Skin .mceListBox .mceOpen {width:14px; height:22px; background:url(img/button_bg.png) -66px 0}
+.o2k7Skin table.mceListBoxEnabled:hover .mceText, .o2k7Skin .mceListBoxHover .mceText, .o2k7Skin .mceListBoxSelected .mceText {background:#FFF}
+.o2k7Skin table.mceListBoxEnabled:hover .mceOpen, .o2k7Skin .mceListBoxHover .mceOpen, .o2k7Skin .mceListBoxSelected .mceOpen {background-position:-66px -22px}
+.o2k7Skin .mceListBoxDisabled .mceText {color:gray}
+.o2k7Skin .mceListBoxMenu {overflow:auto; overflow-x:hidden; margin-left:3px}
+.o2k7Skin .mceOldBoxModel .mceListBox .mceText {height:22px}
+.o2k7Skin select.mceListBox {font-family:Tahoma,Verdana,Arial,Helvetica; font-size:12px; border:1px solid #b3c7e1; background:#FFF;}
+
+/* SplitButton */
+.o2k7Skin .mceSplitButton, .o2k7Skin .mceSplitButton a, .o2k7Skin .mceSplitButton span {display:block; height:22px; direction:ltr}
+.o2k7Skin .mceSplitButton {background:url(img/button_bg.png)}
+.o2k7Skin .mceSplitButton a.mceAction {width:22px}
+.o2k7Skin .mceSplitButton span.mceAction {width:22px; background-image:url(../../img/icons.gif)}
+.o2k7Skin .mceSplitButton a.mceOpen {width:10px; background:url(img/button_bg.png) -44px 0}
+.o2k7Skin .mceSplitButton span.mceOpen {display:none}
+.o2k7Skin table.mceSplitButtonEnabled:hover a.mceAction, .o2k7Skin .mceSplitButtonHover a.mceAction, .o2k7Skin .mceSplitButtonSelected {background:url(img/button_bg.png) 0 -22px}
+.o2k7Skin table.mceSplitButtonEnabled:hover a.mceOpen, .o2k7Skin .mceSplitButtonHover a.mceOpen, .o2k7Skin .mceSplitButtonSelected a.mceOpen {background-position:-44px -44px}
+.o2k7Skin .mceSplitButtonDisabled .mceAction {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
+.o2k7Skin .mceSplitButtonActive {background-position:0 -44px}
+
+/* ColorSplitButton */
+.o2k7Skin div.mceColorSplitMenu table {background:#FFF; border:1px solid gray}
+.o2k7Skin .mceColorSplitMenu td {padding:2px}
+.o2k7Skin .mceColorSplitMenu a {display:block; width:9px; height:9px; overflow:hidden; border:1px solid #808080}
+.o2k7Skin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px}
+.o2k7Skin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF}
+.o2k7Skin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid #0A246A; background-color:#B6BDD2}
+.o2k7Skin a.mceMoreColors:hover {border:1px solid #0A246A}
+.o2k7Skin .mceColorPreview {margin-left:2px; width:16px; height:4px; overflow:hidden; background:#9a9b9a;overflow:hidden}
+.o2k7Skin .mce_forecolor span.mceAction, .o2k7Skin .mce_backcolor span.mceAction {height:15px;overflow:hidden}
+
+/* Menu */
+.o2k7Skin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #ABC6DD; direction:ltr}
+.o2k7Skin .mceNoIcons span.mceIcon {width:0;}
+.o2k7Skin .mceNoIcons a .mceText {padding-left:10px}
+.o2k7Skin .mceMenu table {background:#FFF}
+.o2k7Skin .mceMenu a, .o2k7Skin .mceMenu span, .o2k7Skin .mceMenu {display:block}
+.o2k7Skin .mceMenu td {height:20px}
+.o2k7Skin .mceMenu a {position:relative;padding:3px 0 4px 0}
+.o2k7Skin .mceMenu .mceText {position:relative; display:block; font-family:Tahoma,Verdana,Arial,Helvetica; color:#000; cursor:default; margin:0; padding:0 25px 0 25px; display:block}
+.o2k7Skin .mceMenu span.mceText, .o2k7Skin .mceMenu .mcePreview {font-size:11px}
+.o2k7Skin .mceMenu pre.mceText {font-family:Monospace}
+.o2k7Skin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:22px;}
+.o2k7Skin .mceMenu .mceMenuItemEnabled a:hover, .o2k7Skin .mceMenu .mceMenuItemActive {background-color:#dbecf3}
+.o2k7Skin td.mceMenuItemSeparator {background:#DDD; height:1px}
+.o2k7Skin .mceMenuItemTitle a {border:0; background:#E5EFFD; border-bottom:1px solid #ABC6DD}
+.o2k7Skin .mceMenuItemTitle span.mceText {color:#000; font-weight:bold; padding-left:4px}
+.o2k7Skin .mceMenuItemDisabled .mceText {color:#888}
+.o2k7Skin .mceMenuItemSelected .mceIcon {background:url(../default/img/menu_check.gif)}
+.o2k7Skin .mceNoIcons .mceMenuItemSelected a {background:url(../default/img/menu_arrow.gif) no-repeat -6px center}
+.o2k7Skin .mceMenu span.mceMenuLine {display:none}
+.o2k7Skin .mceMenuItemSub a {background:url(../default/img/menu_arrow.gif) no-repeat top right;}
+.o2k7Skin .mceMenuItem td, .o2k7Skin .mceMenuItem th {line-height: normal}
+
+/* Progress,Resize */
+.o2k7Skin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=50); background:#FFF}
+.o2k7Skin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(../default/img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px}
+
+/* Rtl */
+.mceRtl .mceListBox .mceText {text-align: right; padding: 0 4px 0 0}
+.mceRtl .mceMenuItem .mceText {text-align: right}
+
+/* Formats */
+.o2k7Skin .mce_formatPreview a {font-size:10px}
+.o2k7Skin .mce_p span.mceText {}
+.o2k7Skin .mce_address span.mceText {font-style:italic}
+.o2k7Skin .mce_pre span.mceText {font-family:monospace}
+.o2k7Skin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em}
+.o2k7Skin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em}
+.o2k7Skin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em}
+.o2k7Skin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em}
+.o2k7Skin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em}
+.o2k7Skin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em}
+
+/* Theme */
+.o2k7Skin span.mce_bold {background-position:0 0}
+.o2k7Skin span.mce_italic {background-position:-60px 0}
+.o2k7Skin span.mce_underline {background-position:-140px 0}
+.o2k7Skin span.mce_strikethrough {background-position:-120px 0}
+.o2k7Skin span.mce_undo {background-position:-160px 0}
+.o2k7Skin span.mce_redo {background-position:-100px 0}
+.o2k7Skin span.mce_cleanup {background-position:-40px 0}
+.o2k7Skin span.mce_bullist {background-position:-20px 0}
+.o2k7Skin span.mce_numlist {background-position:-80px 0}
+.o2k7Skin span.mce_justifyleft {background-position:-460px 0}
+.o2k7Skin span.mce_justifyright {background-position:-480px 0}
+.o2k7Skin span.mce_justifycenter {background-position:-420px 0}
+.o2k7Skin span.mce_justifyfull {background-position:-440px 0}
+.o2k7Skin span.mce_anchor {background-position:-200px 0}
+.o2k7Skin span.mce_indent {background-position:-400px 0}
+.o2k7Skin span.mce_outdent {background-position:-540px 0}
+.o2k7Skin span.mce_link {background-position:-500px 0}
+.o2k7Skin span.mce_unlink {background-position:-640px 0}
+.o2k7Skin span.mce_sub {background-position:-600px 0}
+.o2k7Skin span.mce_sup {background-position:-620px 0}
+.o2k7Skin span.mce_removeformat {background-position:-580px 0}
+.o2k7Skin span.mce_newdocument {background-position:-520px 0}
+.o2k7Skin span.mce_image {background-position:-380px 0}
+.o2k7Skin span.mce_help {background-position:-340px 0}
+.o2k7Skin span.mce_code {background-position:-260px 0}
+.o2k7Skin span.mce_hr {background-position:-360px 0}
+.o2k7Skin span.mce_visualaid {background-position:-660px 0}
+.o2k7Skin span.mce_charmap {background-position:-240px 0}
+.o2k7Skin span.mce_paste {background-position:-560px 0}
+.o2k7Skin span.mce_copy {background-position:-700px 0}
+.o2k7Skin span.mce_cut {background-position:-680px 0}
+.o2k7Skin span.mce_blockquote {background-position:-220px 0}
+.o2k7Skin .mce_forecolor span.mceAction {background-position:-720px 0}
+.o2k7Skin .mce_backcolor span.mceAction {background-position:-760px 0}
+.o2k7Skin span.mce_forecolorpicker {background-position:-720px 0}
+.o2k7Skin span.mce_backcolorpicker {background-position:-760px 0}
+
+/* Plugins */
+.o2k7Skin span.mce_advhr {background-position:-0px -20px}
+.o2k7Skin span.mce_ltr {background-position:-20px -20px}
+.o2k7Skin span.mce_rtl {background-position:-40px -20px}
+.o2k7Skin span.mce_emotions {background-position:-60px -20px}
+.o2k7Skin span.mce_fullpage {background-position:-80px -20px}
+.o2k7Skin span.mce_fullscreen {background-position:-100px -20px}
+.o2k7Skin span.mce_iespell {background-position:-120px -20px}
+.o2k7Skin span.mce_insertdate {background-position:-140px -20px}
+.o2k7Skin span.mce_inserttime {background-position:-160px -20px}
+.o2k7Skin span.mce_absolute {background-position:-180px -20px}
+.o2k7Skin span.mce_backward {background-position:-200px -20px}
+.o2k7Skin span.mce_forward {background-position:-220px -20px}
+.o2k7Skin span.mce_insert_layer {background-position:-240px -20px}
+.o2k7Skin span.mce_insertlayer {background-position:-260px -20px}
+.o2k7Skin span.mce_movebackward {background-position:-280px -20px}
+.o2k7Skin span.mce_moveforward {background-position:-300px -20px}
+.o2k7Skin span.mce_media {background-position:-320px -20px}
+.o2k7Skin span.mce_nonbreaking {background-position:-340px -20px}
+.o2k7Skin span.mce_pastetext {background-position:-360px -20px}
+.o2k7Skin span.mce_pasteword {background-position:-380px -20px}
+.o2k7Skin span.mce_selectall {background-position:-400px -20px}
+.o2k7Skin span.mce_preview {background-position:-420px -20px}
+.o2k7Skin span.mce_print {background-position:-440px -20px}
+.o2k7Skin span.mce_cancel {background-position:-460px -20px}
+.o2k7Skin span.mce_save {background-position:-480px -20px}
+.o2k7Skin span.mce_replace {background-position:-500px -20px}
+.o2k7Skin span.mce_search {background-position:-520px -20px}
+.o2k7Skin span.mce_styleprops {background-position:-560px -20px}
+.o2k7Skin span.mce_table {background-position:-580px -20px}
+.o2k7Skin span.mce_cell_props {background-position:-600px -20px}
+.o2k7Skin span.mce_delete_table {background-position:-620px -20px}
+.o2k7Skin span.mce_delete_col {background-position:-640px -20px}
+.o2k7Skin span.mce_delete_row {background-position:-660px -20px}
+.o2k7Skin span.mce_col_after {background-position:-680px -20px}
+.o2k7Skin span.mce_col_before {background-position:-700px -20px}
+.o2k7Skin span.mce_row_after {background-position:-720px -20px}
+.o2k7Skin span.mce_row_before {background-position:-740px -20px}
+.o2k7Skin span.mce_merge_cells {background-position:-760px -20px}
+.o2k7Skin span.mce_table_props {background-position:-980px -20px}
+.o2k7Skin span.mce_row_props {background-position:-780px -20px}
+.o2k7Skin span.mce_split_cells {background-position:-800px -20px}
+.o2k7Skin span.mce_template {background-position:-820px -20px}
+.o2k7Skin span.mce_visualchars {background-position:-840px -20px}
+.o2k7Skin span.mce_abbr {background-position:-860px -20px}
+.o2k7Skin span.mce_acronym {background-position:-880px -20px}
+.o2k7Skin span.mce_attribs {background-position:-900px -20px}
+.o2k7Skin span.mce_cite {background-position:-920px -20px}
+.o2k7Skin span.mce_del {background-position:-940px -20px}
+.o2k7Skin span.mce_ins {background-position:-960px -20px}
+.o2k7Skin span.mce_pagebreak {background-position:0 -40px}
+.o2k7Skin span.mce_restoredraft {background-position:-20px -40px}
+.o2k7Skin span.mce_spellchecker {background-position:-540px -20px}
+.o2k7Skin span.mce_visualblocks {background-position: -40px -40px}
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/o2k7/ui_black.css b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/o2k7/ui_black.css
new file mode 100644
index 00000000..50c9b76a
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/o2k7/ui_black.css
@@ -0,0 +1,8 @@
+/* Black */
+.o2k7SkinBlack .mceToolbar .mceToolbarStart span, .o2k7SkinBlack .mceToolbar .mceToolbarEnd span, .o2k7SkinBlack .mceButton, .o2k7SkinBlack .mceSplitButton, .o2k7SkinBlack .mceSeparator, .o2k7SkinBlack .mceSplitButton a.mceOpen, .o2k7SkinBlack .mceListBox a.mceOpen {background-image:url(img/button_bg_black.png)}
+.o2k7SkinBlack td.mceToolbar, .o2k7SkinBlack td.mceStatusbar, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack .mceMenuItemTitle span.mceText, .o2k7SkinBlack .mceStatusbar div, .o2k7SkinBlack .mceStatusbar span, .o2k7SkinBlack .mceStatusbar a {background:#535353; color:#FFF}
+.o2k7SkinBlack table.mceListBoxEnabled .mceText, o2k7SkinBlack .mceListBox .mceText {background:#FFF; border:1px solid #CBCFD4; border-bottom-color:#989FA9; border-right:0}
+.o2k7SkinBlack table.mceListBoxEnabled:hover .mceText, .o2k7SkinBlack .mceListBoxHover .mceText, .o2k7SkinBlack .mceListBoxSelected .mceText {background:#FFF; border:1px solid #FFBD69; border-right:0}
+.o2k7SkinBlack .mceExternalToolbar, .o2k7SkinBlack .mceListBox .mceText, .o2k7SkinBlack div.mceMenu, .o2k7SkinBlack table.mceLayout, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack table.mceLayout tr.mceFirst td, .o2k7SkinBlack table.mceLayout, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack table.mceLayout tr.mceLast td, .o2k7SkinBlack .mceIframeContainer {border-color: #535353;}
+.o2k7SkinBlack table.mceSplitButtonEnabled:hover a.mceAction, .o2k7SkinBlack .mceSplitButtonHover a.mceAction, .o2k7SkinBlack .mceSplitButtonSelected {background-image:url(img/button_bg_black.png)}
+.o2k7SkinBlack .mceMenu .mceMenuItemEnabled a:hover, .o2k7SkinBlack .mceMenu .mceMenuItemActive {background-color:#FFE7A1} \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css
new file mode 100644
index 00000000..960a8e47
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css
@@ -0,0 +1,5 @@
+/* Silver */
+.o2k7SkinSilver .mceToolbar .mceToolbarStart span, .o2k7SkinSilver .mceButton, .o2k7SkinSilver .mceSplitButton, .o2k7SkinSilver .mceSeparator, .o2k7SkinSilver .mceSplitButton a.mceOpen, .o2k7SkinSilver .mceListBox a.mceOpen {background-image:url(img/button_bg_silver.png)}
+.o2k7SkinSilver td.mceToolbar, .o2k7SkinSilver td.mceStatusbar, .o2k7SkinSilver .mceMenuItemTitle a {background:#eee}
+.o2k7SkinSilver .mceListBox .mceText {background:#FFF}
+.o2k7SkinSilver .mceExternalToolbar, .o2k7SkinSilver .mceListBox .mceText, .o2k7SkinSilver div.mceMenu, .o2k7SkinSilver table.mceLayout, .o2k7SkinSilver .mceMenuItemTitle a, .o2k7SkinSilver table.mceLayout tr.mceFirst td, .o2k7SkinSilver table.mceLayout, .o2k7SkinSilver .mceMenuItemTitle a, .o2k7SkinSilver table.mceLayout tr.mceLast td, .o2k7SkinSilver .mceIframeContainer {border-color: #bbb}
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/source_editor.htm b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/source_editor.htm
new file mode 100755
index 00000000..dd973fcc
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/advanced/source_editor.htm
@@ -0,0 +1,25 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>{#advanced_dlg.code_title}</title>
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script type="text/javascript" src="js/source_editor.js"></script>
+</head>
+<body onresize="resizeInputs();" style="display:none; overflow:hidden;" spellcheck="false">
+ <form name="source" onsubmit="saveContent();return false;" action="#">
+ <div style="float: left" class="title"><label for="htmlSource">{#advanced_dlg.code_title}</label></div>
+
+ <div id="wrapline" style="float: right">
+ <input type="checkbox" name="wraped" id="wraped" onclick="toggleWordWrap(this);" class="wordWrapCode" /><label for="wraped">{#advanced_dlg.code_wordwrap}</label>
+ </div>
+
+ <br style="clear: both" />
+
+ <textarea name="htmlSource" id="htmlSource" rows="15" cols="100" style="width: 100%; height: 100%; font-family: 'Courier New',Courier,monospace; font-size: 12px;" dir="ltr" wrap="off" class="mceFocus"></textarea>
+
+ <div class="mceActionPanel">
+ <input type="submit" role="button" name="insert" value="{#update}" id="insert" />
+ <input type="button" role="button" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" id="cancel" />
+ </div>
+ </form>
+</body>
+</html>
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/editor_template.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/editor_template.js
new file mode 100755
index 00000000..4b3209cc
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/editor_template.js
@@ -0,0 +1 @@
+(function(){var a=tinymce.DOM;tinymce.ThemeManager.requireLangPack("simple");tinymce.create("tinymce.themes.SimpleTheme",{init:function(c,d){var e=this,b=["Bold","Italic","Underline","Strikethrough","InsertUnorderedList","InsertOrderedList"],f=c.settings;e.editor=c;c.contentCSS.push(d+"/skins/"+f.skin+"/content.css");c.onInit.add(function(){c.onNodeChange.add(function(h,g){tinymce.each(b,function(i){g.get(i.toLowerCase()).setActive(h.queryCommandState(i))})})});a.loadCSS((f.editor_css?c.documentBaseURI.toAbsolute(f.editor_css):"")||d+"/skins/"+f.skin+"/ui.css")},renderUI:function(h){var e=this,i=h.targetNode,b,c,d=e.editor,f=d.controlManager,g;i=a.insertAfter(a.create("span",{id:d.id+"_container","class":"mceEditor "+d.settings.skin+"SimpleSkin"}),i);i=g=a.add(i,"table",{cellPadding:0,cellSpacing:0,"class":"mceLayout"});i=c=a.add(i,"tbody");i=a.add(c,"tr");i=b=a.add(a.add(i,"td"),"div",{"class":"mceIframeContainer"});i=a.add(a.add(c,"tr",{"class":"last"}),"td",{"class":"mceToolbar mceLast",align:"center"});c=e.toolbar=f.createToolbar("tools1");c.add(f.createButton("bold",{title:"simple.bold_desc",cmd:"Bold"}));c.add(f.createButton("italic",{title:"simple.italic_desc",cmd:"Italic"}));c.add(f.createButton("underline",{title:"simple.underline_desc",cmd:"Underline"}));c.add(f.createButton("strikethrough",{title:"simple.striketrough_desc",cmd:"Strikethrough"}));c.add(f.createSeparator());c.add(f.createButton("undo",{title:"simple.undo_desc",cmd:"Undo"}));c.add(f.createButton("redo",{title:"simple.redo_desc",cmd:"Redo"}));c.add(f.createSeparator());c.add(f.createButton("cleanup",{title:"simple.cleanup_desc",cmd:"mceCleanup"}));c.add(f.createSeparator());c.add(f.createButton("insertunorderedlist",{title:"simple.bullist_desc",cmd:"InsertUnorderedList"}));c.add(f.createButton("insertorderedlist",{title:"simple.numlist_desc",cmd:"InsertOrderedList"}));c.renderTo(i);return{iframeContainer:b,editorContainer:d.id+"_container",sizeContainer:g,deltaHeight:-20}},getInfo:function(){return{longname:"Simple theme",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.ThemeManager.add("simple",tinymce.themes.SimpleTheme)})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/editor_template_src.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/editor_template_src.js
new file mode 100755
index 00000000..01ce87c5
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/editor_template_src.js
@@ -0,0 +1,84 @@
+/**
+ * editor_template_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+ var DOM = tinymce.DOM;
+
+ // Tell it to load theme specific language pack(s)
+ tinymce.ThemeManager.requireLangPack('simple');
+
+ tinymce.create('tinymce.themes.SimpleTheme', {
+ init : function(ed, url) {
+ var t = this, states = ['Bold', 'Italic', 'Underline', 'Strikethrough', 'InsertUnorderedList', 'InsertOrderedList'], s = ed.settings;
+
+ t.editor = ed;
+ ed.contentCSS.push(url + "/skins/" + s.skin + "/content.css");
+
+ ed.onInit.add(function() {
+ ed.onNodeChange.add(function(ed, cm) {
+ tinymce.each(states, function(c) {
+ cm.get(c.toLowerCase()).setActive(ed.queryCommandState(c));
+ });
+ });
+ });
+
+ DOM.loadCSS((s.editor_css ? ed.documentBaseURI.toAbsolute(s.editor_css) : '') || url + "/skins/" + s.skin + "/ui.css");
+ },
+
+ renderUI : function(o) {
+ var t = this, n = o.targetNode, ic, tb, ed = t.editor, cf = ed.controlManager, sc;
+
+ n = DOM.insertAfter(DOM.create('span', {id : ed.id + '_container', 'class' : 'mceEditor ' + ed.settings.skin + 'SimpleSkin'}), n);
+ n = sc = DOM.add(n, 'table', {cellPadding : 0, cellSpacing : 0, 'class' : 'mceLayout'});
+ n = tb = DOM.add(n, 'tbody');
+
+ // Create iframe container
+ n = DOM.add(tb, 'tr');
+ n = ic = DOM.add(DOM.add(n, 'td'), 'div', {'class' : 'mceIframeContainer'});
+
+ // Create toolbar container
+ n = DOM.add(DOM.add(tb, 'tr', {'class' : 'last'}), 'td', {'class' : 'mceToolbar mceLast', align : 'center'});
+
+ // Create toolbar
+ tb = t.toolbar = cf.createToolbar("tools1");
+ tb.add(cf.createButton('bold', {title : 'simple.bold_desc', cmd : 'Bold'}));
+ tb.add(cf.createButton('italic', {title : 'simple.italic_desc', cmd : 'Italic'}));
+ tb.add(cf.createButton('underline', {title : 'simple.underline_desc', cmd : 'Underline'}));
+ tb.add(cf.createButton('strikethrough', {title : 'simple.striketrough_desc', cmd : 'Strikethrough'}));
+ tb.add(cf.createSeparator());
+ tb.add(cf.createButton('undo', {title : 'simple.undo_desc', cmd : 'Undo'}));
+ tb.add(cf.createButton('redo', {title : 'simple.redo_desc', cmd : 'Redo'}));
+ tb.add(cf.createSeparator());
+ tb.add(cf.createButton('cleanup', {title : 'simple.cleanup_desc', cmd : 'mceCleanup'}));
+ tb.add(cf.createSeparator());
+ tb.add(cf.createButton('insertunorderedlist', {title : 'simple.bullist_desc', cmd : 'InsertUnorderedList'}));
+ tb.add(cf.createButton('insertorderedlist', {title : 'simple.numlist_desc', cmd : 'InsertOrderedList'}));
+ tb.renderTo(n);
+
+ return {
+ iframeContainer : ic,
+ editorContainer : ed.id + '_container',
+ sizeContainer : sc,
+ deltaHeight : -20
+ };
+ },
+
+ getInfo : function() {
+ return {
+ longname : 'Simple theme',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ }
+ }
+ });
+
+ tinymce.ThemeManager.add('simple', tinymce.themes.SimpleTheme);
+})(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/img/icons.gif b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/img/icons.gif
new file mode 100644
index 00000000..6fcbcb5d
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/img/icons.gif
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/langs/de.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/langs/de.js
new file mode 100644
index 00000000..59bf788d
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/langs/de.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('de.simple',{"cleanup_desc":"Quellcode aufr\u00e4umen","redo_desc":"Wiederholen (Strg+Y)","undo_desc":"R\u00fcckg\u00e4ngig (Strg+Z)","numlist_desc":"Nummerierung","bullist_desc":"Aufz\u00e4hlung","striketrough_desc":"Durchgestrichen","underline_desc":"Unterstrichen (Strg+U)","italic_desc":"Kursiv (Strg+I)","bold_desc":"Fett (Strg+B)"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/langs/en.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/langs/en.js
new file mode 100644
index 00000000..088ed0fc
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/langs/en.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('en.simple',{"cleanup_desc":"Cleanup Messy Code","redo_desc":"Redo (Ctrl+Y)","undo_desc":"Undo (Ctrl+Z)","numlist_desc":"Insert/Remove Numbered List","bullist_desc":"Insert/Remove Bulleted List","striketrough_desc":"Strikethrough","underline_desc":"Underline (Ctrl+U)","italic_desc":"Italic (Ctrl+I)","bold_desc":"Bold (Ctrl+B)"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/langs/hu.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/langs/hu.js
new file mode 100644
index 00000000..6eff1750
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/langs/hu.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('hu.simple',{"cleanup_desc":"Minden form\u00e1z\u00e1s elt\u00e1vol\u00edt\u00e1sa","redo_desc":"M\u00e9gis v\u00e9grehajt (Ctrl+Y)","undo_desc":"Visszavon\u00e1s (Ctrl+Z)","numlist_desc":"Sz\u00e1mozott lista besz\u00far\u00e1sa/elt\u00e1vol\u00edt\u00e1sa","bullist_desc":"Felsorol\u00e1s besz\u00far\u00e1sa/elt\u00e1vol\u00edt\u00e1sa","striketrough_desc":"\u00c1th\u00fazott","underline_desc":"Al\u00e1h\u00fazott (Ctrl+U)","italic_desc":"D\u0151lt (Ctrl+I)","bold_desc":"F\u00e9lk\u00f6v\u00e9r (Ctrl+B)"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/langs/ja.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/langs/ja.js
new file mode 100644
index 00000000..b3acbb54
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/langs/ja.js
@@ -0,0 +1 @@
+tinyMCE.addI18n('ja.simple',{"cleanup_desc":"\u4e71\u96d1\u306a\u30b3\u30fc\u30c9\u3092\u6574\u5f62","redo_desc":"\u3084\u308a\u76f4\u3059 (Ctrl+Y)","undo_desc":"\u5143\u306b\u623b\u3059 (Ctrl+Z)","numlist_desc":"\u756a\u53f7\u3064\u304d\u30ea\u30b9\u30c8","bullist_desc":"\u756a\u53f7\u306a\u3057\u30ea\u30b9\u30c8","striketrough_desc":"\u53d6\u308a\u6d88\u3057\u7dda","underline_desc":"\u4e0b\u7dda (Ctrl+U)","italic_desc":"\u659c\u4f53 (Ctrl+I)","bold_desc":"\u592a\u5b57 (Ctrl+B)"}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/skins/default/content.css b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/skins/default/content.css
new file mode 100644
index 00000000..2506c807
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/skins/default/content.css
@@ -0,0 +1,25 @@
+body, td, pre {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 10px;
+}
+
+body {
+ background-color: #FFFFFF;
+}
+
+.mceVisualAid {
+ border: 1px dashed #BBBBBB;
+}
+
+/* MSIE specific */
+
+* html body {
+ scrollbar-3dlight-color: #F0F0EE;
+ scrollbar-arrow-color: #676662;
+ scrollbar-base-color: #F0F0EE;
+ scrollbar-darkshadow-color: #DDDDDD;
+ scrollbar-face-color: #E0E0DD;
+ scrollbar-highlight-color: #F0F0EE;
+ scrollbar-shadow-color: #F0F0EE;
+ scrollbar-track-color: #F5F5F5;
+}
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/skins/default/ui.css b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/skins/default/ui.css
new file mode 100644
index 00000000..076fe84e
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/skins/default/ui.css
@@ -0,0 +1,32 @@
+/* Reset */
+.defaultSimpleSkin table, .defaultSimpleSkin tbody, .defaultSimpleSkin a, .defaultSimpleSkin img, .defaultSimpleSkin tr, .defaultSimpleSkin div, .defaultSimpleSkin td, .defaultSimpleSkin iframe, .defaultSimpleSkin span, .defaultSimpleSkin * {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000}
+
+/* Containers */
+.defaultSimpleSkin {position:relative}
+.defaultSimpleSkin table.mceLayout {background:#F0F0EE; border:1px solid #CCC;}
+.defaultSimpleSkin iframe {display:block; background:#FFF; border-bottom:1px solid #CCC;}
+.defaultSimpleSkin .mceToolbar {height:24px;}
+
+/* Layout */
+.defaultSimpleSkin span.mceIcon, .defaultSimpleSkin img.mceIcon {display:block; width:20px; height:20px}
+.defaultSimpleSkin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px}
+
+/* Button */
+.defaultSimpleSkin .mceButton {display:block; border:1px solid #F0F0EE; width:20px; height:20px}
+.defaultSimpleSkin a.mceButtonEnabled:hover {border:1px solid #0A246A; background-color:#B2BBD0}
+.defaultSimpleSkin a.mceButtonActive {border:1px solid #0A246A; background-color:#C2CBE0}
+.defaultSimpleSkin .mceButtonDisabled span {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
+
+/* Separator */
+.defaultSimpleSkin .mceSeparator {display:block; background:url(../../img/icons.gif) -180px 0; width:2px; height:20px; margin:0 2px 0 4px}
+
+/* Theme */
+.defaultSimpleSkin span.mce_bold {background-position:0 0}
+.defaultSimpleSkin span.mce_italic {background-position:-60px 0}
+.defaultSimpleSkin span.mce_underline {background-position:-140px 0}
+.defaultSimpleSkin span.mce_strikethrough {background-position:-120px 0}
+.defaultSimpleSkin span.mce_undo {background-position:-160px 0}
+.defaultSimpleSkin span.mce_redo {background-position:-100px 0}
+.defaultSimpleSkin span.mce_cleanup {background-position:-40px 0}
+.defaultSimpleSkin span.mce_insertunorderedlist {background-position:-20px 0}
+.defaultSimpleSkin span.mce_insertorderedlist {background-position:-80px 0}
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/skins/o2k7/content.css b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/skins/o2k7/content.css
new file mode 100644
index 00000000..595809fa
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/skins/o2k7/content.css
@@ -0,0 +1,17 @@
+body, td, pre {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
+
+body {background: #FFF;}
+.mceVisualAid {border: 1px dashed #BBB;}
+
+/* IE */
+
+* html body {
+scrollbar-3dlight-color: #F0F0EE;
+scrollbar-arrow-color: #676662;
+scrollbar-base-color: #F0F0EE;
+scrollbar-darkshadow-color: #DDDDDD;
+scrollbar-face-color: #E0E0DD;
+scrollbar-highlight-color: #F0F0EE;
+scrollbar-shadow-color: #F0F0EE;
+scrollbar-track-color: #F5F5F5;
+}
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png
new file mode 100644
index 00000000..527e3495
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png
Binary files differ
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/skins/o2k7/ui.css b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/skins/o2k7/ui.css
new file mode 100644
index 00000000..cf6c35d1
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/themes/simple/skins/o2k7/ui.css
@@ -0,0 +1,35 @@
+/* Reset */
+.o2k7SimpleSkin table, .o2k7SimpleSkin tbody, .o2k7SimpleSkin a, .o2k7SimpleSkin img, .o2k7SimpleSkin tr, .o2k7SimpleSkin div, .o2k7SimpleSkin td, .o2k7SimpleSkin iframe, .o2k7SimpleSkin span, .o2k7SimpleSkin * {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000}
+
+/* Containers */
+.o2k7SimpleSkin {position:relative}
+.o2k7SimpleSkin table.mceLayout {background:#E5EFFD; border:1px solid #ABC6DD;}
+.o2k7SimpleSkin iframe {display:block; background:#FFF; border-bottom:1px solid #ABC6DD;}
+.o2k7SimpleSkin .mceToolbar {height:26px;}
+
+/* Layout */
+.o2k7SimpleSkin .mceToolbar .mceToolbarStart span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px; }
+.o2k7SimpleSkin .mceToolbar .mceToolbarEnd span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px}
+.o2k7SimpleSkin span.mceIcon, .o2k7SimpleSkin img.mceIcon {display:block; width:20px; height:20px}
+.o2k7SimpleSkin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px}
+
+/* Button */
+.o2k7SimpleSkin .mceButton {display:block; background:url(img/button_bg.png); width:22px; height:22px}
+.o2k7SimpleSkin a.mceButton span, .o2k7SimpleSkin a.mceButton img {margin:1px 0 0 1px}
+.o2k7SimpleSkin a.mceButtonEnabled:hover {background-color:#B2BBD0; background-position:0 -22px}
+.o2k7SimpleSkin a.mceButtonActive {background-position:0 -44px}
+.o2k7SimpleSkin .mceButtonDisabled span {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
+
+/* Separator */
+.o2k7SimpleSkin .mceSeparator {display:block; background:url(img/button_bg.png) -22px 0; width:5px; height:22px}
+
+/* Theme */
+.o2k7SimpleSkin span.mce_bold {background-position:0 0}
+.o2k7SimpleSkin span.mce_italic {background-position:-60px 0}
+.o2k7SimpleSkin span.mce_underline {background-position:-140px 0}
+.o2k7SimpleSkin span.mce_strikethrough {background-position:-120px 0}
+.o2k7SimpleSkin span.mce_undo {background-position:-160px 0}
+.o2k7SimpleSkin span.mce_redo {background-position:-100px 0}
+.o2k7SimpleSkin span.mce_cleanup {background-position:-40px 0}
+.o2k7SimpleSkin span.mce_insertunorderedlist {background-position:-20px 0}
+.o2k7SimpleSkin span.mce_insertorderedlist {background-position:-80px 0}
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/tiny_mce.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/tiny_mce.js
new file mode 100755
index 00000000..7cad8b78
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/tiny_mce.js
@@ -0,0 +1 @@
+(function(e){var a=/^\s*|\s*$/g,b,d="B".replace(/A(.)|B/,"$1")==="$1";var c={majorVersion:"3",minorVersion:"5.7",releaseDate:"2012-09-20",_init:function(){var s=this,q=document,o=navigator,g=o.userAgent,m,f,l,k,j,r;s.isOpera=e.opera&&opera.buildNumber;s.isWebKit=/WebKit/.test(g);s.isIE=!s.isWebKit&&!s.isOpera&&(/MSIE/gi).test(g)&&(/Explorer/gi).test(o.appName);s.isIE6=s.isIE&&/MSIE [56]/.test(g);s.isIE7=s.isIE&&/MSIE [7]/.test(g);s.isIE8=s.isIE&&/MSIE [8]/.test(g);s.isIE9=s.isIE&&/MSIE [9]/.test(g);s.isGecko=!s.isWebKit&&/Gecko/.test(g);s.isMac=g.indexOf("Mac")!=-1;s.isAir=/adobeair/i.test(g);s.isIDevice=/(iPad|iPhone)/.test(g);s.isIOS5=s.isIDevice&&g.match(/AppleWebKit\/(\d*)/)[1]>=534;if(e.tinyMCEPreInit){s.suffix=tinyMCEPreInit.suffix;s.baseURL=tinyMCEPreInit.base;s.query=tinyMCEPreInit.query;return}s.suffix="";f=q.getElementsByTagName("base");for(m=0;m<f.length;m++){r=f[m].href;if(r){if(/^https?:\/\/[^\/]+$/.test(r)){r+="/"}k=r?r.match(/.*\//)[0]:""}}function h(i){if(i.src&&/tiny_mce(|_gzip|_jquery|_prototype|_full)(_dev|_src)?.js/.test(i.src)){if(/_(src|dev)\.js/g.test(i.src)){s.suffix="_src"}if((j=i.src.indexOf("?"))!=-1){s.query=i.src.substring(j+1)}s.baseURL=i.src.substring(0,i.src.lastIndexOf("/"));if(k&&s.baseURL.indexOf("://")==-1&&s.baseURL.indexOf("/")!==0){s.baseURL=k+s.baseURL}return s.baseURL}return null}f=q.getElementsByTagName("script");for(m=0;m<f.length;m++){if(h(f[m])){return}}l=q.getElementsByTagName("head")[0];if(l){f=l.getElementsByTagName("script");for(m=0;m<f.length;m++){if(h(f[m])){return}}}return},is:function(g,f){if(!f){return g!==b}if(f=="array"&&c.isArray(g)){return true}return typeof(g)==f},isArray:Array.isArray||function(f){return Object.prototype.toString.call(f)==="[object Array]"},makeMap:function(f,j,h){var g;f=f||[];j=j||",";if(typeof(f)=="string"){f=f.split(j)}h=h||{};g=f.length;while(g--){h[f[g]]={}}return h},each:function(i,f,h){var j,g;if(!i){return 0}h=h||i;if(i.length!==b){for(j=0,g=i.length;j<g;j++){if(f.call(h,i[j],j,i)===false){return 0}}}else{for(j in i){if(i.hasOwnProperty(j)){if(f.call(h,i[j],j,i)===false){return 0}}}}return 1},map:function(g,h){var i=[];c.each(g,function(f){i.push(h(f))});return i},grep:function(g,h){var i=[];c.each(g,function(f){if(!h||h(f)){i.push(f)}});return i},inArray:function(g,h){var j,f;if(g){for(j=0,f=g.length;j<f;j++){if(g[j]===h){return j}}}return -1},extend:function(n,k){var j,f,h,g=arguments,m;for(j=1,f=g.length;j<f;j++){k=g[j];for(h in k){if(k.hasOwnProperty(h)){m=k[h];if(m!==b){n[h]=m}}}}return n},trim:function(f){return(f?""+f:"").replace(a,"")},create:function(o,f,j){var n=this,g,i,k,l,h,m=0;o=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(o);k=o[3].match(/(^|\.)(\w+)$/i)[2];i=n.createNS(o[3].replace(/\.\w+$/,""),j);if(i[k]){return}if(o[2]=="static"){i[k]=f;if(this.onCreate){this.onCreate(o[2],o[3],i[k])}return}if(!f[k]){f[k]=function(){};m=1}i[k]=f[k];n.extend(i[k].prototype,f);if(o[5]){g=n.resolve(o[5]).prototype;l=o[5].match(/\.(\w+)$/i)[1];h=i[k];if(m){i[k]=function(){return g[l].apply(this,arguments)}}else{i[k]=function(){this.parent=g[l];return h.apply(this,arguments)}}i[k].prototype[k]=i[k];n.each(g,function(p,q){i[k].prototype[q]=g[q]});n.each(f,function(p,q){if(g[q]){i[k].prototype[q]=function(){this.parent=g[q];return p.apply(this,arguments)}}else{if(q!=k){i[k].prototype[q]=p}}})}n.each(f["static"],function(p,q){i[k][q]=p});if(this.onCreate){this.onCreate(o[2],o[3],i[k].prototype)}},walk:function(i,h,j,g){g=g||this;if(i){if(j){i=i[j]}c.each(i,function(k,f){if(h.call(g,k,f,j)===false){return false}c.walk(k,h,j,g)})}},createNS:function(j,h){var g,f;h=h||e;j=j.split(".");for(g=0;g<j.length;g++){f=j[g];if(!h[f]){h[f]={}}h=h[f]}return h},resolve:function(j,h){var g,f;h=h||e;j=j.split(".");for(g=0,f=j.length;g<f;g++){h=h[j[g]];if(!h){break}}return h},addUnload:function(j,i){var h=this,g;g=function(){var f=h.unloads,l,m;if(f){for(m in f){l=f[m];if(l&&l.func){l.func.call(l.scope,1)}}if(e.detachEvent){e.detachEvent("onbeforeunload",k);e.detachEvent("onunload",g)}else{if(e.removeEventListener){e.removeEventListener("unload",g,false)}}h.unloads=l=f=w=g=0;if(e.CollectGarbage){CollectGarbage()}}};function k(){var l=document;function f(){l.detachEvent("onstop",f);if(g){g()}l=0}if(l.readyState=="interactive"){if(l){l.attachEvent("onstop",f)}e.setTimeout(function(){if(l){l.detachEvent("onstop",f)}},0)}}j={func:j,scope:i||this};if(!h.unloads){if(e.attachEvent){e.attachEvent("onunload",g);e.attachEvent("onbeforeunload",k)}else{if(e.addEventListener){e.addEventListener("unload",g,false)}}h.unloads=[j]}else{h.unloads.push(j)}return j},removeUnload:function(i){var g=this.unloads,h=null;c.each(g,function(j,f){if(j&&j.func==i){g.splice(f,1);h=i;return false}});return h},explode:function(f,g){if(!f||c.is(f,"array")){return f}return c.map(f.split(g||","),c.trim)},_addVer:function(g){var f;if(!this.query){return g}f=(g.indexOf("?")==-1?"?":"&")+this.query;if(g.indexOf("#")==-1){return g+f}return g.replace("#",f+"#")},_replace:function(h,f,g){if(d){return g.replace(h,function(){var l=f,j=arguments,k;for(k=0;k<j.length-2;k++){if(j[k]===b){l=l.replace(new RegExp("\\$"+k,"g"),"")}else{l=l.replace(new RegExp("\\$"+k,"g"),j[k])}}return l})}return g.replace(h,f)}};c._init();e.tinymce=e.tinyMCE=c})(window);tinymce.create("tinymce.util.Dispatcher",{scope:null,listeners:null,inDispatch:false,Dispatcher:function(a){this.scope=a||this;this.listeners=[]},add:function(b,a){this.listeners.push({cb:b,scope:a||this.scope});return b},addToTop:function(d,b){var a=this,c={cb:d,scope:b||a.scope};if(a.inDispatch){a.listeners=[c].concat(a.listeners)}else{a.listeners.unshift(c)}return d},remove:function(c){var b=this.listeners,a=null;tinymce.each(b,function(e,d){if(c==e.cb){a=e;b.splice(d,1);return false}});return a},dispatch:function(){var a=this,e,b=arguments,c,d=a.listeners,f;a.inDispatch=true;for(c=0;c<d.length;c++){f=d[c];e=f.cb.apply(f.scope,b.length>0?b:[f.scope]);if(e===false){break}}a.inDispatch=false;return e}});(function(){var a=tinymce.each;tinymce.create("tinymce.util.URI",{URI:function(e,g){var f=this,i,d,c,h;e=tinymce.trim(e);g=f.settings=g||{};if(/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e)){f.source=e;return}if(e.indexOf("/")===0&&e.indexOf("//")!==0){e=(g.base_uri?g.base_uri.protocol||"http":"http")+"://mce_host"+e}if(!/^[\w\-]*:?\/\//.test(e)){h=g.base_uri?g.base_uri.path:new tinymce.util.URI(location.href).directory;e=((g.base_uri&&g.base_uri.protocol)||"http")+"://mce_host"+f.toAbsPath(h,e)}e=e.replace(/@@/g,"(mce_at)");e=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e);a(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],function(b,j){var k=e[j];if(k){k=k.replace(/\(mce_at\)/g,"@@")}f[b]=k});c=g.base_uri;if(c){if(!f.protocol){f.protocol=c.protocol}if(!f.userInfo){f.userInfo=c.userInfo}if(!f.port&&f.host==="mce_host"){f.port=c.port}if(!f.host||f.host==="mce_host"){f.host=c.host}f.source=""}},setPath:function(c){var b=this;c=/^(.*?)\/?(\w+)?$/.exec(c);b.path=c[0];b.directory=c[1];b.file=c[2];b.source="";b.getURI()},toRelative:function(b){var d=this,f;if(b==="./"){return b}b=new tinymce.util.URI(b,{base_uri:d});if((b.host!="mce_host"&&d.host!=b.host&&b.host)||d.port!=b.port||d.protocol!=b.protocol){return b.getURI()}var c=d.getURI(),e=b.getURI();if(c==e||(c.charAt(c.length-1)=="/"&&c.substr(0,c.length-1)==e)){return c}f=d.toRelPath(d.path,b.path);if(b.query){f+="?"+b.query}if(b.anchor){f+="#"+b.anchor}return f},toAbsolute:function(b,c){b=new tinymce.util.URI(b,{base_uri:this});return b.getURI(this.host==b.host&&this.protocol==b.protocol?c:0)},toRelPath:function(g,h){var c,f=0,d="",e,b;g=g.substring(0,g.lastIndexOf("/"));g=g.split("/");c=h.split("/");if(g.length>=c.length){for(e=0,b=g.length;e<b;e++){if(e>=c.length||g[e]!=c[e]){f=e+1;break}}}if(g.length<c.length){for(e=0,b=c.length;e<b;e++){if(e>=g.length||g[e]!=c[e]){f=e+1;break}}}if(f===1){return h}for(e=0,b=g.length-(f-1);e<b;e++){d+="../"}for(e=f-1,b=c.length;e<b;e++){if(e!=f-1){d+="/"+c[e]}else{d+=c[e]}}return d},toAbsPath:function(e,f){var c,b=0,h=[],d,g;d=/\/$/.test(f)?"/":"";e=e.split("/");f=f.split("/");a(e,function(i){if(i){h.push(i)}});e=h;for(c=f.length-1,h=[];c>=0;c--){if(f[c].length===0||f[c]==="."){continue}if(f[c]===".."){b++;continue}if(b>0){b--;continue}h.push(f[c])}c=e.length-b;if(c<=0){g=h.reverse().join("/")}else{g=e.slice(0,c).join("/")+"/"+h.reverse().join("/")}if(g.indexOf("/")!==0){g="/"+g}if(d&&g.lastIndexOf("/")!==g.length-1){g+=d}return g},getURI:function(d){var c,b=this;if(!b.source||d){c="";if(!d){if(b.protocol){c+=b.protocol+"://"}if(b.userInfo){c+=b.userInfo+"@"}if(b.host){c+=b.host}if(b.port){c+=":"+b.port}}if(b.path){c+=b.path}if(b.query){c+="?"+b.query}if(b.anchor){c+="#"+b.anchor}b.source=c}return b.source}})})();(function(){var a=tinymce.each;tinymce.create("static tinymce.util.Cookie",{getHash:function(d){var b=this.get(d),c;if(b){a(b.split("&"),function(e){e=e.split("=");c=c||{};c[unescape(e[0])]=unescape(e[1])})}return c},setHash:function(j,b,g,f,i,c){var h="";a(b,function(e,d){h+=(!h?"":"&")+escape(d)+"="+escape(e)});this.set(j,h,g,f,i,c)},get:function(i){var h=document.cookie,g,f=i+"=",d;if(!h){return}d=h.indexOf("; "+f);if(d==-1){d=h.indexOf(f);if(d!==0){return null}}else{d+=2}g=h.indexOf(";",d);if(g==-1){g=h.length}return unescape(h.substring(d+f.length,g))},set:function(i,b,g,f,h,c){document.cookie=i+"="+escape(b)+((g)?"; expires="+g.toGMTString():"")+((f)?"; path="+escape(f):"")+((h)?"; domain="+h:"")+((c)?"; secure":"")},remove:function(c,e,d){var b=new Date();b.setTime(b.getTime()-1000);this.set(c,"",b,e,d)}})})();(function(){function serialize(o,quote){var i,v,t,name;quote=quote||'"';if(o==null){return"null"}t=typeof o;if(t=="string"){v="\bb\tt\nn\ff\rr\"\"''\\\\";return quote+o.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(a,b){if(quote==='"'&&a==="'"){return a}i=v.indexOf(b);if(i+1){return"\\"+v.charAt(i+1)}a=b.charCodeAt().toString(16);return"\\u"+"0000".substring(a.length)+a})+quote}if(t=="object"){if(o.hasOwnProperty&&Object.prototype.toString.call(o)==="[object Array]"){for(i=0,v="[";i<o.length;i++){v+=(i>0?",":"")+serialize(o[i],quote)}return v+"]"}v="{";for(name in o){if(o.hasOwnProperty(name)){v+=typeof o[name]!="function"?(v.length>1?","+quote:quote)+name+quote+":"+serialize(o[name],quote):""}}return v+"}"}return""+o}tinymce.util.JSON={serialize:serialize,parse:function(s){try{return eval("("+s+")")}catch(ex){}}}})();tinymce.create("static tinymce.util.XHR",{send:function(g){var a,e,b=window,h=0;function f(){if(!g.async||a.readyState==4||h++>10000){if(g.success&&h<10000&&a.status==200){g.success.call(g.success_scope,""+a.responseText,a,g)}else{if(g.error){g.error.call(g.error_scope,h>10000?"TIMED_OUT":"GENERAL",a,g)}}a=null}else{b.setTimeout(f,10)}}g.scope=g.scope||this;g.success_scope=g.success_scope||g.scope;g.error_scope=g.error_scope||g.scope;g.async=g.async===false?false:true;g.data=g.data||"";function d(i){a=0;try{a=new ActiveXObject(i)}catch(c){}return a}a=b.XMLHttpRequest?new XMLHttpRequest():d("Microsoft.XMLHTTP")||d("Msxml2.XMLHTTP");if(a){if(a.overrideMimeType){a.overrideMimeType(g.content_type)}a.open(g.type||(g.data?"POST":"GET"),g.url,g.async);if(g.content_type){a.setRequestHeader("Content-Type",g.content_type)}a.setRequestHeader("X-Requested-With","XMLHttpRequest");a.send(g.data);if(!g.async){return f()}e=b.setTimeout(f,10)}}});(function(){var c=tinymce.extend,b=tinymce.util.JSON,a=tinymce.util.XHR;tinymce.create("tinymce.util.JSONRequest",{JSONRequest:function(d){this.settings=c({},d);this.count=0},send:function(f){var e=f.error,d=f.success;f=c(this.settings,f);f.success=function(h,g){h=b.parse(h);if(typeof(h)=="undefined"){h={error:"JSON Parse error."}}if(h.error){e.call(f.error_scope||f.scope,h.error,g)}else{d.call(f.success_scope||f.scope,h.result)}};f.error=function(h,g){if(e){e.call(f.error_scope||f.scope,h,g)}};f.data=b.serialize({id:f.id||"c"+(this.count++),method:f.method,params:f.params});f.content_type="application/json";a.send(f)},"static":{sendRPC:function(d){return new tinymce.util.JSONRequest().send(d)}}})}());(function(a){a.VK={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,modifierPressed:function(b){return b.shiftKey||b.ctrlKey||b.altKey},metaKeyPressed:function(b){return a.isMac?b.metaKey:b.ctrlKey&&!b.altKey}}})(tinymce);tinymce.util.Quirks=function(e){var n=tinymce.VK,x=n.BACKSPACE,y=n.DELETE,q=e.dom,I=e.selection,v=e.settings,c=e.parser,u=e.serializer;function d(M,L){try{e.getDoc().execCommand(M,false,L)}catch(K){}}function C(){var K=e.getDoc().documentMode;return K?K:6}function H(K){return K.isDefaultPrevented()}function k(){function K(N){var L,P,M,O;L=I.getRng();P=q.getParent(L.startContainer,q.isBlock);if(N){P=q.getNext(P,q.isBlock)}if(P){M=P.firstChild;while(M&&M.nodeType==3&&M.nodeValue.length===0){M=M.nextSibling}if(M&&M.nodeName==="SPAN"){O=M.cloneNode(false)}}e.getDoc().execCommand(N?"ForwardDelete":"Delete",false,null);P=q.getParent(L.startContainer,q.isBlock);tinymce.each(q.select("span.Apple-style-span,font.Apple-style-span",P),function(Q){var R=I.getBookmark();if(O){q.replace(O.cloneNode(false),Q,true)}else{q.remove(Q,true)}I.moveToBookmark(R)})}e.onKeyDown.add(function(L,N){var M;M=N.keyCode==y;if(!H(N)&&(M||N.keyCode==x)&&!n.modifierPressed(N)){N.preventDefault();K(M)}});e.addCommand("Delete",function(){K()})}function J(){function K(N){var M=q.create("body");var O=N.cloneContents();M.appendChild(O);return I.serializer.serialize(M,{format:"html"})}function L(M){var O=K(M);var P=q.createRng();P.selectNode(e.getBody());var N=K(P);return O===N}e.onKeyDown.add(function(N,P){var O=P.keyCode,M;if(!H(P)&&(O==y||O==x)){M=N.selection.isCollapsed();if(M&&!q.isEmpty(N.getBody())){return}if(tinymce.isIE&&!M){return}if(!M&&!L(N.selection.getRng())){return}N.setContent("");N.selection.setCursorLocation(N.getBody(),0);N.nodeChanged()}})}function A(){e.onKeyDown.add(function(K,L){if(!H(L)&&L.keyCode==65&&n.metaKeyPressed(L)){L.preventDefault();K.execCommand("SelectAll")}})}function B(){if(!e.settings.content_editable){q.bind(e.getDoc(),"focusin",function(K){I.setRng(I.getRng())});q.bind(e.getDoc(),"mousedown",function(K){if(K.target==e.getDoc().documentElement){e.getWin().focus();I.setRng(I.getRng())}})}}function o(){e.onKeyDown.add(function(K,N){if(!H(N)&&N.keyCode===x){if(I.isCollapsed()&&I.getRng(true).startOffset===0){var M=I.getNode();var L=M.previousSibling;if(L&&L.nodeName&&L.nodeName.toLowerCase()==="hr"){q.remove(L);tinymce.dom.Event.cancel(N)}}}})}function b(){if(!Range.prototype.getClientRects){e.onMouseDown.add(function(L,M){if(!H(M)&&M.target.nodeName==="HTML"){var K=L.getBody();K.blur();setTimeout(function(){K.focus()},0)}})}}function F(){e.onClick.add(function(K,L){L=L.target;if(/^(IMG|HR)$/.test(L.nodeName)){I.getSel().setBaseAndExtent(L,0,L,1)}if(L.nodeName=="A"&&q.hasClass(L,"mceItemAnchor")){I.select(L)}K.nodeChanged()})}function E(){function L(){var N=q.getAttribs(I.getStart().cloneNode(false));return function(){var O=I.getStart();if(O!==e.getBody()){q.setAttrib(O,"style",null);tinymce.each(N,function(P){O.setAttributeNode(P.cloneNode(true))})}}}function K(){return !I.isCollapsed()&&q.getParent(I.getStart(),q.isBlock)!=q.getParent(I.getEnd(),q.isBlock)}function M(N,O){O.preventDefault();return false}e.onKeyPress.add(function(N,P){var O;if(!H(P)&&(P.keyCode==8||P.keyCode==46)&&K()){O=L();N.getDoc().execCommand("delete",false,null);O();P.preventDefault();return false}});q.bind(e.getDoc(),"cut",function(O){var N;if(!H(O)&&K()){N=L();e.onKeyUp.addToTop(M);setTimeout(function(){N();e.onKeyUp.remove(M)},0)}})}function l(){var L,K;q.bind(e.getDoc(),"selectionchange",function(){if(K){clearTimeout(K);K=0}K=window.setTimeout(function(){var M=I.getRng();if(!L||!tinymce.dom.RangeUtils.compareRanges(M,L)){e.nodeChanged();L=M}},50)})}function G(){document.body.setAttribute("role","application")}function D(){e.onKeyDown.add(function(K,M){if(!H(M)&&M.keyCode===x){if(I.isCollapsed()&&I.getRng(true).startOffset===0){var L=I.getNode().previousSibling;if(L&&L.nodeName&&L.nodeName.toLowerCase()==="table"){return tinymce.dom.Event.cancel(M)}}}})}function i(){if(C()>7){return}d("RespectVisibilityInDesign",true);e.contentStyles.push(".mceHideBrInPre pre br {display: none}");q.addClass(e.getBody(),"mceHideBrInPre");c.addNodeFilter("pre",function(K,M){var N=K.length,P,L,Q,O;while(N--){P=K[N].getAll("br");L=P.length;while(L--){Q=P[L];O=Q.prev;if(O&&O.type===3&&O.value.charAt(O.value-1)!="\n"){O.value+="\n"}else{Q.parent.insert(new tinymce.html.Node("#text",3),Q,true).value="\n"}}}});u.addNodeFilter("pre",function(K,M){var N=K.length,P,L,Q,O;while(N--){P=K[N].getAll("br");L=P.length;while(L--){Q=P[L];O=Q.prev;if(O&&O.type==3){O.value=O.value.replace(/\r?\n$/,"")}}}})}function g(){q.bind(e.getBody(),"mouseup",function(M){var L,K=I.getNode();if(K.nodeName=="IMG"){if(L=q.getStyle(K,"width")){q.setAttrib(K,"width",L.replace(/[^0-9%]+/g,""));q.setStyle(K,"width","")}if(L=q.getStyle(K,"height")){q.setAttrib(K,"height",L.replace(/[^0-9%]+/g,""));q.setStyle(K,"height","")}}})}function s(){e.onKeyDown.add(function(Q,R){var P,K,L,N,O,S,M;P=R.keyCode==y;if(!H(R)&&(P||R.keyCode==x)&&!n.modifierPressed(R)){K=I.getRng();L=K.startContainer;N=K.startOffset;M=K.collapsed;if(L.nodeType==3&&L.nodeValue.length>0&&((N===0&&!M)||(M&&N===(P?0:1)))){nonEmptyElements=Q.schema.getNonEmptyElements();R.preventDefault();O=q.create("br",{id:"__tmp"});L.parentNode.insertBefore(O,L);Q.getDoc().execCommand(P?"ForwardDelete":"Delete",false,null);L=I.getRng().startContainer;S=L.previousSibling;if(S&&S.nodeType==1&&!q.isBlock(S)&&q.isEmpty(S)&&!nonEmptyElements[S.nodeName.toLowerCase()]){q.remove(S)}q.remove("__tmp")}}})}function f(){e.onKeyDown.add(function(O,P){var M,L,Q,K,N;if(H(P)||P.keyCode!=n.BACKSPACE){return}M=I.getRng();L=M.startContainer;Q=M.startOffset;K=q.getRoot();N=L;if(!M.collapsed||Q!==0){return}while(N&&N.parentNode&&N.parentNode.firstChild==N&&N.parentNode!=K){N=N.parentNode}if(N.tagName==="BLOCKQUOTE"){O.formatter.toggle("blockquote",null,N);M=q.createRng();M.setStart(L,0);M.setEnd(L,0);I.setRng(M)}})}function m(){function K(){e._refreshContentEditable();d("StyleWithCSS",false);d("enableInlineTableEditing",false);if(!v.object_resizing){d("enableObjectResizing",false)}}if(!v.readonly){e.onBeforeExecCommand.add(K);e.onMouseDown.add(K)}}function p(){function K(L,M){tinymce.each(q.select("a"),function(P){var N=P.parentNode,O=q.getRoot();if(N.lastChild===P){while(N&&!q.isBlock(N)){if(N.parentNode.lastChild!==N||N===O){return}N=N.parentNode}q.add(N,"br",{"data-mce-bogus":1})}})}e.onExecCommand.add(function(L,M){if(M==="CreateLink"){K(L)}});e.onSetContent.add(I.onSetContent.add(K))}function z(){if(v.forced_root_block){e.onInit.add(function(){d("DefaultParagraphSeparator",v.forced_root_block)})}}function a(){function K(M,L){if(!M||!L.initial){e.execCommand("mceRepaint")}}e.onUndo.add(K);e.onRedo.add(K);e.onSetContent.add(K)}function r(){e.onKeyDown.add(function(L,M){var K;if(!H(M)&&M.keyCode==x){K=L.getDoc().selection.createRange();if(K&&K.item){M.preventDefault();L.undoManager.beforeChange();q.remove(K.item(0));L.undoManager.add()}}})}function j(){var K;if(C()>=10){K="";tinymce.each("p div h1 h2 h3 h4 h5 h6".split(" "),function(L,M){K+=(M>0?",":"")+L+":empty"});e.contentStyles.push(K+"{padding-right: 1px !important}")}}function h(){var M,L,ac,K,X,aa,Y,ab,N,O,Z,V,U,W=document,S=e.getDoc();if(!v.object_resizing||v.webkit_fake_resize===false){return}d("enableObjectResizing",false);Z={n:[0.5,0,0,-1],e:[1,0.5,1,0],s:[0.5,1,0,1],w:[0,0.5,-1,0],nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]};function Q(ag){var af,ae;af=ag.screenX-aa;ae=ag.screenY-Y;V=af*X[2]+ab;U=ae*X[3]+N;V=V<5?5:V;U=U<5?5:U;if(n.modifierPressed(ag)||(ac.nodeName=="IMG"&&X[2]*X[3]!==0)){V=Math.round(U/O);U=Math.round(V*O)}q.setStyles(K,{width:V,height:U});if(X[2]<0&&K.clientWidth<=V){q.setStyle(K,"left",M+(ab-V))}if(X[3]<0&&K.clientHeight<=U){q.setStyle(K,"top",L+(N-U))}}function ad(){function ae(af,ag){if(ag){if(ac.style[af]||!e.schema.isValid(ac.nodeName.toLowerCase(),af)){q.setStyle(ac,af,ag)}else{q.setAttrib(ac,af,ag)}}}ae("width",V);ae("height",U);q.unbind(S,"mousemove",Q);q.unbind(S,"mouseup",ad);if(W!=S){q.unbind(W,"mousemove",Q);q.unbind(W,"mouseup",ad)}q.remove(K);P(ac)}function P(ah){var af,ag,ae;R();af=q.getPos(ah);M=af.x;L=af.y;ag=ah.offsetWidth;ae=ah.offsetHeight;if(ac!=ah){ac=ah;V=U=0}tinymce.each(Z,function(ak,ai){var aj;aj=q.get("mceResizeHandle"+ai);if(!aj){aj=q.add(S.documentElement,"div",{id:"mceResizeHandle"+ai,"class":"mceResizeHandle",style:"cursor:"+ai+"-resize; margin:0; padding:0"});q.bind(aj,"mousedown",function(al){al.preventDefault();ad();aa=al.screenX;Y=al.screenY;ab=ac.clientWidth;N=ac.clientHeight;O=N/ab;X=ak;K=ac.cloneNode(true);q.addClass(K,"mceClonedResizable");q.setStyles(K,{left:M,top:L,margin:0});S.documentElement.appendChild(K);q.bind(S,"mousemove",Q);q.bind(S,"mouseup",ad);if(W!=S){q.bind(W,"mousemove",Q);q.bind(W,"mouseup",ad)}})}else{q.show(aj)}q.setStyles(aj,{left:(ag*ak[0]+M)-(aj.offsetWidth/2),top:(ae*ak[1]+L)-(aj.offsetHeight/2)})});if(!tinymce.isOpera&&ac.nodeName=="IMG"){ac.setAttribute("data-mce-selected","1")}}function R(){if(ac){ac.removeAttribute("data-mce-selected")}for(var ae in Z){q.hide("mceResizeHandle"+ae)}}e.contentStyles.push(".mceResizeHandle {position: absolute;border: 1px solid black;background: #FFF;width: 5px;height: 5px;z-index: 10000}.mceResizeHandle:hover {background: #000}img[data-mce-selected] {outline: 1px solid black}img.mceClonedResizable, table.mceClonedResizable {position: absolute;outline: 1px dashed black;opacity: .5;z-index: 10000}");function T(){var ae=q.getParent(I.getNode(),"table,img");tinymce.each(q.select("img[data-mce-selected]"),function(af){af.removeAttribute("data-mce-selected")});if(ae){P(ae)}else{R()}}e.onNodeChange.add(T);q.bind(S,"selectionchange",T);e.serializer.addAttributeFilter("data-mce-selected",function(ae,af){var ag=ae.length;while(ag--){ae[ag].attr(af,null)}})}function t(){if(C()<9){c.addNodeFilter("noscript",function(K){var L=K.length,M,N;while(L--){M=K[L];N=M.firstChild;if(N){M.attr("data-mce-innertext",N.value)}}});u.addNodeFilter("noscript",function(K){var L=K.length,M,O,N;while(L--){M=K[L];O=K[L].firstChild;if(O){O.value=tinymce.html.Entities.decode(O.value)}else{N=M.attributes.map["data-mce-innertext"];if(N){M.attr("data-mce-innertext",null);O=new tinymce.html.Node("#text",3);O.value=N;O.raw=true;M.append(O)}}}})}}D();f();J();if(tinymce.isWebKit){s();k();B();F();z();if(tinymce.isIDevice){l()}else{h();A()}}if(tinymce.isIE){o();G();i();g();r();j();t()}if(tinymce.isGecko){o();b();E();m();p();a()}if(tinymce.isOpera){h()}};(function(j){var a,g,d,k=/[&<>\"\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,b=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,f=/[<>&\"\']/g,c=/&(#x|#)?([\w]+);/g,i={128:"\u20AC",130:"\u201A",131:"\u0192",132:"\u201E",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02C6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017D",145:"\u2018",146:"\u2019",147:"\u201C",148:"\u201D",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02DC",153:"\u2122",154:"\u0161",155:"\u203A",156:"\u0153",158:"\u017E",159:"\u0178"};g={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;"};d={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"};function h(l){var m;m=document.createElement("div");m.innerHTML=l;return m.textContent||m.innerText||l}function e(m,p){var n,o,l,q={};if(m){m=m.split(",");p=p||10;for(n=0;n<m.length;n+=2){o=String.fromCharCode(parseInt(m[n],p));if(!g[o]){l="&"+m[n+1]+";";q[o]=l;q[l]=o}}return q}}a=e("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);j.html=j.html||{};j.html.Entities={encodeRaw:function(m,l){return m.replace(l?k:b,function(n){return g[n]||n})},encodeAllRaw:function(l){return(""+l).replace(f,function(m){return g[m]||m})},encodeNumeric:function(m,l){return m.replace(l?k:b,function(n){if(n.length>1){return"&#"+(((n.charCodeAt(0)-55296)*1024)+(n.charCodeAt(1)-56320)+65536)+";"}return g[n]||"&#"+n.charCodeAt(0)+";"})},encodeNamed:function(n,l,m){m=m||a;return n.replace(l?k:b,function(o){return g[o]||m[o]||o})},getEncodeFunc:function(l,o){var p=j.html.Entities;o=e(o)||a;function m(r,q){return r.replace(q?k:b,function(s){return g[s]||o[s]||"&#"+s.charCodeAt(0)+";"||s})}function n(r,q){return p.encodeNamed(r,q,o)}l=j.makeMap(l.replace(/\+/g,","));if(l.named&&l.numeric){return m}if(l.named){if(o){return n}return p.encodeNamed}if(l.numeric){return p.encodeNumeric}return p.encodeRaw},decode:function(l){return l.replace(c,function(n,m,o){if(m){o=parseInt(o,m.length===2?16:10);if(o>65535){o-=65536;return String.fromCharCode(55296+(o>>10),56320+(o&1023))}else{return i[o]||String.fromCharCode(o)}}return d[n]||a[n]||h(n)})}}})(tinymce);tinymce.html.Styles=function(d,f){var k=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,h=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,b=/\s*([^:]+):\s*([^;]+);?/g,l=/\s+$/,m=/rgb/,e,g,a={},j;d=d||{};j="\\\" \\' \\; \\: ; : \uFEFF".split(" ");for(g=0;g<j.length;g++){a[j[g]]="\uFEFF"+g;a["\uFEFF"+g]=j[g]}function c(n,q,p,i){function o(r){r=parseInt(r).toString(16);return r.length>1?r:"0"+r}return"#"+o(q)+o(p)+o(i)}return{toHex:function(i){return i.replace(k,c)},parse:function(s){var z={},q,n,x,r,v=d.url_converter,y=d.url_converter_scope||this;function p(D,G){var F,C,B,E;F=z[D+"-top"+G];if(!F){return}C=z[D+"-right"+G];if(F!=C){return}B=z[D+"-bottom"+G];if(C!=B){return}E=z[D+"-left"+G];if(B!=E){return}z[D+G]=E;delete z[D+"-top"+G];delete z[D+"-right"+G];delete z[D+"-bottom"+G];delete z[D+"-left"+G]}function u(C){var D=z[C],B;if(!D||D.indexOf(" ")<0){return}D=D.split(" ");B=D.length;while(B--){if(D[B]!==D[0]){return false}}z[C]=D[0];return true}function A(D,C,B,E){if(!u(C)){return}if(!u(B)){return}if(!u(E)){return}z[D]=z[C]+" "+z[B]+" "+z[E];delete z[C];delete z[B];delete z[E]}function t(B){r=true;return a[B]}function i(C,B){if(r){C=C.replace(/\uFEFF[0-9]/g,function(D){return a[D]})}if(!B){C=C.replace(/\\([\'\";:])/g,"$1")}return C}function o(C,B,F,E,G,D){G=G||D;if(G){G=i(G);return"'"+G.replace(/\'/g,"\\'")+"'"}B=i(B||F||E);if(v){B=v.call(y,B,"style")}return"url('"+B.replace(/\'/g,"\\'")+"')"}if(s){s=s.replace(/\\[\"\';:\uFEFF]/g,t).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(B){return B.replace(/[;:]/g,t)});while(q=b.exec(s)){n=q[1].replace(l,"").toLowerCase();x=q[2].replace(l,"");if(n&&x.length>0){if(n==="font-weight"&&x==="700"){x="bold"}else{if(n==="color"||n==="background-color"){x=x.toLowerCase()}}x=x.replace(k,c);x=x.replace(h,o);z[n]=r?i(x,true):x}b.lastIndex=q.index+q[0].length}p("border","");p("border","-width");p("border","-color");p("border","-style");p("padding","");p("margin","");A("border","border-width","border-style","border-color");if(z.border==="medium none"){delete z.border}}return z},serialize:function(p,r){var o="",n,q;function i(t){var x,u,s,v;x=f.styles[t];if(x){for(u=0,s=x.length;u<s;u++){t=x[u];v=p[t];if(v!==e&&v.length>0){o+=(o.length>0?" ":"")+t+": "+v+";"}}}}if(r&&f&&f.styles){i("*");i(r)}else{for(n in p){q=p[n];if(q!==e&&q.length>0){o+=(o.length>0?" ":"")+n+": "+q+";"}}}return o}}};(function(f){var a={},e=f.makeMap,g=f.each;function d(j,i){return j.split(i||",")}function h(m,l){var j,k={};function i(n){return n.replace(/[A-Z]+/g,function(o){return i(m[o])})}for(j in m){if(m.hasOwnProperty(j)){m[j]=i(m[j])}}i(l).replace(/#/g,"#text").replace(/(\w+)\[([^\]]+)\]\[([^\]]*)\]/g,function(q,o,n,p){n=d(n,"|");k[o]={attributes:e(n),attributesOrder:n,children:e(p,"|",{"#comment":{}})}});return k}function b(){var i=a.html5;if(!i){i=a.html5=h({A:"id|accesskey|class|dir|draggable|item|hidden|itemprop|role|spellcheck|style|subject|title|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup",B:"#|a|abbr|area|audio|b|bdo|br|button|canvas|cite|code|command|datalist|del|dfn|em|embed|i|iframe|img|input|ins|kbd|keygen|label|link|map|mark|meta|meter|noscript|object|output|progress|q|ruby|samp|script|select|small|span|strong|sub|sup|svg|textarea|time|var|video|wbr",C:"#|a|abbr|area|address|article|aside|audio|b|bdo|blockquote|br|button|canvas|cite|code|command|datalist|del|details|dfn|dialog|div|dl|em|embed|fieldset|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hgroup|hr|i|iframe|img|input|ins|kbd|keygen|label|link|map|mark|menu|meta|meter|nav|noscript|ol|object|output|p|pre|progress|q|ruby|samp|script|section|select|small|span|strong|style|sub|sup|svg|table|textarea|time|ul|var|video"},"html[A|manifest][body|head]head[A][base|command|link|meta|noscript|script|style|title]title[A][#]base[A|href|target][]link[A|href|rel|media|type|sizes][]meta[A|http-equiv|name|content|charset][]style[A|type|media|scoped][#]script[A|charset|type|src|defer|async][#]noscript[A][C]body[A][C]section[A][C]nav[A][C]article[A][C]aside[A][C]h1[A][B]h2[A][B]h3[A][B]h4[A][B]h5[A][B]h6[A][B]hgroup[A][h1|h2|h3|h4|h5|h6]header[A][C]footer[A][C]address[A][C]p[A][B]br[A][]pre[A][B]dialog[A][dd|dt]blockquote[A|cite][C]ol[A|start|reversed][li]ul[A][li]li[A|value][C]dl[A][dd|dt]dt[A][B]dd[A][C]a[A|href|target|ping|rel|media|type][B]em[A][B]strong[A][B]small[A][B]cite[A][B]q[A|cite][B]dfn[A][B]abbr[A][B]code[A][B]var[A][B]samp[A][B]kbd[A][B]sub[A][B]sup[A][B]i[A][B]b[A][B]mark[A][B]progress[A|value|max][B]meter[A|value|min|max|low|high|optimum][B]time[A|datetime][B]ruby[A][B|rt|rp]rt[A][B]rp[A][B]bdo[A][B]span[A][B]ins[A|cite|datetime][B]del[A|cite|datetime][B]figure[A][C|legend|figcaption]figcaption[A][C]img[A|alt|src|height|width|usemap|ismap][]iframe[A|name|src|height|width|sandbox|seamless][]embed[A|src|height|width|type][]object[A|data|type|height|width|usemap|name|form|classid][param]param[A|name|value][]details[A|open][C|legend]command[A|type|label|icon|disabled|checked|radiogroup][]menu[A|type|label][C|li]legend[A][C|B]div[A][C]source[A|src|type|media][]audio[A|src|autobuffer|autoplay|loop|controls][source]video[A|src|autobuffer|autoplay|loop|controls|width|height|poster][source]hr[A][]form[A|accept-charset|action|autocomplete|enctype|method|name|novalidate|target][C]fieldset[A|disabled|form|name][C|legend]label[A|form|for][B]input[A|type|accept|alt|autocomplete|autofocus|checked|disabled|form|formaction|formenctype|formmethod|formnovalidate|formtarget|height|list|max|maxlength|min|multiple|pattern|placeholder|readonly|required|size|src|step|width|files|value|name][]button[A|autofocus|disabled|form|formaction|formenctype|formmethod|formnovalidate|formtarget|name|value|type][B]select[A|autofocus|disabled|form|multiple|name|size][option|optgroup]datalist[A][B|option]optgroup[A|disabled|label][option]option[A|disabled|selected|label|value][]textarea[A|autofocus|disabled|form|maxlength|name|placeholder|readonly|required|rows|cols|wrap][]keygen[A|autofocus|challenge|disabled|form|keytype|name][]output[A|for|form|name][B]canvas[A|width|height][]map[A|name][B|C]area[A|shape|coords|href|alt|target|media|rel|ping|type][]mathml[A][]svg[A][]table[A|border][caption|colgroup|thead|tfoot|tbody|tr]caption[A][C]colgroup[A|span][col]col[A|span][]thead[A][tr]tfoot[A][tr]tbody[A][tr]tr[A][th|td]th[A|headers|rowspan|colspan|scope][B]td[A|headers|rowspan|colspan][C]wbr[A][]")}return i}function c(){var i=a.html4;if(!i){i=a.html4=h({Z:"H|K|N|O|P",Y:"X|form|R|Q",ZG:"E|span|width|align|char|charoff|valign",X:"p|T|div|U|W|isindex|fieldset|table",ZF:"E|align|char|charoff|valign",W:"pre|hr|blockquote|address|center|noframes",ZE:"abbr|axis|headers|scope|rowspan|colspan|align|char|charoff|valign|nowrap|bgcolor|width|height",ZD:"[E][S]",U:"ul|ol|dl|menu|dir",ZC:"p|Y|div|U|W|table|br|span|bdo|object|applet|img|map|K|N|Q",T:"h1|h2|h3|h4|h5|h6",ZB:"X|S|Q",S:"R|P",ZA:"a|G|J|M|O|P",R:"a|H|K|N|O",Q:"noscript|P",P:"ins|del|script",O:"input|select|textarea|label|button",N:"M|L",M:"em|strong|dfn|code|q|samp|kbd|var|cite|abbr|acronym",L:"sub|sup",K:"J|I",J:"tt|i|b|u|s|strike",I:"big|small|font|basefont",H:"G|F",G:"br|span|bdo",F:"object|applet|img|map|iframe",E:"A|B|C",D:"accesskey|tabindex|onfocus|onblur",C:"onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup",B:"lang|xml:lang|dir",A:"id|class|style|title"},"script[id|charset|type|language|src|defer|xml:space][]style[B|id|type|media|title|xml:space][]object[E|declare|classid|codebase|data|type|codetype|archive|standby|width|height|usemap|name|tabindex|align|border|hspace|vspace][#|param|Y]param[id|name|value|valuetype|type][]p[E|align][#|S]a[E|D|charset|type|name|href|hreflang|rel|rev|shape|coords|target][#|Z]br[A|clear][]span[E][#|S]bdo[A|C|B][#|S]applet[A|codebase|archive|code|object|alt|name|width|height|align|hspace|vspace][#|param|Y]h1[E|align][#|S]img[E|src|alt|name|longdesc|width|height|usemap|ismap|align|border|hspace|vspace][]map[B|C|A|name][X|form|Q|area]h2[E|align][#|S]iframe[A|longdesc|name|src|frameborder|marginwidth|marginheight|scrolling|align|width|height][#|Y]h3[E|align][#|S]tt[E][#|S]i[E][#|S]b[E][#|S]u[E][#|S]s[E][#|S]strike[E][#|S]big[E][#|S]small[E][#|S]font[A|B|size|color|face][#|S]basefont[id|size|color|face][]em[E][#|S]strong[E][#|S]dfn[E][#|S]code[E][#|S]q[E|cite][#|S]samp[E][#|S]kbd[E][#|S]var[E][#|S]cite[E][#|S]abbr[E][#|S]acronym[E][#|S]sub[E][#|S]sup[E][#|S]input[E|D|type|name|value|checked|disabled|readonly|size|maxlength|src|alt|usemap|onselect|onchange|accept|align][]select[E|name|size|multiple|disabled|tabindex|onfocus|onblur|onchange][optgroup|option]optgroup[E|disabled|label][option]option[E|selected|disabled|label|value][]textarea[E|D|name|rows|cols|disabled|readonly|onselect|onchange][]label[E|for|accesskey|onfocus|onblur][#|S]button[E|D|name|value|type|disabled][#|p|T|div|U|W|table|G|object|applet|img|map|K|N|Q]h4[E|align][#|S]ins[E|cite|datetime][#|Y]h5[E|align][#|S]del[E|cite|datetime][#|Y]h6[E|align][#|S]div[E|align][#|Y]ul[E|type|compact][li]li[E|type|value][#|Y]ol[E|type|compact|start][li]dl[E|compact][dt|dd]dt[E][#|S]dd[E][#|Y]menu[E|compact][li]dir[E|compact][li]pre[E|width|xml:space][#|ZA]hr[E|align|noshade|size|width][]blockquote[E|cite][#|Y]address[E][#|S|p]center[E][#|Y]noframes[E][#|Y]isindex[A|B|prompt][]fieldset[E][#|legend|Y]legend[E|accesskey|align][#|S]table[E|summary|width|border|frame|rules|cellspacing|cellpadding|align|bgcolor][caption|col|colgroup|thead|tfoot|tbody|tr]caption[E|align][#|S]col[ZG][]colgroup[ZG][col]thead[ZF][tr]tr[ZF|bgcolor][th|td]th[E|ZE][#|Y]form[E|action|method|name|enctype|onsubmit|onreset|accept|accept-charset|target][#|X|R|Q]noscript[E][#|Y]td[E|ZE][#|Y]tfoot[ZF][tr]tbody[ZF][tr]area[E|D|shape|coords|href|nohref|alt|target][]base[id|href|target][]body[E|onload|onunload|background|bgcolor|text|link|vlink|alink][#|Y]")}return i}f.html.Schema=function(A){var u=this,s={},k={},j=[],D,y;var o,q,z,r,v,n,p={};function m(F,E,H){var G=A[F];if(!G){G=a[F];if(!G){G=e(E," ",e(E.toUpperCase()," "));G=f.extend(G,H);a[F]=G}}else{G=e(G,",",e(G.toUpperCase()," "))}return G}A=A||{};y=A.schema=="html5"?b():c();if(A.verify_html===false){A.valid_elements="*[*]"}if(A.valid_styles){D={};g(A.valid_styles,function(F,E){D[E]=f.explode(F)})}o=m("whitespace_elements","pre script noscript style textarea");q=m("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr");z=m("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr");r=m("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls");n=m("non_empty_elements","td th iframe video audio object",z);textBlockElementsMap=m("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside nav figure");v=m("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex samp option datalist select optgroup",textBlockElementsMap);function i(E){return new RegExp("^"+E.replace(/([?+*])/g,".$1")+"$")}function C(L){var K,G,Z,V,aa,F,I,U,X,Q,Y,ac,O,J,W,E,S,H,ab,ad,P,T,N=/^([#+\-])?([^\[\/]+)(?:\/([^\[]+))?(?:\[([^\]]+)\])?$/,R=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,M=/[*?+]/;if(L){L=d(L);if(s["@"]){S=s["@"].attributes;H=s["@"].attributesOrder}for(K=0,G=L.length;K<G;K++){F=N.exec(L[K]);if(F){W=F[1];Q=F[2];E=F[3];X=F[4];O={};J=[];I={attributes:O,attributesOrder:J};if(W==="#"){I.paddEmpty=true}if(W==="-"){I.removeEmpty=true}if(S){for(ad in S){O[ad]=S[ad]}J.push.apply(J,H)}if(X){X=d(X,"|");for(Z=0,V=X.length;Z<V;Z++){F=R.exec(X[Z]);if(F){U={};ac=F[1];Y=F[2].replace(/::/g,":");W=F[3];T=F[4];if(ac==="!"){I.attributesRequired=I.attributesRequired||[];I.attributesRequired.push(Y);U.required=true}if(ac==="-"){delete O[Y];J.splice(f.inArray(J,Y),1);continue}if(W){if(W==="="){I.attributesDefault=I.attributesDefault||[];I.attributesDefault.push({name:Y,value:T});U.defaultValue=T}if(W===":"){I.attributesForced=I.attributesForced||[];I.attributesForced.push({name:Y,value:T});U.forcedValue=T}if(W==="<"){U.validValues=e(T,"?")}}if(M.test(Y)){I.attributePatterns=I.attributePatterns||[];U.pattern=i(Y);I.attributePatterns.push(U)}else{if(!O[Y]){J.push(Y)}O[Y]=U}}}}if(!S&&Q=="@"){S=O;H=J}if(E){I.outputName=Q;s[E]=I}if(M.test(Q)){I.pattern=i(Q);j.push(I)}else{s[Q]=I}}}}}function t(E){s={};j=[];C(E);g(y,function(G,F){k[F]=G.children})}function l(F){var E=/^(~)?(.+)$/;if(F){g(d(F),function(J){var H=E.exec(J),I=H[1]==="~",K=I?"span":"div",G=H[2];k[G]=k[K];p[G]=K;if(!I){v[G.toUpperCase()]={};v[G]={}}if(!s[G]){s[G]=s[K]}g(k,function(L,M){if(L[K]){L[G]=L[K]}})})}}function x(F){var E=/^([+\-]?)(\w+)\[([^\]]+)\]$/;if(F){g(d(F),function(J){var I=E.exec(J),G,H;if(I){H=I[1];if(H){G=k[I[2]]}else{G=k[I[2]]={"#comment":{}}}G=k[I[2]];g(d(I[3],"|"),function(K){if(H==="-"){delete G[K]}else{G[K]={}}})}})}}function B(E){var G=s[E],F;if(G){return G}F=j.length;while(F--){G=j[F];if(G.pattern.test(E)){return G}}}if(!A.valid_elements){g(y,function(F,E){s[E]={attributes:F.attributes,attributesOrder:F.attributesOrder};k[E]=F.children});if(A.schema!="html5"){g(d("strong/b,em/i"),function(E){E=d(E,"/");s[E[1]].outputName=E[0]})}s.img.attributesDefault=[{name:"alt",value:""}];g(d("ol,ul,sub,sup,blockquote,span,font,a,table,tbody,tr,strong,em,b,i"),function(E){if(s[E]){s[E].removeEmpty=true}});g(d("p,h1,h2,h3,h4,h5,h6,th,td,pre,div,address,caption"),function(E){s[E].paddEmpty=true})}else{t(A.valid_elements)}l(A.custom_elements);x(A.valid_children);C(A.extended_valid_elements);x("+ol[ul|ol],+ul[ul|ol]");if(A.invalid_elements){f.each(f.explode(A.invalid_elements),function(E){if(s[E]){delete s[E]}})}if(!B("span")){C("span[!data-mce-type|*]")}u.children=k;u.styles=D;u.getBoolAttrs=function(){return r};u.getBlockElements=function(){return v};u.getTextBlockElements=function(){return textBlockElementsMap};u.getShortEndedElements=function(){return z};u.getSelfClosingElements=function(){return q};u.getNonEmptyElements=function(){return n};u.getWhiteSpaceElements=function(){return o};u.isValidChild=function(E,G){var F=k[E];return !!(F&&F[G])};u.isValid=function(F,E){var H,G,I=B(F);if(I){if(E){if(I.attributes[E]){return true}H=I.attributePatterns;if(H){G=H.length;while(G--){if(H[G].pattern.test(F)){return true}}}}else{return true}}return false};u.getElementRule=B;u.getCustomElements=function(){return p};u.addValidElements=C;u.setValidElements=t;u.addCustomElements=l;u.addValidChildren=x;u.elements=s}})(tinymce);(function(a){a.html.SaxParser=function(c,e){var b=this,d=function(){};c=c||{};b.schema=e=e||new a.html.Schema();if(c.fix_self_closing!==false){c.fix_self_closing=true}a.each("comment cdata text start end pi doctype".split(" "),function(f){if(f){b[f]=c[f]||d}});b.parse=function(E){var n=this,g,G=0,I,B,A=[],N,Q,C,r,z,s,M,H,O,v,m,k,t,R,o,P,F,S,L,f,J,l,D,K,h,x=0,j=a.html.Entities.decode,y,q;function u(T){var V,U;V=A.length;while(V--){if(A[V].name===T){break}}if(V>=0){for(U=A.length-1;U>=V;U--){T=A[U];if(T.valid){n.end(T.name)}}A.length=V}}function p(U,T,Y,X,W){var Z,V;T=T.toLowerCase();Y=T in H?T:j(Y||X||W||"");if(v&&!z&&T.indexOf("data-mce-")!==0){Z=P[T];if(!Z&&F){V=F.length;while(V--){Z=F[V];if(Z.pattern.test(T)){break}}if(V===-1){Z=null}}if(!Z){return}if(Z.validValues&&!(Y in Z.validValues)){return}}N.map[T]=Y;N.push({name:T,value:Y})}l=new RegExp("<(?:(?:!--([\\w\\W]*?)-->)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([^>]+)>)|(?:([A-Za-z0-9\\-\\:\\.]+)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g");D=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g;K={script:/<\/script[^>]*>/gi,style:/<\/style[^>]*>/gi,noscript:/<\/noscript[^>]*>/gi};M=e.getShortEndedElements();J=c.self_closing_elements||e.getSelfClosingElements();H=e.getBoolAttrs();v=c.validate;s=c.remove_internals;y=c.fix_self_closing;q=a.isIE;o=/^:/;while(g=l.exec(E)){if(G<g.index){n.text(j(E.substr(G,g.index-G)))}if(I=g[6]){I=I.toLowerCase();if(q&&o.test(I)){I=I.substr(1)}u(I)}else{if(I=g[7]){I=I.toLowerCase();if(q&&o.test(I)){I=I.substr(1)}O=I in M;if(y&&J[I]&&A.length>0&&A[A.length-1].name===I){u(I)}if(!v||(m=e.getElementRule(I))){k=true;if(v){P=m.attributes;F=m.attributePatterns}if(R=g[8]){z=R.indexOf("data-mce-type")!==-1;if(z&&s){k=false}N=[];N.map={};R.replace(D,p)}else{N=[];N.map={}}if(v&&!z){S=m.attributesRequired;L=m.attributesDefault;f=m.attributesForced;if(f){Q=f.length;while(Q--){t=f[Q];r=t.name;h=t.value;if(h==="{$uid}"){h="mce_"+x++}N.map[r]=h;N.push({name:r,value:h})}}if(L){Q=L.length;while(Q--){t=L[Q];r=t.name;if(!(r in N.map)){h=t.value;if(h==="{$uid}"){h="mce_"+x++}N.map[r]=h;N.push({name:r,value:h})}}}if(S){Q=S.length;while(Q--){if(S[Q] in N.map){break}}if(Q===-1){k=false}}if(N.map["data-mce-bogus"]){k=false}}if(k){n.start(I,N,O)}}else{k=false}if(B=K[I]){B.lastIndex=G=g.index+g[0].length;if(g=B.exec(E)){if(k){C=E.substr(G,g.index-G)}G=g.index+g[0].length}else{C=E.substr(G);G=E.length}if(k&&C.length>0){n.text(C,true)}if(k){n.end(I)}l.lastIndex=G;continue}if(!O){if(!R||R.indexOf("/")!=R.length-1){A.push({name:I,valid:k})}else{if(k){n.end(I)}}}}else{if(I=g[1]){n.comment(I)}else{if(I=g[2]){n.cdata(I)}else{if(I=g[3]){n.doctype(I)}else{if(I=g[4]){n.pi(I,g[5])}}}}}}G=g.index+g[0].length}if(G<E.length){n.text(j(E.substr(G)))}for(Q=A.length-1;Q>=0;Q--){I=A[Q];if(I.valid){n.end(I.name)}}}}})(tinymce);(function(d){var c=/^[ \t\r\n]*$/,e={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};function a(k,l,j){var i,h,f=j?"lastChild":"firstChild",g=j?"prev":"next";if(k[f]){return k[f]}if(k!==l){i=k[g];if(i){return i}for(h=k.parent;h&&h!==l;h=h.parent){i=h[g];if(i){return i}}}}function b(f,g){this.name=f;this.type=g;if(g===1){this.attributes=[];this.attributes.map={}}}d.extend(b.prototype,{replace:function(g){var f=this;if(g.parent){g.remove()}f.insert(g,f);f.remove();return f},attr:function(h,l){var f=this,g,j,k;if(typeof h!=="string"){for(j in h){f.attr(j,h[j])}return f}if(g=f.attributes){if(l!==k){if(l===null){if(h in g.map){delete g.map[h];j=g.length;while(j--){if(g[j].name===h){g=g.splice(j,1);return f}}}return f}if(h in g.map){j=g.length;while(j--){if(g[j].name===h){g[j].value=l;break}}}else{g.push({name:h,value:l})}g.map[h]=l;return f}else{return g.map[h]}}},clone:function(){var g=this,n=new b(g.name,g.type),h,f,m,j,k;if(m=g.attributes){k=[];k.map={};for(h=0,f=m.length;h<f;h++){j=m[h];if(j.name!=="id"){k[k.length]={name:j.name,value:j.value};k.map[j.name]=j.value}}n.attributes=k}n.value=g.value;n.shortEnded=g.shortEnded;return n},wrap:function(g){var f=this;f.parent.insert(g,f);g.append(f);return f},unwrap:function(){var f=this,h,g;for(h=f.firstChild;h;){g=h.next;f.insert(h,f,true);h=g}f.remove()},remove:function(){var f=this,h=f.parent,g=f.next,i=f.prev;if(h){if(h.firstChild===f){h.firstChild=g;if(g){g.prev=null}}else{i.next=g}if(h.lastChild===f){h.lastChild=i;if(i){i.next=null}}else{g.prev=i}f.parent=f.next=f.prev=null}return f},append:function(h){var f=this,g;if(h.parent){h.remove()}g=f.lastChild;if(g){g.next=h;h.prev=g;f.lastChild=h}else{f.lastChild=f.firstChild=h}h.parent=f;return h},insert:function(h,f,i){var g;if(h.parent){h.remove()}g=f.parent||this;if(i){if(f===g.firstChild){g.firstChild=h}else{f.prev.next=h}h.prev=f.prev;h.next=f;f.prev=h}else{if(f===g.lastChild){g.lastChild=h}else{f.next.prev=h}h.next=f.next;h.prev=f;f.next=h}h.parent=g;return h},getAll:function(g){var f=this,h,i=[];for(h=f.firstChild;h;h=a(h,f)){if(h.name===g){i.push(h)}}return i},empty:function(){var g=this,f,h,j;if(g.firstChild){f=[];for(j=g.firstChild;j;j=a(j,g)){f.push(j)}h=f.length;while(h--){j=f[h];j.parent=j.firstChild=j.lastChild=j.next=j.prev=null}}g.firstChild=g.lastChild=null;return g},isEmpty:function(k){var f=this,j=f.firstChild,h,g;if(j){do{if(j.type===1){if(j.attributes.map["data-mce-bogus"]){continue}if(k[j.name]){return false}h=j.attributes.length;while(h--){g=j.attributes[h].name;if(g==="name"||g.indexOf("data-mce-")===0){return false}}}if(j.type===8){return false}if((j.type===3&&!c.test(j.value))){return false}}while(j=a(j,f))}return true},walk:function(f){return a(this,null,f)}});d.extend(b,{create:function(g,f){var i,h;i=new b(g,e[g]||1);if(f){for(h in f){i.attr(h,f[h])}}return i}});d.html.Node=b})(tinymce);(function(b){var a=b.html.Node;b.html.DomParser=function(g,h){var f=this,e={},d=[],i={},c={};g=g||{};g.validate="validate" in g?g.validate:true;g.root_name=g.root_name||"body";f.schema=h=h||new b.html.Schema();function j(n){var p,q,y,x,A,o,r,l,u,v,k,t,m,z,s;t=b.makeMap("tr,td,th,tbody,thead,tfoot,table");k=h.getNonEmptyElements();m=h.getTextBlockElements();for(p=0;p<n.length;p++){q=n[p];if(!q.parent||q.fixed){continue}if(m[q.name]&&q.parent.name=="li"){z=q.next;while(z){if(m[z.name]){z.name="li";z.fixed=true;q.parent.insert(z,q.parent)}else{break}z=z.next}q.unwrap(q);continue}x=[q];for(y=q.parent;y&&!h.isValidChild(y.name,q.name)&&!t[y.name];y=y.parent){x.push(y)}if(y&&x.length>1){x.reverse();A=o=f.filterNode(x[0].clone());for(u=0;u<x.length-1;u++){if(h.isValidChild(o.name,x[u].name)){r=f.filterNode(x[u].clone());o.append(r)}else{r=o}for(l=x[u].firstChild;l&&l!=x[u+1];){s=l.next;r.append(l);l=s}o=r}if(!A.isEmpty(k)){y.insert(A,x[0],true);y.insert(q,A)}else{y.insert(q,x[0],true)}y=x[0];if(y.isEmpty(k)||y.firstChild===y.lastChild&&y.firstChild.name==="br"){y.empty().remove()}}else{if(q.parent){if(q.name==="li"){z=q.prev;if(z&&(z.name==="ul"||z.name==="ul")){z.append(q);continue}z=q.next;if(z&&(z.name==="ul"||z.name==="ul")){z.insert(q,z.firstChild,true);continue}q.wrap(f.filterNode(new a("ul",1)));continue}if(h.isValidChild(q.parent.name,"div")&&h.isValidChild("div",q.name)){q.wrap(f.filterNode(new a("div",1)))}else{if(q.name==="style"||q.name==="script"){q.empty().remove()}else{q.unwrap()}}}}}}f.filterNode=function(m){var l,k,n;if(k in e){n=i[k];if(n){n.push(m)}else{i[k]=[m]}}l=d.length;while(l--){k=d[l].name;if(k in m.attributes.map){n=c[k];if(n){n.push(m)}else{c[k]=[m]}}}return m};f.addNodeFilter=function(k,l){b.each(b.explode(k),function(m){var n=e[m];if(!n){e[m]=n=[]}n.push(l)})};f.addAttributeFilter=function(k,l){b.each(b.explode(k),function(m){var n;for(n=0;n<d.length;n++){if(d[n].name===m){d[n].callbacks.push(l);return}}d.push({name:m,callbacks:[l]})})};f.parse=function(v,m){var n,J,B,A,D,C,x,r,F,N,z,o,E,M=[],L,t,k,y,s,p,u,q;m=m||{};i={};c={};o=b.extend(b.makeMap("script,style,head,html,body,title,meta,param"),h.getBlockElements());u=h.getNonEmptyElements();p=h.children;z=g.validate;q="forced_root_block" in m?m.forced_root_block:g.forced_root_block;s=h.getWhiteSpaceElements();E=/^[ \t\r\n]+/;t=/[ \t\r\n]+$/;k=/[ \t\r\n]+/g;y=/^[ \t\r\n]+$/;function G(){var O=J.firstChild,l,P;while(O){l=O.next;if(O.type==3||(O.type==1&&O.name!=="p"&&!o[O.name]&&!O.attr("data-mce-type"))){if(!P){P=K(q,1);J.insert(P,O);P.append(O)}else{P.append(O)}}else{P=null}O=l}}function K(l,O){var P=new a(l,O),Q;if(l in e){Q=i[l];if(Q){Q.push(P)}else{i[l]=[P]}}return P}function I(P){var Q,l,O;for(Q=P.prev;Q&&Q.type===3;){l=Q.value.replace(t,"");if(l.length>0){Q.value=l;Q=Q.prev}else{O=Q.prev;Q.remove();Q=O}}}function H(O){var P,l={};for(P in O){if(P!=="li"&&P!="p"){l[P]=O[P]}}return l}n=new b.html.SaxParser({validate:z,self_closing_elements:H(h.getSelfClosingElements()),cdata:function(l){B.append(K("#cdata",4)).value=l},text:function(P,l){var O;if(!L){P=P.replace(k," ");if(B.lastChild&&o[B.lastChild.name]){P=P.replace(E,"")}}if(P.length!==0){O=K("#text",3);O.raw=!!l;B.append(O).value=P}},comment:function(l){B.append(K("#comment",8)).value=l},pi:function(l,O){B.append(K(l,7)).value=O;I(B)},doctype:function(O){var l;l=B.append(K("#doctype",10));l.value=O;I(B)},start:function(l,W,P){var U,R,Q,O,S,X,V,T;Q=z?h.getElementRule(l):{};if(Q){U=K(Q.outputName||l,1);U.attributes=W;U.shortEnded=P;B.append(U);T=p[B.name];if(T&&p[U.name]&&!T[U.name]){M.push(U)}R=d.length;while(R--){S=d[R].name;if(S in W.map){F=c[S];if(F){F.push(U)}else{c[S]=[U]}}}if(o[l]){I(U)}if(!P){B=U}if(!L&&s[l]){L=true}}},end:function(l){var S,P,R,O,Q;P=z?h.getElementRule(l):{};if(P){if(o[l]){if(!L){S=B.firstChild;if(S&&S.type===3){R=S.value.replace(E,"");if(R.length>0){S.value=R;S=S.next}else{O=S.next;S.remove();S=O}while(S&&S.type===3){R=S.value;O=S.next;if(R.length===0||y.test(R)){S.remove();S=O}S=O}}S=B.lastChild;if(S&&S.type===3){R=S.value.replace(t,"");if(R.length>0){S.value=R;S=S.prev}else{O=S.prev;S.remove();S=O}while(S&&S.type===3){R=S.value;O=S.prev;if(R.length===0||y.test(R)){S.remove();S=O}S=O}}}}if(L&&s[l]){L=false}if(P.removeEmpty||P.paddEmpty){if(B.isEmpty(u)){if(P.paddEmpty){B.empty().append(new a("#text","3")).value="\u00a0"}else{if(!B.attributes.map.name&&!B.attributes.map.id){Q=B.parent;B.empty().remove();B=Q;return}}}}B=B.parent}}},h);J=B=new a(m.context||g.root_name,11);n.parse(v);if(z&&M.length){if(!m.context){j(M)}else{m.invalid=true}}if(q&&J.name=="body"){G()}if(!m.invalid){for(N in i){F=e[N];A=i[N];x=A.length;while(x--){if(!A[x].parent){A.splice(x,1)}}for(D=0,C=F.length;D<C;D++){F[D](A,N,m)}}for(D=0,C=d.length;D<C;D++){F=d[D];if(F.name in c){A=c[F.name];x=A.length;while(x--){if(!A[x].parent){A.splice(x,1)}}for(x=0,r=F.callbacks.length;x<r;x++){F.callbacks[x](A,F.name,m)}}}}return J};if(g.remove_trailing_brs){f.addNodeFilter("br",function(n,m){var r,q=n.length,o,v=b.extend({},h.getBlockElements()),k=h.getNonEmptyElements(),t,s,p,u;v.body=1;for(r=0;r<q;r++){o=n[r];t=o.parent;if(v[o.parent.name]&&o===t.lastChild){p=o.prev;while(p){u=p.name;if(u!=="span"||p.attr("data-mce-type")!=="bookmark"){if(u!=="br"){break}if(u==="br"){o=null;break}}p=p.prev}if(o){o.remove();if(t.isEmpty(k)){elementRule=h.getElementRule(t.name);if(elementRule){if(elementRule.removeEmpty){t.remove()}else{if(elementRule.paddEmpty){t.empty().append(new b.html.Node("#text",3)).value="\u00a0"}}}}}}else{s=o;while(t.firstChild===s&&t.lastChild===s){s=t;if(v[t.name]){break}t=t.parent}if(s===t){textNode=new b.html.Node("#text",3);textNode.value="\u00a0";o.replace(textNode)}}}})}if(!g.allow_html_in_named_anchor){f.addAttributeFilter("id,name",function(k,l){var n=k.length,p,m,o,q;while(n--){q=k[n];if(q.name==="a"&&q.firstChild&&!q.attr("href")){o=q.parent;p=q.lastChild;do{m=p.prev;o.insert(p,q);p=m}while(p)}}})}}})(tinymce);tinymce.html.Writer=function(e){var c=[],a,b,d,f,g;e=e||{};a=e.indent;b=tinymce.makeMap(e.indent_before||"");d=tinymce.makeMap(e.indent_after||"");f=tinymce.html.Entities.getEncodeFunc(e.entity_encoding||"raw",e.entities);g=e.element_format=="html";return{start:function(m,k,p){var n,j,h,o;if(a&&b[m]&&c.length>0){o=c[c.length-1];if(o.length>0&&o!=="\n"){c.push("\n")}}c.push("<",m);if(k){for(n=0,j=k.length;n<j;n++){h=k[n];c.push(" ",h.name,'="',f(h.value,true),'"')}}if(!p||g){c[c.length]=">"}else{c[c.length]=" />"}if(p&&a&&d[m]&&c.length>0){o=c[c.length-1];if(o.length>0&&o!=="\n"){c.push("\n")}}},end:function(h){var i;c.push("</",h,">");if(a&&d[h]&&c.length>0){i=c[c.length-1];if(i.length>0&&i!=="\n"){c.push("\n")}}},text:function(i,h){if(i.length>0){c[c.length]=h?i:f(i)}},cdata:function(h){c.push("<![CDATA[",h,"]]>")},comment:function(h){c.push("<!--",h,"-->")},pi:function(h,i){if(i){c.push("<?",h," ",i,"?>")}else{c.push("<?",h,"?>")}if(a){c.push("\n")}},doctype:function(h){c.push("<!DOCTYPE",h,">",a?"\n":"")},reset:function(){c.length=0},getContent:function(){return c.join("").replace(/\n$/,"")}}};(function(a){a.html.Serializer=function(c,d){var b=this,e=new a.html.Writer(c);c=c||{};c.validate="validate" in c?c.validate:true;b.schema=d=d||new a.html.Schema();b.writer=e;b.serialize=function(h){var g,i;i=c.validate;g={3:function(k,j){e.text(k.value,k.raw)},8:function(j){e.comment(j.value)},7:function(j){e.pi(j.name,j.value)},10:function(j){e.doctype(j.value)},4:function(j){e.cdata(j.value)},11:function(j){if((j=j.firstChild)){do{f(j)}while(j=j.next)}}};e.reset();function f(k){var t=g[k.type],j,o,s,r,p,u,n,m,q;if(!t){j=k.name;o=k.shortEnded;s=k.attributes;if(i&&s&&s.length>1){u=[];u.map={};q=d.getElementRule(k.name);for(n=0,m=q.attributesOrder.length;n<m;n++){r=q.attributesOrder[n];if(r in s.map){p=s.map[r];u.map[r]=p;u.push({name:r,value:p})}}for(n=0,m=s.length;n<m;n++){r=s[n].name;if(!(r in u.map)){p=s.map[r];u.map[r]=p;u.push({name:r,value:p})}}s=u}e.start(k.name,s,o);if(!o){if((k=k.firstChild)){do{f(k)}while(k=k.next)}e.end(j)}}else{t(k)}}if(h.type==1&&!c.inner){f(h)}else{g[11](h)}return e.getContent()}}})(tinymce);tinymce.dom={};(function(b,h){var g=!!document.addEventListener;function c(k,j,l,i){if(k.addEventListener){k.addEventListener(j,l,i||false)}else{if(k.attachEvent){k.attachEvent("on"+j,l)}}}function e(k,j,l,i){if(k.removeEventListener){k.removeEventListener(j,l,i||false)}else{if(k.detachEvent){k.detachEvent("on"+j,l)}}}function a(n,l){var i,k=l||{};function j(){return false}function m(){return true}for(i in n){if(i!=="layerX"&&i!=="layerY"){k[i]=n[i]}}if(!k.target){k.target=k.srcElement||document}k.preventDefault=function(){k.isDefaultPrevented=m;if(n){if(n.preventDefault){n.preventDefault()}else{n.returnValue=false}}};k.stopPropagation=function(){k.isPropagationStopped=m;if(n){if(n.stopPropagation){n.stopPropagation()}else{n.cancelBubble=true}}};k.stopImmediatePropagation=function(){k.isImmediatePropagationStopped=m;k.stopPropagation()};if(!k.isDefaultPrevented){k.isDefaultPrevented=j;k.isPropagationStopped=j;k.isImmediatePropagationStopped=j}return k}function d(m,n,l){var k=m.document,j={type:"ready"};function i(){if(!l.domLoaded){l.domLoaded=true;n(j)}}if(k.readyState=="complete"){i();return}if(g){c(m,"DOMContentLoaded",i)}else{c(k,"readystatechange",function(){if(k.readyState==="complete"){e(k,"readystatechange",arguments.callee);i()}});if(k.documentElement.doScroll&&m===m.top){(function(){try{k.documentElement.doScroll("left")}catch(o){setTimeout(arguments.callee,0);return}i()})()}}c(m,"load",i)}function f(k){var q=this,p={},i,o,n,m,l;m="onmouseenter" in document.documentElement;n="onfocusin" in document.documentElement;l={mouseenter:"mouseover",mouseleave:"mouseout"};i=1;q.domLoaded=false;q.events=p;function j(t,x){var s,u,r,v;s=p[x][t.type];if(s){for(u=0,r=s.length;u<r;u++){v=s[u];if(v&&v.func.call(v.scope,t)===false){t.preventDefault()}if(t.isImmediatePropagationStopped()){return}}}}q.bind=function(x,A,D,E){var s,t,u,r,B,z,C,v=window;function y(F){j(a(F||v.event),s)}if(!x||x.nodeType===3||x.nodeType===8){return}if(!x[h]){s=i++;x[h]=s;p[s]={}}else{s=x[h];if(!p[s]){p[s]={}}}E=E||x;A=A.split(" ");u=A.length;while(u--){r=A[u];z=y;B=C=false;if(r==="DOMContentLoaded"){r="ready"}if((q.domLoaded||x.readyState=="complete")&&r==="ready"){q.domLoaded=true;D.call(E,a({type:r}));continue}if(!m){B=l[r];if(B){z=function(F){var H,G;H=F.currentTarget;G=F.relatedTarget;if(G&&H.contains){G=H.contains(G)}else{while(G&&G!==H){G=G.parentNode}}if(!G){F=a(F||v.event);F.type=F.type==="mouseout"?"mouseleave":"mouseenter";F.target=H;j(F,s)}}}}if(!n&&(r==="focusin"||r==="focusout")){C=true;B=r==="focusin"?"focus":"blur";z=function(F){F=a(F||v.event);F.type=F.type==="focus"?"focusin":"focusout";j(F,s)}}t=p[s][r];if(!t){p[s][r]=t=[{func:D,scope:E}];t.fakeName=B;t.capture=C;t.nativeHandler=z;if(!g){t.proxyHandler=k(s)}if(r==="ready"){d(x,z,q)}else{c(x,B||r,g?z:t.proxyHandler,C)}}else{t.push({func:D,scope:E})}}x=t=0;return D};q.unbind=function(x,z,A){var s,u,v,B,r,t;if(!x||x.nodeType===3||x.nodeType===8){return q}s=x[h];if(s){t=p[s];if(z){z=z.split(" ");v=z.length;while(v--){r=z[v];u=t[r];if(u){if(A){B=u.length;while(B--){if(u[B].func===A){u.splice(B,1)}}}if(!A||u.length===0){delete t[r];e(x,u.fakeName||r,g?u.nativeHandler:u.proxyHandler,u.capture)}}}}else{for(r in t){u=t[r];e(x,u.fakeName||r,g?u.nativeHandler:u.proxyHandler,u.capture)}t={}}for(r in t){return q}delete p[s];try{delete x[h]}catch(y){x[h]=null}}return q};q.fire=function(u,s,r){var v,t;if(!u||u.nodeType===3||u.nodeType===8){return q}t=a(null,r);t.type=s;do{v=u[h];if(v){j(t,v)}u=u.parentNode||u.ownerDocument||u.defaultView||u.parentWindow}while(u&&!t.isPropagationStopped());return q};q.clean=function(u){var s,r,t=q.unbind;if(!u||u.nodeType===3||u.nodeType===8){return q}if(u[h]){t(u)}if(!u.getElementsByTagName){u=u.document}if(u&&u.getElementsByTagName){t(u);r=u.getElementsByTagName("*");s=r.length;while(s--){u=r[s];if(u[h]){t(u)}}}return q};q.callNativeHandler=function(s,r){if(p){p[s][r.type].nativeHandler(r)}};q.destory=function(){p={}};q.add=function(v,s,u,t){if(typeof(v)==="string"){v=document.getElementById(v)}if(v&&v instanceof Array){var r=v.length;while(r--){q.add(v[r],s,u,t)}return}if(s==="init"){s="ready"}return q.bind(v,s instanceof Array?s.join(" "):s,u,t)};q.remove=function(v,s,u,t){if(!v){return q}if(typeof(v)==="string"){v=document.getElementById(v)}if(v instanceof Array){var r=v.length;while(r--){q.remove(v[r],s,u,t)}return q}return q.unbind(v,s instanceof Array?s.join(" "):s,u)};q.clear=function(r){if(typeof(r)==="string"){r=document.getElementById(r)}return q.clean(r)};q.cancel=function(r){if(r){q.prevent(r);q.stop(r)}return false};q.prevent=function(r){if(!r.preventDefault){r=a(r)}r.preventDefault();return false};q.stop=function(r){if(!r.stopPropagation){r=a(r)}r.stopPropagation();return false}}b.EventUtils=f;b.Event=new f(function(i){return function(j){tinymce.dom.Event.callNativeHandler(i,j)}});b.Event.bind(window,"ready",function(){});b=0})(tinymce.dom,"data-mce-expando");tinymce.dom.TreeWalker=function(a,c){var b=a;function d(i,f,e,j){var h,g;if(i){if(!j&&i[f]){return i[f]}if(i!=c){h=i[e];if(h){return h}for(g=i.parentNode;g&&g!=c;g=g.parentNode){h=g[e];if(h){return h}}}}}this.current=function(){return b};this.next=function(e){return(b=d(b,"firstChild","nextSibling",e))};this.prev=function(e){return(b=d(b,"lastChild","previousSibling",e))}};(function(e){var g=e.each,d=e.is,f=e.isWebKit,b=e.isIE,h=e.html.Entities,c=/^([a-z0-9],?)+$/i,a=/^[ \t\r\n]*$/;e.create("tinymce.dom.DOMUtils",{doc:null,root:null,files:null,pixelStyles:/^(top|left|bottom|right|width|height|borderWidth)$/,props:{"for":"htmlFor","class":"className",className:"className",checked:"checked",disabled:"disabled",maxlength:"maxLength",readonly:"readOnly",selected:"selected",value:"value",id:"id",name:"name",type:"type"},DOMUtils:function(o,l){var k=this,i,j,n;k.doc=o;k.win=window;k.files={};k.cssFlicker=false;k.counter=0;k.stdMode=!e.isIE||o.documentMode>=8;k.boxModel=!e.isIE||o.compatMode=="CSS1Compat"||k.stdMode;k.hasOuterHTML="outerHTML" in o.createElement("a");k.settings=l=e.extend({keep_values:false,hex_colors:1},l);k.schema=l.schema;k.styles=new e.html.Styles({url_converter:l.url_converter,url_converter_scope:l.url_converter_scope},l.schema);if(e.isIE6){try{o.execCommand("BackgroundImageCache",false,true)}catch(m){k.cssFlicker=true}}k.fixDoc(o);k.events=l.ownEvents?new e.dom.EventUtils(l.proxy):e.dom.Event;e.addUnload(k.destroy,k);n=l.schema?l.schema.getBlockElements():{};k.isBlock=function(q){var p=q.nodeType;if(p){return !!(p===1&&n[q.nodeName])}return !!n[q]}},fixDoc:function(k){var j=this.settings,i;if(b&&j.schema){("abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video").replace(/\w+/g,function(l){k.createElement(l)});for(i in j.schema.getCustomElements()){k.createElement(i)}}},clone:function(k,i){var j=this,m,l;if(!b||k.nodeType!==1||i){return k.cloneNode(i)}l=j.doc;if(!i){m=l.createElement(k.nodeName);g(j.getAttribs(k),function(n){j.setAttrib(m,n.nodeName,j.getAttrib(k,n.nodeName))});return m}return m.firstChild},getRoot:function(){var i=this,j=i.settings;return(j&&i.get(j.root_element))||i.doc.body},getViewPort:function(j){var k,i;j=!j?this.win:j;k=j.document;i=this.boxModel?k.documentElement:k.body;return{x:j.pageXOffset||i.scrollLeft,y:j.pageYOffset||i.scrollTop,w:j.innerWidth||i.clientWidth,h:j.innerHeight||i.clientHeight}},getRect:function(l){var k,i=this,j;l=i.get(l);k=i.getPos(l);j=i.getSize(l);return{x:k.x,y:k.y,w:j.w,h:j.h}},getSize:function(l){var j=this,i,k;l=j.get(l);i=j.getStyle(l,"width");k=j.getStyle(l,"height");if(i.indexOf("px")===-1){i=0}if(k.indexOf("px")===-1){k=0}return{w:parseInt(i,10)||l.offsetWidth||l.clientWidth,h:parseInt(k,10)||l.offsetHeight||l.clientHeight}},getParent:function(k,j,i){return this.getParents(k,j,i,false)},getParents:function(s,m,k,q){var j=this,i,l=j.settings,p=[];s=j.get(s);q=q===undefined;if(l.strict_root){k=k||j.getRoot()}if(d(m,"string")){i=m;if(m==="*"){m=function(o){return o.nodeType==1}}else{m=function(o){return j.is(o,i)}}}while(s){if(s==k||!s.nodeType||s.nodeType===9){break}if(!m||m(s)){if(q){p.push(s)}else{return s}}s=s.parentNode}return q?p:null},get:function(i){var j;if(i&&this.doc&&typeof(i)=="string"){j=i;i=this.doc.getElementById(i);if(i&&i.id!==j){return this.doc.getElementsByName(j)[1]}}return i},getNext:function(j,i){return this._findSib(j,i,"nextSibling")},getPrev:function(j,i){return this._findSib(j,i,"previousSibling")},select:function(k,j){var i=this;return e.dom.Sizzle(k,i.get(j)||i.get(i.settings.root_element)||i.doc,[])},is:function(l,j){var k;if(l.length===undefined){if(j==="*"){return l.nodeType==1}if(c.test(j)){j=j.toLowerCase().split(/,/);l=l.nodeName.toLowerCase();for(k=j.length-1;k>=0;k--){if(j[k]==l){return true}}return false}}return e.dom.Sizzle.matches(j,l.nodeType?[l]:l).length>0},add:function(l,o,i,k,m){var j=this;return this.run(l,function(r){var q,n;q=d(o,"string")?j.doc.createElement(o):o;j.setAttribs(q,i);if(k){if(k.nodeType){q.appendChild(k)}else{j.setHTML(q,k)}}return !m?r.appendChild(q):q})},create:function(k,i,j){return this.add(this.doc.createElement(k),k,i,j,1)},createHTML:function(q,i,m){var p="",l=this,j;p+="<"+q;for(j in i){if(i.hasOwnProperty(j)){p+=" "+j+'="'+l.encode(i[j])+'"'}}if(typeof(m)!="undefined"){return p+">"+m+"</"+q+">"}return p+" />"},remove:function(i,j){return this.run(i,function(l){var m,k=l.parentNode;if(!k){return null}if(j){while(m=l.firstChild){if(!e.isIE||m.nodeType!==3||m.nodeValue){k.insertBefore(m,l)}else{l.removeChild(m)}}}return k.removeChild(l)})},setStyle:function(l,i,j){var k=this;return k.run(l,function(o){var n,m;n=o.style;i=i.replace(/-(\D)/g,function(q,p){return p.toUpperCase()});if(k.pixelStyles.test(i)&&(e.is(j,"number")||/^[\-0-9\.]+$/.test(j))){j+="px"}switch(i){case"opacity":if(b){n.filter=j===""?"":"alpha(opacity="+(j*100)+")";if(!l.currentStyle||!l.currentStyle.hasLayout){n.display="inline-block"}}n[i]=n["-moz-opacity"]=n["-khtml-opacity"]=j||"";break;case"float":b?n.styleFloat=j:n.cssFloat=j;break;default:n[i]=j||""}if(k.settings.update_styles){k.setAttrib(o,"data-mce-style")}})},getStyle:function(l,i,k){l=this.get(l);if(!l){return}if(this.doc.defaultView&&k){i=i.replace(/[A-Z]/g,function(m){return"-"+m});try{return this.doc.defaultView.getComputedStyle(l,null).getPropertyValue(i)}catch(j){return null}}i=i.replace(/-(\D)/g,function(n,m){return m.toUpperCase()});if(i=="float"){i=b?"styleFloat":"cssFloat"}if(l.currentStyle&&k){return l.currentStyle[i]}return l.style?l.style[i]:undefined},setStyles:function(l,m){var j=this,k=j.settings,i;i=k.update_styles;k.update_styles=0;g(m,function(o,p){j.setStyle(l,p,o)});k.update_styles=i;if(k.update_styles){j.setAttrib(l,k.cssText)}},removeAllAttribs:function(i){return this.run(i,function(l){var k,j=l.attributes;for(k=j.length-1;k>=0;k--){l.removeAttributeNode(j.item(k))}})},setAttrib:function(k,l,i){var j=this;if(!k||!l){return}if(j.settings.strict){l=l.toLowerCase()}return this.run(k,function(p){var o=j.settings;var m=p.getAttribute(l);if(i!==null){switch(l){case"style":if(!d(i,"string")){g(i,function(q,r){j.setStyle(p,r,q)});return}if(o.keep_values){if(i&&!j._isRes(i)){p.setAttribute("data-mce-style",i,2)}else{p.removeAttribute("data-mce-style",2)}}p.style.cssText=i;break;case"class":p.className=i||"";break;case"src":case"href":if(o.keep_values){if(o.url_converter){i=o.url_converter.call(o.url_converter_scope||j,i,l,p)}j.setAttrib(p,"data-mce-"+l,i,2)}break;case"shape":p.setAttribute("data-mce-style",i);break}}if(d(i)&&i!==null&&i.length!==0){p.setAttribute(l,""+i,2)}else{p.removeAttribute(l,2)}if(tinyMCE.activeEditor&&m!=i){var n=tinyMCE.activeEditor;n.onSetAttrib.dispatch(n,p,l,i)}})},setAttribs:function(j,k){var i=this;return this.run(j,function(l){g(k,function(m,o){i.setAttrib(l,o,m)})})},getAttrib:function(m,o,k){var i,j=this,l;m=j.get(m);if(!m||m.nodeType!==1){return k===l?false:k}if(!d(k)){k=""}if(/^(src|href|style|coords|shape)$/.test(o)){i=m.getAttribute("data-mce-"+o);if(i){return i}}if(b&&j.props[o]){i=m[j.props[o]];i=i&&i.nodeValue?i.nodeValue:i}if(!i){i=m.getAttribute(o,2)}if(/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(o)){if(m[j.props[o]]===true&&i===""){return o}return i?o:""}if(m.nodeName==="FORM"&&m.getAttributeNode(o)){return m.getAttributeNode(o).nodeValue}if(o==="style"){i=i||m.style.cssText;if(i){i=j.serializeStyle(j.parseStyle(i),m.nodeName);if(j.settings.keep_values&&!j._isRes(i)){m.setAttribute("data-mce-style",i)}}}if(f&&o==="class"&&i){i=i.replace(/(apple|webkit)\-[a-z\-]+/gi,"")}if(b){switch(o){case"rowspan":case"colspan":if(i===1){i=""}break;case"size":if(i==="+0"||i===20||i===0){i=""}break;case"width":case"height":case"vspace":case"checked":case"disabled":case"readonly":if(i===0){i=""}break;case"hspace":if(i===-1){i=""}break;case"maxlength":case"tabindex":if(i===32768||i===2147483647||i==="32768"){i=""}break;case"multiple":case"compact":case"noshade":case"nowrap":if(i===65535){return o}return k;case"shape":i=i.toLowerCase();break;default:if(o.indexOf("on")===0&&i){i=e._replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1",""+i)}}}return(i!==l&&i!==null&&i!=="")?""+i:k},getPos:function(q,l){var j=this,i=0,p=0,m,o=j.doc,k;q=j.get(q);l=l||o.body;if(q){if(q.getBoundingClientRect){q=q.getBoundingClientRect();m=j.boxModel?o.documentElement:o.body;i=q.left+(o.documentElement.scrollLeft||o.body.scrollLeft)-m.clientTop;p=q.top+(o.documentElement.scrollTop||o.body.scrollTop)-m.clientLeft;return{x:i,y:p}}k=q;while(k&&k!=l&&k.nodeType){i+=k.offsetLeft||0;p+=k.offsetTop||0;k=k.offsetParent}k=q.parentNode;while(k&&k!=l&&k.nodeType){i-=k.scrollLeft||0;p-=k.scrollTop||0;k=k.parentNode}}return{x:i,y:p}},parseStyle:function(i){return this.styles.parse(i)},serializeStyle:function(j,i){return this.styles.serialize(j,i)},addStyle:function(j){var k=this.doc,i;styleElm=k.getElementById("mceDefaultStyles");if(!styleElm){styleElm=k.createElement("style"),styleElm.id="mceDefaultStyles";styleElm.type="text/css";i=k.getElementsByTagName("head")[0];if(i.firstChild){i.insertBefore(styleElm,i.firstChild)}else{i.appendChild(styleElm)}}if(styleElm.styleSheet){styleElm.styleSheet.cssText+=j}else{styleElm.appendChild(k.createTextNode(j))}},loadCSS:function(i){var k=this,l=k.doc,j;if(!i){i=""}j=l.getElementsByTagName("head")[0];g(i.split(","),function(m){var n;if(k.files[m]){return}k.files[m]=true;n=k.create("link",{rel:"stylesheet",href:e._addVer(m)});if(b&&l.documentMode&&l.recalc){n.onload=function(){if(l.recalc){l.recalc()}n.onload=null}}j.appendChild(n)})},addClass:function(i,j){return this.run(i,function(k){var l;if(!j){return 0}if(this.hasClass(k,j)){return k.className}l=this.removeClass(k,j);return k.className=(l!=""?(l+" "):"")+j})},removeClass:function(k,l){var i=this,j;return i.run(k,function(n){var m;if(i.hasClass(n,l)){if(!j){j=new RegExp("(^|\\s+)"+l+"(\\s+|$)","g")}m=n.className.replace(j," ");m=e.trim(m!=" "?m:"");n.className=m;if(!m){n.removeAttribute("class");n.removeAttribute("className")}return m}return n.className})},hasClass:function(j,i){j=this.get(j);if(!j||!i){return false}return(" "+j.className+" ").indexOf(" "+i+" ")!==-1},show:function(i){return this.setStyle(i,"display","block")},hide:function(i){return this.setStyle(i,"display","none")},isHidden:function(i){i=this.get(i);return !i||i.style.display=="none"||this.getStyle(i,"display")=="none"},uniqueId:function(i){return(!i?"mce_":i)+(this.counter++)},setHTML:function(k,j){var i=this;return i.run(k,function(m){if(b){while(m.firstChild){m.removeChild(m.firstChild)}try{m.innerHTML="<br />"+j;m.removeChild(m.firstChild)}catch(l){var n=i.create("div");n.innerHTML="<br />"+j;g(e.grep(n.childNodes),function(p,o){if(o&&m.canHaveHTML){m.appendChild(p)}})}}else{m.innerHTML=j}return j})},getOuterHTML:function(k){var j,i=this;k=i.get(k);if(!k){return null}if(k.nodeType===1&&i.hasOuterHTML){return k.outerHTML}j=(k.ownerDocument||i.doc).createElement("body");j.appendChild(k.cloneNode(true));return j.innerHTML},setOuterHTML:function(l,j,m){var i=this;function k(p,o,r){var s,q;q=r.createElement("body");q.innerHTML=o;s=q.lastChild;while(s){i.insertAfter(s.cloneNode(true),p);s=s.previousSibling}i.remove(p)}return this.run(l,function(o){o=i.get(o);if(o.nodeType==1){m=m||o.ownerDocument||i.doc;if(b){try{if(b&&o.nodeType==1){o.outerHTML=j}else{k(o,j,m)}}catch(n){k(o,j,m)}}else{k(o,j,m)}}})},decode:h.decode,encode:h.encodeAllRaw,insertAfter:function(i,j){j=this.get(j);return this.run(i,function(l){var k,m;k=j.parentNode;m=j.nextSibling;if(m){k.insertBefore(l,m)}else{k.appendChild(l)}return l})},replace:function(m,l,i){var j=this;if(d(l,"array")){m=m.cloneNode(true)}return j.run(l,function(k){if(i){g(e.grep(k.childNodes),function(n){m.appendChild(n)})}return k.parentNode.replaceChild(m,k)})},rename:function(l,i){var k=this,j;if(l.nodeName!=i.toUpperCase()){j=k.create(i);g(k.getAttribs(l),function(m){k.setAttrib(j,m.nodeName,k.getAttrib(l,m.nodeName))});k.replace(j,l,1)}return j||l},findCommonAncestor:function(k,i){var l=k,j;while(l){j=i;while(j&&l!=j){j=j.parentNode}if(l==j){break}l=l.parentNode}if(!l&&k.ownerDocument){return k.ownerDocument.documentElement}return l},toHex:function(i){var k=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(i);function j(l){l=parseInt(l,10).toString(16);return l.length>1?l:"0"+l}if(k){i="#"+j(k[1])+j(k[2])+j(k[3]);return i}return i},getClasses:function(){var n=this,j=[],m,o={},p=n.settings.class_filter,l;if(n.classes){return n.classes}function q(i){g(i.imports,function(s){q(s)});g(i.cssRules||i.rules,function(s){switch(s.type||1){case 1:if(s.selectorText){g(s.selectorText.split(","),function(r){r=r.replace(/^\s*|\s*$|^\s\./g,"");if(/\.mce/.test(r)||!/\.[\w\-]+$/.test(r)){return}l=r;r=e._replace(/.*\.([a-z0-9_\-]+).*/i,"$1",r);if(p&&!(r=p(r,l))){return}if(!o[r]){j.push({"class":r});o[r]=1}})}break;case 3:q(s.styleSheet);break}})}try{g(n.doc.styleSheets,q)}catch(k){}if(j.length>0){n.classes=j}return j},run:function(l,k,j){var i=this,m;if(i.doc&&typeof(l)==="string"){l=i.get(l)}if(!l){return false}j=j||this;if(!l.nodeType&&(l.length||l.length===0)){m=[];g(l,function(o,n){if(o){if(typeof(o)=="string"){o=i.doc.getElementById(o)}m.push(k.call(j,o,n))}});return m}return k.call(j,l)},getAttribs:function(j){var i;j=this.get(j);if(!j){return[]}if(b){i=[];if(j.nodeName=="OBJECT"){return j.attributes}if(j.nodeName==="OPTION"&&this.getAttrib(j,"selected")){i.push({specified:1,nodeName:"selected"})}j.cloneNode(false).outerHTML.replace(/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi,"").replace(/[\w:\-]+/gi,function(k){i.push({specified:1,nodeName:k})});return i}return j.attributes},isEmpty:function(m,k){var r=this,o,n,q,j,l,p=0;m=m.firstChild;if(m){j=new e.dom.TreeWalker(m,m.parentNode);k=k||r.schema?r.schema.getNonEmptyElements():null;do{q=m.nodeType;if(q===1){if(m.getAttribute("data-mce-bogus")){continue}l=m.nodeName.toLowerCase();if(k&&k[l]){if(l==="br"){p++;continue}return false}n=r.getAttribs(m);o=m.attributes.length;while(o--){l=m.attributes[o].nodeName;if(l==="name"||l==="data-mce-bookmark"){return false}}}if(q==8){return false}if((q===3&&!a.test(m.nodeValue))){return false}}while(m=j.next())}return p<=1},destroy:function(j){var i=this;i.win=i.doc=i.root=i.events=i.frag=null;if(!j){e.removeUnload(i.destroy)}},createRng:function(){var i=this.doc;return i.createRange?i.createRange():new e.dom.Range(this)},nodeIndex:function(m,n){var i=0,k,l,j;if(m){for(k=m.nodeType,m=m.previousSibling,l=m;m;m=m.previousSibling){j=m.nodeType;if(n&&j==3){if(j==k||!m.nodeValue.length){continue}}i++;k=j}}return i},split:function(m,l,p){var q=this,i=q.createRng(),n,k,o;function j(v){var t,s=v.childNodes,u=v.nodeType;function x(A){var z=A.previousSibling&&A.previousSibling.nodeName=="SPAN";var y=A.nextSibling&&A.nextSibling.nodeName=="SPAN";return z&&y}if(u==1&&v.getAttribute("data-mce-type")=="bookmark"){return}for(t=s.length-1;t>=0;t--){j(s[t])}if(u!=9){if(u==3&&v.nodeValue.length>0){var r=e.trim(v.nodeValue).length;if(!q.isBlock(v.parentNode)||r>0||r===0&&x(v)){return}}else{if(u==1){s=v.childNodes;if(s.length==1&&s[0]&&s[0].nodeType==1&&s[0].getAttribute("data-mce-type")=="bookmark"){v.parentNode.insertBefore(s[0],v)}if(s.length||/^(br|hr|input|img)$/i.test(v.nodeName)){return}}}q.remove(v)}return v}if(m&&l){i.setStart(m.parentNode,q.nodeIndex(m));i.setEnd(l.parentNode,q.nodeIndex(l));n=i.extractContents();i=q.createRng();i.setStart(l.parentNode,q.nodeIndex(l)+1);i.setEnd(m.parentNode,q.nodeIndex(m)+1);k=i.extractContents();o=m.parentNode;o.insertBefore(j(n),m);if(p){o.replaceChild(p,l)}else{o.insertBefore(l,m)}o.insertBefore(j(k),m);q.remove(m);return p||l}},bind:function(l,i,k,j){return this.events.add(l,i,k,j||this)},unbind:function(k,i,j){return this.events.remove(k,i,j)},fire:function(k,j,i){return this.events.fire(k,j,i)},getContentEditable:function(j){var i;if(j.nodeType!=1){return null}i=j.getAttribute("data-mce-contenteditable");if(i&&i!=="inherit"){return i}return j.contentEditable!=="inherit"?j.contentEditable:null},_findSib:function(l,i,j){var k=this,m=i;if(l){if(d(m,"string")){m=function(n){return k.is(n,i)}}for(l=l[j];l;l=l[j]){if(m(l)){return l}}}return null},_isRes:function(i){return/^(top|left|bottom|right|width|height)/i.test(i)||/;\s*(top|left|bottom|right|width|height)/i.test(i)}});e.DOM=new e.dom.DOMUtils(document,{process_html:0})})(tinymce);(function(a){function b(c){var O=this,e=c.doc,U=0,F=1,j=2,E=true,S=false,W="startOffset",h="startContainer",Q="endContainer",A="endOffset",k=tinymce.extend,n=c.nodeIndex;k(O,{startContainer:e,startOffset:0,endContainer:e,endOffset:0,collapsed:E,commonAncestorContainer:e,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:q,setEnd:s,setStartBefore:g,setStartAfter:J,setEndBefore:K,setEndAfter:u,collapse:B,selectNode:y,selectNodeContents:G,compareBoundaryPoints:v,deleteContents:p,extractContents:I,cloneContents:d,insertNode:D,surroundContents:N,cloneRange:L,toStringIE:T});function x(){return e.createDocumentFragment()}function q(X,t){C(E,X,t)}function s(X,t){C(S,X,t)}function g(t){q(t.parentNode,n(t))}function J(t){q(t.parentNode,n(t)+1)}function K(t){s(t.parentNode,n(t))}function u(t){s(t.parentNode,n(t)+1)}function B(t){if(t){O[Q]=O[h];O[A]=O[W]}else{O[h]=O[Q];O[W]=O[A]}O.collapsed=E}function y(t){g(t);u(t)}function G(t){q(t,0);s(t,t.nodeType===1?t.childNodes.length:t.nodeValue.length)}function v(aa,t){var ad=O[h],Y=O[W],ac=O[Q],X=O[A],ab=t.startContainer,af=t.startOffset,Z=t.endContainer,ae=t.endOffset;if(aa===0){return H(ad,Y,ab,af)}if(aa===1){return H(ac,X,ab,af)}if(aa===2){return H(ac,X,Z,ae)}if(aa===3){return H(ad,Y,Z,ae)}}function p(){l(j)}function I(){return l(U)}function d(){return l(F)}function D(aa){var X=this[h],t=this[W],Z,Y;if((X.nodeType===3||X.nodeType===4)&&X.nodeValue){if(!t){X.parentNode.insertBefore(aa,X)}else{if(t>=X.nodeValue.length){c.insertAfter(aa,X)}else{Z=X.splitText(t);X.parentNode.insertBefore(aa,Z)}}}else{if(X.childNodes.length>0){Y=X.childNodes[t]}if(Y){X.insertBefore(aa,Y)}else{X.appendChild(aa)}}}function N(X){var t=O.extractContents();O.insertNode(X);X.appendChild(t);O.selectNode(X)}function L(){return k(new b(c),{startContainer:O[h],startOffset:O[W],endContainer:O[Q],endOffset:O[A],collapsed:O.collapsed,commonAncestorContainer:O.commonAncestorContainer})}function P(t,X){var Y;if(t.nodeType==3){return t}if(X<0){return t}Y=t.firstChild;while(Y&&X>0){--X;Y=Y.nextSibling}if(Y){return Y}return t}function m(){return(O[h]==O[Q]&&O[W]==O[A])}function H(Z,ab,X,aa){var ac,Y,t,ad,af,ae;if(Z==X){if(ab==aa){return 0}if(ab<aa){return -1}return 1}ac=X;while(ac&&ac.parentNode!=Z){ac=ac.parentNode}if(ac){Y=0;t=Z.firstChild;while(t!=ac&&Y<ab){Y++;t=t.nextSibling}if(ab<=Y){return -1}return 1}ac=Z;while(ac&&ac.parentNode!=X){ac=ac.parentNode}if(ac){Y=0;t=X.firstChild;while(t!=ac&&Y<aa){Y++;t=t.nextSibling}if(Y<aa){return -1}return 1}ad=c.findCommonAncestor(Z,X);af=Z;while(af&&af.parentNode!=ad){af=af.parentNode}if(!af){af=ad}ae=X;while(ae&&ae.parentNode!=ad){ae=ae.parentNode}if(!ae){ae=ad}if(af==ae){return 0}t=ad.firstChild;while(t){if(t==af){return -1}if(t==ae){return 1}t=t.nextSibling}}function C(X,aa,Z){var t,Y;if(X){O[h]=aa;O[W]=Z}else{O[Q]=aa;O[A]=Z}t=O[Q];while(t.parentNode){t=t.parentNode}Y=O[h];while(Y.parentNode){Y=Y.parentNode}if(Y==t){if(H(O[h],O[W],O[Q],O[A])>0){O.collapse(X)}}else{O.collapse(X)}O.collapsed=m();O.commonAncestorContainer=c.findCommonAncestor(O[h],O[Q])}function l(ad){var ac,Z=0,af=0,X,ab,Y,aa,t,ae;if(O[h]==O[Q]){return f(ad)}for(ac=O[Q],X=ac.parentNode;X;ac=X,X=X.parentNode){if(X==O[h]){return r(ac,ad)}++Z}for(ac=O[h],X=ac.parentNode;X;ac=X,X=X.parentNode){if(X==O[Q]){return V(ac,ad)}++af}ab=af-Z;Y=O[h];while(ab>0){Y=Y.parentNode;ab--}aa=O[Q];while(ab<0){aa=aa.parentNode;ab++}for(t=Y.parentNode,ae=aa.parentNode;t!=ae;t=t.parentNode,ae=ae.parentNode){Y=t;aa=ae}return o(Y,aa,ad)}function f(ac){var ae,af,t,Y,Z,ad,aa,X,ab;if(ac!=j){ae=x()}if(O[W]==O[A]){return ae}if(O[h].nodeType==3){af=O[h].nodeValue;t=af.substring(O[W],O[A]);if(ac!=F){Y=O[h];X=O[W];ab=O[A]-O[W];if(X===0&&ab>=Y.nodeValue.length-1){Y.parentNode.removeChild(Y)}else{Y.deleteData(X,ab)}O.collapse(E)}if(ac==j){return}if(t.length>0){ae.appendChild(e.createTextNode(t))}return ae}Y=P(O[h],O[W]);Z=O[A]-O[W];while(Y&&Z>0){ad=Y.nextSibling;aa=z(Y,ac);if(ae){ae.appendChild(aa)}--Z;Y=ad}if(ac!=F){O.collapse(E)}return ae}function r(ad,aa){var ac,ab,X,t,Z,Y;if(aa!=j){ac=x()}ab=i(ad,aa);if(ac){ac.appendChild(ab)}X=n(ad);t=X-O[W];if(t<=0){if(aa!=F){O.setEndBefore(ad);O.collapse(S)}return ac}ab=ad.previousSibling;while(t>0){Z=ab.previousSibling;Y=z(ab,aa);if(ac){ac.insertBefore(Y,ac.firstChild)}--t;ab=Z}if(aa!=F){O.setEndBefore(ad);O.collapse(S)}return ac}function V(ab,aa){var ad,X,ac,t,Z,Y;if(aa!=j){ad=x()}ac=R(ab,aa);if(ad){ad.appendChild(ac)}X=n(ab);++X;t=O[A]-X;ac=ab.nextSibling;while(ac&&t>0){Z=ac.nextSibling;Y=z(ac,aa);if(ad){ad.appendChild(Y)}--t;ac=Z}if(aa!=F){O.setStartAfter(ab);O.collapse(E)}return ad}function o(ab,t,ae){var Y,ag,aa,ac,ad,X,af,Z;if(ae!=j){ag=x()}Y=R(ab,ae);if(ag){ag.appendChild(Y)}aa=ab.parentNode;ac=n(ab);ad=n(t);++ac;X=ad-ac;af=ab.nextSibling;while(X>0){Z=af.nextSibling;Y=z(af,ae);if(ag){ag.appendChild(Y)}af=Z;--X}Y=i(t,ae);if(ag){ag.appendChild(Y)}if(ae!=F){O.setStartAfter(ab);O.collapse(E)}return ag}function i(ac,ad){var Y=P(O[Q],O[A]-1),ae,ab,aa,t,X,Z=Y!=O[Q];if(Y==ac){return M(Y,Z,S,ad)}ae=Y.parentNode;ab=M(ae,S,S,ad);while(ae){while(Y){aa=Y.previousSibling;t=M(Y,Z,S,ad);if(ad!=j){ab.insertBefore(t,ab.firstChild)}Z=E;Y=aa}if(ae==ac){return ab}Y=ae.previousSibling;ae=ae.parentNode;X=M(ae,S,S,ad);if(ad!=j){X.appendChild(ab)}ab=X}}function R(ac,ad){var Z=P(O[h],O[W]),aa=Z!=O[h],ae,ab,Y,t,X;if(Z==ac){return M(Z,aa,E,ad)}ae=Z.parentNode;ab=M(ae,S,E,ad);while(ae){while(Z){Y=Z.nextSibling;t=M(Z,aa,E,ad);if(ad!=j){ab.appendChild(t)}aa=E;Z=Y}if(ae==ac){return ab}Z=ae.nextSibling;ae=ae.parentNode;X=M(ae,S,E,ad);if(ad!=j){X.appendChild(ab)}ab=X}}function M(t,aa,ad,ae){var Z,Y,ab,X,ac;if(aa){return z(t,ae)}if(t.nodeType==3){Z=t.nodeValue;if(ad){X=O[W];Y=Z.substring(X);ab=Z.substring(0,X)}else{X=O[A];Y=Z.substring(0,X);ab=Z.substring(X)}if(ae!=F){t.nodeValue=ab}if(ae==j){return}ac=c.clone(t,S);ac.nodeValue=Y;return ac}if(ae==j){return}return c.clone(t,S)}function z(X,t){if(t!=j){return t==F?c.clone(X,E):X}X.parentNode.removeChild(X)}function T(){return c.create("body",null,d()).outerText}return O}a.Range=b;b.prototype.toString=function(){return this.toStringIE()}})(tinymce.dom);(function(){function a(d){var b=this,h=d.dom,c=true,f=false;function e(i,j){var k,t=0,q,n,m,l,o,r,p=-1,s;k=i.duplicate();k.collapse(j);s=k.parentElement();if(s.ownerDocument!==d.dom.doc){return}while(s.contentEditable==="false"){s=s.parentNode}if(!s.hasChildNodes()){return{node:s,inside:1}}m=s.children;q=m.length-1;while(t<=q){r=Math.floor((t+q)/2);l=m[r];k.moveToElementText(l);p=k.compareEndPoints(j?"StartToStart":"EndToEnd",i);if(p>0){q=r-1}else{if(p<0){t=r+1}else{return{node:l}}}}if(p<0){if(!l){k.moveToElementText(s);k.collapse(true);l=s;n=true}else{k.collapse(false)}o=0;while(k.compareEndPoints(j?"StartToStart":"StartToEnd",i)!==0){if(k.move("character",1)===0||s!=k.parentElement()){break}o++}}else{k.collapse(true);o=0;while(k.compareEndPoints(j?"StartToStart":"StartToEnd",i)!==0){if(k.move("character",-1)===0||s!=k.parentElement()){break}o++}}return{node:l,position:p,offset:o,inside:n}}function g(){var i=d.getRng(),r=h.createRng(),l,k,p,q,m,j;l=i.item?i.item(0):i.parentElement();if(l.ownerDocument!=h.doc){return r}k=d.isCollapsed();if(i.item){r.setStart(l.parentNode,h.nodeIndex(l));r.setEnd(r.startContainer,r.startOffset+1);return r}function o(A){var u=e(i,A),s,y,z=0,x,v,t;s=u.node;y=u.offset;if(u.inside&&!s.hasChildNodes()){r[A?"setStart":"setEnd"](s,0);return}if(y===v){r[A?"setStartBefore":"setEndAfter"](s);return}if(u.position<0){x=u.inside?s.firstChild:s.nextSibling;if(!x){r[A?"setStartAfter":"setEndAfter"](s);return}if(!y){if(x.nodeType==3){r[A?"setStart":"setEnd"](x,0)}else{r[A?"setStartBefore":"setEndBefore"](x)}return}while(x){t=x.nodeValue;z+=t.length;if(z>=y){s=x;z-=y;z=t.length-z;break}x=x.nextSibling}}else{x=s.previousSibling;if(!x){return r[A?"setStartBefore":"setEndBefore"](s)}if(!y){if(s.nodeType==3){r[A?"setStart":"setEnd"](x,s.nodeValue.length)}else{r[A?"setStartAfter":"setEndAfter"](x)}return}while(x){z+=x.nodeValue.length;if(z>=y){s=x;z-=y;break}x=x.previousSibling}}r[A?"setStart":"setEnd"](s,z)}try{o(true);if(!k){o()}}catch(n){if(n.number==-2147024809){m=b.getBookmark(2);p=i.duplicate();p.collapse(true);l=p.parentElement();if(!k){p=i.duplicate();p.collapse(false);q=p.parentElement();q.innerHTML=q.innerHTML}l.innerHTML=l.innerHTML;b.moveToBookmark(m);i=d.getRng();o(true);if(!k){o()}}else{throw n}}return r}this.getBookmark=function(m){var j=d.getRng(),o,i,l={};function n(u){var t,p,s,r,q=[];t=u.parentNode;p=h.getRoot().parentNode;while(t!=p&&t.nodeType!==9){s=t.children;r=s.length;while(r--){if(u===s[r]){q.push(r);break}}u=t;t=t.parentNode}return q}function k(q){var p;p=e(j,q);if(p){return{position:p.position,offset:p.offset,indexes:n(p.node),inside:p.inside}}}if(m===2){if(!j.item){l.start=k(true);if(!d.isCollapsed()){l.end=k()}}else{l.start={ctrl:true,indexes:n(j.item(0))}}}return l};this.moveToBookmark=function(k){var j,i=h.doc.body;function m(o){var r,q,n,p;r=h.getRoot();for(q=o.length-1;q>=0;q--){p=r.children;n=o[q];if(n<=p.length-1){r=p[n]}}return r}function l(r){var n=k[r?"start":"end"],q,p,o;if(n){q=n.position>0;p=i.createTextRange();p.moveToElementText(m(n.indexes));offset=n.offset;if(offset!==o){p.collapse(n.inside||q);p.moveStart("character",q?-offset:offset)}else{p.collapse(r)}j.setEndPoint(r?"StartToStart":"EndToStart",p);if(r){j.collapse(true)}}}if(k.start){if(k.start.ctrl){j=i.createControlRange();j.addElement(m(k.start.indexes));j.select()}else{j=i.createTextRange();l(true);l();j.select()}}};this.addRange=function(i){var n,l,k,p,v,q,t,s=d.dom.doc,m=s.body,r,u;function j(C){var y,B,x,A,z;x=h.create("a");y=C?k:v;B=C?p:q;A=n.duplicate();if(y==s||y==s.documentElement){y=m;B=0}if(y.nodeType==3){y.parentNode.insertBefore(x,y);A.moveToElementText(x);A.moveStart("character",B);h.remove(x);n.setEndPoint(C?"StartToStart":"EndToEnd",A)}else{z=y.childNodes;if(z.length){if(B>=z.length){h.insertAfter(x,z[z.length-1])}else{y.insertBefore(x,z[B])}A.moveToElementText(x)}else{if(y.canHaveHTML){y.innerHTML="<span>\uFEFF</span>";x=y.firstChild;A.moveToElementText(x);A.collapse(f)}}n.setEndPoint(C?"StartToStart":"EndToEnd",A);h.remove(x)}}k=i.startContainer;p=i.startOffset;v=i.endContainer;q=i.endOffset;n=m.createTextRange();if(k==v&&k.nodeType==1){if(p==q&&!k.hasChildNodes()){if(k.canHaveHTML){t=k.previousSibling;if(t&&!t.hasChildNodes()&&h.isBlock(t)){t.innerHTML="\uFEFF"}else{t=null}k.innerHTML="<span>\uFEFF</span><span>\uFEFF</span>";n.moveToElementText(k.lastChild);n.select();h.doc.selection.clear();k.innerHTML="";if(t){t.innerHTML=""}return}else{p=h.nodeIndex(k);k=k.parentNode}}if(p==q-1){try{u=k.childNodes[p];l=m.createControlRange();l.addElement(u);l.select();r=d.getRng();if(r.item&&u===r.item(0)){return}}catch(o){}}}j(true);j();n.select()};this.getRangeAt=g}tinymce.dom.TridentSelection=a})();(function(){var n=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,i="sizcache",o=0,r=Object.prototype.toString,h=false,g=true,q=/\\/g,u=/\r\n/g,x=/\W/;[0,0].sort(function(){g=false;return 0});var d=function(C,e,F,G){F=F||[];e=e||document;var I=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!C||typeof C!=="string"){return F}var z,K,N,y,J,M,L,E,B=true,A=d.isXML(e),D=[],H=C;do{n.exec("");z=n.exec(H);if(z){H=z[3];D.push(z[1]);if(z[2]){y=z[3];break}}}while(z);if(D.length>1&&j.exec(C)){if(D.length===2&&k.relative[D[0]]){K=s(D[0]+D[1],e,G)}else{K=k.relative[D[0]]?[e]:d(D.shift(),e);while(D.length){C=D.shift();if(k.relative[C]){C+=D.shift()}K=s(C,K,G)}}}else{if(!G&&D.length>1&&e.nodeType===9&&!A&&k.match.ID.test(D[0])&&!k.match.ID.test(D[D.length-1])){J=d.find(D.shift(),e,A);e=J.expr?d.filter(J.expr,J.set)[0]:J.set[0]}if(e){J=G?{expr:D.pop(),set:l(G)}:d.find(D.pop(),D.length===1&&(D[0]==="~"||D[0]==="+")&&e.parentNode?e.parentNode:e,A);K=J.expr?d.filter(J.expr,J.set):J.set;if(D.length>0){N=l(K)}else{B=false}while(D.length){M=D.pop();L=M;if(!k.relative[M]){M=""}else{L=D.pop()}if(L==null){L=e}k.relative[M](N,L,A)}}else{N=D=[]}}if(!N){N=K}if(!N){d.error(M||C)}if(r.call(N)==="[object Array]"){if(!B){F.push.apply(F,N)}else{if(e&&e.nodeType===1){for(E=0;N[E]!=null;E++){if(N[E]&&(N[E]===true||N[E].nodeType===1&&d.contains(e,N[E]))){F.push(K[E])}}}else{for(E=0;N[E]!=null;E++){if(N[E]&&N[E].nodeType===1){F.push(K[E])}}}}}else{l(N,F)}if(y){d(y,I,F,G);d.uniqueSort(F)}return F};d.uniqueSort=function(y){if(p){h=g;y.sort(p);if(h){for(var e=1;e<y.length;e++){if(y[e]===y[e-1]){y.splice(e--,1)}}}}return y};d.matches=function(e,y){return d(e,null,null,y)};d.matchesSelector=function(e,y){return d(y,null,null,[e]).length>0};d.find=function(E,e,F){var D,z,B,A,C,y;if(!E){return[]}for(z=0,B=k.order.length;z<B;z++){C=k.order[z];if((A=k.leftMatch[C].exec(E))){y=A[1];A.splice(1,1);if(y.substr(y.length-1)!=="\\"){A[1]=(A[1]||"").replace(q,"");D=k.find[C](A,e,F);if(D!=null){E=E.replace(k.match[C],"");break}}}}if(!D){D=typeof e.getElementsByTagName!=="undefined"?e.getElementsByTagName("*"):[]}return{set:D,expr:E}};d.filter=function(I,H,L,B){var D,e,G,N,K,y,A,C,J,z=I,M=[],F=H,E=H&&H[0]&&d.isXML(H[0]);while(I&&H.length){for(G in k.filter){if((D=k.leftMatch[G].exec(I))!=null&&D[2]){y=k.filter[G];A=D[1];e=false;D.splice(1,1);if(A.substr(A.length-1)==="\\"){continue}if(F===M){M=[]}if(k.preFilter[G]){D=k.preFilter[G](D,F,L,M,B,E);if(!D){e=N=true}else{if(D===true){continue}}}if(D){for(C=0;(K=F[C])!=null;C++){if(K){N=y(K,D,C,F);J=B^N;if(L&&N!=null){if(J){e=true}else{F[C]=false}}else{if(J){M.push(K);e=true}}}}}if(N!==undefined){if(!L){F=M}I=I.replace(k.match[G],"");if(!e){return[]}break}}}if(I===z){if(e==null){d.error(I)}else{break}}z=I}return F};d.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)};var b=d.getText=function(B){var z,A,e=B.nodeType,y="";if(e){if(e===1||e===9||e===11){if(typeof B.textContent==="string"){return B.textContent}else{if(typeof B.innerText==="string"){return B.innerText.replace(u,"")}else{for(B=B.firstChild;B;B=B.nextSibling){y+=b(B)}}}}else{if(e===3||e===4){return B.nodeValue}}}else{for(z=0;(A=B[z]);z++){if(A.nodeType!==8){y+=b(A)}}}return y};var k=d.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(e){return e.getAttribute("href")},type:function(e){return e.getAttribute("type")}},relative:{"+":function(D,y){var A=typeof y==="string",C=A&&!x.test(y),E=A&&!C;if(C){y=y.toLowerCase()}for(var z=0,e=D.length,B;z<e;z++){if((B=D[z])){while((B=B.previousSibling)&&B.nodeType!==1){}D[z]=E||B&&B.nodeName.toLowerCase()===y?B||false:B===y}}if(E){d.filter(y,D,true)}},">":function(D,y){var C,B=typeof y==="string",z=0,e=D.length;if(B&&!x.test(y)){y=y.toLowerCase();for(;z<e;z++){C=D[z];if(C){var A=C.parentNode;D[z]=A.nodeName.toLowerCase()===y?A:false}}}else{for(;z<e;z++){C=D[z];if(C){D[z]=B?C.parentNode:C.parentNode===y}}if(B){d.filter(y,D,true)}}},"":function(A,y,C){var B,z=o++,e=t;if(typeof y==="string"&&!x.test(y)){y=y.toLowerCase();B=y;e=a}e("parentNode",y,z,A,B,C)},"~":function(A,y,C){var B,z=o++,e=t;if(typeof y==="string"&&!x.test(y)){y=y.toLowerCase();B=y;e=a}e("previousSibling",y,z,A,B,C)}},find:{ID:function(y,z,A){if(typeof z.getElementById!=="undefined"&&!A){var e=z.getElementById(y[1]);return e&&e.parentNode?[e]:[]}},NAME:function(z,C){if(typeof C.getElementsByName!=="undefined"){var y=[],B=C.getElementsByName(z[1]);for(var A=0,e=B.length;A<e;A++){if(B[A].getAttribute("name")===z[1]){y.push(B[A])}}return y.length===0?null:y}},TAG:function(e,y){if(typeof y.getElementsByTagName!=="undefined"){return y.getElementsByTagName(e[1])}}},preFilter:{CLASS:function(A,y,z,e,D,E){A=" "+A[1].replace(q,"")+" ";if(E){return A}for(var B=0,C;(C=y[B])!=null;B++){if(C){if(D^(C.className&&(" "+C.className+" ").replace(/[\t\n\r]/g," ").indexOf(A)>=0)){if(!z){e.push(C)}}else{if(z){y[B]=false}}}}return false},ID:function(e){return e[1].replace(q,"")},TAG:function(y,e){return y[1].replace(q,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){d.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var y=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(y[1]+(y[2]||1))-0;e[3]=y[3]-0}else{if(e[2]){d.error(e[0])}}e[0]=o++;return e},ATTR:function(B,y,z,e,C,D){var A=B[1]=B[1].replace(q,"");if(!D&&k.attrMap[A]){B[1]=k.attrMap[A]}B[4]=(B[4]||B[5]||"").replace(q,"");if(B[2]==="~="){B[4]=" "+B[4]+" "}return B},PSEUDO:function(B,y,z,e,C){if(B[1]==="not"){if((n.exec(B[3])||"").length>1||/^\w/.test(B[3])){B[3]=d(B[3],null,null,y)}else{var A=d.filter(B[3],y,z,true^C);if(!z){e.push.apply(e,A)}return false}}else{if(k.match.POS.test(B[0])||k.match.CHILD.test(B[0])){return true}}return B},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(z,y,e){return !!d(e[3],z).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(z){var e=z.getAttribute("type"),y=z.type;return z.nodeName.toLowerCase()==="input"&&"text"===y&&(e===y||e===null)},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type},submit:function(y){var e=y.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===y.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(y){var e=y.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===y.type},button:function(y){var e=y.nodeName.toLowerCase();return e==="input"&&"button"===y.type||e==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(y,e){return e===0},last:function(z,y,e,A){return y===A.length-1},even:function(y,e){return e%2===0},odd:function(y,e){return e%2===1},lt:function(z,y,e){return y<e[3]-0},gt:function(z,y,e){return y>e[3]-0},nth:function(z,y,e){return e[3]-0===y},eq:function(z,y,e){return e[3]-0===y}},filter:{PSEUDO:function(z,E,D,F){var e=E[1],y=k.filters[e];if(y){return y(z,D,E,F)}else{if(e==="contains"){return(z.textContent||z.innerText||b([z])||"").indexOf(E[3])>=0}else{if(e==="not"){var A=E[3];for(var C=0,B=A.length;C<B;C++){if(A[C]===z){return false}}return true}else{d.error(e)}}}},CHILD:function(z,B){var A,H,D,G,e,C,F,E=B[1],y=z;switch(E){case"only":case"first":while((y=y.previousSibling)){if(y.nodeType===1){return false}}if(E==="first"){return true}y=z;case"last":while((y=y.nextSibling)){if(y.nodeType===1){return false}}return true;case"nth":A=B[2];H=B[3];if(A===1&&H===0){return true}D=B[0];G=z.parentNode;if(G&&(G[i]!==D||!z.nodeIndex)){C=0;for(y=G.firstChild;y;y=y.nextSibling){if(y.nodeType===1){y.nodeIndex=++C}}G[i]=D}F=z.nodeIndex-H;if(A===0){return F===0}else{return(F%A===0&&F/A>=0)}}},ID:function(y,e){return y.nodeType===1&&y.getAttribute("id")===e},TAG:function(y,e){return(e==="*"&&y.nodeType===1)||!!y.nodeName&&y.nodeName.toLowerCase()===e},CLASS:function(y,e){return(" "+(y.className||y.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(C,A){var z=A[1],e=d.attr?d.attr(C,z):k.attrHandle[z]?k.attrHandle[z](C):C[z]!=null?C[z]:C.getAttribute(z),D=e+"",B=A[2],y=A[4];return e==null?B==="!=":!B&&d.attr?e!=null:B==="="?D===y:B==="*="?D.indexOf(y)>=0:B==="~="?(" "+D+" ").indexOf(y)>=0:!y?D&&e!==false:B==="!="?D!==y:B==="^="?D.indexOf(y)===0:B==="$="?D.substr(D.length-y.length)===y:B==="|="?D===y||D.substr(0,y.length+1)===y+"-":false},POS:function(B,y,z,C){var e=y[2],A=k.setFilters[e];if(A){return A(B,z,y,C)}}}};var j=k.match.POS,c=function(y,e){return"\\"+(e-0+1)};for(var f in k.match){k.match[f]=new RegExp(k.match[f].source+(/(?![^\[]*\])(?![^\(]*\))/.source));k.leftMatch[f]=new RegExp(/(^(?:.|\r|\n)*?)/.source+k.match[f].source.replace(/\\(\d+)/g,c))}k.match.globalPOS=j;var l=function(y,e){y=Array.prototype.slice.call(y,0);if(e){e.push.apply(e,y);return e}return y};try{Array.prototype.slice.call(document.documentElement.childNodes,0)[0].nodeType}catch(v){l=function(B,A){var z=0,y=A||[];if(r.call(B)==="[object Array]"){Array.prototype.push.apply(y,B)}else{if(typeof B.length==="number"){for(var e=B.length;z<e;z++){y.push(B[z])}}else{for(;B[z];z++){y.push(B[z])}}}return y}}var p,m;if(document.documentElement.compareDocumentPosition){p=function(y,e){if(y===e){h=true;return 0}if(!y.compareDocumentPosition||!e.compareDocumentPosition){return y.compareDocumentPosition?-1:1}return y.compareDocumentPosition(e)&4?-1:1}}else{p=function(F,E){if(F===E){h=true;return 0}else{if(F.sourceIndex&&E.sourceIndex){return F.sourceIndex-E.sourceIndex}}var C,y,z=[],e=[],B=F.parentNode,D=E.parentNode,G=B;if(B===D){return m(F,E)}else{if(!B){return -1}else{if(!D){return 1}}}while(G){z.unshift(G);G=G.parentNode}G=D;while(G){e.unshift(G);G=G.parentNode}C=z.length;y=e.length;for(var A=0;A<C&&A<y;A++){if(z[A]!==e[A]){return m(z[A],e[A])}}return A===C?m(F,e[A],-1):m(z[A],E,1)};m=function(y,e,z){if(y===e){return z}var A=y.nextSibling;while(A){if(A===e){return -1}A=A.nextSibling}return 1}}(function(){var y=document.createElement("div"),z="script"+(new Date()).getTime(),e=document.documentElement;y.innerHTML="<a name='"+z+"'/>";e.insertBefore(y,e.firstChild);if(document.getElementById(z)){k.find.ID=function(B,C,D){if(typeof C.getElementById!=="undefined"&&!D){var A=C.getElementById(B[1]);return A?A.id===B[1]||typeof A.getAttributeNode!=="undefined"&&A.getAttributeNode("id").nodeValue===B[1]?[A]:undefined:[]}};k.filter.ID=function(C,A){var B=typeof C.getAttributeNode!=="undefined"&&C.getAttributeNode("id");return C.nodeType===1&&B&&B.nodeValue===A}}e.removeChild(y);e=y=null})();(function(){var e=document.createElement("div");e.appendChild(document.createComment(""));if(e.getElementsByTagName("*").length>0){k.find.TAG=function(y,C){var B=C.getElementsByTagName(y[1]);if(y[1]==="*"){var A=[];for(var z=0;B[z];z++){if(B[z].nodeType===1){A.push(B[z])}}B=A}return B}}e.innerHTML="<a href='#'></a>";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){k.attrHandle.href=function(y){return y.getAttribute("href",2)}}e=null})();if(document.querySelectorAll){(function(){var e=d,A=document.createElement("div"),z="__sizzle__";A.innerHTML="<p class='TEST'></p>";if(A.querySelectorAll&&A.querySelectorAll(".TEST").length===0){return}d=function(L,C,G,K){C=C||document;if(!K&&!d.isXML(C)){var J=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(L);if(J&&(C.nodeType===1||C.nodeType===9)){if(J[1]){return l(C.getElementsByTagName(L),G)}else{if(J[2]&&k.find.CLASS&&C.getElementsByClassName){return l(C.getElementsByClassName(J[2]),G)}}}if(C.nodeType===9){if(L==="body"&&C.body){return l([C.body],G)}else{if(J&&J[3]){var F=C.getElementById(J[3]);if(F&&F.parentNode){if(F.id===J[3]){return l([F],G)}}else{return l([],G)}}}try{return l(C.querySelectorAll(L),G)}catch(H){}}else{if(C.nodeType===1&&C.nodeName.toLowerCase()!=="object"){var D=C,E=C.getAttribute("id"),B=E||z,N=C.parentNode,M=/^\s*[+~]/.test(L);if(!E){C.setAttribute("id",B)}else{B=B.replace(/'/g,"\\$&")}if(M&&N){C=C.parentNode}try{if(!M||N){return l(C.querySelectorAll("[id='"+B+"'] "+L),G)}}catch(I){}finally{if(!E){D.removeAttribute("id")}}}}}return e(L,C,G,K)};for(var y in e){d[y]=e[y]}A=null})()}(function(){var e=document.documentElement,z=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(z){var B=!z.call(document.createElement("div"),"div"),y=false;try{z.call(document.documentElement,"[test!='']:sizzle")}catch(A){y=true}d.matchesSelector=function(D,F){F=F.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!d.isXML(D)){try{if(y||!k.match.PSEUDO.test(F)&&!/!=/.test(F)){var C=z.call(D,F);if(C||!B||D.document&&D.document.nodeType!==11){return C}}}catch(E){}}return d(F,null,null,[D]).length>0}}})();(function(){var e=document.createElement("div");e.innerHTML="<div class='test e'></div><div class='test'></div>";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}k.order.splice(1,0,"CLASS");k.find.CLASS=function(y,z,A){if(typeof z.getElementsByClassName!=="undefined"&&!A){return z.getElementsByClassName(y[1])}};e=null})();function a(y,D,C,G,E,F){for(var A=0,z=G.length;A<z;A++){var e=G[A];if(e){var B=false;e=e[y];while(e){if(e[i]===C){B=G[e.sizset];break}if(e.nodeType===1&&!F){e[i]=C;e.sizset=A}if(e.nodeName.toLowerCase()===D){B=e;break}e=e[y]}G[A]=B}}}function t(y,D,C,G,E,F){for(var A=0,z=G.length;A<z;A++){var e=G[A];if(e){var B=false;e=e[y];while(e){if(e[i]===C){B=G[e.sizset];break}if(e.nodeType===1){if(!F){e[i]=C;e.sizset=A}if(typeof D!=="string"){if(e===D){B=true;break}}else{if(d.filter(D,[e]).length>0){B=e;break}}}e=e[y]}G[A]=B}}}if(document.documentElement.contains){d.contains=function(y,e){return y!==e&&(y.contains?y.contains(e):true)}}else{if(document.documentElement.compareDocumentPosition){d.contains=function(y,e){return !!(y.compareDocumentPosition(e)&16)}}else{d.contains=function(){return false}}}d.isXML=function(e){var y=(e?e.ownerDocument||e:0).documentElement;return y?y.nodeName!=="HTML":false};var s=function(z,e,D){var C,E=[],B="",F=e.nodeType?[e]:e;while((C=k.match.PSEUDO.exec(z))){B+=C[0];z=z.replace(k.match.PSEUDO,"")}z=k.relative[z]?z+"*":z;for(var A=0,y=F.length;A<y;A++){d(z,F[A],E,D)}return d.filter(B,E)};window.tinymce.dom.Sizzle=d})();(function(a){a.dom.Element=function(f,d){var b=this,e,c;b.settings=d=d||{};b.id=f;b.dom=e=d.dom||a.DOM;if(!a.isIE){c=e.get(b.id)}a.each(("getPos,getRect,getParent,add,setStyle,getStyle,setStyles,setAttrib,setAttribs,getAttrib,addClass,removeClass,hasClass,getOuterHTML,setOuterHTML,remove,show,hide,isHidden,setHTML,get").split(/,/),function(g){b[g]=function(){var h=[f],j;for(j=0;j<arguments.length;j++){h.push(arguments[j])}h=e[g].apply(e,h);b.update(g);return h}});a.extend(b,{on:function(i,h,g){return a.dom.Event.add(b.id,i,h,g)},getXY:function(){return{x:parseInt(b.getStyle("left")),y:parseInt(b.getStyle("top"))}},getSize:function(){var g=e.get(b.id);return{w:parseInt(b.getStyle("width")||g.clientWidth),h:parseInt(b.getStyle("height")||g.clientHeight)}},moveTo:function(g,h){b.setStyles({left:g,top:h})},moveBy:function(g,i){var h=b.getXY();b.moveTo(h.x+g,h.y+i)},resizeTo:function(g,i){b.setStyles({width:g,height:i})},resizeBy:function(g,j){var i=b.getSize();b.resizeTo(i.w+g,i.h+j)},update:function(h){var g;if(a.isIE6&&d.blocker){h=h||"";if(h.indexOf("get")===0||h.indexOf("has")===0||h.indexOf("is")===0){return}if(h=="remove"){e.remove(b.blocker);return}if(!b.blocker){b.blocker=e.uniqueId();g=e.add(d.container||e.getRoot(),"iframe",{id:b.blocker,style:"position:absolute;",frameBorder:0,src:'javascript:""'});e.setStyle(g,"opacity",0)}else{g=e.get(b.blocker)}e.setStyles(g,{left:b.getStyle("left",1),top:b.getStyle("top",1),width:b.getStyle("width",1),height:b.getStyle("height",1),display:b.getStyle("display",1),zIndex:parseInt(b.getStyle("zIndex",1)||0)-1})}}})}})(tinymce);(function(d){function f(g){return g.replace(/[\n\r]+/g,"")}var c=d.is,b=d.isIE,e=d.each,a=d.dom.TreeWalker;d.create("tinymce.dom.Selection",{Selection:function(k,j,i,h){var g=this;g.dom=k;g.win=j;g.serializer=i;g.editor=h;e(["onBeforeSetContent","onBeforeGetContent","onSetContent","onGetContent"],function(l){g[l]=new d.util.Dispatcher(g)});if(!g.win.getSelection){g.tridentSel=new d.dom.TridentSelection(g)}if(d.isIE&&k.boxModel){this._fixIESelection()}d.addUnload(g.destroy,g)},setCursorLocation:function(i,j){var g=this;var h=g.dom.createRng();h.setStart(i,j);h.setEnd(i,j);g.setRng(h);g.collapse(false)},getContent:function(h){var g=this,i=g.getRng(),m=g.dom.create("body"),k=g.getSel(),j,l,o;h=h||{};j=l="";h.get=true;h.format=h.format||"html";h.forced_root_block="";g.onBeforeGetContent.dispatch(g,h);if(h.format=="text"){return g.isCollapsed()?"":(i.text||(k.toString?k.toString():""))}if(i.cloneContents){o=i.cloneContents();if(o){m.appendChild(o)}}else{if(c(i.item)||c(i.htmlText)){m.innerHTML="<br>"+(i.item?i.item(0).outerHTML:i.htmlText);m.removeChild(m.firstChild)}else{m.innerHTML=i.toString()}}if(/^\s/.test(m.innerHTML)){j=" "}if(/\s+$/.test(m.innerHTML)){l=" "}h.getInner=true;h.content=g.isCollapsed()?"":j+g.serializer.serialize(m,h)+l;g.onGetContent.dispatch(g,h);return h.content},setContent:function(h,j){var o=this,g=o.getRng(),k,l=o.win.document,n,m;j=j||{format:"html"};j.set=true;h=j.content=h;if(!j.no_events){o.onBeforeSetContent.dispatch(o,j)}h=j.content;if(g.insertNode){h+='<span id="__caret">_</span>';if(g.startContainer==l&&g.endContainer==l){l.body.innerHTML=h}else{g.deleteContents();if(l.body.childNodes.length===0){l.body.innerHTML=h}else{if(g.createContextualFragment){g.insertNode(g.createContextualFragment(h))}else{n=l.createDocumentFragment();m=l.createElement("div");n.appendChild(m);m.outerHTML=h;g.insertNode(n)}}}k=o.dom.get("__caret");g=l.createRange();g.setStartBefore(k);g.setEndBefore(k);o.setRng(g);o.dom.remove("__caret");try{o.setRng(g)}catch(i){}}else{if(g.item){l.execCommand("Delete",false,null);g=o.getRng()}if(/^\s+/.test(h)){g.pasteHTML('<span id="__mce_tmp">_</span>'+h);o.dom.remove("__mce_tmp")}else{g.pasteHTML(h)}}if(!j.no_events){o.onSetContent.dispatch(o,j)}},getStart:function(){var i=this,h=i.getRng(),j,g,l,k;if(h.duplicate||h.item){if(h.item){return h.item(0)}l=h.duplicate();l.collapse(1);j=l.parentElement();if(j.ownerDocument!==i.dom.doc){j=i.dom.getRoot()}g=k=h.parentElement();while(k=k.parentNode){if(k==j){j=g;break}}return j}else{j=h.startContainer;if(j.nodeType==1&&j.hasChildNodes()){j=j.childNodes[Math.min(j.childNodes.length-1,h.startOffset)]}if(j&&j.nodeType==3){return j.parentNode}return j}},getEnd:function(){var h=this,g=h.getRng(),j,i;if(g.duplicate||g.item){if(g.item){return g.item(0)}g=g.duplicate();g.collapse(0);j=g.parentElement();if(j.ownerDocument!==h.dom.doc){j=h.dom.getRoot()}if(j&&j.nodeName=="BODY"){return j.lastChild||j}return j}else{j=g.endContainer;i=g.endOffset;if(j.nodeType==1&&j.hasChildNodes()){j=j.childNodes[i>0?i-1:i]}if(j&&j.nodeType==3){return j.parentNode}return j}},getBookmark:function(s,v){var y=this,n=y.dom,h,k,j,o,i,p,q,m="\uFEFF",x;function g(z,A){var t=0;e(n.select(z),function(C,B){if(C==A){t=B}});return t}function u(t){function z(E){var A,D,C,B=E?"start":"end";A=t[B+"Container"];D=t[B+"Offset"];if(A.nodeType==1&&A.nodeName=="TR"){C=A.childNodes;A=C[Math.min(E?D:D-1,C.length-1)];if(A){D=E?0:A.childNodes.length;t["set"+(E?"Start":"End")](A,D)}}}z(true);z();return t}function l(){var z=y.getRng(true),t=n.getRoot(),A={};function B(E,J){var D=E[J?"startContainer":"endContainer"],I=E[J?"startOffset":"endOffset"],C=[],F,H,G=0;if(D.nodeType==3){if(v){for(F=D.previousSibling;F&&F.nodeType==3;F=F.previousSibling){I+=F.nodeValue.length}}C.push(I)}else{H=D.childNodes;if(I>=H.length&&H.length){G=1;I=Math.max(0,H.length-1)}C.push(y.dom.nodeIndex(H[I],v)+G)}for(;D&&D!=t;D=D.parentNode){C.push(y.dom.nodeIndex(D,v))}return C}A.start=B(z,true);if(!y.isCollapsed()){A.end=B(z)}return A}if(s==2){if(y.tridentSel){return y.tridentSel.getBookmark(s)}return l()}if(s){return{rng:y.getRng()}}h=y.getRng();j=n.uniqueId();o=tinyMCE.activeEditor.selection.isCollapsed();x="overflow:hidden;line-height:0px";if(h.duplicate||h.item){if(!h.item){k=h.duplicate();try{h.collapse();h.pasteHTML('<span data-mce-type="bookmark" id="'+j+'_start" style="'+x+'">'+m+"</span>");if(!o){k.collapse(false);h.moveToElementText(k.parentElement());if(h.compareEndPoints("StartToEnd",k)===0){k.move("character",-1)}k.pasteHTML('<span data-mce-type="bookmark" id="'+j+'_end" style="'+x+'">'+m+"</span>")}}catch(r){return null}}else{p=h.item(0);i=p.nodeName;return{name:i,index:g(i,p)}}}else{p=y.getNode();i=p.nodeName;if(i=="IMG"){return{name:i,index:g(i,p)}}k=u(h.cloneRange());if(!o){k.collapse(false);k.insertNode(n.create("span",{"data-mce-type":"bookmark",id:j+"_end",style:x},m))}h=u(h);h.collapse(true);h.insertNode(n.create("span",{"data-mce-type":"bookmark",id:j+"_start",style:x},m))}y.moveToBookmark({id:j,keep:1});return{id:j}},moveToBookmark:function(o){var s=this,m=s.dom,j,i,g,r,k,u,p,q;function h(A){var t=o[A?"start":"end"],x,y,z,v;if(t){z=t[0];for(y=r,x=t.length-1;x>=1;x--){v=y.childNodes;if(t[x]>v.length-1){return}y=v[t[x]]}if(y.nodeType===3){z=Math.min(t[0],y.nodeValue.length)}if(y.nodeType===1){z=Math.min(t[0],y.childNodes.length)}if(A){g.setStart(y,z)}else{g.setEnd(y,z)}}return true}function l(B){var v=m.get(o.id+"_"+B),A,t,y,z,x=o.keep;if(v){A=v.parentNode;if(B=="start"){if(!x){t=m.nodeIndex(v)}else{A=v.firstChild;t=1}k=u=A;p=q=t}else{if(!x){t=m.nodeIndex(v)}else{A=v.firstChild;t=1}u=A;q=t}if(!x){z=v.previousSibling;y=v.nextSibling;e(d.grep(v.childNodes),function(C){if(C.nodeType==3){C.nodeValue=C.nodeValue.replace(/\uFEFF/g,"")}});while(v=m.get(o.id+"_"+B)){m.remove(v,1)}if(z&&y&&z.nodeType==y.nodeType&&z.nodeType==3&&!d.isOpera){t=z.nodeValue.length;z.appendData(y.nodeValue);m.remove(y);if(B=="start"){k=u=z;p=q=t}else{u=z;q=t}}}}}function n(t){if(m.isBlock(t)&&!t.innerHTML&&!b){t.innerHTML='<br data-mce-bogus="1" />'}return t}if(o){if(o.start){g=m.createRng();r=m.getRoot();if(s.tridentSel){return s.tridentSel.moveToBookmark(o)}if(h(true)&&h()){s.setRng(g)}}else{if(o.id){l("start");l("end");if(k){g=m.createRng();g.setStart(n(k),p);g.setEnd(n(u),q);s.setRng(g)}}else{if(o.name){s.select(m.select(o.name)[o.index])}else{if(o.rng){s.setRng(o.rng)}}}}}},select:function(l,k){var j=this,m=j.dom,h=m.createRng(),g;function i(n,p){var o=new a(n,n);do{if(n.nodeType==3&&d.trim(n.nodeValue).length!==0){if(p){h.setStart(n,0)}else{h.setEnd(n,n.nodeValue.length)}return}if(n.nodeName=="BR"){if(p){h.setStartBefore(n)}else{h.setEndBefore(n)}return}}while(n=(p?o.next():o.prev()))}if(l){g=m.nodeIndex(l);h.setStart(l.parentNode,g);h.setEnd(l.parentNode,g+1);if(k){i(l,1);i(l)}j.setRng(h)}return l},isCollapsed:function(){var g=this,i=g.getRng(),h=g.getSel();if(!i||i.item){return false}if(i.compareEndPoints){return i.compareEndPoints("StartToEnd",i)===0}return !h||i.collapsed},collapse:function(g){var i=this,h=i.getRng(),j;if(h.item){j=h.item(0);h=i.win.document.body.createTextRange();h.moveToElementText(j)}h.collapse(!!g);i.setRng(h)},getSel:function(){var h=this,g=this.win;return g.getSelection?g.getSelection():g.document.selection},getRng:function(m){var h=this,j,g,l,k=h.win.document;if(m&&h.tridentSel){return h.tridentSel.getRangeAt(0)}try{if(j=h.getSel()){g=j.rangeCount>0?j.getRangeAt(0):(j.createRange?j.createRange():k.createRange())}}catch(i){}if(d.isIE&&g&&g.setStart&&k.selection.createRange().item){l=k.selection.createRange().item(0);g=k.createRange();g.setStartBefore(l);g.setEndAfter(l)}if(!g){g=k.createRange?k.createRange():k.body.createTextRange()}if(g.setStart&&g.startContainer.nodeType===9&&g.collapsed){l=h.dom.getRoot();g.setStart(l,0);g.setEnd(l,0)}if(h.selectedRange&&h.explicitRange){if(g.compareBoundaryPoints(g.START_TO_START,h.selectedRange)===0&&g.compareBoundaryPoints(g.END_TO_END,h.selectedRange)===0){g=h.explicitRange}else{h.selectedRange=null;h.explicitRange=null}}return g},setRng:function(k,g){var j,i=this;if(!i.tridentSel){j=i.getSel();if(j){i.explicitRange=k;try{j.removeAllRanges()}catch(h){}j.addRange(k);if(g===false&&j.extend){j.collapse(k.endContainer,k.endOffset);j.extend(k.startContainer,k.startOffset)}i.selectedRange=j.rangeCount>0?j.getRangeAt(0):null}}else{if(k.cloneRange){try{i.tridentSel.addRange(k);return}catch(h){}}try{k.select()}catch(h){}}},setNode:function(h){var g=this;g.setContent(g.dom.getOuterHTML(h));return h},getNode:function(){var i=this,h=i.getRng(),j=i.getSel(),m,l=h.startContainer,g=h.endContainer;function k(q,o){var p=q;while(q&&q.nodeType===3&&q.length===0){q=o?q.nextSibling:q.previousSibling}return q||p}if(!h){return i.dom.getRoot()}if(h.setStart){m=h.commonAncestorContainer;if(!h.collapsed){if(h.startContainer==h.endContainer){if(h.endOffset-h.startOffset<2){if(h.startContainer.hasChildNodes()){m=h.startContainer.childNodes[h.startOffset]}}}if(l.nodeType===3&&g.nodeType===3){if(l.length===h.startOffset){l=k(l.nextSibling,true)}else{l=l.parentNode}if(h.endOffset===0){g=k(g.previousSibling,false)}else{g=g.parentNode}if(l&&l===g){return l}}}if(m&&m.nodeType==3){return m.parentNode}return m}return h.item?h.item(0):h.parentElement()},getSelectedBlocks:function(p,h){var o=this,k=o.dom,m,l,i,j=[];m=k.getParent(p||o.getStart(),k.isBlock);l=k.getParent(h||o.getEnd(),k.isBlock);if(m){j.push(m)}if(m&&l&&m!=l){i=m;var g=new a(m,k.getRoot());while((i=g.next())&&i!=l){if(k.isBlock(i)){j.push(i)}}}if(l&&m!=l){j.push(l)}return j},isForward:function(){var i=this.dom,g=this.getSel(),j,h;if(!g||g.anchorNode==null||g.focusNode==null){return true}j=i.createRng();j.setStart(g.anchorNode,g.anchorOffset);j.collapse(true);h=i.createRng();h.setStart(g.focusNode,g.focusOffset);h.collapse(true);return j.compareBoundaryPoints(j.START_TO_START,h)<=0},normalize:function(){var h=this,g,m,l,j,i;function k(p){var o,r,n,s=h.dom,u=s.getRoot(),q,t,v;function y(z,A){var B=new a(z,s.getParent(z.parentNode,s.isBlock)||u);while(z=B[A?"prev":"next"]()){if(z.nodeName==="BR"){return true}}}function x(B,z){var C,A;z=z||o;C=new a(z,s.getParent(z.parentNode,s.isBlock)||u);while(q=C[B?"prev":"next"]()){if(q.nodeType===3&&q.nodeValue.length>0){o=q;r=B?q.nodeValue.length:0;m=true;return}if(s.isBlock(q)||t[q.nodeName.toLowerCase()]){return}A=q}if(l&&A){o=A;m=true;r=0}}o=g[(p?"start":"end")+"Container"];r=g[(p?"start":"end")+"Offset"];t=s.schema.getNonEmptyElements();if(o.nodeType===9){o=s.getRoot();r=0}if(o===u){if(p){q=o.childNodes[r>0?r-1:0];if(q){v=q.nodeName.toLowerCase();if(t[q.nodeName]||q.nodeName=="TABLE"){return}}}if(o.hasChildNodes()){o=o.childNodes[Math.min(!p&&r>0?r-1:r,o.childNodes.length-1)];r=0;if(o.hasChildNodes()&&!/TABLE/.test(o.nodeName)){q=o;n=new a(o,u);do{if(q.nodeType===3&&q.nodeValue.length>0){r=p?0:q.nodeValue.length;o=q;m=true;break}if(t[q.nodeName.toLowerCase()]){r=s.nodeIndex(q);o=q.parentNode;if(q.nodeName=="IMG"&&!p){r++}m=true;break}}while(q=(p?n.next():n.prev()))}}}if(l){if(o.nodeType===3&&r===0){x(true)}if(o.nodeType===1){q=o.childNodes[r];if(q&&q.nodeName==="BR"&&!y(q)&&!y(q,true)){x(true,o.childNodes[r])}}}if(p&&!l&&o.nodeType===3&&r===o.nodeValue.length){x(false)}if(m){g["set"+(p?"Start":"End")](o,r)}}if(d.isIE){return}g=h.getRng();l=g.collapsed;k(true);if(!l){k()}if(m){if(l){g.collapse(true)}h.setRng(g,h.isForward())}},selectorChanged:function(g,j){var h=this,i;if(!h.selectorChangedData){h.selectorChangedData={};i={};h.editor.onNodeChange.addToTop(function(l,k,o){var p=h.dom,m=p.getParents(o,null,p.getRoot()),n={};e(h.selectorChangedData,function(r,q){e(m,function(s){if(p.is(s,q)){if(!i[q]){e(r,function(t){t(true,{node:s,selector:q,parents:m})});i[q]=r}n[q]=r;return false}})});e(i,function(r,q){if(!n[q]){delete i[q];e(r,function(s){s(false,{node:o,selector:q,parents:m})})}})})}if(!h.selectorChangedData[g]){h.selectorChangedData[g]=[]}h.selectorChangedData[g].push(j);return h},destroy:function(h){var g=this;g.win=null;if(!h){d.removeUnload(g.destroy)}},_fixIESelection:function(){var h=this.dom,n=h.doc,i=n.body,k,o,g;function j(p,s){var q=i.createTextRange();try{q.moveToPoint(p,s)}catch(r){q=null}return q}function m(q){var p;if(q.button){p=j(q.x,q.y);if(p){if(p.compareEndPoints("StartToStart",o)>0){p.setEndPoint("StartToStart",o)}else{p.setEndPoint("EndToEnd",o)}p.select()}}else{l()}}function l(){var p=n.selection.createRange();if(o&&!p.item&&p.compareEndPoints("StartToEnd",p)===0){o.select()}h.unbind(n,"mouseup",l);h.unbind(n,"mousemove",m);o=k=0}n.documentElement.unselectable=true;h.bind(n,["mousedown","contextmenu"],function(p){if(p.target.nodeName==="HTML"){if(k){l()}g=n.documentElement;if(g.scrollHeight>g.clientHeight){return}k=1;o=j(p.x,p.y);if(o){h.bind(n,"mouseup",l);h.bind(n,"mousemove",m);h.win.focus();o.select()}}})}})})(tinymce);(function(a){a.dom.Serializer=function(e,i,f){var h,b,d=a.isIE,g=a.each,c;if(!e.apply_source_formatting){e.indent=false}i=i||a.DOM;f=f||new a.html.Schema(e);e.entity_encoding=e.entity_encoding||"named";e.remove_trailing_brs="remove_trailing_brs" in e?e.remove_trailing_brs:true;h=new a.util.Dispatcher(self);b=new a.util.Dispatcher(self);c=new a.html.DomParser(e,f);c.addAttributeFilter("src,href,style",function(k,j){var o=k.length,l,q,n="data-mce-"+j,p=e.url_converter,r=e.url_converter_scope,m;while(o--){l=k[o];q=l.attributes.map[n];if(q!==m){l.attr(j,q.length>0?q:null);l.attr(n,null)}else{q=l.attributes.map[j];if(j==="style"){q=i.serializeStyle(i.parseStyle(q),l.name)}else{if(p){q=p.call(r,q,j,l.name)}}l.attr(j,q.length>0?q:null)}}});c.addAttributeFilter("class",function(j,k){var l=j.length,m,n;while(l--){m=j[l];n=m.attr("class").replace(/(?:^|\s)mce(Item\w+|Selected)(?!\S)/g,"");m.attr("class",n.length>0?n:null)}});c.addAttributeFilter("data-mce-type",function(j,l,k){var m=j.length,n;while(m--){n=j[m];if(n.attributes.map["data-mce-type"]==="bookmark"&&!k.cleanup){n.remove()}}});c.addAttributeFilter("data-mce-expando",function(j,l,k){var m=j.length;while(m--){j[m].attr(l,null)}});c.addNodeFilter("noscript",function(j){var k=j.length,l;while(k--){l=j[k].firstChild;if(l){l.value=a.html.Entities.decode(l.value)}}});c.addNodeFilter("script,style",function(k,l){var m=k.length,n,o;function j(p){return p.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")}while(m--){n=k[m];o=n.firstChild?n.firstChild.value:"";if(l==="script"){n.attr("type",(n.attr("type")||"text/javascript").replace(/^mce\-/,""));if(o.length>0){n.firstChild.value="// <![CDATA[\n"+j(o)+"\n// ]]>"}}else{if(o.length>0){n.firstChild.value="<!--\n"+j(o)+"\n-->"}}}});c.addNodeFilter("#comment",function(j,k){var l=j.length,m;while(l--){m=j[l];if(m.value.indexOf("[CDATA[")===0){m.name="#cdata";m.type=4;m.value=m.value.replace(/^\[CDATA\[|\]\]$/g,"")}else{if(m.value.indexOf("mce:protected ")===0){m.name="#text";m.type=3;m.raw=true;m.value=unescape(m.value).substr(14)}}}});c.addNodeFilter("xml:namespace,input",function(j,k){var l=j.length,m;while(l--){m=j[l];if(m.type===7){m.remove()}else{if(m.type===1){if(k==="input"&&!("type" in m.attributes.map)){m.attr("type","text")}}}}});if(e.fix_list_elements){c.addNodeFilter("ul,ol",function(k,l){var m=k.length,n,j;while(m--){n=k[m];j=n.parent;if(j.name==="ul"||j.name==="ol"){if(n.prev&&n.prev.name==="li"){n.prev.append(n)}}}})}c.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style",function(j,k){var l=j.length;while(l--){j[l].attr(k,null)}});return{schema:f,addNodeFilter:c.addNodeFilter,addAttributeFilter:c.addAttributeFilter,onPreProcess:h,onPostProcess:b,serialize:function(o,m){var l,p,k,j,n;if(d&&i.select("script,style,select,map").length>0){n=o.innerHTML;o=o.cloneNode(false);i.setHTML(o,n)}else{o=o.cloneNode(true)}l=o.ownerDocument.implementation;if(l.createHTMLDocument){p=l.createHTMLDocument("");g(o.nodeName=="BODY"?o.childNodes:[o],function(q){p.body.appendChild(p.importNode(q,true))});if(o.nodeName!="BODY"){o=p.body.firstChild}else{o=p.body}k=i.doc;i.doc=p}m=m||{};m.format=m.format||"html";if(!m.no_events){m.node=o;h.dispatch(self,m)}j=new a.html.Serializer(e,f);m.content=j.serialize(c.parse(a.trim(m.getInner?o.innerHTML:i.getOuterHTML(o)),m));if(!m.cleanup){m.content=m.content.replace(/\uFEFF/g,"")}if(!m.no_events){b.dispatch(self,m)}if(k){i.doc=k}m.node=null;return m.content},addRules:function(j){f.addValidElements(j)},setRules:function(j){f.setValidElements(j)}}}})(tinymce);(function(a){a.dom.ScriptLoader=function(h){var c=0,k=1,i=2,l={},j=[],e={},d=[],g=0,f;function b(m,v){var x=this,q=a.DOM,s,o,r,n;function p(){q.remove(n);if(s){s.onreadystatechange=s.onload=s=null}v()}function u(){if(typeof(console)!=="undefined"&&console.log){console.log("Failed to load: "+m)}}n=q.uniqueId();if(a.isIE6){o=new a.util.URI(m);r=location;if(o.host==r.hostname&&o.port==r.port&&(o.protocol+":")==r.protocol&&o.protocol.toLowerCase()!="file"){a.util.XHR.send({url:a._addVer(o.getURI()),success:function(y){var t=q.create("script",{type:"text/javascript"});t.text=y;document.getElementsByTagName("head")[0].appendChild(t);q.remove(t);p()},error:u});return}}s=document.createElement("script");s.id=n;s.type="text/javascript";s.src=a._addVer(m);if(!a.isIE){s.onload=p}s.onerror=u;if(!a.isOpera){s.onreadystatechange=function(){var t=s.readyState;if(t=="complete"||t=="loaded"){p()}}}(document.getElementsByTagName("head")[0]||document.body).appendChild(s)}this.isDone=function(m){return l[m]==i};this.markDone=function(m){l[m]=i};this.add=this.load=function(m,q,n){var o,p=l[m];if(p==f){j.push(m);l[m]=c}if(q){if(!e[m]){e[m]=[]}e[m].push({func:q,scope:n||this})}};this.loadQueue=function(n,m){this.loadScripts(j,n,m)};this.loadScripts=function(m,q,p){var o;function n(r){a.each(e[r],function(s){s.func.call(s.scope)});e[r]=f}d.push({func:q,scope:p||this});o=function(){var r=a.grep(m);m.length=0;a.each(r,function(s){if(l[s]==i){n(s);return}if(l[s]!=k){l[s]=k;g++;b(s,function(){l[s]=i;g--;n(s);o()})}});if(!g){a.each(d,function(s){s.func.call(s.scope)});d.length=0}};o()}};a.ScriptLoader=new a.dom.ScriptLoader()})(tinymce);(function(a){a.dom.RangeUtils=function(c){var b="\uFEFF";this.walk=function(d,s){var i=d.startContainer,l=d.startOffset,t=d.endContainer,m=d.endOffset,j,g,o,h,r,q,e;e=c.select("td.mceSelected,th.mceSelected");if(e.length>0){a.each(e,function(u){s([u])});return}function f(u){var v;v=u[0];if(v.nodeType===3&&v===i&&l>=v.nodeValue.length){u.splice(0,1)}v=u[u.length-1];if(m===0&&u.length>0&&v===t&&v.nodeType===3){u.splice(u.length-1,1)}return u}function p(x,v,u){var y=[];for(;x&&x!=u;x=x[v]){y.push(x)}return y}function n(v,u){do{if(v.parentNode==u){return v}v=v.parentNode}while(v)}function k(x,v,y){var u=y?"nextSibling":"previousSibling";for(h=x,r=h.parentNode;h&&h!=v;h=r){r=h.parentNode;q=p(h==x?h:h[u],u);if(q.length){if(!y){q.reverse()}s(f(q))}}}if(i.nodeType==1&&i.hasChildNodes()){i=i.childNodes[l]}if(t.nodeType==1&&t.hasChildNodes()){t=t.childNodes[Math.min(m-1,t.childNodes.length-1)]}if(i==t){return s(f([i]))}j=c.findCommonAncestor(i,t);for(h=i;h;h=h.parentNode){if(h===t){return k(i,j,true)}if(h===j){break}}for(h=t;h;h=h.parentNode){if(h===i){return k(t,j)}if(h===j){break}}g=n(i,j)||i;o=n(t,j)||t;k(i,g,true);q=p(g==i?g:g.nextSibling,"nextSibling",o==t?o.nextSibling:o);if(q.length){s(f(q))}k(t,o)};this.split=function(e){var h=e.startContainer,d=e.startOffset,i=e.endContainer,g=e.endOffset;function f(j,k){return j.splitText(k)}if(h==i&&h.nodeType==3){if(d>0&&d<h.nodeValue.length){i=f(h,d);h=i.previousSibling;if(g>d){g=g-d;h=i=f(i,g).previousSibling;g=i.nodeValue.length;d=0}else{g=0}}}else{if(h.nodeType==3&&d>0&&d<h.nodeValue.length){h=f(h,d);d=0}if(i.nodeType==3&&g>0&&g<i.nodeValue.length){i=f(i,g).previousSibling;g=i.nodeValue.length}}return{startContainer:h,startOffset:d,endContainer:i,endOffset:g}}};a.dom.RangeUtils.compareRanges=function(c,b){if(c&&b){if(c.item||c.duplicate){if(c.item&&b.item&&c.item(0)===b.item(0)){return true}if(c.isEqual&&b.isEqual&&b.isEqual(c)){return true}}else{return c.startContainer==b.startContainer&&c.startOffset==b.startOffset}}return false}})(tinymce);(function(b){var a=b.dom.Event,c=b.each;b.create("tinymce.ui.KeyboardNavigation",{KeyboardNavigation:function(e,f){var q=this,n=e.root,m=e.items,o=e.enableUpDown,i=e.enableLeftRight||!e.enableUpDown,l=e.excludeFromTabOrder,k,h,p,d,g;f=f||b.DOM;k=function(r){g=r.target.id};h=function(r){f.setAttrib(r.target.id,"tabindex","-1")};d=function(r){var s=f.get(g);f.setAttrib(s,"tabindex","0");s.focus()};q.focus=function(){f.get(g).focus()};q.destroy=function(){c(m,function(s){var t=f.get(s.id);f.unbind(t,"focus",k);f.unbind(t,"blur",h)});var r=f.get(n);f.unbind(r,"focus",d);f.unbind(r,"keydown",p);m=f=n=q.focus=k=h=p=d=null;q.destroy=function(){}};q.moveFocus=function(v,s){var r=-1,u=q.controls,t;if(!g){return}c(m,function(y,x){if(y.id===g){r=x;return false}});r+=v;if(r<0){r=m.length-1}else{if(r>=m.length){r=0}}t=m[r];f.setAttrib(g,"tabindex","-1");f.setAttrib(t.id,"tabindex","0");f.get(t.id).focus();if(e.actOnFocus){e.onAction(t.id)}if(s){a.cancel(s)}};p=function(z){var v=37,u=39,y=38,A=40,r=27,t=14,s=13,x=32;switch(z.keyCode){case v:if(i){q.moveFocus(-1)}break;case u:if(i){q.moveFocus(1)}break;case y:if(o){q.moveFocus(-1)}break;case A:if(o){q.moveFocus(1)}break;case r:if(e.onCancel){e.onCancel();a.cancel(z)}break;case t:case s:case x:if(e.onAction){e.onAction(g);a.cancel(z)}break}};c(m,function(t,r){var s,u;if(!t.id){t.id=f.uniqueId("_mce_item_")}u=f.get(t.id);if(l){f.bind(u,"blur",h);s="-1"}else{s=(r===0?"0":"-1")}u.setAttribute("tabindex",s);f.bind(u,"focus",k)});if(m[0]){g=m[0].id}f.setAttrib(n,"tabindex","-1");var j=f.get(n);f.bind(j,"focus",d);f.bind(j,"keydown",p)}})})(tinymce);(function(c){var b=c.DOM,a=c.is;c.create("tinymce.ui.Control",{Control:function(f,e,d){this.id=f;this.settings=e=e||{};this.rendered=false;this.onRender=new c.util.Dispatcher(this);this.classPrefix="";this.scope=e.scope||this;this.disabled=0;this.active=0;this.editor=d},setAriaProperty:function(f,e){var d=b.get(this.id+"_aria")||b.get(this.id);if(d){b.setAttrib(d,"aria-"+f,!!e)}},focus:function(){b.get(this.id).focus()},setDisabled:function(d){if(d!=this.disabled){this.setAriaProperty("disabled",d);this.setState("Disabled",d);this.setState("Enabled",!d);this.disabled=d}},isDisabled:function(){return this.disabled},setActive:function(d){if(d!=this.active){this.setState("Active",d);this.active=d;this.setAriaProperty("pressed",d)}},isActive:function(){return this.active},setState:function(f,d){var e=b.get(this.id);f=this.classPrefix+f;if(d){b.addClass(e,f)}else{b.removeClass(e,f)}},isRendered:function(){return this.rendered},renderHTML:function(){},renderTo:function(d){b.setHTML(d,this.renderHTML())},postRender:function(){var e=this,d;if(a(e.disabled)){d=e.disabled;e.disabled=-1;e.setDisabled(d)}if(a(e.active)){d=e.active;e.active=-1;e.setActive(d)}},remove:function(){b.remove(this.id);this.destroy()},destroy:function(){c.dom.Event.clear(this.id)}})})(tinymce);tinymce.create("tinymce.ui.Container:tinymce.ui.Control",{Container:function(c,b,a){this.parent(c,b,a);this.controls=[];this.lookup={}},add:function(a){this.lookup[a.id]=a;this.controls.push(a);return a},get:function(a){return this.lookup[a]}});tinymce.create("tinymce.ui.Separator:tinymce.ui.Control",{Separator:function(b,a){this.parent(b,a);this.classPrefix="mceSeparator";this.setDisabled(true)},renderHTML:function(){return tinymce.DOM.createHTML("span",{"class":this.classPrefix,role:"separator","aria-orientation":"vertical",tabindex:"-1"})}});(function(d){var c=d.is,b=d.DOM,e=d.each,a=d.walk;d.create("tinymce.ui.MenuItem:tinymce.ui.Control",{MenuItem:function(g,f){this.parent(g,f);this.classPrefix="mceMenuItem"},setSelected:function(f){this.setState("Selected",f);this.setAriaProperty("checked",!!f);this.selected=f},isSelected:function(){return this.selected},postRender:function(){var f=this;f.parent();if(c(f.selected)){f.setSelected(f.selected)}}})})(tinymce);(function(d){var c=d.is,b=d.DOM,e=d.each,a=d.walk;d.create("tinymce.ui.Menu:tinymce.ui.MenuItem",{Menu:function(h,g){var f=this;f.parent(h,g);f.items={};f.collapsed=false;f.menuCount=0;f.onAddItem=new d.util.Dispatcher(this)},expand:function(g){var f=this;if(g){a(f,function(h){if(h.expand){h.expand()}},"items",f)}f.collapsed=false},collapse:function(g){var f=this;if(g){a(f,function(h){if(h.collapse){h.collapse()}},"items",f)}f.collapsed=true},isCollapsed:function(){return this.collapsed},add:function(f){if(!f.settings){f=new d.ui.MenuItem(f.id||b.uniqueId(),f)}this.onAddItem.dispatch(this,f);return this.items[f.id]=f},addSeparator:function(){return this.add({separator:true})},addMenu:function(f){if(!f.collapse){f=this.createMenu(f)}this.menuCount++;return this.add(f)},hasMenus:function(){return this.menuCount!==0},remove:function(f){delete this.items[f.id]},removeAll:function(){var f=this;a(f,function(g){if(g.removeAll){g.removeAll()}else{g.remove()}g.destroy()},"items",f);f.items={}},createMenu:function(g){var f=new d.ui.Menu(g.id||b.uniqueId(),g);f.onAddItem.add(this.onAddItem.dispatch,this.onAddItem);return f}})})(tinymce);(function(e){var d=e.is,c=e.DOM,f=e.each,a=e.dom.Event,b=e.dom.Element;e.create("tinymce.ui.DropMenu:tinymce.ui.Menu",{DropMenu:function(h,g){g=g||{};g.container=g.container||c.doc.body;g.offset_x=g.offset_x||0;g.offset_y=g.offset_y||0;g.vp_offset_x=g.vp_offset_x||0;g.vp_offset_y=g.vp_offset_y||0;if(d(g.icons)&&!g.icons){g["class"]+=" mceNoIcons"}this.parent(h,g);this.onShowMenu=new e.util.Dispatcher(this);this.onHideMenu=new e.util.Dispatcher(this);this.classPrefix="mceMenu"},createMenu:function(j){var h=this,i=h.settings,g;j.container=j.container||i.container;j.parent=h;j.constrain=j.constrain||i.constrain;j["class"]=j["class"]||i["class"];j.vp_offset_x=j.vp_offset_x||i.vp_offset_x;j.vp_offset_y=j.vp_offset_y||i.vp_offset_y;j.keyboard_focus=i.keyboard_focus;g=new e.ui.DropMenu(j.id||c.uniqueId(),j);g.onAddItem.add(h.onAddItem.dispatch,h.onAddItem);return g},focus:function(){var g=this;if(g.keyboardNav){g.keyboardNav.focus()}},update:function(){var i=this,j=i.settings,g=c.get("menu_"+i.id+"_tbl"),l=c.get("menu_"+i.id+"_co"),h,k;h=j.max_width?Math.min(g.offsetWidth,j.max_width):g.offsetWidth;k=j.max_height?Math.min(g.offsetHeight,j.max_height):g.offsetHeight;if(!c.boxModel){i.element.setStyles({width:h+2,height:k+2})}else{i.element.setStyles({width:h,height:k})}if(j.max_width){c.setStyle(l,"width",h)}if(j.max_height){c.setStyle(l,"height",k);if(g.clientHeight<j.max_height){c.setStyle(l,"overflow","hidden")}}},showMenu:function(p,n,r){var z=this,A=z.settings,o,g=c.getViewPort(),u,l,v,q,i=2,k,j,m=z.classPrefix;z.collapse(1);if(z.isMenuVisible){return}if(!z.rendered){o=c.add(z.settings.container,z.renderNode());f(z.items,function(h){h.postRender()});z.element=new b("menu_"+z.id,{blocker:1,container:A.container})}else{o=c.get("menu_"+z.id)}if(!e.isOpera){c.setStyles(o,{left:-65535,top:-65535})}c.show(o);z.update();p+=A.offset_x||0;n+=A.offset_y||0;g.w-=4;g.h-=4;if(A.constrain){u=o.clientWidth-i;l=o.clientHeight-i;v=g.x+g.w;q=g.y+g.h;if((p+A.vp_offset_x+u)>v){p=r?r-u:Math.max(0,(v-A.vp_offset_x)-u)}if((n+A.vp_offset_y+l)>q){n=Math.max(0,(q-A.vp_offset_y)-l)}}c.setStyles(o,{left:p,top:n});z.element.update();z.isMenuVisible=1;z.mouseClickFunc=a.add(o,"click",function(s){var h;s=s.target;if(s&&(s=c.getParent(s,"tr"))&&!c.hasClass(s,m+"ItemSub")){h=z.items[s.id];if(h.isDisabled()){return}k=z;while(k){if(k.hideMenu){k.hideMenu()}k=k.settings.parent}if(h.settings.onclick){h.settings.onclick(s)}return false}});if(z.hasMenus()){z.mouseOverFunc=a.add(o,"mouseover",function(x){var h,t,s;x=x.target;if(x&&(x=c.getParent(x,"tr"))){h=z.items[x.id];if(z.lastMenu){z.lastMenu.collapse(1)}if(h.isDisabled()){return}if(x&&c.hasClass(x,m+"ItemSub")){t=c.getRect(x);h.showMenu((t.x+t.w-i),t.y-i,t.x);z.lastMenu=h;c.addClass(c.get(h.id).firstChild,m+"ItemActive")}}})}a.add(o,"keydown",z._keyHandler,z);z.onShowMenu.dispatch(z);if(A.keyboard_focus){z._setupKeyboardNav()}},hideMenu:function(j){var g=this,i=c.get("menu_"+g.id),h;if(!g.isMenuVisible){return}if(g.keyboardNav){g.keyboardNav.destroy()}a.remove(i,"mouseover",g.mouseOverFunc);a.remove(i,"click",g.mouseClickFunc);a.remove(i,"keydown",g._keyHandler);c.hide(i);g.isMenuVisible=0;if(!j){g.collapse(1)}if(g.element){g.element.hide()}if(h=c.get(g.id)){c.removeClass(h.firstChild,g.classPrefix+"ItemActive")}g.onHideMenu.dispatch(g)},add:function(i){var g=this,h;i=g.parent(i);if(g.isRendered&&(h=c.get("menu_"+g.id))){g._add(c.select("tbody",h)[0],i)}return i},collapse:function(g){this.parent(g);this.hideMenu(1)},remove:function(g){c.remove(g.id);this.destroy();return this.parent(g)},destroy:function(){var g=this,h=c.get("menu_"+g.id);if(g.keyboardNav){g.keyboardNav.destroy()}a.remove(h,"mouseover",g.mouseOverFunc);a.remove(c.select("a",h),"focus",g.mouseOverFunc);a.remove(h,"click",g.mouseClickFunc);a.remove(h,"keydown",g._keyHandler);if(g.element){g.element.remove()}c.remove(h)},renderNode:function(){var i=this,j=i.settings,l,h,k,g;g=c.create("div",{role:"listbox",id:"menu_"+i.id,"class":j["class"],style:"position:absolute;left:0;top:0;z-index:200000;outline:0"});if(i.settings.parent){c.setAttrib(g,"aria-parent","menu_"+i.settings.parent.id)}k=c.add(g,"div",{role:"presentation",id:"menu_"+i.id+"_co","class":i.classPrefix+(j["class"]?" "+j["class"]:"")});i.element=new b("menu_"+i.id,{blocker:1,container:j.container});if(j.menu_line){c.add(k,"span",{"class":i.classPrefix+"Line"})}l=c.add(k,"table",{role:"presentation",id:"menu_"+i.id+"_tbl",border:0,cellPadding:0,cellSpacing:0});h=c.add(l,"tbody");f(i.items,function(m){i._add(h,m)});i.rendered=true;return g},_setupKeyboardNav:function(){var i,h,g=this;i=c.get("menu_"+g.id);h=c.select("a[role=option]","menu_"+g.id);h.splice(0,0,i);g.keyboardNav=new e.ui.KeyboardNavigation({root:"menu_"+g.id,items:h,onCancel:function(){g.hideMenu()},enableUpDown:true});i.focus()},_keyHandler:function(g){var h=this,i;switch(g.keyCode){case 37:if(h.settings.parent){h.hideMenu();h.settings.parent.focus();a.cancel(g)}break;case 39:if(h.mouseOverFunc){h.mouseOverFunc(g)}break}},_add:function(j,h){var i,q=h.settings,p,l,k,m=this.classPrefix,g;if(q.separator){l=c.add(j,"tr",{id:h.id,"class":m+"ItemSeparator"});c.add(l,"td",{"class":m+"ItemSeparator"});if(i=l.previousSibling){c.addClass(i,"mceLast")}return}i=l=c.add(j,"tr",{id:h.id,"class":m+"Item "+m+"ItemEnabled"});i=k=c.add(i,q.titleItem?"th":"td");i=p=c.add(i,"a",{id:h.id+"_aria",role:q.titleItem?"presentation":"option",href:"javascript:;",onclick:"return false;",onmousedown:"return false;"});if(q.parent){c.setAttrib(p,"aria-haspopup","true");c.setAttrib(p,"aria-owns","menu_"+h.id)}c.addClass(k,q["class"]);g=c.add(i,"span",{"class":"mceIcon"+(q.icon?" mce_"+q.icon:"")});if(q.icon_src){c.add(g,"img",{src:q.icon_src})}i=c.add(i,q.element||"span",{"class":"mceText",title:h.settings.title},h.settings.title);if(h.settings.style){if(typeof h.settings.style=="function"){h.settings.style=h.settings.style()}c.setAttrib(i,"style",h.settings.style)}if(j.childNodes.length==1){c.addClass(l,"mceFirst")}if((i=l.previousSibling)&&c.hasClass(i,m+"ItemSeparator")){c.addClass(l,"mceFirst")}if(h.collapse){c.addClass(l,m+"ItemSub")}if(i=l.previousSibling){c.removeClass(i,"mceLast")}c.addClass(l,"mceLast")}})})(tinymce);(function(b){var a=b.DOM;b.create("tinymce.ui.Button:tinymce.ui.Control",{Button:function(e,d,c){this.parent(e,d,c);this.classPrefix="mceButton"},renderHTML:function(){var f=this.classPrefix,e=this.settings,d,c;c=a.encode(e.label||"");d='<a role="button" id="'+this.id+'" href="javascript:;" class="'+f+" "+f+"Enabled "+e["class"]+(c?" "+f+"Labeled":"")+'" onmousedown="return false;" onclick="return false;" aria-labelledby="'+this.id+'_voice" title="'+a.encode(e.title)+'">';if(e.image&&!(this.editor&&this.editor.forcedHighContrastMode)){d+='<span class="mceIcon '+e["class"]+'"><img class="mceIcon" src="'+e.image+'" alt="'+a.encode(e.title)+'" /></span>'+(c?'<span class="'+f+'Label">'+c+"</span>":"")}else{d+='<span class="mceIcon '+e["class"]+'"></span>'+(c?'<span class="'+f+'Label">'+c+"</span>":"")}d+='<span class="mceVoiceLabel mceIconOnly" style="display: none;" id="'+this.id+'_voice">'+e.title+"</span>";d+="</a>";return d},postRender:function(){var d=this,e=d.settings,c;if(b.isIE&&d.editor){b.dom.Event.add(d.id,"mousedown",function(f){var g=d.editor.selection.getNode().nodeName;c=g==="IMG"?d.editor.selection.getBookmark():null})}b.dom.Event.add(d.id,"click",function(f){if(!d.isDisabled()){if(b.isIE&&d.editor&&c!==null){d.editor.selection.moveToBookmark(c)}return e.onclick.call(e.scope,f)}});b.dom.Event.add(d.id,"keyup",function(f){if(!d.isDisabled()&&f.keyCode==b.VK.SPACEBAR){return e.onclick.call(e.scope,f)}})}})})(tinymce);(function(e){var d=e.DOM,b=e.dom.Event,f=e.each,a=e.util.Dispatcher,c;e.create("tinymce.ui.ListBox:tinymce.ui.Control",{ListBox:function(j,i,g){var h=this;h.parent(j,i,g);h.items=[];h.onChange=new a(h);h.onPostRender=new a(h);h.onAdd=new a(h);h.onRenderMenu=new e.util.Dispatcher(this);h.classPrefix="mceListBox";h.marked={}},select:function(h){var g=this,j,i;g.marked={};if(h==c){return g.selectByIndex(-1)}if(h&&typeof(h)=="function"){i=h}else{i=function(k){return k==h}}if(h!=g.selectedValue){f(g.items,function(l,k){if(i(l.value)){j=1;g.selectByIndex(k);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(g){var i=this,j,k,h;i.marked={};if(g!=i.selectedIndex){j=d.get(i.id+"_text");h=d.get(i.id+"_voiceDesc");k=i.items[g];if(k){i.selectedValue=k.value;i.selectedIndex=g;d.setHTML(j,d.encode(k.title));d.setHTML(h,i.settings.title+" - "+k.title);d.removeClass(j,"mceTitle");d.setAttrib(i.id,"aria-valuenow",k.title)}else{d.setHTML(j,d.encode(i.settings.title));d.setHTML(h,d.encode(i.settings.title));d.addClass(j,"mceTitle");i.selectedValue=i.selectedIndex=null;d.setAttrib(i.id,"aria-valuenow",i.settings.title)}j=0}},mark:function(g){this.marked[g]=true},add:function(j,g,i){var h=this;i=i||{};i=e.extend(i,{title:j,value:g});h.items.push(i);h.onAdd.dispatch(h,i)},getLength:function(){return this.items.length},renderHTML:function(){var j="",g=this,i=g.settings,k=g.classPrefix;j='<span role="listbox" aria-haspopup="true" aria-labelledby="'+g.id+'_voiceDesc" aria-describedby="'+g.id+'_voiceDesc"><table role="presentation" tabindex="0" id="'+g.id+'" cellpadding="0" cellspacing="0" class="'+k+" "+k+"Enabled"+(i["class"]?(" "+i["class"]):"")+'"><tbody><tr>';j+="<td>"+d.createHTML("span",{id:g.id+"_voiceDesc","class":"voiceLabel",style:"display:none;"},g.settings.title);j+=d.createHTML("a",{id:g.id+"_text",tabindex:-1,href:"javascript:;","class":"mceText",onclick:"return false;",onmousedown:"return false;"},d.encode(g.settings.title))+"</td>";j+="<td>"+d.createHTML("a",{id:g.id+"_open",tabindex:-1,href:"javascript:;","class":"mceOpen",onclick:"return false;",onmousedown:"return false;"},'<span><span style="display:none;" class="mceIconOnly" aria-hidden="true">\u25BC</span></span>')+"</td>";j+="</tr></tbody></table></span>";return j},showMenu:function(){var h=this,j,i=d.get(this.id),g;if(h.isDisabled()||h.items.length===0){return}if(h.menu&&h.menu.isMenuVisible){return h.hideMenu()}if(!h.isMenuRendered){h.renderMenu();h.isMenuRendered=true}j=d.getPos(i);g=h.menu;g.settings.offset_x=j.x;g.settings.offset_y=j.y;g.settings.keyboard_focus=!e.isOpera;f(h.items,function(k){if(g.items[k.id]){g.items[k.id].setSelected(0)}});f(h.items,function(k){if(g.items[k.id]&&h.marked[k.value]){g.items[k.id].setSelected(1)}if(k.value===h.selectedValue){g.items[k.id].setSelected(1)}});g.showMenu(0,i.clientHeight);b.add(d.doc,"mousedown",h.hideMenu,h);d.addClass(h.id,h.classPrefix+"Selected")},hideMenu:function(h){var g=this;if(g.menu&&g.menu.isMenuVisible){d.removeClass(g.id,g.classPrefix+"Selected");if(h&&h.type=="mousedown"&&(h.target.id==g.id+"_text"||h.target.id==g.id+"_open")){return}if(!h||!d.getParent(h.target,".mceMenu")){d.removeClass(g.id,g.classPrefix+"Selected");b.remove(d.doc,"mousedown",g.hideMenu,g);g.menu.hideMenu()}}},renderMenu:function(){var h=this,g;g=h.settings.control_manager.createDropMenu(h.id+"_menu",{menu_line:1,"class":h.classPrefix+"Menu mceNoIcons",max_width:250,max_height:150});g.onHideMenu.add(function(){h.hideMenu();h.focus()});g.add({title:h.settings.title,"class":"mceMenuItemTitle",onclick:function(){if(h.settings.onselect("")!==false){h.select("")}}});f(h.items,function(i){if(i.value===c){g.add({title:i.title,role:"option","class":"mceMenuItemTitle",onclick:function(){if(h.settings.onselect("")!==false){h.select("")}}})}else{i.id=d.uniqueId();i.role="option";i.onclick=function(){if(h.settings.onselect(i.value)!==false){h.select(i.value)}};g.add(i)}});h.onRenderMenu.dispatch(h,g);h.menu=g},postRender:function(){var g=this,h=g.classPrefix;b.add(g.id,"click",g.showMenu,g);b.add(g.id,"keydown",function(i){if(i.keyCode==32){g.showMenu(i);b.cancel(i)}});b.add(g.id,"focus",function(){if(!g._focused){g.keyDownHandler=b.add(g.id,"keydown",function(i){if(i.keyCode==40){g.showMenu();b.cancel(i)}});g.keyPressHandler=b.add(g.id,"keypress",function(j){var i;if(j.keyCode==13){i=g.selectedValue;g.selectedValue=null;b.cancel(j);g.settings.onselect(i)}})}g._focused=1});b.add(g.id,"blur",function(){b.remove(g.id,"keydown",g.keyDownHandler);b.remove(g.id,"keypress",g.keyPressHandler);g._focused=0});if(e.isIE6||!d.boxModel){b.add(g.id,"mouseover",function(){if(!d.hasClass(g.id,h+"Disabled")){d.addClass(g.id,h+"Hover")}});b.add(g.id,"mouseout",function(){if(!d.hasClass(g.id,h+"Disabled")){d.removeClass(g.id,h+"Hover")}})}g.onPostRender.dispatch(g,d.get(g.id))},destroy:function(){this.parent();b.clear(this.id+"_text");b.clear(this.id+"_open")}})})(tinymce);(function(e){var d=e.DOM,b=e.dom.Event,f=e.each,a=e.util.Dispatcher,c;e.create("tinymce.ui.NativeListBox:tinymce.ui.ListBox",{NativeListBox:function(h,g){this.parent(h,g);this.classPrefix="mceNativeListBox"},setDisabled:function(g){d.get(this.id).disabled=g;this.setAriaProperty("disabled",g)},isDisabled:function(){return d.get(this.id).disabled},select:function(h){var g=this,j,i;if(h==c){return g.selectByIndex(-1)}if(h&&typeof(h)=="function"){i=h}else{i=function(k){return k==h}}if(h!=g.selectedValue){f(g.items,function(l,k){if(i(l.value)){j=1;g.selectByIndex(k);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(g){d.get(this.id).selectedIndex=g+1;this.selectedValue=this.items[g]?this.items[g].value:null},add:function(k,h,g){var j,i=this;g=g||{};g.value=h;if(i.isRendered()){d.add(d.get(this.id),"option",g,k)}j={title:k,value:h,attribs:g};i.items.push(j);i.onAdd.dispatch(i,j)},getLength:function(){return this.items.length},renderHTML:function(){var i,g=this;i=d.createHTML("option",{value:""},"-- "+g.settings.title+" --");f(g.items,function(h){i+=d.createHTML("option",{value:h.value},h.title)});i=d.createHTML("select",{id:g.id,"class":"mceNativeListBox","aria-labelledby":g.id+"_aria"},i);i+=d.createHTML("span",{id:g.id+"_aria",style:"display: none"},g.settings.title);return i},postRender:function(){var h=this,i,j=true;h.rendered=true;function g(l){var k=h.items[l.target.selectedIndex-1];if(k&&(k=k.value)){h.onChange.dispatch(h,k);if(h.settings.onselect){h.settings.onselect(k)}}}b.add(h.id,"change",g);b.add(h.id,"keydown",function(l){var k;b.remove(h.id,"change",i);j=false;k=b.add(h.id,"blur",function(){if(j){return}j=true;b.add(h.id,"change",g);b.remove(h.id,"blur",k)});if(e.isWebKit&&(l.keyCode==37||l.keyCode==39)){return b.prevent(l)}if(l.keyCode==13||l.keyCode==32){g(l);return b.cancel(l)}});h.onPostRender.dispatch(h,d.get(h.id))}})})(tinymce);(function(c){var b=c.DOM,a=c.dom.Event,d=c.each;c.create("tinymce.ui.MenuButton:tinymce.ui.Button",{MenuButton:function(g,f,e){this.parent(g,f,e);this.onRenderMenu=new c.util.Dispatcher(this);f.menu_container=f.menu_container||b.doc.body},showMenu:function(){var g=this,j,i,h=b.get(g.id),f;if(g.isDisabled()){return}if(!g.isMenuRendered){g.renderMenu();g.isMenuRendered=true}if(g.isMenuVisible){return g.hideMenu()}j=b.getPos(g.settings.menu_container);i=b.getPos(h);f=g.menu;f.settings.offset_x=i.x;f.settings.offset_y=i.y;f.settings.vp_offset_x=i.x;f.settings.vp_offset_y=i.y;f.settings.keyboard_focus=g._focused;f.showMenu(0,h.firstChild.clientHeight);a.add(b.doc,"mousedown",g.hideMenu,g);g.setState("Selected",1);g.isMenuVisible=1},renderMenu:function(){var f=this,e;e=f.settings.control_manager.createDropMenu(f.id+"_menu",{menu_line:1,"class":this.classPrefix+"Menu",icons:f.settings.icons});e.onHideMenu.add(function(){f.hideMenu();f.focus()});f.onRenderMenu.dispatch(f,e);f.menu=e},hideMenu:function(g){var f=this;if(g&&g.type=="mousedown"&&b.getParent(g.target,function(h){return h.id===f.id||h.id===f.id+"_open"})){return}if(!g||!b.getParent(g.target,".mceMenu")){f.setState("Selected",0);a.remove(b.doc,"mousedown",f.hideMenu,f);if(f.menu){f.menu.hideMenu()}}f.isMenuVisible=0},postRender:function(){var e=this,f=e.settings;a.add(e.id,"click",function(){if(!e.isDisabled()){if(f.onclick){f.onclick(e.value)}e.showMenu()}})}})})(tinymce);(function(c){var b=c.DOM,a=c.dom.Event,d=c.each;c.create("tinymce.ui.SplitButton:tinymce.ui.MenuButton",{SplitButton:function(g,f,e){this.parent(g,f,e);this.classPrefix="mceSplitButton"},renderHTML:function(){var i,f=this,g=f.settings,e;i="<tbody><tr>";if(g.image){e=b.createHTML("img ",{src:g.image,role:"presentation","class":"mceAction "+g["class"]})}else{e=b.createHTML("span",{"class":"mceAction "+g["class"]},"")}e+=b.createHTML("span",{"class":"mceVoiceLabel mceIconOnly",id:f.id+"_voice",style:"display:none;"},g.title);i+="<td >"+b.createHTML("a",{role:"button",id:f.id+"_action",tabindex:"-1",href:"javascript:;","class":"mceAction "+g["class"],onclick:"return false;",onmousedown:"return false;",title:g.title},e)+"</td>";e=b.createHTML("span",{"class":"mceOpen "+g["class"]},'<span style="display:none;" class="mceIconOnly" aria-hidden="true">\u25BC</span>');i+="<td >"+b.createHTML("a",{role:"button",id:f.id+"_open",tabindex:"-1",href:"javascript:;","class":"mceOpen "+g["class"],onclick:"return false;",onmousedown:"return false;",title:g.title},e)+"</td>";i+="</tr></tbody>";i=b.createHTML("table",{role:"presentation","class":"mceSplitButton mceSplitButtonEnabled "+g["class"],cellpadding:"0",cellspacing:"0",title:g.title},i);return b.createHTML("div",{id:f.id,role:"button",tabindex:"0","aria-labelledby":f.id+"_voice","aria-haspopup":"true"},i)},postRender:function(){var e=this,g=e.settings,f;if(g.onclick){f=function(h){if(!e.isDisabled()){g.onclick(e.value);a.cancel(h)}};a.add(e.id+"_action","click",f);a.add(e.id,["click","keydown"],function(h){var k=32,m=14,i=13,j=38,l=40;if((h.keyCode===32||h.keyCode===13||h.keyCode===14)&&!h.altKey&&!h.ctrlKey&&!h.metaKey){f();a.cancel(h)}else{if(h.type==="click"||h.keyCode===l){e.showMenu();a.cancel(h)}}})}a.add(e.id+"_open","click",function(h){e.showMenu();a.cancel(h)});a.add([e.id,e.id+"_open"],"focus",function(){e._focused=1});a.add([e.id,e.id+"_open"],"blur",function(){e._focused=0});if(c.isIE6||!b.boxModel){a.add(e.id,"mouseover",function(){if(!b.hasClass(e.id,"mceSplitButtonDisabled")){b.addClass(e.id,"mceSplitButtonHover")}});a.add(e.id,"mouseout",function(){if(!b.hasClass(e.id,"mceSplitButtonDisabled")){b.removeClass(e.id,"mceSplitButtonHover")}})}},destroy:function(){this.parent();a.clear(this.id+"_action");a.clear(this.id+"_open");a.clear(this.id)}})})(tinymce);(function(d){var c=d.DOM,a=d.dom.Event,b=d.is,e=d.each;d.create("tinymce.ui.ColorSplitButton:tinymce.ui.SplitButton",{ColorSplitButton:function(i,h,f){var g=this;g.parent(i,h,f);g.settings=h=d.extend({colors:"000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF",grid_width:8,default_color:"#888888"},g.settings);g.onShowMenu=new d.util.Dispatcher(g);g.onHideMenu=new d.util.Dispatcher(g);g.value=h.default_color},showMenu:function(){var f=this,g,j,i,h;if(f.isDisabled()){return}if(!f.isMenuRendered){f.renderMenu();f.isMenuRendered=true}if(f.isMenuVisible){return f.hideMenu()}i=c.get(f.id);c.show(f.id+"_menu");c.addClass(i,"mceSplitButtonSelected");h=c.getPos(i);c.setStyles(f.id+"_menu",{left:h.x,top:h.y+i.firstChild.clientHeight,zIndex:200000});i=0;a.add(c.doc,"mousedown",f.hideMenu,f);f.onShowMenu.dispatch(f);if(f._focused){f._keyHandler=a.add(f.id+"_menu","keydown",function(k){if(k.keyCode==27){f.hideMenu()}});c.select("a",f.id+"_menu")[0].focus()}f.keyboardNav=new d.ui.KeyboardNavigation({root:f.id+"_menu",items:c.select("a",f.id+"_menu"),onCancel:function(){f.hideMenu();f.focus()}});f.keyboardNav.focus();f.isMenuVisible=1},hideMenu:function(g){var f=this;if(f.isMenuVisible){if(g&&g.type=="mousedown"&&c.getParent(g.target,function(h){return h.id===f.id+"_open"})){return}if(!g||!c.getParent(g.target,".mceSplitButtonMenu")){c.removeClass(f.id,"mceSplitButtonSelected");a.remove(c.doc,"mousedown",f.hideMenu,f);a.remove(f.id+"_menu","keydown",f._keyHandler);c.hide(f.id+"_menu")}f.isMenuVisible=0;f.onHideMenu.dispatch();f.keyboardNav.destroy()}},renderMenu:function(){var p=this,h,k=0,q=p.settings,g,j,l,o,f;o=c.add(q.menu_container,"div",{role:"listbox",id:p.id+"_menu","class":q.menu_class+" "+q["class"],style:"position:absolute;left:0;top:-1000px;"});h=c.add(o,"div",{"class":q["class"]+" mceSplitButtonMenu"});c.add(h,"span",{"class":"mceMenuLine"});g=c.add(h,"table",{role:"presentation","class":"mceColorSplitMenu"});j=c.add(g,"tbody");k=0;e(b(q.colors,"array")?q.colors:q.colors.split(","),function(m){m=m.replace(/^#/,"");if(!k--){l=c.add(j,"tr");k=q.grid_width-1}g=c.add(l,"td");var i={href:"javascript:;",style:{backgroundColor:"#"+m},title:p.editor.getLang("colors."+m,m),"data-mce-color":"#"+m};if(!d.isIE){i.role="option"}g=c.add(g,"a",i);if(p.editor.forcedHighContrastMode){g=c.add(g,"canvas",{width:16,height:16,"aria-hidden":"true"});if(g.getContext&&(f=g.getContext("2d"))){f.fillStyle="#"+m;f.fillRect(0,0,16,16)}else{c.remove(g)}}});if(q.more_colors_func){g=c.add(j,"tr");g=c.add(g,"td",{colspan:q.grid_width,"class":"mceMoreColors"});g=c.add(g,"a",{role:"option",id:p.id+"_more",href:"javascript:;",onclick:"return false;","class":"mceMoreColors"},q.more_colors_title);a.add(g,"click",function(i){q.more_colors_func.call(q.more_colors_scope||this);return a.cancel(i)})}c.addClass(h,"mceColorSplitMenu");a.add(p.id+"_menu","mousedown",function(i){return a.cancel(i)});a.add(p.id+"_menu","click",function(i){var m;i=c.getParent(i.target,"a",j);if(i&&i.nodeName.toLowerCase()=="a"&&(m=i.getAttribute("data-mce-color"))){p.setColor(m)}return false});return o},setColor:function(f){this.displayColor(f);this.hideMenu();this.settings.onselect(f)},displayColor:function(g){var f=this;c.setStyle(f.id+"_preview","backgroundColor",g);f.value=g},postRender:function(){var f=this,g=f.id;f.parent();c.add(g+"_action","div",{id:g+"_preview","class":"mceColorPreview"});c.setStyle(f.id+"_preview","backgroundColor",f.value)},destroy:function(){var f=this;f.parent();a.clear(f.id+"_menu");a.clear(f.id+"_more");c.remove(f.id+"_menu");if(f.keyboardNav){f.keyboardNav.destroy()}}})})(tinymce);(function(b){var d=b.DOM,c=b.each,a=b.dom.Event;b.create("tinymce.ui.ToolbarGroup:tinymce.ui.Container",{renderHTML:function(){var f=this,i=[],e=f.controls,j=b.each,g=f.settings;i.push('<div id="'+f.id+'" role="group" aria-labelledby="'+f.id+'_voice">');i.push("<span role='application'>");i.push('<span id="'+f.id+'_voice" class="mceVoiceLabel" style="display:none;">'+d.encode(g.name)+"</span>");j(e,function(h){i.push(h.renderHTML())});i.push("</span>");i.push("</div>");return i.join("")},focus:function(){var e=this;d.get(e.id).focus()},postRender:function(){var f=this,e=[];c(f.controls,function(g){c(g.controls,function(h){if(h.id){e.push(h)}})});f.keyNav=new b.ui.KeyboardNavigation({root:f.id,items:e,onCancel:function(){if(b.isWebKit){d.get(f.editor.id+"_ifr").focus()}f.editor.focus()},excludeFromTabOrder:!f.settings.tab_focus_toolbar})},destroy:function(){var e=this;e.parent();e.keyNav.destroy();a.clear(e.id)}})})(tinymce);(function(a){var c=a.DOM,b=a.each;a.create("tinymce.ui.Toolbar:tinymce.ui.Container",{renderHTML:function(){var m=this,f="",j,k,n=m.settings,e,d,g,l;l=m.controls;for(e=0;e<l.length;e++){k=l[e];d=l[e-1];g=l[e+1];if(e===0){j="mceToolbarStart";if(k.Button){j+=" mceToolbarStartButton"}else{if(k.SplitButton){j+=" mceToolbarStartSplitButton"}else{if(k.ListBox){j+=" mceToolbarStartListBox"}}}f+=c.createHTML("td",{"class":j},c.createHTML("span",null,"<!-- IE -->"))}if(d&&k.ListBox){if(d.Button||d.SplitButton){f+=c.createHTML("td",{"class":"mceToolbarEnd"},c.createHTML("span",null,"<!-- IE -->"))}}if(c.stdMode){f+='<td style="position: relative">'+k.renderHTML()+"</td>"}else{f+="<td>"+k.renderHTML()+"</td>"}if(g&&k.ListBox){if(g.Button||g.SplitButton){f+=c.createHTML("td",{"class":"mceToolbarStart"},c.createHTML("span",null,"<!-- IE -->"))}}}j="mceToolbarEnd";if(k.Button){j+=" mceToolbarEndButton"}else{if(k.SplitButton){j+=" mceToolbarEndSplitButton"}else{if(k.ListBox){j+=" mceToolbarEndListBox"}}}f+=c.createHTML("td",{"class":j},c.createHTML("span",null,"<!-- IE -->"));return c.createHTML("table",{id:m.id,"class":"mceToolbar"+(n["class"]?" "+n["class"]:""),cellpadding:"0",cellspacing:"0",align:m.settings.align||"",role:"presentation",tabindex:"-1"},"<tbody><tr>"+f+"</tr></tbody>")}})})(tinymce);(function(b){var a=b.util.Dispatcher,c=b.each;b.create("tinymce.AddOnManager",{AddOnManager:function(){var d=this;d.items=[];d.urls={};d.lookup={};d.onAdd=new a(d)},get:function(d){if(this.lookup[d]){return this.lookup[d].instance}else{return undefined}},dependencies:function(e){var d;if(this.lookup[e]){d=this.lookup[e].dependencies}return d||[]},requireLangPack:function(e){var d=b.settings;if(d&&d.language&&d.language_load!==false){b.ScriptLoader.add(this.urls[e]+"/langs/"+d.language+".js")}},add:function(f,e,d){this.items.push(e);this.lookup[f]={instance:e,dependencies:d};this.onAdd.dispatch(this,f,e);return e},createUrl:function(d,e){if(typeof e==="object"){return e}else{return{prefix:d.prefix,resource:e,suffix:d.suffix}}},addComponents:function(f,d){var e=this.urls[f];b.each(d,function(g){b.ScriptLoader.add(e+"/"+g)})},load:function(j,f,d,h){var g=this,e=f;function i(){var k=g.dependencies(j);b.each(k,function(m){var l=g.createUrl(f,m);g.load(l.resource,l,undefined,undefined)});if(d){if(h){d.call(h)}else{d.call(b.ScriptLoader)}}}if(g.urls[j]){return}if(typeof f==="object"){e=f.prefix+f.resource+f.suffix}if(e.indexOf("/")!==0&&e.indexOf("://")==-1){e=b.baseURL+"/"+e}g.urls[j]=e.substring(0,e.lastIndexOf("/"));if(g.lookup[j]){i()}else{b.ScriptLoader.add(e,i,h)}}});b.PluginManager=new b.AddOnManager();b.ThemeManager=new b.AddOnManager()}(tinymce));(function(j){var g=j.each,d=j.extend,k=j.DOM,i=j.dom.Event,f=j.ThemeManager,b=j.PluginManager,e=j.explode,h=j.util.Dispatcher,a,c=0;j.documentBaseURL=window.location.href.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,"");if(!/[\/\\]$/.test(j.documentBaseURL)){j.documentBaseURL+="/"}j.baseURL=new j.util.URI(j.documentBaseURL).toAbsolute(j.baseURL);j.baseURI=new j.util.URI(j.baseURL);j.onBeforeUnload=new h(j);i.add(window,"beforeunload",function(l){j.onBeforeUnload.dispatch(j,l)});j.onAddEditor=new h(j);j.onRemoveEditor=new h(j);j.EditorManager=d(j,{editors:[],i18n:{},activeEditor:null,init:function(x){var v=this,o,n=j.ScriptLoader,u,l=[],r;function q(t){var s=t.id;if(!s){s=t.name;if(s&&!k.get(s)){s=t.name}else{s=k.uniqueId()}t.setAttribute("id",s)}return s}function m(z,A,t){var y=z[A];if(!y){return}if(j.is(y,"string")){t=y.replace(/\.\w+$/,"");t=t?j.resolve(t):0;y=j.resolve(y)}return y.apply(t||this,Array.prototype.slice.call(arguments,2))}function p(t,s){return s.constructor===RegExp?s.test(t.className):k.hasClass(t,s)}v.settings=x;i.bind(window,"ready",function(){var s,t;m(x,"onpageload");switch(x.mode){case"exact":s=x.elements||"";if(s.length>0){g(e(s),function(y){if(k.get(y)){r=new j.Editor(y,x);l.push(r);r.render(1)}else{g(document.forms,function(z){g(z.elements,function(A){if(A.name===y){y="mce_editor_"+c++;k.setAttrib(A,"id",y);r=new j.Editor(y,x);l.push(r);r.render(1)}})})}})}break;case"textareas":case"specific_textareas":g(k.select("textarea"),function(y){if(x.editor_deselector&&p(y,x.editor_deselector)){return}if(!x.editor_selector||p(y,x.editor_selector)){r=new j.Editor(q(y),x);l.push(r);r.render(1)}});break;default:if(x.types){g(x.types,function(y){g(k.select(y.selector),function(A){var z=new j.Editor(q(A),j.extend({},x,y));l.push(z);z.render(1)})})}else{if(x.selector){g(k.select(x.selector),function(z){var y=new j.Editor(q(z),x);l.push(y);y.render(1)})}}}if(x.oninit){s=t=0;g(l,function(y){t++;if(!y.initialized){y.onInit.add(function(){s++;if(s==t){m(x,"oninit")}})}else{s++}if(s==t){m(x,"oninit")}})}})},get:function(l){if(l===a){return this.editors}if(!this.editors.hasOwnProperty(l)){return a}return this.editors[l]},getInstanceById:function(l){return this.get(l)},add:function(m){var l=this,n=l.editors;n[m.id]=m;n.push(m);l._setActive(m);l.onAddEditor.dispatch(l,m);return m},remove:function(n){var m=this,l,o=m.editors;if(!o[n.id]){return null}delete o[n.id];for(l=0;l<o.length;l++){if(o[l]==n){o.splice(l,1);break}}if(m.activeEditor==n){m._setActive(o[0])}n.destroy();m.onRemoveEditor.dispatch(m,n);return n},execCommand:function(r,p,o){var q=this,n=q.get(o),l;function m(){n.destroy();l.detachEvent("onunload",m);l=l.tinyMCE=l.tinymce=null}switch(r){case"mceFocus":n.focus();return true;case"mceAddEditor":case"mceAddControl":if(!q.get(o)){new j.Editor(o,q.settings).render()}return true;case"mceAddFrameControl":l=o.window;l.tinyMCE=tinyMCE;l.tinymce=j;j.DOM.doc=l.document;j.DOM.win=l;n=new j.Editor(o.element_id,o);n.render();if(j.isIE){l.attachEvent("onunload",m)}o.page_window=null;return true;case"mceRemoveEditor":case"mceRemoveControl":if(n){n.remove()}return true;case"mceToggleEditor":if(!n){q.execCommand("mceAddControl",0,o);return true}if(n.isHidden()){n.show()}else{n.hide()}return true}if(q.activeEditor){return q.activeEditor.execCommand(r,p,o)}return false},execInstanceCommand:function(p,o,n,m){var l=this.get(p);if(l){return l.execCommand(o,n,m)}return false},triggerSave:function(){g(this.editors,function(l){l.save()})},addI18n:function(n,q){var l,m=this.i18n;if(!j.is(n,"string")){g(n,function(r,p){g(r,function(t,s){g(t,function(v,u){if(s==="common"){m[p+"."+u]=v}else{m[p+"."+s+"."+u]=v}})})})}else{g(q,function(r,p){m[n+"."+p]=r})}},_setActive:function(l){this.selectedInstance=this.activeEditor=l}})})(tinymce);(function(k){var l=k.DOM,j=k.dom.Event,f=k.extend,i=k.each,a=k.isGecko,b=k.isIE,e=k.isWebKit,d=k.is,h=k.ThemeManager,c=k.PluginManager,g=k.explode;k.create("tinymce.Editor",{Editor:function(p,o){var m=this,n=true;m.settings=o=f({id:p,language:"en",theme:"advanced",skin:"default",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:k.documentBaseURL,add_form_submit_trigger:n,submit_patch:n,add_unload_trigger:n,convert_urls:n,relative_urls:n,remove_script_host:n,table_inline_editing:false,object_resizing:n,accessibility_focus:n,doctype:k.isIE6?'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">':"<!DOCTYPE>",visual:n,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",apply_source_formatting:n,directionality:"ltr",forced_root_block:"p",hidden_input:n,padd_empty_editor:n,render_ui:n,indentation:"30px",fix_table_elements:n,inline_styles:n,convert_fonts_to_spans:n,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",validate:n,entity_encoding:"named",url_converter:m.convertURL,url_converter_scope:m,ie7_compat:n},o);m.id=m.editorId=p;m.isNotDirty=false;m.plugins={};m.documentBaseURI=new k.util.URI(o.document_base_url||k.documentBaseURL,{base_uri:tinyMCE.baseURI});m.baseURI=k.baseURI;m.contentCSS=[];m.contentStyles=[];m.setupEvents();m.execCommands={};m.queryStateCommands={};m.queryValueCommands={};m.execCallback("setup",m)},render:function(o){var p=this,q=p.settings,r=p.id,m=k.ScriptLoader;if(!j.domLoaded){j.add(window,"ready",function(){p.render()});return}tinyMCE.settings=q;if(!p.getElement()){return}if(k.isIDevice&&!k.isIOS5){return}if(!/TEXTAREA|INPUT/i.test(p.getElement().nodeName)&&q.hidden_input&&l.getParent(r,"form")){l.insertAfter(l.create("input",{type:"hidden",name:r}),r)}if(!q.content_editable){p.orgVisibility=p.getElement().style.visibility;p.getElement().style.visibility="hidden"}if(k.WindowManager){p.windowManager=new k.WindowManager(p)}if(q.encoding=="xml"){p.onGetContent.add(function(s,t){if(t.save){t.content=l.encode(t.content)}})}if(q.add_form_submit_trigger){p.onSubmit.addToTop(function(){if(p.initialized){p.save();p.isNotDirty=1}})}if(q.add_unload_trigger){p._beforeUnload=tinyMCE.onBeforeUnload.add(function(){if(p.initialized&&!p.destroyed&&!p.isHidden()){p.save({format:"raw",no_events:true})}})}k.addUnload(p.destroy,p);if(q.submit_patch){p.onBeforeRenderUI.add(function(){var s=p.getElement().form;if(!s){return}if(s._mceOldSubmit){return}if(!s.submit.nodeType&&!s.submit.length){p.formElement=s;s._mceOldSubmit=s.submit;s.submit=function(){k.triggerSave();p.isNotDirty=1;return p.formElement._mceOldSubmit(p.formElement)}}s=null})}function n(){if(q.language&&q.language_load!==false){m.add(k.baseURL+"/langs/"+q.language+".js")}if(q.theme&&typeof q.theme!="function"&&q.theme.charAt(0)!="-"&&!h.urls[q.theme]){h.load(q.theme,"themes/"+q.theme+"/editor_template"+k.suffix+".js")}i(g(q.plugins),function(t){if(t&&!c.urls[t]){if(t.charAt(0)=="-"){t=t.substr(1,t.length);var s=c.dependencies(t);i(s,function(v){var u={prefix:"plugins/",resource:v,suffix:"/editor_plugin"+k.suffix+".js"};v=c.createUrl(u,v);c.load(v.resource,v)})}else{if(t=="safari"){return}c.load(t,{prefix:"plugins/",resource:t,suffix:"/editor_plugin"+k.suffix+".js"})}}});m.loadQueue(function(){if(!p.removed){p.init()}})}n()},init:function(){var q,G=this,H=G.settings,D,y,z,C=G.getElement(),p,m,E,v,B,F,x,r=[];k.add(G);H.aria_label=H.aria_label||l.getAttrib(C,"aria-label",G.getLang("aria.rich_text_area"));if(H.theme){if(typeof H.theme!="function"){H.theme=H.theme.replace(/-/,"");p=h.get(H.theme);G.theme=new p();if(G.theme.init){G.theme.init(G,h.urls[H.theme]||k.documentBaseURL.replace(/\/$/,""))}}else{G.theme=H.theme}}function A(s){var t=c.get(s),o=c.urls[s]||k.documentBaseURL.replace(/\/$/,""),n;if(t&&k.inArray(r,s)===-1){i(c.dependencies(s),function(u){A(u)});n=new t(G,o);G.plugins[s]=n;if(n.init){n.init(G,o);r.push(s)}}}i(g(H.plugins.replace(/\-/g,"")),A);if(H.popup_css!==false){if(H.popup_css){H.popup_css=G.documentBaseURI.toAbsolute(H.popup_css)}else{H.popup_css=G.baseURI.toAbsolute("themes/"+H.theme+"/skins/"+H.skin+"/dialog.css")}}if(H.popup_css_add){H.popup_css+=","+G.documentBaseURI.toAbsolute(H.popup_css_add)}G.controlManager=new k.ControlManager(G);G.onBeforeRenderUI.dispatch(G,G.controlManager);if(H.render_ui&&G.theme){G.orgDisplay=C.style.display;if(typeof H.theme!="function"){D=H.width||C.style.width||C.offsetWidth;y=H.height||C.style.height||C.offsetHeight;z=H.min_height||100;F=/^[0-9\.]+(|px)$/i;if(F.test(""+D)){D=Math.max(parseInt(D,10)+(p.deltaWidth||0),100)}if(F.test(""+y)){y=Math.max(parseInt(y,10)+(p.deltaHeight||0),z)}p=G.theme.renderUI({targetNode:C,width:D,height:y,deltaWidth:H.delta_width,deltaHeight:H.delta_height});l.setStyles(p.sizeContainer||p.editorContainer,{width:D,height:y});y=(p.iframeHeight||y)+(typeof(y)=="number"?(p.deltaHeight||0):"");if(y<z){y=z}}else{p=H.theme(G,C);if(p.editorContainer.nodeType){p.editorContainer=p.editorContainer.id=p.editorContainer.id||G.id+"_parent"}if(p.iframeContainer.nodeType){p.iframeContainer=p.iframeContainer.id=p.iframeContainer.id||G.id+"_iframecontainer"}y=p.iframeHeight||C.offsetHeight;if(b){G.onInit.add(function(n){n.dom.bind(n.getBody(),"beforedeactivate keydown",function(){n.lastIERng=n.selection.getRng()})})}}G.editorContainer=p.editorContainer}if(H.content_css){i(g(H.content_css),function(n){G.contentCSS.push(G.documentBaseURI.toAbsolute(n))})}if(H.content_style){G.contentStyles.push(H.content_style)}if(H.content_editable){C=q=p=null;return G.initContentBody()}if(document.domain&&location.hostname!=document.domain){k.relaxedDomain=document.domain}G.iframeHTML=H.doctype+'<html><head xmlns="http://www.w3.org/1999/xhtml">';if(H.document_base_url!=k.documentBaseURL){G.iframeHTML+='<base href="'+G.documentBaseURI.getURI()+'" />'}if(H.ie7_compat){G.iframeHTML+='<meta http-equiv="X-UA-Compatible" content="IE=7" />'}else{G.iframeHTML+='<meta http-equiv="X-UA-Compatible" content="IE=edge" />'}G.iframeHTML+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';for(x=0;x<G.contentCSS.length;x++){G.iframeHTML+='<link type="text/css" rel="stylesheet" href="'+G.contentCSS[x]+'" />'}G.contentCSS=[];v=H.body_id||"tinymce";if(v.indexOf("=")!=-1){v=G.getParam("body_id","","hash");v=v[G.id]||v}B=H.body_class||"";if(B.indexOf("=")!=-1){B=G.getParam("body_class","","hash");B=B[G.id]||""}G.iframeHTML+='</head><body id="'+v+'" class="mceContentBody '+B+'" onload="window.parent.tinyMCE.get(\''+G.id+"').onLoad.dispatch();\"><br></body></html>";if(k.relaxedDomain&&(b||(k.isOpera&&parseFloat(opera.version())<11))){E='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+G.id+'");document.write(ed.iframeHTML);document.close();ed.initContentBody();})()'}q=l.add(p.iframeContainer,"iframe",{id:G.id+"_ifr",src:E||'javascript:""',frameBorder:"0",allowTransparency:"true",title:H.aria_label,style:{width:"100%",height:y,display:"block"}});G.contentAreaContainer=p.iframeContainer;if(p.editorContainer){l.get(p.editorContainer).style.display=G.orgDisplay}C.style.visibility=G.orgVisibility;l.get(G.id).style.display="none";l.setAttrib(G.id,"aria-hidden",true);if(!k.relaxedDomain||!E){G.initContentBody()}C=q=p=null},initContentBody:function(){var n=this,p=n.settings,q=l.get(n.id),r=n.getDoc(),o,m,s;if((!b||!k.relaxedDomain)&&!p.content_editable){r.open();r.write(n.iframeHTML);r.close();if(k.relaxedDomain){r.domain=k.relaxedDomain}}if(p.content_editable){l.addClass(q,"mceContentBody");n.contentDocument=r=p.content_document||document;n.contentWindow=p.content_window||window;n.bodyElement=q;p.content_document=p.content_window=null}m=n.getBody();m.disabled=true;if(!p.readonly){m.contentEditable=n.getParam("content_editable_state",true)}m.disabled=false;n.schema=new k.html.Schema(p);n.dom=new k.dom.DOMUtils(r,{keep_values:true,url_converter:n.convertURL,url_converter_scope:n,hex_colors:p.force_hex_style_colors,class_filter:p.class_filter,update_styles:true,root_element:p.content_editable?n.id:null,schema:n.schema});n.parser=new k.html.DomParser(p,n.schema);n.parser.addAttributeFilter("src,href,style",function(t,u){var v=t.length,y,A=n.dom,z,x;while(v--){y=t[v];z=y.attr(u);x="data-mce-"+u;if(!y.attributes.map[x]){if(u==="style"){y.attr(x,A.serializeStyle(A.parseStyle(z),y.name))}else{y.attr(x,n.convertURL(z,u,y.name))}}}});n.parser.addNodeFilter("script",function(t,u){var v=t.length,x;while(v--){x=t[v];x.attr("type","mce-"+(x.attr("type")||"text/javascript"))}});n.parser.addNodeFilter("#cdata",function(t,u){var v=t.length,x;while(v--){x=t[v];x.type=8;x.name="#comment";x.value="[CDATA["+x.value+"]]"}});n.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(u,v){var x=u.length,y,t=n.schema.getNonEmptyElements();while(x--){y=u[x];if(y.isEmpty(t)){y.empty().append(new k.html.Node("br",1)).shortEnded=true}}});n.serializer=new k.dom.Serializer(p,n.dom,n.schema);n.selection=new k.dom.Selection(n.dom,n.getWin(),n.serializer,n);n.formatter=new k.Formatter(n);n.undoManager=new k.UndoManager(n);n.forceBlocks=new k.ForceBlocks(n);n.enterKey=new k.EnterKey(n);n.editorCommands=new k.EditorCommands(n);n.onExecCommand.add(function(t,u){if(!/^(FontName|FontSize)$/.test(u)){n.nodeChanged()}});n.serializer.onPreProcess.add(function(t,u){return n.onPreProcess.dispatch(n,u,t)});n.serializer.onPostProcess.add(function(t,u){return n.onPostProcess.dispatch(n,u,t)});n.onPreInit.dispatch(n);if(!p.browser_spellcheck&&!p.gecko_spellcheck){r.body.spellcheck=false}if(!p.readonly){n.bindNativeEvents()}n.controlManager.onPostRender.dispatch(n,n.controlManager);n.onPostRender.dispatch(n);n.quirks=k.util.Quirks(n);if(p.directionality){m.dir=p.directionality}if(p.nowrap){m.style.whiteSpace="nowrap"}if(p.protect){n.onBeforeSetContent.add(function(t,u){i(p.protect,function(v){u.content=u.content.replace(v,function(x){return"<!--mce:protected "+escape(x)+"-->"})})})}n.onSetContent.add(function(){n.addVisual(n.getBody())});if(p.padd_empty_editor){n.onPostProcess.add(function(t,u){u.content=u.content.replace(/^(<p[^>]*>(&nbsp;|&#160;|\s|\u00a0|)<\/p>[\r\n]*|<br \/>[\r\n]*)$/,"")})}n.load({initial:true,format:"html"});n.startContent=n.getContent({format:"raw"});n.initialized=true;n.onInit.dispatch(n);n.execCallback("setupcontent_callback",n.id,m,r);n.execCallback("init_instance_callback",n);n.focus(true);n.nodeChanged({initial:true});if(n.contentStyles.length>0){s="";i(n.contentStyles,function(t){s+=t+"\r\n"});n.dom.addStyle(s)}i(n.contentCSS,function(t){n.dom.loadCSS(t)});if(p.auto_focus){setTimeout(function(){var t=k.get(p.auto_focus);t.selection.select(t.getBody(),1);t.selection.collapse(1);t.getBody().focus();t.getWin().focus()},100)}q=r=m=null},focus:function(p){var o,u=this,t=u.selection,q=u.settings.content_editable,n,r,s=u.getDoc(),m;if(!p){if(u.lastIERng){t.setRng(u.lastIERng)}n=t.getRng();if(n.item){r=n.item(0)}u._refreshContentEditable();if(!q){u.getWin().focus()}if(k.isGecko||q){m=u.getBody();if(m.setActive){m.setActive()}else{m.focus()}if(q){t.normalize()}}if(r&&r.ownerDocument==s){n=s.body.createControlRange();n.addElement(r);n.select()}}if(k.activeEditor!=u){if((o=k.activeEditor)!=null){o.onDeactivate.dispatch(o,u)}u.onActivate.dispatch(u,o)}k._setActive(u)},execCallback:function(q){var m=this,p=m.settings[q],o;if(!p){return}if(m.callbackLookup&&(o=m.callbackLookup[q])){p=o.func;o=o.scope}if(d(p,"string")){o=p.replace(/\.\w+$/,"");o=o?k.resolve(o):0;p=k.resolve(p);m.callbackLookup=m.callbackLookup||{};m.callbackLookup[q]={func:p,scope:o}}return p.apply(o||m,Array.prototype.slice.call(arguments,1))},translate:function(m){var o=this.settings.language||"en",n=k.i18n;if(!m){return""}return n[o+"."+m]||m.replace(/\{\#([^\}]+)\}/g,function(q,p){return n[o+"."+p]||"{#"+p+"}"})},getLang:function(o,m){return k.i18n[(this.settings.language||"en")+"."+o]||(d(m)?m:"{#"+o+"}")},getParam:function(t,q,m){var r=k.trim,p=d(this.settings[t])?this.settings[t]:q,s;if(m==="hash"){s={};if(d(p,"string")){i(p.indexOf("=")>0?p.split(/[;,](?![^=;,]*(?:[;,]|$))/):p.split(","),function(n){n=n.split("=");if(n.length>1){s[r(n[0])]=r(n[1])}else{s[r(n[0])]=r(n)}})}else{s=p}return s}return p},nodeChanged:function(q){var m=this,n=m.selection,p;if(m.initialized){q=q||{};p=n.getStart()||m.getBody();p=b&&p.ownerDocument!=m.getDoc()?m.getBody():p;q.parents=[];m.dom.getParent(p,function(o){if(o.nodeName=="BODY"){return true}q.parents.push(o)});m.onNodeChange.dispatch(m,q?q.controlManager||m.controlManager:m.controlManager,p,n.isCollapsed(),q)}},addButton:function(n,o){var m=this;m.buttons=m.buttons||{};m.buttons[n]=o},addCommand:function(m,o,n){this.execCommands[m]={func:o,scope:n||this}},addQueryStateHandler:function(m,o,n){this.queryStateCommands[m]={func:o,scope:n||this}},addQueryValueHandler:function(m,o,n){this.queryValueCommands[m]={func:o,scope:n||this}},addShortcut:function(o,q,m,p){var n=this,r;if(n.settings.custom_shortcuts===false){return false}n.shortcuts=n.shortcuts||{};if(d(m,"string")){r=m;m=function(){n.execCommand(r,false,null)}}if(d(m,"object")){r=m;m=function(){n.execCommand(r[0],r[1],r[2])}}i(g(o),function(s){var t={func:m,scope:p||this,desc:n.translate(q),alt:false,ctrl:false,shift:false};i(g(s,"+"),function(u){switch(u){case"alt":case"ctrl":case"shift":t[u]=true;break;default:t.charCode=u.charCodeAt(0);t.keyCode=u.toUpperCase().charCodeAt(0)}});n.shortcuts[(t.ctrl?"ctrl":"")+","+(t.alt?"alt":"")+","+(t.shift?"shift":"")+","+t.keyCode]=t});return true},execCommand:function(u,r,x,m){var p=this,q=0,v,n;if(!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(u)&&(!m||!m.skip_focus)){p.focus()}m=f({},m);p.onBeforeExecCommand.dispatch(p,u,r,x,m);if(m.terminate){return false}if(p.execCallback("execcommand_callback",p.id,p.selection.getNode(),u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);return true}if(v=p.execCommands[u]){n=v.func.call(v.scope,r,x);if(n!==true){p.onExecCommand.dispatch(p,u,r,x,m);return n}}i(p.plugins,function(o){if(o.execCommand&&o.execCommand(u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);q=1;return false}});if(q){return true}if(p.theme&&p.theme.execCommand&&p.theme.execCommand(u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);return true}if(p.editorCommands.execCommand(u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);return true}p.getDoc().execCommand(u,r,x);p.onExecCommand.dispatch(p,u,r,x,m)},queryCommandState:function(q){var n=this,r,p;if(n._isHidden()){return}if(r=n.queryStateCommands[q]){p=r.func.call(r.scope);if(p!==true){return p}}r=n.editorCommands.queryCommandState(q);if(r!==-1){return r}try{return this.getDoc().queryCommandState(q)}catch(m){}},queryCommandValue:function(r){var n=this,q,p;if(n._isHidden()){return}if(q=n.queryValueCommands[r]){p=q.func.call(q.scope);if(p!==true){return p}}q=n.editorCommands.queryCommandValue(r);if(d(q)){return q}try{return this.getDoc().queryCommandValue(r)}catch(m){}},show:function(){var m=this;l.show(m.getContainer());l.hide(m.id);m.load()},hide:function(){var m=this,n=m.getDoc();if(b&&n){n.execCommand("SelectAll")}m.save();setTimeout(function(){l.hide(m.getContainer())},1);l.setStyle(m.id,"display",m.orgDisplay)},isHidden:function(){return !l.isHidden(this.id)},setProgressState:function(m,n,p){this.onSetProgressState.dispatch(this,m,n,p);return m},load:function(q){var m=this,p=m.getElement(),n;if(p){q=q||{};q.load=true;n=m.setContent(d(p.value)?p.value:p.innerHTML,q);q.element=p;if(!q.no_events){m.onLoadContent.dispatch(m,q)}q.element=p=null;return n}},save:function(r){var m=this,q=m.getElement(),n,p;if(!q||!m.initialized){return}r=r||{};r.save=true;r.element=q;n=r.content=m.getContent(r);if(!r.no_events){m.onSaveContent.dispatch(m,r)}n=r.content;if(!/TEXTAREA|INPUT/i.test(q.nodeName)){q.innerHTML=n;if(p=l.getParent(m.id,"form")){i(p.elements,function(o){if(o.name==m.id){o.value=n;return false}})}}else{q.value=n}r.element=q=null;return n},setContent:function(r,p){var o=this,n,m=o.getBody(),q;p=p||{};p.format=p.format||"html";p.set=true;p.content=r;if(!p.no_events){o.onBeforeSetContent.dispatch(o,p)}r=p.content;if(!k.isIE&&(r.length===0||/^\s+$/.test(r))){q=o.settings.forced_root_block;if(q){r="<"+q+'><br data-mce-bogus="1"></'+q+">"}else{r='<br data-mce-bogus="1">'}m.innerHTML=r;o.selection.select(m,true);o.selection.collapse(true);return}if(p.format!=="raw"){r=new k.html.Serializer({},o.schema).serialize(o.parser.parse(r))}p.content=k.trim(r);o.dom.setHTML(m,p.content);if(!p.no_events){o.onSetContent.dispatch(o,p)}if(!o.settings.content_editable||document.activeElement===o.getBody()){o.selection.normalize()}return p.content},getContent:function(o){var n=this,p,m=n.getBody();o=o||{};o.format=o.format||"html";o.get=true;o.getInner=true;if(!o.no_events){n.onBeforeGetContent.dispatch(n,o)}if(o.format=="raw"){p=m.innerHTML}else{if(o.format=="text"){p=m.innerText||m.textContent}else{p=n.serializer.serialize(m,o)}}if(o.format!="text"){o.content=k.trim(p)}else{o.content=p}if(!o.no_events){n.onGetContent.dispatch(n,o)}return o.content},isDirty:function(){var m=this;return k.trim(m.startContent)!=k.trim(m.getContent({format:"raw",no_events:1}))&&!m.isNotDirty},getContainer:function(){var m=this;if(!m.container){m.container=l.get(m.editorContainer||m.id+"_parent")}return m.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return l.get(this.settings.content_element||this.id)},getWin:function(){var m=this,n;if(!m.contentWindow){n=l.get(m.id+"_ifr");if(n){m.contentWindow=n.contentWindow}}return m.contentWindow},getDoc:function(){var m=this,n;if(!m.contentDocument){n=m.getWin();if(n){m.contentDocument=n.document}}return m.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(o,n,q){var m=this,p=m.settings;if(p.urlconverter_callback){return m.execCallback("urlconverter_callback",o,q,true,n)}if(!p.convert_urls||(q&&q.nodeName=="LINK")||o.indexOf("file:")===0){return o}if(p.relative_urls){return m.documentBaseURI.toRelative(o)}o=m.documentBaseURI.toAbsolute(o,p.remove_script_host);return o},addVisual:function(q){var n=this,o=n.settings,p=n.dom,m;q=q||n.getBody();if(!d(n.hasVisual)){n.hasVisual=o.visual}i(p.select("table,a",q),function(s){var r;switch(s.nodeName){case"TABLE":m=o.visual_table_class||"mceItemTable";r=p.getAttrib(s,"border");if(!r||r=="0"){if(n.hasVisual){p.addClass(s,m)}else{p.removeClass(s,m)}}return;case"A":if(!p.getAttrib(s,"href",false)){r=p.getAttrib(s,"name")||s.id;m="mceItemAnchor";if(r){if(n.hasVisual){p.addClass(s,m)}else{p.removeClass(s,m)}}}return}});n.onVisualAid.dispatch(n,q,n.hasVisual)},remove:function(){var m=this,n=m.getContainer();if(!m.removed){m.removed=1;m.hide();if(!m.settings.content_editable){j.unbind(m.getWin());j.unbind(m.getDoc())}j.unbind(m.getBody());j.clear(n);m.execCallback("remove_instance_callback",m);m.onRemove.dispatch(m);m.onExecCommand.listeners=[];k.remove(m);l.remove(n)}},destroy:function(n){var m=this;if(m.destroyed){return}if(a){j.unbind(m.getDoc());j.unbind(m.getWin());j.unbind(m.getBody())}if(!n){k.removeUnload(m.destroy);tinyMCE.onBeforeUnload.remove(m._beforeUnload);if(m.theme&&m.theme.destroy){m.theme.destroy()}m.controlManager.destroy();m.selection.destroy();m.dom.destroy()}if(m.formElement){m.formElement.submit=m.formElement._mceOldSubmit;m.formElement._mceOldSubmit=null}m.contentAreaContainer=m.formElement=m.container=m.settings.content_element=m.bodyElement=m.contentDocument=m.contentWindow=null;if(m.selection){m.selection=m.selection.win=m.selection.dom=m.selection.dom.doc=null}m.destroyed=1},_refreshContentEditable:function(){var n=this,m,o;if(n._isHidden()){m=n.getBody();o=m.parentNode;o.removeChild(m);o.appendChild(m);m.focus()}},_isHidden:function(){var m;if(!a){return 0}m=this.selection.getSel();return(!m||!m.rangeCount||m.rangeCount===0)}})})(tinymce);(function(a){var b=a.each;a.Editor.prototype.setupEvents=function(){var c=this,d=c.settings;b(["onPreInit","onBeforeRenderUI","onPostRender","onLoad","onInit","onRemove","onActivate","onDeactivate","onClick","onEvent","onMouseUp","onMouseDown","onDblClick","onKeyDown","onKeyUp","onKeyPress","onContextMenu","onSubmit","onReset","onPaste","onPreProcess","onPostProcess","onBeforeSetContent","onBeforeGetContent","onSetContent","onGetContent","onLoadContent","onSaveContent","onNodeChange","onChange","onBeforeExecCommand","onExecCommand","onUndo","onRedo","onVisualAid","onSetProgressState","onSetAttrib"],function(e){c[e]=new a.util.Dispatcher(c)});if(d.cleanup_callback){c.onBeforeSetContent.add(function(e,f){f.content=e.execCallback("cleanup_callback","insert_to_editor",f.content,f)});c.onPreProcess.add(function(e,f){if(f.set){e.execCallback("cleanup_callback","insert_to_editor_dom",f.node,f)}if(f.get){e.execCallback("cleanup_callback","get_from_editor_dom",f.node,f)}});c.onPostProcess.add(function(e,f){if(f.set){f.content=e.execCallback("cleanup_callback","insert_to_editor",f.content,f)}if(f.get){f.content=e.execCallback("cleanup_callback","get_from_editor",f.content,f)}})}if(d.save_callback){c.onGetContent.add(function(e,f){if(f.save){f.content=e.execCallback("save_callback",e.id,f.content,e.getBody())}})}if(d.handle_event_callback){c.onEvent.add(function(f,g,h){if(c.execCallback("handle_event_callback",g,f,h)===false){g.preventDefault();g.stopPropagation()}})}if(d.handle_node_change_callback){c.onNodeChange.add(function(f,e,g){f.execCallback("handle_node_change_callback",f.id,g,-1,-1,true,f.selection.isCollapsed())})}if(d.save_callback){c.onSaveContent.add(function(e,g){var f=e.execCallback("save_callback",e.id,g.content,e.getBody());if(f){g.content=f}})}if(d.onchange_callback){c.onChange.add(function(f,e){f.execCallback("onchange_callback",f,e)})}};a.Editor.prototype.bindNativeEvents=function(){var l=this,f,d=l.settings,e=l.dom,h;h={mouseup:"onMouseUp",mousedown:"onMouseDown",click:"onClick",keyup:"onKeyUp",keydown:"onKeyDown",keypress:"onKeyPress",submit:"onSubmit",reset:"onReset",contextmenu:"onContextMenu",dblclick:"onDblClick",paste:"onPaste"};function c(i,m){var n=i.type;if(l.removed){return}if(l.onEvent.dispatch(l,i,m)!==false){l[h[i.fakeType||i.type]].dispatch(l,i,m)}}function j(i){l.focus(true)}function k(i,m){if(m.keyCode!=65||!a.VK.metaKeyPressed(m)){l.selection.normalize()}l.nodeChanged()}b(h,function(m,n){var i=d.content_editable?l.getBody():l.getDoc();switch(n){case"contextmenu":e.bind(i,n,c);break;case"paste":e.bind(l.getBody(),n,c);break;case"submit":case"reset":e.bind(l.getElement().form||a.DOM.getParent(l.id,"form"),n,c);break;default:e.bind(i,n,c)}});e.bind(d.content_editable?l.getBody():(a.isGecko?l.getDoc():l.getWin()),"focus",function(i){l.focus(true)});if(d.content_editable&&a.isOpera){e.bind(l.getBody(),"click",j);e.bind(l.getBody(),"keydown",j)}l.onMouseUp.add(k);l.onKeyUp.add(function(i,n){var m=n.keyCode;if((m>=33&&m<=36)||(m>=37&&m<=40)||m==13||m==45||m==46||m==8||(a.isMac&&(m==91||m==93))||n.ctrlKey){k(i,n)}});l.onReset.add(function(){l.setContent(l.startContent,{format:"raw"})});function g(m,i){if(m.altKey||m.ctrlKey||m.metaKey){b(l.shortcuts,function(n){var o=a.isMac?m.metaKey:m.ctrlKey;if(n.ctrl!=o||n.alt!=m.altKey||n.shift!=m.shiftKey){return}if(m.keyCode==n.keyCode||(m.charCode&&m.charCode==n.charCode)){m.preventDefault();if(i){n.func.call(n.scope)}return true}})}}l.onKeyUp.add(function(i,m){g(m)});l.onKeyPress.add(function(i,m){g(m)});l.onKeyDown.add(function(i,m){g(m,true)});if(a.isOpera){l.onClick.add(function(i,m){m.preventDefault()})}}})(tinymce);(function(d){var e=d.each,b,a=true,c=false;d.EditorCommands=function(n){var m=n.dom,p=n.selection,j={state:{},exec:{},value:{}},k=n.settings,q=n.formatter,o;function r(z,y,x){var v;z=z.toLowerCase();if(v=j.exec[z]){v(z,y,x);return a}return c}function l(x){var v;x=x.toLowerCase();if(v=j.state[x]){return v(x)}return -1}function h(x){var v;x=x.toLowerCase();if(v=j.value[x]){return v(x)}return c}function u(v,x){x=x||"exec";e(v,function(z,y){e(y.toLowerCase().split(","),function(A){j[x][A]=z})})}d.extend(this,{execCommand:r,queryCommandState:l,queryCommandValue:h,addCommands:u});function f(y,x,v){if(x===b){x=c}if(v===b){v=null}return n.getDoc().execCommand(y,x,v)}function t(v){return q.match(v)}function s(v,x){q.toggle(v,x?{value:x}:b)}function i(v){o=p.getBookmark(v)}function g(){p.moveToBookmark(o)}u({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){n.undoManager.add()},"Cut,Copy,Paste":function(z){var y=n.getDoc(),v;try{f(z)}catch(x){v=a}if(v||!y.queryCommandSupported(z)){if(d.isGecko){n.windowManager.confirm(n.getLang("clipboard_msg"),function(A){if(A){open("http://www.mozilla.org/editor/midasdemo/securityprefs.html","_blank")}})}else{n.windowManager.alert(n.getLang("clipboard_no_support"))}}},unlink:function(v){if(p.isCollapsed()){p.select(p.getNode())}f(v);p.collapse(c)},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(v){var x=v.substring(7);e("left,center,right,full".split(","),function(y){if(x!=y){q.remove("align"+y)}});s("align"+x);r("mceRepaint")},"InsertUnorderedList,InsertOrderedList":function(y){var v,x;f(y);v=m.getParent(p.getNode(),"ol,ul");if(v){x=v.parentNode;if(/^(H[1-6]|P|ADDRESS|PRE)$/.test(x.nodeName)){i();m.split(x,v);g()}}},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(v){s(v)},"ForeColor,HiliteColor,FontName":function(y,x,v){s(y,v)},FontSize:function(z,y,x){var v,A;if(x>=1&&x<=7){A=d.explode(k.font_size_style_values);v=d.explode(k.font_size_classes);if(v){x=v[x-1]||x}else{x=A[x-1]||x}}s(z,x)},RemoveFormat:function(v){q.remove(v)},mceBlockQuote:function(v){s("blockquote")},FormatBlock:function(y,x,v){return s(v||"p")},mceCleanup:function(){var v=p.getBookmark();n.setContent(n.getContent({cleanup:a}),{cleanup:a});p.moveToBookmark(v)},mceRemoveNode:function(z,y,x){var v=x||p.getNode();if(v!=n.getBody()){i();n.dom.remove(v,a);g()}},mceSelectNodeDepth:function(z,y,x){var v=0;m.getParent(p.getNode(),function(A){if(A.nodeType==1&&v++==x){p.select(A);return c}},n.getBody())},mceSelectNode:function(y,x,v){p.select(v)},mceInsertContent:function(B,I,K){var y,J,E,z,F,G,D,C,L,x,A,M,v,H;y=n.parser;J=new d.html.Serializer({},n.schema);v='<span id="mce_marker" data-mce-type="bookmark">\uFEFF</span>';G={content:K,format:"html"};p.onBeforeSetContent.dispatch(p,G);K=G.content;if(K.indexOf("{$caret}")==-1){K+="{$caret}"}K=K.replace(/\{\$caret\}/,v);if(!p.isCollapsed()){n.getDoc().execCommand("Delete",false,null)}E=p.getNode();G={context:E.nodeName.toLowerCase()};F=y.parse(K,G);A=F.lastChild;if(A.attr("id")=="mce_marker"){D=A;for(A=A.prev;A;A=A.walk(true)){if(A.type==3||!m.isBlock(A.name)){A.parent.insert(D,A,A.name==="br");break}}}if(!G.invalid){K=J.serialize(F);A=E.firstChild;M=E.lastChild;if(!A||(A===M&&A.nodeName==="BR")){m.setHTML(E,K)}else{p.setContent(K)}}else{p.setContent(v);E=p.getNode();z=n.getBody();if(E.nodeType==9){E=A=z}else{A=E}while(A!==z){E=A;A=A.parentNode}K=E==z?z.innerHTML:m.getOuterHTML(E);K=J.serialize(y.parse(K.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,function(){return J.serialize(F)})));if(E==z){m.setHTML(z,K)}else{m.setOuterHTML(E,K)}}D=m.get("mce_marker");C=m.getRect(D);L=m.getViewPort(n.getWin());if((C.y+C.h>L.y+L.h||C.y<L.y)||(C.x>L.x+L.w||C.x<L.x)){H=d.isIE?n.getDoc().documentElement:n.getBody();H.scrollLeft=C.x;H.scrollTop=C.y-L.h+25}x=m.createRng();A=D.previousSibling;if(A&&A.nodeType==3){x.setStart(A,A.nodeValue.length)}else{x.setStartBefore(D);x.setEndBefore(D)}m.remove(D);p.setRng(x);p.onSetContent.dispatch(p,G);n.addVisual()},mceInsertRawHTML:function(y,x,v){p.setContent("tiny_mce_marker");n.setContent(n.getContent().replace(/tiny_mce_marker/g,function(){return v}))},mceToggleFormat:function(y,x,v){s(v)},mceSetContent:function(y,x,v){n.setContent(v)},"Indent,Outdent":function(z){var x,v,y;x=k.indentation;v=/[a-z%]+$/i.exec(x);x=parseInt(x);if(!l("InsertUnorderedList")&&!l("InsertOrderedList")){if(!k.forced_root_block&&!m.getParent(p.getNode(),m.isBlock)){q.apply("div")}e(p.getSelectedBlocks(),function(A){if(z=="outdent"){y=Math.max(0,parseInt(A.style.paddingLeft||0)-x);m.setStyle(A,"paddingLeft",y?y+v:"")}else{m.setStyle(A,"paddingLeft",(parseInt(A.style.paddingLeft||0)+x)+v)}})}else{f(z)}},mceRepaint:function(){var x;if(d.isGecko){try{i(a);if(p.getSel()){p.getSel().selectAllChildren(n.getBody())}p.collapse(a);g()}catch(v){}}},mceToggleFormat:function(y,x,v){q.toggle(v)},InsertHorizontalRule:function(){n.execCommand("mceInsertContent",false,"<hr />")},mceToggleVisualAid:function(){n.hasVisual=!n.hasVisual;n.addVisual()},mceReplaceContent:function(y,x,v){n.execCommand("mceInsertContent",false,v.replace(/\{\$selection\}/g,p.getContent({format:"text"})))},mceInsertLink:function(z,y,x){var v;if(typeof(x)=="string"){x={href:x}}v=m.getParent(p.getNode(),"a");x.href=x.href.replace(" ","%20");if(!v||!x.href){q.remove("link")}if(x.href){q.apply("link",x,v)}},selectAll:function(){var x=m.getRoot(),v=m.createRng();if(p.getRng().setStart){v.setStart(x,0);v.setEnd(x,x.childNodes.length);p.setRng(v)}else{f("SelectAll")}}});u({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(z){var x="align"+z.substring(7);var v=p.isCollapsed()?[m.getParent(p.getNode(),m.isBlock)]:p.getSelectedBlocks();var y=d.map(v,function(A){return !!q.matchNode(A,x)});return d.inArray(y,a)!==-1},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(v){return t(v)},mceBlockQuote:function(){return t("blockquote")},Outdent:function(){var v;if(k.inline_styles){if((v=m.getParent(p.getStart(),m.isBlock))&&parseInt(v.style.paddingLeft)>0){return a}if((v=m.getParent(p.getEnd(),m.isBlock))&&parseInt(v.style.paddingLeft)>0){return a}}return l("InsertUnorderedList")||l("InsertOrderedList")||(!k.inline_styles&&!!m.getParent(p.getNode(),"BLOCKQUOTE"))},"InsertUnorderedList,InsertOrderedList":function(x){var v=m.getParent(p.getNode(),"ul,ol");return v&&(x==="insertunorderedlist"&&v.tagName==="UL"||x==="insertorderedlist"&&v.tagName==="OL")}},"state");u({"FontSize,FontName":function(y){var x=0,v;if(v=m.getParent(p.getNode(),"span")){if(y=="fontsize"){x=v.style.fontSize}else{x=v.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()}}return x}},"value");u({Undo:function(){n.undoManager.undo()},Redo:function(){n.undoManager.redo()}})}})(tinymce);(function(b){var a=b.util.Dispatcher;b.UndoManager=function(h){var l,i=0,e=[],g,k,j,f;function c(){return b.trim(h.getContent({format:"raw",no_events:1}).replace(/<span[^>]+data-mce-bogus[^>]+>[\u200B\uFEFF]+<\/span>/g,""))}function d(){l.typing=false;l.add()}onBeforeAdd=new a(l);k=new a(l);j=new a(l);f=new a(l);k.add(function(m,n){if(m.hasUndo()){return h.onChange.dispatch(h,n,m)}});j.add(function(m,n){return h.onUndo.dispatch(h,n,m)});f.add(function(m,n){return h.onRedo.dispatch(h,n,m)});h.onInit.add(function(){l.add()});h.onBeforeExecCommand.add(function(m,p,o,q,n){if(p!="Undo"&&p!="Redo"&&p!="mceRepaint"&&(!n||!n.skip_undo)){l.beforeChange()}});h.onExecCommand.add(function(m,p,o,q,n){if(p!="Undo"&&p!="Redo"&&p!="mceRepaint"&&(!n||!n.skip_undo)){l.add()}});h.onSaveContent.add(d);h.dom.bind(h.dom.getRoot(),"dragend",d);h.dom.bind(h.getDoc(),b.isGecko?"blur":"focusout",function(m){if(!h.removed&&l.typing){d()}});h.onKeyUp.add(function(m,o){var n=o.keyCode;if((n>=33&&n<=36)||(n>=37&&n<=40)||n==45||n==13||o.ctrlKey){d()}});h.onKeyDown.add(function(m,o){var n=o.keyCode;if((n>=33&&n<=36)||(n>=37&&n<=40)||n==45){if(l.typing){d()}return}if((n<16||n>20)&&n!=224&&n!=91&&!l.typing){l.beforeChange();l.typing=true;l.add()}});h.onMouseDown.add(function(m,n){if(l.typing){d()}});h.addShortcut("ctrl+z","undo_desc","Undo");h.addShortcut("ctrl+y","redo_desc","Redo");l={data:e,typing:false,onBeforeAdd:onBeforeAdd,onAdd:k,onUndo:j,onRedo:f,beforeChange:function(){g=h.selection.getBookmark(2,true)},add:function(p){var m,n=h.settings,o;p=p||{};p.content=c();l.onBeforeAdd.dispatch(l,p);o=e[i];if(o&&o.content==p.content){return null}if(e[i]){e[i].beforeBookmark=g}if(n.custom_undo_redo_levels){if(e.length>n.custom_undo_redo_levels){for(m=0;m<e.length-1;m++){e[m]=e[m+1]}e.length--;i=e.length}}p.bookmark=h.selection.getBookmark(2,true);if(i<e.length-1){e.length=i+1}e.push(p);i=e.length-1;l.onAdd.dispatch(l,p);h.isNotDirty=0;return p},undo:function(){var n,m;if(l.typing){l.add();l.typing=false}if(i>0){n=e[--i];h.setContent(n.content,{format:"raw"});h.selection.moveToBookmark(n.beforeBookmark);l.onUndo.dispatch(l,n)}return n},redo:function(){var m;if(i<e.length-1){m=e[++i];h.setContent(m.content,{format:"raw"});h.selection.moveToBookmark(m.bookmark);l.onRedo.dispatch(l,m)}return m},clear:function(){e=[];i=0;l.typing=false},hasUndo:function(){return i>0||this.typing},hasRedo:function(){return i<e.length-1&&!this.typing}};return l}})(tinymce);tinymce.ForceBlocks=function(c){var b=c.settings,e=c.dom,a=c.selection,d=c.schema.getBlockElements();function f(){var j=a.getStart(),h=c.getBody(),g,k,o,s,q,i,l,m=-16777215,p,r;if(!j||j.nodeType!==1||!b.forced_root_block){return}while(j&&j!=h){if(d[j.nodeName]){return}j=j.parentNode}g=a.getRng();if(g.setStart){k=g.startContainer;o=g.startOffset;s=g.endContainer;q=g.endOffset}else{if(g.item){j=g.item(0);g=c.getDoc().body.createTextRange();g.moveToElementText(j)}r=g.parentElement().ownerDocument===c.getDoc();tmpRng=g.duplicate();tmpRng.collapse(true);o=tmpRng.move("character",m)*-1;if(!tmpRng.collapsed){tmpRng=g.duplicate();tmpRng.collapse(false);q=(tmpRng.move("character",m)*-1)-o}}j=h.firstChild;while(j){if(j.nodeType===3||(j.nodeType==1&&!d[j.nodeName])){if(j.nodeType===3&&j.nodeValue.length==0){l=j;j=j.nextSibling;e.remove(l);continue}if(!i){i=e.create(b.forced_root_block);j.parentNode.insertBefore(i,j);p=true}l=j;j=j.nextSibling;i.appendChild(l)}else{i=null;j=j.nextSibling}}if(p){if(g.setStart){g.setStart(k,o);g.setEnd(s,q);a.setRng(g)}else{if(r){try{g=c.getDoc().body.createTextRange();g.moveToElementText(h);g.collapse(true);g.moveStart("character",o);if(q>0){g.moveEnd("character",q)}g.select()}catch(n){}}}c.nodeChanged()}}if(b.forced_root_block){c.onKeyUp.add(f);c.onNodeChange.add(f)}};(function(c){var b=c.DOM,a=c.dom.Event,d=c.each,e=c.extend;c.create("tinymce.ControlManager",{ControlManager:function(f,j){var h=this,g;j=j||{};h.editor=f;h.controls={};h.onAdd=new c.util.Dispatcher(h);h.onPostRender=new c.util.Dispatcher(h);h.prefix=j.prefix||f.id+"_";h._cls={};h.onPostRender.add(function(){d(h.controls,function(i){i.postRender()})})},get:function(f){return this.controls[this.prefix+f]||this.controls[f]},setActive:function(h,f){var g=null;if(g=this.get(h)){g.setActive(f)}return g},setDisabled:function(h,f){var g=null;if(g=this.get(h)){g.setDisabled(f)}return g},add:function(g){var f=this;if(g){f.controls[g.id]=g;f.onAdd.dispatch(g,f)}return g},createControl:function(j){var o,k,g,h=this,m=h.editor,n,f;if(!h.controlFactories){h.controlFactories=[];d(m.plugins,function(i){if(i.createControl){h.controlFactories.push(i)}})}n=h.controlFactories;for(k=0,g=n.length;k<g;k++){o=n[k].createControl(j,h);if(o){return h.add(o)}}if(j==="|"||j==="separator"){return h.createSeparator()}if(m.buttons&&(o=m.buttons[j])){return h.createButton(j,o)}return h.add(o)},createDropMenu:function(f,n,h){var m=this,i=m.editor,j,g,k,l;n=e({"class":"mceDropDown",constrain:i.settings.constrain_menus},n);n["class"]=n["class"]+" "+i.getParam("skin")+"Skin";if(k=i.getParam("skin_variant")){n["class"]+=" "+i.getParam("skin")+"Skin"+k.substring(0,1).toUpperCase()+k.substring(1)}n["class"]+=i.settings.directionality=="rtl"?" mceRtl":"";f=m.prefix+f;l=h||m._cls.dropmenu||c.ui.DropMenu;j=m.controls[f]=new l(f,n);j.onAddItem.add(function(r,q){var p=q.settings;p.title=i.getLang(p.title,p.title);if(!p.onclick){p.onclick=function(o){if(p.cmd){i.execCommand(p.cmd,p.ui||false,p.value)}}}});i.onRemove.add(function(){j.destroy()});if(c.isIE){j.onShowMenu.add(function(){i.focus();g=i.selection.getBookmark(1)});j.onHideMenu.add(function(){if(g){i.selection.moveToBookmark(g);g=0}})}return m.add(j)},createListBox:function(f,n,h){var l=this,j=l.editor,i,k,m;if(l.get(f)){return null}n.title=j.translate(n.title);n.scope=n.scope||j;if(!n.onselect){n.onselect=function(o){j.execCommand(n.cmd,n.ui||false,o||n.value)}}n=e({title:n.title,"class":"mce_"+f,scope:n.scope,control_manager:l},n);f=l.prefix+f;function g(o){return o.settings.use_accessible_selects&&!c.isGecko}if(j.settings.use_native_selects||g(j)){k=new c.ui.NativeListBox(f,n)}else{m=h||l._cls.listbox||c.ui.ListBox;k=new m(f,n,j)}l.controls[f]=k;if(c.isWebKit){k.onPostRender.add(function(p,o){a.add(o,"mousedown",function(){j.bookmark=j.selection.getBookmark(1)});a.add(o,"focus",function(){j.selection.moveToBookmark(j.bookmark);j.bookmark=null})})}if(k.hideMenu){j.onMouseDown.add(k.hideMenu,k)}return l.add(k)},createButton:function(m,i,l){var h=this,g=h.editor,j,k,f;if(h.get(m)){return null}i.title=g.translate(i.title);i.label=g.translate(i.label);i.scope=i.scope||g;if(!i.onclick&&!i.menu_button){i.onclick=function(){g.execCommand(i.cmd,i.ui||false,i.value)}}i=e({title:i.title,"class":"mce_"+m,unavailable_prefix:g.getLang("unavailable",""),scope:i.scope,control_manager:h},i);m=h.prefix+m;if(i.menu_button){f=l||h._cls.menubutton||c.ui.MenuButton;k=new f(m,i,g);g.onMouseDown.add(k.hideMenu,k)}else{f=h._cls.button||c.ui.Button;k=new f(m,i,g)}return h.add(k)},createMenuButton:function(h,f,g){f=f||{};f.menu_button=1;return this.createButton(h,f,g)},createSplitButton:function(m,i,l){var h=this,g=h.editor,j,k,f;if(h.get(m)){return null}i.title=g.translate(i.title);i.scope=i.scope||g;if(!i.onclick){i.onclick=function(n){g.execCommand(i.cmd,i.ui||false,n||i.value)}}if(!i.onselect){i.onselect=function(n){g.execCommand(i.cmd,i.ui||false,n||i.value)}}i=e({title:i.title,"class":"mce_"+m,scope:i.scope,control_manager:h},i);m=h.prefix+m;f=l||h._cls.splitbutton||c.ui.SplitButton;k=h.add(new f(m,i,g));g.onMouseDown.add(k.hideMenu,k);return k},createColorSplitButton:function(f,n,h){var l=this,j=l.editor,i,k,m,g;if(l.get(f)){return null}n.title=j.translate(n.title);n.scope=n.scope||j;if(!n.onclick){n.onclick=function(o){if(c.isIE){g=j.selection.getBookmark(1)}j.execCommand(n.cmd,n.ui||false,o||n.value)}}if(!n.onselect){n.onselect=function(o){j.execCommand(n.cmd,n.ui||false,o||n.value)}}n=e({title:n.title,"class":"mce_"+f,menu_class:j.getParam("skin")+"Skin",scope:n.scope,more_colors_title:j.getLang("more_colors")},n);f=l.prefix+f;m=h||l._cls.colorsplitbutton||c.ui.ColorSplitButton;k=new m(f,n,j);j.onMouseDown.add(k.hideMenu,k);j.onRemove.add(function(){k.destroy()});if(c.isIE){k.onShowMenu.add(function(){j.focus();g=j.selection.getBookmark(1)});k.onHideMenu.add(function(){if(g){j.selection.moveToBookmark(g);g=0}})}return l.add(k)},createToolbar:function(k,h,j){var i,g=this,f;k=g.prefix+k;f=j||g._cls.toolbar||c.ui.Toolbar;i=new f(k,h,g.editor);if(g.get(k)){return null}return g.add(i)},createToolbarGroup:function(k,h,j){var i,g=this,f;k=g.prefix+k;f=j||this._cls.toolbarGroup||c.ui.ToolbarGroup;i=new f(k,h,g.editor);if(g.get(k)){return null}return g.add(i)},createSeparator:function(g){var f=g||this._cls.separator||c.ui.Separator;return new f()},setControlType:function(g,f){return this._cls[g.toLowerCase()]=f},destroy:function(){d(this.controls,function(f){f.destroy()});this.controls=null}})})(tinymce);(function(d){var a=d.util.Dispatcher,e=d.each,c=d.isIE,b=d.isOpera;d.create("tinymce.WindowManager",{WindowManager:function(f){var g=this;g.editor=f;g.onOpen=new a(g);g.onClose=new a(g);g.params={};g.features={}},open:function(z,h){var v=this,k="",n,m,i=v.editor.settings.dialog_type=="modal",q,o,j,g=d.DOM.getViewPort(),r;z=z||{};h=h||{};o=b?g.w:screen.width;j=b?g.h:screen.height;z.name=z.name||"mc_"+new Date().getTime();z.width=parseInt(z.width||320);z.height=parseInt(z.height||240);z.resizable=true;z.left=z.left||parseInt(o/2)-(z.width/2);z.top=z.top||parseInt(j/2)-(z.height/2);h.inline=false;h.mce_width=z.width;h.mce_height=z.height;h.mce_auto_focus=z.auto_focus;if(i){if(c){z.center=true;z.help=false;z.dialogWidth=z.width+"px";z.dialogHeight=z.height+"px";z.scroll=z.scrollbars||false}}e(z,function(p,f){if(d.is(p,"boolean")){p=p?"yes":"no"}if(!/^(name|url)$/.test(f)){if(c&&i){k+=(k?";":"")+f+":"+p}else{k+=(k?",":"")+f+"="+p}}});v.features=z;v.params=h;v.onOpen.dispatch(v,z,h);r=z.url||z.file;r=d._addVer(r);try{if(c&&i){q=1;window.showModalDialog(r,window,k)}else{q=window.open(r,z.name,k)}}catch(l){}if(!q){alert(v.editor.getLang("popup_blocked"))}},close:function(f){f.close();this.onClose.dispatch(this)},createInstance:function(i,h,g,m,l,k){var j=d.resolve(i);return new j(h,g,m,l,k)},confirm:function(h,f,i,g){g=g||window;f.call(i||this,g.confirm(this._decode(this.editor.getLang(h,h))))},alert:function(h,f,j,g){var i=this;g=g||window;g.alert(i._decode(i.editor.getLang(h,h)));if(f){f.call(j||i)}},resizeBy:function(f,g,h){h.resizeBy(f,g)},_decode:function(f){return d.DOM.decode(f).replace(/\\n/g,"\n")}})}(tinymce));(function(a){a.Formatter=function(aa){var Q={},T=a.each,c=aa.dom,r=aa.selection,t=a.dom.TreeWalker,N=new a.dom.RangeUtils(c),d=aa.schema.isValidChild,A=a.isArray,H=c.isBlock,m=aa.settings.forced_root_block,s=c.nodeIndex,G="\uFEFF",e=/^(src|href|style)$/,X=false,C=true,P,D,x=c.getContentEditable;function I(ab){return !!aa.schema.getTextBlocks()[ab.toLowerCase()]}function n(ac,ab){return c.getParents(ac,ab,c.getRoot())}function b(ab){return ab.nodeType===1&&ab.id==="_mce_caret"}function j(){l({alignleft:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"left"},defaultBlock:"div"},{selector:"img,table",collapsed:false,styles:{"float":"left"}}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"center"},defaultBlock:"div"},{selector:"img",collapsed:false,styles:{display:"block",marginLeft:"auto",marginRight:"auto"}},{selector:"table",collapsed:false,styles:{marginLeft:"auto",marginRight:"auto"}}],alignright:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"right"},defaultBlock:"div"},{selector:"img,table",collapsed:false,styles:{"float":"right"}}],alignfull:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"justify"},defaultBlock:"div"}],bold:[{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all"}],italic:[{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:true},{inline:"u",remove:"all"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:true},{inline:"strike",remove:"all"}],forecolor:{inline:"span",styles:{color:"%value"},wrap_links:false},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},wrap_links:false},fontname:{inline:"span",styles:{fontFamily:"%value"}},fontsize:{inline:"span",styles:{fontSize:"%value"}},fontsize_class:{inline:"span",attributes:{"class":"%value"}},blockquote:{block:"blockquote",wrapper:1,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},link:{inline:"a",selector:"a",remove:"all",split:true,deep:true,onmatch:function(ab){return true},onformat:function(ad,ab,ac){T(ac,function(af,ae){c.setAttrib(ad,ae,af)})}},removeformat:[{selector:"b,strong,em,i,font,u,strike",remove:"all",split:true,expand:false,block_expand:true,deep:true},{selector:"span",attributes:["style","class"],remove:"empty",split:true,expand:false,deep:true},{selector:"*",attributes:["style","class"],split:false,expand:false,deep:true}]});T("p h1 h2 h3 h4 h5 h6 div address pre div code dt dd samp".split(/\s/),function(ab){l(ab,{block:ab,remove:"all"})});l(aa.settings.formats)}function W(){aa.addShortcut("ctrl+b","bold_desc","Bold");aa.addShortcut("ctrl+i","italic_desc","Italic");aa.addShortcut("ctrl+u","underline_desc","Underline");for(var ab=1;ab<=6;ab++){aa.addShortcut("ctrl+"+ab,"",["FormatBlock",false,"h"+ab])}aa.addShortcut("ctrl+7","",["FormatBlock",false,"p"]);aa.addShortcut("ctrl+8","",["FormatBlock",false,"div"]);aa.addShortcut("ctrl+9","",["FormatBlock",false,"address"])}function V(ab){return ab?Q[ab]:Q}function l(ab,ac){if(ab){if(typeof(ab)!=="string"){T(ab,function(ae,ad){l(ad,ae)})}else{ac=ac.length?ac:[ac];T(ac,function(ad){if(ad.deep===D){ad.deep=!ad.selector}if(ad.split===D){ad.split=!ad.selector||ad.inline}if(ad.remove===D&&ad.selector&&!ad.inline){ad.remove="none"}if(ad.selector&&ad.inline){ad.mixed=true;ad.block_expand=true}if(typeof(ad.classes)==="string"){ad.classes=ad.classes.split(/\s+/)}});Q[ab]=ac}}}var i=function(ac){var ab;aa.dom.getParent(ac,function(ad){ab=aa.dom.getStyle(ad,"text-decoration");return ab&&ab!=="none"});return ab};var L=function(ab){var ac;if(ab.nodeType===1&&ab.parentNode&&ab.parentNode.nodeType===1){ac=i(ab.parentNode);if(aa.dom.getStyle(ab,"color")&&ac){aa.dom.setStyle(ab,"text-decoration",ac)}else{if(aa.dom.getStyle(ab,"textdecoration")===ac){aa.dom.setStyle(ab,"text-decoration",null)}}}};function Y(ae,al,ag){var ah=V(ae),am=ah[0],ak,ac,aj,ai=r.isCollapsed();function ab(aq,ap){ap=ap||am;if(aq){if(ap.onformat){ap.onformat(aq,ap,al,ag)}T(ap.styles,function(at,ar){c.setStyle(aq,ar,q(at,al))});T(ap.attributes,function(at,ar){c.setAttrib(aq,ar,q(at,al))});T(ap.classes,function(ar){ar=q(ar,al);if(!c.hasClass(aq,ar)){c.addClass(aq,ar)}})}}function af(){function ar(ay,aw){var ax=new t(aw);for(ag=ax.current();ag;ag=ax.prev()){if(ag.childNodes.length>1||ag==ay||ag.tagName=="BR"){return ag}}}var aq=aa.selection.getRng();var av=aq.startContainer;var ap=aq.endContainer;if(av!=ap&&aq.endOffset===0){var au=ar(av,ap);var at=au.nodeType==3?au.length:au.childNodes.length;aq.setEnd(au,at)}return aq}function ad(at,ay,aw,av,aq){var ap=[],ar=-1,ax,aA=-1,au=-1,az;T(at.childNodes,function(aC,aB){if(aC.nodeName==="UL"||aC.nodeName==="OL"){ar=aB;ax=aC;return false}});T(at.childNodes,function(aC,aB){if(aC.nodeName==="SPAN"&&c.getAttrib(aC,"data-mce-type")=="bookmark"){if(aC.id==ay.id+"_start"){aA=aB}else{if(aC.id==ay.id+"_end"){au=aB}}}});if(ar<=0||(aA<ar&&au>ar)){T(a.grep(at.childNodes),aq);return 0}else{az=c.clone(aw,X);T(a.grep(at.childNodes),function(aC,aB){if((aA<ar&&aB<ar)||(aA>ar&&aB>ar)){ap.push(aC);aC.parentNode.removeChild(aC)}});if(aA<ar){at.insertBefore(az,ax)}else{if(aA>ar){at.insertBefore(az,ax.nextSibling)}}av.push(az);T(ap,function(aB){az.appendChild(aB)});return az}}function an(aq,at,aw){var ap=[],av,ar,au=true;av=am.inline||am.block;ar=c.create(av);ab(ar);N.walk(aq,function(ax){var ay;function az(aA){var aF,aD,aB,aC,aE;aE=au;aF=aA.nodeName.toLowerCase();aD=aA.parentNode.nodeName.toLowerCase();if(aA.nodeType===1&&x(aA)){aE=au;au=x(aA)==="true";aC=true}if(g(aF,"br")){ay=0;if(am.block){c.remove(aA)}return}if(am.wrapper&&y(aA,ae,al)){ay=0;return}if(au&&!aC&&am.block&&!am.wrapper&&I(aF)){aA=c.rename(aA,av);ab(aA);ap.push(aA);ay=0;return}if(am.selector){T(ah,function(aG){if("collapsed" in aG&&aG.collapsed!==ai){return}if(c.is(aA,aG.selector)&&!b(aA)){ab(aA,aG);aB=true}});if(!am.inline||aB){ay=0;return}}if(au&&!aC&&d(av,aF)&&d(aD,av)&&!(!aw&&aA.nodeType===3&&aA.nodeValue.length===1&&aA.nodeValue.charCodeAt(0)===65279)&&!b(aA)){if(!ay){ay=c.clone(ar,X);aA.parentNode.insertBefore(ay,aA);ap.push(ay)}ay.appendChild(aA)}else{if(aF=="li"&&at){ay=ad(aA,at,ar,ap,az)}else{ay=0;T(a.grep(aA.childNodes),az);if(aC){au=aE}ay=0}}}T(ax,az)});if(am.wrap_links===false){T(ap,function(ax){function ay(aC){var aB,aA,az;if(aC.nodeName==="A"){aA=c.clone(ar,X);ap.push(aA);az=a.grep(aC.childNodes);for(aB=0;aB<az.length;aB++){aA.appendChild(az[aB])}aC.appendChild(aA)}T(a.grep(aC.childNodes),ay)}ay(ax)})}T(ap,function(az){var ax;function aA(aC){var aB=0;T(aC.childNodes,function(aD){if(!f(aD)&&!K(aD)){aB++}});return aB}function ay(aB){var aD,aC;T(aB.childNodes,function(aE){if(aE.nodeType==1&&!K(aE)&&!b(aE)){aD=aE;return X}});if(aD&&h(aD,am)){aC=c.clone(aD,X);ab(aC);c.replace(aC,aB,C);c.remove(aD,1)}return aC||aB}ax=aA(az);if((ap.length>1||!H(az))&&ax===0){c.remove(az,1);return}if(am.inline||am.wrapper){if(!am.exact&&ax===1){az=ay(az)}T(ah,function(aB){T(c.select(aB.inline,az),function(aD){var aC;if(aB.wrap_links===false){aC=aD.parentNode;do{if(aC.nodeName==="A"){return}}while(aC=aC.parentNode)}Z(aB,al,aD,aB.exact?aD:null)})});if(y(az.parentNode,ae,al)){c.remove(az,1);az=0;return C}if(am.merge_with_parents){c.getParent(az.parentNode,function(aB){if(y(aB,ae,al)){c.remove(az,1);az=0;return C}})}if(az&&am.merge_siblings!==false){az=u(E(az),az);az=u(az,E(az,C))}}})}if(am){if(ag){if(ag.nodeType){ac=c.createRng();ac.setStartBefore(ag);ac.setEndAfter(ag);an(p(ac,ah),null,true)}else{an(ag,null,true)}}else{if(!ai||!am.inline||c.select("td.mceSelected,th.mceSelected").length){var ao=aa.selection.getNode();if(!m&&ah[0].defaultBlock&&!c.getParent(ao,c.isBlock)){Y(ah[0].defaultBlock)}aa.selection.setRng(af());ak=r.getBookmark();an(p(r.getRng(C),ah),ak);if(am.styles&&(am.styles.color||am.styles.textDecoration)){a.walk(ao,L,"childNodes");L(ao)}r.moveToBookmark(ak);R(r.getRng(C));aa.nodeChanged()}else{U("apply",ae,al)}}}}function B(ad,am,af){var ag=V(ad),ao=ag[0],ak,aj,ac,al=true;function ae(av){var au,at,ar,aq,ax,aw;if(av.nodeType===1&&x(av)){ax=al;al=x(av)==="true";aw=true}au=a.grep(av.childNodes);if(al&&!aw){for(at=0,ar=ag.length;at<ar;at++){if(Z(ag[at],am,av,av)){break}}}if(ao.deep){if(au.length){for(at=0,ar=au.length;at<ar;at++){ae(au[at])}if(aw){al=ax}}}}function ah(aq){var ar;T(n(aq.parentNode).reverse(),function(at){var au;if(!ar&&at.id!="_start"&&at.id!="_end"){au=y(at,ad,am);if(au&&au.split!==false){ar=at}}});return ar}function ab(au,aq,aw,az){var aA,ay,ax,at,av,ar;if(au){ar=au.parentNode;for(aA=aq.parentNode;aA&&aA!=ar;aA=aA.parentNode){ay=c.clone(aA,X);for(av=0;av<ag.length;av++){if(Z(ag[av],am,ay,ay)){ay=0;break}}if(ay){if(ax){ay.appendChild(ax)}if(!at){at=ay}ax=ay}}if(az&&(!ao.mixed||!H(au))){aq=c.split(au,aq)}if(ax){aw.parentNode.insertBefore(ax,aw);at.appendChild(aw)}}return aq}function an(aq){return ab(ah(aq),aq,aq,true)}function ai(at){var ar=c.get(at?"_start":"_end"),aq=ar[at?"firstChild":"lastChild"];if(K(aq)){aq=aq[at?"firstChild":"lastChild"]}c.remove(ar,true);return aq}function ap(aq){var at,au,ar;aq=p(aq,ag,C);if(ao.split){at=M(aq,C);au=M(aq);if(at!=au){if(/^(TR|TD)$/.test(at.nodeName)&&at.firstChild){at=(at.nodeName=="TD"?at.firstChild:at.firstChild.firstChild)||at}at=S(at,"span",{id:"_start","data-mce-type":"bookmark"});au=S(au,"span",{id:"_end","data-mce-type":"bookmark"});an(at);an(au);at=ai(C);au=ai()}else{at=au=an(at)}aq.startContainer=at.parentNode;aq.startOffset=s(at);aq.endContainer=au.parentNode;aq.endOffset=s(au)+1}N.walk(aq,function(av){T(av,function(aw){ae(aw);if(aw.nodeType===1&&aa.dom.getStyle(aw,"text-decoration")==="underline"&&aw.parentNode&&i(aw.parentNode)==="underline"){Z({deep:false,exact:true,inline:"span",styles:{textDecoration:"underline"}},null,aw)}})})}if(af){if(af.nodeType){ac=c.createRng();ac.setStartBefore(af);ac.setEndAfter(af);ap(ac)}else{ap(af)}return}if(!r.isCollapsed()||!ao.inline||c.select("td.mceSelected,th.mceSelected").length){ak=r.getBookmark();ap(r.getRng(C));r.moveToBookmark(ak);if(ao.inline&&k(ad,am,r.getStart())){R(r.getRng(true))}aa.nodeChanged()}else{U("remove",ad,am)}}function F(ac,ae,ad){var ab=V(ac);if(k(ac,ae,ad)&&(!("toggle" in ab[0])||ab[0].toggle)){B(ac,ae,ad)}else{Y(ac,ae,ad)}}function y(ac,ab,ah,af){var ad=V(ab),ai,ag,ae;function aj(an,ap,aq){var am,ao,ak=ap[aq],al;if(ap.onmatch){return ap.onmatch(an,ap,aq)}if(ak){if(ak.length===D){for(am in ak){if(ak.hasOwnProperty(am)){if(aq==="attributes"){ao=c.getAttrib(an,am)}else{ao=O(an,am)}if(af&&!ao&&!ap.exact){return}if((!af||ap.exact)&&!g(ao,q(ak[am],ah))){return}}}}else{for(al=0;al<ak.length;al++){if(aq==="attributes"?c.getAttrib(an,ak[al]):O(an,ak[al])){return ap}}}}return ap}if(ad&&ac){for(ag=0;ag<ad.length;ag++){ai=ad[ag];if(h(ac,ai)&&aj(ac,ai,"attributes")&&aj(ac,ai,"styles")){if(ae=ai.classes){for(ag=0;ag<ae.length;ag++){if(!c.hasClass(ac,ae[ag])){return}}}return ai}}}}function k(ad,af,ae){var ac;function ab(ag){ag=c.getParent(ag,function(ah){return !!y(ah,ad,af,true)});return y(ag,ad,af)}if(ae){return ab(ae)}ae=r.getNode();if(ab(ae)){return C}ac=r.getStart();if(ac!=ae){if(ab(ac)){return C}}return X}function v(ai,ah){var af,ag=[],ae={},ad,ac,ab;af=r.getStart();c.getParent(af,function(al){var ak,aj;for(ak=0;ak<ai.length;ak++){aj=ai[ak];if(!ae[aj]&&y(al,aj,ah)){ae[aj]=true;ag.push(aj)}}},c.getRoot());return ag}function z(af){var ah=V(af),ae,ad,ag,ac,ab;if(ah){ae=r.getStart();ad=n(ae);for(ac=ah.length-1;ac>=0;ac--){ab=ah[ac].selector;if(!ab){return C}for(ag=ad.length-1;ag>=0;ag--){if(c.is(ad[ag],ab)){return C}}}}return X}function J(ab,ae,ac){var ad;if(!P){P={};ad={};aa.onNodeChange.addToTop(function(ag,af,ai){var ah=n(ai),aj={};T(P,function(ak,al){T(ah,function(am){if(y(am,al,{},ak.similar)){if(!ad[al]){T(ak,function(an){an(true,{node:am,format:al,parents:ah})});ad[al]=ak}aj[al]=ak;return false}})});T(ad,function(ak,al){if(!aj[al]){delete ad[al];T(ak,function(am){am(false,{node:ai,format:al,parents:ah})})}})})}T(ab.split(","),function(af){if(!P[af]){P[af]=[];P[af].similar=ac}P[af].push(ae)});return this}a.extend(this,{get:V,register:l,apply:Y,remove:B,toggle:F,match:k,matchAll:v,matchNode:y,canApply:z,formatChanged:J});j();W();function h(ab,ac){if(g(ab,ac.inline)){return C}if(g(ab,ac.block)){return C}if(ac.selector){return c.is(ab,ac.selector)}}function g(ac,ab){ac=ac||"";ab=ab||"";ac=""+(ac.nodeName||ac);ab=""+(ab.nodeName||ab);return ac.toLowerCase()==ab.toLowerCase()}function O(ac,ab){var ad=c.getStyle(ac,ab);if(ab=="color"||ab=="backgroundColor"){ad=c.toHex(ad)}if(ab=="fontWeight"&&ad==700){ad="bold"}return""+ad}function q(ab,ac){if(typeof(ab)!="string"){ab=ab(ac)}else{if(ac){ab=ab.replace(/%(\w+)/g,function(ae,ad){return ac[ad]||ae})}}return ab}function f(ab){return ab&&ab.nodeType===3&&/^([\t \r\n]+|)$/.test(ab.nodeValue)}function S(ad,ac,ab){var ae=c.create(ac,ab);ad.parentNode.insertBefore(ae,ad);ae.appendChild(ad);return ae}function p(ab,am,ae){var ap,an,ah,al,ad=ab.startContainer,ai=ab.startOffset,ar=ab.endContainer,ak=ab.endOffset;function ao(aA){var au,ax,az,aw,av,at;au=ax=aA?ad:ar;av=aA?"previousSibling":"nextSibling";at=c.getRoot();function ay(aB){return aB.nodeName=="BR"&&aB.getAttribute("data-mce-bogus")&&!aB.nextSibling}if(au.nodeType==3&&!f(au)){if(aA?ai>0:ak<au.nodeValue.length){return au}}for(;;){if(!am[0].block_expand&&H(ax)){return ax}for(aw=ax[av];aw;aw=aw[av]){if(!K(aw)&&!f(aw)&&!ay(aw)){return ax}}if(ax.parentNode==at){au=ax;break}ax=ax.parentNode}return au}function ag(at,au){if(au===D){au=at.nodeType===3?at.length:at.childNodes.length}while(at&&at.hasChildNodes()){at=at.childNodes[au];if(at){au=at.nodeType===3?at.length:at.childNodes.length}}return{node:at,offset:au}}if(ad.nodeType==1&&ad.hasChildNodes()){an=ad.childNodes.length-1;ad=ad.childNodes[ai>an?an:ai];if(ad.nodeType==3){ai=0}}if(ar.nodeType==1&&ar.hasChildNodes()){an=ar.childNodes.length-1;ar=ar.childNodes[ak>an?an:ak-1];if(ar.nodeType==3){ak=ar.nodeValue.length}}function aq(au){var at=au;while(at){if(at.nodeType===1&&x(at)){return x(at)==="false"?at:au}at=at.parentNode}return au}function aj(au,ay,aA){var ax,av,az,at;function aw(aC,aE){var aF,aB,aD=aC.nodeValue;if(typeof(aE)=="undefined"){aE=aA?aD.length:0}if(aA){aF=aD.lastIndexOf(" ",aE);aB=aD.lastIndexOf("\u00a0",aE);aF=aF>aB?aF:aB;if(aF!==-1&&!ae){aF++}}else{aF=aD.indexOf(" ",aE);aB=aD.indexOf("\u00a0",aE);aF=aF!==-1&&(aB===-1||aF<aB)?aF:aB}return aF}if(au.nodeType===3){az=aw(au,ay);if(az!==-1){return{container:au,offset:az}}at=au}ax=new t(au,c.getParent(au,H)||aa.getBody());while(av=ax[aA?"prev":"next"]()){if(av.nodeType===3){at=av;az=aw(av);if(az!==-1){return{container:av,offset:az}}}else{if(H(av)){break}}}if(at){if(aA){ay=0}else{ay=at.length}return{container:at,offset:ay}}}function af(au,at){var av,aw,ay,ax;if(au.nodeType==3&&au.nodeValue.length===0&&au[at]){au=au[at]}av=n(au);for(aw=0;aw<av.length;aw++){for(ay=0;ay<am.length;ay++){ax=am[ay];if("collapsed" in ax&&ax.collapsed!==ab.collapsed){continue}if(c.is(av[aw],ax.selector)){return av[aw]}}}return au}function ac(au,at,aw){var av;if(!am[0].wrapper){av=c.getParent(au,am[0].block)}if(!av){av=c.getParent(au.nodeType==3?au.parentNode:au,I)}if(av&&am[0].wrapper){av=n(av,"ul,ol").reverse()[0]||av}if(!av){av=au;while(av[at]&&!H(av[at])){av=av[at];if(g(av,"br")){break}}}return av||au}ad=aq(ad);ar=aq(ar);if(K(ad.parentNode)||K(ad)){ad=K(ad)?ad:ad.parentNode;ad=ad.nextSibling||ad;if(ad.nodeType==3){ai=0}}if(K(ar.parentNode)||K(ar)){ar=K(ar)?ar:ar.parentNode;ar=ar.previousSibling||ar;if(ar.nodeType==3){ak=ar.length}}if(am[0].inline){if(ab.collapsed){al=aj(ad,ai,true);if(al){ad=al.container;ai=al.offset}al=aj(ar,ak);if(al){ar=al.container;ak=al.offset}}ah=ag(ar,ak);if(ah.node){while(ah.node&&ah.offset===0&&ah.node.previousSibling){ah=ag(ah.node.previousSibling)}if(ah.node&&ah.offset>0&&ah.node.nodeType===3&&ah.node.nodeValue.charAt(ah.offset-1)===" "){if(ah.offset>1){ar=ah.node;ar.splitText(ah.offset-1)}}}}if(am[0].inline||am[0].block_expand){if(!am[0].inline||(ad.nodeType!=3||ai===0)){ad=ao(true)}if(!am[0].inline||(ar.nodeType!=3||ak===ar.nodeValue.length)){ar=ao()}}if(am[0].selector&&am[0].expand!==X&&!am[0].inline){ad=af(ad,"previousSibling");ar=af(ar,"nextSibling")}if(am[0].block||am[0].selector){ad=ac(ad,"previousSibling");ar=ac(ar,"nextSibling");if(am[0].block){if(!H(ad)){ad=ao(true)}if(!H(ar)){ar=ao()}}}if(ad.nodeType==1){ai=s(ad);ad=ad.parentNode}if(ar.nodeType==1){ak=s(ar)+1;ar=ar.parentNode}return{startContainer:ad,startOffset:ai,endContainer:ar,endOffset:ak}}function Z(ah,ag,ae,ab){var ad,ac,af;if(!h(ae,ah)){return X}if(ah.remove!="all"){T(ah.styles,function(aj,ai){aj=q(aj,ag);if(typeof(ai)==="number"){ai=aj;ab=0}if(!ab||g(O(ab,ai),aj)){c.setStyle(ae,ai,"")}af=1});if(af&&c.getAttrib(ae,"style")==""){ae.removeAttribute("style");ae.removeAttribute("data-mce-style")}T(ah.attributes,function(ak,ai){var aj;ak=q(ak,ag);if(typeof(ai)==="number"){ai=ak;ab=0}if(!ab||g(c.getAttrib(ab,ai),ak)){if(ai=="class"){ak=c.getAttrib(ae,ai);if(ak){aj="";T(ak.split(/\s+/),function(al){if(/mce\w+/.test(al)){aj+=(aj?" ":"")+al}});if(aj){c.setAttrib(ae,ai,aj);return}}}if(ai=="class"){ae.removeAttribute("className")}if(e.test(ai)){ae.removeAttribute("data-mce-"+ai)}ae.removeAttribute(ai)}});T(ah.classes,function(ai){ai=q(ai,ag);if(!ab||c.hasClass(ab,ai)){c.removeClass(ae,ai)}});ac=c.getAttribs(ae);for(ad=0;ad<ac.length;ad++){if(ac[ad].nodeName.indexOf("_")!==0){return X}}}if(ah.remove!="none"){o(ae,ah);return C}}function o(ad,ae){var ab=ad.parentNode,ac;function af(ah,ag,ai){ah=E(ah,ag,ai);return !ah||(ah.nodeName=="BR"||H(ah))}if(ae.block){if(!m){if(H(ad)&&!H(ab)){if(!af(ad,X)&&!af(ad.firstChild,C,1)){ad.insertBefore(c.create("br"),ad.firstChild)}if(!af(ad,C)&&!af(ad.lastChild,X,1)){ad.appendChild(c.create("br"))}}}else{if(ab==c.getRoot()){if(!ae.list_block||!g(ad,ae.list_block)){T(a.grep(ad.childNodes),function(ag){if(d(m,ag.nodeName.toLowerCase())){if(!ac){ac=S(ag,m)}else{ac.appendChild(ag)}}else{ac=0}})}}}}if(ae.selector&&ae.inline&&!g(ae.inline,ad)){return}c.remove(ad,1)}function E(ac,ab,ad){if(ac){ab=ab?"nextSibling":"previousSibling";for(ac=ad?ac:ac[ab];ac;ac=ac[ab]){if(ac.nodeType==1||!f(ac)){return ac}}}}function K(ab){return ab&&ab.nodeType==1&&ab.getAttribute("data-mce-type")=="bookmark"}function u(af,ae){var ab,ad,ac;function ah(ak,aj){if(ak.nodeName!=aj.nodeName){return X}function ai(am){var an={};T(c.getAttribs(am),function(ao){var ap=ao.nodeName.toLowerCase();if(ap.indexOf("_")!==0&&ap!=="style"){an[ap]=c.getAttrib(am,ap)}});return an}function al(ap,ao){var an,am;for(am in ap){if(ap.hasOwnProperty(am)){an=ao[am];if(an===D){return X}if(ap[am]!=an){return X}delete ao[am]}}for(am in ao){if(ao.hasOwnProperty(am)){return X}}return C}if(!al(ai(ak),ai(aj))){return X}if(!al(c.parseStyle(c.getAttrib(ak,"style")),c.parseStyle(c.getAttrib(aj,"style")))){return X}return C}function ag(aj,ai){for(ad=aj;ad;ad=ad[ai]){if(ad.nodeType==3&&ad.nodeValue.length!==0){return aj}if(ad.nodeType==1&&!K(ad)){return ad}}return aj}if(af&&ae){af=ag(af,"previousSibling");ae=ag(ae,"nextSibling");if(ah(af,ae)){for(ad=af.nextSibling;ad&&ad!=ae;){ac=ad;ad=ad.nextSibling;af.appendChild(ac)}c.remove(ae);T(a.grep(ae.childNodes),function(ai){af.appendChild(ai)});return af}}return ae}function I(ab){return/^(h[1-6]|p|div|pre|address|dl|dt|dd)$/.test(ab)}function M(ac,ag){var ab,af,ad,ae;ab=ac[ag?"startContainer":"endContainer"];af=ac[ag?"startOffset":"endOffset"];if(ab.nodeType==1){ad=ab.childNodes.length-1;if(!ag&&af){af--}ab=ab.childNodes[af>ad?ad:af]}if(ab.nodeType===3&&ag&&af>=ab.nodeValue.length){ab=new t(ab,aa.getBody()).next()||ab}if(ab.nodeType===3&&!ag&&af===0){ab=new t(ab,aa.getBody()).prev()||ab}return ab}function U(ak,ab,ai){var al="_mce_caret",ac=aa.settings.caret_debug;function ad(ap){var ao=c.create("span",{id:al,"data-mce-bogus":true,style:ac?"color:red":""});if(ap){ao.appendChild(aa.getDoc().createTextNode(G))}return ao}function aj(ap,ao){while(ap){if((ap.nodeType===3&&ap.nodeValue!==G)||ap.childNodes.length>1){return false}if(ao&&ap.nodeType===1){ao.push(ap)}ap=ap.firstChild}return true}function ag(ao){while(ao){if(ao.id===al){return ao}ao=ao.parentNode}}function af(ao){var ap;if(ao){ap=new t(ao,ao);for(ao=ap.current();ao;ao=ap.next()){if(ao.nodeType===3){return ao}}}}function ae(aq,ap){var ar,ao;if(!aq){aq=ag(r.getStart());if(!aq){while(aq=c.get(al)){ae(aq,false)}}}else{ao=r.getRng(true);if(aj(aq)){if(ap!==false){ao.setStartBefore(aq);ao.setEndBefore(aq)}c.remove(aq)}else{ar=af(aq);if(ar.nodeValue.charAt(0)===G){ar=ar.deleteData(0,1)}c.remove(aq,1)}r.setRng(ao)}}function ah(){var aq,ao,av,au,ar,ap,at;aq=r.getRng(true);au=aq.startOffset;ap=aq.startContainer;at=ap.nodeValue;ao=ag(r.getStart());if(ao){av=af(ao)}if(at&&au>0&&au<at.length&&/\w/.test(at.charAt(au))&&/\w/.test(at.charAt(au-1))){ar=r.getBookmark();aq.collapse(true);aq=p(aq,V(ab));aq=N.split(aq);Y(ab,ai,aq);r.moveToBookmark(ar)}else{if(!ao||av.nodeValue!==G){ao=ad(true);av=ao.firstChild;aq.insertNode(ao);au=1;Y(ab,ai,ao)}else{Y(ab,ai,ao)}r.setCursorLocation(av,au)}}function am(){var ao=r.getRng(true),ap,ar,av,au,aq,ay,ax=[],at,aw;ap=ao.startContainer;ar=ao.startOffset;aq=ap;if(ap.nodeType==3){if(ar!=ap.nodeValue.length||ap.nodeValue===G){au=true}aq=aq.parentNode}while(aq){if(y(aq,ab,ai)){ay=aq;break}if(aq.nextSibling){au=true}ax.push(aq);aq=aq.parentNode}if(!ay){return}if(au){av=r.getBookmark();ao.collapse(true);ao=p(ao,V(ab),true);ao=N.split(ao);B(ab,ai,ao);r.moveToBookmark(av)}else{aw=ad();aq=aw;for(at=ax.length-1;at>=0;at--){aq.appendChild(c.clone(ax[at],false));aq=aq.firstChild}aq.appendChild(c.doc.createTextNode(G));aq=aq.firstChild;c.insertAfter(aw,ay);r.setCursorLocation(aq,1)}}function an(){var ap,ao,aq;ao=ag(r.getStart());if(ao&&!c.isEmpty(ao)){a.walk(ao,function(ar){if(ar.nodeType==1&&ar.id!==al&&!c.isEmpty(ar)){c.setAttrib(ar,"data-mce-bogus",null)}},"childNodes")}}if(!self._hasCaretEvents){aa.onBeforeGetContent.addToTop(function(){var ao=[],ap;if(aj(ag(r.getStart()),ao)){ap=ao.length;while(ap--){c.setAttrib(ao[ap],"data-mce-bogus","1")}}});a.each("onMouseUp onKeyUp".split(" "),function(ao){aa[ao].addToTop(function(){ae();an()})});aa.onKeyDown.addToTop(function(ao,aq){var ap=aq.keyCode;if(ap==8||ap==37||ap==39){ae(ag(r.getStart()))}an()});r.onSetContent.add(an);self._hasCaretEvents=true}if(ak=="apply"){ah()}else{am()}}function R(ac){var ab=ac.startContainer,ai=ac.startOffset,ae,ah,ag,ad,af;if(ab.nodeType==3&&ai>=ab.nodeValue.length){ai=s(ab);ab=ab.parentNode;ae=true}if(ab.nodeType==1){ad=ab.childNodes;ab=ad[Math.min(ai,ad.length-1)];ah=new t(ab,c.getParent(ab,c.isBlock));if(ai>ad.length-1||ae){ah.next()}for(ag=ah.current();ag;ag=ah.next()){if(ag.nodeType==3&&!f(ag)){af=c.create("a",null,G);ag.parentNode.insertBefore(af,ag);ac.setStart(ag,0);r.setRng(ac);c.remove(af);return}}}}}})(tinymce);tinymce.onAddEditor.add(function(e,a){var d,h,g,c=a.settings;function b(j,i){e.each(i,function(l,k){if(l){g.setStyle(j,k,l)}});g.rename(j,"span")}function f(i,j){g=i.dom;if(c.convert_fonts_to_spans){e.each(g.select("font,u,strike",j.node),function(k){d[k.nodeName.toLowerCase()](a.dom,k)})}}if(c.inline_styles){h=e.explode(c.font_size_legacy_values);d={font:function(j,i){b(i,{backgroundColor:i.style.backgroundColor,color:i.color,fontFamily:i.face,fontSize:h[parseInt(i.size,10)-1]})},u:function(j,i){b(i,{textDecoration:"underline"})},strike:function(j,i){b(i,{textDecoration:"line-through"})}};a.onPreProcess.add(f);a.onSetContent.add(f);a.onInit.add(function(){a.selection.onSetContent.add(f)})}});(function(b){var a=b.dom.TreeWalker;b.EnterKey=function(f){var i=f.dom,e=f.selection,d=f.settings,h=f.undoManager,c=f.schema.getNonEmptyElements();function g(A){var v=e.getRng(true),G,j,z,u,p,M,B,o,k,n,t,J,x,C;function E(N){return N&&i.isBlock(N)&&!/^(TD|TH|CAPTION|FORM)$/.test(N.nodeName)&&!/^(fixed|absolute)/i.test(N.style.position)&&i.getContentEditable(N)!=="true"}function F(O){var N;if(b.isIE&&i.isBlock(O)){N=e.getRng();O.appendChild(i.create("span",null,"\u00a0"));e.select(O);O.lastChild.outerHTML="";e.setRng(N)}}function y(P){var O=P,Q=[],N;while(O=O.firstChild){if(i.isBlock(O)){return}if(O.nodeType==1&&!c[O.nodeName.toLowerCase()]){Q.push(O)}}N=Q.length;while(N--){O=Q[N];if(!O.hasChildNodes()||(O.firstChild==O.lastChild&&O.firstChild.nodeValue==="")){i.remove(O)}else{if(O.nodeName=="A"&&(O.innerText||O.textContent)===" "){i.remove(O)}}}}function m(O){var T,R,N,U,S,Q=O,P;N=i.createRng();if(O.hasChildNodes()){T=new a(O,O);while(R=T.current()){if(R.nodeType==3){N.setStart(R,0);N.setEnd(R,0);break}if(c[R.nodeName.toLowerCase()]){N.setStartBefore(R);N.setEndBefore(R);break}Q=R;R=T.next()}if(!R){N.setStart(Q,0);N.setEnd(Q,0)}}else{if(O.nodeName=="BR"){if(O.nextSibling&&i.isBlock(O.nextSibling)){if(!M||M<9){P=i.create("br");O.parentNode.insertBefore(P,O)}N.setStartBefore(O);N.setEndBefore(O)}else{N.setStartAfter(O);N.setEndAfter(O)}}else{N.setStart(O,0);N.setEnd(O,0)}}e.setRng(N);i.remove(P);S=i.getViewPort(f.getWin());U=i.getPos(O).y;if(U<S.y||U+25>S.y+S.h){f.getWin().scrollTo(0,U<S.y?U:U-S.h+25)}}function r(O){var P=z,R,Q,N;R=O||t=="TABLE"?i.create(O||x):p.cloneNode(false);N=R;if(d.keep_styles!==false){do{if(/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(P.nodeName)){if(P.id=="_mce_caret"){continue}Q=P.cloneNode(false);i.setAttrib(Q,"id","");if(R.hasChildNodes()){Q.appendChild(R.firstChild);R.appendChild(Q)}else{N=Q;R.appendChild(Q)}}}while(P=P.parentNode)}if(!b.isIE){N.innerHTML='<br data-mce-bogus="1">'}return R}function q(Q){var P,O,N;if(z.nodeType==3&&(Q?u>0:u<z.nodeValue.length)){return false}if(z.parentNode==p&&C&&!Q){return true}if(Q&&z.nodeType==1&&z==p.firstChild){return true}if(z.nodeName==="TABLE"||(z.previousSibling&&z.previousSibling.nodeName=="TABLE")){return(C&&!Q)||(!C&&Q)}P=new a(z,p);if(z.nodeType==3){if(Q&&u==0){P.prev()}else{if(!Q&&u==z.nodeValue.length){P.next()}}}while(O=P.current()){if(O.nodeType===1){if(!O.getAttribute("data-mce-bogus")){N=O.nodeName.toLowerCase();if(c[N]&&N!=="br"){return false}}}else{if(O.nodeType===3&&!/^[ \t\r\n]*$/.test(O.nodeValue)){return false}}if(Q){P.prev()}else{P.next()}}return true}function l(N,T){var U,S,P,R,Q,O=x||"P";S=i.getParent(N,i.isBlock);if(!S||!E(S)){S=S||j;if(!S.hasChildNodes()){U=i.create(O);S.appendChild(U);v.setStart(U,0);v.setEnd(U,0);return U}R=N;while(R.parentNode!=S){R=R.parentNode}while(R&&!i.isBlock(R)){P=R;R=R.previousSibling}if(P){U=i.create(O);P.parentNode.insertBefore(U,P);R=P;while(R&&!i.isBlock(R)){Q=R.nextSibling;U.appendChild(R);R=Q}v.setStart(N,T);v.setEnd(N,T)}}return N}function H(){function N(P){var O=n[P?"firstChild":"lastChild"];while(O){if(O.nodeType==1){break}O=O[P?"nextSibling":"previousSibling"]}return O===p}o=x?r(x):i.create("BR");if(N(true)&&N()){i.replace(o,n)}else{if(N(true)){n.parentNode.insertBefore(o,n)}else{if(N()){i.insertAfter(o,n);F(o)}else{G=v.cloneRange();G.setStartAfter(p);G.setEndAfter(n);k=G.extractContents();i.insertAfter(k,n);i.insertAfter(o,n)}}}i.remove(p);m(o);h.add()}function D(){var O=new a(z,p),N;while(N=O.current()){if(N.nodeName=="BR"){return true}N=O.next()}}function L(){var O,N;if(z&&z.nodeType==3&&u>=z.nodeValue.length){if(!b.isIE&&!D()){O=i.create("br");v.insertNode(O);v.setStartAfter(O);v.setEndAfter(O);N=true}}O=i.create("br");v.insertNode(O);if(b.isIE&&t=="PRE"&&(!M||M<8)){O.parentNode.insertBefore(i.doc.createTextNode("\r"),O)}if(!N){v.setStartAfter(O);v.setEndAfter(O)}else{v.setStartBefore(O);v.setEndBefore(O)}e.setRng(v);h.add()}function s(N){do{if(N.nodeType===3){N.nodeValue=N.nodeValue.replace(/^[\r\n]+/,"")}N=N.firstChild}while(N)}function K(P){var N=i.getRoot(),O,Q;O=P;while(O!==N&&i.getContentEditable(O)!=="false"){if(i.getContentEditable(O)==="true"){Q=O}O=O.parentNode}return O!==N?Q:N}function I(O){var N;if(!b.isIE){O.normalize();N=O.lastChild;if(!N||(/^(left|right)$/gi.test(i.getStyle(N,"float",true)))){i.add(O,"br")}}}if(!v.collapsed){f.execCommand("Delete");return}if(A.isDefaultPrevented()){return}z=v.startContainer;u=v.startOffset;x=(d.force_p_newlines?"p":"")||d.forced_root_block;x=x?x.toUpperCase():"";M=i.doc.documentMode;B=A.shiftKey;if(z.nodeType==1&&z.hasChildNodes()){C=u>z.childNodes.length-1;z=z.childNodes[Math.min(u,z.childNodes.length-1)]||z;if(C&&z.nodeType==3){u=z.nodeValue.length}else{u=0}}j=K(z);if(!j){return}h.beforeChange();if(!i.isBlock(j)&&j!=i.getRoot()){if(!x||B){L()}return}if((x&&!B)||(!x&&B)){z=l(z,u)}p=i.getParent(z,i.isBlock);n=p?i.getParent(p.parentNode,i.isBlock):null;t=p?p.nodeName.toUpperCase():"";J=n?n.nodeName.toUpperCase():"";if(J=="LI"&&!A.ctrlKey){p=n;t=J}if(t=="LI"){if(!x&&B){L();return}if(i.isEmpty(p)){if(/^(UL|OL|LI)$/.test(n.parentNode.nodeName)){return false}H();return}}if(t=="PRE"&&d.br_in_pre!==false){if(!B){L();return}}else{if((!x&&!B&&t!="LI")||(x&&B)){L();return}}x=x||"P";if(q()){if(/^(H[1-6]|PRE)$/.test(t)&&J!="HGROUP"){o=r(x)}else{o=r()}if(d.end_container_on_empty_block&&E(n)&&i.isEmpty(p)){o=i.split(n,p)}else{i.insertAfter(o,p)}m(o)}else{if(q(true)){o=p.parentNode.insertBefore(r(),p);F(o)}else{G=v.cloneRange();G.setEndAfter(p);k=G.extractContents();s(k);o=k.firstChild;i.insertAfter(k,p);y(o);I(p);m(o)}}i.setAttrib(o,"id","");h.add()}f.onKeyDown.add(function(k,j){if(j.keyCode==13){if(g(j)!==false){j.preventDefault()}}})}})(tinymce); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/tiny_mce_popup.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/tiny_mce_popup.js
new file mode 100755
index 00000000..bb8e58c8
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/tiny_mce_popup.js
@@ -0,0 +1,5 @@
+
+// Uncomment and change this document.domain value if you are loading the script cross subdomains
+// document.domain = 'moxiecode.com';
+
+var tinymce=null,tinyMCEPopup,tinyMCE;tinyMCEPopup={init:function(){var b=this,a,c;a=b.getWin();tinymce=a.tinymce;tinyMCE=a.tinyMCE;b.editor=tinymce.EditorManager.activeEditor;b.params=b.editor.windowManager.params;b.features=b.editor.windowManager.features;b.dom=b.editor.windowManager.createInstance("tinymce.dom.DOMUtils",document,{ownEvents:true,proxy:tinyMCEPopup._eventProxy});b.dom.bind(window,"ready",b._onDOMLoaded,b);if(b.features.popup_css!==false){b.dom.loadCSS(b.features.popup_css||b.editor.settings.popup_css)}b.listeners=[];b.onInit={add:function(e,d){b.listeners.push({func:e,scope:d})}};b.isWindow=!b.getWindowArg("mce_inline");b.id=b.getWindowArg("mce_window_id");b.editor.windowManager.onOpen.dispatch(b.editor.windowManager,window)},getWin:function(){return(!window.frameElement&&window.dialogArguments)||opener||parent||top},getWindowArg:function(c,b){var a=this.params[c];return tinymce.is(a)?a:b},getParam:function(b,a){return this.editor.getParam(b,a)},getLang:function(b,a){return this.editor.getLang(b,a)},execCommand:function(d,c,e,b){b=b||{};b.skip_focus=1;this.restoreSelection();return this.editor.execCommand(d,c,e,b)},resizeToInnerSize:function(){var a=this;setTimeout(function(){var b=a.dom.getViewPort(window);a.editor.windowManager.resizeBy(a.getWindowArg("mce_width")-b.w,a.getWindowArg("mce_height")-b.h,a.id||window)},10)},executeOnLoad:function(s){this.onInit.add(function(){eval(s)})},storeSelection:function(){this.editor.windowManager.bookmark=tinyMCEPopup.editor.selection.getBookmark(1)},restoreSelection:function(){var a=tinyMCEPopup;if(!a.isWindow&&tinymce.isIE){a.editor.selection.moveToBookmark(a.editor.windowManager.bookmark)}},requireLangPack:function(){var b=this,a=b.getWindowArg("plugin_url")||b.getWindowArg("theme_url");if(a&&b.editor.settings.language&&b.features.translate_i18n!==false&&b.editor.settings.language_load!==false){a+="/langs/"+b.editor.settings.language+"_dlg.js";if(!tinymce.ScriptLoader.isDone(a)){document.write('<script type="text/javascript" src="'+tinymce._addVer(a)+'"><\/script>');tinymce.ScriptLoader.markDone(a)}}},pickColor:function(b,a){this.execCommand("mceColorPicker",true,{color:document.getElementById(a).value,func:function(e){document.getElementById(a).value=e;try{document.getElementById(a).onchange()}catch(d){}}})},openBrowser:function(a,c,b){tinyMCEPopup.restoreSelection();this.editor.execCallback("file_browser_callback",a,document.getElementById(a).value,c,window)},confirm:function(b,a,c){this.editor.windowManager.confirm(b,a,c,window)},alert:function(b,a,c){this.editor.windowManager.alert(b,a,c,window)},close:function(){var a=this;function b(){a.editor.windowManager.close(window);tinymce=tinyMCE=a.editor=a.params=a.dom=a.dom.doc=null}if(tinymce.isOpera){a.getWin().setTimeout(b,0)}else{b()}},_restoreSelection:function(){var a=window.event.srcElement;if(a.nodeName=="INPUT"&&(a.type=="submit"||a.type=="button")){tinyMCEPopup.restoreSelection()}},_onDOMLoaded:function(){var b=tinyMCEPopup,d=document.title,e,c,a;if(b.features.translate_i18n!==false){c=document.body.innerHTML;if(tinymce.isIE){c=c.replace(/ (value|title|alt)=([^"][^\s>]+)/gi,' $1="$2"')}document.dir=b.editor.getParam("directionality","");if((a=b.editor.translate(c))&&a!=c){document.body.innerHTML=a}if((a=b.editor.translate(d))&&a!=d){document.title=d=a}}if(!b.editor.getParam("browser_preferred_colors",false)||!b.isWindow){b.dom.addClass(document.body,"forceColors")}document.body.style.display="";if(tinymce.isIE){document.attachEvent("onmouseup",tinyMCEPopup._restoreSelection);b.dom.add(b.dom.select("head")[0],"base",{target:"_self"})}b.restoreSelection();b.resizeToInnerSize();if(!b.isWindow){b.editor.windowManager.setTitle(window,d)}else{window.focus()}if(!tinymce.isIE&&!b.isWindow){b.dom.bind(document,"focus",function(){b.editor.windowManager.focus(b.id)})}tinymce.each(b.dom.select("select"),function(f){f.onkeydown=tinyMCEPopup._accessHandler});tinymce.each(b.listeners,function(f){f.func.call(f.scope,b.editor)});if(b.getWindowArg("mce_auto_focus",true)){window.focus();tinymce.each(document.forms,function(g){tinymce.each(g.elements,function(f){if(b.dom.hasClass(f,"mceFocus")&&!f.disabled){f.focus();return false}})})}document.onkeyup=tinyMCEPopup._closeWinKeyHandler},_accessHandler:function(a){a=a||window.event;if(a.keyCode==13||a.keyCode==32){var b=a.target||a.srcElement;if(b.onchange){b.onchange()}return tinymce.dom.Event.cancel(a)}},_closeWinKeyHandler:function(a){a=a||window.event;if(a.keyCode==27){tinyMCEPopup.close()}},_eventProxy:function(a){return function(b){tinyMCEPopup.dom.events.callNativeHandler(a,b)}}};tinyMCEPopup.init(); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/tiny_mce_src.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/tiny_mce_src.js
new file mode 100755
index 00000000..fab0d301
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/tiny_mce_src.js
@@ -0,0 +1,18988 @@
+// FILE IS GENERATED BY COMBINING THE SOURCES IN THE "classes" DIRECTORY SO DON'T MODIFY THIS FILE DIRECTLY
+(function(win) {
+ var whiteSpaceRe = /^\s*|\s*$/g,
+ undef, isRegExpBroken = 'B'.replace(/A(.)|B/, '$1') === '$1';
+
+ var tinymce = {
+ majorVersion : '3',
+
+ minorVersion : '5.7',
+
+ releaseDate : '2012-09-20',
+
+ _init : function() {
+ var t = this, d = document, na = navigator, ua = na.userAgent, i, nl, n, base, p, v;
+
+ t.isOpera = win.opera && opera.buildNumber;
+
+ t.isWebKit = /WebKit/.test(ua);
+
+ t.isIE = !t.isWebKit && !t.isOpera && (/MSIE/gi).test(ua) && (/Explorer/gi).test(na.appName);
+
+ t.isIE6 = t.isIE && /MSIE [56]/.test(ua);
+
+ t.isIE7 = t.isIE && /MSIE [7]/.test(ua);
+
+ t.isIE8 = t.isIE && /MSIE [8]/.test(ua);
+
+ t.isIE9 = t.isIE && /MSIE [9]/.test(ua);
+
+ t.isGecko = !t.isWebKit && /Gecko/.test(ua);
+
+ t.isMac = ua.indexOf('Mac') != -1;
+
+ t.isAir = /adobeair/i.test(ua);
+
+ t.isIDevice = /(iPad|iPhone)/.test(ua);
+
+ t.isIOS5 = t.isIDevice && ua.match(/AppleWebKit\/(\d*)/)[1]>=534;
+
+ // TinyMCE .NET webcontrol might be setting the values for TinyMCE
+ if (win.tinyMCEPreInit) {
+ t.suffix = tinyMCEPreInit.suffix;
+ t.baseURL = tinyMCEPreInit.base;
+ t.query = tinyMCEPreInit.query;
+ return;
+ }
+
+ // Get suffix and base
+ t.suffix = '';
+
+ // If base element found, add that infront of baseURL
+ nl = d.getElementsByTagName('base');
+ for (i=0; i<nl.length; i++) {
+ v = nl[i].href;
+ if (v) {
+ // Host only value like http://site.com or http://site.com:8008
+ if (/^https?:\/\/[^\/]+$/.test(v))
+ v += '/';
+
+ base = v ? v.match(/.*\//)[0] : ''; // Get only directory
+ }
+ }
+
+ function getBase(n) {
+ if (n.src && /tiny_mce(|_gzip|_jquery|_prototype|_full)(_dev|_src)?.js/.test(n.src)) {
+ if (/_(src|dev)\.js/g.test(n.src))
+ t.suffix = '_src';
+
+ if ((p = n.src.indexOf('?')) != -1)
+ t.query = n.src.substring(p + 1);
+
+ t.baseURL = n.src.substring(0, n.src.lastIndexOf('/'));
+
+ // If path to script is relative and a base href was found add that one infront
+ // the src property will always be an absolute one on non IE browsers and IE 8
+ // so this logic will basically only be executed on older IE versions
+ if (base && t.baseURL.indexOf('://') == -1 && t.baseURL.indexOf('/') !== 0)
+ t.baseURL = base + t.baseURL;
+
+ return t.baseURL;
+ }
+
+ return null;
+ };
+
+ // Check document
+ nl = d.getElementsByTagName('script');
+ for (i=0; i<nl.length; i++) {
+ if (getBase(nl[i]))
+ return;
+ }
+
+ // Check head
+ n = d.getElementsByTagName('head')[0];
+ if (n) {
+ nl = n.getElementsByTagName('script');
+ for (i=0; i<nl.length; i++) {
+ if (getBase(nl[i]))
+ return;
+ }
+ }
+
+ return;
+ },
+
+ is : function(o, t) {
+ if (!t)
+ return o !== undef;
+
+ if (t == 'array' && tinymce.isArray(o))
+ return true;
+
+ return typeof(o) == t;
+ },
+
+ isArray: Array.isArray || function(obj) {
+ return Object.prototype.toString.call(obj) === "[object Array]";
+ },
+
+ makeMap : function(items, delim, map) {
+ var i;
+
+ items = items || [];
+ delim = delim || ',';
+
+ if (typeof(items) == "string")
+ items = items.split(delim);
+
+ map = map || {};
+
+ i = items.length;
+ while (i--)
+ map[items[i]] = {};
+
+ return map;
+ },
+
+ each : function(o, cb, s) {
+ var n, l;
+
+ if (!o)
+ return 0;
+
+ s = s || o;
+
+ if (o.length !== undef) {
+ // Indexed arrays, needed for Safari
+ for (n=0, l = o.length; n < l; n++) {
+ if (cb.call(s, o[n], n, o) === false)
+ return 0;
+ }
+ } else {
+ // Hashtables
+ for (n in o) {
+ if (o.hasOwnProperty(n)) {
+ if (cb.call(s, o[n], n, o) === false)
+ return 0;
+ }
+ }
+ }
+
+ return 1;
+ },
+
+
+ map : function(a, f) {
+ var o = [];
+
+ tinymce.each(a, function(v) {
+ o.push(f(v));
+ });
+
+ return o;
+ },
+
+ grep : function(a, f) {
+ var o = [];
+
+ tinymce.each(a, function(v) {
+ if (!f || f(v))
+ o.push(v);
+ });
+
+ return o;
+ },
+
+ inArray : function(a, v) {
+ var i, l;
+
+ if (a) {
+ for (i = 0, l = a.length; i < l; i++) {
+ if (a[i] === v)
+ return i;
+ }
+ }
+
+ return -1;
+ },
+
+ extend : function(obj, ext) {
+ var i, l, name, args = arguments, value;
+
+ for (i = 1, l = args.length; i < l; i++) {
+ ext = args[i];
+ for (name in ext) {
+ if (ext.hasOwnProperty(name)) {
+ value = ext[name];
+
+ if (value !== undef) {
+ obj[name] = value;
+ }
+ }
+ }
+ }
+
+ return obj;
+ },
+
+
+ trim : function(s) {
+ return (s ? '' + s : '').replace(whiteSpaceRe, '');
+ },
+
+ create : function(s, p, root) {
+ var t = this, sp, ns, cn, scn, c, de = 0;
+
+ // Parse : <prefix> <class>:<super class>
+ s = /^((static) )?([\w.]+)(:([\w.]+))?/.exec(s);
+ cn = s[3].match(/(^|\.)(\w+)$/i)[2]; // Class name
+
+ // Create namespace for new class
+ ns = t.createNS(s[3].replace(/\.\w+$/, ''), root);
+
+ // Class already exists
+ if (ns[cn])
+ return;
+
+ // Make pure static class
+ if (s[2] == 'static') {
+ ns[cn] = p;
+
+ if (this.onCreate)
+ this.onCreate(s[2], s[3], ns[cn]);
+
+ return;
+ }
+
+ // Create default constructor
+ if (!p[cn]) {
+ p[cn] = function() {};
+ de = 1;
+ }
+
+ // Add constructor and methods
+ ns[cn] = p[cn];
+ t.extend(ns[cn].prototype, p);
+
+ // Extend
+ if (s[5]) {
+ sp = t.resolve(s[5]).prototype;
+ scn = s[5].match(/\.(\w+)$/i)[1]; // Class name
+
+ // Extend constructor
+ c = ns[cn];
+ if (de) {
+ // Add passthrough constructor
+ ns[cn] = function() {
+ return sp[scn].apply(this, arguments);
+ };
+ } else {
+ // Add inherit constructor
+ ns[cn] = function() {
+ this.parent = sp[scn];
+ return c.apply(this, arguments);
+ };
+ }
+ ns[cn].prototype[cn] = ns[cn];
+
+ // Add super methods
+ t.each(sp, function(f, n) {
+ ns[cn].prototype[n] = sp[n];
+ });
+
+ // Add overridden methods
+ t.each(p, function(f, n) {
+ // Extend methods if needed
+ if (sp[n]) {
+ ns[cn].prototype[n] = function() {
+ this.parent = sp[n];
+ return f.apply(this, arguments);
+ };
+ } else {
+ if (n != cn)
+ ns[cn].prototype[n] = f;
+ }
+ });
+ }
+
+ // Add static methods
+ t.each(p['static'], function(f, n) {
+ ns[cn][n] = f;
+ });
+
+ if (this.onCreate)
+ this.onCreate(s[2], s[3], ns[cn].prototype);
+ },
+
+ walk : function(o, f, n, s) {
+ s = s || this;
+
+ if (o) {
+ if (n)
+ o = o[n];
+
+ tinymce.each(o, function(o, i) {
+ if (f.call(s, o, i, n) === false)
+ return false;
+
+ tinymce.walk(o, f, n, s);
+ });
+ }
+ },
+
+ createNS : function(n, o) {
+ var i, v;
+
+ o = o || win;
+
+ n = n.split('.');
+ for (i=0; i<n.length; i++) {
+ v = n[i];
+
+ if (!o[v])
+ o[v] = {};
+
+ o = o[v];
+ }
+
+ return o;
+ },
+
+ resolve : function(n, o) {
+ var i, l;
+
+ o = o || win;
+
+ n = n.split('.');
+ for (i = 0, l = n.length; i < l; i++) {
+ o = o[n[i]];
+
+ if (!o)
+ break;
+ }
+
+ return o;
+ },
+
+ addUnload : function(f, s) {
+ var t = this, unload;
+
+ unload = function() {
+ var li = t.unloads, o, n;
+
+ if (li) {
+ // Call unload handlers
+ for (n in li) {
+ o = li[n];
+
+ if (o && o.func)
+ o.func.call(o.scope, 1); // Send in one arg to distinct unload and user destroy
+ }
+
+ // Detach unload function
+ if (win.detachEvent) {
+ win.detachEvent('onbeforeunload', fakeUnload);
+ win.detachEvent('onunload', unload);
+ } else if (win.removeEventListener)
+ win.removeEventListener('unload', unload, false);
+
+ // Destroy references
+ t.unloads = o = li = w = unload = 0;
+
+ // Run garbarge collector on IE
+ if (win.CollectGarbage)
+ CollectGarbage();
+ }
+ };
+
+ function fakeUnload() {
+ var d = document;
+
+ function stop() {
+ // Prevent memory leak
+ d.detachEvent('onstop', stop);
+
+ // Call unload handler
+ if (unload)
+ unload();
+
+ d = 0;
+ };
+
+ // Is there things still loading, then do some magic
+ if (d.readyState == 'interactive') {
+ // Fire unload when the currently loading page is stopped
+ if (d)
+ d.attachEvent('onstop', stop);
+
+ // Remove onstop listener after a while to prevent the unload function
+ // to execute if the user presses cancel in an onbeforeunload
+ // confirm dialog and then presses the browser stop button
+ win.setTimeout(function() {
+ if (d)
+ d.detachEvent('onstop', stop);
+ }, 0);
+ }
+ };
+
+ f = {func : f, scope : s || this};
+
+ if (!t.unloads) {
+ // Attach unload handler
+ if (win.attachEvent) {
+ win.attachEvent('onunload', unload);
+ win.attachEvent('onbeforeunload', fakeUnload);
+ } else if (win.addEventListener)
+ win.addEventListener('unload', unload, false);
+
+ // Setup initial unload handler array
+ t.unloads = [f];
+ } else
+ t.unloads.push(f);
+
+ return f;
+ },
+
+ removeUnload : function(f) {
+ var u = this.unloads, r = null;
+
+ tinymce.each(u, function(o, i) {
+ if (o && o.func == f) {
+ u.splice(i, 1);
+ r = f;
+ return false;
+ }
+ });
+
+ return r;
+ },
+
+ explode : function(s, d) {
+ if (!s || tinymce.is(s, 'array')) {
+ return s;
+ }
+
+ return tinymce.map(s.split(d || ','), tinymce.trim);
+ },
+
+ _addVer : function(u) {
+ var v;
+
+ if (!this.query)
+ return u;
+
+ v = (u.indexOf('?') == -1 ? '?' : '&') + this.query;
+
+ if (u.indexOf('#') == -1)
+ return u + v;
+
+ return u.replace('#', v + '#');
+ },
+
+ // Fix function for IE 9 where regexps isn't working correctly
+ // Todo: remove me once MS fixes the bug
+ _replace : function(find, replace, str) {
+ // On IE9 we have to fake $x replacement
+ if (isRegExpBroken) {
+ return str.replace(find, function() {
+ var val = replace, args = arguments, i;
+
+ for (i = 0; i < args.length - 2; i++) {
+ if (args[i] === undef) {
+ val = val.replace(new RegExp('\\$' + i, 'g'), '');
+ } else {
+ val = val.replace(new RegExp('\\$' + i, 'g'), args[i]);
+ }
+ }
+
+ return val;
+ });
+ }
+
+ return str.replace(find, replace);
+ }
+
+ };
+
+ // Initialize the API
+ tinymce._init();
+
+ // Expose tinymce namespace to the global namespace (window)
+ win.tinymce = win.tinyMCE = tinymce;
+
+ // Describe the different namespaces
+
+ })(window);
+
+
+
+tinymce.create('tinymce.util.Dispatcher', {
+ scope : null,
+ listeners : null,
+ inDispatch: false,
+
+ Dispatcher : function(scope) {
+ this.scope = scope || this;
+ this.listeners = [];
+ },
+
+ add : function(callback, scope) {
+ this.listeners.push({cb : callback, scope : scope || this.scope});
+
+ return callback;
+ },
+
+ addToTop : function(callback, scope) {
+ var self = this, listener = {cb : callback, scope : scope || self.scope};
+
+ // Create new listeners if addToTop is executed in a dispatch loop
+ if (self.inDispatch) {
+ self.listeners = [listener].concat(self.listeners);
+ } else {
+ self.listeners.unshift(listener);
+ }
+
+ return callback;
+ },
+
+ remove : function(callback) {
+ var listeners = this.listeners, output = null;
+
+ tinymce.each(listeners, function(listener, i) {
+ if (callback == listener.cb) {
+ output = listener;
+ listeners.splice(i, 1);
+ return false;
+ }
+ });
+
+ return output;
+ },
+
+ dispatch : function() {
+ var self = this, returnValue, args = arguments, i, listeners = self.listeners, listener;
+
+ self.inDispatch = true;
+
+ // Needs to be a real loop since the listener count might change while looping
+ // And this is also more efficient
+ for (i = 0; i < listeners.length; i++) {
+ listener = listeners[i];
+ returnValue = listener.cb.apply(listener.scope, args.length > 0 ? args : [listener.scope]);
+
+ if (returnValue === false)
+ break;
+ }
+
+ self.inDispatch = false;
+
+ return returnValue;
+ }
+
+ });
+
+(function() {
+ var each = tinymce.each;
+
+ tinymce.create('tinymce.util.URI', {
+ URI : function(u, s) {
+ var t = this, o, a, b, base_url;
+
+ // Trim whitespace
+ u = tinymce.trim(u);
+
+ // Default settings
+ s = t.settings = s || {};
+
+ // Strange app protocol that isn't http/https or local anchor
+ // For example: mailto,skype,tel etc.
+ if (/^([\w\-]+):([^\/]{2})/i.test(u) || /^\s*#/.test(u)) {
+ t.source = u;
+ return;
+ }
+
+ // Absolute path with no host, fake host and protocol
+ if (u.indexOf('/') === 0 && u.indexOf('//') !== 0)
+ u = (s.base_uri ? s.base_uri.protocol || 'http' : 'http') + '://mce_host' + u;
+
+ // Relative path http:// or protocol relative //path
+ if (!/^[\w\-]*:?\/\//.test(u)) {
+ base_url = s.base_uri ? s.base_uri.path : new tinymce.util.URI(location.href).directory;
+ u = ((s.base_uri && s.base_uri.protocol) || 'http') + '://mce_host' + t.toAbsPath(base_url, u);
+ }
+
+ // Parse URL (Credits goes to Steave, http://blog.stevenlevithan.com/archives/parseuri)
+ u = u.replace(/@@/g, '(mce_at)'); // Zope 3 workaround, they use @@something
+ u = /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(u);
+ each(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"], function(v, i) {
+ var s = u[i];
+
+ // Zope 3 workaround, they use @@something
+ if (s)
+ s = s.replace(/\(mce_at\)/g, '@@');
+
+ t[v] = s;
+ });
+
+ b = s.base_uri;
+ if (b) {
+ if (!t.protocol)
+ t.protocol = b.protocol;
+
+ if (!t.userInfo)
+ t.userInfo = b.userInfo;
+
+ if (!t.port && t.host === 'mce_host')
+ t.port = b.port;
+
+ if (!t.host || t.host === 'mce_host')
+ t.host = b.host;
+
+ t.source = '';
+ }
+
+ //t.path = t.path || '/';
+ },
+
+ setPath : function(p) {
+ var t = this;
+
+ p = /^(.*?)\/?(\w+)?$/.exec(p);
+
+ // Update path parts
+ t.path = p[0];
+ t.directory = p[1];
+ t.file = p[2];
+
+ // Rebuild source
+ t.source = '';
+ t.getURI();
+ },
+
+ toRelative : function(u) {
+ var t = this, o;
+
+ if (u === "./")
+ return u;
+
+ u = new tinymce.util.URI(u, {base_uri : t});
+
+ // Not on same domain/port or protocol
+ if ((u.host != 'mce_host' && t.host != u.host && u.host) || t.port != u.port || t.protocol != u.protocol)
+ return u.getURI();
+
+ var tu = t.getURI(), uu = u.getURI();
+
+ // Allow usage of the base_uri when relative_urls = true
+ if(tu == uu || (tu.charAt(tu.length - 1) == "/" && tu.substr(0, tu.length - 1) == uu))
+ return tu;
+
+ o = t.toRelPath(t.path, u.path);
+
+ // Add query
+ if (u.query)
+ o += '?' + u.query;
+
+ // Add anchor
+ if (u.anchor)
+ o += '#' + u.anchor;
+
+ return o;
+ },
+
+ toAbsolute : function(u, nh) {
+ u = new tinymce.util.URI(u, {base_uri : this});
+
+ return u.getURI(this.host == u.host && this.protocol == u.protocol ? nh : 0);
+ },
+
+ toRelPath : function(base, path) {
+ var items, bp = 0, out = '', i, l;
+
+ // Split the paths
+ base = base.substring(0, base.lastIndexOf('/'));
+ base = base.split('/');
+ items = path.split('/');
+
+ if (base.length >= items.length) {
+ for (i = 0, l = base.length; i < l; i++) {
+ if (i >= items.length || base[i] != items[i]) {
+ bp = i + 1;
+ break;
+ }
+ }
+ }
+
+ if (base.length < items.length) {
+ for (i = 0, l = items.length; i < l; i++) {
+ if (i >= base.length || base[i] != items[i]) {
+ bp = i + 1;
+ break;
+ }
+ }
+ }
+
+ if (bp === 1)
+ return path;
+
+ for (i = 0, l = base.length - (bp - 1); i < l; i++)
+ out += "../";
+
+ for (i = bp - 1, l = items.length; i < l; i++) {
+ if (i != bp - 1)
+ out += "/" + items[i];
+ else
+ out += items[i];
+ }
+
+ return out;
+ },
+
+ toAbsPath : function(base, path) {
+ var i, nb = 0, o = [], tr, outPath;
+
+ // Split paths
+ tr = /\/$/.test(path) ? '/' : '';
+ base = base.split('/');
+ path = path.split('/');
+
+ // Remove empty chunks
+ each(base, function(k) {
+ if (k)
+ o.push(k);
+ });
+
+ base = o;
+
+ // Merge relURLParts chunks
+ for (i = path.length - 1, o = []; i >= 0; i--) {
+ // Ignore empty or .
+ if (path[i].length === 0 || path[i] === ".")
+ continue;
+
+ // Is parent
+ if (path[i] === '..') {
+ nb++;
+ continue;
+ }
+
+ // Move up
+ if (nb > 0) {
+ nb--;
+ continue;
+ }
+
+ o.push(path[i]);
+ }
+
+ i = base.length - nb;
+
+ // If /a/b/c or /
+ if (i <= 0)
+ outPath = o.reverse().join('/');
+ else
+ outPath = base.slice(0, i).join('/') + '/' + o.reverse().join('/');
+
+ // Add front / if it's needed
+ if (outPath.indexOf('/') !== 0)
+ outPath = '/' + outPath;
+
+ // Add traling / if it's needed
+ if (tr && outPath.lastIndexOf('/') !== outPath.length - 1)
+ outPath += tr;
+
+ return outPath;
+ },
+
+ getURI : function(nh) {
+ var s, t = this;
+
+ // Rebuild source
+ if (!t.source || nh) {
+ s = '';
+
+ if (!nh) {
+ if (t.protocol)
+ s += t.protocol + '://';
+
+ if (t.userInfo)
+ s += t.userInfo + '@';
+
+ if (t.host)
+ s += t.host;
+
+ if (t.port)
+ s += ':' + t.port;
+ }
+
+ if (t.path)
+ s += t.path;
+
+ if (t.query)
+ s += '?' + t.query;
+
+ if (t.anchor)
+ s += '#' + t.anchor;
+
+ t.source = s;
+ }
+
+ return t.source;
+ }
+ });
+})();
+
+(function() {
+ var each = tinymce.each;
+
+ tinymce.create('static tinymce.util.Cookie', {
+ getHash : function(n) {
+ var v = this.get(n), h;
+
+ if (v) {
+ each(v.split('&'), function(v) {
+ v = v.split('=');
+ h = h || {};
+ h[unescape(v[0])] = unescape(v[1]);
+ });
+ }
+
+ return h;
+ },
+
+ setHash : function(n, v, e, p, d, s) {
+ var o = '';
+
+ each(v, function(v, k) {
+ o += (!o ? '' : '&') + escape(k) + '=' + escape(v);
+ });
+
+ this.set(n, o, e, p, d, s);
+ },
+
+ get : function(n) {
+ var c = document.cookie, e, p = n + "=", b;
+
+ // Strict mode
+ if (!c)
+ return;
+
+ b = c.indexOf("; " + p);
+
+ if (b == -1) {
+ b = c.indexOf(p);
+
+ if (b !== 0)
+ return null;
+ } else
+ b += 2;
+
+ e = c.indexOf(";", b);
+
+ if (e == -1)
+ e = c.length;
+
+ return unescape(c.substring(b + p.length, e));
+ },
+
+ set : function(n, v, e, p, d, s) {
+ document.cookie = n + "=" + escape(v) +
+ ((e) ? "; expires=" + e.toGMTString() : "") +
+ ((p) ? "; path=" + escape(p) : "") +
+ ((d) ? "; domain=" + d : "") +
+ ((s) ? "; secure" : "");
+ },
+
+ remove : function(name, path, domain) {
+ var date = new Date();
+
+ date.setTime(date.getTime() - 1000);
+
+ this.set(name, '', date, path, domain);
+ }
+ });
+})();
+
+(function() {
+ function serialize(o, quote) {
+ var i, v, t, name;
+
+ quote = quote || '"';
+
+ if (o == null)
+ return 'null';
+
+ t = typeof o;
+
+ if (t == 'string') {
+ v = '\bb\tt\nn\ff\rr\""\'\'\\\\';
+
+ return quote + o.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g, function(a, b) {
+ // Make sure single quotes never get encoded inside double quotes for JSON compatibility
+ if (quote === '"' && a === "'")
+ return a;
+
+ i = v.indexOf(b);
+
+ if (i + 1)
+ return '\\' + v.charAt(i + 1);
+
+ a = b.charCodeAt().toString(16);
+
+ return '\\u' + '0000'.substring(a.length) + a;
+ }) + quote;
+ }
+
+ if (t == 'object') {
+ if (o.hasOwnProperty && Object.prototype.toString.call(o) === '[object Array]') {
+ for (i=0, v = '['; i<o.length; i++)
+ v += (i > 0 ? ',' : '') + serialize(o[i], quote);
+
+ return v + ']';
+ }
+
+ v = '{';
+
+ for (name in o) {
+ if (o.hasOwnProperty(name)) {
+ v += typeof o[name] != 'function' ? (v.length > 1 ? ',' + quote : quote) + name + quote +':' + serialize(o[name], quote) : '';
+ }
+ }
+
+ return v + '}';
+ }
+
+ return '' + o;
+ };
+
+ tinymce.util.JSON = {
+ serialize: serialize,
+
+ parse: function(s) {
+ try {
+ return eval('(' + s + ')');
+ } catch (ex) {
+ // Ignore
+ }
+ }
+
+ };
+})();
+
+tinymce.create('static tinymce.util.XHR', {
+ send : function(o) {
+ var x, t, w = window, c = 0;
+
+ function ready() {
+ if (!o.async || x.readyState == 4 || c++ > 10000) {
+ if (o.success && c < 10000 && x.status == 200)
+ o.success.call(o.success_scope, '' + x.responseText, x, o);
+ else if (o.error)
+ o.error.call(o.error_scope, c > 10000 ? 'TIMED_OUT' : 'GENERAL', x, o);
+
+ x = null;
+ } else
+ w.setTimeout(ready, 10);
+ };
+
+ // Default settings
+ o.scope = o.scope || this;
+ o.success_scope = o.success_scope || o.scope;
+ o.error_scope = o.error_scope || o.scope;
+ o.async = o.async === false ? false : true;
+ o.data = o.data || '';
+
+ function get(s) {
+ x = 0;
+
+ try {
+ x = new ActiveXObject(s);
+ } catch (ex) {
+ }
+
+ return x;
+ };
+
+ x = w.XMLHttpRequest ? new XMLHttpRequest() : get('Microsoft.XMLHTTP') || get('Msxml2.XMLHTTP');
+
+ if (x) {
+ if (x.overrideMimeType)
+ x.overrideMimeType(o.content_type);
+
+ x.open(o.type || (o.data ? 'POST' : 'GET'), o.url, o.async);
+
+ if (o.content_type)
+ x.setRequestHeader('Content-Type', o.content_type);
+
+ x.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
+
+ x.send(o.data);
+
+ // Syncronous request
+ if (!o.async)
+ return ready();
+
+ // Wait for response, onReadyStateChange can not be used since it leaks memory in IE
+ t = w.setTimeout(ready, 10);
+ }
+ }
+});
+
+(function() {
+ var extend = tinymce.extend, JSON = tinymce.util.JSON, XHR = tinymce.util.XHR;
+
+ tinymce.create('tinymce.util.JSONRequest', {
+ JSONRequest : function(s) {
+ this.settings = extend({
+ }, s);
+ this.count = 0;
+ },
+
+ send : function(o) {
+ var ecb = o.error, scb = o.success;
+
+ o = extend(this.settings, o);
+
+ o.success = function(c, x) {
+ c = JSON.parse(c);
+
+ if (typeof(c) == 'undefined') {
+ c = {
+ error : 'JSON Parse error.'
+ };
+ }
+
+ if (c.error)
+ ecb.call(o.error_scope || o.scope, c.error, x);
+ else
+ scb.call(o.success_scope || o.scope, c.result);
+ };
+
+ o.error = function(ty, x) {
+ if (ecb)
+ ecb.call(o.error_scope || o.scope, ty, x);
+ };
+
+ o.data = JSON.serialize({
+ id : o.id || 'c' + (this.count++),
+ method : o.method,
+ params : o.params
+ });
+
+ // JSON content type for Ruby on rails. Bug: #1883287
+ o.content_type = 'application/json';
+
+ XHR.send(o);
+ },
+
+ 'static' : {
+ sendRPC : function(o) {
+ return new tinymce.util.JSONRequest().send(o);
+ }
+ }
+ });
+}());
+(function(tinymce){
+ tinymce.VK = {
+ BACKSPACE: 8,
+ DELETE: 46,
+ DOWN: 40,
+ ENTER: 13,
+ LEFT: 37,
+ RIGHT: 39,
+ SPACEBAR: 32,
+ TAB: 9,
+ UP: 38,
+
+ modifierPressed: function (e) {
+ return e.shiftKey || e.ctrlKey || e.altKey;
+ },
+
+ metaKeyPressed: function(e) {
+ // Check if ctrl or meta key is pressed also check if alt is false for Polish users
+ return tinymce.isMac ? e.metaKey : e.ctrlKey && !e.altKey;
+ }
+ };
+})(tinymce);
+
+tinymce.util.Quirks = function(editor) {
+ var VK = tinymce.VK, BACKSPACE = VK.BACKSPACE, DELETE = VK.DELETE, dom = editor.dom, selection = editor.selection,
+ settings = editor.settings, parser = editor.parser, serializer = editor.serializer;
+
+ function setEditorCommandState(cmd, state) {
+ try {
+ editor.getDoc().execCommand(cmd, false, state);
+ } catch (ex) {
+ // Ignore
+ }
+ }
+
+ function getDocumentMode() {
+ var documentMode = editor.getDoc().documentMode;
+
+ return documentMode ? documentMode : 6;
+ };
+
+ function isDefaultPrevented(e) {
+ return e.isDefaultPrevented();
+ };
+
+ function cleanupStylesWhenDeleting() {
+ function removeMergedFormatSpans(isDelete) {
+ var rng, blockElm, node, clonedSpan;
+
+ rng = selection.getRng();
+
+ // Find root block
+ blockElm = dom.getParent(rng.startContainer, dom.isBlock);
+
+ // On delete clone the root span of the next block element
+ if (isDelete)
+ blockElm = dom.getNext(blockElm, dom.isBlock);
+
+ // Locate root span element and clone it since it would otherwise get merged by the "apple-style-span" on delete/backspace
+ if (blockElm) {
+ node = blockElm.firstChild;
+
+ // Ignore empty text nodes
+ while (node && node.nodeType == 3 && node.nodeValue.length === 0)
+ node = node.nextSibling;
+
+ if (node && node.nodeName === 'SPAN') {
+ clonedSpan = node.cloneNode(false);
+ }
+ }
+
+ // Do the backspace/delete action
+ editor.getDoc().execCommand(isDelete ? 'ForwardDelete' : 'Delete', false, null);
+
+ // Find all odd apple-style-spans
+ blockElm = dom.getParent(rng.startContainer, dom.isBlock);
+ tinymce.each(dom.select('span.Apple-style-span,font.Apple-style-span', blockElm), function(span) {
+ var bm = selection.getBookmark();
+
+ if (clonedSpan) {
+ dom.replace(clonedSpan.cloneNode(false), span, true);
+ } else {
+ dom.remove(span, true);
+ }
+
+ // Restore the selection
+ selection.moveToBookmark(bm);
+ });
+ };
+
+ editor.onKeyDown.add(function(editor, e) {
+ var isDelete;
+
+ isDelete = e.keyCode == DELETE;
+ if (!isDefaultPrevented(e) && (isDelete || e.keyCode == BACKSPACE) && !VK.modifierPressed(e)) {
+ e.preventDefault();
+ removeMergedFormatSpans(isDelete);
+ }
+ });
+
+ editor.addCommand('Delete', function() {removeMergedFormatSpans();});
+ };
+
+ function emptyEditorWhenDeleting() {
+ function serializeRng(rng) {
+ var body = dom.create("body");
+ var contents = rng.cloneContents();
+ body.appendChild(contents);
+ return selection.serializer.serialize(body, {format: 'html'});
+ }
+
+ function allContentsSelected(rng) {
+ var selection = serializeRng(rng);
+
+ var allRng = dom.createRng();
+ allRng.selectNode(editor.getBody());
+
+ var allSelection = serializeRng(allRng);
+ return selection === allSelection;
+ }
+
+ editor.onKeyDown.add(function(editor, e) {
+ var keyCode = e.keyCode, isCollapsed;
+
+ // Empty the editor if it's needed for example backspace at <p><b>|</b></p>
+ if (!isDefaultPrevented(e) && (keyCode == DELETE || keyCode == BACKSPACE)) {
+ isCollapsed = editor.selection.isCollapsed();
+
+ // Selection is collapsed but the editor isn't empty
+ if (isCollapsed && !dom.isEmpty(editor.getBody())) {
+ return;
+ }
+
+ // IE deletes all contents correctly when everything is selected
+ if (tinymce.isIE && !isCollapsed) {
+ return;
+ }
+
+ // Selection isn't collapsed but not all the contents is selected
+ if (!isCollapsed && !allContentsSelected(editor.selection.getRng())) {
+ return;
+ }
+
+ // Manually empty the editor
+ editor.setContent('');
+ editor.selection.setCursorLocation(editor.getBody(), 0);
+ editor.nodeChanged();
+ }
+ });
+ };
+
+ function selectAll() {
+ editor.onKeyDown.add(function(editor, e) {
+ if (!isDefaultPrevented(e) && e.keyCode == 65 && VK.metaKeyPressed(e)) {
+ e.preventDefault();
+ editor.execCommand('SelectAll');
+ }
+ });
+ };
+
+ function inputMethodFocus() {
+ if (!editor.settings.content_editable) {
+ // Case 1 IME doesn't initialize if you focus the document
+ dom.bind(editor.getDoc(), 'focusin', function(e) {
+ selection.setRng(selection.getRng());
+ });
+
+ // Case 2 IME doesn't initialize if you click the documentElement it also doesn't properly fire the focusin event
+ dom.bind(editor.getDoc(), 'mousedown', function(e) {
+ if (e.target == editor.getDoc().documentElement) {
+ editor.getWin().focus();
+ selection.setRng(selection.getRng());
+ }
+ });
+ }
+ };
+
+ function removeHrOnBackspace() {
+ editor.onKeyDown.add(function(editor, e) {
+ if (!isDefaultPrevented(e) && e.keyCode === BACKSPACE) {
+ if (selection.isCollapsed() && selection.getRng(true).startOffset === 0) {
+ var node = selection.getNode();
+ var previousSibling = node.previousSibling;
+
+ if (previousSibling && previousSibling.nodeName && previousSibling.nodeName.toLowerCase() === "hr") {
+ dom.remove(previousSibling);
+ tinymce.dom.Event.cancel(e);
+ }
+ }
+ }
+ })
+ }
+
+ function focusBody() {
+ // Fix for a focus bug in FF 3.x where the body element
+ // wouldn't get proper focus if the user clicked on the HTML element
+ if (!Range.prototype.getClientRects) { // Detect getClientRects got introduced in FF 4
+ editor.onMouseDown.add(function(editor, e) {
+ if (!isDefaultPrevented(e) && e.target.nodeName === "HTML") {
+ var body = editor.getBody();
+
+ // Blur the body it's focused but not correctly focused
+ body.blur();
+
+ // Refocus the body after a little while
+ setTimeout(function() {
+ body.focus();
+ }, 0);
+ }
+ });
+ }
+ };
+
+ function selectControlElements() {
+ editor.onClick.add(function(editor, e) {
+ e = e.target;
+
+ // Workaround for bug, http://bugs.webkit.org/show_bug.cgi?id=12250
+ // WebKit can't even do simple things like selecting an image
+ // Needs tobe the setBaseAndExtend or it will fail to select floated images
+ if (/^(IMG|HR)$/.test(e.nodeName)) {
+ selection.getSel().setBaseAndExtent(e, 0, e, 1);
+ }
+
+ if (e.nodeName == 'A' && dom.hasClass(e, 'mceItemAnchor')) {
+ selection.select(e);
+ }
+
+ editor.nodeChanged();
+ });
+ };
+
+ function removeStylesWhenDeletingAccrossBlockElements() {
+ function getAttributeApplyFunction() {
+ var template = dom.getAttribs(selection.getStart().cloneNode(false));
+
+ return function() {
+ var target = selection.getStart();
+
+ if (target !== editor.getBody()) {
+ dom.setAttrib(target, "style", null);
+
+ tinymce.each(template, function(attr) {
+ target.setAttributeNode(attr.cloneNode(true));
+ });
+ }
+ };
+ }
+
+ function isSelectionAcrossElements() {
+ return !selection.isCollapsed() && dom.getParent(selection.getStart(), dom.isBlock) != dom.getParent(selection.getEnd(), dom.isBlock);
+ }
+
+ function blockEvent(editor, e) {
+ e.preventDefault();
+ return false;
+ }
+
+ editor.onKeyPress.add(function(editor, e) {
+ var applyAttributes;
+
+ if (!isDefaultPrevented(e) && (e.keyCode == 8 || e.keyCode == 46) && isSelectionAcrossElements()) {
+ applyAttributes = getAttributeApplyFunction();
+ editor.getDoc().execCommand('delete', false, null);
+ applyAttributes();
+ e.preventDefault();
+ return false;
+ }
+ });
+
+ dom.bind(editor.getDoc(), 'cut', function(e) {
+ var applyAttributes;
+
+ if (!isDefaultPrevented(e) && isSelectionAcrossElements()) {
+ applyAttributes = getAttributeApplyFunction();
+ editor.onKeyUp.addToTop(blockEvent);
+
+ setTimeout(function() {
+ applyAttributes();
+ editor.onKeyUp.remove(blockEvent);
+ }, 0);
+ }
+ });
+ }
+
+ function selectionChangeNodeChanged() {
+ var lastRng, selectionTimer;
+
+ dom.bind(editor.getDoc(), 'selectionchange', function() {
+ if (selectionTimer) {
+ clearTimeout(selectionTimer);
+ selectionTimer = 0;
+ }
+
+ selectionTimer = window.setTimeout(function() {
+ var rng = selection.getRng();
+
+ // Compare the ranges to see if it was a real change or not
+ if (!lastRng || !tinymce.dom.RangeUtils.compareRanges(rng, lastRng)) {
+ editor.nodeChanged();
+ lastRng = rng;
+ }
+ }, 50);
+ });
+ }
+
+ function ensureBodyHasRoleApplication() {
+ document.body.setAttribute("role", "application");
+ }
+
+ function disableBackspaceIntoATable() {
+ editor.onKeyDown.add(function(editor, e) {
+ if (!isDefaultPrevented(e) && e.keyCode === BACKSPACE) {
+ if (selection.isCollapsed() && selection.getRng(true).startOffset === 0) {
+ var previousSibling = selection.getNode().previousSibling;
+ if (previousSibling && previousSibling.nodeName && previousSibling.nodeName.toLowerCase() === "table") {
+ return tinymce.dom.Event.cancel(e);
+ }
+ }
+ }
+ })
+ }
+
+ function addNewLinesBeforeBrInPre() {
+ // IE8+ rendering mode does the right thing with BR in PRE
+ if (getDocumentMode() > 7) {
+ return;
+ }
+
+ // Enable display: none in area and add a specific class that hides all BR elements in PRE to
+ // avoid the caret from getting stuck at the BR elements while pressing the right arrow key
+ setEditorCommandState('RespectVisibilityInDesign', true);
+ editor.contentStyles.push('.mceHideBrInPre pre br {display: none}');
+ dom.addClass(editor.getBody(), 'mceHideBrInPre');
+
+ // Adds a \n before all BR elements in PRE to get them visual
+ parser.addNodeFilter('pre', function(nodes, name) {
+ var i = nodes.length, brNodes, j, brElm, sibling;
+
+ while (i--) {
+ brNodes = nodes[i].getAll('br');
+ j = brNodes.length;
+ while (j--) {
+ brElm = brNodes[j];
+
+ // Add \n before BR in PRE elements on older IE:s so the new lines get rendered
+ sibling = brElm.prev;
+ if (sibling && sibling.type === 3 && sibling.value.charAt(sibling.value - 1) != '\n') {
+ sibling.value += '\n';
+ } else {
+ brElm.parent.insert(new tinymce.html.Node('#text', 3), brElm, true).value = '\n';
+ }
+ }
+ }
+ });
+
+ // Removes any \n before BR elements in PRE since other browsers and in contentEditable=false mode they will be visible
+ serializer.addNodeFilter('pre', function(nodes, name) {
+ var i = nodes.length, brNodes, j, brElm, sibling;
+
+ while (i--) {
+ brNodes = nodes[i].getAll('br');
+ j = brNodes.length;
+ while (j--) {
+ brElm = brNodes[j];
+ sibling = brElm.prev;
+ if (sibling && sibling.type == 3) {
+ sibling.value = sibling.value.replace(/\r?\n$/, '');
+ }
+ }
+ }
+ });
+ }
+
+ function removePreSerializedStylesWhenSelectingControls() {
+ dom.bind(editor.getBody(), 'mouseup', function(e) {
+ var value, node = selection.getNode();
+
+ // Moved styles to attributes on IMG eements
+ if (node.nodeName == 'IMG') {
+ // Convert style width to width attribute
+ if (value = dom.getStyle(node, 'width')) {
+ dom.setAttrib(node, 'width', value.replace(/[^0-9%]+/g, ''));
+ dom.setStyle(node, 'width', '');
+ }
+
+ // Convert style height to height attribute
+ if (value = dom.getStyle(node, 'height')) {
+ dom.setAttrib(node, 'height', value.replace(/[^0-9%]+/g, ''));
+ dom.setStyle(node, 'height', '');
+ }
+ }
+ });
+ }
+
+ function keepInlineElementOnDeleteBackspace() {
+ editor.onKeyDown.add(function(editor, e) {
+ var isDelete, rng, container, offset, brElm, sibling, collapsed;
+
+ isDelete = e.keyCode == DELETE;
+ if (!isDefaultPrevented(e) && (isDelete || e.keyCode == BACKSPACE) && !VK.modifierPressed(e)) {
+ rng = selection.getRng();
+ container = rng.startContainer;
+ offset = rng.startOffset;
+ collapsed = rng.collapsed;
+
+ // Override delete if the start container is a text node and is at the beginning of text or
+ // just before/after the last character to be deleted in collapsed mode
+ if (container.nodeType == 3 && container.nodeValue.length > 0 && ((offset === 0 && !collapsed) || (collapsed && offset === (isDelete ? 0 : 1)))) {
+ nonEmptyElements = editor.schema.getNonEmptyElements();
+
+ // Prevent default logic since it's broken
+ e.preventDefault();
+
+ // Insert a BR before the text node this will prevent the containing element from being deleted/converted
+ brElm = dom.create('br', {id: '__tmp'});
+ container.parentNode.insertBefore(brElm, container);
+
+ // Do the browser delete
+ editor.getDoc().execCommand(isDelete ? 'ForwardDelete' : 'Delete', false, null);
+
+ // Check if the previous sibling is empty after deleting for example: <p><b></b>|</p>
+ container = selection.getRng().startContainer;
+ sibling = container.previousSibling;
+ if (sibling && sibling.nodeType == 1 && !dom.isBlock(sibling) && dom.isEmpty(sibling) && !nonEmptyElements[sibling.nodeName.toLowerCase()]) {
+ dom.remove(sibling);
+ }
+
+ // Remove the temp element we inserted
+ dom.remove('__tmp');
+ }
+ }
+ });
+ }
+
+ function removeBlockQuoteOnBackSpace() {
+ // Add block quote deletion handler
+ editor.onKeyDown.add(function(editor, e) {
+ var rng, container, offset, root, parent;
+
+ if (isDefaultPrevented(e) || e.keyCode != VK.BACKSPACE) {
+ return;
+ }
+
+ rng = selection.getRng();
+ container = rng.startContainer;
+ offset = rng.startOffset;
+ root = dom.getRoot();
+ parent = container;
+
+ if (!rng.collapsed || offset !== 0) {
+ return;
+ }
+
+ while (parent && parent.parentNode && parent.parentNode.firstChild == parent && parent.parentNode != root) {
+ parent = parent.parentNode;
+ }
+
+ // Is the cursor at the beginning of a blockquote?
+ if (parent.tagName === 'BLOCKQUOTE') {
+ // Remove the blockquote
+ editor.formatter.toggle('blockquote', null, parent);
+
+ // Move the caret to the beginning of container
+ rng = dom.createRng();
+ rng.setStart(container, 0);
+ rng.setEnd(container, 0);
+ selection.setRng(rng);
+ }
+ });
+ };
+
+ function setGeckoEditingOptions() {
+ function setOpts() {
+ editor._refreshContentEditable();
+
+ setEditorCommandState("StyleWithCSS", false);
+ setEditorCommandState("enableInlineTableEditing", false);
+
+ if (!settings.object_resizing) {
+ setEditorCommandState("enableObjectResizing", false);
+ }
+ };
+
+ if (!settings.readonly) {
+ editor.onBeforeExecCommand.add(setOpts);
+ editor.onMouseDown.add(setOpts);
+ }
+ };
+
+ function addBrAfterLastLinks() {
+ function fixLinks(editor, o) {
+ tinymce.each(dom.select('a'), function(node) {
+ var parentNode = node.parentNode, root = dom.getRoot();
+
+ if (parentNode.lastChild === node) {
+ while (parentNode && !dom.isBlock(parentNode)) {
+ if (parentNode.parentNode.lastChild !== parentNode || parentNode === root) {
+ return;
+ }
+
+ parentNode = parentNode.parentNode;
+ }
+
+ dom.add(parentNode, 'br', {'data-mce-bogus' : 1});
+ }
+ });
+ };
+
+ editor.onExecCommand.add(function(editor, cmd) {
+ if (cmd === 'CreateLink') {
+ fixLinks(editor);
+ }
+ });
+
+ editor.onSetContent.add(selection.onSetContent.add(fixLinks));
+ };
+
+ function setDefaultBlockType() {
+ if (settings.forced_root_block) {
+ editor.onInit.add(function() {
+ setEditorCommandState('DefaultParagraphSeparator', settings.forced_root_block);
+ });
+ }
+ }
+
+ function removeGhostSelection() {
+ function repaint(sender, args) {
+ if (!sender || !args.initial) {
+ editor.execCommand('mceRepaint');
+ }
+ };
+
+ editor.onUndo.add(repaint);
+ editor.onRedo.add(repaint);
+ editor.onSetContent.add(repaint);
+ };
+
+ function deleteControlItemOnBackSpace() {
+ editor.onKeyDown.add(function(editor, e) {
+ var rng;
+
+ if (!isDefaultPrevented(e) && e.keyCode == BACKSPACE) {
+ rng = editor.getDoc().selection.createRange();
+ if (rng && rng.item) {
+ e.preventDefault();
+ editor.undoManager.beforeChange();
+ dom.remove(rng.item(0));
+ editor.undoManager.add();
+ }
+ }
+ });
+ };
+
+ function renderEmptyBlocksFix() {
+ var emptyBlocksCSS;
+
+ // IE10+
+ if (getDocumentMode() >= 10) {
+ emptyBlocksCSS = '';
+ tinymce.each('p div h1 h2 h3 h4 h5 h6'.split(' '), function(name, i) {
+ emptyBlocksCSS += (i > 0 ? ',' : '') + name + ':empty';
+ });
+
+ editor.contentStyles.push(emptyBlocksCSS + '{padding-right: 1px !important}');
+ }
+ };
+
+ function fakeImageResize() {
+ var selectedElmX, selectedElmY, selectedElm, selectedElmGhost, selectedHandle, startX, startY, startW, startH, ratio,
+ resizeHandles, width, height, rootDocument = document, editableDoc = editor.getDoc();
+
+ if (!settings.object_resizing || settings.webkit_fake_resize === false) {
+ return;
+ }
+
+ // Try disabling object resizing if WebKit implements resizing in the future
+ setEditorCommandState("enableObjectResizing", false);
+
+ // Details about each resize handle how to scale etc
+ resizeHandles = {
+ // Name: x multiplier, y multiplier, delta size x, delta size y
+ n: [.5, 0, 0, -1],
+ e: [1, .5, 1, 0],
+ s: [.5, 1, 0, 1],
+ w: [0, .5, -1, 0],
+ nw: [0, 0, -1, -1],
+ ne: [1, 0, 1, -1],
+ se: [1, 1, 1, 1],
+ sw : [0, 1, -1, 1]
+ };
+
+ function resizeElement(e) {
+ var deltaX, deltaY;
+
+ // Calc new width/height
+ deltaX = e.screenX - startX;
+ deltaY = e.screenY - startY;
+
+ // Calc new size
+ width = deltaX * selectedHandle[2] + startW;
+ height = deltaY * selectedHandle[3] + startH;
+
+ // Never scale down lower than 5 pixels
+ width = width < 5 ? 5 : width;
+ height = height < 5 ? 5 : height;
+
+ // Constrain proportions when modifier key is pressed or if the nw, ne, sw, se corners are moved on an image
+ if (VK.modifierPressed(e) || (selectedElm.nodeName == "IMG" && selectedHandle[2] * selectedHandle[3] !== 0)) {
+ width = Math.round(height / ratio);
+ height = Math.round(width * ratio);
+ }
+
+ // Update ghost size
+ dom.setStyles(selectedElmGhost, {
+ width: width,
+ height: height
+ });
+
+ // Update ghost X position if needed
+ if (selectedHandle[2] < 0 && selectedElmGhost.clientWidth <= width) {
+ dom.setStyle(selectedElmGhost, 'left', selectedElmX + (startW - width));
+ }
+
+ // Update ghost Y position if needed
+ if (selectedHandle[3] < 0 && selectedElmGhost.clientHeight <= height) {
+ dom.setStyle(selectedElmGhost, 'top', selectedElmY + (startH - height));
+ }
+ }
+
+ function endResize() {
+ function setSizeProp(name, value) {
+ if (value) {
+ // Resize by using style or attribute
+ if (selectedElm.style[name] || !editor.schema.isValid(selectedElm.nodeName.toLowerCase(), name)) {
+ dom.setStyle(selectedElm, name, value);
+ } else {
+ dom.setAttrib(selectedElm, name, value);
+ }
+ }
+ }
+
+ // Set width/height properties
+ setSizeProp('width', width);
+ setSizeProp('height', height);
+
+ dom.unbind(editableDoc, 'mousemove', resizeElement);
+ dom.unbind(editableDoc, 'mouseup', endResize);
+
+ if (rootDocument != editableDoc) {
+ dom.unbind(rootDocument, 'mousemove', resizeElement);
+ dom.unbind(rootDocument, 'mouseup', endResize);
+ }
+
+ // Remove ghost and update resize handle positions
+ dom.remove(selectedElmGhost);
+ showResizeRect(selectedElm);
+ }
+
+ function showResizeRect(targetElm) {
+ var position, targetWidth, targetHeight;
+
+ hideResizeRect();
+
+ // Get position and size of target
+ position = dom.getPos(targetElm);
+ selectedElmX = position.x;
+ selectedElmY = position.y;
+ targetWidth = targetElm.offsetWidth;
+ targetHeight = targetElm.offsetHeight;
+
+ // Reset width/height if user selects a new image/table
+ if (selectedElm != targetElm) {
+ selectedElm = targetElm;
+ width = height = 0;
+ }
+
+ tinymce.each(resizeHandles, function(handle, name) {
+ var handleElm;
+
+ // Get existing or render resize handle
+ handleElm = dom.get('mceResizeHandle' + name);
+ if (!handleElm) {
+ handleElm = dom.add(editableDoc.documentElement, 'div', {
+ id: 'mceResizeHandle' + name,
+ 'class': 'mceResizeHandle',
+ style: 'cursor:' + name + '-resize; margin:0; padding:0'
+ });
+
+ dom.bind(handleElm, 'mousedown', function(e) {
+ e.preventDefault();
+
+ endResize();
+
+ startX = e.screenX;
+ startY = e.screenY;
+ startW = selectedElm.clientWidth;
+ startH = selectedElm.clientHeight;
+ ratio = startH / startW;
+ selectedHandle = handle;
+
+ selectedElmGhost = selectedElm.cloneNode(true);
+ dom.addClass(selectedElmGhost, 'mceClonedResizable');
+ dom.setStyles(selectedElmGhost, {
+ left: selectedElmX,
+ top: selectedElmY,
+ margin: 0
+ });
+
+ editableDoc.documentElement.appendChild(selectedElmGhost);
+
+ dom.bind(editableDoc, 'mousemove', resizeElement);
+ dom.bind(editableDoc, 'mouseup', endResize);
+
+ if (rootDocument != editableDoc) {
+ dom.bind(rootDocument, 'mousemove', resizeElement);
+ dom.bind(rootDocument, 'mouseup', endResize);
+ }
+ });
+ } else {
+ dom.show(handleElm);
+ }
+
+ // Position element
+ dom.setStyles(handleElm, {
+ left: (targetWidth * handle[0] + selectedElmX) - (handleElm.offsetWidth / 2),
+ top: (targetHeight * handle[1] + selectedElmY) - (handleElm.offsetHeight / 2)
+ });
+ });
+
+ // Only add resize rectangle on WebKit and only on images
+ if (!tinymce.isOpera && selectedElm.nodeName == "IMG") {
+ selectedElm.setAttribute('data-mce-selected', '1');
+ }
+ }
+
+ function hideResizeRect() {
+ if (selectedElm) {
+ selectedElm.removeAttribute('data-mce-selected');
+ }
+
+ for (var name in resizeHandles) {
+ dom.hide('mceResizeHandle' + name);
+ }
+ }
+
+ // Add CSS for resize handles, cloned element and selected
+ editor.contentStyles.push(
+ '.mceResizeHandle {' +
+ 'position: absolute;' +
+ 'border: 1px solid black;' +
+ 'background: #FFF;' +
+ 'width: 5px;' +
+ 'height: 5px;' +
+ 'z-index: 10000' +
+ '}' +
+ '.mceResizeHandle:hover {' +
+ 'background: #000' +
+ '}' +
+ 'img[data-mce-selected] {' +
+ 'outline: 1px solid black' +
+ '}' +
+ 'img.mceClonedResizable, table.mceClonedResizable {' +
+ 'position: absolute;' +
+ 'outline: 1px dashed black;' +
+ 'opacity: .5;' +
+ 'z-index: 10000' +
+ '}'
+ );
+
+ function updateResizeRect() {
+ var controlElm = dom.getParent(selection.getNode(), 'table,img');
+
+ // Remove data-mce-selected from all elements since they might have been copied using Ctrl+c/v
+ tinymce.each(dom.select('img[data-mce-selected]'), function(img) {
+ img.removeAttribute('data-mce-selected');
+ });
+
+ if (controlElm) {
+ showResizeRect(controlElm);
+ } else {
+ hideResizeRect();
+ }
+ }
+
+ // Show/hide resize rect when image is selected
+ editor.onNodeChange.add(updateResizeRect);
+
+ // Fixes WebKit quirk where it returns IMG on getNode if caret is after last image in container
+ dom.bind(editableDoc, 'selectionchange', updateResizeRect);
+
+ // Remove the internal attribute when serializing the DOM
+ editor.serializer.addAttributeFilter('data-mce-selected', function(nodes, name) {
+ var i = nodes.length;
+
+ while (i--) {
+ nodes[i].attr(name, null);
+ }
+ });
+ }
+
+ function keepNoScriptContents() {
+ if (getDocumentMode() < 9) {
+ parser.addNodeFilter('noscript', function(nodes) {
+ var i = nodes.length, node, textNode;
+
+ while (i--) {
+ node = nodes[i];
+ textNode = node.firstChild;
+
+ if (textNode) {
+ node.attr('data-mce-innertext', textNode.value);
+ }
+ }
+ });
+
+ serializer.addNodeFilter('noscript', function(nodes) {
+ var i = nodes.length, node, textNode, value;
+
+ while (i--) {
+ node = nodes[i];
+ textNode = nodes[i].firstChild;
+
+ if (textNode) {
+ textNode.value = tinymce.html.Entities.decode(textNode.value);
+ } else {
+ // Old IE can't retain noscript value so an attribute is used to store it
+ value = node.attributes.map['data-mce-innertext'];
+ if (value) {
+ node.attr('data-mce-innertext', null);
+ textNode = new tinymce.html.Node('#text', 3);
+ textNode.value = value;
+ textNode.raw = true;
+ node.append(textNode);
+ }
+ }
+ }
+ });
+ }
+ }
+
+ // All browsers
+ disableBackspaceIntoATable();
+ removeBlockQuoteOnBackSpace();
+ emptyEditorWhenDeleting();
+
+ // WebKit
+ if (tinymce.isWebKit) {
+ keepInlineElementOnDeleteBackspace();
+ cleanupStylesWhenDeleting();
+ inputMethodFocus();
+ selectControlElements();
+ setDefaultBlockType();
+
+ // iOS
+ if (tinymce.isIDevice) {
+ selectionChangeNodeChanged();
+ } else {
+ fakeImageResize();
+ selectAll();
+ }
+ }
+
+ // IE
+ if (tinymce.isIE) {
+ removeHrOnBackspace();
+ ensureBodyHasRoleApplication();
+ addNewLinesBeforeBrInPre();
+ removePreSerializedStylesWhenSelectingControls();
+ deleteControlItemOnBackSpace();
+ renderEmptyBlocksFix();
+ keepNoScriptContents();
+ }
+
+ // Gecko
+ if (tinymce.isGecko) {
+ removeHrOnBackspace();
+ focusBody();
+ removeStylesWhenDeletingAccrossBlockElements();
+ setGeckoEditingOptions();
+ addBrAfterLastLinks();
+ removeGhostSelection();
+ }
+
+ // Opera
+ if (tinymce.isOpera) {
+ fakeImageResize();
+ }
+};
+(function(tinymce) {
+ var namedEntities, baseEntities, reverseEntities,
+ attrsCharsRegExp = /[&<>\"\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,
+ textCharsRegExp = /[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,
+ rawCharsRegExp = /[<>&\"\']/g,
+ entityRegExp = /&(#x|#)?([\w]+);/g,
+ asciiMap = {
+ 128 : "\u20AC", 130 : "\u201A", 131 : "\u0192", 132 : "\u201E", 133 : "\u2026", 134 : "\u2020",
+ 135 : "\u2021", 136 : "\u02C6", 137 : "\u2030", 138 : "\u0160", 139 : "\u2039", 140 : "\u0152",
+ 142 : "\u017D", 145 : "\u2018", 146 : "\u2019", 147 : "\u201C", 148 : "\u201D", 149 : "\u2022",
+ 150 : "\u2013", 151 : "\u2014", 152 : "\u02DC", 153 : "\u2122", 154 : "\u0161", 155 : "\u203A",
+ 156 : "\u0153", 158 : "\u017E", 159 : "\u0178"
+ };
+
+ // Raw entities
+ baseEntities = {
+ '\"' : '&quot;', // Needs to be escaped since the YUI compressor would otherwise break the code
+ "'" : '&#39;',
+ '<' : '&lt;',
+ '>' : '&gt;',
+ '&' : '&amp;'
+ };
+
+ // Reverse lookup table for raw entities
+ reverseEntities = {
+ '&lt;' : '<',
+ '&gt;' : '>',
+ '&amp;' : '&',
+ '&quot;' : '"',
+ '&apos;' : "'"
+ };
+
+ // Decodes text by using the browser
+ function nativeDecode(text) {
+ var elm;
+
+ elm = document.createElement("div");
+ elm.innerHTML = text;
+
+ return elm.textContent || elm.innerText || text;
+ };
+
+ // Build a two way lookup table for the entities
+ function buildEntitiesLookup(items, radix) {
+ var i, chr, entity, lookup = {};
+
+ if (items) {
+ items = items.split(',');
+ radix = radix || 10;
+
+ // Build entities lookup table
+ for (i = 0; i < items.length; i += 2) {
+ chr = String.fromCharCode(parseInt(items[i], radix));
+
+ // Only add non base entities
+ if (!baseEntities[chr]) {
+ entity = '&' + items[i + 1] + ';';
+ lookup[chr] = entity;
+ lookup[entity] = chr;
+ }
+ }
+
+ return lookup;
+ }
+ };
+
+ // Unpack entities lookup where the numbers are in radix 32 to reduce the size
+ namedEntities = buildEntitiesLookup(
+ '50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,' +
+ '5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,' +
+ '5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,' +
+ '5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,' +
+ '68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,' +
+ '6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,' +
+ '6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,' +
+ '75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,' +
+ '7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,' +
+ '7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,' +
+ 'sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,' +
+ 'st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,' +
+ 't9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,' +
+ 'tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,' +
+ 'u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,' +
+ '81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,' +
+ '8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,' +
+ '8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,' +
+ '8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,' +
+ '8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,' +
+ 'nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,' +
+ 'rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,' +
+ 'Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,' +
+ '80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,' +
+ '811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro', 32);
+
+ tinymce.html = tinymce.html || {};
+
+ tinymce.html.Entities = {
+ encodeRaw : function(text, attr) {
+ return text.replace(attr ? attrsCharsRegExp : textCharsRegExp, function(chr) {
+ return baseEntities[chr] || chr;
+ });
+ },
+
+ encodeAllRaw : function(text) {
+ return ('' + text).replace(rawCharsRegExp, function(chr) {
+ return baseEntities[chr] || chr;
+ });
+ },
+
+ encodeNumeric : function(text, attr) {
+ return text.replace(attr ? attrsCharsRegExp : textCharsRegExp, function(chr) {
+ // Multi byte sequence convert it to a single entity
+ if (chr.length > 1)
+ return '&#' + (((chr.charCodeAt(0) - 0xD800) * 0x400) + (chr.charCodeAt(1) - 0xDC00) + 0x10000) + ';';
+
+ return baseEntities[chr] || '&#' + chr.charCodeAt(0) + ';';
+ });
+ },
+
+ encodeNamed : function(text, attr, entities) {
+ entities = entities || namedEntities;
+
+ return text.replace(attr ? attrsCharsRegExp : textCharsRegExp, function(chr) {
+ return baseEntities[chr] || entities[chr] || chr;
+ });
+ },
+
+ getEncodeFunc : function(name, entities) {
+ var Entities = tinymce.html.Entities;
+
+ entities = buildEntitiesLookup(entities) || namedEntities;
+
+ function encodeNamedAndNumeric(text, attr) {
+ return text.replace(attr ? attrsCharsRegExp : textCharsRegExp, function(chr) {
+ return baseEntities[chr] || entities[chr] || '&#' + chr.charCodeAt(0) + ';' || chr;
+ });
+ };
+
+ function encodeCustomNamed(text, attr) {
+ return Entities.encodeNamed(text, attr, entities);
+ };
+
+ // Replace + with , to be compatible with previous TinyMCE versions
+ name = tinymce.makeMap(name.replace(/\+/g, ','));
+
+ // Named and numeric encoder
+ if (name.named && name.numeric)
+ return encodeNamedAndNumeric;
+
+ // Named encoder
+ if (name.named) {
+ // Custom names
+ if (entities)
+ return encodeCustomNamed;
+
+ return Entities.encodeNamed;
+ }
+
+ // Numeric
+ if (name.numeric)
+ return Entities.encodeNumeric;
+
+ // Raw encoder
+ return Entities.encodeRaw;
+ },
+
+ decode : function(text) {
+ return text.replace(entityRegExp, function(all, numeric, value) {
+ if (numeric) {
+ value = parseInt(value, numeric.length === 2 ? 16 : 10);
+
+ // Support upper UTF
+ if (value > 0xFFFF) {
+ value -= 0x10000;
+
+ return String.fromCharCode(0xD800 + (value >> 10), 0xDC00 + (value & 0x3FF));
+ } else
+ return asciiMap[value] || String.fromCharCode(value);
+ }
+
+ return reverseEntities[all] || namedEntities[all] || nativeDecode(all);
+ });
+ }
+ };
+})(tinymce);
+
+tinymce.html.Styles = function(settings, schema) {
+ var rgbRegExp = /rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,
+ urlOrStrRegExp = /(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,
+ styleRegExp = /\s*([^:]+):\s*([^;]+);?/g,
+ trimRightRegExp = /\s+$/,
+ urlColorRegExp = /rgb/,
+ undef, i, encodingLookup = {}, encodingItems;
+
+ settings = settings || {};
+
+ encodingItems = '\\" \\\' \\; \\: ; : \uFEFF'.split(' ');
+ for (i = 0; i < encodingItems.length; i++) {
+ encodingLookup[encodingItems[i]] = '\uFEFF' + i;
+ encodingLookup['\uFEFF' + i] = encodingItems[i];
+ }
+
+ function toHex(match, r, g, b) {
+ function hex(val) {
+ val = parseInt(val).toString(16);
+
+ return val.length > 1 ? val : '0' + val; // 0 -> 00
+ };
+
+ return '#' + hex(r) + hex(g) + hex(b);
+ };
+
+ return {
+ toHex : function(color) {
+ return color.replace(rgbRegExp, toHex);
+ },
+
+ parse : function(css) {
+ var styles = {}, matches, name, value, isEncoded, urlConverter = settings.url_converter, urlConverterScope = settings.url_converter_scope || this;
+
+ function compress(prefix, suffix) {
+ var top, right, bottom, left;
+
+ // Get values and check it it needs compressing
+ top = styles[prefix + '-top' + suffix];
+ if (!top)
+ return;
+
+ right = styles[prefix + '-right' + suffix];
+ if (top != right)
+ return;
+
+ bottom = styles[prefix + '-bottom' + suffix];
+ if (right != bottom)
+ return;
+
+ left = styles[prefix + '-left' + suffix];
+ if (bottom != left)
+ return;
+
+ // Compress
+ styles[prefix + suffix] = left;
+ delete styles[prefix + '-top' + suffix];
+ delete styles[prefix + '-right' + suffix];
+ delete styles[prefix + '-bottom' + suffix];
+ delete styles[prefix + '-left' + suffix];
+ };
+
+ function canCompress(key) {
+ var value = styles[key], i;
+
+ if (!value || value.indexOf(' ') < 0)
+ return;
+
+ value = value.split(' ');
+ i = value.length;
+ while (i--) {
+ if (value[i] !== value[0])
+ return false;
+ }
+
+ styles[key] = value[0];
+
+ return true;
+ };
+
+ function compress2(target, a, b, c) {
+ if (!canCompress(a))
+ return;
+
+ if (!canCompress(b))
+ return;
+
+ if (!canCompress(c))
+ return;
+
+ // Compress
+ styles[target] = styles[a] + ' ' + styles[b] + ' ' + styles[c];
+ delete styles[a];
+ delete styles[b];
+ delete styles[c];
+ };
+
+ // Encodes the specified string by replacing all \" \' ; : with _<num>
+ function encode(str) {
+ isEncoded = true;
+
+ return encodingLookup[str];
+ };
+
+ // Decodes the specified string by replacing all _<num> with it's original value \" \' etc
+ // It will also decode the \" \' if keep_slashes is set to fale or omitted
+ function decode(str, keep_slashes) {
+ if (isEncoded) {
+ str = str.replace(/\uFEFF[0-9]/g, function(str) {
+ return encodingLookup[str];
+ });
+ }
+
+ if (!keep_slashes)
+ str = str.replace(/\\([\'\";:])/g, "$1");
+
+ return str;
+ };
+
+ function processUrl(match, url, url2, url3, str, str2) {
+ str = str || str2;
+
+ if (str) {
+ str = decode(str);
+
+ // Force strings into single quote format
+ return "'" + str.replace(/\'/g, "\\'") + "'";
+ }
+
+ url = decode(url || url2 || url3);
+
+ // Convert the URL to relative/absolute depending on config
+ if (urlConverter)
+ url = urlConverter.call(urlConverterScope, url, 'style');
+
+ // Output new URL format
+ return "url('" + url.replace(/\'/g, "\\'") + "')";
+ };
+
+ if (css) {
+ // Encode \" \' % and ; and : inside strings so they don't interfere with the style parsing
+ css = css.replace(/\\[\"\';:\uFEFF]/g, encode).replace(/\"[^\"]+\"|\'[^\']+\'/g, function(str) {
+ return str.replace(/[;:]/g, encode);
+ });
+
+ // Parse styles
+ while (matches = styleRegExp.exec(css)) {
+ name = matches[1].replace(trimRightRegExp, '').toLowerCase();
+ value = matches[2].replace(trimRightRegExp, '');
+
+ if (name && value.length > 0) {
+ // Opera will produce 700 instead of bold in their style values
+ if (name === 'font-weight' && value === '700')
+ value = 'bold';
+ else if (name === 'color' || name === 'background-color') // Lowercase colors like RED
+ value = value.toLowerCase();
+
+ // Convert RGB colors to HEX
+ value = value.replace(rgbRegExp, toHex);
+
+ // Convert URLs and force them into url('value') format
+ value = value.replace(urlOrStrRegExp, processUrl);
+ styles[name] = isEncoded ? decode(value, true) : value;
+ }
+
+ styleRegExp.lastIndex = matches.index + matches[0].length;
+ }
+
+ // Compress the styles to reduce it's size for example IE will expand styles
+ compress("border", "");
+ compress("border", "-width");
+ compress("border", "-color");
+ compress("border", "-style");
+ compress("padding", "");
+ compress("margin", "");
+ compress2('border', 'border-width', 'border-style', 'border-color');
+
+ // Remove pointless border, IE produces these
+ if (styles.border === 'medium none')
+ delete styles.border;
+ }
+
+ return styles;
+ },
+
+ serialize : function(styles, element_name) {
+ var css = '', name, value;
+
+ function serializeStyles(name) {
+ var styleList, i, l, value;
+
+ styleList = schema.styles[name];
+ if (styleList) {
+ for (i = 0, l = styleList.length; i < l; i++) {
+ name = styleList[i];
+ value = styles[name];
+
+ if (value !== undef && value.length > 0)
+ css += (css.length > 0 ? ' ' : '') + name + ': ' + value + ';';
+ }
+ }
+ };
+
+ // Serialize styles according to schema
+ if (element_name && schema && schema.styles) {
+ // Serialize global styles and element specific styles
+ serializeStyles('*');
+ serializeStyles(element_name);
+ } else {
+ // Output the styles in the order they are inside the object
+ for (name in styles) {
+ value = styles[name];
+
+ if (value !== undef && value.length > 0)
+ css += (css.length > 0 ? ' ' : '') + name + ': ' + value + ';';
+ }
+ }
+
+ return css;
+ }
+ };
+};
+
+(function(tinymce) {
+ var mapCache = {}, makeMap = tinymce.makeMap, each = tinymce.each;
+
+ function split(str, delim) {
+ return str.split(delim || ',');
+ };
+
+ function unpack(lookup, data) {
+ var key, elements = {};
+
+ function replace(value) {
+ return value.replace(/[A-Z]+/g, function(key) {
+ return replace(lookup[key]);
+ });
+ };
+
+ // Unpack lookup
+ for (key in lookup) {
+ if (lookup.hasOwnProperty(key))
+ lookup[key] = replace(lookup[key]);
+ }
+
+ // Unpack and parse data into object map
+ replace(data).replace(/#/g, '#text').replace(/(\w+)\[([^\]]+)\]\[([^\]]*)\]/g, function(str, name, attributes, children) {
+ attributes = split(attributes, '|');
+
+ elements[name] = {
+ attributes : makeMap(attributes),
+ attributesOrder : attributes,
+ children : makeMap(children, '|', {'#comment' : {}})
+ }
+ });
+
+ return elements;
+ };
+
+ function getHTML5() {
+ var html5 = mapCache.html5;
+
+ if (!html5) {
+ html5 = mapCache.html5 = unpack({
+ A : 'id|accesskey|class|dir|draggable|item|hidden|itemprop|role|spellcheck|style|subject|title|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup',
+ B : '#|a|abbr|area|audio|b|bdo|br|button|canvas|cite|code|command|datalist|del|dfn|em|embed|i|iframe|img|input|ins|kbd|keygen|label|link|map|mark|meta|' +
+ 'meter|noscript|object|output|progress|q|ruby|samp|script|select|small|span|strong|sub|sup|svg|textarea|time|var|video|wbr',
+ C : '#|a|abbr|area|address|article|aside|audio|b|bdo|blockquote|br|button|canvas|cite|code|command|datalist|del|details|dfn|dialog|div|dl|em|embed|fieldset|' +
+ 'figure|footer|form|h1|h2|h3|h4|h5|h6|header|hgroup|hr|i|iframe|img|input|ins|kbd|keygen|label|link|map|mark|menu|meta|meter|nav|noscript|ol|object|output|' +
+ 'p|pre|progress|q|ruby|samp|script|section|select|small|span|strong|style|sub|sup|svg|table|textarea|time|ul|var|video'
+ }, 'html[A|manifest][body|head]' +
+ 'head[A][base|command|link|meta|noscript|script|style|title]' +
+ 'title[A][#]' +
+ 'base[A|href|target][]' +
+ 'link[A|href|rel|media|type|sizes][]' +
+ 'meta[A|http-equiv|name|content|charset][]' +
+ 'style[A|type|media|scoped][#]' +
+ 'script[A|charset|type|src|defer|async][#]' +
+ 'noscript[A][C]' +
+ 'body[A][C]' +
+ 'section[A][C]' +
+ 'nav[A][C]' +
+ 'article[A][C]' +
+ 'aside[A][C]' +
+ 'h1[A][B]' +
+ 'h2[A][B]' +
+ 'h3[A][B]' +
+ 'h4[A][B]' +
+ 'h5[A][B]' +
+ 'h6[A][B]' +
+ 'hgroup[A][h1|h2|h3|h4|h5|h6]' +
+ 'header[A][C]' +
+ 'footer[A][C]' +
+ 'address[A][C]' +
+ 'p[A][B]' +
+ 'br[A][]' +
+ 'pre[A][B]' +
+ 'dialog[A][dd|dt]' +
+ 'blockquote[A|cite][C]' +
+ 'ol[A|start|reversed][li]' +
+ 'ul[A][li]' +
+ 'li[A|value][C]' +
+ 'dl[A][dd|dt]' +
+ 'dt[A][B]' +
+ 'dd[A][C]' +
+ 'a[A|href|target|ping|rel|media|type][B]' +
+ 'em[A][B]' +
+ 'strong[A][B]' +
+ 'small[A][B]' +
+ 'cite[A][B]' +
+ 'q[A|cite][B]' +
+ 'dfn[A][B]' +
+ 'abbr[A][B]' +
+ 'code[A][B]' +
+ 'var[A][B]' +
+ 'samp[A][B]' +
+ 'kbd[A][B]' +
+ 'sub[A][B]' +
+ 'sup[A][B]' +
+ 'i[A][B]' +
+ 'b[A][B]' +
+ 'mark[A][B]' +
+ 'progress[A|value|max][B]' +
+ 'meter[A|value|min|max|low|high|optimum][B]' +
+ 'time[A|datetime][B]' +
+ 'ruby[A][B|rt|rp]' +
+ 'rt[A][B]' +
+ 'rp[A][B]' +
+ 'bdo[A][B]' +
+ 'span[A][B]' +
+ 'ins[A|cite|datetime][B]' +
+ 'del[A|cite|datetime][B]' +
+ 'figure[A][C|legend|figcaption]' +
+ 'figcaption[A][C]' +
+ 'img[A|alt|src|height|width|usemap|ismap][]' +
+ 'iframe[A|name|src|height|width|sandbox|seamless][]' +
+ 'embed[A|src|height|width|type][]' +
+ 'object[A|data|type|height|width|usemap|name|form|classid][param]' +
+ 'param[A|name|value][]' +
+ 'details[A|open][C|legend]' +
+ 'command[A|type|label|icon|disabled|checked|radiogroup][]' +
+ 'menu[A|type|label][C|li]' +
+ 'legend[A][C|B]' +
+ 'div[A][C]' +
+ 'source[A|src|type|media][]' +
+ 'audio[A|src|autobuffer|autoplay|loop|controls][source]' +
+ 'video[A|src|autobuffer|autoplay|loop|controls|width|height|poster][source]' +
+ 'hr[A][]' +
+ 'form[A|accept-charset|action|autocomplete|enctype|method|name|novalidate|target][C]' +
+ 'fieldset[A|disabled|form|name][C|legend]' +
+ 'label[A|form|for][B]' +
+ 'input[A|type|accept|alt|autocomplete|autofocus|checked|disabled|form|formaction|formenctype|formmethod|formnovalidate|formtarget|height|list|max|maxlength|min|' +
+ 'multiple|pattern|placeholder|readonly|required|size|src|step|width|files|value|name][]' +
+ 'button[A|autofocus|disabled|form|formaction|formenctype|formmethod|formnovalidate|formtarget|name|value|type][B]' +
+ 'select[A|autofocus|disabled|form|multiple|name|size][option|optgroup]' +
+ 'datalist[A][B|option]' +
+ 'optgroup[A|disabled|label][option]' +
+ 'option[A|disabled|selected|label|value][]' +
+ 'textarea[A|autofocus|disabled|form|maxlength|name|placeholder|readonly|required|rows|cols|wrap][]' +
+ 'keygen[A|autofocus|challenge|disabled|form|keytype|name][]' +
+ 'output[A|for|form|name][B]' +
+ 'canvas[A|width|height][]' +
+ 'map[A|name][B|C]' +
+ 'area[A|shape|coords|href|alt|target|media|rel|ping|type][]' +
+ 'mathml[A][]' +
+ 'svg[A][]' +
+ 'table[A|border][caption|colgroup|thead|tfoot|tbody|tr]' +
+ 'caption[A][C]' +
+ 'colgroup[A|span][col]' +
+ 'col[A|span][]' +
+ 'thead[A][tr]' +
+ 'tfoot[A][tr]' +
+ 'tbody[A][tr]' +
+ 'tr[A][th|td]' +
+ 'th[A|headers|rowspan|colspan|scope][B]' +
+ 'td[A|headers|rowspan|colspan][C]' +
+ 'wbr[A][]'
+ );
+ }
+
+ return html5;
+ };
+
+ function getHTML4() {
+ var html4 = mapCache.html4;
+
+ if (!html4) {
+ // This is the XHTML 1.0 transitional elements with it's attributes and children packed to reduce it's size
+ html4 = mapCache.html4 = unpack({
+ Z : 'H|K|N|O|P',
+ Y : 'X|form|R|Q',
+ ZG : 'E|span|width|align|char|charoff|valign',
+ X : 'p|T|div|U|W|isindex|fieldset|table',
+ ZF : 'E|align|char|charoff|valign',
+ W : 'pre|hr|blockquote|address|center|noframes',
+ ZE : 'abbr|axis|headers|scope|rowspan|colspan|align|char|charoff|valign|nowrap|bgcolor|width|height',
+ ZD : '[E][S]',
+ U : 'ul|ol|dl|menu|dir',
+ ZC : 'p|Y|div|U|W|table|br|span|bdo|object|applet|img|map|K|N|Q',
+ T : 'h1|h2|h3|h4|h5|h6',
+ ZB : 'X|S|Q',
+ S : 'R|P',
+ ZA : 'a|G|J|M|O|P',
+ R : 'a|H|K|N|O',
+ Q : 'noscript|P',
+ P : 'ins|del|script',
+ O : 'input|select|textarea|label|button',
+ N : 'M|L',
+ M : 'em|strong|dfn|code|q|samp|kbd|var|cite|abbr|acronym',
+ L : 'sub|sup',
+ K : 'J|I',
+ J : 'tt|i|b|u|s|strike',
+ I : 'big|small|font|basefont',
+ H : 'G|F',
+ G : 'br|span|bdo',
+ F : 'object|applet|img|map|iframe',
+ E : 'A|B|C',
+ D : 'accesskey|tabindex|onfocus|onblur',
+ C : 'onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup',
+ B : 'lang|xml:lang|dir',
+ A : 'id|class|style|title'
+ }, 'script[id|charset|type|language|src|defer|xml:space][]' +
+ 'style[B|id|type|media|title|xml:space][]' +
+ 'object[E|declare|classid|codebase|data|type|codetype|archive|standby|width|height|usemap|name|tabindex|align|border|hspace|vspace][#|param|Y]' +
+ 'param[id|name|value|valuetype|type][]' +
+ 'p[E|align][#|S]' +
+ 'a[E|D|charset|type|name|href|hreflang|rel|rev|shape|coords|target][#|Z]' +
+ 'br[A|clear][]' +
+ 'span[E][#|S]' +
+ 'bdo[A|C|B][#|S]' +
+ 'applet[A|codebase|archive|code|object|alt|name|width|height|align|hspace|vspace][#|param|Y]' +
+ 'h1[E|align][#|S]' +
+ 'img[E|src|alt|name|longdesc|width|height|usemap|ismap|align|border|hspace|vspace][]' +
+ 'map[B|C|A|name][X|form|Q|area]' +
+ 'h2[E|align][#|S]' +
+ 'iframe[A|longdesc|name|src|frameborder|marginwidth|marginheight|scrolling|align|width|height][#|Y]' +
+ 'h3[E|align][#|S]' +
+ 'tt[E][#|S]' +
+ 'i[E][#|S]' +
+ 'b[E][#|S]' +
+ 'u[E][#|S]' +
+ 's[E][#|S]' +
+ 'strike[E][#|S]' +
+ 'big[E][#|S]' +
+ 'small[E][#|S]' +
+ 'font[A|B|size|color|face][#|S]' +
+ 'basefont[id|size|color|face][]' +
+ 'em[E][#|S]' +
+ 'strong[E][#|S]' +
+ 'dfn[E][#|S]' +
+ 'code[E][#|S]' +
+ 'q[E|cite][#|S]' +
+ 'samp[E][#|S]' +
+ 'kbd[E][#|S]' +
+ 'var[E][#|S]' +
+ 'cite[E][#|S]' +
+ 'abbr[E][#|S]' +
+ 'acronym[E][#|S]' +
+ 'sub[E][#|S]' +
+ 'sup[E][#|S]' +
+ 'input[E|D|type|name|value|checked|disabled|readonly|size|maxlength|src|alt|usemap|onselect|onchange|accept|align][]' +
+ 'select[E|name|size|multiple|disabled|tabindex|onfocus|onblur|onchange][optgroup|option]' +
+ 'optgroup[E|disabled|label][option]' +
+ 'option[E|selected|disabled|label|value][]' +
+ 'textarea[E|D|name|rows|cols|disabled|readonly|onselect|onchange][]' +
+ 'label[E|for|accesskey|onfocus|onblur][#|S]' +
+ 'button[E|D|name|value|type|disabled][#|p|T|div|U|W|table|G|object|applet|img|map|K|N|Q]' +
+ 'h4[E|align][#|S]' +
+ 'ins[E|cite|datetime][#|Y]' +
+ 'h5[E|align][#|S]' +
+ 'del[E|cite|datetime][#|Y]' +
+ 'h6[E|align][#|S]' +
+ 'div[E|align][#|Y]' +
+ 'ul[E|type|compact][li]' +
+ 'li[E|type|value][#|Y]' +
+ 'ol[E|type|compact|start][li]' +
+ 'dl[E|compact][dt|dd]' +
+ 'dt[E][#|S]' +
+ 'dd[E][#|Y]' +
+ 'menu[E|compact][li]' +
+ 'dir[E|compact][li]' +
+ 'pre[E|width|xml:space][#|ZA]' +
+ 'hr[E|align|noshade|size|width][]' +
+ 'blockquote[E|cite][#|Y]' +
+ 'address[E][#|S|p]' +
+ 'center[E][#|Y]' +
+ 'noframes[E][#|Y]' +
+ 'isindex[A|B|prompt][]' +
+ 'fieldset[E][#|legend|Y]' +
+ 'legend[E|accesskey|align][#|S]' +
+ 'table[E|summary|width|border|frame|rules|cellspacing|cellpadding|align|bgcolor][caption|col|colgroup|thead|tfoot|tbody|tr]' +
+ 'caption[E|align][#|S]' +
+ 'col[ZG][]' +
+ 'colgroup[ZG][col]' +
+ 'thead[ZF][tr]' +
+ 'tr[ZF|bgcolor][th|td]' +
+ 'th[E|ZE][#|Y]' +
+ 'form[E|action|method|name|enctype|onsubmit|onreset|accept|accept-charset|target][#|X|R|Q]' +
+ 'noscript[E][#|Y]' +
+ 'td[E|ZE][#|Y]' +
+ 'tfoot[ZF][tr]' +
+ 'tbody[ZF][tr]' +
+ 'area[E|D|shape|coords|href|nohref|alt|target][]' +
+ 'base[id|href|target][]' +
+ 'body[E|onload|onunload|background|bgcolor|text|link|vlink|alink][#|Y]'
+ );
+ }
+
+ return html4;
+ };
+
+ tinymce.html.Schema = function(settings) {
+ var self = this, elements = {}, children = {}, patternElements = [], validStyles, schemaItems;
+ var whiteSpaceElementsMap, selfClosingElementsMap, shortEndedElementsMap, boolAttrMap, blockElementsMap, nonEmptyElementsMap, customElementsMap = {};
+
+ // Creates an lookup table map object for the specified option or the default value
+ function createLookupTable(option, default_value, extend) {
+ var value = settings[option];
+
+ if (!value) {
+ // Get cached default map or make it if needed
+ value = mapCache[option];
+
+ if (!value) {
+ value = makeMap(default_value, ' ', makeMap(default_value.toUpperCase(), ' '));
+ value = tinymce.extend(value, extend);
+
+ mapCache[option] = value;
+ }
+ } else {
+ // Create custom map
+ value = makeMap(value, ',', makeMap(value.toUpperCase(), ' '));
+ }
+
+ return value;
+ };
+
+ settings = settings || {};
+ schemaItems = settings.schema == "html5" ? getHTML5() : getHTML4();
+
+ // Allow all elements and attributes if verify_html is set to false
+ if (settings.verify_html === false)
+ settings.valid_elements = '*[*]';
+
+ // Build styles list
+ if (settings.valid_styles) {
+ validStyles = {};
+
+ // Convert styles into a rule list
+ each(settings.valid_styles, function(value, key) {
+ validStyles[key] = tinymce.explode(value);
+ });
+ }
+
+ // Setup map objects
+ whiteSpaceElementsMap = createLookupTable('whitespace_elements', 'pre script noscript style textarea');
+ selfClosingElementsMap = createLookupTable('self_closing_elements', 'colgroup dd dt li option p td tfoot th thead tr');
+ shortEndedElementsMap = createLookupTable('short_ended_elements', 'area base basefont br col frame hr img input isindex link meta param embed source wbr');
+ boolAttrMap = createLookupTable('boolean_attributes', 'checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls');
+ nonEmptyElementsMap = createLookupTable('non_empty_elements', 'td th iframe video audio object', shortEndedElementsMap);
+ textBlockElementsMap = createLookupTable('text_block_elements', 'h1 h2 h3 h4 h5 h6 p div address pre form ' +
+ 'blockquote center dir fieldset header footer article section hgroup aside nav figure');
+ blockElementsMap = createLookupTable('block_elements', 'hr table tbody thead tfoot ' +
+ 'th tr td li ol ul caption dl dt dd noscript menu isindex samp option datalist select optgroup', textBlockElementsMap);
+
+ // Converts a wildcard expression string to a regexp for example *a will become /.*a/.
+ function patternToRegExp(str) {
+ return new RegExp('^' + str.replace(/([?+*])/g, '.$1') + '$');
+ };
+
+ // Parses the specified valid_elements string and adds to the current rules
+ // This function is a bit hard to read since it's heavily optimized for speed
+ function addValidElements(valid_elements) {
+ var ei, el, ai, al, yl, matches, element, attr, attrData, elementName, attrName, attrType, attributes, attributesOrder,
+ prefix, outputName, globalAttributes, globalAttributesOrder, transElement, key, childKey, value,
+ elementRuleRegExp = /^([#+\-])?([^\[\/]+)(?:\/([^\[]+))?(?:\[([^\]]+)\])?$/,
+ attrRuleRegExp = /^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,
+ hasPatternsRegExp = /[*?+]/;
+
+ if (valid_elements) {
+ // Split valid elements into an array with rules
+ valid_elements = split(valid_elements);
+
+ if (elements['@']) {
+ globalAttributes = elements['@'].attributes;
+ globalAttributesOrder = elements['@'].attributesOrder;
+ }
+
+ // Loop all rules
+ for (ei = 0, el = valid_elements.length; ei < el; ei++) {
+ // Parse element rule
+ matches = elementRuleRegExp.exec(valid_elements[ei]);
+ if (matches) {
+ // Setup local names for matches
+ prefix = matches[1];
+ elementName = matches[2];
+ outputName = matches[3];
+ attrData = matches[4];
+
+ // Create new attributes and attributesOrder
+ attributes = {};
+ attributesOrder = [];
+
+ // Create the new element
+ element = {
+ attributes : attributes,
+ attributesOrder : attributesOrder
+ };
+
+ // Padd empty elements prefix
+ if (prefix === '#')
+ element.paddEmpty = true;
+
+ // Remove empty elements prefix
+ if (prefix === '-')
+ element.removeEmpty = true;
+
+ // Copy attributes from global rule into current rule
+ if (globalAttributes) {
+ for (key in globalAttributes)
+ attributes[key] = globalAttributes[key];
+
+ attributesOrder.push.apply(attributesOrder, globalAttributesOrder);
+ }
+
+ // Attributes defined
+ if (attrData) {
+ attrData = split(attrData, '|');
+ for (ai = 0, al = attrData.length; ai < al; ai++) {
+ matches = attrRuleRegExp.exec(attrData[ai]);
+ if (matches) {
+ attr = {};
+ attrType = matches[1];
+ attrName = matches[2].replace(/::/g, ':');
+ prefix = matches[3];
+ value = matches[4];
+
+ // Required
+ if (attrType === '!') {
+ element.attributesRequired = element.attributesRequired || [];
+ element.attributesRequired.push(attrName);
+ attr.required = true;
+ }
+
+ // Denied from global
+ if (attrType === '-') {
+ delete attributes[attrName];
+ attributesOrder.splice(tinymce.inArray(attributesOrder, attrName), 1);
+ continue;
+ }
+
+ // Default value
+ if (prefix) {
+ // Default value
+ if (prefix === '=') {
+ element.attributesDefault = element.attributesDefault || [];
+ element.attributesDefault.push({name: attrName, value: value});
+ attr.defaultValue = value;
+ }
+
+ // Forced value
+ if (prefix === ':') {
+ element.attributesForced = element.attributesForced || [];
+ element.attributesForced.push({name: attrName, value: value});
+ attr.forcedValue = value;
+ }
+
+ // Required values
+ if (prefix === '<')
+ attr.validValues = makeMap(value, '?');
+ }
+
+ // Check for attribute patterns
+ if (hasPatternsRegExp.test(attrName)) {
+ element.attributePatterns = element.attributePatterns || [];
+ attr.pattern = patternToRegExp(attrName);
+ element.attributePatterns.push(attr);
+ } else {
+ // Add attribute to order list if it doesn't already exist
+ if (!attributes[attrName])
+ attributesOrder.push(attrName);
+
+ attributes[attrName] = attr;
+ }
+ }
+ }
+ }
+
+ // Global rule, store away these for later usage
+ if (!globalAttributes && elementName == '@') {
+ globalAttributes = attributes;
+ globalAttributesOrder = attributesOrder;
+ }
+
+ // Handle substitute elements such as b/strong
+ if (outputName) {
+ element.outputName = elementName;
+ elements[outputName] = element;
+ }
+
+ // Add pattern or exact element
+ if (hasPatternsRegExp.test(elementName)) {
+ element.pattern = patternToRegExp(elementName);
+ patternElements.push(element);
+ } else
+ elements[elementName] = element;
+ }
+ }
+ }
+ };
+
+ function setValidElements(valid_elements) {
+ elements = {};
+ patternElements = [];
+
+ addValidElements(valid_elements);
+
+ each(schemaItems, function(element, name) {
+ children[name] = element.children;
+ });
+ };
+
+ // Adds custom non HTML elements to the schema
+ function addCustomElements(custom_elements) {
+ var customElementRegExp = /^(~)?(.+)$/;
+
+ if (custom_elements) {
+ each(split(custom_elements), function(rule) {
+ var matches = customElementRegExp.exec(rule),
+ inline = matches[1] === '~',
+ cloneName = inline ? 'span' : 'div',
+ name = matches[2];
+
+ children[name] = children[cloneName];
+ customElementsMap[name] = cloneName;
+
+ // If it's not marked as inline then add it to valid block elements
+ if (!inline) {
+ blockElementsMap[name.toUpperCase()] = {};
+ blockElementsMap[name] = {};
+ }
+
+ // Add elements clone if needed
+ if (!elements[name]) {
+ elements[name] = elements[cloneName];
+ }
+
+ // Add custom elements at span/div positions
+ each(children, function(element, child) {
+ if (element[cloneName])
+ element[name] = element[cloneName];
+ });
+ });
+ }
+ };
+
+ // Adds valid children to the schema object
+ function addValidChildren(valid_children) {
+ var childRuleRegExp = /^([+\-]?)(\w+)\[([^\]]+)\]$/;
+
+ if (valid_children) {
+ each(split(valid_children), function(rule) {
+ var matches = childRuleRegExp.exec(rule), parent, prefix;
+
+ if (matches) {
+ prefix = matches[1];
+
+ // Add/remove items from default
+ if (prefix)
+ parent = children[matches[2]];
+ else
+ parent = children[matches[2]] = {'#comment' : {}};
+
+ parent = children[matches[2]];
+
+ each(split(matches[3], '|'), function(child) {
+ if (prefix === '-')
+ delete parent[child];
+ else
+ parent[child] = {};
+ });
+ }
+ });
+ }
+ };
+
+ function getElementRule(name) {
+ var element = elements[name], i;
+
+ // Exact match found
+ if (element)
+ return element;
+
+ // No exact match then try the patterns
+ i = patternElements.length;
+ while (i--) {
+ element = patternElements[i];
+
+ if (element.pattern.test(name))
+ return element;
+ }
+ };
+
+ if (!settings.valid_elements) {
+ // No valid elements defined then clone the elements from the schema spec
+ each(schemaItems, function(element, name) {
+ elements[name] = {
+ attributes : element.attributes,
+ attributesOrder : element.attributesOrder
+ };
+
+ children[name] = element.children;
+ });
+
+ // Switch these on HTML4
+ if (settings.schema != "html5") {
+ each(split('strong/b,em/i'), function(item) {
+ item = split(item, '/');
+ elements[item[1]].outputName = item[0];
+ });
+ }
+
+ // Add default alt attribute for images
+ elements.img.attributesDefault = [{name: 'alt', value: ''}];
+
+ // Remove these if they are empty by default
+ each(split('ol,ul,sub,sup,blockquote,span,font,a,table,tbody,tr,strong,em,b,i'), function(name) {
+ if (elements[name]) {
+ elements[name].removeEmpty = true;
+ }
+ });
+
+ // Padd these by default
+ each(split('p,h1,h2,h3,h4,h5,h6,th,td,pre,div,address,caption'), function(name) {
+ elements[name].paddEmpty = true;
+ });
+ } else
+ setValidElements(settings.valid_elements);
+
+ addCustomElements(settings.custom_elements);
+ addValidChildren(settings.valid_children);
+ addValidElements(settings.extended_valid_elements);
+
+ // Todo: Remove this when we fix list handling to be valid
+ addValidChildren('+ol[ul|ol],+ul[ul|ol]');
+
+ // Delete invalid elements
+ if (settings.invalid_elements) {
+ tinymce.each(tinymce.explode(settings.invalid_elements), function(item) {
+ if (elements[item])
+ delete elements[item];
+ });
+ }
+
+ // If the user didn't allow span only allow internal spans
+ if (!getElementRule('span'))
+ addValidElements('span[!data-mce-type|*]');
+
+ self.children = children;
+
+ self.styles = validStyles;
+
+ self.getBoolAttrs = function() {
+ return boolAttrMap;
+ };
+
+ self.getBlockElements = function() {
+ return blockElementsMap;
+ };
+
+ self.getTextBlockElements = function() {
+ return textBlockElementsMap;
+ };
+
+ self.getShortEndedElements = function() {
+ return shortEndedElementsMap;
+ };
+
+ self.getSelfClosingElements = function() {
+ return selfClosingElementsMap;
+ };
+
+ self.getNonEmptyElements = function() {
+ return nonEmptyElementsMap;
+ };
+
+ self.getWhiteSpaceElements = function() {
+ return whiteSpaceElementsMap;
+ };
+
+ self.isValidChild = function(name, child) {
+ var parent = children[name];
+
+ return !!(parent && parent[child]);
+ };
+
+ self.isValid = function(name, attr) {
+ var attrPatterns, i, rule = getElementRule(name);
+
+ // Check if it's a valid element
+ if (rule) {
+ if (attr) {
+ // Check if attribute name exists
+ if (rule.attributes[attr]) {
+ return true;
+ }
+
+ // Check if attribute matches a regexp pattern
+ attrPatterns = rule.attributePatterns;
+ if (attrPatterns) {
+ i = attrPatterns.length;
+ while (i--) {
+ if (attrPatterns[i].pattern.test(name)) {
+ return true;
+ }
+ }
+ }
+ } else {
+ return true;
+ }
+ }
+
+ // No match
+ return false;
+ };
+
+ self.getElementRule = getElementRule;
+
+ self.getCustomElements = function() {
+ return customElementsMap;
+ };
+
+ self.addValidElements = addValidElements;
+
+ self.setValidElements = setValidElements;
+
+ self.addCustomElements = addCustomElements;
+
+ self.addValidChildren = addValidChildren;
+
+ self.elements = elements;
+ };
+})(tinymce);
+
+(function(tinymce) {
+ tinymce.html.SaxParser = function(settings, schema) {
+ var self = this, noop = function() {};
+
+ settings = settings || {};
+ self.schema = schema = schema || new tinymce.html.Schema();
+
+ if (settings.fix_self_closing !== false)
+ settings.fix_self_closing = true;
+
+ // Add handler functions from settings and setup default handlers
+ tinymce.each('comment cdata text start end pi doctype'.split(' '), function(name) {
+ if (name)
+ self[name] = settings[name] || noop;
+ });
+
+ self.parse = function(html) {
+ var self = this, matches, index = 0, value, endRegExp, stack = [], attrList, i, text, name, isInternalElement, removeInternalElements,
+ shortEndedElements, fillAttrsMap, isShortEnded, validate, elementRule, isValidElement, attr, attribsValue, invalidPrefixRegExp,
+ validAttributesMap, validAttributePatterns, attributesRequired, attributesDefault, attributesForced, selfClosing,
+ tokenRegExp, attrRegExp, specialElements, attrValue, idCount = 0, decode = tinymce.html.Entities.decode, fixSelfClosing, isIE;
+
+ function processEndTag(name) {
+ var pos, i;
+
+ // Find position of parent of the same type
+ pos = stack.length;
+ while (pos--) {
+ if (stack[pos].name === name)
+ break;
+ }
+
+ // Found parent
+ if (pos >= 0) {
+ // Close all the open elements
+ for (i = stack.length - 1; i >= pos; i--) {
+ name = stack[i];
+
+ if (name.valid)
+ self.end(name.name);
+ }
+
+ // Remove the open elements from the stack
+ stack.length = pos;
+ }
+ };
+
+ function parseAttribute(match, name, value, val2, val3) {
+ var attrRule, i;
+
+ name = name.toLowerCase();
+ value = name in fillAttrsMap ? name : decode(value || val2 || val3 || ''); // Handle boolean attribute than value attribute
+
+ // Validate name and value
+ if (validate && !isInternalElement && name.indexOf('data-mce-') !== 0) {
+ attrRule = validAttributesMap[name];
+
+ // Find rule by pattern matching
+ if (!attrRule && validAttributePatterns) {
+ i = validAttributePatterns.length;
+ while (i--) {
+ attrRule = validAttributePatterns[i];
+ if (attrRule.pattern.test(name))
+ break;
+ }
+
+ // No rule matched
+ if (i === -1)
+ attrRule = null;
+ }
+
+ // No attribute rule found
+ if (!attrRule)
+ return;
+
+ // Validate value
+ if (attrRule.validValues && !(value in attrRule.validValues))
+ return;
+ }
+
+ // Add attribute to list and map
+ attrList.map[name] = value;
+ attrList.push({
+ name: name,
+ value: value
+ });
+ };
+
+ // Precompile RegExps and map objects
+ tokenRegExp = new RegExp('<(?:' +
+ '(?:!--([\\w\\W]*?)-->)|' + // Comment
+ '(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|' + // CDATA
+ '(?:!DOCTYPE([\\w\\W]*?)>)|' + // DOCTYPE
+ '(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|' + // PI
+ '(?:\\/([^>]+)>)|' + // End element
+ '(?:([A-Za-z0-9\\-\\:\\.]+)((?:\\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\\/|\\s+)>)' + // Start element
+ ')', 'g');
+
+ attrRegExp = /([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g;
+ specialElements = {
+ 'script' : /<\/script[^>]*>/gi,
+ 'style' : /<\/style[^>]*>/gi,
+ 'noscript' : /<\/noscript[^>]*>/gi
+ };
+
+ // Setup lookup tables for empty elements and boolean attributes
+ shortEndedElements = schema.getShortEndedElements();
+ selfClosing = settings.self_closing_elements || schema.getSelfClosingElements();
+ fillAttrsMap = schema.getBoolAttrs();
+ validate = settings.validate;
+ removeInternalElements = settings.remove_internals;
+ fixSelfClosing = settings.fix_self_closing;
+ isIE = tinymce.isIE;
+ invalidPrefixRegExp = /^:/;
+
+ while (matches = tokenRegExp.exec(html)) {
+ // Text
+ if (index < matches.index)
+ self.text(decode(html.substr(index, matches.index - index)));
+
+ if (value = matches[6]) { // End element
+ value = value.toLowerCase();
+
+ // IE will add a ":" in front of elements it doesn't understand like custom elements or HTML5 elements
+ if (isIE && invalidPrefixRegExp.test(value))
+ value = value.substr(1);
+
+ processEndTag(value);
+ } else if (value = matches[7]) { // Start element
+ value = value.toLowerCase();
+
+ // IE will add a ":" in front of elements it doesn't understand like custom elements or HTML5 elements
+ if (isIE && invalidPrefixRegExp.test(value))
+ value = value.substr(1);
+
+ isShortEnded = value in shortEndedElements;
+
+ // Is self closing tag for example an <li> after an open <li>
+ if (fixSelfClosing && selfClosing[value] && stack.length > 0 && stack[stack.length - 1].name === value)
+ processEndTag(value);
+
+ // Validate element
+ if (!validate || (elementRule = schema.getElementRule(value))) {
+ isValidElement = true;
+
+ // Grab attributes map and patters when validation is enabled
+ if (validate) {
+ validAttributesMap = elementRule.attributes;
+ validAttributePatterns = elementRule.attributePatterns;
+ }
+
+ // Parse attributes
+ if (attribsValue = matches[8]) {
+ isInternalElement = attribsValue.indexOf('data-mce-type') !== -1; // Check if the element is an internal element
+
+ // If the element has internal attributes then remove it if we are told to do so
+ if (isInternalElement && removeInternalElements)
+ isValidElement = false;
+
+ attrList = [];
+ attrList.map = {};
+
+ attribsValue.replace(attrRegExp, parseAttribute);
+ } else {
+ attrList = [];
+ attrList.map = {};
+ }
+
+ // Process attributes if validation is enabled
+ if (validate && !isInternalElement) {
+ attributesRequired = elementRule.attributesRequired;
+ attributesDefault = elementRule.attributesDefault;
+ attributesForced = elementRule.attributesForced;
+
+ // Handle forced attributes
+ if (attributesForced) {
+ i = attributesForced.length;
+ while (i--) {
+ attr = attributesForced[i];
+ name = attr.name;
+ attrValue = attr.value;
+
+ if (attrValue === '{$uid}')
+ attrValue = 'mce_' + idCount++;
+
+ attrList.map[name] = attrValue;
+ attrList.push({name: name, value: attrValue});
+ }
+ }
+
+ // Handle default attributes
+ if (attributesDefault) {
+ i = attributesDefault.length;
+ while (i--) {
+ attr = attributesDefault[i];
+ name = attr.name;
+
+ if (!(name in attrList.map)) {
+ attrValue = attr.value;
+
+ if (attrValue === '{$uid}')
+ attrValue = 'mce_' + idCount++;
+
+ attrList.map[name] = attrValue;
+ attrList.push({name: name, value: attrValue});
+ }
+ }
+ }
+
+ // Handle required attributes
+ if (attributesRequired) {
+ i = attributesRequired.length;
+ while (i--) {
+ if (attributesRequired[i] in attrList.map)
+ break;
+ }
+
+ // None of the required attributes where found
+ if (i === -1)
+ isValidElement = false;
+ }
+
+ // Invalidate element if it's marked as bogus
+ if (attrList.map['data-mce-bogus'])
+ isValidElement = false;
+ }
+
+ if (isValidElement)
+ self.start(value, attrList, isShortEnded);
+ } else
+ isValidElement = false;
+
+ // Treat script, noscript and style a bit different since they may include code that looks like elements
+ if (endRegExp = specialElements[value]) {
+ endRegExp.lastIndex = index = matches.index + matches[0].length;
+
+ if (matches = endRegExp.exec(html)) {
+ if (isValidElement)
+ text = html.substr(index, matches.index - index);
+
+ index = matches.index + matches[0].length;
+ } else {
+ text = html.substr(index);
+ index = html.length;
+ }
+
+ if (isValidElement && text.length > 0)
+ self.text(text, true);
+
+ if (isValidElement)
+ self.end(value);
+
+ tokenRegExp.lastIndex = index;
+ continue;
+ }
+
+ // Push value on to stack
+ if (!isShortEnded) {
+ if (!attribsValue || attribsValue.indexOf('/') != attribsValue.length - 1)
+ stack.push({name: value, valid: isValidElement});
+ else if (isValidElement)
+ self.end(value);
+ }
+ } else if (value = matches[1]) { // Comment
+ self.comment(value);
+ } else if (value = matches[2]) { // CDATA
+ self.cdata(value);
+ } else if (value = matches[3]) { // DOCTYPE
+ self.doctype(value);
+ } else if (value = matches[4]) { // PI
+ self.pi(value, matches[5]);
+ }
+
+ index = matches.index + matches[0].length;
+ }
+
+ // Text
+ if (index < html.length)
+ self.text(decode(html.substr(index)));
+
+ // Close any open elements
+ for (i = stack.length - 1; i >= 0; i--) {
+ value = stack[i];
+
+ if (value.valid)
+ self.end(value.name);
+ }
+ };
+ }
+})(tinymce);
+
+(function(tinymce) {
+ var whiteSpaceRegExp = /^[ \t\r\n]*$/, typeLookup = {
+ '#text' : 3,
+ '#comment' : 8,
+ '#cdata' : 4,
+ '#pi' : 7,
+ '#doctype' : 10,
+ '#document-fragment' : 11
+ };
+
+ // Walks the tree left/right
+ function walk(node, root_node, prev) {
+ var sibling, parent, startName = prev ? 'lastChild' : 'firstChild', siblingName = prev ? 'prev' : 'next';
+
+ // Walk into nodes if it has a start
+ if (node[startName])
+ return node[startName];
+
+ // Return the sibling if it has one
+ if (node !== root_node) {
+ sibling = node[siblingName];
+
+ if (sibling)
+ return sibling;
+
+ // Walk up the parents to look for siblings
+ for (parent = node.parent; parent && parent !== root_node; parent = parent.parent) {
+ sibling = parent[siblingName];
+
+ if (sibling)
+ return sibling;
+ }
+ }
+ };
+
+ function Node(name, type) {
+ this.name = name;
+ this.type = type;
+
+ if (type === 1) {
+ this.attributes = [];
+ this.attributes.map = {};
+ }
+ }
+
+ tinymce.extend(Node.prototype, {
+ replace : function(node) {
+ var self = this;
+
+ if (node.parent)
+ node.remove();
+
+ self.insert(node, self);
+ self.remove();
+
+ return self;
+ },
+
+ attr : function(name, value) {
+ var self = this, attrs, i, undef;
+
+ if (typeof name !== "string") {
+ for (i in name)
+ self.attr(i, name[i]);
+
+ return self;
+ }
+
+ if (attrs = self.attributes) {
+ if (value !== undef) {
+ // Remove attribute
+ if (value === null) {
+ if (name in attrs.map) {
+ delete attrs.map[name];
+
+ i = attrs.length;
+ while (i--) {
+ if (attrs[i].name === name) {
+ attrs = attrs.splice(i, 1);
+ return self;
+ }
+ }
+ }
+
+ return self;
+ }
+
+ // Set attribute
+ if (name in attrs.map) {
+ // Set attribute
+ i = attrs.length;
+ while (i--) {
+ if (attrs[i].name === name) {
+ attrs[i].value = value;
+ break;
+ }
+ }
+ } else
+ attrs.push({name: name, value: value});
+
+ attrs.map[name] = value;
+
+ return self;
+ } else {
+ return attrs.map[name];
+ }
+ }
+ },
+
+ clone : function() {
+ var self = this, clone = new Node(self.name, self.type), i, l, selfAttrs, selfAttr, cloneAttrs;
+
+ // Clone element attributes
+ if (selfAttrs = self.attributes) {
+ cloneAttrs = [];
+ cloneAttrs.map = {};
+
+ for (i = 0, l = selfAttrs.length; i < l; i++) {
+ selfAttr = selfAttrs[i];
+
+ // Clone everything except id
+ if (selfAttr.name !== 'id') {
+ cloneAttrs[cloneAttrs.length] = {name: selfAttr.name, value: selfAttr.value};
+ cloneAttrs.map[selfAttr.name] = selfAttr.value;
+ }
+ }
+
+ clone.attributes = cloneAttrs;
+ }
+
+ clone.value = self.value;
+ clone.shortEnded = self.shortEnded;
+
+ return clone;
+ },
+
+ wrap : function(wrapper) {
+ var self = this;
+
+ self.parent.insert(wrapper, self);
+ wrapper.append(self);
+
+ return self;
+ },
+
+ unwrap : function() {
+ var self = this, node, next;
+
+ for (node = self.firstChild; node; ) {
+ next = node.next;
+ self.insert(node, self, true);
+ node = next;
+ }
+
+ self.remove();
+ },
+
+ remove : function() {
+ var self = this, parent = self.parent, next = self.next, prev = self.prev;
+
+ if (parent) {
+ if (parent.firstChild === self) {
+ parent.firstChild = next;
+
+ if (next)
+ next.prev = null;
+ } else {
+ prev.next = next;
+ }
+
+ if (parent.lastChild === self) {
+ parent.lastChild = prev;
+
+ if (prev)
+ prev.next = null;
+ } else {
+ next.prev = prev;
+ }
+
+ self.parent = self.next = self.prev = null;
+ }
+
+ return self;
+ },
+
+ append : function(node) {
+ var self = this, last;
+
+ if (node.parent)
+ node.remove();
+
+ last = self.lastChild;
+ if (last) {
+ last.next = node;
+ node.prev = last;
+ self.lastChild = node;
+ } else
+ self.lastChild = self.firstChild = node;
+
+ node.parent = self;
+
+ return node;
+ },
+
+ insert : function(node, ref_node, before) {
+ var parent;
+
+ if (node.parent)
+ node.remove();
+
+ parent = ref_node.parent || this;
+
+ if (before) {
+ if (ref_node === parent.firstChild)
+ parent.firstChild = node;
+ else
+ ref_node.prev.next = node;
+
+ node.prev = ref_node.prev;
+ node.next = ref_node;
+ ref_node.prev = node;
+ } else {
+ if (ref_node === parent.lastChild)
+ parent.lastChild = node;
+ else
+ ref_node.next.prev = node;
+
+ node.next = ref_node.next;
+ node.prev = ref_node;
+ ref_node.next = node;
+ }
+
+ node.parent = parent;
+
+ return node;
+ },
+
+ getAll : function(name) {
+ var self = this, node, collection = [];
+
+ for (node = self.firstChild; node; node = walk(node, self)) {
+ if (node.name === name)
+ collection.push(node);
+ }
+
+ return collection;
+ },
+
+ empty : function() {
+ var self = this, nodes, i, node;
+
+ // Remove all children
+ if (self.firstChild) {
+ nodes = [];
+
+ // Collect the children
+ for (node = self.firstChild; node; node = walk(node, self))
+ nodes.push(node);
+
+ // Remove the children
+ i = nodes.length;
+ while (i--) {
+ node = nodes[i];
+ node.parent = node.firstChild = node.lastChild = node.next = node.prev = null;
+ }
+ }
+
+ self.firstChild = self.lastChild = null;
+
+ return self;
+ },
+
+ isEmpty : function(elements) {
+ var self = this, node = self.firstChild, i, name;
+
+ if (node) {
+ do {
+ if (node.type === 1) {
+ // Ignore bogus elements
+ if (node.attributes.map['data-mce-bogus'])
+ continue;
+
+ // Keep empty elements like <img />
+ if (elements[node.name])
+ return false;
+
+ // Keep elements with data attributes or name attribute like <a name="1"></a>
+ i = node.attributes.length;
+ while (i--) {
+ name = node.attributes[i].name;
+ if (name === "name" || name.indexOf('data-mce-') === 0)
+ return false;
+ }
+ }
+
+ // Keep comments
+ if (node.type === 8)
+ return false;
+
+ // Keep non whitespace text nodes
+ if ((node.type === 3 && !whiteSpaceRegExp.test(node.value)))
+ return false;
+ } while (node = walk(node, self));
+ }
+
+ return true;
+ },
+
+ walk : function(prev) {
+ return walk(this, null, prev);
+ }
+ });
+
+ tinymce.extend(Node, {
+ create : function(name, attrs) {
+ var node, attrName;
+
+ // Create node
+ node = new Node(name, typeLookup[name] || 1);
+
+ // Add attributes if needed
+ if (attrs) {
+ for (attrName in attrs)
+ node.attr(attrName, attrs[attrName]);
+ }
+
+ return node;
+ }
+ });
+
+ tinymce.html.Node = Node;
+})(tinymce);
+
+(function(tinymce) {
+ var Node = tinymce.html.Node;
+
+ tinymce.html.DomParser = function(settings, schema) {
+ var self = this, nodeFilters = {}, attributeFilters = [], matchedNodes = {}, matchedAttributes = {};
+
+ settings = settings || {};
+ settings.validate = "validate" in settings ? settings.validate : true;
+ settings.root_name = settings.root_name || 'body';
+ self.schema = schema = schema || new tinymce.html.Schema();
+
+ function fixInvalidChildren(nodes) {
+ var ni, node, parent, parents, newParent, currentNode, tempNode, childNode, i,
+ childClone, nonEmptyElements, nonSplitableElements, textBlockElements, sibling, nextNode;
+
+ nonSplitableElements = tinymce.makeMap('tr,td,th,tbody,thead,tfoot,table');
+ nonEmptyElements = schema.getNonEmptyElements();
+ textBlockElements = schema.getTextBlockElements();
+
+ for (ni = 0; ni < nodes.length; ni++) {
+ node = nodes[ni];
+
+ // Already removed or fixed
+ if (!node.parent || node.fixed)
+ continue;
+
+ // If the invalid element is a text block and the text block is within a parent LI element
+ // Then unwrap the first text block and convert other sibling text blocks to LI elements similar to Word/Open Office
+ if (textBlockElements[node.name] && node.parent.name == 'li') {
+ // Move sibling text blocks after LI element
+ sibling = node.next;
+ while (sibling) {
+ if (textBlockElements[sibling.name]) {
+ sibling.name = 'li';
+ sibling.fixed = true;
+ node.parent.insert(sibling, node.parent);
+ } else {
+ break;
+ }
+
+ sibling = sibling.next;
+ }
+
+ // Unwrap current text block
+ node.unwrap(node);
+ continue;
+ }
+
+ // Get list of all parent nodes until we find a valid parent to stick the child into
+ parents = [node];
+ for (parent = node.parent; parent && !schema.isValidChild(parent.name, node.name) && !nonSplitableElements[parent.name]; parent = parent.parent)
+ parents.push(parent);
+
+ // Found a suitable parent
+ if (parent && parents.length > 1) {
+ // Reverse the array since it makes looping easier
+ parents.reverse();
+
+ // Clone the related parent and insert that after the moved node
+ newParent = currentNode = self.filterNode(parents[0].clone());
+
+ // Start cloning and moving children on the left side of the target node
+ for (i = 0; i < parents.length - 1; i++) {
+ if (schema.isValidChild(currentNode.name, parents[i].name)) {
+ tempNode = self.filterNode(parents[i].clone());
+ currentNode.append(tempNode);
+ } else
+ tempNode = currentNode;
+
+ for (childNode = parents[i].firstChild; childNode && childNode != parents[i + 1]; ) {
+ nextNode = childNode.next;
+ tempNode.append(childNode);
+ childNode = nextNode;
+ }
+
+ currentNode = tempNode;
+ }
+
+ if (!newParent.isEmpty(nonEmptyElements)) {
+ parent.insert(newParent, parents[0], true);
+ parent.insert(node, newParent);
+ } else {
+ parent.insert(node, parents[0], true);
+ }
+
+ // Check if the element is empty by looking through it's contents and special treatment for <p><br /></p>
+ parent = parents[0];
+ if (parent.isEmpty(nonEmptyElements) || parent.firstChild === parent.lastChild && parent.firstChild.name === 'br') {
+ parent.empty().remove();
+ }
+ } else if (node.parent) {
+ // If it's an LI try to find a UL/OL for it or wrap it
+ if (node.name === 'li') {
+ sibling = node.prev;
+ if (sibling && (sibling.name === 'ul' || sibling.name === 'ul')) {
+ sibling.append(node);
+ continue;
+ }
+
+ sibling = node.next;
+ if (sibling && (sibling.name === 'ul' || sibling.name === 'ul')) {
+ sibling.insert(node, sibling.firstChild, true);
+ continue;
+ }
+
+ node.wrap(self.filterNode(new Node('ul', 1)));
+ continue;
+ }
+
+ // Try wrapping the element in a DIV
+ if (schema.isValidChild(node.parent.name, 'div') && schema.isValidChild('div', node.name)) {
+ node.wrap(self.filterNode(new Node('div', 1)));
+ } else {
+ // We failed wrapping it, then remove or unwrap it
+ if (node.name === 'style' || node.name === 'script')
+ node.empty().remove();
+ else
+ node.unwrap();
+ }
+ }
+ }
+ };
+
+ self.filterNode = function(node) {
+ var i, name, list;
+
+ // Run element filters
+ if (name in nodeFilters) {
+ list = matchedNodes[name];
+
+ if (list)
+ list.push(node);
+ else
+ matchedNodes[name] = [node];
+ }
+
+ // Run attribute filters
+ i = attributeFilters.length;
+ while (i--) {
+ name = attributeFilters[i].name;
+
+ if (name in node.attributes.map) {
+ list = matchedAttributes[name];
+
+ if (list)
+ list.push(node);
+ else
+ matchedAttributes[name] = [node];
+ }
+ }
+
+ return node;
+ };
+
+ self.addNodeFilter = function(name, callback) {
+ tinymce.each(tinymce.explode(name), function(name) {
+ var list = nodeFilters[name];
+
+ if (!list)
+ nodeFilters[name] = list = [];
+
+ list.push(callback);
+ });
+ };
+
+ self.addAttributeFilter = function(name, callback) {
+ tinymce.each(tinymce.explode(name), function(name) {
+ var i;
+
+ for (i = 0; i < attributeFilters.length; i++) {
+ if (attributeFilters[i].name === name) {
+ attributeFilters[i].callbacks.push(callback);
+ return;
+ }
+ }
+
+ attributeFilters.push({name: name, callbacks: [callback]});
+ });
+ };
+
+ self.parse = function(html, args) {
+ var parser, rootNode, node, nodes, i, l, fi, fl, list, name, validate,
+ blockElements, startWhiteSpaceRegExp, invalidChildren = [], isInWhiteSpacePreservedElement,
+ endWhiteSpaceRegExp, allWhiteSpaceRegExp, isAllWhiteSpaceRegExp, whiteSpaceElements, children, nonEmptyElements, rootBlockName;
+
+ args = args || {};
+ matchedNodes = {};
+ matchedAttributes = {};
+ blockElements = tinymce.extend(tinymce.makeMap('script,style,head,html,body,title,meta,param'), schema.getBlockElements());
+ nonEmptyElements = schema.getNonEmptyElements();
+ children = schema.children;
+ validate = settings.validate;
+ rootBlockName = "forced_root_block" in args ? args.forced_root_block : settings.forced_root_block;
+
+ whiteSpaceElements = schema.getWhiteSpaceElements();
+ startWhiteSpaceRegExp = /^[ \t\r\n]+/;
+ endWhiteSpaceRegExp = /[ \t\r\n]+$/;
+ allWhiteSpaceRegExp = /[ \t\r\n]+/g;
+ isAllWhiteSpaceRegExp = /^[ \t\r\n]+$/;
+
+ function addRootBlocks() {
+ var node = rootNode.firstChild, next, rootBlockNode;
+
+ while (node) {
+ next = node.next;
+
+ if (node.type == 3 || (node.type == 1 && node.name !== 'p' && !blockElements[node.name] && !node.attr('data-mce-type'))) {
+ if (!rootBlockNode) {
+ // Create a new root block element
+ rootBlockNode = createNode(rootBlockName, 1);
+ rootNode.insert(rootBlockNode, node);
+ rootBlockNode.append(node);
+ } else
+ rootBlockNode.append(node);
+ } else {
+ rootBlockNode = null;
+ }
+
+ node = next;
+ };
+ };
+
+ function createNode(name, type) {
+ var node = new Node(name, type), list;
+
+ if (name in nodeFilters) {
+ list = matchedNodes[name];
+
+ if (list)
+ list.push(node);
+ else
+ matchedNodes[name] = [node];
+ }
+
+ return node;
+ };
+
+ function removeWhitespaceBefore(node) {
+ var textNode, textVal, sibling;
+
+ for (textNode = node.prev; textNode && textNode.type === 3; ) {
+ textVal = textNode.value.replace(endWhiteSpaceRegExp, '');
+
+ if (textVal.length > 0) {
+ textNode.value = textVal;
+ textNode = textNode.prev;
+ } else {
+ sibling = textNode.prev;
+ textNode.remove();
+ textNode = sibling;
+ }
+ }
+ };
+
+ function cloneAndExcludeBlocks(input) {
+ var name, output = {};
+
+ for (name in input) {
+ if (name !== 'li' && name != 'p') {
+ output[name] = input[name];
+ }
+ }
+
+ return output;
+ };
+
+ parser = new tinymce.html.SaxParser({
+ validate : validate,
+
+ // Exclude P and LI from DOM parsing since it's treated better by the DOM parser
+ self_closing_elements: cloneAndExcludeBlocks(schema.getSelfClosingElements()),
+
+ cdata: function(text) {
+ node.append(createNode('#cdata', 4)).value = text;
+ },
+
+ text: function(text, raw) {
+ var textNode;
+
+ // Trim all redundant whitespace on non white space elements
+ if (!isInWhiteSpacePreservedElement) {
+ text = text.replace(allWhiteSpaceRegExp, ' ');
+
+ if (node.lastChild && blockElements[node.lastChild.name])
+ text = text.replace(startWhiteSpaceRegExp, '');
+ }
+
+ // Do we need to create the node
+ if (text.length !== 0) {
+ textNode = createNode('#text', 3);
+ textNode.raw = !!raw;
+ node.append(textNode).value = text;
+ }
+ },
+
+ comment: function(text) {
+ node.append(createNode('#comment', 8)).value = text;
+ },
+
+ pi: function(name, text) {
+ node.append(createNode(name, 7)).value = text;
+ removeWhitespaceBefore(node);
+ },
+
+ doctype: function(text) {
+ var newNode;
+
+ newNode = node.append(createNode('#doctype', 10));
+ newNode.value = text;
+ removeWhitespaceBefore(node);
+ },
+
+ start: function(name, attrs, empty) {
+ var newNode, attrFiltersLen, elementRule, textNode, attrName, text, sibling, parent;
+
+ elementRule = validate ? schema.getElementRule(name) : {};
+ if (elementRule) {
+ newNode = createNode(elementRule.outputName || name, 1);
+ newNode.attributes = attrs;
+ newNode.shortEnded = empty;
+
+ node.append(newNode);
+
+ // Check if node is valid child of the parent node is the child is
+ // unknown we don't collect it since it's probably a custom element
+ parent = children[node.name];
+ if (parent && children[newNode.name] && !parent[newNode.name])
+ invalidChildren.push(newNode);
+
+ attrFiltersLen = attributeFilters.length;
+ while (attrFiltersLen--) {
+ attrName = attributeFilters[attrFiltersLen].name;
+
+ if (attrName in attrs.map) {
+ list = matchedAttributes[attrName];
+
+ if (list)
+ list.push(newNode);
+ else
+ matchedAttributes[attrName] = [newNode];
+ }
+ }
+
+ // Trim whitespace before block
+ if (blockElements[name])
+ removeWhitespaceBefore(newNode);
+
+ // Change current node if the element wasn't empty i.e not <br /> or <img />
+ if (!empty)
+ node = newNode;
+
+ // Check if we are inside a whitespace preserved element
+ if (!isInWhiteSpacePreservedElement && whiteSpaceElements[name]) {
+ isInWhiteSpacePreservedElement = true;
+ }
+ }
+ },
+
+ end: function(name) {
+ var textNode, elementRule, text, sibling, tempNode;
+
+ elementRule = validate ? schema.getElementRule(name) : {};
+ if (elementRule) {
+ if (blockElements[name]) {
+ if (!isInWhiteSpacePreservedElement) {
+ // Trim whitespace of the first node in a block
+ textNode = node.firstChild;
+ if (textNode && textNode.type === 3) {
+ text = textNode.value.replace(startWhiteSpaceRegExp, '');
+
+ // Any characters left after trim or should we remove it
+ if (text.length > 0) {
+ textNode.value = text;
+ textNode = textNode.next;
+ } else {
+ sibling = textNode.next;
+ textNode.remove();
+ textNode = sibling;
+ }
+
+ // Remove any pure whitespace siblings
+ while (textNode && textNode.type === 3) {
+ text = textNode.value;
+ sibling = textNode.next;
+
+ if (text.length === 0 || isAllWhiteSpaceRegExp.test(text)) {
+ textNode.remove();
+ textNode = sibling;
+ }
+
+ textNode = sibling;
+ }
+ }
+
+ // Trim whitespace of the last node in a block
+ textNode = node.lastChild;
+ if (textNode && textNode.type === 3) {
+ text = textNode.value.replace(endWhiteSpaceRegExp, '');
+
+ // Any characters left after trim or should we remove it
+ if (text.length > 0) {
+ textNode.value = text;
+ textNode = textNode.prev;
+ } else {
+ sibling = textNode.prev;
+ textNode.remove();
+ textNode = sibling;
+ }
+
+ // Remove any pure whitespace siblings
+ while (textNode && textNode.type === 3) {
+ text = textNode.value;
+ sibling = textNode.prev;
+
+ if (text.length === 0 || isAllWhiteSpaceRegExp.test(text)) {
+ textNode.remove();
+ textNode = sibling;
+ }
+
+ textNode = sibling;
+ }
+ }
+ }
+
+ // Trim start white space
+ // Removed due to: #5424
+ /*textNode = node.prev;
+ if (textNode && textNode.type === 3) {
+ text = textNode.value.replace(startWhiteSpaceRegExp, '');
+
+ if (text.length > 0)
+ textNode.value = text;
+ else
+ textNode.remove();
+ }*/
+ }
+
+ // Check if we exited a whitespace preserved element
+ if (isInWhiteSpacePreservedElement && whiteSpaceElements[name]) {
+ isInWhiteSpacePreservedElement = false;
+ }
+
+ // Handle empty nodes
+ if (elementRule.removeEmpty || elementRule.paddEmpty) {
+ if (node.isEmpty(nonEmptyElements)) {
+ if (elementRule.paddEmpty)
+ node.empty().append(new Node('#text', '3')).value = '\u00a0';
+ else {
+ // Leave nodes that have a name like <a name="name">
+ if (!node.attributes.map.name && !node.attributes.map.id) {
+ tempNode = node.parent;
+ node.empty().remove();
+ node = tempNode;
+ return;
+ }
+ }
+ }
+ }
+
+ node = node.parent;
+ }
+ }
+ }, schema);
+
+ rootNode = node = new Node(args.context || settings.root_name, 11);
+
+ parser.parse(html);
+
+ // Fix invalid children or report invalid children in a contextual parsing
+ if (validate && invalidChildren.length) {
+ if (!args.context)
+ fixInvalidChildren(invalidChildren);
+ else
+ args.invalid = true;
+ }
+
+ // Wrap nodes in the root into block elements if the root is body
+ if (rootBlockName && rootNode.name == 'body')
+ addRootBlocks();
+
+ // Run filters only when the contents is valid
+ if (!args.invalid) {
+ // Run node filters
+ for (name in matchedNodes) {
+ list = nodeFilters[name];
+ nodes = matchedNodes[name];
+
+ // Remove already removed children
+ fi = nodes.length;
+ while (fi--) {
+ if (!nodes[fi].parent)
+ nodes.splice(fi, 1);
+ }
+
+ for (i = 0, l = list.length; i < l; i++)
+ list[i](nodes, name, args);
+ }
+
+ // Run attribute filters
+ for (i = 0, l = attributeFilters.length; i < l; i++) {
+ list = attributeFilters[i];
+
+ if (list.name in matchedAttributes) {
+ nodes = matchedAttributes[list.name];
+
+ // Remove already removed children
+ fi = nodes.length;
+ while (fi--) {
+ if (!nodes[fi].parent)
+ nodes.splice(fi, 1);
+ }
+
+ for (fi = 0, fl = list.callbacks.length; fi < fl; fi++)
+ list.callbacks[fi](nodes, list.name, args);
+ }
+ }
+ }
+
+ return rootNode;
+ };
+
+ // Remove <br> at end of block elements Gecko and WebKit injects BR elements to
+ // make it possible to place the caret inside empty blocks. This logic tries to remove
+ // these elements and keep br elements that where intended to be there intact
+ if (settings.remove_trailing_brs) {
+ self.addNodeFilter('br', function(nodes, name) {
+ var i, l = nodes.length, node, blockElements = tinymce.extend({}, schema.getBlockElements()),
+ nonEmptyElements = schema.getNonEmptyElements(), parent, lastParent, prev, prevName;
+
+ // Remove brs from body element as well
+ blockElements.body = 1;
+
+ // Must loop forwards since it will otherwise remove all brs in <p>a<br><br><br></p>
+ for (i = 0; i < l; i++) {
+ node = nodes[i];
+ parent = node.parent;
+
+ if (blockElements[node.parent.name] && node === parent.lastChild) {
+ // Loop all nodes to the left of the current node and check for other BR elements
+ // excluding bookmarks since they are invisible
+ prev = node.prev;
+ while (prev) {
+ prevName = prev.name;
+
+ // Ignore bookmarks
+ if (prevName !== "span" || prev.attr('data-mce-type') !== 'bookmark') {
+ // Found a non BR element
+ if (prevName !== "br")
+ break;
+
+ // Found another br it's a <br><br> structure then don't remove anything
+ if (prevName === 'br') {
+ node = null;
+ break;
+ }
+ }
+
+ prev = prev.prev;
+ }
+
+ if (node) {
+ node.remove();
+
+ // Is the parent to be considered empty after we removed the BR
+ if (parent.isEmpty(nonEmptyElements)) {
+ elementRule = schema.getElementRule(parent.name);
+
+ // Remove or padd the element depending on schema rule
+ if (elementRule) {
+ if (elementRule.removeEmpty)
+ parent.remove();
+ else if (elementRule.paddEmpty)
+ parent.empty().append(new tinymce.html.Node('#text', 3)).value = '\u00a0';
+ }
+ }
+ }
+ } else {
+ // Replaces BR elements inside inline elements like <p><b><i><br></i></b></p> so they become <p><b><i>&nbsp;</i></b></p>
+ lastParent = node;
+ while (parent.firstChild === lastParent && parent.lastChild === lastParent) {
+ lastParent = parent;
+
+ if (blockElements[parent.name]) {
+ break;
+ }
+
+ parent = parent.parent;
+ }
+
+ if (lastParent === parent) {
+ textNode = new tinymce.html.Node('#text', 3);
+ textNode.value = '\u00a0';
+ node.replace(textNode);
+ }
+ }
+ }
+ });
+ }
+
+ // Force anchor names closed, unless the setting "allow_html_in_named_anchor" is explicitly included.
+ if (!settings.allow_html_in_named_anchor) {
+ self.addAttributeFilter('id,name', function(nodes, name) {
+ var i = nodes.length, sibling, prevSibling, parent, node;
+
+ while (i--) {
+ node = nodes[i];
+ if (node.name === 'a' && node.firstChild && !node.attr('href')) {
+ parent = node.parent;
+
+ // Move children after current node
+ sibling = node.lastChild;
+ do {
+ prevSibling = sibling.prev;
+ parent.insert(sibling, node);
+ sibling = prevSibling;
+ } while (sibling);
+ }
+ }
+ });
+ }
+ }
+})(tinymce);
+
+tinymce.html.Writer = function(settings) {
+ var html = [], indent, indentBefore, indentAfter, encode, htmlOutput;
+
+ settings = settings || {};
+ indent = settings.indent;
+ indentBefore = tinymce.makeMap(settings.indent_before || '');
+ indentAfter = tinymce.makeMap(settings.indent_after || '');
+ encode = tinymce.html.Entities.getEncodeFunc(settings.entity_encoding || 'raw', settings.entities);
+ htmlOutput = settings.element_format == "html";
+
+ return {
+ start: function(name, attrs, empty) {
+ var i, l, attr, value;
+
+ if (indent && indentBefore[name] && html.length > 0) {
+ value = html[html.length - 1];
+
+ if (value.length > 0 && value !== '\n')
+ html.push('\n');
+ }
+
+ html.push('<', name);
+
+ if (attrs) {
+ for (i = 0, l = attrs.length; i < l; i++) {
+ attr = attrs[i];
+ html.push(' ', attr.name, '="', encode(attr.value, true), '"');
+ }
+ }
+
+ if (!empty || htmlOutput)
+ html[html.length] = '>';
+ else
+ html[html.length] = ' />';
+
+ if (empty && indent && indentAfter[name] && html.length > 0) {
+ value = html[html.length - 1];
+
+ if (value.length > 0 && value !== '\n')
+ html.push('\n');
+ }
+ },
+
+ end: function(name) {
+ var value;
+
+ /*if (indent && indentBefore[name] && html.length > 0) {
+ value = html[html.length - 1];
+
+ if (value.length > 0 && value !== '\n')
+ html.push('\n');
+ }*/
+
+ html.push('</', name, '>');
+
+ if (indent && indentAfter[name] && html.length > 0) {
+ value = html[html.length - 1];
+
+ if (value.length > 0 && value !== '\n')
+ html.push('\n');
+ }
+ },
+
+ text: function(text, raw) {
+ if (text.length > 0)
+ html[html.length] = raw ? text : encode(text);
+ },
+
+ cdata: function(text) {
+ html.push('<![CDATA[', text, ']]>');
+ },
+
+ comment: function(text) {
+ html.push('<!--', text, '-->');
+ },
+
+ pi: function(name, text) {
+ if (text)
+ html.push('<?', name, ' ', text, '?>');
+ else
+ html.push('<?', name, '?>');
+
+ if (indent)
+ html.push('\n');
+ },
+
+ doctype: function(text) {
+ html.push('<!DOCTYPE', text, '>', indent ? '\n' : '');
+ },
+
+ reset: function() {
+ html.length = 0;
+ },
+
+ getContent: function() {
+ return html.join('').replace(/\n$/, '');
+ }
+ };
+};
+
+(function(tinymce) {
+ tinymce.html.Serializer = function(settings, schema) {
+ var self = this, writer = new tinymce.html.Writer(settings);
+
+ settings = settings || {};
+ settings.validate = "validate" in settings ? settings.validate : true;
+
+ self.schema = schema = schema || new tinymce.html.Schema();
+ self.writer = writer;
+
+ self.serialize = function(node) {
+ var handlers, validate;
+
+ validate = settings.validate;
+
+ handlers = {
+ // #text
+ 3: function(node, raw) {
+ writer.text(node.value, node.raw);
+ },
+
+ // #comment
+ 8: function(node) {
+ writer.comment(node.value);
+ },
+
+ // Processing instruction
+ 7: function(node) {
+ writer.pi(node.name, node.value);
+ },
+
+ // Doctype
+ 10: function(node) {
+ writer.doctype(node.value);
+ },
+
+ // CDATA
+ 4: function(node) {
+ writer.cdata(node.value);
+ },
+
+ // Document fragment
+ 11: function(node) {
+ if ((node = node.firstChild)) {
+ do {
+ walk(node);
+ } while (node = node.next);
+ }
+ }
+ };
+
+ writer.reset();
+
+ function walk(node) {
+ var handler = handlers[node.type], name, isEmpty, attrs, attrName, attrValue, sortedAttrs, i, l, elementRule;
+
+ if (!handler) {
+ name = node.name;
+ isEmpty = node.shortEnded;
+ attrs = node.attributes;
+
+ // Sort attributes
+ if (validate && attrs && attrs.length > 1) {
+ sortedAttrs = [];
+ sortedAttrs.map = {};
+
+ elementRule = schema.getElementRule(node.name);
+ for (i = 0, l = elementRule.attributesOrder.length; i < l; i++) {
+ attrName = elementRule.attributesOrder[i];
+
+ if (attrName in attrs.map) {
+ attrValue = attrs.map[attrName];
+ sortedAttrs.map[attrName] = attrValue;
+ sortedAttrs.push({name: attrName, value: attrValue});
+ }
+ }
+
+ for (i = 0, l = attrs.length; i < l; i++) {
+ attrName = attrs[i].name;
+
+ if (!(attrName in sortedAttrs.map)) {
+ attrValue = attrs.map[attrName];
+ sortedAttrs.map[attrName] = attrValue;
+ sortedAttrs.push({name: attrName, value: attrValue});
+ }
+ }
+
+ attrs = sortedAttrs;
+ }
+
+ writer.start(node.name, attrs, isEmpty);
+
+ if (!isEmpty) {
+ if ((node = node.firstChild)) {
+ do {
+ walk(node);
+ } while (node = node.next);
+ }
+
+ writer.end(name);
+ }
+ } else
+ handler(node);
+ }
+
+ // Serialize element and treat all non elements as fragments
+ if (node.type == 1 && !settings.inner)
+ walk(node);
+ else
+ handlers[11](node);
+
+ return writer.getContent();
+ };
+ }
+})(tinymce);
+
+// JSLint defined globals
+/*global tinymce:false, window:false */
+
+tinymce.dom = {};
+
+(function(namespace, expando) {
+ var w3cEventModel = !!document.addEventListener;
+
+ function addEvent(target, name, callback, capture) {
+ if (target.addEventListener) {
+ target.addEventListener(name, callback, capture || false);
+ } else if (target.attachEvent) {
+ target.attachEvent('on' + name, callback);
+ }
+ }
+
+ function removeEvent(target, name, callback, capture) {
+ if (target.removeEventListener) {
+ target.removeEventListener(name, callback, capture || false);
+ } else if (target.detachEvent) {
+ target.detachEvent('on' + name, callback);
+ }
+ }
+
+ function fix(original_event, data) {
+ var name, event = data || {};
+
+ // Dummy function that gets replaced on the delegation state functions
+ function returnFalse() {
+ return false;
+ }
+
+ // Dummy function that gets replaced on the delegation state functions
+ function returnTrue() {
+ return true;
+ }
+
+ // Copy all properties from the original event
+ for (name in original_event) {
+ // layerX/layerY is deprecated in Chrome and produces a warning
+ if (name !== "layerX" && name !== "layerY") {
+ event[name] = original_event[name];
+ }
+ }
+
+ // Normalize target IE uses srcElement
+ if (!event.target) {
+ event.target = event.srcElement || document;
+ }
+
+ // Add preventDefault method
+ event.preventDefault = function() {
+ event.isDefaultPrevented = returnTrue;
+
+ // Execute preventDefault on the original event object
+ if (original_event) {
+ if (original_event.preventDefault) {
+ original_event.preventDefault();
+ } else {
+ original_event.returnValue = false; // IE
+ }
+ }
+ };
+
+ // Add stopPropagation
+ event.stopPropagation = function() {
+ event.isPropagationStopped = returnTrue;
+
+ // Execute stopPropagation on the original event object
+ if (original_event) {
+ if (original_event.stopPropagation) {
+ original_event.stopPropagation();
+ } else {
+ original_event.cancelBubble = true; // IE
+ }
+ }
+ };
+
+ // Add stopImmediatePropagation
+ event.stopImmediatePropagation = function() {
+ event.isImmediatePropagationStopped = returnTrue;
+ event.stopPropagation();
+ };
+
+ // Add event delegation states
+ if (!event.isDefaultPrevented) {
+ event.isDefaultPrevented = returnFalse;
+ event.isPropagationStopped = returnFalse;
+ event.isImmediatePropagationStopped = returnFalse;
+ }
+
+ return event;
+ }
+
+ function bindOnReady(win, callback, event_utils) {
+ var doc = win.document, event = {type: 'ready'};
+
+ // Gets called when the DOM is ready
+ function readyHandler() {
+ if (!event_utils.domLoaded) {
+ event_utils.domLoaded = true;
+ callback(event);
+ }
+ }
+
+ // Page already loaded then fire it directly
+ if (doc.readyState == "complete") {
+ readyHandler();
+ return;
+ }
+
+ // Use W3C method
+ if (w3cEventModel) {
+ addEvent(win, 'DOMContentLoaded', readyHandler);
+ } else {
+ // Use IE method
+ addEvent(doc, "readystatechange", function() {
+ if (doc.readyState === "complete") {
+ removeEvent(doc, "readystatechange", arguments.callee);
+ readyHandler();
+ }
+ });
+
+ // Wait until we can scroll, when we can the DOM is initialized
+ if (doc.documentElement.doScroll && win === win.top) {
+ (function() {
+ try {
+ // If IE is used, use the trick by Diego Perini licensed under MIT by request to the author.
+ // http://javascript.nwbox.com/IEContentLoaded/
+ doc.documentElement.doScroll("left");
+ } catch (ex) {
+ setTimeout(arguments.callee, 0);
+ return;
+ }
+
+ readyHandler();
+ })();
+ }
+ }
+
+ // Fallback if any of the above methods should fail for some odd reason
+ addEvent(win, 'load', readyHandler);
+ }
+
+ function EventUtils(proxy) {
+ var self = this, events = {}, count, isFocusBlurBound, hasFocusIn, hasMouseEnterLeave, mouseEnterLeave;
+
+ hasMouseEnterLeave = "onmouseenter" in document.documentElement;
+ hasFocusIn = "onfocusin" in document.documentElement;
+ mouseEnterLeave = {mouseenter: 'mouseover', mouseleave: 'mouseout'};
+ count = 1;
+
+ // State if the DOMContentLoaded was executed or not
+ self.domLoaded = false;
+ self.events = events;
+
+ function executeHandlers(evt, id) {
+ var callbackList, i, l, callback;
+
+ callbackList = events[id][evt.type];
+ if (callbackList) {
+ for (i = 0, l = callbackList.length; i < l; i++) {
+ callback = callbackList[i];
+
+ // Check if callback exists might be removed if a unbind is called inside the callback
+ if (callback && callback.func.call(callback.scope, evt) === false) {
+ evt.preventDefault();
+ }
+
+ // Should we stop propagation to immediate listeners
+ if (evt.isImmediatePropagationStopped()) {
+ return;
+ }
+ }
+ }
+ }
+
+ self.bind = function(target, names, callback, scope) {
+ var id, callbackList, i, name, fakeName, nativeHandler, capture, win = window;
+
+ // Native event handler function patches the event and executes the callbacks for the expando
+ function defaultNativeHandler(evt) {
+ executeHandlers(fix(evt || win.event), id);
+ }
+
+ // Don't bind to text nodes or comments
+ if (!target || target.nodeType === 3 || target.nodeType === 8) {
+ return;
+ }
+
+ // Create or get events id for the target
+ if (!target[expando]) {
+ id = count++;
+ target[expando] = id;
+ events[id] = {};
+ } else {
+ id = target[expando];
+
+ if (!events[id]) {
+ events[id] = {};
+ }
+ }
+
+ // Setup the specified scope or use the target as a default
+ scope = scope || target;
+
+ // Split names and bind each event, enables you to bind multiple events with one call
+ names = names.split(' ');
+ i = names.length;
+ while (i--) {
+ name = names[i];
+ nativeHandler = defaultNativeHandler;
+ fakeName = capture = false;
+
+ // Use ready instead of DOMContentLoaded
+ if (name === "DOMContentLoaded") {
+ name = "ready";
+ }
+
+ // DOM is already ready
+ if ((self.domLoaded || target.readyState == 'complete') && name === "ready") {
+ self.domLoaded = true;
+ callback.call(scope, fix({type: name}));
+ continue;
+ }
+
+ // Handle mouseenter/mouseleaver
+ if (!hasMouseEnterLeave) {
+ fakeName = mouseEnterLeave[name];
+
+ if (fakeName) {
+ nativeHandler = function(evt) {
+ var current, related;
+
+ current = evt.currentTarget;
+ related = evt.relatedTarget;
+
+ // Check if related is inside the current target if it's not then the event should be ignored since it's a mouseover/mouseout inside the element
+ if (related && current.contains) {
+ // Use contains for performance
+ related = current.contains(related);
+ } else {
+ while (related && related !== current) {
+ related = related.parentNode;
+ }
+ }
+
+ // Fire fake event
+ if (!related) {
+ evt = fix(evt || win.event);
+ evt.type = evt.type === 'mouseout' ? 'mouseleave' : 'mouseenter';
+ evt.target = current;
+ executeHandlers(evt, id);
+ }
+ };
+ }
+ }
+
+ // Fake bubbeling of focusin/focusout
+ if (!hasFocusIn && (name === "focusin" || name === "focusout")) {
+ capture = true;
+ fakeName = name === "focusin" ? "focus" : "blur";
+ nativeHandler = function(evt) {
+ evt = fix(evt || win.event);
+ evt.type = evt.type === 'focus' ? 'focusin' : 'focusout';
+ executeHandlers(evt, id);
+ };
+ }
+
+ // Setup callback list and bind native event
+ callbackList = events[id][name];
+ if (!callbackList) {
+ events[id][name] = callbackList = [{func: callback, scope: scope}];
+ callbackList.fakeName = fakeName;
+ callbackList.capture = capture;
+
+ // Add the nativeHandler to the callback list so that we can later unbind it
+ callbackList.nativeHandler = nativeHandler;
+ if (!w3cEventModel) {
+ callbackList.proxyHandler = proxy(id);
+ }
+
+ // Check if the target has native events support
+ if (name === "ready") {
+ bindOnReady(target, nativeHandler, self);
+ } else {
+ addEvent(target, fakeName || name, w3cEventModel ? nativeHandler : callbackList.proxyHandler, capture);
+ }
+ } else {
+ // If it already has an native handler then just push the callback
+ callbackList.push({func: callback, scope: scope});
+ }
+ }
+
+ target = callbackList = 0; // Clean memory for IE
+
+ return callback;
+ };
+
+ self.unbind = function(target, names, callback) {
+ var id, callbackList, i, ci, name, eventMap;
+
+ // Don't bind to text nodes or comments
+ if (!target || target.nodeType === 3 || target.nodeType === 8) {
+ return self;
+ }
+
+ // Unbind event or events if the target has the expando
+ id = target[expando];
+ if (id) {
+ eventMap = events[id];
+
+ // Specific callback
+ if (names) {
+ names = names.split(' ');
+ i = names.length;
+ while (i--) {
+ name = names[i];
+ callbackList = eventMap[name];
+
+ // Unbind the event if it exists in the map
+ if (callbackList) {
+ // Remove specified callback
+ if (callback) {
+ ci = callbackList.length;
+ while (ci--) {
+ if (callbackList[ci].func === callback) {
+ callbackList.splice(ci, 1);
+ }
+ }
+ }
+
+ // Remove all callbacks if there isn't a specified callback or there is no callbacks left
+ if (!callback || callbackList.length === 0) {
+ delete eventMap[name];
+ removeEvent(target, callbackList.fakeName || name, w3cEventModel ? callbackList.nativeHandler : callbackList.proxyHandler, callbackList.capture);
+ }
+ }
+ }
+ } else {
+ // All events for a specific element
+ for (name in eventMap) {
+ callbackList = eventMap[name];
+ removeEvent(target, callbackList.fakeName || name, w3cEventModel ? callbackList.nativeHandler : callbackList.proxyHandler, callbackList.capture);
+ }
+
+ eventMap = {};
+ }
+
+ // Check if object is empty, if it isn't then we won't remove the expando map
+ for (name in eventMap) {
+ return self;
+ }
+
+ // Delete event object
+ delete events[id];
+
+ // Remove expando from target
+ try {
+ // IE will fail here since it can't delete properties from window
+ delete target[expando];
+ } catch (ex) {
+ // IE will set it to null
+ target[expando] = null;
+ }
+ }
+
+ return self;
+ };
+
+ self.fire = function(target, name, args) {
+ var id, event;
+
+ // Don't bind to text nodes or comments
+ if (!target || target.nodeType === 3 || target.nodeType === 8) {
+ return self;
+ }
+
+ // Build event object by patching the args
+ event = fix(null, args);
+ event.type = name;
+
+ do {
+ // Found an expando that means there is listeners to execute
+ id = target[expando];
+ if (id) {
+ executeHandlers(event, id);
+ }
+
+ // Walk up the DOM
+ target = target.parentNode || target.ownerDocument || target.defaultView || target.parentWindow;
+ } while (target && !event.isPropagationStopped());
+
+ return self;
+ };
+
+ self.clean = function(target) {
+ var i, children, unbind = self.unbind;
+
+ // Don't bind to text nodes or comments
+ if (!target || target.nodeType === 3 || target.nodeType === 8) {
+ return self;
+ }
+
+ // Unbind any element on the specificed target
+ if (target[expando]) {
+ unbind(target);
+ }
+
+ // Target doesn't have getElementsByTagName it's probably a window object then use it's document to find the children
+ if (!target.getElementsByTagName) {
+ target = target.document;
+ }
+
+ // Remove events from each child element
+ if (target && target.getElementsByTagName) {
+ unbind(target);
+
+ children = target.getElementsByTagName('*');
+ i = children.length;
+ while (i--) {
+ target = children[i];
+
+ if (target[expando]) {
+ unbind(target);
+ }
+ }
+ }
+
+ return self;
+ };
+
+ self.callNativeHandler = function(id, evt) {
+ if (events) {
+ events[id][evt.type].nativeHandler(evt);
+ }
+ };
+
+ self.destory = function() {
+ events = {};
+ };
+
+ // Legacy function calls
+
+ self.add = function(target, events, func, scope) {
+ // Old API supported direct ID assignment
+ if (typeof(target) === "string") {
+ target = document.getElementById(target);
+ }
+
+ // Old API supported multiple targets
+ if (target && target instanceof Array) {
+ var i = target.length;
+
+ while (i--) {
+ self.add(target[i], events, func, scope);
+ }
+
+ return;
+ }
+
+ // Old API called ready init
+ if (events === "init") {
+ events = "ready";
+ }
+
+ return self.bind(target, events instanceof Array ? events.join(' ') : events, func, scope);
+ };
+
+ self.remove = function(target, events, func, scope) {
+ if (!target) {
+ return self;
+ }
+
+ // Old API supported direct ID assignment
+ if (typeof(target) === "string") {
+ target = document.getElementById(target);
+ }
+
+ // Old API supported multiple targets
+ if (target instanceof Array) {
+ var i = target.length;
+
+ while (i--) {
+ self.remove(target[i], events, func, scope);
+ }
+
+ return self;
+ }
+
+ return self.unbind(target, events instanceof Array ? events.join(' ') : events, func);
+ };
+
+ self.clear = function(target) {
+ // Old API supported direct ID assignment
+ if (typeof(target) === "string") {
+ target = document.getElementById(target);
+ }
+
+ return self.clean(target);
+ };
+
+ self.cancel = function(e) {
+ if (e) {
+ self.prevent(e);
+ self.stop(e);
+ }
+
+ return false;
+ };
+
+ self.prevent = function(e) {
+ if (!e.preventDefault) {
+ e = fix(e);
+ }
+
+ e.preventDefault();
+
+ return false;
+ };
+
+ self.stop = function(e) {
+ if (!e.stopPropagation) {
+ e = fix(e);
+ }
+
+ e.stopPropagation();
+
+ return false;
+ };
+ }
+
+ namespace.EventUtils = EventUtils;
+
+ namespace.Event = new EventUtils(function(id) {
+ return function(evt) {
+ tinymce.dom.Event.callNativeHandler(id, evt);
+ };
+ });
+
+ // Bind ready event when tinymce script is loaded
+ namespace.Event.bind(window, 'ready', function() {});
+
+ namespace = 0;
+})(tinymce.dom, 'data-mce-expando'); // Namespace and expando
+
+tinymce.dom.TreeWalker = function(start_node, root_node) {
+ var node = start_node;
+
+ function findSibling(node, start_name, sibling_name, shallow) {
+ var sibling, parent;
+
+ if (node) {
+ // Walk into nodes if it has a start
+ if (!shallow && node[start_name])
+ return node[start_name];
+
+ // Return the sibling if it has one
+ if (node != root_node) {
+ sibling = node[sibling_name];
+ if (sibling)
+ return sibling;
+
+ // Walk up the parents to look for siblings
+ for (parent = node.parentNode; parent && parent != root_node; parent = parent.parentNode) {
+ sibling = parent[sibling_name];
+ if (sibling)
+ return sibling;
+ }
+ }
+ }
+ };
+
+ this.current = function() {
+ return node;
+ };
+
+ this.next = function(shallow) {
+ return (node = findSibling(node, 'firstChild', 'nextSibling', shallow));
+ };
+
+ this.prev = function(shallow) {
+ return (node = findSibling(node, 'lastChild', 'previousSibling', shallow));
+ };
+};
+
+(function(tinymce) {
+ // Shorten names
+ var each = tinymce.each,
+ is = tinymce.is,
+ isWebKit = tinymce.isWebKit,
+ isIE = tinymce.isIE,
+ Entities = tinymce.html.Entities,
+ simpleSelectorRe = /^([a-z0-9],?)+$/i,
+ whiteSpaceRegExp = /^[ \t\r\n]*$/;
+
+ tinymce.create('tinymce.dom.DOMUtils', {
+ doc : null,
+ root : null,
+ files : null,
+ pixelStyles : /^(top|left|bottom|right|width|height|borderWidth)$/,
+ props : {
+ "for" : "htmlFor",
+ "class" : "className",
+ className : "className",
+ checked : "checked",
+ disabled : "disabled",
+ maxlength : "maxLength",
+ readonly : "readOnly",
+ selected : "selected",
+ value : "value",
+ id : "id",
+ name : "name",
+ type : "type"
+ },
+
+ DOMUtils : function(d, s) {
+ var t = this, globalStyle, name, blockElementsMap;
+
+ t.doc = d;
+ t.win = window;
+ t.files = {};
+ t.cssFlicker = false;
+ t.counter = 0;
+ t.stdMode = !tinymce.isIE || d.documentMode >= 8;
+ t.boxModel = !tinymce.isIE || d.compatMode == "CSS1Compat" || t.stdMode;
+ t.hasOuterHTML = "outerHTML" in d.createElement("a");
+
+ t.settings = s = tinymce.extend({
+ keep_values : false,
+ hex_colors : 1
+ }, s);
+
+ t.schema = s.schema;
+ t.styles = new tinymce.html.Styles({
+ url_converter : s.url_converter,
+ url_converter_scope : s.url_converter_scope
+ }, s.schema);
+
+ // Fix IE6SP2 flicker and check it failed for pre SP2
+ if (tinymce.isIE6) {
+ try {
+ d.execCommand('BackgroundImageCache', false, true);
+ } catch (e) {
+ t.cssFlicker = true;
+ }
+ }
+
+ t.fixDoc(d);
+ t.events = s.ownEvents ? new tinymce.dom.EventUtils(s.proxy) : tinymce.dom.Event;
+ tinymce.addUnload(t.destroy, t);
+ blockElementsMap = s.schema ? s.schema.getBlockElements() : {};
+
+ t.isBlock = function(node) {
+ // This function is called in module pattern style since it might be executed with the wrong this scope
+ var type = node.nodeType;
+
+ // If it's a node then check the type and use the nodeName
+ if (type)
+ return !!(type === 1 && blockElementsMap[node.nodeName]);
+
+ return !!blockElementsMap[node];
+ };
+ },
+
+ fixDoc: function(doc) {
+ var settings = this.settings, name;
+
+ if (isIE && settings.schema) {
+ // Add missing HTML 4/5 elements to IE
+ ('abbr article aside audio canvas ' +
+ 'details figcaption figure footer ' +
+ 'header hgroup mark menu meter nav ' +
+ 'output progress section summary ' +
+ 'time video').replace(/\w+/g, function(name) {
+ doc.createElement(name);
+ });
+
+ // Create all custom elements
+ for (name in settings.schema.getCustomElements()) {
+ doc.createElement(name);
+ }
+ }
+ },
+
+ clone: function(node, deep) {
+ var self = this, clone, doc;
+
+ // TODO: Add feature detection here in the future
+ if (!isIE || node.nodeType !== 1 || deep) {
+ return node.cloneNode(deep);
+ }
+
+ doc = self.doc;
+
+ // Make a HTML5 safe shallow copy
+ if (!deep) {
+ clone = doc.createElement(node.nodeName);
+
+ // Copy attribs
+ each(self.getAttribs(node), function(attr) {
+ self.setAttrib(clone, attr.nodeName, self.getAttrib(node, attr.nodeName));
+ });
+
+ return clone;
+ }
+/*
+ // Setup HTML5 patched document fragment
+ if (!self.frag) {
+ self.frag = doc.createDocumentFragment();
+ self.fixDoc(self.frag);
+ }
+
+ // Make a deep copy by adding it to the document fragment then removing it this removed the :section
+ clone = doc.createElement('div');
+ self.frag.appendChild(clone);
+ clone.innerHTML = node.outerHTML;
+ self.frag.removeChild(clone);
+*/
+ return clone.firstChild;
+ },
+
+ getRoot : function() {
+ var t = this, s = t.settings;
+
+ return (s && t.get(s.root_element)) || t.doc.body;
+ },
+
+ getViewPort : function(w) {
+ var d, b;
+
+ w = !w ? this.win : w;
+ d = w.document;
+ b = this.boxModel ? d.documentElement : d.body;
+
+ // Returns viewport size excluding scrollbars
+ return {
+ x : w.pageXOffset || b.scrollLeft,
+ y : w.pageYOffset || b.scrollTop,
+ w : w.innerWidth || b.clientWidth,
+ h : w.innerHeight || b.clientHeight
+ };
+ },
+
+ getRect : function(e) {
+ var p, t = this, sr;
+
+ e = t.get(e);
+ p = t.getPos(e);
+ sr = t.getSize(e);
+
+ return {
+ x : p.x,
+ y : p.y,
+ w : sr.w,
+ h : sr.h
+ };
+ },
+
+ getSize : function(e) {
+ var t = this, w, h;
+
+ e = t.get(e);
+ w = t.getStyle(e, 'width');
+ h = t.getStyle(e, 'height');
+
+ // Non pixel value, then force offset/clientWidth
+ if (w.indexOf('px') === -1)
+ w = 0;
+
+ // Non pixel value, then force offset/clientWidth
+ if (h.indexOf('px') === -1)
+ h = 0;
+
+ return {
+ w : parseInt(w, 10) || e.offsetWidth || e.clientWidth,
+ h : parseInt(h, 10) || e.offsetHeight || e.clientHeight
+ };
+ },
+
+ getParent : function(n, f, r) {
+ return this.getParents(n, f, r, false);
+ },
+
+ getParents : function(n, f, r, c) {
+ var t = this, na, se = t.settings, o = [];
+
+ n = t.get(n);
+ c = c === undefined;
+
+ if (se.strict_root)
+ r = r || t.getRoot();
+
+ // Wrap node name as func
+ if (is(f, 'string')) {
+ na = f;
+
+ if (f === '*') {
+ f = function(n) {return n.nodeType == 1;};
+ } else {
+ f = function(n) {
+ return t.is(n, na);
+ };
+ }
+ }
+
+ while (n) {
+ if (n == r || !n.nodeType || n.nodeType === 9)
+ break;
+
+ if (!f || f(n)) {
+ if (c)
+ o.push(n);
+ else
+ return n;
+ }
+
+ n = n.parentNode;
+ }
+
+ return c ? o : null;
+ },
+
+ get : function(e) {
+ var n;
+
+ if (e && this.doc && typeof(e) == 'string') {
+ n = e;
+ e = this.doc.getElementById(e);
+
+ // IE and Opera returns meta elements when they match the specified input ID, but getElementsByName seems to do the trick
+ if (e && e.id !== n)
+ return this.doc.getElementsByName(n)[1];
+ }
+
+ return e;
+ },
+
+ getNext : function(node, selector) {
+ return this._findSib(node, selector, 'nextSibling');
+ },
+
+ getPrev : function(node, selector) {
+ return this._findSib(node, selector, 'previousSibling');
+ },
+
+
+ select : function(pa, s) {
+ var t = this;
+
+ return tinymce.dom.Sizzle(pa, t.get(s) || t.get(t.settings.root_element) || t.doc, []);
+ },
+
+ is : function(n, selector) {
+ var i;
+
+ // If it isn't an array then try to do some simple selectors instead of Sizzle for to boost performance
+ if (n.length === undefined) {
+ // Simple all selector
+ if (selector === '*')
+ return n.nodeType == 1;
+
+ // Simple selector just elements
+ if (simpleSelectorRe.test(selector)) {
+ selector = selector.toLowerCase().split(/,/);
+ n = n.nodeName.toLowerCase();
+
+ for (i = selector.length - 1; i >= 0; i--) {
+ if (selector[i] == n)
+ return true;
+ }
+
+ return false;
+ }
+ }
+
+ return tinymce.dom.Sizzle.matches(selector, n.nodeType ? [n] : n).length > 0;
+ },
+
+
+ add : function(p, n, a, h, c) {
+ var t = this;
+
+ return this.run(p, function(p) {
+ var e, k;
+
+ e = is(n, 'string') ? t.doc.createElement(n) : n;
+ t.setAttribs(e, a);
+
+ if (h) {
+ if (h.nodeType)
+ e.appendChild(h);
+ else
+ t.setHTML(e, h);
+ }
+
+ return !c ? p.appendChild(e) : e;
+ });
+ },
+
+ create : function(n, a, h) {
+ return this.add(this.doc.createElement(n), n, a, h, 1);
+ },
+
+ createHTML : function(n, a, h) {
+ var o = '', t = this, k;
+
+ o += '<' + n;
+
+ for (k in a) {
+ if (a.hasOwnProperty(k))
+ o += ' ' + k + '="' + t.encode(a[k]) + '"';
+ }
+
+ // A call to tinymce.is doesn't work for some odd reason on IE9 possible bug inside their JS runtime
+ if (typeof(h) != "undefined")
+ return o + '>' + h + '</' + n + '>';
+
+ return o + ' />';
+ },
+
+ remove : function(node, keep_children) {
+ return this.run(node, function(node) {
+ var child, parent = node.parentNode;
+
+ if (!parent)
+ return null;
+
+ if (keep_children) {
+ while (child = node.firstChild) {
+ // IE 8 will crash if you don't remove completely empty text nodes
+ if (!tinymce.isIE || child.nodeType !== 3 || child.nodeValue)
+ parent.insertBefore(child, node);
+ else
+ node.removeChild(child);
+ }
+ }
+
+ return parent.removeChild(node);
+ });
+ },
+
+ setStyle : function(n, na, v) {
+ var t = this;
+
+ return t.run(n, function(e) {
+ var s, i;
+
+ s = e.style;
+
+ // Camelcase it, if needed
+ na = na.replace(/-(\D)/g, function(a, b){
+ return b.toUpperCase();
+ });
+
+ // Default px suffix on these
+ if (t.pixelStyles.test(na) && (tinymce.is(v, 'number') || /^[\-0-9\.]+$/.test(v)))
+ v += 'px';
+
+ switch (na) {
+ case 'opacity':
+ // IE specific opacity
+ if (isIE) {
+ s.filter = v === '' ? '' : "alpha(opacity=" + (v * 100) + ")";
+
+ if (!n.currentStyle || !n.currentStyle.hasLayout)
+ s.display = 'inline-block';
+ }
+
+ // Fix for older browsers
+ s[na] = s['-moz-opacity'] = s['-khtml-opacity'] = v || '';
+ break;
+
+ case 'float':
+ isIE ? s.styleFloat = v : s.cssFloat = v;
+ break;
+
+ default:
+ s[na] = v || '';
+ }
+
+ // Force update of the style data
+ if (t.settings.update_styles)
+ t.setAttrib(e, 'data-mce-style');
+ });
+ },
+
+ getStyle : function(n, na, c) {
+ n = this.get(n);
+
+ if (!n)
+ return;
+
+ // Gecko
+ if (this.doc.defaultView && c) {
+ // Remove camelcase
+ na = na.replace(/[A-Z]/g, function(a){
+ return '-' + a;
+ });
+
+ try {
+ return this.doc.defaultView.getComputedStyle(n, null).getPropertyValue(na);
+ } catch (ex) {
+ // Old safari might fail
+ return null;
+ }
+ }
+
+ // Camelcase it, if needed
+ na = na.replace(/-(\D)/g, function(a, b){
+ return b.toUpperCase();
+ });
+
+ if (na == 'float')
+ na = isIE ? 'styleFloat' : 'cssFloat';
+
+ // IE & Opera
+ if (n.currentStyle && c)
+ return n.currentStyle[na];
+
+ return n.style ? n.style[na] : undefined;
+ },
+
+ setStyles : function(e, o) {
+ var t = this, s = t.settings, ol;
+
+ ol = s.update_styles;
+ s.update_styles = 0;
+
+ each(o, function(v, n) {
+ t.setStyle(e, n, v);
+ });
+
+ // Update style info
+ s.update_styles = ol;
+ if (s.update_styles)
+ t.setAttrib(e, s.cssText);
+ },
+
+ removeAllAttribs: function(e) {
+ return this.run(e, function(e) {
+ var i, attrs = e.attributes;
+ for (i = attrs.length - 1; i >= 0; i--) {
+ e.removeAttributeNode(attrs.item(i));
+ }
+ });
+ },
+
+ setAttrib : function(e, n, v) {
+ var t = this;
+
+ // Whats the point
+ if (!e || !n)
+ return;
+
+ // Strict XML mode
+ if (t.settings.strict)
+ n = n.toLowerCase();
+
+ return this.run(e, function(e) {
+ var s = t.settings;
+ var originalValue = e.getAttribute(n);
+ if (v !== null) {
+ switch (n) {
+ case "style":
+ if (!is(v, 'string')) {
+ each(v, function(v, n) {
+ t.setStyle(e, n, v);
+ });
+
+ return;
+ }
+
+ // No mce_style for elements with these since they might get resized by the user
+ if (s.keep_values) {
+ if (v && !t._isRes(v))
+ e.setAttribute('data-mce-style', v, 2);
+ else
+ e.removeAttribute('data-mce-style', 2);
+ }
+
+ e.style.cssText = v;
+ break;
+
+ case "class":
+ e.className = v || ''; // Fix IE null bug
+ break;
+
+ case "src":
+ case "href":
+ if (s.keep_values) {
+ if (s.url_converter)
+ v = s.url_converter.call(s.url_converter_scope || t, v, n, e);
+
+ t.setAttrib(e, 'data-mce-' + n, v, 2);
+ }
+
+ break;
+
+ case "shape":
+ e.setAttribute('data-mce-style', v);
+ break;
+ }
+ }
+ if (is(v) && v !== null && v.length !== 0)
+ e.setAttribute(n, '' + v, 2);
+ else
+ e.removeAttribute(n, 2);
+
+ // fire onChangeAttrib event for attributes that have changed
+ if (tinyMCE.activeEditor && originalValue != v) {
+ var ed = tinyMCE.activeEditor;
+ ed.onSetAttrib.dispatch(ed, e, n, v);
+ }
+ });
+ },
+
+ setAttribs : function(e, o) {
+ var t = this;
+
+ return this.run(e, function(e) {
+ each(o, function(v, n) {
+ t.setAttrib(e, n, v);
+ });
+ });
+ },
+
+ getAttrib : function(e, n, dv) {
+ var v, t = this, undef;
+
+ e = t.get(e);
+
+ if (!e || e.nodeType !== 1)
+ return dv === undef ? false : dv;
+
+ if (!is(dv))
+ dv = '';
+
+ // Try the mce variant for these
+ if (/^(src|href|style|coords|shape)$/.test(n)) {
+ v = e.getAttribute("data-mce-" + n);
+
+ if (v)
+ return v;
+ }
+
+ if (isIE && t.props[n]) {
+ v = e[t.props[n]];
+ v = v && v.nodeValue ? v.nodeValue : v;
+ }
+
+ if (!v)
+ v = e.getAttribute(n, 2);
+
+ // Check boolean attribs
+ if (/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(n)) {
+ if (e[t.props[n]] === true && v === '')
+ return n;
+
+ return v ? n : '';
+ }
+
+ // Inner input elements will override attributes on form elements
+ if (e.nodeName === "FORM" && e.getAttributeNode(n))
+ return e.getAttributeNode(n).nodeValue;
+
+ if (n === 'style') {
+ v = v || e.style.cssText;
+
+ if (v) {
+ v = t.serializeStyle(t.parseStyle(v), e.nodeName);
+
+ if (t.settings.keep_values && !t._isRes(v))
+ e.setAttribute('data-mce-style', v);
+ }
+ }
+
+ // Remove Apple and WebKit stuff
+ if (isWebKit && n === "class" && v)
+ v = v.replace(/(apple|webkit)\-[a-z\-]+/gi, '');
+
+ // Handle IE issues
+ if (isIE) {
+ switch (n) {
+ case 'rowspan':
+ case 'colspan':
+ // IE returns 1 as default value
+ if (v === 1)
+ v = '';
+
+ break;
+
+ case 'size':
+ // IE returns +0 as default value for size
+ if (v === '+0' || v === 20 || v === 0)
+ v = '';
+
+ break;
+
+ case 'width':
+ case 'height':
+ case 'vspace':
+ case 'checked':
+ case 'disabled':
+ case 'readonly':
+ if (v === 0)
+ v = '';
+
+ break;
+
+ case 'hspace':
+ // IE returns -1 as default value
+ if (v === -1)
+ v = '';
+
+ break;
+
+ case 'maxlength':
+ case 'tabindex':
+ // IE returns default value
+ if (v === 32768 || v === 2147483647 || v === '32768')
+ v = '';
+
+ break;
+
+ case 'multiple':
+ case 'compact':
+ case 'noshade':
+ case 'nowrap':
+ if (v === 65535)
+ return n;
+
+ return dv;
+
+ case 'shape':
+ v = v.toLowerCase();
+ break;
+
+ default:
+ // IE has odd anonymous function for event attributes
+ if (n.indexOf('on') === 0 && v)
+ v = tinymce._replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/, '$1', '' + v);
+ }
+ }
+
+ return (v !== undef && v !== null && v !== '') ? '' + v : dv;
+ },
+
+ getPos : function(n, ro) {
+ var t = this, x = 0, y = 0, e, d = t.doc, r;
+
+ n = t.get(n);
+ ro = ro || d.body;
+
+ if (n) {
+ // Use getBoundingClientRect if it exists since it's faster than looping offset nodes
+ if (n.getBoundingClientRect) {
+ n = n.getBoundingClientRect();
+ e = t.boxModel ? d.documentElement : d.body;
+
+ // Add scroll offsets from documentElement or body since IE with the wrong box model will use d.body and so do WebKit
+ // Also remove the body/documentelement clientTop/clientLeft on IE 6, 7 since they offset the position
+ x = n.left + (d.documentElement.scrollLeft || d.body.scrollLeft) - e.clientTop;
+ y = n.top + (d.documentElement.scrollTop || d.body.scrollTop) - e.clientLeft;
+
+ return {x : x, y : y};
+ }
+
+ r = n;
+ while (r && r != ro && r.nodeType) {
+ x += r.offsetLeft || 0;
+ y += r.offsetTop || 0;
+ r = r.offsetParent;
+ }
+
+ r = n.parentNode;
+ while (r && r != ro && r.nodeType) {
+ x -= r.scrollLeft || 0;
+ y -= r.scrollTop || 0;
+ r = r.parentNode;
+ }
+ }
+
+ return {x : x, y : y};
+ },
+
+ parseStyle : function(st) {
+ return this.styles.parse(st);
+ },
+
+ serializeStyle : function(o, name) {
+ return this.styles.serialize(o, name);
+ },
+
+ addStyle: function(cssText) {
+ var doc = this.doc, head;
+
+ // Create style element if needed
+ styleElm = doc.getElementById('mceDefaultStyles');
+ if (!styleElm) {
+ styleElm = doc.createElement('style'),
+ styleElm.id = 'mceDefaultStyles';
+ styleElm.type = 'text/css';
+
+ head = doc.getElementsByTagName('head')[0];
+ if (head.firstChild) {
+ head.insertBefore(styleElm, head.firstChild);
+ } else {
+ head.appendChild(styleElm);
+ }
+ }
+
+ // Append style data to old or new style element
+ if (styleElm.styleSheet) {
+ styleElm.styleSheet.cssText += cssText;
+ } else {
+ styleElm.appendChild(doc.createTextNode(cssText));
+ }
+ },
+
+ loadCSS : function(u) {
+ var t = this, d = t.doc, head;
+
+ if (!u)
+ u = '';
+
+ head = d.getElementsByTagName('head')[0];
+
+ each(u.split(','), function(u) {
+ var link;
+
+ if (t.files[u])
+ return;
+
+ t.files[u] = true;
+ link = t.create('link', {rel : 'stylesheet', href : tinymce._addVer(u)});
+
+ // IE 8 has a bug where dynamically loading stylesheets would produce a 1 item remaining bug
+ // This fix seems to resolve that issue by realcing the document ones a stylesheet finishes loading
+ // It's ugly but it seems to work fine.
+ if (isIE && d.documentMode && d.recalc) {
+ link.onload = function() {
+ if (d.recalc)
+ d.recalc();
+
+ link.onload = null;
+ };
+ }
+
+ head.appendChild(link);
+ });
+ },
+
+ addClass : function(e, c) {
+ return this.run(e, function(e) {
+ var o;
+
+ if (!c)
+ return 0;
+
+ if (this.hasClass(e, c))
+ return e.className;
+
+ o = this.removeClass(e, c);
+
+ return e.className = (o != '' ? (o + ' ') : '') + c;
+ });
+ },
+
+ removeClass : function(e, c) {
+ var t = this, re;
+
+ return t.run(e, function(e) {
+ var v;
+
+ if (t.hasClass(e, c)) {
+ if (!re)
+ re = new RegExp("(^|\\s+)" + c + "(\\s+|$)", "g");
+
+ v = e.className.replace(re, ' ');
+ v = tinymce.trim(v != ' ' ? v : '');
+
+ e.className = v;
+
+ // Empty class attr
+ if (!v) {
+ e.removeAttribute('class');
+ e.removeAttribute('className');
+ }
+
+ return v;
+ }
+
+ return e.className;
+ });
+ },
+
+ hasClass : function(n, c) {
+ n = this.get(n);
+
+ if (!n || !c)
+ return false;
+
+ return (' ' + n.className + ' ').indexOf(' ' + c + ' ') !== -1;
+ },
+
+ show : function(e) {
+ return this.setStyle(e, 'display', 'block');
+ },
+
+ hide : function(e) {
+ return this.setStyle(e, 'display', 'none');
+ },
+
+ isHidden : function(e) {
+ e = this.get(e);
+
+ return !e || e.style.display == 'none' || this.getStyle(e, 'display') == 'none';
+ },
+
+ uniqueId : function(p) {
+ return (!p ? 'mce_' : p) + (this.counter++);
+ },
+
+ setHTML : function(element, html) {
+ var self = this;
+
+ return self.run(element, function(element) {
+ if (isIE) {
+ // Remove all child nodes, IE keeps empty text nodes in DOM
+ while (element.firstChild)
+ element.removeChild(element.firstChild);
+
+ try {
+ // IE will remove comments from the beginning
+ // unless you padd the contents with something
+ element.innerHTML = '<br />' + html;
+ element.removeChild(element.firstChild);
+ } catch (ex) {
+ // IE sometimes produces an unknown runtime error on innerHTML if it's an block element within a block element for example a div inside a p
+ // This seems to fix this problem
+
+ // Create new div with HTML contents and a BR infront to keep comments
+ var newElement = self.create('div');
+ newElement.innerHTML = '<br />' + html;
+
+ // Add all children from div to target
+ each (tinymce.grep(newElement.childNodes), function(node, i) {
+ // Skip br element
+ if (i && element.canHaveHTML)
+ element.appendChild(node);
+ });
+ }
+ } else
+ element.innerHTML = html;
+
+ return html;
+ });
+ },
+
+ getOuterHTML : function(elm) {
+ var doc, self = this;
+
+ elm = self.get(elm);
+
+ if (!elm)
+ return null;
+
+ if (elm.nodeType === 1 && self.hasOuterHTML)
+ return elm.outerHTML;
+
+ doc = (elm.ownerDocument || self.doc).createElement("body");
+ doc.appendChild(elm.cloneNode(true));
+
+ return doc.innerHTML;
+ },
+
+ setOuterHTML : function(e, h, d) {
+ var t = this;
+
+ function setHTML(e, h, d) {
+ var n, tp;
+
+ tp = d.createElement("body");
+ tp.innerHTML = h;
+
+ n = tp.lastChild;
+ while (n) {
+ t.insertAfter(n.cloneNode(true), e);
+ n = n.previousSibling;
+ }
+
+ t.remove(e);
+ };
+
+ return this.run(e, function(e) {
+ e = t.get(e);
+
+ // Only set HTML on elements
+ if (e.nodeType == 1) {
+ d = d || e.ownerDocument || t.doc;
+
+ if (isIE) {
+ try {
+ // Try outerHTML for IE it sometimes produces an unknown runtime error
+ if (isIE && e.nodeType == 1)
+ e.outerHTML = h;
+ else
+ setHTML(e, h, d);
+ } catch (ex) {
+ // Fix for unknown runtime error
+ setHTML(e, h, d);
+ }
+ } else
+ setHTML(e, h, d);
+ }
+ });
+ },
+
+ decode : Entities.decode,
+
+ encode : Entities.encodeAllRaw,
+
+ insertAfter : function(node, reference_node) {
+ reference_node = this.get(reference_node);
+
+ return this.run(node, function(node) {
+ var parent, nextSibling;
+
+ parent = reference_node.parentNode;
+ nextSibling = reference_node.nextSibling;
+
+ if (nextSibling)
+ parent.insertBefore(node, nextSibling);
+ else
+ parent.appendChild(node);
+
+ return node;
+ });
+ },
+
+ replace : function(n, o, k) {
+ var t = this;
+
+ if (is(o, 'array'))
+ n = n.cloneNode(true);
+
+ return t.run(o, function(o) {
+ if (k) {
+ each(tinymce.grep(o.childNodes), function(c) {
+ n.appendChild(c);
+ });
+ }
+
+ return o.parentNode.replaceChild(n, o);
+ });
+ },
+
+ rename : function(elm, name) {
+ var t = this, newElm;
+
+ if (elm.nodeName != name.toUpperCase()) {
+ // Rename block element
+ newElm = t.create(name);
+
+ // Copy attribs to new block
+ each(t.getAttribs(elm), function(attr_node) {
+ t.setAttrib(newElm, attr_node.nodeName, t.getAttrib(elm, attr_node.nodeName));
+ });
+
+ // Replace block
+ t.replace(newElm, elm, 1);
+ }
+
+ return newElm || elm;
+ },
+
+ findCommonAncestor : function(a, b) {
+ var ps = a, pe;
+
+ while (ps) {
+ pe = b;
+
+ while (pe && ps != pe)
+ pe = pe.parentNode;
+
+ if (ps == pe)
+ break;
+
+ ps = ps.parentNode;
+ }
+
+ if (!ps && a.ownerDocument)
+ return a.ownerDocument.documentElement;
+
+ return ps;
+ },
+
+ toHex : function(s) {
+ var c = /^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(s);
+
+ function hex(s) {
+ s = parseInt(s, 10).toString(16);
+
+ return s.length > 1 ? s : '0' + s; // 0 -> 00
+ };
+
+ if (c) {
+ s = '#' + hex(c[1]) + hex(c[2]) + hex(c[3]);
+
+ return s;
+ }
+
+ return s;
+ },
+
+ getClasses : function() {
+ var t = this, cl = [], i, lo = {}, f = t.settings.class_filter, ov;
+
+ if (t.classes)
+ return t.classes;
+
+ function addClasses(s) {
+ // IE style imports
+ each(s.imports, function(r) {
+ addClasses(r);
+ });
+
+ each(s.cssRules || s.rules, function(r) {
+ // Real type or fake it on IE
+ switch (r.type || 1) {
+ // Rule
+ case 1:
+ if (r.selectorText) {
+ each(r.selectorText.split(','), function(v) {
+ v = v.replace(/^\s*|\s*$|^\s\./g, "");
+
+ // Is internal or it doesn't contain a class
+ if (/\.mce/.test(v) || !/\.[\w\-]+$/.test(v))
+ return;
+
+ // Remove everything but class name
+ ov = v;
+ v = tinymce._replace(/.*\.([a-z0-9_\-]+).*/i, '$1', v);
+
+ // Filter classes
+ if (f && !(v = f(v, ov)))
+ return;
+
+ if (!lo[v]) {
+ cl.push({'class' : v});
+ lo[v] = 1;
+ }
+ });
+ }
+ break;
+
+ // Import
+ case 3:
+ addClasses(r.styleSheet);
+ break;
+ }
+ });
+ };
+
+ try {
+ each(t.doc.styleSheets, addClasses);
+ } catch (ex) {
+ // Ignore
+ }
+
+ if (cl.length > 0)
+ t.classes = cl;
+
+ return cl;
+ },
+
+ run : function(e, f, s) {
+ var t = this, o;
+
+ if (t.doc && typeof(e) === 'string')
+ e = t.get(e);
+
+ if (!e)
+ return false;
+
+ s = s || this;
+ if (!e.nodeType && (e.length || e.length === 0)) {
+ o = [];
+
+ each(e, function(e, i) {
+ if (e) {
+ if (typeof(e) == 'string')
+ e = t.doc.getElementById(e);
+
+ o.push(f.call(s, e, i));
+ }
+ });
+
+ return o;
+ }
+
+ return f.call(s, e);
+ },
+
+ getAttribs : function(n) {
+ var o;
+
+ n = this.get(n);
+
+ if (!n)
+ return [];
+
+ if (isIE) {
+ o = [];
+
+ // Object will throw exception in IE
+ if (n.nodeName == 'OBJECT')
+ return n.attributes;
+
+ // IE doesn't keep the selected attribute if you clone option elements
+ if (n.nodeName === 'OPTION' && this.getAttrib(n, 'selected'))
+ o.push({specified : 1, nodeName : 'selected'});
+
+ // It's crazy that this is faster in IE but it's because it returns all attributes all the time
+ n.cloneNode(false).outerHTML.replace(/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi, '').replace(/[\w:\-]+/gi, function(a) {
+ o.push({specified : 1, nodeName : a});
+ });
+
+ return o;
+ }
+
+ return n.attributes;
+ },
+
+ isEmpty : function(node, elements) {
+ var self = this, i, attributes, type, walker, name, brCount = 0;
+
+ node = node.firstChild;
+ if (node) {
+ walker = new tinymce.dom.TreeWalker(node, node.parentNode);
+ elements = elements || self.schema ? self.schema.getNonEmptyElements() : null;
+
+ do {
+ type = node.nodeType;
+
+ if (type === 1) {
+ // Ignore bogus elements
+ if (node.getAttribute('data-mce-bogus'))
+ continue;
+
+ // Keep empty elements like <img />
+ name = node.nodeName.toLowerCase();
+ if (elements && elements[name]) {
+ // Ignore single BR elements in blocks like <p><br /></p> or <p><span><br /></span></p>
+ if (name === 'br') {
+ brCount++;
+ continue;
+ }
+
+ return false;
+ }
+
+ // Keep elements with data-bookmark attributes or name attribute like <a name="1"></a>
+ attributes = self.getAttribs(node);
+ i = node.attributes.length;
+ while (i--) {
+ name = node.attributes[i].nodeName;
+ if (name === "name" || name === 'data-mce-bookmark')
+ return false;
+ }
+ }
+
+ // Keep comment nodes
+ if (type == 8)
+ return false;
+
+ // Keep non whitespace text nodes
+ if ((type === 3 && !whiteSpaceRegExp.test(node.nodeValue)))
+ return false;
+ } while (node = walker.next());
+ }
+
+ return brCount <= 1;
+ },
+
+ destroy : function(s) {
+ var t = this;
+
+ t.win = t.doc = t.root = t.events = t.frag = null;
+
+ // Manual destroy then remove unload handler
+ if (!s)
+ tinymce.removeUnload(t.destroy);
+ },
+
+ createRng : function() {
+ var d = this.doc;
+
+ return d.createRange ? d.createRange() : new tinymce.dom.Range(this);
+ },
+
+ nodeIndex : function(node, normalized) {
+ var idx = 0, lastNodeType, lastNode, nodeType;
+
+ if (node) {
+ for (lastNodeType = node.nodeType, node = node.previousSibling, lastNode = node; node; node = node.previousSibling) {
+ nodeType = node.nodeType;
+
+ // Normalize text nodes
+ if (normalized && nodeType == 3) {
+ if (nodeType == lastNodeType || !node.nodeValue.length)
+ continue;
+ }
+ idx++;
+ lastNodeType = nodeType;
+ }
+ }
+
+ return idx;
+ },
+
+ split : function(pe, e, re) {
+ var t = this, r = t.createRng(), bef, aft, pa;
+
+ // W3C valid browsers tend to leave empty nodes to the left/right side of the contents, this makes sense
+ // but we don't want that in our code since it serves no purpose for the end user
+ // For example if this is chopped:
+ // <p>text 1<span><b>CHOP</b></span>text 2</p>
+ // would produce:
+ // <p>text 1<span></span></p><b>CHOP</b><p><span></span>text 2</p>
+ // this function will then trim of empty edges and produce:
+ // <p>text 1</p><b>CHOP</b><p>text 2</p>
+ function trim(node) {
+ var i, children = node.childNodes, type = node.nodeType;
+
+ function surroundedBySpans(node) {
+ var previousIsSpan = node.previousSibling && node.previousSibling.nodeName == 'SPAN';
+ var nextIsSpan = node.nextSibling && node.nextSibling.nodeName == 'SPAN';
+ return previousIsSpan && nextIsSpan;
+ }
+
+ if (type == 1 && node.getAttribute('data-mce-type') == 'bookmark')
+ return;
+
+ for (i = children.length - 1; i >= 0; i--)
+ trim(children[i]);
+
+ if (type != 9) {
+ // Keep non whitespace text nodes
+ if (type == 3 && node.nodeValue.length > 0) {
+ // If parent element isn't a block or there isn't any useful contents for example "<p> </p>"
+ // Also keep text nodes with only spaces if surrounded by spans.
+ // eg. "<p><span>a</span> <span>b</span></p>" should keep space between a and b
+ var trimmedLength = tinymce.trim(node.nodeValue).length;
+ if (!t.isBlock(node.parentNode) || trimmedLength > 0 || trimmedLength === 0 && surroundedBySpans(node))
+ return;
+ } else if (type == 1) {
+ // If the only child is a bookmark then move it up
+ children = node.childNodes;
+ if (children.length == 1 && children[0] && children[0].nodeType == 1 && children[0].getAttribute('data-mce-type') == 'bookmark')
+ node.parentNode.insertBefore(children[0], node);
+
+ // Keep non empty elements or img, hr etc
+ if (children.length || /^(br|hr|input|img)$/i.test(node.nodeName))
+ return;
+ }
+
+ t.remove(node);
+ }
+
+ return node;
+ };
+
+ if (pe && e) {
+ // Get before chunk
+ r.setStart(pe.parentNode, t.nodeIndex(pe));
+ r.setEnd(e.parentNode, t.nodeIndex(e));
+ bef = r.extractContents();
+
+ // Get after chunk
+ r = t.createRng();
+ r.setStart(e.parentNode, t.nodeIndex(e) + 1);
+ r.setEnd(pe.parentNode, t.nodeIndex(pe) + 1);
+ aft = r.extractContents();
+
+ // Insert before chunk
+ pa = pe.parentNode;
+ pa.insertBefore(trim(bef), pe);
+
+ // Insert middle chunk
+ if (re)
+ pa.replaceChild(re, e);
+ else
+ pa.insertBefore(e, pe);
+
+ // Insert after chunk
+ pa.insertBefore(trim(aft), pe);
+ t.remove(pe);
+
+ return re || e;
+ }
+ },
+
+ bind : function(target, name, func, scope) {
+ return this.events.add(target, name, func, scope || this);
+ },
+
+ unbind : function(target, name, func) {
+ return this.events.remove(target, name, func);
+ },
+
+ fire : function(target, name, evt) {
+ return this.events.fire(target, name, evt);
+ },
+
+ // Returns the content editable state of a node
+ getContentEditable: function(node) {
+ var contentEditable;
+
+ // Check type
+ if (node.nodeType != 1) {
+ return null;
+ }
+
+ // Check for fake content editable
+ contentEditable = node.getAttribute("data-mce-contenteditable");
+ if (contentEditable && contentEditable !== "inherit") {
+ return contentEditable;
+ }
+
+ // Check for real content editable
+ return node.contentEditable !== "inherit" ? node.contentEditable : null;
+ },
+
+
+ _findSib : function(node, selector, name) {
+ var t = this, f = selector;
+
+ if (node) {
+ // If expression make a function of it using is
+ if (is(f, 'string')) {
+ f = function(node) {
+ return t.is(node, selector);
+ };
+ }
+
+ // Loop all siblings
+ for (node = node[name]; node; node = node[name]) {
+ if (f(node))
+ return node;
+ }
+ }
+
+ return null;
+ },
+
+ _isRes : function(c) {
+ // Is live resizble element
+ return /^(top|left|bottom|right|width|height)/i.test(c) || /;\s*(top|left|bottom|right|width|height)/i.test(c);
+ }
+
+ /*
+ walk : function(n, f, s) {
+ var d = this.doc, w;
+
+ if (d.createTreeWalker) {
+ w = d.createTreeWalker(n, NodeFilter.SHOW_TEXT, null, false);
+
+ while ((n = w.nextNode()) != null)
+ f.call(s || this, n);
+ } else
+ tinymce.walk(n, f, 'childNodes', s);
+ }
+ */
+
+ /*
+ toRGB : function(s) {
+ var c = /^\s*?#([0-9A-F]{2})([0-9A-F]{1,2})([0-9A-F]{2})?\s*?$/.exec(s);
+
+ if (c) {
+ // #FFF -> #FFFFFF
+ if (!is(c[3]))
+ c[3] = c[2] = c[1];
+
+ return "rgb(" + parseInt(c[1], 16) + "," + parseInt(c[2], 16) + "," + parseInt(c[3], 16) + ")";
+ }
+
+ return s;
+ }
+ */
+ });
+
+ tinymce.DOM = new tinymce.dom.DOMUtils(document, {process_html : 0});
+})(tinymce);
+
+(function(ns) {
+ // Range constructor
+ function Range(dom) {
+ var t = this,
+ doc = dom.doc,
+ EXTRACT = 0,
+ CLONE = 1,
+ DELETE = 2,
+ TRUE = true,
+ FALSE = false,
+ START_OFFSET = 'startOffset',
+ START_CONTAINER = 'startContainer',
+ END_CONTAINER = 'endContainer',
+ END_OFFSET = 'endOffset',
+ extend = tinymce.extend,
+ nodeIndex = dom.nodeIndex;
+
+ extend(t, {
+ // Inital states
+ startContainer : doc,
+ startOffset : 0,
+ endContainer : doc,
+ endOffset : 0,
+ collapsed : TRUE,
+ commonAncestorContainer : doc,
+
+ // Range constants
+ START_TO_START : 0,
+ START_TO_END : 1,
+ END_TO_END : 2,
+ END_TO_START : 3,
+
+ // Public methods
+ setStart : setStart,
+ setEnd : setEnd,
+ setStartBefore : setStartBefore,
+ setStartAfter : setStartAfter,
+ setEndBefore : setEndBefore,
+ setEndAfter : setEndAfter,
+ collapse : collapse,
+ selectNode : selectNode,
+ selectNodeContents : selectNodeContents,
+ compareBoundaryPoints : compareBoundaryPoints,
+ deleteContents : deleteContents,
+ extractContents : extractContents,
+ cloneContents : cloneContents,
+ insertNode : insertNode,
+ surroundContents : surroundContents,
+ cloneRange : cloneRange,
+ toStringIE : toStringIE
+ });
+
+ function createDocumentFragment() {
+ return doc.createDocumentFragment();
+ };
+
+ function setStart(n, o) {
+ _setEndPoint(TRUE, n, o);
+ };
+
+ function setEnd(n, o) {
+ _setEndPoint(FALSE, n, o);
+ };
+
+ function setStartBefore(n) {
+ setStart(n.parentNode, nodeIndex(n));
+ };
+
+ function setStartAfter(n) {
+ setStart(n.parentNode, nodeIndex(n) + 1);
+ };
+
+ function setEndBefore(n) {
+ setEnd(n.parentNode, nodeIndex(n));
+ };
+
+ function setEndAfter(n) {
+ setEnd(n.parentNode, nodeIndex(n) + 1);
+ };
+
+ function collapse(ts) {
+ if (ts) {
+ t[END_CONTAINER] = t[START_CONTAINER];
+ t[END_OFFSET] = t[START_OFFSET];
+ } else {
+ t[START_CONTAINER] = t[END_CONTAINER];
+ t[START_OFFSET] = t[END_OFFSET];
+ }
+
+ t.collapsed = TRUE;
+ };
+
+ function selectNode(n) {
+ setStartBefore(n);
+ setEndAfter(n);
+ };
+
+ function selectNodeContents(n) {
+ setStart(n, 0);
+ setEnd(n, n.nodeType === 1 ? n.childNodes.length : n.nodeValue.length);
+ };
+
+ function compareBoundaryPoints(h, r) {
+ var sc = t[START_CONTAINER], so = t[START_OFFSET], ec = t[END_CONTAINER], eo = t[END_OFFSET],
+ rsc = r.startContainer, rso = r.startOffset, rec = r.endContainer, reo = r.endOffset;
+
+ // Check START_TO_START
+ if (h === 0)
+ return _compareBoundaryPoints(sc, so, rsc, rso);
+
+ // Check START_TO_END
+ if (h === 1)
+ return _compareBoundaryPoints(ec, eo, rsc, rso);
+
+ // Check END_TO_END
+ if (h === 2)
+ return _compareBoundaryPoints(ec, eo, rec, reo);
+
+ // Check END_TO_START
+ if (h === 3)
+ return _compareBoundaryPoints(sc, so, rec, reo);
+ };
+
+ function deleteContents() {
+ _traverse(DELETE);
+ };
+
+ function extractContents() {
+ return _traverse(EXTRACT);
+ };
+
+ function cloneContents() {
+ return _traverse(CLONE);
+ };
+
+ function insertNode(n) {
+ var startContainer = this[START_CONTAINER],
+ startOffset = this[START_OFFSET], nn, o;
+
+ // Node is TEXT_NODE or CDATA
+ if ((startContainer.nodeType === 3 || startContainer.nodeType === 4) && startContainer.nodeValue) {
+ if (!startOffset) {
+ // At the start of text
+ startContainer.parentNode.insertBefore(n, startContainer);
+ } else if (startOffset >= startContainer.nodeValue.length) {
+ // At the end of text
+ dom.insertAfter(n, startContainer);
+ } else {
+ // Middle, need to split
+ nn = startContainer.splitText(startOffset);
+ startContainer.parentNode.insertBefore(n, nn);
+ }
+ } else {
+ // Insert element node
+ if (startContainer.childNodes.length > 0)
+ o = startContainer.childNodes[startOffset];
+
+ if (o)
+ startContainer.insertBefore(n, o);
+ else
+ startContainer.appendChild(n);
+ }
+ };
+
+ function surroundContents(n) {
+ var f = t.extractContents();
+
+ t.insertNode(n);
+ n.appendChild(f);
+ t.selectNode(n);
+ };
+
+ function cloneRange() {
+ return extend(new Range(dom), {
+ startContainer : t[START_CONTAINER],
+ startOffset : t[START_OFFSET],
+ endContainer : t[END_CONTAINER],
+ endOffset : t[END_OFFSET],
+ collapsed : t.collapsed,
+ commonAncestorContainer : t.commonAncestorContainer
+ });
+ };
+
+ // Private methods
+
+ function _getSelectedNode(container, offset) {
+ var child;
+
+ if (container.nodeType == 3 /* TEXT_NODE */)
+ return container;
+
+ if (offset < 0)
+ return container;
+
+ child = container.firstChild;
+ while (child && offset > 0) {
+ --offset;
+ child = child.nextSibling;
+ }
+
+ if (child)
+ return child;
+
+ return container;
+ };
+
+ function _isCollapsed() {
+ return (t[START_CONTAINER] == t[END_CONTAINER] && t[START_OFFSET] == t[END_OFFSET]);
+ };
+
+ function _compareBoundaryPoints(containerA, offsetA, containerB, offsetB) {
+ var c, offsetC, n, cmnRoot, childA, childB;
+
+ // In the first case the boundary-points have the same container. A is before B
+ // if its offset is less than the offset of B, A is equal to B if its offset is
+ // equal to the offset of B, and A is after B if its offset is greater than the
+ // offset of B.
+ if (containerA == containerB) {
+ if (offsetA == offsetB)
+ return 0; // equal
+
+ if (offsetA < offsetB)
+ return -1; // before
+
+ return 1; // after
+ }
+
+ // In the second case a child node C of the container of A is an ancestor
+ // container of B. In this case, A is before B if the offset of A is less than or
+ // equal to the index of the child node C and A is after B otherwise.
+ c = containerB;
+ while (c && c.parentNode != containerA)
+ c = c.parentNode;
+
+ if (c) {
+ offsetC = 0;
+ n = containerA.firstChild;
+
+ while (n != c && offsetC < offsetA) {
+ offsetC++;
+ n = n.nextSibling;
+ }
+
+ if (offsetA <= offsetC)
+ return -1; // before
+
+ return 1; // after
+ }
+
+ // In the third case a child node C of the container of B is an ancestor container
+ // of A. In this case, A is before B if the index of the child node C is less than
+ // the offset of B and A is after B otherwise.
+ c = containerA;
+ while (c && c.parentNode != containerB) {
+ c = c.parentNode;
+ }
+
+ if (c) {
+ offsetC = 0;
+ n = containerB.firstChild;
+
+ while (n != c && offsetC < offsetB) {
+ offsetC++;
+ n = n.nextSibling;
+ }
+
+ if (offsetC < offsetB)
+ return -1; // before
+
+ return 1; // after
+ }
+
+ // In the fourth case, none of three other cases hold: the containers of A and B
+ // are siblings or descendants of sibling nodes. In this case, A is before B if
+ // the container of A is before the container of B in a pre-order traversal of the
+ // Ranges' context tree and A is after B otherwise.
+ cmnRoot = dom.findCommonAncestor(containerA, containerB);
+ childA = containerA;
+
+ while (childA && childA.parentNode != cmnRoot)
+ childA = childA.parentNode;
+
+ if (!childA)
+ childA = cmnRoot;
+
+ childB = containerB;
+ while (childB && childB.parentNode != cmnRoot)
+ childB = childB.parentNode;
+
+ if (!childB)
+ childB = cmnRoot;
+
+ if (childA == childB)
+ return 0; // equal
+
+ n = cmnRoot.firstChild;
+ while (n) {
+ if (n == childA)
+ return -1; // before
+
+ if (n == childB)
+ return 1; // after
+
+ n = n.nextSibling;
+ }
+ };
+
+ function _setEndPoint(st, n, o) {
+ var ec, sc;
+
+ if (st) {
+ t[START_CONTAINER] = n;
+ t[START_OFFSET] = o;
+ } else {
+ t[END_CONTAINER] = n;
+ t[END_OFFSET] = o;
+ }
+
+ // If one boundary-point of a Range is set to have a root container
+ // other than the current one for the Range, the Range is collapsed to
+ // the new position. This enforces the restriction that both boundary-
+ // points of a Range must have the same root container.
+ ec = t[END_CONTAINER];
+ while (ec.parentNode)
+ ec = ec.parentNode;
+
+ sc = t[START_CONTAINER];
+ while (sc.parentNode)
+ sc = sc.parentNode;
+
+ if (sc == ec) {
+ // The start position of a Range is guaranteed to never be after the
+ // end position. To enforce this restriction, if the start is set to
+ // be at a position after the end, the Range is collapsed to that
+ // position.
+ if (_compareBoundaryPoints(t[START_CONTAINER], t[START_OFFSET], t[END_CONTAINER], t[END_OFFSET]) > 0)
+ t.collapse(st);
+ } else
+ t.collapse(st);
+
+ t.collapsed = _isCollapsed();
+ t.commonAncestorContainer = dom.findCommonAncestor(t[START_CONTAINER], t[END_CONTAINER]);
+ };
+
+ function _traverse(how) {
+ var c, endContainerDepth = 0, startContainerDepth = 0, p, depthDiff, startNode, endNode, sp, ep;
+
+ if (t[START_CONTAINER] == t[END_CONTAINER])
+ return _traverseSameContainer(how);
+
+ for (c = t[END_CONTAINER], p = c.parentNode; p; c = p, p = p.parentNode) {
+ if (p == t[START_CONTAINER])
+ return _traverseCommonStartContainer(c, how);
+
+ ++endContainerDepth;
+ }
+
+ for (c = t[START_CONTAINER], p = c.parentNode; p; c = p, p = p.parentNode) {
+ if (p == t[END_CONTAINER])
+ return _traverseCommonEndContainer(c, how);
+
+ ++startContainerDepth;
+ }
+
+ depthDiff = startContainerDepth - endContainerDepth;
+
+ startNode = t[START_CONTAINER];
+ while (depthDiff > 0) {
+ startNode = startNode.parentNode;
+ depthDiff--;
+ }
+
+ endNode = t[END_CONTAINER];
+ while (depthDiff < 0) {
+ endNode = endNode.parentNode;
+ depthDiff++;
+ }
+
+ // ascend the ancestor hierarchy until we have a common parent.
+ for (sp = startNode.parentNode, ep = endNode.parentNode; sp != ep; sp = sp.parentNode, ep = ep.parentNode) {
+ startNode = sp;
+ endNode = ep;
+ }
+
+ return _traverseCommonAncestors(startNode, endNode, how);
+ };
+
+ function _traverseSameContainer(how) {
+ var frag, s, sub, n, cnt, sibling, xferNode, start, len;
+
+ if (how != DELETE)
+ frag = createDocumentFragment();
+
+ // If selection is empty, just return the fragment
+ if (t[START_OFFSET] == t[END_OFFSET])
+ return frag;
+
+ // Text node needs special case handling
+ if (t[START_CONTAINER].nodeType == 3 /* TEXT_NODE */) {
+ // get the substring
+ s = t[START_CONTAINER].nodeValue;
+ sub = s.substring(t[START_OFFSET], t[END_OFFSET]);
+
+ // set the original text node to its new value
+ if (how != CLONE) {
+ n = t[START_CONTAINER];
+ start = t[START_OFFSET];
+ len = t[END_OFFSET] - t[START_OFFSET];
+
+ if (start === 0 && len >= n.nodeValue.length - 1) {
+ n.parentNode.removeChild(n);
+ } else {
+ n.deleteData(start, len);
+ }
+
+ // Nothing is partially selected, so collapse to start point
+ t.collapse(TRUE);
+ }
+
+ if (how == DELETE)
+ return;
+
+ if (sub.length > 0) {
+ frag.appendChild(doc.createTextNode(sub));
+ }
+
+ return frag;
+ }
+
+ // Copy nodes between the start/end offsets.
+ n = _getSelectedNode(t[START_CONTAINER], t[START_OFFSET]);
+ cnt = t[END_OFFSET] - t[START_OFFSET];
+
+ while (n && cnt > 0) {
+ sibling = n.nextSibling;
+ xferNode = _traverseFullySelected(n, how);
+
+ if (frag)
+ frag.appendChild( xferNode );
+
+ --cnt;
+ n = sibling;
+ }
+
+ // Nothing is partially selected, so collapse to start point
+ if (how != CLONE)
+ t.collapse(TRUE);
+
+ return frag;
+ };
+
+ function _traverseCommonStartContainer(endAncestor, how) {
+ var frag, n, endIdx, cnt, sibling, xferNode;
+
+ if (how != DELETE)
+ frag = createDocumentFragment();
+
+ n = _traverseRightBoundary(endAncestor, how);
+
+ if (frag)
+ frag.appendChild(n);
+
+ endIdx = nodeIndex(endAncestor);
+ cnt = endIdx - t[START_OFFSET];
+
+ if (cnt <= 0) {
+ // Collapse to just before the endAncestor, which
+ // is partially selected.
+ if (how != CLONE) {
+ t.setEndBefore(endAncestor);
+ t.collapse(FALSE);
+ }
+
+ return frag;
+ }
+
+ n = endAncestor.previousSibling;
+ while (cnt > 0) {
+ sibling = n.previousSibling;
+ xferNode = _traverseFullySelected(n, how);
+
+ if (frag)
+ frag.insertBefore(xferNode, frag.firstChild);
+
+ --cnt;
+ n = sibling;
+ }
+
+ // Collapse to just before the endAncestor, which
+ // is partially selected.
+ if (how != CLONE) {
+ t.setEndBefore(endAncestor);
+ t.collapse(FALSE);
+ }
+
+ return frag;
+ };
+
+ function _traverseCommonEndContainer(startAncestor, how) {
+ var frag, startIdx, n, cnt, sibling, xferNode;
+
+ if (how != DELETE)
+ frag = createDocumentFragment();
+
+ n = _traverseLeftBoundary(startAncestor, how);
+ if (frag)
+ frag.appendChild(n);
+
+ startIdx = nodeIndex(startAncestor);
+ ++startIdx; // Because we already traversed it
+
+ cnt = t[END_OFFSET] - startIdx;
+ n = startAncestor.nextSibling;
+ while (n && cnt > 0) {
+ sibling = n.nextSibling;
+ xferNode = _traverseFullySelected(n, how);
+
+ if (frag)
+ frag.appendChild(xferNode);
+
+ --cnt;
+ n = sibling;
+ }
+
+ if (how != CLONE) {
+ t.setStartAfter(startAncestor);
+ t.collapse(TRUE);
+ }
+
+ return frag;
+ };
+
+ function _traverseCommonAncestors(startAncestor, endAncestor, how) {
+ var n, frag, commonParent, startOffset, endOffset, cnt, sibling, nextSibling;
+
+ if (how != DELETE)
+ frag = createDocumentFragment();
+
+ n = _traverseLeftBoundary(startAncestor, how);
+ if (frag)
+ frag.appendChild(n);
+
+ commonParent = startAncestor.parentNode;
+ startOffset = nodeIndex(startAncestor);
+ endOffset = nodeIndex(endAncestor);
+ ++startOffset;
+
+ cnt = endOffset - startOffset;
+ sibling = startAncestor.nextSibling;
+
+ while (cnt > 0) {
+ nextSibling = sibling.nextSibling;
+ n = _traverseFullySelected(sibling, how);
+
+ if (frag)
+ frag.appendChild(n);
+
+ sibling = nextSibling;
+ --cnt;
+ }
+
+ n = _traverseRightBoundary(endAncestor, how);
+
+ if (frag)
+ frag.appendChild(n);
+
+ if (how != CLONE) {
+ t.setStartAfter(startAncestor);
+ t.collapse(TRUE);
+ }
+
+ return frag;
+ };
+
+ function _traverseRightBoundary(root, how) {
+ var next = _getSelectedNode(t[END_CONTAINER], t[END_OFFSET] - 1), parent, clonedParent, prevSibling, clonedChild, clonedGrandParent, isFullySelected = next != t[END_CONTAINER];
+
+ if (next == root)
+ return _traverseNode(next, isFullySelected, FALSE, how);
+
+ parent = next.parentNode;
+ clonedParent = _traverseNode(parent, FALSE, FALSE, how);
+
+ while (parent) {
+ while (next) {
+ prevSibling = next.previousSibling;
+ clonedChild = _traverseNode(next, isFullySelected, FALSE, how);
+
+ if (how != DELETE)
+ clonedParent.insertBefore(clonedChild, clonedParent.firstChild);
+
+ isFullySelected = TRUE;
+ next = prevSibling;
+ }
+
+ if (parent == root)
+ return clonedParent;
+
+ next = parent.previousSibling;
+ parent = parent.parentNode;
+
+ clonedGrandParent = _traverseNode(parent, FALSE, FALSE, how);
+
+ if (how != DELETE)
+ clonedGrandParent.appendChild(clonedParent);
+
+ clonedParent = clonedGrandParent;
+ }
+ };
+
+ function _traverseLeftBoundary(root, how) {
+ var next = _getSelectedNode(t[START_CONTAINER], t[START_OFFSET]), isFullySelected = next != t[START_CONTAINER], parent, clonedParent, nextSibling, clonedChild, clonedGrandParent;
+
+ if (next == root)
+ return _traverseNode(next, isFullySelected, TRUE, how);
+
+ parent = next.parentNode;
+ clonedParent = _traverseNode(parent, FALSE, TRUE, how);
+
+ while (parent) {
+ while (next) {
+ nextSibling = next.nextSibling;
+ clonedChild = _traverseNode(next, isFullySelected, TRUE, how);
+
+ if (how != DELETE)
+ clonedParent.appendChild(clonedChild);
+
+ isFullySelected = TRUE;
+ next = nextSibling;
+ }
+
+ if (parent == root)
+ return clonedParent;
+
+ next = parent.nextSibling;
+ parent = parent.parentNode;
+
+ clonedGrandParent = _traverseNode(parent, FALSE, TRUE, how);
+
+ if (how != DELETE)
+ clonedGrandParent.appendChild(clonedParent);
+
+ clonedParent = clonedGrandParent;
+ }
+ };
+
+ function _traverseNode(n, isFullySelected, isLeft, how) {
+ var txtValue, newNodeValue, oldNodeValue, offset, newNode;
+
+ if (isFullySelected)
+ return _traverseFullySelected(n, how);
+
+ if (n.nodeType == 3 /* TEXT_NODE */) {
+ txtValue = n.nodeValue;
+
+ if (isLeft) {
+ offset = t[START_OFFSET];
+ newNodeValue = txtValue.substring(offset);
+ oldNodeValue = txtValue.substring(0, offset);
+ } else {
+ offset = t[END_OFFSET];
+ newNodeValue = txtValue.substring(0, offset);
+ oldNodeValue = txtValue.substring(offset);
+ }
+
+ if (how != CLONE)
+ n.nodeValue = oldNodeValue;
+
+ if (how == DELETE)
+ return;
+
+ newNode = dom.clone(n, FALSE);
+ newNode.nodeValue = newNodeValue;
+
+ return newNode;
+ }
+
+ if (how == DELETE)
+ return;
+
+ return dom.clone(n, FALSE);
+ };
+
+ function _traverseFullySelected(n, how) {
+ if (how != DELETE)
+ return how == CLONE ? dom.clone(n, TRUE) : n;
+
+ n.parentNode.removeChild(n);
+ };
+
+ function toStringIE() {
+ return dom.create('body', null, cloneContents()).outerText;
+ }
+
+ return t;
+ };
+
+ ns.Range = Range;
+
+ // Older IE versions doesn't let you override toString by it's constructor so we have to stick it in the prototype
+ Range.prototype.toString = function() {
+ return this.toStringIE();
+ };
+})(tinymce.dom);
+
+(function() {
+ function Selection(selection) {
+ var self = this, dom = selection.dom, TRUE = true, FALSE = false;
+
+ function getPosition(rng, start) {
+ var checkRng, startIndex = 0, endIndex, inside,
+ children, child, offset, index, position = -1, parent;
+
+ // Setup test range, collapse it and get the parent
+ checkRng = rng.duplicate();
+ checkRng.collapse(start);
+ parent = checkRng.parentElement();
+
+ // Check if the selection is within the right document
+ if (parent.ownerDocument !== selection.dom.doc)
+ return;
+
+ // IE will report non editable elements as it's parent so look for an editable one
+ while (parent.contentEditable === "false") {
+ parent = parent.parentNode;
+ }
+
+ // If parent doesn't have any children then return that we are inside the element
+ if (!parent.hasChildNodes()) {
+ return {node : parent, inside : 1};
+ }
+
+ // Setup node list and endIndex
+ children = parent.children;
+ endIndex = children.length - 1;
+
+ // Perform a binary search for the position
+ while (startIndex <= endIndex) {
+ index = Math.floor((startIndex + endIndex) / 2);
+
+ // Move selection to node and compare the ranges
+ child = children[index];
+ checkRng.moveToElementText(child);
+ position = checkRng.compareEndPoints(start ? 'StartToStart' : 'EndToEnd', rng);
+
+ // Before/after or an exact match
+ if (position > 0) {
+ endIndex = index - 1;
+ } else if (position < 0) {
+ startIndex = index + 1;
+ } else {
+ return {node : child};
+ }
+ }
+
+ // Check if child position is before or we didn't find a position
+ if (position < 0) {
+ // No element child was found use the parent element and the offset inside that
+ if (!child) {
+ checkRng.moveToElementText(parent);
+ checkRng.collapse(true);
+ child = parent;
+ inside = true;
+ } else
+ checkRng.collapse(false);
+
+ // Walk character by character in text node until we hit the selected range endpoint, hit the end of document or parent isn't the right one
+ // We need to walk char by char since rng.text or rng.htmlText will trim line endings
+ offset = 0;
+ while (checkRng.compareEndPoints(start ? 'StartToStart' : 'StartToEnd', rng) !== 0) {
+ if (checkRng.move('character', 1) === 0 || parent != checkRng.parentElement()) {
+ break;
+ }
+
+ offset++;
+ }
+ } else {
+ // Child position is after the selection endpoint
+ checkRng.collapse(true);
+
+ // Walk character by character in text node until we hit the selected range endpoint, hit the end of document or parent isn't the right one
+ offset = 0;
+ while (checkRng.compareEndPoints(start ? 'StartToStart' : 'StartToEnd', rng) !== 0) {
+ if (checkRng.move('character', -1) === 0 || parent != checkRng.parentElement()) {
+ break;
+ }
+
+ offset++;
+ }
+ }
+
+ return {node : child, position : position, offset : offset, inside : inside};
+ };
+
+ // Returns a W3C DOM compatible range object by using the IE Range API
+ function getRange() {
+ var ieRange = selection.getRng(), domRange = dom.createRng(), element, collapsed, tmpRange, element2, bookmark, fail;
+
+ // If selection is outside the current document just return an empty range
+ element = ieRange.item ? ieRange.item(0) : ieRange.parentElement();
+ if (element.ownerDocument != dom.doc)
+ return domRange;
+
+ collapsed = selection.isCollapsed();
+
+ // Handle control selection
+ if (ieRange.item) {
+ domRange.setStart(element.parentNode, dom.nodeIndex(element));
+ domRange.setEnd(domRange.startContainer, domRange.startOffset + 1);
+
+ return domRange;
+ }
+
+ function findEndPoint(start) {
+ var endPoint = getPosition(ieRange, start), container, offset, textNodeOffset = 0, sibling, undef, nodeValue;
+
+ container = endPoint.node;
+ offset = endPoint.offset;
+
+ if (endPoint.inside && !container.hasChildNodes()) {
+ domRange[start ? 'setStart' : 'setEnd'](container, 0);
+ return;
+ }
+
+ if (offset === undef) {
+ domRange[start ? 'setStartBefore' : 'setEndAfter'](container);
+ return;
+ }
+
+ if (endPoint.position < 0) {
+ sibling = endPoint.inside ? container.firstChild : container.nextSibling;
+
+ if (!sibling) {
+ domRange[start ? 'setStartAfter' : 'setEndAfter'](container);
+ return;
+ }
+
+ if (!offset) {
+ if (sibling.nodeType == 3)
+ domRange[start ? 'setStart' : 'setEnd'](sibling, 0);
+ else
+ domRange[start ? 'setStartBefore' : 'setEndBefore'](sibling);
+
+ return;
+ }
+
+ // Find the text node and offset
+ while (sibling) {
+ nodeValue = sibling.nodeValue;
+ textNodeOffset += nodeValue.length;
+
+ // We are at or passed the position we where looking for
+ if (textNodeOffset >= offset) {
+ container = sibling;
+ textNodeOffset -= offset;
+ textNodeOffset = nodeValue.length - textNodeOffset;
+ break;
+ }
+
+ sibling = sibling.nextSibling;
+ }
+ } else {
+ // Find the text node and offset
+ sibling = container.previousSibling;
+
+ if (!sibling)
+ return domRange[start ? 'setStartBefore' : 'setEndBefore'](container);
+
+ // If there isn't any text to loop then use the first position
+ if (!offset) {
+ if (container.nodeType == 3)
+ domRange[start ? 'setStart' : 'setEnd'](sibling, container.nodeValue.length);
+ else
+ domRange[start ? 'setStartAfter' : 'setEndAfter'](sibling);
+
+ return;
+ }
+
+ while (sibling) {
+ textNodeOffset += sibling.nodeValue.length;
+
+ // We are at or passed the position we where looking for
+ if (textNodeOffset >= offset) {
+ container = sibling;
+ textNodeOffset -= offset;
+ break;
+ }
+
+ sibling = sibling.previousSibling;
+ }
+ }
+
+ domRange[start ? 'setStart' : 'setEnd'](container, textNodeOffset);
+ };
+
+ try {
+ // Find start point
+ findEndPoint(true);
+
+ // Find end point if needed
+ if (!collapsed)
+ findEndPoint();
+ } catch (ex) {
+ // IE has a nasty bug where text nodes might throw "invalid argument" when you
+ // access the nodeValue or other properties of text nodes. This seems to happend when
+ // text nodes are split into two nodes by a delete/backspace call. So lets detect it and try to fix it.
+ if (ex.number == -2147024809) {
+ // Get the current selection
+ bookmark = self.getBookmark(2);
+
+ // Get start element
+ tmpRange = ieRange.duplicate();
+ tmpRange.collapse(true);
+ element = tmpRange.parentElement();
+
+ // Get end element
+ if (!collapsed) {
+ tmpRange = ieRange.duplicate();
+ tmpRange.collapse(false);
+ element2 = tmpRange.parentElement();
+ element2.innerHTML = element2.innerHTML;
+ }
+
+ // Remove the broken elements
+ element.innerHTML = element.innerHTML;
+
+ // Restore the selection
+ self.moveToBookmark(bookmark);
+
+ // Since the range has moved we need to re-get it
+ ieRange = selection.getRng();
+
+ // Find start point
+ findEndPoint(true);
+
+ // Find end point if needed
+ if (!collapsed)
+ findEndPoint();
+ } else
+ throw ex; // Throw other errors
+ }
+
+ return domRange;
+ };
+
+ this.getBookmark = function(type) {
+ var rng = selection.getRng(), start, end, bookmark = {};
+
+ function getIndexes(node) {
+ var parent, root, children, i, indexes = [];
+
+ parent = node.parentNode;
+ root = dom.getRoot().parentNode;
+
+ while (parent != root && parent.nodeType !== 9) {
+ children = parent.children;
+
+ i = children.length;
+ while (i--) {
+ if (node === children[i]) {
+ indexes.push(i);
+ break;
+ }
+ }
+
+ node = parent;
+ parent = parent.parentNode;
+ }
+
+ return indexes;
+ };
+
+ function getBookmarkEndPoint(start) {
+ var position;
+
+ position = getPosition(rng, start);
+ if (position) {
+ return {
+ position : position.position,
+ offset : position.offset,
+ indexes : getIndexes(position.node),
+ inside : position.inside
+ };
+ }
+ };
+
+ // Non ubstructive bookmark
+ if (type === 2) {
+ // Handle text selection
+ if (!rng.item) {
+ bookmark.start = getBookmarkEndPoint(true);
+
+ if (!selection.isCollapsed())
+ bookmark.end = getBookmarkEndPoint();
+ } else
+ bookmark.start = {ctrl : true, indexes : getIndexes(rng.item(0))};
+ }
+
+ return bookmark;
+ };
+
+ this.moveToBookmark = function(bookmark) {
+ var rng, body = dom.doc.body;
+
+ function resolveIndexes(indexes) {
+ var node, i, idx, children;
+
+ node = dom.getRoot();
+ for (i = indexes.length - 1; i >= 0; i--) {
+ children = node.children;
+ idx = indexes[i];
+
+ if (idx <= children.length - 1) {
+ node = children[idx];
+ }
+ }
+
+ return node;
+ };
+
+ function setBookmarkEndPoint(start) {
+ var endPoint = bookmark[start ? 'start' : 'end'], moveLeft, moveRng, undef;
+
+ if (endPoint) {
+ moveLeft = endPoint.position > 0;
+
+ moveRng = body.createTextRange();
+ moveRng.moveToElementText(resolveIndexes(endPoint.indexes));
+
+ offset = endPoint.offset;
+ if (offset !== undef) {
+ moveRng.collapse(endPoint.inside || moveLeft);
+ moveRng.moveStart('character', moveLeft ? -offset : offset);
+ } else
+ moveRng.collapse(start);
+
+ rng.setEndPoint(start ? 'StartToStart' : 'EndToStart', moveRng);
+
+ if (start)
+ rng.collapse(true);
+ }
+ };
+
+ if (bookmark.start) {
+ if (bookmark.start.ctrl) {
+ rng = body.createControlRange();
+ rng.addElement(resolveIndexes(bookmark.start.indexes));
+ rng.select();
+ } else {
+ rng = body.createTextRange();
+ setBookmarkEndPoint(true);
+ setBookmarkEndPoint();
+ rng.select();
+ }
+ }
+ };
+
+ this.addRange = function(rng) {
+ var ieRng, ctrlRng, startContainer, startOffset, endContainer, endOffset, sibling,
+ doc = selection.dom.doc, body = doc.body, nativeRng, ctrlElm;
+
+ function setEndPoint(start) {
+ var container, offset, marker, tmpRng, nodes;
+
+ marker = dom.create('a');
+ container = start ? startContainer : endContainer;
+ offset = start ? startOffset : endOffset;
+ tmpRng = ieRng.duplicate();
+
+ if (container == doc || container == doc.documentElement) {
+ container = body;
+ offset = 0;
+ }
+
+ if (container.nodeType == 3) {
+ container.parentNode.insertBefore(marker, container);
+ tmpRng.moveToElementText(marker);
+ tmpRng.moveStart('character', offset);
+ dom.remove(marker);
+ ieRng.setEndPoint(start ? 'StartToStart' : 'EndToEnd', tmpRng);
+ } else {
+ nodes = container.childNodes;
+
+ if (nodes.length) {
+ if (offset >= nodes.length) {
+ dom.insertAfter(marker, nodes[nodes.length - 1]);
+ } else {
+ container.insertBefore(marker, nodes[offset]);
+ }
+
+ tmpRng.moveToElementText(marker);
+ } else if (container.canHaveHTML) {
+ // Empty node selection for example <div>|</div>
+ // Setting innerHTML with a span marker then remove that marker seems to keep empty block elements open
+ container.innerHTML = '<span>\uFEFF</span>';
+ marker = container.firstChild;
+ tmpRng.moveToElementText(marker);
+ tmpRng.collapse(FALSE); // Collapse false works better than true for some odd reason
+ }
+
+ ieRng.setEndPoint(start ? 'StartToStart' : 'EndToEnd', tmpRng);
+ dom.remove(marker);
+ }
+ }
+
+ // Setup some shorter versions
+ startContainer = rng.startContainer;
+ startOffset = rng.startOffset;
+ endContainer = rng.endContainer;
+ endOffset = rng.endOffset;
+ ieRng = body.createTextRange();
+
+ // If single element selection then try making a control selection out of it
+ if (startContainer == endContainer && startContainer.nodeType == 1) {
+ // Trick to place the caret inside an empty block element like <p></p>
+ if (startOffset == endOffset && !startContainer.hasChildNodes()) {
+ if (startContainer.canHaveHTML) {
+ // Check if previous sibling is an empty block if it is then we need to render it
+ // IE would otherwise move the caret into the sibling instead of the empty startContainer see: #5236
+ // Example this: <p></p><p>|</p> would become this: <p>|</p><p></p>
+ sibling = startContainer.previousSibling;
+ if (sibling && !sibling.hasChildNodes() && dom.isBlock(sibling)) {
+ sibling.innerHTML = '\uFEFF';
+ } else {
+ sibling = null;
+ }
+
+ startContainer.innerHTML = '<span>\uFEFF</span><span>\uFEFF</span>';
+ ieRng.moveToElementText(startContainer.lastChild);
+ ieRng.select();
+ dom.doc.selection.clear();
+ startContainer.innerHTML = '';
+
+ if (sibling) {
+ sibling.innerHTML = '';
+ }
+ return;
+ } else {
+ startOffset = dom.nodeIndex(startContainer);
+ startContainer = startContainer.parentNode;
+ }
+ }
+
+ if (startOffset == endOffset - 1) {
+ try {
+ ctrlElm = startContainer.childNodes[startOffset];
+ ctrlRng = body.createControlRange();
+ ctrlRng.addElement(ctrlElm);
+ ctrlRng.select();
+
+ // Check if the range produced is on the correct element and is a control range
+ // On IE 8 it will select the parent contentEditable container if you select an inner element see: #5398
+ nativeRng = selection.getRng();
+ if (nativeRng.item && ctrlElm === nativeRng.item(0)) {
+ return;
+ }
+ } catch (ex) {
+ // Ignore
+ }
+ }
+ }
+
+ // Set start/end point of selection
+ setEndPoint(true);
+ setEndPoint();
+
+ // Select the new range and scroll it into view
+ ieRng.select();
+ };
+
+ // Expose range method
+ this.getRangeAt = getRange;
+ };
+
+ // Expose the selection object
+ tinymce.dom.TridentSelection = Selection;
+})();
+
+
+/*
+ * Sizzle CSS Selector Engine
+ * Copyright, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ * More information: http://sizzlejs.com/
+ */
+(function(){
+
+var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
+ expando = "sizcache",
+ done = 0,
+ toString = Object.prototype.toString,
+ hasDuplicate = false,
+ baseHasDuplicate = true,
+ rBackslash = /\\/g,
+ rReturn = /\r\n/g,
+ rNonWord = /\W/;
+
+// Here we check if the JavaScript engine is using some sort of
+// optimization where it does not always call our comparision
+// function. If that is the case, discard the hasDuplicate value.
+// Thus far that includes Google Chrome.
+[0, 0].sort(function() {
+ baseHasDuplicate = false;
+ return 0;
+});
+
+var Sizzle = function( selector, context, results, seed ) {
+ results = results || [];
+ context = context || document;
+
+ var origContext = context;
+
+ if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
+ return [];
+ }
+
+ if ( !selector || typeof selector !== "string" ) {
+ return results;
+ }
+
+ var m, set, checkSet, extra, ret, cur, pop, i,
+ prune = true,
+ contextXML = Sizzle.isXML( context ),
+ parts = [],
+ soFar = selector;
+
+ // Reset the position of the chunker regexp (start from head)
+ do {
+ chunker.exec( "" );
+ m = chunker.exec( soFar );
+
+ if ( m ) {
+ soFar = m[3];
+
+ parts.push( m[1] );
+
+ if ( m[2] ) {
+ extra = m[3];
+ break;
+ }
+ }
+ } while ( m );
+
+ if ( parts.length > 1 && origPOS.exec( selector ) ) {
+
+ if ( parts.length === 2 && Expr.relative[ parts[0] ] ) {
+ set = posProcess( parts[0] + parts[1], context, seed );
+
+ } else {
+ set = Expr.relative[ parts[0] ] ?
+ [ context ] :
+ Sizzle( parts.shift(), context );
+
+ while ( parts.length ) {
+ selector = parts.shift();
+
+ if ( Expr.relative[ selector ] ) {
+ selector += parts.shift();
+ }
+
+ set = posProcess( selector, set, seed );
+ }
+ }
+
+ } else {
+ // Take a shortcut and set the context if the root selector is an ID
+ // (but not if it'll be faster if the inner selector is an ID)
+ if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML &&
+ Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) {
+
+ ret = Sizzle.find( parts.shift(), context, contextXML );
+ context = ret.expr ?
+ Sizzle.filter( ret.expr, ret.set )[0] :
+ ret.set[0];
+ }
+
+ if ( context ) {
+ ret = seed ?
+ { expr: parts.pop(), set: makeArray(seed) } :
+ Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML );
+
+ set = ret.expr ?
+ Sizzle.filter( ret.expr, ret.set ) :
+ ret.set;
+
+ if ( parts.length > 0 ) {
+ checkSet = makeArray( set );
+
+ } else {
+ prune = false;
+ }
+
+ while ( parts.length ) {
+ cur = parts.pop();
+ pop = cur;
+
+ if ( !Expr.relative[ cur ] ) {
+ cur = "";
+ } else {
+ pop = parts.pop();
+ }
+
+ if ( pop == null ) {
+ pop = context;
+ }
+
+ Expr.relative[ cur ]( checkSet, pop, contextXML );
+ }
+
+ } else {
+ checkSet = parts = [];
+ }
+ }
+
+ if ( !checkSet ) {
+ checkSet = set;
+ }
+
+ if ( !checkSet ) {
+ Sizzle.error( cur || selector );
+ }
+
+ if ( toString.call(checkSet) === "[object Array]" ) {
+ if ( !prune ) {
+ results.push.apply( results, checkSet );
+
+ } else if ( context && context.nodeType === 1 ) {
+ for ( i = 0; checkSet[i] != null; i++ ) {
+ if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) {
+ results.push( set[i] );
+ }
+ }
+
+ } else {
+ for ( i = 0; checkSet[i] != null; i++ ) {
+ if ( checkSet[i] && checkSet[i].nodeType === 1 ) {
+ results.push( set[i] );
+ }
+ }
+ }
+
+ } else {
+ makeArray( checkSet, results );
+ }
+
+ if ( extra ) {
+ Sizzle( extra, origContext, results, seed );
+ Sizzle.uniqueSort( results );
+ }
+
+ return results;
+};
+
+Sizzle.uniqueSort = function( results ) {
+ if ( sortOrder ) {
+ hasDuplicate = baseHasDuplicate;
+ results.sort( sortOrder );
+
+ if ( hasDuplicate ) {
+ for ( var i = 1; i < results.length; i++ ) {
+ if ( results[i] === results[ i - 1 ] ) {
+ results.splice( i--, 1 );
+ }
+ }
+ }
+ }
+
+ return results;
+};
+
+Sizzle.matches = function( expr, set ) {
+ return Sizzle( expr, null, null, set );
+};
+
+Sizzle.matchesSelector = function( node, expr ) {
+ return Sizzle( expr, null, null, [node] ).length > 0;
+};
+
+Sizzle.find = function( expr, context, isXML ) {
+ var set, i, len, match, type, left;
+
+ if ( !expr ) {
+ return [];
+ }
+
+ for ( i = 0, len = Expr.order.length; i < len; i++ ) {
+ type = Expr.order[i];
+
+ if ( (match = Expr.leftMatch[ type ].exec( expr )) ) {
+ left = match[1];
+ match.splice( 1, 1 );
+
+ if ( left.substr( left.length - 1 ) !== "\\" ) {
+ match[1] = (match[1] || "").replace( rBackslash, "" );
+ set = Expr.find[ type ]( match, context, isXML );
+
+ if ( set != null ) {
+ expr = expr.replace( Expr.match[ type ], "" );
+ break;
+ }
+ }
+ }
+ }
+
+ if ( !set ) {
+ set = typeof context.getElementsByTagName !== "undefined" ?
+ context.getElementsByTagName( "*" ) :
+ [];
+ }
+
+ return { set: set, expr: expr };
+};
+
+Sizzle.filter = function( expr, set, inplace, not ) {
+ var match, anyFound,
+ type, found, item, filter, left,
+ i, pass,
+ old = expr,
+ result = [],
+ curLoop = set,
+ isXMLFilter = set && set[0] && Sizzle.isXML( set[0] );
+
+ while ( expr && set.length ) {
+ for ( type in Expr.filter ) {
+ if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) {
+ filter = Expr.filter[ type ];
+ left = match[1];
+
+ anyFound = false;
+
+ match.splice(1,1);
+
+ if ( left.substr( left.length - 1 ) === "\\" ) {
+ continue;
+ }
+
+ if ( curLoop === result ) {
+ result = [];
+ }
+
+ if ( Expr.preFilter[ type ] ) {
+ match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter );
+
+ if ( !match ) {
+ anyFound = found = true;
+
+ } else if ( match === true ) {
+ continue;
+ }
+ }
+
+ if ( match ) {
+ for ( i = 0; (item = curLoop[i]) != null; i++ ) {
+ if ( item ) {
+ found = filter( item, match, i, curLoop );
+ pass = not ^ found;
+
+ if ( inplace && found != null ) {
+ if ( pass ) {
+ anyFound = true;
+
+ } else {
+ curLoop[i] = false;
+ }
+
+ } else if ( pass ) {
+ result.push( item );
+ anyFound = true;
+ }
+ }
+ }
+ }
+
+ if ( found !== undefined ) {
+ if ( !inplace ) {
+ curLoop = result;
+ }
+
+ expr = expr.replace( Expr.match[ type ], "" );
+
+ if ( !anyFound ) {
+ return [];
+ }
+
+ break;
+ }
+ }
+ }
+
+ // Improper expression
+ if ( expr === old ) {
+ if ( anyFound == null ) {
+ Sizzle.error( expr );
+
+ } else {
+ break;
+ }
+ }
+
+ old = expr;
+ }
+
+ return curLoop;
+};
+
+Sizzle.error = function( msg ) {
+ throw new Error( "Syntax error, unrecognized expression: " + msg );
+};
+
+var getText = Sizzle.getText = function( elem ) {
+ var i, node,
+ nodeType = elem.nodeType,
+ ret = "";
+
+ if ( nodeType ) {
+ if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
+ // Use textContent || innerText for elements
+ if ( typeof elem.textContent === 'string' ) {
+ return elem.textContent;
+ } else if ( typeof elem.innerText === 'string' ) {
+ // Replace IE's carriage returns
+ return elem.innerText.replace( rReturn, '' );
+ } else {
+ // Traverse it's children
+ for ( elem = elem.firstChild; elem; elem = elem.nextSibling) {
+ ret += getText( elem );
+ }
+ }
+ } else if ( nodeType === 3 || nodeType === 4 ) {
+ return elem.nodeValue;
+ }
+ } else {
+
+ // If no nodeType, this is expected to be an array
+ for ( i = 0; (node = elem[i]); i++ ) {
+ // Do not traverse comment nodes
+ if ( node.nodeType !== 8 ) {
+ ret += getText( node );
+ }
+ }
+ }
+ return ret;
+};
+
+var Expr = Sizzle.selectors = {
+ order: [ "ID", "NAME", "TAG" ],
+
+ match: {
+ ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
+ CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
+ NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,
+ ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,
+ TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,
+ CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,
+ POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,
+ PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/
+ },
+
+ leftMatch: {},
+
+ attrMap: {
+ "class": "className",
+ "for": "htmlFor"
+ },
+
+ attrHandle: {
+ href: function( elem ) {
+ return elem.getAttribute( "href" );
+ },
+ type: function( elem ) {
+ return elem.getAttribute( "type" );
+ }
+ },
+
+ relative: {
+ "+": function(checkSet, part){
+ var isPartStr = typeof part === "string",
+ isTag = isPartStr && !rNonWord.test( part ),
+ isPartStrNotTag = isPartStr && !isTag;
+
+ if ( isTag ) {
+ part = part.toLowerCase();
+ }
+
+ for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) {
+ if ( (elem = checkSet[i]) ) {
+ while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {}
+
+ checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ?
+ elem || false :
+ elem === part;
+ }
+ }
+
+ if ( isPartStrNotTag ) {
+ Sizzle.filter( part, checkSet, true );
+ }
+ },
+
+ ">": function( checkSet, part ) {
+ var elem,
+ isPartStr = typeof part === "string",
+ i = 0,
+ l = checkSet.length;
+
+ if ( isPartStr && !rNonWord.test( part ) ) {
+ part = part.toLowerCase();
+
+ for ( ; i < l; i++ ) {
+ elem = checkSet[i];
+
+ if ( elem ) {
+ var parent = elem.parentNode;
+ checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false;
+ }
+ }
+
+ } else {
+ for ( ; i < l; i++ ) {
+ elem = checkSet[i];
+
+ if ( elem ) {
+ checkSet[i] = isPartStr ?
+ elem.parentNode :
+ elem.parentNode === part;
+ }
+ }
+
+ if ( isPartStr ) {
+ Sizzle.filter( part, checkSet, true );
+ }
+ }
+ },
+
+ "": function(checkSet, part, isXML){
+ var nodeCheck,
+ doneName = done++,
+ checkFn = dirCheck;
+
+ if ( typeof part === "string" && !rNonWord.test( part ) ) {
+ part = part.toLowerCase();
+ nodeCheck = part;
+ checkFn = dirNodeCheck;
+ }
+
+ checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML );
+ },
+
+ "~": function( checkSet, part, isXML ) {
+ var nodeCheck,
+ doneName = done++,
+ checkFn = dirCheck;
+
+ if ( typeof part === "string" && !rNonWord.test( part ) ) {
+ part = part.toLowerCase();
+ nodeCheck = part;
+ checkFn = dirNodeCheck;
+ }
+
+ checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML );
+ }
+ },
+
+ find: {
+ ID: function( match, context, isXML ) {
+ if ( typeof context.getElementById !== "undefined" && !isXML ) {
+ var m = context.getElementById(match[1]);
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ return m && m.parentNode ? [m] : [];
+ }
+ },
+
+ NAME: function( match, context ) {
+ if ( typeof context.getElementsByName !== "undefined" ) {
+ var ret = [],
+ results = context.getElementsByName( match[1] );
+
+ for ( var i = 0, l = results.length; i < l; i++ ) {
+ if ( results[i].getAttribute("name") === match[1] ) {
+ ret.push( results[i] );
+ }
+ }
+
+ return ret.length === 0 ? null : ret;
+ }
+ },
+
+ TAG: function( match, context ) {
+ if ( typeof context.getElementsByTagName !== "undefined" ) {
+ return context.getElementsByTagName( match[1] );
+ }
+ }
+ },
+ preFilter: {
+ CLASS: function( match, curLoop, inplace, result, not, isXML ) {
+ match = " " + match[1].replace( rBackslash, "" ) + " ";
+
+ if ( isXML ) {
+ return match;
+ }
+
+ for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) {
+ if ( elem ) {
+ if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) {
+ if ( !inplace ) {
+ result.push( elem );
+ }
+
+ } else if ( inplace ) {
+ curLoop[i] = false;
+ }
+ }
+ }
+
+ return false;
+ },
+
+ ID: function( match ) {
+ return match[1].replace( rBackslash, "" );
+ },
+
+ TAG: function( match, curLoop ) {
+ return match[1].replace( rBackslash, "" ).toLowerCase();
+ },
+
+ CHILD: function( match ) {
+ if ( match[1] === "nth" ) {
+ if ( !match[2] ) {
+ Sizzle.error( match[0] );
+ }
+
+ match[2] = match[2].replace(/^\+|\s*/g, '');
+
+ // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
+ var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec(
+ match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" ||
+ !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]);
+
+ // calculate the numbers (first)n+(last) including if they are negative
+ match[2] = (test[1] + (test[2] || 1)) - 0;
+ match[3] = test[3] - 0;
+ }
+ else if ( match[2] ) {
+ Sizzle.error( match[0] );
+ }
+
+ // TODO: Move to normal caching system
+ match[0] = done++;
+
+ return match;
+ },
+
+ ATTR: function( match, curLoop, inplace, result, not, isXML ) {
+ var name = match[1] = match[1].replace( rBackslash, "" );
+
+ if ( !isXML && Expr.attrMap[name] ) {
+ match[1] = Expr.attrMap[name];
+ }
+
+ // Handle if an un-quoted value was used
+ match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" );
+
+ if ( match[2] === "~=" ) {
+ match[4] = " " + match[4] + " ";
+ }
+
+ return match;
+ },
+
+ PSEUDO: function( match, curLoop, inplace, result, not ) {
+ if ( match[1] === "not" ) {
+ // If we're dealing with a complex expression, or a simple one
+ if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) {
+ match[3] = Sizzle(match[3], null, null, curLoop);
+
+ } else {
+ var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);
+
+ if ( !inplace ) {
+ result.push.apply( result, ret );
+ }
+
+ return false;
+ }
+
+ } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
+ return true;
+ }
+
+ return match;
+ },
+
+ POS: function( match ) {
+ match.unshift( true );
+
+ return match;
+ }
+ },
+
+ filters: {
+ enabled: function( elem ) {
+ return elem.disabled === false && elem.type !== "hidden";
+ },
+
+ disabled: function( elem ) {
+ return elem.disabled === true;
+ },
+
+ checked: function( elem ) {
+ return elem.checked === true;
+ },
+
+ selected: function( elem ) {
+ // Accessing this property makes selected-by-default
+ // options in Safari work properly
+ if ( elem.parentNode ) {
+ elem.parentNode.selectedIndex;
+ }
+
+ return elem.selected === true;
+ },
+
+ parent: function( elem ) {
+ return !!elem.firstChild;
+ },
+
+ empty: function( elem ) {
+ return !elem.firstChild;
+ },
+
+ has: function( elem, i, match ) {
+ return !!Sizzle( match[3], elem ).length;
+ },
+
+ header: function( elem ) {
+ return (/h\d/i).test( elem.nodeName );
+ },
+
+ text: function( elem ) {
+ var attr = elem.getAttribute( "type" ), type = elem.type;
+ // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
+ // use getAttribute instead to test this case
+ return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null );
+ },
+
+ radio: function( elem ) {
+ return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type;
+ },
+
+ checkbox: function( elem ) {
+ return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type;
+ },
+
+ file: function( elem ) {
+ return elem.nodeName.toLowerCase() === "input" && "file" === elem.type;
+ },
+
+ password: function( elem ) {
+ return elem.nodeName.toLowerCase() === "input" && "password" === elem.type;
+ },
+
+ submit: function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return (name === "input" || name === "button") && "submit" === elem.type;
+ },
+
+ image: function( elem ) {
+ return elem.nodeName.toLowerCase() === "input" && "image" === elem.type;
+ },
+
+ reset: function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return (name === "input" || name === "button") && "reset" === elem.type;
+ },
+
+ button: function( elem ) {
+ var name = elem.nodeName.toLowerCase();
+ return name === "input" && "button" === elem.type || name === "button";
+ },
+
+ input: function( elem ) {
+ return (/input|select|textarea|button/i).test( elem.nodeName );
+ },
+
+ focus: function( elem ) {
+ return elem === elem.ownerDocument.activeElement;
+ }
+ },
+ setFilters: {
+ first: function( elem, i ) {
+ return i === 0;
+ },
+
+ last: function( elem, i, match, array ) {
+ return i === array.length - 1;
+ },
+
+ even: function( elem, i ) {
+ return i % 2 === 0;
+ },
+
+ odd: function( elem, i ) {
+ return i % 2 === 1;
+ },
+
+ lt: function( elem, i, match ) {
+ return i < match[3] - 0;
+ },
+
+ gt: function( elem, i, match ) {
+ return i > match[3] - 0;
+ },
+
+ nth: function( elem, i, match ) {
+ return match[3] - 0 === i;
+ },
+
+ eq: function( elem, i, match ) {
+ return match[3] - 0 === i;
+ }
+ },
+ filter: {
+ PSEUDO: function( elem, match, i, array ) {
+ var name = match[1],
+ filter = Expr.filters[ name ];
+
+ if ( filter ) {
+ return filter( elem, i, match, array );
+
+ } else if ( name === "contains" ) {
+ return (elem.textContent || elem.innerText || getText([ elem ]) || "").indexOf(match[3]) >= 0;
+
+ } else if ( name === "not" ) {
+ var not = match[3];
+
+ for ( var j = 0, l = not.length; j < l; j++ ) {
+ if ( not[j] === elem ) {
+ return false;
+ }
+ }
+
+ return true;
+
+ } else {
+ Sizzle.error( name );
+ }
+ },
+
+ CHILD: function( elem, match ) {
+ var first, last,
+ doneName, parent, cache,
+ count, diff,
+ type = match[1],
+ node = elem;
+
+ switch ( type ) {
+ case "only":
+ case "first":
+ while ( (node = node.previousSibling) ) {
+ if ( node.nodeType === 1 ) {
+ return false;
+ }
+ }
+
+ if ( type === "first" ) {
+ return true;
+ }
+
+ node = elem;
+
+ /* falls through */
+ case "last":
+ while ( (node = node.nextSibling) ) {
+ if ( node.nodeType === 1 ) {
+ return false;
+ }
+ }
+
+ return true;
+
+ case "nth":
+ first = match[2];
+ last = match[3];
+
+ if ( first === 1 && last === 0 ) {
+ return true;
+ }
+
+ doneName = match[0];
+ parent = elem.parentNode;
+
+ if ( parent && (parent[ expando ] !== doneName || !elem.nodeIndex) ) {
+ count = 0;
+
+ for ( node = parent.firstChild; node; node = node.nextSibling ) {
+ if ( node.nodeType === 1 ) {
+ node.nodeIndex = ++count;
+ }
+ }
+
+ parent[ expando ] = doneName;
+ }
+
+ diff = elem.nodeIndex - last;
+
+ if ( first === 0 ) {
+ return diff === 0;
+
+ } else {
+ return ( diff % first === 0 && diff / first >= 0 );
+ }
+ }
+ },
+
+ ID: function( elem, match ) {
+ return elem.nodeType === 1 && elem.getAttribute("id") === match;
+ },
+
+ TAG: function( elem, match ) {
+ return (match === "*" && elem.nodeType === 1) || !!elem.nodeName && elem.nodeName.toLowerCase() === match;
+ },
+
+ CLASS: function( elem, match ) {
+ return (" " + (elem.className || elem.getAttribute("class")) + " ")
+ .indexOf( match ) > -1;
+ },
+
+ ATTR: function( elem, match ) {
+ var name = match[1],
+ result = Sizzle.attr ?
+ Sizzle.attr( elem, name ) :
+ Expr.attrHandle[ name ] ?
+ Expr.attrHandle[ name ]( elem ) :
+ elem[ name ] != null ?
+ elem[ name ] :
+ elem.getAttribute( name ),
+ value = result + "",
+ type = match[2],
+ check = match[4];
+
+ return result == null ?
+ type === "!=" :
+ !type && Sizzle.attr ?
+ result != null :
+ type === "=" ?
+ value === check :
+ type === "*=" ?
+ value.indexOf(check) >= 0 :
+ type === "~=" ?
+ (" " + value + " ").indexOf(check) >= 0 :
+ !check ?
+ value && result !== false :
+ type === "!=" ?
+ value !== check :
+ type === "^=" ?
+ value.indexOf(check) === 0 :
+ type === "$=" ?
+ value.substr(value.length - check.length) === check :
+ type === "|=" ?
+ value === check || value.substr(0, check.length + 1) === check + "-" :
+ false;
+ },
+
+ POS: function( elem, match, i, array ) {
+ var name = match[2],
+ filter = Expr.setFilters[ name ];
+
+ if ( filter ) {
+ return filter( elem, i, match, array );
+ }
+ }
+ }
+};
+
+var origPOS = Expr.match.POS,
+ fescape = function(all, num){
+ return "\\" + (num - 0 + 1);
+ };
+
+for ( var type in Expr.match ) {
+ Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) );
+ Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) );
+}
+// Expose origPOS
+// "global" as in regardless of relation to brackets/parens
+Expr.match.globalPOS = origPOS;
+
+var makeArray = function( array, results ) {
+ array = Array.prototype.slice.call( array, 0 );
+
+ if ( results ) {
+ results.push.apply( results, array );
+ return results;
+ }
+
+ return array;
+};
+
+// Perform a simple check to determine if the browser is capable of
+// converting a NodeList to an array using builtin methods.
+// Also verifies that the returned array holds DOM nodes
+// (which is not the case in the Blackberry browser)
+try {
+ Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType;
+
+// Provide a fallback method if it does not work
+} catch( e ) {
+ makeArray = function( array, results ) {
+ var i = 0,
+ ret = results || [];
+
+ if ( toString.call(array) === "[object Array]" ) {
+ Array.prototype.push.apply( ret, array );
+
+ } else {
+ if ( typeof array.length === "number" ) {
+ for ( var l = array.length; i < l; i++ ) {
+ ret.push( array[i] );
+ }
+
+ } else {
+ for ( ; array[i]; i++ ) {
+ ret.push( array[i] );
+ }
+ }
+ }
+
+ return ret;
+ };
+}
+
+var sortOrder, siblingCheck;
+
+if ( document.documentElement.compareDocumentPosition ) {
+ sortOrder = function( a, b ) {
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+ }
+
+ if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) {
+ return a.compareDocumentPosition ? -1 : 1;
+ }
+
+ return a.compareDocumentPosition(b) & 4 ? -1 : 1;
+ };
+
+} else {
+ sortOrder = function( a, b ) {
+ // The nodes are identical, we can exit early
+ if ( a === b ) {
+ hasDuplicate = true;
+ return 0;
+
+ // Fallback to using sourceIndex (in IE) if it's available on both nodes
+ } else if ( a.sourceIndex && b.sourceIndex ) {
+ return a.sourceIndex - b.sourceIndex;
+ }
+
+ var al, bl,
+ ap = [],
+ bp = [],
+ aup = a.parentNode,
+ bup = b.parentNode,
+ cur = aup;
+
+ // If the nodes are siblings (or identical) we can do a quick check
+ if ( aup === bup ) {
+ return siblingCheck( a, b );
+
+ // If no parents were found then the nodes are disconnected
+ } else if ( !aup ) {
+ return -1;
+
+ } else if ( !bup ) {
+ return 1;
+ }
+
+ // Otherwise they're somewhere else in the tree so we need
+ // to build up a full list of the parentNodes for comparison
+ while ( cur ) {
+ ap.unshift( cur );
+ cur = cur.parentNode;
+ }
+
+ cur = bup;
+
+ while ( cur ) {
+ bp.unshift( cur );
+ cur = cur.parentNode;
+ }
+
+ al = ap.length;
+ bl = bp.length;
+
+ // Start walking down the tree looking for a discrepancy
+ for ( var i = 0; i < al && i < bl; i++ ) {
+ if ( ap[i] !== bp[i] ) {
+ return siblingCheck( ap[i], bp[i] );
+ }
+ }
+
+ // We ended someplace up the tree so do a sibling check
+ return i === al ?
+ siblingCheck( a, bp[i], -1 ) :
+ siblingCheck( ap[i], b, 1 );
+ };
+
+ siblingCheck = function( a, b, ret ) {
+ if ( a === b ) {
+ return ret;
+ }
+
+ var cur = a.nextSibling;
+
+ while ( cur ) {
+ if ( cur === b ) {
+ return -1;
+ }
+
+ cur = cur.nextSibling;
+ }
+
+ return 1;
+ };
+}
+
+// Check to see if the browser returns elements by name when
+// querying by getElementById (and provide a workaround)
+(function(){
+ // We're going to inject a fake input element with a specified name
+ var form = document.createElement("div"),
+ id = "script" + (new Date()).getTime(),
+ root = document.documentElement;
+
+ form.innerHTML = "<a name='" + id + "'/>";
+
+ // Inject it into the root element, check its status, and remove it quickly
+ root.insertBefore( form, root.firstChild );
+
+ // The workaround has to do additional checks after a getElementById
+ // Which slows things down for other browsers (hence the branching)
+ if ( document.getElementById( id ) ) {
+ Expr.find.ID = function( match, context, isXML ) {
+ if ( typeof context.getElementById !== "undefined" && !isXML ) {
+ var m = context.getElementById(match[1]);
+
+ return m ?
+ m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ?
+ [m] :
+ undefined :
+ [];
+ }
+ };
+
+ Expr.filter.ID = function( elem, match ) {
+ var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
+
+ return elem.nodeType === 1 && node && node.nodeValue === match;
+ };
+ }
+
+ root.removeChild( form );
+
+ // release memory in IE
+ root = form = null;
+})();
+
+(function(){
+ // Check to see if the browser returns only elements
+ // when doing getElementsByTagName("*")
+
+ // Create a fake element
+ var div = document.createElement("div");
+ div.appendChild( document.createComment("") );
+
+ // Make sure no comments are found
+ if ( div.getElementsByTagName("*").length > 0 ) {
+ Expr.find.TAG = function( match, context ) {
+ var results = context.getElementsByTagName( match[1] );
+
+ // Filter out possible comments
+ if ( match[1] === "*" ) {
+ var tmp = [];
+
+ for ( var i = 0; results[i]; i++ ) {
+ if ( results[i].nodeType === 1 ) {
+ tmp.push( results[i] );
+ }
+ }
+
+ results = tmp;
+ }
+
+ return results;
+ };
+ }
+
+ // Check to see if an attribute returns normalized href attributes
+ div.innerHTML = "<a href='#'></a>";
+
+ if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" &&
+ div.firstChild.getAttribute("href") !== "#" ) {
+
+ Expr.attrHandle.href = function( elem ) {
+ return elem.getAttribute( "href", 2 );
+ };
+ }
+
+ // release memory in IE
+ div = null;
+})();
+
+if ( document.querySelectorAll ) {
+ (function(){
+ var oldSizzle = Sizzle,
+ div = document.createElement("div"),
+ id = "__sizzle__";
+
+ div.innerHTML = "<p class='TEST'></p>";
+
+ // Safari can't handle uppercase or unicode characters when
+ // in quirks mode.
+ if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
+ return;
+ }
+
+ Sizzle = function( query, context, extra, seed ) {
+ context = context || document;
+
+ // Only use querySelectorAll on non-XML documents
+ // (ID selectors don't work in non-HTML documents)
+ if ( !seed && !Sizzle.isXML(context) ) {
+ // See if we find a selector to speed up
+ var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query );
+
+ if ( match && (context.nodeType === 1 || context.nodeType === 9) ) {
+ // Speed-up: Sizzle("TAG")
+ if ( match[1] ) {
+ return makeArray( context.getElementsByTagName( query ), extra );
+
+ // Speed-up: Sizzle(".CLASS")
+ } else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) {
+ return makeArray( context.getElementsByClassName( match[2] ), extra );
+ }
+ }
+
+ if ( context.nodeType === 9 ) {
+ // Speed-up: Sizzle("body")
+ // The body element only exists once, optimize finding it
+ if ( query === "body" && context.body ) {
+ return makeArray( [ context.body ], extra );
+
+ // Speed-up: Sizzle("#ID")
+ } else if ( match && match[3] ) {
+ var elem = context.getElementById( match[3] );
+
+ // Check parentNode to catch when Blackberry 4.6 returns
+ // nodes that are no longer in the document #6963
+ if ( elem && elem.parentNode ) {
+ // Handle the case where IE and Opera return items
+ // by name instead of ID
+ if ( elem.id === match[3] ) {
+ return makeArray( [ elem ], extra );
+ }
+
+ } else {
+ return makeArray( [], extra );
+ }
+ }
+
+ try {
+ return makeArray( context.querySelectorAll(query), extra );
+ } catch(qsaError) {}
+
+ // qSA works strangely on Element-rooted queries
+ // We can work around this by specifying an extra ID on the root
+ // and working up from there (Thanks to Andrew Dupont for the technique)
+ // IE 8 doesn't work on object elements
+ } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
+ var oldContext = context,
+ old = context.getAttribute( "id" ),
+ nid = old || id,
+ hasParent = context.parentNode,
+ relativeHierarchySelector = /^\s*[+~]/.test( query );
+
+ if ( !old ) {
+ context.setAttribute( "id", nid );
+ } else {
+ nid = nid.replace( /'/g, "\\$&" );
+ }
+ if ( relativeHierarchySelector && hasParent ) {
+ context = context.parentNode;
+ }
+
+ try {
+ if ( !relativeHierarchySelector || hasParent ) {
+ return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra );
+ }
+
+ } catch(pseudoError) {
+ } finally {
+ if ( !old ) {
+ oldContext.removeAttribute( "id" );
+ }
+ }
+ }
+ }
+
+ return oldSizzle(query, context, extra, seed);
+ };
+
+ for ( var prop in oldSizzle ) {
+ Sizzle[ prop ] = oldSizzle[ prop ];
+ }
+
+ // release memory in IE
+ div = null;
+ })();
+}
+
+(function(){
+ var html = document.documentElement,
+ matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector;
+
+ if ( matches ) {
+ // Check to see if it's possible to do matchesSelector
+ // on a disconnected node (IE 9 fails this)
+ var disconnectedMatch = !matches.call( document.createElement( "div" ), "div" ),
+ pseudoWorks = false;
+
+ try {
+ // This should fail with an exception
+ // Gecko does not error, returns false instead
+ matches.call( document.documentElement, "[test!='']:sizzle" );
+
+ } catch( pseudoError ) {
+ pseudoWorks = true;
+ }
+
+ Sizzle.matchesSelector = function( node, expr ) {
+ // Make sure that attribute selectors are quoted
+ expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
+
+ if ( !Sizzle.isXML( node ) ) {
+ try {
+ if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) {
+ var ret = matches.call( node, expr );
+
+ // IE 9's matchesSelector returns false on disconnected nodes
+ if ( ret || !disconnectedMatch ||
+ // As well, disconnected nodes are said to be in a document
+ // fragment in IE 9, so check for that
+ node.document && node.document.nodeType !== 11 ) {
+ return ret;
+ }
+ }
+ } catch(e) {}
+ }
+
+ return Sizzle(expr, null, null, [node]).length > 0;
+ };
+ }
+})();
+
+(function(){
+ var div = document.createElement("div");
+
+ div.innerHTML = "<div class='test e'></div><div class='test'></div>";
+
+ // Opera can't find a second classname (in 9.6)
+ // Also, make sure that getElementsByClassName actually exists
+ if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) {
+ return;
+ }
+
+ // Safari caches class attributes, doesn't catch changes (in 3.2)
+ div.lastChild.className = "e";
+
+ if ( div.getElementsByClassName("e").length === 1 ) {
+ return;
+ }
+
+ Expr.order.splice(1, 0, "CLASS");
+ Expr.find.CLASS = function( match, context, isXML ) {
+ if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) {
+ return context.getElementsByClassName(match[1]);
+ }
+ };
+
+ // release memory in IE
+ div = null;
+})();
+
+function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
+ for ( var i = 0, l = checkSet.length; i < l; i++ ) {
+ var elem = checkSet[i];
+
+ if ( elem ) {
+ var match = false;
+
+ elem = elem[dir];
+
+ while ( elem ) {
+ if ( elem[ expando ] === doneName ) {
+ match = checkSet[elem.sizset];
+ break;
+ }
+
+ if ( elem.nodeType === 1 && !isXML ){
+ elem[ expando ] = doneName;
+ elem.sizset = i;
+ }
+
+ if ( elem.nodeName.toLowerCase() === cur ) {
+ match = elem;
+ break;
+ }
+
+ elem = elem[dir];
+ }
+
+ checkSet[i] = match;
+ }
+ }
+}
+
+function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
+ for ( var i = 0, l = checkSet.length; i < l; i++ ) {
+ var elem = checkSet[i];
+
+ if ( elem ) {
+ var match = false;
+
+ elem = elem[dir];
+
+ while ( elem ) {
+ if ( elem[ expando ] === doneName ) {
+ match = checkSet[elem.sizset];
+ break;
+ }
+
+ if ( elem.nodeType === 1 ) {
+ if ( !isXML ) {
+ elem[ expando ] = doneName;
+ elem.sizset = i;
+ }
+
+ if ( typeof cur !== "string" ) {
+ if ( elem === cur ) {
+ match = true;
+ break;
+ }
+
+ } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) {
+ match = elem;
+ break;
+ }
+ }
+
+ elem = elem[dir];
+ }
+
+ checkSet[i] = match;
+ }
+ }
+}
+
+if ( document.documentElement.contains ) {
+ Sizzle.contains = function( a, b ) {
+ return a !== b && (a.contains ? a.contains(b) : true);
+ };
+
+} else if ( document.documentElement.compareDocumentPosition ) {
+ Sizzle.contains = function( a, b ) {
+ return !!(a.compareDocumentPosition(b) & 16);
+ };
+
+} else {
+ Sizzle.contains = function() {
+ return false;
+ };
+}
+
+Sizzle.isXML = function( elem ) {
+ // documentElement is verified for cases where it doesn't yet exist
+ // (such as loading iframes in IE - #4833)
+ var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;
+
+ return documentElement ? documentElement.nodeName !== "HTML" : false;
+};
+
+var posProcess = function( selector, context, seed ) {
+ var match,
+ tmpSet = [],
+ later = "",
+ root = context.nodeType ? [context] : context;
+
+ // Position selectors must be done after the filter
+ // And so must :not(positional) so we move all PSEUDOs to the end
+ while ( (match = Expr.match.PSEUDO.exec( selector )) ) {
+ later += match[0];
+ selector = selector.replace( Expr.match.PSEUDO, "" );
+ }
+
+ selector = Expr.relative[selector] ? selector + "*" : selector;
+
+ for ( var i = 0, l = root.length; i < l; i++ ) {
+ Sizzle( selector, root[i], tmpSet, seed );
+ }
+
+ return Sizzle.filter( later, tmpSet );
+};
+
+// EXPOSE
+
+window.tinymce.dom.Sizzle = Sizzle;
+
+})();
+
+
+(function(tinymce) {
+ tinymce.dom.Element = function(id, settings) {
+ var t = this, dom, el;
+
+ t.settings = settings = settings || {};
+ t.id = id;
+ t.dom = dom = settings.dom || tinymce.DOM;
+
+ // Only IE leaks DOM references, this is a lot faster
+ if (!tinymce.isIE)
+ el = dom.get(t.id);
+
+ tinymce.each(
+ ('getPos,getRect,getParent,add,setStyle,getStyle,setStyles,' +
+ 'setAttrib,setAttribs,getAttrib,addClass,removeClass,' +
+ 'hasClass,getOuterHTML,setOuterHTML,remove,show,hide,' +
+ 'isHidden,setHTML,get').split(/,/), function(k) {
+ t[k] = function() {
+ var a = [id], i;
+
+ for (i = 0; i < arguments.length; i++)
+ a.push(arguments[i]);
+
+ a = dom[k].apply(dom, a);
+ t.update(k);
+
+ return a;
+ };
+ }
+ );
+
+ tinymce.extend(t, {
+ on : function(n, f, s) {
+ return tinymce.dom.Event.add(t.id, n, f, s);
+ },
+
+ getXY : function() {
+ return {
+ x : parseInt(t.getStyle('left')),
+ y : parseInt(t.getStyle('top'))
+ };
+ },
+
+ getSize : function() {
+ var n = dom.get(t.id);
+
+ return {
+ w : parseInt(t.getStyle('width') || n.clientWidth),
+ h : parseInt(t.getStyle('height') || n.clientHeight)
+ };
+ },
+
+ moveTo : function(x, y) {
+ t.setStyles({left : x, top : y});
+ },
+
+ moveBy : function(x, y) {
+ var p = t.getXY();
+
+ t.moveTo(p.x + x, p.y + y);
+ },
+
+ resizeTo : function(w, h) {
+ t.setStyles({width : w, height : h});
+ },
+
+ resizeBy : function(w, h) {
+ var s = t.getSize();
+
+ t.resizeTo(s.w + w, s.h + h);
+ },
+
+ update : function(k) {
+ var b;
+
+ if (tinymce.isIE6 && settings.blocker) {
+ k = k || '';
+
+ // Ignore getters
+ if (k.indexOf('get') === 0 || k.indexOf('has') === 0 || k.indexOf('is') === 0)
+ return;
+
+ // Remove blocker on remove
+ if (k == 'remove') {
+ dom.remove(t.blocker);
+ return;
+ }
+
+ if (!t.blocker) {
+ t.blocker = dom.uniqueId();
+ b = dom.add(settings.container || dom.getRoot(), 'iframe', {id : t.blocker, style : 'position:absolute;', frameBorder : 0, src : 'javascript:""'});
+ dom.setStyle(b, 'opacity', 0);
+ } else
+ b = dom.get(t.blocker);
+
+ dom.setStyles(b, {
+ left : t.getStyle('left', 1),
+ top : t.getStyle('top', 1),
+ width : t.getStyle('width', 1),
+ height : t.getStyle('height', 1),
+ display : t.getStyle('display', 1),
+ zIndex : parseInt(t.getStyle('zIndex', 1) || 0) - 1
+ });
+ }
+ }
+ });
+ };
+})(tinymce);
+
+(function(tinymce) {
+ function trimNl(s) {
+ return s.replace(/[\n\r]+/g, '');
+ };
+
+ // Shorten names
+ var is = tinymce.is, isIE = tinymce.isIE, each = tinymce.each, TreeWalker = tinymce.dom.TreeWalker;
+
+ tinymce.create('tinymce.dom.Selection', {
+ Selection : function(dom, win, serializer, editor) {
+ var t = this;
+
+ t.dom = dom;
+ t.win = win;
+ t.serializer = serializer;
+ t.editor = editor;
+
+ // Add events
+ each([
+ 'onBeforeSetContent',
+
+ 'onBeforeGetContent',
+
+ 'onSetContent',
+
+ 'onGetContent'
+ ], function(e) {
+ t[e] = new tinymce.util.Dispatcher(t);
+ });
+
+ // No W3C Range support
+ if (!t.win.getSelection)
+ t.tridentSel = new tinymce.dom.TridentSelection(t);
+
+ if (tinymce.isIE && dom.boxModel)
+ this._fixIESelection();
+
+ // Prevent leaks
+ tinymce.addUnload(t.destroy, t);
+ },
+
+ setCursorLocation: function(node, offset) {
+ var t = this; var r = t.dom.createRng();
+ r.setStart(node, offset);
+ r.setEnd(node, offset);
+ t.setRng(r);
+ t.collapse(false);
+ },
+ getContent : function(s) {
+ var t = this, r = t.getRng(), e = t.dom.create("body"), se = t.getSel(), wb, wa, n;
+
+ s = s || {};
+ wb = wa = '';
+ s.get = true;
+ s.format = s.format || 'html';
+ s.forced_root_block = '';
+ t.onBeforeGetContent.dispatch(t, s);
+
+ if (s.format == 'text')
+ return t.isCollapsed() ? '' : (r.text || (se.toString ? se.toString() : ''));
+
+ if (r.cloneContents) {
+ n = r.cloneContents();
+
+ if (n)
+ e.appendChild(n);
+ } else if (is(r.item) || is(r.htmlText)) {
+ // IE will produce invalid markup if elements are present that
+ // it doesn't understand like custom elements or HTML5 elements.
+ // Adding a BR in front of the contents and then remoiving it seems to fix it though.
+ e.innerHTML = '<br>' + (r.item ? r.item(0).outerHTML : r.htmlText);
+ e.removeChild(e.firstChild);
+ } else
+ e.innerHTML = r.toString();
+
+ // Keep whitespace before and after
+ if (/^\s/.test(e.innerHTML))
+ wb = ' ';
+
+ if (/\s+$/.test(e.innerHTML))
+ wa = ' ';
+
+ s.getInner = true;
+
+ s.content = t.isCollapsed() ? '' : wb + t.serializer.serialize(e, s) + wa;
+ t.onGetContent.dispatch(t, s);
+
+ return s.content;
+ },
+
+ setContent : function(content, args) {
+ var self = this, rng = self.getRng(), caretNode, doc = self.win.document, frag, temp;
+
+ args = args || {format : 'html'};
+ args.set = true;
+ content = args.content = content;
+
+ // Dispatch before set content event
+ if (!args.no_events)
+ self.onBeforeSetContent.dispatch(self, args);
+
+ content = args.content;
+
+ if (rng.insertNode) {
+ // Make caret marker since insertNode places the caret in the beginning of text after insert
+ content += '<span id="__caret">_</span>';
+
+ // Delete and insert new node
+ if (rng.startContainer == doc && rng.endContainer == doc) {
+ // WebKit will fail if the body is empty since the range is then invalid and it can't insert contents
+ doc.body.innerHTML = content;
+ } else {
+ rng.deleteContents();
+
+ if (doc.body.childNodes.length === 0) {
+ doc.body.innerHTML = content;
+ } else {
+ // createContextualFragment doesn't exists in IE 9 DOMRanges
+ if (rng.createContextualFragment) {
+ rng.insertNode(rng.createContextualFragment(content));
+ } else {
+ // Fake createContextualFragment call in IE 9
+ frag = doc.createDocumentFragment();
+ temp = doc.createElement('div');
+
+ frag.appendChild(temp);
+ temp.outerHTML = content;
+
+ rng.insertNode(frag);
+ }
+ }
+ }
+
+ // Move to caret marker
+ caretNode = self.dom.get('__caret');
+
+ // Make sure we wrap it compleatly, Opera fails with a simple select call
+ rng = doc.createRange();
+ rng.setStartBefore(caretNode);
+ rng.setEndBefore(caretNode);
+ self.setRng(rng);
+
+ // Remove the caret position
+ self.dom.remove('__caret');
+
+ try {
+ self.setRng(rng);
+ } catch (ex) {
+ // Might fail on Opera for some odd reason
+ }
+ } else {
+ if (rng.item) {
+ // Delete content and get caret text selection
+ doc.execCommand('Delete', false, null);
+ rng = self.getRng();
+ }
+
+ // Explorer removes spaces from the beginning of pasted contents
+ if (/^\s+/.test(content)) {
+ rng.pasteHTML('<span id="__mce_tmp">_</span>' + content);
+ self.dom.remove('__mce_tmp');
+ } else
+ rng.pasteHTML(content);
+ }
+
+ // Dispatch set content event
+ if (!args.no_events)
+ self.onSetContent.dispatch(self, args);
+ },
+
+ getStart : function() {
+ var self = this, rng = self.getRng(), startElement, parentElement, checkRng, node;
+
+ if (rng.duplicate || rng.item) {
+ // Control selection, return first item
+ if (rng.item)
+ return rng.item(0);
+
+ // Get start element
+ checkRng = rng.duplicate();
+ checkRng.collapse(1);
+ startElement = checkRng.parentElement();
+ if (startElement.ownerDocument !== self.dom.doc) {
+ startElement = self.dom.getRoot();
+ }
+
+ // Check if range parent is inside the start element, then return the inner parent element
+ // This will fix issues when a single element is selected, IE would otherwise return the wrong start element
+ parentElement = node = rng.parentElement();
+ while (node = node.parentNode) {
+ if (node == startElement) {
+ startElement = parentElement;
+ break;
+ }
+ }
+
+ return startElement;
+ } else {
+ startElement = rng.startContainer;
+
+ if (startElement.nodeType == 1 && startElement.hasChildNodes())
+ startElement = startElement.childNodes[Math.min(startElement.childNodes.length - 1, rng.startOffset)];
+
+ if (startElement && startElement.nodeType == 3)
+ return startElement.parentNode;
+
+ return startElement;
+ }
+ },
+
+ getEnd : function() {
+ var self = this, rng = self.getRng(), endElement, endOffset;
+
+ if (rng.duplicate || rng.item) {
+ if (rng.item)
+ return rng.item(0);
+
+ rng = rng.duplicate();
+ rng.collapse(0);
+ endElement = rng.parentElement();
+ if (endElement.ownerDocument !== self.dom.doc) {
+ endElement = self.dom.getRoot();
+ }
+
+ if (endElement && endElement.nodeName == 'BODY')
+ return endElement.lastChild || endElement;
+
+ return endElement;
+ } else {
+ endElement = rng.endContainer;
+ endOffset = rng.endOffset;
+
+ if (endElement.nodeType == 1 && endElement.hasChildNodes())
+ endElement = endElement.childNodes[endOffset > 0 ? endOffset - 1 : endOffset];
+
+ if (endElement && endElement.nodeType == 3)
+ return endElement.parentNode;
+
+ return endElement;
+ }
+ },
+
+ getBookmark : function(type, normalized) {
+ var t = this, dom = t.dom, rng, rng2, id, collapsed, name, element, index, chr = '\uFEFF', styles;
+
+ function findIndex(name, element) {
+ var index = 0;
+
+ each(dom.select(name), function(node, i) {
+ if (node == element)
+ index = i;
+ });
+
+ return index;
+ };
+
+ function normalizeTableCellSelection(rng) {
+ function moveEndPoint(start) {
+ var container, offset, childNodes, prefix = start ? 'start' : 'end';
+
+ container = rng[prefix + 'Container'];
+ offset = rng[prefix + 'Offset'];
+
+ if (container.nodeType == 1 && container.nodeName == "TR") {
+ childNodes = container.childNodes;
+ container = childNodes[Math.min(start ? offset : offset - 1, childNodes.length - 1)];
+ if (container) {
+ offset = start ? 0 : container.childNodes.length;
+ rng['set' + (start ? 'Start' : 'End')](container, offset);
+ }
+ }
+ };
+
+ moveEndPoint(true);
+ moveEndPoint();
+
+ return rng;
+ };
+
+ function getLocation() {
+ var rng = t.getRng(true), root = dom.getRoot(), bookmark = {};
+
+ function getPoint(rng, start) {
+ var container = rng[start ? 'startContainer' : 'endContainer'],
+ offset = rng[start ? 'startOffset' : 'endOffset'], point = [], node, childNodes, after = 0;
+
+ if (container.nodeType == 3) {
+ if (normalized) {
+ for (node = container.previousSibling; node && node.nodeType == 3; node = node.previousSibling)
+ offset += node.nodeValue.length;
+ }
+
+ point.push(offset);
+ } else {
+ childNodes = container.childNodes;
+
+ if (offset >= childNodes.length && childNodes.length) {
+ after = 1;
+ offset = Math.max(0, childNodes.length - 1);
+ }
+
+ point.push(t.dom.nodeIndex(childNodes[offset], normalized) + after);
+ }
+
+ for (; container && container != root; container = container.parentNode)
+ point.push(t.dom.nodeIndex(container, normalized));
+
+ return point;
+ };
+
+ bookmark.start = getPoint(rng, true);
+
+ if (!t.isCollapsed())
+ bookmark.end = getPoint(rng);
+
+ return bookmark;
+ };
+
+ if (type == 2) {
+ if (t.tridentSel)
+ return t.tridentSel.getBookmark(type);
+
+ return getLocation();
+ }
+
+ // Handle simple range
+ if (type)
+ return {rng : t.getRng()};
+
+ rng = t.getRng();
+ id = dom.uniqueId();
+ collapsed = tinyMCE.activeEditor.selection.isCollapsed();
+ styles = 'overflow:hidden;line-height:0px';
+
+ // Explorer method
+ if (rng.duplicate || rng.item) {
+ // Text selection
+ if (!rng.item) {
+ rng2 = rng.duplicate();
+
+ try {
+ // Insert start marker
+ rng.collapse();
+ rng.pasteHTML('<span data-mce-type="bookmark" id="' + id + '_start" style="' + styles + '">' + chr + '</span>');
+
+ // Insert end marker
+ if (!collapsed) {
+ rng2.collapse(false);
+
+ // Detect the empty space after block elements in IE and move the end back one character <p></p>] becomes <p>]</p>
+ rng.moveToElementText(rng2.parentElement());
+ if (rng.compareEndPoints('StartToEnd', rng2) === 0)
+ rng2.move('character', -1);
+
+ rng2.pasteHTML('<span data-mce-type="bookmark" id="' + id + '_end" style="' + styles + '">' + chr + '</span>');
+ }
+ } catch (ex) {
+ // IE might throw unspecified error so lets ignore it
+ return null;
+ }
+ } else {
+ // Control selection
+ element = rng.item(0);
+ name = element.nodeName;
+
+ return {name : name, index : findIndex(name, element)};
+ }
+ } else {
+ element = t.getNode();
+ name = element.nodeName;
+ if (name == 'IMG')
+ return {name : name, index : findIndex(name, element)};
+
+ // W3C method
+ rng2 = normalizeTableCellSelection(rng.cloneRange());
+
+ // Insert end marker
+ if (!collapsed) {
+ rng2.collapse(false);
+ rng2.insertNode(dom.create('span', {'data-mce-type' : "bookmark", id : id + '_end', style : styles}, chr));
+ }
+
+ rng = normalizeTableCellSelection(rng);
+ rng.collapse(true);
+ rng.insertNode(dom.create('span', {'data-mce-type' : "bookmark", id : id + '_start', style : styles}, chr));
+ }
+
+ t.moveToBookmark({id : id, keep : 1});
+
+ return {id : id};
+ },
+
+ moveToBookmark : function(bookmark) {
+ var t = this, dom = t.dom, marker1, marker2, rng, root, startContainer, endContainer, startOffset, endOffset;
+
+ function setEndPoint(start) {
+ var point = bookmark[start ? 'start' : 'end'], i, node, offset, children;
+
+ if (point) {
+ offset = point[0];
+
+ // Find container node
+ for (node = root, i = point.length - 1; i >= 1; i--) {
+ children = node.childNodes;
+
+ if (point[i] > children.length - 1)
+ return;
+
+ node = children[point[i]];
+ }
+
+ // Move text offset to best suitable location
+ if (node.nodeType === 3)
+ offset = Math.min(point[0], node.nodeValue.length);
+
+ // Move element offset to best suitable location
+ if (node.nodeType === 1)
+ offset = Math.min(point[0], node.childNodes.length);
+
+ // Set offset within container node
+ if (start)
+ rng.setStart(node, offset);
+ else
+ rng.setEnd(node, offset);
+ }
+
+ return true;
+ };
+
+ function restoreEndPoint(suffix) {
+ var marker = dom.get(bookmark.id + '_' + suffix), node, idx, next, prev, keep = bookmark.keep;
+
+ if (marker) {
+ node = marker.parentNode;
+
+ if (suffix == 'start') {
+ if (!keep) {
+ idx = dom.nodeIndex(marker);
+ } else {
+ node = marker.firstChild;
+ idx = 1;
+ }
+
+ startContainer = endContainer = node;
+ startOffset = endOffset = idx;
+ } else {
+ if (!keep) {
+ idx = dom.nodeIndex(marker);
+ } else {
+ node = marker.firstChild;
+ idx = 1;
+ }
+
+ endContainer = node;
+ endOffset = idx;
+ }
+
+ if (!keep) {
+ prev = marker.previousSibling;
+ next = marker.nextSibling;
+
+ // Remove all marker text nodes
+ each(tinymce.grep(marker.childNodes), function(node) {
+ if (node.nodeType == 3)
+ node.nodeValue = node.nodeValue.replace(/\uFEFF/g, '');
+ });
+
+ // Remove marker but keep children if for example contents where inserted into the marker
+ // Also remove duplicated instances of the marker for example by a split operation or by WebKit auto split on paste feature
+ while (marker = dom.get(bookmark.id + '_' + suffix))
+ dom.remove(marker, 1);
+
+ // If siblings are text nodes then merge them unless it's Opera since it some how removes the node
+ // and we are sniffing since adding a lot of detection code for a browser with 3% of the market isn't worth the effort. Sorry, Opera but it's just a fact
+ if (prev && next && prev.nodeType == next.nodeType && prev.nodeType == 3 && !tinymce.isOpera) {
+ idx = prev.nodeValue.length;
+ prev.appendData(next.nodeValue);
+ dom.remove(next);
+
+ if (suffix == 'start') {
+ startContainer = endContainer = prev;
+ startOffset = endOffset = idx;
+ } else {
+ endContainer = prev;
+ endOffset = idx;
+ }
+ }
+ }
+ }
+ };
+
+ function addBogus(node) {
+ // Adds a bogus BR element for empty block elements
+ if (dom.isBlock(node) && !node.innerHTML && !isIE)
+ node.innerHTML = '<br data-mce-bogus="1" />';
+
+ return node;
+ };
+
+ if (bookmark) {
+ if (bookmark.start) {
+ rng = dom.createRng();
+ root = dom.getRoot();
+
+ if (t.tridentSel)
+ return t.tridentSel.moveToBookmark(bookmark);
+
+ if (setEndPoint(true) && setEndPoint()) {
+ t.setRng(rng);
+ }
+ } else if (bookmark.id) {
+ // Restore start/end points
+ restoreEndPoint('start');
+ restoreEndPoint('end');
+
+ if (startContainer) {
+ rng = dom.createRng();
+ rng.setStart(addBogus(startContainer), startOffset);
+ rng.setEnd(addBogus(endContainer), endOffset);
+ t.setRng(rng);
+ }
+ } else if (bookmark.name) {
+ t.select(dom.select(bookmark.name)[bookmark.index]);
+ } else if (bookmark.rng)
+ t.setRng(bookmark.rng);
+ }
+ },
+
+ select : function(node, content) {
+ var t = this, dom = t.dom, rng = dom.createRng(), idx;
+
+ function setPoint(node, start) {
+ var walker = new TreeWalker(node, node);
+
+ do {
+ // Text node
+ if (node.nodeType == 3 && tinymce.trim(node.nodeValue).length !== 0) {
+ if (start)
+ rng.setStart(node, 0);
+ else
+ rng.setEnd(node, node.nodeValue.length);
+
+ return;
+ }
+
+ // BR element
+ if (node.nodeName == 'BR') {
+ if (start)
+ rng.setStartBefore(node);
+ else
+ rng.setEndBefore(node);
+
+ return;
+ }
+ } while (node = (start ? walker.next() : walker.prev()));
+ };
+
+ if (node) {
+ idx = dom.nodeIndex(node);
+ rng.setStart(node.parentNode, idx);
+ rng.setEnd(node.parentNode, idx + 1);
+
+ // Find first/last text node or BR element
+ if (content) {
+ setPoint(node, 1);
+ setPoint(node);
+ }
+
+ t.setRng(rng);
+ }
+
+ return node;
+ },
+
+ isCollapsed : function() {
+ var t = this, r = t.getRng(), s = t.getSel();
+
+ if (!r || r.item)
+ return false;
+
+ if (r.compareEndPoints)
+ return r.compareEndPoints('StartToEnd', r) === 0;
+
+ return !s || r.collapsed;
+ },
+
+ collapse : function(to_start) {
+ var self = this, rng = self.getRng(), node;
+
+ // Control range on IE
+ if (rng.item) {
+ node = rng.item(0);
+ rng = self.win.document.body.createTextRange();
+ rng.moveToElementText(node);
+ }
+
+ rng.collapse(!!to_start);
+ self.setRng(rng);
+ },
+
+ getSel : function() {
+ var t = this, w = this.win;
+
+ return w.getSelection ? w.getSelection() : w.document.selection;
+ },
+
+ getRng : function(w3c) {
+ var self = this, selection, rng, elm, doc = self.win.document;
+
+ // Found tridentSel object then we need to use that one
+ if (w3c && self.tridentSel) {
+ return self.tridentSel.getRangeAt(0);
+ }
+
+ try {
+ if (selection = self.getSel()) {
+ rng = selection.rangeCount > 0 ? selection.getRangeAt(0) : (selection.createRange ? selection.createRange() : doc.createRange());
+ }
+ } catch (ex) {
+ // IE throws unspecified error here if TinyMCE is placed in a frame/iframe
+ }
+
+ // We have W3C ranges and it's IE then fake control selection since IE9 doesn't handle that correctly yet
+ if (tinymce.isIE && rng && rng.setStart && doc.selection.createRange().item) {
+ elm = doc.selection.createRange().item(0);
+ rng = doc.createRange();
+ rng.setStartBefore(elm);
+ rng.setEndAfter(elm);
+ }
+
+ // No range found then create an empty one
+ // This can occur when the editor is placed in a hidden container element on Gecko
+ // Or on IE when there was an exception
+ if (!rng) {
+ rng = doc.createRange ? doc.createRange() : doc.body.createTextRange();
+ }
+
+ // If range is at start of document then move it to start of body
+ if (rng.setStart && rng.startContainer.nodeType === 9 && rng.collapsed) {
+ elm = self.dom.getRoot();
+ rng.setStart(elm, 0);
+ rng.setEnd(elm, 0);
+ }
+
+ if (self.selectedRange && self.explicitRange) {
+ if (rng.compareBoundaryPoints(rng.START_TO_START, self.selectedRange) === 0 && rng.compareBoundaryPoints(rng.END_TO_END, self.selectedRange) === 0) {
+ // Safari, Opera and Chrome only ever select text which causes the range to change.
+ // This lets us use the originally set range if the selection hasn't been changed by the user.
+ rng = self.explicitRange;
+ } else {
+ self.selectedRange = null;
+ self.explicitRange = null;
+ }
+ }
+
+ return rng;
+ },
+
+ setRng : function(r, forward) {
+ var s, t = this;
+
+ if (!t.tridentSel) {
+ s = t.getSel();
+
+ if (s) {
+ t.explicitRange = r;
+
+ try {
+ s.removeAllRanges();
+ } catch (ex) {
+ // IE9 might throw errors here don't know why
+ }
+
+ s.addRange(r);
+
+ // Forward is set to false and we have an extend function
+ if (forward === false && s.extend) {
+ s.collapse(r.endContainer, r.endOffset);
+ s.extend(r.startContainer, r.startOffset);
+ }
+
+ // adding range isn't always successful so we need to check range count otherwise an exception can occur
+ t.selectedRange = s.rangeCount > 0 ? s.getRangeAt(0) : null;
+ }
+ } else {
+ // Is W3C Range
+ if (r.cloneRange) {
+ try {
+ t.tridentSel.addRange(r);
+ return;
+ } catch (ex) {
+ //IE9 throws an error here if called before selection is placed in the editor
+ }
+ }
+
+ // Is IE specific range
+ try {
+ r.select();
+ } catch (ex) {
+ // Needed for some odd IE bug #1843306
+ }
+ }
+ },
+
+ setNode : function(n) {
+ var t = this;
+
+ t.setContent(t.dom.getOuterHTML(n));
+
+ return n;
+ },
+
+ getNode : function() {
+ var t = this, rng = t.getRng(), sel = t.getSel(), elm, start = rng.startContainer, end = rng.endContainer;
+
+ function skipEmptyTextNodes(n, forwards) {
+ var orig = n;
+ while (n && n.nodeType === 3 && n.length === 0) {
+ n = forwards ? n.nextSibling : n.previousSibling;
+ }
+ return n || orig;
+ };
+
+ // Range maybe lost after the editor is made visible again
+ if (!rng)
+ return t.dom.getRoot();
+
+ if (rng.setStart) {
+ elm = rng.commonAncestorContainer;
+
+ // Handle selection a image or other control like element such as anchors
+ if (!rng.collapsed) {
+ if (rng.startContainer == rng.endContainer) {
+ if (rng.endOffset - rng.startOffset < 2) {
+ if (rng.startContainer.hasChildNodes())
+ elm = rng.startContainer.childNodes[rng.startOffset];
+ }
+ }
+
+ // If the anchor node is a element instead of a text node then return this element
+ //if (tinymce.isWebKit && sel.anchorNode && sel.anchorNode.nodeType == 1)
+ // return sel.anchorNode.childNodes[sel.anchorOffset];
+
+ // Handle cases where the selection is immediately wrapped around a node and return that node instead of it's parent.
+ // This happens when you double click an underlined word in FireFox.
+ if (start.nodeType === 3 && end.nodeType === 3) {
+ if (start.length === rng.startOffset) {
+ start = skipEmptyTextNodes(start.nextSibling, true);
+ } else {
+ start = start.parentNode;
+ }
+ if (rng.endOffset === 0) {
+ end = skipEmptyTextNodes(end.previousSibling, false);
+ } else {
+ end = end.parentNode;
+ }
+
+ if (start && start === end)
+ return start;
+ }
+ }
+
+ if (elm && elm.nodeType == 3)
+ return elm.parentNode;
+
+ return elm;
+ }
+
+ return rng.item ? rng.item(0) : rng.parentElement();
+ },
+
+ getSelectedBlocks : function(st, en) {
+ var t = this, dom = t.dom, sb, eb, n, bl = [];
+
+ sb = dom.getParent(st || t.getStart(), dom.isBlock);
+ eb = dom.getParent(en || t.getEnd(), dom.isBlock);
+
+ if (sb)
+ bl.push(sb);
+
+ if (sb && eb && sb != eb) {
+ n = sb;
+
+ var walker = new TreeWalker(sb, dom.getRoot());
+ while ((n = walker.next()) && n != eb) {
+ if (dom.isBlock(n))
+ bl.push(n);
+ }
+ }
+
+ if (eb && sb != eb)
+ bl.push(eb);
+
+ return bl;
+ },
+
+ isForward: function(){
+ var dom = this.dom, sel = this.getSel(), anchorRange, focusRange;
+
+ // No support for selection direction then always return true
+ if (!sel || sel.anchorNode == null || sel.focusNode == null) {
+ return true;
+ }
+
+ anchorRange = dom.createRng();
+ anchorRange.setStart(sel.anchorNode, sel.anchorOffset);
+ anchorRange.collapse(true);
+
+ focusRange = dom.createRng();
+ focusRange.setStart(sel.focusNode, sel.focusOffset);
+ focusRange.collapse(true);
+
+ return anchorRange.compareBoundaryPoints(anchorRange.START_TO_START, focusRange) <= 0;
+ },
+
+ normalize : function() {
+ var self = this, rng, normalized, collapsed, node, sibling;
+
+ function normalizeEndPoint(start) {
+ var container, offset, walker, dom = self.dom, body = dom.getRoot(), node, nonEmptyElementsMap, nodeName;
+
+ function hasBrBeforeAfter(node, left) {
+ var walker = new TreeWalker(node, dom.getParent(node.parentNode, dom.isBlock) || body);
+
+ while (node = walker[left ? 'prev' : 'next']()) {
+ if (node.nodeName === "BR") {
+ return true;
+ }
+ }
+ };
+
+ // Walks the dom left/right to find a suitable text node to move the endpoint into
+ // It will only walk within the current parent block or body and will stop if it hits a block or a BR/IMG
+ function findTextNodeRelative(left, startNode) {
+ var walker, lastInlineElement;
+
+ startNode = startNode || container;
+ walker = new TreeWalker(startNode, dom.getParent(startNode.parentNode, dom.isBlock) || body);
+
+ // Walk left until we hit a text node we can move to or a block/br/img
+ while (node = walker[left ? 'prev' : 'next']()) {
+ // Found text node that has a length
+ if (node.nodeType === 3 && node.nodeValue.length > 0) {
+ container = node;
+ offset = left ? node.nodeValue.length : 0;
+ normalized = true;
+ return;
+ }
+
+ // Break if we find a block or a BR/IMG/INPUT etc
+ if (dom.isBlock(node) || nonEmptyElementsMap[node.nodeName.toLowerCase()]) {
+ return;
+ }
+
+ lastInlineElement = node;
+ }
+
+ // Only fetch the last inline element when in caret mode for now
+ if (collapsed && lastInlineElement) {
+ container = lastInlineElement;
+ normalized = true;
+ offset = 0;
+ }
+ };
+
+ container = rng[(start ? 'start' : 'end') + 'Container'];
+ offset = rng[(start ? 'start' : 'end') + 'Offset'];
+ nonEmptyElementsMap = dom.schema.getNonEmptyElements();
+
+ // If the container is a document move it to the body element
+ if (container.nodeType === 9) {
+ container = dom.getRoot();
+ offset = 0;
+ }
+
+ // If the container is body try move it into the closest text node or position
+ if (container === body) {
+ // If start is before/after a image, table etc
+ if (start) {
+ node = container.childNodes[offset > 0 ? offset - 1 : 0];
+ if (node) {
+ nodeName = node.nodeName.toLowerCase();
+ if (nonEmptyElementsMap[node.nodeName] || node.nodeName == "TABLE") {
+ return;
+ }
+ }
+ }
+
+ // Resolve the index
+ if (container.hasChildNodes()) {
+ container = container.childNodes[Math.min(!start && offset > 0 ? offset - 1 : offset, container.childNodes.length - 1)];
+ offset = 0;
+
+ // Don't walk into elements that doesn't have any child nodes like a IMG
+ if (container.hasChildNodes() && !/TABLE/.test(container.nodeName)) {
+ // Walk the DOM to find a text node to place the caret at or a BR
+ node = container;
+ walker = new TreeWalker(container, body);
+
+ do {
+ // Found a text node use that position
+ if (node.nodeType === 3 && node.nodeValue.length > 0) {
+ offset = start ? 0 : node.nodeValue.length;
+ container = node;
+ normalized = true;
+ break;
+ }
+
+ // Found a BR/IMG element that we can place the caret before
+ if (nonEmptyElementsMap[node.nodeName.toLowerCase()]) {
+ offset = dom.nodeIndex(node);
+ container = node.parentNode;
+
+ // Put caret after image when moving the end point
+ if (node.nodeName == "IMG" && !start) {
+ offset++;
+ }
+
+ normalized = true;
+ break;
+ }
+ } while (node = (start ? walker.next() : walker.prev()));
+ }
+ }
+ }
+
+ // Lean the caret to the left if possible
+ if (collapsed) {
+ // So this: <b>x</b><i>|x</i>
+ // Becomes: <b>x|</b><i>x</i>
+ // Seems that only gecko has issues with this
+ if (container.nodeType === 3 && offset === 0) {
+ findTextNodeRelative(true);
+ }
+
+ // Lean left into empty inline elements when the caret is before a BR
+ // So this: <i><b></b><i>|<br></i>
+ // Becomes: <i><b>|</b><i><br></i>
+ // Seems that only gecko has issues with this
+ if (container.nodeType === 1) {
+ node = container.childNodes[offset];
+ if(node && node.nodeName === 'BR' && !hasBrBeforeAfter(node) && !hasBrBeforeAfter(node, true)) {
+ findTextNodeRelative(true, container.childNodes[offset]);
+ }
+ }
+ }
+
+ // Lean the start of the selection right if possible
+ // So this: x[<b>x]</b>
+ // Becomes: x<b>[x]</b>
+ if (start && !collapsed && container.nodeType === 3 && offset === container.nodeValue.length) {
+ findTextNodeRelative(false);
+ }
+
+ // Set endpoint if it was normalized
+ if (normalized)
+ rng['set' + (start ? 'Start' : 'End')](container, offset);
+ };
+
+ // Normalize only on non IE browsers for now
+ if (tinymce.isIE)
+ return;
+
+ rng = self.getRng();
+ collapsed = rng.collapsed;
+
+ // Normalize the end points
+ normalizeEndPoint(true);
+
+ if (!collapsed)
+ normalizeEndPoint();
+
+ // Set the selection if it was normalized
+ if (normalized) {
+ // If it was collapsed then make sure it still is
+ if (collapsed) {
+ rng.collapse(true);
+ }
+
+ //console.log(self.dom.dumpRng(rng));
+ self.setRng(rng, self.isForward());
+ }
+ },
+
+ selectorChanged: function(selector, callback) {
+ var self = this, currentSelectors;
+
+ if (!self.selectorChangedData) {
+ self.selectorChangedData = {};
+ currentSelectors = {};
+
+ self.editor.onNodeChange.addToTop(function(ed, cm, node) {
+ var dom = self.dom, parents = dom.getParents(node, null, dom.getRoot()), matchedSelectors = {};
+
+ // Check for new matching selectors
+ each(self.selectorChangedData, function(callbacks, selector) {
+ each(parents, function(node) {
+ if (dom.is(node, selector)) {
+ if (!currentSelectors[selector]) {
+ // Execute callbacks
+ each(callbacks, function(callback) {
+ callback(true, {node: node, selector: selector, parents: parents});
+ });
+
+ currentSelectors[selector] = callbacks;
+ }
+
+ matchedSelectors[selector] = callbacks;
+ return false;
+ }
+ });
+ });
+
+ // Check if current selectors still match
+ each(currentSelectors, function(callbacks, selector) {
+ if (!matchedSelectors[selector]) {
+ delete currentSelectors[selector];
+
+ each(callbacks, function(callback) {
+ callback(false, {node: node, selector: selector, parents: parents});
+ });
+ }
+ });
+ });
+ }
+
+ // Add selector listeners
+ if (!self.selectorChangedData[selector]) {
+ self.selectorChangedData[selector] = [];
+ }
+
+ self.selectorChangedData[selector].push(callback);
+
+ return self;
+ },
+
+ destroy : function(manual) {
+ var self = this;
+
+ self.win = null;
+
+ // Manual destroy then remove unload handler
+ if (!manual)
+ tinymce.removeUnload(self.destroy);
+ },
+
+ // IE has an issue where you can't select/move the caret by clicking outside the body if the document is in standards mode
+ _fixIESelection : function() {
+ var dom = this.dom, doc = dom.doc, body = doc.body, started, startRng, htmlElm;
+
+ // Return range from point or null if it failed
+ function rngFromPoint(x, y) {
+ var rng = body.createTextRange();
+
+ try {
+ rng.moveToPoint(x, y);
+ } catch (ex) {
+ // IE sometimes throws and exception, so lets just ignore it
+ rng = null;
+ }
+
+ return rng;
+ };
+
+ // Fires while the selection is changing
+ function selectionChange(e) {
+ var pointRng;
+
+ // Check if the button is down or not
+ if (e.button) {
+ // Create range from mouse position
+ pointRng = rngFromPoint(e.x, e.y);
+
+ if (pointRng) {
+ // Check if pointRange is before/after selection then change the endPoint
+ if (pointRng.compareEndPoints('StartToStart', startRng) > 0)
+ pointRng.setEndPoint('StartToStart', startRng);
+ else
+ pointRng.setEndPoint('EndToEnd', startRng);
+
+ pointRng.select();
+ }
+ } else
+ endSelection();
+ }
+
+ // Removes listeners
+ function endSelection() {
+ var rng = doc.selection.createRange();
+
+ // If the range is collapsed then use the last start range
+ if (startRng && !rng.item && rng.compareEndPoints('StartToEnd', rng) === 0)
+ startRng.select();
+
+ dom.unbind(doc, 'mouseup', endSelection);
+ dom.unbind(doc, 'mousemove', selectionChange);
+ startRng = started = 0;
+ };
+
+ // Make HTML element unselectable since we are going to handle selection by hand
+ doc.documentElement.unselectable = true;
+
+ // Detect when user selects outside BODY
+ dom.bind(doc, ['mousedown', 'contextmenu'], function(e) {
+ if (e.target.nodeName === 'HTML') {
+ if (started)
+ endSelection();
+
+ // Detect vertical scrollbar, since IE will fire a mousedown on the scrollbar and have target set as HTML
+ htmlElm = doc.documentElement;
+ if (htmlElm.scrollHeight > htmlElm.clientHeight)
+ return;
+
+ started = 1;
+ // Setup start position
+ startRng = rngFromPoint(e.x, e.y);
+ if (startRng) {
+ // Listen for selection change events
+ dom.bind(doc, 'mouseup', endSelection);
+ dom.bind(doc, 'mousemove', selectionChange);
+
+ dom.win.focus();
+ startRng.select();
+ }
+ }
+ });
+ }
+ });
+})(tinymce);
+
+(function(tinymce) {
+ tinymce.dom.Serializer = function(settings, dom, schema) {
+ var onPreProcess, onPostProcess, isIE = tinymce.isIE, each = tinymce.each, htmlParser;
+
+ // Support the old apply_source_formatting option
+ if (!settings.apply_source_formatting)
+ settings.indent = false;
+
+ // Default DOM and Schema if they are undefined
+ dom = dom || tinymce.DOM;
+ schema = schema || new tinymce.html.Schema(settings);
+ settings.entity_encoding = settings.entity_encoding || 'named';
+ settings.remove_trailing_brs = "remove_trailing_brs" in settings ? settings.remove_trailing_brs : true;
+
+ onPreProcess = new tinymce.util.Dispatcher(self);
+
+ onPostProcess = new tinymce.util.Dispatcher(self);
+
+ htmlParser = new tinymce.html.DomParser(settings, schema);
+
+ // Convert move data-mce-src, data-mce-href and data-mce-style into nodes or process them if needed
+ htmlParser.addAttributeFilter('src,href,style', function(nodes, name) {
+ var i = nodes.length, node, value, internalName = 'data-mce-' + name, urlConverter = settings.url_converter, urlConverterScope = settings.url_converter_scope, undef;
+
+ while (i--) {
+ node = nodes[i];
+
+ value = node.attributes.map[internalName];
+ if (value !== undef) {
+ // Set external name to internal value and remove internal
+ node.attr(name, value.length > 0 ? value : null);
+ node.attr(internalName, null);
+ } else {
+ // No internal attribute found then convert the value we have in the DOM
+ value = node.attributes.map[name];
+
+ if (name === "style")
+ value = dom.serializeStyle(dom.parseStyle(value), node.name);
+ else if (urlConverter)
+ value = urlConverter.call(urlConverterScope, value, name, node.name);
+
+ node.attr(name, value.length > 0 ? value : null);
+ }
+ }
+ });
+
+ // Remove internal classes mceItem<..> or mceSelected
+ htmlParser.addAttributeFilter('class', function(nodes, name) {
+ var i = nodes.length, node, value;
+
+ while (i--) {
+ node = nodes[i];
+ value = node.attr('class').replace(/(?:^|\s)mce(Item\w+|Selected)(?!\S)/g, '');
+ node.attr('class', value.length > 0 ? value : null);
+ }
+ });
+
+ // Remove bookmark elements
+ htmlParser.addAttributeFilter('data-mce-type', function(nodes, name, args) {
+ var i = nodes.length, node;
+
+ while (i--) {
+ node = nodes[i];
+
+ if (node.attributes.map['data-mce-type'] === 'bookmark' && !args.cleanup)
+ node.remove();
+ }
+ });
+
+ // Remove expando attributes
+ htmlParser.addAttributeFilter('data-mce-expando', function(nodes, name, args) {
+ var i = nodes.length;
+
+ while (i--) {
+ nodes[i].attr(name, null);
+ }
+ });
+
+ htmlParser.addNodeFilter('noscript', function(nodes) {
+ var i = nodes.length, node;
+
+ while (i--) {
+ node = nodes[i].firstChild;
+
+ if (node) {
+ node.value = tinymce.html.Entities.decode(node.value);
+ }
+ }
+ });
+
+ // Force script into CDATA sections and remove the mce- prefix also add comments around styles
+ htmlParser.addNodeFilter('script,style', function(nodes, name) {
+ var i = nodes.length, node, value;
+
+ function trim(value) {
+ return value.replace(/(<!--\[CDATA\[|\]\]-->)/g, '\n')
+ .replace(/^[\r\n]*|[\r\n]*$/g, '')
+ .replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi, '')
+ .replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g, '');
+ };
+
+ while (i--) {
+ node = nodes[i];
+ value = node.firstChild ? node.firstChild.value : '';
+
+ if (name === "script") {
+ // Remove mce- prefix from script elements
+ node.attr('type', (node.attr('type') || 'text/javascript').replace(/^mce\-/, ''));
+
+ if (value.length > 0)
+ node.firstChild.value = '// <![CDATA[\n' + trim(value) + '\n// ]]>';
+ } else {
+ if (value.length > 0)
+ node.firstChild.value = '<!--\n' + trim(value) + '\n-->';
+ }
+ }
+ });
+
+ // Convert comments to cdata and handle protected comments
+ htmlParser.addNodeFilter('#comment', function(nodes, name) {
+ var i = nodes.length, node;
+
+ while (i--) {
+ node = nodes[i];
+
+ if (node.value.indexOf('[CDATA[') === 0) {
+ node.name = '#cdata';
+ node.type = 4;
+ node.value = node.value.replace(/^\[CDATA\[|\]\]$/g, '');
+ } else if (node.value.indexOf('mce:protected ') === 0) {
+ node.name = "#text";
+ node.type = 3;
+ node.raw = true;
+ node.value = unescape(node.value).substr(14);
+ }
+ }
+ });
+
+ htmlParser.addNodeFilter('xml:namespace,input', function(nodes, name) {
+ var i = nodes.length, node;
+
+ while (i--) {
+ node = nodes[i];
+ if (node.type === 7)
+ node.remove();
+ else if (node.type === 1) {
+ if (name === "input" && !("type" in node.attributes.map))
+ node.attr('type', 'text');
+ }
+ }
+ });
+
+ // Fix list elements, TODO: Replace this later
+ if (settings.fix_list_elements) {
+ htmlParser.addNodeFilter('ul,ol', function(nodes, name) {
+ var i = nodes.length, node, parentNode;
+
+ while (i--) {
+ node = nodes[i];
+ parentNode = node.parent;
+
+ if (parentNode.name === 'ul' || parentNode.name === 'ol') {
+ if (node.prev && node.prev.name === 'li') {
+ node.prev.append(node);
+ }
+ }
+ }
+ });
+ }
+
+ // Remove internal data attributes
+ htmlParser.addAttributeFilter('data-mce-src,data-mce-href,data-mce-style', function(nodes, name) {
+ var i = nodes.length;
+
+ while (i--) {
+ nodes[i].attr(name, null);
+ }
+ });
+
+ // Return public methods
+ return {
+ schema : schema,
+
+ addNodeFilter : htmlParser.addNodeFilter,
+
+ addAttributeFilter : htmlParser.addAttributeFilter,
+
+ onPreProcess : onPreProcess,
+
+ onPostProcess : onPostProcess,
+
+ serialize : function(node, args) {
+ var impl, doc, oldDoc, htmlSerializer, content;
+
+ // Explorer won't clone contents of script and style and the
+ // selected index of select elements are cleared on a clone operation.
+ if (isIE && dom.select('script,style,select,map').length > 0) {
+ content = node.innerHTML;
+ node = node.cloneNode(false);
+ dom.setHTML(node, content);
+ } else
+ node = node.cloneNode(true);
+
+ // Nodes needs to be attached to something in WebKit/Opera
+ // Older builds of Opera crashes if you attach the node to an document created dynamically
+ // and since we can't feature detect a crash we need to sniff the acutal build number
+ // This fix will make DOM ranges and make Sizzle happy!
+ impl = node.ownerDocument.implementation;
+ if (impl.createHTMLDocument) {
+ // Create an empty HTML document
+ doc = impl.createHTMLDocument("");
+
+ // Add the element or it's children if it's a body element to the new document
+ each(node.nodeName == 'BODY' ? node.childNodes : [node], function(node) {
+ doc.body.appendChild(doc.importNode(node, true));
+ });
+
+ // Grab first child or body element for serialization
+ if (node.nodeName != 'BODY')
+ node = doc.body.firstChild;
+ else
+ node = doc.body;
+
+ // set the new document in DOMUtils so createElement etc works
+ oldDoc = dom.doc;
+ dom.doc = doc;
+ }
+
+ args = args || {};
+ args.format = args.format || 'html';
+
+ // Pre process
+ if (!args.no_events) {
+ args.node = node;
+ onPreProcess.dispatch(self, args);
+ }
+
+ // Setup serializer
+ htmlSerializer = new tinymce.html.Serializer(settings, schema);
+
+ // Parse and serialize HTML
+ args.content = htmlSerializer.serialize(
+ htmlParser.parse(tinymce.trim(args.getInner ? node.innerHTML : dom.getOuterHTML(node)), args)
+ );
+
+ // Replace all BOM characters for now until we can find a better solution
+ if (!args.cleanup)
+ args.content = args.content.replace(/\uFEFF/g, '');
+
+ // Post process
+ if (!args.no_events)
+ onPostProcess.dispatch(self, args);
+
+ // Restore the old document if it was changed
+ if (oldDoc)
+ dom.doc = oldDoc;
+
+ args.node = null;
+
+ return args.content;
+ },
+
+ addRules : function(rules) {
+ schema.addValidElements(rules);
+ },
+
+ setRules : function(rules) {
+ schema.setValidElements(rules);
+ }
+ };
+ };
+})(tinymce);
+(function(tinymce) {
+ tinymce.dom.ScriptLoader = function(settings) {
+ var QUEUED = 0,
+ LOADING = 1,
+ LOADED = 2,
+ states = {},
+ queue = [],
+ scriptLoadedCallbacks = {},
+ queueLoadedCallbacks = [],
+ loading = 0,
+ undef;
+
+ function loadScript(url, callback) {
+ var t = this, dom = tinymce.DOM, elm, uri, loc, id;
+
+ // Execute callback when script is loaded
+ function done() {
+ dom.remove(id);
+
+ if (elm)
+ elm.onreadystatechange = elm.onload = elm = null;
+
+ callback();
+ };
+
+ function error() {
+ // Report the error so it's easier for people to spot loading errors
+ if (typeof(console) !== "undefined" && console.log)
+ console.log("Failed to load: " + url);
+
+ // We can't mark it as done if there is a load error since
+ // A) We don't want to produce 404 errors on the server and
+ // B) the onerror event won't fire on all browsers.
+ // done();
+ };
+
+ id = dom.uniqueId();
+
+ if (tinymce.isIE6) {
+ uri = new tinymce.util.URI(url);
+ loc = location;
+
+ // If script is from same domain and we
+ // use IE 6 then use XHR since it's more reliable
+ if (uri.host == loc.hostname && uri.port == loc.port && (uri.protocol + ':') == loc.protocol && uri.protocol.toLowerCase() != 'file') {
+ tinymce.util.XHR.send({
+ url : tinymce._addVer(uri.getURI()),
+ success : function(content) {
+ // Create new temp script element
+ var script = dom.create('script', {
+ type : 'text/javascript'
+ });
+
+ // Evaluate script in global scope
+ script.text = content;
+ document.getElementsByTagName('head')[0].appendChild(script);
+ dom.remove(script);
+
+ done();
+ },
+
+ error : error
+ });
+
+ return;
+ }
+ }
+
+ // Create new script element
+ elm = document.createElement('script');
+ elm.id = id;
+ elm.type = 'text/javascript';
+ elm.src = tinymce._addVer(url);
+
+ // Add onload listener for non IE browsers since IE9
+ // fires onload event before the script is parsed and executed
+ if (!tinymce.isIE)
+ elm.onload = done;
+
+ // Add onerror event will get fired on some browsers but not all of them
+ elm.onerror = error;
+
+ // Opera 9.60 doesn't seem to fire the onreadystate event at correctly
+ if (!tinymce.isOpera) {
+ elm.onreadystatechange = function() {
+ var state = elm.readyState;
+
+ // Loaded state is passed on IE 6 however there
+ // are known issues with this method but we can't use
+ // XHR in a cross domain loading
+ if (state == 'complete' || state == 'loaded')
+ done();
+ };
+ }
+
+ // Most browsers support this feature so we report errors
+ // for those at least to help users track their missing plugins etc
+ // todo: Removed since it produced error if the document is unloaded by navigating away, re-add it as an option
+ /*elm.onerror = function() {
+ alert('Failed to load: ' + url);
+ };*/
+
+ // Add script to document
+ (document.getElementsByTagName('head')[0] || document.body).appendChild(elm);
+ };
+
+ this.isDone = function(url) {
+ return states[url] == LOADED;
+ };
+
+ this.markDone = function(url) {
+ states[url] = LOADED;
+ };
+
+ this.add = this.load = function(url, callback, scope) {
+ var item, state = states[url];
+
+ // Add url to load queue
+ if (state == undef) {
+ queue.push(url);
+ states[url] = QUEUED;
+ }
+
+ if (callback) {
+ // Store away callback for later execution
+ if (!scriptLoadedCallbacks[url])
+ scriptLoadedCallbacks[url] = [];
+
+ scriptLoadedCallbacks[url].push({
+ func : callback,
+ scope : scope || this
+ });
+ }
+ };
+
+ this.loadQueue = function(callback, scope) {
+ this.loadScripts(queue, callback, scope);
+ };
+
+ this.loadScripts = function(scripts, callback, scope) {
+ var loadScripts;
+
+ function execScriptLoadedCallbacks(url) {
+ // Execute URL callback functions
+ tinymce.each(scriptLoadedCallbacks[url], function(callback) {
+ callback.func.call(callback.scope);
+ });
+
+ scriptLoadedCallbacks[url] = undef;
+ };
+
+ queueLoadedCallbacks.push({
+ func : callback,
+ scope : scope || this
+ });
+
+ loadScripts = function() {
+ var loadingScripts = tinymce.grep(scripts);
+
+ // Current scripts has been handled
+ scripts.length = 0;
+
+ // Load scripts that needs to be loaded
+ tinymce.each(loadingScripts, function(url) {
+ // Script is already loaded then execute script callbacks directly
+ if (states[url] == LOADED) {
+ execScriptLoadedCallbacks(url);
+ return;
+ }
+
+ // Is script not loading then start loading it
+ if (states[url] != LOADING) {
+ states[url] = LOADING;
+ loading++;
+
+ loadScript(url, function() {
+ states[url] = LOADED;
+ loading--;
+
+ execScriptLoadedCallbacks(url);
+
+ // Load more scripts if they where added by the recently loaded script
+ loadScripts();
+ });
+ }
+ });
+
+ // No scripts are currently loading then execute all pending queue loaded callbacks
+ if (!loading) {
+ tinymce.each(queueLoadedCallbacks, function(callback) {
+ callback.func.call(callback.scope);
+ });
+
+ queueLoadedCallbacks.length = 0;
+ }
+ };
+
+ loadScripts();
+ };
+ };
+
+ // Global script loader
+ tinymce.ScriptLoader = new tinymce.dom.ScriptLoader();
+})(tinymce);
+
+(function(tinymce) {
+ tinymce.dom.RangeUtils = function(dom) {
+ var INVISIBLE_CHAR = '\uFEFF';
+
+ this.walk = function(rng, callback) {
+ var startContainer = rng.startContainer,
+ startOffset = rng.startOffset,
+ endContainer = rng.endContainer,
+ endOffset = rng.endOffset,
+ ancestor, startPoint,
+ endPoint, node, parent, siblings, nodes;
+
+ // Handle table cell selection the table plugin enables
+ // you to fake select table cells and perform formatting actions on them
+ nodes = dom.select('td.mceSelected,th.mceSelected');
+ if (nodes.length > 0) {
+ tinymce.each(nodes, function(node) {
+ callback([node]);
+ });
+
+ return;
+ }
+
+ function exclude(nodes) {
+ var node;
+
+ // First node is excluded
+ node = nodes[0];
+ if (node.nodeType === 3 && node === startContainer && startOffset >= node.nodeValue.length) {
+ nodes.splice(0, 1);
+ }
+
+ // Last node is excluded
+ node = nodes[nodes.length - 1];
+ if (endOffset === 0 && nodes.length > 0 && node === endContainer && node.nodeType === 3) {
+ nodes.splice(nodes.length - 1, 1);
+ }
+
+ return nodes;
+ };
+
+ function collectSiblings(node, name, end_node) {
+ var siblings = [];
+
+ for (; node && node != end_node; node = node[name])
+ siblings.push(node);
+
+ return siblings;
+ };
+
+ function findEndPoint(node, root) {
+ do {
+ if (node.parentNode == root)
+ return node;
+
+ node = node.parentNode;
+ } while(node);
+ };
+
+ function walkBoundary(start_node, end_node, next) {
+ var siblingName = next ? 'nextSibling' : 'previousSibling';
+
+ for (node = start_node, parent = node.parentNode; node && node != end_node; node = parent) {
+ parent = node.parentNode;
+ siblings = collectSiblings(node == start_node ? node : node[siblingName], siblingName);
+
+ if (siblings.length) {
+ if (!next)
+ siblings.reverse();
+
+ callback(exclude(siblings));
+ }
+ }
+ };
+
+ // If index based start position then resolve it
+ if (startContainer.nodeType == 1 && startContainer.hasChildNodes())
+ startContainer = startContainer.childNodes[startOffset];
+
+ // If index based end position then resolve it
+ if (endContainer.nodeType == 1 && endContainer.hasChildNodes())
+ endContainer = endContainer.childNodes[Math.min(endOffset - 1, endContainer.childNodes.length - 1)];
+
+ // Same container
+ if (startContainer == endContainer)
+ return callback(exclude([startContainer]));
+
+ // Find common ancestor and end points
+ ancestor = dom.findCommonAncestor(startContainer, endContainer);
+
+ // Process left side
+ for (node = startContainer; node; node = node.parentNode) {
+ if (node === endContainer)
+ return walkBoundary(startContainer, ancestor, true);
+
+ if (node === ancestor)
+ break;
+ }
+
+ // Process right side
+ for (node = endContainer; node; node = node.parentNode) {
+ if (node === startContainer)
+ return walkBoundary(endContainer, ancestor);
+
+ if (node === ancestor)
+ break;
+ }
+
+ // Find start/end point
+ startPoint = findEndPoint(startContainer, ancestor) || startContainer;
+ endPoint = findEndPoint(endContainer, ancestor) || endContainer;
+
+ // Walk left leaf
+ walkBoundary(startContainer, startPoint, true);
+
+ // Walk the middle from start to end point
+ siblings = collectSiblings(
+ startPoint == startContainer ? startPoint : startPoint.nextSibling,
+ 'nextSibling',
+ endPoint == endContainer ? endPoint.nextSibling : endPoint
+ );
+
+ if (siblings.length)
+ callback(exclude(siblings));
+
+ // Walk right leaf
+ walkBoundary(endContainer, endPoint);
+ };
+
+ this.split = function(rng) {
+ var startContainer = rng.startContainer,
+ startOffset = rng.startOffset,
+ endContainer = rng.endContainer,
+ endOffset = rng.endOffset;
+
+ function splitText(node, offset) {
+ return node.splitText(offset);
+ };
+
+ // Handle single text node
+ if (startContainer == endContainer && startContainer.nodeType == 3) {
+ if (startOffset > 0 && startOffset < startContainer.nodeValue.length) {
+ endContainer = splitText(startContainer, startOffset);
+ startContainer = endContainer.previousSibling;
+
+ if (endOffset > startOffset) {
+ endOffset = endOffset - startOffset;
+ startContainer = endContainer = splitText(endContainer, endOffset).previousSibling;
+ endOffset = endContainer.nodeValue.length;
+ startOffset = 0;
+ } else {
+ endOffset = 0;
+ }
+ }
+ } else {
+ // Split startContainer text node if needed
+ if (startContainer.nodeType == 3 && startOffset > 0 && startOffset < startContainer.nodeValue.length) {
+ startContainer = splitText(startContainer, startOffset);
+ startOffset = 0;
+ }
+
+ // Split endContainer text node if needed
+ if (endContainer.nodeType == 3 && endOffset > 0 && endOffset < endContainer.nodeValue.length) {
+ endContainer = splitText(endContainer, endOffset).previousSibling;
+ endOffset = endContainer.nodeValue.length;
+ }
+ }
+
+ return {
+ startContainer : startContainer,
+ startOffset : startOffset,
+ endContainer : endContainer,
+ endOffset : endOffset
+ };
+ };
+
+ };
+
+ tinymce.dom.RangeUtils.compareRanges = function(rng1, rng2) {
+ if (rng1 && rng2) {
+ // Compare native IE ranges
+ if (rng1.item || rng1.duplicate) {
+ // Both are control ranges and the selected element matches
+ if (rng1.item && rng2.item && rng1.item(0) === rng2.item(0))
+ return true;
+
+ // Both are text ranges and the range matches
+ if (rng1.isEqual && rng2.isEqual && rng2.isEqual(rng1))
+ return true;
+ } else {
+ // Compare w3c ranges
+ return rng1.startContainer == rng2.startContainer && rng1.startOffset == rng2.startOffset;
+ }
+ }
+
+ return false;
+ };
+})(tinymce);
+
+(function(tinymce) {
+ var Event = tinymce.dom.Event, each = tinymce.each;
+
+ tinymce.create('tinymce.ui.KeyboardNavigation', {
+ KeyboardNavigation: function(settings, dom) {
+ var t = this, root = settings.root, items = settings.items,
+ enableUpDown = settings.enableUpDown, enableLeftRight = settings.enableLeftRight || !settings.enableUpDown,
+ excludeFromTabOrder = settings.excludeFromTabOrder,
+ itemFocussed, itemBlurred, rootKeydown, rootFocussed, focussedId;
+
+ dom = dom || tinymce.DOM;
+
+ itemFocussed = function(evt) {
+ focussedId = evt.target.id;
+ };
+
+ itemBlurred = function(evt) {
+ dom.setAttrib(evt.target.id, 'tabindex', '-1');
+ };
+
+ rootFocussed = function(evt) {
+ var item = dom.get(focussedId);
+ dom.setAttrib(item, 'tabindex', '0');
+ item.focus();
+ };
+
+ t.focus = function() {
+ dom.get(focussedId).focus();
+ };
+
+ t.destroy = function() {
+ each(items, function(item) {
+ var elm = dom.get(item.id);
+
+ dom.unbind(elm, 'focus', itemFocussed);
+ dom.unbind(elm, 'blur', itemBlurred);
+ });
+
+ var rootElm = dom.get(root);
+ dom.unbind(rootElm, 'focus', rootFocussed);
+ dom.unbind(rootElm, 'keydown', rootKeydown);
+
+ items = dom = root = t.focus = itemFocussed = itemBlurred = rootKeydown = rootFocussed = null;
+ t.destroy = function() {};
+ };
+
+ t.moveFocus = function(dir, evt) {
+ var idx = -1, controls = t.controls, newFocus;
+
+ if (!focussedId)
+ return;
+
+ each(items, function(item, index) {
+ if (item.id === focussedId) {
+ idx = index;
+ return false;
+ }
+ });
+
+ idx += dir;
+ if (idx < 0) {
+ idx = items.length - 1;
+ } else if (idx >= items.length) {
+ idx = 0;
+ }
+
+ newFocus = items[idx];
+ dom.setAttrib(focussedId, 'tabindex', '-1');
+ dom.setAttrib(newFocus.id, 'tabindex', '0');
+ dom.get(newFocus.id).focus();
+
+ if (settings.actOnFocus) {
+ settings.onAction(newFocus.id);
+ }
+
+ if (evt)
+ Event.cancel(evt);
+ };
+
+ rootKeydown = function(evt) {
+ var DOM_VK_LEFT = 37, DOM_VK_RIGHT = 39, DOM_VK_UP = 38, DOM_VK_DOWN = 40, DOM_VK_ESCAPE = 27, DOM_VK_ENTER = 14, DOM_VK_RETURN = 13, DOM_VK_SPACE = 32;
+
+ switch (evt.keyCode) {
+ case DOM_VK_LEFT:
+ if (enableLeftRight) t.moveFocus(-1);
+ break;
+
+ case DOM_VK_RIGHT:
+ if (enableLeftRight) t.moveFocus(1);
+ break;
+
+ case DOM_VK_UP:
+ if (enableUpDown) t.moveFocus(-1);
+ break;
+
+ case DOM_VK_DOWN:
+ if (enableUpDown) t.moveFocus(1);
+ break;
+
+ case DOM_VK_ESCAPE:
+ if (settings.onCancel) {
+ settings.onCancel();
+ Event.cancel(evt);
+ }
+ break;
+
+ case DOM_VK_ENTER:
+ case DOM_VK_RETURN:
+ case DOM_VK_SPACE:
+ if (settings.onAction) {
+ settings.onAction(focussedId);
+ Event.cancel(evt);
+ }
+ break;
+ }
+ };
+
+ // Set up state and listeners for each item.
+ each(items, function(item, idx) {
+ var tabindex, elm;
+
+ if (!item.id) {
+ item.id = dom.uniqueId('_mce_item_');
+ }
+
+ elm = dom.get(item.id);
+
+ if (excludeFromTabOrder) {
+ dom.bind(elm, 'blur', itemBlurred);
+ tabindex = '-1';
+ } else {
+ tabindex = (idx === 0 ? '0' : '-1');
+ }
+
+ elm.setAttribute('tabindex', tabindex);
+ dom.bind(elm, 'focus', itemFocussed);
+ });
+
+ // Setup initial state for root element.
+ if (items[0]){
+ focussedId = items[0].id;
+ }
+
+ dom.setAttrib(root, 'tabindex', '-1');
+
+ // Setup listeners for root element.
+ var rootElm = dom.get(root);
+ dom.bind(rootElm, 'focus', rootFocussed);
+ dom.bind(rootElm, 'keydown', rootKeydown);
+ }
+ });
+})(tinymce);
+
+(function(tinymce) {
+ // Shorten class names
+ var DOM = tinymce.DOM, is = tinymce.is;
+
+ tinymce.create('tinymce.ui.Control', {
+ Control : function(id, s, editor) {
+ this.id = id;
+ this.settings = s = s || {};
+ this.rendered = false;
+ this.onRender = new tinymce.util.Dispatcher(this);
+ this.classPrefix = '';
+ this.scope = s.scope || this;
+ this.disabled = 0;
+ this.active = 0;
+ this.editor = editor;
+ },
+
+ setAriaProperty : function(property, value) {
+ var element = DOM.get(this.id + '_aria') || DOM.get(this.id);
+ if (element) {
+ DOM.setAttrib(element, 'aria-' + property, !!value);
+ }
+ },
+
+ focus : function() {
+ DOM.get(this.id).focus();
+ },
+
+ setDisabled : function(s) {
+ if (s != this.disabled) {
+ this.setAriaProperty('disabled', s);
+
+ this.setState('Disabled', s);
+ this.setState('Enabled', !s);
+ this.disabled = s;
+ }
+ },
+
+ isDisabled : function() {
+ return this.disabled;
+ },
+
+ setActive : function(s) {
+ if (s != this.active) {
+ this.setState('Active', s);
+ this.active = s;
+ this.setAriaProperty('pressed', s);
+ }
+ },
+
+ isActive : function() {
+ return this.active;
+ },
+
+ setState : function(c, s) {
+ var n = DOM.get(this.id);
+
+ c = this.classPrefix + c;
+
+ if (s)
+ DOM.addClass(n, c);
+ else
+ DOM.removeClass(n, c);
+ },
+
+ isRendered : function() {
+ return this.rendered;
+ },
+
+ renderHTML : function() {
+ },
+
+ renderTo : function(n) {
+ DOM.setHTML(n, this.renderHTML());
+ },
+
+ postRender : function() {
+ var t = this, b;
+
+ // Set pending states
+ if (is(t.disabled)) {
+ b = t.disabled;
+ t.disabled = -1;
+ t.setDisabled(b);
+ }
+
+ if (is(t.active)) {
+ b = t.active;
+ t.active = -1;
+ t.setActive(b);
+ }
+ },
+
+ remove : function() {
+ DOM.remove(this.id);
+ this.destroy();
+ },
+
+ destroy : function() {
+ tinymce.dom.Event.clear(this.id);
+ }
+ });
+})(tinymce);
+tinymce.create('tinymce.ui.Container:tinymce.ui.Control', {
+ Container : function(id, s, editor) {
+ this.parent(id, s, editor);
+
+ this.controls = [];
+
+ this.lookup = {};
+ },
+
+ add : function(c) {
+ this.lookup[c.id] = c;
+ this.controls.push(c);
+
+ return c;
+ },
+
+ get : function(n) {
+ return this.lookup[n];
+ }
+});
+
+
+tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', {
+ Separator : function(id, s) {
+ this.parent(id, s);
+ this.classPrefix = 'mceSeparator';
+ this.setDisabled(true);
+ },
+
+ renderHTML : function() {
+ return tinymce.DOM.createHTML('span', {'class' : this.classPrefix, role : 'separator', 'aria-orientation' : 'vertical', tabindex : '-1'});
+ }
+});
+
+(function(tinymce) {
+ var is = tinymce.is, DOM = tinymce.DOM, each = tinymce.each, walk = tinymce.walk;
+
+ tinymce.create('tinymce.ui.MenuItem:tinymce.ui.Control', {
+ MenuItem : function(id, s) {
+ this.parent(id, s);
+ this.classPrefix = 'mceMenuItem';
+ },
+
+ setSelected : function(s) {
+ this.setState('Selected', s);
+ this.setAriaProperty('checked', !!s);
+ this.selected = s;
+ },
+
+ isSelected : function() {
+ return this.selected;
+ },
+
+ postRender : function() {
+ var t = this;
+
+ t.parent();
+
+ // Set pending state
+ if (is(t.selected))
+ t.setSelected(t.selected);
+ }
+ });
+})(tinymce);
+
+(function(tinymce) {
+ var is = tinymce.is, DOM = tinymce.DOM, each = tinymce.each, walk = tinymce.walk;
+
+ tinymce.create('tinymce.ui.Menu:tinymce.ui.MenuItem', {
+ Menu : function(id, s) {
+ var t = this;
+
+ t.parent(id, s);
+ t.items = {};
+ t.collapsed = false;
+ t.menuCount = 0;
+ t.onAddItem = new tinymce.util.Dispatcher(this);
+ },
+
+ expand : function(d) {
+ var t = this;
+
+ if (d) {
+ walk(t, function(o) {
+ if (o.expand)
+ o.expand();
+ }, 'items', t);
+ }
+
+ t.collapsed = false;
+ },
+
+ collapse : function(d) {
+ var t = this;
+
+ if (d) {
+ walk(t, function(o) {
+ if (o.collapse)
+ o.collapse();
+ }, 'items', t);
+ }
+
+ t.collapsed = true;
+ },
+
+ isCollapsed : function() {
+ return this.collapsed;
+ },
+
+ add : function(o) {
+ if (!o.settings)
+ o = new tinymce.ui.MenuItem(o.id || DOM.uniqueId(), o);
+
+ this.onAddItem.dispatch(this, o);
+
+ return this.items[o.id] = o;
+ },
+
+ addSeparator : function() {
+ return this.add({separator : true});
+ },
+
+ addMenu : function(o) {
+ if (!o.collapse)
+ o = this.createMenu(o);
+
+ this.menuCount++;
+
+ return this.add(o);
+ },
+
+ hasMenus : function() {
+ return this.menuCount !== 0;
+ },
+
+ remove : function(o) {
+ delete this.items[o.id];
+ },
+
+ removeAll : function() {
+ var t = this;
+
+ walk(t, function(o) {
+ if (o.removeAll)
+ o.removeAll();
+ else
+ o.remove();
+
+ o.destroy();
+ }, 'items', t);
+
+ t.items = {};
+ },
+
+ createMenu : function(o) {
+ var m = new tinymce.ui.Menu(o.id || DOM.uniqueId(), o);
+
+ m.onAddItem.add(this.onAddItem.dispatch, this.onAddItem);
+
+ return m;
+ }
+ });
+})(tinymce);
+(function(tinymce) {
+ var is = tinymce.is, DOM = tinymce.DOM, each = tinymce.each, Event = tinymce.dom.Event, Element = tinymce.dom.Element;
+
+ tinymce.create('tinymce.ui.DropMenu:tinymce.ui.Menu', {
+ DropMenu : function(id, s) {
+ s = s || {};
+ s.container = s.container || DOM.doc.body;
+ s.offset_x = s.offset_x || 0;
+ s.offset_y = s.offset_y || 0;
+ s.vp_offset_x = s.vp_offset_x || 0;
+ s.vp_offset_y = s.vp_offset_y || 0;
+
+ if (is(s.icons) && !s.icons)
+ s['class'] += ' mceNoIcons';
+
+ this.parent(id, s);
+ this.onShowMenu = new tinymce.util.Dispatcher(this);
+ this.onHideMenu = new tinymce.util.Dispatcher(this);
+ this.classPrefix = 'mceMenu';
+ },
+
+ createMenu : function(s) {
+ var t = this, cs = t.settings, m;
+
+ s.container = s.container || cs.container;
+ s.parent = t;
+ s.constrain = s.constrain || cs.constrain;
+ s['class'] = s['class'] || cs['class'];
+ s.vp_offset_x = s.vp_offset_x || cs.vp_offset_x;
+ s.vp_offset_y = s.vp_offset_y || cs.vp_offset_y;
+ s.keyboard_focus = cs.keyboard_focus;
+ m = new tinymce.ui.DropMenu(s.id || DOM.uniqueId(), s);
+
+ m.onAddItem.add(t.onAddItem.dispatch, t.onAddItem);
+
+ return m;
+ },
+
+ focus : function() {
+ var t = this;
+ if (t.keyboardNav) {
+ t.keyboardNav.focus();
+ }
+ },
+
+ update : function() {
+ var t = this, s = t.settings, tb = DOM.get('menu_' + t.id + '_tbl'), co = DOM.get('menu_' + t.id + '_co'), tw, th;
+
+ tw = s.max_width ? Math.min(tb.offsetWidth, s.max_width) : tb.offsetWidth;
+ th = s.max_height ? Math.min(tb.offsetHeight, s.max_height) : tb.offsetHeight;
+
+ if (!DOM.boxModel)
+ t.element.setStyles({width : tw + 2, height : th + 2});
+ else
+ t.element.setStyles({width : tw, height : th});
+
+ if (s.max_width)
+ DOM.setStyle(co, 'width', tw);
+
+ if (s.max_height) {
+ DOM.setStyle(co, 'height', th);
+
+ if (tb.clientHeight < s.max_height)
+ DOM.setStyle(co, 'overflow', 'hidden');
+ }
+ },
+
+ showMenu : function(x, y, px) {
+ var t = this, s = t.settings, co, vp = DOM.getViewPort(), w, h, mx, my, ot = 2, dm, tb, cp = t.classPrefix;
+
+ t.collapse(1);
+
+ if (t.isMenuVisible)
+ return;
+
+ if (!t.rendered) {
+ co = DOM.add(t.settings.container, t.renderNode());
+
+ each(t.items, function(o) {
+ o.postRender();
+ });
+
+ t.element = new Element('menu_' + t.id, {blocker : 1, container : s.container});
+ } else
+ co = DOM.get('menu_' + t.id);
+
+ // Move layer out of sight unless it's Opera since it scrolls to top of page due to an bug
+ if (!tinymce.isOpera)
+ DOM.setStyles(co, {left : -0xFFFF , top : -0xFFFF});
+
+ DOM.show(co);
+ t.update();
+
+ x += s.offset_x || 0;
+ y += s.offset_y || 0;
+ vp.w -= 4;
+ vp.h -= 4;
+
+ // Move inside viewport if not submenu
+ if (s.constrain) {
+ w = co.clientWidth - ot;
+ h = co.clientHeight - ot;
+ mx = vp.x + vp.w;
+ my = vp.y + vp.h;
+
+ if ((x + s.vp_offset_x + w) > mx)
+ x = px ? px - w : Math.max(0, (mx - s.vp_offset_x) - w);
+
+ if ((y + s.vp_offset_y + h) > my)
+ y = Math.max(0, (my - s.vp_offset_y) - h);
+ }
+
+ DOM.setStyles(co, {left : x , top : y});
+ t.element.update();
+
+ t.isMenuVisible = 1;
+ t.mouseClickFunc = Event.add(co, 'click', function(e) {
+ var m;
+
+ e = e.target;
+
+ if (e && (e = DOM.getParent(e, 'tr')) && !DOM.hasClass(e, cp + 'ItemSub')) {
+ m = t.items[e.id];
+
+ if (m.isDisabled())
+ return;
+
+ dm = t;
+
+ while (dm) {
+ if (dm.hideMenu)
+ dm.hideMenu();
+
+ dm = dm.settings.parent;
+ }
+
+ if (m.settings.onclick)
+ m.settings.onclick(e);
+
+ return false; // Cancel to fix onbeforeunload problem
+ }
+ });
+
+ if (t.hasMenus()) {
+ t.mouseOverFunc = Event.add(co, 'mouseover', function(e) {
+ var m, r, mi;
+
+ e = e.target;
+ if (e && (e = DOM.getParent(e, 'tr'))) {
+ m = t.items[e.id];
+
+ if (t.lastMenu)
+ t.lastMenu.collapse(1);
+
+ if (m.isDisabled())
+ return;
+
+ if (e && DOM.hasClass(e, cp + 'ItemSub')) {
+ //p = DOM.getPos(s.container);
+ r = DOM.getRect(e);
+ m.showMenu((r.x + r.w - ot), r.y - ot, r.x);
+ t.lastMenu = m;
+ DOM.addClass(DOM.get(m.id).firstChild, cp + 'ItemActive');
+ }
+ }
+ });
+ }
+
+ Event.add(co, 'keydown', t._keyHandler, t);
+
+ t.onShowMenu.dispatch(t);
+
+ if (s.keyboard_focus) {
+ t._setupKeyboardNav();
+ }
+ },
+
+ hideMenu : function(c) {
+ var t = this, co = DOM.get('menu_' + t.id), e;
+
+ if (!t.isMenuVisible)
+ return;
+
+ if (t.keyboardNav) t.keyboardNav.destroy();
+ Event.remove(co, 'mouseover', t.mouseOverFunc);
+ Event.remove(co, 'click', t.mouseClickFunc);
+ Event.remove(co, 'keydown', t._keyHandler);
+ DOM.hide(co);
+ t.isMenuVisible = 0;
+
+ if (!c)
+ t.collapse(1);
+
+ if (t.element)
+ t.element.hide();
+
+ if (e = DOM.get(t.id))
+ DOM.removeClass(e.firstChild, t.classPrefix + 'ItemActive');
+
+ t.onHideMenu.dispatch(t);
+ },
+
+ add : function(o) {
+ var t = this, co;
+
+ o = t.parent(o);
+
+ if (t.isRendered && (co = DOM.get('menu_' + t.id)))
+ t._add(DOM.select('tbody', co)[0], o);
+
+ return o;
+ },
+
+ collapse : function(d) {
+ this.parent(d);
+ this.hideMenu(1);
+ },
+
+ remove : function(o) {
+ DOM.remove(o.id);
+ this.destroy();
+
+ return this.parent(o);
+ },
+
+ destroy : function() {
+ var t = this, co = DOM.get('menu_' + t.id);
+
+ if (t.keyboardNav) t.keyboardNav.destroy();
+ Event.remove(co, 'mouseover', t.mouseOverFunc);
+ Event.remove(DOM.select('a', co), 'focus', t.mouseOverFunc);
+ Event.remove(co, 'click', t.mouseClickFunc);
+ Event.remove(co, 'keydown', t._keyHandler);
+
+ if (t.element)
+ t.element.remove();
+
+ DOM.remove(co);
+ },
+
+ renderNode : function() {
+ var t = this, s = t.settings, n, tb, co, w;
+
+ w = DOM.create('div', {role: 'listbox', id : 'menu_' + t.id, 'class' : s['class'], 'style' : 'position:absolute;left:0;top:0;z-index:200000;outline:0'});
+ if (t.settings.parent) {
+ DOM.setAttrib(w, 'aria-parent', 'menu_' + t.settings.parent.id);
+ }
+ co = DOM.add(w, 'div', {role: 'presentation', id : 'menu_' + t.id + '_co', 'class' : t.classPrefix + (s['class'] ? ' ' + s['class'] : '')});
+ t.element = new Element('menu_' + t.id, {blocker : 1, container : s.container});
+
+ if (s.menu_line)
+ DOM.add(co, 'span', {'class' : t.classPrefix + 'Line'});
+
+// n = DOM.add(co, 'div', {id : 'menu_' + t.id + '_co', 'class' : 'mceMenuContainer'});
+ n = DOM.add(co, 'table', {role: 'presentation', id : 'menu_' + t.id + '_tbl', border : 0, cellPadding : 0, cellSpacing : 0});
+ tb = DOM.add(n, 'tbody');
+
+ each(t.items, function(o) {
+ t._add(tb, o);
+ });
+
+ t.rendered = true;
+
+ return w;
+ },
+
+ // Internal functions
+ _setupKeyboardNav : function(){
+ var contextMenu, menuItems, t=this;
+ contextMenu = DOM.get('menu_' + t.id);
+ menuItems = DOM.select('a[role=option]', 'menu_' + t.id);
+ menuItems.splice(0,0,contextMenu);
+ t.keyboardNav = new tinymce.ui.KeyboardNavigation({
+ root: 'menu_' + t.id,
+ items: menuItems,
+ onCancel: function() {
+ t.hideMenu();
+ },
+ enableUpDown: true
+ });
+ contextMenu.focus();
+ },
+
+ _keyHandler : function(evt) {
+ var t = this, e;
+ switch (evt.keyCode) {
+ case 37: // Left
+ if (t.settings.parent) {
+ t.hideMenu();
+ t.settings.parent.focus();
+ Event.cancel(evt);
+ }
+ break;
+ case 39: // Right
+ if (t.mouseOverFunc)
+ t.mouseOverFunc(evt);
+ break;
+ }
+ },
+
+ _add : function(tb, o) {
+ var n, s = o.settings, a, ro, it, cp = this.classPrefix, ic;
+
+ if (s.separator) {
+ ro = DOM.add(tb, 'tr', {id : o.id, 'class' : cp + 'ItemSeparator'});
+ DOM.add(ro, 'td', {'class' : cp + 'ItemSeparator'});
+
+ if (n = ro.previousSibling)
+ DOM.addClass(n, 'mceLast');
+
+ return;
+ }
+
+ n = ro = DOM.add(tb, 'tr', {id : o.id, 'class' : cp + 'Item ' + cp + 'ItemEnabled'});
+ n = it = DOM.add(n, s.titleItem ? 'th' : 'td');
+ n = a = DOM.add(n, 'a', {id: o.id + '_aria', role: s.titleItem ? 'presentation' : 'option', href : 'javascript:;', onclick : "return false;", onmousedown : 'return false;'});
+
+ if (s.parent) {
+ DOM.setAttrib(a, 'aria-haspopup', 'true');
+ DOM.setAttrib(a, 'aria-owns', 'menu_' + o.id);
+ }
+
+ DOM.addClass(it, s['class']);
+// n = DOM.add(n, 'span', {'class' : 'item'});
+
+ ic = DOM.add(n, 'span', {'class' : 'mceIcon' + (s.icon ? ' mce_' + s.icon : '')});
+
+ if (s.icon_src)
+ DOM.add(ic, 'img', {src : s.icon_src});
+
+ n = DOM.add(n, s.element || 'span', {'class' : 'mceText', title : o.settings.title}, o.settings.title);
+
+ if (o.settings.style) {
+ if (typeof o.settings.style == "function")
+ o.settings.style = o.settings.style();
+
+ DOM.setAttrib(n, 'style', o.settings.style);
+ }
+
+ if (tb.childNodes.length == 1)
+ DOM.addClass(ro, 'mceFirst');
+
+ if ((n = ro.previousSibling) && DOM.hasClass(n, cp + 'ItemSeparator'))
+ DOM.addClass(ro, 'mceFirst');
+
+ if (o.collapse)
+ DOM.addClass(ro, cp + 'ItemSub');
+
+ if (n = ro.previousSibling)
+ DOM.removeClass(n, 'mceLast');
+
+ DOM.addClass(ro, 'mceLast');
+ }
+ });
+})(tinymce);
+(function(tinymce) {
+ var DOM = tinymce.DOM;
+
+ tinymce.create('tinymce.ui.Button:tinymce.ui.Control', {
+ Button : function(id, s, ed) {
+ this.parent(id, s, ed);
+ this.classPrefix = 'mceButton';
+ },
+
+ renderHTML : function() {
+ var cp = this.classPrefix, s = this.settings, h, l;
+
+ l = DOM.encode(s.label || '');
+ h = '<a role="button" id="' + this.id + '" href="javascript:;" class="' + cp + ' ' + cp + 'Enabled ' + s['class'] + (l ? ' ' + cp + 'Labeled' : '') +'" onmousedown="return false;" onclick="return false;" aria-labelledby="' + this.id + '_voice" title="' + DOM.encode(s.title) + '">';
+ if (s.image && !(this.editor &&this.editor.forcedHighContrastMode) )
+ h += '<span class="mceIcon ' + s['class'] + '"><img class="mceIcon" src="' + s.image + '" alt="' + DOM.encode(s.title) + '" /></span>' + (l ? '<span class="' + cp + 'Label">' + l + '</span>' : '');
+ else
+ h += '<span class="mceIcon ' + s['class'] + '"></span>' + (l ? '<span class="' + cp + 'Label">' + l + '</span>' : '');
+
+ h += '<span class="mceVoiceLabel mceIconOnly" style="display: none;" id="' + this.id + '_voice">' + s.title + '</span>';
+ h += '</a>';
+ return h;
+ },
+
+ postRender : function() {
+ var t = this, s = t.settings, imgBookmark;
+
+ // In IE a large image that occupies the entire editor area will be deselected when a button is clicked, so
+ // need to keep the selection in case the selection is lost
+ if (tinymce.isIE && t.editor) {
+ tinymce.dom.Event.add(t.id, 'mousedown', function(e) {
+ var nodeName = t.editor.selection.getNode().nodeName;
+ imgBookmark = nodeName === 'IMG' ? t.editor.selection.getBookmark() : null;
+ });
+ }
+ tinymce.dom.Event.add(t.id, 'click', function(e) {
+ if (!t.isDisabled()) {
+ // restore the selection in case the selection is lost in IE
+ if (tinymce.isIE && t.editor && imgBookmark !== null) {
+ t.editor.selection.moveToBookmark(imgBookmark);
+ }
+ return s.onclick.call(s.scope, e);
+ }
+ });
+ tinymce.dom.Event.add(t.id, 'keyup', function(e) {
+ if (!t.isDisabled() && e.keyCode==tinymce.VK.SPACEBAR)
+ return s.onclick.call(s.scope, e);
+ });
+ }
+ });
+})(tinymce);
+
+(function(tinymce) {
+ var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, Dispatcher = tinymce.util.Dispatcher, undef;
+
+ tinymce.create('tinymce.ui.ListBox:tinymce.ui.Control', {
+ ListBox : function(id, s, ed) {
+ var t = this;
+
+ t.parent(id, s, ed);
+
+ t.items = [];
+
+ t.onChange = new Dispatcher(t);
+
+ t.onPostRender = new Dispatcher(t);
+
+ t.onAdd = new Dispatcher(t);
+
+ t.onRenderMenu = new tinymce.util.Dispatcher(this);
+
+ t.classPrefix = 'mceListBox';
+ t.marked = {};
+ },
+
+ select : function(va) {
+ var t = this, fv, f;
+
+ t.marked = {};
+
+ if (va == undef)
+ return t.selectByIndex(-1);
+
+ // Is string or number make function selector
+ if (va && typeof(va)=="function")
+ f = va;
+ else {
+ f = function(v) {
+ return v == va;
+ };
+ }
+
+ // Do we need to do something?
+ if (va != t.selectedValue) {
+ // Find item
+ each(t.items, function(o, i) {
+ if (f(o.value)) {
+ fv = 1;
+ t.selectByIndex(i);
+ return false;
+ }
+ });
+
+ if (!fv)
+ t.selectByIndex(-1);
+ }
+ },
+
+ selectByIndex : function(idx) {
+ var t = this, e, o, label;
+
+ t.marked = {};
+
+ if (idx != t.selectedIndex) {
+ e = DOM.get(t.id + '_text');
+ label = DOM.get(t.id + '_voiceDesc');
+ o = t.items[idx];
+
+ if (o) {
+ t.selectedValue = o.value;
+ t.selectedIndex = idx;
+ DOM.setHTML(e, DOM.encode(o.title));
+ DOM.setHTML(label, t.settings.title + " - " + o.title);
+ DOM.removeClass(e, 'mceTitle');
+ DOM.setAttrib(t.id, 'aria-valuenow', o.title);
+ } else {
+ DOM.setHTML(e, DOM.encode(t.settings.title));
+ DOM.setHTML(label, DOM.encode(t.settings.title));
+ DOM.addClass(e, 'mceTitle');
+ t.selectedValue = t.selectedIndex = null;
+ DOM.setAttrib(t.id, 'aria-valuenow', t.settings.title);
+ }
+ e = 0;
+ }
+ },
+
+ mark : function(value) {
+ this.marked[value] = true;
+ },
+
+ add : function(n, v, o) {
+ var t = this;
+
+ o = o || {};
+ o = tinymce.extend(o, {
+ title : n,
+ value : v
+ });
+
+ t.items.push(o);
+ t.onAdd.dispatch(t, o);
+ },
+
+ getLength : function() {
+ return this.items.length;
+ },
+
+ renderHTML : function() {
+ var h = '', t = this, s = t.settings, cp = t.classPrefix;
+
+ h = '<span role="listbox" aria-haspopup="true" aria-labelledby="' + t.id +'_voiceDesc" aria-describedby="' + t.id + '_voiceDesc"><table role="presentation" tabindex="0" id="' + t.id + '" cellpadding="0" cellspacing="0" class="' + cp + ' ' + cp + 'Enabled' + (s['class'] ? (' ' + s['class']) : '') + '"><tbody><tr>';
+ h += '<td>' + DOM.createHTML('span', {id: t.id + '_voiceDesc', 'class': 'voiceLabel', style:'display:none;'}, t.settings.title);
+ h += DOM.createHTML('a', {id : t.id + '_text', tabindex : -1, href : 'javascript:;', 'class' : 'mceText', onclick : "return false;", onmousedown : 'return false;'}, DOM.encode(t.settings.title)) + '</td>';
+ h += '<td>' + DOM.createHTML('a', {id : t.id + '_open', tabindex : -1, href : 'javascript:;', 'class' : 'mceOpen', onclick : "return false;", onmousedown : 'return false;'}, '<span><span style="display:none;" class="mceIconOnly" aria-hidden="true">\u25BC</span></span>') + '</td>';
+ h += '</tr></tbody></table></span>';
+
+ return h;
+ },
+
+ showMenu : function() {
+ var t = this, p2, e = DOM.get(this.id), m;
+
+ if (t.isDisabled() || t.items.length === 0)
+ return;
+
+ if (t.menu && t.menu.isMenuVisible)
+ return t.hideMenu();
+
+ if (!t.isMenuRendered) {
+ t.renderMenu();
+ t.isMenuRendered = true;
+ }
+
+ p2 = DOM.getPos(e);
+
+ m = t.menu;
+ m.settings.offset_x = p2.x;
+ m.settings.offset_y = p2.y;
+ m.settings.keyboard_focus = !tinymce.isOpera; // Opera is buggy when it comes to auto focus
+
+ // Select in menu
+ each(t.items, function(o) {
+ if (m.items[o.id]) {
+ m.items[o.id].setSelected(0);
+ }
+ });
+
+ each(t.items, function(o) {
+ if (m.items[o.id] && t.marked[o.value]) {
+ m.items[o.id].setSelected(1);
+ }
+
+ if (o.value === t.selectedValue) {
+ m.items[o.id].setSelected(1);
+ }
+ });
+
+ m.showMenu(0, e.clientHeight);
+
+ Event.add(DOM.doc, 'mousedown', t.hideMenu, t);
+ DOM.addClass(t.id, t.classPrefix + 'Selected');
+
+ //DOM.get(t.id + '_text').focus();
+ },
+
+ hideMenu : function(e) {
+ var t = this;
+
+ if (t.menu && t.menu.isMenuVisible) {
+ DOM.removeClass(t.id, t.classPrefix + 'Selected');
+
+ // Prevent double toogles by canceling the mouse click event to the button
+ if (e && e.type == "mousedown" && (e.target.id == t.id + '_text' || e.target.id == t.id + '_open'))
+ return;
+
+ if (!e || !DOM.getParent(e.target, '.mceMenu')) {
+ DOM.removeClass(t.id, t.classPrefix + 'Selected');
+ Event.remove(DOM.doc, 'mousedown', t.hideMenu, t);
+ t.menu.hideMenu();
+ }
+ }
+ },
+
+ renderMenu : function() {
+ var t = this, m;
+
+ m = t.settings.control_manager.createDropMenu(t.id + '_menu', {
+ menu_line : 1,
+ 'class' : t.classPrefix + 'Menu mceNoIcons',
+ max_width : 250,
+ max_height : 150
+ });
+
+ m.onHideMenu.add(function() {
+ t.hideMenu();
+ t.focus();
+ });
+
+ m.add({
+ title : t.settings.title,
+ 'class' : 'mceMenuItemTitle',
+ onclick : function() {
+ if (t.settings.onselect('') !== false)
+ t.select(''); // Must be runned after
+ }
+ });
+
+ each(t.items, function(o) {
+ // No value then treat it as a title
+ if (o.value === undef) {
+ m.add({
+ title : o.title,
+ role : "option",
+ 'class' : 'mceMenuItemTitle',
+ onclick : function() {
+ if (t.settings.onselect('') !== false)
+ t.select(''); // Must be runned after
+ }
+ });
+ } else {
+ o.id = DOM.uniqueId();
+ o.role= "option";
+ o.onclick = function() {
+ if (t.settings.onselect(o.value) !== false)
+ t.select(o.value); // Must be runned after
+ };
+
+ m.add(o);
+ }
+ });
+
+ t.onRenderMenu.dispatch(t, m);
+ t.menu = m;
+ },
+
+ postRender : function() {
+ var t = this, cp = t.classPrefix;
+
+ Event.add(t.id, 'click', t.showMenu, t);
+ Event.add(t.id, 'keydown', function(evt) {
+ if (evt.keyCode == 32) { // Space
+ t.showMenu(evt);
+ Event.cancel(evt);
+ }
+ });
+ Event.add(t.id, 'focus', function() {
+ if (!t._focused) {
+ t.keyDownHandler = Event.add(t.id, 'keydown', function(e) {
+ if (e.keyCode == 40) {
+ t.showMenu();
+ Event.cancel(e);
+ }
+ });
+ t.keyPressHandler = Event.add(t.id, 'keypress', function(e) {
+ var v;
+ if (e.keyCode == 13) {
+ // Fake select on enter
+ v = t.selectedValue;
+ t.selectedValue = null; // Needs to be null to fake change
+ Event.cancel(e);
+ t.settings.onselect(v);
+ }
+ });
+ }
+
+ t._focused = 1;
+ });
+ Event.add(t.id, 'blur', function() {
+ Event.remove(t.id, 'keydown', t.keyDownHandler);
+ Event.remove(t.id, 'keypress', t.keyPressHandler);
+ t._focused = 0;
+ });
+
+ // Old IE doesn't have hover on all elements
+ if (tinymce.isIE6 || !DOM.boxModel) {
+ Event.add(t.id, 'mouseover', function() {
+ if (!DOM.hasClass(t.id, cp + 'Disabled'))
+ DOM.addClass(t.id, cp + 'Hover');
+ });
+
+ Event.add(t.id, 'mouseout', function() {
+ if (!DOM.hasClass(t.id, cp + 'Disabled'))
+ DOM.removeClass(t.id, cp + 'Hover');
+ });
+ }
+
+ t.onPostRender.dispatch(t, DOM.get(t.id));
+ },
+
+ destroy : function() {
+ this.parent();
+
+ Event.clear(this.id + '_text');
+ Event.clear(this.id + '_open');
+ }
+ });
+})(tinymce);
+
+(function(tinymce) {
+ var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, Dispatcher = tinymce.util.Dispatcher, undef;
+
+ tinymce.create('tinymce.ui.NativeListBox:tinymce.ui.ListBox', {
+ NativeListBox : function(id, s) {
+ this.parent(id, s);
+ this.classPrefix = 'mceNativeListBox';
+ },
+
+ setDisabled : function(s) {
+ DOM.get(this.id).disabled = s;
+ this.setAriaProperty('disabled', s);
+ },
+
+ isDisabled : function() {
+ return DOM.get(this.id).disabled;
+ },
+
+ select : function(va) {
+ var t = this, fv, f;
+
+ if (va == undef)
+ return t.selectByIndex(-1);
+
+ // Is string or number make function selector
+ if (va && typeof(va)=="function")
+ f = va;
+ else {
+ f = function(v) {
+ return v == va;
+ };
+ }
+
+ // Do we need to do something?
+ if (va != t.selectedValue) {
+ // Find item
+ each(t.items, function(o, i) {
+ if (f(o.value)) {
+ fv = 1;
+ t.selectByIndex(i);
+ return false;
+ }
+ });
+
+ if (!fv)
+ t.selectByIndex(-1);
+ }
+ },
+
+ selectByIndex : function(idx) {
+ DOM.get(this.id).selectedIndex = idx + 1;
+ this.selectedValue = this.items[idx] ? this.items[idx].value : null;
+ },
+
+ add : function(n, v, a) {
+ var o, t = this;
+
+ a = a || {};
+ a.value = v;
+
+ if (t.isRendered())
+ DOM.add(DOM.get(this.id), 'option', a, n);
+
+ o = {
+ title : n,
+ value : v,
+ attribs : a
+ };
+
+ t.items.push(o);
+ t.onAdd.dispatch(t, o);
+ },
+
+ getLength : function() {
+ return this.items.length;
+ },
+
+ renderHTML : function() {
+ var h, t = this;
+
+ h = DOM.createHTML('option', {value : ''}, '-- ' + t.settings.title + ' --');
+
+ each(t.items, function(it) {
+ h += DOM.createHTML('option', {value : it.value}, it.title);
+ });
+
+ h = DOM.createHTML('select', {id : t.id, 'class' : 'mceNativeListBox', 'aria-labelledby': t.id + '_aria'}, h);
+ h += DOM.createHTML('span', {id : t.id + '_aria', 'style': 'display: none'}, t.settings.title);
+ return h;
+ },
+
+ postRender : function() {
+ var t = this, ch, changeListenerAdded = true;
+
+ t.rendered = true;
+
+ function onChange(e) {
+ var v = t.items[e.target.selectedIndex - 1];
+
+ if (v && (v = v.value)) {
+ t.onChange.dispatch(t, v);
+
+ if (t.settings.onselect)
+ t.settings.onselect(v);
+ }
+ };
+
+ Event.add(t.id, 'change', onChange);
+
+ // Accessibility keyhandler
+ Event.add(t.id, 'keydown', function(e) {
+ var bf;
+
+ Event.remove(t.id, 'change', ch);
+ changeListenerAdded = false;
+
+ bf = Event.add(t.id, 'blur', function() {
+ if (changeListenerAdded) return;
+ changeListenerAdded = true;
+ Event.add(t.id, 'change', onChange);
+ Event.remove(t.id, 'blur', bf);
+ });
+
+ //prevent default left and right keys on chrome - so that the keyboard navigation is used.
+ if (tinymce.isWebKit && (e.keyCode==37 ||e.keyCode==39)) {
+ return Event.prevent(e);
+ }
+
+ if (e.keyCode == 13 || e.keyCode == 32) {
+ onChange(e);
+ return Event.cancel(e);
+ }
+ });
+
+ t.onPostRender.dispatch(t, DOM.get(t.id));
+ }
+ });
+})(tinymce);
+
+(function(tinymce) {
+ var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each;
+
+ tinymce.create('tinymce.ui.MenuButton:tinymce.ui.Button', {
+ MenuButton : function(id, s, ed) {
+ this.parent(id, s, ed);
+
+ this.onRenderMenu = new tinymce.util.Dispatcher(this);
+
+ s.menu_container = s.menu_container || DOM.doc.body;
+ },
+
+ showMenu : function() {
+ var t = this, p1, p2, e = DOM.get(t.id), m;
+
+ if (t.isDisabled())
+ return;
+
+ if (!t.isMenuRendered) {
+ t.renderMenu();
+ t.isMenuRendered = true;
+ }
+
+ if (t.isMenuVisible)
+ return t.hideMenu();
+
+ p1 = DOM.getPos(t.settings.menu_container);
+ p2 = DOM.getPos(e);
+
+ m = t.menu;
+ m.settings.offset_x = p2.x;
+ m.settings.offset_y = p2.y;
+ m.settings.vp_offset_x = p2.x;
+ m.settings.vp_offset_y = p2.y;
+ m.settings.keyboard_focus = t._focused;
+ m.showMenu(0, e.firstChild.clientHeight);
+
+ Event.add(DOM.doc, 'mousedown', t.hideMenu, t);
+ t.setState('Selected', 1);
+
+ t.isMenuVisible = 1;
+ },
+
+ renderMenu : function() {
+ var t = this, m;
+
+ m = t.settings.control_manager.createDropMenu(t.id + '_menu', {
+ menu_line : 1,
+ 'class' : this.classPrefix + 'Menu',
+ icons : t.settings.icons
+ });
+
+ m.onHideMenu.add(function() {
+ t.hideMenu();
+ t.focus();
+ });
+
+ t.onRenderMenu.dispatch(t, m);
+ t.menu = m;
+ },
+
+ hideMenu : function(e) {
+ var t = this;
+
+ // Prevent double toogles by canceling the mouse click event to the button
+ if (e && e.type == "mousedown" && DOM.getParent(e.target, function(e) {return e.id === t.id || e.id === t.id + '_open';}))
+ return;
+
+ if (!e || !DOM.getParent(e.target, '.mceMenu')) {
+ t.setState('Selected', 0);
+ Event.remove(DOM.doc, 'mousedown', t.hideMenu, t);
+ if (t.menu)
+ t.menu.hideMenu();
+ }
+
+ t.isMenuVisible = 0;
+ },
+
+ postRender : function() {
+ var t = this, s = t.settings;
+
+ Event.add(t.id, 'click', function() {
+ if (!t.isDisabled()) {
+ if (s.onclick)
+ s.onclick(t.value);
+
+ t.showMenu();
+ }
+ });
+ }
+ });
+})(tinymce);
+
+(function(tinymce) {
+ var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each;
+
+ tinymce.create('tinymce.ui.SplitButton:tinymce.ui.MenuButton', {
+ SplitButton : function(id, s, ed) {
+ this.parent(id, s, ed);
+ this.classPrefix = 'mceSplitButton';
+ },
+
+ renderHTML : function() {
+ var h, t = this, s = t.settings, h1;
+
+ h = '<tbody><tr>';
+
+ if (s.image)
+ h1 = DOM.createHTML('img ', {src : s.image, role: 'presentation', 'class' : 'mceAction ' + s['class']});
+ else
+ h1 = DOM.createHTML('span', {'class' : 'mceAction ' + s['class']}, '');
+
+ h1 += DOM.createHTML('span', {'class': 'mceVoiceLabel mceIconOnly', id: t.id + '_voice', style: 'display:none;'}, s.title);
+ h += '<td >' + DOM.createHTML('a', {role: 'button', id : t.id + '_action', tabindex: '-1', href : 'javascript:;', 'class' : 'mceAction ' + s['class'], onclick : "return false;", onmousedown : 'return false;', title : s.title}, h1) + '</td>';
+
+ h1 = DOM.createHTML('span', {'class' : 'mceOpen ' + s['class']}, '<span style="display:none;" class="mceIconOnly" aria-hidden="true">\u25BC</span>');
+ h += '<td >' + DOM.createHTML('a', {role: 'button', id : t.id + '_open', tabindex: '-1', href : 'javascript:;', 'class' : 'mceOpen ' + s['class'], onclick : "return false;", onmousedown : 'return false;', title : s.title}, h1) + '</td>';
+
+ h += '</tr></tbody>';
+ h = DOM.createHTML('table', { role: 'presentation', 'class' : 'mceSplitButton mceSplitButtonEnabled ' + s['class'], cellpadding : '0', cellspacing : '0', title : s.title}, h);
+ return DOM.createHTML('div', {id : t.id, role: 'button', tabindex: '0', 'aria-labelledby': t.id + '_voice', 'aria-haspopup': 'true'}, h);
+ },
+
+ postRender : function() {
+ var t = this, s = t.settings, activate;
+
+ if (s.onclick) {
+ activate = function(evt) {
+ if (!t.isDisabled()) {
+ s.onclick(t.value);
+ Event.cancel(evt);
+ }
+ };
+ Event.add(t.id + '_action', 'click', activate);
+ Event.add(t.id, ['click', 'keydown'], function(evt) {
+ var DOM_VK_SPACE = 32, DOM_VK_ENTER = 14, DOM_VK_RETURN = 13, DOM_VK_UP = 38, DOM_VK_DOWN = 40;
+ if ((evt.keyCode === 32 || evt.keyCode === 13 || evt.keyCode === 14) && !evt.altKey && !evt.ctrlKey && !evt.metaKey) {
+ activate();
+ Event.cancel(evt);
+ } else if (evt.type === 'click' || evt.keyCode === DOM_VK_DOWN) {
+ t.showMenu();
+ Event.cancel(evt);
+ }
+ });
+ }
+
+ Event.add(t.id + '_open', 'click', function (evt) {
+ t.showMenu();
+ Event.cancel(evt);
+ });
+ Event.add([t.id, t.id + '_open'], 'focus', function() {t._focused = 1;});
+ Event.add([t.id, t.id + '_open'], 'blur', function() {t._focused = 0;});
+
+ // Old IE doesn't have hover on all elements
+ if (tinymce.isIE6 || !DOM.boxModel) {
+ Event.add(t.id, 'mouseover', function() {
+ if (!DOM.hasClass(t.id, 'mceSplitButtonDisabled'))
+ DOM.addClass(t.id, 'mceSplitButtonHover');
+ });
+
+ Event.add(t.id, 'mouseout', function() {
+ if (!DOM.hasClass(t.id, 'mceSplitButtonDisabled'))
+ DOM.removeClass(t.id, 'mceSplitButtonHover');
+ });
+ }
+ },
+
+ destroy : function() {
+ this.parent();
+
+ Event.clear(this.id + '_action');
+ Event.clear(this.id + '_open');
+ Event.clear(this.id);
+ }
+ });
+})(tinymce);
+
+(function(tinymce) {
+ var DOM = tinymce.DOM, Event = tinymce.dom.Event, is = tinymce.is, each = tinymce.each;
+
+ tinymce.create('tinymce.ui.ColorSplitButton:tinymce.ui.SplitButton', {
+ ColorSplitButton : function(id, s, ed) {
+ var t = this;
+
+ t.parent(id, s, ed);
+
+ t.settings = s = tinymce.extend({
+ colors : '000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF',
+ grid_width : 8,
+ default_color : '#888888'
+ }, t.settings);
+
+ t.onShowMenu = new tinymce.util.Dispatcher(t);
+
+ t.onHideMenu = new tinymce.util.Dispatcher(t);
+
+ t.value = s.default_color;
+ },
+
+ showMenu : function() {
+ var t = this, r, p, e, p2;
+
+ if (t.isDisabled())
+ return;
+
+ if (!t.isMenuRendered) {
+ t.renderMenu();
+ t.isMenuRendered = true;
+ }
+
+ if (t.isMenuVisible)
+ return t.hideMenu();
+
+ e = DOM.get(t.id);
+ DOM.show(t.id + '_menu');
+ DOM.addClass(e, 'mceSplitButtonSelected');
+ p2 = DOM.getPos(e);
+ DOM.setStyles(t.id + '_menu', {
+ left : p2.x,
+ top : p2.y + e.firstChild.clientHeight,
+ zIndex : 200000
+ });
+ e = 0;
+
+ Event.add(DOM.doc, 'mousedown', t.hideMenu, t);
+ t.onShowMenu.dispatch(t);
+
+ if (t._focused) {
+ t._keyHandler = Event.add(t.id + '_menu', 'keydown', function(e) {
+ if (e.keyCode == 27)
+ t.hideMenu();
+ });
+
+ DOM.select('a', t.id + '_menu')[0].focus(); // Select first link
+ }
+
+ t.keyboardNav = new tinymce.ui.KeyboardNavigation({
+ root: t.id + '_menu',
+ items: DOM.select('a', t.id + '_menu'),
+ onCancel: function() {
+ t.hideMenu();
+ t.focus();
+ }
+ });
+
+ t.keyboardNav.focus();
+ t.isMenuVisible = 1;
+ },
+
+ hideMenu : function(e) {
+ var t = this;
+
+ if (t.isMenuVisible) {
+ // Prevent double toogles by canceling the mouse click event to the button
+ if (e && e.type == "mousedown" && DOM.getParent(e.target, function(e) {return e.id === t.id + '_open';}))
+ return;
+
+ if (!e || !DOM.getParent(e.target, '.mceSplitButtonMenu')) {
+ DOM.removeClass(t.id, 'mceSplitButtonSelected');
+ Event.remove(DOM.doc, 'mousedown', t.hideMenu, t);
+ Event.remove(t.id + '_menu', 'keydown', t._keyHandler);
+ DOM.hide(t.id + '_menu');
+ }
+
+ t.isMenuVisible = 0;
+ t.onHideMenu.dispatch();
+ t.keyboardNav.destroy();
+ }
+ },
+
+ renderMenu : function() {
+ var t = this, m, i = 0, s = t.settings, n, tb, tr, w, context;
+
+ w = DOM.add(s.menu_container, 'div', {role: 'listbox', id : t.id + '_menu', 'class' : s.menu_class + ' ' + s['class'], style : 'position:absolute;left:0;top:-1000px;'});
+ m = DOM.add(w, 'div', {'class' : s['class'] + ' mceSplitButtonMenu'});
+ DOM.add(m, 'span', {'class' : 'mceMenuLine'});
+
+ n = DOM.add(m, 'table', {role: 'presentation', 'class' : 'mceColorSplitMenu'});
+ tb = DOM.add(n, 'tbody');
+
+ // Generate color grid
+ i = 0;
+ each(is(s.colors, 'array') ? s.colors : s.colors.split(','), function(c) {
+ c = c.replace(/^#/, '');
+
+ if (!i--) {
+ tr = DOM.add(tb, 'tr');
+ i = s.grid_width - 1;
+ }
+
+ n = DOM.add(tr, 'td');
+ var settings = {
+ href : 'javascript:;',
+ style : {
+ backgroundColor : '#' + c
+ },
+ 'title': t.editor.getLang('colors.' + c, c),
+ 'data-mce-color' : '#' + c
+ };
+
+ // adding a proper ARIA role = button causes JAWS to read things incorrectly on IE.
+ if (!tinymce.isIE ) {
+ settings.role = 'option';
+ }
+
+ n = DOM.add(n, 'a', settings);
+
+ if (t.editor.forcedHighContrastMode) {
+ n = DOM.add(n, 'canvas', { width: 16, height: 16, 'aria-hidden': 'true' });
+ if (n.getContext && (context = n.getContext("2d"))) {
+ context.fillStyle = '#' + c;
+ context.fillRect(0, 0, 16, 16);
+ } else {
+ // No point leaving a canvas element around if it's not supported for drawing on anyway.
+ DOM.remove(n);
+ }
+ }
+ });
+
+ if (s.more_colors_func) {
+ n = DOM.add(tb, 'tr');
+ n = DOM.add(n, 'td', {colspan : s.grid_width, 'class' : 'mceMoreColors'});
+ n = DOM.add(n, 'a', {role: 'option', id : t.id + '_more', href : 'javascript:;', onclick : 'return false;', 'class' : 'mceMoreColors'}, s.more_colors_title);
+
+ Event.add(n, 'click', function(e) {
+ s.more_colors_func.call(s.more_colors_scope || this);
+ return Event.cancel(e); // Cancel to fix onbeforeunload problem
+ });
+ }
+
+ DOM.addClass(m, 'mceColorSplitMenu');
+
+ // Prevent IE from scrolling and hindering click to occur #4019
+ Event.add(t.id + '_menu', 'mousedown', function(e) {return Event.cancel(e);});
+
+ Event.add(t.id + '_menu', 'click', function(e) {
+ var c;
+
+ e = DOM.getParent(e.target, 'a', tb);
+
+ if (e && e.nodeName.toLowerCase() == 'a' && (c = e.getAttribute('data-mce-color')))
+ t.setColor(c);
+
+ return false; // Prevent IE auto save warning
+ });
+
+ return w;
+ },
+
+ setColor : function(c) {
+ this.displayColor(c);
+ this.hideMenu();
+ this.settings.onselect(c);
+ },
+
+ displayColor : function(c) {
+ var t = this;
+
+ DOM.setStyle(t.id + '_preview', 'backgroundColor', c);
+
+ t.value = c;
+ },
+
+ postRender : function() {
+ var t = this, id = t.id;
+
+ t.parent();
+ DOM.add(id + '_action', 'div', {id : id + '_preview', 'class' : 'mceColorPreview'});
+ DOM.setStyle(t.id + '_preview', 'backgroundColor', t.value);
+ },
+
+ destroy : function() {
+ var self = this;
+
+ self.parent();
+
+ Event.clear(self.id + '_menu');
+ Event.clear(self.id + '_more');
+ DOM.remove(self.id + '_menu');
+
+ if (self.keyboardNav) {
+ self.keyboardNav.destroy();
+ }
+ }
+ });
+})(tinymce);
+
+(function(tinymce) {
+// Shorten class names
+var dom = tinymce.DOM, each = tinymce.each, Event = tinymce.dom.Event;
+tinymce.create('tinymce.ui.ToolbarGroup:tinymce.ui.Container', {
+ renderHTML : function() {
+ var t = this, h = [], controls = t.controls, each = tinymce.each, settings = t.settings;
+
+ h.push('<div id="' + t.id + '" role="group" aria-labelledby="' + t.id + '_voice">');
+ //TODO: ACC test this out - adding a role = application for getting the landmarks working well.
+ h.push("<span role='application'>");
+ h.push('<span id="' + t.id + '_voice" class="mceVoiceLabel" style="display:none;">' + dom.encode(settings.name) + '</span>');
+ each(controls, function(toolbar) {
+ h.push(toolbar.renderHTML());
+ });
+ h.push("</span>");
+ h.push('</div>');
+
+ return h.join('');
+ },
+
+ focus : function() {
+ var t = this;
+ dom.get(t.id).focus();
+ },
+
+ postRender : function() {
+ var t = this, items = [];
+
+ each(t.controls, function(toolbar) {
+ each (toolbar.controls, function(control) {
+ if (control.id) {
+ items.push(control);
+ }
+ });
+ });
+
+ t.keyNav = new tinymce.ui.KeyboardNavigation({
+ root: t.id,
+ items: items,
+ onCancel: function() {
+ //Move focus if webkit so that navigation back will read the item.
+ if (tinymce.isWebKit) {
+ dom.get(t.editor.id+"_ifr").focus();
+ }
+ t.editor.focus();
+ },
+ excludeFromTabOrder: !t.settings.tab_focus_toolbar
+ });
+ },
+
+ destroy : function() {
+ var self = this;
+
+ self.parent();
+ self.keyNav.destroy();
+ Event.clear(self.id);
+ }
+});
+})(tinymce);
+
+(function(tinymce) {
+// Shorten class names
+var dom = tinymce.DOM, each = tinymce.each;
+tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', {
+ renderHTML : function() {
+ var t = this, h = '', c, co, s = t.settings, i, pr, nx, cl;
+
+ cl = t.controls;
+ for (i=0; i<cl.length; i++) {
+ // Get current control, prev control, next control and if the control is a list box or not
+ co = cl[i];
+ pr = cl[i - 1];
+ nx = cl[i + 1];
+
+ // Add toolbar start
+ if (i === 0) {
+ c = 'mceToolbarStart';
+
+ if (co.Button)
+ c += ' mceToolbarStartButton';
+ else if (co.SplitButton)
+ c += ' mceToolbarStartSplitButton';
+ else if (co.ListBox)
+ c += ' mceToolbarStartListBox';
+
+ h += dom.createHTML('td', {'class' : c}, dom.createHTML('span', null, '<!-- IE -->'));
+ }
+
+ // Add toolbar end before list box and after the previous button
+ // This is to fix the o2k7 editor skins
+ if (pr && co.ListBox) {
+ if (pr.Button || pr.SplitButton)
+ h += dom.createHTML('td', {'class' : 'mceToolbarEnd'}, dom.createHTML('span', null, '<!-- IE -->'));
+ }
+
+ // Render control HTML
+
+ // IE 8 quick fix, needed to propertly generate a hit area for anchors
+ if (dom.stdMode)
+ h += '<td style="position: relative">' + co.renderHTML() + '</td>';
+ else
+ h += '<td>' + co.renderHTML() + '</td>';
+
+ // Add toolbar start after list box and before the next button
+ // This is to fix the o2k7 editor skins
+ if (nx && co.ListBox) {
+ if (nx.Button || nx.SplitButton)
+ h += dom.createHTML('td', {'class' : 'mceToolbarStart'}, dom.createHTML('span', null, '<!-- IE -->'));
+ }
+ }
+
+ c = 'mceToolbarEnd';
+
+ if (co.Button)
+ c += ' mceToolbarEndButton';
+ else if (co.SplitButton)
+ c += ' mceToolbarEndSplitButton';
+ else if (co.ListBox)
+ c += ' mceToolbarEndListBox';
+
+ h += dom.createHTML('td', {'class' : c}, dom.createHTML('span', null, '<!-- IE -->'));
+
+ return dom.createHTML('table', {id : t.id, 'class' : 'mceToolbar' + (s['class'] ? ' ' + s['class'] : ''), cellpadding : '0', cellspacing : '0', align : t.settings.align || '', role: 'presentation', tabindex: '-1'}, '<tbody><tr>' + h + '</tr></tbody>');
+ }
+});
+})(tinymce);
+
+(function(tinymce) {
+ var Dispatcher = tinymce.util.Dispatcher, each = tinymce.each;
+
+ tinymce.create('tinymce.AddOnManager', {
+ AddOnManager : function() {
+ var self = this;
+
+ self.items = [];
+ self.urls = {};
+ self.lookup = {};
+ self.onAdd = new Dispatcher(self);
+ },
+
+ get : function(n) {
+ if (this.lookup[n]) {
+ return this.lookup[n].instance;
+ } else {
+ return undefined;
+ }
+ },
+
+ dependencies : function(n) {
+ var result;
+ if (this.lookup[n]) {
+ result = this.lookup[n].dependencies;
+ }
+ return result || [];
+ },
+
+ requireLangPack : function(n) {
+ var s = tinymce.settings;
+
+ if (s && s.language && s.language_load !== false)
+ tinymce.ScriptLoader.add(this.urls[n] + '/langs/' + s.language + '.js');
+ },
+
+ add : function(id, o, dependencies) {
+ this.items.push(o);
+ this.lookup[id] = {instance:o, dependencies:dependencies};
+ this.onAdd.dispatch(this, id, o);
+
+ return o;
+ },
+ createUrl: function(baseUrl, dep) {
+ if (typeof dep === "object") {
+ return dep
+ } else {
+ return {prefix: baseUrl.prefix, resource: dep, suffix: baseUrl.suffix};
+ }
+ },
+
+ addComponents: function(pluginName, scripts) {
+ var pluginUrl = this.urls[pluginName];
+ tinymce.each(scripts, function(script){
+ tinymce.ScriptLoader.add(pluginUrl+"/"+script);
+ });
+ },
+
+ load : function(n, u, cb, s) {
+ var t = this, url = u;
+
+ function loadDependencies() {
+ var dependencies = t.dependencies(n);
+ tinymce.each(dependencies, function(dep) {
+ var newUrl = t.createUrl(u, dep);
+ t.load(newUrl.resource, newUrl, undefined, undefined);
+ });
+ if (cb) {
+ if (s) {
+ cb.call(s);
+ } else {
+ cb.call(tinymce.ScriptLoader);
+ }
+ }
+ }
+
+ if (t.urls[n])
+ return;
+ if (typeof u === "object")
+ url = u.prefix + u.resource + u.suffix;
+
+ if (url.indexOf('/') !== 0 && url.indexOf('://') == -1)
+ url = tinymce.baseURL + '/' + url;
+
+ t.urls[n] = url.substring(0, url.lastIndexOf('/'));
+
+ if (t.lookup[n]) {
+ loadDependencies();
+ } else {
+ tinymce.ScriptLoader.add(url, loadDependencies, s);
+ }
+ }
+ });
+
+ // Create plugin and theme managers
+ tinymce.PluginManager = new tinymce.AddOnManager();
+ tinymce.ThemeManager = new tinymce.AddOnManager();
+}(tinymce));
+
+(function(tinymce) {
+ // Shorten names
+ var each = tinymce.each, extend = tinymce.extend,
+ DOM = tinymce.DOM, Event = tinymce.dom.Event,
+ ThemeManager = tinymce.ThemeManager, PluginManager = tinymce.PluginManager,
+ explode = tinymce.explode,
+ Dispatcher = tinymce.util.Dispatcher, undef, instanceCounter = 0;
+
+ // Setup some URLs where the editor API is located and where the document is
+ tinymce.documentBaseURL = window.location.href.replace(/[\?#].*$/, '').replace(/[\/\\][^\/]+$/, '');
+ if (!/[\/\\]$/.test(tinymce.documentBaseURL))
+ tinymce.documentBaseURL += '/';
+
+ tinymce.baseURL = new tinymce.util.URI(tinymce.documentBaseURL).toAbsolute(tinymce.baseURL);
+
+ tinymce.baseURI = new tinymce.util.URI(tinymce.baseURL);
+
+ // Add before unload listener
+ // This was required since IE was leaking memory if you added and removed beforeunload listeners
+ // with attachEvent/detatchEvent so this only adds one listener and instances can the attach to the onBeforeUnload event
+ tinymce.onBeforeUnload = new Dispatcher(tinymce);
+
+ // Must be on window or IE will leak if the editor is placed in frame or iframe
+ Event.add(window, 'beforeunload', function(e) {
+ tinymce.onBeforeUnload.dispatch(tinymce, e);
+ });
+
+ tinymce.onAddEditor = new Dispatcher(tinymce);
+
+ tinymce.onRemoveEditor = new Dispatcher(tinymce);
+
+ tinymce.EditorManager = extend(tinymce, {
+ editors : [],
+
+ i18n : {},
+
+ activeEditor : null,
+
+ init : function(s) {
+ var t = this, pl, sl = tinymce.ScriptLoader, e, el = [], ed;
+
+ function createId(elm) {
+ var id = elm.id;
+
+ // Use element id, or unique name or generate a unique id
+ if (!id) {
+ id = elm.name;
+
+ if (id && !DOM.get(id)) {
+ id = elm.name;
+ } else {
+ // Generate unique name
+ id = DOM.uniqueId();
+ }
+
+ elm.setAttribute('id', id);
+ }
+
+ return id;
+ };
+
+ function execCallback(se, n, s) {
+ var f = se[n];
+
+ if (!f)
+ return;
+
+ if (tinymce.is(f, 'string')) {
+ s = f.replace(/\.\w+$/, '');
+ s = s ? tinymce.resolve(s) : 0;
+ f = tinymce.resolve(f);
+ }
+
+ return f.apply(s || this, Array.prototype.slice.call(arguments, 2));
+ };
+
+ function hasClass(n, c) {
+ return c.constructor === RegExp ? c.test(n.className) : DOM.hasClass(n, c);
+ };
+
+ t.settings = s;
+
+ // Legacy call
+ Event.bind(window, 'ready', function() {
+ var l, co;
+
+ execCallback(s, 'onpageload');
+
+ switch (s.mode) {
+ case "exact":
+ l = s.elements || '';
+
+ if(l.length > 0) {
+ each(explode(l), function(v) {
+ if (DOM.get(v)) {
+ ed = new tinymce.Editor(v, s);
+ el.push(ed);
+ ed.render(1);
+ } else {
+ each(document.forms, function(f) {
+ each(f.elements, function(e) {
+ if (e.name === v) {
+ v = 'mce_editor_' + instanceCounter++;
+ DOM.setAttrib(e, 'id', v);
+
+ ed = new tinymce.Editor(v, s);
+ el.push(ed);
+ ed.render(1);
+ }
+ });
+ });
+ }
+ });
+ }
+ break;
+
+ case "textareas":
+ case "specific_textareas":
+ each(DOM.select('textarea'), function(elm) {
+ if (s.editor_deselector && hasClass(elm, s.editor_deselector))
+ return;
+
+ if (!s.editor_selector || hasClass(elm, s.editor_selector)) {
+ ed = new tinymce.Editor(createId(elm), s);
+ el.push(ed);
+ ed.render(1);
+ }
+ });
+ break;
+
+ default:
+ if (s.types) {
+ // Process type specific selector
+ each(s.types, function(type) {
+ each(DOM.select(type.selector), function(elm) {
+ var editor = new tinymce.Editor(createId(elm), tinymce.extend({}, s, type));
+ el.push(editor);
+ editor.render(1);
+ });
+ });
+ } else if (s.selector) {
+ // Process global selector
+ each(DOM.select(s.selector), function(elm) {
+ var editor = new tinymce.Editor(createId(elm), s);
+ el.push(editor);
+ editor.render(1);
+ });
+ }
+ }
+
+ // Call onInit when all editors are initialized
+ if (s.oninit) {
+ l = co = 0;
+
+ each(el, function(ed) {
+ co++;
+
+ if (!ed.initialized) {
+ // Wait for it
+ ed.onInit.add(function() {
+ l++;
+
+ // All done
+ if (l == co)
+ execCallback(s, 'oninit');
+ });
+ } else
+ l++;
+
+ // All done
+ if (l == co)
+ execCallback(s, 'oninit');
+ });
+ }
+ });
+ },
+
+ get : function(id) {
+ if (id === undef)
+ return this.editors;
+
+ if (!this.editors.hasOwnProperty(id))
+ return undef;
+
+ return this.editors[id];
+ },
+
+ getInstanceById : function(id) {
+ return this.get(id);
+ },
+
+ add : function(editor) {
+ var self = this, editors = self.editors;
+
+ // Add named and index editor instance
+ editors[editor.id] = editor;
+ editors.push(editor);
+
+ self._setActive(editor);
+ self.onAddEditor.dispatch(self, editor);
+
+
+ return editor;
+ },
+
+ remove : function(editor) {
+ var t = this, i, editors = t.editors;
+
+ // Not in the collection
+ if (!editors[editor.id])
+ return null;
+
+ delete editors[editor.id];
+
+ for (i = 0; i < editors.length; i++) {
+ if (editors[i] == editor) {
+ editors.splice(i, 1);
+ break;
+ }
+ }
+
+ // Select another editor since the active one was removed
+ if (t.activeEditor == editor)
+ t._setActive(editors[0]);
+
+ editor.destroy();
+ t.onRemoveEditor.dispatch(t, editor);
+
+ return editor;
+ },
+
+ execCommand : function(c, u, v) {
+ var t = this, ed = t.get(v), w;
+
+ function clr() {
+ ed.destroy();
+ w.detachEvent('onunload', clr);
+ w = w.tinyMCE = w.tinymce = null; // IE leak
+ };
+
+ // Manager commands
+ switch (c) {
+ case "mceFocus":
+ ed.focus();
+ return true;
+
+ case "mceAddEditor":
+ case "mceAddControl":
+ if (!t.get(v))
+ new tinymce.Editor(v, t.settings).render();
+
+ return true;
+
+ case "mceAddFrameControl":
+ w = v.window;
+
+ // Add tinyMCE global instance and tinymce namespace to specified window
+ w.tinyMCE = tinyMCE;
+ w.tinymce = tinymce;
+
+ tinymce.DOM.doc = w.document;
+ tinymce.DOM.win = w;
+
+ ed = new tinymce.Editor(v.element_id, v);
+ ed.render();
+
+ // Fix IE memory leaks
+ if (tinymce.isIE) {
+ w.attachEvent('onunload', clr);
+ }
+
+ v.page_window = null;
+
+ return true;
+
+ case "mceRemoveEditor":
+ case "mceRemoveControl":
+ if (ed)
+ ed.remove();
+
+ return true;
+
+ case 'mceToggleEditor':
+ if (!ed) {
+ t.execCommand('mceAddControl', 0, v);
+ return true;
+ }
+
+ if (ed.isHidden())
+ ed.show();
+ else
+ ed.hide();
+
+ return true;
+ }
+
+ // Run command on active editor
+ if (t.activeEditor)
+ return t.activeEditor.execCommand(c, u, v);
+
+ return false;
+ },
+
+ execInstanceCommand : function(id, c, u, v) {
+ var ed = this.get(id);
+
+ if (ed)
+ return ed.execCommand(c, u, v);
+
+ return false;
+ },
+
+ triggerSave : function() {
+ each(this.editors, function(e) {
+ e.save();
+ });
+ },
+
+ addI18n : function(p, o) {
+ var lo, i18n = this.i18n;
+
+ if (!tinymce.is(p, 'string')) {
+ each(p, function(o, lc) {
+ each(o, function(o, g) {
+ each(o, function(o, k) {
+ if (g === 'common')
+ i18n[lc + '.' + k] = o;
+ else
+ i18n[lc + '.' + g + '.' + k] = o;
+ });
+ });
+ });
+ } else {
+ each(o, function(o, k) {
+ i18n[p + '.' + k] = o;
+ });
+ }
+ },
+
+ // Private methods
+
+ _setActive : function(editor) {
+ this.selectedInstance = this.activeEditor = editor;
+ }
+ });
+})(tinymce);
+
+(function(tinymce) {
+ // Shorten these names
+ var DOM = tinymce.DOM, Event = tinymce.dom.Event, extend = tinymce.extend,
+ each = tinymce.each, isGecko = tinymce.isGecko,
+ isIE = tinymce.isIE, isWebKit = tinymce.isWebKit, is = tinymce.is,
+ ThemeManager = tinymce.ThemeManager, PluginManager = tinymce.PluginManager,
+ explode = tinymce.explode;
+
+ tinymce.create('tinymce.Editor', {
+ Editor : function(id, settings) {
+ var self = this, TRUE = true;
+
+ self.settings = settings = extend({
+ id : id,
+ language : 'en',
+ theme : 'advanced',
+ skin : 'default',
+ delta_width : 0,
+ delta_height : 0,
+ popup_css : '',
+ plugins : '',
+ document_base_url : tinymce.documentBaseURL,
+ add_form_submit_trigger : TRUE,
+ submit_patch : TRUE,
+ add_unload_trigger : TRUE,
+ convert_urls : TRUE,
+ relative_urls : TRUE,
+ remove_script_host : TRUE,
+ table_inline_editing : false,
+ object_resizing : TRUE,
+ accessibility_focus : TRUE,
+ doctype : tinymce.isIE6 ? '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">' : '<!DOCTYPE>', // Use old doctype on IE 6 to avoid horizontal scroll
+ visual : TRUE,
+ font_size_style_values : 'xx-small,x-small,small,medium,large,x-large,xx-large',
+ font_size_legacy_values : 'xx-small,small,medium,large,x-large,xx-large,300%', // See: http://www.w3.org/TR/CSS2/fonts.html#propdef-font-size
+ apply_source_formatting : TRUE,
+ directionality : 'ltr',
+ forced_root_block : 'p',
+ hidden_input : TRUE,
+ padd_empty_editor : TRUE,
+ render_ui : TRUE,
+ indentation : '30px',
+ fix_table_elements : TRUE,
+ inline_styles : TRUE,
+ convert_fonts_to_spans : TRUE,
+ indent : 'simple',
+ indent_before : 'p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist',
+ indent_after : 'p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist',
+ validate : TRUE,
+ entity_encoding : 'named',
+ url_converter : self.convertURL,
+ url_converter_scope : self,
+ ie7_compat : TRUE
+ }, settings);
+
+ self.id = self.editorId = id;
+
+ self.isNotDirty = false;
+
+ self.plugins = {};
+
+ self.documentBaseURI = new tinymce.util.URI(settings.document_base_url || tinymce.documentBaseURL, {
+ base_uri : tinyMCE.baseURI
+ });
+
+ self.baseURI = tinymce.baseURI;
+
+ self.contentCSS = [];
+
+ self.contentStyles = [];
+
+ // Creates all events like onClick, onSetContent etc see Editor.Events.js for the actual logic
+ self.setupEvents();
+
+ // Internal command handler objects
+ self.execCommands = {};
+ self.queryStateCommands = {};
+ self.queryValueCommands = {};
+
+ // Call setup
+ self.execCallback('setup', self);
+ },
+
+ render : function(nst) {
+ var t = this, s = t.settings, id = t.id, sl = tinymce.ScriptLoader;
+
+ // Page is not loaded yet, wait for it
+ if (!Event.domLoaded) {
+ Event.add(window, 'ready', function() {
+ t.render();
+ });
+ return;
+ }
+
+ tinyMCE.settings = s;
+
+ // Element not found, then skip initialization
+ if (!t.getElement())
+ return;
+
+ // Is a iPad/iPhone and not on iOS5, then skip initialization. We need to sniff
+ // here since the browser says it has contentEditable support but there is no visible caret.
+ if (tinymce.isIDevice && !tinymce.isIOS5)
+ return;
+
+ // Add hidden input for non input elements inside form elements
+ if (!/TEXTAREA|INPUT/i.test(t.getElement().nodeName) && s.hidden_input && DOM.getParent(id, 'form'))
+ DOM.insertAfter(DOM.create('input', {type : 'hidden', name : id}), id);
+
+ // Hide target element early to prevent content flashing
+ if (!s.content_editable) {
+ t.orgVisibility = t.getElement().style.visibility;
+ t.getElement().style.visibility = 'hidden';
+ }
+
+ if (tinymce.WindowManager)
+ t.windowManager = new tinymce.WindowManager(t);
+
+ if (s.encoding == 'xml') {
+ t.onGetContent.add(function(ed, o) {
+ if (o.save)
+ o.content = DOM.encode(o.content);
+ });
+ }
+
+ if (s.add_form_submit_trigger) {
+ t.onSubmit.addToTop(function() {
+ if (t.initialized) {
+ t.save();
+ t.isNotDirty = 1;
+ }
+ });
+ }
+
+ if (s.add_unload_trigger) {
+ t._beforeUnload = tinyMCE.onBeforeUnload.add(function() {
+ if (t.initialized && !t.destroyed && !t.isHidden())
+ t.save({format : 'raw', no_events : true});
+ });
+ }
+
+ tinymce.addUnload(t.destroy, t);
+
+ if (s.submit_patch) {
+ t.onBeforeRenderUI.add(function() {
+ var n = t.getElement().form;
+
+ if (!n)
+ return;
+
+ // Already patched
+ if (n._mceOldSubmit)
+ return;
+
+ // Check page uses id="submit" or name="submit" for it's submit button
+ if (!n.submit.nodeType && !n.submit.length) {
+ t.formElement = n;
+ n._mceOldSubmit = n.submit;
+ n.submit = function() {
+ // Save all instances
+ tinymce.triggerSave();
+ t.isNotDirty = 1;
+
+ return t.formElement._mceOldSubmit(t.formElement);
+ };
+ }
+
+ n = null;
+ });
+ }
+
+ // Load scripts
+ function loadScripts() {
+ if (s.language && s.language_load !== false)
+ sl.add(tinymce.baseURL + '/langs/' + s.language + '.js');
+
+ if (s.theme && typeof s.theme != "function" && s.theme.charAt(0) != '-' && !ThemeManager.urls[s.theme])
+ ThemeManager.load(s.theme, 'themes/' + s.theme + '/editor_template' + tinymce.suffix + '.js');
+
+ each(explode(s.plugins), function(p) {
+ if (p &&!PluginManager.urls[p]) {
+ if (p.charAt(0) == '-') {
+ p = p.substr(1, p.length);
+ var dependencies = PluginManager.dependencies(p);
+ each(dependencies, function(dep) {
+ var defaultSettings = {prefix:'plugins/', resource: dep, suffix:'/editor_plugin' + tinymce.suffix + '.js'};
+ dep = PluginManager.createUrl(defaultSettings, dep);
+ PluginManager.load(dep.resource, dep);
+ });
+ } else {
+ // Skip safari plugin, since it is removed as of 3.3b1
+ if (p == 'safari') {
+ return;
+ }
+ PluginManager.load(p, {prefix:'plugins/', resource: p, suffix:'/editor_plugin' + tinymce.suffix + '.js'});
+ }
+ }
+ });
+
+ // Init when que is loaded
+ sl.loadQueue(function() {
+ if (!t.removed)
+ t.init();
+ });
+ };
+
+ loadScripts();
+ },
+
+ init : function() {
+ var n, t = this, s = t.settings, w, h, mh, e = t.getElement(), o, ti, u, bi, bc, re, i, initializedPlugins = [];
+
+ tinymce.add(t);
+
+ s.aria_label = s.aria_label || DOM.getAttrib(e, 'aria-label', t.getLang('aria.rich_text_area'));
+
+ if (s.theme) {
+ if (typeof s.theme != "function") {
+ s.theme = s.theme.replace(/-/, '');
+ o = ThemeManager.get(s.theme);
+ t.theme = new o();
+
+ if (t.theme.init)
+ t.theme.init(t, ThemeManager.urls[s.theme] || tinymce.documentBaseURL.replace(/\/$/, ''));
+ } else {
+ t.theme = s.theme;
+ }
+ }
+
+ function initPlugin(p) {
+ var c = PluginManager.get(p), u = PluginManager.urls[p] || tinymce.documentBaseURL.replace(/\/$/, ''), po;
+ if (c && tinymce.inArray(initializedPlugins,p) === -1) {
+ each(PluginManager.dependencies(p), function(dep){
+ initPlugin(dep);
+ });
+ po = new c(t, u);
+
+ t.plugins[p] = po;
+
+ if (po.init) {
+ po.init(t, u);
+ initializedPlugins.push(p);
+ }
+ }
+ }
+
+ // Create all plugins
+ each(explode(s.plugins.replace(/\-/g, '')), initPlugin);
+
+ // Setup popup CSS path(s)
+ if (s.popup_css !== false) {
+ if (s.popup_css)
+ s.popup_css = t.documentBaseURI.toAbsolute(s.popup_css);
+ else
+ s.popup_css = t.baseURI.toAbsolute("themes/" + s.theme + "/skins/" + s.skin + "/dialog.css");
+ }
+
+ if (s.popup_css_add)
+ s.popup_css += ',' + t.documentBaseURI.toAbsolute(s.popup_css_add);
+
+ t.controlManager = new tinymce.ControlManager(t);
+
+ // Enables users to override the control factory
+ t.onBeforeRenderUI.dispatch(t, t.controlManager);
+
+ // Measure box
+ if (s.render_ui && t.theme) {
+ t.orgDisplay = e.style.display;
+
+ if (typeof s.theme != "function") {
+ w = s.width || e.style.width || e.offsetWidth;
+ h = s.height || e.style.height || e.offsetHeight;
+ mh = s.min_height || 100;
+ re = /^[0-9\.]+(|px)$/i;
+
+ if (re.test('' + w))
+ w = Math.max(parseInt(w, 10) + (o.deltaWidth || 0), 100);
+
+ if (re.test('' + h))
+ h = Math.max(parseInt(h, 10) + (o.deltaHeight || 0), mh);
+
+ // Render UI
+ o = t.theme.renderUI({
+ targetNode : e,
+ width : w,
+ height : h,
+ deltaWidth : s.delta_width,
+ deltaHeight : s.delta_height
+ });
+
+ // Resize editor
+ DOM.setStyles(o.sizeContainer || o.editorContainer, {
+ width : w,
+ height : h
+ });
+
+ h = (o.iframeHeight || h) + (typeof(h) == 'number' ? (o.deltaHeight || 0) : '');
+ if (h < mh)
+ h = mh;
+ } else {
+ o = s.theme(t, e);
+
+ // Convert element type to id:s
+ if (o.editorContainer.nodeType) {
+ o.editorContainer = o.editorContainer.id = o.editorContainer.id || t.id + "_parent";
+ }
+
+ // Convert element type to id:s
+ if (o.iframeContainer.nodeType) {
+ o.iframeContainer = o.iframeContainer.id = o.iframeContainer.id || t.id + "_iframecontainer";
+ }
+
+ // Use specified iframe height or the targets offsetHeight
+ h = o.iframeHeight || e.offsetHeight;
+
+ // Store away the selection when it's changed to it can be restored later with a editor.focus() call
+ if (isIE) {
+ t.onInit.add(function(ed) {
+ ed.dom.bind(ed.getBody(), 'beforedeactivate keydown', function() {
+ ed.lastIERng = ed.selection.getRng();
+ });
+ });
+ }
+ }
+
+ t.editorContainer = o.editorContainer;
+ }
+
+ // Load specified content CSS last
+ if (s.content_css) {
+ each(explode(s.content_css), function(u) {
+ t.contentCSS.push(t.documentBaseURI.toAbsolute(u));
+ });
+ }
+
+ // Load specified content CSS last
+ if (s.content_style) {
+ t.contentStyles.push(s.content_style);
+ }
+
+ // Content editable mode ends here
+ if (s.content_editable) {
+ e = n = o = null; // Fix IE leak
+ return t.initContentBody();
+ }
+
+ // User specified a document.domain value
+ if (document.domain && location.hostname != document.domain)
+ tinymce.relaxedDomain = document.domain;
+
+ t.iframeHTML = s.doctype + '<html><head xmlns="http://www.w3.org/1999/xhtml">';
+
+ // We only need to override paths if we have to
+ // IE has a bug where it remove site absolute urls to relative ones if this is specified
+ if (s.document_base_url != tinymce.documentBaseURL)
+ t.iframeHTML += '<base href="' + t.documentBaseURI.getURI() + '" />';
+
+ // IE8 doesn't support carets behind images setting ie7_compat would force IE8+ to run in IE7 compat mode.
+ if (s.ie7_compat)
+ t.iframeHTML += '<meta http-equiv="X-UA-Compatible" content="IE=7" />';
+ else
+ t.iframeHTML += '<meta http-equiv="X-UA-Compatible" content="IE=edge" />';
+
+ t.iframeHTML += '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
+
+ // Load the CSS by injecting them into the HTML this will reduce "flicker"
+ for (i = 0; i < t.contentCSS.length; i++) {
+ t.iframeHTML += '<link type="text/css" rel="stylesheet" href="' + t.contentCSS[i] + '" />';
+ }
+
+ t.contentCSS = [];
+
+ bi = s.body_id || 'tinymce';
+ if (bi.indexOf('=') != -1) {
+ bi = t.getParam('body_id', '', 'hash');
+ bi = bi[t.id] || bi;
+ }
+
+ bc = s.body_class || '';
+ if (bc.indexOf('=') != -1) {
+ bc = t.getParam('body_class', '', 'hash');
+ bc = bc[t.id] || '';
+ }
+
+ t.iframeHTML += '</head><body id="' + bi + '" class="mceContentBody ' + bc + '" onload="window.parent.tinyMCE.get(\'' + t.id + '\').onLoad.dispatch();"><br></body></html>';
+
+ // Domain relaxing enabled, then set document domain
+ if (tinymce.relaxedDomain && (isIE || (tinymce.isOpera && parseFloat(opera.version()) < 11))) {
+ // We need to write the contents here in IE since multiple writes messes up refresh button and back button
+ u = 'javascript:(function(){document.open();document.domain="' + document.domain + '";var ed = window.parent.tinyMCE.get("' + t.id + '");document.write(ed.iframeHTML);document.close();ed.initContentBody();})()';
+ }
+
+ // Create iframe
+ // TODO: ACC add the appropriate description on this.
+ n = DOM.add(o.iframeContainer, 'iframe', {
+ id : t.id + "_ifr",
+ src : u || 'javascript:""', // Workaround for HTTPS warning in IE6/7
+ frameBorder : '0',
+ allowTransparency : "true",
+ title : s.aria_label,
+ style : {
+ width : '100%',
+ height : h,
+ display : 'block' // Important for Gecko to render the iframe correctly
+ }
+ });
+
+ t.contentAreaContainer = o.iframeContainer;
+
+ if (o.editorContainer) {
+ DOM.get(o.editorContainer).style.display = t.orgDisplay;
+ }
+
+ // Restore visibility on target element
+ e.style.visibility = t.orgVisibility;
+
+ DOM.get(t.id).style.display = 'none';
+ DOM.setAttrib(t.id, 'aria-hidden', true);
+
+ if (!tinymce.relaxedDomain || !u)
+ t.initContentBody();
+
+ e = n = o = null; // Cleanup
+ },
+
+ initContentBody : function() {
+ var self = this, settings = self.settings, targetElm = DOM.get(self.id), doc = self.getDoc(), html, body, contentCssText;
+
+ // Setup iframe body
+ if ((!isIE || !tinymce.relaxedDomain) && !settings.content_editable) {
+ doc.open();
+ doc.write(self.iframeHTML);
+ doc.close();
+
+ if (tinymce.relaxedDomain)
+ doc.domain = tinymce.relaxedDomain;
+ }
+
+ if (settings.content_editable) {
+ DOM.addClass(targetElm, 'mceContentBody');
+ self.contentDocument = doc = settings.content_document || document;
+ self.contentWindow = settings.content_window || window;
+ self.bodyElement = targetElm;
+
+ // Prevent leak in IE
+ settings.content_document = settings.content_window = null;
+ }
+
+ // It will not steal focus while setting contentEditable
+ body = self.getBody();
+ body.disabled = true;
+
+ if (!settings.readonly)
+ body.contentEditable = self.getParam('content_editable_state', true);
+
+ body.disabled = false;
+
+ self.schema = new tinymce.html.Schema(settings);
+
+ self.dom = new tinymce.dom.DOMUtils(doc, {
+ keep_values : true,
+ url_converter : self.convertURL,
+ url_converter_scope : self,
+ hex_colors : settings.force_hex_style_colors,
+ class_filter : settings.class_filter,
+ update_styles : true,
+ root_element : settings.content_editable ? self.id : null,
+ schema : self.schema
+ });
+
+ self.parser = new tinymce.html.DomParser(settings, self.schema);
+
+ // Convert src and href into data-mce-src, data-mce-href and data-mce-style
+ self.parser.addAttributeFilter('src,href,style', function(nodes, name) {
+ var i = nodes.length, node, dom = self.dom, value, internalName;
+
+ while (i--) {
+ node = nodes[i];
+ value = node.attr(name);
+ internalName = 'data-mce-' + name;
+
+ // Add internal attribute if we need to we don't on a refresh of the document
+ if (!node.attributes.map[internalName]) {
+ if (name === "style")
+ node.attr(internalName, dom.serializeStyle(dom.parseStyle(value), node.name));
+ else
+ node.attr(internalName, self.convertURL(value, name, node.name));
+ }
+ }
+ });
+
+ // Keep scripts from executing
+ self.parser.addNodeFilter('script', function(nodes, name) {
+ var i = nodes.length, node;
+
+ while (i--) {
+ node = nodes[i];
+ node.attr('type', 'mce-' + (node.attr('type') || 'text/javascript'));
+ }
+ });
+
+ self.parser.addNodeFilter('#cdata', function(nodes, name) {
+ var i = nodes.length, node;
+
+ while (i--) {
+ node = nodes[i];
+ node.type = 8;
+ node.name = '#comment';
+ node.value = '[CDATA[' + node.value + ']]';
+ }
+ });
+
+ self.parser.addNodeFilter('p,h1,h2,h3,h4,h5,h6,div', function(nodes, name) {
+ var i = nodes.length, node, nonEmptyElements = self.schema.getNonEmptyElements();
+
+ while (i--) {
+ node = nodes[i];
+
+ if (node.isEmpty(nonEmptyElements))
+ node.empty().append(new tinymce.html.Node('br', 1)).shortEnded = true;
+ }
+ });
+
+ self.serializer = new tinymce.dom.Serializer(settings, self.dom, self.schema);
+
+ self.selection = new tinymce.dom.Selection(self.dom, self.getWin(), self.serializer, self);
+
+ self.formatter = new tinymce.Formatter(self);
+
+ self.undoManager = new tinymce.UndoManager(self);
+
+ self.forceBlocks = new tinymce.ForceBlocks(self);
+ self.enterKey = new tinymce.EnterKey(self);
+ self.editorCommands = new tinymce.EditorCommands(self);
+
+ self.onExecCommand.add(function(editor, command) {
+ // Don't refresh the select lists until caret move
+ if (!/^(FontName|FontSize)$/.test(command))
+ self.nodeChanged();
+ });
+
+ // Pass through
+ self.serializer.onPreProcess.add(function(se, o) {
+ return self.onPreProcess.dispatch(self, o, se);
+ });
+
+ self.serializer.onPostProcess.add(function(se, o) {
+ return self.onPostProcess.dispatch(self, o, se);
+ });
+
+ self.onPreInit.dispatch(self);
+
+ if (!settings.browser_spellcheck && !settings.gecko_spellcheck)
+ doc.body.spellcheck = false;
+
+ if (!settings.readonly) {
+ self.bindNativeEvents();
+ }
+
+ self.controlManager.onPostRender.dispatch(self, self.controlManager);
+ self.onPostRender.dispatch(self);
+
+ self.quirks = tinymce.util.Quirks(self);
+
+ if (settings.directionality)
+ body.dir = settings.directionality;
+
+ if (settings.nowrap)
+ body.style.whiteSpace = "nowrap";
+
+ if (settings.protect) {
+ self.onBeforeSetContent.add(function(ed, o) {
+ each(settings.protect, function(pattern) {
+ o.content = o.content.replace(pattern, function(str) {
+ return '<!--mce:protected ' + escape(str) + '-->';
+ });
+ });
+ });
+ }
+
+ // Add visual aids when new contents is added
+ self.onSetContent.add(function() {
+ self.addVisual(self.getBody());
+ });
+
+ // Remove empty contents
+ if (settings.padd_empty_editor) {
+ self.onPostProcess.add(function(ed, o) {
+ o.content = o.content.replace(/^(<p[^>]*>(&nbsp;|&#160;|\s|\u00a0|)<\/p>[\r\n]*|<br \/>[\r\n]*)$/, '');
+ });
+ }
+
+ self.load({initial : true, format : 'html'});
+ self.startContent = self.getContent({format : 'raw'});
+
+ self.initialized = true;
+
+ self.onInit.dispatch(self);
+ self.execCallback('setupcontent_callback', self.id, body, doc);
+ self.execCallback('init_instance_callback', self);
+ self.focus(true);
+ self.nodeChanged({initial : true});
+
+ // Add editor specific CSS styles
+ if (self.contentStyles.length > 0) {
+ contentCssText = '';
+
+ each(self.contentStyles, function(style) {
+ contentCssText += style + "\r\n";
+ });
+
+ self.dom.addStyle(contentCssText);
+ }
+
+ // Load specified content CSS last
+ each(self.contentCSS, function(url) {
+ self.dom.loadCSS(url);
+ });
+
+ // Handle auto focus
+ if (settings.auto_focus) {
+ setTimeout(function () {
+ var ed = tinymce.get(settings.auto_focus);
+
+ ed.selection.select(ed.getBody(), 1);
+ ed.selection.collapse(1);
+ ed.getBody().focus();
+ ed.getWin().focus();
+ }, 100);
+ }
+
+ // Clean up references for IE
+ targetElm = doc = body = null;
+ },
+
+ focus : function(skip_focus) {
+ var oed, self = this, selection = self.selection, contentEditable = self.settings.content_editable, ieRng, controlElm, doc = self.getDoc(), body;
+
+ if (!skip_focus) {
+ if (self.lastIERng) {
+ selection.setRng(self.lastIERng);
+ }
+
+ // Get selected control element
+ ieRng = selection.getRng();
+ if (ieRng.item) {
+ controlElm = ieRng.item(0);
+ }
+
+ self._refreshContentEditable();
+
+ // Focus the window iframe
+ if (!contentEditable) {
+ self.getWin().focus();
+ }
+
+ // Focus the body as well since it's contentEditable
+ if (tinymce.isGecko || contentEditable) {
+ body = self.getBody();
+
+ // Check for setActive since it doesn't scroll to the element
+ if (body.setActive) {
+ body.setActive();
+ } else {
+ body.focus();
+ }
+
+ if (contentEditable) {
+ selection.normalize();
+ }
+ }
+
+ // Restore selected control element
+ // This is needed when for example an image is selected within a
+ // layer a call to focus will then remove the control selection
+ if (controlElm && controlElm.ownerDocument == doc) {
+ ieRng = doc.body.createControlRange();
+ ieRng.addElement(controlElm);
+ ieRng.select();
+ }
+ }
+
+ if (tinymce.activeEditor != self) {
+ if ((oed = tinymce.activeEditor) != null)
+ oed.onDeactivate.dispatch(oed, self);
+
+ self.onActivate.dispatch(self, oed);
+ }
+
+ tinymce._setActive(self);
+ },
+
+ execCallback : function(n) {
+ var t = this, f = t.settings[n], s;
+
+ if (!f)
+ return;
+
+ // Look through lookup
+ if (t.callbackLookup && (s = t.callbackLookup[n])) {
+ f = s.func;
+ s = s.scope;
+ }
+
+ if (is(f, 'string')) {
+ s = f.replace(/\.\w+$/, '');
+ s = s ? tinymce.resolve(s) : 0;
+ f = tinymce.resolve(f);
+ t.callbackLookup = t.callbackLookup || {};
+ t.callbackLookup[n] = {func : f, scope : s};
+ }
+
+ return f.apply(s || t, Array.prototype.slice.call(arguments, 1));
+ },
+
+ translate : function(s) {
+ var c = this.settings.language || 'en', i18n = tinymce.i18n;
+
+ if (!s)
+ return '';
+
+ return i18n[c + '.' + s] || s.replace(/\{\#([^\}]+)\}/g, function(a, b) {
+ return i18n[c + '.' + b] || '{#' + b + '}';
+ });
+ },
+
+ getLang : function(n, dv) {
+ return tinymce.i18n[(this.settings.language || 'en') + '.' + n] || (is(dv) ? dv : '{#' + n + '}');
+ },
+
+ getParam : function(n, dv, ty) {
+ var tr = tinymce.trim, v = is(this.settings[n]) ? this.settings[n] : dv, o;
+
+ if (ty === 'hash') {
+ o = {};
+
+ if (is(v, 'string')) {
+ each(v.indexOf('=') > 0 ? v.split(/[;,](?![^=;,]*(?:[;,]|$))/) : v.split(','), function(v) {
+ v = v.split('=');
+
+ if (v.length > 1)
+ o[tr(v[0])] = tr(v[1]);
+ else
+ o[tr(v[0])] = tr(v);
+ });
+ } else
+ o = v;
+
+ return o;
+ }
+
+ return v;
+ },
+
+ nodeChanged : function(o) {
+ var self = this, selection = self.selection, node;
+
+ // Fix for bug #1896577 it seems that this can not be fired while the editor is loading
+ if (self.initialized) {
+ o = o || {};
+
+ // Get start node
+ node = selection.getStart() || self.getBody();
+ node = isIE && node.ownerDocument != self.getDoc() ? self.getBody() : node; // Fix for IE initial state
+
+ // Get parents and add them to object
+ o.parents = [];
+ self.dom.getParent(node, function(node) {
+ if (node.nodeName == 'BODY')
+ return true;
+
+ o.parents.push(node);
+ });
+
+ self.onNodeChange.dispatch(
+ self,
+ o ? o.controlManager || self.controlManager : self.controlManager,
+ node,
+ selection.isCollapsed(),
+ o
+ );
+ }
+ },
+
+ addButton : function(name, settings) {
+ var self = this;
+
+ self.buttons = self.buttons || {};
+ self.buttons[name] = settings;
+ },
+
+ addCommand : function(name, callback, scope) {
+ this.execCommands[name] = {func : callback, scope : scope || this};
+ },
+
+ addQueryStateHandler : function(name, callback, scope) {
+ this.queryStateCommands[name] = {func : callback, scope : scope || this};
+ },
+
+ addQueryValueHandler : function(name, callback, scope) {
+ this.queryValueCommands[name] = {func : callback, scope : scope || this};
+ },
+
+ addShortcut : function(pa, desc, cmd_func, sc) {
+ var t = this, c;
+
+ if (t.settings.custom_shortcuts === false)
+ return false;
+
+ t.shortcuts = t.shortcuts || {};
+
+ if (is(cmd_func, 'string')) {
+ c = cmd_func;
+
+ cmd_func = function() {
+ t.execCommand(c, false, null);
+ };
+ }
+
+ if (is(cmd_func, 'object')) {
+ c = cmd_func;
+
+ cmd_func = function() {
+ t.execCommand(c[0], c[1], c[2]);
+ };
+ }
+
+ each(explode(pa), function(pa) {
+ var o = {
+ func : cmd_func,
+ scope : sc || this,
+ desc : t.translate(desc),
+ alt : false,
+ ctrl : false,
+ shift : false
+ };
+
+ each(explode(pa, '+'), function(v) {
+ switch (v) {
+ case 'alt':
+ case 'ctrl':
+ case 'shift':
+ o[v] = true;
+ break;
+
+ default:
+ o.charCode = v.charCodeAt(0);
+ o.keyCode = v.toUpperCase().charCodeAt(0);
+ }
+ });
+
+ t.shortcuts[(o.ctrl ? 'ctrl' : '') + ',' + (o.alt ? 'alt' : '') + ',' + (o.shift ? 'shift' : '') + ',' + o.keyCode] = o;
+ });
+
+ return true;
+ },
+
+ execCommand : function(cmd, ui, val, a) {
+ var t = this, s = 0, o, st;
+
+ if (!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(cmd) && (!a || !a.skip_focus))
+ t.focus();
+
+ a = extend({}, a);
+ t.onBeforeExecCommand.dispatch(t, cmd, ui, val, a);
+ if (a.terminate)
+ return false;
+
+ // Command callback
+ if (t.execCallback('execcommand_callback', t.id, t.selection.getNode(), cmd, ui, val)) {
+ t.onExecCommand.dispatch(t, cmd, ui, val, a);
+ return true;
+ }
+
+ // Registred commands
+ if (o = t.execCommands[cmd]) {
+ st = o.func.call(o.scope, ui, val);
+
+ // Fall through on true
+ if (st !== true) {
+ t.onExecCommand.dispatch(t, cmd, ui, val, a);
+ return st;
+ }
+ }
+
+ // Plugin commands
+ each(t.plugins, function(p) {
+ if (p.execCommand && p.execCommand(cmd, ui, val)) {
+ t.onExecCommand.dispatch(t, cmd, ui, val, a);
+ s = 1;
+ return false;
+ }
+ });
+
+ if (s)
+ return true;
+
+ // Theme commands
+ if (t.theme && t.theme.execCommand && t.theme.execCommand(cmd, ui, val)) {
+ t.onExecCommand.dispatch(t, cmd, ui, val, a);
+ return true;
+ }
+
+ // Editor commands
+ if (t.editorCommands.execCommand(cmd, ui, val)) {
+ t.onExecCommand.dispatch(t, cmd, ui, val, a);
+ return true;
+ }
+
+ // Browser commands
+ t.getDoc().execCommand(cmd, ui, val);
+ t.onExecCommand.dispatch(t, cmd, ui, val, a);
+ },
+
+ queryCommandState : function(cmd) {
+ var t = this, o, s;
+
+ // Is hidden then return undefined
+ if (t._isHidden())
+ return;
+
+ // Registred commands
+ if (o = t.queryStateCommands[cmd]) {
+ s = o.func.call(o.scope);
+
+ // Fall though on true
+ if (s !== true)
+ return s;
+ }
+
+ // Registred commands
+ o = t.editorCommands.queryCommandState(cmd);
+ if (o !== -1)
+ return o;
+
+ // Browser commands
+ try {
+ return this.getDoc().queryCommandState(cmd);
+ } catch (ex) {
+ // Fails sometimes see bug: 1896577
+ }
+ },
+
+ queryCommandValue : function(c) {
+ var t = this, o, s;
+
+ // Is hidden then return undefined
+ if (t._isHidden())
+ return;
+
+ // Registred commands
+ if (o = t.queryValueCommands[c]) {
+ s = o.func.call(o.scope);
+
+ // Fall though on true
+ if (s !== true)
+ return s;
+ }
+
+ // Registred commands
+ o = t.editorCommands.queryCommandValue(c);
+ if (is(o))
+ return o;
+
+ // Browser commands
+ try {
+ return this.getDoc().queryCommandValue(c);
+ } catch (ex) {
+ // Fails sometimes see bug: 1896577
+ }
+ },
+
+ show : function() {
+ var self = this;
+
+ DOM.show(self.getContainer());
+ DOM.hide(self.id);
+ self.load();
+ },
+
+ hide : function() {
+ var self = this, doc = self.getDoc();
+
+ // Fixed bug where IE has a blinking cursor left from the editor
+ if (isIE && doc)
+ doc.execCommand('SelectAll');
+
+ // We must save before we hide so Safari doesn't crash
+ self.save();
+
+ // defer the call to hide to prevent an IE9 crash #4921
+ setTimeout(function() {
+ DOM.hide(self.getContainer());
+ }, 1);
+ DOM.setStyle(self.id, 'display', self.orgDisplay);
+ },
+
+ isHidden : function() {
+ return !DOM.isHidden(this.id);
+ },
+
+ setProgressState : function(b, ti, o) {
+ this.onSetProgressState.dispatch(this, b, ti, o);
+
+ return b;
+ },
+
+ load : function(o) {
+ var t = this, e = t.getElement(), h;
+
+ if (e) {
+ o = o || {};
+ o.load = true;
+
+ // Double encode existing entities in the value
+ h = t.setContent(is(e.value) ? e.value : e.innerHTML, o);
+ o.element = e;
+
+ if (!o.no_events)
+ t.onLoadContent.dispatch(t, o);
+
+ o.element = e = null;
+
+ return h;
+ }
+ },
+
+ save : function(o) {
+ var t = this, e = t.getElement(), h, f;
+
+ if (!e || !t.initialized)
+ return;
+
+ o = o || {};
+ o.save = true;
+
+ o.element = e;
+ h = o.content = t.getContent(o);
+
+ if (!o.no_events)
+ t.onSaveContent.dispatch(t, o);
+
+ h = o.content;
+
+ if (!/TEXTAREA|INPUT/i.test(e.nodeName)) {
+ e.innerHTML = h;
+
+ // Update hidden form element
+ if (f = DOM.getParent(t.id, 'form')) {
+ each(f.elements, function(e) {
+ if (e.name == t.id) {
+ e.value = h;
+ return false;
+ }
+ });
+ }
+ } else
+ e.value = h;
+
+ o.element = e = null;
+
+ return h;
+ },
+
+ setContent : function(content, args) {
+ var self = this, rootNode, body = self.getBody(), forcedRootBlockName;
+
+ // Setup args object
+ args = args || {};
+ args.format = args.format || 'html';
+ args.set = true;
+ args.content = content;
+
+ // Do preprocessing
+ if (!args.no_events)
+ self.onBeforeSetContent.dispatch(self, args);
+
+ content = args.content;
+
+ // Padd empty content in Gecko and Safari. Commands will otherwise fail on the content
+ // It will also be impossible to place the caret in the editor unless there is a BR element present
+ if (!tinymce.isIE && (content.length === 0 || /^\s+$/.test(content))) {
+ forcedRootBlockName = self.settings.forced_root_block;
+ if (forcedRootBlockName)
+ content = '<' + forcedRootBlockName + '><br data-mce-bogus="1"></' + forcedRootBlockName + '>';
+ else
+ content = '<br data-mce-bogus="1">';
+
+ body.innerHTML = content;
+ self.selection.select(body, true);
+ self.selection.collapse(true);
+ return;
+ }
+
+ // Parse and serialize the html
+ if (args.format !== 'raw') {
+ content = new tinymce.html.Serializer({}, self.schema).serialize(
+ self.parser.parse(content)
+ );
+ }
+
+ // Set the new cleaned contents to the editor
+ args.content = tinymce.trim(content);
+ self.dom.setHTML(body, args.content);
+
+ // Do post processing
+ if (!args.no_events)
+ self.onSetContent.dispatch(self, args);
+
+ // Don't normalize selection if the focused element isn't the body in content editable mode since it will steal focus otherwise
+ if (!self.settings.content_editable || document.activeElement === self.getBody()) {
+ self.selection.normalize();
+ }
+
+ return args.content;
+ },
+
+ getContent : function(args) {
+ var self = this, content, body = self.getBody();
+
+ // Setup args object
+ args = args || {};
+ args.format = args.format || 'html';
+ args.get = true;
+ args.getInner = true;
+
+ // Do preprocessing
+ if (!args.no_events)
+ self.onBeforeGetContent.dispatch(self, args);
+
+ // Get raw contents or by default the cleaned contents
+ if (args.format == 'raw')
+ content = body.innerHTML;
+ else if (args.format == 'text')
+ content = body.innerText || body.textContent;
+ else
+ content = self.serializer.serialize(body, args);
+
+ // Trim whitespace in beginning/end of HTML
+ if (args.format != 'text') {
+ args.content = tinymce.trim(content);
+ } else {
+ args.content = content;
+ }
+
+ // Do post processing
+ if (!args.no_events)
+ self.onGetContent.dispatch(self, args);
+
+ return args.content;
+ },
+
+ isDirty : function() {
+ var self = this;
+
+ return tinymce.trim(self.startContent) != tinymce.trim(self.getContent({format : 'raw', no_events : 1})) && !self.isNotDirty;
+ },
+
+ getContainer : function() {
+ var self = this;
+
+ if (!self.container)
+ self.container = DOM.get(self.editorContainer || self.id + '_parent');
+
+ return self.container;
+ },
+
+ getContentAreaContainer : function() {
+ return this.contentAreaContainer;
+ },
+
+ getElement : function() {
+ return DOM.get(this.settings.content_element || this.id);
+ },
+
+ getWin : function() {
+ var self = this, elm;
+
+ if (!self.contentWindow) {
+ elm = DOM.get(self.id + "_ifr");
+
+ if (elm)
+ self.contentWindow = elm.contentWindow;
+ }
+
+ return self.contentWindow;
+ },
+
+ getDoc : function() {
+ var self = this, win;
+
+ if (!self.contentDocument) {
+ win = self.getWin();
+
+ if (win)
+ self.contentDocument = win.document;
+ }
+
+ return self.contentDocument;
+ },
+
+ getBody : function() {
+ return this.bodyElement || this.getDoc().body;
+ },
+
+ convertURL : function(url, name, elm) {
+ var self = this, settings = self.settings;
+
+ // Use callback instead
+ if (settings.urlconverter_callback)
+ return self.execCallback('urlconverter_callback', url, elm, true, name);
+
+ // Don't convert link href since thats the CSS files that gets loaded into the editor also skip local file URLs
+ if (!settings.convert_urls || (elm && elm.nodeName == 'LINK') || url.indexOf('file:') === 0)
+ return url;
+
+ // Convert to relative
+ if (settings.relative_urls)
+ return self.documentBaseURI.toRelative(url);
+
+ // Convert to absolute
+ url = self.documentBaseURI.toAbsolute(url, settings.remove_script_host);
+
+ return url;
+ },
+
+ addVisual : function(elm) {
+ var self = this, settings = self.settings, dom = self.dom, cls;
+
+ elm = elm || self.getBody();
+
+ if (!is(self.hasVisual))
+ self.hasVisual = settings.visual;
+
+ each(dom.select('table,a', elm), function(elm) {
+ var value;
+
+ switch (elm.nodeName) {
+ case 'TABLE':
+ cls = settings.visual_table_class || 'mceItemTable';
+ value = dom.getAttrib(elm, 'border');
+
+ if (!value || value == '0') {
+ if (self.hasVisual)
+ dom.addClass(elm, cls);
+ else
+ dom.removeClass(elm, cls);
+ }
+
+ return;
+
+ case 'A':
+ if (!dom.getAttrib(elm, 'href', false)) {
+ value = dom.getAttrib(elm, 'name') || elm.id;
+ cls = 'mceItemAnchor';
+
+ if (value) {
+ if (self.hasVisual)
+ dom.addClass(elm, cls);
+ else
+ dom.removeClass(elm, cls);
+ }
+ }
+
+ return;
+ }
+ });
+
+ self.onVisualAid.dispatch(self, elm, self.hasVisual);
+ },
+
+ remove : function() {
+ var self = this, elm = self.getContainer();
+
+ if (!self.removed) {
+ self.removed = 1; // Cancels post remove event execution
+ self.hide();
+
+ // Don't clear the window or document if content editable
+ // is enabled since other instances might still be present
+ if (!self.settings.content_editable) {
+ Event.unbind(self.getWin());
+ Event.unbind(self.getDoc());
+ }
+
+ Event.unbind(self.getBody());
+ Event.clear(elm);
+
+ self.execCallback('remove_instance_callback', self);
+ self.onRemove.dispatch(self);
+
+ // Clear all execCommand listeners this is required to avoid errors if the editor was removed inside another command
+ self.onExecCommand.listeners = [];
+
+ tinymce.remove(self);
+ DOM.remove(elm);
+ }
+ },
+
+ destroy : function(s) {
+ var t = this;
+
+ // One time is enough
+ if (t.destroyed)
+ return;
+
+ // We must unbind on Gecko since it would otherwise produce the pesky "attempt to run compile-and-go script on a cleared scope" message
+ if (isGecko) {
+ Event.unbind(t.getDoc());
+ Event.unbind(t.getWin());
+ Event.unbind(t.getBody());
+ }
+
+ if (!s) {
+ tinymce.removeUnload(t.destroy);
+ tinyMCE.onBeforeUnload.remove(t._beforeUnload);
+
+ // Manual destroy
+ if (t.theme && t.theme.destroy)
+ t.theme.destroy();
+
+ // Destroy controls, selection and dom
+ t.controlManager.destroy();
+ t.selection.destroy();
+ t.dom.destroy();
+ }
+
+ if (t.formElement) {
+ t.formElement.submit = t.formElement._mceOldSubmit;
+ t.formElement._mceOldSubmit = null;
+ }
+
+ t.contentAreaContainer = t.formElement = t.container = t.settings.content_element = t.bodyElement = t.contentDocument = t.contentWindow = null;
+
+ if (t.selection)
+ t.selection = t.selection.win = t.selection.dom = t.selection.dom.doc = null;
+
+ t.destroyed = 1;
+ },
+
+ // Internal functions
+
+ _refreshContentEditable : function() {
+ var self = this, body, parent;
+
+ // Check if the editor was hidden and the re-initalize contentEditable mode by removing and adding the body again
+ if (self._isHidden()) {
+ body = self.getBody();
+ parent = body.parentNode;
+
+ parent.removeChild(body);
+ parent.appendChild(body);
+
+ body.focus();
+ }
+ },
+
+ _isHidden : function() {
+ var s;
+
+ if (!isGecko)
+ return 0;
+
+ // Weird, wheres that cursor selection?
+ s = this.selection.getSel();
+ return (!s || !s.rangeCount || s.rangeCount === 0);
+ }
+ });
+})(tinymce);
+(function(tinymce) {
+ var each = tinymce.each;
+
+ tinymce.Editor.prototype.setupEvents = function() {
+ var self = this, settings = self.settings;
+
+ // Add events to the editor
+ each([
+ 'onPreInit',
+
+ 'onBeforeRenderUI',
+
+ 'onPostRender',
+
+ 'onLoad',
+
+ 'onInit',
+
+ 'onRemove',
+
+ 'onActivate',
+
+ 'onDeactivate',
+
+ 'onClick',
+
+ 'onEvent',
+
+ 'onMouseUp',
+
+ 'onMouseDown',
+
+ 'onDblClick',
+
+ 'onKeyDown',
+
+ 'onKeyUp',
+
+ 'onKeyPress',
+
+ 'onContextMenu',
+
+ 'onSubmit',
+
+ 'onReset',
+
+ 'onPaste',
+
+ 'onPreProcess',
+
+ 'onPostProcess',
+
+ 'onBeforeSetContent',
+
+ 'onBeforeGetContent',
+
+ 'onSetContent',
+
+ 'onGetContent',
+
+ 'onLoadContent',
+
+ 'onSaveContent',
+
+ 'onNodeChange',
+
+ 'onChange',
+
+ 'onBeforeExecCommand',
+
+ 'onExecCommand',
+
+ 'onUndo',
+
+ 'onRedo',
+
+ 'onVisualAid',
+
+ 'onSetProgressState',
+
+ 'onSetAttrib'
+ ], function(name) {
+ self[name] = new tinymce.util.Dispatcher(self);
+ });
+
+ // Handle legacy cleanup_callback option
+ if (settings.cleanup_callback) {
+ self.onBeforeSetContent.add(function(ed, o) {
+ o.content = ed.execCallback('cleanup_callback', 'insert_to_editor', o.content, o);
+ });
+
+ self.onPreProcess.add(function(ed, o) {
+ if (o.set)
+ ed.execCallback('cleanup_callback', 'insert_to_editor_dom', o.node, o);
+
+ if (o.get)
+ ed.execCallback('cleanup_callback', 'get_from_editor_dom', o.node, o);
+ });
+
+ self.onPostProcess.add(function(ed, o) {
+ if (o.set)
+ o.content = ed.execCallback('cleanup_callback', 'insert_to_editor', o.content, o);
+
+ if (o.get)
+ o.content = ed.execCallback('cleanup_callback', 'get_from_editor', o.content, o);
+ });
+ }
+
+ // Handle legacy save_callback option
+ if (settings.save_callback) {
+ self.onGetContent.add(function(ed, o) {
+ if (o.save)
+ o.content = ed.execCallback('save_callback', ed.id, o.content, ed.getBody());
+ });
+ }
+
+ // Handle legacy handle_event_callback option
+ if (settings.handle_event_callback) {
+ self.onEvent.add(function(ed, e, o) {
+ if (self.execCallback('handle_event_callback', e, ed, o) === false) {
+ e.preventDefault();
+ e.stopPropagation();
+ }
+ });
+ }
+
+ // Handle legacy handle_node_change_callback option
+ if (settings.handle_node_change_callback) {
+ self.onNodeChange.add(function(ed, cm, n) {
+ ed.execCallback('handle_node_change_callback', ed.id, n, -1, -1, true, ed.selection.isCollapsed());
+ });
+ }
+
+ // Handle legacy save_callback option
+ if (settings.save_callback) {
+ self.onSaveContent.add(function(ed, o) {
+ var h = ed.execCallback('save_callback', ed.id, o.content, ed.getBody());
+
+ if (h)
+ o.content = h;
+ });
+ }
+
+ // Handle legacy onchange_callback option
+ if (settings.onchange_callback) {
+ self.onChange.add(function(ed, l) {
+ ed.execCallback('onchange_callback', ed, l);
+ });
+ }
+ };
+
+ tinymce.Editor.prototype.bindNativeEvents = function() {
+ // 'focus', 'blur', 'dblclick', 'beforedeactivate', submit, reset
+ var self = this, i, settings = self.settings, dom = self.dom, nativeToDispatcherMap;
+
+ nativeToDispatcherMap = {
+ mouseup : 'onMouseUp',
+ mousedown : 'onMouseDown',
+ click : 'onClick',
+ keyup : 'onKeyUp',
+ keydown : 'onKeyDown',
+ keypress : 'onKeyPress',
+ submit : 'onSubmit',
+ reset : 'onReset',
+ contextmenu : 'onContextMenu',
+ dblclick : 'onDblClick',
+ paste : 'onPaste' // Doesn't work in all browsers yet
+ };
+
+ // Handler that takes a native event and sends it out to a dispatcher like onKeyDown
+ function eventHandler(evt, args) {
+ var type = evt.type;
+
+ // Don't fire events when it's removed
+ if (self.removed)
+ return;
+
+ // Sends the native event out to a global dispatcher then to the specific event dispatcher
+ if (self.onEvent.dispatch(self, evt, args) !== false) {
+ self[nativeToDispatcherMap[evt.fakeType || evt.type]].dispatch(self, evt, args);
+ }
+ };
+
+ // Opera doesn't support focus event for contentEditable elements so we need to fake it
+ function doOperaFocus(e) {
+ self.focus(true);
+ };
+
+ function nodeChanged(ed, e) {
+ // Normalize selection for example <b>a</b><i>|a</i> becomes <b>a|</b><i>a</i> except for Ctrl+A since it selects everything
+ if (e.keyCode != 65 || !tinymce.VK.metaKeyPressed(e)) {
+ self.selection.normalize();
+ }
+
+ self.nodeChanged();
+ }
+
+ // Add DOM events
+ each(nativeToDispatcherMap, function(dispatcherName, nativeName) {
+ var root = settings.content_editable ? self.getBody() : self.getDoc();
+
+ switch (nativeName) {
+ case 'contextmenu':
+ dom.bind(root, nativeName, eventHandler);
+ break;
+
+ case 'paste':
+ dom.bind(self.getBody(), nativeName, eventHandler);
+ break;
+
+ case 'submit':
+ case 'reset':
+ dom.bind(self.getElement().form || tinymce.DOM.getParent(self.id, 'form'), nativeName, eventHandler);
+ break;
+
+ default:
+ dom.bind(root, nativeName, eventHandler);
+ }
+ });
+
+ // Set the editor as active when focused
+ dom.bind(settings.content_editable ? self.getBody() : (tinymce.isGecko ? self.getDoc() : self.getWin()), 'focus', function(e) {
+ self.focus(true);
+ });
+
+ if (settings.content_editable && tinymce.isOpera) {
+ dom.bind(self.getBody(), 'click', doOperaFocus);
+ dom.bind(self.getBody(), 'keydown', doOperaFocus);
+ }
+
+ // Add node change handler
+ self.onMouseUp.add(nodeChanged);
+
+ self.onKeyUp.add(function(ed, e) {
+ var keyCode = e.keyCode;
+
+ if ((keyCode >= 33 && keyCode <= 36) || (keyCode >= 37 && keyCode <= 40) || keyCode == 13 || keyCode == 45 || keyCode == 46 || keyCode == 8 || (tinymce.isMac && (keyCode == 91 || keyCode == 93)) || e.ctrlKey)
+ nodeChanged(ed, e);
+ });
+
+ // Add reset handler
+ self.onReset.add(function() {
+ self.setContent(self.startContent, {format : 'raw'});
+ });
+
+ // Add shortcuts
+ function handleShortcut(e, execute) {
+ if (e.altKey || e.ctrlKey || e.metaKey) {
+ each(self.shortcuts, function(shortcut) {
+ var ctrlState = tinymce.isMac ? e.metaKey : e.ctrlKey;
+
+ if (shortcut.ctrl != ctrlState || shortcut.alt != e.altKey || shortcut.shift != e.shiftKey)
+ return;
+
+ if (e.keyCode == shortcut.keyCode || (e.charCode && e.charCode == shortcut.charCode)) {
+ e.preventDefault();
+
+ if (execute) {
+ shortcut.func.call(shortcut.scope);
+ }
+
+ return true;
+ }
+ });
+ }
+ };
+
+ self.onKeyUp.add(function(ed, e) {
+ handleShortcut(e);
+ });
+
+ self.onKeyPress.add(function(ed, e) {
+ handleShortcut(e);
+ });
+
+ self.onKeyDown.add(function(ed, e) {
+ handleShortcut(e, true);
+ });
+
+ if (tinymce.isOpera) {
+ self.onClick.add(function(ed, e) {
+ e.preventDefault();
+ });
+ }
+ };
+})(tinymce);
+(function(tinymce) {
+ // Added for compression purposes
+ var each = tinymce.each, undef, TRUE = true, FALSE = false;
+
+ tinymce.EditorCommands = function(editor) {
+ var dom = editor.dom,
+ selection = editor.selection,
+ commands = {state: {}, exec : {}, value : {}},
+ settings = editor.settings,
+ formatter = editor.formatter,
+ bookmark;
+
+ function execCommand(command, ui, value) {
+ var func;
+
+ command = command.toLowerCase();
+ if (func = commands.exec[command]) {
+ func(command, ui, value);
+ return TRUE;
+ }
+
+ return FALSE;
+ };
+
+ function queryCommandState(command) {
+ var func;
+
+ command = command.toLowerCase();
+ if (func = commands.state[command])
+ return func(command);
+
+ return -1;
+ };
+
+ function queryCommandValue(command) {
+ var func;
+
+ command = command.toLowerCase();
+ if (func = commands.value[command])
+ return func(command);
+
+ return FALSE;
+ };
+
+ function addCommands(command_list, type) {
+ type = type || 'exec';
+
+ each(command_list, function(callback, command) {
+ each(command.toLowerCase().split(','), function(command) {
+ commands[type][command] = callback;
+ });
+ });
+ };
+
+ // Expose public methods
+ tinymce.extend(this, {
+ execCommand : execCommand,
+ queryCommandState : queryCommandState,
+ queryCommandValue : queryCommandValue,
+ addCommands : addCommands
+ });
+
+ // Private methods
+
+ function execNativeCommand(command, ui, value) {
+ if (ui === undef)
+ ui = FALSE;
+
+ if (value === undef)
+ value = null;
+
+ return editor.getDoc().execCommand(command, ui, value);
+ };
+
+ function isFormatMatch(name) {
+ return formatter.match(name);
+ };
+
+ function toggleFormat(name, value) {
+ formatter.toggle(name, value ? {value : value} : undef);
+ };
+
+ function storeSelection(type) {
+ bookmark = selection.getBookmark(type);
+ };
+
+ function restoreSelection() {
+ selection.moveToBookmark(bookmark);
+ };
+
+ // Add execCommand overrides
+ addCommands({
+ // Ignore these, added for compatibility
+ 'mceResetDesignMode,mceBeginUndoLevel' : function() {},
+
+ // Add undo manager logic
+ 'mceEndUndoLevel,mceAddUndoLevel' : function() {
+ editor.undoManager.add();
+ },
+
+ 'Cut,Copy,Paste' : function(command) {
+ var doc = editor.getDoc(), failed;
+
+ // Try executing the native command
+ try {
+ execNativeCommand(command);
+ } catch (ex) {
+ // Command failed
+ failed = TRUE;
+ }
+
+ // Present alert message about clipboard access not being available
+ if (failed || !doc.queryCommandSupported(command)) {
+ if (tinymce.isGecko) {
+ editor.windowManager.confirm(editor.getLang('clipboard_msg'), function(state) {
+ if (state)
+ open('http://www.mozilla.org/editor/midasdemo/securityprefs.html', '_blank');
+ });
+ } else
+ editor.windowManager.alert(editor.getLang('clipboard_no_support'));
+ }
+ },
+
+ // Override unlink command
+ unlink : function(command) {
+ if (selection.isCollapsed())
+ selection.select(selection.getNode());
+
+ execNativeCommand(command);
+ selection.collapse(FALSE);
+ },
+
+ // Override justify commands to use the text formatter engine
+ 'JustifyLeft,JustifyCenter,JustifyRight,JustifyFull' : function(command) {
+ var align = command.substring(7);
+
+ // Remove all other alignments first
+ each('left,center,right,full'.split(','), function(name) {
+ if (align != name)
+ formatter.remove('align' + name);
+ });
+
+ toggleFormat('align' + align);
+ execCommand('mceRepaint');
+ },
+
+ // Override list commands to fix WebKit bug
+ 'InsertUnorderedList,InsertOrderedList' : function(command) {
+ var listElm, listParent;
+
+ execNativeCommand(command);
+
+ // WebKit produces lists within block elements so we need to split them
+ // we will replace the native list creation logic to custom logic later on
+ // TODO: Remove this when the list creation logic is removed
+ listElm = dom.getParent(selection.getNode(), 'ol,ul');
+ if (listElm) {
+ listParent = listElm.parentNode;
+
+ // If list is within a text block then split that block
+ if (/^(H[1-6]|P|ADDRESS|PRE)$/.test(listParent.nodeName)) {
+ storeSelection();
+ dom.split(listParent, listElm);
+ restoreSelection();
+ }
+ }
+ },
+
+ // Override commands to use the text formatter engine
+ 'Bold,Italic,Underline,Strikethrough,Superscript,Subscript' : function(command) {
+ toggleFormat(command);
+ },
+
+ // Override commands to use the text formatter engine
+ 'ForeColor,HiliteColor,FontName' : function(command, ui, value) {
+ toggleFormat(command, value);
+ },
+
+ FontSize : function(command, ui, value) {
+ var fontClasses, fontSizes;
+
+ // Convert font size 1-7 to styles
+ if (value >= 1 && value <= 7) {
+ fontSizes = tinymce.explode(settings.font_size_style_values);
+ fontClasses = tinymce.explode(settings.font_size_classes);
+
+ if (fontClasses)
+ value = fontClasses[value - 1] || value;
+ else
+ value = fontSizes[value - 1] || value;
+ }
+
+ toggleFormat(command, value);
+ },
+
+ RemoveFormat : function(command) {
+ formatter.remove(command);
+ },
+
+ mceBlockQuote : function(command) {
+ toggleFormat('blockquote');
+ },
+
+ FormatBlock : function(command, ui, value) {
+ return toggleFormat(value || 'p');
+ },
+
+ mceCleanup : function() {
+ var bookmark = selection.getBookmark();
+
+ editor.setContent(editor.getContent({cleanup : TRUE}), {cleanup : TRUE});
+
+ selection.moveToBookmark(bookmark);
+ },
+
+ mceRemoveNode : function(command, ui, value) {
+ var node = value || selection.getNode();
+
+ // Make sure that the body node isn't removed
+ if (node != editor.getBody()) {
+ storeSelection();
+ editor.dom.remove(node, TRUE);
+ restoreSelection();
+ }
+ },
+
+ mceSelectNodeDepth : function(command, ui, value) {
+ var counter = 0;
+
+ dom.getParent(selection.getNode(), function(node) {
+ if (node.nodeType == 1 && counter++ == value) {
+ selection.select(node);
+ return FALSE;
+ }
+ }, editor.getBody());
+ },
+
+ mceSelectNode : function(command, ui, value) {
+ selection.select(value);
+ },
+
+ mceInsertContent : function(command, ui, value) {
+ var parser, serializer, parentNode, rootNode, fragment, args,
+ marker, nodeRect, viewPortRect, rng, node, node2, bookmarkHtml, viewportBodyElement;
+
+ //selection.normalize();
+
+ // Setup parser and serializer
+ parser = editor.parser;
+ serializer = new tinymce.html.Serializer({}, editor.schema);
+ bookmarkHtml = '<span id="mce_marker" data-mce-type="bookmark">\uFEFF</span>';
+
+ // Run beforeSetContent handlers on the HTML to be inserted
+ args = {content: value, format: 'html'};
+ selection.onBeforeSetContent.dispatch(selection, args);
+ value = args.content;
+
+ // Add caret at end of contents if it's missing
+ if (value.indexOf('{$caret}') == -1)
+ value += '{$caret}';
+
+ // Replace the caret marker with a span bookmark element
+ value = value.replace(/\{\$caret\}/, bookmarkHtml);
+
+ // Insert node maker where we will insert the new HTML and get it's parent
+ if (!selection.isCollapsed())
+ editor.getDoc().execCommand('Delete', false, null);
+
+ parentNode = selection.getNode();
+
+ // Parse the fragment within the context of the parent node
+ args = {context : parentNode.nodeName.toLowerCase()};
+ fragment = parser.parse(value, args);
+
+ // Move the caret to a more suitable location
+ node = fragment.lastChild;
+ if (node.attr('id') == 'mce_marker') {
+ marker = node;
+
+ for (node = node.prev; node; node = node.walk(true)) {
+ if (node.type == 3 || !dom.isBlock(node.name)) {
+ node.parent.insert(marker, node, node.name === 'br');
+ break;
+ }
+ }
+ }
+
+ // If parser says valid we can insert the contents into that parent
+ if (!args.invalid) {
+ value = serializer.serialize(fragment);
+
+ // Check if parent is empty or only has one BR element then set the innerHTML of that parent
+ node = parentNode.firstChild;
+ node2 = parentNode.lastChild;
+ if (!node || (node === node2 && node.nodeName === 'BR'))
+ dom.setHTML(parentNode, value);
+ else
+ selection.setContent(value);
+ } else {
+ // If the fragment was invalid within that context then we need
+ // to parse and process the parent it's inserted into
+
+ // Insert bookmark node and get the parent
+ selection.setContent(bookmarkHtml);
+ parentNode = selection.getNode();
+ rootNode = editor.getBody();
+
+ // Opera will return the document node when selection is in root
+ if (parentNode.nodeType == 9)
+ parentNode = node = rootNode;
+ else
+ node = parentNode;
+
+ // Find the ancestor just before the root element
+ while (node !== rootNode) {
+ parentNode = node;
+ node = node.parentNode;
+ }
+
+ // Get the outer/inner HTML depending on if we are in the root and parser and serialize that
+ value = parentNode == rootNode ? rootNode.innerHTML : dom.getOuterHTML(parentNode);
+ value = serializer.serialize(
+ parser.parse(
+ // Need to replace by using a function since $ in the contents would otherwise be a problem
+ value.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i, function() {
+ return serializer.serialize(fragment);
+ })
+ )
+ );
+
+ // Set the inner/outer HTML depending on if we are in the root or not
+ if (parentNode == rootNode)
+ dom.setHTML(rootNode, value);
+ else
+ dom.setOuterHTML(parentNode, value);
+ }
+
+ marker = dom.get('mce_marker');
+
+ // Scroll range into view scrollIntoView on element can't be used since it will scroll the main view port as well
+ nodeRect = dom.getRect(marker);
+ viewPortRect = dom.getViewPort(editor.getWin());
+
+ // Check if node is out side the viewport if it is then scroll to it
+ if ((nodeRect.y + nodeRect.h > viewPortRect.y + viewPortRect.h || nodeRect.y < viewPortRect.y) ||
+ (nodeRect.x > viewPortRect.x + viewPortRect.w || nodeRect.x < viewPortRect.x)) {
+ viewportBodyElement = tinymce.isIE ? editor.getDoc().documentElement : editor.getBody();
+ viewportBodyElement.scrollLeft = nodeRect.x;
+ viewportBodyElement.scrollTop = nodeRect.y - viewPortRect.h + 25;
+ }
+
+ // Move selection before marker and remove it
+ rng = dom.createRng();
+
+ // If previous sibling is a text node set the selection to the end of that node
+ node = marker.previousSibling;
+ if (node && node.nodeType == 3) {
+ rng.setStart(node, node.nodeValue.length);
+ } else {
+ // If the previous sibling isn't a text node or doesn't exist set the selection before the marker node
+ rng.setStartBefore(marker);
+ rng.setEndBefore(marker);
+ }
+
+ // Remove the marker node and set the new range
+ dom.remove(marker);
+ selection.setRng(rng);
+
+ // Dispatch after event and add any visual elements needed
+ selection.onSetContent.dispatch(selection, args);
+ editor.addVisual();
+ },
+
+ mceInsertRawHTML : function(command, ui, value) {
+ selection.setContent('tiny_mce_marker');
+ editor.setContent(editor.getContent().replace(/tiny_mce_marker/g, function() { return value }));
+ },
+
+ mceToggleFormat : function(command, ui, value) {
+ toggleFormat(value);
+ },
+
+ mceSetContent : function(command, ui, value) {
+ editor.setContent(value);
+ },
+
+ 'Indent,Outdent' : function(command) {
+ var intentValue, indentUnit, value;
+
+ // Setup indent level
+ intentValue = settings.indentation;
+ indentUnit = /[a-z%]+$/i.exec(intentValue);
+ intentValue = parseInt(intentValue);
+
+ if (!queryCommandState('InsertUnorderedList') && !queryCommandState('InsertOrderedList')) {
+ // If forced_root_blocks is set to false we don't have a block to indent so lets create a div
+ if (!settings.forced_root_block && !dom.getParent(selection.getNode(), dom.isBlock)) {
+ formatter.apply('div');
+ }
+
+ each(selection.getSelectedBlocks(), function(element) {
+ if (command == 'outdent') {
+ value = Math.max(0, parseInt(element.style.paddingLeft || 0) - intentValue);
+ dom.setStyle(element, 'paddingLeft', value ? value + indentUnit : '');
+ } else
+ dom.setStyle(element, 'paddingLeft', (parseInt(element.style.paddingLeft || 0) + intentValue) + indentUnit);
+ });
+ } else
+ execNativeCommand(command);
+ },
+
+ mceRepaint : function() {
+ var bookmark;
+
+ if (tinymce.isGecko) {
+ try {
+ storeSelection(TRUE);
+
+ if (selection.getSel())
+ selection.getSel().selectAllChildren(editor.getBody());
+
+ selection.collapse(TRUE);
+ restoreSelection();
+ } catch (ex) {
+ // Ignore
+ }
+ }
+ },
+
+ mceToggleFormat : function(command, ui, value) {
+ formatter.toggle(value);
+ },
+
+ InsertHorizontalRule : function() {
+ editor.execCommand('mceInsertContent', false, '<hr />');
+ },
+
+ mceToggleVisualAid : function() {
+ editor.hasVisual = !editor.hasVisual;
+ editor.addVisual();
+ },
+
+ mceReplaceContent : function(command, ui, value) {
+ editor.execCommand('mceInsertContent', false, value.replace(/\{\$selection\}/g, selection.getContent({format : 'text'})));
+ },
+
+ mceInsertLink : function(command, ui, value) {
+ var anchor;
+
+ if (typeof(value) == 'string')
+ value = {href : value};
+
+ anchor = dom.getParent(selection.getNode(), 'a');
+
+ // Spaces are never valid in URLs and it's a very common mistake for people to make so we fix it here.
+ value.href = value.href.replace(' ', '%20');
+
+ // Remove existing links if there could be child links or that the href isn't specified
+ if (!anchor || !value.href) {
+ formatter.remove('link');
+ }
+
+ // Apply new link to selection
+ if (value.href) {
+ formatter.apply('link', value, anchor);
+ }
+ },
+
+ selectAll : function() {
+ var root = dom.getRoot(), rng = dom.createRng();
+
+ // Old IE does a better job with selectall than new versions
+ if (selection.getRng().setStart) {
+ rng.setStart(root, 0);
+ rng.setEnd(root, root.childNodes.length);
+
+ selection.setRng(rng);
+ } else {
+ execNativeCommand('SelectAll');
+ }
+ }
+ });
+
+ // Add queryCommandState overrides
+ addCommands({
+ // Override justify commands
+ 'JustifyLeft,JustifyCenter,JustifyRight,JustifyFull' : function(command) {
+ var name = 'align' + command.substring(7);
+ var nodes = selection.isCollapsed() ? [dom.getParent(selection.getNode(), dom.isBlock)] : selection.getSelectedBlocks();
+ var matches = tinymce.map(nodes, function(node) {
+ return !!formatter.matchNode(node, name);
+ });
+ return tinymce.inArray(matches, TRUE) !== -1;
+ },
+
+ 'Bold,Italic,Underline,Strikethrough,Superscript,Subscript' : function(command) {
+ return isFormatMatch(command);
+ },
+
+ mceBlockQuote : function() {
+ return isFormatMatch('blockquote');
+ },
+
+ Outdent : function() {
+ var node;
+
+ if (settings.inline_styles) {
+ if ((node = dom.getParent(selection.getStart(), dom.isBlock)) && parseInt(node.style.paddingLeft) > 0)
+ return TRUE;
+
+ if ((node = dom.getParent(selection.getEnd(), dom.isBlock)) && parseInt(node.style.paddingLeft) > 0)
+ return TRUE;
+ }
+
+ return queryCommandState('InsertUnorderedList') || queryCommandState('InsertOrderedList') || (!settings.inline_styles && !!dom.getParent(selection.getNode(), 'BLOCKQUOTE'));
+ },
+
+ 'InsertUnorderedList,InsertOrderedList' : function(command) {
+ var list = dom.getParent(selection.getNode(), 'ul,ol');
+ return list &&
+ (command === 'insertunorderedlist' && list.tagName === 'UL'
+ || command === 'insertorderedlist' && list.tagName === 'OL');
+ }
+ }, 'state');
+
+ // Add queryCommandValue overrides
+ addCommands({
+ 'FontSize,FontName' : function(command) {
+ var value = 0, parent;
+
+ if (parent = dom.getParent(selection.getNode(), 'span')) {
+ if (command == 'fontsize')
+ value = parent.style.fontSize;
+ else
+ value = parent.style.fontFamily.replace(/, /g, ',').replace(/[\'\"]/g, '').toLowerCase();
+ }
+
+ return value;
+ }
+ }, 'value');
+
+ // Add undo manager logic
+ addCommands({
+ Undo : function() {
+ editor.undoManager.undo();
+ },
+
+ Redo : function() {
+ editor.undoManager.redo();
+ }
+ });
+ };
+})(tinymce);
+
+(function(tinymce) {
+ var Dispatcher = tinymce.util.Dispatcher;
+
+ tinymce.UndoManager = function(editor) {
+ var self, index = 0, data = [], beforeBookmark, onAdd, onUndo, onRedo;
+
+ function getContent() {
+ // Remove whitespace before/after and remove pure bogus nodes
+ return tinymce.trim(editor.getContent({format : 'raw', no_events : 1}).replace(/<span[^>]+data-mce-bogus[^>]+>[\u200B\uFEFF]+<\/span>/g, ''));
+ };
+
+ function addNonTypingUndoLevel() {
+ self.typing = false;
+ self.add();
+ };
+
+ // Create event instances
+ onBeforeAdd = new Dispatcher(self);
+ onAdd = new Dispatcher(self);
+ onUndo = new Dispatcher(self);
+ onRedo = new Dispatcher(self);
+
+ // Pass though onAdd event from UndoManager to Editor as onChange
+ onAdd.add(function(undoman, level) {
+ if (undoman.hasUndo())
+ return editor.onChange.dispatch(editor, level, undoman);
+ });
+
+ // Pass though onUndo event from UndoManager to Editor
+ onUndo.add(function(undoman, level) {
+ return editor.onUndo.dispatch(editor, level, undoman);
+ });
+
+ // Pass though onRedo event from UndoManager to Editor
+ onRedo.add(function(undoman, level) {
+ return editor.onRedo.dispatch(editor, level, undoman);
+ });
+
+ // Add initial undo level when the editor is initialized
+ editor.onInit.add(function() {
+ self.add();
+ });
+
+ // Get position before an execCommand is processed
+ editor.onBeforeExecCommand.add(function(ed, cmd, ui, val, args) {
+ if (cmd != 'Undo' && cmd != 'Redo' && cmd != 'mceRepaint' && (!args || !args.skip_undo)) {
+ self.beforeChange();
+ }
+ });
+
+ // Add undo level after an execCommand call was made
+ editor.onExecCommand.add(function(ed, cmd, ui, val, args) {
+ if (cmd != 'Undo' && cmd != 'Redo' && cmd != 'mceRepaint' && (!args || !args.skip_undo)) {
+ self.add();
+ }
+ });
+
+ // Add undo level on save contents, drag end and blur/focusout
+ editor.onSaveContent.add(addNonTypingUndoLevel);
+ editor.dom.bind(editor.dom.getRoot(), 'dragend', addNonTypingUndoLevel);
+ editor.dom.bind(editor.getDoc(), tinymce.isGecko ? 'blur' : 'focusout', function(e) {
+ if (!editor.removed && self.typing) {
+ addNonTypingUndoLevel();
+ }
+ });
+
+ editor.onKeyUp.add(function(editor, e) {
+ var keyCode = e.keyCode;
+
+ if ((keyCode >= 33 && keyCode <= 36) || (keyCode >= 37 && keyCode <= 40) || keyCode == 45 || keyCode == 13 || e.ctrlKey) {
+ addNonTypingUndoLevel();
+ }
+ });
+
+ editor.onKeyDown.add(function(editor, e) {
+ var keyCode = e.keyCode;
+
+ // Is caracter positon keys left,right,up,down,home,end,pgdown,pgup,enter
+ if ((keyCode >= 33 && keyCode <= 36) || (keyCode >= 37 && keyCode <= 40) || keyCode == 45) {
+ if (self.typing) {
+ addNonTypingUndoLevel();
+ }
+
+ return;
+ }
+
+ // If key isn't shift,ctrl,alt,capslock,metakey
+ if ((keyCode < 16 || keyCode > 20) && keyCode != 224 && keyCode != 91 && !self.typing) {
+ self.beforeChange();
+ self.typing = true;
+ self.add();
+ }
+ });
+
+ editor.onMouseDown.add(function(editor, e) {
+ if (self.typing) {
+ addNonTypingUndoLevel();
+ }
+ });
+
+ // Add keyboard shortcuts for undo/redo keys
+ editor.addShortcut('ctrl+z', 'undo_desc', 'Undo');
+ editor.addShortcut('ctrl+y', 'redo_desc', 'Redo');
+
+ self = {
+ // Explose for debugging reasons
+ data : data,
+
+ typing : false,
+
+ onBeforeAdd: onBeforeAdd,
+
+ onAdd : onAdd,
+
+ onUndo : onUndo,
+
+ onRedo : onRedo,
+
+ beforeChange : function() {
+ beforeBookmark = editor.selection.getBookmark(2, true);
+ },
+
+ add : function(level) {
+ var i, settings = editor.settings, lastLevel;
+
+ level = level || {};
+ level.content = getContent();
+
+ self.onBeforeAdd.dispatch(self, level);
+
+ // Add undo level if needed
+ lastLevel = data[index];
+ if (lastLevel && lastLevel.content == level.content)
+ return null;
+
+ // Set before bookmark on previous level
+ if (data[index])
+ data[index].beforeBookmark = beforeBookmark;
+
+ // Time to compress
+ if (settings.custom_undo_redo_levels) {
+ if (data.length > settings.custom_undo_redo_levels) {
+ for (i = 0; i < data.length - 1; i++)
+ data[i] = data[i + 1];
+
+ data.length--;
+ index = data.length;
+ }
+ }
+
+ // Get a non intrusive normalized bookmark
+ level.bookmark = editor.selection.getBookmark(2, true);
+
+ // Crop array if needed
+ if (index < data.length - 1)
+ data.length = index + 1;
+
+ data.push(level);
+ index = data.length - 1;
+
+ self.onAdd.dispatch(self, level);
+ editor.isNotDirty = 0;
+
+ return level;
+ },
+
+ undo : function() {
+ var level, i;
+
+ if (self.typing) {
+ self.add();
+ self.typing = false;
+ }
+
+ if (index > 0) {
+ level = data[--index];
+
+ editor.setContent(level.content, {format : 'raw'});
+ editor.selection.moveToBookmark(level.beforeBookmark);
+
+ self.onUndo.dispatch(self, level);
+ }
+
+ return level;
+ },
+
+ redo : function() {
+ var level;
+
+ if (index < data.length - 1) {
+ level = data[++index];
+
+ editor.setContent(level.content, {format : 'raw'});
+ editor.selection.moveToBookmark(level.bookmark);
+
+ self.onRedo.dispatch(self, level);
+ }
+
+ return level;
+ },
+
+ clear : function() {
+ data = [];
+ index = 0;
+ self.typing = false;
+ },
+
+ hasUndo : function() {
+ return index > 0 || this.typing;
+ },
+
+ hasRedo : function() {
+ return index < data.length - 1 && !this.typing;
+ }
+ };
+
+ return self;
+ };
+})(tinymce);
+
+tinymce.ForceBlocks = function(editor) {
+ var settings = editor.settings, dom = editor.dom, selection = editor.selection, blockElements = editor.schema.getBlockElements();
+
+ function addRootBlocks() {
+ var node = selection.getStart(), rootNode = editor.getBody(), rng, startContainer, startOffset, endContainer, endOffset, rootBlockNode, tempNode, offset = -0xFFFFFF, wrapped, isInEditorDocument;
+
+ if (!node || node.nodeType !== 1 || !settings.forced_root_block)
+ return;
+
+ // Check if node is wrapped in block
+ while (node && node != rootNode) {
+ if (blockElements[node.nodeName])
+ return;
+
+ node = node.parentNode;
+ }
+
+ // Get current selection
+ rng = selection.getRng();
+ if (rng.setStart) {
+ startContainer = rng.startContainer;
+ startOffset = rng.startOffset;
+ endContainer = rng.endContainer;
+ endOffset = rng.endOffset;
+ } else {
+ // Force control range into text range
+ if (rng.item) {
+ node = rng.item(0);
+ rng = editor.getDoc().body.createTextRange();
+ rng.moveToElementText(node);
+ }
+
+ isInEditorDocument = rng.parentElement().ownerDocument === editor.getDoc();
+ tmpRng = rng.duplicate();
+ tmpRng.collapse(true);
+ startOffset = tmpRng.move('character', offset) * -1;
+
+ if (!tmpRng.collapsed) {
+ tmpRng = rng.duplicate();
+ tmpRng.collapse(false);
+ endOffset = (tmpRng.move('character', offset) * -1) - startOffset;
+ }
+ }
+
+ // Wrap non block elements and text nodes
+ node = rootNode.firstChild;
+ while (node) {
+ if (node.nodeType === 3 || (node.nodeType == 1 && !blockElements[node.nodeName])) {
+ // Remove empty text nodes
+ if (node.nodeType === 3 && node.nodeValue.length == 0) {
+ tempNode = node;
+ node = node.nextSibling;
+ dom.remove(tempNode);
+ continue;
+ }
+
+ if (!rootBlockNode) {
+ rootBlockNode = dom.create(settings.forced_root_block);
+ node.parentNode.insertBefore(rootBlockNode, node);
+ wrapped = true;
+ }
+
+ tempNode = node;
+ node = node.nextSibling;
+ rootBlockNode.appendChild(tempNode);
+ } else {
+ rootBlockNode = null;
+ node = node.nextSibling;
+ }
+ }
+
+ if (wrapped) {
+ if (rng.setStart) {
+ rng.setStart(startContainer, startOffset);
+ rng.setEnd(endContainer, endOffset);
+ selection.setRng(rng);
+ } else {
+ // Only select if the previous selection was inside the document to prevent auto focus in quirks mode
+ if (isInEditorDocument) {
+ try {
+ rng = editor.getDoc().body.createTextRange();
+ rng.moveToElementText(rootNode);
+ rng.collapse(true);
+ rng.moveStart('character', startOffset);
+
+ if (endOffset > 0)
+ rng.moveEnd('character', endOffset);
+
+ rng.select();
+ } catch (ex) {
+ // Ignore
+ }
+ }
+ }
+
+ editor.nodeChanged();
+ }
+ };
+
+ // Force root blocks
+ if (settings.forced_root_block) {
+ editor.onKeyUp.add(addRootBlocks);
+ editor.onNodeChange.add(addRootBlocks);
+ }
+};
+
+(function(tinymce) {
+ // Shorten names
+ var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, extend = tinymce.extend;
+
+ tinymce.create('tinymce.ControlManager', {
+ ControlManager : function(ed, s) {
+ var t = this, i;
+
+ s = s || {};
+ t.editor = ed;
+ t.controls = {};
+ t.onAdd = new tinymce.util.Dispatcher(t);
+ t.onPostRender = new tinymce.util.Dispatcher(t);
+ t.prefix = s.prefix || ed.id + '_';
+ t._cls = {};
+
+ t.onPostRender.add(function() {
+ each(t.controls, function(c) {
+ c.postRender();
+ });
+ });
+ },
+
+ get : function(id) {
+ return this.controls[this.prefix + id] || this.controls[id];
+ },
+
+ setActive : function(id, s) {
+ var c = null;
+
+ if (c = this.get(id))
+ c.setActive(s);
+
+ return c;
+ },
+
+ setDisabled : function(id, s) {
+ var c = null;
+
+ if (c = this.get(id))
+ c.setDisabled(s);
+
+ return c;
+ },
+
+ add : function(c) {
+ var t = this;
+
+ if (c) {
+ t.controls[c.id] = c;
+ t.onAdd.dispatch(c, t);
+ }
+
+ return c;
+ },
+
+ createControl : function(name) {
+ var ctrl, i, l, self = this, editor = self.editor, factories, ctrlName;
+
+ // Build control factory cache
+ if (!self.controlFactories) {
+ self.controlFactories = [];
+ each(editor.plugins, function(plugin) {
+ if (plugin.createControl) {
+ self.controlFactories.push(plugin);
+ }
+ });
+ }
+
+ // Create controls by asking cached factories
+ factories = self.controlFactories;
+ for (i = 0, l = factories.length; i < l; i++) {
+ ctrl = factories[i].createControl(name, self);
+
+ if (ctrl) {
+ return self.add(ctrl);
+ }
+ }
+
+ // Create sepearator
+ if (name === "|" || name === "separator") {
+ return self.createSeparator();
+ }
+
+ // Create control from button collection
+ if (editor.buttons && (ctrl = editor.buttons[name])) {
+ return self.createButton(name, ctrl);
+ }
+
+ return self.add(ctrl);
+ },
+
+ createDropMenu : function(id, s, cc) {
+ var t = this, ed = t.editor, c, bm, v, cls;
+
+ s = extend({
+ 'class' : 'mceDropDown',
+ constrain : ed.settings.constrain_menus
+ }, s);
+
+ s['class'] = s['class'] + ' ' + ed.getParam('skin') + 'Skin';
+ if (v = ed.getParam('skin_variant'))
+ s['class'] += ' ' + ed.getParam('skin') + 'Skin' + v.substring(0, 1).toUpperCase() + v.substring(1);
+
+ s['class'] += ed.settings.directionality == "rtl" ? ' mceRtl' : '';
+
+ id = t.prefix + id;
+ cls = cc || t._cls.dropmenu || tinymce.ui.DropMenu;
+ c = t.controls[id] = new cls(id, s);
+ c.onAddItem.add(function(c, o) {
+ var s = o.settings;
+
+ s.title = ed.getLang(s.title, s.title);
+
+ if (!s.onclick) {
+ s.onclick = function(v) {
+ if (s.cmd)
+ ed.execCommand(s.cmd, s.ui || false, s.value);
+ };
+ }
+ });
+
+ ed.onRemove.add(function() {
+ c.destroy();
+ });
+
+ // Fix for bug #1897785, #1898007
+ if (tinymce.isIE) {
+ c.onShowMenu.add(function() {
+ // IE 8 needs focus in order to store away a range with the current collapsed caret location
+ ed.focus();
+
+ bm = ed.selection.getBookmark(1);
+ });
+
+ c.onHideMenu.add(function() {
+ if (bm) {
+ ed.selection.moveToBookmark(bm);
+ bm = 0;
+ }
+ });
+ }
+
+ return t.add(c);
+ },
+
+ createListBox : function(id, s, cc) {
+ var t = this, ed = t.editor, cmd, c, cls;
+
+ if (t.get(id))
+ return null;
+
+ s.title = ed.translate(s.title);
+ s.scope = s.scope || ed;
+
+ if (!s.onselect) {
+ s.onselect = function(v) {
+ ed.execCommand(s.cmd, s.ui || false, v || s.value);
+ };
+ }
+
+ s = extend({
+ title : s.title,
+ 'class' : 'mce_' + id,
+ scope : s.scope,
+ control_manager : t
+ }, s);
+
+ id = t.prefix + id;
+
+
+ function useNativeListForAccessibility(ed) {
+ return ed.settings.use_accessible_selects && !tinymce.isGecko
+ }
+
+ if (ed.settings.use_native_selects || useNativeListForAccessibility(ed))
+ c = new tinymce.ui.NativeListBox(id, s);
+ else {
+ cls = cc || t._cls.listbox || tinymce.ui.ListBox;
+ c = new cls(id, s, ed);
+ }
+
+ t.controls[id] = c;
+
+ // Fix focus problem in Safari
+ if (tinymce.isWebKit) {
+ c.onPostRender.add(function(c, n) {
+ // Store bookmark on mousedown
+ Event.add(n, 'mousedown', function() {
+ ed.bookmark = ed.selection.getBookmark(1);
+ });
+
+ // Restore on focus, since it might be lost
+ Event.add(n, 'focus', function() {
+ ed.selection.moveToBookmark(ed.bookmark);
+ ed.bookmark = null;
+ });
+ });
+ }
+
+ if (c.hideMenu)
+ ed.onMouseDown.add(c.hideMenu, c);
+
+ return t.add(c);
+ },
+
+ createButton : function(id, s, cc) {
+ var t = this, ed = t.editor, o, c, cls;
+
+ if (t.get(id))
+ return null;
+
+ s.title = ed.translate(s.title);
+ s.label = ed.translate(s.label);
+ s.scope = s.scope || ed;
+
+ if (!s.onclick && !s.menu_button) {
+ s.onclick = function() {
+ ed.execCommand(s.cmd, s.ui || false, s.value);
+ };
+ }
+
+ s = extend({
+ title : s.title,
+ 'class' : 'mce_' + id,
+ unavailable_prefix : ed.getLang('unavailable', ''),
+ scope : s.scope,
+ control_manager : t
+ }, s);
+
+ id = t.prefix + id;
+
+ if (s.menu_button) {
+ cls = cc || t._cls.menubutton || tinymce.ui.MenuButton;
+ c = new cls(id, s, ed);
+ ed.onMouseDown.add(c.hideMenu, c);
+ } else {
+ cls = t._cls.button || tinymce.ui.Button;
+ c = new cls(id, s, ed);
+ }
+
+ return t.add(c);
+ },
+
+ createMenuButton : function(id, s, cc) {
+ s = s || {};
+ s.menu_button = 1;
+
+ return this.createButton(id, s, cc);
+ },
+
+ createSplitButton : function(id, s, cc) {
+ var t = this, ed = t.editor, cmd, c, cls;
+
+ if (t.get(id))
+ return null;
+
+ s.title = ed.translate(s.title);
+ s.scope = s.scope || ed;
+
+ if (!s.onclick) {
+ s.onclick = function(v) {
+ ed.execCommand(s.cmd, s.ui || false, v || s.value);
+ };
+ }
+
+ if (!s.onselect) {
+ s.onselect = function(v) {
+ ed.execCommand(s.cmd, s.ui || false, v || s.value);
+ };
+ }
+
+ s = extend({
+ title : s.title,
+ 'class' : 'mce_' + id,
+ scope : s.scope,
+ control_manager : t
+ }, s);
+
+ id = t.prefix + id;
+ cls = cc || t._cls.splitbutton || tinymce.ui.SplitButton;
+ c = t.add(new cls(id, s, ed));
+ ed.onMouseDown.add(c.hideMenu, c);
+
+ return c;
+ },
+
+ createColorSplitButton : function(id, s, cc) {
+ var t = this, ed = t.editor, cmd, c, cls, bm;
+
+ if (t.get(id))
+ return null;
+
+ s.title = ed.translate(s.title);
+ s.scope = s.scope || ed;
+
+ if (!s.onclick) {
+ s.onclick = function(v) {
+ if (tinymce.isIE)
+ bm = ed.selection.getBookmark(1);
+
+ ed.execCommand(s.cmd, s.ui || false, v || s.value);
+ };
+ }
+
+ if (!s.onselect) {
+ s.onselect = function(v) {
+ ed.execCommand(s.cmd, s.ui || false, v || s.value);
+ };
+ }
+
+ s = extend({
+ title : s.title,
+ 'class' : 'mce_' + id,
+ 'menu_class' : ed.getParam('skin') + 'Skin',
+ scope : s.scope,
+ more_colors_title : ed.getLang('more_colors')
+ }, s);
+
+ id = t.prefix + id;
+ cls = cc || t._cls.colorsplitbutton || tinymce.ui.ColorSplitButton;
+ c = new cls(id, s, ed);
+ ed.onMouseDown.add(c.hideMenu, c);
+
+ // Remove the menu element when the editor is removed
+ ed.onRemove.add(function() {
+ c.destroy();
+ });
+
+ // Fix for bug #1897785, #1898007
+ if (tinymce.isIE) {
+ c.onShowMenu.add(function() {
+ // IE 8 needs focus in order to store away a range with the current collapsed caret location
+ ed.focus();
+ bm = ed.selection.getBookmark(1);
+ });
+
+ c.onHideMenu.add(function() {
+ if (bm) {
+ ed.selection.moveToBookmark(bm);
+ bm = 0;
+ }
+ });
+ }
+
+ return t.add(c);
+ },
+
+ createToolbar : function(id, s, cc) {
+ var c, t = this, cls;
+
+ id = t.prefix + id;
+ cls = cc || t._cls.toolbar || tinymce.ui.Toolbar;
+ c = new cls(id, s, t.editor);
+
+ if (t.get(id))
+ return null;
+
+ return t.add(c);
+ },
+
+ createToolbarGroup : function(id, s, cc) {
+ var c, t = this, cls;
+ id = t.prefix + id;
+ cls = cc || this._cls.toolbarGroup || tinymce.ui.ToolbarGroup;
+ c = new cls(id, s, t.editor);
+
+ if (t.get(id))
+ return null;
+
+ return t.add(c);
+ },
+
+ createSeparator : function(cc) {
+ var cls = cc || this._cls.separator || tinymce.ui.Separator;
+
+ return new cls();
+ },
+
+ setControlType : function(n, c) {
+ return this._cls[n.toLowerCase()] = c;
+ },
+
+ destroy : function() {
+ each(this.controls, function(c) {
+ c.destroy();
+ });
+
+ this.controls = null;
+ }
+ });
+})(tinymce);
+
+(function(tinymce) {
+ var Dispatcher = tinymce.util.Dispatcher, each = tinymce.each, isIE = tinymce.isIE, isOpera = tinymce.isOpera;
+
+ tinymce.create('tinymce.WindowManager', {
+ WindowManager : function(ed) {
+ var t = this;
+
+ t.editor = ed;
+ t.onOpen = new Dispatcher(t);
+ t.onClose = new Dispatcher(t);
+ t.params = {};
+ t.features = {};
+ },
+
+ open : function(s, p) {
+ var t = this, f = '', x, y, mo = t.editor.settings.dialog_type == 'modal', w, sw, sh, vp = tinymce.DOM.getViewPort(), u;
+
+ // Default some options
+ s = s || {};
+ p = p || {};
+ sw = isOpera ? vp.w : screen.width; // Opera uses windows inside the Opera window
+ sh = isOpera ? vp.h : screen.height;
+ s.name = s.name || 'mc_' + new Date().getTime();
+ s.width = parseInt(s.width || 320);
+ s.height = parseInt(s.height || 240);
+ s.resizable = true;
+ s.left = s.left || parseInt(sw / 2.0) - (s.width / 2.0);
+ s.top = s.top || parseInt(sh / 2.0) - (s.height / 2.0);
+ p.inline = false;
+ p.mce_width = s.width;
+ p.mce_height = s.height;
+ p.mce_auto_focus = s.auto_focus;
+
+ if (mo) {
+ if (isIE) {
+ s.center = true;
+ s.help = false;
+ s.dialogWidth = s.width + 'px';
+ s.dialogHeight = s.height + 'px';
+ s.scroll = s.scrollbars || false;
+ }
+ }
+
+ // Build features string
+ each(s, function(v, k) {
+ if (tinymce.is(v, 'boolean'))
+ v = v ? 'yes' : 'no';
+
+ if (!/^(name|url)$/.test(k)) {
+ if (isIE && mo)
+ f += (f ? ';' : '') + k + ':' + v;
+ else
+ f += (f ? ',' : '') + k + '=' + v;
+ }
+ });
+
+ t.features = s;
+ t.params = p;
+ t.onOpen.dispatch(t, s, p);
+
+ u = s.url || s.file;
+ u = tinymce._addVer(u);
+
+ try {
+ if (isIE && mo) {
+ w = 1;
+ window.showModalDialog(u, window, f);
+ } else
+ w = window.open(u, s.name, f);
+ } catch (ex) {
+ // Ignore
+ }
+
+ if (!w)
+ alert(t.editor.getLang('popup_blocked'));
+ },
+
+ close : function(w) {
+ w.close();
+ this.onClose.dispatch(this);
+ },
+
+ createInstance : function(cl, a, b, c, d, e) {
+ var f = tinymce.resolve(cl);
+
+ return new f(a, b, c, d, e);
+ },
+
+ confirm : function(t, cb, s, w) {
+ w = w || window;
+
+ cb.call(s || this, w.confirm(this._decode(this.editor.getLang(t, t))));
+ },
+
+ alert : function(tx, cb, s, w) {
+ var t = this;
+
+ w = w || window;
+ w.alert(t._decode(t.editor.getLang(tx, tx)));
+
+ if (cb)
+ cb.call(s || t);
+ },
+
+ resizeBy : function(dw, dh, win) {
+ win.resizeBy(dw, dh);
+ },
+
+ // Internal functions
+
+ _decode : function(s) {
+ return tinymce.DOM.decode(s).replace(/\\n/g, '\n');
+ }
+ });
+}(tinymce));
+(function(tinymce) {
+ tinymce.Formatter = function(ed) {
+ var formats = {},
+ each = tinymce.each,
+ dom = ed.dom,
+ selection = ed.selection,
+ TreeWalker = tinymce.dom.TreeWalker,
+ rangeUtils = new tinymce.dom.RangeUtils(dom),
+ isValid = ed.schema.isValidChild,
+ isArray = tinymce.isArray,
+ isBlock = dom.isBlock,
+ forcedRootBlock = ed.settings.forced_root_block,
+ nodeIndex = dom.nodeIndex,
+ INVISIBLE_CHAR = '\uFEFF',
+ MCE_ATTR_RE = /^(src|href|style)$/,
+ FALSE = false,
+ TRUE = true,
+ formatChangeData,
+ undef,
+ getContentEditable = dom.getContentEditable;
+
+ function isTextBlock(name) {
+ return !!ed.schema.getTextBlocks()[name.toLowerCase()];
+ }
+
+ function getParents(node, selector) {
+ return dom.getParents(node, selector, dom.getRoot());
+ };
+
+ function isCaretNode(node) {
+ return node.nodeType === 1 && node.id === '_mce_caret';
+ };
+
+ function defaultFormats() {
+ register({
+ alignleft : [
+ {selector : 'figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles : {textAlign : 'left'}, defaultBlock: 'div'},
+ {selector : 'img,table', collapsed : false, styles : {'float' : 'left'}}
+ ],
+
+ aligncenter : [
+ {selector : 'figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles : {textAlign : 'center'}, defaultBlock: 'div'},
+ {selector : 'img', collapsed : false, styles : {display : 'block', marginLeft : 'auto', marginRight : 'auto'}},
+ {selector : 'table', collapsed : false, styles : {marginLeft : 'auto', marginRight : 'auto'}}
+ ],
+
+ alignright : [
+ {selector : 'figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles : {textAlign : 'right'}, defaultBlock: 'div'},
+ {selector : 'img,table', collapsed : false, styles : {'float' : 'right'}}
+ ],
+
+ alignfull : [
+ {selector : 'figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles : {textAlign : 'justify'}, defaultBlock: 'div'}
+ ],
+
+ bold : [
+ {inline : 'strong', remove : 'all'},
+ {inline : 'span', styles : {fontWeight : 'bold'}},
+ {inline : 'b', remove : 'all'}
+ ],
+
+ italic : [
+ {inline : 'em', remove : 'all'},
+ {inline : 'span', styles : {fontStyle : 'italic'}},
+ {inline : 'i', remove : 'all'}
+ ],
+
+ underline : [
+ {inline : 'span', styles : {textDecoration : 'underline'}, exact : true},
+ {inline : 'u', remove : 'all'}
+ ],
+
+ strikethrough : [
+ {inline : 'span', styles : {textDecoration : 'line-through'}, exact : true},
+ {inline : 'strike', remove : 'all'}
+ ],
+
+ forecolor : {inline : 'span', styles : {color : '%value'}, wrap_links : false},
+ hilitecolor : {inline : 'span', styles : {backgroundColor : '%value'}, wrap_links : false},
+ fontname : {inline : 'span', styles : {fontFamily : '%value'}},
+ fontsize : {inline : 'span', styles : {fontSize : '%value'}},
+ fontsize_class : {inline : 'span', attributes : {'class' : '%value'}},
+ blockquote : {block : 'blockquote', wrapper : 1, remove : 'all'},
+ subscript : {inline : 'sub'},
+ superscript : {inline : 'sup'},
+
+ link : {inline : 'a', selector : 'a', remove : 'all', split : true, deep : true,
+ onmatch : function(node) {
+ return true;
+ },
+
+ onformat : function(elm, fmt, vars) {
+ each(vars, function(value, key) {
+ dom.setAttrib(elm, key, value);
+ });
+ }
+ },
+
+ removeformat : [
+ {selector : 'b,strong,em,i,font,u,strike', remove : 'all', split : true, expand : false, block_expand : true, deep : true},
+ {selector : 'span', attributes : ['style', 'class'], remove : 'empty', split : true, expand : false, deep : true},
+ {selector : '*', attributes : ['style', 'class'], split : false, expand : false, deep : true}
+ ]
+ });
+
+ // Register default block formats
+ each('p h1 h2 h3 h4 h5 h6 div address pre div code dt dd samp'.split(/\s/), function(name) {
+ register(name, {block : name, remove : 'all'});
+ });
+
+ // Register user defined formats
+ register(ed.settings.formats);
+ };
+
+ function addKeyboardShortcuts() {
+ // Add some inline shortcuts
+ ed.addShortcut('ctrl+b', 'bold_desc', 'Bold');
+ ed.addShortcut('ctrl+i', 'italic_desc', 'Italic');
+ ed.addShortcut('ctrl+u', 'underline_desc', 'Underline');
+
+ // BlockFormat shortcuts keys
+ for (var i = 1; i <= 6; i++) {
+ ed.addShortcut('ctrl+' + i, '', ['FormatBlock', false, 'h' + i]);
+ }
+
+ ed.addShortcut('ctrl+7', '', ['FormatBlock', false, 'p']);
+ ed.addShortcut('ctrl+8', '', ['FormatBlock', false, 'div']);
+ ed.addShortcut('ctrl+9', '', ['FormatBlock', false, 'address']);
+ };
+
+ // Public functions
+
+ function get(name) {
+ return name ? formats[name] : formats;
+ };
+
+ function register(name, format) {
+ if (name) {
+ if (typeof(name) !== 'string') {
+ each(name, function(format, name) {
+ register(name, format);
+ });
+ } else {
+ // Force format into array and add it to internal collection
+ format = format.length ? format : [format];
+
+ each(format, function(format) {
+ // Set deep to false by default on selector formats this to avoid removing
+ // alignment on images inside paragraphs when alignment is changed on paragraphs
+ if (format.deep === undef)
+ format.deep = !format.selector;
+
+ // Default to true
+ if (format.split === undef)
+ format.split = !format.selector || format.inline;
+
+ // Default to true
+ if (format.remove === undef && format.selector && !format.inline)
+ format.remove = 'none';
+
+ // Mark format as a mixed format inline + block level
+ if (format.selector && format.inline) {
+ format.mixed = true;
+ format.block_expand = true;
+ }
+
+ // Split classes if needed
+ if (typeof(format.classes) === 'string')
+ format.classes = format.classes.split(/\s+/);
+ });
+
+ formats[name] = format;
+ }
+ }
+ };
+
+ var getTextDecoration = function(node) {
+ var decoration;
+
+ ed.dom.getParent(node, function(n) {
+ decoration = ed.dom.getStyle(n, 'text-decoration');
+ return decoration && decoration !== 'none';
+ });
+
+ return decoration;
+ };
+
+ var processUnderlineAndColor = function(node) {
+ var textDecoration;
+ if (node.nodeType === 1 && node.parentNode && node.parentNode.nodeType === 1) {
+ textDecoration = getTextDecoration(node.parentNode);
+ if (ed.dom.getStyle(node, 'color') && textDecoration) {
+ ed.dom.setStyle(node, 'text-decoration', textDecoration);
+ } else if (ed.dom.getStyle(node, 'textdecoration') === textDecoration) {
+ ed.dom.setStyle(node, 'text-decoration', null);
+ }
+ }
+ };
+
+ function apply(name, vars, node) {
+ var formatList = get(name), format = formatList[0], bookmark, rng, i, isCollapsed = selection.isCollapsed();
+
+ function setElementFormat(elm, fmt) {
+ fmt = fmt || format;
+
+ if (elm) {
+ if (fmt.onformat) {
+ fmt.onformat(elm, fmt, vars, node);
+ }
+
+ each(fmt.styles, function(value, name) {
+ dom.setStyle(elm, name, replaceVars(value, vars));
+ });
+
+ each(fmt.attributes, function(value, name) {
+ dom.setAttrib(elm, name, replaceVars(value, vars));
+ });
+
+ each(fmt.classes, function(value) {
+ value = replaceVars(value, vars);
+
+ if (!dom.hasClass(elm, value))
+ dom.addClass(elm, value);
+ });
+ }
+ };
+ function adjustSelectionToVisibleSelection() {
+ function findSelectionEnd(start, end) {
+ var walker = new TreeWalker(end);
+ for (node = walker.current(); node; node = walker.prev()) {
+ if (node.childNodes.length > 1 || node == start || node.tagName == 'BR') {
+ return node;
+ }
+ }
+ };
+
+ // Adjust selection so that a end container with a end offset of zero is not included in the selection
+ // as this isn't visible to the user.
+ var rng = ed.selection.getRng();
+ var start = rng.startContainer;
+ var end = rng.endContainer;
+
+ if (start != end && rng.endOffset === 0) {
+ var newEnd = findSelectionEnd(start, end);
+ var endOffset = newEnd.nodeType == 3 ? newEnd.length : newEnd.childNodes.length;
+
+ rng.setEnd(newEnd, endOffset);
+ }
+
+ return rng;
+ }
+
+ function applyStyleToList(node, bookmark, wrapElm, newWrappers, process){
+ var nodes = [], listIndex = -1, list, startIndex = -1, endIndex = -1, currentWrapElm;
+
+ // find the index of the first child list.
+ each(node.childNodes, function(n, index) {
+ if (n.nodeName === "UL" || n.nodeName === "OL") {
+ listIndex = index;
+ list = n;
+ return false;
+ }
+ });
+
+ // get the index of the bookmarks
+ each(node.childNodes, function(n, index) {
+ if (n.nodeName === "SPAN" && dom.getAttrib(n, "data-mce-type") == "bookmark") {
+ if (n.id == bookmark.id + "_start") {
+ startIndex = index;
+ } else if (n.id == bookmark.id + "_end") {
+ endIndex = index;
+ }
+ }
+ });
+
+ // if the selection spans across an embedded list, or there isn't an embedded list - handle processing normally
+ if (listIndex <= 0 || (startIndex < listIndex && endIndex > listIndex)) {
+ each(tinymce.grep(node.childNodes), process);
+ return 0;
+ } else {
+ currentWrapElm = dom.clone(wrapElm, FALSE);
+
+ // create a list of the nodes on the same side of the list as the selection
+ each(tinymce.grep(node.childNodes), function(n, index) {
+ if ((startIndex < listIndex && index < listIndex) || (startIndex > listIndex && index > listIndex)) {
+ nodes.push(n);
+ n.parentNode.removeChild(n);
+ }
+ });
+
+ // insert the wrapping element either before or after the list.
+ if (startIndex < listIndex) {
+ node.insertBefore(currentWrapElm, list);
+ } else if (startIndex > listIndex) {
+ node.insertBefore(currentWrapElm, list.nextSibling);
+ }
+
+ // add the new nodes to the list.
+ newWrappers.push(currentWrapElm);
+
+ each(nodes, function(node) {
+ currentWrapElm.appendChild(node);
+ });
+
+ return currentWrapElm;
+ }
+ };
+
+ function applyRngStyle(rng, bookmark, node_specific) {
+ var newWrappers = [], wrapName, wrapElm, contentEditable = true;
+
+ // Setup wrapper element
+ wrapName = format.inline || format.block;
+ wrapElm = dom.create(wrapName);
+ setElementFormat(wrapElm);
+
+ rangeUtils.walk(rng, function(nodes) {
+ var currentWrapElm;
+
+ function process(node) {
+ var nodeName, parentName, found, hasContentEditableState, lastContentEditable;
+
+ lastContentEditable = contentEditable;
+ nodeName = node.nodeName.toLowerCase();
+ parentName = node.parentNode.nodeName.toLowerCase();
+
+ // Node has a contentEditable value
+ if (node.nodeType === 1 && getContentEditable(node)) {
+ lastContentEditable = contentEditable;
+ contentEditable = getContentEditable(node) === "true";
+ hasContentEditableState = true; // We don't want to wrap the container only it's children
+ }
+
+ // Stop wrapping on br elements
+ if (isEq(nodeName, 'br')) {
+ currentWrapElm = 0;
+
+ // Remove any br elements when we wrap things
+ if (format.block)
+ dom.remove(node);
+
+ return;
+ }
+
+ // If node is wrapper type
+ if (format.wrapper && matchNode(node, name, vars)) {
+ currentWrapElm = 0;
+ return;
+ }
+
+ // Can we rename the block
+ if (contentEditable && !hasContentEditableState && format.block && !format.wrapper && isTextBlock(nodeName)) {
+ node = dom.rename(node, wrapName);
+ setElementFormat(node);
+ newWrappers.push(node);
+ currentWrapElm = 0;
+ return;
+ }
+
+ // Handle selector patterns
+ if (format.selector) {
+ // Look for matching formats
+ each(formatList, function(format) {
+ // Check collapsed state if it exists
+ if ('collapsed' in format && format.collapsed !== isCollapsed) {
+ return;
+ }
+
+ if (dom.is(node, format.selector) && !isCaretNode(node)) {
+ setElementFormat(node, format);
+ found = true;
+ }
+ });
+
+ // Continue processing if a selector match wasn't found and a inline element is defined
+ if (!format.inline || found) {
+ currentWrapElm = 0;
+ return;
+ }
+ }
+
+ // Is it valid to wrap this item
+ if (contentEditable && !hasContentEditableState && isValid(wrapName, nodeName) && isValid(parentName, wrapName) &&
+ !(!node_specific && node.nodeType === 3 && node.nodeValue.length === 1 && node.nodeValue.charCodeAt(0) === 65279) && !isCaretNode(node)) {
+ // Start wrapping
+ if (!currentWrapElm) {
+ // Wrap the node
+ currentWrapElm = dom.clone(wrapElm, FALSE);
+ node.parentNode.insertBefore(currentWrapElm, node);
+ newWrappers.push(currentWrapElm);
+ }
+
+ currentWrapElm.appendChild(node);
+ } else if (nodeName == 'li' && bookmark) {
+ // Start wrapping - if we are in a list node and have a bookmark, then we will always begin by wrapping in a new element.
+ currentWrapElm = applyStyleToList(node, bookmark, wrapElm, newWrappers, process);
+ } else {
+ // Start a new wrapper for possible children
+ currentWrapElm = 0;
+
+ each(tinymce.grep(node.childNodes), process);
+
+ if (hasContentEditableState) {
+ contentEditable = lastContentEditable; // Restore last contentEditable state from stack
+ }
+
+ // End the last wrapper
+ currentWrapElm = 0;
+ }
+ };
+
+ // Process siblings from range
+ each(nodes, process);
+ });
+
+ // Wrap links inside as well, for example color inside a link when the wrapper is around the link
+ if (format.wrap_links === false) {
+ each(newWrappers, function(node) {
+ function process(node) {
+ var i, currentWrapElm, children;
+
+ if (node.nodeName === 'A') {
+ currentWrapElm = dom.clone(wrapElm, FALSE);
+ newWrappers.push(currentWrapElm);
+
+ children = tinymce.grep(node.childNodes);
+ for (i = 0; i < children.length; i++)
+ currentWrapElm.appendChild(children[i]);
+
+ node.appendChild(currentWrapElm);
+ }
+
+ each(tinymce.grep(node.childNodes), process);
+ };
+
+ process(node);
+ });
+ }
+
+ // Cleanup
+
+ each(newWrappers, function(node) {
+ var childCount;
+
+ function getChildCount(node) {
+ var count = 0;
+
+ each(node.childNodes, function(node) {
+ if (!isWhiteSpaceNode(node) && !isBookmarkNode(node))
+ count++;
+ });
+
+ return count;
+ };
+
+ function mergeStyles(node) {
+ var child, clone;
+
+ each(node.childNodes, function(node) {
+ if (node.nodeType == 1 && !isBookmarkNode(node) && !isCaretNode(node)) {
+ child = node;
+ return FALSE; // break loop
+ }
+ });
+
+ // If child was found and of the same type as the current node
+ if (child && matchName(child, format)) {
+ clone = dom.clone(child, FALSE);
+ setElementFormat(clone);
+
+ dom.replace(clone, node, TRUE);
+ dom.remove(child, 1);
+ }
+
+ return clone || node;
+ };
+
+ childCount = getChildCount(node);
+
+ // Remove empty nodes but only if there is multiple wrappers and they are not block
+ // elements so never remove single <h1></h1> since that would remove the currrent empty block element where the caret is at
+ if ((newWrappers.length > 1 || !isBlock(node)) && childCount === 0) {
+ dom.remove(node, 1);
+ return;
+ }
+
+ if (format.inline || format.wrapper) {
+ // Merges the current node with it's children of similar type to reduce the number of elements
+ if (!format.exact && childCount === 1)
+ node = mergeStyles(node);
+
+ // Remove/merge children
+ each(formatList, function(format) {
+ // Merge all children of similar type will move styles from child to parent
+ // this: <span style="color:red"><b><span style="color:red; font-size:10px">text</span></b></span>
+ // will become: <span style="color:red"><b><span style="font-size:10px">text</span></b></span>
+ each(dom.select(format.inline, node), function(child) {
+ var parent;
+
+ // When wrap_links is set to false we don't want
+ // to remove the format on children within links
+ if (format.wrap_links === false) {
+ parent = child.parentNode;
+
+ do {
+ if (parent.nodeName === 'A')
+ return;
+ } while (parent = parent.parentNode);
+ }
+
+ removeFormat(format, vars, child, format.exact ? child : null);
+ });
+ });
+
+ // Remove child if direct parent is of same type
+ if (matchNode(node.parentNode, name, vars)) {
+ dom.remove(node, 1);
+ node = 0;
+ return TRUE;
+ }
+
+ // Look for parent with similar style format
+ if (format.merge_with_parents) {
+ dom.getParent(node.parentNode, function(parent) {
+ if (matchNode(parent, name, vars)) {
+ dom.remove(node, 1);
+ node = 0;
+ return TRUE;
+ }
+ });
+ }
+
+ // Merge next and previous siblings if they are similar <b>text</b><b>text</b> becomes <b>texttext</b>
+ if (node && format.merge_siblings !== false) {
+ node = mergeSiblings(getNonWhiteSpaceSibling(node), node);
+ node = mergeSiblings(node, getNonWhiteSpaceSibling(node, TRUE));
+ }
+ }
+ });
+ };
+
+ if (format) {
+ if (node) {
+ if (node.nodeType) {
+ rng = dom.createRng();
+ rng.setStartBefore(node);
+ rng.setEndAfter(node);
+ applyRngStyle(expandRng(rng, formatList), null, true);
+ } else {
+ applyRngStyle(node, null, true);
+ }
+ } else {
+ if (!isCollapsed || !format.inline || dom.select('td.mceSelected,th.mceSelected').length) {
+ // Obtain selection node before selection is unselected by applyRngStyle()
+ var curSelNode = ed.selection.getNode();
+
+ // If the formats have a default block and we can't find a parent block then start wrapping it with a DIV this is for forced_root_blocks: false
+ // It's kind of a hack but people should be using the default block type P since all desktop editors work that way
+ if (!forcedRootBlock && formatList[0].defaultBlock && !dom.getParent(curSelNode, dom.isBlock)) {
+ apply(formatList[0].defaultBlock);
+ }
+
+ // Apply formatting to selection
+ ed.selection.setRng(adjustSelectionToVisibleSelection());
+ bookmark = selection.getBookmark();
+ applyRngStyle(expandRng(selection.getRng(TRUE), formatList), bookmark);
+
+ // Colored nodes should be underlined so that the color of the underline matches the text color.
+ if (format.styles && (format.styles.color || format.styles.textDecoration)) {
+ tinymce.walk(curSelNode, processUnderlineAndColor, 'childNodes');
+ processUnderlineAndColor(curSelNode);
+ }
+
+ selection.moveToBookmark(bookmark);
+ moveStart(selection.getRng(TRUE));
+ ed.nodeChanged();
+ } else
+ performCaretAction('apply', name, vars);
+ }
+ }
+ };
+
+ function remove(name, vars, node) {
+ var formatList = get(name), format = formatList[0], bookmark, i, rng, contentEditable = true;
+
+ // Merges the styles for each node
+ function process(node) {
+ var children, i, l, localContentEditable, lastContentEditable, hasContentEditableState;
+
+ // Node has a contentEditable value
+ if (node.nodeType === 1 && getContentEditable(node)) {
+ lastContentEditable = contentEditable;
+ contentEditable = getContentEditable(node) === "true";
+ hasContentEditableState = true; // We don't want to wrap the container only it's children
+ }
+
+ // Grab the children first since the nodelist might be changed
+ children = tinymce.grep(node.childNodes);
+
+ // Process current node
+ if (contentEditable && !hasContentEditableState) {
+ for (i = 0, l = formatList.length; i < l; i++) {
+ if (removeFormat(formatList[i], vars, node, node))
+ break;
+ }
+ }
+
+ // Process the children
+ if (format.deep) {
+ if (children.length) {
+ for (i = 0, l = children.length; i < l; i++)
+ process(children[i]);
+
+ if (hasContentEditableState) {
+ contentEditable = lastContentEditable; // Restore last contentEditable state from stack
+ }
+ }
+ }
+ };
+
+ function findFormatRoot(container) {
+ var formatRoot;
+
+ // Find format root
+ each(getParents(container.parentNode).reverse(), function(parent) {
+ var format;
+
+ // Find format root element
+ if (!formatRoot && parent.id != '_start' && parent.id != '_end') {
+ // Is the node matching the format we are looking for
+ format = matchNode(parent, name, vars);
+ if (format && format.split !== false)
+ formatRoot = parent;
+ }
+ });
+
+ return formatRoot;
+ };
+
+ function wrapAndSplit(format_root, container, target, split) {
+ var parent, clone, lastClone, firstClone, i, formatRootParent;
+
+ // Format root found then clone formats and split it
+ if (format_root) {
+ formatRootParent = format_root.parentNode;
+
+ for (parent = container.parentNode; parent && parent != formatRootParent; parent = parent.parentNode) {
+ clone = dom.clone(parent, FALSE);
+
+ for (i = 0; i < formatList.length; i++) {
+ if (removeFormat(formatList[i], vars, clone, clone)) {
+ clone = 0;
+ break;
+ }
+ }
+
+ // Build wrapper node
+ if (clone) {
+ if (lastClone)
+ clone.appendChild(lastClone);
+
+ if (!firstClone)
+ firstClone = clone;
+
+ lastClone = clone;
+ }
+ }
+
+ // Never split block elements if the format is mixed
+ if (split && (!format.mixed || !isBlock(format_root)))
+ container = dom.split(format_root, container);
+
+ // Wrap container in cloned formats
+ if (lastClone) {
+ target.parentNode.insertBefore(lastClone, target);
+ firstClone.appendChild(target);
+ }
+ }
+
+ return container;
+ };
+
+ function splitToFormatRoot(container) {
+ return wrapAndSplit(findFormatRoot(container), container, container, true);
+ };
+
+ function unwrap(start) {
+ var node = dom.get(start ? '_start' : '_end'),
+ out = node[start ? 'firstChild' : 'lastChild'];
+
+ // If the end is placed within the start the result will be removed
+ // So this checks if the out node is a bookmark node if it is it
+ // checks for another more suitable node
+ if (isBookmarkNode(out))
+ out = out[start ? 'firstChild' : 'lastChild'];
+
+ dom.remove(node, true);
+
+ return out;
+ };
+
+ function removeRngStyle(rng) {
+ var startContainer, endContainer, node;
+
+ rng = expandRng(rng, formatList, TRUE);
+
+ if (format.split) {
+ startContainer = getContainer(rng, TRUE);
+ endContainer = getContainer(rng);
+
+ if (startContainer != endContainer) {
+ // WebKit will render the table incorrectly if we wrap a TD in a SPAN so lets see if the can use the first child instead
+ // This will happen if you tripple click a table cell and use remove formatting
+ if (/^(TR|TD)$/.test(startContainer.nodeName) && startContainer.firstChild) {
+ startContainer = (startContainer.nodeName == "TD" ? startContainer.firstChild : startContainer.firstChild.firstChild) || startContainer;
+ }
+
+ // Wrap start/end nodes in span element since these might be cloned/moved
+ startContainer = wrap(startContainer, 'span', {id : '_start', 'data-mce-type' : 'bookmark'});
+ endContainer = wrap(endContainer, 'span', {id : '_end', 'data-mce-type' : 'bookmark'});
+
+ // Split start/end
+ splitToFormatRoot(startContainer);
+ splitToFormatRoot(endContainer);
+
+ // Unwrap start/end to get real elements again
+ startContainer = unwrap(TRUE);
+ endContainer = unwrap();
+ } else
+ startContainer = endContainer = splitToFormatRoot(startContainer);
+
+ // Update range positions since they might have changed after the split operations
+ rng.startContainer = startContainer.parentNode;
+ rng.startOffset = nodeIndex(startContainer);
+ rng.endContainer = endContainer.parentNode;
+ rng.endOffset = nodeIndex(endContainer) + 1;
+ }
+
+ // Remove items between start/end
+ rangeUtils.walk(rng, function(nodes) {
+ each(nodes, function(node) {
+ process(node);
+
+ // Remove parent span if it only contains text-decoration: underline, yet a parent node is also underlined.
+ if (node.nodeType === 1 && ed.dom.getStyle(node, 'text-decoration') === 'underline' && node.parentNode && getTextDecoration(node.parentNode) === 'underline') {
+ removeFormat({'deep': false, 'exact': true, 'inline': 'span', 'styles': {'textDecoration' : 'underline'}}, null, node);
+ }
+ });
+ });
+ };
+
+ // Handle node
+ if (node) {
+ if (node.nodeType) {
+ rng = dom.createRng();
+ rng.setStartBefore(node);
+ rng.setEndAfter(node);
+ removeRngStyle(rng);
+ } else {
+ removeRngStyle(node);
+ }
+
+ return;
+ }
+
+ if (!selection.isCollapsed() || !format.inline || dom.select('td.mceSelected,th.mceSelected').length) {
+ bookmark = selection.getBookmark();
+ removeRngStyle(selection.getRng(TRUE));
+ selection.moveToBookmark(bookmark);
+
+ // Check if start element still has formatting then we are at: "<b>text|</b>text" and need to move the start into the next text node
+ if (format.inline && match(name, vars, selection.getStart())) {
+ moveStart(selection.getRng(true));
+ }
+
+ ed.nodeChanged();
+ } else
+ performCaretAction('remove', name, vars);
+ };
+
+ function toggle(name, vars, node) {
+ var fmt = get(name);
+
+ if (match(name, vars, node) && (!('toggle' in fmt[0]) || fmt[0].toggle))
+ remove(name, vars, node);
+ else
+ apply(name, vars, node);
+ };
+
+ function matchNode(node, name, vars, similar) {
+ var formatList = get(name), format, i, classes;
+
+ function matchItems(node, format, item_name) {
+ var key, value, items = format[item_name], i;
+
+ // Custom match
+ if (format.onmatch) {
+ return format.onmatch(node, format, item_name);
+ }
+
+ // Check all items
+ if (items) {
+ // Non indexed object
+ if (items.length === undef) {
+ for (key in items) {
+ if (items.hasOwnProperty(key)) {
+ if (item_name === 'attributes')
+ value = dom.getAttrib(node, key);
+ else
+ value = getStyle(node, key);
+
+ if (similar && !value && !format.exact)
+ return;
+
+ if ((!similar || format.exact) && !isEq(value, replaceVars(items[key], vars)))
+ return;
+ }
+ }
+ } else {
+ // Only one match needed for indexed arrays
+ for (i = 0; i < items.length; i++) {
+ if (item_name === 'attributes' ? dom.getAttrib(node, items[i]) : getStyle(node, items[i]))
+ return format;
+ }
+ }
+ }
+
+ return format;
+ };
+
+ if (formatList && node) {
+ // Check each format in list
+ for (i = 0; i < formatList.length; i++) {
+ format = formatList[i];
+
+ // Name name, attributes, styles and classes
+ if (matchName(node, format) && matchItems(node, format, 'attributes') && matchItems(node, format, 'styles')) {
+ // Match classes
+ if (classes = format.classes) {
+ for (i = 0; i < classes.length; i++) {
+ if (!dom.hasClass(node, classes[i]))
+ return;
+ }
+ }
+
+ return format;
+ }
+ }
+ }
+ };
+
+ function match(name, vars, node) {
+ var startNode;
+
+ function matchParents(node) {
+ // Find first node with similar format settings
+ node = dom.getParent(node, function(node) {
+ return !!matchNode(node, name, vars, true);
+ });
+
+ // Do an exact check on the similar format element
+ return matchNode(node, name, vars);
+ };
+
+ // Check specified node
+ if (node)
+ return matchParents(node);
+
+ // Check selected node
+ node = selection.getNode();
+ if (matchParents(node))
+ return TRUE;
+
+ // Check start node if it's different
+ startNode = selection.getStart();
+ if (startNode != node) {
+ if (matchParents(startNode))
+ return TRUE;
+ }
+
+ return FALSE;
+ };
+
+ function matchAll(names, vars) {
+ var startElement, matchedFormatNames = [], checkedMap = {}, i, ni, name;
+
+ // Check start of selection for formats
+ startElement = selection.getStart();
+ dom.getParent(startElement, function(node) {
+ var i, name;
+
+ for (i = 0; i < names.length; i++) {
+ name = names[i];
+
+ if (!checkedMap[name] && matchNode(node, name, vars)) {
+ checkedMap[name] = true;
+ matchedFormatNames.push(name);
+ }
+ }
+ }, dom.getRoot());
+
+ return matchedFormatNames;
+ };
+
+ function canApply(name) {
+ var formatList = get(name), startNode, parents, i, x, selector;
+
+ if (formatList) {
+ startNode = selection.getStart();
+ parents = getParents(startNode);
+
+ for (x = formatList.length - 1; x >= 0; x--) {
+ selector = formatList[x].selector;
+
+ // Format is not selector based, then always return TRUE
+ if (!selector)
+ return TRUE;
+
+ for (i = parents.length - 1; i >= 0; i--) {
+ if (dom.is(parents[i], selector))
+ return TRUE;
+ }
+ }
+ }
+
+ return FALSE;
+ };
+
+ function formatChanged(formats, callback, similar) {
+ var currentFormats;
+
+ // Setup format node change logic
+ if (!formatChangeData) {
+ formatChangeData = {};
+ currentFormats = {};
+
+ ed.onNodeChange.addToTop(function(ed, cm, node) {
+ var parents = getParents(node), matchedFormats = {};
+
+ // Check for new formats
+ each(formatChangeData, function(callbacks, format) {
+ each(parents, function(node) {
+ if (matchNode(node, format, {}, callbacks.similar)) {
+ if (!currentFormats[format]) {
+ // Execute callbacks
+ each(callbacks, function(callback) {
+ callback(true, {node: node, format: format, parents: parents});
+ });
+
+ currentFormats[format] = callbacks;
+ }
+
+ matchedFormats[format] = callbacks;
+ return false;
+ }
+ });
+ });
+
+ // Check if current formats still match
+ each(currentFormats, function(callbacks, format) {
+ if (!matchedFormats[format]) {
+ delete currentFormats[format];
+
+ each(callbacks, function(callback) {
+ callback(false, {node: node, format: format, parents: parents});
+ });
+ }
+ });
+ });
+ }
+
+ // Add format listeners
+ each(formats.split(','), function(format) {
+ if (!formatChangeData[format]) {
+ formatChangeData[format] = [];
+ formatChangeData[format].similar = similar;
+ }
+
+ formatChangeData[format].push(callback);
+ });
+
+ return this;
+ };
+
+ // Expose to public
+ tinymce.extend(this, {
+ get : get,
+ register : register,
+ apply : apply,
+ remove : remove,
+ toggle : toggle,
+ match : match,
+ matchAll : matchAll,
+ matchNode : matchNode,
+ canApply : canApply,
+ formatChanged: formatChanged
+ });
+
+ // Initialize
+ defaultFormats();
+ addKeyboardShortcuts();
+
+ // Private functions
+
+ function matchName(node, format) {
+ // Check for inline match
+ if (isEq(node, format.inline))
+ return TRUE;
+
+ // Check for block match
+ if (isEq(node, format.block))
+ return TRUE;
+
+ // Check for selector match
+ if (format.selector)
+ return dom.is(node, format.selector);
+ };
+
+ function isEq(str1, str2) {
+ str1 = str1 || '';
+ str2 = str2 || '';
+
+ str1 = '' + (str1.nodeName || str1);
+ str2 = '' + (str2.nodeName || str2);
+
+ return str1.toLowerCase() == str2.toLowerCase();
+ };
+
+ function getStyle(node, name) {
+ var styleVal = dom.getStyle(node, name);
+
+ // Force the format to hex
+ if (name == 'color' || name == 'backgroundColor')
+ styleVal = dom.toHex(styleVal);
+
+ // Opera will return bold as 700
+ if (name == 'fontWeight' && styleVal == 700)
+ styleVal = 'bold';
+
+ return '' + styleVal;
+ };
+
+ function replaceVars(value, vars) {
+ if (typeof(value) != "string")
+ value = value(vars);
+ else if (vars) {
+ value = value.replace(/%(\w+)/g, function(str, name) {
+ return vars[name] || str;
+ });
+ }
+
+ return value;
+ };
+
+ function isWhiteSpaceNode(node) {
+ return node && node.nodeType === 3 && /^([\t \r\n]+|)$/.test(node.nodeValue);
+ };
+
+ function wrap(node, name, attrs) {
+ var wrapper = dom.create(name, attrs);
+
+ node.parentNode.insertBefore(wrapper, node);
+ wrapper.appendChild(node);
+
+ return wrapper;
+ };
+
+ function expandRng(rng, format, remove) {
+ var sibling, lastIdx, leaf, endPoint,
+ startContainer = rng.startContainer,
+ startOffset = rng.startOffset,
+ endContainer = rng.endContainer,
+ endOffset = rng.endOffset;
+
+ // This function walks up the tree if there is no siblings before/after the node
+ function findParentContainer(start) {
+ var container, parent, child, sibling, siblingName, root;
+
+ container = parent = start ? startContainer : endContainer;
+ siblingName = start ? 'previousSibling' : 'nextSibling';
+ root = dom.getRoot();
+
+ function isBogusBr(node) {
+ return node.nodeName == "BR" && node.getAttribute('data-mce-bogus') && !node.nextSibling;
+ };
+
+ // If it's a text node and the offset is inside the text
+ if (container.nodeType == 3 && !isWhiteSpaceNode(container)) {
+ if (start ? startOffset > 0 : endOffset < container.nodeValue.length) {
+ return container;
+ }
+ }
+
+ for (;;) {
+ // Stop expanding on block elements
+ if (!format[0].block_expand && isBlock(parent))
+ return parent;
+
+ // Walk left/right
+ for (sibling = parent[siblingName]; sibling; sibling = sibling[siblingName]) {
+ if (!isBookmarkNode(sibling) && !isWhiteSpaceNode(sibling) && !isBogusBr(sibling)) {
+ return parent;
+ }
+ }
+
+ // Check if we can move up are we at root level or body level
+ if (parent.parentNode == root) {
+ container = parent;
+ break;
+ }
+
+ parent = parent.parentNode;
+ }
+
+ return container;
+ };
+
+ // This function walks down the tree to find the leaf at the selection.
+ // The offset is also returned as if node initially a leaf, the offset may be in the middle of the text node.
+ function findLeaf(node, offset) {
+ if (offset === undef)
+ offset = node.nodeType === 3 ? node.length : node.childNodes.length;
+ while (node && node.hasChildNodes()) {
+ node = node.childNodes[offset];
+ if (node)
+ offset = node.nodeType === 3 ? node.length : node.childNodes.length;
+ }
+ return { node: node, offset: offset };
+ }
+
+ // If index based start position then resolve it
+ if (startContainer.nodeType == 1 && startContainer.hasChildNodes()) {
+ lastIdx = startContainer.childNodes.length - 1;
+ startContainer = startContainer.childNodes[startOffset > lastIdx ? lastIdx : startOffset];
+
+ if (startContainer.nodeType == 3)
+ startOffset = 0;
+ }
+
+ // If index based end position then resolve it
+ if (endContainer.nodeType == 1 && endContainer.hasChildNodes()) {
+ lastIdx = endContainer.childNodes.length - 1;
+ endContainer = endContainer.childNodes[endOffset > lastIdx ? lastIdx : endOffset - 1];
+
+ if (endContainer.nodeType == 3)
+ endOffset = endContainer.nodeValue.length;
+ }
+
+ // Expands the node to the closes contentEditable false element if it exists
+ function findParentContentEditable(node) {
+ var parent = node;
+
+ while (parent) {
+ if (parent.nodeType === 1 && getContentEditable(parent)) {
+ return getContentEditable(parent) === "false" ? parent : node;
+ }
+
+ parent = parent.parentNode;
+ }
+
+ return node;
+ };
+
+ function findWordEndPoint(container, offset, start) {
+ var walker, node, pos, lastTextNode;
+
+ function findSpace(node, offset) {
+ var pos, pos2, str = node.nodeValue;
+
+ if (typeof(offset) == "undefined") {
+ offset = start ? str.length : 0;
+ }
+
+ if (start) {
+ pos = str.lastIndexOf(' ', offset);
+ pos2 = str.lastIndexOf('\u00a0', offset);
+ pos = pos > pos2 ? pos : pos2;
+
+ // Include the space on remove to avoid tag soup
+ if (pos !== -1 && !remove) {
+ pos++;
+ }
+ } else {
+ pos = str.indexOf(' ', offset);
+ pos2 = str.indexOf('\u00a0', offset);
+ pos = pos !== -1 && (pos2 === -1 || pos < pos2) ? pos : pos2;
+ }
+
+ return pos;
+ };
+
+ if (container.nodeType === 3) {
+ pos = findSpace(container, offset);
+
+ if (pos !== -1) {
+ return {container : container, offset : pos};
+ }
+
+ lastTextNode = container;
+ }
+
+ // Walk the nodes inside the block
+ walker = new TreeWalker(container, dom.getParent(container, isBlock) || ed.getBody());
+ while (node = walker[start ? 'prev' : 'next']()) {
+ if (node.nodeType === 3) {
+ lastTextNode = node;
+ pos = findSpace(node);
+
+ if (pos !== -1) {
+ return {container : node, offset : pos};
+ }
+ } else if (isBlock(node)) {
+ break;
+ }
+ }
+
+ if (lastTextNode) {
+ if (start) {
+ offset = 0;
+ } else {
+ offset = lastTextNode.length;
+ }
+
+ return {container: lastTextNode, offset: offset};
+ }
+ };
+
+ function findSelectorEndPoint(container, sibling_name) {
+ var parents, i, y, curFormat;
+
+ if (container.nodeType == 3 && container.nodeValue.length === 0 && container[sibling_name])
+ container = container[sibling_name];
+
+ parents = getParents(container);
+ for (i = 0; i < parents.length; i++) {
+ for (y = 0; y < format.length; y++) {
+ curFormat = format[y];
+
+ // If collapsed state is set then skip formats that doesn't match that
+ if ("collapsed" in curFormat && curFormat.collapsed !== rng.collapsed)
+ continue;
+
+ if (dom.is(parents[i], curFormat.selector))
+ return parents[i];
+ }
+ }
+
+ return container;
+ };
+
+ function findBlockEndPoint(container, sibling_name, sibling_name2) {
+ var node;
+
+ // Expand to block of similar type
+ if (!format[0].wrapper)
+ node = dom.getParent(container, format[0].block);
+
+ // Expand to first wrappable block element or any block element
+ if (!node)
+ node = dom.getParent(container.nodeType == 3 ? container.parentNode : container, isTextBlock);
+
+ // Exclude inner lists from wrapping
+ if (node && format[0].wrapper)
+ node = getParents(node, 'ul,ol').reverse()[0] || node;
+
+ // Didn't find a block element look for first/last wrappable element
+ if (!node) {
+ node = container;
+
+ while (node[sibling_name] && !isBlock(node[sibling_name])) {
+ node = node[sibling_name];
+
+ // Break on BR but include it will be removed later on
+ // we can't remove it now since we need to check if it can be wrapped
+ if (isEq(node, 'br'))
+ break;
+ }
+ }
+
+ return node || container;
+ };
+
+ // Expand to closest contentEditable element
+ startContainer = findParentContentEditable(startContainer);
+ endContainer = findParentContentEditable(endContainer);
+
+ // Exclude bookmark nodes if possible
+ if (isBookmarkNode(startContainer.parentNode) || isBookmarkNode(startContainer)) {
+ startContainer = isBookmarkNode(startContainer) ? startContainer : startContainer.parentNode;
+ startContainer = startContainer.nextSibling || startContainer;
+
+ if (startContainer.nodeType == 3)
+ startOffset = 0;
+ }
+
+ if (isBookmarkNode(endContainer.parentNode) || isBookmarkNode(endContainer)) {
+ endContainer = isBookmarkNode(endContainer) ? endContainer : endContainer.parentNode;
+ endContainer = endContainer.previousSibling || endContainer;
+
+ if (endContainer.nodeType == 3)
+ endOffset = endContainer.length;
+ }
+
+ if (format[0].inline) {
+ if (rng.collapsed) {
+ // Expand left to closest word boundery
+ endPoint = findWordEndPoint(startContainer, startOffset, true);
+ if (endPoint) {
+ startContainer = endPoint.container;
+ startOffset = endPoint.offset;
+ }
+
+ // Expand right to closest word boundery
+ endPoint = findWordEndPoint(endContainer, endOffset);
+ if (endPoint) {
+ endContainer = endPoint.container;
+ endOffset = endPoint.offset;
+ }
+ }
+
+ // Avoid applying formatting to a trailing space.
+ leaf = findLeaf(endContainer, endOffset);
+ if (leaf.node) {
+ while (leaf.node && leaf.offset === 0 && leaf.node.previousSibling)
+ leaf = findLeaf(leaf.node.previousSibling);
+
+ if (leaf.node && leaf.offset > 0 && leaf.node.nodeType === 3 &&
+ leaf.node.nodeValue.charAt(leaf.offset - 1) === ' ') {
+
+ if (leaf.offset > 1) {
+ endContainer = leaf.node;
+ endContainer.splitText(leaf.offset - 1);
+ }
+ }
+ }
+ }
+
+ // Move start/end point up the tree if the leaves are sharp and if we are in different containers
+ // Example * becomes !: !<p><b><i>*text</i><i>text*</i></b></p>!
+ // This will reduce the number of wrapper elements that needs to be created
+ // Move start point up the tree
+ if (format[0].inline || format[0].block_expand) {
+ if (!format[0].inline || (startContainer.nodeType != 3 || startOffset === 0)) {
+ startContainer = findParentContainer(true);
+ }
+
+ if (!format[0].inline || (endContainer.nodeType != 3 || endOffset === endContainer.nodeValue.length)) {
+ endContainer = findParentContainer();
+ }
+ }
+
+ // Expand start/end container to matching selector
+ if (format[0].selector && format[0].expand !== FALSE && !format[0].inline) {
+ // Find new startContainer/endContainer if there is better one
+ startContainer = findSelectorEndPoint(startContainer, 'previousSibling');
+ endContainer = findSelectorEndPoint(endContainer, 'nextSibling');
+ }
+
+ // Expand start/end container to matching block element or text node
+ if (format[0].block || format[0].selector) {
+ // Find new startContainer/endContainer if there is better one
+ startContainer = findBlockEndPoint(startContainer, 'previousSibling');
+ endContainer = findBlockEndPoint(endContainer, 'nextSibling');
+
+ // Non block element then try to expand up the leaf
+ if (format[0].block) {
+ if (!isBlock(startContainer))
+ startContainer = findParentContainer(true);
+
+ if (!isBlock(endContainer))
+ endContainer = findParentContainer();
+ }
+ }
+
+ // Setup index for startContainer
+ if (startContainer.nodeType == 1) {
+ startOffset = nodeIndex(startContainer);
+ startContainer = startContainer.parentNode;
+ }
+
+ // Setup index for endContainer
+ if (endContainer.nodeType == 1) {
+ endOffset = nodeIndex(endContainer) + 1;
+ endContainer = endContainer.parentNode;
+ }
+
+ // Return new range like object
+ return {
+ startContainer : startContainer,
+ startOffset : startOffset,
+ endContainer : endContainer,
+ endOffset : endOffset
+ };
+ }
+
+ function removeFormat(format, vars, node, compare_node) {
+ var i, attrs, stylesModified;
+
+ // Check if node matches format
+ if (!matchName(node, format))
+ return FALSE;
+
+ // Should we compare with format attribs and styles
+ if (format.remove != 'all') {
+ // Remove styles
+ each(format.styles, function(value, name) {
+ value = replaceVars(value, vars);
+
+ // Indexed array
+ if (typeof(name) === 'number') {
+ name = value;
+ compare_node = 0;
+ }
+
+ if (!compare_node || isEq(getStyle(compare_node, name), value))
+ dom.setStyle(node, name, '');
+
+ stylesModified = 1;
+ });
+
+ // Remove style attribute if it's empty
+ if (stylesModified && dom.getAttrib(node, 'style') == '') {
+ node.removeAttribute('style');
+ node.removeAttribute('data-mce-style');
+ }
+
+ // Remove attributes
+ each(format.attributes, function(value, name) {
+ var valueOut;
+
+ value = replaceVars(value, vars);
+
+ // Indexed array
+ if (typeof(name) === 'number') {
+ name = value;
+ compare_node = 0;
+ }
+
+ if (!compare_node || isEq(dom.getAttrib(compare_node, name), value)) {
+ // Keep internal classes
+ if (name == 'class') {
+ value = dom.getAttrib(node, name);
+ if (value) {
+ // Build new class value where everything is removed except the internal prefixed classes
+ valueOut = '';
+ each(value.split(/\s+/), function(cls) {
+ if (/mce\w+/.test(cls))
+ valueOut += (valueOut ? ' ' : '') + cls;
+ });
+
+ // We got some internal classes left
+ if (valueOut) {
+ dom.setAttrib(node, name, valueOut);
+ return;
+ }
+ }
+ }
+
+ // IE6 has a bug where the attribute doesn't get removed correctly
+ if (name == "class")
+ node.removeAttribute('className');
+
+ // Remove mce prefixed attributes
+ if (MCE_ATTR_RE.test(name))
+ node.removeAttribute('data-mce-' + name);
+
+ node.removeAttribute(name);
+ }
+ });
+
+ // Remove classes
+ each(format.classes, function(value) {
+ value = replaceVars(value, vars);
+
+ if (!compare_node || dom.hasClass(compare_node, value))
+ dom.removeClass(node, value);
+ });
+
+ // Check for non internal attributes
+ attrs = dom.getAttribs(node);
+ for (i = 0; i < attrs.length; i++) {
+ if (attrs[i].nodeName.indexOf('_') !== 0)
+ return FALSE;
+ }
+ }
+
+ // Remove the inline child if it's empty for example <b> or <span>
+ if (format.remove != 'none') {
+ removeNode(node, format);
+ return TRUE;
+ }
+ };
+
+ function removeNode(node, format) {
+ var parentNode = node.parentNode, rootBlockElm;
+
+ function find(node, next, inc) {
+ node = getNonWhiteSpaceSibling(node, next, inc);
+
+ return !node || (node.nodeName == 'BR' || isBlock(node));
+ };
+
+ if (format.block) {
+ if (!forcedRootBlock) {
+ // Append BR elements if needed before we remove the block
+ if (isBlock(node) && !isBlock(parentNode)) {
+ if (!find(node, FALSE) && !find(node.firstChild, TRUE, 1))
+ node.insertBefore(dom.create('br'), node.firstChild);
+
+ if (!find(node, TRUE) && !find(node.lastChild, FALSE, 1))
+ node.appendChild(dom.create('br'));
+ }
+ } else {
+ // Wrap the block in a forcedRootBlock if we are at the root of document
+ if (parentNode == dom.getRoot()) {
+ if (!format.list_block || !isEq(node, format.list_block)) {
+ each(tinymce.grep(node.childNodes), function(node) {
+ if (isValid(forcedRootBlock, node.nodeName.toLowerCase())) {
+ if (!rootBlockElm)
+ rootBlockElm = wrap(node, forcedRootBlock);
+ else
+ rootBlockElm.appendChild(node);
+ } else
+ rootBlockElm = 0;
+ });
+ }
+ }
+ }
+ }
+
+ // Never remove nodes that isn't the specified inline element if a selector is specified too
+ if (format.selector && format.inline && !isEq(format.inline, node))
+ return;
+
+ dom.remove(node, 1);
+ };
+
+ function getNonWhiteSpaceSibling(node, next, inc) {
+ if (node) {
+ next = next ? 'nextSibling' : 'previousSibling';
+
+ for (node = inc ? node : node[next]; node; node = node[next]) {
+ if (node.nodeType == 1 || !isWhiteSpaceNode(node))
+ return node;
+ }
+ }
+ };
+
+ function isBookmarkNode(node) {
+ return node && node.nodeType == 1 && node.getAttribute('data-mce-type') == 'bookmark';
+ };
+
+ function mergeSiblings(prev, next) {
+ var marker, sibling, tmpSibling;
+
+ function compareElements(node1, node2) {
+ // Not the same name
+ if (node1.nodeName != node2.nodeName)
+ return FALSE;
+
+ function getAttribs(node) {
+ var attribs = {};
+
+ each(dom.getAttribs(node), function(attr) {
+ var name = attr.nodeName.toLowerCase();
+
+ // Don't compare internal attributes or style
+ if (name.indexOf('_') !== 0 && name !== 'style')
+ attribs[name] = dom.getAttrib(node, name);
+ });
+
+ return attribs;
+ };
+
+ function compareObjects(obj1, obj2) {
+ var value, name;
+
+ for (name in obj1) {
+ // Obj1 has item obj2 doesn't have
+ if (obj1.hasOwnProperty(name)) {
+ value = obj2[name];
+
+ // Obj2 doesn't have obj1 item
+ if (value === undef)
+ return FALSE;
+
+ // Obj2 item has a different value
+ if (obj1[name] != value)
+ return FALSE;
+
+ // Delete similar value
+ delete obj2[name];
+ }
+ }
+
+ // Check if obj 2 has something obj 1 doesn't have
+ for (name in obj2) {
+ // Obj2 has item obj1 doesn't have
+ if (obj2.hasOwnProperty(name))
+ return FALSE;
+ }
+
+ return TRUE;
+ };
+
+ // Attribs are not the same
+ if (!compareObjects(getAttribs(node1), getAttribs(node2)))
+ return FALSE;
+
+ // Styles are not the same
+ if (!compareObjects(dom.parseStyle(dom.getAttrib(node1, 'style')), dom.parseStyle(dom.getAttrib(node2, 'style'))))
+ return FALSE;
+
+ return TRUE;
+ };
+
+ function findElementSibling(node, sibling_name) {
+ for (sibling = node; sibling; sibling = sibling[sibling_name]) {
+ if (sibling.nodeType == 3 && sibling.nodeValue.length !== 0)
+ return node;
+
+ if (sibling.nodeType == 1 && !isBookmarkNode(sibling))
+ return sibling;
+ }
+
+ return node;
+ };
+
+ // Check if next/prev exists and that they are elements
+ if (prev && next) {
+ // If previous sibling is empty then jump over it
+ prev = findElementSibling(prev, 'previousSibling');
+ next = findElementSibling(next, 'nextSibling');
+
+ // Compare next and previous nodes
+ if (compareElements(prev, next)) {
+ // Append nodes between
+ for (sibling = prev.nextSibling; sibling && sibling != next;) {
+ tmpSibling = sibling;
+ sibling = sibling.nextSibling;
+ prev.appendChild(tmpSibling);
+ }
+
+ // Remove next node
+ dom.remove(next);
+
+ // Move children into prev node
+ each(tinymce.grep(next.childNodes), function(node) {
+ prev.appendChild(node);
+ });
+
+ return prev;
+ }
+ }
+
+ return next;
+ };
+
+ function isTextBlock(name) {
+ return /^(h[1-6]|p|div|pre|address|dl|dt|dd)$/.test(name);
+ };
+
+ function getContainer(rng, start) {
+ var container, offset, lastIdx, walker;
+
+ container = rng[start ? 'startContainer' : 'endContainer'];
+ offset = rng[start ? 'startOffset' : 'endOffset'];
+
+ if (container.nodeType == 1) {
+ lastIdx = container.childNodes.length - 1;
+
+ if (!start && offset)
+ offset--;
+
+ container = container.childNodes[offset > lastIdx ? lastIdx : offset];
+ }
+
+ // If start text node is excluded then walk to the next node
+ if (container.nodeType === 3 && start && offset >= container.nodeValue.length) {
+ container = new TreeWalker(container, ed.getBody()).next() || container;
+ }
+
+ // If end text node is excluded then walk to the previous node
+ if (container.nodeType === 3 && !start && offset === 0) {
+ container = new TreeWalker(container, ed.getBody()).prev() || container;
+ }
+
+ return container;
+ };
+
+ function performCaretAction(type, name, vars) {
+ var caretContainerId = '_mce_caret', debug = ed.settings.caret_debug;
+
+ // Creates a caret container bogus element
+ function createCaretContainer(fill) {
+ var caretContainer = dom.create('span', {id: caretContainerId, 'data-mce-bogus': true, style: debug ? 'color:red' : ''});
+
+ if (fill) {
+ caretContainer.appendChild(ed.getDoc().createTextNode(INVISIBLE_CHAR));
+ }
+
+ return caretContainer;
+ };
+
+ function isCaretContainerEmpty(node, nodes) {
+ while (node) {
+ if ((node.nodeType === 3 && node.nodeValue !== INVISIBLE_CHAR) || node.childNodes.length > 1) {
+ return false;
+ }
+
+ // Collect nodes
+ if (nodes && node.nodeType === 1) {
+ nodes.push(node);
+ }
+
+ node = node.firstChild;
+ }
+
+ return true;
+ };
+
+ // Returns any parent caret container element
+ function getParentCaretContainer(node) {
+ while (node) {
+ if (node.id === caretContainerId) {
+ return node;
+ }
+
+ node = node.parentNode;
+ }
+ };
+
+ // Finds the first text node in the specified node
+ function findFirstTextNode(node) {
+ var walker;
+
+ if (node) {
+ walker = new TreeWalker(node, node);
+
+ for (node = walker.current(); node; node = walker.next()) {
+ if (node.nodeType === 3) {
+ return node;
+ }
+ }
+ }
+ };
+
+ // Removes the caret container for the specified node or all on the current document
+ function removeCaretContainer(node, move_caret) {
+ var child, rng;
+
+ if (!node) {
+ node = getParentCaretContainer(selection.getStart());
+
+ if (!node) {
+ while (node = dom.get(caretContainerId)) {
+ removeCaretContainer(node, false);
+ }
+ }
+ } else {
+ rng = selection.getRng(true);
+
+ if (isCaretContainerEmpty(node)) {
+ if (move_caret !== false) {
+ rng.setStartBefore(node);
+ rng.setEndBefore(node);
+ }
+
+ dom.remove(node);
+ } else {
+ child = findFirstTextNode(node);
+
+ if (child.nodeValue.charAt(0) === INVISIBLE_CHAR) {
+ child = child.deleteData(0, 1);
+ }
+
+ dom.remove(node, 1);
+ }
+
+ selection.setRng(rng);
+ }
+ };
+
+ // Applies formatting to the caret postion
+ function applyCaretFormat() {
+ var rng, caretContainer, textNode, offset, bookmark, container, text;
+
+ rng = selection.getRng(true);
+ offset = rng.startOffset;
+ container = rng.startContainer;
+ text = container.nodeValue;
+
+ caretContainer = getParentCaretContainer(selection.getStart());
+ if (caretContainer) {
+ textNode = findFirstTextNode(caretContainer);
+ }
+
+ // Expand to word is caret is in the middle of a text node and the char before/after is a alpha numeric character
+ if (text && offset > 0 && offset < text.length && /\w/.test(text.charAt(offset)) && /\w/.test(text.charAt(offset - 1))) {
+ // Get bookmark of caret position
+ bookmark = selection.getBookmark();
+
+ // Collapse bookmark range (WebKit)
+ rng.collapse(true);
+
+ // Expand the range to the closest word and split it at those points
+ rng = expandRng(rng, get(name));
+ rng = rangeUtils.split(rng);
+
+ // Apply the format to the range
+ apply(name, vars, rng);
+
+ // Move selection back to caret position
+ selection.moveToBookmark(bookmark);
+ } else {
+ if (!caretContainer || textNode.nodeValue !== INVISIBLE_CHAR) {
+ caretContainer = createCaretContainer(true);
+ textNode = caretContainer.firstChild;
+
+ rng.insertNode(caretContainer);
+ offset = 1;
+
+ apply(name, vars, caretContainer);
+ } else {
+ apply(name, vars, caretContainer);
+ }
+
+ // Move selection to text node
+ selection.setCursorLocation(textNode, offset);
+ }
+ };
+
+ function removeCaretFormat() {
+ var rng = selection.getRng(true), container, offset, bookmark,
+ hasContentAfter, node, formatNode, parents = [], i, caretContainer;
+
+ container = rng.startContainer;
+ offset = rng.startOffset;
+ node = container;
+
+ if (container.nodeType == 3) {
+ if (offset != container.nodeValue.length || container.nodeValue === INVISIBLE_CHAR) {
+ hasContentAfter = true;
+ }
+
+ node = node.parentNode;
+ }
+
+ while (node) {
+ if (matchNode(node, name, vars)) {
+ formatNode = node;
+ break;
+ }
+
+ if (node.nextSibling) {
+ hasContentAfter = true;
+ }
+
+ parents.push(node);
+ node = node.parentNode;
+ }
+
+ // Node doesn't have the specified format
+ if (!formatNode) {
+ return;
+ }
+
+ // Is there contents after the caret then remove the format on the element
+ if (hasContentAfter) {
+ // Get bookmark of caret position
+ bookmark = selection.getBookmark();
+
+ // Collapse bookmark range (WebKit)
+ rng.collapse(true);
+
+ // Expand the range to the closest word and split it at those points
+ rng = expandRng(rng, get(name), true);
+ rng = rangeUtils.split(rng);
+
+ // Remove the format from the range
+ remove(name, vars, rng);
+
+ // Move selection back to caret position
+ selection.moveToBookmark(bookmark);
+ } else {
+ caretContainer = createCaretContainer();
+
+ node = caretContainer;
+ for (i = parents.length - 1; i >= 0; i--) {
+ node.appendChild(dom.clone(parents[i], false));
+ node = node.firstChild;
+ }
+
+ // Insert invisible character into inner most format element
+ node.appendChild(dom.doc.createTextNode(INVISIBLE_CHAR));
+ node = node.firstChild;
+
+ // Insert caret container after the formated node
+ dom.insertAfter(caretContainer, formatNode);
+
+ // Move selection to text node
+ selection.setCursorLocation(node, 1);
+ }
+ };
+
+ // Checks if the parent caret container node isn't empty if that is the case it
+ // will remove the bogus state on all children that isn't empty
+ function unmarkBogusCaretParents() {
+ var i, caretContainer, node;
+
+ caretContainer = getParentCaretContainer(selection.getStart());
+ if (caretContainer && !dom.isEmpty(caretContainer)) {
+ tinymce.walk(caretContainer, function(node) {
+ if (node.nodeType == 1 && node.id !== caretContainerId && !dom.isEmpty(node)) {
+ dom.setAttrib(node, 'data-mce-bogus', null);
+ }
+ }, 'childNodes');
+ }
+ };
+
+ // Only bind the caret events once
+ if (!self._hasCaretEvents) {
+ // Mark current caret container elements as bogus when getting the contents so we don't end up with empty elements
+ ed.onBeforeGetContent.addToTop(function() {
+ var nodes = [], i;
+
+ if (isCaretContainerEmpty(getParentCaretContainer(selection.getStart()), nodes)) {
+ // Mark children
+ i = nodes.length;
+ while (i--) {
+ dom.setAttrib(nodes[i], 'data-mce-bogus', '1');
+ }
+ }
+ });
+
+ // Remove caret container on mouse up and on key up
+ tinymce.each('onMouseUp onKeyUp'.split(' '), function(name) {
+ ed[name].addToTop(function() {
+ removeCaretContainer();
+ unmarkBogusCaretParents();
+ });
+ });
+
+ // Remove caret container on keydown and it's a backspace, enter or left/right arrow keys
+ ed.onKeyDown.addToTop(function(ed, e) {
+ var keyCode = e.keyCode;
+
+ if (keyCode == 8 || keyCode == 37 || keyCode == 39) {
+ removeCaretContainer(getParentCaretContainer(selection.getStart()));
+ }
+
+ unmarkBogusCaretParents();
+ });
+
+ // Remove bogus state if they got filled by contents using editor.selection.setContent
+ selection.onSetContent.add(unmarkBogusCaretParents);
+
+ self._hasCaretEvents = true;
+ }
+
+ // Do apply or remove caret format
+ if (type == "apply") {
+ applyCaretFormat();
+ } else {
+ removeCaretFormat();
+ }
+ };
+
+ function moveStart(rng) {
+ var container = rng.startContainer,
+ offset = rng.startOffset, isAtEndOfText,
+ walker, node, nodes, tmpNode;
+
+ // Convert text node into index if possible
+ if (container.nodeType == 3 && offset >= container.nodeValue.length) {
+ // Get the parent container location and walk from there
+ offset = nodeIndex(container);
+ container = container.parentNode;
+ isAtEndOfText = true;
+ }
+
+ // Move startContainer/startOffset in to a suitable node
+ if (container.nodeType == 1) {
+ nodes = container.childNodes;
+ container = nodes[Math.min(offset, nodes.length - 1)];
+ walker = new TreeWalker(container, dom.getParent(container, dom.isBlock));
+
+ // If offset is at end of the parent node walk to the next one
+ if (offset > nodes.length - 1 || isAtEndOfText)
+ walker.next();
+
+ for (node = walker.current(); node; node = walker.next()) {
+ if (node.nodeType == 3 && !isWhiteSpaceNode(node)) {
+ // IE has a "neat" feature where it moves the start node into the closest element
+ // we can avoid this by inserting an element before it and then remove it after we set the selection
+ tmpNode = dom.create('a', null, INVISIBLE_CHAR);
+ node.parentNode.insertBefore(tmpNode, node);
+
+ // Set selection and remove tmpNode
+ rng.setStart(node, 0);
+ selection.setRng(rng);
+ dom.remove(tmpNode);
+
+ return;
+ }
+ }
+ }
+ };
+ };
+})(tinymce);
+
+tinymce.onAddEditor.add(function(tinymce, ed) {
+ var filters, fontSizes, dom, settings = ed.settings;
+
+ function replaceWithSpan(node, styles) {
+ tinymce.each(styles, function(value, name) {
+ if (value)
+ dom.setStyle(node, name, value);
+ });
+
+ dom.rename(node, 'span');
+ };
+
+ function convert(editor, params) {
+ dom = editor.dom;
+
+ if (settings.convert_fonts_to_spans) {
+ tinymce.each(dom.select('font,u,strike', params.node), function(node) {
+ filters[node.nodeName.toLowerCase()](ed.dom, node);
+ });
+ }
+ };
+
+ if (settings.inline_styles) {
+ fontSizes = tinymce.explode(settings.font_size_legacy_values);
+
+ filters = {
+ font : function(dom, node) {
+ replaceWithSpan(node, {
+ backgroundColor : node.style.backgroundColor,
+ color : node.color,
+ fontFamily : node.face,
+ fontSize : fontSizes[parseInt(node.size, 10) - 1]
+ });
+ },
+
+ u : function(dom, node) {
+ replaceWithSpan(node, {
+ textDecoration : 'underline'
+ });
+ },
+
+ strike : function(dom, node) {
+ replaceWithSpan(node, {
+ textDecoration : 'line-through'
+ });
+ }
+ };
+
+ ed.onPreProcess.add(convert);
+ ed.onSetContent.add(convert);
+
+ ed.onInit.add(function() {
+ ed.selection.onSetContent.add(convert);
+ });
+ }
+});
+
+(function(tinymce) {
+ var TreeWalker = tinymce.dom.TreeWalker;
+
+ tinymce.EnterKey = function(editor) {
+ var dom = editor.dom, selection = editor.selection, settings = editor.settings, undoManager = editor.undoManager, nonEmptyElementsMap = editor.schema.getNonEmptyElements();
+
+ function handleEnterKey(evt) {
+ var rng = selection.getRng(true), tmpRng, editableRoot, container, offset, parentBlock, documentMode, shiftKey,
+ newBlock, fragment, containerBlock, parentBlockName, containerBlockName, newBlockName, isAfterLastNodeInContainer;
+
+ // Returns true if the block can be split into two blocks or not
+ function canSplitBlock(node) {
+ return node &&
+ dom.isBlock(node) &&
+ !/^(TD|TH|CAPTION|FORM)$/.test(node.nodeName) &&
+ !/^(fixed|absolute)/i.test(node.style.position) &&
+ dom.getContentEditable(node) !== "true";
+ };
+
+ // Renders empty block on IE
+ function renderBlockOnIE(block) {
+ var oldRng;
+
+ if (tinymce.isIE && dom.isBlock(block)) {
+ oldRng = selection.getRng();
+ block.appendChild(dom.create('span', null, '\u00a0'));
+ selection.select(block);
+ block.lastChild.outerHTML = '';
+ selection.setRng(oldRng);
+ }
+ };
+
+ // Remove the first empty inline element of the block so this: <p><b><em></em></b>x</p> becomes this: <p>x</p>
+ function trimInlineElementsOnLeftSideOfBlock(block) {
+ var node = block, firstChilds = [], i;
+
+ // Find inner most first child ex: <p><i><b>*</b></i></p>
+ while (node = node.firstChild) {
+ if (dom.isBlock(node)) {
+ return;
+ }
+
+ if (node.nodeType == 1 && !nonEmptyElementsMap[node.nodeName.toLowerCase()]) {
+ firstChilds.push(node);
+ }
+ }
+
+ i = firstChilds.length;
+ while (i--) {
+ node = firstChilds[i];
+ if (!node.hasChildNodes() || (node.firstChild == node.lastChild && node.firstChild.nodeValue === '')) {
+ dom.remove(node);
+ } else {
+ // Remove <a> </a> see #5381
+ if (node.nodeName == "A" && (node.innerText || node.textContent) === ' ') {
+ dom.remove(node);
+ }
+ }
+ }
+ };
+
+ // Moves the caret to a suitable position within the root for example in the first non pure whitespace text node or before an image
+ function moveToCaretPosition(root) {
+ var walker, node, rng, y, viewPort, lastNode = root, tempElm;
+
+ rng = dom.createRng();
+
+ if (root.hasChildNodes()) {
+ walker = new TreeWalker(root, root);
+
+ while (node = walker.current()) {
+ if (node.nodeType == 3) {
+ rng.setStart(node, 0);
+ rng.setEnd(node, 0);
+ break;
+ }
+
+ if (nonEmptyElementsMap[node.nodeName.toLowerCase()]) {
+ rng.setStartBefore(node);
+ rng.setEndBefore(node);
+ break;
+ }
+
+ lastNode = node;
+ node = walker.next();
+ }
+
+ if (!node) {
+ rng.setStart(lastNode, 0);
+ rng.setEnd(lastNode, 0);
+ }
+ } else {
+ if (root.nodeName == 'BR') {
+ if (root.nextSibling && dom.isBlock(root.nextSibling)) {
+ // Trick on older IE versions to render the caret before the BR between two lists
+ if (!documentMode || documentMode < 9) {
+ tempElm = dom.create('br');
+ root.parentNode.insertBefore(tempElm, root);
+ }
+
+ rng.setStartBefore(root);
+ rng.setEndBefore(root);
+ } else {
+ rng.setStartAfter(root);
+ rng.setEndAfter(root);
+ }
+ } else {
+ rng.setStart(root, 0);
+ rng.setEnd(root, 0);
+ }
+ }
+
+ selection.setRng(rng);
+
+ // Remove tempElm created for old IE:s
+ dom.remove(tempElm);
+
+ viewPort = dom.getViewPort(editor.getWin());
+
+ // scrollIntoView seems to scroll the parent window in most browsers now including FF 3.0b4 so it's time to stop using it and do it our selfs
+ y = dom.getPos(root).y;
+ if (y < viewPort.y || y + 25 > viewPort.y + viewPort.h) {
+ editor.getWin().scrollTo(0, y < viewPort.y ? y : y - viewPort.h + 25); // Needs to be hardcoded to roughly one line of text if a huge text block is broken into two blocks
+ }
+ };
+
+ // Creates a new block element by cloning the current one or creating a new one if the name is specified
+ // This function will also copy any text formatting from the parent block and add it to the new one
+ function createNewBlock(name) {
+ var node = container, block, clonedNode, caretNode;
+
+ block = name || parentBlockName == "TABLE" ? dom.create(name || newBlockName) : parentBlock.cloneNode(false);
+ caretNode = block;
+
+ // Clone any parent styles
+ if (settings.keep_styles !== false) {
+ do {
+ if (/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(node.nodeName)) {
+ // Never clone a caret containers
+ if (node.id == '_mce_caret') {
+ continue;
+ }
+
+ clonedNode = node.cloneNode(false);
+ dom.setAttrib(clonedNode, 'id', ''); // Remove ID since it needs to be document unique
+
+ if (block.hasChildNodes()) {
+ clonedNode.appendChild(block.firstChild);
+ block.appendChild(clonedNode);
+ } else {
+ caretNode = clonedNode;
+ block.appendChild(clonedNode);
+ }
+ }
+ } while (node = node.parentNode);
+ }
+
+ // BR is needed in empty blocks on non IE browsers
+ if (!tinymce.isIE) {
+ caretNode.innerHTML = '<br data-mce-bogus="1">';
+ }
+
+ return block;
+ };
+
+ // Returns true/false if the caret is at the start/end of the parent block element
+ function isCaretAtStartOrEndOfBlock(start) {
+ var walker, node, name;
+
+ // Caret is in the middle of a text node like "a|b"
+ if (container.nodeType == 3 && (start ? offset > 0 : offset < container.nodeValue.length)) {
+ return false;
+ }
+
+ // If after the last element in block node edge case for #5091
+ if (container.parentNode == parentBlock && isAfterLastNodeInContainer && !start) {
+ return true;
+ }
+
+ // If the caret if before the first element in parentBlock
+ if (start && container.nodeType == 1 && container == parentBlock.firstChild) {
+ return true;
+ }
+
+ // Caret can be before/after a table
+ if (container.nodeName === "TABLE" || (container.previousSibling && container.previousSibling.nodeName == "TABLE")) {
+ return (isAfterLastNodeInContainer && !start) || (!isAfterLastNodeInContainer && start);
+ }
+
+ // Walk the DOM and look for text nodes or non empty elements
+ walker = new TreeWalker(container, parentBlock);
+
+ // If caret is in beginning or end of a text block then jump to the next/previous node
+ if (container.nodeType == 3) {
+ if (start && offset == 0) {
+ walker.prev();
+ } else if (!start && offset == container.nodeValue.length) {
+ walker.next();
+ }
+ }
+
+ while (node = walker.current()) {
+ if (node.nodeType === 1) {
+ // Ignore bogus elements
+ if (!node.getAttribute('data-mce-bogus')) {
+ // Keep empty elements like <img /> <input /> but not trailing br:s like <p>text|<br></p>
+ name = node.nodeName.toLowerCase();
+ if (nonEmptyElementsMap[name] && name !== 'br') {
+ return false;
+ }
+ }
+ } else if (node.nodeType === 3 && !/^[ \t\r\n]*$/.test(node.nodeValue)) {
+ return false;
+ }
+
+ if (start) {
+ walker.prev();
+ } else {
+ walker.next();
+ }
+ }
+
+ return true;
+ };
+
+ // Wraps any text nodes or inline elements in the specified forced root block name
+ function wrapSelfAndSiblingsInDefaultBlock(container, offset) {
+ var newBlock, parentBlock, startNode, node, next, blockName = newBlockName || 'P';
+
+ // Not in a block element or in a table cell or caption
+ parentBlock = dom.getParent(container, dom.isBlock);
+ if (!parentBlock || !canSplitBlock(parentBlock)) {
+ parentBlock = parentBlock || editableRoot;
+
+ if (!parentBlock.hasChildNodes()) {
+ newBlock = dom.create(blockName);
+ parentBlock.appendChild(newBlock);
+ rng.setStart(newBlock, 0);
+ rng.setEnd(newBlock, 0);
+ return newBlock;
+ }
+
+ // Find parent that is the first child of parentBlock
+ node = container;
+ while (node.parentNode != parentBlock) {
+ node = node.parentNode;
+ }
+
+ // Loop left to find start node start wrapping at
+ while (node && !dom.isBlock(node)) {
+ startNode = node;
+ node = node.previousSibling;
+ }
+
+ if (startNode) {
+ newBlock = dom.create(blockName);
+ startNode.parentNode.insertBefore(newBlock, startNode);
+
+ // Start wrapping until we hit a block
+ node = startNode;
+ while (node && !dom.isBlock(node)) {
+ next = node.nextSibling;
+ newBlock.appendChild(node);
+ node = next;
+ }
+
+ // Restore range to it's past location
+ rng.setStart(container, offset);
+ rng.setEnd(container, offset);
+ }
+ }
+
+ return container;
+ };
+
+ // Inserts a block or br before/after or in the middle of a split list of the LI is empty
+ function handleEmptyListItem() {
+ function isFirstOrLastLi(first) {
+ var node = containerBlock[first ? 'firstChild' : 'lastChild'];
+
+ // Find first/last element since there might be whitespace there
+ while (node) {
+ if (node.nodeType == 1) {
+ break;
+ }
+
+ node = node[first ? 'nextSibling' : 'previousSibling'];
+ }
+
+ return node === parentBlock;
+ };
+
+ newBlock = newBlockName ? createNewBlock(newBlockName) : dom.create('BR');
+
+ if (isFirstOrLastLi(true) && isFirstOrLastLi()) {
+ // Is first and last list item then replace the OL/UL with a text block
+ dom.replace(newBlock, containerBlock);
+ } else if (isFirstOrLastLi(true)) {
+ // First LI in list then remove LI and add text block before list
+ containerBlock.parentNode.insertBefore(newBlock, containerBlock);
+ } else if (isFirstOrLastLi()) {
+ // Last LI in list then temove LI and add text block after list
+ dom.insertAfter(newBlock, containerBlock);
+ renderBlockOnIE(newBlock);
+ } else {
+ // Middle LI in list the split the list and insert a text block in the middle
+ // Extract after fragment and insert it after the current block
+ tmpRng = rng.cloneRange();
+ tmpRng.setStartAfter(parentBlock);
+ tmpRng.setEndAfter(containerBlock);
+ fragment = tmpRng.extractContents();
+ dom.insertAfter(fragment, containerBlock);
+ dom.insertAfter(newBlock, containerBlock);
+ }
+
+ dom.remove(parentBlock);
+ moveToCaretPosition(newBlock);
+ undoManager.add();
+ };
+
+ // Walks the parent block to the right and look for BR elements
+ function hasRightSideBr() {
+ var walker = new TreeWalker(container, parentBlock), node;
+
+ while (node = walker.current()) {
+ if (node.nodeName == 'BR') {
+ return true;
+ }
+
+ node = walker.next();
+ }
+ }
+
+ // Inserts a BR element if the forced_root_block option is set to false or empty string
+ function insertBr() {
+ var brElm, extraBr;
+
+ if (container && container.nodeType == 3 && offset >= container.nodeValue.length) {
+ // Insert extra BR element at the end block elements
+ if (!tinymce.isIE && !hasRightSideBr()) {
+ brElm = dom.create('br');
+ rng.insertNode(brElm);
+ rng.setStartAfter(brElm);
+ rng.setEndAfter(brElm);
+ extraBr = true;
+ }
+ }
+
+ brElm = dom.create('br');
+ rng.insertNode(brElm);
+
+ // Rendering modes below IE8 doesn't display BR elements in PRE unless we have a \n before it
+ if (tinymce.isIE && parentBlockName == 'PRE' && (!documentMode || documentMode < 8)) {
+ brElm.parentNode.insertBefore(dom.doc.createTextNode('\r'), brElm);
+ }
+
+ if (!extraBr) {
+ rng.setStartAfter(brElm);
+ rng.setEndAfter(brElm);
+ } else {
+ rng.setStartBefore(brElm);
+ rng.setEndBefore(brElm);
+ }
+
+ selection.setRng(rng);
+ undoManager.add();
+ };
+
+ // Trims any linebreaks at the beginning of node user for example when pressing enter in a PRE element
+ function trimLeadingLineBreaks(node) {
+ do {
+ if (node.nodeType === 3) {
+ node.nodeValue = node.nodeValue.replace(/^[\r\n]+/, '');
+ }
+
+ node = node.firstChild;
+ } while (node);
+ };
+
+ function getEditableRoot(node) {
+ var root = dom.getRoot(), parent, editableRoot;
+
+ // Get all parents until we hit a non editable parent or the root
+ parent = node;
+ while (parent !== root && dom.getContentEditable(parent) !== "false") {
+ if (dom.getContentEditable(parent) === "true") {
+ editableRoot = parent;
+ }
+
+ parent = parent.parentNode;
+ }
+
+ return parent !== root ? editableRoot : root;
+ };
+
+ // Adds a BR at the end of blocks that only contains an IMG or INPUT since these might be floated and then they won't expand the block
+ function addBrToBlockIfNeeded(block) {
+ var lastChild;
+
+ // IE will render the blocks correctly other browsers needs a BR
+ if (!tinymce.isIE) {
+ block.normalize(); // Remove empty text nodes that got left behind by the extract
+
+ // Check if the block is empty or contains a floated last child
+ lastChild = block.lastChild;
+ if (!lastChild || (/^(left|right)$/gi.test(dom.getStyle(lastChild, 'float', true)))) {
+ dom.add(block, 'br');
+ }
+ }
+ };
+
+ // Delete any selected contents
+ if (!rng.collapsed) {
+ editor.execCommand('Delete');
+ return;
+ }
+
+ // Event is blocked by some other handler for example the lists plugin
+ if (evt.isDefaultPrevented()) {
+ return;
+ }
+
+ // Setup range items and newBlockName
+ container = rng.startContainer;
+ offset = rng.startOffset;
+ newBlockName = (settings.force_p_newlines ? 'p' : '') || settings.forced_root_block;
+ newBlockName = newBlockName ? newBlockName.toUpperCase() : '';
+ documentMode = dom.doc.documentMode;
+ shiftKey = evt.shiftKey;
+
+ // Resolve node index
+ if (container.nodeType == 1 && container.hasChildNodes()) {
+ isAfterLastNodeInContainer = offset > container.childNodes.length - 1;
+ container = container.childNodes[Math.min(offset, container.childNodes.length - 1)] || container;
+ if (isAfterLastNodeInContainer && container.nodeType == 3) {
+ offset = container.nodeValue.length;
+ } else {
+ offset = 0;
+ }
+ }
+
+ // Get editable root node normaly the body element but sometimes a div or span
+ editableRoot = getEditableRoot(container);
+
+ // If there is no editable root then enter is done inside a contentEditable false element
+ if (!editableRoot) {
+ return;
+ }
+
+ undoManager.beforeChange();
+
+ // If editable root isn't block nor the root of the editor
+ if (!dom.isBlock(editableRoot) && editableRoot != dom.getRoot()) {
+ if (!newBlockName || shiftKey) {
+ insertBr();
+ }
+
+ return;
+ }
+
+ // Wrap the current node and it's sibling in a default block if it's needed.
+ // for example this <td>text|<b>text2</b></td> will become this <td><p>text|<b>text2</p></b></td>
+ // This won't happen if root blocks are disabled or the shiftKey is pressed
+ if ((newBlockName && !shiftKey) || (!newBlockName && shiftKey)) {
+ container = wrapSelfAndSiblingsInDefaultBlock(container, offset);
+ }
+
+ // Find parent block and setup empty block paddings
+ parentBlock = dom.getParent(container, dom.isBlock);
+ containerBlock = parentBlock ? dom.getParent(parentBlock.parentNode, dom.isBlock) : null;
+
+ // Setup block names
+ parentBlockName = parentBlock ? parentBlock.nodeName.toUpperCase() : ''; // IE < 9 & HTML5
+ containerBlockName = containerBlock ? containerBlock.nodeName.toUpperCase() : ''; // IE < 9 & HTML5
+
+ // Enter inside block contained within a LI then split or insert before/after LI
+ if (containerBlockName == 'LI' && !evt.ctrlKey) {
+ parentBlock = containerBlock;
+ parentBlockName = containerBlockName;
+ }
+
+ // Handle enter in LI
+ if (parentBlockName == 'LI') {
+ if (!newBlockName && shiftKey) {
+ insertBr();
+ return;
+ }
+
+ // Handle enter inside an empty list item
+ if (dom.isEmpty(parentBlock)) {
+ // Let the list plugin or browser handle nested lists for now
+ if (/^(UL|OL|LI)$/.test(containerBlock.parentNode.nodeName)) {
+ return false;
+ }
+
+ handleEmptyListItem();
+ return;
+ }
+ }
+
+ // Don't split PRE tags but insert a BR instead easier when writing code samples etc
+ if (parentBlockName == 'PRE' && settings.br_in_pre !== false) {
+ if (!shiftKey) {
+ insertBr();
+ return;
+ }
+ } else {
+ // If no root block is configured then insert a BR by default or if the shiftKey is pressed
+ if ((!newBlockName && !shiftKey && parentBlockName != 'LI') || (newBlockName && shiftKey)) {
+ insertBr();
+ return;
+ }
+ }
+
+ // Default block name if it's not configured
+ newBlockName = newBlockName || 'P';
+
+ // Insert new block before/after the parent block depending on caret location
+ if (isCaretAtStartOrEndOfBlock()) {
+ // If the caret is at the end of a header we produce a P tag after it similar to Word unless we are in a hgroup
+ if (/^(H[1-6]|PRE)$/.test(parentBlockName) && containerBlockName != 'HGROUP') {
+ newBlock = createNewBlock(newBlockName);
+ } else {
+ newBlock = createNewBlock();
+ }
+
+ // Split the current container block element if enter is pressed inside an empty inner block element
+ if (settings.end_container_on_empty_block && canSplitBlock(containerBlock) && dom.isEmpty(parentBlock)) {
+ // Split container block for example a BLOCKQUOTE at the current blockParent location for example a P
+ newBlock = dom.split(containerBlock, parentBlock);
+ } else {
+ dom.insertAfter(newBlock, parentBlock);
+ }
+
+ moveToCaretPosition(newBlock);
+ } else if (isCaretAtStartOrEndOfBlock(true)) {
+ // Insert new block before
+ newBlock = parentBlock.parentNode.insertBefore(createNewBlock(), parentBlock);
+ renderBlockOnIE(newBlock);
+ } else {
+ // Extract after fragment and insert it after the current block
+ tmpRng = rng.cloneRange();
+ tmpRng.setEndAfter(parentBlock);
+ fragment = tmpRng.extractContents();
+ trimLeadingLineBreaks(fragment);
+ newBlock = fragment.firstChild;
+ dom.insertAfter(fragment, parentBlock);
+ trimInlineElementsOnLeftSideOfBlock(newBlock);
+ addBrToBlockIfNeeded(parentBlock);
+ moveToCaretPosition(newBlock);
+ }
+
+ dom.setAttrib(newBlock, 'id', ''); // Remove ID since it needs to be document unique
+ undoManager.add();
+ }
+
+ editor.onKeyDown.add(function(ed, evt) {
+ if (evt.keyCode == 13) {
+ if (handleEnterKey(evt) !== false) {
+ evt.preventDefault();
+ }
+ }
+ });
+ };
+})(tinymce);
+
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/utils/editable_selects.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/utils/editable_selects.js
new file mode 100755
index 00000000..4b920f3d
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/utils/editable_selects.js
@@ -0,0 +1,70 @@
+/**
+ * editable_selects.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+var TinyMCE_EditableSelects = {
+ editSelectElm : null,
+
+ init : function() {
+ var nl = document.getElementsByTagName("select"), i, d = document, o;
+
+ for (i=0; i<nl.length; i++) {
+ if (nl[i].className.indexOf('mceEditableSelect') != -1) {
+ o = new Option(tinyMCEPopup.editor.translate('value'), '__mce_add_custom__');
+
+ o.className = 'mceAddSelectValue';
+
+ nl[i].options[nl[i].options.length] = o;
+ nl[i].onchange = TinyMCE_EditableSelects.onChangeEditableSelect;
+ }
+ }
+ },
+
+ onChangeEditableSelect : function(e) {
+ var d = document, ne, se = window.event ? window.event.srcElement : e.target;
+
+ if (se.options[se.selectedIndex].value == '__mce_add_custom__') {
+ ne = d.createElement("input");
+ ne.id = se.id + "_custom";
+ ne.name = se.name + "_custom";
+ ne.type = "text";
+
+ ne.style.width = se.offsetWidth + 'px';
+ se.parentNode.insertBefore(ne, se);
+ se.style.display = 'none';
+ ne.focus();
+ ne.onblur = TinyMCE_EditableSelects.onBlurEditableSelectInput;
+ ne.onkeydown = TinyMCE_EditableSelects.onKeyDown;
+ TinyMCE_EditableSelects.editSelectElm = se;
+ }
+ },
+
+ onBlurEditableSelectInput : function() {
+ var se = TinyMCE_EditableSelects.editSelectElm;
+
+ if (se) {
+ if (se.previousSibling.value != '') {
+ addSelectValue(document.forms[0], se.id, se.previousSibling.value, se.previousSibling.value);
+ selectByValue(document.forms[0], se.id, se.previousSibling.value);
+ } else
+ selectByValue(document.forms[0], se.id, '');
+
+ se.style.display = 'inline';
+ se.parentNode.removeChild(se.previousSibling);
+ TinyMCE_EditableSelects.editSelectElm = null;
+ }
+ },
+
+ onKeyDown : function(e) {
+ e = e || window.event;
+
+ if (e.keyCode == 13)
+ TinyMCE_EditableSelects.onBlurEditableSelectInput();
+ }
+};
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/utils/form_utils.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/utils/form_utils.js
new file mode 100755
index 00000000..59da0139
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/utils/form_utils.js
@@ -0,0 +1,210 @@
+/**
+ * form_utils.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+var themeBaseURL = tinyMCEPopup.editor.baseURI.toAbsolute('themes/' + tinyMCEPopup.getParam("theme"));
+
+function getColorPickerHTML(id, target_form_element) {
+ var h = "", dom = tinyMCEPopup.dom;
+
+ if (label = dom.select('label[for=' + target_form_element + ']')[0]) {
+ label.id = label.id || dom.uniqueId();
+ }
+
+ h += '<a role="button" aria-labelledby="' + id + '_label" id="' + id + '_link" href="javascript:;" onclick="tinyMCEPopup.pickColor(event,\'' + target_form_element +'\');" onmousedown="return false;" class="pickcolor">';
+ h += '<span id="' + id + '" title="' + tinyMCEPopup.getLang('browse') + '">&nbsp;<span id="' + id + '_label" class="mceVoiceLabel mceIconOnly" style="display:none;">' + tinyMCEPopup.getLang('browse') + '</span></span></a>';
+
+ return h;
+}
+
+function updateColor(img_id, form_element_id) {
+ document.getElementById(img_id).style.backgroundColor = document.forms[0].elements[form_element_id].value;
+}
+
+function setBrowserDisabled(id, state) {
+ var img = document.getElementById(id);
+ var lnk = document.getElementById(id + "_link");
+
+ if (lnk) {
+ if (state) {
+ lnk.setAttribute("realhref", lnk.getAttribute("href"));
+ lnk.removeAttribute("href");
+ tinyMCEPopup.dom.addClass(img, 'disabled');
+ } else {
+ if (lnk.getAttribute("realhref"))
+ lnk.setAttribute("href", lnk.getAttribute("realhref"));
+
+ tinyMCEPopup.dom.removeClass(img, 'disabled');
+ }
+ }
+}
+
+function getBrowserHTML(id, target_form_element, type, prefix) {
+ var option = prefix + "_" + type + "_browser_callback", cb, html;
+
+ cb = tinyMCEPopup.getParam(option, tinyMCEPopup.getParam("file_browser_callback"));
+
+ if (!cb)
+ return "";
+
+ html = "";
+ html += '<a id="' + id + '_link" href="javascript:openBrowser(\'' + id + '\',\'' + target_form_element + '\', \'' + type + '\',\'' + option + '\');" onmousedown="return false;" class="browse">';
+ html += '<span id="' + id + '" title="' + tinyMCEPopup.getLang('browse') + '">&nbsp;</span></a>';
+
+ return html;
+}
+
+function openBrowser(img_id, target_form_element, type, option) {
+ var img = document.getElementById(img_id);
+
+ if (img.className != "mceButtonDisabled")
+ tinyMCEPopup.openBrowser(target_form_element, type, option);
+}
+
+function selectByValue(form_obj, field_name, value, add_custom, ignore_case) {
+ if (!form_obj || !form_obj.elements[field_name])
+ return;
+
+ if (!value)
+ value = "";
+
+ var sel = form_obj.elements[field_name];
+
+ var found = false;
+ for (var i=0; i<sel.options.length; i++) {
+ var option = sel.options[i];
+
+ if (option.value == value || (ignore_case && option.value.toLowerCase() == value.toLowerCase())) {
+ option.selected = true;
+ found = true;
+ } else
+ option.selected = false;
+ }
+
+ if (!found && add_custom && value != '') {
+ var option = new Option(value, value);
+ option.selected = true;
+ sel.options[sel.options.length] = option;
+ sel.selectedIndex = sel.options.length - 1;
+ }
+
+ return found;
+}
+
+function getSelectValue(form_obj, field_name) {
+ var elm = form_obj.elements[field_name];
+
+ if (elm == null || elm.options == null || elm.selectedIndex === -1)
+ return "";
+
+ return elm.options[elm.selectedIndex].value;
+}
+
+function addSelectValue(form_obj, field_name, name, value) {
+ var s = form_obj.elements[field_name];
+ var o = new Option(name, value);
+ s.options[s.options.length] = o;
+}
+
+function addClassesToList(list_id, specific_option) {
+ // Setup class droplist
+ var styleSelectElm = document.getElementById(list_id);
+ var styles = tinyMCEPopup.getParam('theme_advanced_styles', false);
+ styles = tinyMCEPopup.getParam(specific_option, styles);
+
+ if (styles) {
+ var stylesAr = styles.split(';');
+
+ for (var i=0; i<stylesAr.length; i++) {
+ if (stylesAr != "") {
+ var key, value;
+
+ key = stylesAr[i].split('=')[0];
+ value = stylesAr[i].split('=')[1];
+
+ styleSelectElm.options[styleSelectElm.length] = new Option(key, value);
+ }
+ }
+ } else {
+ tinymce.each(tinyMCEPopup.editor.dom.getClasses(), function(o) {
+ styleSelectElm.options[styleSelectElm.length] = new Option(o.title || o['class'], o['class']);
+ });
+ }
+}
+
+function isVisible(element_id) {
+ var elm = document.getElementById(element_id);
+
+ return elm && elm.style.display != "none";
+}
+
+function convertRGBToHex(col) {
+ var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi");
+
+ var rgb = col.replace(re, "$1,$2,$3").split(',');
+ if (rgb.length == 3) {
+ r = parseInt(rgb[0]).toString(16);
+ g = parseInt(rgb[1]).toString(16);
+ b = parseInt(rgb[2]).toString(16);
+
+ r = r.length == 1 ? '0' + r : r;
+ g = g.length == 1 ? '0' + g : g;
+ b = b.length == 1 ? '0' + b : b;
+
+ return "#" + r + g + b;
+ }
+
+ return col;
+}
+
+function convertHexToRGB(col) {
+ if (col.indexOf('#') != -1) {
+ col = col.replace(new RegExp('[^0-9A-F]', 'gi'), '');
+
+ r = parseInt(col.substring(0, 2), 16);
+ g = parseInt(col.substring(2, 4), 16);
+ b = parseInt(col.substring(4, 6), 16);
+
+ return "rgb(" + r + "," + g + "," + b + ")";
+ }
+
+ return col;
+}
+
+function trimSize(size) {
+ return size.replace(/([0-9\.]+)(px|%|in|cm|mm|em|ex|pt|pc)/i, '$1$2');
+}
+
+function getCSSSize(size) {
+ size = trimSize(size);
+
+ if (size == "")
+ return "";
+
+ // Add px
+ if (/^[0-9]+$/.test(size))
+ size += 'px';
+ // Sanity check, IE doesn't like broken values
+ else if (!(/^[0-9\.]+(px|%|in|cm|mm|em|ex|pt|pc)$/i.test(size)))
+ return "";
+
+ return size;
+}
+
+function getStyle(elm, attrib, style) {
+ var val = tinyMCEPopup.dom.getAttrib(elm, attrib);
+
+ if (val != '')
+ return '' + val;
+
+ if (typeof(style) == 'undefined')
+ style = attrib;
+
+ return tinyMCEPopup.dom.getStyle(elm, style);
+}
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/utils/mctabs.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/utils/mctabs.js
new file mode 100755
index 00000000..458ec86d
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/utils/mctabs.js
@@ -0,0 +1,162 @@
+/**
+ * mctabs.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+function MCTabs() {
+ this.settings = [];
+ this.onChange = tinyMCEPopup.editor.windowManager.createInstance('tinymce.util.Dispatcher');
+};
+
+MCTabs.prototype.init = function(settings) {
+ this.settings = settings;
+};
+
+MCTabs.prototype.getParam = function(name, default_value) {
+ var value = null;
+
+ value = (typeof(this.settings[name]) == "undefined") ? default_value : this.settings[name];
+
+ // Fix bool values
+ if (value == "true" || value == "false")
+ return (value == "true");
+
+ return value;
+};
+
+MCTabs.prototype.showTab =function(tab){
+ tab.className = 'current';
+ tab.setAttribute("aria-selected", true);
+ tab.setAttribute("aria-expanded", true);
+ tab.tabIndex = 0;
+};
+
+MCTabs.prototype.hideTab =function(tab){
+ var t=this;
+
+ tab.className = '';
+ tab.setAttribute("aria-selected", false);
+ tab.setAttribute("aria-expanded", false);
+ tab.tabIndex = -1;
+};
+
+MCTabs.prototype.showPanel = function(panel) {
+ panel.className = 'current';
+ panel.setAttribute("aria-hidden", false);
+};
+
+MCTabs.prototype.hidePanel = function(panel) {
+ panel.className = 'panel';
+ panel.setAttribute("aria-hidden", true);
+};
+
+MCTabs.prototype.getPanelForTab = function(tabElm) {
+ return tinyMCEPopup.dom.getAttrib(tabElm, "aria-controls");
+};
+
+MCTabs.prototype.displayTab = function(tab_id, panel_id, avoid_focus) {
+ var panelElm, panelContainerElm, tabElm, tabContainerElm, selectionClass, nodes, i, t = this;
+
+ tabElm = document.getElementById(tab_id);
+
+ if (panel_id === undefined) {
+ panel_id = t.getPanelForTab(tabElm);
+ }
+
+ panelElm= document.getElementById(panel_id);
+ panelContainerElm = panelElm ? panelElm.parentNode : null;
+ tabContainerElm = tabElm ? tabElm.parentNode : null;
+ selectionClass = t.getParam('selection_class', 'current');
+
+ if (tabElm && tabContainerElm) {
+ nodes = tabContainerElm.childNodes;
+
+ // Hide all other tabs
+ for (i = 0; i < nodes.length; i++) {
+ if (nodes[i].nodeName == "LI") {
+ t.hideTab(nodes[i]);
+ }
+ }
+
+ // Show selected tab
+ t.showTab(tabElm);
+ }
+
+ if (panelElm && panelContainerElm) {
+ nodes = panelContainerElm.childNodes;
+
+ // Hide all other panels
+ for (i = 0; i < nodes.length; i++) {
+ if (nodes[i].nodeName == "DIV")
+ t.hidePanel(nodes[i]);
+ }
+
+ if (!avoid_focus) {
+ tabElm.focus();
+ }
+
+ // Show selected panel
+ t.showPanel(panelElm);
+ }
+};
+
+MCTabs.prototype.getAnchor = function() {
+ var pos, url = document.location.href;
+
+ if ((pos = url.lastIndexOf('#')) != -1)
+ return url.substring(pos + 1);
+
+ return "";
+};
+
+
+//Global instance
+var mcTabs = new MCTabs();
+
+tinyMCEPopup.onInit.add(function() {
+ var tinymce = tinyMCEPopup.getWin().tinymce, dom = tinyMCEPopup.dom, each = tinymce.each;
+
+ each(dom.select('div.tabs'), function(tabContainerElm) {
+ var keyNav;
+
+ dom.setAttrib(tabContainerElm, "role", "tablist");
+
+ var items = tinyMCEPopup.dom.select('li', tabContainerElm);
+ var action = function(id) {
+ mcTabs.displayTab(id, mcTabs.getPanelForTab(id));
+ mcTabs.onChange.dispatch(id);
+ };
+
+ each(items, function(item) {
+ dom.setAttrib(item, 'role', 'tab');
+ dom.bind(item, 'click', function(evt) {
+ action(item.id);
+ });
+ });
+
+ dom.bind(dom.getRoot(), 'keydown', function(evt) {
+ if (evt.keyCode === 9 && evt.ctrlKey && !evt.altKey) { // Tab
+ keyNav.moveFocus(evt.shiftKey ? -1 : 1);
+ tinymce.dom.Event.cancel(evt);
+ }
+ });
+
+ each(dom.select('a', tabContainerElm), function(a) {
+ dom.setAttrib(a, 'tabindex', '-1');
+ });
+
+ keyNav = tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', {
+ root: tabContainerElm,
+ items: items,
+ onAction: action,
+ actOnFocus: true,
+ enableLeftRight: true,
+ enableUpDown: true
+ }, tinyMCEPopup.dom);
+ });
+}); \ No newline at end of file
diff --git a/mayor-orig/www/skin/classic/share/javascript/tiny_mce/utils/validate.js b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/utils/validate.js
new file mode 100755
index 00000000..27cbfab8
--- /dev/null
+++ b/mayor-orig/www/skin/classic/share/javascript/tiny_mce/utils/validate.js
@@ -0,0 +1,252 @@
+/**
+ * validate.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+/**
+ // String validation:
+
+ if (!Validator.isEmail('myemail'))
+ alert('Invalid email.');
+
+ // Form validation:
+
+ var f = document.forms['myform'];
+
+ if (!Validator.isEmail(f.myemail))
+ alert('Invalid email.');
+*/
+
+var Validator = {
+ isEmail : function(s) {
+ return this.test(s, '^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+@[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$');
+ },
+
+ isAbsUrl : function(s) {
+ return this.test(s, '^(news|telnet|nttp|file|http|ftp|https)://[-A-Za-z0-9\\.]+\\/?.*$');
+ },
+
+ isSize : function(s) {
+ return this.test(s, '^[0-9.]+(%|in|cm|mm|em|ex|pt|pc|px)?$');
+ },
+
+ isId : function(s) {
+ return this.test(s, '^[A-Za-z_]([A-Za-z0-9_])*$');
+ },
+
+ isEmpty : function(s) {
+ var nl, i;
+
+ if (s.nodeName == 'SELECT' && s.selectedIndex < 1)
+ return true;
+
+ if (s.type == 'checkbox' && !s.checked)
+ return true;
+
+ if (s.type == 'radio') {
+ for (i=0, nl = s.form.elements; i<nl.length; i++) {
+ if (nl[i].type == "radio" && nl[i].name == s.name && nl[i].checked)
+ return false;
+ }
+
+ return true;
+ }
+
+ return new RegExp('^\\s*$').test(s.nodeType == 1 ? s.value : s);
+ },
+
+ isNumber : function(s, d) {
+ return !isNaN(s.nodeType == 1 ? s.value : s) && (!d || !this.test(s, '^-?[0-9]*\\.[0-9]*$'));
+ },
+
+ test : function(s, p) {
+ s = s.nodeType == 1 ? s.value : s;
+
+ return s == '' || new RegExp(p).test(s);
+ }
+};
+
+var AutoValidator = {
+ settings : {
+ id_cls : 'id',
+ int_cls : 'int',
+ url_cls : 'url',
+ number_cls : 'number',
+ email_cls : 'email',
+ size_cls : 'size',
+ required_cls : 'required',
+ invalid_cls : 'invalid',
+ min_cls : 'min',
+ max_cls : 'max'
+ },
+
+ init : function(s) {
+ var n;
+
+ for (n in s)
+ this.settings[n] = s[n];
+ },
+
+ validate : function(f) {
+ var i, nl, s = this.settings, c = 0;
+
+ nl = this.tags(f, 'label');
+ for (i=0; i<nl.length; i++) {
+ this.removeClass(nl[i], s.invalid_cls);
+ nl[i].setAttribute('aria-invalid', false);
+ }
+
+ c += this.validateElms(f, 'input');
+ c += this.validateElms(f, 'select');
+ c += this.validateElms(f, 'textarea');
+
+ return c == 3;
+ },
+
+ invalidate : function(n) {
+ this.mark(n.form, n);
+ },
+
+ getErrorMessages : function(f) {
+ var nl, i, s = this.settings, field, msg, values, messages = [], ed = tinyMCEPopup.editor;
+ nl = this.tags(f, "label");
+ for (i=0; i<nl.length; i++) {
+ if (this.hasClass(nl[i], s.invalid_cls)) {
+ field = document.getElementById(nl[i].getAttribute("for"));
+ values = { field: nl[i].textContent };
+ if (this.hasClass(field, s.min_cls, true)) {
+ message = ed.getLang('invalid_data_min');
+ values.min = this.getNum(field, s.min_cls);
+ } else if (this.hasClass(field, s.number_cls)) {
+ message = ed.getLang('invalid_data_number');
+ } else if (this.hasClass(field, s.size_cls)) {
+ message = ed.getLang('invalid_data_size');
+ } else {
+ message = ed.getLang('invalid_data');
+ }
+
+ message = message.replace(/{\#([^}]+)\}/g, function(a, b) {
+ return values[b] || '{#' + b + '}';
+ });
+ messages.push(message);
+ }
+ }
+ return messages;
+ },
+
+ reset : function(e) {
+ var t = ['label', 'input', 'select', 'textarea'];
+ var i, j, nl, s = this.settings;
+
+ if (e == null)
+ return;
+
+ for (i=0; i<t.length; i++) {
+ nl = this.tags(e.form ? e.form : e, t[i]);
+ for (j=0; j<nl.length; j++) {
+ this.removeClass(nl[j], s.invalid_cls);
+ nl[j].setAttribute('aria-invalid', false);
+ }
+ }
+ },
+
+ validateElms : function(f, e) {
+ var nl, i, n, s = this.settings, st = true, va = Validator, v;
+
+ nl = this.tags(f, e);
+ for (i=0; i<nl.length; i++) {
+ n = nl[i];
+
+ this.removeClass(n, s.invalid_cls);
+
+ if (this.hasClass(n, s.required_cls) && va.isEmpty(n))
+ st = this.mark(f, n);
+
+ if (this.hasClass(n, s.number_cls) && !va.isNumber(n))
+ st = this.mark(f, n);
+
+ if (this.hasClass(n, s.int_cls) && !va.isNumber(n, true))
+ st = this.mark(f, n);
+
+ if (this.hasClass(n, s.url_cls) && !va.isAbsUrl(n))
+ st = this.mark(f, n);
+
+ if (this.hasClass(n, s.email_cls) && !va.isEmail(n))
+ st = this.mark(f, n);
+
+ if (this.hasClass(n, s.size_cls) && !va.isSize(n))
+ st = this.mark(f, n);
+
+ if (this.hasClass(n, s.id_cls) && !va.isId(n))
+ st = this.mark(f, n);
+
+ if (this.hasClass(n, s.min_cls, true)) {
+ v = this.getNum(n, s.min_cls);
+
+ if (isNaN(v) || parseInt(n.value) < parseInt(v))
+ st = this.mark(f, n);
+ }
+
+ if (this.hasClass(n, s.max_cls, true)) {
+ v = this.getNum(n, s.max_cls);
+
+ if (isNaN(v) || parseInt(n.value) > parseInt(v))
+ st = this.mark(f, n);
+ }
+ }
+
+ return st;
+ },
+
+ hasClass : function(n, c, d) {
+ return new RegExp('\\b' + c + (d ? '[0-9]+' : '') + '\\b', 'g').test(n.className);
+ },
+
+ getNum : function(n, c) {
+ c = n.className.match(new RegExp('\\b' + c + '([0-9]+)\\b', 'g'))[0];
+ c = c.replace(/[^0-9]/g, '');
+
+ return c;
+ },
+
+ addClass : function(n, c, b) {
+ var o = this.removeClass(n, c);
+ n.className = b ? c + (o != '' ? (' ' + o) : '') : (o != '' ? (o + ' ') : '') + c;
+ },
+
+ removeClass : function(n, c) {
+ c = n.className.replace(new RegExp("(^|\\s+)" + c + "(\\s+|$)"), ' ');
+ return n.className = c != ' ' ? c : '';
+ },
+
+ tags : function(f, s) {
+ return f.getElementsByTagName(s);
+ },
+
+ mark : function(f, n) {
+ var s = this.settings;
+
+ this.addClass(n, s.invalid_cls);
+ n.setAttribute('aria-invalid', 'true');
+ this.markLabels(f, n, s.invalid_cls);
+
+ return false;
+ },
+
+ markLabels : function(f, n, ic) {
+ var nl, i;
+
+ nl = this.tags(f, "label");
+ for (i=0; i<nl.length; i++) {
+ if (nl[i].getAttribute("for") == n.id || nl[i].htmlFor == n.id)
+ this.addClass(nl[i], ic);
+ }
+
+ return null;
+ }
+};