kendoui-rails 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +7 -1
- data/lib/kendoui-rails/version.rb +2 -2
- data/vendor/assets/changelog.html +41 -632
- data/vendor/assets/javascripts/jquery.min.js +2 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.af-ZA.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.af.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.am-ET.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.am.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ar-AE.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ar-BH.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ar-DZ.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ar-EG.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ar-IQ.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ar-JO.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ar-KW.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ar-LB.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ar-LY.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ar-MA.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ar-OM.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ar-QA.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ar-SA.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ar-SY.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ar-TN.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ar-YE.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ar.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.arn-CL.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.arn.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.as-IN.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.as.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.az-Cyrl-AZ.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.az-Cyrl.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.az-Latn-AZ.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.az-Latn.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.az.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ba-RU.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ba.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.be-BY.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.be.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.bg-BG.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.bg.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.bn-BD.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.bn-IN.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.bn.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.bo-CN.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.bo.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.br-FR.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.br.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.bs-Cyrl-BA.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.bs-Cyrl.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.bs-Latn-BA.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.bs-Latn.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.bs.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ca-ES.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ca.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.co-FR.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.co.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.cs-CZ.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.cs.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.cy-GB.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.cy.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.da-DK.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.da.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.de-AT.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.de-CH.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.de-DE.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.de-LI.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.de-LU.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.de.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.dsb-DE.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.dsb.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.dv-MV.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.dv.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.el-GR.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.el.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.en-029.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.en-AU.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.en-BZ.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.en-CA.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.en-GB.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.en-IE.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.en-IN.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.en-JM.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.en-MY.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.en-NZ.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.en-PH.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.en-SG.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.en-TT.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.en-US.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.en-ZA.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.en-ZW.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.en.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.es-AR.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.es-BO.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.es-CL.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.es-CO.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.es-CR.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.es-DO.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.es-EC.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.es-ES.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.es-GT.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.es-HN.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.es-MX.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.es-NI.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.es-PA.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.es-PE.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.es-PR.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.es-PY.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.es-SV.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.es-US.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.es-UY.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.es-VE.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.es.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.et-EE.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.et.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.eu-ES.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.eu.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.fa-IR.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.fa.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.fi-FI.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.fi.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.fil-PH.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.fil.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.fo-FO.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.fo.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.fr-BE.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.fr-CA.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.fr-CH.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.fr-FR.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.fr-LU.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.fr-MC.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.fr.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.fy-NL.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.fy.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ga-IE.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ga.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.gd-GB.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.gd.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.gl-ES.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.gl.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.gsw-FR.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.gsw.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.gu-IN.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.gu.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ha-Latn-NG.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ha-Latn.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ha.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.he-IL.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.he.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.hi-IN.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.hi.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.hr-BA.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.hr-HR.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.hr.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.hsb-DE.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.hsb.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.hu-HU.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.hu.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.hy-AM.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.hy.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.id-ID.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.id.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ig-NG.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ig.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ii-CN.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ii.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.is-IS.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.is.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.it-CH.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.it-IT.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.it.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.iu-Cans-CA.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.iu-Cans.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.iu-Latn-CA.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.iu-Latn.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.iu.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ja-JP.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ja.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ka-GE.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ka.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.kk-KZ.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.kk.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.kl-GL.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.kl.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.km-KH.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.km.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.kn-IN.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.kn.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ko-KR.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ko.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.kok-IN.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.kok.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ky-KG.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ky.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.lb-LU.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.lb.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.lo-LA.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.lo.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.lt-LT.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.lt.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.lv-LV.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.lv.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.mi-NZ.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.mi.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.mk-MK.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.mk.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ml-IN.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ml.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.mn-Cyrl.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.mn-MN.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.mn-Mong-CN.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.mn-Mong.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.mn.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.moh-CA.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.moh.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.mr-IN.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.mr.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ms-BN.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ms-MY.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ms.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.mt-MT.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.mt.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.nb-NO.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.nb.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ne-NP.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ne.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.nl-BE.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.nl-NL.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.nl.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.nn-NO.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.nn.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.no.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.nso-ZA.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.nso.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.oc-FR.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.oc.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.or-IN.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.or.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.pa-IN.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.pa.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.pl-PL.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.pl.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.prs-AF.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.prs.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ps-AF.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ps.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.pt-BR.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.pt-PT.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.pt.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.qut-GT.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.qut.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.quz-BO.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.quz-EC.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.quz-PE.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.quz.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.rm-CH.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.rm.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ro-RO.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ro.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ru-RU.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ru-UA.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ru.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.rw-RW.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.rw.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.sa-IN.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.sa.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.sah-RU.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.sah.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.se-FI.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.se-NO.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.se-SE.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.se.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.si-LK.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.si.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.sk-SK.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.sk.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.sl-SI.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.sl.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.sma-NO.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.sma-SE.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.sma.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.smj-NO.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.smj-SE.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.smj.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.smn-FI.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.smn.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.sms-FI.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.sms.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.sq-AL.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.sq.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.sr-Cyrl-BA.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.sr-Cyrl-CS.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.sr-Cyrl-ME.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.sr-Cyrl-RS.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.sr-Cyrl.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.sr-Latn-BA.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.sr-Latn-CS.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.sr-Latn-ME.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.sr-Latn-RS.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.sr-Latn.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.sr.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.sv-FI.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.sv-SE.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.sv.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.sw-KE.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.sw.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.syr-SY.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.syr.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ta-IN.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ta.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.te-IN.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.te.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.tg-Cyrl-TJ.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.tg-Cyrl.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.tg.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.th-TH.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.th.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.tk-TM.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.tk.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.tn-ZA.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.tn.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.tr-TR.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.tr.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.tt-RU.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.tt.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.tzm-Latn-DZ.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.tzm-Latn.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.tzm.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ug-CN.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ug.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.uk-UA.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.uk.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ur-PK.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.ur.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.uz-Cyrl-UZ.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.uz-Cyrl.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.uz-Latn-UZ.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.uz-Latn.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.uz.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.vi-VN.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.vi.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.wo-SN.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.wo.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.xh-ZA.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.xh.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.yo-NG.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.yo.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.zh-CHS.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.zh-CHT.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.zh-CN.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.zh-HK.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.zh-Hans.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.zh-Hant.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.zh-MO.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.zh-SG.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.zh-TW.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.zh.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.zu-ZA.min.js +5 -4
- data/vendor/assets/javascripts/kendo/cultures/kendo.culture.zu.min.js +5 -4
- data/vendor/assets/javascripts/kendo/kendo.autocomplete.min.js +4 -3
- data/vendor/assets/javascripts/kendo/kendo.binder.min.js +4 -3
- data/vendor/assets/javascripts/kendo/kendo.calendar.min.js +4 -3
- data/vendor/assets/javascripts/kendo/kendo.columnmenu.min.js +4 -3
- data/vendor/assets/javascripts/kendo/kendo.combobox.min.js +4 -3
- data/vendor/assets/javascripts/kendo/kendo.core.min.js +5 -3
- data/vendor/assets/javascripts/kendo/kendo.data.min.js +4 -3
- data/vendor/assets/javascripts/kendo/kendo.data.odata.min.js +4 -3
- data/vendor/assets/javascripts/kendo/kendo.data.xml.min.js +4 -3
- data/vendor/assets/javascripts/kendo/kendo.datepicker.min.js +4 -3
- data/vendor/assets/javascripts/kendo/kendo.datetimepicker.min.js +4 -3
- data/vendor/assets/javascripts/kendo/kendo.draganddrop.min.js +4 -3
- data/vendor/assets/javascripts/kendo/kendo.dropdownlist.min.js +4 -3
- data/vendor/assets/javascripts/kendo/kendo.editable.min.js +4 -3
- data/vendor/assets/javascripts/kendo/kendo.editor.min.js +6 -3
- data/vendor/assets/javascripts/kendo/kendo.filtermenu.min.js +4 -3
- data/vendor/assets/javascripts/kendo/kendo.fx.min.js +4 -3
- data/vendor/assets/javascripts/kendo/kendo.grid.min.js +5 -3
- data/vendor/assets/javascripts/kendo/kendo.groupable.min.js +4 -3
- data/vendor/assets/javascripts/kendo/kendo.imagebrowser.min.js +11 -0
- data/vendor/assets/javascripts/kendo/kendo.list.min.js +4 -3
- data/vendor/assets/javascripts/kendo/kendo.listview.min.js +4 -3
- data/vendor/assets/javascripts/kendo/kendo.menu.min.js +4 -3
- data/vendor/assets/javascripts/kendo/kendo.mobile.scroller.min.js +4 -3
- data/vendor/assets/javascripts/kendo/kendo.numerictextbox.min.js +4 -3
- data/vendor/assets/javascripts/kendo/kendo.pager.min.js +4 -3
- data/vendor/assets/javascripts/kendo/kendo.panelbar.min.js +4 -3
- data/vendor/assets/javascripts/kendo/kendo.popup.min.js +4 -3
- data/vendor/assets/javascripts/kendo/kendo.reorderable.min.js +4 -3
- data/vendor/assets/javascripts/kendo/kendo.resizable.min.js +4 -3
- data/vendor/assets/javascripts/kendo/kendo.selectable.min.js +4 -3
- data/vendor/assets/javascripts/kendo/kendo.slider.min.js +4 -3
- data/vendor/assets/javascripts/kendo/kendo.sortable.min.js +4 -3
- data/vendor/assets/javascripts/kendo/kendo.splitter.min.js +4 -3
- data/vendor/assets/javascripts/kendo/kendo.tabstrip.min.js +4 -3
- data/vendor/assets/javascripts/kendo/kendo.timepicker.min.js +4 -3
- data/vendor/assets/javascripts/kendo/kendo.treeview.min.js +4 -3
- data/vendor/assets/javascripts/kendo/kendo.upload.min.js +4 -3
- data/vendor/assets/javascripts/kendo/kendo.userevents.min.js +11 -0
- data/vendor/assets/javascripts/kendo/kendo.validator.min.js +4 -3
- data/vendor/assets/javascripts/kendo/kendo.web.min.js +20 -3
- data/vendor/assets/javascripts/kendo/kendo.window.min.js +4 -3
- data/vendor/assets/stylesheets/kendo/Black/imagebrowser.png +0 -0
- data/vendor/assets/stylesheets/kendo/Black/sprite.png +0 -0
- data/vendor/assets/stylesheets/kendo/BlueOpal/imagebrowser.png +0 -0
- data/vendor/assets/stylesheets/kendo/BlueOpal/sprite.png +0 -0
- data/vendor/assets/stylesheets/kendo/Bootstrap/editor.png +0 -0
- data/vendor/assets/stylesheets/kendo/Bootstrap/imagebrowser.png +0 -0
- data/vendor/assets/stylesheets/kendo/Bootstrap/loading-image.gif +0 -0
- data/vendor/assets/stylesheets/kendo/Bootstrap/loading.gif +0 -0
- data/vendor/assets/stylesheets/kendo/Bootstrap/slider-h.gif +0 -0
- data/vendor/assets/stylesheets/kendo/Bootstrap/slider-v.gif +0 -0
- data/vendor/assets/stylesheets/kendo/Bootstrap/sprite.png +0 -0
- data/vendor/assets/stylesheets/kendo/Default/imagebrowser.png +0 -0
- data/vendor/assets/stylesheets/kendo/Default/sprite.png +0 -0
- data/vendor/assets/stylesheets/kendo/HighContrast/editor.png +0 -0
- data/vendor/assets/stylesheets/kendo/HighContrast/imagebrowser.png +0 -0
- data/vendor/assets/stylesheets/kendo/HighContrast/loading-image.gif +0 -0
- data/vendor/assets/stylesheets/kendo/HighContrast/loading.gif +0 -0
- data/vendor/assets/stylesheets/kendo/HighContrast/slider-h.gif +0 -0
- data/vendor/assets/stylesheets/kendo/HighContrast/slider-v.gif +0 -0
- data/vendor/assets/stylesheets/kendo/HighContrast/sprite.png +0 -0
- data/vendor/assets/stylesheets/kendo/Metro/imagebrowser.png +0 -0
- data/vendor/assets/stylesheets/kendo/Metro/slider-h.gif +0 -0
- data/vendor/assets/stylesheets/kendo/Metro/slider-v.gif +0 -0
- data/vendor/assets/stylesheets/kendo/Metro/sprite.png +0 -0
- data/vendor/assets/stylesheets/kendo/MetroBlack/editor.png +0 -0
- data/vendor/assets/stylesheets/kendo/MetroBlack/imagebrowser.png +0 -0
- data/vendor/assets/stylesheets/kendo/MetroBlack/loading-image.gif +0 -0
- data/vendor/assets/stylesheets/kendo/MetroBlack/loading.gif +0 -0
- data/vendor/assets/stylesheets/kendo/MetroBlack/slider-h.gif +0 -0
- data/vendor/assets/stylesheets/kendo/MetroBlack/slider-v.gif +0 -0
- data/vendor/assets/stylesheets/kendo/MetroBlack/sprite.png +0 -0
- data/vendor/assets/stylesheets/kendo/Moonlight/editor.png +0 -0
- data/vendor/assets/stylesheets/kendo/Moonlight/imagebrowser.png +0 -0
- data/vendor/assets/stylesheets/kendo/Moonlight/loading-image.gif +0 -0
- data/vendor/assets/stylesheets/kendo/Moonlight/loading.gif +0 -0
- data/vendor/assets/stylesheets/kendo/Moonlight/slider-h.gif +0 -0
- data/vendor/assets/stylesheets/kendo/Moonlight/slider-v.gif +0 -0
- data/vendor/assets/stylesheets/kendo/Moonlight/sprite.png +0 -0
- data/vendor/assets/stylesheets/kendo/Silver/imagebrowser.png +0 -0
- data/vendor/assets/stylesheets/kendo/Silver/sprite.png +0 -0
- data/vendor/assets/stylesheets/kendo/Uniform/editor.png +0 -0
- data/vendor/assets/stylesheets/kendo/Uniform/imagebrowser.png +0 -0
- data/vendor/assets/stylesheets/kendo/Uniform/loading-image.gif +0 -0
- data/vendor/assets/stylesheets/kendo/Uniform/loading.gif +0 -0
- data/vendor/assets/stylesheets/kendo/Uniform/slider-h.gif +0 -0
- data/vendor/assets/stylesheets/kendo/Uniform/slider-v.gif +0 -0
- data/vendor/assets/stylesheets/kendo/Uniform/sprite.png +0 -0
- data/vendor/assets/stylesheets/kendo/kendo.black.min.css +4 -3
- data/vendor/assets/stylesheets/kendo/kendo.blueopal.min.css +4 -3
- data/vendor/assets/stylesheets/kendo/kendo.bootstrap.min.css +11 -0
- data/vendor/assets/stylesheets/kendo/kendo.common.min.css +4 -3
- data/vendor/assets/stylesheets/kendo/kendo.default.min.css +4 -3
- data/vendor/assets/stylesheets/kendo/kendo.highcontrast.min.css +11 -0
- data/vendor/assets/stylesheets/kendo/kendo.metro.min.css +4 -3
- data/vendor/assets/stylesheets/kendo/kendo.metroblack.min.css +11 -0
- data/vendor/assets/stylesheets/kendo/kendo.moonlight.min.css +11 -0
- data/vendor/assets/stylesheets/kendo/kendo.rtl.min.css +11 -0
- data/vendor/assets/stylesheets/kendo/kendo.silver.min.css +4 -3
- data/vendor/assets/stylesheets/kendo/kendo.uniform.min.css +11 -0
- data/vendor/assets/stylesheets/kendo/textures/brushed-metal.png +0 -0
- data/vendor/assets/stylesheets/kendo/textures/dots1.png +0 -0
- data/vendor/assets/stylesheets/kendo/textures/dots10.png +0 -0
- data/vendor/assets/stylesheets/kendo/textures/dots11.png +0 -0
- data/vendor/assets/stylesheets/kendo/textures/dots12.png +0 -0
- data/vendor/assets/stylesheets/kendo/textures/dots13.png +0 -0
- data/vendor/assets/stylesheets/kendo/textures/dots2.png +0 -0
- data/vendor/assets/stylesheets/kendo/textures/dots3.png +0 -0
- data/vendor/assets/stylesheets/kendo/textures/dots4.png +0 -0
- data/vendor/assets/stylesheets/kendo/textures/dots5.png +0 -0
- data/vendor/assets/stylesheets/kendo/textures/dots6.png +0 -0
- data/vendor/assets/stylesheets/kendo/textures/dots7.png +0 -0
- data/vendor/assets/stylesheets/kendo/textures/dots8.png +0 -0
- data/vendor/assets/stylesheets/kendo/textures/dots9.png +0 -0
- data/vendor/assets/stylesheets/kendo/textures/glass-lighter.png +0 -0
- data/vendor/assets/stylesheets/kendo/textures/leather1.png +0 -0
- data/vendor/assets/stylesheets/kendo/textures/leather2.png +0 -0
- data/vendor/assets/stylesheets/kendo/textures/noise.png +0 -0
- data/vendor/assets/stylesheets/kendo/textures/stripe1.png +0 -0
- data/vendor/assets/stylesheets/kendo/textures/stripe2.png +0 -0
- data/vendor/assets/stylesheets/kendo/textures/stripe3.png +0 -0
- data/vendor/assets/stylesheets/kendo/textures/stripe4.png +0 -0
- data/vendor/assets/stylesheets/kendo/textures/stripe5.png +0 -0
- data/vendor/assets/stylesheets/kendo/textures/stripe6.png +0 -0
- metadata +77 -5
@@ -1,10 +1,11 @@
|
|
1
|
-
|
2
|
-
* Kendo UI Web v2012.
|
1
|
+
/*
|
2
|
+
* Kendo UI Web v2012.3.1114 (http://kendoui.com)
|
3
3
|
* Copyright 2012 Telerik AD. All rights reserved.
|
4
4
|
*
|
5
|
-
* Kendo UI Web commercial licenses may be obtained at
|
5
|
+
* Kendo UI Web commercial licenses may be obtained at
|
6
|
+
* https://www.kendoui.com/purchase/license-agreement/kendo-ui-web-commercial.aspx
|
6
7
|
* If you do not own a commercial license, this file shall be governed by the
|
7
8
|
* GNU General Public License (GPL) version 3.
|
8
9
|
* For GPL requirements, please review: http://www.gnu.org/copyleft/gpl.html
|
9
10
|
*/
|
10
|
-
|
11
|
+
(function(){kendo.cultures.zh={name:"zh",numberFormat:{pattern:["-n"],decimals:2,",":",",".":".",groupSize:[3],percent:{pattern:["-n%","n%"],decimals:2,",":",",".":".",groupSize:[3],symbol:"%"},currency:{pattern:["$-n","$n"],decimals:2,",":",",".":".",groupSize:[3],symbol:"¥"}},calendars:{standard:{days:{names:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],namesAbbr:["周日","周一","周二","周三","周四","周五","周六"],namesShort:["日","一","二","三","四","五","六"]},months:{names:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""],namesAbbr:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""]},AM:["上午","上午","上午"],PM:["下午","下午","下午"],patterns:{d:"yyyy/M/d",D:"yyyy'年'M'月'd'日'",F:"yyyy'年'M'月'd'日' H:mm:ss",g:"yyyy/M/d H:mm",G:"yyyy/M/d H:mm:ss",m:"M'月'd'日'",M:"M'月'd'日'",s:"yyyy'-'MM'-'dd'T'HH':'mm':'ss",t:"H:mm",T:"H:mm:ss",u:"yyyy'-'MM'-'dd HH':'mm':'ss'Z'",y:"yyyy'年'M'月'",Y:"yyyy'年'M'月'"},"/":"/",":":":",firstDay:0}}}})(this);
|
@@ -1,10 +1,11 @@
|
|
1
|
-
|
2
|
-
* Kendo UI Web v2012.
|
1
|
+
/*
|
2
|
+
* Kendo UI Web v2012.3.1114 (http://kendoui.com)
|
3
3
|
* Copyright 2012 Telerik AD. All rights reserved.
|
4
4
|
*
|
5
|
-
* Kendo UI Web commercial licenses may be obtained at
|
5
|
+
* Kendo UI Web commercial licenses may be obtained at
|
6
|
+
* https://www.kendoui.com/purchase/license-agreement/kendo-ui-web-commercial.aspx
|
6
7
|
* If you do not own a commercial license, this file shall be governed by the
|
7
8
|
* GNU General Public License (GPL) version 3.
|
8
9
|
* For GPL requirements, please review: http://www.gnu.org/copyleft/gpl.html
|
9
10
|
*/
|
10
|
-
|
11
|
+
(function(){kendo.cultures["zu-ZA"]={name:"zu-ZA",numberFormat:{pattern:["-n"],decimals:2,",":",",".":".",groupSize:[3],percent:{pattern:["-%n","%n"],decimals:2,",":",",".":".",groupSize:[3],symbol:"%"},currency:{pattern:["$-n","$ n"],decimals:2,",":",",".":".",groupSize:[3],symbol:"R"}},calendars:{standard:{days:{names:["iSonto","uMsombuluko","uLwesibili","uLwesithathu","uLwesine","uLwesihlanu","uMgqibelo"],namesAbbr:["Son.","Mso.","Bi.","Tha.","Ne.","Hla.","Mgq."],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["uMasingana","uNhlolanja","uNdasa","uMbaso","uNhlaba","uNhlangulana","uNtulikazi","uNcwaba","uMandulo","uMfumfu","uLwezi","uZibandlela",""],namesAbbr:["Mas.","Nhlo.","Nda.","Mba.","Nhla.","Nhlang.","Ntu.","Ncwa.","Man.","Mfu.","Lwe.","Zib.",""]},AM:["AM","am","AM"],PM:["PM","pm","PM"],patterns:{d:"yyyy/MM/dd",D:"dd MMMM yyyy",F:"dd MMMM yyyy hh:mm:ss tt",g:"yyyy/MM/dd hh:mm tt",G:"yyyy/MM/dd hh:mm:ss tt",m:"dd MMMM",M:"dd MMMM",s:"yyyy'-'MM'-'dd'T'HH':'mm':'ss",t:"hh:mm tt",T:"hh:mm:ss tt",u:"yyyy'-'MM'-'dd HH':'mm':'ss'Z'",y:"MMMM yyyy",Y:"MMMM yyyy"},"/":"/",":":":",firstDay:0}}}})(this);
|
@@ -1,10 +1,11 @@
|
|
1
|
-
|
2
|
-
* Kendo UI Web v2012.
|
1
|
+
/*
|
2
|
+
* Kendo UI Web v2012.3.1114 (http://kendoui.com)
|
3
3
|
* Copyright 2012 Telerik AD. All rights reserved.
|
4
4
|
*
|
5
|
-
* Kendo UI Web commercial licenses may be obtained at
|
5
|
+
* Kendo UI Web commercial licenses may be obtained at
|
6
|
+
* https://www.kendoui.com/purchase/license-agreement/kendo-ui-web-commercial.aspx
|
6
7
|
* If you do not own a commercial license, this file shall be governed by the
|
7
8
|
* GNU General Public License (GPL) version 3.
|
8
9
|
* For GPL requirements, please review: http://www.gnu.org/copyleft/gpl.html
|
9
10
|
*/
|
10
|
-
|
11
|
+
(function(){kendo.cultures.zu={name:"zu",numberFormat:{pattern:["-n"],decimals:2,",":",",".":".",groupSize:[3],percent:{pattern:["-%n","%n"],decimals:2,",":",",".":".",groupSize:[3],symbol:"%"},currency:{pattern:["$-n","$ n"],decimals:2,",":",",".":".",groupSize:[3],symbol:"R"}},calendars:{standard:{days:{names:["iSonto","uMsombuluko","uLwesibili","uLwesithathu","uLwesine","uLwesihlanu","uMgqibelo"],namesAbbr:["Son.","Mso.","Bi.","Tha.","Ne.","Hla.","Mgq."],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["uMasingana","uNhlolanja","uNdasa","uMbaso","uNhlaba","uNhlangulana","uNtulikazi","uNcwaba","uMandulo","uMfumfu","uLwezi","uZibandlela",""],namesAbbr:["Mas.","Nhlo.","Nda.","Mba.","Nhla.","Nhlang.","Ntu.","Ncwa.","Man.","Mfu.","Lwe.","Zib.",""]},AM:["AM","am","AM"],PM:["PM","pm","PM"],patterns:{d:"yyyy/MM/dd",D:"dd MMMM yyyy",F:"dd MMMM yyyy hh:mm:ss tt",g:"yyyy/MM/dd hh:mm tt",G:"yyyy/MM/dd hh:mm:ss tt",m:"dd MMMM",M:"dd MMMM",s:"yyyy'-'MM'-'dd'T'HH':'mm':'ss",t:"hh:mm tt",T:"hh:mm:ss tt",u:"yyyy'-'MM'-'dd HH':'mm':'ss'Z'",y:"MMMM yyyy",Y:"MMMM yyyy"},"/":"/",":":":",firstDay:0}}}})(this);
|
@@ -1,10 +1,11 @@
|
|
1
1
|
/*
|
2
|
-
* Kendo UI Web v2012.
|
2
|
+
* Kendo UI Web v2012.3.1114 (http://kendoui.com)
|
3
3
|
* Copyright 2012 Telerik AD. All rights reserved.
|
4
4
|
*
|
5
|
-
* Kendo UI Web commercial licenses may be obtained at
|
5
|
+
* Kendo UI Web commercial licenses may be obtained at
|
6
|
+
* https://www.kendoui.com/purchase/license-agreement/kendo-ui-web-commercial.aspx
|
6
7
|
* If you do not own a commercial license, this file shall be governed by the
|
7
8
|
* GNU General Public License (GPL) version 3.
|
8
9
|
* For GPL requirements, please review: http://www.gnu.org/copyleft/gpl.html
|
9
10
|
*/
|
10
|
-
|
11
|
+
(function(e,t){function a(e,t,a){return a?t.substring(0,e).split(a).length-1:0}function s(e,t,s){return t.split(s)[a(e,t,s)]}function r(e,t,s,r){var o=t.split(r);return o.splice(a(e,t,r),1,s),r&&""!==o[o.length-1]&&o.push(""),o.join(r)}function o(e){var t=e.value.length;b(e,t,t)}var n=window.kendo,l=n.support,i=l.placeholder,c=n.ui,p=n.keys,u=n.data.DataSource,d=c.List,h="aria-disabled",_="k-state-default",f="disabled",g="k-state-focused",v="k-state-selected",m="k-state-disabled",C="k-state-hover",y=".kendoAutoComplete",w="mouseenter"+y+" mouseleave"+y,k=d.caret,b=d.selectText,x=e.proxy,S=d.extend({init:function(t,a){var s,r=this;r.ns=y,a=e.isArray(a)?{dataSource:a}:a,d.fn.init.call(r,t,a),t=r.element,a=r.options,a.placeholder=a.placeholder||t.attr("placeholder"),i&&t.attr("placeholder",a.placeholder),r._wrapper(),r._accessors(),r._dataSource(),t[0].type="text",s=r.wrapper,r._popup(),t.addClass("k-input").on("keydown"+y,x(r._keydown,r)).on("paste"+y,x(r._search,r)).on("focus"+y,function(){r._prev=r._accessor(),r._placeholder(!1),s.addClass(g)}).on("blur"+y,function(){r._change(),r._placeholder(),s.removeClass(g)}).attr({autocomplete:"off",role:"textbox","aria-haspopup":!0}),r._enable(),r._popup(),r._old=r._accessor(),t[0].id&&t.attr("aria-owns",r.ul[0].id),r._aria(),r._placeholder(),n.notify(r)},options:{name:"AutoComplete",enable:!0,suggest:!1,template:"",dataTextField:"",minLength:1,delay:200,height:200,filter:"startswith",ignoreCase:!0,highlightFirst:!1,separator:null,placeholder:"",animation:{}},_dataSource:function(){var e=this;e.dataSource&&e._refreshHandler?e._unbindDataSource():e._refreshHandler=x(e.refresh,e),e.dataSource=u.create(e.options.dataSource).bind("change",e._refreshHandler)},setDataSource:function(e){this.options.dataSource=e,this._dataSource()},events:["open","close","change","select","dataBinding","dataBound"],setOptions:function(e){d.fn.setOptions.call(this,e),this._template(),this._accessors(),this._aria()},enable:function(e){var t=this,a=t.element,s=t.wrapper.off(w);e===!1?(s.removeClass(_).addClass(m),a.attr(f,f).attr(h,!0)):(s.removeClass(m).addClass(_).on(w,t._toggleHover),a.removeAttr(f).attr(h,!1))},close:function(){var e=this;e.current(null),e.popup.close()},destroy:function(){var e=this;e.element.off(y),e.wrapper.off(y),d.fn.destroy.call(e)},refresh:function(){var a,s=this,r=s.ul[0],o=s.popup,l=s.options,i=s._data(),c=i.length;s.trigger("dataBinding"),r.innerHTML=n.render(s.template,i),s._height(c),o.visible()&&o._position(),c&&(l.highlightFirst&&s.current(e(r.firstChild)),l.suggest&&s.suggest(e(r.firstChild))),s._open&&(s._open=!1,a=c?"open":"close",s._typing&&s.element[0]!==document.activeElement&&(a="close"),o[a](),s._typing=t),s._touchScroller&&s._touchScroller.reset(),s._makeUnselectable(),s.trigger("dataBound")},select:function(e){this._select(e)},search:function(e){var t,a=this,r=a.options,o=r.ignoreCase,n=r.separator;e=e||a._accessor(),a._current=null,clearTimeout(a._typing),n&&(e=s(k(a.element[0]),e,n)),t=e.length,t?t>=a.options.minLength&&(a._open=!0,a.dataSource.filter({value:o?e.toLowerCase():e,operator:r.filter,field:r.dataTextField,ignoreCase:o})):a.popup.close()},suggest:function(e){var s,r=this,o=r._last,n=r._accessor(),l=r.element[0],i=k(l),c=r.options.separator,u=n.split(c),h=a(i,n,c),_=i;return o==p.BACKSPACE||o==p.DELETE?(r._last=t,t):(e=e||"","string"!=typeof e&&(s=d.inArray(e[0],r.ul[0]),e=s>-1?r._text(r._data()[s]):""),0>=i&&(i=n.toLowerCase().indexOf(e.toLowerCase())+1),s=n.substring(0,i).lastIndexOf(c),s=s>-1?i-(s+c.length):i,n=u[h].substring(0,s),e&&(s=e.toLowerCase().indexOf(n.toLowerCase()),s>-1&&(e=e.substring(s+n.length),_=i+e.length,n+=e),c&&""!==u[u.length-1]&&u.push("")),u[h]=n,r._accessor(u.join(c||"")),b(l,i,_),t)},value:function(e){return e===t?this._accessor():(this._accessor(e),this._old=e,t)},_accessor:function(e){var a=this,s=a.element[0];return e===t?(e=s.value,s.className.indexOf("k-readonly")>-1?e===a.options.placeholder?"":e:e):(s.value=e,a._placeholder(),t)},_accept:function(e){var t=this;t._focus(e),o(t.element[0])},_keydown:function(t){var a=this,s=a.ul[0],r=t.keyCode,o=a._current,n=a.popup.visible();a._last=r,r===p.DOWN?(n&&a._move(o?o.next():e(s.firstChild)),t.preventDefault()):r===p.UP?(n&&a._move(o?o.prev():e(s.lastChild)),t.preventDefault()):r===p.ENTER||r===p.TAB?(r===p.ENTER&&a.popup.visible()&&t.preventDefault(),a._accept(o)):r===p.ESC?(a.popup.visible()&&t.preventDefault(),a.close()):a._search()},_move:function(e){var t=this;e=e[0]?e:null,t.current(e),t.options.suggest&&t.suggest(e)},_placeholder:function(e){if(!i){var a,s=this,r=s.element,o=s.options.placeholder;if(o){if(a=r.val(),e===t&&(e=!a),e||(o=a!==o?a:""),a===s._old&&!e)return;r.toggleClass("k-readonly",e).val(o)}}},_search:function(){var e=this;clearTimeout(e._typing),e._typing=setTimeout(function(){e._prev!==e._accessor()&&(e._prev=e._accessor(),e.search())},e.options.delay)},_select:function(t){var a,s,o=this,n=o.options.separator,l=o._data();t=e(t),t[0]&&!t.hasClass(v)&&(s=d.inArray(t[0],o.ul[0]),s>-1&&(l=l[s],a=o._text(l),n&&(a=r(k(o.element[0]),o._accessor(),a,n)),o._accessor(a),o.current(t.addClass(v))))},_toggleHover:function(t){e(t.currentTarget).toggleClass(C,"mouseenter"===t.type)},_wrapper:function(){var e,t=this,a=t.element,s=a[0];e=a.parent(),e.is("span.k-widget")||(e=a.wrap("<span />").parent()),e.attr("tabindex",-1),e.attr("role","presentation"),e[0].style.cssText=s.style.cssText,a.css({width:"100%",height:s.style.height}),t._focused=t.element,t.wrapper=e.addClass("k-widget k-autocomplete k-header").addClass(s.className)}});c.plugin(S)})(window.kendo.jQuery);
|
@@ -1,10 +1,11 @@
|
|
1
1
|
/*
|
2
|
-
* Kendo UI Web v2012.
|
2
|
+
* Kendo UI Web v2012.3.1114 (http://kendoui.com)
|
3
3
|
* Copyright 2012 Telerik AD. All rights reserved.
|
4
4
|
*
|
5
|
-
* Kendo UI Web commercial licenses may be obtained at
|
5
|
+
* Kendo UI Web commercial licenses may be obtained at
|
6
|
+
* https://www.kendoui.com/purchase/license-agreement/kendo-ui-web-commercial.aspx
|
6
7
|
* If you do not own a commercial license, this file shall be governed by the
|
7
8
|
* GNU General Public License (GPL) version 3.
|
8
9
|
* For GPL requirements, please review: http://www.gnu.org/copyleft/gpl.html
|
9
10
|
*/
|
10
|
-
;(function(a,b){function F(a,b){var c=a.element,d=c[0].kendoBindingTarget;d&&B(c,d.source,b)}function E(b){var c,d;b=a(b);for(c=0,d=b.length;c<d;c++)D(b[c])}function D(a){var b,c,d=a.children;C(a);if(d)for(b=0,c=d.length;b<c;b++)D(d[b])}function C(b){var c=b.kendoBindingTarget;c&&(c.destroy(),a.support.deleteExpando?delete b.kendoBindingTarget:b.removeAttribute?b.removeAttribute("kendoBindingTarget"):b.kendoBindingTarget=null)}function B(b,d,e){var f,g;d=c.observable(d),b=a(b);for(f=0,g=b.length;f<g;f++)A(b[f],d,e)}function A(a,b,d){var e=a.getAttribute("data-"+c.ns+"role"),f,g=a.getAttribute("data-"+c.ns+"bind"),h=a.children,i=!0,j,k={},l;d||(d=c.ui),(e||g)&&C(a),e&&(l=v(e,a,d)),g&&(g=y(g.replace(x,"")),l||(k=c.parseOptions(a,{textField:"",valueField:"",template:"",valueUpdate:n}),l=new s(a,k)),l.source=b,j=z(g,b,o),k.template&&(j.template=new q(b,"",k.template)),j.click&&(g.events=g.events||{},g.events.click=g.click,delete j.click),j.source&&(i=!1),g.attr&&(j.attr=z(g.attr,b,o)),g.style&&(j.style=z(g.style,b,o)),g.events&&(j.events=z(g.events,b,p)),l.bind(j)),l&&(a.kendoBindingTarget=l);if(i&&h)for(f=0;f<h.length;f++)A(h[f],b,d)}function z(a,b,c){var d,e={};for(d in a)e[d]=new c(b,a[d]);return e}function y(a){var b={},c,d,e,f,g,h,i;i=a.match(w);for(c=0,d=i.length;c<d;c++)e=i[c],f=e.indexOf(":"),g=e.substring(0,f),h=e.substring(f+1),h.charAt(0)=="{"&&(h=y(h)),b[g]=h;return b}function v(a,b,d){var e=d.roles,f=e[a];if(f)return new t(c.initWidget(b,f.options,e))}function u(a){var b,c,d=[];for(b=0,c=a.length;b<c;b++)a[b].hasSubgroups?d=d.concat(u(a[b].items)):d=d.concat(a[b].items);return d}var c=window.kendo,d=c.Observable,e=c.data.ObservableObject,f=c.data.ObservableArray,g={}.toString,h={},i=c.Class,j,k=a.proxy,l="value",m="checked",n="change";(function(){var a=document.createElement("a");a.innerText!==undefined?j="innerText":a.textContent!==undefined&&(j="textContent")})();var o=d.extend({init:function(a,b){var c=this;d.fn.init.call(c),c.source=a,c.path=b,c.dependencies={},c.dependencies[b]=!0,c.observable=c.source instanceof d,c._access=function(a){c.dependencies[a.field]=!0},c.observable&&(c._change=function(a){c.change(a)},c.source.bind(n,c._change))},change:function(a){var b,c,d,e=this;if(e.path==="this")e.trigger(n,a);else for(b in e.dependencies){c=b.indexOf(a.field);if(c===0){d=b.charAt(a.field.length);if(!d||d==="."||d==="["){e.trigger(n,a);break}}}},start:function(){this.observable&&this.source.bind("get",this._access)},stop:function(){this.observable&&this.source.unbind("get",this._access)},get:function(){var a=this,b=a.source,c,d=a.path,f=b;a.start();if(a.observable){f=b.get(d);while(f===undefined&&b)b=b.parent(),b instanceof e&&(f=b.get(d));typeof f=="function"&&(c=d.lastIndexOf("."),c>0&&(b=b.get(d.substring(0,c))),f=k(f,b),f=f(a.source)),b&&b!==a.source&&b.unbind(n,a._change).bind(n,a._change)}a.stop();return f},set:function(a){this.source.set(this.path,a)},destroy:function(){this.observable&&this.source.unbind(n,this._change)}}),p=o.extend({get:function(){var a=this.source,b=this.path,c;c=a.get(b);while(!c&&a)a=a.parent(),a instanceof e&&(c=a.get(b));return k(c,a)}}),q=o.extend({init:function(a,b,c){var d=this;o.fn.init.call(d,a,b),d.template=c},render:function(a){var b;this.start(),b=c.render(this.template,a),this.stop();return b}}),r=i.extend({init:function(a,b,c){this.element=a,this.bindings=b,this.options=c},bind:function(a,b){var c=this;a=b?a[b]:a,a.bind(n,function(a){c.refresh(b||a)}),c.refresh(b)},destroy:function(){}});h.attr=r.extend({refresh:function(a){this.element.setAttribute(a,this.bindings.attr[a].get())}}),h.style=r.extend({refresh:function(a){this.element.style[a]=this.bindings.style[a].get()}}),h.enabled=r.extend({refresh:function(){this.bindings.enabled.get()?this.element.removeAttribute("disabled"):this.element.setAttribute("disabled","disabled")}}),h.disabled=r.extend({refresh:function(){this.bindings.disabled.get()?this.element.setAttribute("disabled","disabled"):this.element.removeAttribute("disabled")}}),h.events=r.extend({init:function(a,b,c){r.fn.init.call(this,a,b,c),this.handlers={}},refresh:function(b){var c=this.bindings.events[b],d=this.handlers[b]=c.get();a(this.element).bind(b,c.source,d)},destroy:function(){var b=a(this.element),c;for(c in this.handlers)b.unbind(c,this.handlers[c])}}),h.text=r.extend({refresh:function(){var a=this.bindings.text.get();a==null&&(a=""),this.element[j]=a}}),h.visible=r.extend({refresh:function(){this.bindings.visible.get()?this.element.style.display="":this.element.style.display="none"}}),h.invisible=r.extend({refresh:function(){this.bindings.invisible.get()?this.element.style.display="none":this.element.style.display=""}}),h.html=r.extend({refresh:function(){this.element.innerHTML=this.bindings.html.get()}}),h.value=r.extend({init:function(b,c,d){r.fn.init.call(this,b,c,d),this._change=k(this.change,this),this.eventName=d.valueUpdate||n,a(this.element).bind(this.eventName,this._change),this._initChange=!1},change:function(){this._initChange=this.eventName!=n,this.bindings[l].set(this.element.value),this._initChange=!1},refresh:function(){if(!this._initChange){var a=this.bindings[l].get();a==null&&(a=""),this.element.value=a}this._initChange=!1},destroy:function(){a(this.element).unbind(this.eventName,this._change)}}),h.source=r.extend({init:function(a,b,c){r.fn.init.call(this,a,b,c)},refresh:function(a){var b=this,c=b.bindings.source.get();c instanceof f?(a=a||{},a.action=="add"?b.add(a.index,a.items):a.action=="remove"?b.remove(a.index,a.items):a.action!="itemchange"&&b.render()):b.render()},container:function(){var a=this.element;a.nodeName.toLowerCase()=="table"&&(a.tBodies[0]||a.appendChild(document.createElement("tbody")),a=a.tBodies[0]);return a},template:function(){var a=this.options,b=a.template,d=this.container().nodeName.toLowerCase();b||(d=="select"?a.valueField||a.textField?b=c.format('<option value="#:{0}#">#:{1}#</option>',a.valueField||a.textField,a.textField||a.valueField):b="<option>#:data#</option>":d=="tbody"?b="<tr><td>#:data#</td></tr>":d=="ul"||d=="ol"?b="<li>#:data#</li>":b="#:data#",b=c.template(b));return b},destroy:function(){var a=this.bindings.source.get();a.unbind(n,this._change)},add:function(b,d){var e=this.container(),f,g,h,i=e.cloneNode(!1),j=e.children[b];a(i).html(c.render(this.template(),d));if(i.children.length)for(f=0,g=d.length;f<g;f++)h=i.children[0],e.insertBefore(h,j||null),A(h,d[f])},remove:function(a,b){var c,d=this.container();for(c=0;c<b.length;c++)d.removeChild(d.children[a])},render:function(){var b=this.bindings.source.get(),d,e,h=this.container(),i=this.template(),j;!(b instanceof f)&&g.call(b)!=="[object Array]"&&(b.parent&&(j=b.parent),b=new f([b]),b.parent&&(b.parent=j));if(this.bindings.template){a(h).html(this.bindings.template.render(b));if(h.children.length)for(d=0,e=b.length;d<e;d++)A(h.children[d],b[d])}else a(h).html(c.render(i,b))}}),h.input={checked:r.extend({init:function(b,c,d){r.fn.init.call(this,b,c,d),this._change=k(this.change,this),a(this.element).change(this._change)},change:function(){var a=this.element,b=this.value();if(a.type=="radio")this.bindings[m].set(b);else if(a.type=="checkbox"){var c=this.bindings[m].get(),d;c instanceof f?b!==!1&&b!==!0&&(d=c.indexOf(b),d>-1?c.splice(d,1):c.push(b)):this.bindings[m].set(b)}},refresh:function(){var a=this.bindings[m].get(),b=this.element;b.type=="checkbox"?(a instanceof f&&a.indexOf(this.value(b))>=0&&(a=!0),b.checked=a===!0):b.type=="radio"&&a!=null&&b.value===a.toString()&&(b.checked=!0)},value:function(){var a=this.element,b=a.value;a.type=="checkbox"&&(b=="on"||b=="off"||b==="true")&&(b=a.checked);return b},destroy:function(){a(this.element).unbind(n,this._change)}})},h.select={value:r.extend({init:function(b,c,d){r.fn.init.call(this,b,c,d),this._change=k(this.change,this),a(this.element).change(this._change)},change:function(){var a=[],b=this.element,c,d=this.options.valueField||this.options.textField,g,h,i,j,k;for(j=0,k=b.options.length;j<k;j++)g=b.options[j],g.selected&&(i=g.attributes.value,i&&i.specified?i=g.value:i=g.text,a.push(i));if(d){c=this.bindings.source.get();for(h=0;h<a.length;h++)for(j=0,k=c.length;j<k;j++)if(c[j].get(d)==a[h]){a[h]=c[j];break}}i=this.bindings[l].get(),i instanceof f?i.splice.apply(i,[0,i.length].concat(a)):i instanceof e||!d?this.bindings[l].set(a[0]):this.bindings[l].set(a[0].get(d))},refresh:function(){var a,b=this.element,c=b.options,d=this.bindings[l].get(),g=d,h=this.options.valueField||this.options.textField,i;g instanceof f||(g=new f([d]));for(var j=0;j<g.length;j++){d=g[j],h&&d instanceof e&&(d=d.get(h));for(a=0;a<c.length;a++)i=c[a].value,i===""&&d!==""&&(i=c[a].text),i==d&&(c[a].selected=!0)}},destroy:function(){a(this.element).unbind(n,this._change)}})},h.widget={events:r.extend({init:function(a,b,c){r.fn.init.call(this,a.element[0],b,c),this.widget=a,this.handlers={}},refresh:function(a){var b=this.bindings.events[a],c=b.get();this.handlers[a]=function(a){a.data=b.source,c(a)},this.widget.bind(a,this.handlers[a])},destroy:function(){var a;for(a in this.handlers)this.widget.unbind(a,this.handlers[a])}}),checked:r.extend({init:function(a,b,c){r.fn.init.call(this,a.element[0],b,c),this.widget=a,this._change=k(this.change,this),this.widget.bind(n,this._change)},change:function(){this.bindings[m].set(this.value())},refresh:function(){this.widget.check(this.bindings[m].get()===!0)},value:function(){var a=this.element,b=a.value;if(b=="on"||b=="off")b=a.checked;return b},destroy:function(){this.widget.unbind(n,this._change)}}),visible:r.extend({init:function(a,b,c){r.fn.init.call(this,a.element[0],b,c),this.widget=a},refresh:function(){var a=this.bindings.visible.get();this.widget.wrapper[0].style.display=a?"":"none"}}),invisible:r.extend({init:function(a,b,c){r.fn.init.call(this,a.element[0],b,c),this.widget=a},refresh:function(){var a=this.bindings.invisible.get();this.widget.wrapper[0].style.display=a?"none":""}}),enabled:r.extend({init:function(a,b,c){r.fn.init.call(this,a.element[0],b,c),this.widget=a},refresh:function(){this.widget.enable&&this.widget.enable(this.bindings.enabled.get())}}),disabled:r.extend({init:function(a,b,c){r.fn.init.call(this,a.element[0],b,c),this.widget=a},refresh:function(){this.widget.enable&&this.widget.enable(!this.bindings.disabled.get())}}),source:r.extend({init:function(a,b,c){var d=this;r.fn.init.call(d,a.element[0],b,c),d.widget=a,d._dataBinding=k(d.dataBinding,d),d._dataBound=k(d.dataBound,d),d._itemChange=k(d.itemChange,d)},itemChange:function(a){A(a.item[0],a.data,a.ns||c.ui)},dataBinding:function(){var a,b,c=this.widget,d=c.items();for(a=0,b=d.length;a<b;a++)D(d[a])},dataBound:function(a){var b,d,e=this.widget,f=e.items(),g=e.dataSource,h=g.view(),i=a.ns||c.ui,j=g.group()||[];if(f.length){j.length&&(h=u(h));for(b=0,d=h.length;b<d;b++)A(f[b],h[b],i)}},refresh:function(a){var b=this,d,e=b.widget;a=a||{},a.action||(b.destroy(),e.bind("dataBinding",b._dataBinding),e.bind("dataBound",b._dataBound),e.bind("itemChange",b._itemChange),e.dataSource instanceof c.data.DataSource&&(d=b.bindings.source.get(),d instanceof c.data.DataSource?e.setDataSource(d):e.dataSource.data(d)))},destroy:function(){var a=this.widget;a.unbind("dataBinding",this._dataBinding),a.unbind("dataBound",this._dataBound),a.unbind("itemChange",this._itemChange)}}),value:r.extend({init:function(b,c,d){r.fn.init.call(this,b.element[0],c,d),this.widget=b,this._change=a.proxy(this.change,this),this.widget.first(n,this._change);var f=this.bindings.value.get();this._valueIsObservableObject=f==null||f instanceof e},change:function(){var a=this.widget.value(),b,d,e=this.options.dataValueField||this.options.dataTextField;if(e){var f,g=this._valueIsObservableObject;this.bindings.source&&(f=this.bindings.source.get());if(a===""&&g)a=null;else{if(!f||f instanceof c.data.DataSource)f=this.widget.dataSource.view();for(b=0,d=f.length;b<d;b++)if(f[b].get(e)==a){g?a=f[b]:a=f[b].get(e);break}}}this.bindings.value.set(a)},refresh:function(){var a=this.options.dataValueField||this.options.dataTextField,b=this.bindings.value.get();a&&b instanceof e&&(b=b.get(a)),this.widget.value(b)},destroy:function(){this.widget.unbind(n,this._change)}})};var s=i.extend({init:function(a,b){this.target=a,this.options=b,this.toDestroy=[]},bind:function(a){var b=this.target.nodeName.toLowerCase(),c,d=h[b]||{};for(c in a)this.applyBinding(c,a,d)},applyBinding:function(a,b,c){var d=c[a]||h[a],e=this.toDestroy,f,g=b[a];if(d){d=new d(this.target,b,this.options),e.push(d);if(g instanceof o)d.bind(g),e.push(g);else for(f in g)d.bind(g,f),e.push(g[f])}else if(a!=="template")throw new Error("The "+a+" binding is not supported by the "+this.target.nodeName.toLowerCase()+" element")},destroy:function(){var a,b,c=this.toDestroy;for(a=0,b=c.length;a<b;a++)c[a].destroy()}}),t=s.extend({bind:function(a){var b=this,c,d=!1,e=!1;for(c in a)c==l?d=!0:c=="source"?e=!0:b.applyBinding(c,a);e&&b.applyBinding("source",a),d&&b.applyBinding(l,a)},applyBinding:function(a,b){var c=h.widget[a],d=this.toDestroy,e,f=b[a];if(!c)throw new Error("The "+a+" binding is not supported by the "+this.target.options.name+" widget");c=new c(this.target,b,this.target.options),d.push(c);if(f instanceof o)c.bind(f),d.push(f);else for(e in f)c.bind(f,e),d.push(f[e])}}),w=/[A-Za-z0-9_\-]+:(\{([^}]*)\}|[^,}]+)/g,x=/\s/g;c.unbind=E,c.bind=B,c.data.binders=h,c.data.Binder=r,c.notify=F,c.observable=function(a){a instanceof e||(a=new e(a));return a}})(jQuery);
|
11
|
+
(function(e){function t(e){var n,i,s=[];for(n=0,i=e.length;i>n;n++)s=e[n].hasSubgroups?s.concat(t(e[n].items)):s.concat(e[n].items);return s}function n(e,t,n){var i=n[e];return i?new T(u.initWidget(t,i.options,n)):void 0}function i(e){var t,n,s,a,r,o,h,d={};for(h=e.match(D),t=0,n=h.length;n>t;t++)s=h[t],a=s.indexOf(":"),r=s.substring(0,a),o=s.substring(a+1),"{"==o.charAt(0)&&(o=i(o)),d[r]=o;return d}function s(e,t,n){var i,s={};for(i in e)s[i]=new n(t,e[i]);return s}function a(e,t,r){var h,d,l,c=e.getAttribute("data-"+u.ns+"role"),g=e.getAttribute("data-"+u.ns+"bind"),f=e.children,b=!0,v={};if((c||g)&&o(e),c&&(l=n(c,e,r)),g&&(g=i(g.replace(N,"")),l||(v=u.parseOptions(e,{textField:"",valueField:"",template:"",valueUpdate:k}),v.roles=r,l=new O(e,v)),l.source=t,d=s(g,t,C),v.template&&(d.template=new S(t,"",v.template)),d.click&&(g.events=g.events||{},g.events.click=g.click,delete d.click),d.source&&(b=!1),g.attr&&(d.attr=s(g.attr,t,C)),g.style&&(d.style=s(g.style,t,C)),g.events&&(d.events=s(g.events,t,F)),l.bind(d)),l&&(e.kendoBindingTarget=l),b&&f)for(h=0;f.length>h;h++)a(f[h],t,r)}function r(t,n){var i,s,r=u.rolesFromNamespaces([].slice.call(arguments,2));for(n=u.observable(n),t=e(t),i=0,s=t.length;s>i;i++)a(t[i],n,r)}function o(t){var n=t.kendoBindingTarget;n&&(n.destroy(),e.support.deleteExpando?delete t.kendoBindingTarget:t.removeAttribute?t.removeAttribute("kendoBindingTarget"):t.kendoBindingTarget=null)}function h(e){var t,n,i=e.children;if(o(e),i)for(t=0,n=i.length;n>t;t++)h(i[t])}function d(t){var n,i;for(t=e(t),n=0,i=t.length;i>n;n++)h(t[n])}function l(e,t){var n=e.element,i=n[0].kendoBindingTarget;i&&r(n,i.source,t)}var c,u=window.kendo,g=u.Observable,f=u.data.ObservableObject,b=u.data.ObservableArray,v={}.toString,p={},m=u.Class,y=e.proxy,x="value",w="source",_="events",B="checked",k="change";(function(){var e=document.createElement("a");void 0!==e.innerText?c="innerText":void 0!==e.textContent&&(c="textContent")})();var C=g.extend({init:function(e,t){var n=this;g.fn.init.call(n),n.source=e,n.path=t,n.dependencies={},n.dependencies[t]=!0,n.observable=n.source instanceof g,n._access=function(e){n.dependencies[e.field]=!0},n.observable&&(n._change=function(e){n.change(e)},n.source.bind(k,n._change))},change:function(e){var t,n,i,s=this;if("this"===s.path)s.trigger(k,e);else for(t in s.dependencies)if(n=t.indexOf(e.field),0===n&&(i=t.charAt(e.field.length),!i||"."===i||"["===i)){s.trigger(k,e);break}},start:function(){this.observable&&this.source.bind("get",this._access)},stop:function(){this.observable&&this.source.unbind("get",this._access)},get:function(){var e,t=this,n=t.source,i=t.path,s=n;if(t.start(),t.observable){for(s=n.get(i);void 0===s&&n;)n=n.parent(),n instanceof f&&(s=n.get(i));"function"==typeof s&&(e=i.lastIndexOf("."),e>0&&(n=n.get(i.substring(0,e))),s=y(s,n),s=s(t.source)),n&&n!==t.source&&(t.currentSource=n,n.unbind(k,t._change).bind(k,t._change))}return t.stop(),s},set:function(e){var t=this,n=t.currentSource||t.source;n.set(t.path,e)},destroy:function(){this.observable&&this.source.unbind(k,this._change)}}),F=C.extend({get:function(){var e,t=this.source,n=this.path;for(e=t.get(n);!e&&t;)t=t.parent(),t instanceof f&&(e=t.get(n));return y(e,t)}}),S=C.extend({init:function(e,t,n){var i=this;C.fn.init.call(i,e,t),i.template=n},render:function(e){var t;return this.start(),t=u.render(this.template,e),this.stop(),t}}),A=m.extend({init:function(e,t,n){this.element=e,this.bindings=t,this.options=n},bind:function(e,t){var n=this;e=t?e[t]:e,e.bind(k,function(e){n.refresh(t||e)}),n.refresh(t)},destroy:function(){}});p.attr=A.extend({refresh:function(e){this.element.setAttribute(e,this.bindings.attr[e].get())}}),p.style=A.extend({refresh:function(e){this.element.style[e]=this.bindings.style[e].get()}}),p.enabled=A.extend({refresh:function(){this.bindings.enabled.get()?this.element.removeAttribute("disabled"):this.element.setAttribute("disabled","disabled")}}),p.readonly=A.extend({refresh:function(){this.bindings.readonly.get()?this.element.setAttribute("readonly","readonly"):this.element.removeAttribute("readonly")}}),p.disabled=A.extend({refresh:function(){this.bindings.disabled.get()?this.element.setAttribute("disabled","disabled"):this.element.removeAttribute("disabled")}}),p.events=A.extend({init:function(e,t,n){A.fn.init.call(this,e,t,n),this.handlers={}},refresh:function(t){var n=e(this.element),i=this.bindings.events[t],s=this.handlers[t];s&&n.off(t,s),s=this.handlers[t]=i.get(),n.on(t,i.source,s)},destroy:function(){var t,n=e(this.element);for(t in this.handlers)n.off(t,this.handlers[t])}}),p.text=A.extend({refresh:function(){var e=this.bindings.text.get();null==e&&(e=""),this.element[c]=e}}),p.visible=A.extend({refresh:function(){this.element.style.display=this.bindings.visible.get()?"":"none"}}),p.invisible=A.extend({refresh:function(){this.element.style.display=this.bindings.invisible.get()?"none":""}}),p.html=A.extend({refresh:function(){this.element.innerHTML=this.bindings.html.get()}}),p.value=A.extend({init:function(t,n,i){A.fn.init.call(this,t,n,i),this._change=y(this.change,this),this.eventName=i.valueUpdate||k,e(this.element).on(this.eventName,this._change),this._initChange=!1},change:function(){this._initChange=this.eventName!=k,this.bindings[x].set(this.element.value),this._initChange=!1},refresh:function(){if(!this._initChange){var e=this.bindings[x].get();null==e&&(e=""),this.element.value=e}this._initChange=!1},destroy:function(){e(this.element).off(this.eventName,this._change)}}),p.source=A.extend({init:function(e,t,n){A.fn.init.call(this,e,t,n)},refresh:function(e){var t=this,n=t.bindings.source.get();n instanceof b?(e=e||{},"add"==e.action?t.add(e.index,e.items):"remove"==e.action?t.remove(e.index,e.items):"itemchange"!=e.action&&t.render()):t.render()},container:function(){var e=this.element;return"table"==e.nodeName.toLowerCase()&&(e.tBodies[0]||e.appendChild(document.createElement("tbody")),e=e.tBodies[0]),e},template:function(){var e=this.options,t=e.template,n=this.container().nodeName.toLowerCase();return t||(t="select"==n?e.valueField||e.textField?u.format('<option value="#:{0}#">#:{1}#</option>',e.valueField||e.textField,e.textField||e.valueField):"<option>#:data#</option>":"tbody"==n?"<tr><td>#:data#</td></tr>":"ul"==n||"ol"==n?"<li>#:data#</li>":"#:data#",t=u.template(t)),t},destroy:function(){var e=this.bindings.source.get();e.unbind(k,this._change)},add:function(t,n){var i,s,r,o=this.container(),h=o.cloneNode(!1),d=o.children[t];if(e(h).html(u.render(this.template(),n)),h.children.length)for(i=0,s=n.length;s>i;i++)r=h.children[0],o.insertBefore(r,d||null),a(r,n[i],this.options.roles)},remove:function(e,t){var n,i=this.container();for(n=0;t.length>n;n++)i.removeChild(i.children[e])},render:function(){var t,n,i,s=this.bindings.source.get(),r=this.container(),o=this.template();if(s instanceof b||"[object Array]"===v.call(s)||(s.parent&&(i=s.parent),s=new b([s]),s.parent&&(s.parent=i)),this.bindings.template){if(e(r).html(this.bindings.template.render(s)),r.children.length)for(t=0,n=s.length;n>t;t++)a(r.children[t],s[t],this.options.roles)}else e(r).html(u.render(o,s))}}),p.input={checked:A.extend({init:function(t,n,i){A.fn.init.call(this,t,n,i),this._change=y(this.change,this),e(this.element).change(this._change)},change:function(){var e=this.element,t=this.value();if("radio"==e.type)this.bindings[B].set(t);else if("checkbox"==e.type){var n,i=this.bindings[B].get();i instanceof b?(t=this.element.value,"on"!==t&&"off"!==t&&(n=i.indexOf(t),n>-1?i.splice(n,1):i.push(t))):this.bindings[B].set(t)}},refresh:function(){var e=this.bindings[B].get(),t=e,n=this.element;"checkbox"==n.type?(t instanceof b&&(e=this.element.value,t.indexOf(e)>=0&&(e=!0)),n.checked=e===!0):"radio"==n.type&&null!=e&&n.value===""+e&&(n.checked=!0)},value:function(){var e=this.element,t=e.value;return"checkbox"==e.type&&(t=e.checked),t},destroy:function(){e(this.element).off(k,this._change)}})},p.select={value:A.extend({init:function(t,n,i){A.fn.init.call(this,t,n,i),this._change=y(this.change,this),e(this.element).change(this._change)},change:function(){var e,t,n,i,s,a,r=[],o=this.element,h=this.options.valueField||this.options.textField;for(s=0,a=o.options.length;a>s;s++)t=o.options[s],t.selected&&(i=t.attributes.value,i=i&&i.specified?t.value:t.text,r.push(i));if(h)for(e=this.bindings.source.get(),n=0;r.length>n;n++)for(s=0,a=e.length;a>s;s++)if(e[s].get(h)==r[n]){r[n]=e[s];break}i=this.bindings[x].get(),i instanceof b?i.splice.apply(i,[0,i.length].concat(r)):i instanceof f||!h?this.bindings[x].set(r[0]):this.bindings[x].set(r[0].get(h))},refresh:function(){var e,t,n=this.element,i=n.options,s=this.bindings[x].get(),a=s,r=this.options.valueField||this.options.textField;a instanceof b||(a=new b([s]));for(var o=0;a.length>o;o++)for(s=a[o],r&&s instanceof f&&(s=s.get(r)),e=0;i.length>e;e++)t=i[e].value,""===t&&""!==s&&(t=i[e].text),t==s&&(i[e].selected=!0)},destroy:function(){e(this.element).off(k,this._change)}})},p.widget={events:A.extend({init:function(e,t,n){A.fn.init.call(this,e.element[0],t,n),this.widget=e,this.handlers={}},refresh:function(e){var t=this.bindings.events[e],n=this.handlers[e];n&&this.widget.unbind(e,n),n=t.get(),this.handlers[e]=function(e){e.data=t.source,n(e),e.data===t.source&&delete e.data},this.widget.bind(e,this.handlers[e])},destroy:function(){var e;for(e in this.handlers)this.widget.unbind(e,this.handlers[e])}}),checked:A.extend({init:function(e,t,n){A.fn.init.call(this,e.element[0],t,n),this.widget=e,this._change=y(this.change,this),this.widget.bind(k,this._change)},change:function(){this.bindings[B].set(this.value())},refresh:function(){this.widget.check(this.bindings[B].get()===!0)},value:function(){var e=this.element,t=e.value;return("on"==t||"off"==t)&&(t=e.checked),t},destroy:function(){this.widget.unbind(k,this._change)}}),visible:A.extend({init:function(e,t,n){A.fn.init.call(this,e.element[0],t,n),this.widget=e},refresh:function(){var e=this.bindings.visible.get();this.widget.wrapper[0].style.display=e?"":"none"}}),invisible:A.extend({init:function(e,t,n){A.fn.init.call(this,e.element[0],t,n),this.widget=e},refresh:function(){var e=this.bindings.invisible.get();this.widget.wrapper[0].style.display=e?"none":""}}),enabled:A.extend({init:function(e,t,n){A.fn.init.call(this,e.element[0],t,n),this.widget=e},refresh:function(){this.widget.enable&&this.widget.enable(this.bindings.enabled.get())}}),disabled:A.extend({init:function(e,t,n){A.fn.init.call(this,e.element[0],t,n),this.widget=e},refresh:function(){this.widget.enable&&this.widget.enable(!this.bindings.disabled.get())}}),source:A.extend({init:function(e,t,n){var i=this;A.fn.init.call(i,e.element[0],t,n),i.widget=e,i._dataBinding=y(i.dataBinding,i),i._dataBound=y(i.dataBound,i),i._itemChange=y(i.itemChange,i)},itemChange:function(e){a(e.item[0],e.data,(e.ns||u.ui).roles)},dataBinding:function(){var e,t,n=this.widget,i=n.items();for(e=0,t=i.length;t>e;e++)h(i[e])},dataBound:function(e){var n,i,s=this.widget,r=s.items(),o=s.dataSource,h=o.view(),d=e.ns||u.ui,l=o.group()||[];if(r.length)for(l.length&&(h=t(h)),n=0,i=h.length;i>n;n++)a(r[n],h[n],d.roles)},refresh:function(e){var t,n=this,i=n.widget;e=e||{},e.action||(n.destroy(),i.bind("dataBinding",n._dataBinding),i.bind("dataBound",n._dataBound),i.bind("itemChange",n._itemChange),i.dataSource instanceof u.data.DataSource&&(t=n.bindings.source.get(),t instanceof u.data.DataSource?i.setDataSource(t):t&&t._dataSource?i.setDataSource(t._dataSource):i.dataSource.data(t)))},destroy:function(){var e=this.widget;e.unbind("dataBinding",this._dataBinding),e.unbind("dataBound",this._dataBound),e.unbind("itemChange",this._itemChange)}}),value:A.extend({init:function(t,n,i){A.fn.init.call(this,t.element[0],n,i),this.widget=t,this._change=e.proxy(this.change,this),this.widget.first(k,this._change);var s=this.bindings.value.get();this._valueIsObservableObject=null==s||s instanceof f},change:function(){var e,t,n=this.widget.value(),i=this.options.dataValueField||this.options.dataTextField;if(i){var s,a=this._valueIsObservableObject;if(this.bindings.source&&(s=this.bindings.source.get()),""===n&&a)n=null;else for((!s||s instanceof u.data.DataSource)&&(s=this.widget.dataSource.view()),e=0,t=s.length;t>e;e++)if(s[e].get(i)==n){n=a?s[e]:s[e].get(i);break}}this.bindings.value.set(n)},refresh:function(){var e=this.options.dataValueField||this.options.dataTextField,t=this.bindings.value.get();e&&t instanceof f&&(t=t.get(e)),this.widget.value(t)},destroy:function(){this.widget.unbind(k,this._change)}})};var O=m.extend({init:function(e,t){this.target=e,this.options=t,this.toDestroy=[]},bind:function(e){var t,n,i,s,a=this.target.nodeName.toLowerCase(),r=p[a]||{};for(t in e)t==x?n=!0:t==w?i=!0:t==_?s=!0:this.applyBinding(t,e,r);i&&this.applyBinding(w,e,r),n&&this.applyBinding(x,e,r),s&&this.applyBinding(_,e,r)},applyBinding:function(e,t,n){var i,s=n[e]||p[e],a=this.toDestroy,r=t[e];if(s)if(s=new s(this.target,t,this.options),a.push(s),r instanceof C)s.bind(r),a.push(r);else for(i in r)s.bind(r,i),a.push(r[i]);else if("template"!==e)throw Error("The "+e+" binding is not supported by the "+this.target.nodeName.toLowerCase()+" element")},destroy:function(){var e,t,n=this.toDestroy;for(e=0,t=n.length;t>e;e++)n[e].destroy()}}),T=O.extend({bind:function(e){var t,n=this,i=!1,s=!1;for(t in e)t==x?i=!0:t==w?s=!0:n.applyBinding(t,e);s&&n.applyBinding(w,e),i&&n.applyBinding(x,e)},applyBinding:function(e,t){var n,i=p.widget[e],s=this.toDestroy,a=t[e];if(!i)throw Error("The "+e+" binding is not supported by the "+this.target.options.name+" widget");if(i=new i(this.target,t,this.target.options),s.push(i),a instanceof C)i.bind(a),s.push(a);else for(n in a)i.bind(a,n),s.push(a[n])}}),D=/[A-Za-z0-9_\-]+:(\{([^}]*)\}|[^,}]+)/g,N=/\s/g;u.unbind=d,u.bind=r,u.data.binders=p,u.data.Binder=A,u.notify=l,u.observable=function(e){return e instanceof f||(e=new f(e)),e},u.observableHierarchy=function(e){function t(e){var n,i;for(n=0;e.length>n;n++)e[n]._initChildren(),i=e[n].children,i.fetch(),e[n].items=i.data(),t(e[n].items)}var n=u.data.HierarchicalDataSource.create(e);return n.fetch(),t(n.data()),n._data._dataSource=n,n._data}})(window.kendo.jQuery);
|
@@ -1,10 +1,11 @@
|
|
1
1
|
/*
|
2
|
-
* Kendo UI Web v2012.
|
2
|
+
* Kendo UI Web v2012.3.1114 (http://kendoui.com)
|
3
3
|
* Copyright 2012 Telerik AD. All rights reserved.
|
4
4
|
*
|
5
|
-
* Kendo UI Web commercial licenses may be obtained at
|
5
|
+
* Kendo UI Web commercial licenses may be obtained at
|
6
|
+
* https://www.kendoui.com/purchase/license-agreement/kendo-ui-web-commercial.aspx
|
6
7
|
* If you do not own a commercial license, this file shall be governed by the
|
7
8
|
* GNU General Public License (GPL) version 3.
|
8
9
|
* For GPL requirements, please review: http://www.gnu.org/copyleft/gpl.html
|
9
10
|
*/
|
10
|
-
;(function(a,b){function ba(a,b){if(a)return a.getFullYear()===b.getFullYear()&&a.getMonth()===b.getMonth()&&a.getDate()===b.getDate();return!1}function _(a,b){for(var c=0,d=b.length;c<d;c++)if(a===+b[c])return!0;return!1}function $(a){o&&a.find("*").attr("unselectable","on")}function Z(a){var c=N[a.start],d=N[a.depth],e=i(a.culture);a.format=g(a.format||e.calendars.standard.patterns.d),isNaN(c)&&(c=0,a.start=t);if(d===b||d>c)a.depth=t}function Y(a){return i(a).calendars.standard}function X(a){a.preventDefault()}function W(b){b.stopImmediatePropagation(),a(this).toggleClass(y,b.type=="mouseenter")}function V(a,b,c){b=b instanceof M?b.getFullYear():a.getFullYear()+c*b,a.setFullYear(b)}function U(a,b){return a.slice(b).concat(a.slice(0,b))}function T(a,b,c){return+a>=+b&&+a<=+c}function S(a,b,c){var d=new M;d=new M(d.getFullYear(),d.getMonth(),d.getDate()),a&&(d=new M(a)),b>d?d=new M(b):c<d&&(d=new M(c));return d}function R(a,b,c){var d=a.getFullYear(),e=b.getFullYear(),f=e,g=0;c&&(e=e-e%c,f=e-e%c+c-1),d>f?g=1:d<e&&(g=-1);return g}function Q(a){var b=0,c,d=a.min,e=a.max,f=a.start,g=a.setter,h=a.build,i=a.cells||12,j=a.perRow||4,k=a.content||m,l=a.empty||n,o=a.html||'<table class="k-content k-meta-view" cellspacing="0"><tbody><tr>';for(;b<i;b++)b>0&&b%j===0&&(o+="</tr><tr>"),c=h(f,b),o+=T(f,d,e)?k(c):l(c),g(f,1);return o+"</tr></tbody></table>"}var c=window.kendo,d=c.ui,e=d.Widget,f=c.parseDate,g=c._extractFormat,h=c.template,i=c.getCulture,j=c.support.touch,k=c.support.transitions,l=k?k.css+"transform-origin":"",m=h('<td#=data.cssClass#><a class="k-link" href="\\#" data-#=data.ns#value="#=data.dateString#">#=data.value#</a></td>',{useWithBlock:!1}),n=h("<td> </td>",{useWithBlock:!1}),o=a.browser.msie&&parseInt(a.browser.version,10)<9,p=j?"touchend":"click",q="min",r="left",s="slide",t="month",u="century",v="change",w="navigate",x="value",y="k-state-hover",z="k-state-disabled",A="k-other-month",B=' class="'+A+'"',C="k-nav-today",D="td:has(.k-link)",E=j?"touchstart":"mouseenter",F=j?"touchend":"mouseleave",G=6e4,H=864e5,I="_prevArrow",J="_nextArrow",K=a.proxy,L=a.extend,M=Date,N={month:0,year:1,decade:2,century:3},O=e.extend({init:function(a,b){var d=this,f;e.fn.init.call(d,a,b),a=d.wrapper=d.element,b=d.options,b.url=window.unescape(b.url),a.addClass("k-widget k-calendar"),d._templates(),d._header(),d._footer(d.footer),a.delegate(D,E+" "+F,W).delegate(D,p,K(d._click,d)),f=b.value,Z(b),d._index=N[b.start],d._current=new M(S(f,b.min,b.max)),d.value(f),c.notify(d)},options:{name:"Calendar",value:null,min:new M(1900,0,1),max:new M(2099,11,31),dates:[],url:"",culture:"",footer:"",format:"",month:{},start:t,depth:t,animation:{horizontal:{effects:s,duration:500,divisor:2},vertical:{effects:"zoomIn",duration:400}}},events:[v,w],setOptions:function(a){Z(a),e.fn.setOptions.call(this,a)},min:function(a){return this._option(q,a)},max:function(a){return this._option("max",a)},navigateToPast:function(){this._navigate(I,-1)},navigateToFuture:function(){this._navigate(J,1)},navigateUp:function(){var a=this,b=a._index;a._title.hasClass(z)||a.navigate(a._current,++b)},navigateDown:function(a){var b=this,c=b._index,d=b.options.depth;if(!!a){if(c===N[d]){+b._value!=+a&&(b.value(a),b.trigger(v));return}b.navigate(a,--c)}},navigate:function(c,d){d=isNaN(d)?N[d]:d;var e=this,f=e.options,g=f.culture,h=f.min,i=f.max,j=e._title,k=e._table,l=e._value,m=e._current,n=c&&+c>+m,o=d!==b&&d!==e._index,p,q,r;c?e._current=c=new M(S(c,h,i)):c=m,d===b?d=e._index:e._index=d,e._view=q=P.views[d],r=q.compare,j.toggleClass(z,d===N[u]),e[I].toggleClass(z,r(c,h)<1),e[J].toggleClass(z,r(c,i)>-1);if(!k||e._changeView)j.html(q.title(c,g)),e._table=p=a(q.content(L({min:h,max:i,date:c,url:f.url,dates:f.dates,format:f.format,culture:g},e[q.name]))),$(p),e._animate({from:k,to:p,vertical:o,future:n}),e.trigger(w);d===N[f.depth]&&l&&e._class("k-state-selected",q.toDateString(l)),e._changeView=!0},value:function(a){var c=this,d=c._view,e=c.options,g=e.min,h=e.max;if(a===b)return c._value;a=f(a,e.format,e.culture),a!==null&&(a=new M(a),T(a,g,h)||(a=null)),c._value=a,c._changeView=!a||d&&d.compare(a,c._current)!==0,c.navigate(a)},_animate:function(a){var b=this,c=a.from,d=a.to;c?c.parent().data("animating")?(c.parent().kendoStop(!0,!0).remove(),c.remove(),d.insertAfter(b.element[0].firstChild)):!c.is(":visible")||b.options.animation===!1?(d.insertAfter(c),c.remove()):b[a.vertical?"_vertical":"_horizontal"](c,d,a.future):d.insertAfter(b.element[0].firstChild)},_horizontal:function(a,b,c){var d=this,e=d.options.animation.horizontal,f=e.effects,g=a.outerWidth();f&&f.indexOf(s)!=-1&&(a.add(b).css({width:g}),a.wrap("<div/>"),a.parent().css({position:"relative",width:g*2,"float":r,left:c?0:-g}),b[c?"insertAfter":"insertBefore"](a),L(e,{effects:s+":"+(c?r:"right"),complete:function(){a.remove(),b.unwrap()}}),a.parent().kendoStop(!0,!0).kendoAnimate(e))},_vertical:function(a,b){var c=this,d=c.options.animation.vertical,e=d.effects,f,g;e&&e.indexOf("zoom")!=-1&&(b.css({position:"absolute",top:a.prev().outerHeight(),left:0}).insertBefore(a),l&&(f=c._cellByDate(c._view.toDateString(c._current)),g=f.position(),g=g.left+parseInt(f.width()/2,10)+"px"+" "+(g.top+parseInt(f.height()/2,10)+"px"),b.css(l,g)),a.kendoStop(!0,!0).kendoAnimate({effects:"fadeOut",duration:600,complete:function(){a.remove(),b.css({position:"static",top:0,left:0})}}),b.kendoStop(!0,!0).kendoAnimate(d))},_cellByDate:function(b){return this._table.find("td:not(."+A+")").filter(function(){return a(this.firstChild).attr(c.attr(x))===b})},_class:function(b,d){this._table.find("td:not(."+A+")").removeClass(b).filter(function(){return a(this.firstChild).attr(c.attr(x))===d}).addClass(b)},_click:function(b){var d=this,e=d.options,f=d._current,g=a(b.currentTarget.firstChild),h=g.attr(c.attr(x)).split("/");h=new M(h[0],h[1],h[2]),g[0].href.indexOf("#")!=-1&&b.preventDefault(),g.parent().hasClass(A)?f=h:d._view.setDate(f,h),d.navigateDown(S(f,e.min,e.max))},_focus:function(a){var b=this,c=b._view;c.compare(a,b._current)!==0?b.navigate(a):b._current=a,b._class("k-state-focused",c.toDateString(a))},_footer:function(b){var d=this,e=d.element,f=new M,g=e.find(".k-footer");b?(g[0]||(g=a('<div class="k-footer"><a href="#" class="k-link k-nav-today"></a></div>').appendTo(e)),d._today=g.show().find(".k-link").html(b(f)).attr("title",c.toString(f,"D",d.options.culture)),d._toggle()):(d._toggle(!1),g.hide())},_header:function(){var a=this,b=a.element,c;b.find(".k-header")[0]||b.html('<div class="k-header"><a href="#" class="k-link k-nav-prev"><span class="k-icon k-i-arrow-w"></span></a><a href="#" class="k-link k-nav-fast"></a><a href="#" class="k-link k-nav-next"><span class="k-icon k-i-arrow-e"></span></a></div>'),c=b.find(".k-link").bind(E+" "+F,W).click(!1),a._title=c.eq(1).bind(p,K(a.navigateUp,a)),a[I]=c.eq(0).bind(p,K(a.navigateToPast,a)),a[J]=c.eq(2).bind(p,K(a.navigateToFuture,a))},_navigate:function(a,b){var c=this,d=c._index+1,e=new M(c._current);a=c[a],a.hasClass(z)||(d>3?e.setFullYear(e.getFullYear()+100*b):P.views[d].setDate(e,b),c.navigate(e))},_option:function(a,c){var d=this,e=d.options,g=+d._value,h,i;if(c===b)return e[a];c=f(c,e.format,e.culture);!c||(e[a]=new M(c),i=d._view.compare(c,d._current),a===q?(h=+c>g,i=i>-1):(h=g>+c,i=i<1),h?d.value(null):i&&d.navigate(),d._toggle())},_toggle:function(a){var c=this,d=c.options,e=c._today;a===b&&(a=T(new M,d.min,d.max)),e&&(e.unbind(p),a?e.addClass(C).removeClass(z).bind(p,K(c._todayClick,c)):e.removeClass(C).addClass(z).bind(p,X))},_todayClick:function(a){var b=this,c=N[b.options.depth],d=new M;a.preventDefault(),b._view.compare(b._current,d)===0&&b._index==c&&(b._changeView=!1),b._value=d,b.navigate(d,c),b.trigger(v)},_templates:function(){var a=this,b=a.options,d=b.footer,e=b.month,f=e.content,g=e.empty;a.month={content:h('<td#=data.cssClass#><a class="k-link#=data.linkClass#" href="#=data.url#" '+c.attr("value")+'="#=data.dateString#" title="#=data.title#">'+(f||"#=data.value#")+"</a></td>",{useWithBlock:!!f}),empty:h("<td>"+(g||" ")+"</td>",{useWithBlock:!!g})},d!==!1&&(a.footer=h(d||'#= kendo.toString(data,"D","'+b.culture+'") #',{useWithBlock:!1}))}});d.plugin(O);var P={firstDayOfMonth:function(a){return new M(a.getFullYear(),a.getMonth(),1)},firstVisibleDay:function(a,b){b=b||c.culture().calendar;var d=b.firstDay,e=new M(a.getFullYear(),a.getMonth(),0,a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds());while(e.getDay()!=d)P.setTime(e,-1*H);return e},setTime:function(a,b){var c=a.getTimezoneOffset(),d=new M(a.getTime()+b),e=d.getTimezoneOffset()-c;a.setTime(d.getTime()+e*G)},views:[{name:t,title:function(a,b){return Y(b).months.names[a.getMonth()]+" "+a.getFullYear()},content:function(a){var b=this,d=0,e=a.min,f=a.max,g=a.date,h=a.dates,i=a.format,j=a.culture,k=a.url,l=k&&h[0],m=Y(j),n=m.firstDay,o=m.days,p=U(o.names,n),q=U(o.namesShort,n),r=P.firstVisibleDay(g,m),s=b.first(g),t=b.last(g),u=b.toDateString,v=new M,w='<table class="k-content" cellspacing="0"><thead><tr>';for(;d<7;d++)w+='<th scope="col" title="'+p[d]+'">'+q[d]+"</th>";v=+(new M(v.getFullYear(),v.getMonth(),v.getDate()));return Q({cells:42,perRow:7,html:w+="</tr></thead><tbody><tr>",start:new M(r.getFullYear(),r.getMonth(),r.getDate()),min:new M(e.getFullYear(),e.getMonth(),e.getDate()),max:new M(f.getFullYear(),f.getMonth(),f.getDate()),content:a.content,empty:a.empty,setter:b.setDate,build:function(a,b){var d=[],e=a.getDay(),f="",g="#";(a<s||a>t)&&d.push(A),+a===v&&d.push("k-today"),(e===0||e===6)&&d.push("k-weekend"),l&&_(+a,h)&&(g=k.replace("{0}",c.toString(a,i,j)),f=" k-action-link");return{date:a,dates:h,ns:c.ns,title:c.toString(a,"D",j),value:a.getDate(),dateString:u(a),cssClass:d[0]?' class="'+d.join(" ")+'"':"",linkClass:f,url:g}}})},first:function(a){return P.firstDayOfMonth(a)},last:function(a){return new M(a.getFullYear(),a.getMonth()+1,0)},compare:function(a,b){var c,d=a.getMonth(),e=a.getFullYear(),f=b.getMonth(),g=b.getFullYear();e>g?c=1:e<g?c=-1:c=d==f?0:d>f?1:-1;return c},setDate:function(a,b){b instanceof M?a.setFullYear(b.getFullYear(),b.getMonth(),b.getDate()):P.setTime(a,b*H)},toDateString:function(a){return a.getFullYear()+"/"+a.getMonth()+"/"+a.getDate()}},{name:"year",title:function(a){return a.getFullYear()},content:function(a){var b=Y(a.culture).months.namesAbbr,d=this.toDateString,e=a.min,f=a.max;return Q({min:new M(e.getFullYear(),e.getMonth(),1),max:new M(f.getFullYear(),f.getMonth(),1),start:new M(a.date.getFullYear(),0,1),setter:this.setDate,build:function(a){return{value:b[a.getMonth()],ns:c.ns,dateString:d(a),cssClass:""}}})},first:function(a){return new M(a.getFullYear(),0,a.getDate())},last:function(a){return new M(a.getFullYear(),11,a.getDate())},compare:function(a,b){return R(a,b)},setDate:function(a,b){if(b instanceof M)a.setFullYear(b.getFullYear(),b.getMonth(),a.getDate());else{var c=a.getMonth()+b;a.setMonth(c),c>11&&(c-=12),c>0&&a.getMonth()!=c&&a.setDate(0)}},toDateString:function(a){return a.getFullYear()+"/"+a.getMonth()+"/1"}},{name:"decade",title:function(a){var b=a.getFullYear();b=b-b%10;return b+"-"+(b+9)},content:function(a){var b=a.date.getFullYear(),d=this.toDateString;return Q({start:new M(b-b%10-1,0,1),min:new M(a.min.getFullYear(),0,1),max:new M(a.max.getFullYear(),0,1),setter:this.setDate,build:function(a,b){return{value:a.getFullYear(),ns:c.ns,dateString:d(a),cssClass:b===0||b==11?B:""}}})},first:function(a){var b=a.getFullYear();return new M(b-b%10,a.getMonth(),a.getDate())},last:function(a){var b=a.getFullYear();return new M(b-b%10+9,a.getMonth(),a.getDate())},compare:function(a,b){return R(a,b,10)},setDate:function(a,b){V(a,b,1)},toDateString:function(a){return a.getFullYear()+"/0/1"}},{name:u,title:function(a){var b=a.getFullYear();b=b-b%100;return b+"-"+(b+99)},content:function(a){var b=a.date.getFullYear(),d=a.min.getFullYear(),e=a.max.getFullYear(),f=this.toDateString;d=d-d%10,e=e-e%10,e-d<10&&(e=d+9);return Q({start:new M(b-b%100-10,0,1),min:new M(d,0,1),max:new M(e,0,1),setter:this.setDate,build:function(a,b){var d=a.getFullYear();return{value:d+" - "+(d+9),ns:c.ns,dateString:f(a),cssClass:b===0||b==11?B:""}}})},first:function(a){var b=a.getFullYear();return new M(b-b%100,a.getMonth(),a.getDate())},last:function(a){var b=a.getFullYear();return new M(b-b%100+99,a.getMonth(),a.getDate())},compare:function(a,b){return R(a,b,100)},setDate:function(a,b){V(a,b,10)},toDateString:function(a){var b=a.getFullYear();return b-b%10+"/0/1"}}]};P.isEqualDatePart=ba,P.makeUnselectable=$,P.restrictValue=S,P.isInRange=T,P.normalize=Z,P.viewsEnum=N,c.calendar=P})(jQuery);
|
11
|
+
(function(t,e){function n(t){for(var e,n=0,a=t.min,r=t.max,o=t.start,s=t.setter,l=t.build,u=t.cells||12,c=t.perRow||4,f=t.content||b,d=t.empty||C,g=t.html||'<table tabindex="0" role="grid" class="k-content k-meta-view" cellspacing="0"><tbody><tr role="row">';u>n;n++)n>0&&0===n%c&&(g+='</tr><tr role="row">'),e=l(o,n),g+=i(o,a,r)?f(e):d(e),s(o,1);return g+"</tr></tbody></table>"}function a(t,e,n){var a=t.getFullYear(),r=e.getFullYear(),i=r,o=0;return n&&(r-=r%n,i=r-r%n+n-1),a>i?o=1:r>a&&(o=-1),o}function r(t,e,n){var a=new ue;return a=new ue(a.getFullYear(),a.getMonth(),a.getDate()),t&&(a=new ue(+t)),e>a?a=new ue(+e):a>n&&(a=new ue(+n)),a}function i(t,e,n){return+t>=+e&&+n>=+t}function o(t,e){return t.slice(e).concat(t.slice(0,e))}function s(t,e,n){e=e instanceof ue?e.getFullYear():t.getFullYear()+n*e,t.setFullYear(e)}function l(e){-1===e.type.indexOf("touch")&&e.stopImmediatePropagation(),t(this).toggleClass(V,Z.indexOf(e.type)>-1||e.type==J)}function u(t){t.preventDefault()}function c(t){return y(t).calendars.standard}function f(t){var n=ce[t.start],a=ce[t.depth],r=y(t.culture);t.format=D(t.format||r.calendars.standard.patterns.d),isNaN(n)&&(n=0,t.start=H),(a===e||a>n)&&(t.depth=H),t.dates||(t.dates=[])}function d(t){S&&t.find("*").attr("unselectable","on")}function g(t,e){for(var n=0,a=e.length;a>n;n++)if(t===+e[n])return!0;return!1}function v(t,e){return t?t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate():!1}var h=window.kendo,m=h.ui,_=m.Widget,p=h.parseDate,w=h._adjustDate,k=h.keys,D=h._extractFormat,F=h.template,y=h.getCulture,x=h.support.transitions,Y=x?x.css+"transform-origin":"",b=F('<td#=data.cssClass# role="gridcell"><a tabindex="-1" class="k-link" href="\\#" data-#=data.ns#value="#=data.dateString#">#=data.value#</a></td>',{useWithBlock:!1}),C=F('<td role="gridcell"> </td>',{useWithBlock:!1}),M=h.support.browser,S=M.msie&&(9>parseInt(M.version,10)||document.documentMode&&9>document.documentMode),T=".kendoCalendar",O="touchend"+T+" click"+T,A="keydown"+T,P="id",z="min",E="left",I="slideIn",H="month",N="century",W="change",B="navigate",U="value",V="k-state-hover",R="k-state-disabled",q="k-state-focused",G="k-other-month",j=' class="'+G+'"',L="k-nav-today",K="td:has(.k-link)",Q="blur"+T,J="focus",X=J+T,Z="touchstart mouseenter",$="touchstart"+T+" mouseenter"+T,te="touchend"+T+" mouseleave"+T,ee=6e4,ne=864e5,ae="_prevArrow",re="_nextArrow",ie="aria-disabled",oe="aria-selected",se=t.proxy,le=t.extend,ue=Date,ce={month:0,year:1,decade:2,century:3},fe=_.extend({init:function(e,n){var a,i,o=this;_.fn.init.call(o,e,n),e=o.wrapper=o.element,n=o.options,n.url=window.unescape(n.url),o._templates(),o._header(),o._footer(o.footer),i=e.addClass("k-widget k-calendar").on($+" "+te,K,l).on(A,"table.k-content",se(o._move,o)).on(O,K,function(e){var n=e.currentTarget.firstChild;-1!=n.href.indexOf("#")&&e.preventDefault(),o._click(t(n))}).attr(P),i&&(o._cellID=i+"_cell_selected"),a=n.value,f(n),o._index=ce[n.start],o._current=new ue(+r(a,n.min,n.max)),o._addClassProxy=function(){o._cell.addClass(q)},o._removeClassProxy=function(){o._cell.removeClass(q)},o.value(a),h.notify(o)},options:{name:"Calendar",value:null,min:new ue(1900,0,1),max:new ue(2099,11,31),dates:[],url:"",culture:"",footer:"",format:"",month:{},start:H,depth:H,animation:{horizontal:{effects:I,reverse:!0,duration:500,divisor:2},vertical:{effects:"zoomIn",duration:400}}},events:[W,B],setOptions:function(t){f(t),_.fn.setOptions.call(this,t)},destroy:function(){var t=this,e=t._today.off(T);t.element.off(T),t._title.off(T),t[ae].off(T),t[re].off(T),h.destroy(e),h.destroy(t._view),_.fn.destroy.call(t)},focus:function(t){t=t||this._table,this.options.focusOnNav!==!1&&(t.focus(),this._bindTable(t))},min:function(t){return this._option(z,t)},max:function(t){return this._option("max",t)},navigateToPast:function(){this._navigate(ae,-1)},navigateToFuture:function(){this._navigate(re,1)},navigateUp:function(){var t=this,e=t._index;t._title.hasClass(R)||t.navigate(t._current,++e)},navigateDown:function(t){var n=this,a=n._index,r=n.options.depth;if(t)return a===ce[r]?(+n._value!=+t&&(n.value(t),n.trigger(W)),e):(n.navigate(t,--a),e)},navigate:function(n,a){a=isNaN(a)?ce[a]:a;var i,o,s,l,u=this,c=u.options,f=c.culture,g=c.min,v=c.max,h=u._title,m=u._table,_=u._value,p=u._current,w=n&&+n>+p,k=a!==e&&a!==u._index;n?u._current=n=new ue(+r(n,g,v)):n=p,a===e?a=u._index:u._index=a,u._view=o=de.views[a],s=o.compare,l=a===ce[N],h.toggleClass(R,l).attr(ie,l),l=1>s(n,g),u[ae].toggleClass(R,l).attr(ie,l),l=s(n,v)>-1,u[re].toggleClass(R,l).attr(ie,l),(!m||u._changeView)&&(h.html(o.title(n,f)),u._table=i=t(o.content(le({min:g,max:v,date:n,url:c.url,dates:c.dates,format:c.format,culture:f},u[o.name]))),d(i),u._animate({from:m,to:i,vertical:k,future:w}),u._focus(n),u.trigger(B)),a===ce[c.depth]&&_&&u._class("k-state-selected",o.toDateString(_)),u._class(q,o.toDateString(n)),!m&&u._cell&&u._cell.removeClass(q),u._changeView=!0},value:function(t){var n=this,a=n._view,r=n.options,o=r.min,s=r.max;return t===e?n._value:(t=p(t,r.format,r.culture),null!==t&&(t=new ue(+t),i(t,o,s)||(t=null)),n._value=t,n._changeView=!t||a&&0!==a.compare(t,n._current),n.navigate(t),e)},_move:function(e){var n,a,i,o=this,s=o.options,l=e.keyCode,u=o._view,c=o._index,f=new ue(+o._current);return e.ctrlKey?l==k.RIGHT?(o.navigateToFuture(),a=!0):l==k.LEFT?(o.navigateToPast(),a=!0):l==k.UP?(o.navigateUp(),a=!0):l==k.DOWN&&(o._click(t(o._cell[0].firstChild)),a=!0):(l==k.RIGHT?(n=1,a=!0):l==k.LEFT?(n=-1,a=!0):l==k.UP?(n=0===c?-7:-4,a=!0):l==k.DOWN?(n=0===c?7:4,a=!0):l==k.ENTER?(o._click(t(o._cell[0].firstChild)),a=!0):l==k.HOME||l==k.END?(i=l==k.HOME?"first":"last",f=u[i](f),a=!0):l==k.PAGEUP?(a=!0,o.navigateToPast()):l==k.PAGEDOWN&&(a=!0,o.navigateToFuture()),(n||i)&&(i||u.setDate(f,n),o._focus(r(f,s.min,s.max)))),a&&e.preventDefault(),o._current},_animate:function(t){var e=this,n=t.from,a=t.to;n?n.parent().data("animating")?(n.parent().kendoStop(!0,!0).remove(),n.remove(),a.insertAfter(e.element[0].firstChild),e.focus()):n.is(":visible")&&e.options.animation!==!1?e[t.vertical?"_vertical":"_horizontal"](n,a,t.future):(a.insertAfter(n),e.focus(),n.remove()):(a.insertAfter(e.element[0].firstChild),e._bindTable(a))},_horizontal:function(t,e,n){var a=this,r=a.options.animation.horizontal,i=r.effects,o=t.outerWidth();i&&-1!=i.indexOf(I)&&(t.add(e).css({width:o}),t.wrap("<div/>"),a.focus(t),t.parent().css({position:"relative",width:2*o,"float":E,left:n?0:-o}),e[n?"insertAfter":"insertBefore"](t),le(r,{effects:I+":"+(n?"right":E),complete:function(){t.remove(),e.unwrap(),a.focus()}}),t.parent().kendoStop(!0,!0).kendoAnimate(r))},_vertical:function(t,e){var n,a,r=this,i=r.options.animation.vertical,o=i.effects;o&&-1!=o.indexOf("zoom")&&(e.css({position:"absolute",top:t.prev().outerHeight(),left:0}).insertBefore(t),Y&&(n=r._cellByDate(r._view.toDateString(r._current)),a=n.position(),a=a.left+parseInt(n.width()/2,10)+"px"+" "+(a.top+parseInt(n.height()/2,10)+"px"),e.css(Y,a)),t.kendoStop(!0,!0).kendoAnimate({effects:"fadeOut",duration:600,complete:function(){t.remove(),e.css({position:"static",top:0,left:0}),r.focus()}}),e.kendoStop(!0,!0).kendoAnimate(i))},_cellByDate:function(e){return this._table.find("td:not(."+G+")").filter(function(){return t(this.firstChild).attr(h.attr(U))===e})},_class:function(e,n){var a=this,r=a._cellID,i=a._cell;i&&i.removeAttr(oe).removeAttr(P),i=a._table.find("td:not(."+G+")").removeClass(e).filter(function(){return t(this.firstChild).attr(h.attr(U))===n}).addClass(e).attr(oe,!0),i[0]&&(a._cell=i),r&&(i.attr(P,r),a._table.removeAttr("aria-activedescendant").attr("aria-activedescendant",r))},_bindTable:function(t){t.on(X,this._addClassProxy).on(Q,this._removeClassProxy)},_click:function(t){var e=this,n=e.options,a=e._current,i=t.attr(h.attr(U)).split("/");i=new ue(i[0],i[1],i[2]),w(i),t.parent().hasClass(G)?a=i:e._view.setDate(a,i),e.navigateDown(r(a,n.min,n.max))},_focus:function(t){var e=this,n=e._view;0!==n.compare(t,e._current)?e.navigate(t):(e._current=t,e._class(q,n.toDateString(t)))},_footer:function(n){var a=this,r=a.element,i=new ue,o=r.find(".k-footer");return n?(o[0]||(o=t('<div class="k-footer"><a href="#" class="k-link k-nav-today"></a></div>').appendTo(r)),a._today=o.show().find(".k-link").html(n(i)).attr("title",h.toString(i,"D",a.options.culture)),a._toggle(),e):(a._toggle(!1),o.hide(),e)},_header:function(){var t,e=this,n=e.element;n.find(".k-header")[0]||n.html('<div class="k-header"><a href="#" role="button" class="k-link k-nav-prev"><span class="k-icon k-i-arrow-w"></span></a><a href="#" role="button" aria-live="assertive" aria-atomic="true" class="k-link k-nav-fast"></a><a href="#" role="button" class="k-link k-nav-next"><span class="k-icon k-i-arrow-e"></span></a></div>'),t=n.find(".k-link").on($+" "+te+" "+X+" "+Q,l).click(!1),e._title=t.eq(1).on(O,se(e.navigateUp,e)),e[ae]=t.eq(0).on(O,se(e.navigateToPast,e)),e[re]=t.eq(2).on(O,se(e.navigateToFuture,e))},_navigate:function(t,e){var n=this,a=n._index+1,r=new ue(+n._current);t=n[t],t.hasClass(R)||(a>3?r.setFullYear(r.getFullYear()+100*e):de.views[a].setDate(r,e),n.navigate(r))},_option:function(t,n){var a,r,i=this,o=i.options,s=+i._value;return n===e?o[t]:(n=p(n,o.format,o.culture),n&&(o[t]=new ue(+n),r=i._view.compare(n,i._current),t===z?(a=+n>s,r=r>-1):(a=s>+n,r=1>r),a?i.value(null):r&&i.navigate(),i._toggle()),e)},_toggle:function(t){var n=this,a=n.options,r=n._today;t===e&&(t=i(new ue,a.min,a.max)),r&&(r.off(O),t?r.addClass(L).removeClass(R).on(O,se(n._todayClick,n)):r.removeClass(L).addClass(R).on(O,u))},_todayClick:function(t){var e=this,n=ce[e.options.depth],a=new ue;t.preventDefault(),0===e._view.compare(e._current,a)&&e._index==n&&(e._changeView=!1),e._value=a,e.navigate(a,n),e.trigger(W)},_templates:function(){var t=this,e=t.options,n=e.footer,a=e.month,r=a.content,i=a.empty;t.month={content:F('<td#=data.cssClass# role="gridcell"><a tabindex="-1" class="k-link#=data.linkClass#" href="#=data.url#" '+h.attr("value")+'="#=data.dateString#" title="#=data.title#">'+(r||"#=data.value#")+"</a></td>",{useWithBlock:!!r}),empty:F('<td role="gridcell">'+(i||" ")+"</td>",{useWithBlock:!!i})},n!==!1&&(t.footer=F(n||'#= kendo.toString(data,"D","'+e.culture+'") #',{useWithBlock:!1}))}});m.plugin(fe);var de={firstDayOfMonth:function(t){return new ue(t.getFullYear(),t.getMonth(),1)},firstVisibleDay:function(t,e){e=e||h.culture().calendar;for(var n=e.firstDay,a=new ue(t.getFullYear(),t.getMonth(),0,t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds());a.getDay()!=n;)de.setTime(a,-1*ne);return a},setTime:function(t,e){var n=t.getTimezoneOffset(),a=new ue(t.getTime()+e),r=a.getTimezoneOffset()-n;t.setTime(a.getTime()+r*ee)},views:[{name:H,title:function(t,e){return c(e).months.names[t.getMonth()]+" "+t.getFullYear()},content:function(t){for(var e=this,a=0,r=t.min,i=t.max,s=t.date,l=t.dates,u=t.format,f=t.culture,d=t.url,v=d&&l[0],m=c(f),_=m.firstDay,p=m.days,k=o(p.names,_),D=o(p.namesShort,_),F=de.firstVisibleDay(s,m),y=e.first(s),x=e.last(s),Y=e.toDateString,b=new ue,C='<table tabindex="0" role="grid" class="k-content" cellspacing="0"><thead><tr role="row">';7>a;a++)C+='<th scope="col" title="'+k[a]+'">'+D[a]+"</th>";return b=new ue(b.getFullYear(),b.getMonth(),b.getDate()),w(b),b=+b,n({cells:42,perRow:7,html:C+='</tr></thead><tbody><tr role="row">',start:new ue(F.getFullYear(),F.getMonth(),F.getDate()),min:new ue(r.getFullYear(),r.getMonth(),r.getDate()),max:new ue(i.getFullYear(),i.getMonth(),i.getDate()),content:t.content,empty:t.empty,setter:e.setDate,build:function(t){var e=[],n=t.getDay(),a="",r="#";return(y>t||t>x)&&e.push(G),+t===b&&e.push("k-today"),(0===n||6===n)&&e.push("k-weekend"),v&&g(+t,l)&&(r=d.replace("{0}",h.toString(t,u,f)),a=" k-action-link"),{date:t,dates:l,ns:h.ns,title:h.toString(t,"D",f),value:t.getDate(),dateString:Y(t),cssClass:e[0]?' class="'+e.join(" ")+'"':"",linkClass:a,url:r}}})},first:function(t){return de.firstDayOfMonth(t)},last:function(t){var e=new ue(t.getFullYear(),t.getMonth()+1,0),n=de.firstDayOfMonth(t),a=Math.abs(e.getTimezoneOffset()-n.getTimezoneOffset());return a&&e.setHours(n.getHours()+a/60),e},compare:function(t,e){var n,a=t.getMonth(),r=t.getFullYear(),i=e.getMonth(),o=e.getFullYear();return n=r>o?1:o>r?-1:a==i?0:a>i?1:-1},setDate:function(t,e){var n=t.getHours();e instanceof ue?t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()):de.setTime(t,e*ne),w(t,n)},toDateString:function(t){return t.getFullYear()+"/"+t.getMonth()+"/"+t.getDate()}},{name:"year",title:function(t){return t.getFullYear()},content:function(t){var e=c(t.culture).months.namesAbbr,a=this.toDateString,r=t.min,i=t.max;return n({min:new ue(r.getFullYear(),r.getMonth(),1),max:new ue(i.getFullYear(),i.getMonth(),1),start:new ue(t.date.getFullYear(),0,1),setter:this.setDate,build:function(t){return{value:e[t.getMonth()],ns:h.ns,dateString:a(t),cssClass:""}}})},first:function(t){return new ue(t.getFullYear(),0,t.getDate())},last:function(t){return new ue(t.getFullYear(),11,t.getDate())},compare:function(t,e){return a(t,e)},setDate:function(t,e){var n,a=t.getHours();e instanceof ue?(n=e.getMonth(),t.setFullYear(e.getFullYear(),n,t.getDate()),n!==t.getMonth()&&t.setDate(0)):(n=t.getMonth()+e,t.setMonth(n),n>11&&(n-=12),n>0&&t.getMonth()!=n&&t.setDate(0)),w(t,a)},toDateString:function(t){return t.getFullYear()+"/"+t.getMonth()+"/1"}},{name:"decade",title:function(t){var e=t.getFullYear();return e-=e%10,e+"-"+(e+9)},content:function(t){var e=t.date.getFullYear(),a=this.toDateString;return n({start:new ue(e-e%10-1,0,1),min:new ue(t.min.getFullYear(),0,1),max:new ue(t.max.getFullYear(),0,1),setter:this.setDate,build:function(t,e){return{value:t.getFullYear(),ns:h.ns,dateString:a(t),cssClass:0===e||11==e?j:""}}})},first:function(t){var e=t.getFullYear();return new ue(e-e%10,t.getMonth(),t.getDate())},last:function(t){var e=t.getFullYear();return new ue(e-e%10+9,t.getMonth(),t.getDate())},compare:function(t,e){return a(t,e,10)},setDate:function(t,e){s(t,e,1)},toDateString:function(t){return t.getFullYear()+"/0/1"}},{name:N,title:function(t){var e=t.getFullYear();return e-=e%100,e+"-"+(e+99)},content:function(t){var e=t.date.getFullYear(),a=t.min.getFullYear(),r=t.max.getFullYear(),i=this.toDateString;return a-=a%10,r-=r%10,10>r-a&&(r=a+9),n({start:new ue(e-e%100-10,0,1),min:new ue(a,0,1),max:new ue(r,0,1),setter:this.setDate,build:function(t,e){var n=t.getFullYear();return{value:n+" - "+(n+9),ns:h.ns,dateString:i(t),cssClass:0===e||11==e?j:""}}})},first:function(t){var e=t.getFullYear();return new ue(e-e%100,t.getMonth(),t.getDate())},last:function(t){var e=t.getFullYear();return new ue(e-e%100+99,t.getMonth(),t.getDate())},compare:function(t,e){return a(t,e,100)},setDate:function(t,e){s(t,e,10)},toDateString:function(t){var e=t.getFullYear();return e-e%10+"/0/1"}}]};de.isEqualDatePart=v,de.makeUnselectable=d,de.restrictValue=r,de.isInRange=i,de.normalize=f,de.viewsEnum=ce,h.calendar=de})(window.kendo.jQuery);
|
@@ -1,10 +1,11 @@
|
|
1
1
|
/*
|
2
|
-
* Kendo UI Web v2012.
|
2
|
+
* Kendo UI Web v2012.3.1114 (http://kendoui.com)
|
3
3
|
* Copyright 2012 Telerik AD. All rights reserved.
|
4
4
|
*
|
5
|
-
* Kendo UI Web commercial licenses may be obtained at
|
5
|
+
* Kendo UI Web commercial licenses may be obtained at
|
6
|
+
* https://www.kendoui.com/purchase/license-agreement/kendo-ui-web-commercial.aspx
|
6
7
|
* If you do not own a commercial license, this file shall be governed by the
|
7
8
|
* GNU General Public License (GPL) version 3.
|
8
9
|
* For GPL requirements, please review: http://www.gnu.org/copyleft/gpl.html
|
9
10
|
*/
|
10
|
-
|
11
|
+
(function(e,n){function s(n){return e.trim(n).replace(/ /gi,"")}var t=window.kendo,l=t.ui,i=e.proxy,o=e.extend,r=e.grep,a=e.map,u=e.inArray,c="k-state-selected",d="asc",f="desc",p="change",m="kendoPopup",k="kendoFilterMenu",h="kendoMenu",w=".kendoColumnMenu",b=/(\[|\]|\$|\.|\:|\+)/g,C=l.Widget,_=C.extend({init:function(n,s){var l,o=this;C.fn.init.call(o,n,s),n=o.element,s=o.options,o.owner=s.owner,o.dataSource=s.dataSource,o.field=n.attr(t.attr("field")),l=n.find(".k-header-column-menu"),l[0]||(l=n.prepend('<a class="k-header-column-menu" href="#"><span class="k-icon k-i-arrowhead-s"/></a>').find(".k-header-column-menu")),o.link=l.attr("tabindex",-1).on("click"+w,i(o._click,o)),o.wrapper=e('<div class="k-column-menu"/>'),o.wrapper.html(t.template(v)({ns:t.ns,messages:s.messages,sortable:s.sortable,filterable:s.filterable,columns:o._ownerColumns(),showColumns:s.columns})),o.popup=o.wrapper[m]({anchor:l,open:i(o._open,o),activate:i(o._activate,o),close:o.options.closeCallback}).data(m),o._menu(),o._sort(),o._columns(),o._filter()},options:{name:"ColumnMenu",messages:{sortAscending:"Sort Ascending",sortDescending:"Sort Descending",filter:"Filter",columns:"Columns"},columns:!0,sortable:!0,filterable:!0},destroy:function(){var e=this;C.fn.destroy.call(e),e.filterMenu&&e.filterMenu.destroy(),e.dataSource.unbind("refresh",e._refreshHandler),e.options.columns&&(e.owner.unbind("columnShow",e._updateColumnsMenuHandler),e.owner.unbind("columnHide",e._updateColumnsMenuHandler)),e.menu.element.off(w),e.menu.destroy(),e.wrapper.off(w),e.popup.destroy(),e.link.off(w)},close:function(){this.menu.close(),this.popup.close(),this.popup.element.off("keydown"+w)},_click:function(e){e.preventDefault(),e.stopPropagation(),this.popup.toggle()},_open:function(){var n=this;e(".k-column-menu").not(n.wrapper).each(function(){e(this).data(m).close()}),n.popup.element.on("keydown"+w,function(e){e.keyCode==t.keys.ESC&&n.close()})},_activate:function(){this.menu.element.focus()},_ownerColumns:function(){var e=this.owner.columns,n=r(e,function(e){var n=!0,t=s(e.title||"");return(e.menu===!1||!e.field&&!t.length)&&(n=!1),n});return a(n,function(n){return{field:n.field||n.title,title:n.title||n.field,hidden:n.hidden,index:u(n,e)}})},_menu:function(){this.menu=this.wrapper.children()[h]({orientation:"vertical",closeOnClick:!1}).data(h)},_sort:function(){var n=this;n.options.sortable&&(n.refresh(),n._refreshHandler=i(n.refresh,n),n.dataSource.bind(p,n._refreshHandler),n.menu.element.on("click"+w,".k-sort-asc, .k-sort-desc",function(){var s=e(this),t=s.hasClass("k-sort-asc")?d:f;s.parent().find(".k-sort-"+(t==d?f:d)).removeClass(c),n._sortDataSource(s,t),n.close()}))},_sortDataSource:function(e,s){var t,l,i=this,o=i.options.sortable,r=i.dataSource,a=r.sort()||[];if(e.hasClass(c)&&o&&o.allowUnsort!==!1?(e.removeClass(c),s=n):e.addClass(c),o===!0||"single"===o.mode)a=[{field:i.field,dir:s}];else{for(t=0,l=a.length;l>t;t++)if(a[t].field===i.field){a.splice(t,1);break}a.push({field:i.field,dir:s})}r.sort(a)},_columns:function(){var n=this;n.options.columns&&(n._updateColumnsMenu(),n._updateColumnsMenuHandler=i(n._updateColumnsMenu,n),n.owner.bind(["columnHide","columnShow"],n._updateColumnsMenuHandler),n.menu.bind("select",function(s){var l,i,o,a,c=e(s.item),d=n.owner.columns;c.parent().closest("li.k-columns-item")[0]&&(l=c.find(":checkbox"),l.attr("disabled")||(a=l.attr(t.attr("field")),o=r(d,function(e){return e.field==a||e.title==a})[0],i=u(o,d),o.hidden===!0?n.owner.showColumn(i):n.owner.hideColumn(i)))}))},_updateColumnsMenu:function(){var e="["+t.attr("field")+"=",n=this._ownerColumns(),s=a(n,function(n){return e+n.field.replace(b,"\\$1")+"]"}).join(","),l=r(n,function(e){return!e.hidden}),i=a(l,function(n){return e+n.field.replace(b,"\\$1")+"]"}).join(",");this.wrapper.find(s).attr("checked",!1),this.wrapper.find(i).attr("checked",!0).attr("disabled",1==l.length)},_filter:function(){var e=this,n=e.options;n.filterable!==!1&&(e.filterMenu=e.wrapper.find(".k-filterable")[k](o(!0,{},{appendToElement:!0,dataSource:n.dataSource,values:n.values,field:e.field},n.filterable)).data(k))},refresh:function(){var e,n,s,t=this,l=t.options.dataSource.sort()||[],i=t.field;for(t.wrapper.find(".k-sort-asc, .k-sort-desc").removeClass(c),n=0,s=l.length;s>n;n++)e=l[n],i==e.field&&t.wrapper.find(".k-sort-"+e.dir).addClass(c)}}),v='<ul>#if(sortable){#<li class="k-item k-sort-asc"><span class="k-link"><span class="k-sprite k-i-sort-asc"></span>${messages.sortAscending}</span></li><li class="k-item k-sort-desc"><span class="k-link"><span class="k-sprite k-i-sort-desc"></span>${messages.sortDescending}</span></li>#if(showColumns || filterable){#<li class="k-separator"></li>#}##}##if(showColumns){#<li class="k-item k-columns-item"><span class="k-link"><span class="k-sprite k-i-columns"></span>${messages.columns}</span><ul>#for (var col in columns) {#<li><input type="checkbox" data-#=ns#field="#=columns[col].field#" data-#=ns#index="#=columns[col].index#"/>#=columns[col].title#</li>#}#</ul></li>#if(filterable){#<li class="k-separator"></li>#}##}##if(filterable){#<li class="k-item k-filter-item"><span class="k-link"><span class="k-sprite k-filter"></span>${messages.filter}</span><ul><li><div class="k-filterable"></div></li></ul></li>#}#</ul>';l.plugin(_)})(window.kendo.jQuery);
|
@@ -1,10 +1,11 @@
|
|
1
1
|
/*
|
2
|
-
* Kendo UI Web v2012.
|
2
|
+
* Kendo UI Web v2012.3.1114 (http://kendoui.com)
|
3
3
|
* Copyright 2012 Telerik AD. All rights reserved.
|
4
4
|
*
|
5
|
-
* Kendo UI Web commercial licenses may be obtained at
|
5
|
+
* Kendo UI Web commercial licenses may be obtained at
|
6
|
+
* https://www.kendoui.com/purchase/license-agreement/kendo-ui-web-commercial.aspx
|
6
7
|
* If you do not own a commercial license, this file shall be governed by the
|
7
8
|
* GNU General Public License (GPL) version 3.
|
8
9
|
* For GPL requirements, please review: http://www.gnu.org/copyleft/gpl.html
|
9
10
|
*/
|
10
|
-
|
11
|
+
(function(e,t){var n=window.kendo,a=n.ui,s=a.List,o=a.Select,i=n.support,r=i.placeholder,l=o.removeFiltersForField,c=n.keys,u=".kendoComboBox",d="touchend"+u+" click"+u,p="disabled",_="change",h="k-state-default",f="k-state-disabled",g="k-state-focused",v="mousedown"+u+" touchstart"+u,x="select",m="aria-disabled",C="k-state-selected",y="filter",w="accept",b="rebind",k="mouseenter"+u+" mouseleave"+u,L=null,I=e.proxy,T=o.extend({init:function(t,a){var s,i,r=this;r.ns=u,a=e.isArray(a)?{dataSource:a}:a,o.fn.init.call(r,t,a),r._focusHandler=function(){r.input.focus()},a=r.options,t=r.element.on("focus"+u,r._focusHandler),a.placeholder=a.placeholder||t.attr("placeholder"),r._reset(),r._wrapper(),r._input(),r._popup(),r._accessors(),r._dataSource(),r._enable(),r._cascade(),s=r._inputWrapper,r.input.on("keydown"+u,I(r._keydown,r)).on("focus"+u,function(){s.addClass(g),r._placeholder(!1)}).on("blur"+u,function(){s.removeClass(g),clearTimeout(r._typing),r.options.text!==r.input.val()&&r.text(r.text()),r._placeholder(),r._blur(),t.blur()}).attr({role:"combobox","aria-expanded":!1}),r._aria(),r._oldIndex=r.selectedIndex=-1,r._old=r.value(),a.autoBind?r._filterSource():(i=a.text,!i&&t.is(x)&&(i=t.children(":selected").text()),i&&r.input.val(i)),i||r._placeholder(),n.notify(r)},options:{name:"ComboBox",enable:!0,index:-1,autoBind:!0,delay:200,dataTextField:"",dataValueField:"",minLength:0,height:200,highlightFirst:!0,template:"",filter:"none",placeholder:"",suggest:!1,ignoreCase:!0,animation:{}},events:["open","close",_,"select","dataBinding","dataBound"],setOptions:function(e){o.fn.setOptions.call(this,e),this._template(),this._accessors(),this._aria()},current:function(e){var n=this,a=n._current;return e===t?a:(a&&a.removeClass(C),o.fn.current.call(n,e),t)},destroy:function(){var e=this;e.input.off(u),e.element.off(u),e._inputWrapper.off(u),o.fn.destroy.call(e)},enable:function(e){var t=this,n=t.input.add(t.element),a=t._inputWrapper.off(k),s=t._arrow.parent().off(d+" "+v);e===!1?(a.removeClass(h).addClass(f),n.attr(p,p).attr(m,!0)):(a.removeClass(f).addClass(h).on(k,t._toggleHover),n.removeAttr(p).attr(m,!1),s.on(d,function(){t.toggle()}).on(v,function(e){e.preventDefault()}))},open:function(){var e=this,t=e.dataSource.options.serverFiltering;e.popup.visible()||(!e.ul[0].firstChild||e._state===w&&!t?(e._open=!0,e._state=b,e._filterSource()):(e.popup.open(),e._scroll(e._current)))},refresh:function(){var a,s,o,i=this,r=i.ul[0],l=i.options,c=i._state,u=i._data(),d=u.length;i.trigger("dataBinding"),r.innerHTML=n.render(i.template,u),i._height(d),i.popup.visible()&&i.popup._position(),i.element.is(x)&&(c===b&&(a=i.value(),i._state=""),o=i._option,i._option=t,i._options(u),o&&o[0].selected&&i._custom(o.val())),d&&(l.highlightFirst&&i.current(e(r.firstChild)),l.suggest&&i.input.val()&&i._valueCalled!==t&&i.suggest(e(r.firstChild))),i._open&&(i._open=!1,s=!!d,i._typing&&i.input[0]!==document.activeElement&&(s=!1),i.toggle(s),i._typing=t),i._touchScroller&&i._touchScroller.reset(),i._makeUnselectable(),(!i._valueCalled&&c!==y||c===b)&&i._selectItem(a),i._valueCalled=!1,i._hideBusy(),i.trigger("dataBound")},select:function(e){var n=this;return e===t?n.selectedIndex:(n._select(e),n._old=n._accessor(),n._oldIndex=n.selectedIndex,t)},search:function(e){e="string"==typeof e?e:this.text();var t=this,n=e.length,a=t.options,s=a.ignoreCase,o=a.filter,i=a.dataTextField;clearTimeout(t._typing),n>=a.minLength&&(t._state=y,"none"===o?t._filter(e):(t._open=!0,t._filterSource({value:s?e.toLowerCase():e,field:i,operator:o,ignoreCase:s})))},suggest:function(e){var n,a=this,o=a.input[0],i=a.text(),r=s.caret(o),l=a._last;return l==c.BACKSPACE||l==c.DELETE?(a._last=t,t):(e=e||"","string"!=typeof e&&(n=s.inArray(e[0],a.ul[0]),e=n>-1?a._text(a.dataSource.view()[n]):""),0>=r&&(r=i.toLowerCase().indexOf(e.toLowerCase())+1),e?(n=e.toLowerCase().indexOf(i.toLowerCase()),n>-1&&(i+=e.substring(n+i.length))):i=i.substring(0,r),i.length===r&&e||(o.value=i,s.selectText(o,r,i.length)),t)},text:function(e){e=null===e?"":e;var n,a=this,s=a._text,o=a.input[0],i=a.options.ignoreCase,r=e;return e===t?o.value:(n=a.dataItem(),n&&s(n)===e||(i&&(r=r.toLowerCase()),a._select(function(e){return e=s(e),i&&(e=(e+"").toLowerCase()),e===r}),0>a.selectedIndex&&(a._custom(e),o.value=e)),t)},toggle:function(e){var t=this;t._toggle(e)},value:function(e){var n,a=this;return e===t?a._accessor():(null!==e&&(e=""+e),a._valueCalled=!0,e&&a._valueOnFetch(e)||(n=a._index(e),n>-1?a.select(n):(a.current(L),a._custom(e),a.text(e),a._placeholder()),a._old=a._accessor(),a._oldIndex=a.selectedIndex),t)},_accept:function(e){var t=this;e&&t.popup.visible()?t._focus(e):(t.text(t.text()),t._change())},_custom:function(t){var n=this,a=n.element,s=n._option;n._state===y&&(n._state=w),a.is(x)?(s||(s=n._option=e("<option/>"),a.append(s)),s.text(t),s[0].selected=!0):a.val(t)},_filter:function(e){var n=this,a=n.options,s=n.dataSource,o=a.ignoreCase,i=function(a){var s=n._text(a);return s!==t?(s+="",""!==s&&""===e?!1:(o&&(s=s.toLowerCase()),0===s.indexOf(e))):t};return o&&(e=e.toLowerCase()),n.ul[0].firstChild?(-1!==n._highlight(i)&&(a.suggest&&n._current&&n.suggest(n._current),n.open()),n._hideBusy(),t):(s.one(_,function(){s.data()[0]&&n.search(e)}).fetch(),t)},_highlight:function(n){var a,o=this;return n===t||null===n?-1:(n=o._get(n),a=s.inArray(n[0],o.ul[0]),-1==a&&(n=o.options.highlightFirst&&!o.text()?e(o.ul[0].firstChild):L),o.current(n),a)},_input:function(){var t,n,a=this,s=a.element.removeClass("k-input")[0],o=s.tabIndex,i=s.accessKey,l=a.wrapper,c="input.k-input",u=s.name||"";u&&(u='name="'+u+'_input" '),t=l.find(c),t[0]||(l.append('<span tabindex="-1" unselectable="on" class="k-dropdown-wrap k-state-default"><input '+u+'class="k-input" type="text" autocomplete="off"/><span tabindex="-1" unselectable="on" class="k-select"><span unselectable="on" class="k-icon k-i-arrow-s">select</span></span></span>').append(a.element),t=l.find(c)),n=t[0],n.tabIndex=o,n.style.cssText=s.style.cssText,s.maxLength>-1&&(n.maxLength=s.maxLength),t.addClass(s.className).val(s.value).css({width:"100%",height:s.style.height}).show(),r&&t.attr("placeholder",a.options.placeholder),i&&(s.accessKey="",t[0].accessKey=i),a._focused=a.input=t,a._inputWrapper=e(l[0].firstChild),a._arrow=l.find(".k-icon").attr({role:"button",tabIndex:-1}),s.id&&a._arrow.attr("aria-controls",a.ul[0].id)},_keydown:function(e){var t=this,n=e.keyCode;t._last=n,clearTimeout(t._typing),n==c.TAB||t._move(e)||t._search()},_placeholder:function(e){if(!r){var n,a=this,s=a.input,o=a.options.placeholder;if(o){if(n=a.value(),e===t&&(e=!n),s.toggleClass("k-readonly",e),!e){if(n)return;o=""}s.val(o)}}},_search:function(){var e=this;e._typing=setTimeout(function(){var t=e.text();e._prev!==t&&(e._prev=t,e.search(t))},e.options.delay)},_select:function(e){var n,a,s=this,o=s._data(),i=s._highlight(e);s.selectedIndex=i,-1!==i&&(s._state===y&&(s._state=w),s._current.addClass(C),o=o[i],n=s._text(o),a=s._value(o),s._prev=s.input[0].value=n,s._accessor(a!==t?a:n,i),s._placeholder(),s._optionID&&s._current.attr("aria-selected",!0))},_filterSource:function(e){var t=this,n=t.options,a=t.dataSource,s=a.filter()||{};l(s,n.dataTextField),e&&(s=s.filters||[],s.push(e)),a.filter(s)},_wrapper:function(){var e=this,t=e.element,n=t.parent();n.is("span.k-widget")||(n=t.hide().wrap("<span />").parent(),n[0].style.cssText=t[0].style.cssText),e.wrapper=n.addClass("k-widget k-combobox k-header").addClass(t[0].className).css("display","")}});a.plugin(T)})(window.kendo.jQuery);
|
@@ -1,10 +1,12 @@
|
|
1
1
|
/*
|
2
|
-
* Kendo UI Web v2012.
|
2
|
+
* Kendo UI Web v2012.3.1114 (http://kendoui.com)
|
3
3
|
* Copyright 2012 Telerik AD. All rights reserved.
|
4
4
|
*
|
5
|
-
* Kendo UI Web commercial licenses may be obtained at
|
5
|
+
* Kendo UI Web commercial licenses may be obtained at
|
6
|
+
* https://www.kendoui.com/purchase/license-agreement/kendo-ui-web-commercial.aspx
|
6
7
|
* If you do not own a commercial license, this file shall be governed by the
|
7
8
|
* GNU General Public License (GPL) version 3.
|
8
9
|
* For GPL requirements, please review: http://www.gnu.org/copyleft/gpl.html
|
9
10
|
*/
|
10
|
-
;(function(a,b){function bk(d,e){var f={},g,h;for(g in e)h=bj(d,g),h!==b&&(bf.test(g)&&(h=c.template(a("#"+h).html())),f[g]=h);return f}function bj(d,e){var f;e.indexOf("data")===0&&(e=e.substring(4),e=e.charAt(0).toLowerCase()+e.substring(1)),e=e.replace(bi,"-$1"),f=d.getAttribute("data-"+c.ns+e),f===null?f=b:f==="null"?f=null:f==="true"?f=!0:f==="false"?f=!1:isNaN(parseFloat(f))?bg.test(f)&&!bh.test(f)&&(f=a.parseJSON(f)):f=parseFloat(f);return f}function _(a){return(""+a).replace(Y,"&").replace(Z,"<").replace($,">")}function X(a,b,c,d){b&&(b=b.split(" "),e(b,function(b,c){a.toggleClass(c,d)}));return a}function W(a,b,c,d,e,f){return T.transitionPromise(a,b,U(c,d,e,f))}function V(b,c,d,e,f){b.each(function(b,g){g=a(g),g.queue(function(){T.promise(g,U(c,d,e,f))})});return b}function U(a,b,c,e){typeof a===r&&(i(b)&&(e=b,b=400,c=!1),i(c)&&(e=c,c=!1),typeof b===v&&(c=b,b=400),a={effects:a,duration:b,reverse:c,complete:e});return d({effects:{},duration:400,reverse:!1,init:h,teardown:h,hide:!1,show:!1},a,{completeCallback:a.complete,complete:h})}function S(a){var b={};e(typeof a=="string"?a.split(" "):a,function(a){b[a]=this});return b}function Q(a,b){b||(b="offset");var c=a[b](),d=m.mobileOS;if(m.touch&&d.ios&&d.flatVersion<410){var e=b=="offset"?c:a.offset(),f=c.left==e.left&&c.top==e.top;if(f)return{top:c.top-window.scrollY,left:c.left-window.scrollX}}return c}function P(b){return a.trim(a(b).contents().filter(function(){return this.nodeType!=8}).html())===""}function O(a){var b=0,c;for(c in a)a.hasOwnProperty(c)&&c!="toJSON"&&b++;return b}function N(a,b){var c,d,e,f;for(c in b)d=b[c],e=typeof d,e===t&&d!==null&&d.constructor!==Array?d instanceof Date?a[c]=new Date(d.getTime()):(f=a[c],typeof f===t?a[c]=f||{}:a[c]={},N(a[c],d)):e!==w&&(a[c]=d);return a}function M(a){var b=1,c=arguments.length;for(b=1;b<c;b++)N(a,arguments[b]);return a}function L(b){var d=a.browser,e;if(!b.parent().hasClass("k-animation-container")){var f=b.css(c.support.transitions.css+"box-shadow")||b.css("box-shadow"),g=f?f.match(p)||[0,0,0,0,0]:[0,0,0,0,0],h=j.max(+g[3],+(g[4]||0)),i=-g[1]+h,k=+g[1]+h,l=+g[2]+h,m=b[0].style.width,o=b[0].style.height,q=n.test(m),r=n.test(o);d.opera&&(i=k=l=5),e=q||r,q||(m=b.outerWidth()),r||(o=b.outerHeight()),b.wrap(a("<div/>").addClass("k-animation-container").css({width:m,height:o,marginLeft:-i,paddingLeft:i,paddingRight:k,paddingBottom:l})),e&&b.css({width:"100%",height:"100%",boxSizing:"border-box",mozBoxSizing:"border-box",webkitBoxSizing:"border-box"})}else{var s=b.parent(".k-animation-container"),t=s[0].style;s.is(":hidden")&&s.show(),e=n.test(t.width)||n.test(t.height),e||s.css({width:b.outerWidth(),height:b.outerHeight()})}d.msie&&j.floor(d.version)<=7&&b.css({zoom:1});return b.parent()}function K(a){return a<10?"0"+a:a}function D(a,b){if(b)return"'"+a.split("'").join("\\'").split('\\"').join('\\\\\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")+"'";var c=a.charAt(0),d=a.substring(1);return c==="="?"+("+d+")+":c===":"?"+e("+d+")+":";"+a+";o+="}function B(){}var c=window.kendo=window.kendo||{},d=a.extend,e=a.each,f=a.proxy,g=a.isArray,h=a.noop,i=a.isFunction,j=Math,k,l=window.JSON||{},m={},n=/%/,o=/\{(\d+)(:[^\}]+)?\}/g,p=/(\d+?)px\s*(\d+?)px\s*(\d+?)px\s*(\d+?)?/i,q="function",r="string",s="number",t="object",u="null",v="boolean",w="undefined",x={},y={},z=[].slice,A=window.Globalize;B.extend=function(a){var b=function(){},c,e=this,f=a&&a.init?a.init:function(){e.apply(this,arguments)},g;b.prototype=e.prototype,g=f.fn=f.prototype=new b;for(c in a)typeof a[c]!==t||a[c]instanceof Array||a[c]===null?g[c]=a[c]:g[c]=d(!0,{},b.prototype[c],a[c]);g.constructor=f,f.extend=e.extend;return f};var C=B.extend({init:function(){this._events={}},bind:function(a,b,c){var d=this,e,f=typeof a===r?[a]:a,g,h,i,j=typeof b===q,k;for(e=0,g=f.length;e<g;e++)a=f[e],i=j?b:b[a],i&&(c&&(h=i,i=function(){d.unbind(a,i),h.apply(d,arguments)}),k=d._events[a]=d._events[a]||[],k.push(i));return d},one:function(a,b){return this.bind(a,b,!0)},first:function(a,b){var c=this,d,e=typeof a===r?[a]:a,f,g,h=typeof b===q,i;for(d=0,f=e.length;d<f;d++)a=e[d],g=h?b:b[a],g&&(i=c._events[a]=c._events[a]||[],i.unshift(g));return c},trigger:function(a,b){var c=this,d=c._events[a],e,f,g=!1;if(d){b=b||{},b.sender=c,b.preventDefault=function(){g=!0},b.isDefaultPrevented=function(){return g},d=d.slice();for(e=0,f=d.length;e<f;e++)d[e].call(c,b)}return g},unbind:function(a,b){var c=this,d=c._events[a],e,f;if(d)if(b)for(e=0,f=d.length;e<f;e++)d[e]===b&&d.splice(e,1);else c._events[a]=[];return c}}),E=/^\w+/,F=/\$\{([^}]*)\}/g,G=/\\\}/g,H=/__CURLY__/g,I=/\\#/g,J=/__SHARP__/g;k={paramName:"data",useWithBlock:!0,render:function(a,b){var c,d,e="";for(c=0,d=b.length;c<d;c++)e+=a(b[c]);return e},compile:function(b,e){var f=d({},this,e),g=f.paramName,h=g.match(E)[0],j=f.useWithBlock,k="var o,e=kendo.htmlEncode;",l,m;if(i(b)){if(b.length===2)return function(c){return b(a,{data:c}).join("")};return b}k+=j?"with("+g+"){":"",k+="o=",l=b.replace(G,"__CURLY__").replace(F,"#=e($1)#").replace(H,"}").replace(I,"__SHARP__").split("#");for(m=0;m<l.length;m++)k+=D(l[m],m%2===0);k+=j?";}":";",k+="return o;",k=k.replace(J,"#");try{return new Function(h,k)}catch(n){throw new Error(c.format("Invalid template:'{0}' Generated code:'{1}'",b,k))}}},function(){function h(a,d){var i,j,k,l,m=b,n,o=d[a],p;o&&typeof o===t&&typeof o.toJSON===q&&(o=o.toJSON(a)),typeof e===q&&(o=e.call(d,a,o)),p=typeof o;if(p===r)return g(o);if(p===s)return isFinite(o)?String(o):u;if(p===v||p===u)return String(o);if(p===t){if(!o)return u;b+=c,n=[];if(f.apply(o)==="[object Array]"){l=o.length;for(i=0;i<l;i++)n[i]=h(i,o)||u;k=n.length===0?"[]":b?"[\n"+b+n.join(",\n"+b)+"\n"+m+"]":"["+n.join(",")+"]",b=m;return k}if(e&&typeof e===t){l=e.length;for(i=0;i<l;i++)typeof e[i]===r&&(j=e[i],k=h(j,o),k&&n.push(g(j)+(b?": ":":")+k))}else for(j in o)Object.hasOwnProperty.call(o,j)&&(k=h(j,o),k&&n.push(g(j)+(b?": ":":")+k));k=n.length===0?"{}":b?"{\n"+b+n.join(",\n"+b)+"\n"+m+"}":"{"+n.join(",")+"}",b=m;return k}}function g(b){a.lastIndex=0;return a.test(b)?'"'+b.replace(a,function(a){var b=d[a];return typeof b===r?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+b+'"'}var a=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,b,c,d={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},e,f={}.toString;typeof Date.prototype.toJSON!==q&&(Date.prototype.toJSON=function(a){var b=this;return isFinite(b.valueOf())?b.getUTCFullYear()+"-"+K(b.getUTCMonth()+1)+"-"+K(b.getUTCDate())+"T"+K(b.getUTCHours())+":"+K(b.getUTCMinutes())+":"+K(b.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(a){return this.valueOf()}),typeof l.stringify!==q&&(l.stringify=function(a,d,f){var g;b="",c="";if(typeof f===s)for(g=0;g<f;g+=1)c+=" ";else typeof f===r&&(c=f);e=d;if(d&&typeof d!==q&&(typeof d!==t||typeof d.length!==s))throw new Error("JSON.stringify");return h("",{"":a})})}(),function(){function v(a,c,f){f=t(f);var j=f.numberFormat,o=j.groupSize[0],p=j[k],q=j[i],r=j.decimals,s=j.pattern[0],u=[],v,w,x,y,z,A=a<0,B,C,D,E,F=h,G=h,H,I,J,K,L,M,N,O,P,Q=-1,R;if(a===b)return h;if(!isFinite(a))return a;if(!c)return f.name.length?a.toLocaleString():a.toString();z=d.exec(c);if(z){c=z[1].toLowerCase(),w=c==="c",x=c==="p";if(w||x)j=w?j.currency:j.percent,o=j.groupSize[0],p=j[k],q=j[i],r=j.decimals,v=j.symbol,s=j.pattern[A?0:1];y=z[2],y&&(r=+y);if(c==="e")return y?a.toExponential(r):a.toExponential();x&&(a*=100),a=a.toFixed(r),a=a.split(i),B=a[0],C=a[1],A&&(B=B.substring(1)),G=B,D=B.length;if(D>=o){G=h;for(H=0;H<D;H++)H>0&&(D-H)%o===0&&(G+=p),G+=B.charAt(H)}C&&(G+=q+C);if(c==="n"&&!A)return G;a=h;for(H=0,I=s.length;H<I;H++)J=s.charAt(H),J==="n"?a+=G:J==="$"||J==="%"?a+=v:a+=J;return a}A&&(a=-a),c=c.split(";");if(A&&c[1])c=c[1],L=!0;else if(a===0){c=c[2]||c[0];if(c.indexOf(l)==-1&&c.indexOf(m)==-1)return c}else c=c[0];if(c.indexOf("'")>-1||c.indexOf('"')>-1)c=c.replace(e,function(a){u.push(a);return n});w=c.indexOf("$")!=-1,x=c.indexOf("%")!=-1,x&&(a*=100);if(w||x)j=w?j.currency:j.percent,o=j.groupSize[0],p=j[k],q=j[i],r=j.decimals,v=j.symbol;K=c.indexOf(k)>-1,K&&(c=c.replace(g,h)),M=c.indexOf(i),I=c.length,M!=-1?(O=c.lastIndexOf(m),N=c.lastIndexOf(l),C=a.toString().split(i)[1]||h,N>O&&C.length>N-O?H=N:O!=-1&&O>=M&&(H=O),H&&(a=a.toFixed(H-M))):a=a.toFixed(0),N=c.indexOf(l),P=O=c.indexOf(m),N==-1&&O!=-1?Q=O:N!=-1&&O==-1?Q=N:Q=N>O?O:N,N=c.lastIndexOf(l),O=c.lastIndexOf(m),N==-1&&O!=-1?R=O:N!=-1&&O==-1?R=N:R=N>O?N:O,Q==I&&(R=Q);if(Q!=-1){G=a.toString().split(i),B=G[0],C=G[1]||h,D=B.length,E=C.length;if(K)if(D===o&&D<M-P)B=p+B;else if(D>o){G=h;for(H=0;H<D;H++)H>0&&(D-H)%o===0&&(G+=p),G+=B.charAt(H);B=G}a=c.substring(0,Q),A&&!L&&(a+="-");for(H=Q;H<I;H++){J=c.charAt(H);if(M==-1){if(R-H<D){a+=B;break}}else{O!=-1&&O<H&&(F=h),M-H<=D&&M-H>-1&&(a+=B,H=M);if(M===H){a+=(C?q:h)+C,H+=R-M+1;continue}}J===m?(a+=J,F=J):J===l&&(a+=F)}R>=Q&&(a+=c.substring(R+1));if(w||x){G=h;for(H=0,I=a.length;H<I;H++)J=a.charAt(H),G+=J==="$"||J==="%"?v:J;a=G}if(u[0]){I=u.length;for(H=0;H<I;H++)a=a.replace(n,u[H])}}return a}function u(c,d,e){e=t(e);var f=e.calendars.standard,g=f.days,h=f.months;d=f.patterns[d]||d;return d.replace(a,function(a){var d;a==="d"?d=c.getDate():a==="dd"?d=K(c.getDate()):a==="ddd"?d=g.namesAbbr[c.getDay()]:a==="dddd"?d=g.names[c.getDay()]:a==="M"?d=c.getMonth()+1:a==="MM"?d=K(c.getMonth()+1):a==="MMM"?d=h.namesAbbr[c.getMonth()]:a==="MMMM"?d=h.names[c.getMonth()]:a==="yy"?d=K(c.getFullYear()%100):a==="yyyy"?d=c.getFullYear():a==="h"?d=c.getHours()%12||12:a==="hh"?d=K(c.getHours()%12||12):a==="H"?d=c.getHours():a==="HH"?d=K(c.getHours()):a==="m"?d=c.getMinutes():a==="mm"?d=K(c.getMinutes()):a==="s"?d=c.getSeconds():a==="ss"?d=K(c.getSeconds()):a==="f"?d=j.floor(c.getMilliseconds()/100):a==="ff"?d=j.floor(c.getMilliseconds()/10):a==="fff"?d=c.getMilliseconds():a==="tt"&&(d=c.getHours()<12?f.AM[0]:f.PM[0]);return d!==b?d:a.slice(1,a.length-1)})}function t(a){a&&(a=q(a));return a||c.cultures.current}function q(a){if(a){if(a.numberFormat)return a;if(typeof a===r){var b=c.cultures;return b[a]||b[a.split("-")[0]]||null}return null}return null}var a=/dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|HH|H|hh|h|mm|m|fff|ff|f|tt|ss|s|"[^"]*"|'[^']*'/g,d=/^(n|c|p|e)(\d*)$/i,e=/["'].*?["']/g,g=/\,/g,h="",i=".",k=",",l="#",m="0",n="??",p="en-US";c.cultures={"en-US":{name:p,numberFormat:{pattern:["-n"],decimals:2,",":",",".":".",groupSize:[3],percent:{pattern:["-n %","n %"],decimals:2,",":",",".":".",groupSize:[3],symbol:"%"},currency:{pattern:["($n)","$n"],decimals:2,",":",",".":".",groupSize:[3],symbol:"$"}},calendars:{standard:{days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December"],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},AM:["AM","am","AM"],PM:["PM","pm","PM"],patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",F:"dddd, MMMM dd, yyyy h:mm:ss tt",g:"M/d/yyyy h:mm tt",G:"M/d/yyyy h:mm:ss tt",m:"MMMM dd",M:"MMMM dd",s:"yyyy'-'MM'-'ddTHH':'mm':'ss",t:"h:mm tt",T:"h:mm:ss tt",u:"yyyy'-'MM'-'dd HH':'mm':'ss'Z'",y:"MMMM, yyyy",Y:"MMMM, yyyy"},"/":"/",":":":",firstDay:0}}}},c.culture=function(a){var d=c.cultures,e;if(a!==b)e=q(a)||d[p],e.calendar=e.calendars.standard,d.current=e;else return d.current},c.findCulture=q,c.getCulture=t,c.culture(p);var w=function(a,c,d){if(c){if(a instanceof Date)return u(a,c,d);if(typeof a===s)return v(a,c,d)}return a!==b?a:""};A&&(w=f(A.format,A)),c.format=function(a){var b=arguments;return a.replace(o,function(a,c,d){var e=b[parseInt(c,10)+1];return w(e,d?d.substring(1):"")})},c._extractFormat=function(a){a.slice(0,3)==="{0:"&&(a=a.slice(3,a.length-1));return a},c.toString=w}(),function(){function m(a,b,c){if(!a)return null;var d=function(a){var c=0;while(b[t]===a)c++,t++;c>0&&(t-=1);return c},f=function(b){var c=new RegExp("^\\d{1,"+b+"}"),d=a.substr(u,b).match(c);if(d){d=d[0],u+=d.length;return parseInt(d,10)}return null},g=function(b){var c=0,d=b.length,e,f;for(;c<d;c++){e=b[c],f=e.length;if(a.substr(u,f)==e){u+=f;return c+1}}return null},i=function(){var c=!1;a.charAt(u)===b[t]&&(u++,c=!0);return c},k=c.calendars.standard,m=null,n=null,o=null,p=null,q=null,r=null,s=null,t=0,u=0,v=!1,w=new Date,x=30,y=w.getFullYear(),z,A,B,C,D,E,F,G,H,I,J,K;b||(b="d"),C=k.patterns[b],C&&(b=C),b=b.split(""),B=b.length;for(;t<B;t++){z=b[t];if(v)z==="'"?v=!1:i();else if(z==="d"){A=d("d"),o=A<3?f(2):g(k.days[A==3?"namesAbbr":"names"]);if(o===null||j(o,1,31))return null}else if(z==="M"){A=d("M"),n=A<3?f(2):g(k.months[A==3?"namesAbbr":"names"]);if(n===null||j(n,1,12))return null;n-=1}else if(z==="y")A=d("y"),m=f(A<3?2:4),m===null&&(m=y),m<x&&(m=y-y%100+m);else if(z==="h"){d("h"),p=f(2),p==12&&(p=0);if(p===null||j(p,0,11))return null}else if(z==="H"){d("H"),p=f(2);if(p===null||j(p,0,23))return null}else if(z==="m"){d("m"),q=f(2);if(q===null||j(q,0,59))return null}else if(z==="s"){d("s"),r=f(2);if(r===null||j(r,0,59))return null}else if(z==="f"){A=d("f"),s=f(A);if(s===null||j(s,0,999))return null}else if(z==="t"){A=d("t"),H=k.AM,I=k.PM,A===1&&(H=l(H),I=l(I)),D=g(I);if(!D&&!g(H))return null}else if(z==="z"){E=!0,A=d("z");if(a.substr(u,1)==="Z"){if(!F)return null;i();continue}G=a.substr(u,6).match(A>2?h:e);if(!G)return null;G=G[0],u=G.length,G=G.split(":"),J=parseInt(G[0],10);if(j(J,-12,13))return null;if(A>2){K=parseInt(G[1],10);if(isNaN(K)||j(K,0,59))return null}}else z==="T"?F=i():z==="'"?(v=!0,i()):i()}D&&p<12&&(p+=12),o===null&&(o=1);if(E){J&&(p+=-J),K&&(q+=-K);return new Date(Date.UTC(m,n,o,p,q,r,s))}return new Date(m,n,o,p,q,r,s)}function l(b){return a.map(b,k)}function k(a){return a.charAt(0)}function j(a,b,c){return!(a>=b&&a<=c)}var b=/\u00A0/g,d=/[eE][\-+]?[0-9]+/,e=/[+|\-]\d{1,2}/,h=/[+|\-]\d{1,2}:\d{2}/,i=["G","g","d","F","D","y","m","T","t"];c.parseDate=function(a,b,d){if(a instanceof Date)return a;var e=0,f=null,h,j;d=c.getCulture(d);if(!b){b=[],j=d.calendar.patterns,h=i.length;for(;e<h;e++)b[e]=j[i[e]];b[e]="ddd MMM dd yyyy HH:mm:ss",b[++e]="yyyy-MM-ddTHH:mm:ss.fffzzz",b[++e]="yyyy-MM-ddTHH:mm:sszzz",b[++e]="yyyy-MM-ddTHH:mmzzz",b[++e]="yyyy-MM-ddTHH:mmzz",b[++e]="yyyy-MM-dd",e=0}b=g(b)?b:[b],h=b.length;for(;e<h;e++){f=m(a,b[e],d);if(f)return f}return f},c.parseInt=function(a,b){var d=c.parseFloat(a,b);d&&(d=d|0);return d},c.parseFloat=function(a,e,f){if(!a&&a!==0)return null;if(typeof a===s)return a;a=a.toString(),e=c.getCulture(e);var g=e.numberFormat,h=g.percent,i=g.currency,j=i.symbol,k=h.symbol,l=a.indexOf("-")>-1,m,n;if(d.test(a)){a=parseFloat(a),isNaN(a)&&(a=null);return a}a.indexOf(j)>-1||f&&f.toLowerCase().indexOf("c")>-1?(g=i,m=g.pattern[0].replace("$",j).split("n"),a.indexOf(m[0])>-1&&a.indexOf(m[1])>-1&&(a=a.replace(m[0],"").replace(m[1],""),l=!0)):a.indexOf(k)>-1&&(n=!0,g=h,j=k),a=a.replace("-","").replace(j,"").replace(b," ").split(g[","].replace(b," ")).join("").replace(g["."],"."),a=parseFloat(a),isNaN(a)?a=null:l&&(a*=-1),a&&n&&(a/=100);return a},A&&(c.parseDate=f(A.parseDate,A),c.parseFloat=f(A.parseFloat,A))}(),function(){m.scrollbar=function(){var a=document.createElement("div"),b;a.style.cssText="overflow:scroll;overflow-x:hidden;zoom:1;clear:both",a.innerHTML=" ",document.body.appendChild(a),b=a.offsetWidth-a.scrollWidth,document.body.removeChild(a);return b};var a=document.createElement("table");try{a.innerHTML="<tr><td></td></tr>",m.tbodyInnerHtml=!0}catch(c){m.tbodyInnerHtml=!1}m.touch="ontouchstart"in window,m.pointers=navigator.msPointerEnabled;var d=m.transitions=!1,f=m.transforms=!1;m.hasHW3D="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix||"MozPerspective"in document.documentElement.style||"msPerspective"in document.documentElement.style,m.hasNativeScrolling=typeof document.documentElement.style.webkitOverflowScrolling=="string",e(["Moz","webkit","O","ms"],function(){var b=this.toString(),c=typeof a.style[b+"Transition"]===r;if(c||typeof a.style[b+"Transform"]===r){var e=b.toLowerCase();f={css:"-"+e+"-",prefix:b,event:e==="o"||e==="webkit"?e:""},c&&(d=f,d.event=d.event?d.event+"TransitionEnd":"transitionend");return!1}}),m.transforms=f,m.transitions=d,m.devicePixelRatio=window.devicePixelRatio===b?1:window.devicePixelRatio,m.detectOS=function(a){var c=!1,d,e=[],f={fire:/(Silk)\/(\d+)\.(\d+(\.\d+)?)/,android:/(Android|Android.*(?:Opera|Firefox).*?\/)\s*(\d+)\.(\d+(\.\d+)?)/,iphone:/(iPhone|iPod).*OS\s+(\d+)[\._]([\d\._]+)/,ipad:/(iPad).*OS\s+(\d+)[\._]([\d_]+)/,meego:/(MeeGo).+NokiaBrowser\/(\d+)\.([\d\._]+)/,webos:/(webOS)\/(\d+)\.(\d+(\.\d+)?)/,blackberry:/(BlackBerry).*?Version\/(\d+)\.(\d+(\.\d+)?)/,playbook:/(PlayBook).*?Tablet\s*OS\s*(\d+)\.(\d+(\.\d+)?)/,winphone:/(IEMobile)\/(\d+)\.(\d+(\.\d+)?)/,windows:/(MSIE)\s+(\d+)\.(\d+(\.\d+)?)/},g={ios:/^i(phone|pad|pod)$/i,android:/^android|fire$/i,blackberry:/^blackberry|playbook/i,windows:/windows|winphone/},h={tablet:/playbook|ipad|fire/i},i={omini:/Opera\sMini/i,omobile:/Opera\sMobi/i,firefox:/Firefox|Fennec/i,mobilesafari:/version\/.*safari/i,webkit:/webkit/i,ie:/MSIE|Windows\sPhone/i},j=function(a,c,d){for(var e in c)if(c.hasOwnProperty(e)&&c[e].test(a))return e;return d!==b?d:a};for(var k in f)if(f.hasOwnProperty(k)){e=a.match(f[k]);if(e){if(k=="windows"&&"plugins"in navigator)return!1;c={},c.device=k,c.tablet=j(k,h,!1),c.browser=j(a,i,"default"),c.name=j(k,g),c[c.name]=!0,c.majorVersion=e[2],c.minorVersion=e[3].replace("_","."),d=c.minorVersion.replace(".","").substr(0,2),c.flatVersion=c.majorVersion+d+Array(3-(d.length<3?d.length:2)).join("0"),c.appMode=window.navigator.standalone||/file|local/.test(window.location.protocol)||typeof window.PhoneGap!==w||typeof window.cordova!==w,c.android&&m.devicePixelRatio<1.5&&(window.outerWidth>800||window.outerHeight>800)&&(c.tablet=k);break}}return c},m.mobileOS=m.detectOS(navigator.userAgent),m.zoomLevel=function(){return m.touch?document.documentElement.clientWidth/window.innerWidth:1},m.eventCapture=document.documentElement.addEventListener,m.placeholder="placeholder"in document.createElement("input"),m.stableSort=function(){var a=[0,1,2,3,4,5,6,7,8,9,10,11,12].sort(function(){return 0});return a[0]===0&&a[1]===1&&a[2]===2&&a[3]===3&&a[4]===4&&a[5]===5&&a[6]===6&&a[7]===7&&a[8]===8&&a[9]===9&&a[10]===10&&a[11]===11&&a[12]===12}()}();var R={left:{reverse:"right"},right:{reverse:"left"},down:{reverse:"up"},up:{reverse:"down"},top:{reverse:"bottom"},bottom:{reverse:"top"},"in":{reverse:"out"},out:{reverse:"in"}},T={promise:function(a,b){b.show&&a.css({display:a.data("olddisplay")||"block"}).css("display"),b.hide&&a.data("olddisplay",a.css("display")).hide(),b.init&&b.init(),b.completeCallback&&b.completeCallback(a),a.dequeue()},transitionPromise:function(a,b,d){var e=c.wrap(a);e.append(b),a.hide(),b.show(),d.completeCallback&&d.completeCallback(a);return a}};d(a.fn,{kendoStop:function(a,b){return this.stop(a,b)},kendoAnimate:function(a,b,c,d){return V(this,a,b,c,d)},kendoAnimateTo:function(a,b,c,d,e){return W(this,a,b,c,d,e)}}),d(a.fn,{kendoAddClass:function(a,b){return X(this,a,b,!0)},kendoRemoveClass:function(a,b){return X(this,a,b,!1)},kendoToggleClass:function(a,b,c){return X(this,a,b,c)}});var Y=/&/g,Z=/</g,$=/>/g,ba=function(a){var b=typeof a.pageX==w?a.originalEvent:a;return{idx:m.pointers?b.pointerId:0,x:b.pageX,y:b.pageY}},bb=function(a){return a.target};m.touch&&(ba=function(a,b){var c=a.changedTouches||a.originalEvent.changedTouches;if(b){var d=null;e(c,function(a,c){b==c.identifier&&(d={idx:c.identifier,x:c.pageX,y:c.pageY})});return d}return{idx:c[0].identifier,x:c[0].pageX,y:c[0].pageY}},bb=function(a){var b="originalEvent"in a?a.originalEvent.changedTouches:"changedTouches"in a?a.changedTouches:null;return b?document.elementFromPoint(b[0].clientX,b[0].clientY):null},e(["swipe","swipeLeft","swipeRight","swipeUp","swipeDown","doubleTap","tap"],function(b,c){a.fn[c]=function(a){return this.bind(c,a)}})),m.touch?(m.mousedown="touchstart",m.mouseup="touchend",m.mousemove="touchmove",m.mousecancel="touchcancel",m.resize="orientationchange"):m.pointers?(m.mousemove="MSPointerMove",m.mousedown="MSPointerDown",m.mouseup="MSPointerUp",m.mousecancel="MSPointerCancel",m.resize="orientationchange resize"):(m.mousemove="mousemove",m.mousedown="mousedown",m.mouseup="mouseup",m.mousecancel="mouseleave",m.resize="resize");var bc=function(a){var b="d",c,d,e,f,g=1;for(d=0,e=a.length;d<e;d++)f=a[d],f!==""&&(c=f.indexOf("["),c!==0&&(c==-1?f="."+f:(g++,f="."+f.substring(0,c)+" || {})"+f.substring(c))),g++,b+=f+(d<e-1?" || {})":")"));return Array(g).join("(")+b},bd=/^([a-z]+:)?\/\//i;d(c,{ui:c.ui||{},fx:c.fx||T,data:c.data||{},mobile:c.mobile||{},dataviz:c.dataviz||{ui:{}},keys:{INSERT:45,DELETE:46,BACKSPACE:8,TAB:9,ENTER:13,ESC:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,END:35,HOME:36,SPACEBAR:32,PAGEUP:33,PAGEDOWN:34,F2:113,F10:121,F12:123},support:m,animate:V,ns:"",attr:function(a){return"data-"+c.ns+a},wrap:L,deepExtend:M,size:O,isNodeEmpty:P,getOffset:Q,parseEffects:S,toggleClass:X,directions:R,Observable:C,Class:B,Template:k,template:f(k.compile,k),render:f(k.render,k),stringify:f(l.stringify,l),touchLocation:ba,eventTarget:bb,htmlEncode:_,isLocalUrl:function(a){return a&&!bd.test(a)},expr:function(a,b){a=a||"",a&&a.charAt(0)!=="["&&(a="."+a),b?a=bc(a.split(".")):a="d"+a;return a},getter:function(a,b){return x[a]=x[a]||new Function("d","return "+c.expr(a,b))},setter:function(a){return y[a]=y[a]||new Function("d,value","d."+a+"=value")},accessor:function(a){return{get:c.getter(a),set:c.setter(a)}},guid:function(){var a="",b,c;for(b=0;b<32;b++){c=j.random()*16|0;if(b==8||b==12||b==16||b==20)a+="-";a+=(b==12?4:b==16?c&3|8:c).toString(16)}return a},roleSelector:function(a){return a.replace(/(\S+)/g,"["+c.attr("role")+"=$1],").slice(0,-1)},logToConsole:function(a){var b=window.console;typeof b!="undefined"&&b.log&&b.log(a)}});var be=C.extend({init:function(b,e){var f=this;f.element=a(b),C.fn.init.call(f),f.options=d(!0,{},f.options,e),f.element.attr(c.attr("role"))||f.element.attr(c.attr("role"),(f.options.name||"").toLowerCase()),f.element.data("kendo"+f.options.prefix+f.options.name,f),f.bind(f.events,f.options)},events:[],options:{prefix:""},setOptions:function(b){a.extend(this.options,b),this.bind(this.events,b)}});c.notify=h;var bf=/template$/i,bg=/^\s*(?:\{(?:.|\n)*\}|\[(?:.|\n)*\])\s*$/,bh=/^\{(\d+)(:[^\}]+)?\}/,bi=/([A-Z])/g;c.initWidget=function(d,e,f){var g,h,i,j,k,l,m,n;f?f.roles&&(f=f.roles):f=c.ui.roles,d=d.nodeType?d:d[0],l=d.getAttribute("data-"+c.ns+"role");if(!!l){i=f[l];if(!i)return;n=bj(d,"dataSource"),e=a.extend({},bk(d,i.fn.options),e),n&&(typeof n===r?e.dataSource=c.getter(n)(window):e.dataSource=n);for(j=0,k=i.fn.events.length;j<k;j++)h=i.fn.events[j],m=bj(d,h),m!==b&&(e[h]=c.getter(m)(window));g=a(d).data("kendo"+i.fn.options.name),g?g.setOptions(e):g=new i(d,e);return g}},c.init=function(b){var e=z.call(arguments,1),f;e[0]||(e=[c.ui,c.dataviz.ui]),f=a.map(e,function(a){return a.roles}).reverse(),f=d.apply(null,[{}].concat(f)),a(b).find("[data-"+c.ns+"role]").andSelf().each(function(){c.initWidget(this,{},f)})},c.parseOptions=bk,d(c.ui,{Widget:be,roles:{},progress:function(b,c){var d=b.find(".k-loading-mask");c?d.length||(d=a("<div class='k-loading-mask'><span class='k-loading-text'>Loading...</span><div class='k-loading-image'/><div class='k-loading-color'/></div>").width("100%").height("100%").prependTo(b).css({top:b.scrollTop(),left:b.scrollLeft()})):d&&d.remove()},plugin:function(d,e,f){var g=d.fn.options.name,h;e=e||c.ui,f=f||"",e[g]=d,e.roles[g.toLowerCase()]=d,h="getKendo"+f+g,g="kendo"+f+g,a.fn[g]=function(e){var f=this,h;typeof e===r?(h=z.call(arguments,1),this.each(function(){var d=a.data(this,g),i,j;if(!d)throw new Error(c.format("Cannot call method '{0}' of {1} before it is initialized",e,g));i=d[e];if(typeof i!==q)throw new Error(c.format("Cannot find method '{0}' of {1}",e,g));j=i.apply(d,h);if(j!==b){f=j;return!1}})):this.each(function(){new d(this,e)});return f},a.fn[h]=function(){return this.data(g)}}});var bl=be.extend({init:function(a,b){be.fn.init.call(this,a,b),this.wrapper=this.element},options:{prefix:"Mobile"},events:[],viewShow:a.noop,view:function(){var a=this.element.closest(c.roleSelector("view")+","+c.roleSelector("splitview"));return a.data("kendoMobileView")||a.data("kendoMobileSplitView")}});d(c.mobile,{init:function(a){c.init(a,c.mobile.ui,c.ui,c.dataviz.ui)},ui:{Widget:bl,roles:{},plugin:function(a){c.ui.plugin(a,c.mobile.ui,"Mobile")}}}),c.touchScroller=function(a,b){if(m.touch&&c.mobile.ui.Scroller&&!a.data("kendoMobileScroller")){a.kendoMobileScroller(b);return a.data("kendoMobileScroller")}return!1},c.preventDefault=function(a){a.preventDefault()},c.widgetInstance=function(a,b){var d=b.roles[a.data(c.ns+"role")];if(d)return a.data("kendo"+d.fn.options.prefix+d.fn.options.name)},c.onResize=function(b){var c=b;m.mobileOS.android&&(c=function(){setTimeout(b,200)}),a(window).on(m.resize,c)},c.data=function(a,b){return a.data(c.ns+b)}})(jQuery);
|
11
|
+
(function($,undefined){function Class(){}function compilePart(e,t){if(t)return"'"+e.split("'").join("\\'").split('\\"').join('\\\\\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")+"'";var n=e.charAt(0),o=e.substring(1);return"="===n?"+("+o+")+":":"===n?"+e("+o+")+":";"+e+";o+="}function pad(e,t,n){return e+="",t=t||2,n=t-e.length,n?zeros[t].substring(0,n)+e:e}function wrap(e){var t,n=support.browser,o="rtl"==e.css("direction");if(e.parent().hasClass("k-animation-container")){var r=e.parent(".k-animation-container"),i=r[0].style;r.is(":hidden")&&r.show(),t=percentRegExp.test(i.width)||percentRegExp.test(i.height),t||r.css({width:e.outerWidth(),height:e.outerHeight()})}else{var a=e.css(kendo.support.transitions.css+"box-shadow")||e.css("box-shadow"),s=a?a.match(boxShadowRegExp)||[0,0,0,0,0]:[0,0,0,0,0],u=math.max(+s[3],+(s[4]||0)),l=-s[1]+u,d=+s[1]+u,p=+s[2]+u,c=e[0].style.width,f=e[0].style.height,m=percentRegExp.test(c),h=percentRegExp.test(f);n.opera&&(l=d=p=5),t=m||h,m||(c=e.outerWidth()),h||(f=e.outerHeight()),e.wrap($("<div/>").addClass("k-animation-container").css({width:c,height:f,marginLeft:l*(o?1:-1),paddingLeft:l,paddingRight:d,paddingBottom:p})),t&&e.css({width:"100%",height:"100%",boxSizing:"border-box",mozBoxSizing:"border-box",webkitBoxSizing:"border-box"})}return n.msie&&7>=math.floor(n.version)&&e.css({zoom:1}),e.parent()}function deepExtend(e){var t=1,n=arguments.length;for(t=1;n>t;t++)deepExtendOne(e,arguments[t]);return e}function deepExtendOne(e,t){var n,o,r,i,a=kendo.data.ObservableArray;for(n in t)o=t[n],r=typeof o,r===OBJECT&&null!==o&&o.constructor!==Array&&o.constructor!==a?o instanceof Date?e[n]=new Date(o.getTime()):(i=e[n],e[n]=typeof i===OBJECT?i||{}:{},deepExtendOne(e[n],o)):r!==UNDEFINED&&(e[n]=o);return e}function testRx(e,t,n){for(var o in t)if(t.hasOwnProperty(o)&&t[o].test(e))return o;return n!==undefined?n:e}function getComputedStyles(e,t){var n,o={};return document.defaultView&&document.defaultView.getComputedStyle?(n=document.defaultView.getComputedStyle(e,""),t&&$.each(t,function(e,t){o[t]=n.getPropertyValue(t)})):(n=e.currentStyle,t&&$.each(t,function(e,t){o[t]=n[t.replace(/\-(\w)/g,function(e,t){return t.toUpperCase()})]})),kendo.size(o)||(o=n),o}function size(e){var t,n=0;for(t in e)e.hasOwnProperty(t)&&"toJSON"!=t&&n++;return n}function isNodeEmpty(e){return""===$.trim($(e).contents().filter(function(){return 8!=this.nodeType}).html())}function getOffset(e,t){t||(t="offset");var n=e[t](),o=support.mobileOS;if(support.touch&&o.ios&&410>o.flatVersion){var r="offset"==t?n:e.offset(),i=n.left==r.left&&n.top==r.top;if(i)return{top:n.top-window.scrollY,left:n.left-window.scrollX}}return n}function parseEffects(e){var t={};return each("string"==typeof e?e.split(" "):e,function(e){t[e]=this}),t}function fx(e){return new kendo.fx.Element(e)}function prepareAnimationOptions(e,t,n,o){return typeof e===STRING&&(isFunction(t)&&(o=t,t=400,n=!1),isFunction(n)&&(o=n,n=!1),typeof t===BOOLEAN&&(n=t,t=400),e={effects:e,duration:t,reverse:n,complete:o}),extend({effects:{},duration:400,reverse:!1,init:noop,teardown:noop,hide:!1},e,{completeCallback:e.complete,complete:noop})}function animate(e,t,n,o,r){for(var i,a=0,s=e.length;s>a;a++)i=$(e[a]),i.queue(function(){fx.promise(i,prepareAnimationOptions(t,n,o,r))});return e}function animateTo(e,t,n,o,r,i){return fx.transitionPromise(e,t,prepareAnimationOptions(n,o,r,i))}function toggleClass(e,t,n,o){return t&&(t=t.split(" "),each(t,function(t,n){e.toggleClass(n,o)})),e}function htmlEncode(e){return(""+e).replace(ampRegExp,"&").replace(ltRegExp,"<").replace(gtRegExp,">")}function parseOption(element,option){var value;return 0===option.indexOf("data")&&(option=option.substring(4),option=option.charAt(0).toLowerCase()+option.substring(1)),option=option.replace(dashRegExp,"-$1"),value=element.getAttribute("data-"+kendo.ns+option),null===value?value=undefined:"null"===value?value=null:"true"===value?value=!0:"false"===value?value=!1:isNaN(parseFloat(value))?jsonRegExp.test(value)&&!jsonFormatRegExp.test(value)&&(value=eval("("+value+")")):value=parseFloat(value),value}function parseOptions(e,t){var n,o,r={};for(n in t)o=parseOption(e,n),o!==undefined&&(templateRegExp.test(n)&&(o=kendo.template($("#"+o).html())),r[n]=o);return r}function focusable(e,t){var n=e.nodeName.toLowerCase();return(/input|select|textarea|button|object/.test(n)?!e.disabled:"a"===n?e.href||t:t)&&visible(e)}function visible(e){return!$(e).parents().andSelf().filter(function(){return"hidden"===$.css(this,"visibility")||$.expr.filters.hidden(this)}).length}function applyEventMap(e){return eventMap[e]||e}var kendo=window.kendo=window.kendo||{},extend=$.extend,each=$.each,proxy=$.proxy,isArray=$.isArray,noop=$.noop,isFunction=$.isFunction,math=Math,Template,JSON=window.JSON||{},support={},percentRegExp=/%/,formatRegExp=/\{(\d+)(:[^\}]+)?\}/g,boxShadowRegExp=/(\d+?)px\s*(\d+?)px\s*(\d+?)px\s*(\d+?)?/i,FUNCTION="function",STRING="string",NUMBER="number",OBJECT="object",NULL="null",BOOLEAN="boolean",UNDEFINED="undefined",getterCache={},setterCache={},slice=[].slice,globalize=window.Globalize;Class.extend=function(e){var t,n,o=function(){},r=this,i=e&&e.init?e.init:function(){r.apply(this,arguments)};o.prototype=r.prototype,n=i.fn=i.prototype=new o;for(t in e)n[t]=typeof e[t]!==OBJECT||e[t]instanceof Array||null===e[t]?e[t]:extend(!0,{},o.prototype[t],e[t]);return n.constructor=i,i.extend=r.extend,i};var Observable=Class.extend({init:function(){this._events={}},bind:function(e,t,n){var o,r,i,a,s,u=this,l=typeof e===STRING?[e]:e,d=typeof t===FUNCTION;for(o=0,r=l.length;r>o;o++)e=l[o],a=d?t:t[e],a&&(n&&(i=a,a=function(){u.unbind(e,a),i.apply(u,arguments)}),s=u._events[e]=u._events[e]||[],s.push(a));return u},one:function(e,t){return this.bind(e,t,!0)},first:function(e,t){var n,o,r,i,a=this,s=typeof e===STRING?[e]:e,u=typeof t===FUNCTION;for(n=0,o=s.length;o>n;n++)e=s[n],r=u?t:t[e],r&&(i=a._events[e]=a._events[e]||[],i.unshift(r));return a},trigger:function(e,t){var n,o,r=this,i=r._events[e],a=!1;if(i)for(t=t||{},t.sender=r,t.preventDefault=function(){a=!0},t.isDefaultPrevented=function(){return a},i=i.slice(),n=0,o=i.length;o>n;n++)i[n].call(r,t);return a},unbind:function(e,t){var n,o,r=this,i=r._events[e];if(e===undefined)r._events={};else if(i)if(t)for(n=0,o=i.length;o>n;n++)i[n]===t&&i.splice(n,1);else r._events[e]=[];return r}}),argumentNameRegExp=/^\w+/,encodeRegExp=/\$\{([^}]*)\}/g,escapedCurlyRegExp=/\\\}/g,curlyRegExp=/__CURLY__/g,escapedSharpRegExp=/\\#/g,sharpRegExp=/__SHARP__/g,zeros=["","0","00","000","0000"];Template={paramName:"data",useWithBlock:!0,render:function(e,t){var n,o,r="";for(n=0,o=t.length;o>n;n++)r+=e(t[n]);return r},compile:function(e,t){var n,o,r=extend({},this,t),i=r.paramName,a=i.match(argumentNameRegExp)[0],s=r.useWithBlock,u="var o,e=kendo.htmlEncode;";if(isFunction(e))return 2===e.length?function(t){return e($,{data:t}).join("")}:e;for(u+=s?"with("+i+"){":"",u+="o=",n=e.replace(escapedCurlyRegExp,"__CURLY__").replace(encodeRegExp,"#=e($1)#").replace(curlyRegExp,"}").replace(escapedSharpRegExp,"__SHARP__").split("#"),o=0;n.length>o;o++)u+=compilePart(n[o],0===o%2);u+=s?";}":";",u+="return o;",u=u.replace(sharpRegExp,"#");try{return Function(a,u)}catch(l){throw Error(kendo.format("Invalid template:'{0}' Generated code:'{1}'",e,u))}}},function(){function e(e){return i.lastIndex=0,i.test(e)?'"'+e.replace(i,function(e){var t=a[e];return typeof t===STRING?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function t(i,a){var u,l,d,p,c,f,m=n,h=a[i];if(h&&typeof h===OBJECT&&typeof h.toJSON===FUNCTION&&(h=h.toJSON(i)),typeof r===FUNCTION&&(h=r.call(a,i,h)),f=typeof h,f===STRING)return e(h);if(f===NUMBER)return isFinite(h)?h+"":NULL;if(f===BOOLEAN||f===NULL)return h+"";if(f===OBJECT){if(!h)return NULL;if(n+=o,c=[],"[object Array]"===s.apply(h)){for(p=h.length,u=0;p>u;u++)c[u]=t(u,h)||NULL;return d=0===c.length?"[]":n?"[\n"+n+c.join(",\n"+n)+"\n"+m+"]":"["+c.join(",")+"]",n=m,d}if(r&&typeof r===OBJECT)for(p=r.length,u=0;p>u;u++)typeof r[u]===STRING&&(l=r[u],d=t(l,h),d&&c.push(e(l)+(n?": ":":")+d));else for(l in h)Object.hasOwnProperty.call(h,l)&&(d=t(l,h),d&&c.push(e(l)+(n?": ":":")+d));return d=0===c.length?"{}":n?"{\n"+n+c.join(",\n"+n)+"\n"+m+"}":"{"+c.join(",")+"}",n=m,d}}var n,o,r,i=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,a={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},s={}.toString;typeof Date.prototype.toJSON!==FUNCTION&&(Date.prototype.toJSON=function(){var e=this;return isFinite(e.valueOf())?pad(e.getUTCFullYear(),4)+"-"+pad(e.getUTCMonth()+1)+"-"+pad(e.getUTCDate())+"T"+pad(e.getUTCHours())+":"+pad(e.getUTCMinutes())+":"+pad(e.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()}),typeof JSON.stringify!==FUNCTION&&(JSON.stringify=function(e,i,a){var s;if(n="",o="",typeof a===NUMBER)for(s=0;a>s;s+=1)o+=" ";else typeof a===STRING&&(o=a);if(r=i,i&&typeof i!==FUNCTION&&(typeof i!==OBJECT||typeof i.length!==NUMBER))throw Error("JSON.stringify");return t("",{"":e})})}(),function(){function e(e){if(e){if(e.numberFormat)return e;if(typeof e===STRING){var t=kendo.cultures;return t[e]||t[e.split("-")[0]]||null}return null}return null}function t(t){return t&&(t=e(t)),t||kendo.cultures.current}function n(e,n,o){o=t(o);var i=o.calendars.standard,a=i.days,s=i.months;return n=i.patterns[n]||n,n.replace(r,function(t){var n;return"d"===t?n=e.getDate():"dd"===t?n=pad(e.getDate()):"ddd"===t?n=a.namesAbbr[e.getDay()]:"dddd"===t?n=a.names[e.getDay()]:"M"===t?n=e.getMonth()+1:"MM"===t?n=pad(e.getMonth()+1):"MMM"===t?n=s.namesAbbr[e.getMonth()]:"MMMM"===t?n=s.names[e.getMonth()]:"yy"===t?n=pad(e.getFullYear()%100):"yyyy"===t?n=pad(e.getFullYear(),4):"h"===t?n=e.getHours()%12||12:"hh"===t?n=pad(e.getHours()%12||12):"H"===t?n=e.getHours():"HH"===t?n=pad(e.getHours()):"m"===t?n=e.getMinutes():"mm"===t?n=pad(e.getMinutes()):"s"===t?n=e.getSeconds():"ss"===t?n=pad(e.getSeconds()):"f"===t?n=math.floor(e.getMilliseconds()/100):"ff"===t?n=math.floor(e.getMilliseconds()/10):"fff"===t?n=e.getMilliseconds():"tt"===t&&(n=12>e.getHours()?i.AM[0]:i.PM[0]),n!==undefined?n:t.slice(1,t.length-1)})}function o(e,n,o){o=t(o);var r,m,h,g,y,v,k,b,w,M,x,S,E,O,N,T,C,R,A,F,$=o.numberFormat,z=$.groupSize[0],D=$[d],I=$[l],U=$.decimals,H=$.pattern[0],P=[],L=0>e,_=u,B=u,J=-1;if(e===undefined)return u;if(!isFinite(e))return e;if(!n)return o.name.length?e.toLocaleString():""+e;if(y=i.exec(n)){if(n=y[1].toLowerCase(),m="c"===n,h="p"===n,(m||h)&&($=m?$.currency:$.percent,z=$.groupSize[0],D=$[d],I=$[l],U=$.decimals,r=$.symbol,H=$.pattern[L?0:1]),g=y[2],g&&(U=+g),"e"===n)return g?e.toExponential(U):e.toExponential();if(h&&(e*=100),e=e.toFixed(U),e=e.split(l),v=e[0],k=e[1],L&&(v=v.substring(1)),B=v,b=v.length,b>=z)for(B=u,M=0;b>M;M++)M>0&&0===(b-M)%z&&(B+=D),B+=v.charAt(M);if(k&&(B+=I+k),"n"===n&&!L)return B;for(e=u,M=0,x=H.length;x>M;M++)S=H.charAt(M),e+="n"===S?B:"$"===S||"%"===S?r:S;return e}if(L&&(e=-e),n=n.split(";"),L&&n[1])n=n[1],O=!0;else if(0===e){if(n=n[2]||n[0],-1==n.indexOf(p)&&-1==n.indexOf(c))return n}else n=n[0];if((n.indexOf("'")>-1||n.indexOf('"')>-1)&&(n=n.replace(a,function(e){return P.push(e),f})),R=n.indexOf("%"),h=-1!=R,m=-1!=n.indexOf("$"),h&&("\\"!==n[R-1]?e*=100:n=n.split("\\").join("")),(m||h)&&($=m?$.currency:$.percent,z=$.groupSize[0],D=$[d],I=$[l],U=$.decimals,r=$.symbol),E=n.indexOf(d)>-1,E&&(n=n.replace(s,u)),N=n.indexOf(l),x=n.length,-1!=N?(C=n.lastIndexOf(c),T=n.lastIndexOf(p),k=(""+e).split(l)[1]||u,T>C&&k.length>T-C?M=T:-1!=C&&C>=N&&(M=C),M&&(e=e.toFixed(M-N))):e=e.toFixed(0),T=n.indexOf(p),A=C=n.indexOf(c),J=-1==T&&-1!=C?C:-1!=T&&-1==C?T:T>C?C:T,T=n.lastIndexOf(p),C=n.lastIndexOf(c),F=-1==T&&-1!=C?C:-1!=T&&-1==C?T:T>C?T:C,J==x&&(F=J),-1!=J){if(B=(""+e).split(l),v=B[0],k=B[1]||u,b=v.length,w=k.length,E)if(b===z&&N-A>b)v=D+v;else if(b>z){for(B=u,M=0;b>M;M++)M>0&&0===(b-M)%z&&(B+=D),B+=v.charAt(M);v=B}for(e=n.substring(0,J),L&&!O&&(e+="-"),M=J;x>M;M++){if(S=n.charAt(M),-1==N){if(b>F-M){e+=v;break}}else if(-1!=C&&M>C&&(_=u),b>=N-M&&N-M>-1&&(e+=v,M=N),N===M){e+=(k?I:u)+k,M+=F-N+1;continue}S===c?(e+=S,_=S):S===p&&(e+=_)}if(F>=J&&(e+=n.substring(F+1)),m||h){for(B=u,M=0,x=e.length;x>M;M++)S=e.charAt(M),B+="$"===S||"%"===S?r:S;e=B}if(P[0])for(x=P.length,M=0;x>M;M++)e=e.replace(f,P[M])}return e}var r=/dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|HH|H|hh|h|mm|m|fff|ff|f|tt|ss|s|"[^"]*"|'[^']*'/g,i=/^(n|c|p|e)(\d*)$/i,a=/["'].*?["']/g,s=/\,/g,u="",l=".",d=",",p="#",c="0",f="??",m="en-US";kendo.cultures={"en-US":{name:m,numberFormat:{pattern:["-n"],decimals:2,",":",",".":".",groupSize:[3],percent:{pattern:["-n %","n %"],decimals:2,",":",",".":".",groupSize:[3],symbol:"%"},currency:{pattern:["($n)","$n"],decimals:2,",":",",".":".",groupSize:[3],symbol:"$"}},calendars:{standard:{days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December"],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},AM:["AM","am","AM"],PM:["PM","pm","PM"],patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",F:"dddd, MMMM dd, yyyy h:mm:ss tt",g:"M/d/yyyy h:mm tt",G:"M/d/yyyy h:mm:ss tt",m:"MMMM dd",M:"MMMM dd",s:"yyyy'-'MM'-'ddTHH':'mm':'ss",t:"h:mm tt",T:"h:mm:ss tt",u:"yyyy'-'MM'-'dd HH':'mm':'ss'Z'",y:"MMMM, yyyy",Y:"MMMM, yyyy"},"/":"/",":":":",firstDay:0}}}},kendo.culture=function(t){var n,o=kendo.cultures;return t===undefined?o.current:(n=e(t)||o[m],n.calendar=n.calendars.standard,o.current=n,undefined)},kendo.findCulture=e,kendo.getCulture=t,kendo.culture(m);var h=function(e,t,r){if(t){if(e instanceof Date)return n(e,t,r);if(typeof e===NUMBER)return o(e,t,r)}return e!==undefined?e:""};globalize&&(h=proxy(globalize.format,globalize)),kendo.format=function(e){var t=arguments;return e.replace(formatRegExp,function(e,n,o){var r=t[parseInt(n,10)+1];return h(r,o?o.substring(1):"")})},kendo._extractFormat=function(e){return"{0:"===e.slice(0,3)&&(e=e.slice(3,e.length-1)),e},kendo.toString=h}(),function(){function e(e,t,n){return!(e>=t&&n>=e)}function t(e){return e.charAt(0)}function n(e){return $.map(e,t)}function o(e,t){t||23!==e.getHours()||e.setHours(e.getHours()+2)}function r(t,r,i){if(!t)return null;var a,l,d,c,f,m,h,g,y,v,k,b,w,M=function(e){for(var t=0;r[z]===e;)t++,z++;return t>0&&(z-=1),t},x=function(e){var n=p[e]||RegExp("^\\d{1,"+e+"}"),o=t.substr(D,e).match(n);return o?(o=o[0],D+=o.length,parseInt(o,10)):null},S=function(e){for(var n,o,r=0,i=e.length;i>r;r++)if(n=e[r],o=n.length,t.substr(D,o)==n)return D+=o,r+1;return null},E=function(){var e=!1;return t.charAt(D)===r[z]&&(D++,e=!0),e},O=i.calendars.standard,N=null,T=null,C=null,R=null,A=null,F=null,$=null,z=0,D=0,I=!1,U=new Date,H=30,P=U.getFullYear();for(r||(r="d"),c=O.patterns[r],c&&(r=c),r=r.split(""),d=r.length;d>z;z++)if(a=r[z],I)"'"===a?I=!1:E();else if("d"===a){if(l=M("d"),C=3>l?x(2):S(O.days[3==l?"namesAbbr":"names"]),null===C||e(C,1,31))return null}else if("M"===a){if(l=M("M"),T=3>l?x(2):S(O.months[3==l?"namesAbbr":"names"]),null===T||e(T,1,12))return null;T-=1}else if("y"===a){if(l=M("y"),N=x(l),null===N)return null;2==l&&(w=P-P%100,N>H&&(w-=100),N=w+N)}else if("h"===a){if(M("h"),R=x(2),12==R&&(R=0),null===R||e(R,0,11))return null}else if("H"===a){if(M("H"),R=x(2),null===R||e(R,0,23))return null}else if("m"===a){if(M("m"),A=x(2),null===A||e(A,0,59))return null}else if("s"===a){if(M("s"),F=x(2),null===F||e(F,0,59))return null}else if("f"===a){if(l=M("f"),$=x(l),null!==$&&l>3&&($=parseInt((""+$).substring(0,3),10)),null===$||e($,0,999))return null}else if("t"===a){if(l=M("t"),y=O.AM,v=O.PM,1===l&&(y=n(y),v=n(v)),f=S(v),!f&&!S(y))return null}else if("z"===a){if(m=!0,l=M("z"),"Z"===t.substr(D,1)){if(!h)return null;E();continue}if(g=t.substr(D,6).match(l>2?u:s),!g)return null;if(g=g[0],D=g.length,g=g.split(":"),k=parseInt(g[0],10),e(k,-12,13))return null;if(l>2&&(b=parseInt(g[1],10),isNaN(b)||e(b,0,59)))return null}else if("T"===a)h=E();else if("'"===a)I=!0,E();else if(!E())return null;return null===N&&(N=P),f&&12>R&&(R+=12),null===C&&(C=1),m?(k&&(R+=-k),b&&(A+=-b),t=new Date(Date.UTC(N,T,C,R,A,F,$))):(t=new Date(N,T,C,R,A,F,$),o(t,R)),100>N&&t.setFullYear(N),t}var i=/\u00A0/g,a=/[eE][\-+]?[0-9]+/,s=/[+|\-]\d{1,2}/,u=/[+|\-]\d{1,2}:\d{2}/,l=/^\/Date\((.*?)\)\/$/,d=["G","g","d","F","D","y","m","T","t"],p={2:/^\d{1,2}/,4:/^\d{4}/};kendo._adjustDate=o,kendo.parseDate=function(e,t,n){if(e instanceof Date)return e;var o,i,a=0,s=null;if(e&&0===e.indexOf("/D")&&(s=l.exec(e)))return new Date(parseInt(s[1],10));if(n=kendo.getCulture(n),!t){for(t=[],i=n.calendar.patterns,o=d.length;o>a;a++)t[a]=i[d[a]];t[a]="ddd MMM dd yyyy HH:mm:ss",t[++a]="yyyy-MM-ddTHH:mm:ss.fffffffzzz",t[++a]="yyyy-MM-ddTHH:mm:ss.fffzzz",t[++a]="yyyy-MM-ddTHH:mm:sszzz",t[++a]="yyyy-MM-ddTHH:mmzzz",t[++a]="yyyy-MM-ddTHH:mmzz",t[++a]="yyyy-MM-dd",a=0}for(t=isArray(t)?t:[t],o=t.length;o>a;a++)if(s=r(e,t[a],n))return s;return s},kendo.parseInt=function(e,t){var n=kendo.parseFloat(e,t);return n&&(n=0|n),n},kendo.parseFloat=function(e,t,n){if(!e&&0!==e)return null;if(typeof e===NUMBER)return e;e=""+e,t=kendo.getCulture(t);var o,r,s=t.numberFormat,u=s.percent,l=s.currency,d=l.symbol,p=u.symbol,c=e.indexOf("-")>-1;return a.test(e)?(e=parseFloat(e),isNaN(e)&&(e=null),e):(e.indexOf(d)>-1||n&&n.toLowerCase().indexOf("c")>-1?(s=l,o=s.pattern[0].replace("$",d).split("n"),e.indexOf(o[0])>-1&&e.indexOf(o[1])>-1&&(e=e.replace(o[0],"").replace(o[1],""),c=!0)):e.indexOf(p)>-1&&(r=!0,s=u,d=p),e=e.replace("-","").replace(d,"").replace(i," ").split(s[","].replace(i," ")).join("").replace(s["."],"."),e=parseFloat(e),isNaN(e)?e=null:c&&(e*=-1),e&&r&&(e/=100),e)},globalize&&(kendo.parseDate=function(e,t,n){return e instanceof Date?e:globalize.parseDate(e,t,n)},kendo.parseFloat=function(e,t){return typeof e===NUMBER?e:globalize.parseFloat(e,t)})}(),function(){function e(e){var t=!1,n=[],o={webkit:/(chrome)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,msie:/(msie) ([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+)|)/i};for(var r in o)if(o.hasOwnProperty(r)&&(n=e.match(o[r]))){t={},t[r]=!0,t[n[1].toLowerCase()]=!0,t.version=n[2];break}return t}support.scrollbar=function(){var e,t=document.createElement("div");return t.style.cssText="overflow:scroll;overflow-x:hidden;zoom:1;clear:both",t.innerHTML=" ",document.body.appendChild(t),e=t.offsetWidth-t.scrollWidth,document.body.removeChild(t),e},support.isRtl=function(e){return $(e).closest(".k-rtl").length>0};var t=document.createElement("table");try{t.innerHTML="<tr><td></td></tr>",support.tbodyInnerHtml=!0}catch(n){support.tbodyInnerHtml=!1}support.touch="ontouchstart"in window,support.pointers=navigator.msPointerEnabled;var o=support.transitions=!1,r=support.transforms=!1,i="HTMLElement"in window?HTMLElement.prototype:[];support.hasHW3D="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix||"MozPerspective"in document.documentElement.style||"msPerspective"in document.documentElement.style,support.hasNativeScrolling="string"==typeof document.documentElement.style.webkitOverflowScrolling,each(["Moz","webkit","O","ms"],function(){var e=""+this,n=typeof t.style[e+"Transition"]===STRING;if(n||typeof t.style[e+"Transform"]===STRING){var i=e.toLowerCase();return r={css:"-"+i+"-",prefix:e,event:"o"===i||"webkit"===i?i:"ms"===i?"MS":""},n&&(o=r,o.event=o.event?o.event+"TransitionEnd":"transitionend"),!1}}),support.transforms=r,support.transitions=o,support.devicePixelRatio=window.devicePixelRatio===undefined?1:window.devicePixelRatio,support.detectOS=function(e){var t,n=!1,o=[],r={fire:/(Silk)\/(\d+)\.(\d+(\.\d+)?)/,android:/(Android|Android.*(?:Opera|Firefox).*?\/)\s*(\d+)\.(\d+(\.\d+)?)/,iphone:/(iPhone|iPod).*OS\s+(\d+)[\._]([\d\._]+)/,ipad:/(iPad).*OS\s+(\d+)[\._]([\d_]+)/,meego:/(MeeGo).+NokiaBrowser\/(\d+)\.([\d\._]+)/,webos:/(webOS)\/(\d+)\.(\d+(\.\d+)?)/,blackberry:/(BlackBerry|BB10).*?Version\/(\d+)\.(\d+(\.\d+)?)/,playbook:/(PlayBook).*?Tablet\s*OS\s*(\d+)\.(\d+(\.\d+)?)/,winphone:/(IEMobile)\/(\d+)\.(\d+(\.\d+)?)/,windows:/(MSIE)\s+(\d+)\.(\d+(\.\d+)?)/},i={ios:/^i(phone|pad|pod)$/i,android:/^android|fire$/i,blackberry:/^blackberry|playbook/i,windows:/windows|winphone/},a={tablet:/playbook|ipad|fire/i},s={omini:/Opera\sMini/i,omobile:/Opera\sMobi/i,firefox:/Firefox|Fennec/i,mobilesafari:/version\/.*safari/i,chrome:/chrome/i,webkit:/webkit/i,ie:/MSIE|Windows\sPhone/i};for(var u in r)if(r.hasOwnProperty(u)&&(o=e.match(r[u]))){if("windows"==u&&"plugins"in navigator)return!1;n={},n.device=u,n.tablet=testRx(u,a,!1),n.browser=testRx(e,s,"default"),n.name=testRx(u,i),n[n.name]=!0,n.majorVersion=o[2],n.minorVersion=o[3].replace("_","."),t=n.minorVersion.replace(".","").substr(0,2),n.flatVersion=n.majorVersion+t+Array(3-(3>t.length?t.length:2)).join("0"),n.appMode=window.navigator.standalone||/file|local/.test(window.location.protocol)||typeof window.PhoneGap!==UNDEFINED||typeof window.cordova!==UNDEFINED,n.android&&1.5>support.devicePixelRatio&&(window.outerWidth>800||window.outerHeight>800||window.screen&&(window.screen.availWidth>800||window.screen.availHeight>800))&&(n.tablet=u);break}return n},support.mobileOS=support.detectOS(navigator.userAgent),support.kineticScrollNeeded=support.mobileOS&&support.touch,support.browser=e(navigator.userAgent),support.zoomLevel=function(){return support.touch?document.documentElement.clientWidth/window.innerWidth:1},support.eventCapture=document.documentElement.addEventListener,support.placeholder="placeholder"in document.createElement("input"),support.stableSort=function(){var e=[0,1,2,3,4,5,6,7,8,9,10,11,12].sort(function(){return 0});return 0===e[0]&&1===e[1]&&2===e[2]&&3===e[3]&&4===e[4]&&5===e[5]&&6===e[6]&&7===e[7]&&8===e[8]&&9===e[9]&&10===e[10]&&11===e[11]&&12===e[12]}(),support.matchesSelector=i.webkitMatchesSelector||i.mozMatchesSelector||i.msMatchesSelector||i.oMatchesSelector||i.matchesSelector||function(e){for(var t=document.querySelectorAll?(this.parentNode||document).querySelectorAll(e)||[]:$(e),n=t.length;n--;)if(t[n]==this)return!0;return!1}}();var directions={left:{reverse:"right"},right:{reverse:"left"},down:{reverse:"up"},up:{reverse:"down"},top:{reverse:"bottom"},bottom:{reverse:"top"},"in":{reverse:"out"},out:{reverse:"in"}};$.extend(fx,{Element:function(e){this.element=$(e)},promise:function(e,t){e.is(":visible")||e.css({display:e.data("olddisplay")||"block"}).css("display"),t.hide&&e.data("olddisplay",e.css("display")).hide(),t.init&&t.init(),t.completeCallback&&t.completeCallback(e),e.dequeue()},transitionPromise:function(e,t,n){var o=kendo.wrap(e);return o.append(t),e.hide(),t.show(),n.completeCallback&&n.completeCallback(e),e}}),"kendoAnimate"in $.fn||extend($.fn,{kendoStop:function(e,t){return this.stop(e,t)},kendoAnimate:function(e,t,n,o){return animate(this,e,t,n,o)},kendoAnimateTo:function(e,t,n,o,r){return animateTo(this,e,t,n,o,r)},kendoAddClass:function(e,t){return kendo.toggleClass(this,e,t,!0)},kendoRemoveClass:function(e,t){return kendo.toggleClass(this,e,t,!1)},kendoToggleClass:function(e,t,n){return kendo.toggleClass(this,e,t,n)}});var ampRegExp=/&/g,ltRegExp=/</g,gtRegExp=/>/g,touchLocation=function(e){var t=typeof e.pageX==UNDEFINED?e.originalEvent:e;return{idx:support.pointers?t.pointerId:0,x:t.pageX,y:t.pageY}},eventTarget=function(e){return e.target};if(support.touch){var mobileChrome="chrome"==support.mobileOS.browser&&!support.mobileOS.ios;touchLocation=function(e,t){var n=e.changedTouches||e.originalEvent.changedTouches;if(t){var o=null;return each(n,function(e,n){t==n.identifier&&(o={idx:n.identifier,x:n.pageX,y:n.pageY})}),o}return{idx:n[0].identifier,x:n[0].pageX,y:n[0].pageY}},eventTarget=function(e){var t="originalEvent"in e?e.originalEvent.changedTouches:"changedTouches"in e?e.changedTouches:null,n=mobileChrome?"screen":"client";return t?document.elementFromPoint(t[0][n+"X"],t[0][n+"Y"]):e.target},each(["swipe","swipeLeft","swipeRight","swipeUp","swipeDown","doubleTap","tap"],function(e,t){$.fn[t]=function(e){return this.bind(t,e)}})}support.touch?support.mobileOS?(support.mousedown="touchstart",support.mouseup="touchend",support.mousemove="touchmove",support.mousecancel="touchcancel",support.click="touchend",support.resize="orientationchange"):(support.mousedown="mousedown touchstart",support.mouseup="mouseup touchend",support.mousemove="mousemove touchmove",support.mousecancel="mouseleave touchcancel",support.click="click touchend",support.resize="resize"):support.pointers?(support.mousemove="MSPointerMove",support.mousedown="MSPointerDown",support.mouseup="MSPointerUp",support.mousecancel="MSPointerCancel",support.click="MSPointerUp",support.resize="orientationchange resize"):(support.mousemove="mousemove",support.mousedown="mousedown",support.mouseup="mouseup",support.mousecancel="mouseleave",support.click="click",support.resize="resize");var wrapExpression=function(e){var t,n,o,r,i="d",a=1;for(n=0,o=e.length;o>n;n++)r=e[n],""!==r&&(t=r.indexOf("["),0!==t&&(-1==t?r="."+r:(a++,r="."+r.substring(0,t)+" || {})"+r.substring(t))),a++,i+=r+(o-1>n?" || {})":")"));return Array(a).join("(")+i},localUrlRe=/^([a-z]+:)?\/\//i;extend(kendo,{ui:kendo.ui||{},fx:kendo.fx||fx,mobile:kendo.mobile||{},data:kendo.data||{},dataviz:kendo.dataviz||{ui:{roles:{}}},keys:{INSERT:45,DELETE:46,BACKSPACE:8,TAB:9,ENTER:13,ESC:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,END:35,HOME:36,SPACEBAR:32,PAGEUP:33,PAGEDOWN:34,F2:113,F10:121,F12:123},support:kendo.support||support,animate:kendo.animate||animate,ns:"",attr:function(e){return"data-"+kendo.ns+e},wrap:wrap,deepExtend:deepExtend,getComputedStyles:getComputedStyles,size:size,isNodeEmpty:isNodeEmpty,getOffset:kendo.getOffset||getOffset,parseEffects:kendo.parseEffects||parseEffects,toggleClass:kendo.toggleClass||toggleClass,directions:kendo.directions||directions,Observable:Observable,Class:Class,Template:Template,template:proxy(Template.compile,Template),render:proxy(Template.render,Template),stringify:proxy(JSON.stringify,JSON),touchLocation:touchLocation,eventTarget:eventTarget,htmlEncode:htmlEncode,isLocalUrl:function(e){return e&&!localUrlRe.test(e)},expr:function(e,t){return e=e||"",e&&"["!==e.charAt(0)&&(e="."+e),e=t?wrapExpression(e.split(".")):"d"+e},getter:function(e,t){return getterCache[e]=getterCache[e]||Function("d","return "+kendo.expr(e,t))},setter:function(e){return setterCache[e]=setterCache[e]||Function("d,value","d."+e+"=value")},accessor:function(e){return{get:kendo.getter(e),set:kendo.setter(e)}},guid:function(){var e,t,n="";for(e=0;32>e;e++)t=0|16*math.random(),(8==e||12==e||16==e||20==e)&&(n+="-"),n+=(12==e?4:16==e?8|3&t:t).toString(16);return n},roleSelector:function(e){return e.replace(/(\S+)/g,"["+kendo.attr("role")+"=$1],").slice(0,-1)},logToConsole:function(e){var t=window.console;t!==undefined&&t.log&&t.log(e)}});var Widget=Observable.extend({init:function(e,t){var n=this;n.element=kendo.jQuery(e).handler(n),Observable.fn.init.call(n),t=n.options=extend(!0,{},n.options,t),n.element.attr(kendo.attr("role"))||n.element.attr(kendo.attr("role"),(t.name||"").toLowerCase()),n.element.data("kendo"+t.prefix+t.name,n),n.bind(n.events,t)},events:[],options:{prefix:""},_tabindex:function(e){e=e||this.wrapper;var t=this.element,n="tabindex",o=e.attr(n)||t.attr(n);t.removeAttr(n),e.attr(n,isNaN(o)?0:o)},setOptions:function(e){for(var t,n=this,o=0,r=n.events.length;r>o;o++)t=n.events[o],n.options[t]&&e[t]&&n.unbind(t,n.options[t]);$.extend(n.options,e),n.bind(n.events,e)},destroy:function(){var e=this;e.element.removeData("kendo"+e.options.prefix+e.options.name),e.unbind()}});kendo.notify=noop;var templateRegExp=/template$/i,jsonRegExp=/^\s*(?:\{(?:.|\n)*\}|\[(?:.|\n)*\])\s*$/,jsonFormatRegExp=/^\{(\d+)(:[^\}]+)?\}/,dashRegExp=/([A-Z])/g;kendo.initWidget=function(e,t,n){var o,r,i,a,s,u,l,d;if(n?n.roles&&(n=n.roles):n=kendo.ui.roles,e=e.nodeType?e:e[0],u=e.getAttribute("data-"+kendo.ns+"role"),u&&(i=-1===u.indexOf(".")?n[u]:kendo.getter(u)(window))){for(d=parseOption(e,"dataSource"),t=$.extend({},parseOptions(e,i.fn.options),t),d&&(t.dataSource=typeof d===STRING?kendo.getter(d)(window):d),a=0,s=i.fn.events.length;s>a;a++)r=i.fn.events[a],l=parseOption(e,r),l!==undefined&&(t[r]=kendo.getter(l)(window));return o=$(e).data("kendo"+i.fn.options.prefix+i.fn.options.name),o?o.setOptions(t):o=new i(e,t),o}},kendo.rolesFromNamespaces=function(e){var t;return e[0]||(e=[kendo.ui,kendo.dataviz.ui]),t=$.map(e,function(e){return e.roles}).reverse(),extend.apply(null,[{}].concat(t))},kendo.init=function(e){var t=kendo.rolesFromNamespaces(slice.call(arguments,1));$(e).find("[data-"+kendo.ns+"role]").andSelf().each(function(){kendo.initWidget(this,{},t)})},kendo.destroy=function(e){$(e).find("[data-"+kendo.ns+"role]").andSelf().each(function(){var e=$(this),t=kendo.widgetInstance(e,kendo.ui)||kendo.widgetInstance(e,kendo.mobile.ui)||kendo.widgetInstance(e,kendo.dataviz.ui);t&&t.destroy()})},kendo.parseOptions=parseOptions,extend(kendo.ui,{Widget:Widget,roles:{},progress:function(e,t){var n=e.find(".k-loading-mask");t?n.length||(n=$("<div class='k-loading-mask'><span class='k-loading-text'>Loading...</span><div class='k-loading-image'/><div class='k-loading-color'/></div>").width("100%").height("100%").prependTo(e).css({top:e.scrollTop(),left:e.scrollLeft()})):n&&n.remove()},plugin:function(e,t,n){var o,r=e.fn.options.name;t=t||kendo.ui,n=n||"",t[r]=e,t.roles[r.toLowerCase()]=e,o="getKendo"+n+r,r="kendo"+n+r,$.fn[r]=function(t){var n,o=this;return typeof t===STRING?(n=slice.call(arguments,1),this.each(function(){var e,i,a=$.data(this,r);if(!a)throw Error(kendo.format("Cannot call method '{0}' of {1} before it is initialized",t,r));if(e=a[t],typeof e!==FUNCTION)throw Error(kendo.format("Cannot find method '{0}' of {1}",t,r));return i=e.apply(a,n),i!==undefined?(o=i,!1):undefined})):this.each(function(){new e(this,t)}),o},$.fn[o]=function(){return this.data(r)}}});var MobileWidget=Widget.extend({init:function(e,t){Widget.fn.init.call(this,e,t),this.element.autoApplyNS(),this.wrapper=this.element},destroy:function(){Widget.fn.destroy.call(this),this.element.kendoDestroy()},options:{prefix:"Mobile"},events:[],viewShow:$.noop,view:function(){var e=this.element.closest(kendo.roleSelector("view")+","+kendo.roleSelector("splitview"));return e.data("kendoMobileView")||e.data("kendoMobileSplitView")}});extend(kendo.mobile,{init:function(e){kendo.init(e,kendo.mobile.ui,kendo.ui,kendo.dataviz.ui)},ui:{Widget:MobileWidget,roles:{},plugin:function(e){kendo.ui.plugin(e,kendo.mobile.ui,"Mobile")}}}),kendo.touchScroller=function(e,t){return $(e).map(function(e,n){return n=$(n),support.kineticScrollNeeded&&kendo.mobile.ui.Scroller&&!n.data("kendoMobileScroller")?(n.kendoMobileScroller(t),n.data("kendoMobileScroller")):!1})[0]},kendo.preventDefault=function(e){e.preventDefault()},kendo.widgetInstance=function(e,t){var n=t.roles[e.data(kendo.ns+"role")];return n?e.data("kendo"+n.fn.options.prefix+n.fn.options.name):undefined},kendo.onResize=function(e){var t=e;support.mobileOS.android&&(t=function(){setTimeout(e,200)}),$(window).on(support.resize,t)},kendo.attrValue=function(e,t){return e.data(kendo.ns+t)},kendo.days={Sunday:0,Monday:1,Tuesday:2,Wednesday:3,Thursday:4,Friday:5,Saturday:6},$.extend($.expr[":"],{focusable:function(e){var t=$.attr(e,"tabindex");return focusable(e,!isNaN(t)&&t>-1)}});var MOUSE_EVENTS=["mousedown","mousemove","mouseenter","mouseleave","mouseover","mouseout","mouseup","click"];$.extend(kendo,{setupMouseMute:function(){var e=0,t=MOUSE_EVENTS.length,n=document.documentElement;if(!kendo.mouseTrap&&support.eventCapture){kendo.mouseTrap=!0,kendo.captureMouseEvents=!1;for(var o=function(e){kendo.captureMouse&&(e.stopPropagation(),"click"===e.type&&e.preventDefault())
|
12
|
+
};t>e;e++)n.addEventListener(MOUSE_EVENTS[e],o,!0)}},muteMouse:function(){kendo.captureMouse=!0,clearTimeout(kendo.mouseTrapTimeoutID)},unMuteMouse:function(){kendo.mouseTrapTimeoutID=setTimeout(function(){kendo.captureMouse=!1},400)}});var eventMap={down:"touchstart mousedown",move:"mousemove touchmove",up:"mouseup touchend touchcancel",cancel:"mouseleave touchcancel"};support.pointers&&(eventMap={down:"MSPointerDown",move:"MSPointerMove",up:"MSPointerUp",cancel:"MSPointerCancel"});var on=$.fn.on,kendoJQuery=$.sub();extend(kendoJQuery.fn,{handler:function(e){return this.data("handler",e),this},autoApplyNS:function(){return this.data("kendoNS","."+kendo.guid()),this},on:function(){var e=this,t=e.data("kendoNS");if(1===arguments.length)return on.call(e,arguments[0]);var n=e,o=slice.call(arguments);typeof o[o.length-1]===UNDEFINED&&o.pop();var r=o[o.length-1],i=o[0].replace(/([^ ]+)/g,applyEventMap);return t&&(i=i.replace(/( |$)/g,t+" ")),support.touch&&i.indexOf("mouse")>-1&&this[0]!==document.documentElement&&(kendo.setupMouseMute(),on.call(this,{touchstart:kendo.muteMouse,touchend:kendo.unMuteMouse})),typeof r===STRING&&(n=e.data("handler"),r=n[r],o[o.length-1]=function(e){r.call(n,e)}),o[0]=i,on.apply(e,o),e},kendoDestroy:function(){var e=this.data("kendoNS");return e&&this.off(e),this}}),kendo.jQuery=kendoJQuery,kendo.eventMap=eventMap})(jQuery);
|
@@ -1,10 +1,11 @@
|
|
1
1
|
/*
|
2
|
-
* Kendo UI Web v2012.
|
2
|
+
* Kendo UI Web v2012.3.1114 (http://kendoui.com)
|
3
3
|
* Copyright 2012 Telerik AD. All rights reserved.
|
4
4
|
*
|
5
|
-
* Kendo UI Web commercial licenses may be obtained at
|
5
|
+
* Kendo UI Web commercial licenses may be obtained at
|
6
|
+
* https://www.kendoui.com/purchase/license-agreement/kendo-ui-web-commercial.aspx
|
6
7
|
* If you do not own a commercial license, this file shall be governed by the
|
7
8
|
* GNU General Public License (GPL) version 3.
|
8
9
|
* For GPL requirements, please review: http://www.gnu.org/copyleft/gpl.html
|
9
10
|
*/
|
10
|
-
;(function(a,b){function bE(b,c){var d=a(b).children(),e,f,g=[],h,i=c[0].field,j=c[1]&&c[1].field,k=c[2]&&c[2].field,l=c[3]&&c[3].field,m,n,o,p,q;for(e=0,f=d.length;e<f;e++)h={},m=d.eq(e),o=m[0].firstChild,q=m.children(),b=q.filter("ul"),q=q.filter(":not(ul)"),n=m.attr("data-id"),n&&(h.id=n),o&&(h[i]=o.nodeType==3?o.nodeValue:q.text()),j&&(h[j]=q.find("a").attr("href")),l&&(h[l]=q.find("img").attr("src")),k&&(p=q.find(".k-sprite").prop("className"),h[k]=p&&a.trim(p.replace("k-sprite",""))),b.length&&(h.items=bE(b.eq(0),c)),m.attr("data-hasChildren")=="true"&&(h.hasChildren=!0),g.push(h);return g}function bB(b,c){var d=a(b)[0].tBodies[0],e=d?d.rows:[],f,g,h,i=c.length,j=[],k,l,m,n;for(f=0,g=e.length;f<g;f++){l={},n=!0,k=e[f].cells;for(h=0;h<i;h++)m=k[h],m.nodeName.toLowerCase()!=="th"&&(n=!1,l[c[h].field]=m.innerHTML);n||j.push(l)}return j}function bA(b,c){var d=a(b)[0].children,e,f,g=[],h,i=c[0],j=c[1],k,l;for(e=0,f=d.length;e<f;e++)h={},l=d[e],h[i.field]=l.text,k=l.attributes.value,k&&k.specified?k=l.value:k=l.text,h[j.field]=k,g.push(h);return g}function by(a,b){var c,d;for(c=0,d=a.length;c<d;c++)if(b(a[c]))return c;return-1}function bx(a,b){if(b)return by(a,function(a){return a.uid==b.uid});return-1}function bw(a,b){if(b)return by(a,function(a){return a[b.idField]===b.id});return-1}function bv(a,b){var c,d,e,f;for(e=a.length-1,f=0;e>=f;e--)d=a[e],c={value:b.get(d.field),field:d.field,items:c?[c]:[b],hasSubgroups:!!c,aggregates:{}};return c}function bu(a,b){var c,d;for(c=0,d=a.length;c<d;c++)if(a[c].uid==b.uid){b=a[c],a.splice(c,1);return b}}function bt(a,b){var c,d;for(c=0,d=a.length;c<d;c++)if(a[c].hasSubgroups){if(bt(a[c].items,b))return!0}else if(b(a[c].items,a[c]))return!0}function bs(a,b){var c,d,e,f;if(b)for(c=0,d=a.length;c<d;c++)e=a[c],f=e.items,e.hasSubgroups?bs(f,b):f.length&&!(f[0]instanceof b)&&(f.type=b,f.wrapAll(f,f))}function br(a){var b,c,d=[];for(b=0,c=a.length;b<c;b++)a[b].hasSubgroups?d=d.concat(br(a[b].items)):d=d.concat(a[b].items.slice());return d}function bp(a,b,c,d){return function(e){e=a(e),e&&!g(d)&&(M.call(e)!=="[object Array]"&&!(e instanceof Q)&&(e=[e]),c(e,d,new b));return e||[]}}function bo(a,b,c){var d,e,f;for(e=0,f=a.length;e<f;e++)d=a[e],d.value=c._parse(d.field,d.value),d.hasSubgroups?bo(d.items,b,c):bn(d.items,b,c)}function bn(a,b,c){var d,e,f,g;for(f=0,g=a.length;f<g;f++){d=a[f];for(e in b)d[e]=c._parse(e,b[e](d))}}function bj(a,b){b=b||{};var c=new Z(a),d=b.aggregate,e=b.filter;e&&(c=c.filter(e));return c.aggregate(d)}function bi(a,c){c=c||{};var d=new Z(a),e=c.group,f=bd(e||[]).concat($(c.sort||[])),g,h=c.filter,i=c.skip,j=c.take;h&&(d=d.filter(h),g=d.toArray().length),f&&(d=d.sort(f),e&&(a=d.toArray())),i!==b&&j!==b&&(d=d.range(i,j)),e&&(d=d.group(e,a));return{total:g,data:d.toArray()}}function bh(a){var b,c=a.length,d=Array(c);for(b=0;b<c;b++)d[b]=a[b].toJSON();return d}function bf(a,b,c,d,e){b=b||[];var f,g,h,i=b.length;for(f=0;f<i;f++){g=b[f],h=g.aggregate;var j=g.field;a[j]=a[j]||{},a[j][h]=bg[h.toLowerCase()](a[j][h],c,n.accessor(j),d,e)}}function be(a,b){if(a&&a.getTime&&b&&b.getTime)return a.getTime()===b.getTime();return a===b}function bd(a,c){var d=typeof a===q?{field:a,dir:c}:a,e=h(d)?d:d!==b?[d]:[];return k(e,function(a){return{field:a.field,dir:a.dir||"asc",aggregates:a.aggregates}})}function bc(a){return h(a)?a:[a]}function bb(a){if(a&&!g(a)){if(h(a)||!a.filters)a={logic:"and",filters:h(a)?a:[a]};ba(a);return a}}function ba(a){var b,c,d,e,f=a.filters;if(f)for(b=0,c=f.length;b<c;b++)d=f[b],e=d.operator,e&&typeof e===q&&(d.operator=_[e.toLowerCase()]||e),ba(d)}function $(a,c){if(a){var d=typeof a===q?{field:a,dir:c}:a,e=h(d)?d:d!==b?[d]:[];return i(e,function(a){return!!a.dir})}}function Z(a){this.data=a||[]}function S(b,c){if(b===c)return!0;var d=a.type(b),e=a.type(c),f;if(d!==e)return!1;if(d==="date")return b.getTime()===c.getTime();if(d!=="object"&&d!=="array")return!1;for(f in b)if(!S(b[f],c[f]))return!1;return!0}var c=a.extend,d=a.proxy,e=a.isFunction,f=a.isPlainObject,g=a.isEmptyObject,h=a.isArray,i=a.grep,j=a.ajax,k,l=a.each,m=a.noop,n=window.kendo,o=n.Observable,p=n.Class,q="string",r="function",s="create",t="read",u="update",v="destroy",w="change",x="get",y="error",z="requestStart",A=[s,t,u,v],B=function(a){return a},C=n.getter,D=n.stringify,E=Math,F=[].push,G=[].join,H=[].pop,I=[].splice,J=[].shift,K=[].slice,L=[].unshift,M={}.toString,N=n.support.stableSort,O=/^\/Date\((.*?)\)\/$/,P=/(?=['\\])/g,Q=o.extend({init:function(a,b){var c=this;c.type=b||R,o.fn.init.call(c),c.length=a.length,c.wrapAll(a,c)},toJSON:function(){var a,b=this.length,c,d=Array(b);for(a=0;a<b;a++)c=this[a],c instanceof R&&(c=c.toJSON()),d[a]=c;return d},parent:m,wrapAll:function(a,b){var c=this,d,e,f=function(){return c};b=b||[];for(d=0,e=a.length;d<e;d++)b[d]=c.wrap(a[d],f);return b},wrap:function(a,b){var c=this,d;a!==null&&M.call(a)==="[object Object]"&&(d=a instanceof c.type||a instanceof V,d||(a=a instanceof R?a.toJSON():a,a=new c.type(a)),a.parent=b,a.bind(w,function(a){c.trigger(w,{field:a.field,node:a.node,index:a.index,items:a.items||[this],action:a.action||"itemchange"})}));return a},push:function(){var a=this.length,b=this.wrapAll(arguments),c;c=F.apply(this,b),this.trigger(w,{action:"add",index:a,items:b});return c},slice:K,join:G,pop:function(){var a=this.length,b=H.apply(this);a&&this.trigger(w,{action:"remove",index:a-1,items:[b]});return b},splice:function(a,b,c){var d=this.wrapAll(K.call(arguments,2)),e,f,g;e=I.apply(this,[a,b].concat(d));if(e.length){this.trigger(w,{action:"remove",index:a,items:e});for(f=0,g=e.length;f<g;f++)e[f].children&&e[f].unbind(w)}c&&this.trigger(w,{action:"add",index:a,items:d});return e},shift:function(){var a=this.length,b=J.apply(this);a&&this.trigger(w,{action:"remove",index:0,items:[b]});return b},unshift:function(){var a=this.wrapAll(arguments),b;b=L.apply(this,a),this.trigger(w,{action:"add",index:0,items:a});return b},indexOf:function(a){var b=this,c,d;for(c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1}}),R=o.extend({init:function(a){var b=this,c,d,e=function(){return b},f;o.fn.init.call(this);for(d in a)c=a[d],d.charAt(0)!="_"&&(f=M.call(c),c=b.wrap(c,d,e)),b[d]=c;b.uid=n.guid()},shouldSerialize:function(a){return this.hasOwnProperty(a)&&a!=="_events"&&typeof this[a]!==r&&a!=="uid"},toJSON:function(){var a={},b,c;for(c in this)if(this.shouldSerialize(c)){b=this[c];if(b instanceof R||b instanceof Q)b=b.toJSON();a[c]=b}return a},get:function(a){var b=this,c;b.trigger(x,{field:a}),a==="this"?c=b:c=n.getter(a,!0)(b);return c},_set:function(a,b){var c=this;if(a.indexOf(".")){var d=a.split("."),e="";while(d.length>1){e+=d.shift();var f=n.getter(e,!0)(c);if(f instanceof R){f.set(d.join("."),b);return}e+="."}}n.setter(a)(c,b)},set:function(a,b){var c=this,d=c[a],e=function(){return c};d!==b&&(c.trigger("set",{field:a,value:b})||(c._set(a,c.wrap(b,a,e)),c.trigger(w,{field:a})))},parent:m,wrap:function(a,b,c){var d=this,e=M.call(a),f=a instanceof Q;a===null||e!=="[object Object]"||a instanceof bz||!!f?a===null||e!=="[object Array]"&&!f?a!==null&&a instanceof bz&&(a._parent=c):(f||(a=new Q(a)),a.parent=c,function(b){a.bind(w,function(a){d.trigger(w,{field:b,index:a.index,items:a.items,action:a.action})})}(b)):(a instanceof R||(a=new R(a)),a.parent=c,function(b){a.bind(x,function(a){a.field=b+"."+a.field,d.trigger(x,a)}),a.bind(w,function(a){a.field=b+"."+a.field,d.trigger(w,a)})}(b));return a}}),T={number:function(a){return n.parseFloat(a)},date:function(a){if(typeof a===q){var b=O.exec(a);if(b)return new Date(parseInt(b[1],10))}return n.parseDate(a)},"boolean":function(a){if(typeof a===q)return a.toLowerCase()==="true";return!!a},string:function(a){return a+""},"default":function(a){return a}},U={string:"",number:0,date:new Date,"boolean":!1,"default":""},V=R.extend({init:function(c){var d=this;if(!c||a.isEmptyObject(c))c=a.extend({},d.defaults,c);R.fn.init.call(d,c),d.dirty=!1,d.idField&&(d.id=d.get(d.idField),d.id===b&&(d.id=d._defaultId))},shouldSerialize:function(a){return R.fn.shouldSerialize.call(this,a)&&a!=="uid"&&(this.idField==="id"||a!=="id")&&a!=="dirty"&&a!=="_accessors"},_parse:function(a,b){var c=this,d;a=(c.fields||{})[a],a&&(d=a.parse,!d&&a.type&&(d=T[a.type.toLowerCase()]));return d?d(b):b},editable:function(a){a=(this.fields||{})[a];return a?a.editable!==!1:!0},set:function(a,b,c){var d=this;d.editable(a)&&(b=d._parse(a,b),S(b,d.get(a))||(d.dirty=!0,R.fn.set.call(d,a,b,c)))},accept:function(a){var b=this;c(b,a),b.idField&&(b.id=b.get(b.idField)),b.dirty=!1},isNew:function(){return this.id===this._defaultId}});V.define=function(a,d){d===b&&(d=a,a=V);var e,f=c({},{defaults:{}},d),g,h,i,j,k=f.id;k&&(f.idField=k),f.id&&delete f.id,k&&(f.defaults[k]=f._defaultId="");for(g in f.fields)h=f.fields[g],i=h.type||"default",j=null,g=typeof h.field===q?h.field:g,h.nullable||(j=f.defaults[g]=h.defaultValue!==b?h.defaultValue:U[i.toLowerCase()]),d.id===g&&(f._defaultId=j),f.defaults[g]=j,h.parse=h.parse||T[i];e=a.extend(f),e.define=function(a){return V.define(e,a)},f.fields&&(e.fields=f.fields,e.idField=f.idField);return e};var W={selector:function(a){return e(a)?a:C(a)},asc:function(a){var b=this.selector(a);return function(a,c){a=b(a),c=b(c);return a>c?1:a<c?-1:0}},desc:function(a){var b=this.selector(a);return function(a,c){a=b(a),c=b(c);return a<c?1:a>c?-1:0}},create:function(a){return this[a.dir.toLowerCase()](a.field)},combine:function(a){return function(b,c){var d=a[0](b,c),e,f;for(e=1,f=a.length;e<f;e++)d=d||a[e](b,c);return d}}},X=c({},W,{asc:function(a){var b=this.selector(a);return function(a,c){var d=b(a),e=b(c);if(d===e)return a.__position-c.__position;return d>e?1:d<e?-1:0}},desc:function(a){var b=this.selector(a);return function(a,c){var d=b(a),e=b(c);if(d===e)return a.__position-c.__position;return d<e?1:d>e?-1:0}}});k=function(a,b){var c,d=a.length,e=Array(d);for(c=0;c<d;c++)e[c]=b(a[c],c,a);return e};var Y=function(){function b(b,c,d,e){var f;d!=null&&(typeof d===q&&(d=a(d),f=O.exec(d),f?d=new Date(+f[1]):e?(d="'"+d.toLowerCase()+"'",c="("+c+" || '').toLowerCase()"):d="'"+d+"'"),d.getTime&&(c="("+c+"?"+c+".getTime():"+c+")",d=d.getTime()));return c+" "+b+" "+d}function a(a){return a.replace(P,"\\")}return{eq:function(a,c,d){return b("==",a,c,d)},neq:function(a,c,d){return b("!=",a,c,d)},gt:function(a,c,d){return b(">",a,c,d)},gte:function(a,c,d){return b(">=",a,c,d)},lt:function(a,c,d){return b("<",a,c,d)},lte:function(a,c,d){return b("<=",a,c,d)},startswith:function(b,c,d){d&&(b=b+".toLowerCase()",c&&(c=c.toLowerCase())),c&&(c=a(c));return b+".lastIndexOf('"+c+"', 0) == 0"},endswith:function(b,c,d){d&&(b=b+".toLowerCase()",c&&(c=c.toLowerCase())),c&&(c=a(c));return b+".lastIndexOf('"+c+"') == "+b+".length - "+(c||"").length},contains:function(b,c,d){d&&(b="("+b+" || '').toLowerCase()",c&&(c=c.toLowerCase())),c&&(c=a(c));return b+".indexOf('"+c+"') >= 0"},doesnotcontain:function(b,c,d){d&&(b="("+b+" || '').toLowerCase()",c&&(c=c.toLowerCase())),c&&(c=a(c));return b+".indexOf('"+c+"') == -1"}}}();Z.filterExpr=function(a){var c=[],d={and:" && ",or:" || "},e,f,g,h,i=[],j=[],k,l,m=a.filters;for(e=0,f=m.length;e<f;e++)g=m[e],k=g.field,l=g.operator,g.filters?(h=Z.filterExpr(g),g=h.expression.replace(/__o\[(\d+)\]/g,function(a,b){b=+b;return"__o["+(j.length+b)+"]"}).replace(/__f\[(\d+)\]/g,function(a,b){b=+b;return"__f["+(i.length+b)+"]"}),j.push.apply(j,h.operators),i.push.apply(i,h.fields)):(typeof k===r?(h="__f["+i.length+"](d)",i.push(k)):h=n.expr(k),typeof l===r?(g="__o["+j.length+"]("+h+", "+g.value+")",j.push(l)):g=Y[(l||"eq").toLowerCase()](h,g.value,g.ignoreCase!==b?g.ignoreCase:!0)),c.push(g);return{expression:"("+c.join(d[a.logic])+")",fields:i,operators:j}};var _={"==":"eq",equals:"eq",isequalto:"eq",equalto:"eq",equal:"eq","!=":"neq",ne:"neq",notequals:"neq",isnotequalto:"neq",notequalto:"neq",notequal:"neq","<":"lt",islessthan:"lt",lessthan:"lt",less:"lt","<=":"lte",le:"lte",islessthanorequalto:"lte",lessthanequal:"lte",">":"gt",isgreaterthan:"gt",greaterthan:"gt",greater:"gt",">=":"gte",isgreaterthanorequalto:"gte",greaterthanequal:"gte",ge:"gte",notsubstringof:"doesnotcontain"};Z.normalizeFilter=bb,Z.prototype={toArray:function(){return this.data},range:function(a,b){return new Z(this.data.slice(a,a+b))},skip:function(a){return new Z(this.data.slice(a))},take:function(a){return new Z(this.data.slice(0,a))},select:function(a){return new Z(k(this.data,a))},orderBy:function(a){var b=this.data.slice(0),c=e(a)||!a?W.asc(a):a.compare;return new Z(b.sort(c))},orderByDescending:function(a){return new Z(this.data.slice(0).sort(W.desc(a)))},sort:function(a,b,c){var d,e,f=$(a,b),g=[];c=c||W;if(f.length){for(d=0,e=f.length;d<e;d++)g.push(c.create(f[d]));return this.orderBy({compare:c.combine(g)})}return this},filter:function(a){var b,c,d,e,f,g=this.data,h,i,j=[],k;a=bb(a);if(!a||a.filters.length===0)return this;e=Z.filterExpr(a),h=e.fields,i=e.operators,f=k=new Function("d, __f, __o","return "+e.expression);if(h.length||i.length)k=function(a){return f(a,h,i)};for(b=0,d=g.length;b<d;b++)c=g[b],k(c)&&j.push(c);return new Z(j)},group:function(a,b){a=bd(a||[]),b=b||this.data;var c=this,d=new Z(c.data),e;a.length>0&&(e=a[0],d=d.groupBy(e).select(function(c){var d=(new Z(b)).filter([{field:c.field,operator:"eq",value:c.value}]);return{field:c.field,value:c.value,items:a.length>1?(new Z(c.items)).group(a.slice(1),d.toArray()).toArray():c.items,hasSubgroups:a.length>1,aggregates:d.aggregate(e.aggregates)}}));return d},groupBy:function(a){if(g(a)||!this.data.length)return new Z([]);var b=a.field,c=this._sortForGrouping(b,a.dir||"asc"),d=n.accessor(b),e,f=d.get(c[0],b),h={field:b,value:f,items:[]},i,j,k,l=[h];for(j=0,k=c.length;j<k;j++)e=c[j],i=d.get(e,b),be(f,i)||(f=i,h={field:b,value:f,items:[]},l.push(h)),h.items.push(e);return new Z(l)},_sortForGrouping:function(a,b){var c,d,e=this.data;if(!N){for(c=0,d=e.length;c<d;c++)e[c].__position=c;e=(new Z(e)).sort(a,b,X).toArray();for(c=0,d=e.length;c<d;c++)delete e[c].__position;return e}return this.sort(a,b).toArray()},aggregate:function(a){var b,c,d={};if(a&&a.length)for(b=0,c=this.data.length;b<c;b++)bf(d,a,this.data[b],b,c);return d}};var bg={sum:function(a,b,c){return(a||0)+c.get(b)},count:function(a,b,c){return(a||0)+1},average:function(a,b,c,d,e){a=(a||0)+c.get(b),d==e-1&&(a=a/e);return a},max:function(a,b,c){var d=c.get(b);a=a||0,a<d&&(a=d);return a},min:function(a,b,c){var d=c.get(b);a=a||d,a>d&&(a=d);return a}},bk=p.extend({init:function(a){this.data=a.data},read:function(a){a.success(this.data)},update:function(a){a.success(a.data)},create:function(a){a.success(a.data)},destroy:m}),bl=p.extend({init:function(a){var b=this,d;a=b.options=c({},b.options,a),l(A,function(b,c){typeof a[c]===q&&(a[c]={url:a[c]})}),b.cache=a.cache?bm.create(a.cache):{find:m,add:m},d=a.parameterMap,b.parameterMap=e(d)?d:function(a){var b={};l(a,function(a,c){a in d&&(a=d[a],f(a)&&(c=a.value(c),a=a.key)),b[a]=c});return b}},options:{parameterMap:B},create:function(a){return j(this.setup(a,s))},read:function(c){var d=this,e,f,g,h=d.cache;c=d.setup(c,t),e=c.success||m,f=c.error||m,g=h.find(c.data),g!==b?e(g):(c.success=function(a){h.add(c.data,a),e(a)},a.ajax(c))},update:function(a){return j(this.setup(a,u))},destroy:function(a){return j(this.setup(a,v))},setup:function(a,b){a=a||{};var d=this,f,g=d.options[b],h=e(g.data)?g.data(a.data):g.data;a=c(!0,{},g,a),f=c(!0,{},h,a.data),a.data=d.parameterMap(f,b),e(a.url)&&(a.url=a.url(f));return a}}),bm=p.extend({init:function(){this._store={}},add:function(a,c){a!==b&&(this._store[D(a)]=c)},find:function(a){return this._store[D(a)]},clear:function(){this._store={}},remove:function(a){delete this._store[D(a)]}});bm.create=function(a){var b={inmemory:function(){return new bm}};if(f(a)&&e(a.find))return a;if(a===!0)return new bm;return b[a]()};var bq=p.extend({init:function(a){var b=this,c,e,g,h;a=a||{};for(c in a)e=a[c],b[c]=typeof e===q?C(e):e;h=a.modelBase||V;if(f(b.model)){b.model=g=h.define(b.model);var i=d(b.data,b),j=d(b.groups,b),k={};g.fields&&l(g.fields,function(a,b){f(b)&&b.field?k[b.field]=C(b.field):k[a]=C(a)}),b.data=bp(i,g,bn,k),b.groups=bp(j,g,bo,k)}},errors:function(a){return a?a.errors:null},parse:B,data:B,total:function(a){return a.length},groups:B,status:function(a){return a.status},aggregates:function(){return{}}}),bz=o.extend({init:function(a){var d=this,g,h,i;a&&(i=a.data),a=d.options=c({},d.options,a),c(d,{_map:{},_prefetch:{},_data:[],_ranges:[],_view:[],_pristine:[],_destroyed:[],_pageSize:a.pageSize,_page:a.page||(a.pageSize?1:b),_sort:$(a.sort),_filter:bb(a.filter),_group:bd(a.group),_aggregate:a.aggregate,_total:a.total}),o.fn.init.call(d),h=a.transport,h?(h.read=typeof h.read===q?{url:h.read}:h.read,a.type&&(n.data.transports[a.type]&&!f(n.data.transports[a.type])?d.transport=new n.data.transports[a.type](c(h,{data:i})):h=c(!0,{},n.data.transports[a.type],h),a.schema=c(!0,{},n.data.schemas[a.type],a.schema)),d.transport||(d.transport=e(h.read)?h:new bl(h))):d.transport=new bk({data:a.data}),d.reader=new n.data.readers[a.schema.type||"json"](a.schema),g=d.reader.model||{},d._data=d._observe(d._data),d.bind([y,w,z],a)},options:{data:[],schema:{modelBase:V},serverSorting:!1,serverPaging:!1,serverFiltering:!1,serverGrouping:!1,serverAggregates:!1,sendAllFields:!0,batch:!1},_flatData:function(a){if(this.options.serverGrouping&&this.group().length)return br(a);return a},get:function(a){var b,c,d=this._flatData(this._data);for(b=0,c=d.length;b<c;b++)if(d[b].id==a)return d[b]},getByUid:function(a){var b,c,d=this._flatData(this._data);for(b=0,c=d.length;b<c;b++)if(d[b].uid==a)return d[b]},sync:function(){var b=this,c,d,e=[],f=[],g=b._destroyed,h=b._flatData(b._data);if(!!b.reader.model){for(c=0,d=h.length;c<d;c++)h[c].isNew()?e.push(h[c]):h[c].dirty&&f.push(h[c]);var i=b._send("create",e);i.push.apply(i,b._send("update",f)),i.push.apply(i,b._send("destroy",g)),a.when.apply(null,i).then(function(){var a,c;for(a=0,c=arguments.length;a<c;a++)b._accept(arguments[a]);b._change()})}},_accept:function(b){var d=this,e=b.models,f=b.response,g=0,h=d.options.serverGrouping&&d.group()&&d.group().length,i=d.reader.data(d._pristine),j=b.type,k;if(f){f=d.reader.parse(f);if(d._handleCustomErrors(f))return;f=d.reader.data(f),a.isArray(f)||(f=[f])}else f=a.map(e,function(a){return a.toJSON()});j==="destroy"&&(d._destroyed=[]);for(g=0,k=e.length;g<k;g++)j!=="destroy"?(e[g].accept(f[g]),j==="create"?i.push(h?bv(d.group(),e[g]):e[g]):j==="update"&&(h?d._updatePristineGroupModel(e[g],f[g]):c(i[d._pristineIndex(e[g])],f[g]))):h?d._removePristineGroupModel(e[g]):i.splice(d._pristineIndex(e[g]),1)},_pristineIndex:function(a){var b=this,c,d,e=b.reader.data(b._pristine);for(c=0,d=e.length;c<d;c++)if(e[c][a.idField]===a.id)return c;return-1},_updatePristineGroupModel:function(a,b){var d=this.reader.groups(this._pristine),e;bt(d,function(d,f){e=bw(d,a);if(e>-1){c(!0,d[e],b);return!0}})},_removePristineGroupModel:function(a){var b=this.reader.groups(this._pristine),c;bt(b,function(b,d){c=bw(b,a);if(c>-1){b.splice(c,1);return!0}})},_promise:function(b,d,e){var f=this,g=f.transport;return a.Deferred(function(a){g[e].call(g,c({success:function(b){a.resolve({response:b,models:d,type:e})},error:function(b){a.reject(b),f.trigger(y,b)}},b))}).promise()},_send:function(a,b){var c=this,d,e,f=[];if(c.options.batch)b.length&&f.push(c._promise({data:{models:bh(b)}},b,a));else for(d=0,e=b.length;d<e;d++)f.push(c._promise({data:b[d].toJSON()},[b[d]],a));return f},add:function(a){return this.insert(this._data.length,a)},insert:function(a,b){b||(b=a,a=0),b instanceof V||(this.reader.model?b=new this.reader.model(b):b=new R(b)),this.options.serverGrouping&&this.group()&&this.group().length?this._data.splice(a,0,bv(this.group(),b)):this._data.splice(a,0,b);return b},cancelChanges:function(a){var b=this,d,e=b.options.serverGrouping&&b.group()&&b.group().length,f=e?b.reader.groups:b.reader.data,g=f(b._pristine),h;a instanceof n.data.Model?e?b._cancelGroupModel(a):(h=b.indexOf(a),d=b._pristineIndex(a),h!=-1&&(d!=-1&&!a.isNew()?c(!0,b._data[h],g[d]):b._data.splice(h,1))):(b._destroyed=[],b._data=b._observe(g),b._change())},read:function(a){var b=this,c=b._params(a);b._queueRequest(c,function(){b.trigger(z),b._ranges=[],b.transport.read({data:c,success:d(b.success,b),error:d(b.error,b)})})},_cancelGroupModel:function(a){var b=this.reader.groups(this._pristine),d,e;bt(b,function(b,c){e=bw(b,a);if(e>-1){d=b[e];return!0}}),e>-1&&bt(this._data,function(b,f){e=bx(b,a),e>-1&&(a.isNew()?b.splice(e,1):c(!0,b[e],d))})},indexOf:function(a){return bx(this._data,a)},_params:function(a){var b=this,d=c({take:b.take(),skip:b.skip(),page:b.page(),pageSize:b.pageSize(),sort:b._sort,filter:b._filter,group:b._group,aggregate:b._aggregate},a);b.options.serverPaging||(delete d.take,delete d.skip,delete d.page,delete d.pageSize);return d},_queueRequest:function(a,c){var e=this;e._requestInProgress?e._pending={callback:d(c,e),options:a}:(e._requestInProgress=!0,e._pending=b,c())},_dequeueRequest:function(){var a=this;a._requestInProgress=!1,a._pending&&a._queueRequest(a._pending.options,a._pending.callback)},remove:function(a){var b=this._data;if(this.options.serverGrouping&&this.group()&&this.group().length)return this._removeGroupItem(b,a);return bu(b,a)},_removeGroupItem:function(a,b){var c;bt(a,function(a,d){c=bu(a,b);if(c)return!0});return b},error:function(a,b,c){this._dequeueRequest(),this.trigger(y,{xhr:a,status:b,errorThrown:c})},_handleCustomErrors:function(a){if(this.reader.errors){var b=this.reader.errors(a);if(b){this.trigger(y,{xhr:null,status:"customerror",errorThrown:"custom error",errors:b});return!0}}return!1},_parent:m,success:function(b){var c=this,d=c.options,e=d.serverGrouping===!0&&c._group&&c._group.length>0;b=c.reader.parse(b);if(!c._handleCustomErrors(b)){c._pristine=f(b)?a.extend(!0,{},b):b.slice(0),c._total=c.reader.total(b),c._aggregate&&d.serverAggregates&&(c._aggregateResult=c.reader.aggregates(b)),e?b=c.reader.groups(b):b=c.reader.data(b),c._data=c._observe(b);var g=c._skip||0,h=g+c._data.length;c._ranges.push({start:g,end:h,data:c._data}),c._ranges.sort(function(a,b){return a.start-b.start}),c._dequeueRequest(),c._process(c._data)}},_observe:function(a){var b=this,c=b.reader.model,e=!1;c&&a.length&&(e=!(a[0]instanceof c)),a instanceof Q?e&&(a.type=b.reader.model,a.wrapAll(a,a)):(a=new Q(a,b.reader.model),a.parent=function(){return b._parent()}),b.group()&&b.group().length&&b.options.serverGrouping&&bs(a,c);return a.bind(w,d(b._change,b))},_change:function(a){var b=this,c,d,e=a?a.action:"";if(e==="remove")for(c=0,d=a.items.length;c<d;c++)(!a.items[c].isNew||!a.items[c].isNew())&&b._destroyed.push(a.items[c]);if(!b.options.autoSync||e!=="add"&&e!=="remove"&&e!=="itemchange"){var f=b._total||b.reader.total(b._pristine);e==="add"?f++:e==="remove"?f--:e!=="itemchange"&&!b.options.serverPaging&&(f=b.reader.total(b._pristine)),b._total=f,b._process(b._data,a)}else b.sync()},_process:function(a,c){var d=this,e={},f;d.options.serverPaging!==!0&&(e.skip=d._skip,e.take=d._take||d._pageSize,e.skip===b&&d._page!==b&&d._pageSize!==b&&(e.skip=(d._page-1)*d._pageSize)),d.options.serverSorting!==!0&&(e.sort=d._sort),d.options.serverFiltering!==!0&&(e.filter=d._filter),d.options.serverGrouping!==!0&&(e.group=d._group),d.options.serverAggregates!==!0&&(e.aggregate=d._aggregate,d._aggregateResult=bj(a,e)),f=bi(a,e),d._view=f.data,f.total!==b&&!d.options.serverFiltering&&(d._total=f.total),c=c||{},c.items=c.items||d._view,d.trigger(w,c)},at:function(a){return this._data[a]},data:function(a){var c=this;if(a!==b)c._data=this._observe(a),c._total=c._data.length,c._process(c._data);else return c._data},view:function(){return this._view},query:function(a){var c=this,d,e=c.options.serverSorting||c.options.serverPaging||c.options.serverFiltering||c.options.serverGrouping||c.options.serverAggregates;a!==b&&(c._pageSize=a.pageSize,c._page=a.page,c._sort=a.sort,c._filter=a.filter,c._group=a.group,c._aggregate=a.aggregate,c._skip=a.skip,c._take=a.take,c._skip===b&&(c._skip=c.skip(),a.skip=c.skip()),c._take===b&&c._pageSize!==b&&(c._take=c._pageSize,a.take=c._take),a.sort&&(c._sort=a.sort=$(a.sort)),a.filter&&(c._filter=a.filter=bb(a.filter)),a.group&&(c._group=a.group=bd(a.group)),a.aggregate&&(c._aggregate=a.aggregate=bc(a.aggregate))),e||c._data===b||c._data.length===0?c.read(a):(c.trigger(z),d=bi(c._data,a),c.options.serverFiltering||(d.total!==b?c._total=d.total:c._total=c._data.length),c._view=d.data,c._aggregateResult=bj(c._data,a),c.trigger(w,{items:d.data}))},fetch:function(a){var b=this;a&&e(a)&&b.one(w,a),b._query()},_query:function(a){var b=this;b.query(c({},{page:b.page(),pageSize:b.pageSize(),sort:b.sort(),filter:b.filter(),group:b.group(),aggregate:b.aggregate()},a))},next:function(){var a=this,b=a.page(),c=a.total();!b||(c?a.page(b+1):(a._skip=b*a.take(),a._query({page:b+1})))},prev:function(){var a=this,b=a.page(),c=a.total();!!b&&b!==1&&(c?a.page(b-1):(a._skip=a._skip-a.take(),a._query({page:b-1})))},page:function(a){var c=this,d;if(a!==b)a=E.max(E.min(E.max(a,1),c.totalPages()),1),c._query({page:a});else{d=c.skip();return d!==b?E.round((d||0)/(c.take()||1))+1:b}},pageSize:function(a){var c=this;if(a!==b)c._query({pageSize:a,page:1});else return c.take()},sort:function(a){var c=this;if(a!==b)c._query({sort:a});else return c._sort},filter:function(a){var c=this;if(a===b)return c._filter;c._query({filter:a,page:1})},group:function(a){var c=this;if(a!==b)c._query({group:a});else return c._group},total:function(){return this._total||0},aggregate:function(a){var c=this;if(a!==b)c._query({aggregate:a});else return c._aggregate},aggregates:function(){return this._aggregateResult},totalPages:function(){var a=this,b=a.pageSize()||a.total();return E.ceil((a.total()||0)/b)},inRange:function(a,b){var c=this,d=E.min(a+b,c.total());if(!c.options.serverPaging&&c.data.length>0)return!0;return c._findRange(a,d).length>0},range:function(a,c){a=E.min(a||0,this.total());var d=this,e=E.max(E.floor(a/c),0)*c,f=E.min(e+c,d.total()),g;g=d._findRange(a,E.min(a+c,d.total()));if(g.length){d._skip=a>d.skip()?E.min(f,(d.totalPages()-1)*d.take()):e,d._take=c;var h=d.options.serverPaging,i=d.options.serverSorting;try{d.options.serverPaging=!0,d.options.serverSorting=!0,h&&(d._data=g=d._observe(g)),d._process(g)}finally{d.options.serverPaging=h,d.options.serverSorting=i}}else c!==b&&(d._rangeExists(e,f)?e<a&&d.prefetch(f,c,function(){d.range(a,c)}):d.prefetch(e,c,function(){a>e&&f<d.total()&&!d._rangeExists(f,E.min(f+c,d.total()))?d.prefetch(f,c,function(){d.range(a,c)}):d.range(a,c)}))},_findRange:function(a,c){var d=this,e=d._ranges,f,g=[],h,i,j,k,l,m,n,o=d.options,p=o.serverSorting||o.serverPaging||o.serverFiltering||o.serverGrouping||o.serverAggregates,q;for(h=0,q=e.length;h<q;h++){f=e[h];if(a>=f.start&&a<=f.end){var r=0;for(i=h;i<q;i++){f=e[i];if(f.data.length&&a+r>=f.start){l=f.data,m=f.end,p||(n=bi(f.data,{sort:d.sort(),filter:d.filter()}),l=n.data,n.total!==b&&(m=n.total)),j=0,a+r>f.start&&(j=a+r-f.start),k=l.length,m>c&&(k=k-(m-c)),r+=k-j,g=g.concat(l.slice(j,k));if(c<=f.end&&r==c-a)return g}}break}}return[]},skip:function(){var a=this;if(a._skip===b)return a._page!==b?(a._page-1)*(a.take()||1):b;return a._skip},take:function(){var a=this;return a._take||a._pageSize},prefetch:function(a,b,c){var d=this,e=E.min(a+b,d.total()),f={start:a,end:e,data:[]},g={take:b,skip:a,page:a/b+1,pageSize:b,sort:d._sort,filter:d._filter,group:d._group,aggregate:d._aggregate};d._rangeExists(a,e)?c&&c():(clearTimeout(d._timeout),d._timeout=setTimeout(function(){d._queueRequest(g,function(){d.transport.read({data:g,success:function(b){d._dequeueRequest();var e=!1;for(var g=0,h=d._ranges.length;g<h;g++)if(d._ranges[g].start===a){e=!0,f=d._ranges[g];break}e||d._ranges.push(f),b=d.reader.parse(b),f.data=d._observe(d.reader.data(b)),f.end=f.start+f.data.length,d._ranges.sort(function(a,b){return a.start-b.start}),d._total=d.reader.total(b),c&&c()}})})},100))},_rangeExists:function(a,b){var c=this,d=c._ranges,e,f;for(e=0,f=d.length;e<f;e++)if(d[e].start<=a&&d[e].end>=b)return!0;return!1}});bz.create=function(a){a=a&&a.push?{data:a}:a;var b=a||{},d=b.data,e=b.fields,f=b.table,h=b.select,i,j,k={},l;!d&&e&&!b.transport&&(f?d=bB(f,e):h&&(d=bA(h,e)));if(n.data.Model&&e&&(!b.schema||!b.schema.model)){for(i=0,j=e.length;i<j;i++)l=e[i],l.type&&(k[l.field]=l);g(k)||(b.schema=c(!0,b.schema,{model:{fields:k}}))}b.data=d;return b instanceof bz?b:new bz(b)};var bC=V.define({init:function(a){var b=this,d=b.hasChildren||a.hasChildren,f="items",g={};n.data.Model.fn.init.call(b,a),typeof b.children===q&&(f=b.children),g=c({schema:{data:f,model:{hasChildren:d}}},b.children,{data:a}),d||(d=g.schema.data),typeof d===q&&(d=n.getter(d)),e(d)&&(b.hasChildren=!!d.call(b,b)),b.children=new bD(g),b.children._parent=function(){return b},b.children.bind(w,function(a){a.node=a.node||b,b.trigger(w,a)}),b._loaded=!!a&&!!a[f]},hasChildren:!1,level:function(){var a=this.parentNode(),b=0;while(a)b++,a=a.parentNode();return b},load:function(){var a=this,c={};c[a.idField||"id"]=a.id,a._loaded||(a.children._data=b),a.children.one(w,function(){a._loaded=!0}).query(c)},parentNode:function(){var a=this.parent();return a.parent()},loaded:function(a){if(a!==b)this._loaded=a;else return this._loaded},shouldSerialize:function(a){return V.fn.shouldSerialize.call(this,a)&&a!=="children"&&a!=="_loaded"&&a!=="hasChildren"}}),bD=bz.extend({init:function(a){var b=bC.define({children:a});bz.fn.init.call(this,c(!0,{},{schema:{modelBase:b,model:b}},a))},remove:function(a){var b=a.parentNode(),c=this,d;b&&(c=b.children),d=bz.fn.remove.call(c,a),b&&!c.data().length&&(b.hasChildren=!1);return d},insert:function(a,b){var c=this._parent();c&&(c.hasChildren=!0);return bz.fn.insert.call(this,a,b)},getByUid:function(a){var b,c,d,e;d=bz.fn.getByUid.call(this,a);if(d)return d;e=this._flatData(this.data());for(b=0,c=e.length;b<c;b++){d=e[b].children.getByUid(a);if(d)return d}}});bD.create=function(a){a=a&&a.push?{data:a}:a;var b=a||{},c=b.data,d=b.fields,e=b.list;!c&&d&&!b.transport&&e&&(c=bE(e,d)),b.data=c;return b instanceof bD?b:new bD(b)},c(!0,n.data,{readers:{json:bq},Query:Z,DataSource:bz,HierarchicalDataSource:bD,Node:bC,ObservableObject:R,ObservableArray:Q,LocalTransport:bk,RemoteTransport:bl,Cache:bm,DataReader:bq,Model:V})})(jQuery);
|
11
|
+
(function(e,t){function r(t,n){if(t===n)return!0;var i,a=e.type(t),o=e.type(n);if(a!==o)return!1;if("date"===a)return t.getTime()===n.getTime();if("object"!==a&&"array"!==a)return!1;for(i in t)if(!r(t[i],n[i]))return!1;return!0}function n(e,t){var r,n;for(n in e){if(r=e[n],P(r)&&r.field&&r.field===t)return r;if(r===t)return r}return null}function i(e){this.data=e||[]}function a(e,r){if(e){var n=typeof e===J?{field:e,dir:r}:e,i=j(n)?n:n!==t?[n]:[];return L(i,function(e){return!!e.dir})}}function o(e){var t,r,n,i,a=e.filters;if(a)for(t=0,r=a.length;r>t;t++)n=a[t],i=n.operator,i&&typeof i===J&&(n.operator=St[i.toLowerCase()]||i),o(n)}function s(e){return e&&!G(e)?((j(e)||!e.filters)&&(e={logic:"and",filters:j(e)?e:[e]}),o(e),e):t}function u(e){return j(e)?e:[e]}function l(e,r){var n=typeof e===J?{field:e,dir:r}:e,i=j(n)?n:n!==t?[n]:[];return F(i,function(e){return{field:e.field,dir:e.dir||"asc",aggregates:e.aggregates}})}function d(e,t){return e&&e.getTime&&t&&t.getTime?e.getTime()===t.getTime():e===t}function f(e,t,r,n,i){t=t||[];var a,o,s,u=t.length;for(a=0;u>a;a++){o=t[a],s=o.aggregate;var l=o.field;e[l]=e[l]||{},e[l][s]=Ct[s.toLowerCase()](e[l][s],r,I.accessor(l),n,i)}}function g(e){var t,r=e.length,n=Array(r);for(t=0;r>t;t++)n[t]=e[t].toJSON();return n}function c(e,r){r=r||{};var n,o=new i(e),s=r.group,u=l(s||[]).concat(a(r.sort||[])),d=r.filter,f=r.skip,g=r.take;return d&&(o=o.filter(d),n=o.toArray().length),u&&(o=o.sort(u),s&&(e=o.toArray())),f!==t&&g!==t&&(o=o.range(f,g)),s&&(o=o.group(s,e)),{total:n,data:o.toArray()}}function p(e,t){t=t||{};var r=new i(e),n=t.aggregate,a=t.filter;return a&&(r=r.filter(a)),r.aggregate(n)}function h(e,t,r){var n,i,a,o;for(a=0,o=e.length;o>a;a++){n=e[a];for(i in t)n[i]=r._parse(i,t[i](n))}}function _(e,t,r){var n,i,a;for(i=0,a=e.length;a>i;i++)n=e[i],n.value=r._parse(n.field,n.value),n.hasSubgroups?_(n.items,t,r):h(n.items,t,r)}function v(e,t,r,n){return function(i){return i=e(i),i&&!G(n)&&("[object Array]"===ct.call(i)||i instanceof vt||(i=[i]),r(i,n,new t)),i||[]}}function m(e){var t,r,n=[];for(t=0,r=e.length;r>t;t++)n=e[t].hasSubgroups?n.concat(m(e[t].items)):n.concat(e[t].items.slice());return n}function y(e,t){var r,n,i,a;if(t)for(r=0,n=e.length;n>r;r++)i=e[r],a=i.items,i.hasSubgroups?y(a,t):!a.length||a[0]instanceof t||(a.type=t,a.wrapAll(a,a))}function w(e,t){var r,n;for(r=0,n=e.length;n>r;r++)if(e[r].hasSubgroups){if(w(e[r].items,t))return!0}else if(t(e[r].items,e[r]))return!0}function q(e,t){var r,n;for(r=0,n=e.length;n>r;r++)if(e[r].uid==t.uid)return t=e[r],e.splice(r,1),t}function x(e,t){var r,n,i,a;for(i=e.length-1,a=0;i>=a;i--)n=e[i],r={value:t.get(n.field),field:n.field,items:r?[r]:[t],hasSubgroups:!!r,aggregates:{}};return r}function k(e,t){return t?S(e,function(e){return e[t.idField]===t.id}):-1}function b(e,t){return t?S(e,function(e){return e.uid==t.uid}):-1}function S(e,t){var r,n;for(r=0,n=e.length;n>r;r++)if(t(e[r]))return r;return-1}function C(t,r){var n,i,a,o,s,u=e(t)[0].children,l=[],d=r[0],f=r[1];for(n=0,i=u.length;i>n;n++)a={},s=u[n],a[d.field]=s.text,o=s.attributes.value,o=o&&o.specified?s.value:s.text,a[f.field]=o,l.push(a);return l}function A(t,r){var n,i,a,o,s,u,l,d=e(t)[0].tBodies[0],f=d?d.rows:[],g=r.length,c=[];for(n=0,i=f.length;i>n;n++){for(s={},l=!0,o=f[n].cells,a=0;g>a;a++)u=o[a],"th"!==u.nodeName.toLowerCase()&&(l=!1,s[r[a].field]=u.innerHTML);l||c.push(s)}return c}function O(t,r){var n,i,a,o,s,u,l,d,f=e(t).children(),g=[],c=r[0].field,p=r[1]&&r[1].field,h=r[2]&&r[2].field,_=r[3]&&r[3].field;for(n=0,i=f.length;i>n;n++)a={},o=f.eq(n),u=o[0].firstChild,d=o.children(),t=d.filter("ul"),d=d.filter(":not(ul)"),s=o.attr("data-id"),s&&(a.id=s),u&&(a[c]=3==u.nodeType?u.nodeValue:d.text()),p&&(a[p]=d.find("a").attr("href")),_&&(a[_]=d.find("img").attr("src")),h&&(l=d.find(".k-sprite").prop("className"),a[h]=l&&e.trim(l.replace("k-sprite",""))),t.length&&(a.items=O(t.eq(0),r)),"true"==o.attr("data-hasChildren")&&(a.hasChildren=!0),g.push(a);return g}var F,z=e.extend,N=e.proxy,T=e.isFunction,P=e.isPlainObject,G=e.isEmptyObject,j=e.isArray,L=e.grep,R=e.ajax,M=e.each,D=e.noop,I=window.kendo,E=I.Observable,B=I.Class,J="string",U="function",V="create",H="read",Q="update",$="destroy",K="change",W="sync",X="get",Y="error",Z="requestStart",et="requestEnd",tt=[V,H,Q,$],rt=function(e){return e},nt=I.getter,it=I.stringify,at=Math,ot=[].push,st=[].join,ut=[].pop,lt=[].splice,dt=[].shift,ft=[].slice,gt=[].unshift,ct={}.toString,pt=I.support.stableSort,ht=/^\/Date\((.*?)\)\/$/,_t=/(?=['\\])/g,vt=E.extend({init:function(e,t){var r=this;r.type=t||mt,E.fn.init.call(r),r.length=e.length,r.wrapAll(e,r)},toJSON:function(){var e,t,r=this.length,n=Array(r);for(e=0;r>e;e++)t=this[e],t instanceof mt&&(t=t.toJSON()),n[e]=t;return n},parent:D,wrapAll:function(e,t){var r,n,i=this,a=function(){return i};for(t=t||[],r=0,n=e.length;n>r;r++)t[r]=i.wrap(e[r],a);return t},wrap:function(e,t){var r,n=this;return null!==e&&"[object Object]"===ct.call(e)&&(r=e instanceof n.type||e instanceof qt,r||(e=e instanceof mt?e.toJSON():e,e=new n.type(e)),e.parent=t,e.bind(K,function(e){n.trigger(K,{field:e.field,node:e.node,index:e.index,items:e.items||[this],action:e.node?e.action||"itemchange":"itemchange"})})),e},push:function(){var e,t=this.length,r=this.wrapAll(arguments);return e=ot.apply(this,r),this.trigger(K,{action:"add",index:t,items:r}),e},slice:ft,join:st,pop:function(){var e=this.length,t=ut.apply(this);return e&&this.trigger(K,{action:"remove",index:e-1,items:[t]}),t},splice:function(e,t,r){var n,i,a,o=this.wrapAll(ft.call(arguments,2));if(n=lt.apply(this,[e,t].concat(o)),n.length)for(this.trigger(K,{action:"remove",index:e,items:n}),i=0,a=n.length;a>i;i++)n[i].children&&n[i].unbind(K);return r&&this.trigger(K,{action:"add",index:e,items:o}),n},shift:function(){var e=this.length,t=dt.apply(this);return e&&this.trigger(K,{action:"remove",index:0,items:[t]}),t},unshift:function(){var e,t=this.wrapAll(arguments);return e=gt.apply(this,t),this.trigger(K,{action:"add",index:0,items:t}),e},indexOf:function(e){var t,r,n=this;for(t=0,r=n.length;r>t;t++)if(n[t]===e)return t;return-1}}),mt=E.extend({init:function(e){var t,r,n,i=this,a=function(){return i};E.fn.init.call(this);for(r in e)t=e[r],"_"!=r.charAt(0)&&(n=ct.call(t),t=i.wrap(t,r,a)),i[r]=t;i.uid=I.guid()},shouldSerialize:function(e){return this.hasOwnProperty(e)&&"_events"!==e&&typeof this[e]!==U&&"uid"!==e},toJSON:function(){var e,t,r={};for(t in this)this.shouldSerialize(t)&&(e=this[t],(e instanceof mt||e instanceof vt)&&(e=e.toJSON()),r[t]=e);return r},get:function(e){var t,r=this;return r.trigger(X,{field:e}),t="this"===e?r:I.getter(e,!0)(r)},_set:function(e,r){var n=this;if(e.indexOf("."))for(var i=e.split("."),a="";i.length>1;){a+=i.shift();var o=I.getter(a,!0)(n);if(o instanceof mt)return o.set(i.join("."),r),t;a+="."}I.setter(e)(n,r)},set:function(e,t){var r=this,n=I.getter(e,!0)(r),i=function(){return r};n!==t&&(r.trigger("set",{field:e,value:t})||(r._set(e,r.wrap(t,e,i)),r.trigger(K,{field:e})))},parent:D,wrap:function(e,r,n){var i=this,a=ct.call(e),o=e instanceof vt;return null===e||e===t||"[object Object]"!==a||e instanceof Nt||o?null===e||"[object Array]"!==a&&!o?null!==e&&e instanceof Nt&&(e._parent=n):(o||(e=new vt(e)),e.parent=n,function(t){e.bind(K,function(e){i.trigger(K,{field:t,index:e.index,items:e.items,action:e.action})})}(r)):(e instanceof mt||(e=new mt(e)),e.parent=n,function(t){e.bind(X,function(e){e.field=t+"."+e.field,i.trigger(X,e)}),e.bind(K,function(e){e.field=t+"."+e.field,i.trigger(K,e)})}(r)),e}}),yt={number:function(e){return I.parseFloat(e)},date:function(e){return I.parseDate(e)},"boolean":function(e){return typeof e===J?"true"===e.toLowerCase():null!=e?!!e:e},string:function(e){return null!=e?e+"":e},"default":function(e){return e}},wt={string:"",number:0,date:new Date,"boolean":!1,"default":""},qt=mt.extend({init:function(r){var n=this;(!r||e.isEmptyObject(r))&&(r=e.extend({},n.defaults,r)),mt.fn.init.call(n,r),n.dirty=!1,n.idField&&(n.id=n.get(n.idField),n.id===t&&(n.id=n._defaultId))},shouldSerialize:function(e){return mt.fn.shouldSerialize.call(this,e)&&"uid"!==e&&!("id"!==this.idField&&"id"===e)&&"dirty"!==e&&"_accessors"!==e},_parse:function(e,t){var r,i=this,a=e,o=i.fields||{};return e=o[e],e||(e=n(o,a)),e&&(r=e.parse,!r&&e.type&&(r=yt[e.type.toLowerCase()])),r?r(t):t},editable:function(e){return e=(this.fields||{})[e],e?e.editable!==!1:!0},set:function(e,t,n){var i=this;i.editable(e)&&(t=i._parse(e,t),r(t,i.get(e))||(i.dirty=!0,mt.fn.set.call(i,e,t,n)))},accept:function(e){var t,r=this,n=function(){return r};for(t in e)r._set(t,r.wrap(e[t],t,n));r.idField&&(r.id=r.get(r.idField)),r.dirty=!1},isNew:function(){return this.id===this._defaultId}});qt.define=function(e,r){r===t&&(r=e,e=qt);var n,i,a,o,s,u=z({defaults:{}},r),l=u.id;l&&(u.idField=l),u.id&&delete u.id,l&&(u.defaults[l]=u._defaultId="");for(i in u.fields)a=u.fields[i],o=a.type||"default",s=null,i=typeof a.field===J?a.field:i,a.nullable||(s=u.defaults[i]=a.defaultValue!==t?a.defaultValue:wt[o.toLowerCase()]),r.id===i&&(u._defaultId=s),u.defaults[i]=s,a.parse=a.parse||yt[o];return n=e.extend(u),n.define=function(e){return qt.define(n,e)},u.fields&&(n.fields=u.fields,n.idField=u.idField),n};var xt={selector:function(e){return T(e)?e:nt(e)},asc:function(e){var t=this.selector(e);return function(e,r){return e=t(e),r=t(r),null==e&&null==r?0:e&&!r||null==r?1:r&&!e?-1:e>r?1:r>e?-1:0}},desc:function(e){var t=this.selector(e);return function(e,r){return e=t(e),r=t(r),null==e&&null==r?0:e&&!r||null==r?-1:r&&!e||null==e?1:r>e?1:e>r?-1:0}},create:function(e){return this[e.dir.toLowerCase()](e.field)},combine:function(e){return function(t,r){var n,i,a=e[0](t,r);for(n=1,i=e.length;i>n;n++)a=a||e[n](t,r);return a}}},kt=z({},xt,{asc:function(e){var t=this.selector(e);return function(e,r){var n=t(e),i=t(r);return n&&n.getTime&&i&&i.getTime&&(n=n.getTime(),i=i.getTime()),n===i?e.__position-r.__position:null==i?1:n>i?1:i>n?-1:0}},desc:function(e){var t=this.selector(e);return function(e,r){var n=t(e),i=t(r);return n&&n.getTime&&i&&i.getTime&&(n=n.getTime(),i=i.getTime()),n===i?e.__position-r.__position:i>n?1:n>i?-1:0}}});F=function(e,t){var r,n=e.length,i=Array(n);for(r=0;n>r;r++)i[r]=t(e[r],r,e);return i};var bt=function(){function e(e){return e.replace(_t,"\\")}function t(t,r,n,i){var a;return null!=n&&(typeof n===J&&(n=e(n),a=ht.exec(n),a?n=new Date(+a[1]):i?(n="'"+n.toLowerCase()+"'",r="("+r+" || '').toLowerCase()"):n="'"+n+"'"),n.getTime&&(r="("+r+"?"+r+".getTime():"+r+")",n=n.getTime())),r+" "+t+" "+n}return{eq:function(e,r,n){return t("==",e,r,n)},neq:function(e,r,n){return t("!=",e,r,n)},gt:function(e,r,n){return t(">",e,r,n)},gte:function(e,r,n){return t(">=",e,r,n)},lt:function(e,r,n){return t("<",e,r,n)},lte:function(e,r,n){return t("<=",e,r,n)},startswith:function(t,r,n){return n&&(t+=".toLowerCase()",r&&(r=r.toLowerCase())),r&&(r=e(r)),t+".lastIndexOf('"+r+"', 0) == 0"},endswith:function(t,r,n){return n&&(t+=".toLowerCase()",r&&(r=r.toLowerCase())),r&&(r=e(r)),t+".indexOf('"+r+"', "+t+".length - "+(r||"").length+") >= 0"},contains:function(t,r,n){return n&&(t="("+t+" || '').toLowerCase()",r&&(r=r.toLowerCase())),r&&(r=e(r)),t+".indexOf('"+r+"') >= 0"},doesnotcontain:function(t,r,n){return n&&(t="("+t+" || '').toLowerCase()",r&&(r=r.toLowerCase())),r&&(r=e(r)),t+".indexOf('"+r+"') == -1"}}}();i.filterExpr=function(e){var r,n,a,o,s,u,l=[],d={and:" && ",or:" || "},f=[],g=[],c=e.filters;for(r=0,n=c.length;n>r;r++)a=c[r],s=a.field,u=a.operator,a.filters?(o=i.filterExpr(a),a=o.expression.replace(/__o\[(\d+)\]/g,function(e,t){return t=+t,"__o["+(g.length+t)+"]"}).replace(/__f\[(\d+)\]/g,function(e,t){return t=+t,"__f["+(f.length+t)+"]"}),g.push.apply(g,o.operators),f.push.apply(f,o.fields)):(typeof s===U?(o="__f["+f.length+"](d)",f.push(s)):o=I.expr(s),typeof u===U?(a="__o["+g.length+"]("+o+", "+a.value+")",g.push(u)):a=bt[(u||"eq").toLowerCase()](o,a.value,a.ignoreCase!==t?a.ignoreCase:!0)),l.push(a);return{expression:"("+l.join(d[e.logic])+")",fields:f,operators:g}};var St={"==":"eq",equals:"eq",isequalto:"eq",equalto:"eq",equal:"eq","!=":"neq",ne:"neq",notequals:"neq",isnotequalto:"neq",notequalto:"neq",notequal:"neq","<":"lt",islessthan:"lt",lessthan:"lt",less:"lt","<=":"lte",le:"lte",islessthanorequalto:"lte",lessthanequal:"lte",">":"gt",isgreaterthan:"gt",greaterthan:"gt",greater:"gt",">=":"gte",isgreaterthanorequalto:"gte",greaterthanequal:"gte",ge:"gte",notsubstringof:"doesnotcontain"};i.normalizeFilter=s,i.prototype={toArray:function(){return this.data},range:function(e,t){return new i(this.data.slice(e,e+t))},skip:function(e){return new i(this.data.slice(e))},take:function(e){return new i(this.data.slice(0,e))},select:function(e){return new i(F(this.data,e))},orderBy:function(e){var t=this.data.slice(0),r=T(e)||!e?xt.asc(e):e.compare;return new i(t.sort(r))},orderByDescending:function(e){return new i(this.data.slice(0).sort(xt.desc(e)))},sort:function(e,t,r){var n,i,o=a(e,t),s=[];if(r=r||xt,o.length){for(n=0,i=o.length;i>n;n++)s.push(r.create(o[n]));return this.orderBy({compare:r.combine(s)})}return this},filter:function(e){var t,r,n,a,o,u,l,d,f=this.data,g=[];if(e=s(e),!e||0===e.filters.length)return this;for(a=i.filterExpr(e),u=a.fields,l=a.operators,o=d=Function("d, __f, __o","return "+a.expression),(u.length||l.length)&&(d=function(e){return o(e,u,l)}),t=0,n=f.length;n>t;t++)r=f[t],d(r)&&g.push(r);return new i(g)},group:function(e,t){e=l(e||[]),t=t||this.data;var r,n=this,a=new i(n.data);return e.length>0&&(r=e[0],a=a.groupBy(r).select(function(n){var a=new i(t).filter([{field:n.field,operator:"eq",value:n.value}]);return{field:n.field,value:n.value,items:e.length>1?new i(n.items).group(e.slice(1),a.toArray()).toArray():n.items,hasSubgroups:e.length>1,aggregates:a.aggregate(r.aggregates)}})),a},groupBy:function(e){if(G(e)||!this.data.length)return new i([]);var t,r,n,a,o=e.field,s=this._sortForGrouping(o,e.dir||"asc"),u=I.accessor(o),l=u.get(s[0],o),f={field:o,value:l,items:[]},g=[f];for(n=0,a=s.length;a>n;n++)t=s[n],r=u.get(t,o),d(l,r)||(l=r,f={field:o,value:l,items:[]},g.push(f)),f.items.push(t);return new i(g)},_sortForGrouping:function(e,t){var r,n,a=this.data;if(!pt){for(r=0,n=a.length;n>r;r++)a[r].__position=r;for(a=new i(a).sort(e,t,kt).toArray(),r=0,n=a.length;n>r;r++)delete a[r].__position;return a}return this.sort(e,t).toArray()},aggregate:function(e){var t,r,n={};if(e&&e.length)for(t=0,r=this.data.length;r>t;t++)f(n,e,this.data[t],t,r);return n}};var Ct={sum:function(e,t,r){return(e||0)+r.get(t)},count:function(e){return(e||0)+1},average:function(e,t,r,n,i){return e=(e||0)+r.get(t),n==i-1&&(e/=i),e},max:function(e,t,r){var n=r.get(t);return e=e||0,n>e&&(e=n),e},min:function(e,t,r){var n=r.get(t);return e=e||n,e>n&&(e=n),e}},At=B.extend({init:function(e){this.data=e.data},read:function(e){e.success(this.data)},update:function(e){e.success(e.data)},create:function(e){e.success(e.data)},destroy:function(e){e.success(e.data)}}),Ot=B.extend({init:function(e){var t,r=this;e=r.options=z({},r.options,e),M(tt,function(t,r){typeof e[r]===J&&(e[r]={url:e[r]})}),r.cache=e.cache?Ft.create(e.cache):{find:D,add:D},t=e.parameterMap,r.parameterMap=T(t)?t:function(e){var r={};return M(e,function(e,n){e in t&&(e=t[e],P(e)&&(n=e.value(n),e=e.key)),r[e]=n}),r}},options:{parameterMap:rt},create:function(e){return R(this.setup(e,V))},read:function(r){var n,i,a,o=this,s=o.cache;r=o.setup(r,H),n=r.success||D,i=r.error||D,a=s.find(r.data),a!==t?n(a):(r.success=function(e){s.add(r.data,e),n(e)},e.ajax(r))},update:function(e){return R(this.setup(e,Q))},destroy:function(e){return R(this.setup(e,$))},setup:function(e,t){e=e||{};var r,n=this,i=n.options[t],a=T(i.data)?i.data(e.data):i.data;return e=z(!0,{},i,e),r=z(!0,{},a,e.data),e.data=n.parameterMap(r,t),T(e.url)&&(e.url=e.url(r)),e}}),Ft=B.extend({init:function(){this._store={}},add:function(e,r){e!==t&&(this._store[it(e)]=r)},find:function(e){return this._store[it(e)]},clear:function(){this._store={}},remove:function(e){delete this._store[it(e)]}});Ft.create=function(e){var t={inmemory:function(){return new Ft}};return P(e)&&T(e.find)?e:e===!0?new Ft:t[e]()};var zt=B.extend({init:function(e){var t,r,n,i,a=this;e=e||{};for(t in e)r=e[t],a[t]=typeof r===J?nt(r):r;if(i=e.modelBase||qt,P(a.model)&&(a.model=n=i.define(a.model)),a.model){var o=N(a.data,a),s=N(a.groups,a),u={};n=a.model,n.fields&&M(n.fields,function(e,t){P(t)&&t.field?u[t.field]=nt(t.field):u[e]=nt(e)}),a.data=v(o,n,h,u),a.groups=v(s,n,_,u)}},errors:function(e){return e?e.errors:null},parse:rt,data:rt,total:function(e){return e.length},groups:rt,status:function(e){return e.status},aggregates:function(){return{}}}),Nt=E.extend({init:function(e){var r,n,i,o=this;e&&(i=e.data),e=o.options=z({},o.options,e),z(o,{_map:{},_prefetch:{},_data:[],_ranges:[],_view:[],_pristine:[],_destroyed:[],_pageSize:e.pageSize,_page:e.page||(e.pageSize?1:t),_sort:a(e.sort),_filter:s(e.filter),_group:l(e.group),_aggregate:e.aggregate,_total:e.total}),E.fn.init.call(o),n=e.transport,n?(n.read=typeof n.read===J?{url:n.read}:n.read,e.type&&(I.data.transports[e.type]&&!P(I.data.transports[e.type])?o.transport=new I.data.transports[e.type](z(n,{data:i})):n=z(!0,{},I.data.transports[e.type],n),e.schema=z(!0,{},I.data.schemas[e.type],e.schema)),o.transport||(o.transport=T(n.read)?n:new Ot(n))):o.transport=new At({data:e.data}),o.reader=new I.data.readers[e.schema.type||"json"](e.schema),r=o.reader.model||{},o._data=o._observe(o._data),o.bind([Y,K,Z,W,et],e)},options:{data:[],schema:{modelBase:qt},serverSorting:!1,serverPaging:!1,serverFiltering:!1,serverGrouping:!1,serverAggregates:!1,sendAllFields:!0,batch:!1},_flatData:function(e){return this.options.serverGrouping&&this.group().length?m(e):e},get:function(e){var t,r,n=this._flatData(this._data);for(t=0,r=n.length;r>t;t++)if(n[t].id==e)return n[t]},getByUid:function(e){var t,r,n=this._flatData(this._data);if(n)for(t=0,r=n.length;r>t;t++)if(n[t].uid==e)return n[t]},sync:function(){var t,r,n=this,i=[],a=[],o=n._destroyed,s=n._flatData(n._data);if(n.reader.model){for(t=0,r=s.length;r>t;t++)s[t].isNew()?i.push(s[t]):s[t].dirty&&a.push(s[t]);var u=n._send("create",i);u.push.apply(u,n._send("update",a)),u.push.apply(u,n._send("destroy",o)),e.when.apply(null,u).then(function(){var e,t;for(e=0,t=arguments.length;t>e;e++)n._accept(arguments[e]);n._change({action:"sync"}),n.trigger(W)})}},_accept:function(t){var r,n=this,i=t.models,a=t.response,o=0,s=n.options.serverGrouping&&n.group()&&n.group().length,u=n.reader.data(n._pristine),l=t.type;if(n.trigger(et,{response:a,type:l}),a){if(a=n.reader.parse(a),n._handleCustomErrors(a))return;a=n.reader.data(a),e.isArray(a)||(a=[a])}else a=e.map(i,function(e){return e.toJSON()});for("destroy"===l&&(n._destroyed=[]),o=0,r=i.length;r>o;o++)"destroy"!==l?(i[o].accept(a[o]),"create"===l?u.push(s?x(n.group(),i[o]):a[o]):"update"===l&&(s?n._updatePristineGroupModel(i[o],a[o]):z(u[n._pristineIndex(i[o])],a[o]))):s?n._removePristineGroupModel(i[o]):u.splice(n._pristineIndex(i[o]),1)},_pristineIndex:function(e){var t,r,n=this,i=n.reader.data(n._pristine);for(t=0,r=i.length;r>t;t++)if(i[t][e.idField]===e.id)return t;return-1},_updatePristineGroupModel:function(e,r){var n,i=this.reader.groups(this._pristine);w(i,function(i){return n=k(i,e),n>-1?(z(!0,i[n],r),!0):t})},_removePristineGroupModel:function(e){var r,n=this.reader.groups(this._pristine);w(n,function(n){return r=k(n,e),r>-1?(n.splice(r,1),!0):t})},_promise:function(t,r,n){var i=this,a=i.transport;return e.Deferred(function(e){a[n].call(a,z({success:function(t){e.resolve({response:t,models:r,type:n})},error:function(t,r,n){e.reject(t),i.error(t,r,n)}},t))}).promise()},_send:function(e,t){var r,n,i=this,a=[];if(i.options.batch)t.length&&a.push(i._promise({data:{models:g(t)}},t,e));else for(r=0,n=t.length;n>r;r++)a.push(i._promise({data:t[r].toJSON()},[t[r]],e));return a},add:function(e){return this.insert(this._data.length,e)},insert:function(e,t){return t||(t=e,e=0),t instanceof qt||(t=this.reader.model?new this.reader.model(t):new mt(t)),this.options.serverGrouping&&this.group()&&this.group().length?this._data.splice(e,0,x(this.group(),t)):this._data.splice(e,0,t),t},cancelChanges:function(e){var t,r,n=this,i=n.options.serverGrouping&&n.group()&&n.group().length,a=i?n.reader.groups:n.reader.data,o=a(n._pristine);e instanceof I.data.Model?i?n._cancelGroupModel(e):(r=n.indexOf(e),t=n._pristineIndex(e),-1!=r&&(-1==t||e.isNew()?n._data.splice(r,1):n._data[r].accept(o[t]))):(n._destroyed=[],n._data=n._observe(o),n._change())},read:function(e){var t=this,r=t._params(e);t._queueRequest(r,function(){t.trigger(Z),t._ranges=[],t.transport.read({data:r,success:N(t.success,t),error:N(t.error,t)})})},_cancelGroupModel:function(e){var r,n,i=this.reader.groups(this._pristine);w(i,function(i){return n=k(i,e),n>-1?(r=i[n],!0):t}),n>-1&&w(this._data,function(t){n=b(t,e),n>-1&&(e.isNew()?t.splice(n,1):z(!0,t[n],r))})},indexOf:function(e){return b(this._data,e)},_params:function(e){var t=this,r=z({take:t.take(),skip:t.skip(),page:t.page(),pageSize:t.pageSize(),sort:t._sort,filter:t._filter,group:t._group,aggregate:t._aggregate},e);return t.options.serverPaging||(delete r.take,delete r.skip,delete r.page,delete r.pageSize),t.options.serverGrouping||delete r.group,t.options.serverFiltering||delete r.filter,t.options.serverSorting||delete r.sort,t.options.serverAggregates||delete r.aggregate,r},_queueRequest:function(e,r){var n=this;n._requestInProgress?n._pending={callback:N(r,n),options:e}:(n._requestInProgress=!0,n._pending=t,r())},_dequeueRequest:function(){var e=this;e._requestInProgress=!1,e._pending&&e._queueRequest(e._pending.options,e._pending.callback)},remove:function(e){var t=this._data;return this.options.serverGrouping&&this.group()&&this.group().length?this._removeGroupItem(t,e):q(t,e)},_removeGroupItem:function(e,r){var n,i=this;return w(e,function(e){return n=q(e,r),n?(n.isNew&&n.isNew()||i._destroyed.push(n),!0):t}),r},error:function(e,t,r){this._dequeueRequest(),this.trigger(et,{}),this.trigger(Y,{xhr:e,status:t,errorThrown:r})},_handleCustomErrors:function(e){if(this.reader.errors){var t=this.reader.errors(e);if(t)return this.trigger(Y,{xhr:null,status:"customerror",errorThrown:"custom error",errors:t}),!0}return!1},_parent:D,success:function(r){var n=this,i=n.options,a=i.serverGrouping===!0&&n._group&&n._group.length>0;if(n.trigger(et,{response:r,type:"read"}),r=n.reader.parse(r),n._handleCustomErrors(r))return n._dequeueRequest(),t;n._pristine=P(r)?e.extend(!0,{},r):r.slice?r.slice(0):r,n._total=n.reader.total(r),n._aggregate&&i.serverAggregates&&(n._aggregateResult=n.reader.aggregates(r)),r=a?n.reader.groups(r):n.reader.data(r),n._data=n._observe(r);var o=n._skip||0,s=o+n._data.length;n._ranges.push({start:o,end:s,data:n._data}),n._ranges.sort(function(e,t){return e.start-t.start}),n._dequeueRequest(),n._process(n._data)},_observe:function(e){var t=this,r=t.reader.model,n=!1;return r&&e.length&&(n=!(e[0]instanceof r)),e instanceof vt?n&&(e.type=t.reader.model,e.wrapAll(e,e)):(e=new vt(e,t.reader.model),e.parent=function(){return t._parent()}),t.group()&&t.group().length&&t.options.serverGrouping&&y(e,r),e.bind(K,N(t._change,t))},_change:function(e){var t,r,n=this,i=e?e.action:"";if("remove"===i)for(t=0,r=e.items.length;r>t;t++)e.items[t].isNew&&e.items[t].isNew()||n._destroyed.push(e.items[t]);if(!n.options.autoSync||"add"!==i&&"remove"!==i&&"itemchange"!==i){var a=n._total||n.reader.total(n._pristine);"add"===i?a++:"remove"===i?a--:"itemchange"===i||n.options.serverPaging||(a=n.reader.total(n._pristine)),n._total=a,n._process(n._data,e)}else n.sync()},_process:function(e,r){var n,i=this,a={};i.options.serverPaging!==!0&&(a.skip=i._skip,a.take=i._take||i._pageSize,a.skip===t&&i._page!==t&&i._pageSize!==t&&(a.skip=(i._page-1)*i._pageSize)),i.options.serverSorting!==!0&&(a.sort=i._sort),i.options.serverFiltering!==!0&&(a.filter=i._filter),i.options.serverGrouping!==!0&&(a.group=i._group),i.options.serverAggregates!==!0&&(a.aggregate=i._aggregate,i._aggregateResult=p(e,a)),n=c(e,a),i._view=n.data,n.total===t||i.options.serverFiltering||(i._total=n.total),r=r||{},r.items=r.items||i._view,i.trigger(K,r)},at:function(e){return this._data[e]},data:function(e){var r=this;return e===t?r._data:(r._data=this._observe(e),r._total=r._data.length,r._process(r._data),t)},view:function(){return this._view},query:function(e){var r,n=this,i=n.options.serverSorting||n.options.serverPaging||n.options.serverFiltering||n.options.serverGrouping||n.options.serverAggregates;e!==t&&(n._pageSize=e.pageSize,n._page=e.page,n._sort=e.sort,n._filter=e.filter,n._group=e.group,n._aggregate=e.aggregate,n._skip=e.skip,n._take=e.take,n._skip===t&&(n._skip=n.skip(),e.skip=n.skip()),n._take===t&&n._pageSize!==t&&(n._take=n._pageSize,e.take=n._take),e.sort&&(n._sort=e.sort=a(e.sort)),e.filter&&(n._filter=e.filter=s(e.filter)),e.group&&(n._group=e.group=l(e.group)),e.aggregate&&(n._aggregate=e.aggregate=u(e.aggregate))),i||n._data===t||0===n._data.length?n.read(e):(n.trigger(Z),r=c(n._data,e),n.options.serverFiltering||(n._total=r.total!==t?r.total:n._data.length),n._view=r.data,n._aggregateResult=p(n._data,e),n.trigger(K,{items:r.data}))},fetch:function(e){var t=this;e&&T(e)&&t.one(K,e),t._query()},_query:function(e){var t=this;t.query(z({},{page:t.page(),pageSize:t.pageSize(),sort:t.sort(),filter:t.filter(),group:t.group(),aggregate:t.aggregate()},e))},next:function(e){var r=this,n=r.page(),i=r.total();return e=e||{},!n||i&&n+1>r.totalPages()?t:(r._skip=n*r.take(),n+=1,e.page=n,r._query(e),n)},prev:function(e){var r=this,n=r.page();return e=e||{},n&&1!==n?(r._skip=r._skip-r.take(),n-=1,e.page=n,r._query(e),n):t},page:function(e){var r,n=this;return e!==t?(e=at.max(at.min(at.max(e,1),n.totalPages()),1),n._query({page:e}),t):(r=n.skip(),r!==t?at.round((r||0)/(n.take()||1))+1:t)},pageSize:function(e){var r=this;return e!==t?(r._query({pageSize:e,page:1}),t):r.take()},sort:function(e){var r=this;return e!==t?(r._query({sort:e}),t):r._sort},filter:function(e){var r=this;return e===t?r._filter:(r._query({filter:e,page:1}),t)},group:function(e){var r=this;return e!==t?(r._query({group:e}),t):r._group},total:function(){return this._total||0},aggregate:function(e){var r=this;return e!==t?(r._query({aggregate:e}),t):r._aggregate},aggregates:function(){return this._aggregateResult},totalPages:function(){var e=this,t=e.pageSize()||e.total();return at.ceil((e.total()||0)/t)},inRange:function(e,t){var r=this,n=at.min(e+t,r.total());return!r.options.serverPaging&&r.data.length>0?!0:r._findRange(e,n).length>0},range:function(e,r){e=at.min(e||0,this.total());var n,i=this,a=at.max(at.floor(e/r),0)*r,o=at.min(a+r,i.total());if(n=i._findRange(e,at.min(e+r,i.total())),n.length){i._skip=e>i.skip()?at.min(o,(i.totalPages()-1)*i.take()):a,i._take=r;var s=i.options.serverPaging,u=i.options.serverSorting,l=i.options.serverFiltering;try{i.options.serverPaging=!0,i.options.serverSorting=!0,i.options.serverFiltering=!0,s&&(i._data=n=i._observe(n)),i._process(n)}finally{i.options.serverPaging=s,i.options.serverSorting=u,i.options.serverFiltering=l}}else r!==t&&(i._rangeExists(a,o)?e>a&&i.prefetch(o,r,function(){i.range(e,r)}):i.prefetch(a,r,function(){e>a&&i.total()>o&&!i._rangeExists(o,at.min(o+r,i.total()))?i.prefetch(o,r,function(){i.range(e,r)}):i.range(e,r)}))},_findRange:function(e,r){var n,i,a,o,s,u,l,d,f,g=this,p=g._ranges,h=[],_=g.options,v=_.serverSorting||_.serverPaging||_.serverFiltering||_.serverGrouping||_.serverAggregates;for(i=0,f=p.length;f>i;i++)if(n=p[i],e>=n.start&&n.end>=e){var m=0;for(a=i;f>a;a++)if(n=p[a],n.data.length&&e+m>=n.start&&(u=n.data,l=n.end,v||(d=c(n.data,{sort:g.sort(),filter:g.filter()}),u=d.data,d.total!==t&&(l=d.total)),o=0,e+m>n.start&&(o=e+m-n.start),s=u.length,l>r&&(s-=l-r),m+=s-o,h=h.concat(u.slice(o,s)),n.end>=r&&m==r-e))return h;break}return[]},skip:function(){var e=this;return e._skip===t?e._page!==t?(e._page-1)*(e.take()||1):t:e._skip},take:function(){var e=this;return e._take||e._pageSize},prefetch:function(e,t,r){var n=this,i=at.min(e+t,n.total()),a={start:e,end:i,data:[]},o={take:t,skip:e,page:e/t+1,pageSize:t,sort:n._sort,filter:n._filter,group:n._group,aggregate:n._aggregate};n._rangeExists(e,i)?r&&r():(clearTimeout(n._timeout),n._timeout=setTimeout(function(){n._queueRequest(o,function(){n.transport.read({data:o,success:function(t){n._dequeueRequest();for(var i=!1,o=0,s=n._ranges.length;s>o;o++)if(n._ranges[o].start===e){i=!0,a=n._ranges[o];break}i||n._ranges.push(a),t=n.reader.parse(t),a.data=n._observe(n.reader.data(t)),a.end=a.start+a.data.length,n._ranges.sort(function(e,t){return e.start-t.start}),n._total=n.reader.total(t),r&&r()}})})},100))},_rangeExists:function(e,t){var r,n,i=this,a=i._ranges;for(r=0,n=a.length;n>r;r++)if(e>=a[r].start&&a[r].end>=t)return!0;return!1}});Nt.create=function(e){e=e&&e.push?{data:e}:e;var t,r,n,i=e||{},a=i.data,o=i.fields,s=i.table,u=i.select,l={};if(a||!o||i.transport||(s?a=A(s,o):u&&(a=C(u,o))),I.data.Model&&o&&(!i.schema||!i.schema.model)){for(t=0,r=o.length;r>t;t++)n=o[t],n.type&&(l[n.field]=n);G(l)||(i.schema=z(!0,i.schema,{model:{fields:l}}))}return i.data=a,i instanceof Nt?i:new Nt(i)};var Tt=qt.define({init:function(e){var t=this,r=t.hasChildren||e&&e.hasChildren,n="items",i={};I.data.Model.fn.init.call(t,e),typeof t.children===J&&(n=t.children),i={schema:{data:n,model:{hasChildren:r,id:t.idField}}},typeof t.children!==J&&z(i,t.children),i.data=e,r||(r=i.schema.data),typeof r===J&&(r=I.getter(r)),T(r)&&(t.hasChildren=!!r.call(t,t)),t._childrenOptions=i,t.hasChildren&&t._initChildren(),t._loaded=!(!e||!e[n])},_initChildren:function(){var e=this,t=e._childrenOptions.schema.data;e.children instanceof Pt||(e.children=new Pt(e._childrenOptions),e.children._parent=function(){return e},e.children.bind(K,function(t){t.node=t.node||e,e.trigger(K,t)}),t&&(e[t]=e.children.data()))},append:function(e){this._initChildren(),this.loaded(!0),this.children.add(e)},hasChildren:!1,level:function(){for(var e=this.parentNode(),t=0;e&&e.parentNode;)t++,e=e.parentNode?e.parentNode():null;return t},load:function(){var e=this,r={};e._initChildren(),(!e._loaded||e.hasChildren)&&(r[e.idField||"id"]=e.id,e._loaded||(e.children._data=t),e.children.one(K,function(){e._loaded=!0})._query(r))},parentNode:function(){var e=this.parent();return e.parent()},loaded:function(e){return e===t?this._loaded:(this._loaded=e,t)},shouldSerialize:function(e){return qt.fn.shouldSerialize.call(this,e)&&"children"!==e&&"_loaded"!==e&&"hasChildren"!==e&&"_childrenOptions"!==e}}),Pt=Nt.extend({init:function(e){var t=Tt.define({children:e});Nt.fn.init.call(this,z(!0,{},{schema:{modelBase:t,model:t}},e))},remove:function(e){var t,r=e.parentNode(),n=this;return r&&(n=r.children),t=Nt.fn.remove.call(n,e),r&&!n.data().length&&(r.hasChildren=!1),t},insert:function(e,t){var r=this._parent();return r&&(r.hasChildren=!0,r._initChildren()),Nt.fn.insert.call(this,e,t)},_find:function(e,t){var r,n,i,a,o;if(i=Nt.fn[e].call(this,t))return i;if(a=this._flatData(this.data()))for(r=0,n=a.length;n>r;r++)if(o=a[r].children,o instanceof Pt&&(i=o[e](t)))return i},get:function(e){return this._find("get",e)},getByUid:function(e){return this._find("getByUid",e)}});Pt.create=function(e){e=e&&e.push?{data:e}:e;var t=e||{},r=t.data,n=t.fields,i=t.list;return r&&r._dataSource?r._dataSource:(r||!n||t.transport||i&&(r=O(i,n)),t.data=r,t instanceof Pt?t:new Pt(t))},z(!0,I.data,{readers:{json:zt},Query:i,DataSource:Nt,HierarchicalDataSource:Pt,Node:Tt,ObservableObject:mt,ObservableArray:vt,LocalTransport:At,RemoteTransport:Ot,Cache:Ft,DataReader:zt,Model:qt})})(window.kendo.jQuery);
|
@@ -1,10 +1,11 @@
|
|
1
1
|
/*
|
2
|
-
* Kendo UI Web v2012.
|
2
|
+
* Kendo UI Web v2012.3.1114 (http://kendoui.com)
|
3
3
|
* Copyright 2012 Telerik AD. All rights reserved.
|
4
4
|
*
|
5
|
-
* Kendo UI Web commercial licenses may be obtained at
|
5
|
+
* Kendo UI Web commercial licenses may be obtained at
|
6
|
+
* https://www.kendoui.com/purchase/license-agreement/kendo-ui-web-commercial.aspx
|
6
7
|
* If you do not own a commercial license, this file shall be governed by the
|
7
8
|
* GNU General Public License (GPL) version 3.
|
8
9
|
* For GPL requirements, please review: http://www.gnu.org/copyleft/gpl.html
|
9
10
|
*/
|
10
|
-
|
11
|
+
(function(e,t){function n(o){var s,i,p,d,c,l,f,y,u=[],g=o.logic||"and",j=o.filters;for(s=0,i=j.length;i>s;s++)o=j[s],p=o.field,f=o.value,l=o.operator,o.filters?o=n(o):(y=o.ignoreCase,p=p.replace(/\./g,"/"),o=r[l],o&&f!==t&&(d=e.type(f),"string"===d?(c="'{1}'",f=f.replace(/'/g,"''"),y===!0&&(p="tolower("+p+")")):c="date"===d?"datetime'{1:yyyy-MM-ddTHH:mm:ss}'":"{1}",c=o.length>3?"substringof"!==o?"{0}({2},"+c+")":"{0}("+c+",{2})":"{2} {0} "+c,o=a.format(c,o,f,p))),u.push(o);return o=u.join(" "+g+" "),u.length>1&&(o="("+o+")"),o}var a=window.kendo,o=e.extend,r={eq:"eq",neq:"ne",gt:"gt",gte:"ge",lt:"lt",lte:"le",contains:"substringof",endswith:"endswith",startswith:"startswith"},s={pageSize:e.noop,page:e.noop,filter:function(e,t){t&&(e.$filter=n(t))},sort:function(t,n){var a=e.map(n,function(e){var t=e.field.replace(/\./g,"/");return"desc"===e.dir&&(t+=" desc"),t}).join(",");a&&(t.$orderby=a)},skip:function(e,t){t&&(e.$skip=t)},take:function(e,t){t&&(e.$top=t)}},i={read:{dataType:"jsonp"}};o(!0,a.data,{schemas:{odata:{type:"json",data:function(e){return e.d.results||[e.d]},total:"d.__count"}},transports:{odata:{read:{cache:!0,dataType:"jsonp",jsonp:"$callback"},update:{cache:!0,dataType:"json",contentType:"application/json",type:"PUT"},create:{cache:!0,dataType:"json",contentType:"application/json",type:"POST"},destroy:{cache:!0,dataType:"json",type:"DELETE"},parameterMap:function(e,t){var n,o,r,p;if(e=e||{},t=t||"read",p=(this.options||i)[t],p=p?p.dataType:"json","read"===t){n={$inlinecount:"allpages"},"json"!=p&&(n.$format="json");for(r in e)s[r]?s[r](n,e[r]):n[r]=e[r]}else{if("json"!==p)throw Error("Only json dataType can be used for "+t+" operation.");if("destroy"!==t){for(r in e)o=e[r],"number"==typeof o&&(e[r]=o+"");n=a.stringify(e)}}return n}}}})})(window.kendo.jQuery);
|
@@ -1,10 +1,11 @@
|
|
1
1
|
/*
|
2
|
-
* Kendo UI Web v2012.
|
2
|
+
* Kendo UI Web v2012.3.1114 (http://kendoui.com)
|
3
3
|
* Copyright 2012 Telerik AD. All rights reserved.
|
4
4
|
*
|
5
|
-
* Kendo UI Web commercial licenses may be obtained at
|
5
|
+
* Kendo UI Web commercial licenses may be obtained at
|
6
|
+
* https://www.kendoui.com/purchase/license-agreement/kendo-ui-web-commercial.aspx
|
6
7
|
* If you do not own a commercial license, this file shall be governed by the
|
7
8
|
* GNU General Public License (GPL) version 3.
|
8
9
|
* For GPL requirements, please review: http://www.gnu.org/copyleft/gpl.html
|
9
10
|
*/
|
10
|
-
|
11
|
+
(function(e,t){var r=window.kendo,n=e.isArray,a=e.isPlainObject,i=e.map,d=e.each,l=e.extend,o=r.getter,f=r.Class,u=f.extend({init:function(e){var t=this,o=e.total,f=e.model,u=e.data;if(f){if(a(f)){f.fields&&d(f.fields,function(e,r){r=a(r)&&r.field?l(r,{field:t.getter(r.field)}):{field:t.getter(r)},f.fields[e]=r});var s=f.id;if(s){var p={};p[t.xpathToMember(s,!0)]={field:t.getter(s)},f.fields=l(p,f.fields),f.id=t.xpathToMember(s)}f=r.data.Model.define(f)}t.model=f}o&&(o=t.getter(o),t.total=function(e){return parseInt(o(e),10)}),u&&(u=t.xpathToMember(u),t.data=function(e){var r,a=t.evaluate(e,u);return a=n(a)?a:[a],t.model&&f.fields?(r=new t.model,i(a,function(e){if(e){var t,n={};for(t in f.fields)n[t]=r._parse(t,f.fields[t].field(e));return n}})):a})},total:function(e){return this.data(e).length},errors:function(e){return e?e.errors:null},parseDOM:function(e){var r,a,i,d,l,o,f,u={},s=e.attributes,p=s.length;for(f=0;p>f;f++)o=s[f],u["@"+o.nodeName]=o.nodeValue;for(a=e.firstChild;a;a=a.nextSibling)i=a.nodeType,3===i||4===i?u["#text"]=a.nodeValue:1===i&&(r=this.parseDOM(a),d=a.nodeName,l=u[d],n(l)?l.push(r):l=l!==t?[l,r]:r,u[d]=l);return u},evaluate:function(e,t){for(var r,a,i,d,l,o=t.split(".");r=o.shift();)if(e=e[r],n(e)){for(a=[],t=o.join("."),l=0,i=e.length;i>l;l++)d=this.evaluate(e[l],t),d=n(d)?d:[d],a.push.apply(a,d);return a}return e},parse:function(t){var r,n,a={};return r=t.documentElement||e.parseXML(t).documentElement,n=this.parseDOM(r),a[r.nodeName]=n,a},xpathToMember:function(e,t){return e?(e=e.replace(/^\//,"").replace(/\//g,"."),e.indexOf("@")>=0?e.replace(/\.?(@.*)/,t?"$1":'["$1"]'):e.indexOf("text()")>=0?e.replace(/(\.?text\(\))/,t?"#text":'["#text"]'):e):""},getter:function(e){return o(this.xpathToMember(e),!0)}});e.extend(!0,r.data,{XmlDataReader:u,readers:{xml:u}})})(window.kendo.jQuery);
|
@@ -1,10 +1,11 @@
|
|
1
1
|
/*
|
2
|
-
* Kendo UI Web v2012.
|
2
|
+
* Kendo UI Web v2012.3.1114 (http://kendoui.com)
|
3
3
|
* Copyright 2012 Telerik AD. All rights reserved.
|
4
4
|
*
|
5
|
-
* Kendo UI Web commercial licenses may be obtained at
|
5
|
+
* Kendo UI Web commercial licenses may be obtained at
|
6
|
+
* https://www.kendoui.com/purchase/license-agreement/kendo-ui-web-commercial.aspx
|
6
7
|
* If you do not own a commercial license, this file shall be governed by the
|
7
8
|
* GNU General Public License (GPL) version 3.
|
8
9
|
* For GPL requirements, please review: http://www.gnu.org/copyleft/gpl.html
|
9
10
|
*/
|
10
|
-
|
11
|
+
(function(e,t){function a(t){var a=t.parseFormats;F.normalize(t),a=e.isArray(a)?a:[a],a.splice(0,0,t.format),t.parseFormats=a}function n(e){e.preventDefault()}var o=window.kendo,r=o.ui,i=r.Widget,s=o.parseDate,l=o.keys,u=o.template,d="<div />",c="<span />",p=".kendoDatePicker",f="touchend"+p+" click"+p,m="open",v="close",h="change",_="dateView",k="disabled",w="k-state-default",g="k-state-focused",y="k-state-selected",b="k-state-disabled",C="k-state-hover",V="keydown"+p,x="mouseenter"+p+" mouseleave"+p,D="touchstart"+p+" mousedown"+p,T="id",A="min",I="max",W="month",R="aria-disabled",E="aria-expanded",N="aria-hidden",F=o.calendar,O=F.isInRange,P=F.restrictValue,S=F.isEqualDatePart,H=e.extend,B=e.proxy,z=Date,K=function(t){var a,n=this,i=document.body,s=U.sharedCalendar,l=e(d).attr(N,"true").addClass("k-calendar-container").appendTo(i);s||(s=U.sharedCalendar=new r.Calendar(e(d).attr(T,o.guid()).hide().appendTo(i),{focusOnNav:!1}),F.makeUnselectable(s.element)),n.calendar=s,n.options=t=t||{},a=t.id,a&&(a+="_dateview",l.attr(T,a),n._dateViewID=a),n.popup=new r.Popup(l,H(t.popup,t,{name:"Popup",isRtl:o.support.isRtl(t.anchor)})),n.div=l,n._templates(),n.value(t.value)};K.prototype={_calendar:function(){var e=this,t=e.popup,a=e.options,o=e.calendar,r=o.element;r.data(_)!==e&&(r.appendTo(t.element).data(_,e).off(f+" "+V).on(f,"td:has(.k-link)",B(e._click,e)).on(D,n).show(),o.unbind(h).bind(h,a),o.month=e.month,o.options.dates=a.dates,o.options.depth=a.depth,o.options.culture=a.culture,o._footer(e.footer),o.min(a.min),o.max(a.max),o.navigate(e._value,a.start),e.value(e._value))},destroy:function(){var t,a=this,n=a.calendar,o=n.element;o.data(_)===a&&(t=e(".k-calendar-container"),t.length>1?o.hide().appendTo(document.body):(o.off(p),n.destroy(),U.sharedCalendar=null)),a.popup.destroy()},open:function(){var e=this;e._calendar(),e.popup.open()},close:function(){this.popup.close()},min:function(e){this._option(A,e)},max:function(e){this._option(I,e)},toggle:function(){var e=this;e[e.popup.visible()?v:m]()},move:function(e){var a=this,n=e.keyCode,o=a.calendar,r=e.ctrlKey&&n==l.DOWN||n==l.ENTER;if(n==l.ESC)return a.close(),t;if(e.altKey)return n==l.DOWN?(a.open(),e.preventDefault()):n==l.UP&&(a.close(),e.preventDefault()),t;if(a.popup.visible())return r&&o._cell.hasClass(y)?(a.close(),e.preventDefault(),t):(a._current=o._move(e),t)},value:function(e){var t=this,a=t.calendar,n=t.options;t._value=e,t._current=new z(+P(e,n.min,n.max)),a.element.data(_)===t&&a.value(e)},_click:function(e){-1!==e.currentTarget.className.indexOf(y)&&this.close()},_option:function(e,t){var a=this,n=a.options,o=a.calendar;n[e]=t,o.element.data(_)===a&&o[e](t)},_templates:function(){var e=this,t=e.options,a=t.footer,n=t.month||{},r=n.content,i=n.empty;e.month={content:u('<td#=data.cssClass#><a tabindex="-1" class="k-link" href="\\#" '+o.attr("value")+'="#=data.dateString#" title="#=data.title#">'+(r||"#=data.value#")+"</a></td>",{useWithBlock:!!r}),empty:u("<td>"+(i||" ")+"</td>",{useWithBlock:!!i})},a!==!1&&(e.footer=u(a||'#= kendo.toString(data,"D","'+t.culture+'") #',{useWithBlock:!1}))}},K.normalize=a,o.DateView=K;var U=i.extend({init:function(e,t){var n,r=this;i.fn.init.call(r,e,t),e=r.element,t=r.options,a(t),r._wrapper(),r.dateView=new K(H({},t,{id:e.attr(T),anchor:r.wrapper,change:function(){r._change(this.value()),r.close()},close:function(t){r.trigger(v)?t.preventDefault():(e.attr(E,!1),n.attr(N,!0))},open:function(t){var a,o=r.options;r.trigger(m)?t.preventDefault():(a=s(e.val(),o.parseFormats,o.culture),a?(r.dateView._current=a,r.dateView.calendar._focus(a)):r.dateView.value(a),e.attr(E,!0),n.attr(N,!1))}})),n=r.dateView.div,r._icon(),e[0].type="text",e.addClass("k-input").on("keydown"+p,B(r._keydown,r)).on("blur"+p,B(r._blur,r)).on("focus"+p,function(){r._inputWrapper.addClass(g)}).attr({role:"textbox","aria-haspopup":!0,"aria-expanded":!1,"aria-owns":r.dateView._dateViewID}),r._reset(),r._template(),r.enable(!e.is("[disabled]")),r.value(t.value||r.element.val()),o.notify(r)},events:[m,v,h],options:{name:"DatePicker",value:null,footer:"",format:"",culture:"",parseFormats:[],min:new Date(1900,0,1),max:new Date(2099,11,31),start:W,depth:W,animation:{},month:{},dates:[],ARIATemplate:'Current focused date is #=kendo.toString(data.current, "D")#'},setOptions:function(e){var t=this,n=t.dateView,o=n.options;i.fn.setOptions.call(t,e),a(t.options),n.options=H(o,t.options,{change:o.change,close:o.close,open:o.open})},enable:function(e){var t=this,a=t._dateIcon.off(p),o=t._inputWrapper.off(p),r=t.element;e===!1?(o.removeClass(w).addClass(b),r.attr(k,k).attr(R,!0)):(o.addClass(w).removeClass(b).on(x,t._toggleHover),r.removeAttr(k).attr(R,!1),a.on(f,B(t._click,t)).on(D,n))},destroy:function(){var e=this;i.fn.destroy.call(e),e.dateView.destroy(),e.element.off(p),e._dateIcon.off(p),e._inputWrapper.off(p),e._form&&e._form.off("reset",e._resetHandler)},open:function(){this.dateView.open()},close:function(){this.dateView.close()},min:function(e){return this._option(A,e)},max:function(e){return this._option(I,e)},value:function(e){var a=this;return e===t?a._value:(a._old=a._update(e),t)},_toggleHover:function(t){e(t.currentTarget).toggleClass(C,"mouseenter"===t.type)},_blur:function(){var e=this;e.close(),e._change(e.element.val()),e._inputWrapper.removeClass(g)},_click:function(e){var t=this,a=t.element;t.dateView.toggle(),"click"===e.type&&a[0]!==document.activeElement&&a.focus()},_change:function(e){var t=this;e=t._update(e),+t._old!=+e&&(t._old=e,t.trigger(h),t.element.trigger(h))},_keydown:function(e){var t=this,a=t.dateView;a.popup.visible()||e.keyCode!=l.ENTER?(a.move(e),t._updateARIA(a._current)):t._change(t.element.val())},_icon:function(){var t,a=this,n=a.element;t=n.next("span.k-select"),t[0]||(t=e('<span unselectable="on" class="k-select"><span unselectable="on" class="k-icon k-i-calendar">select</span></span>').insertAfter(n)),a._dateIcon=t.attr({role:"button","aria-controls":a.dateView._dateViewID})},_option:function(e,a){var n=this,o=n.options;return a===t?o[e]:(a=s(a,o.parseFormats,o.culture),a&&(o[e]=new z(+a),n.dateView[e](a)),t)},_update:function(e){var t,a=this,n=a.options,r=n.min,i=n.max,l=s(e,n.parseFormats,n.culture);return+l===+a._value?(t=o.toString(l,n.format,n.culture),t!==e&&a.element.val(null===l?e:t),l):(null!==l&&S(l,r)?l=P(l,r,i):O(l,r,i)||(l=null),a._value=l,a.dateView.value(l),a.element.val(l?o.toString(l,n.format,n.culture):e),a._updateARIA(l),l)},_wrapper:function(){var t,a=this,n=a.element;t=n.parents(".k-datepicker"),t[0]||(t=n.wrap(c).parent().addClass("k-picker-wrap k-state-default"),t=t.wrap(c).parent()),t[0].style.cssText=n[0].style.cssText,n.css({width:"100%",height:n[0].style.height}),a.wrapper=t.addClass("k-widget k-datepicker k-header").addClass(n[0].className),a._inputWrapper=e(t[0].firstChild)},_reset:function(){var e=this,t=e.element,a=t.closest("form");a[0]&&(e._resetHandler=function(){e.value(t[0].defaultValue)},e._form=a.on("reset",e._resetHandler))},_template:function(){this._ariaTemplate=u(this.options.ARIATemplate)},_updateARIA:function(e){this.element.attr("aria-label",this._ariaTemplate({current:e}))}});r.plugin(U)})(window.kendo.jQuery);
|
@@ -1,10 +1,11 @@
|
|
1
1
|
/*
|
2
|
-
* Kendo UI Web v2012.
|
2
|
+
* Kendo UI Web v2012.3.1114 (http://kendoui.com)
|
3
3
|
* Copyright 2012 Telerik AD. All rights reserved.
|
4
4
|
*
|
5
|
-
* Kendo UI Web commercial licenses may be obtained at
|
5
|
+
* Kendo UI Web commercial licenses may be obtained at
|
6
|
+
* https://www.kendoui.com/purchase/license-agreement/kendo-ui-web-commercial.aspx
|
6
7
|
* If you do not own a commercial license, this file shall be governed by the
|
7
8
|
* GNU General Public License (GPL) version 3.
|
8
9
|
* For GPL requirements, please review: http://www.gnu.org/copyleft/gpl.html
|
9
10
|
*/
|
10
|
-
|
11
|
+
(function(e,t){function a(e){e.preventDefault()}function n(e){var t=i.getCulture(e.culture).calendars.standard.patterns;e.format=s(e.format||t.g),e.timeFormat=s(e.timeFormat||t.t),i.DateView.normalize(e),e.parseFormats.splice(1,0,e.timeFormat)}var i=window.kendo,o=i.TimeView,r=i.parseDate,s=i._extractFormat,l=i.calendar,c=l.isInRange,u=l.restrictValue,m=l.isEqualDatePart,d=o.getMilliseconds,p=i.ui,f=p.Widget,v="open",_="close",g="change",h=".kendoDateTimePicker",w="touchend"+h+" click"+h,k="disabled",V="k-state-default",x="k-state-focused",y="k-state-hover",D="k-state-disabled",b="mouseenter"+h+" mouseleave"+h,I="touchstart"+h+" mousedown"+h,A="month",C="<span/>",F="aria-activedescendant",T="aria-expanded",R="aria-hidden",W="aria-owns",H=Date,E=new H(1900,0,1),S=new H(2099,11,31),M={view:"date"},q={view:"time"},B=e.extend,N=f.extend({init:function(t,a){var o=this;f.fn.init.call(o,t,a),t=o.element,a=o.options,n(a),o._wrapper(),o._views(),o._icons(),o._reset(),o._template(),t[0].type="text",t.addClass("k-input").on("keydown"+h,e.proxy(o._keydown,o)).on("focus"+h,function(){o._inputWrapper.addClass(x)}).on("blur"+h,function(){o._inputWrapper.removeClass(x),o._change(t.val()),o.close("date"),o.close("time")}).attr({role:"textbox","aria-haspopup":!0,"aria-expanded":!1}),o._midnight=0===d(a.min)+d(a.max),o.enable(!t.is("[disabled]")),o.value(a.value||t.val()),i.notify(o)},options:{name:"DateTimePicker",value:null,format:"",timeFormat:"",culture:"",parseFormats:[],dates:[],min:new H(E),max:new H(S),interval:30,height:200,footer:"",start:A,depth:A,animation:{},month:{},ARIATemplate:'Current focused date is #=kendo.toString(data.current, "G")#'},events:[v,_,g],setOptions:function(e){var t=this,a=t.dateView.options,i=t.timeView.options;f.fn.setOptions.call(t,e),n(t.options),e=t.options,B(a,e,{change:a.change,close:a.close,open:a.open}),B(i,e,{format:e.timeFormat,active:i.active,change:i.change,close:i.close,open:i.open}),t.timeView.ul[0].innerHTML=""},enable:function(e){var t=this,n=t.element,i=t._dateIcon.off(h),o=t._timeIcon.off(h),r=t._inputWrapper.off(b);e===!1?(r.removeClass(V).addClass(D),n.attr(k,k)):(r.addClass(V).removeClass(D).on(b,t._toggleHover),n.removeAttr(k),i.on(I,a).on(w,function(e){t.toggle("date"),"click"===e.type&&n[0]!==document.activeElement&&n.focus()}),o.on(I,a).on(w,function(e){t.toggle("time"),"click"===e.type&&n[0]!==document.activeElement&&n.focus()}))},destroy:function(){var e=this;f.fn.destroy.call(e),e.dateView.destroy(),e.timeView.destroy(),e.element.off(h),e._dateIcon.off(h),e._timeIcon.off(h),e._inputWrapper.off(h),e._form&&e._form.off("reset",e._resetHandler)},close:function(e){"time"!==e&&(e="date"),this[e+"View"].close()},open:function(e){"time"!==e&&(e="date"),this[e+"View"].open()},min:function(e){return this._option("min",e)},max:function(e){return this._option("max",e)},toggle:function(e){var t="timeView";"time"!==e?e="date":t="dateView",this[e+"View"].toggle(),this[t].close()},value:function(e){var a=this;return e===t?a._value:(a._old=a._update(e),t)},_change:function(e){var t=this;e=t._update(e),+t._old!=+e&&(t._old=e,t.trigger(g),t.element.trigger(g))},_option:function(e,a){var n=this,i=n.options,o=n.timeView,s=o.options,l=n._value||n._old;if(a===t)return i[e];if(a=r(a,i.parseFormats,i.culture)){if(i[e]=new H(+a),n.dateView[e](a),n._midnight=0===d(i.min)+d(i.max),l&&m(a,l)){if(n._midnight&&"max"==e)return s[e]=S,o.dataBind([S]),t;s[e]=a}else s.max=S,s.min=E;o.bind()}},_toggleHover:function(t){e(t.currentTarget).toggleClass(y,"mouseenter"===t.type)},_update:function(t){var a,n,o,s,l,d=this,p=d.options,f=p.min,v=p.max,_=p.dates,g=d.timeView,h=r(t,p.parseFormats,p.culture);return+h===+d._value?(l=i.toString(h,p.format,p.culture),l!==t&&d.element.val(null===h?t:l),h):(null!==h&&m(h,f)?h=u(h,f,v):c(h,f,v)||(h=null),d._value=h,g.value(h),d.dateView.value(h),h&&(o=d._old,n=g.options,_[0]&&(_=e.grep(_,function(e){return m(h,e)}),_[0]&&(g.dataBind(_),s=!0)),s||(m(h,f)&&(n.min=f,n.max=S,a=!0),m(h,v)&&(d._midnight?(g.dataBind([S]),s=!0):(n.max=v,a||(n.min=E),a=!0))),!s&&(!o&&a||o&&!m(o,h))&&(a||(n.max=S,n.min=E),g.bind())),d.element.val(h?i.toString(h,p.format,p.culture):t),d._updateARIA(h),h)},_keydown:function(e){var t=this,a=t.dateView,n=t.timeView,o=a.popup.visible();e.altKey&&e.keyCode===i.keys.DOWN?t.toggle(o?"time":"date"):o?(a.move(e),t._updateARIA(a._current)):n.popup.visible()?n.move(e):e.keyCode===i.keys.ENTER&&t._change(t.element.val())},_views:function(){var e,t,a,n,s,l=this,u=l.element,m=l.options,d=u.attr("id");l.dateView=e=new i.DateView(B({},m,{id:d,anchor:l.wrapper,change:function(){var t,a=e.calendar.value(),n=+a,i=+m.min,o=+m.max;(n===i||n===o)&&(t=new H(+l._value),t.setFullYear(a.getFullYear()),t.setMonth(a.getMonth()),t.setDate(a.getDate()),c(t,i,o)&&(a=t)),l._change(a),l.close("date")},close:function(e){l.trigger(_,M)?e.preventDefault():(u.attr(T,!1),a.attr(R,!0),t.popup.visible()||u.removeAttr(W))},open:function(t){l.trigger(v,M)?t.preventDefault():(s=r(u.val(),m.parseFormats,m.culture),s?(l.dateView._current=s,l.dateView.calendar._focus(s)):l.dateView.value(s),a.attr(R,!1),u.attr(T,!0).attr(W,e._dateViewID))}})),a=e.div,l.timeView=t=new o({id:d,value:m.value,anchor:l.wrapper,animation:m.animation,format:m.timeFormat,culture:m.culture,height:m.height,interval:m.interval,min:new H(E),max:new H(S),parseFormats:m.parseFormats,change:function(a,n){a=t._parse(a),m.min>a?(a=new H(+m.min),t.options.min=a):a>m.max&&(a=new H(+m.max),t.options.max=a),n?(l._timeSelected=!0,l._change(a)):(u.val(i.toString(a,m.format,m.culture)),e.value(a),l._updateARIA(a))},close:function(t){l.trigger(_,q)?t.preventDefault():(n.attr(R,!0),u.attr(T,!1),e.popup.visible()||u.removeAttr(W))},open:function(e){l.trigger(v,q)?e.preventDefault():(n.attr(R,!1),u.attr(T,!0).attr(W,t._timeViewID))},active:function(e){u.removeAttr(F),e&&u.attr(F,t._optionID)}}),n=t.ul},_icons:function(){var t,a=this,n=a.element;t=n.next("span.k-select"),t[0]||(t=e('<span unselectable="on" class="k-select"><span unselectable="on" class="k-icon k-i-calendar">select</span><span unselectable="on" class="k-icon k-i-clock">select</span></span>').insertAfter(n)),t=t.children(),a._dateIcon=t.eq(0).attr({role:"button","aria-controls":a.dateView._dateViewID}),a._timeIcon=t.eq(1).attr({role:"button","aria-controls":a.timeView._timeViewID})},_wrapper:function(){var t,a=this,n=a.element;t=n.parents(".k-datetimepicker"),t[0]||(t=n.wrap(C).parent().addClass("k-picker-wrap k-state-default"),t=t.wrap(C).parent()),t[0].style.cssText=n[0].style.cssText,n.css({width:"100%",height:n[0].style.height}),a.wrapper=t.addClass("k-widget k-datetimepicker k-header").addClass(n[0].className),a._inputWrapper=e(t[0].firstChild)},_reset:function(){var e=this,t=e.element,a=t.closest("form");a[0]&&(e._resetHandler=function(){e.value(t[0].defaultValue)},e._form=a.on("reset",e._resetHandler))},_template:function(){this._ariaTemplate=i.template(this.options.ARIATemplate)},_updateARIA:function(e){this.element.attr("aria-label",this._ariaTemplate({current:e}))}});p.plugin(N)})(window.kendo.jQuery);
|
@@ -1,10 +1,11 @@
|
|
1
1
|
/*
|
2
|
-
* Kendo UI Web v2012.
|
2
|
+
* Kendo UI Web v2012.3.1114 (http://kendoui.com)
|
3
3
|
* Copyright 2012 Telerik AD. All rights reserved.
|
4
4
|
*
|
5
|
-
* Kendo UI Web commercial licenses may be obtained at
|
5
|
+
* Kendo UI Web commercial licenses may be obtained at
|
6
|
+
* https://www.kendoui.com/purchase/license-agreement/kendo-ui-web-commercial.aspx
|
6
7
|
* If you do not own a commercial license, this file shall be governed by the
|
7
8
|
* GNU General Public License (GPL) version 3.
|
8
9
|
* For GPL requirements, please review: http://www.gnu.org/copyleft/gpl.html
|
9
10
|
*/
|
10
|
-
|
11
|
+
(function(e,t){function n(t,n){try{return e.contains(t,n)||t==n}catch(r){return!1}}function r(e){return S?f.elementFromPoint(e.x.screen,e.y.screen):f.elementFromPoint(e.x.client,e.y.client)}function i(e,t){return parseInt(e.css(t),10)||0}function a(e,t){return Math.min(Math.max(e,t.min),t.max)}function o(e,t){var n=e.offset(),r=n.left+i(e,"borderLeftWidth")+i(e,"paddingLeft"),a=n.top+i(e,"borderTopWidth")+i(e,"paddingTop"),o=r+e.width()-t.outerWidth(!0),s=a+e.height()-t.outerHeight(!0);return{x:{min:r,max:o},y:{min:a,max:s}}}function s(e,n,r){for(var i,a,o=0,s=n&&n.length,c=r&&r.length;e&&e.parentNode;){for(o=0;s>o;o++)if(i=n[o],i.element[0]===e)return{target:i,targetElement:e};for(o=0;c>o;o++)if(a=r[o],d.matchesSelector.call(e,a.options.filter))return{target:a,targetElement:e};e=e.parentNode}return t}var c,l,u=window.kendo,d=u.support,f=window.document,g=u.Class,h=u.ui.Widget,p=u.Observable,v=u.UserEvents,m=e.proxy,x=e.extend,y=u.getOffset,_={},b={},T={},E=d.mobileOS,w=E&&E.android,S=w&&"chrome"==E.browser,M="keyup",z="change",D="dragstart",O="drag",C="dragend",k="dragcancel",W="dragenter",H="dragleave",P="drop",A=p.extend({init:function(t,n){var r=this,i=t[0];r.capture=!1,e.each(u.eventMap.down.split(" "),function(){i.addEventListener(this,m(r._press,r),!0)}),e.each(u.eventMap.up.split(" "),function(){i.addEventListener(this,m(r._release,r),!0)}),p.fn.init.call(r),r.bind(["press","release"],n||{})},captureNext:function(){this.capture=!0},cancelCapture:function(){this.capture=!1},_press:function(e){var t=this;t.trigger("press"),t.capture&&e.preventDefault()},_release:function(e){var t=this;t.trigger("release"),t.capture&&(e.preventDefault(),t.cancelCapture())}}),L=p.extend({init:function(t){var n=this;p.fn.init.call(n),n.forcedEnabled=!1,e.extend(n,t),n.scale=1,n.max=0,n.horizontal?(n.measure="width",n.scrollSize="scrollWidth",n.axis="x"):(n.measure="height",n.scrollSize="scrollHeight",n.axis="y")},outOfBounds:function(e){return e>this.max||this.min>e},forceEnabled:function(){this.forcedEnabled=!0},getSize:function(){return this.container[this.measure]()},getTotal:function(){return this.element[0][this.scrollSize]},rescale:function(e){this.scale=e},update:function(e){var t=this,n=t.getTotal(),r=n*t.scale,i=t.getSize();t.size=i,t.total=r,t.min=Math.min(t.max,t.size-r),t.minScale=t.size/n,t.enabled=t.forcedEnabled||r>i,e||t.trigger(z,t)}}),F=p.extend({init:function(e){var t=this,n=m(t.refresh,t);p.fn.init.call(t),t.x=new L(x({horizontal:!0},e)),t.y=new L(x({horizontal:!1},e)),t.forcedMinScale=e.minScale,t.bind(z,e),u.onResize(n)},rescale:function(e){this.x.rescale(e),this.y.rescale(e),this.refresh()},refresh:function(){var e=this;e.x.update(),e.y.update(),e.enabled=e.x.enabled||e.y.enabled,e.minScale=e.forcedMinScale||Math.max(e.x.minScale,e.y.minScale),e.trigger(z)}}),N=p.extend({init:function(e){var t=this;x(t,e),p.fn.init.call(t)},dragMove:function(e){var t=this,n=t.dimension,r=t.axis,i=t.movable,a=i[r]+e;n.enabled&&((n.min>a&&0>e||a>n.max&&e>0)&&(e*=t.resistance),i.translateAxis(r,e),t.trigger(z,t))}}),B=g.extend({init:function(e){var t,n,r,i,a=this;x(a,{elastic:!0},e),r=a.elastic?.5:0,i=a.movable,a.x=t=new N({axis:"x",dimension:a.dimensions.x,resistance:r,movable:i}),a.y=n=new N({axis:"y",dimension:a.dimensions.y,resistance:r,movable:i}),a.userEvents.bind(["move","end","gesturestart","gesturechange"],{gesturestart:function(e){a.gesture=e},gesturechange:function(e){var r,o=a.gesture,s=o.center,c=e.center,l=e.distance/o.distance,u=a.dimensions.minScale;u>=i.scale&&1>l&&(l+=.8*(1-l)),r={x:(i.x-s.x)*l+c.x-i.x,y:(i.y-s.y)*l+c.y-i.y},i.scaleWith(l),t.dragMove(r.x),n.dragMove(r.y),a.dimensions.rescale(i.scale),a.gesture=e},move:function(e){t.dimension.enabled||n.dimension.enabled?(t.dragMove(e.x.delta),n.dragMove(e.y.delta),e.preventDefault()):e.touch.skip()},end:function(e){e.preventDefault()}})}}),G=d.transitions.prefix+"Transform",I=Math.round;l=d.hasHW3D?function(e,t,n){return"translate3d("+I(e)+"px,"+I(t)+"px,0) scale("+n+")"}:function(e,t,n){return"translate("+I(e)+"px,"+I(t)+"px) scale("+n+")"};var j=p.extend({init:function(t){var n=this;p.fn.init.call(n),n.element=e(t),n.element[0].style.webkitTransformOrigin="left top",n.x=0,n.y=0,n.scale=1,n._saveCoordinates(l(n.x,n.y,n.scale))},translateAxis:function(e,t){this[e]+=t,this.refresh()},scaleTo:function(e){this.scale=e,this.refresh()},scaleWith:function(e){this.scale*=e,this.refresh()},translate:function(e){this.x+=e.x,this.y+=e.y,this.refresh()},moveAxis:function(e,t){this[e]=t,this.refresh()},moveTo:function(e){x(this,e),this.refresh()},refresh:function(){var e=this,t=l(e.x,e.y,e.scale);t!=e.coordinates&&(e.element[0].style[G]=t,e._saveCoordinates(t),e.trigger(z))},_saveCoordinates:function(e){this.coordinates=e}}),Q=h.extend({init:function(e,t){var n=this;h.fn.init.call(n,e,t);var r=n.options.group;r in b?b[r].push(n):b[r]=[n]},events:[W,H,P],options:{name:"DropTarget",group:"default"},destroy:function(){var e,t=this.options.group,n=b[t];if(n.length>1){for(h.fn.destroy.call(this),e=0;n.length>e;e++)if(n[e]==this){n.splice(e,1);break}}else Q.destroyGroup(t)},_trigger:function(e,n){var r=this,i=_[r.options.group];return i?r.trigger(e,x({},n.event,{draggable:i,dropTarget:n.dropTarget})):t},_over:function(e){this._trigger(W,e)},_out:function(e){this._trigger(H,e)},_drop:function(e){var t=this,n=_[t.options.group];n&&(n.dropped=!t._trigger(P,e))}});Q.destroyGroup=function(e){var t,n=b[e];if(n){for(t=0;n.length>t;t++)h.fn.destroy.call(n[t]);n.length=0,delete b[e]}},Q._cache=b;var R=Q.extend({init:function(e,t){var n=this;h.fn.init.call(n,e,t);var r=n.options.group;r in T?T[r].push(n):T[r]=[n]},options:{name:"DropTargetArea",group:"default",filter:null}}),U=h.extend({init:function(e,t){var n=this;h.fn.init.call(n,e,t),n.userEvents=new v(n.element,{global:!0,stopPropagation:!0,filter:n.options.filter,threshold:n.options.distance,start:m(n._start,n),move:m(n._drag,n),end:m(n._end,n),cancel:m(n._cancel,n)}),n._afterEndHandler=m(n._afterEnd,n),n.captureEscape=function(e){e.keyCode===u.keys.ESC&&(n._trigger(k,{event:e}),n.userEvents.cancel())}},events:[D,O,C,k],options:{name:"Draggable",distance:5,group:"default",cursorOffset:null,axis:null,container:null,dropped:!1},_updateHint:function(t){var n,r=this,i=r.options,o=r.boundaries,s=i.axis,c=r.options.cursorOffset;c?n={left:t.x.location+c.left,top:t.y.location+c.top}:(r.hintOffset.left+=t.x.delta,r.hintOffset.top+=t.y.delta,n=e.extend({},r.hintOffset)),o&&(n.top=a(n.top,o.y),n.left=a(n.left,o.x)),"x"===s?delete n.top:"y"===s&&delete n.left,r.hint.css(n)},_start:function(t){var n=this,r=n.options,i=r.container,a=r.hint;if(n.currentTarget=t.target,n.currentTargetOffset=y(n.currentTarget),a){n.hint=e.isFunction(a)?e(a(n.currentTarget)):a;var s=y(n.currentTarget);n.hintOffset=s,n.hint.css({position:"absolute",zIndex:2e4,left:s.left,top:s.top}).appendTo(f.body)}_[r.group]=n,n.dropped=!1,i&&(n.boundaries=o(i,n.hint)),n._trigger(D,t)&&(n.userEvents.cancel(),n._afterEnd()),e(f).on(M,n.captureEscape)},_drag:function(n){var r=this;n.preventDefault(),r._withDropTarget(n,function(r,i){if(!r)return c&&(c._trigger(H,x(n,{dropTarget:e(c.targetElement)})),c=null),t;if(c){if(i===c.targetElement)return;c._trigger(H,x(n,{dropTarget:e(c.targetElement)}))}r._trigger(W,x(n,{dropTarget:e(i)})),c=x(r,{targetElement:i})}),r._trigger(O,n),r.hint&&r._updateHint(n)},_end:function(t){var n=this;n._withDropTarget(t,function(n,r){n&&(n._drop(x({},t,{dropTarget:e(r)})),c=null)}),n._trigger(C,t),n._cancel(t.event)},_cancel:function(){var e=this;e.hint&&!e.dropped?e.hint.animate(e.currentTargetOffset,"fast",e._afterEndHandler):e._afterEnd()},_trigger:function(e,t){var n=this;return n.trigger(e,x({},t.event,{x:t.x,y:t.y,currentTarget:n.currentTarget,dropTarget:t.dropTarget}))},_withDropTarget:function(e,t){var i,a,o=this,c=o.options,l=b[c.group],u=T[c.group];(l&&l.length||u&&u.length)&&(i=r(e),o.hint&&n(o.hint[0],i)&&(o.hint.hide(),i=r(e),i||(i=r(e)),o.hint.show()),a=s(i,l,u),a?t(a.target,a.targetElement):t())},destroy:function(){var e=this;h.fn.destroy.call(e),e._afterEnd(),e.userEvents.destroy()},_afterEnd:function(){var t=this;t.hint&&t.hint.remove(),delete _[t.options.group],t.trigger("destroy"),e(f).off(M,t.captureEscape)}});u.ui.plugin(Q),u.ui.plugin(R),u.ui.plugin(U),u.TapCapture=A,u.containerBoundaries=o,x(u.ui,{Pane:B,PaneDimensions:F,Movable:j})})(window.kendo.jQuery);
|
@@ -1,10 +1,11 @@
|
|
1
1
|
/*
|
2
|
-
* Kendo UI Web v2012.
|
2
|
+
* Kendo UI Web v2012.3.1114 (http://kendoui.com)
|
3
3
|
* Copyright 2012 Telerik AD. All rights reserved.
|
4
4
|
*
|
5
|
-
* Kendo UI Web commercial licenses may be obtained at
|
5
|
+
* Kendo UI Web commercial licenses may be obtained at
|
6
|
+
* https://www.kendoui.com/purchase/license-agreement/kendo-ui-web-commercial.aspx
|
6
7
|
* If you do not own a commercial license, this file shall be governed by the
|
7
8
|
* GNU General Public License (GPL) version 3.
|
8
9
|
* For GPL requirements, please review: http://www.gnu.org/copyleft/gpl.html
|
9
10
|
*/
|
10
|
-
|
11
|
+
(function(e,t){function n(e,t,n){for(var a,o=0,s=t.length-1;s>o;++o)a=t[o],a in e||(e[a]={}),e=e[a];e[t[s]]=n}var a=window.kendo,o=a.ui,s=o.Select,i=a.support.mobileOS,r=".kendoDropDownList",l="disabled",p="change",d="select",c="k-state-focused",u="k-state-default",_="k-state-disabled",f="k-state-selected",h="mouseenter"+r+" mouseleave"+r,v=e.proxy,m=s.extend({init:function(n,o){var i,l,p,c=this,u=o&&o.index;c.ns=r,o=e.isArray(o)?{dataSource:o}:o,s.fn.init.call(c,n,o),c._focusHandler=function(){c.wrapper.focus()},o=c.options,n=c.element.on("focus"+r,c._focusHandler),c._reset(),c._word="",c._wrapper(),c._tabindex(),c._aria(),c._span(),c._popup(),c._mobile(),c._accessors(),c._dataSource(),c._enable(),c._cascade(),c.selectedIndex=-1,u!==t&&(o.index=u),o.autoBind?c.dataSource.fetch():(p=o.text,p||(i=c._optionLabelText(o.optionLabel),l=i&&0===o.index,n.is(d)?p=l?i:n.children(":selected").text():!n[0].value&&l&&(p=i)),c.text(p)),a.notify(c)},options:{name:"DropDownList",enable:!0,index:0,autoBind:!0,text:"",template:"",delay:500,height:200,dataTextField:"",dataValueField:"",optionLabel:"",cascadeFrom:"",ignoreCase:!0,animation:{}},events:["open","close",p,"select","dataBinding","dataBound"],setOptions:function(e){s.fn.setOptions.call(this,e),this._template(),this._accessors(),this._aria()},destroy:function(){var e=this;e.wrapper.off(r),e.element.off(r),e._inputWrapper.off(r),s.fn.destroy.call(e)},enable:function(e){var t=this,n=t.element,a=t.wrapper.off(r),o=t._inputWrapper.off(h);e===!1?(n.attr(l,l),o.removeClass(u).addClass(_)):(n.removeAttr(l,l),o.addClass(u).removeClass(_).on(h,t._toggleHover),a.on("touchend"+r+" click"+r,function(e){t._blured=!1,e.preventDefault(),t.toggle()}).on("keydown"+r,v(t._keydown,t)).on("keypress"+r,v(t._keypress,t)).on("focusin"+r,function(){o.addClass(c),t._blured=!1}).on("focusout"+r,function(){t._blured||(t._blur(),o.removeClass(c),t._blured=!0,n.blur())}))},open:function(){var e=this;e.ul[0].firstChild?(e.popup.open(),e._scroll(e._current)):(e._open=!0,e._request||e.dataSource.fetch())},toggle:function(e){this._toggle(e)},refresh:function(){var e=this,t=e._data(),n=t.length,o=e.options.optionLabel;e.trigger("dataBinding"),e._current&&e.current(null),e.ul[0].innerHTML=a.render(e.template,t),e._height(n),e.popup.visible()&&e.popup._position(),e.element.is(d)&&(o&&n&&(o=e._optionLabelText(o),o='<option value="">'+o+"</option>"),e._options(t,o)),e._open&&(e._open=!1,e.toggle(!!n)),e._hideBusy(),e._makeUnselectable(),!e._valueCalled&&t[0]&&e._selectItem(),e._valueCalled=!1,e.trigger("dataBound")},search:function(e){if(e){var n=this,a=n.options.ignoreCase;a&&(e=e.toLowerCase()),n._select(function(o){var s=n._text(o);return s!==t?(s+="",a&&(s=s.toLowerCase()),0===s.indexOf(e)):t})}},select:function(e){var n=this;return e===t?n.selectedIndex:(n._select(e),n._old=n._accessor(),n._oldIndex=n.selectedIndex,t)},text:function(e){var n=this.span;return e===t?n.text():(n.text(e),t)},value:function(e){var n,a=this;return e===t?a._accessor():(null!==e&&(e=""+e),a._valueCalled=!0,e&&a._valueOnFetch(e)||(n=a._index(e),a.select(n>-1?n:0)),t)},_accept:function(e){this._focus(e)},_optionLabelText:function(){var e=this.options,t=e.dataTextField,n=e.optionLabel;return n&&t&&"object"==typeof n?this._text(n):n},_data:function(){var e=this,t=e.options,o=t.optionLabel,s=t.dataTextField,i=t.dataValueField,r=e.dataSource.view(),l=r.length,p=o,d=0;if(o&&l){for("object"==typeof o?p=o:s&&(p={},s=s.split("."),i=i.split("."),n(p,i,""),n(p,s,o)),p=new a.data.ObservableArray([p]);l>d;d++)p.push(r[d]);r=p}return r},_keydown:function(e){var t=this,n=e.keyCode,o=a.keys,s=t.ul[0];n===o.LEFT?n=o.UP:n===o.RIGHT&&(n=o.DOWN),e.keyCode=n,t._move(e),n===o.HOME?(e.preventDefault(),t._select(s.firstChild)):n===o.END&&(e.preventDefault(),t._select(s.lastChild))},_keypress:function(e){var t=this;setTimeout(function(){t._word+=String.fromCharCode(e.keyCode||e.charCode),t._search()})},_popup:function(){s.fn._popup.call(this),this.popup.one("open",function(){this.wrapper=a.wrap(this.element).addClass("km-popup")})},_search:function(){var e=this;clearTimeout(e._typing),e._typing=setTimeout(function(){e._word=""},e.options.delay),e.search(e._word)},_select:function(e){var n,a,s,i=this,r=i._current,l=i._data();e=i._get(e),e&&e[0]&&!e.hasClass(f)&&(r&&r.removeClass(f),s=o.List.inArray(e[0],i.ul[0]),s>-1&&(l=l[s],a=i._text(l),n=i._value(l),i.selectedIndex=s,i.text(a),i._accessor(n!==t?n:a,s),i.current(e.addClass(f)),i._optionID&&i._current.attr("aria-selected",!0)))},_mobile:function(){var e=this,t=e.popup,n=t.element.parents(".km-root").eq(0);n.length&&i&&(t.options.animation.open.effects=i.android||i.meego?"fadeIn":i.ios?"slideIn:up":t.options.animation.open.effects)},_span:function(){var t,n=this,a=n.wrapper,o="span.k-input";t=a.find(o),t[0]||(a.append('<span unselectable="on" class="k-dropdown-wrap k-state-default"><span unselectable="on" class="k-input"> </span><span unselectable="on" class="k-select"><span unselectable="on" class="k-icon k-i-arrow-s">select</span></span></span>').append(n.element),t=a.find(o)),n.span=t,n._inputWrapper=e(a[0].firstChild),n._arrow=a.find(".k-icon").mousedown(function(e){e.preventDefault()})},_wrapper:function(){var e,t=this,n=t.element,a=n[0];e=n.parent(),e.is("span.k-widget")||(e=n.wrap("<span />").parent(),e[0].style.cssText=a.style.cssText),n.hide(),t._focused=t.wrapper=e.addClass("k-widget k-dropdown k-header").addClass(a.className).css("display","").attr({unselectable:"on",role:"listbox","aria-haspopup":!0,"aria-expanded":!1})}});o.plugin(m)})(window.kendo.jQuery);
|
@@ -1,10 +1,11 @@
|
|
1
1
|
/*
|
2
|
-
* Kendo UI Web v2012.
|
2
|
+
* Kendo UI Web v2012.3.1114 (http://kendoui.com)
|
3
3
|
* Copyright 2012 Telerik AD. All rights reserved.
|
4
4
|
*
|
5
|
-
* Kendo UI Web commercial licenses may be obtained at
|
5
|
+
* Kendo UI Web commercial licenses may be obtained at
|
6
|
+
* https://www.kendoui.com/purchase/license-agreement/kendo-ui-web-commercial.aspx
|
6
7
|
* If you do not own a commercial license, this file shall be governed by the
|
7
8
|
* GNU General Public License (GPL) version 3.
|
8
9
|
* For GPL requirements, please review: http://www.gnu.org/copyleft/gpl.html
|
9
10
|
*/
|
10
|
-
|
11
|
+
(function(t,e){function a(e){return e=null!=e?e:"",e.type||t.type(e)||"string"}function n(e){e.find(":input:not(:button, ["+l.attr("role")+"=upload], ["+l.attr("skip")+"]), select").each(function(){var e=l.attr("bind"),a=this.getAttribute(e)||"",n="checkbox"===this.type||"radio"===this.type?"checked:":"value:",i=this.name;-1===a.indexOf(n)&&i&&(a+=(a.length?",":"")+n+i,t(this).attr(e,a))})}function i(t){var e,n,i=(t.model.fields||t.model)[t.field],o=a(i),r=i?i.validation:{},d=l.attr("type"),s=l.attr("bind"),u={name:t.field};for(e in r)n=r[e],v(e,h)>=0?u[d]=e:f(n)||(u[e]=p(n)?n.value||e:n),u[l.attr(e+"-msg")]=n.message;return v(o,h)>=0&&(u[d]=o),u[s]=("boolean"===o?"checked:":"value:")+t.field,u}function o(t){var e,a,n,i,o,r;if(t&&t.length)for(r=[],e=0,a=t.length;a>e;e++)n=t[e],o=n.text||n.value||n,i=null==n.value?n.text||n:n.value,r[e]={text:o,value:i};return r}function r(t,e){var a,n=t?t.validation||{}:{};for(a in n)f(n[a])&&(e[a]=n[a])}var l=window.kendo,d=l.ui,s=d.Widget,u=t.extend,f=t.isFunction,p=t.isPlainObject,v=t.inArray,c=/(\[|\]|\$|\.|\:|\+)/g,m='<div class="k-widget k-tooltip k-tooltip-validation" style="margin:0.5em"><span class="k-icon k-warning"> </span>#=message#<div class="k-callout k-callout-n"></div></div>',g="change",h=["url","email","number","date","boolean"],k={number:function(e,a){var n=i(a);t('<input type="text"/>').attr(n).appendTo(e).kendoNumericTextBox({format:a.format}),t("<span "+l.attr("for")+'="'+a.field+'" class="k-invalid-msg"/>').hide().appendTo(e)},date:function(e,a){var n=i(a),o=a.format;o&&(o=l._extractFormat(o)),n[l.attr("format")]=o,t('<input type="text"/>').attr(n).appendTo(e).kendoDatePicker({format:a.format}),t("<span "+l.attr("for")+'="'+a.field+'" class="k-invalid-msg"/>').hide().appendTo(e)},string:function(e,a){var n=i(a);t('<input type="text" class="k-input k-textbox"/>').attr(n).appendTo(e)},"boolean":function(e,a){var n=i(a);t('<input type="checkbox" />').attr(n).appendTo(e)},values:function(e,a){var n=i(a);t("<select "+l.attr("text-field")+'="text"'+l.attr("value-field")+'="value"'+l.attr("source")+"='"+l.stringify(o(a.values)).replace(/\'/g,"'")+"'"+l.attr("role")+'="dropdownlist"/>').attr(n).appendTo(e),t("<span "+l.attr("for")+'="'+a.field+'" class="k-invalid-msg"/>').hide().appendTo(e)}},y=s.extend({init:function(e,a){var n=this;s.fn.init.call(n,e,a),n._validateProxy=t.proxy(n._validate,n),n.refresh()},events:[g],options:{name:"Editable",editors:k,clearContainer:!0,errorTemplate:m},editor:function(t,e){var n=this,i=n.options.editors,o=p(t),r=o?t.field:t,l=n.options.model||{},d=o&&t.values,s=d?"values":a(e),f=o&&t.editor,v=f?t.editor:i[s],m=n.element.find("[data-container-for="+r.replace(c,"\\$1")+"]");v=v?v:i.string,f&&"string"==typeof t.editor&&(v=function(e){e.append(t.editor)}),m=m.length?m:n.element,v(m,u(!0,{},o?t:{field:r},{model:l}))},_validate:function(e){var a,n=this,i="boolean"==typeof e.value,o=n._validationEventInProgress,r={};r[e.field]=e.value,a=t(":input["+l.attr("bind")+'="'+(i?"checked:":"value:")+e.field+'"]',n.element);try{n._validationEventInProgress=!0,(!n.validatable.validateInput(a)||!o&&n.trigger(g,{values:r}))&&e.preventDefault()}finally{n._validationEventInProgress=!1}},end:function(){return this.validatable.validate()},destroy:function(){var t=this;s.fn.destroy.call(t),t.options.model.unbind("set",t._validateProxy),l.unbind(t.element),l.destroy(t.element),t.element.removeData("kendoValidator")},refresh:function(){var a,i,o,d,s,u,f,v=this,c=v.options.fields||[],m=v.options.clearContainer?v.element.empty():v.element,g=v.options.model||{},h={};for(t.isArray(c)||(c=[c]),a=0,i=c.length;i>a;a++)o=c[a],d=p(o),s=d?o.field:o,u=(g.fields||g)[s],r(u,h),v.editor(o,u);if(!i){f=g.fields||g;for(s in f)r(f[s],h)}n(m),l.bind(m,v.options.model),v.options.model.bind("set",v._validateProxy),v.validatable=m.kendoValidator({validateOnBlur:!1,errorTemplate:v.options.errorTemplate||e,rules:h}).data("kendoValidator"),m.find(":focusable:first").focus()}});d.plugin(y)})(window.kendo.jQuery);
|
@@ -1,10 +1,13 @@
|
|
1
1
|
/*
|
2
|
-
* Kendo UI Web v2012.
|
2
|
+
* Kendo UI Web v2012.3.1114 (http://kendoui.com)
|
3
3
|
* Copyright 2012 Telerik AD. All rights reserved.
|
4
4
|
*
|
5
|
-
* Kendo UI Web commercial licenses may be obtained at
|
5
|
+
* Kendo UI Web commercial licenses may be obtained at
|
6
|
+
* https://www.kendoui.com/purchase/license-agreement/kendo-ui-web-commercial.aspx
|
6
7
|
* If you do not own a commercial license, this file shall be governed by the
|
7
8
|
* GNU General Public License (GPL) version 3.
|
8
9
|
* For GPL requirements, please review: http://www.gnu.org/copyleft/gpl.html
|
9
10
|
*/
|
10
|
-
;(function(a,b){var c=window.kendo,d=c.Class,e=c.ui.Widget,f=c.support.mobileOS,g=a.extend,h=c.deepExtend,i=c.keys,j=d.extend({init:function(a){var b=this;b.options=a},getHtml:function(){var a=this.options;return c.template(a.template)({cssClass:a.cssClass,tooltip:a.title,initialValue:a.initialValue})}}),k={select:function(a){a.trigger("select",{})},editorWrapperTemplate:'<table cellspacing="4" cellpadding="0" class="k-widget k-editor k-header"><tbody><tr><td class="k-editor-toolbar-wrap"><ul class="k-editor-toolbar"></ul></td></tr><tr><td class="k-editable-area"></td></tr></tbody></table>',buttonTemplate:'<li class="k-editor-button"><a href="" class="k-tool-icon #= cssClass #" unselectable="on" title="#= tooltip #">#= tooltip #</a></li>',colorPickerTemplate:'<li class="k-editor-colorpicker"><div class="k-widget k-colorpicker k-header #= cssClass #"><span class="k-tool-icon"><span class="k-selected-color"></span></span><span class="k-icon k-i-arrow-s"></span></div></li>',comboBoxTemplate:'<li class="k-editor-combobox"><select title="#= tooltip #" class="#= cssClass #"></select></li>',dropDownListTemplate:'<li class="k-editor-selectbox"><select title="#= tooltip #" class="#= cssClass #"></select></li>',focusable:".k-colorpicker,a.k-tool-icon:not(.k-state-disabled),.k-selectbox, .k-combobox .k-input",wrapTextarea:function(b){var c=b.width(),d=b.height(),e=k.editorWrapperTemplate,f=a(e).insertBefore(b).width(c).height(d),g=f.find(".k-editable-area");b.appendTo(g).addClass("k-content k-raw-content").hide();return b.closest(".k-editor")},renderTools:function(b,d){var e={},f,h,i,j=b._nativeTools,l,m,n=a(b.element).closest(".k-editor").find(".k-editor-toolbar");if(d)for(i=0;i<d.length;i++){f=d[i],a.isPlainObject(f)?f.name&&b.tools[f.name]?(a.extend(b.tools[f.name].options,f),e[f.name]=b.tools[f.name],m=e[f.name].options):(m=g({cssClass:"k-i-custom",type:"button",tooltip:""},f),m.name&&(m.cssClass="k-"+(m.name=="custom"?"i-custom":m.name)),m.template||m.type=="button"&&(m.template=k.buttonTemplate)):b.tools[f]&&(e[f]=b.tools[f],m=e[f].options);if(!m)continue;l=m.template,l&&(l.getHtml?l=l.getHtml():(a.isFunction(l)||(l=c.template(l)),l=l(m)),l.indexOf("<li")!==0&&(l="<li class='k-editor-template'>"+l+"</li>"),h=a(l).appendTo(n),m.type=="button"&&m.exec&&h.find(".k-tool-icon").click(a.proxy(m.exec,b.element[0])))}for(i=0;i<j.length;i++)e[j[i]]||(e[j[i]]=b.tools[j[i]]);b.options.tools=e},decorateStyleToolItems:function(b){var d=b.data.closest(".k-editor").find(".k-style").data("kendoSelectBox");if(!!d){var e=d.dataSource.view();d.list.find(".k-item").each(function(d,f){var g=a(f),h=g.text(),i=c.ui.editor.Dom.inlineStyle(b.data.data("kendoEditor").document,"span",{className:e[d].value});g.html('<span unselectable="on" style="display:block;'+i+'">'+h+"</span>")})}},createContentElement:function(b,c){var d,e,f,g=b.closest(".k-rtl").length?"direction:rtl;":"";b.hide(),d=a("<iframe />",{src:'javascript:"<html></html>"',frameBorder:"0"}).css("display","").addClass("k-content").insertBefore(b)[0],e=d.contentWindow||d,c.length>0&&a(d).one("load",b,k.decorateStyleToolItems),f=e.document||d.contentDocument,f.designMode="On",f.open(),f.write("<!DOCTYPE html><html><head><meta charset='utf-8' /><style>html,body{padding:0;margin:0;font-family:Verdana,Geneva,sans-serif;background:#fff;}html{font-size:100%}body{font-size:.75em;line-height:1.5;padding-top:1px;margin-top:-1px;word-wrap: break-word;-webkit-nbsp-mode: space;-webkit-line-break: after-white-space;"+g+"}"+"h1{font-size:2em;margin:.67em 0}h2{font-size:1.5em}h3{font-size:1.16em}h4{font-size:1em}h5{font-size:.83em}h6{font-size:.7em}"+"p{margin:0 0 1em;padding:0 .2em}.k-marker{display:none;}.k-paste-container{position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden}"+"ul,ol{padding-left:2.5em}"+"a{color:#00a}"+"code{font-size:1.23em}"+"</style>"+a.map(c,function(a){return"<link rel='stylesheet' href='"+a+"'>"}).join("")+"</head><body></body></html>"),f.close();return e},initializeContentElement:function(b){var c=!0;b.window=k.createContentElement(a(b.textarea),b.options.stylesheets),b.document=b.window.contentDocument||b.window.document,b.body=b.document.body,a(b.document).bind({keydown:function(a){if(a.keyCode===i.F10)setTimeout(function(){var a="tabIndex",c=b.wrapper,d=c.attr(a);c.attr(a,d||0).focus().find("li:has("+m+")").first().focus(),!d&&d!==0&&c.removeAttr(a)},100),a.preventDefault();else{var d=b.keyboard.toolFromShortcut(b.options.tools,a);if(d){a.preventDefault(),/undo|redo/.test(d)||b.keyboard.endTyping(!0),b.exec(d);return!1}if(b.keyboard.isTypingKey(a)&&b.pendingFormats.hasPending())if(c)c=!1;else{var e=b.getRange();b.pendingFormats.apply(e),b.selectRange(e)}b.keyboard.clearTimeout(),b.keyboard.keydown(a)}},keyup:function(d){var e=[8,9,33,34,35,36,37,38,39,40,40,45,46];if(a.inArray(d.keyCode,e)>-1||d.keyCode==65&&d.ctrlKey&&!d.altKey&&!d.shiftKey)b.pendingFormats.clear(),l(b);if(b.keyboard.isTypingKey(d)){if(b.pendingFormats.hasPending()){var f=b.getRange();b.pendingFormats.apply(f),b.selectRange(f)}}else c=!0;b.keyboard.keyup(d)},mousedown:function(c){b.pendingFormats.clear();var d=a(c.target);!a.browser.gecko&&c.which==2&&d.is("a[href]")&&window.open(d.attr("href"),"_new")},mouseup:function(){l(b)}}),a(b.window).bind("blur",function(){var a=b.textarea.value,c=b.encodedValue();b.update(),c!=a&&b.trigger("change")}),a(b.body).bind("cut paste",function(a){b.clipboard["on"+a.type](a)})},formatByName:function(b,c){for(var d=0;d<c.length;d++)if(a.inArray(b,c[d].tags)>=0)return c[d]},registerTool:function(a,b){var c=s.fn._tools;c[a]=b,c[a].options&&c[a].options.template&&(c[a].options.template.options.cssClass="k-"+a)},registerFormat:function(a,b){c.ui.Editor.fn.options.formats[a]=b}},l=k.select,m=k.focusable,n=k.wrapTextarea,o=k.renderTools,p=k.initializeContentElement,q={bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",superscript:"Superscript",subscript:"Subscript",justifyCenter:"Center text",justifyLeft:"Align text left",justifyRight:"Align text right",justifyFull:"Justify",insertUnorderedList:"Insert unordered list",insertOrderedList:"Insert ordered list",indent:"Indent",outdent:"Outdent",createLink:"Insert hyperlink",unlink:"Remove hyperlink",insertImage:"Insert image",insertHtml:"Insert HTML",fontName:"Select font family",fontNameInherit:"(inherited font)",fontSize:"Select font size",fontSizeInherit:"(inherited size)",formatBlock:"Format",style:"Styles",emptyFolder:"Empty Folder",uploadFile:"Upload",orderBy:"Arrange by:",orderBySize:"Size",orderByName:"Name",invalidFileType:'The selected file "{0}" is not valid. Supported file types are {1}.',deleteFile:'Are you sure you want to delete "{0}"?',overwriteFile:'A file with name "{0}" already exists in the current directory. Do you want to overwrite it?',directoryNotFound:"A directory with this name was not found."},r=!f||f.ios&&f.flatVersion>=500||!f.ios&&typeof document.documentElement.contentEditable!="undefined",s=e.extend({init:function(b,d){function t(a,b){if(!b.key)return a;var c=a+" (";b.ctrl&&(c+="Ctrl + "),b.shift&&(c+="Shift + "),b.alt&&(c+="Alt + "),c+=b.key+")";return c}function s(b){var c=a.grep(b.className.split(" "),function(a){return!/^k-(widget|tool-icon|state-hover|header|combobox|dropdown|selectbox|colorpicker)$/i.test(a)});return c[0]?c[0].substring(c[0].lastIndexOf("-")+1):"custom"}if(!!r){var f=this,g,j,k=c.ui.editor;e.fn.init.call(f,b,d),f.tools=h({},c.ui.Editor.fn._tools),f.options=h({},f.options,d),b=a(b),b.closest("form").bind("submit",function(){f.update()});for(var l in f.tools)f.tools[l].name=l.toLowerCase();f.textarea=b.attr("autocomplete","off")[0],g=f.wrapper=n(b),o(f,f.options.tools),p(f),f.keyboard=new k.Keyboard([new k.TypingHandler(f),new k.SystemHandler(f)]),f.clipboard=new k.Clipboard(this),f.pendingFormats=new k.PendingFormats(this),f.undoRedoStack=new k.UndoRedoStack,d&&d.value?j=d.value:j=b.val().replace(/[\r\n\v\f\t ]+/ig," "),f.value(j);var u=".k-editor-toolbar > li > *, .k-editor-toolbar > li select",v=".k-editor-button .k-tool-icon",w=v+":not(.k-state-disabled)",x=v+".k-state-disabled";g.find(".k-combobox .k-input").keydown(function(b){var c=a(this).closest(".k-combobox").data("kendoComboBox"),d=b.keyCode;d==i.RIGHT||d==i.LEFT?c.close():d==i.DOWN&&(c.dropDown.isOpened()||(b.stopImmediatePropagation(),c.open()))}),g.delegate(w,"mouseenter",function(){a(this).addClass("k-state-hover")}).delegate(w,"mouseleave",function(){a(this).removeClass("k-state-hover")}).delegate(v,"mousedown",!1).delegate(m,"keydown",function(b){var c=a(this).closest("li"),d="li:has("+m+")",e,g=b.keyCode;if(g==i.RIGHT)e=c.nextAll(d).first().find(m);else if(g==i.LEFT)e=c.prevAll(d).last().find(m);else if(g==i.ESC)e=f;else if(g==i.TAB&&!b.ctrlKey&&!b.altKey)if(b.shiftKey){e=c.prevAll(d).last().find(m);if(e.length)b.preventDefault();else return}else b.preventDefault(),e=c.nextAll(d).first().find(m),e.length||(e=f);e&&e.focus()}).delegate(w,"click",function(a){a.preventDefault(),a.stopPropagation(),f.exec(s(this))}).delegate(x,"click",function(a){a.preventDefault()}).find(u).each(function(){var b=s(this),c=f.options,d=c.tools[b],e=c.messages[b],g=a(this);if(!!d){if(b=="fontSize"||b=="fontName"){var h=c.messages[b+"Inherit"]||q[b+"Inherit"];g.find("input").val(h).end().find("span.k-input").text(h).end()}d.initialize(g,{title:t(e,d),editor:f})}}),f.bind("select",function(){var b=f.getRange(),c=k.RangeUtils.textNodes(b);c.length||(c=[b.startContainer]),g.find(u).each(function(){var b=f.options.tools[s(this)];b&&b.update(a(this),c,f.pendingFormats)})}),a(document).bind("DOMNodeInserted",function(b){var c=f.wrapper;if(a.contains(b.target,c[0])||c[0]==b.target)f.textarea.value=f.value(),c.find("iframe").remove(),p(f)}).bind("mousedown",function(a){try{f.keyboard.isTypingInProgress()&&f.keyboard.endTyping(!0),f.selectionRestorePoint||(f.selectionRestorePoint=new k.RestorePoint(f.getRange()))}catch(a){}}),c.notify(f)}},events:["select","change","execute","error","paste"],options:{name:"Editor",messages:q,formats:{},encoded:!0,stylesheets:[],dialogOptions:{modal:!0,resizable:!1,draggable:!0,animation:!1},fontName:[{text:"Arial",value:"Arial,Helvetica,sans-serif"},{text:"Courier New",value:"'Courier New',Courier,monospace"},{text:"Georgia",value:"Georgia,serif"},{text:"Impact",value:"Impact,Charcoal,sans-serif"},{text:"Lucida Console",value:"'Lucida Console',Monaco,monospace"},{text:"Tahoma",value:"Tahoma,Geneva,sans-serif"},{text:"Times New Roman",value:"'Times New Roman',Times,serif"},{text:"Trebuchet MS",value:"'Trebuchet MS',Helvetica,sans-serif"},{text:"Verdana",value:"Verdana,Geneva,sans-serif"}],fontSize:[{text:"1 (8pt)",value:"xx-small"},{text:"2 (10pt)",value:"x-small"},{text:"3 (12pt)",value:"small"},{text:"4 (14pt)",value:"medium"},{text:"5 (18pt)",value:"large"},{text:"6 (24pt)",value:"x-large"},{text:"7 (36pt)",value:"xx-large"}],formatBlock:[{text:"Paragraph",value:"p"},{text:"Quotation",value:"blockquote"},{text:"Heading 1",value:"h1"},{text:"Heading 2",value:"h2"},{text:"Heading 3",value:"h3"},{text:"Heading 4",value:"h4"},{text:"Heading 5",value:"h5"},{text:"Heading 6",value:"h6"}],tools:["bold","italic","underline","strikethrough","fontName","fontSize","foreColor","backColor","justifyLeft","justifyCenter","justifyRight","justifyFull","insertUnorderedList","insertOrderedList","indent","outdent","formatBlock","createLink","unlink","insertImage"]},_nativeTools:["insertLineBreak","insertParagraph","redo","undo","insertHtml"],_tools:{undo:{options:{key:"Z",ctrl:!0}},redo:{options:{key:"Y",ctrl:!0}}},tools:{},value:function(d){var e=this.body,f=c.ui.editor.Dom;if(d===b)return c.ui.editor.Serializer.domToXhtml(e);this.pendingFormats.clear(),d=(d||"").replace(/<!\[CDATA\[(.*)?\]\]>/g,"<!--[CDATA[$1]]-->").replace(/<script([^>]*)>(.*)?<\/script>/ig,"<telerik:script $1>$2</telerik:script>").replace(/(<\/?img[^>]*>)[\r\n\v\f\t ]+/ig,"$1"),a.browser.msie||(d=d.replace(/<p([^>]*)>(\s*)?<\/p>/ig,'<p $1><br _moz_dirty="" /></p>'));if(a.browser.msie&&parseInt(a.browser.version,10)<9){d="<br/>"+d;var g="originalsrc",h="originalhref";d=d.replace(/href\s*=\s*(?:'|")?([^'">\s]*)(?:'|")?/,h+'="$1"'),d=d.replace(/src\s*=\s*(?:'|")?([^'">\s]*)(?:'|")?/,g+'="$1"'),e.innerHTML=d,f.remove(e.firstChild),a(e).find("telerik\\:script,script,link,img,a").each(function(){var a=this;a[h]&&(a.setAttribute("href",a[h]),a.removeAttribute(h)),a[g]&&(a.setAttribute("src",a[g]),a.removeAttribute(g))})}else e.innerHTML=d,a.browser.msie&&f.normalize(e);this.selectionRestorePoint=null,this.update()},focus:function(){this.window.focus()},update:function(a){this.textarea.value=a||this.options.encoded?this.encodedValue():this.value()},encodedValue:function(){return c.ui.editor.Dom.encode(this.value())},createRange:function(a){return c.ui.editor.RangeUtils.createRange(a||this.document)},getSelection:function(){return c.ui.editor.SelectionUtils.selectionFromDocument(this.document)},selectRange:function(a){this.focus();var b=this.getSelection();b.removeAllRanges(),b.addRange(a)},getRange:function(){var a=this.getSelection(),b=a.rangeCount>0?a.getRangeAt(0):this.createRange(),c=this.document;b.startContainer==c&&b.endContainer==c&&!b.startOffset&&!b.endOffset&&(b.setStart(this.body,0),b.collapse(!0));return b},selectedHtml:function(){return c.ui.editor.Serializer.domToXhtml(this.getRange().cloneContents())},paste:function(a){this.clipboard.paste(a)},exec:function(b,c){var d=this,e,f,h,i="",j;b=b.toLowerCase(),d.keyboard.isTypingInProgress()||(d.focus(),e=d.getRange(),f=d.document.body);for(h in d.options.tools)if(h.toLowerCase()==b){i=d.options.tools[h];break}if(i){e=d.getRange();if(!/undo|redo/i.test(b)&&i.willDelayExecution(e)){j=a.extend({},i),a.extend(j.options,{params:c}),d.pendingFormats.toggle(j),l(d);return}var k=i.command?i.command(g({range:e},c)):null;d.trigger("execute",{name:b,command:k});if(/undo|redo/i.test(b))d.undoRedoStack[b]();else if(k){k.managesUndoRedo||d.undoRedoStack.push(k),k.editor=d,k.exec();if(k.async){k.change=a.proxy(function(){l(d)},d);return}}l(d)}}});c.ui.plugin(s);var t=d.extend({init:function(a){this.options=a},initialize:function(a,b){a.attr({unselectable:"on",title:b.title})},command:function(a){return new this.options.command(a)},update:function(){},willDelayExecution:function(){return!1}});t.exec=function(a,b,c){a.exec(b,{value:c})};var u=t.extend({init:function(a){t.fn.init.call(this,a)},command:function(a){var b=this;return new c.ui.editor.FormatCommand(g(a,{formatter:b.options.formatter}))},update:function(a,b,c){var d=c.isPending(this.name),e=this.options.finder.isFormatted(b),f=d?!e:e;a.toggleClass("k-state-active",f)}});g(c.ui,{editor:{ToolTemplate:j,EditorUtils:k,Tool:t,FormatTool:u}})})(jQuery),function(a){function k(a){var b={},c,d;for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var b=window.kendo,c=a.map,d=a.extend,e="style",f="float",g="cssFloat",h="styleFloat",i="class",j="k-marker",l=k("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed".split(",")),m="div,p,h1,h2,h3,h4,h5,h6,address,applet,blockquote,button,center,dd,dir,dl,dt,fieldset,form,frameset,hr,iframe,isindex,li,map,menu,noframes,noscript,object,ol,pre,script,table,tbody,td,tfoot,th,thead,tr,ul".split(","),n=k(m),o="span,em,a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,strike,strong,sub,sup,textarea,tt,u,var".split(","),p=k(o),q=k("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected".split(",")),r=function(a){a.nodeType==1&&a.normalize()};a.browser.msie&&parseInt(a.browser.version,10)>=8&&(r=function(a){if(a.nodeType==1&&a.firstChild){var b=a.firstChild,c=b;for(;;){c=c.nextSibling;if(!c)break;c.nodeType==3&&b.nodeType==3&&(c.nodeValue=b.nodeValue+c.nodeValue,A.remove(b)),b=c}}});var s=/^\s+$/,t=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i,u=/&/g,v=/</g,w=/>/g,x=/\u00a0/g,y=/\ufeff/g,z="color,padding-left,padding-right,padding-top,padding-bottom,background-color,background-attachment,background-image,background-position,background-repeat,border-top-style,border-top-width,border-top-color,border-bottom-style,border-bottom-width,border-bottom-color,border-left-style,border-left-width,border-left-color,border-right-style,border-right-width,border-right-color,font-family,font-size,font-style,font-variant,font-weight,line-height".split(","),A={findNodeIndex:function(a){var b=0;for(;;){a=a.previousSibling;if(!a)break;b++}return b},isDataNode:function(a){return a&&a.nodeValue!==null&&a.data!==null},isAncestorOf:function(b,c){try{return!A.isDataNode(b)&&(a.contains(b,A.isDataNode(c)?c.parentNode:c)||c.parentNode==b)}catch(d){return!1}},isAncestorOrSelf:function(a,b){return A.isAncestorOf(a,b)||a==b},findClosestAncestor:function(a,b){if(A.isAncestorOf(a,b))while(b&&b.parentNode!=a)b=b.parentNode;return b},getNodeLength:function(a){return A.isDataNode(a)?a.length:a.childNodes.length},splitDataNode:function(a,b){var c=a.cloneNode(!1);a.deleteData(b,a.length),c.deleteData(0,b),A.insertAfter(c,a)},attrEquals:function(b,c){for(var d in c){var e=b[d];d==f&&(e=b[a.support.cssFloat?g:h]);if(typeof e=="object"){if(!A.attrEquals(e,c[d]))return!1}else if(e!=c[d])return!1}return!0},blockParentOrBody:function(a){return A.parentOfType(a,m)||a.ownerDocument.body},blockParents:function(b){var c=[],d,e;for(d=0,e=b.length;d<e;d++){var f=A.parentOfType(b[d],A.blockElements);f&&a.inArray(f,c)<0&&c.push(f)}return c},windowFromDocument:function(a){return a.defaultView||a.parentWindow},normalize:r,blockElements:m,inlineElements:o,empty:l,fillAttrs:q,toHex:function(a){var b=t.exec(a);if(!b)return a;return"#"+c(b.slice(1),function(a){a=parseInt(a,10).toString(16);return a.length>1?a:"0"+a}).join("")},encode:function(a){return a.replace(u,"&").replace(v,"<").replace(w,">").replace(x," ")},name:function(a){return a.nodeName.toLowerCase()},significantChildNodes:function(b){return a.grep(b.childNodes,function(a){return a.nodeType!=3||!A.isWhitespace(a)})},lastTextNode:function(a){var b=null;if(a.nodeType==3)return a;for(var c=a.lastChild;c;c=c.previousSibling){b=A.lastTextNode(c);if(b)return b}return b},is:function(a,b){return A.name(a)==b},isMarker:function(a){return a.className==j},isWhitespace:function(a){return s.test(a.nodeValue)},isBlock:function(a){return n[A.name(a)]},isEmpty:function(a){return l[A.name(a)]},isInline:function(a){return p[A.name(a)]},scrollTo:function(b){b.ownerDocument.body.scrollTop=a(A.isDataNode(b)?b.parentNode:b).offset().top},insertAt:function(a,b,c){a.insertBefore(b,a.childNodes[c]||null)},insertBefore:function(a,b){return b.parentNode?b.parentNode.insertBefore(a,b):b},insertAfter:function(a,b){return b.parentNode.insertBefore(a,b.nextSibling)},remove:function(a){a.parentNode.removeChild(a)},trim:function(a){for(var b=a.childNodes.length-1;b>=0;b--){var c=a.childNodes[b];A.isDataNode(c)?(c.nodeValue.replace(y,"").length||A.remove(c),A.isWhitespace(c)&&A.insertBefore(c,a)):c.className!=j&&(A.trim(c),!c.childNodes.length&&!A.isEmpty(c)&&A.remove(c))}return a},parentOfType:function(a,b){do a=a.parentNode;while(a&&!A.ofType(a,b));return a},ofType:function(b,c){return a.inArray(A.name(b),c)>=0},changeTag:function(a,b){var c=A.create(a.ownerDocument,b),d=a.attributes,f,g,h,j,k;for(f=0,g=d.length;f<g;f++)k=d[f],k.specified&&(h=k.nodeName,j=k.nodeValue,h==i?c.className=j:h==e?c.style.cssText=a.style.cssText:c.setAttribute(h,j));while(a.firstChild)c.appendChild(a.firstChild);A.insertBefore(c,a),A.remove(a);return c},wrap:function(a,b){A.insertBefore(b,a),b.appendChild(a);return b},unwrap:function(a){var b=a.parentNode;while(a.firstChild)b.insertBefore(a.firstChild,a);b.removeChild(a)},create:function(a,b,c){return A.attr(a.createElement(b),c)},attr:function(a,b){b=d({},b),b&&e in b&&(A.style(a,b.style),delete b.style);return d(a,b)},style:function(b,c){a(b).css(c||{})},unstyle:function(b,c){for(var d in c)d==f&&(d=a.support.cssFloat?g:h),b.style[d]="";b.style.cssText===""&&b.removeAttribute(e)},inlineStyle:function(b,d,e){var f=a(A.create(b,d,e)),g;b.body.appendChild(f[0]),g=c(z,function(b){return a.browser.msie&&b=="line-height"&&f.css(b)=="1px"?"line-height:1.5":b+":"+f.css(b)}).join(";"),f.remove();return g},removeClass:function(b,c){var d=" "+b.className+" ",e=c.split(" "),f,g;for(f=0,g=e.length;f<g;f++)d=d.replace(" "+e[f]+" "," ");d=a.trim(d),d.length?b.className=d:b.removeAttribute(i)},commonAncestor:function(){var a=arguments.length,b=[],c=Infinity,d=null,e,f,g,h,i;if(!a)return null;if(a==1)return arguments[0];for(e=0;e<a;e++){f=[],g=arguments[e];while(g)f.push(g),g=g.parentNode;b.push(f.reverse()),c=Math.min(c,f.length)}if(a==1)return b[0][0];for(e=0;e<c;e++){h=b[0][e];for(i=1;i<a;i++)if(h!=b[i][e])return d;d=h}return d}};b.ui.editor.Dom=A}(jQuery),function(a,b){var c=window.kendo,d=c.ui.editor,e=d.Dom,f=a.extend,g="xx-small,x-small,small,medium,large,x-large,xx-large".split(","),h=/"/g,i=/<br[^>]*>/i,j=/<p><\/p>/i,k={domToXhtml:function(c){function m(b,c){var g=b.nodeType,h,i,j,m,n;if(g==1){h=e.name(b);if(!h||b.attributes._moz_dirty&&e.is(b,"br"))return;i=f[h];if(i){i.start(b),l(b),i.end(b);return}d.push("<"),d.push(h),k(b),e.empty[h]?d.push(" />"):(d.push(">"),l(b,c||e.is(b,"pre")),d.push("</"),d.push(h),d.push(">"))}else if(g==3){m=b.nodeValue;if(!c&&a.support.leadingWhitespace){j=b.parentNode,n=b.previousSibling,n||(n=(e.isInline(j)?j:b).previousSibling);if(!n||n.innerHTML===""||e.isBlock(n))m=m.replace(/^[\r\n\v\f\t ]+/,"");m=m.replace(/ +/," ")}d.push(e.encode(m))}else g==4?(d.push("<![CDATA["),d.push(b.data),d.push("]]>")):g==8&&(b.data.indexOf("[CDATA[")<0?(d.push("<!--"),d.push(b.data),d.push("-->")):(d.push("<!"),d.push(b.data),d.push(">")))}function l(a,b){for(var c=a.firstChild;c;c=c.nextSibling)m(c,b)}function k(c){var f=[],g=c.attributes,i,j,k,l=a.trim;if(e.is(c,"img")){var m=c.style.width,n=c.style.height,o=a(c);m&&(o.attr("width",parseInt(m,10)),e.unstyle(c,{width:b})),n&&(o.attr("height",parseInt(n,10)),e.unstyle(c,{height:b}))}for(j=0,k=g.length;j<k;j++){i=g[j];var p=i.nodeName;(i.specified||p=="value"&&!c.value||p=="type"&&i.nodeValue=="text")&&p.indexOf("_moz")<0&&p!="complete"&&p!="altHtml"&&f.push(i)}if(!!f.length){f.sort(function(a,b){return a.nodeName>b.nodeName?1:a.nodeName<b.nodeName?-1:0});for(j=0,k=f.length;j<k;j++){i=f[j];var q=i.nodeName,r=i.nodeValue;d.push(" "),d.push(q),d.push('="');if(q=="style"){var s=l(r||c.style.cssText).split(";");for(var t=0,u=s.length;t<u;t++){var v=s[t];if(v.length){var w=v.split(":"),x=l(w[0].toLowerCase()),y=l(w[1]);if(x=="font-size-adjust"||x=="font-stretch")continue;x.indexOf("color")>=0&&(y=e.toHex(y)),x.indexOf("font")>=0&&(y=y.replace(h,"'")),d.push(x),d.push(":"),d.push(y),d.push(";")}}}else q=="src"||q=="href"?d.push(c.getAttribute(q,2)):d.push(e.fillAttrs[q]?q:r);d.push('"')}}}var d=[],f={"telerik:script":{start:function(a){d.push("<script"),k(a),d.push(">")},end:function(){d.push("</script>")}},b:{start:function(){d.push("<strong>")},end:function(){d.push("</strong>")}},i:{start:function(){d.push("<em>")},end:function(){d.push("</em>")}},u:{start:function(){d.push('<span style="text-decoration:underline;">')},end:function(){d.push("</span>")}},iframe:{start:function(a){d.push("<iframe"),k(a),d.push(">")},end:function(){d.push("</iframe>")}},font:{start:function(a){d.push('<span style="');var b=a.getAttribute("color"),c=g[a.getAttribute("size")],f=a.getAttribute("face");b&&(d.push("color:"),d.push(e.toHex(b)),d.push(";")),f&&(d.push("font-face:"),d.push(f),d.push(";")),c&&(d.push("font-size:"),d.push(c),d.push(";")),d.push('">')},end:function(a){d.push("</span>")}}};l(c),d=d.join("");if(d.replace(i,"").replace(j,"")==="")return"";return d}};f(d,{Serializer:k})}(jQuery),function(a){function t(a,b,c){var d=f.create(b.ownerDocument,"a"),e=a.duplicate();e.collapse(c);var g=e.parentElement();do g.insertBefore(d,d.previousSibling),e.moveToElementText(d);while(e.compareEndPoints(c?"StartToStart":"StartToEnd",a)>0&&d.previousSibling);e.setEndPoint(c?"EndToStart":"EndToEnd",a);var i=d.nextSibling;i?(f.remove(d),h(i)?b[c?"setStart":"setEnd"](i,e.text.length):b[c?"setStartBefore":"setEndBefore"](i)):(i=d.previousSibling,i&&h(i)?(b.setEnd(i,i.nodeValue.length),f.remove(d)):(b.selectNodeContents(g),f.remove(d),b.endOffset-=1))}function s(a,b,c){var d=b[c?"startContainer":"endContainer"],e=b[c?"startOffset":"endOffset"],g=0,i=h(d)?d:d.childNodes[e]||null,j=h(d)?d.parentNode:d;if(d.nodeType==3||d.nodeType==4)g=e;var k=j.insertBefore(f.create(b.ownerDocument,"a"),i),l=b.ownerDocument.body.createTextRange();l.moveToElementText(k),f.remove(k),l[c?"moveStart":"moveEnd"]("character",g),l.collapse(!1),a.setEndPoint(c?"StartToStart":"EndToStart",l)}function p(a){a.collapsed=a.startContainer==a.endContainer&&a.startOffset==a.endOffset;var b=a.startContainer;while(b&&b!=a.endContainer&&!f.isAncestorOf(b,a.endContainer))b=b.parentNode;a.commonAncestorContainer=b}function o(a,b){function c(a){try{return n(a.startContainer,a.endContainer,a.startOffset,a.endOffset)<0}catch(b){return!0}}c(a)&&(b?(a.commonAncestorContainer=a.endContainer=a.startContainer,a.endOffset=a.startOffset):(a.commonAncestorContainer=a.startContainer=a.endContainer,a.startOffset=a.endOffset),a.collapsed=!0)}function n(a,b,c,d){if(a==b)return d-c;var e=b;while(e&&e.parentNode!=a)e=e.parentNode;if(e)return g(e)-c;e=a;while(e&&e.parentNode!=b)e=e.parentNode;if(e)return d-g(e)-1;var h=f.commonAncestor(a,b),i=a;while(i&&i.parentNode!=h)i=i.parentNode;i||(i=h);var j=b;while(j&&j.parentNode!=h)j=j.parentNode;j||(j=h);if(i==j)return 0;return g(j)-g(i)}var b=window.kendo,c=b.Class,d=a.extend,e=b.ui.editor,f=e.Dom,g=f.findNodeIndex,h=f.isDataNode,i=f.findClosestAncestor,j=f.getNodeLength,k=f.normalize,l={selectionFromWindow:function(b){if(a.browser.msie&&a.browser.version<9)return new r(b.document);return b.getSelection()},selectionFromRange:function(a){var b=y.documentFromRange(a);return l.selectionFromDocument(b)},selectionFromDocument:function(a){return l.selectionFromWindow(f.windowFromDocument(a))}},m=c.extend({init:function(b){a.extend(this,{ownerDocument:b,startContainer:b,endContainer:b,commonAncestorContainer:b,startOffset:0,endOffset:0,collapsed:!0})},setStart:function(a,b){this.startContainer=a,this.startOffset=b,p(this),o(this,!0)},setEnd:function(a,b){this.endContainer=a,this.endOffset=b,p(this),o(this,!1)},setStartBefore:function(a){this.setStart(a.parentNode,g(a))},setStartAfter:function(a){this.setStart(a.parentNode,g(a)+1)},setEndBefore:function(a){this.setEnd(a.parentNode,g(a))},setEndAfter:function(a){this.setEnd(a.parentNode,g(a)+1)},selectNode:function(a){this.setStartBefore(a),this.setEndAfter(a)},selectNodeContents:function(a){this.setStart(a,0),this.setEnd(a,a[a.nodeType===1?"childNodes":"nodeValue"].length)},collapse:function(a){var b=this;a?b.setEnd(b.startContainer,b.startOffset):b.setStart(b.endContainer,b.endOffset)},deleteContents:function(){var a=this,b=a.cloneRange();a.startContainer!=a.commonAncestorContainer&&a.setStartAfter(i(a.commonAncestorContainer,a.startContainer)),a.collapse(!0),function c(a){while(a.next())a.hasPartialSubtree()?c(a.getSubtreeIterator()):a.remove()}(new q(b))},cloneContents:function(){var a=y.documentFromRange(this);return function b(c){var d,e=a.createDocumentFragment();while(d=c.next())d=d.cloneNode(!c.hasPartialSubtree()),c.hasPartialSubtree()&&d.appendChild(b(c.getSubtreeIterator())),e.appendChild(d);return e}(new q(this))},extractContents:function(){var a=this,b=a.cloneRange();a.startContainer!=a.commonAncestorContainer&&a.setStartAfter(i(a.commonAncestorContainer,a.startContainer)),a.collapse(!0);var c=y.documentFromRange(a);return function d(b){var e,f=c.createDocumentFragment();while(e=b.next())b.hasPartialSubtree()?(e=e.cloneNode(!1),e.appendChild(d(b.getSubtreeIterator()))):b.remove(a.originalRange),f.appendChild(e);return f}(new q(b))},insertNode:function(a){var b=this;h(b.startContainer)?(b.startOffset!=b.startContainer.nodeValue.length&&f.splitDataNode(b.startContainer,b.startOffset),f.insertAfter(a,b.startContainer)):f.insertAt(b.startContainer,a,b.startOffset),b.setStart(b.startContainer,b.startOffset)},cloneRange:function(){return a.extend(new m(this.ownerDocument),{startContainer:this.startContainer,endContainer:this.endContainer,commonAncestorContainer:this.commonAncestorContainer,startOffset:this.startOffset,endOffset:this.endOffset,collapsed:this.collapsed,originalRange:this})},toString:function(){var a=this.startContainer.nodeName,b=this.endContainer.nodeName;return[a=="#text"?this.startContainer.nodeValue:a,"(",this.startOffset,") : ",b=="#text"?this.endContainer.nodeValue:b,"(",this.endOffset,")"].join("")}}),q=c.extend({init:function(b){a.extend(this,{range:b,_current:null,_next:null,_end:null});if(!b.collapsed){var c=b.commonAncestorContainer;this._next=b.startContainer==c&&!h(b.startContainer)?b.startContainer.childNodes[b.startOffset]:i(c,b.startContainer),this._end=b.endContainer==c&&!h(b.endContainer)?b.endContainer.childNodes[b.endOffset]:i(c,b.endContainer).nextSibling}},hasNext:function(){return!!this._next},next:function(){var a=this,b=a._current=a._next;a._next=a._current&&a._current.nextSibling!=a._end?a._current.nextSibling:null,h(a._current)&&(a.range.endContainer==a._current&&(b=b.cloneNode(!0),b.deleteData(a.range.endOffset,b.length-a.range.endOffset)),a.range.startContainer==a._current&&(b=b.cloneNode(!0),b.deleteData(0,a.range.startOffset)));return b},traverse:function(a){function d(){b._current=b._next,b._next=b._current&&b._current.nextSibling!=b._end?b._current.nextSibling:null;return b._current}var b=this,c;while(c=d())b.hasPartialSubtree()?b.getSubtreeIterator().traverse(a):a(c);return c},remove:function(a){var b=this,c=b.range.startContainer==b._current,d=b.range.endContainer==b._current,e,i,j;if(h(b._current)&&(c||d))e=c?b.range.startOffset:0,i=d?b.range.endOffset:b._current.length,j=i-e,a&&(c||d)&&(b._current==a.startContainer&&e<=a.startOffset&&(a.startOffset-=j),b._current==a.endContainer&&i<=a.endOffset&&(a.endOffset-=j)),b._current.deleteData(e,j);else{var k=b._current.parentNode;if(a&&(b.range.startContainer==k||b.range.endContainer==k)){var l=g(b._current);k==a.startContainer&&l<=a.startOffset&&(a.startOffset-=1),k==a.endContainer&&l<a.endOffset&&(a.endOffset-=1)}f.remove(b._current)}},hasPartialSubtree:function(){return!h(this._current)&&(f.isAncestorOrSelf(this._current,this.range.startContainer)||f.isAncestorOrSelf(this._current,this.range.endContainer))},getSubtreeIterator:function(){var a=this,b=a.range.cloneRange();b.selectNodeContents(a._current),f.isAncestorOrSelf(a._current,a.range.startContainer)&&b.setStart(a.range.startContainer,a.range.startOffset),f.isAncestorOrSelf(a._current,a.range.endContainer)&&b.setEnd(a.range.endContainer,a.range.endOffset);return new q(b)}}),r=c.extend({init:function(a){this.ownerDocument=a,this.rangeCount=1},addRange:function(a){var b=this.ownerDocument.body.createTextRange();s(b,a,!1),s(b,a,!0),b.select()},removeAllRanges:function(){this.ownerDocument.selection.empty()},getRangeAt:function(){var a,b=new m(this.ownerDocument),c=this.ownerDocument.selection,d;try{a=c.createRange(),d=a.item?a.item(0):a.parentElement();if(d.ownerDocument!=this.ownerDocument)return b}catch(e){return b}if(c.type=="Control")b.selectNode(a.item(0));else{t(a,b,!0),t(a,b,!1),b.startContainer.nodeType==9&&b.setStart(b.endContainer,b.startOffset),b.endContainer.nodeType==9&&b.setEnd(b.startContainer,b.endOffset),a.compareEndPoints("StartToEnd",a)===0&&b.collapse(!1);var f=b.startContainer,i=b.endContainer,k=this.ownerDocument.body;if(!b.collapsed&&b.startOffset===0&&b.endOffset==j(b.endContainer)&&(f!=i||!h(f)||f.parentNode!=k)){var l=!1,n=!1;while(g(f)===0&&f==f.parentNode.firstChild&&f!=k)f=f.parentNode,l=!0;while(g(i)==j(i.parentNode)-1&&i==i.parentNode.lastChild&&i!=k)i=i.parentNode,n=!0;f==k&&i==k&&l&&n&&(b.setStart(f,0),b.setEnd(i,j(k)))}}return b}}),u=c.extend({init:function(a){this.enumerate=function(){function c(a){if(f.is(a,"img")||a.nodeType==3&&!f.isWhitespace(a))b.push(a);else{a=a.firstChild;while(a)c(a),a=a.nextSibling}}var b=[];(new q(a)).traverse(c);return b}}}),v=c.extend({init:function(a){var b=this;b.range=a,b.rootNode=y.documentFromRange(a),b.body=b.rootNode.body,b.html=b.body.innerHTML,b.startContainer=b.nodeToPath(a.startContainer),b.endContainer=b.nodeToPath(a.endContainer),b.startOffset=b.offset(a.startContainer,a.startOffset),b.endOffset=b.offset(a.endContainer,a.endOffset)},index:function(a){var b=0,c=a.nodeType;while(a=a.previousSibling){var d=a.nodeType;(d!=3||c!=d)&&b++,c=d}return b},offset:function(a,b){if(a.nodeType==3)while((a=a.previousSibling)&&a.nodeType==3)b+=a.nodeValue.length;return b},nodeToPath:function(a){var b=[];while(a!=this.rootNode)b.push(this.index(a)),a=a.parentNode;return b},toRangePoint:function(a,b,c,d){var e=this.rootNode,f=c.length,g=d;while(f--)e=e.childNodes[c[f]];while(e.nodeType==3&&e.nodeValue.length<g)g-=e.nodeValue.length,e=e.nextSibling;a[b?"setStart":"setEnd"](e,g)},toRange:function(){var a=this,b=a.range.cloneRange();a.toRangePoint(b,!0,a.startContainer,a.startOffset),a.toRangePoint(b,!1,a.endContainer,a.endOffset);return b}}),w=c.extend({init:function(){this.caret=null},addCaret:function(a){var b=this;b.caret=f.create(y.documentFromRange(a),"span",{className:"k-marker"}),a.insertNode(b.caret),a.selectNode(b.caret);return b.caret},removeCaret:function(b){var c=this,d=c.caret.previousSibling,e=0;d&&(e=h(d)?d.nodeValue.length:g(d));var i=c.caret.parentNode,j=d?g(d):0;f.remove(c.caret),k(i);var l=i.childNodes[j];if(h(l))b.setStart(l,e);else if(l){var m=f.lastTextNode(l);m?b.setStart(m,m.nodeValue.length):b[d?"setStartAfter":"setStartBefore"](l)}else!a.browser.msie&&!i.innerHTML&&(i.innerHTML='<br _moz_dirty="" />'),b.selectNodeContents(i);b.collapse(!0)},add:function(a,b){var c=this;b&&a.collapsed&&(c.addCaret(a),a=y.expand(a));var d=a.cloneRange();d.collapse(!1),c.end=f.create(y.documentFromRange(a),"span",{className:"k-marker"}),d.insertNode(c.end),d=a.cloneRange(),d.collapse(!0),c.start=c.end.cloneNode(!0),d.insertNode(c.start),a.setStartBefore(c.start),a.setEndAfter(c.end),k(a.commonAncestorContainer);return a},remove:function(a){var b=this,c=b.start,d=b.end,e,i,j;k(a.commonAncestorContainer);while(!c.nextSibling&&c.parentNode)c=c.parentNode;while(!d.previousSibling&&d.parentNode)d=d.parentNode;e=c.previousSibling&&c.previousSibling.nodeType==3&&c.nextSibling&&c.nextSibling.nodeType==3,i=d.previousSibling&&d.previousSibling.nodeType==3&&d.nextSibling&&d.nextSibling.nodeType==3,j=e&&i,c=c.nextSibling,d=d.previousSibling;var l=!1,m=!1;c==b.end&&(m=!!b.start.previousSibling,c=d=b.start.previousSibling||b.end.nextSibling,l=!0),f.remove(b.start),f.remove(b.end);if(!c||!d)a.selectNodeContents(a.commonAncestorContainer),a.collapse(!0);else{var n=l?h(c)?c.nodeValue.length:c.childNodes.length:0,o=h(d)?d.nodeValue.length:d.childNodes.length;if(c.nodeType==3)while(c.previousSibling&&c.previousSibling.nodeType==3)c=c.previousSibling,n+=c.nodeValue.length;if(d.nodeType==3)while(d.previousSibling&&d.previousSibling.nodeType==3)d=d.previousSibling,o+=d.nodeValue.length;var p=g(c),q=c.parentNode,r=g(d),s=d.parentNode;for(var t=c;t.previousSibling;t=t.previousSibling)t.nodeType==3&&t.previousSibling.nodeType==3&&p--;for(var u=d;u.previousSibling;u=u.previousSibling)u.nodeType==3&&u.previousSibling.nodeType==3&&r--;k(q),c.nodeType==3&&(c=q.childNodes[p]),k(s),d.nodeType==3&&(d=s.childNodes[r]),l?(c.nodeType==3?a.setStart(c,n):a[m?"setStartAfter":"setStartBefore"](c),a.collapse(!0)):(c.nodeType==3?a.setStart(c,n):a.setStartBefore(c),d.nodeType==3?a.setEnd(d,o):a.setEndAfter(d)),b.caret&&b.removeCaret(a)}}}),x=/[\u0009-\u000d]|\u0020|\u00a0|\ufeff|\.|,|;|:|!|\(|\)|\?/,y={nodes:function(a){var b=y.textNodes(a);b.length||(a.selectNodeContents(a.commonAncestorContainer),b=y.textNodes(a),b.length||(b=f.significantChildNodes(a.commonAncestorContainer)));return b},textNodes:function(a){return(new u(a)).enumerate()},documentFromRange:function(a){var b=a.startContainer;return b.nodeType==9?b:b.ownerDocument},createRange:function(b){if(a.browser.msie&&a.browser.version<9)return new m(b);return b.createRange()},selectRange:function(a){var b=y.image(a);b&&(a.setStartAfter(b),a.setEndAfter(b));var c=l.selectionFromRange(a);c.removeAllRanges(),c.addRange(a)},split:function(a,b,c){function d(d){var e=a.cloneRange();e.collapse(d),e[d?"setStartBefore":"setEndAfter"](b);var g=e.extractContents();c&&(g=f.trim(g)),f[d?"insertBefore":"insertAfter"](g,b)}d(!0),d(!1)},getMarkers:function(a){var b=[];(new q(a)).traverse(function(a){a.className=="k-marker"&&b.push(a)});return b},image:function(a){var b=[];(new q(a)).traverse(function(a){f.is(a,"img")&&b.push(a)});if(b.length==1)return b[0]},expand:function(a){var b=a.cloneRange(),c=b.startContainer.childNodes[b.startOffset===0?0:b.startOffset-1],d=b.endContainer.childNodes[b.endOffset];if(!h(c)||!h(d))return b;var e=c.nodeValue,f=d.nodeValue;if(!e||!f)return b;var g=e.split("").reverse().join("").search(x),i=f.search(x);if(!g||!i)return b;i=i==-1?f.length:i,g=g==-1?0:e.length-g,b.setStart(c,g),b.setEnd(d,i);return b},isExpandable:function(a){var b=a.startContainer,c=y.documentFromRange(a);if(b==c||b==c.body)return!1;var d=a.cloneRange(),e=b.nodeValue;if(!e)return!1;var f=e.substring(0,d.startOffset),g=e.substring(d.startOffset),h=0,i=0;f&&(h=f.split("").reverse().join("").search(x)),g&&(i=g.search(x));return h&&i}};d(e,{SelectionUtils:l,W3CRange:m,RangeIterator:q,W3CSelection:r,RangeEnumerator:u,RestorePoint:v,Marker:w,RangeUtils:y})}(jQuery),function(a){var b=window.kendo,c=b.Class,d=b.ui.editor,e=d.EditorUtils,f=e.registerTool,g=d.Dom,h=d.RangeUtils,i=h.selectRange,j=d.Tool,k=d.ToolTemplate,l=d.RestorePoint,m=d.Marker,n=a.extend,o=c.extend({init:function(a){var b=this;b.options=a,b.restorePoint=new l(a.range),b.marker=new m,b.formatter=a.formatter},getRange:function(){return this.restorePoint.toRange()},lockRange:function(a){return this.marker.add(this.getRange(),a)},releaseRange:function(a){this.marker.remove(a),i(a)},undo:function(){var a=this.restorePoint;a.body.innerHTML=a.html,i(a.toRange())},redo:function(){this.exec()},exec:function(){var a=this,b=a.lockRange(!0);a.formatter.editor=a.editor,a.formatter.toggle(b),a.releaseRange(b)}}),p=c.extend({init:function(a,b){this.body=a.body,this.startRestorePoint=a,this.endRestorePoint=b},redo:function(){this.body.innerHTML=this.endRestorePoint.html,i(this.endRestorePoint.toRange())},undo:function(){this.body.innerHTML=this.startRestorePoint.html,i(this.startRestorePoint.toRange())}}),q=o.extend({init:function(a){o.fn.init.call(this,a),this.managesUndoRedo=!0},exec:function(){var a=this.editor,b=a.getRange(),c=new l(b);a.clipboard.paste(this.options.value||""),a.undoRedoStack.push(new p(c,new l(a.getRange()))),a.focus()}}),r=j.extend({initialize:function(a,b){var c=b.editor;new d.SelectBox(a,{dataSource:c.options.insertHtml||[],dataTextField:"text",dataValueField:"value",change:function(a){j.exec(c,"insertHtml",this.value())},title:c.options.messages.insertHtml,highlightFirst:!1})},command:function(a){return new q(a)},update:function(a,b){var c=a.data("kendoSelectBox")||a.find("select").data("kendoSelectBox");c.close(),c.value(c.options.title)}}),s=c.extend({init:function(){this.stack=[],this.currentCommandIndex=-1},push:function(a){var b=this;b.stack=b.stack.slice(0,b.currentCommandIndex+1),b.currentCommandIndex=b.stack.push(a)-1},undo:function(){this.canUndo()&&this.stack[this.currentCommandIndex--].undo()},redo:function(){this.canRedo()&&this.stack[++this.currentCommandIndex].redo()},canUndo:function(){return this.currentCommandIndex>=0},canRedo:function(){return this.currentCommandIndex!=this.stack.length-1}}),t=c.extend({init:function(a){this.editor=a},keydown:function(a){var b=this,c=b.editor,d=c.keyboard,e=d.isTypingKey(a);if(e&&!d.isTypingInProgress()){var f=c.getRange();b.startRestorePoint=new l(f),d.startTyping(function(){c.selectionRestorePoint=b.endRestorePoint=new l(c.getRange()),c.undoRedoStack.push(new p(b.startRestorePoint,b.endRestorePoint))});return!0}return!1},keyup:function(a){var b=this.editor.keyboard;if(b.isTypingInProgress()){b.endTyping();return!0}return!1}}),u=c.extend({init:function(a){this.editor=a,this.systemCommandIsInProgress=!1},createUndoCommand:function(){var a=this;a.endRestorePoint=new l(a.editor.getRange()),a.editor.undoRedoStack.push(new p(a.startRestorePoint,a.endRestorePoint)),a.startRestorePoint=a.endRestorePoint},changed:function(){if(this.startRestorePoint)return this.startRestorePoint.html!=this.editor.body.innerHTML;return!1},keydown:function(a){var b=this,c=b.editor,d=c.keyboard;if(d.isModifierKey(a)){d.isTypingInProgress()&&d.endTyping(!0),b.startRestorePoint=new l(c.getRange());return!0}if(d.isSystem(a)){b.systemCommandIsInProgress=!0,b.changed()&&(b.systemCommandIsInProgress=!1,b.createUndoCommand());return!0}return!1},keyup:function(a){var b=this;if(b.systemCommandIsInProgress&&b.changed()){b.systemCommandIsInProgress=!1,b.createUndoCommand(a);return!0}return!1}}),v=c.extend({init:function(a){this.handlers=a,this.typingInProgress=!1},isCharacter:function(a){return a>=48&&a<=90||a>=96&&a<=111||a>=186&&a<=192||a>=219&&a<=222},toolFromShortcut:function(b,c){var d=String.fromCharCode(c.keyCode),e,f;for(e in b){f=a.extend({ctrl:!1,alt:!1,shift:!1},b[e].options);if((f.key==d||f.key==c.keyCode)&&f.ctrl==c.ctrlKey&&f.alt==c.altKey&&f.shift==c.shiftKey)return e}},isTypingKey:function(a){var b=a.keyCode;return this.isCharacter(b)&&!a.ctrlKey&&!a.altKey||b==32||b==13||b==8||b==46&&!a.shiftKey&&!a.ctrlKey&&!a.altKey},isModifierKey:function(a){var b=a.keyCode;return b==17&&!a.shiftKey&&!a.altKey||b==16&&!a.ctrlKey&&!a.altKey||b==18&&!a.ctrlKey&&!a.shiftKey},isSystem:function(a){return a.keyCode==46&&a.ctrlKey&&!a.altKey&&!a.shiftKey},startTyping:function(a){this.onEndTyping=a,this.typingInProgress=!0},stopTyping:function(){this.typingInProgress=!1,this.onEndTyping&&this.onEndTyping()},endTyping:function(b){var c=this;c.clearTimeout(),b?c.stopTyping():c.timeout=window.setTimeout(a.proxy(c.stopTyping,c),1e3)},isTypingInProgress:function(){return this.typingInProgress},clearTimeout:function(){window.clearTimeout(this.timeout)},notify:function(a,b){var c,d=this.handlers;for(c=0;c<d.length;c++)if(d[c][b](a))break},keydown:function(a){this.notify(a,"keydown")},keyup:function(a){this.notify(a,"keyup")}}),w=c.extend({init:function(a){this.editor=a,this.cleaners=[new x]},htmlToFragment:function(a){var b=this.editor,c=b.document,d=g.create(c,"div"),e=c.createDocumentFragment();d.innerHTML=a;while(d.firstChild)e.appendChild(d.firstChild);return e},isBlock:function(a){return/<(div|p|ul|ol|table|h[1-6])/i.test(a)},oncut:function(a){var b=this.editor,c=new l(b.getRange());setTimeout(function(){b.undoRedoStack.push(new p(c,new l(b.getRange())))})},onpaste:function(b){var c=this.editor,e=c.getRange(),f="",h=new l(e),j=g.create(c.document,"div",{className:"k-paste-container",innerHTML:f});c.body.appendChild(j);if(c.body.createTextRange){b.preventDefault();var k=c.createRange();k.selectNodeContents(j),c.selectRange(k);var m=c.body.createTextRange();m.moveToElementText(j),a(c.body).unbind("paste"),m.execCommand("Paste"),a(c.body).bind("paste",a.proxy(arguments.callee,this))}else{var n=c.createRange();n.selectNodeContents(j),i(n)}setTimeout(function(){var a,b={html:""};i(e),g.remove(j),j.lastChild&&g.is(j.lastChild,"br")&&g.remove(j.lastChild),a=j.innerHTML,a!=f&&(b.html=a),c.trigger("paste",b),c.clipboard.paste(b.html,!0),c.undoRedoStack.push(new p(h,new l(c.getRange()))),d.EditorUtils.select(c)})},splittableParent:function(a,b){var c,d;if(a)return g.parentOfType(b,["p","ul","ol"])||b.parentNode;c=b.parentNode,d=b.ownerDocument.body;if(g.isInline(c))while(c.parentNode!=d&&!g.isBlock(c.parentNode))c=c.parentNode;return c},paste:function(a,b){var c=this.editor,d,e;for(d=0,e=this.cleaners.length;d<e;d++)this.cleaners[d].applicable(a)&&(a=this.cleaners[d].clean(a));b&&(a=a.replace(/(<br>(\s| )*)+(<\/?(div|p|li|col|t))/ig,"$3"),a=a.replace(/<(a|span)[^>]*><\/\1>/ig,"")),a=a.replace(/^<li/i,"<ul><li").replace(/li>$/g,"li></ul>");var f=this.isBlock(a),j=c.getRange();j.deleteContents(),j.startContainer==c.document&&j.selectNodeContents(c.body);var k=new m,l=k.addCaret(j),n=this.splittableParent(f,l),o=!1;!/body|td/.test(g.name(n))&&(f||g.isInline(n))&&(j.selectNode(l),h.split(j,n,!0),o=!0);var p=this.htmlToFragment(a);if(p.firstChild&&p.firstChild.className==="k-paste-container"){var q=[];for(d=0,e=p.childNodes.length;d<e;d++)q.push(p.childNodes[d].innerHTML);p=this.htmlToFragment(q.join("<br />"))}j.insertNode(p),n=this.splittableParent(f,l);if(o){while(l.parentNode!=n)g.unwrap(l.parentNode);g.unwrap(l.parentNode)}g.normalize(j.commonAncestorContainer),l.style.display="inline",g.scrollTo(l),k.removeCaret(j),i(j)}}),x=c.extend({init:function(){this.replacements=[/<\?xml[^>]*>/gi,"",/<!--(.|\n)*?-->/g,"",/"/g,"'",/(?:<br> [\s\r\n]+|<br>)*(<\/?(h[1-6]|hr|p|div|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|address|pre|form|blockquote|dl|dt|dd|dir|fieldset)[^>]*>)(?:<br> [\s\r\n]+|<br>)*/g,"$1",/<br><br>/g,"<BR><BR>",/<br>/g," ",/<table([^>]*)>(\s| )+<t/gi,"<table$1><t",/<tr[^>]*>(\s| )*<\/tr>/gi,"",/<tbody[^>]*>(\s| )*<\/tbody>/gi,"",/<table[^>]*>(\s| )*<\/table>/gi,"",/<BR><BR>/g,"<br>",/^\s*( )+/gi,"",/( |<br[^>]*>)+\s*$/gi,"",/mso-[^;"]*;?/ig,"",/<(\/?)b(\s[^>]*)?>/ig,"<$1strong$2>",/<(\/?)i(\s[^>]*)?>/ig,"<$1em$2>",/<\/?(meta|link|style|o:|v:|x:)[^>]*>((?:.|\n)*?<\/(meta|link|style|o:|v:|x:)[^>]*>)?/ig,"",/style=(["|'])\s*\1/g,""]},applicable:function(a){return/class="?Mso|style="[^"]*mso-/i.test(a)},listType:function(a){if(/^[\u2022\u00b7\u00a7\u00d8o]\u00a0+/.test(a))return"ul";if(/^\s*\w+[\.\)]\u00a0{2,}/.test(a))return"ol"},lists:function(b){var c=g.create(document,"div",{innerHTML:b}),d=a(g.blockElements.join(","),c),e=-1,f,h={ul:{},ol:{}},i=c;for(var j=0;j<d.length;j++){var k=d[j];b=k.innerHTML.replace(/<\/?\w+[^>]*>/g,"").replace(/ /g," ");var l=this.listType(b);if(!l||g.name(k)!="p"){k.innerHTML?(h={ul:{},ol:{}},i=c,e=-1):g.remove(k);continue}var m=parseFloat(k.style.marginLeft||0),n=h[l][m];if(m>e||!n)n=g.create(document,l),i==c?g.insertBefore(n,k):i.appendChild(n),h[l][m]=n;if(f!=l)for(var o in h)for(var p in h[o])a.contains(n,h[o][p])&&delete h[o][p];g.remove(k.firstChild),i=g.create(document,"li",{innerHTML:k.innerHTML}),n.appendChild(i),g.remove(k),e=m,f=l}return c.innerHTML},stripEmptyAnchors:function(a){return a.replace(/<a([^>]*)>\s*<\/a>/ig,function(a,b){if(!b||b.indexOf("href")<0)return"";return a})},clean:function(a){var b=this,c=b.replacements,d,e;for(d=0,e=c.length;d<e;d+=2)a=a.replace(c[d],c[d+1]);a=b.stripEmptyAnchors(a),a=b.lists(a),a=a.replace(/\s+class="?[^"\s>]*"?/ig,"");return a}});n(d,{Command:o,GenericCommand:p,InsertHtmlCommand:q,InsertHtmlTool:r,UndoRedoStack:s,TypingHandler:t,SystemHandler:u,Keyboard:v,Clipboard:w,MSWordFormatCleaner:x}),f("insertHtml",new r({template:new k({template:e.dropDownListTemplate,title:"Insert HTML",initialValue:"Insert HTML"})}))}(jQuery),function(a){function t(a){return a.collapsed&&!k.isExpandable(a)}var b=window.kendo,c=b.Class,d=b.ui.editor,e=b.ui.Editor.fn.options.formats,f=d.EditorUtils,g=d.Tool,h=d.ToolTemplate,i=d.FormatTool,j=d.Dom,k=d.RangeUtils,l=a.extend,m=d.EditorUtils.registerTool,n=d.EditorUtils.registerFormat,o="k-marker",p=c.extend({init:function(a){this.format=a},numberOfSiblings:function(a){var b=0,c=0,d=0,e=a.parentNode,f;for(f=e.firstChild;f;f=f.nextSibling)f!=a&&(f.className==o?d++:f.nodeType==3?b++:c++);return d>1&&e.firstChild.className==o&&e.lastChild.className==o?0:c+b},findSuitable:function(a,b){if(!b&&this.numberOfSiblings(a)>0)return null;return j.parentOfType(a,this.format[0].tags)},findFormat:function(a){var b=this.format,c=j.attrEquals,d,e,f,g,h;for(d=0,e=b.length;d<e;d++){f=a,g=b[d].tags,h=b[d].attr;if(f&&j.ofType(f,g)&&c(f,h))return f;while(f){f=j.parentOfType(f,g);if(f&&c(f,h))return f}}return null},isFormatted:function(a){var b,c;for(b=0,c=a.length;b<c;b++)if(this.findFormat(a[b]))return!0;return!1}}),q=c.extend({init:function(a,b){var c=this;c.finder=new p(a),c.attributes=l({},a[0].attr,b),c.tag=a[0].tags[0]},wrap:function(a){return j.wrap(a,j.create(a.ownerDocument,this.tag,this.attributes))},activate:function(a,b){var c=this;c.finder.isFormatted(b)?(c.split(a),c.remove(b)):c.apply(b)},toggle:function(a){var b=k.textNodes(a);b.length>0&&this.activate(a,b)},apply:function(a){var b=this,c=[],d,e,f,g;for(d=0,e=a.length;d<e;d++)f=a[d],g=b.finder.findSuitable(f),g?j.attr(g,b.attributes):g=b.wrap(f),c.push(g);b.consolidate(c)},remove:function(a){var b=this,c,d,e;for(c=0,d=a.length;c<d;c++)e=b.finder.findFormat(a[c]),e&&(b.attributes&&b.attributes.style?(j.unstyle(e,b.attributes.style),e.style.cssText||j.unwrap(e)):j.unwrap(e))},split:function(a){var b=k.textNodes(a),c=b.length,d,e;if(c>0)for(d=0;d<c;d++)e=this.finder.findFormat(b[d]),e&&k.split(a,e,!0)},consolidate:function(a){var b,c;while(a.length>1){b=a.pop(),c=a[a.length-1],b.previousSibling&&b.previousSibling.className==o&&c.appendChild(b.previousSibling);if(b.tagName==c.tagName&&b.previousSibling==c&&b.style.cssText==c.style.cssText){while(b.firstChild)c.appendChild(b.firstChild);j.remove(b)}}}}),r=p.extend({init:function(a,b){var c=this;c.format=a,c.greedyProperty=b,p.fn.init.call(c,a)},getInlineCssValue:function(b){var c=b.attributes,d=a.trim,e,f,g,h,i,k,l,m,n,o,p,q;if(!!c){for(e=0,f=c.length;e<f;e++){g=c[e],h=g.nodeName,i=g.nodeValue;if(g.specified&&h=="style"){k=d(i||b.style.cssText).split(";");for(m=0,n=k.length;m<n;m++){l=k[m];if(l.length){o=l.split(":"),p=d(o[0].toLowerCase()),q=d(o[1]);if(p!=this.greedyProperty)continue;return p.indexOf("color")>=0?j.toHex(q):q}}}}return}},getFormatInner:function(b){var c=a(j.isDataNode(b)?b.parentNode:b),d=c.parents().andSelf(),e,f,g;for(e=0,f=d.length;e<f;e++){g=this.greedyProperty=="className"?d[e].className:this.getInlineCssValue(d[e]);if(g)return g}return"inherit"},getFormat:function(a){var b=this.getFormatInner(a[0]),c,d;for(c=1,d=a.length;c<d;c++)if(b!=this.getFormatInner(a[c]))return"";return b},isFormatted:function(a){return this.getFormat(a)!==""}}),s=q.extend({init:function(a,b,c){var d=this;q.fn.init.call(d,a,b),d.greedyProperty=c,d.values=b,d.finder=new r(a,c)},activate:function(a,b){var c=this,d,e=c.greedyProperty,f="apply";c.split(a),e&&(d=e.replace(/-([a-z])/,function(a,b){return b.toUpperCase()}),c.values.style[d]=="inherit"&&(f="remove")),c[f](b)}}),u=i.extend({init:function(a){i.fn.init.call(this,l(a,{finder:new p(a.format),formatter:function(){return new q(a.format)}})),this.willDelayExecution=t}}),v=g.extend({init:function(c){var d=this;g.fn.init.call(d,c),d.type=a.browser.msie||b.support.touch?"kendoDropDownList":"kendoComboBox",d.format=[{tags:["span"]}],d.finder=new r(d.format,c.cssAttr)},command:function(a){var b=this.options,c=this.format,e={};return new d.FormatCommand(l(a,{formatter:function(){e[b.domAttr]=a.value;return new s(c,{style:e},b.cssAttr)}}))},willDelayExecution:t,update:function(a,b,c){var d=this,e=a.data(d.type),f=c.getPending(d.name),g=f&&f.params?f.params.value:d.finder.getFormat(b);e.close(),e.value(g)},initialize:function(a,b){var c=b.editor,d=this.options,e=d.name,f,h=[];d.defaultValue&&(h=[{text:c.options.messages[d.defaultValue[0].text],value:d.defaultValue[0].value}]),f=h.concat(d.items?d.items:c.options[e]),a[this.type]({dataTextField:"text",dataValueField:"value",dataSource:f,change:function(a){g.exec(c,e,this.value())},highlightFirst:!1}),a.closest(".k-widget").removeClass("k-"+e).find("*").andSelf().attr("unselectable","on"),a.data(this.type).value("inherit")}}),w=g.extend({init:function(a){g.fn.init.call(this,a),this.options=a,this.format=[{tags:["span"]}]},update:function(a){a.data("kendoColorPicker").close()},command:function(a){var b=this.options,c=this.format,e={};return new d.FormatCommand(l(a,{formatter:function(){e[b.domAttr]=a.value;return new s(c,{style:e},b.cssAttr)}}))},willDelayExecution:t,initialize:function(a,b){var c=b.editor,e=this.name;new d.ColorPicker(a,{value:"#000000",change:function(a){g.exec(c,e,a.value)}})}}),x=g.extend({init:function(a){var b=this;g.fn.init.call(b,a),b.format=[{tags:["span"]}],b.finder=new r(b.format,"className")},command:function(a){var b=this.format;return new d.FormatCommand(l(a,{formatter:function(){return new s(b,{className:a.value})}}))},update:function(a,b){var c=a.data("kendoSelectBox");c.close(),c.value(this.finder.getFormat(b))},initialize:function(a,b){var c=b.editor;new d.SelectBox(a,{dataTextField:"text",dataValueField:"value",dataSource:c.options.style,title:c.options.messages.style,change:function(a){g.exec(c,"style",this.value())},highlightFirst:!1}),a.closest(".k-widget").removeClass("k-"+this.name).find("*").andSelf().attr("unselectable","on")}});l(d,{InlineFormatFinder:p,InlineFormatter:q,GreedyInlineFormatFinder:r,GreedyInlineFormatter:s,InlineFormatTool:u,FontTool:v,ColorTool:w,StyleTool:x}),m("style",new d.StyleTool({template:new h({template:f.dropDownListTemplate,title:"Styles"})})),n("bold",[{tags:["strong"]},{tags:["span"],attr:{style:{fontWeight:"bold"}}}]),m("bold",new u({key:"B",ctrl:!0,format:e.bold,template:new h({template:f.buttonTemplate,title:"Bold"})})),n("italic",[{tags:["em"]},{tags:["span"],attr:{style:{fontStyle:"italic"}}}]),m("italic",new u({key:"I",ctrl:!0,format:e.italic,template:new h({template:f.buttonTemplate,title:"Italic"})})),n("underline",[{tags:["span"],attr:{style:{textDecoration:"underline"}}}]),m("underline",new u({key:"U",ctrl:!0,format:e.underline,template:new h({template:f.buttonTemplate,title:"Underline"})})),n("strikethrough",[{tags:["del"]},{tags:["span"],attr:{style:{textDecoration:"line-through"}}}]),m("strikethrough",new u({format:e.strikethrough,template:new h({template:f.buttonTemplate,title:"Strikethrough"})})),n("superscript",[{tags:["sup"]}]),m("superscript",new u({format:e.superscript,template:new h({template:f.buttonTemplate,title:"Superscript"})})),n("subscript",[{tags:["sub"]}]),m("subscript",new u({format:e.subscript,template:new h({template:f.buttonTemplate,title:"Subscript"})})),m("foreColor",new w({cssAttr:"color",domAttr:"color",name:"foreColor",template:new h({template:f.colorPickerTemplate,title:"Color"})})),m("backColor",new w({cssAttr:"background-color",domAttr:"backgroundColor",name:"backColor",template:new h({template:f.colorPickerTemplate,title:"Background Color"})})),m("fontName",new v({cssAttr:"font-family",domAttr:"fontFamily",name:"fontName",defaultValue:[{text:"fontNameInherit",value:"inherit"}],template:new h({template:f.comboBoxTemplate,title:"Font Name"})})),m("fontSize",new v({cssAttr:"font-size",domAttr:"fontSize",name:"fontSize",defaultValue:[{text:"fontSizeInherit",value:"inherit"}],template:new h({template:f.comboBoxTemplate,title:"Font Size"})}))}(jQuery),function(a){var b=window.kendo,c=b.Class,d=a.extend,e=b.ui.editor,f=b.ui.Editor.fn.options.formats,g=e.Dom,h=e.Command,i=e.Tool,j=e.ToolTemplate,k=e.FormatTool,l=e.EditorUtils,m=l.registerTool,n=l.registerFormat,o=e.RangeUtils,p=c.extend({init:function(a){this.format=a},contains:function(a,b){var c,d,e;for(c=0,d=b.length;c<d;c++){e=b[c];if(!e||!g.isAncestorOrSelf(a,e))return!1}return!0},findSuitable:function(b){var c=this.format,d=[],e,f,h;for(e=0,f=b.length;e<f;e++){h=g.ofType(b[e],c[0].tags)?b[e]:g.parentOfType(b[e],c[0].tags);if(!h)return[];a.inArray(h,d)<0&&d.push(h)}for(e=0,f=d.length;e<f;e++)if(this.contains(d[e],d))return[d[e]];return d},findFormat:function(a){var b=this.format,c,d,e,f,h;for(c=0,d=b.length;c<d;c++){e=a,f=b[c].tags,h=b[c].attr;while(e){if(g.ofType(e,f)&&g.attrEquals(e,h))return e;e=e.parentNode}}return null},getFormat:function(a){var b=this,c=function(a){return b.findFormat(g.isDataNode(a)?a.parentNode:a)},d=c(a[0]),e,f;if(!d)return"";for(e=1,f=a.length;e<f;e++)if(d!=c(a[e]))return"";return d.nodeName.toLowerCase()},isFormatted:function(a){for(var b=0,c=a.length;b<c;b++)if(!this.findFormat(a[b]))return!1;return!0}}),q=c.extend({init:function(a,b){this.format=a,this.values=b,this.finder=new p(a)},wrap:function(a,b,c){var d=c.length==1?g.blockParentOrBody(c[0]):g.commonAncestor.apply(null,c);g.isInline(d)&&(d=g.blockParentOrBody(d));var e=g.significantChildNodes(d),f=g.findNodeIndex(e[0]),h=g.create(d.ownerDocument,a,b),i,j;for(i=0;i<e.length;i++){j=e[i];if(g.isBlock(j)){g.attr(j,b),h.childNodes.length&&(g.insertBefore(h,j),h=h.cloneNode(!1)),f=g.findNodeIndex(j)+1;continue}h.appendChild(j)}h.firstChild&&g.insertAt(d,h,f)},apply:function(a){var b=this,c=g.is(a[0],"img")?[a[0]]:b.finder.findSuitable(a),e=c.length?l.formatByName(g.name(c[0]),b.format):b.format[0],f=e.tags[0],h=d({},e.attr,b.values),i,j;if(c.length)for(i=0,j=c.length;i<j;i++)g.attr(c[i],h);else b.wrap(f,h,a)},remove:function(a){var b,c,d,e;for(b=0,c=a.length;b<c;b++)d=this.finder.findFormat(a[b]),d&&(g.ofType(d,["p","img","li"])?(e=l.formatByName(g.name(d),this.format),e.attr.style&&g.unstyle(d,e.attr.style),e.attr.className&&g.removeClass(d,e.attr.className)):g.unwrap(d))},toggle:function(a){var b=this,c=o.nodes(a);b.finder.isFormatted(c)?b.remove(c):b.apply(c)}}),r=c.extend({init:function(a,b){var c=this;c.format=a,c.values=b,c.finder=new p(a)},apply:function(a){var b=this.format,c=g.blockParents(a),d=b[0].tags[0],f,h,i,j,k;if(c.length)for(f=0,h=c.length;f<h;f++)g.is(c[f],"li")?(i=c[f].parentNode,j=new e.ListFormatter(i.nodeName.toLowerCase(),d),k=this.editor.createRange(),k.selectNode(c[f]),j.toggle(k)):g.changeTag(c[f],d);else(new q(b,this.values)).apply(a)},toggle:function(a){var b=o.textNodes(a);b.length||(a.selectNodeContents(a.commonAncestorContainer),b=o.textNodes(a),b.length||(b=g.significantChildNodes(a.commonAncestorContainer))),this.apply(b)}}),s=h.extend({init:function(a){a.formatter=a.formatter(),h.fn.init.call(this,a)}}),t=k.extend({init:function(a){k.fn.init.call(this,d(a,{finder:new p(a.format),formatter:function(){return new q(a.format)}}))}}),u=i.extend({init:function(a){i.fn.init.call(this,a),this.finder=new p([{tags:g.blockElements}])},command:function(a){return new s(d(a,{formatter:function(){return new r([{tags:[a.value]}],{})}}))},update:function(a,b){var c;a.is("select")?c=a.data("kendoSelectBox"):c=a.find("select").data("kendoSelectBox"),c.close(),c.value(this.finder.getFormat(b))},initialize:function(a,b){var c=b.editor,d="formatBlock";new e.SelectBox(a,{dataTextField:"text",dataValueField:"value",dataSource:this.options.items?this.options.items:c.options.formatBlock,title:c.options.messages.formatBlock,change:function(a){i.exec(c,d,this.value())},highlightFirst:!1}),a.closest(".k-widget").removeClass("k-"+d).find("*").andSelf().attr("unselectable","on")}});d(e,{BlockFormatFinder:p,BlockFormatter:q,GreedyBlockFormatter:r,FormatCommand:s,BlockFormatTool:t,FormatBlockTool:u}),m("formatBlock",new u({template:new j({template:l.dropDownListTemplate})})),n("justifyLeft",[{tags:g.blockElements,attr:{style:{textAlign:"left"}}},{tags:["img"],attr:{style:{"float":"left"}}}]),m("justifyLeft",new t({format:f.justifyLeft,template:new j({template:l.buttonTemplate,title:"Justify Left"})})),n("justifyCenter",[{tags:g.blockElements,attr:{style:{textAlign:"center"}}},{tags:["img"],attr:{style:{display:"block",marginLeft:"auto",marginRight:"auto"}}}]),m("justifyCenter",new t({format:f.justifyCenter,template:new j({template:l.buttonTemplate,title:"Justify Center"})})),n("justifyRight",[{tags:g.blockElements,attr:{style:{textAlign:"right"}}},{tags:["img"],attr:{style:{"float":"right"}}}]),m("justifyRight",new t({format:f.justifyRight,template:new j({template:l.buttonTemplate,title:"Justify Right"})})),n("justifyFull",[{tags:g.blockElements,attr:{style:{textAlign:"justify"}}}]),m("justifyFull",new t({format:f.justifyFull,template:new j({template:l.buttonTemplate,title:"Justify Full"})}))}(jQuery),function(a){var b=window.kendo,c=a.extend,d=b.ui.editor,e=d.Dom,f=d.Command,g=d.Tool,h=d.BlockFormatter,i=e.normalize,j=d.RangeUtils,k=d.EditorUtils.registerTool,l=f.extend({init:function(a){this.options=a,f.fn.init.call(this,a)},exec:function(){function v(a){a.firstChild&&e.is(a.firstChild,"br")&&e.remove(a.firstChild),e.isDataNode(a)&&!a.nodeValue&&(a=a.parentNode);if(a&&!e.is(a,"img")){while(a.firstChild&&a.firstChild.nodeType==1)a=a.firstChild;a.innerHTML||(a.innerHTML=l)}}var b=this.getRange(),c=j.documentFromRange(b),d,f,g,k,l=a.browser.msie?"":'<br _moz_dirty="" />',m,n,o,p,q,r="p,h1,h2,h3,h4,h5,h6".split(","),s=e.parentOfType(b.startContainer,r),t=e.parentOfType(b.endContainer,r),u=s&&!t||!s&&t;b.deleteContents(),n=e.create(c,"a"),b.insertNode(n),n.parentNode||(k=b.commonAncestorContainer,k.innerHTML="",k.appendChild(n)),i(n.parentNode),o=e.parentOfType(n,["li"]),p=e.parentOfType(n,"h1,h2,h3,h4,h5,h6".split(",")),o?(q=b.cloneRange(),q.selectNode(o),j.textNodes(q).length||(m=e.create(c,"p"),o.nextSibling&&j.split(q,o.parentNode),e.insertAfter(m,o.parentNode),e.remove(o.parentNode.childNodes.length==1?o.parentNode:o),m.innerHTML=l,g=m)):p&&!n.nextSibling&&(m=e.create(c,"p"),e.insertAfter(m,p),m.innerHTML=l,e.remove(n),g=m),g||(!o&&!p&&(new h([{tags:["p"]}])).apply([n]),b.selectNode(n),d=e.parentOfType(n,[o?"li":p?e.name(p):"p"]),j.split(b,d,u),f=d.previousSibling,e.is(f,"li")&&f.firstChild&&!e.is(f.firstChild,"br")&&(f=f.firstChild),g=d.nextSibling,e.is(g,"li")&&g.firstChild&&!e.is(g.firstChild,"br")&&(g=g.firstChild),e.remove(d),v(f),v(g),i(f)),i(g);if(e.is(g,"img"))b.setStartBefore(g);else{b.selectNodeContents(g);var w=j.textNodes(b)[0];w&&b.selectNodeContents(w)}b.collapse(!0),e.scrollTo(g),j.selectRange(b)}}),m=f.extend({init:function(a){this.options=a,f.fn.init.call(this,a)},exec:function(){var b=this.getRange();b.deleteContents();var c=e.create(j.documentFromRange(b),"br");b.insertNode(c),i(c.parentNode);if(!a.browser.msie&&(!c.nextSibling||e.isWhitespace(c.nextSibling))){var d=c.cloneNode(!0);d.setAttribute("_moz_dirty",""),e.insertAfter(d,c)}b.setStartAfter(c),b.collapse(!0),j.selectRange(b)}});c(d,{ParagraphCommand:l,NewLineCommand:m}),k("insertLineBreak",new g({key:13,shift:!0,command:m})),k("insertParagraph",new g({key:13,command:l}))}(jQuery),function(a){var b=window.kendo,c=b.Class,d=a.extend,e=b.ui.editor,f=e.Dom,g=e.RangeUtils,h=e.EditorUtils,i=e.Command,j=e.ToolTemplate,k=e.FormatTool,l=e.BlockFormatFinder,m=g.textNodes,n=e.EditorUtils.registerTool,o=l.extend({init:function(a){this.tag=a;var b=this.tags=[a=="ul"?"ol":"ul",a];l.fn.init.call(this,[{tags:b}])},isFormatted:function(a){var b=[],c;for(var d=0;d<a.length;d++)(c=this.findFormat(a[d]))&&f.name(c)==this.tag&&b.push(c);if(b.length<1)return!1;if(b.length!=a.length)return!1;for(d=0;d<b.length;d++){if(b[d].parentNode!=c.parentNode)break;if(b[d]!=c)return!1}return!0},findSuitable:function(a){var b=f.parentOfType(a[0],this.tags);if(b&&f.name(b)==this.tag)return b;return null}}),p=c.extend({init:function(a,b){var c=this;c.finder=new o(a),c.tag=a,c.unwrapTag=b},wrap:function(a,b){var c=f.create(a.ownerDocument,"li"),d,e;for(d=0;d<b.length;d++){e=b[d];if(f.is(e,"li")){a.appendChild(e);continue}if(f.is(e,"ul")||f.is(e,"ol")){while(e.firstChild)a.appendChild(e.firstChild);continue}if(f.is(e,"td")){while(e.firstChild)c.appendChild(e.firstChild);a.appendChild(c),e.appendChild(a),a=a.cloneNode(!1),c=c.cloneNode(!1);continue}c.appendChild(e),f.isBlock(e)&&(a.appendChild(c),f.unwrap(e),c=c.cloneNode(!1))}c.firstChild&&a.appendChild(c)},containsAny:function(a,b){for(var c=0;c<b.length;c++)if(f.isAncestorOrSelf(a,b[c]))return!0;return!1},suitable:function(a,b){if(a.className=="k-marker"){var c=a.nextSibling;if(c&&f.isBlock(c))return!1;c=a.previousSibling;if(c&&f.isBlock(c))return!1}return this.containsAny(a,b)||f.isInline(a)||a.nodeType==3},split:function(b){var c=m(b),d,e;if(c.length){d=f.parentOfType(c[0],["li"]),e=f.parentOfType(c[c.length-1],["li"]),b.setStartBefore(d),b.setEndAfter(e);for(var h=0,i=c.length;h<i;h++){var j=this.finder.findFormat(c[h]);if(j){var k=a(j).parents("ul,ol");k[0]?g.split(b,k.last()[0],!0):g.split(b,j,!0)}}}},merge:function(a,b){var c=b.previousSibling,d;while(c&&(c.className=="k-marker"||c.nodeType==3&&f.isWhitespace(c)))c=c.previousSibling;if(c&&f.name(c)==a){while(b.firstChild)c.appendChild(b.firstChild);f.remove(b),b=c}d=b.nextSibling;while(d&&(d.className=="k-marker"||d.nodeType==3&&f.isWhitespace(d)))d=d.nextSibling;if(d&&f.name(d)==a){while(b.lastChild)d.insertBefore(b.lastChild,d.firstChild);f.remove(b)}},applyOnSection:function(b,c){function j(){g.push(this)}var d=this.tag,e;c.length==1?e=f.parentOfType(c[0],["ul","ol"]):e=f.commonAncestor.apply(null,c),e||(e=f.parentOfType(c[0],["td"])||c[0].ownerDocument.body),f.isInline(e)&&(e=f.blockParentOrBody(e));var g=[],h=this.finder.findSuitable(c);h||(h=(new o(d=="ul"?"ol":"ul")).findSuitable(c));var i=f.significantChildNodes(e);i.length||(i=c),/table|tbody/.test(f.name(e))&&(i=a.map(c,function(a){return f.parentOfType(a,["td"])}));for(var k=0;k<i.length;k++){var l=i[k],m=f.name(l);this.suitable(l,c)&&(!h||!f.isAncestorOrSelf(h,l))&&(!h||m!="ul"&&m!="ol"?g.push(l):(a.each(l.childNodes,j),f.remove(l)))}g.length==i.length&&e!=c[0].ownerDocument.body&&!/table|tbody|tr|td/.test(f.name(e))&&(g=[e]),h||(h=f.create(e.ownerDocument,d),f.insertBefore(h,g[0])),this.wrap(h,g),f.is(h,d)||f.changeTag(h,d),this.merge(d,h)},apply:function(a){var b=0,c=[],d,e,g;do g=f.parentOfType(a[b],["td","body"]),!d||g!=d?(d&&c.push({section:d,nodes:e}),e=[a[b]],d=g):e.push(a[b]),b++;while(b<a.length);c.push({section:d,nodes:e});for(b=0;b<c.length;b++)this.applyOnSection(c[b].section,c[b].nodes)},unwrap:function(b){var c=b.ownerDocument.createDocumentFragment(),d=this.unwrapTag,e,g,h,i;for(g=b.firstChild;g;g=g.nextSibling){h=f.create(b.ownerDocument,d||"p");while(g.firstChild)i=g.firstChild,f.isBlock(i)?(h.firstChild&&(c.appendChild(h),h=f.create(b.ownerDocument,d||"p")),c.appendChild(i)):h.appendChild(i);h.firstChild&&c.appendChild(h)}e=a(b).parents("ul,ol"),e[0]?(f.insertAfter(c,e.last()[0]),e.last().remove()):f.insertAfter(c,b),f.remove(b)},remove:function(a){var b;for(var c=0,d=a.length;c<d;c++)b=this.finder.findFormat(a[c]),b&&this.unwrap(b)},toggle:function(a){var b=this,c=m(a),d=a.commonAncestorContainer;if(!c.length){a.selectNodeContents(d),c=m(a);if(!c.length){var e=d.ownerDocument.createTextNode("");a.startContainer.appendChild(e),c=[e],a.selectNode(e.parentNode)}}b.finder.isFormatted(c)?(b.split(a),b.remove(c)):b.apply(c)}}),q=i.extend({init:function(a){a.formatter=new p(a.tag),i.fn.init.call(this,a)}}),r=k.extend({init:function(a){this.options=a,k.fn.init.call(this,d(a,{finder:new o(a.tag)}))},command:function(a){return new q(d(a,{tag:this.options.tag}))}});d(e,{ListFormatFinder:o,ListFormatter:p,ListCommand:q,ListTool:r}),n("insertUnorderedList",new r({tag:"ul",template:new j({template:h.buttonTemplate,title:"Remove Link"})})),n("insertOrderedList",new r({tag:"ol",template:new j({template:h.buttonTemplate,title:"Remove Link"})}))}(jQuery),function(a,b){var c=window.kendo,d=c.Class,e=a.extend,f=c.ui.editor,g=f.Dom,h=f.RangeUtils,i=f.EditorUtils,j=f.Command,k=f.Tool,l=f.ToolTemplate,m=f.InlineFormatter,n=f.InlineFormatFinder,o=h.textNodes,p=f.EditorUtils.registerTool,q=d.extend({findSuitable:function(a){return g.parentOfType(a,["a"])}}),r=d.extend({init:function(){this.finder=new q},apply:function(a,b){var c=o(a);if(b.innerHTML){var d=h.getMarkers(a),e=h.documentFromRange(a);a.deleteContents();var f=g.create(e,"a",b);a.insertNode(f),d.length>1&&(g.insertAfter(d[d.length-1],f),g.insertAfter(d[1],f),g[c.length>0?"insertBefore":"insertAfter"](d[0],f))}else{var i=new m([{tags:["a"]}],b);i.finder=this.finder,i.apply(c)}}}),s=j.extend({init:function(a){a.formatter={toggle:function(a){(new m([{tags:["a"]}])).remove(o(a))}},this.options=a,j.fn.init.call(this,a)}}),t=j.extend({init:function(a){var b=this;b.options=a,j.fn.init.call(b,a),b.attributes=null,b.async=!0,b.formatter=new r},exec:function(){function j(a){a.preventDefault(),n.destroy(),g.windowFromDocument(h.documentFromRange(b)).focus(),f.releaseRange(b)}function i(c){var d=a("#k-editor-link-url",n.element).val();if(d&&d!="http://"){f.attributes={href:d};var g=a("#k-editor-link-title",n.element).val();g&&(f.attributes.title=g);var h=a("#k-editor-link-text",n.element).val();h!==e&&(f.attributes.innerHTML=h||d);var i=a("#k-editor-link-target",n.element).is(":checked");i&&(f.attributes.target="_blank"),f.formatter.apply(b,f.attributes)}j(c),f.change&&f.change()}var b=this.getRange(),c=b.collapsed;b=this.lockRange(!0);var d=o(b),e=null,f=this,k=d.length?f.formatter.finder.findSuitable(d[0]):null,l=d.length<=1||d.length==2&&c,m='<div class="k-editor-dialog"><ol><li class="k-form-text-row"><label for="k-editor-link-url">Web address</label><input type="text" class="k-input" id="k-editor-link-url"/></li>'+(l?'<li class="k-form-text-row"><label for="k-editor-link-text">Text</label><input type="text" class="k-input" id="k-editor-link-text"/></li>':"")+'<li class="k-form-text-row"><label for="k-editor-link-title">Tooltip</label><input type="text" class="k-input" id="k-editor-link-title"/></li>'+'<li class="k-form-checkbox-row"><input type="checkbox" id="k-editor-link-target"/><label for="k-editor-link-target">Open link in new window</label></li>'+"</ol>"+'<div class="k-button-wrapper">'+'<button class="k-dialog-insert k-button">Insert</button>'+" or "+'<a href="#" class="k-dialog-close k-link">Close</a>'+"</div>"+"</div>",n=a(m).appendTo(document.body).kendoWindow(a.extend({},this.editor.options.dialogOptions,{title:"Insert link",close:j})).hide().find(".k-dialog-insert").click(i).end().find(".k-dialog-close").click(j).end().find(".k-form-text-row input").keydown(function(a){a.keyCode==13?i(a):a.keyCode==27&&j(a)}).end().find("#k-editor-link-url").val(k?k.getAttribute("href",2):"http://").end().find("#k-editor-link-text").val(d.length>0?d.length==1?d[0].nodeValue:d[0].nodeValue+d[1].nodeValue:"").end().find("#k-editor-link-title").val(k?k.title:"").end().find("#k-editor-link-target").attr("checked",k?k.target=="_blank":!1).end().show().data("kendoWindow").center();l&&d.length>0&&(e=a("#k-editor-link-text",n.element).val()),a("#k-editor-link-url",n.element).focus().select()},redo:function(){var a=this,b=a.lockRange(!0);a.formatter.apply(b,a.attributes),a.releaseRange(b)}}),u=k.extend({init:function(b){this.options=b,this.finder=new n([{tags:["a"]}]),k.fn.init.call(this,a.extend(b,{command:s}))},initialize:function(a){a.attr("unselectable","on").addClass("k-state-disabled")},update:function(a,b){a.toggleClass("k-state-disabled",!this.finder.isFormatted(b)).removeClass("k-state-hover")}});e(c.ui.editor,{LinkFormatFinder:q,LinkFormatter:r,UnlinkCommand:s,LinkCommand:t,UnlinkTool:u}),p("createLink",new k({key:"K",ctrl:!0,command:t,template:new l({template:i.buttonTemplate,title:"Create Link"})})),p("unlink",new u({key:"K",ctrl:!0,shift:!0,template:new l({template:i.buttonTemplate,title:"Remove Link"})}))}(jQuery),function(a,b){var c=window.kendo,d=a.extend,e=c.ui.editor,f=e.EditorUtils,g=e.Dom,h=f.registerTool,i=e.ToolTemplate,j=e.RangeUtils,k=e.Command,l=c.keys,m="Insert Image",n="#k-editor-image-url",o="#k-editor-image-title",p=k.extend({init:function(a){var b=this;k.fn.init.call(b,a),b.async=!0,b.attributes={}},insertImage:function(a,b){var c=this.attributes;if(c.src&&c.src!="http://"){if(!a){a=g.create(j.documentFromRange(b),"img",c),a.onload=a.onerror=function(){a.removeAttribute("complete"),a.removeAttribute("width"),a.removeAttribute("height")},b.deleteContents(),b.insertNode(a),b.setStartAfter(a),b.setEndAfter(a),j.selectRange(b);return!0}g.attr(a,c)}return!1},redo:function(){var a=this,b=a.lockRange();a.insertImage(j.image(b),b)||a.releaseRange(b)},exec:function(){function q(a){a.keyCode==l.ENTER?k(a):a.keyCode==l.ESC&&p(a)}function p(a){a.preventDefault(),i.destroy(),g.windowFromDocument(j.documentFromRange(c)).focus(),e||b.releaseRange(c)}function k(d){b.attributes={src:a(n,i.element).val(),alt:a(o,i.element).val()},e=b.insertImage(f,c),p(d),b.change&&b.change()}var b=this,c=b.lockRange(),e=!1,f=j.image(c),h,i;h='<div class="k-editor-dialog"><ol><li class="k-form-text-row"><label for="k-editor-image-url">Web address</label><input type="text" class="k-input" id="k-editor-image-url"/></li><li class="k-form-text-row"><label for="k-editor-image-title">Tooltip</label><input type="text" class="k-input" id="k-editor-image-title"/></li></ol><div class="k-button-wrapper"><button class="k-dialog-insert k-button">Insert</button> or <a href="#" class="k-dialog-close k-link">Close</a></div></div>',i=a(h).appendTo(document.body).kendoWindow(d({},b.editor.options.dialogOptions,{title:m,close:p,activate:function(){}})).hide().find(".k-dialog-insert").click(k).end().find(".k-dialog-close").click(p).end().find(".k-form-text-row input").keydown(q).end().find(n).val(f?f.getAttribute("src",2):"http://").end().find(o).val(f?f.alt:"").end().show().data("kendoWindow").center(),a(n,i.element).focus().select()}});c.ui.editor.ImageCommand=p,h("insertImage",new e.Tool({command:p,template:new i({template:f.buttonTemplate,title:m})}))}(jQuery),function(a,b){var c=window.kendo,d=c.ui.Widget,e=c.ui.DropDownList,f=c.ui.editor,g=f.Dom,h="change",i="k-state-selected",j="."+i,k=".k-selected-color",l="unselectable",m="background-color",n=c.keys,o=c.template('<div class="k-colorpicker-popup"><ul class="k-reset"># for(var i = 0; i < colors.length; i++) { #<li class="k-item #= colors[i] == value ? "k-state-selected" : "" #"><div style="background-color:\\##= colors[i] #"></div></li># } #</ul></div>'),p=d.extend({init:function(b,c){var e=this;d.fn.init.call(e,b,c),b=e.element,c=e.options,e._value=c.value,e.popup=a(o({colors:c.colors,value:c.value.substring(1)})).kendoPopup({anchor:b,toggleTarget:b.find(".k-icon")}).delegate(".k-item","click",function(b){e.select(a(b.currentTarget).find("div").css(m))}).find("*").attr(l,"on").end().data("kendoPopup"),b.attr("tabIndex",0).keydown(function(a){e.keydown(a)}).focus(function(){b.css("outline","1px dotted #000")}).blur(function(){b.css("outline","")}).delegate(".k-tool-icon","click",function(){e.select()}).find("*").attr(l,"on"),e._value&&b.find(k).css(m,e._value)},options:{name:"ColorPicker",colors:"000000,7f7f7f,880015,ed1c24,ff7f27,fff200,22b14c,00a2e8,3f48cc,a349a4,ffffff,c3c3c3,b97a57,ffaec9,ffc90e,efe4b0,b5e61d,99d9ea,7092be,c8bfe7".split(","),value:null},events:[h],select:function(a){var b=this;a?(a=g.toHex(a),b.trigger(h,{value:a})||(b.value(a),b.close())):b.trigger(h,{value:b._value})},open:function(){this.popup.open()},close:function(){this.popup.close()},toggle:function(){this.popup.toggle()},keydown:function(a){var b=this,c=b.popup.element,d=b.popup.visible(),e,f,g,h=!1,k=a.keyCode;k==n.DOWN?(d?(e=c.find(j),e[0]?f=e.next():f=c.find("li:first"),f[0]&&(e.removeClass(i),f.addClass(i))):b.open(),h=!0):k==n.UP?(d&&(e=c.find(j),g=e.prev(),g[0]&&(e.removeClass(i),g.addClass(i))),h=!0):k==n.TAB||k==n.RIGHT||k==n.LEFT?b.close():k==n.ENTER&&(c.find(j).click(),h=!0),h&&a.preventDefault()},value:function(a){var c=this;if(a===b)return c._value;a=g.toHex(a),c._value=a,c.element.find(k).css(m,a)}}),q=e.extend({init:function(a,b){var c=this;e.fn.init.call(c,a,b),c.value(c.options.title)},options:{name:"SelectBox"},value:function(a){var c=this,d=e.fn.value.call(c,a);if(a===b)return d;a!==e.fn.value.call(c)&&(c.text(c.options.title),c._current.removeClass("k-state-selected"),c.current(null),c._oldIndex=c.selectedIndex=-1)}});c.ui.editor.ColorPicker=p,c.ui.editor.SelectBox=q}(jQuery),function(a,b){function q(a,c){var d=g.name(a)!="td"?"marginLeft":"paddingLeft";if(c===b)return a.style[d]||0;c>0?a.style[d]=c+"px":(a.style[d]="",a.style.cssText||a.removeAttribute("style"))}var c=window.kendo,d=c.Class,e=a.extend,f=c.ui.editor,g=f.Dom,h=f.EditorUtils,i=h.registerTool,j=f.Command,k=f.Tool,l=f.ToolTemplate,m=f.RangeUtils,n=g.blockElements,o=f.BlockFormatFinder,p=f.BlockFormatter,r=d.extend({init:function(){this.finder=new o([{tags:g.blockElements}])},apply:function(b){var c=this.finder.findSuitable(b),d=[],e,f,h,i,j;if(c.length){for(e=0,f=c.length;e<f;e++)g.is(c[e],"li")?a(c[e]).index()?a.inArray(c[e].parentNode,d)<0&&d.push(c[e]):d.push(c[e].parentNode):d.push(c[e]);while(d.length){h=d.shift();if(g.is(h,"li")){i=h.parentNode,j=a(h).prev("li");var k=j.find("ul,ol").last(),l=a(h).children("ul,ol")[0];if(l&&j[0])k[0]?(k.append(h),k.append(a(l).children()),g.remove(l)):(j.append(l),l.insertBefore(h,l.firstChild));else{l=j.children("ul,ol")[0],l||(l=g.create(h.ownerDocument,g.name(i)),j.append(l));while(h&&h.parentNode==i)l.appendChild(h),h=d.shift()}}else{var m=parseInt(q(h),10)+30;q(h,m);for(var n=0;n<d.length;n++)a.contains(h,d[n])&&d.splice(n,1)}}}else{var o=new p([{tags:"p"}],{style:{marginLeft:30}});o.apply(b)}},remove:function(b){var c=this.finder.findSuitable(b),d,e,f,g,h,i,j,k;for(e=0,f=c.length;e<f;e++){j=a(c[e]);if(j.is("li")){g=j.parent(),h=g.parent();if(h.is("li,ul,ol")&&!q(g[0])){if(d&&a.contains(d,h[0]))continue;i=j.nextAll("li"),i.length&&a(g[0].cloneNode(!1)).appendTo(j).append(i),h.is("li")?j.insertAfter(h):j.appendTo(h),g.children("li").length||g.remove();continue}if(d==g[0])continue;d=g[0]}else d=c[e];k=parseInt(q(d),10)-30,q(d,k)}}}),s=j.extend({init:function(a){a.formatter={toggle:function(a){(new r).apply(m.nodes(a))}},j.fn.init.call(this,a)}}),t=j.extend({init:function(a){a.formatter={toggle:function(a){(new r).remove(m.nodes(a))}},j.fn.init.call(this,a)}}),u=k.extend({init:function(a){k.fn.init.call(this,e(a,{command:t})),this.finder=new o([{tags:n}])},initialize:function(a){a.attr("unselectable","on").addClass("k-state-disabled")},update:function(b,c){var d=this.finder.findSuitable(c),e,f,h,i;for(h=0,i=d.length;h<i;h++){e=q(d[h]),e||(f=a(d[h]).parents("ul,ol").length,e=g.is(d[h],"li")&&(f>1||q(d[h].parentNode))||g.ofType(d[h],["ul","ol"])&&f>0);if(e){b.removeClass("k-state-disabled");return}}b.addClass("k-state-disabled").removeClass("k-state-hover")}});e(f,{IndentFormatter:r,IndentCommand:s,OutdentCommand:t,OutdentTool:u}),i("indent",new k({command:s,template:new l({template:h.buttonTemplate,title:"Indent"})})),i("outdent",new u({template:new l({template:h.buttonTemplate,title:"Outdent"})}))}(jQuery),function(a,b){var c=window.kendo,d=a.extend,e=c.ui.editor,f=e.Dom,g=e.RangeUtils,h=e.EditorUtils,i=e.Command,j=e.Tool,k=e.ToolTemplate,l=i.extend({init:function(a){var b=this;b.options=a,i.fn.init.call(b,a),b.attributes=null,b.async=!0},exec:function(){function m(a){a.preventDefault(),h.data("kendoWindow").destroy(),f.windowFromDocument(g.documentFromRange(e)).focus()}function k(a){c.value(h.find(j).val()),m(a),b.change&&b.change()}var b=this,c=b.editor,e=c.getRange(),h=a(l.template).appendTo(document.body),i=l.indent(c.value()),j=".k-editor-textarea";h.kendoWindow(d({},c.options.dialogOptions,{title:"View HTML",close:m})).hide().find(j).val(i).end().find(".k-dialog-update").click(k).end().find(".k-dialog-close").click(m).end().show().data("kendoWindow").center(),h.find(j).focus()}});d(l,{template:"<div class='k-editor-dialog'><textarea class='k-editor-textarea k-input'></textarea><div class='k-button-wrapper'><button class='k-dialog-update k-button'>Update</button> or <a href='#' class='k-dialog-close k-link'>Close</a></div></div>",indent:function(a){return a.replace(/<\/(p|li|ul|ol|h[1-6]|table|tr|td|th)>/ig,"</$1>\n").replace(/<(ul|ol)([^>]*)><li/ig,"<$1$2>\n<li").replace(/<br \/>/ig,"<br />\n").replace(/\n$/,"")}}),c.ui.editor.ViewHtmlCommand=l,e.EditorUtils.registerTool("viewHtml",new j({command:l,template:new k({template:h.buttonTemplate,title:"View HTML"})}))}(jQuery),function(a){var b=window.kendo,c=b.Class,d=a.extend,e=b.ui.editor,f=e.RangeUtils,g=e.Marker,h=c.extend({init:function(a){this.editor=a,this.formats=[]},apply:function(a){if(!!this.hasPending()){var b=new g;b.addCaret(a);var c=a.startContainer.childNodes[a.startOffset],e=c.previousSibling;e.nodeValue||(e=e.previousSibling),a.setStart(e,e.nodeValue.length-1),b.add(a);if(!f.textNodes(a).length){b.remove(a),a.collapse(!0),this.editor.selectRange(a);return}var h=b.end.previousSibling.previousSibling,i,j=this.formats;for(var k=0;k<j.length;k++){i=j[k];var l=i.command(d({range:a},i.options.params));l.editor=this.editor,l.exec(),a.selectNode(h)}b.remove(a),h.parentNode&&(a.setStart(h,1),a.collapse(!0)),this.clear(),this.editor.selectRange(a)}},hasPending:function(){return this.formats.length>0},isPending:function(a){return!!this.getPending(a)},getPending:function(a){var b=this.formats;for(var c=0;c<b.length;c++)if(b[c].name==a)return b[c];return},toggle:function(a){var b=this.formats;for(var c=0;c<b.length;c++)if(b[c].name==a.name){b[c].params&&b[c].params.value!=a.params.value?b[c].params.value=a.params.value:b.splice(c,1);return}b.push(a)},clear:function(){this.formats=[]}});d(e,{PendingFormats:h})}(jQuery);
|
11
|
+
(function(e,t){var n=window.kendo,i=n.Class,o=n.ui.Widget,r=n.support.mobileOS,a=n.support.browser,s=e.extend,l=n.deepExtend,d=".kendoEditor",c=n.keys,u=i.extend({init:function(e){var t=this;t.options=e},getHtml:function(){var e=this.options;return n.template(e.template)({cssClass:e.cssClass,tooltip:e.title,initialValue:e.initialValue})}}),f={select:function(e){e.trigger("select",{})},editorWrapperTemplate:'<table cellspacing="4" cellpadding="0" class="k-widget k-editor k-header" role="presentation"><tbody><tr role="presentation"><td class="k-editor-toolbar-wrap" role="presentation"><ul class="k-editor-toolbar" role="toolbar"></ul></td></tr><tr><td class="k-editable-area"></td></tr></tbody></table>',buttonTemplate:'<li class="k-editor-button" role="presentation"><a href="" role="button" class="k-tool-icon #= cssClass #" unselectable="on" title="#= tooltip #">#= tooltip #</a></li>',colorPickerTemplate:'<li class="k-editor-colorpicker" role="presentation"><div class="k-widget k-colorpicker k-header #= cssClass #" role="combobox" title="#=tooltip#"><span class="k-tool-icon"><span class="k-selected-color"></span></span><span class="k-icon k-i-arrow-s"></span></div></li>',comboBoxTemplate:'<li class="k-editor-combobox"><select title="#= tooltip #" class="#= cssClass #"></select></li>',dropDownListTemplate:'<li class="k-editor-selectbox"><select title="#= tooltip #" class="#= cssClass #"></select></li>',separatorTemplate:'<li class="k-separator"></li>',focusable:".k-colorpicker,a.k-tool-icon:not(.k-state-disabled),.k-selectbox, .k-combobox .k-input",wrapTextarea:function(t){var n=t.width(),i=t.height(),o=f.editorWrapperTemplate,r=e(o).insertBefore(t).width(n).height(i),a=r.find(".k-editable-area");return t.appendTo(a).addClass("k-content k-raw-content").hide(),t.closest(".k-editor")},renderTools:function(t,i){var o,r,a,l,d,c={},u=t._nativeTools,p=e(t.element).closest(".k-editor").find(".k-editor-toolbar");if(i)for(a=0;i.length>a;a++)o=i[a],d=null,e.isPlainObject(o)?o.name&&t.tools[o.name]?(e.extend(t.tools[o.name].options,o),c[o.name]=t.tools[o.name],d=c[o.name].options):(d=s({cssClass:"k-i-custom",type:"button",tooltip:""},o),d.name&&(d.cssClass="k-"+("custom"==d.name?"i-custom":d.name)),d.template||"button"==d.type&&(d.template=f.buttonTemplate)):t.tools[o]&&(c[o]=t.tools[o],d=c[o].options),d&&(l=d.template,l&&(l.getHtml?l=l.getHtml():(e.isFunction(l)||(l=n.template(l)),l=l(d)),0!==l.indexOf("<li")&&(l="<li class='k-editor-template'>"+l+"</li>"),r=e(l).appendTo(p),"button"==d.type&&d.exec&&r.find(".k-tool-icon").click(e.proxy(d.exec,t.element[0]))));for(a=0;u.length>a;a++)c[u[a]]||(c[u[a]]=t.tools[u[a]]);t.options.tools=c},decorateStyleToolItems:function(t){var i=t.data.closest(".k-editor").find(".k-style").data("kendoSelectBox");if(i){var o=i.dataSource.view();i.list.find(".k-item").each(function(i,r){var a=e(r),s=a.text(),l=n.ui.editor.Dom.inlineStyle(t.data.data("kendoEditor").document,"span",{className:o[i].value});a.html('<span unselectable="on" style="display:block;'+l+'">'+s+"</span>")})}},createContentElement:function(t,i){var o,r,a,s=n.support.isRtl(t)?"direction:rtl;":"";return t.hide(),o=e("<iframe />",{src:'javascript:""',frameBorder:"0"}).css("display","").addClass("k-content").insertBefore(t)[0],r=o.contentWindow||o,i.length>0&&e(o).one("load",t,f.decorateStyleToolItems),a=r.document||o.contentDocument,a.open(),a.write("<!DOCTYPE html><html><head><meta charset='utf-8' /><style>html,body{padding:0;margin:0;font-family:Verdana,Geneva,sans-serif;background:#fff;height:100%;min-height:100%;}html{font-size:100%}body{font-size:.75em;line-height:1.5;padding-top:1px;margin-top:-1px;word-wrap: break-word;-webkit-nbsp-mode: space;-webkit-line-break: after-white-space;"+s+"}"+"h1{font-size:2em;margin:.67em 0}h2{font-size:1.5em}h3{font-size:1.16em}h4{font-size:1em}h5{font-size:.83em}h6{font-size:.7em}"+"p{margin:0 0 1em;padding:0 .2em}.k-marker{display:none;}.k-paste-container{position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden}"+"ul,ol{padding-left:2.5em}"+"a{color:#00a}"+"code{font-size:1.23em}"+"</style>"+e.map(i,function(e){return"<link rel='stylesheet' href='"+e+"'>"}).join("")+"</head><body contenteditable='true'></body></html>"),a.close(),r},initializeContentElement:function(n){var i=!0;n.window=f.createContentElement(e(n.textarea),n.options.stylesheets),n.document=n.window.contentDocument||n.window.document,n.body=n.document.body,e(n.document).on("keydown"+d,function(e){if(e.keyCode===c.F10)return setTimeout(function(){var e="tabIndex",t=n.wrapper,i=t.attr(e);t.attr(e,i||0).focus().find("li:has("+m+")").first().focus(),i||0===i||t.removeAttr(e)},100),e.preventDefault(),t;var o=n.keyboard.toolFromShortcut(n.options.tools,e);if(o)return e.preventDefault(),/undo|redo/.test(o)||n.keyboard.endTyping(!0),n.exec(o),!1;if(n.keyboard.isTypingKey(e)&&n.pendingFormats.hasPending())if(i)i=!1;else{var r=n.getRange();n.pendingFormats.apply(r),n.selectRange(r)}n.keyboard.clearTimeout(),n.keyboard.keydown(e)}).on("keyup"+d,function(t){var o=[8,9,33,34,35,36,37,38,39,40,40,45,46];if((e.inArray(t.keyCode,o)>-1||65==t.keyCode&&t.ctrlKey&&!t.altKey&&!t.shiftKey)&&(n.pendingFormats.clear(),p(n)),n.keyboard.isTypingKey(t)){if(n.pendingFormats.hasPending()){var r=n.getRange();n.pendingFormats.apply(r),n.selectRange(r)}}else i=!0;n.keyboard.keyup(t)}).on("mousedown"+d,function(t){n.pendingFormats.clear();var i=e(t.target);!a.gecko&&2==t.which&&i.is("a[href]")&&window.open(i.attr("href"),"_new")}).on("mouseup"+d,function(){p(n)}),e(n.window).on("blur"+d,function(){var e=n.textarea.value,t=n.encodedValue();n.update(),t!=e&&n.trigger("change")}),e(n.body).on("cut"+d+" paste"+d,function(e){n.clipboard["on"+e.type](e)})},formatByName:function(t,n){for(var i=0;n.length>i;i++)if(e.inArray(t,n[i].tags)>=0)return n[i]},registerTool:function(e,t){var n=k.fn._tools;n[e]=t,n[e].options&&n[e].options.template&&(n[e].options.template.options.cssClass="k-"+e)},registerFormat:function(e,t){n.ui.Editor.fn.options.formats[e]=t},createDialog:function(t,i,o){var r=n.support.isRtl(i.wrapper),a=e(t).appendTo(document.body).kendoWindow(o);return r&&a.closest(".k-window").addClass("k-rtl"),a}},p=f.select,m=f.focusable,h=f.wrapTextarea,g=f.renderTools,v=f.initializeContentElement,y={bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",superscript:"Superscript",subscript:"Subscript",justifyCenter:"Center text",justifyLeft:"Align text left",justifyRight:"Align text right",justifyFull:"Justify",insertUnorderedList:"Insert unordered list",insertOrderedList:"Insert ordered list",indent:"Indent",outdent:"Outdent",createLink:"Insert hyperlink",unlink:"Remove hyperlink",insertImage:"Insert image",insertHtml:"Insert HTML",fontName:"Select font family",fontNameInherit:"(inherited font)",fontSize:"Select font size",fontSizeInherit:"(inherited size)",formatBlock:"Format",foreColor:"Color",backColor:"Background color",style:"Styles",emptyFolder:"Empty Folder",uploadFile:"Upload",orderBy:"Arrange by:",orderBySize:"Size",orderByName:"Name",invalidFileType:'The selected file "{0}" is not valid. Supported file types are {1}.',deleteFile:'Are you sure you want to delete "{0}"?',overwriteFile:'A file with name "{0}" already exists in the current directory. Do you want to overwrite it?',directoryNotFound:"A directory with this name was not found.",imageWebAddress:"Web address",imageAltText:"Alternate text",dialogInsert:"Insert",dialogButtonSeparator:"or",dialogCancel:"Cancel"},b=!r||r.ios&&r.flatVersion>=500||!r.ios&&document.documentElement.contentEditable!==t,k=o.extend({init:function(t,i){function r(t){var n=e.grep(t.className.split(" "),function(e){return!/^k-(widget|tool-icon|state-hover|header|combobox|dropdown|selectbox|colorpicker)$/i.test(e)});return n[0]?n[0].substring(n[0].lastIndexOf("-")+1):"custom"}function a(e,t){if(!t.key)return e;var n=e+" (";return t.ctrl&&(n+="Ctrl + "),t.shift&&(n+="Shift + "),t.alt&&(n+="Alt + "),n+=t.key+")"}if(b){var s,u,f=this,p=n.ui.editor;o.fn.init.call(f,t,i),f.tools=l({},n.ui.Editor.fn._tools),f.options=l({},f.options,i),t=e(t),t.closest("form").on("submit"+d,function(){f.update()});for(var k in f.tools)f.tools[k].name=k.toLowerCase();f.textarea=t.attr("autocomplete","off")[0],s=f.wrapper=h(t),f.textarea.id&&s.find(".k-editor-toolbar").attr("aria-controls",f.textarea.id),g(f,f.options.tools),v(f),f.keyboard=new p.Keyboard([new p.TypingHandler(f),new p.SystemHandler(f)]),f.clipboard=new p.Clipboard(this),f.pendingFormats=new p.PendingFormats(this),f.undoRedoStack=new p.UndoRedoStack,u=i&&i.value?i.value:t.val().replace(/[\r\n\v\f\t ]+/gi," "),f.value(u);var w=".k-editor-toolbar > li > *, .k-editor-toolbar > li select",C=".k-editor-button .k-tool-icon",x=C+":not(.k-state-disabled)",T=C+".k-state-disabled";s.find(".k-combobox .k-input").keydown(function(t){var n=e(this).closest(".k-combobox").data("kendoComboBox"),i=t.keyCode;i==c.RIGHT||i==c.LEFT?n.close():i==c.DOWN&&(n.dropDown.isOpened()||(t.stopImmediatePropagation(),n.open()))}),s.on("mouseenter"+d,x,function(){e(this).addClass("k-state-hover")}).on("mouseleave"+d,x,function(){e(this).removeClass("k-state-hover")}).on("mousedown"+d,C,!1).on("keydown"+d,m,function(t){var n,i=e(this).closest("li"),o="li:has("+m+")",r=t.keyCode;if(r==c.RIGHT)n=i.nextAll(o).first().find(m);else if(r==c.LEFT)n=i.prevAll(o).first().find(m);else if(r==c.ESC)n=f;else if(r==c.TAB&&!t.ctrlKey&&!t.altKey)if(t.shiftKey){if(n=i.prevAll(o).first().find(m),!n.length)return;t.preventDefault()}else t.preventDefault(),n=i.nextAll(o).first().find(m),n.length||(n=f);n&&n.focus()}).on("click"+d,x,function(e){e.preventDefault(),e.stopPropagation(),f.exec(r(this))}).on("click"+d,T,function(e){e.preventDefault()}).find(w).each(function(){var t=r(this),n=f.options,i=n.tools[t],o=n.messages[t],s=e(this);if(i){if("fontSize"==t||"fontName"==t){var l=n.messages[t+"Inherit"]||y[t+"Inherit"];s.find("input").val(l).end().find("span.k-input").text(l).end()}i.initialize(s,{title:a(o,i),editor:f})}}),f.bind("select",function(){var t=f.getRange(),n=p.RangeUtils.textNodes(t);n.length||(n=[t.startContainer]),s.find(w).each(function(){var t=f.options.tools[r(this)];t&&t.update(e(this),n,f.pendingFormats)})}),f._DOMNodeInsertedHandler=function(e){f._DOMNodeInserted(e)},f._endTypingHandler=function(){f._endTyping()},e(document).on("DOMNodeInserted",f._DOMNodeInsertedHandler).on("mousedown",f._endTypingHandler),n.notify(f)}},_endTyping:function(){var e=this;try{e.keyboard.isTypingInProgress()&&e.keyboard.endTyping(!0),e.selectionRestorePoint||(e.selectionRestorePoint=new n.ui.editor.RestorePoint(e.getRange()))}catch(t){}},_DOMNodeInserted:function(t){var n=this,i=n.wrapper;(e.contains(t.target,i[0])||i[0]==t.target)&&(n.textarea.value=n.value(),i.find("iframe").remove(),v(n),n.value(n.textarea.value))},events:["select","change","execute","error","paste","keydown","keyup"],options:{name:"Editor",messages:y,formats:{},encoded:!0,stylesheets:[],dialogOptions:{modal:!0,resizable:!1,draggable:!0,animation:!1},fontName:[{text:"Arial",value:"Arial,Helvetica,sans-serif"},{text:"Courier New",value:"'Courier New',Courier,monospace"},{text:"Georgia",value:"Georgia,serif"},{text:"Impact",value:"Impact,Charcoal,sans-serif"},{text:"Lucida Console",value:"'Lucida Console',Monaco,monospace"},{text:"Tahoma",value:"Tahoma,Geneva,sans-serif"},{text:"Times New Roman",value:"'Times New Roman',Times,serif"},{text:"Trebuchet MS",value:"'Trebuchet MS',Helvetica,sans-serif"},{text:"Verdana",value:"Verdana,Geneva,sans-serif"}],fontSize:[{text:"1 (8pt)",value:"xx-small"},{text:"2 (10pt)",value:"x-small"},{text:"3 (12pt)",value:"small"},{text:"4 (14pt)",value:"medium"},{text:"5 (18pt)",value:"large"},{text:"6 (24pt)",value:"x-large"},{text:"7 (36pt)",value:"xx-large"}],formatBlock:[{text:"Paragraph",value:"p"},{text:"Quotation",value:"blockquote"},{text:"Heading 1",value:"h1"},{text:"Heading 2",value:"h2"},{text:"Heading 3",value:"h3"},{text:"Heading 4",value:"h4"},{text:"Heading 5",value:"h5"},{text:"Heading 6",value:"h6"}],tools:["bold","italic","underline","strikethrough","fontName","fontSize","foreColor","backColor","justifyLeft","justifyCenter","justifyRight","justifyFull","insertUnorderedList","insertOrderedList","indent","outdent","formatBlock","createLink","unlink","insertImage"]},destroy:function(){var t=this;o.fn.destroy.call(t),e(t.window).add(t.document).add(t.wrapper).add(t.element.closest("form")).off(d),e(document).off("DOMNodeInserted",t._DOMNodeInsertedHandler).off("mousedown",t._endTypingHandler),n.destroy(t.wrapper)},_nativeTools:["insertLineBreak","insertParagraph","redo","undo","insertHtml"],_tools:{undo:{options:{key:"Z",ctrl:!0}},redo:{options:{key:"Y",ctrl:!0}}},tools:{},value:function(i){var o=this.body,r=n.ui.editor.Dom,s=n.ui.editor.Serializer.domToXhtml(o);if(i===t)return s;if(i!=s){if(this.pendingFormats.clear(),i=(i||"").replace(/<!\[CDATA\[(.*)?\]\]>/g,"<!--[CDATA[$1]]-->").replace(/<script([^>]*)>(.*)?<\/script>/gi,"<telerik:script $1>$2</telerik:script>").replace(/(<\/?img[^>]*>)[\r\n\v\f\t ]+/gi,"$1"),a.msie||(i=i.replace(/<p([^>]*)>(\s*)?<\/p>/gi,'<p $1><br _moz_dirty="" /></p>')),a.msie&&9>parseInt(a.version,10)){i="<br/>"+i;var l="originalsrc",d="originalhref";i=i.replace(/href\s*=\s*(?:'|")?([^'">\s]*)(?:'|")?/,d+'="$1"'),i=i.replace(/src\s*=\s*(?:'|")?([^'">\s]*)(?:'|")?/,l+'="$1"'),o.innerHTML=i,r.remove(o.firstChild),e(o).find("telerik\\:script,script,link,img,a").each(function(){var e=this;e[d]&&(e.setAttribute("href",e[d]),e.removeAttribute(d)),e[l]&&(e.setAttribute("src",e[l]),e.removeAttribute(l))})}else o.innerHTML=i,a.msie&&(r.normalize(o),setTimeout(function(){var e,t,n,i=o.getElementsByTagName("ol");for(e=0;i.length>e;e++)t=i[e],n=t.getAttribute("start"),t.setAttribute("start",1),n?t.setAttribute("start",n):t.removeAttribute(n)},1));this.selectionRestorePoint=null,this.update()}},focus:function(){this.window.focus()},update:function(e){this.textarea.value=e||this.options.encoded?this.encodedValue():this.value()},encodedValue:function(){return n.ui.editor.Dom.encode(this.value())},createRange:function(e){return n.ui.editor.RangeUtils.createRange(e||this.document)},getSelection:function(){return n.ui.editor.SelectionUtils.selectionFromDocument(this.document)},selectRange:function(e){this.focus();var t=this.getSelection();t.removeAllRanges(),t.addRange(e)},getRange:function(){var e=this.getSelection(),t=e.rangeCount>0?e.getRangeAt(0):this.createRange(),n=this.document;return t.startContainer!=n||t.endContainer!=n||t.startOffset||t.endOffset||(t.setStart(this.body,0),t.collapse(!0)),t},selectedHtml:function(){return n.ui.editor.Serializer.domToXhtml(this.getRange().cloneContents())},paste:function(e){this.clipboard.paste(e)},exec:function(n,i){var o,r,a,l,d=this,c="";n=n.toLowerCase(),d.keyboard.isTypingInProgress()||(d.focus(),o=d.getRange(),r=d.document.body);for(a in d.options.tools)if(a.toLowerCase()==n){c=d.options.tools[a];break}if(c){if(o=d.getRange(),!/undo|redo/i.test(n)&&c.willDelayExecution(o))return l=e.extend({},c),e.extend(l.options,{params:i}),d.pendingFormats.toggle(l),p(d),t;var u=c.command?c.command(s({range:o},i)):null;if(d.trigger("execute",{name:n,command:u}),/undo|redo/i.test(n))d.undoRedoStack[n]();else if(u&&(u.managesUndoRedo||d.undoRedoStack.push(u),u.editor=d,u.exec(),u.async))return u.change=e.proxy(function(){p(d)},d),t;p(d)}}});n.ui.plugin(k);var w=i.extend({init:function(e){this.options=e},initialize:function(e,t){e.attr({unselectable:"on",title:t.title})},command:function(e){return new this.options.command(e)},update:function(){},willDelayExecution:function(){return!1}});w.exec=function(e,t,n){e.exec(t,{value:n})};var C=w.extend({init:function(e){w.fn.init.call(this,e)},command:function(e){var t=this;return new n.ui.editor.FormatCommand(s(e,{formatter:t.options.formatter}))},update:function(e,t,n){var i=n.isPending(this.name),o=this.options.finder.isFormatted(t),r=i?!o:o;e.toggleClass("k-state-active",r),e.attr("aria-pressed",r)}});f.registerTool("separator",new w({template:new u({template:f.separatorTemplate})})),s(n.ui,{editor:{ToolTemplate:u,EditorUtils:f,Tool:w,FormatTool:C}})})(window.kendo.jQuery),function(e){function t(e){var t,n,i={};for(t=0,n=e.length;n>t;t++)i[e[t]]=!0;return i}var n=window.kendo,i=e.map,o=e.extend,r=n.support.browser,a="style",s="float",l="cssFloat",d="styleFloat",c="class",u="k-marker",f=t("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed".split(",")),p="div,p,h1,h2,h3,h4,h5,h6,address,applet,blockquote,button,center,dd,dir,dl,dt,fieldset,form,frameset,hr,iframe,isindex,li,map,menu,noframes,noscript,object,ol,pre,script,table,tbody,td,tfoot,th,thead,tr,ul".split(","),m=t(p),h="span,em,a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,strike,strong,sub,sup,textarea,tt,u,var".split(","),g=t(h),v=t("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected".split(",")),y=function(e){1==e.nodeType&&e.normalize()};r.msie&&parseInt(r.version,10)>=8&&(y=function(e){if(1==e.nodeType&&e.firstChild)for(var t=e.firstChild,n=t;;){if(n=n.nextSibling,!n)break;3==n.nodeType&&3==t.nodeType&&(n.nodeValue=t.nodeValue+n.nodeValue,R.remove(t)),t=n}});var b=/^\s+$/,k=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i,w=/&/g,C=/</g,x=/>/g,T=/\u00a0/g,N=/\ufeff/g,S="color,padding-left,padding-right,padding-top,padding-bottom,background-color,background-attachment,background-image,background-position,background-repeat,border-top-style,border-top-width,border-top-color,border-bottom-style,border-bottom-width,border-bottom-color,border-left-style,border-left-width,border-left-color,border-right-style,border-right-width,border-right-color,font-family,font-size,font-style,font-variant,font-weight,line-height".split(","),R={findNodeIndex:function(e){for(var t=0;;){if(e=e.previousSibling,!e)break;t++}return t},isDataNode:function(e){return e&&null!==e.nodeValue&&null!==e.data},isAncestorOf:function(t,n){try{return!R.isDataNode(t)&&(e.contains(t,R.isDataNode(n)?n.parentNode:n)||n.parentNode==t)}catch(i){return!1}},isAncestorOrSelf:function(e,t){return R.isAncestorOf(e,t)||e==t},findClosestAncestor:function(e,t){if(R.isAncestorOf(e,t))for(;t&&t.parentNode!=e;)t=t.parentNode;return t},getNodeLength:function(e){return R.isDataNode(e)?e.length:e.childNodes.length},splitDataNode:function(e,t){for(var n=e.cloneNode(!1),i="",o=e;o.nextSibling&&3==o.nextSibling.nodeType&&o.nextSibling.nodeValue;)i+=o.nextSibling.nodeValue,o=o.nextSibling;e.deleteData(t,e.length),n.deleteData(0,t),n.nodeValue+=i,R.insertAfter(n,e)},attrEquals:function(t,n){for(var i in n){var o=t[i];if(i==s&&(o=t[e.support.cssFloat?l:d]),"object"==typeof o){if(!R.attrEquals(o,n[i]))return!1}else if(o!=n[i])return!1}return!0},blockParentOrBody:function(e){return R.parentOfType(e,p)||e.ownerDocument.body},blockParents:function(t){var n,i,o=[];for(n=0,i=t.length;i>n;n++){var r=R.parentOfType(t[n],R.blockElements);r&&0>e.inArray(r,o)&&o.push(r)}return o},windowFromDocument:function(e){return e.defaultView||e.parentWindow},normalize:y,blockElements:p,inlineElements:h,empty:f,fillAttrs:v,toHex:function(e){var t=k.exec(e);return t?"#"+i(t.slice(1),function(e){return e=parseInt(e,10).toString(16),e.length>1?e:"0"+e}).join(""):e},encode:function(e){return e.replace(w,"&").replace(C,"<").replace(x,">").replace(T," ")},name:function(e){return e.nodeName.toLowerCase()},significantChildNodes:function(t){return e.grep(t.childNodes,function(e){return 3!=e.nodeType||!R.isWhitespace(e)})},lastTextNode:function(e){var t=null;if(3==e.nodeType)return e;for(var n=e.lastChild;n;n=n.previousSibling)if(t=R.lastTextNode(n))return t;return t},is:function(e,t){return R.name(e)==t},isMarker:function(e){return e.className==u},isWhitespace:function(e){return b.test(e.nodeValue)},isBlock:function(e){return m[R.name(e)]},isEmpty:function(e){return f[R.name(e)]},isInline:function(e){return g[R.name(e)]},scrollTo:function(t){var n,i,o=t.ownerDocument.body,r=e(R.isDataNode(t)?t.parentNode:t),a=R.windowFromDocument(t.ownerDocument).innerHeight;"br"==R.name(r[0])&&(r=r.parent()),n=r.offset().top,i=r[0].offsetHeight,i+n>o.scrollTop+a&&(o.scrollTop=i+n-a)},insertAt:function(e,t,n){e.insertBefore(t,e.childNodes[n]||null)},insertBefore:function(e,t){return t.parentNode?t.parentNode.insertBefore(e,t):t},insertAfter:function(e,t){return t.parentNode.insertBefore(e,t.nextSibling)},remove:function(e){e.parentNode.removeChild(e)},trim:function(e){for(var t=e.childNodes.length-1;t>=0;t--){var n=e.childNodes[t];R.isDataNode(n)?(n.nodeValue.replace(N,"").length||R.remove(n),R.isWhitespace(n)&&R.insertBefore(n,e)):n.className!=u&&(R.trim(n),n.childNodes.length||R.isEmpty(n)||R.remove(n))}return e},parentOfType:function(e,t){do e=e.parentNode;while(e&&!R.ofType(e,t));return e},ofType:function(t,n){return e.inArray(R.name(t),n)>=0},changeTag:function(e,t){var n,i,o,r,s,l=R.create(e.ownerDocument,t),d=e.attributes;for(n=0,i=d.length;i>n;n++)s=d[n],s.specified&&(o=s.nodeName,r=s.nodeValue,o==c?l.className=r:o==a?l.style.cssText=e.style.cssText:l.setAttribute(o,r));for(;e.firstChild;)l.appendChild(e.firstChild);return R.insertBefore(l,e),R.remove(e),l},wrap:function(e,t){return R.insertBefore(t,e),t.appendChild(e),t},unwrap:function(e){for(var t=e.parentNode;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)},create:function(e,t,n){return R.attr(e.createElement(t),n)},attr:function(e,t){return t=o({},t),t&&a in t&&(R.style(e,t.style),delete t.style),o(e,t)},style:function(t,n){e(t).css(n||{})},unstyle:function(t,n){for(var i in n)i==s&&(i=e.support.cssFloat?l:d),t.style[i]="";""===t.style.cssText&&t.removeAttribute(a)},inlineStyle:function(t,n,o){var a,s=e(R.create(t,n,o));return t.body.appendChild(s[0]),a=i(S,function(e){return r.msie&&"line-height"==e&&"1px"==s.css(e)?"line-height:1.5":e+":"+s.css(e)}).join(";"),s.remove(),a},removeClass:function(t,n){var i,o,r=" "+t.className+" ",a=n.split(" ");for(i=0,o=a.length;o>i;i++)r=r.replace(" "+a[i]+" "," ");r=e.trim(r),r.length?t.className=r:t.removeAttribute(c)},commonAncestor:function(){var e,t,n,i,o,r=arguments.length,a=[],s=1/0,l=null;if(!r)return null;if(1==r)return arguments[0];for(e=0;r>e;e++){for(t=[],n=arguments[e];n;)t.push(n),n=n.parentNode;a.push(t.reverse()),s=Math.min(s,t.length)}if(1==r)return a[0][0];for(e=0;s>e;e++){for(i=a[0][e],o=1;r>o;o++)if(i!=a[o][e])return l;l=i}return l}};n.ui.editor.Dom=R}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=n.ui.editor,o=i.Dom,r=e.extend,a="xx-small,x-small,small,medium,large,x-large,xx-large".split(","),s=/"/g,l=/<br[^>]*>/i,d=/<p><\/p>/i,c=/([\w|\-]+)\s*:\s*([^;]+);?/i,u={domToXhtml:function(n){function i(n){var i,r,a,l=[],d=n.attributes,u=e.trim;if(o.is(n,"img")){var p=n.style.width,m=n.style.height,h=e(n);p&&(h.attr("width",parseInt(p,10)),o.unstyle(n,{width:t})),m&&(h.attr("height",parseInt(m,10)),o.unstyle(n,{height:t}))}for(r=0,a=d.length;a>r;r++){i=d[r];var g=i.nodeName;(i.specified||"value"==g&&!n.value||"type"==g&&"text"==i.nodeValue)&&0>g.indexOf("_moz")&&"complete"!=g&&"altHtml"!=g&&l.push(i)}if(l.length)for(l.sort(function(e,t){return e.nodeName>t.nodeName?1:t.nodeName>e.nodeName?-1:0}),r=0,a=l.length;a>r;r++){i=l[r];var v=i.nodeName,y=i.nodeValue;if(f.push(" "),f.push(v),f.push('="'),"style"==v)for(var b=u(y||n.style.cssText).split(";"),k=0,w=b.length;w>k;k++){var C=b[k];if(C.length){var x=c.exec(C),T=u(x[1].toLowerCase()),N=u(x[2]);if("font-size-adjust"==T||"font-stretch"==T)continue;T.indexOf("color")>=0&&(N=o.toHex(N)),T.indexOf("font")>=0&&(N=N.replace(s,"'")),f.push(T),f.push(":"),f.push(N),f.push(";")}}else"src"==v||"href"==v?f.push(n.getAttribute(v,2)):f.push(o.fillAttrs[v]?v:y);f.push('"')}}function r(e,t){for(var n=e.firstChild;n;n=n.nextSibling)u(n,t)}function u(n,a){var s,l,d,c,u,m=n.nodeType;if(1==m){if(s=o.name(n),!s||(n.attributes._moz_dirty||n.attributes._moz_editor_bogus_node)&&o.is(n,"br")||"k-marker"==n.className)return;if(l=p[s])return l.start(n),r(n),l.end(n),t;f.push("<"),f.push(s),i(n),o.empty[s]?f.push(" />"):(f.push(">"),r(n,a||o.is(n,"pre")),f.push("</"),f.push(s),f.push(">"))}else 3==m?(c=n.nodeValue,!a&&e.support.leadingWhitespace&&(d=n.parentNode,u=n.previousSibling,u||(u=(o.isInline(d)?d:n).previousSibling),(!u||""===u.innerHTML||o.isBlock(u))&&(c=c.replace(/^[\r\n\v\f\t ]+/,"")),c=c.replace(/ +/," ")),f.push(o.encode(c))):4==m?(f.push("<![CDATA["),f.push(n.data),f.push("]]>")):8==m&&(0>n.data.indexOf("[CDATA[")?(f.push("<!--"),f.push(n.data),f.push("-->")):(f.push("<!"),f.push(n.data),f.push(">")))}var f=[],p={"telerik:script":{start:function(e){f.push("<script"),i(e),f.push(">")},end:function(){f.push("</script>")}},b:{start:function(){f.push("<strong>")},end:function(){f.push("</strong>")}},i:{start:function(){f.push("<em>")},end:function(){f.push("</em>")}},u:{start:function(){f.push('<span style="text-decoration:underline;">')},end:function(){f.push("</span>")}},iframe:{start:function(e){f.push("<iframe"),i(e),f.push(">")},end:function(){f.push("</iframe>")}},font:{start:function(e){f.push('<span style="');var t=e.getAttribute("color"),n=a[e.getAttribute("size")],i=e.getAttribute("face");t&&(f.push("color:"),f.push(o.toHex(t)),f.push(";")),i&&(f.push("font-face:"),f.push(i),f.push(";")),n&&(f.push("font-size:"),f.push(n),f.push(";")),f.push('">')},end:function(){f.push("</span>")}}};return r(n),f=f.join(""),""===f.replace(l,"").replace(d,"")?"":f}};r(i,{Serializer:u})}(window.kendo.jQuery),function(e){function t(e,t,n,i){if(e==t)return i-n;for(var o=t;o&&o.parentNode!=e;)o=o.parentNode;if(o)return f(o)-n;for(o=e;o&&o.parentNode!=t;)o=o.parentNode;if(o)return i-f(o)-1;for(var r=u.commonAncestor(e,t),a=e;a&&a.parentNode!=r;)a=a.parentNode;a||(a=r);for(var s=t;s&&s.parentNode!=r;)s=s.parentNode;return s||(s=r),a==s?0:f(s)-f(a)}function n(e,n){function i(e){try{return 0>t(e.startContainer,e.endContainer,e.startOffset,e.endOffset)}catch(n){return!0}}i(e)&&(n?(e.commonAncestorContainer=e.endContainer=e.startContainer,e.endOffset=e.startOffset):(e.commonAncestorContainer=e.startContainer=e.endContainer,e.startOffset=e.endOffset),e.collapsed=!0)}function i(e){e.collapsed=e.startContainer==e.endContainer&&e.startOffset==e.endOffset;for(var t=e.startContainer;t&&t!=e.endContainer&&!u.isAncestorOf(t,e.endContainer);)t=t.parentNode;e.commonAncestorContainer=t}function o(e,t,n){var i=t[n?"startContainer":"endContainer"],o=t[n?"startOffset":"endOffset"],r=0,a=p(i)?i:i.childNodes[o]||null,s=p(i)?i.parentNode:i;(3==i.nodeType||4==i.nodeType)&&(r=o);var l=s.insertBefore(u.create(t.ownerDocument,"a"),a),d=t.ownerDocument.body.createTextRange();d.moveToElementText(l),u.remove(l),d[n?"moveStart":"moveEnd"]("character",r),d.collapse(!1),e.setEndPoint(n?"StartToStart":"EndToStart",d)}function r(e,t,n){var i=u.create(t.ownerDocument,"a"),o=e.duplicate();o.collapse(n);var r=o.parentElement();do r.insertBefore(i,i.previousSibling),o.moveToElementText(i);while(o.compareEndPoints(n?"StartToStart":"StartToEnd",e)>0&&i.previousSibling);o.setEndPoint(n?"EndToStart":"EndToEnd",e);var a=i.nextSibling;return a?(u.remove(i),p(a)?t[n?"setStart":"setEnd"](a,o.text.length):t[n?"setStartBefore":"setEndBefore"](a),void 0):(a=i.previousSibling,a&&p(a)?(t.setEnd(a,a.nodeValue.length),u.remove(i)):(t.selectNodeContents(r),u.remove(i),t.endOffset-=1),void 0)}var a=window.kendo,s=a.Class,l=e.extend,d=a.ui.editor,c=a.support.browser,u=d.Dom,f=u.findNodeIndex,p=u.isDataNode,m=u.findClosestAncestor,h=u.getNodeLength,g=u.normalize,v={selectionFromWindow:function(e){return c.msie&&9>c.version?new k(e.document):e.getSelection()},selectionFromRange:function(e){var t=N.documentFromRange(e);return v.selectionFromDocument(t)},selectionFromDocument:function(e){return v.selectionFromWindow(u.windowFromDocument(e))}},y=s.extend({init:function(t){e.extend(this,{ownerDocument:t,startContainer:t,endContainer:t,commonAncestorContainer:t,startOffset:0,endOffset:0,collapsed:!0})},setStart:function(e,t){this.startContainer=e,this.startOffset=t,i(this),n(this,!0)},setEnd:function(e,t){this.endContainer=e,this.endOffset=t,i(this),n(this,!1)},setStartBefore:function(e){this.setStart(e.parentNode,f(e))},setStartAfter:function(e){this.setStart(e.parentNode,f(e)+1)},setEndBefore:function(e){this.setEnd(e.parentNode,f(e))},setEndAfter:function(e){this.setEnd(e.parentNode,f(e)+1)},selectNode:function(e){this.setStartBefore(e),this.setEndAfter(e)},selectNodeContents:function(e){this.setStart(e,0),this.setEnd(e,e[1===e.nodeType?"childNodes":"nodeValue"].length)},collapse:function(e){var t=this;e?t.setEnd(t.startContainer,t.startOffset):t.setStart(t.endContainer,t.endOffset)},deleteContents:function(){var e=this,t=e.cloneRange();e.startContainer!=e.commonAncestorContainer&&e.setStartAfter(m(e.commonAncestorContainer,e.startContainer)),e.collapse(!0),function n(e){for(;e.next();)e.hasPartialSubtree()?n(e.getSubtreeIterator()):e.remove()}(new b(t))},cloneContents:function(){var e=N.documentFromRange(this);return function t(n){for(var i,o=e.createDocumentFragment();i=n.next();)i=i.cloneNode(!n.hasPartialSubtree()),n.hasPartialSubtree()&&i.appendChild(t(n.getSubtreeIterator())),o.appendChild(i);return o}(new b(this))},extractContents:function(){var e=this,t=e.cloneRange();e.startContainer!=e.commonAncestorContainer&&e.setStartAfter(m(e.commonAncestorContainer,e.startContainer)),e.collapse(!0);var n=N.documentFromRange(e);return function i(t){for(var o,r=n.createDocumentFragment();o=t.next();)t.hasPartialSubtree()?(o=o.cloneNode(!1),o.appendChild(i(t.getSubtreeIterator()))):t.remove(e.originalRange),r.appendChild(o);return r}(new b(t))},insertNode:function(e){var t=this;p(t.startContainer)?(t.startOffset!=t.startContainer.nodeValue.length&&u.splitDataNode(t.startContainer,t.startOffset),u.insertAfter(e,t.startContainer)):u.insertAt(t.startContainer,e,t.startOffset),t.setStart(t.startContainer,t.startOffset)},cloneRange:function(){return e.extend(new y(this.ownerDocument),{startContainer:this.startContainer,endContainer:this.endContainer,commonAncestorContainer:this.commonAncestorContainer,startOffset:this.startOffset,endOffset:this.endOffset,collapsed:this.collapsed,originalRange:this})},toString:function(){var e=this.startContainer.nodeName,t=this.endContainer.nodeName;return["#text"==e?this.startContainer.nodeValue:e,"(",this.startOffset,") : ","#text"==t?this.endContainer.nodeValue:t,"(",this.endOffset,")"].join("")}}),b=s.extend({init:function(t){if(e.extend(this,{range:t,_current:null,_next:null,_end:null}),!t.collapsed){var n=t.commonAncestorContainer;this._next=t.startContainer!=n||p(t.startContainer)?m(n,t.startContainer):t.startContainer.childNodes[t.startOffset],this._end=t.endContainer!=n||p(t.endContainer)?m(n,t.endContainer).nextSibling:t.endContainer.childNodes[t.endOffset]}},hasNext:function(){return!!this._next},next:function(){var e=this,t=e._current=e._next;return e._next=e._current&&e._current.nextSibling!=e._end?e._current.nextSibling:null,p(e._current)&&(e.range.endContainer==e._current&&(t=t.cloneNode(!0),t.deleteData(e.range.endOffset,t.length-e.range.endOffset)),e.range.startContainer==e._current&&(t=t.cloneNode(!0),t.deleteData(0,e.range.startOffset))),t},traverse:function(e){function t(){return i._current=i._next,i._next=i._current&&i._current.nextSibling!=i._end?i._current.nextSibling:null,i._current}for(var n,i=this;n=t();)i.hasPartialSubtree()?i.getSubtreeIterator().traverse(e):e(n);return n},remove:function(e){var t,n,i,o=this,r=o.range.startContainer==o._current,a=o.range.endContainer==o._current;if(p(o._current)&&(r||a))t=r?o.range.startOffset:0,n=a?o.range.endOffset:o._current.length,i=n-t,e&&(r||a)&&(o._current==e.startContainer&&e.startOffset>=t&&(e.startOffset-=i),o._current==e.endContainer&&e.endOffset>=n&&(e.endOffset-=i)),o._current.deleteData(t,i);else{var s=o._current.parentNode;if(e&&(o.range.startContainer==s||o.range.endContainer==s)){var l=f(o._current);
|
12
|
+
s==e.startContainer&&e.startOffset>=l&&(e.startOffset-=1),s==e.endContainer&&e.endOffset>l&&(e.endOffset-=1)}u.remove(o._current)}},hasPartialSubtree:function(){return!p(this._current)&&(u.isAncestorOrSelf(this._current,this.range.startContainer)||u.isAncestorOrSelf(this._current,this.range.endContainer))},getSubtreeIterator:function(){var e=this,t=e.range.cloneRange();return t.selectNodeContents(e._current),u.isAncestorOrSelf(e._current,e.range.startContainer)&&t.setStart(e.range.startContainer,e.range.startOffset),u.isAncestorOrSelf(e._current,e.range.endContainer)&&t.setEnd(e.range.endContainer,e.range.endOffset),new b(t)}}),k=s.extend({init:function(e){this.ownerDocument=e,this.rangeCount=1},addRange:function(e){var t=this.ownerDocument.body.createTextRange();o(t,e,!1),o(t,e,!0),t.select()},removeAllRanges:function(){this.ownerDocument.selection.empty()},getRangeAt:function(){var e,t,n=new y(this.ownerDocument),i=this.ownerDocument.selection;try{if(e=i.createRange(),t=e.item?e.item(0):e.parentElement(),t.ownerDocument!=this.ownerDocument)return n}catch(o){return n}if("Control"==i.type)n.selectNode(e.item(0));else{r(e,n,!0),r(e,n,!1),9==n.startContainer.nodeType&&n.setStart(n.endContainer,n.startOffset),9==n.endContainer.nodeType&&n.setEnd(n.startContainer,n.endOffset),0===e.compareEndPoints("StartToEnd",e)&&n.collapse(!1);var a=n.startContainer,s=n.endContainer,l=this.ownerDocument.body;if(!(n.collapsed||0!==n.startOffset||n.endOffset!=h(n.endContainer)||a==s&&p(a)&&a.parentNode==l)){for(var d=!1,c=!1;0===f(a)&&a==a.parentNode.firstChild&&a!=l;)a=a.parentNode,d=!0;for(;f(s)==h(s.parentNode)-1&&s==s.parentNode.lastChild&&s!=l;)s=s.parentNode,c=!0;a==l&&s==l&&d&&c&&(n.setStart(a,0),n.setEnd(s,h(l)))}}return n}}),w=s.extend({init:function(e){this.enumerate=function(){function t(e){if(u.is(e,"img")||3==e.nodeType&&!u.isWhitespace(e))n.push(e);else for(e=e.firstChild;e;)t(e),e=e.nextSibling}var n=[];return new b(e).traverse(t),n}}}),C=s.extend({init:function(e){var t=this;t.range=e,t.rootNode=N.documentFromRange(e),t.body=t.rootNode.body,t.html=t.body.innerHTML,t.startContainer=t.nodeToPath(e.startContainer),t.endContainer=t.nodeToPath(e.endContainer),t.startOffset=t.offset(e.startContainer,e.startOffset),t.endOffset=t.offset(e.endContainer,e.endOffset)},index:function(e){for(var t=0,n=e.nodeType;e=e.previousSibling;){var i=e.nodeType;(3!=i||n!=i)&&t++,n=i}return t},offset:function(e,t){if(3==e.nodeType)for(;(e=e.previousSibling)&&3==e.nodeType;)t+=e.nodeValue.length;return t},nodeToPath:function(e){for(var t=[];e!=this.rootNode;)t.push(this.index(e)),e=e.parentNode;return t},toRangePoint:function(e,t,n,i){for(var o=this.rootNode,r=n.length,a=i;r--;)o=o.childNodes[n[r]];for(;3==o.nodeType&&a>o.nodeValue.length;)a-=o.nodeValue.length,o=o.nextSibling;e[t?"setStart":"setEnd"](o,a)},toRange:function(){var e=this,t=e.range.cloneRange();return e.toRangePoint(t,!0,e.startContainer,e.startOffset),e.toRangePoint(t,!1,e.endContainer,e.endOffset),t}}),x=s.extend({init:function(){this.caret=null},addCaret:function(e){var t=this;return t.caret=u.create(N.documentFromRange(e),"span",{className:"k-marker"}),e.insertNode(t.caret),e.selectNode(t.caret),t.caret},removeCaret:function(e){var t=this,n=t.caret.previousSibling,i=0;n&&(i=p(n)?n.nodeValue.length:f(n));var o=t.caret.parentNode,r=n?f(n):0;u.remove(t.caret),g(o);var a=o.childNodes[r];if(p(a))e.setStart(a,i);else if(a){var s=u.lastTextNode(a);s?e.setStart(s,s.nodeValue.length):e[n?"setStartAfter":"setStartBefore"](a)}else c.msie||o.innerHTML||(o.innerHTML='<br _moz_dirty="" />'),e.selectNodeContents(o);e.collapse(!0)},add:function(e,t){var n=this;t&&e.collapsed&&(n.addCaret(e),e=N.expand(e));var i=e.cloneRange();return i.collapse(!1),n.end=u.create(N.documentFromRange(e),"span",{className:"k-marker"}),i.insertNode(n.end),i=e.cloneRange(),i.collapse(!0),n.start=n.end.cloneNode(!0),i.insertNode(n.start),e.setStartBefore(n.start),e.setEndAfter(n.end),g(e.commonAncestorContainer),e},remove:function(e){var t,n,i,o=this,r=o.start,a=o.end;for(g(e.commonAncestorContainer);!r.nextSibling&&r.parentNode;)r=r.parentNode;for(;!a.previousSibling&&a.parentNode;)a=a.parentNode;t=r.previousSibling&&3==r.previousSibling.nodeType&&r.nextSibling&&3==r.nextSibling.nodeType,n=a.previousSibling&&3==a.previousSibling.nodeType&&a.nextSibling&&3==a.nextSibling.nodeType,i=t&&n,r=r.nextSibling,a=a.previousSibling;var s=!1,l=!1;if(r==o.end&&(l=!!o.start.previousSibling,r=a=o.start.previousSibling||o.end.nextSibling,s=!0),u.remove(o.start),u.remove(o.end),!r||!a)return e.selectNodeContents(e.commonAncestorContainer),e.collapse(!0),void 0;var d=s?p(r)?r.nodeValue.length:r.childNodes.length:0,c=p(a)?a.nodeValue.length:a.childNodes.length;if(3==r.nodeType)for(;r.previousSibling&&3==r.previousSibling.nodeType;)r=r.previousSibling,d+=r.nodeValue.length;if(3==a.nodeType)for(;a.previousSibling&&3==a.previousSibling.nodeType;)a=a.previousSibling,c+=a.nodeValue.length;for(var m=f(r),h=r.parentNode,v=f(a),y=a.parentNode,b=r;b.previousSibling;b=b.previousSibling)3==b.nodeType&&3==b.previousSibling.nodeType&&m--;for(var k=a;k.previousSibling;k=k.previousSibling)3==k.nodeType&&3==k.previousSibling.nodeType&&v--;g(h),3==r.nodeType&&(r=h.childNodes[m]),g(y),3==a.nodeType&&(a=y.childNodes[v]),s?(3==r.nodeType?e.setStart(r,d):e[l?"setStartAfter":"setStartBefore"](r),e.collapse(!0)):(3==r.nodeType?e.setStart(r,d):e.setStartBefore(r),3==a.nodeType?e.setEnd(a,c):e.setEndAfter(a)),o.caret&&o.removeCaret(e)}}),T=/[\u0009-\u000d]|\u0020|\u00a0|\ufeff|\.|,|;|:|!|\(|\)|\?/,N={nodes:function(e){var t=N.textNodes(e);return t.length||(e.selectNodeContents(e.commonAncestorContainer),t=N.textNodes(e),t.length||(t=u.significantChildNodes(e.commonAncestorContainer))),t},textNodes:function(e){return new w(e).enumerate()},documentFromRange:function(e){var t=e.startContainer;return 9==t.nodeType?t:t.ownerDocument},createRange:function(e){return c.msie&&9>c.version?new y(e):e.createRange()},selectRange:function(e){var t=N.image(e);t&&(e.setStartAfter(t),e.setEndAfter(t));var n=v.selectionFromRange(e);n.removeAllRanges(),n.addRange(e)},split:function(e,t,n){function i(i){var o=e.cloneRange();o.collapse(i),o[i?"setStartBefore":"setEndAfter"](t);var r=o.extractContents();n&&(r=u.trim(r)),u[i?"insertBefore":"insertAfter"](r,t)}i(!0),i(!1)},getMarkers:function(e){var t=[];return new b(e).traverse(function(e){"k-marker"==e.className&&t.push(e)}),t},image:function(e){var t=[];return new b(e).traverse(function(e){u.is(e,"img")&&t.push(e)}),1==t.length?t[0]:void 0},expand:function(e){var t=e.cloneRange(),n=t.startContainer.childNodes[0===t.startOffset?0:t.startOffset-1],i=t.endContainer.childNodes[t.endOffset];if(!p(n)||!p(i))return t;var o=n.nodeValue,r=i.nodeValue;if(!o||!r)return t;var a=o.split("").reverse().join("").search(T),s=r.search(T);return a&&s?(s=-1==s?r.length:s,a=-1==a?0:o.length-a,t.setStart(n,a),t.setEnd(i,s),t):t},isExpandable:function(e){var t=e.startContainer,n=N.documentFromRange(e);if(t==n||t==n.body)return!1;var i=e.cloneRange(),o=t.nodeValue;if(!o)return!1;var r=o.substring(0,i.startOffset),a=o.substring(i.startOffset),s=0,l=0;return r&&(s=r.split("").reverse().join("").search(T)),a&&(l=a.search(T)),s&&l}};l(d,{SelectionUtils:v,W3CRange:y,RangeIterator:b,W3CSelection:k,RangeEnumerator:w,RestorePoint:C,Marker:x,RangeUtils:N})}(window.kendo.jQuery),function(e){var t=window.kendo,n=t.Class,i=t.ui.editor,o=i.EditorUtils,r=o.registerTool,a=i.Dom,s=i.RangeUtils,l=s.selectRange,d=i.Tool,c=i.ToolTemplate,u=i.RestorePoint,f=i.Marker,p=e.extend,m=n.extend({init:function(e){var t=this;t.options=e,t.restorePoint=new u(e.range),t.marker=new f,t.formatter=e.formatter},getRange:function(){return this.restorePoint.toRange()},lockRange:function(e){return this.marker.add(this.getRange(),e)},releaseRange:function(e){this.marker.remove(e),l(e)},undo:function(){var e=this.restorePoint;e.body.innerHTML=e.html,l(e.toRange())},redo:function(){this.exec()},exec:function(){var e=this,t=e.lockRange(!0);e.formatter.editor=e.editor,e.formatter.toggle(t),e.releaseRange(t)}}),h=n.extend({init:function(e,t){this.body=e.body,this.startRestorePoint=e,this.endRestorePoint=t},redo:function(){this.body.innerHTML=this.endRestorePoint.html,l(this.endRestorePoint.toRange())},undo:function(){this.body.innerHTML=this.startRestorePoint.html,l(this.startRestorePoint.toRange())}}),g=m.extend({init:function(e){m.fn.init.call(this,e),this.managesUndoRedo=!0},exec:function(){var e=this.editor,t=e.getRange(),n=new u(t);e.clipboard.paste(this.options.value||""),e.undoRedoStack.push(new h(n,new u(e.getRange()))),e.focus()}}),v=d.extend({initialize:function(e,t){var n=t.editor;new i.SelectBox(e,{dataSource:n.options.insertHtml||[],dataTextField:"text",dataValueField:"value",change:function(){d.exec(n,"insertHtml",this.value())},title:n.options.messages.insertHtml,highlightFirst:!1})},command:function(e){return new g(e)},update:function(e){var t=e.data("kendoSelectBox")||e.find("select").data("kendoSelectBox");t.close(),t.value(t.options.title)}}),y=n.extend({init:function(){this.stack=[],this.currentCommandIndex=-1},push:function(e){var t=this;t.stack=t.stack.slice(0,t.currentCommandIndex+1),t.currentCommandIndex=t.stack.push(e)-1},undo:function(){this.canUndo()&&this.stack[this.currentCommandIndex--].undo()},redo:function(){this.canRedo()&&this.stack[++this.currentCommandIndex].redo()},canUndo:function(){return this.currentCommandIndex>=0},canRedo:function(){return this.currentCommandIndex!=this.stack.length-1}}),b=n.extend({init:function(e){this.editor=e},keydown:function(t){var n=this,i=n.editor,o=i.keyboard,r=o.isTypingKey(t),a=p(e.Event(),t);if(n.editor.trigger("keydown",a),a.isDefaultPrevented()&&t.preventDefault(),!a.isDefaultPrevented()&&r&&!o.isTypingInProgress()){var s=i.getRange();return n.startRestorePoint=new u(s),o.startTyping(function(){i.selectionRestorePoint=n.endRestorePoint=new u(i.getRange()),i.undoRedoStack.push(new h(n.startRestorePoint,n.endRestorePoint))}),!0}return!1},keyup:function(e){var t=this.editor.keyboard;return this.editor.trigger("keyup",e),t.isTypingInProgress()?(t.endTyping(),!0):!1}}),k=n.extend({init:function(e){this.editor=e,this.systemCommandIsInProgress=!1},createUndoCommand:function(){var e=this;e.endRestorePoint=new u(e.editor.getRange()),e.editor.undoRedoStack.push(new h(e.startRestorePoint,e.endRestorePoint)),e.startRestorePoint=e.endRestorePoint},changed:function(){return this.startRestorePoint?this.startRestorePoint.html!=this.editor.body.innerHTML:!1},keydown:function(e){var t=this,n=t.editor,i=n.keyboard;return i.isModifierKey(e)?(i.isTypingInProgress()&&i.endTyping(!0),t.startRestorePoint=new u(n.getRange()),!0):i.isSystem(e)?(t.systemCommandIsInProgress=!0,t.changed()&&(t.systemCommandIsInProgress=!1,t.createUndoCommand()),!0):!1},keyup:function(e){var t=this;return t.systemCommandIsInProgress&&t.changed()?(t.systemCommandIsInProgress=!1,t.createUndoCommand(e),!0):!1}}),w=n.extend({init:function(e){this.handlers=e,this.typingInProgress=!1},isCharacter:function(e){return e>=48&&90>=e||e>=96&&111>=e||e>=186&&192>=e||e>=219&&222>=e},toolFromShortcut:function(t,n){var i,o,r=String.fromCharCode(n.keyCode);for(i in t)if(o=e.extend({ctrl:!1,alt:!1,shift:!1},t[i].options),(o.key==r||o.key==n.keyCode)&&o.ctrl==n.ctrlKey&&o.alt==n.altKey&&o.shift==n.shiftKey)return i},isTypingKey:function(e){var t=e.keyCode;return this.isCharacter(t)&&!e.ctrlKey&&!e.altKey||32==t||13==t||8==t||46==t&&!e.shiftKey&&!e.ctrlKey&&!e.altKey},isModifierKey:function(e){var t=e.keyCode;return 17==t&&!e.shiftKey&&!e.altKey||16==t&&!e.ctrlKey&&!e.altKey||18==t&&!e.ctrlKey&&!e.shiftKey},isSystem:function(e){return 46==e.keyCode&&e.ctrlKey&&!e.altKey&&!e.shiftKey},startTyping:function(e){this.onEndTyping=e,this.typingInProgress=!0},stopTyping:function(){this.typingInProgress=!1,this.onEndTyping&&this.onEndTyping()},endTyping:function(t){var n=this;n.clearTimeout(),t?n.stopTyping():n.timeout=window.setTimeout(e.proxy(n.stopTyping,n),1e3)},isTypingInProgress:function(){return this.typingInProgress},clearTimeout:function(){window.clearTimeout(this.timeout)},notify:function(e,t){var n,i=this.handlers;for(n=0;i.length>n&&!i[n][t](e);n++);},keydown:function(e){this.notify(e,"keydown")},keyup:function(e){this.notify(e,"keyup")}}),C=n.extend({init:function(e){this.editor=e,this.cleaners=[new x]},htmlToFragment:function(e){var t=this.editor,n=t.document,i=a.create(n,"div"),o=n.createDocumentFragment();for(i.innerHTML=e;i.firstChild;)o.appendChild(i.firstChild);return o},isBlock:function(e){return/<(div|p|ul|ol|table|h[1-6])/i.test(e)},oncut:function(){var e=this.editor,t=new u(e.getRange());setTimeout(function(){e.undoRedoStack.push(new h(t,new u(e.getRange())))})},onpaste:function(t){var n=this.editor,o=n.getRange(),r="",s=new u(o),d=a.create(n.document,"div",{className:"k-paste-container",innerHTML:r});if(n.body.appendChild(d),n.body.createTextRange){t.preventDefault();var c=n.createRange();c.selectNodeContents(d),n.selectRange(c);var f=n.body.createTextRange();f.moveToElementText(d),e(n.body).unbind("paste"),f.execCommand("Paste"),e(n.body).bind("paste",e.proxy(arguments.callee,this))}else{var p=n.createRange();p.selectNodeContents(d),l(p)}setTimeout(function(){var e,t={html:""};l(o),a.remove(d),d.lastChild&&a.is(d.lastChild,"br")&&a.remove(d.lastChild),e=d.innerHTML,e!=r&&(t.html=e),n.trigger("paste",t),n.clipboard.paste(t.html,!0),n.undoRedoStack.push(new h(s,new u(n.getRange()))),i.EditorUtils.select(n)})},splittableParent:function(e,t){var n,i;if(e)return a.parentOfType(t,["p","ul","ol"])||t.parentNode;if(n=t.parentNode,i=t.ownerDocument.body,a.isInline(n))for(;n.parentNode!=i&&!a.isBlock(n.parentNode);)n=n.parentNode;return n},paste:function(e,t){var n,i,o=this.editor;for(n=0,i=this.cleaners.length;i>n;n++)this.cleaners[n].applicable(e)&&(e=this.cleaners[n].clean(e));t&&(e=e.replace(/(<br>(\s| )*)+(<\/?(div|p|li|col|t))/gi,"$3"),e=e.replace(/<(a|span)[^>]*><\/\1>/gi,"")),e=e.replace(/^<li/i,"<ul><li").replace(/li>$/g,"li></ul>");var r=this.isBlock(e),d=o.getRange();d.deleteContents(),d.startContainer==o.document&&d.selectNodeContents(o.body);var c=new f,u=c.addCaret(d),p=this.splittableParent(r,u),m=!1;/body|td/.test(a.name(p))||!r&&!a.isInline(p)||(d.selectNode(u),s.split(d,p,!0),m=!0);var h=this.htmlToFragment(e);if(h.firstChild&&"k-paste-container"===h.firstChild.className){var g=[];for(n=0,i=h.childNodes.length;i>n;n++)g.push(h.childNodes[n].innerHTML);h=this.htmlToFragment(g.join("<br />"))}if(d.insertNode(h),p=this.splittableParent(r,u),m){for(;u.parentNode!=p;)a.unwrap(u.parentNode);a.unwrap(u.parentNode)}a.normalize(d.commonAncestorContainer),u.style.display="inline",a.scrollTo(u),c.removeCaret(d),l(d)}}),x=n.extend({init:function(){this.replacements=[/<\?xml[^>]*>/gi,"",/<!--(.|\n)*?-->/g,"",/"/g,"'",/(?:<br> [\s\r\n]+|<br>)*(<\/?(h[1-6]|hr|p|div|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|address|pre|form|blockquote|dl|dt|dd|dir|fieldset)[^>]*>)(?:<br> [\s\r\n]+|<br>)*/g,"$1",/<br><br>/g,"<BR><BR>",/<br>/g," ",/<table([^>]*)>(\s| )+<t/gi,"<table$1><t",/<tr[^>]*>(\s| )*<\/tr>/gi,"",/<tbody[^>]*>(\s| )*<\/tbody>/gi,"",/<table[^>]*>(\s| )*<\/table>/gi,"",/<BR><BR>/g,"<br>",/^\s*( )+/gi,"",/( |<br[^>]*>)+\s*$/gi,"",/mso-[^;"]*;?/gi,"",/<(\/?)b(\s[^>]*)?>/gi,"<$1strong$2>",/<(\/?)i(\s[^>]*)?>/gi,"<$1em$2>",/<\/?(meta|link|style|o:|v:|x:)[^>]*>((?:.|\n)*?<\/(meta|link|style|o:|v:|x:)[^>]*>)?/gi,"",/style=(["|'])\s*\1/g,""]},applicable:function(e){return/class="?Mso|style="[^"]*mso-/i.test(e)},listType:function(e){return/^[\u2022\u00b7\u00a7\u00d8o]\u00a0+/.test(e)?"ul":/^\s*\w+[\.\)]\u00a0{2,}/.test(e)?"ol":void 0},lists:function(t){for(var n,i=a.create(document,"div",{innerHTML:t}),o=e(a.blockElements.join(","),i),r=-1,s={ul:{},ol:{}},l=i,d=0;o.length>d;d++){var c=o[d];t=c.innerHTML.replace(/<\/?\w+[^>]*>/g,"").replace(/ /g," ");var u=this.listType(t);if(u&&"p"==a.name(c)){var f=parseFloat(c.style.marginLeft||0),p=s[u][f];if((f>r||!p)&&(p=a.create(document,u),l==i?a.insertBefore(p,c):l.appendChild(p),s[u][f]=p),n!=u)for(var m in s)for(var h in s[m])e.contains(p,s[m][h])&&delete s[m][h];a.remove(c.firstChild),l=a.create(document,"li",{innerHTML:c.innerHTML}),p.appendChild(l),a.remove(c),r=f,n=u}else c.innerHTML?(s={ul:{},ol:{}},l=i,r=-1):a.remove(c)}return i.innerHTML},stripEmptyAnchors:function(e){return e.replace(/<a([^>]*)>\s*<\/a>/gi,function(e,t){return!t||0>t.indexOf("href")?"":e})},clean:function(e){var t,n,i=this,o=i.replacements;for(t=0,n=o.length;n>t;t+=2)e=e.replace(o[t],o[t+1]);return e=i.stripEmptyAnchors(e),e=i.lists(e),e=e.replace(/\s+class="?[^"\s>]*"?/gi,"")}});p(i,{Command:m,GenericCommand:h,InsertHtmlCommand:g,InsertHtmlTool:v,UndoRedoStack:y,TypingHandler:b,SystemHandler:k,Keyboard:w,Clipboard:C,MSWordFormatCleaner:x}),r("insertHtml",new v({template:new c({template:o.dropDownListTemplate,title:"Insert HTML",initialValue:"Insert HTML"})}))}(window.kendo.jQuery),function(e){function t(e){return e.collapsed&&!u.isExpandable(e)}var n=window.kendo,i=n.Class,o=n.ui.editor,r=n.ui.Editor.fn.options.formats,a=o.EditorUtils,s=o.Tool,l=o.ToolTemplate,d=o.FormatTool,c=o.Dom,u=o.RangeUtils,f=e.extend,p=o.EditorUtils.registerTool,m=o.EditorUtils.registerFormat,h="k-marker",g=i.extend({init:function(e){this.format=e},numberOfSiblings:function(e){var t,n=0,i=0,o=0,r=e.parentNode;for(t=r.firstChild;t;t=t.nextSibling)t!=e&&(t.className==h?o++:3==t.nodeType?n++:i++);return o>1&&r.firstChild.className==h&&r.lastChild.className==h?0:i+n},findSuitable:function(e,t){return!t&&this.numberOfSiblings(e)>0?null:c.parentOfType(e,this.format[0].tags)},findFormat:function(e){var t,n,i,o,r,a=this.format,s=c.attrEquals;for(t=0,n=a.length;n>t;t++){if(i=e,o=a[t].tags,r=a[t].attr,i&&c.ofType(i,o)&&s(i,r))return i;for(;i;)if(i=c.parentOfType(i,o),i&&s(i,r))return i}return null},isFormatted:function(e){var t,n;for(t=0,n=e.length;n>t;t++)if(this.findFormat(e[t]))return!0;return!1}}),v=i.extend({init:function(e,t){var n=this;n.finder=new g(e),n.attributes=f({},e[0].attr,t),n.tag=e[0].tags[0]},wrap:function(e){return c.wrap(e,c.create(e.ownerDocument,this.tag,this.attributes))},activate:function(e,t){var n=this;n.finder.isFormatted(t)?(n.split(e),n.remove(t)):n.apply(t)},toggle:function(e){var t=u.textNodes(e);t.length>0&&this.activate(e,t)},apply:function(e){var t,n,i,o,r=this,a=[];for(t=0,n=e.length;n>t;t++)i=e[t],o=r.finder.findSuitable(i),o?c.attr(o,r.attributes):o=r.wrap(i),a.push(o);r.consolidate(a)},remove:function(e){var t,n,i,o=this;for(t=0,n=e.length;n>t;t++)i=o.finder.findFormat(e[t]),i&&(o.attributes&&o.attributes.style?(c.unstyle(i,o.attributes.style),i.style.cssText||c.unwrap(i)):c.unwrap(i))},split:function(e){var t,n,i=u.textNodes(e),o=i.length;if(o>0)for(t=0;o>t;t++)n=this.finder.findFormat(i[t]),n&&u.split(e,n,!0)},consolidate:function(e){for(var t,n;e.length>1;)if(t=e.pop(),n=e[e.length-1],t.previousSibling&&t.previousSibling.className==h&&n.appendChild(t.previousSibling),t.tagName==n.tagName&&t.previousSibling==n&&t.style.cssText==n.style.cssText){for(;t.firstChild;)n.appendChild(t.firstChild);c.remove(t)}}}),y=g.extend({init:function(e,t){var n=this;n.format=e,n.greedyProperty=t,g.fn.init.call(n,e)},getInlineCssValue:function(t){var n,i,o,r,a,s,l,d,u,f,p,m,h=t.attributes,g=e.trim;if(h)for(n=0,i=h.length;i>n;n++)if(o=h[n],r=o.nodeName,a=o.nodeValue,o.specified&&"style"==r)for(s=g(a||t.style.cssText).split(";"),d=0,u=s.length;u>d;d++)if(l=s[d],l.length){if(f=l.split(":"),p=g(f[0].toLowerCase()),m=g(f[1]),p!=this.greedyProperty)continue;return p.indexOf("color")>=0?c.toHex(m):m}},getFormatInner:function(t){var n,i,o,r=e(c.isDataNode(t)?t.parentNode:t),a=r.parents().andSelf();for(n=0,i=a.length;i>n;n++)if(o="className"==this.greedyProperty?a[n].className:this.getInlineCssValue(a[n]))return o;return"inherit"},getFormat:function(e){var t,n,i=this.getFormatInner(e[0]);for(t=1,n=e.length;n>t;t++)if(i!=this.getFormatInner(e[t]))return"";return i},isFormatted:function(e){return""!==this.getFormat(e)}}),b=v.extend({init:function(e,t,n){var i=this;v.fn.init.call(i,e,t),i.greedyProperty=n,i.values=t,i.finder=new y(e,n)},activate:function(e,t){var n,i=this,o=i.greedyProperty,r="apply";i.split(e),o&&(n=o.replace(/-([a-z])/,function(e,t){return t.toUpperCase()}),"inherit"==i.values.style[n]&&(r="remove")),i[r](t)}}),k=d.extend({init:function(e){d.fn.init.call(this,f(e,{finder:new g(e.format),formatter:function(){return new v(e.format)}})),this.willDelayExecution=t}}),w=s.extend({init:function(e){var t=this;s.fn.init.call(t,e),t.type=n.support.browser.msie||n.support.touch?"kendoDropDownList":"kendoComboBox",t.format=[{tags:["span"]}],t.finder=new y(t.format,e.cssAttr)},command:function(e){var t=this.options,n=this.format,i={};return new o.FormatCommand(f(e,{formatter:function(){return i[t.domAttr]=e.value,new b(n,{style:i},t.cssAttr)}}))},willDelayExecution:t,update:function(e,t,n){var i=this,o=e.data(i.type),r=n.getPending(i.name),a=r&&r.params?r.params.value:i.finder.getFormat(t);o.close(),o.value(a)},initialize:function(e,t){var n,i=t.editor,o=this.options,r=o.name,a=[];o.defaultValue&&(a=[{text:i.options.messages[o.defaultValue[0].text],value:o.defaultValue[0].value}]),n=a.concat(o.items?o.items:i.options[r]),e[this.type]({dataTextField:"text",dataValueField:"value",dataSource:n,change:function(){s.exec(i,r,this.value())},highlightFirst:!1}),e.closest(".k-widget").removeClass("k-"+r).find("*").andSelf().attr("unselectable","on"),e.data(this.type).value("inherit")}}),C=s.extend({init:function(e){s.fn.init.call(this,e),this.options=e,this.format=[{tags:["span"]}]},update:function(e){e.data("kendoColorPicker").close()},command:function(e){var t=this.options,n=this.format,i={};return new o.FormatCommand(f(e,{formatter:function(){return i[t.domAttr]=e.value,new b(n,{style:i},t.cssAttr)}}))},willDelayExecution:t,initialize:function(e,t){var i=t.editor,r=this.name;e.attr("title",t.title),new o.ColorPicker(e,{value:"#000000",ariaId:i.element[0].id?n.format("{0}_{1}_cp",i.element[0].id,r):"",change:function(e){s.exec(i,r,e.value)}})}}),x=s.extend({init:function(e){var t=this;s.fn.init.call(t,e),t.format=[{tags:["span"]}],t.finder=new y(t.format,"className")},command:function(e){var t=this.format;return new o.FormatCommand(f(e,{formatter:function(){return new b(t,{className:e.value})}}))},update:function(e,t){var n=e.data("kendoSelectBox");n.close(),n.value(this.finder.getFormat(t))},initialize:function(e,t){var n=t.editor;new o.SelectBox(e,{dataTextField:"text",dataValueField:"value",dataSource:n.options.style,title:n.options.messages.style,change:function(){s.exec(n,"style",this.value())},highlightFirst:!1}),e.closest(".k-widget").removeClass("k-"+this.name).find("*").andSelf().attr("unselectable","on")}});f(o,{InlineFormatFinder:g,InlineFormatter:v,GreedyInlineFormatFinder:y,GreedyInlineFormatter:b,InlineFormatTool:k,FontTool:w,ColorTool:C,StyleTool:x}),p("style",new o.StyleTool({template:new l({template:a.dropDownListTemplate,title:"Styles"})})),m("bold",[{tags:["strong"]},{tags:["span"],attr:{style:{fontWeight:"bold"}}}]),p("bold",new k({key:"B",ctrl:!0,format:r.bold,template:new l({template:a.buttonTemplate,title:"Bold"})})),m("italic",[{tags:["em"]},{tags:["span"],attr:{style:{fontStyle:"italic"}}}]),p("italic",new k({key:"I",ctrl:!0,format:r.italic,template:new l({template:a.buttonTemplate,title:"Italic"})})),m("underline",[{tags:["span"],attr:{style:{textDecoration:"underline"}}}]),p("underline",new k({key:"U",ctrl:!0,format:r.underline,template:new l({template:a.buttonTemplate,title:"Underline"})})),m("strikethrough",[{tags:["del"]},{tags:["span"],attr:{style:{textDecoration:"line-through"}}}]),p("strikethrough",new k({format:r.strikethrough,template:new l({template:a.buttonTemplate,title:"Strikethrough"})})),m("superscript",[{tags:["sup"]}]),p("superscript",new k({format:r.superscript,template:new l({template:a.buttonTemplate,title:"Superscript"})})),m("subscript",[{tags:["sub"]}]),p("subscript",new k({format:r.subscript,template:new l({template:a.buttonTemplate,title:"Subscript"})})),p("foreColor",new C({cssAttr:"color",domAttr:"color",name:"foreColor",template:new l({template:a.colorPickerTemplate,title:"Color"})})),p("backColor",new C({cssAttr:"background-color",domAttr:"backgroundColor",name:"backColor",template:new l({template:a.colorPickerTemplate,title:"Background Color"})})),p("fontName",new w({cssAttr:"font-family",domAttr:"fontFamily",name:"fontName",defaultValue:[{text:"fontNameInherit",value:"inherit"}],template:new l({template:a.comboBoxTemplate,title:"Font Name"})})),p("fontSize",new w({cssAttr:"font-size",domAttr:"fontSize",name:"fontSize",defaultValue:[{text:"fontSizeInherit",value:"inherit"}],template:new l({template:a.comboBoxTemplate,title:"Font Size"})}))}(window.kendo.jQuery),function(e){var t=window.kendo,n=t.Class,i=e.extend,o=t.ui.editor,r=t.ui.Editor.fn.options.formats,a=o.Dom,s=o.Command,l=o.Tool,d=o.ToolTemplate,c=o.FormatTool,u=o.EditorUtils,f=u.registerTool,p=u.registerFormat,m=o.RangeUtils,h=n.extend({init:function(e){this.format=e},contains:function(e,t){var n,i,o;for(n=0,i=t.length;i>n;n++)if(o=t[n],!o||!a.isAncestorOrSelf(e,o))return!1;return!0},findSuitable:function(t){var n,i,o,r=this.format,s=[];for(n=0,i=t.length;i>n;n++){if(o=a.ofType(t[n],r[0].tags)?t[n]:a.parentOfType(t[n],r[0].tags),!o)return[];0>e.inArray(o,s)&&s.push(o)}for(n=0,i=s.length;i>n;n++)if(this.contains(s[n],s))return[s[n]];return s},findFormat:function(e){var t,n,i,o,r,s=this.format;for(t=0,n=s.length;n>t;t++)for(i=e,o=s[t].tags,r=s[t].attr;i;){if(a.ofType(i,o)&&a.attrEquals(i,r))return i;i=i.parentNode}return null},getFormat:function(e){var t,n,i=this,o=function(e){return i.findFormat(a.isDataNode(e)?e.parentNode:e)},r=o(e[0]);if(!r)return"";for(t=1,n=e.length;n>t;t++)if(r!=o(e[t]))return"";return r.nodeName.toLowerCase()},isFormatted:function(e){for(var t=0,n=e.length;n>t;t++)if(!this.findFormat(e[t]))return!1;return!0}}),g=n.extend({init:function(e,t){this.format=e,this.values=t,this.finder=new h(e)},wrap:function(e,t,n){var i=1==n.length?a.blockParentOrBody(n[0]):a.commonAncestor.apply(null,n);a.isInline(i)&&(i=a.blockParentOrBody(i));var o,r,s=a.significantChildNodes(i),l=a.findNodeIndex(s[0]),d=a.create(i.ownerDocument,e,t);for(o=0;s.length>o;o++)r=s[o],a.isBlock(r)?(a.attr(r,t),d.childNodes.length&&(a.insertBefore(d,r),d=d.cloneNode(!1)),l=a.findNodeIndex(r)+1):d.appendChild(r);d.firstChild&&a.insertAt(i,d,l)},apply:function(e){var t,n,o=this,r=a.is(e[0],"img")?[e[0]]:o.finder.findSuitable(e),s=r.length?u.formatByName(a.name(r[0]),o.format):o.format[0],l=s.tags[0],d=i({},s.attr,o.values);if(r.length)for(t=0,n=r.length;n>t;t++)a.attr(r[t],d);else o.wrap(l,d,e)},remove:function(e){var t,n,i,o;for(t=0,n=e.length;n>t;t++)i=this.finder.findFormat(e[t]),i&&(a.ofType(i,["p","img","li"])?(o=u.formatByName(a.name(i),this.format),o.attr.style&&a.unstyle(i,o.attr.style),o.attr.className&&a.removeClass(i,o.attr.className)):a.unwrap(i))},toggle:function(e){var t=this,n=m.nodes(e);t.finder.isFormatted(n)?t.remove(n):t.apply(n)}}),v=n.extend({init:function(e,t){var n=this;n.format=e,n.values=t,n.finder=new h(e)},apply:function(e){var t,n,i,r,s,l=this.format,d=a.blockParents(e),c=l[0].tags[0];if(d.length)for(t=0,n=d.length;n>t;t++)a.is(d[t],"li")?(i=d[t].parentNode,r=new o.ListFormatter(i.nodeName.toLowerCase(),c),s=this.editor.createRange(),s.selectNode(d[t]),r.toggle(s)):a.changeTag(d[t],c);else new g(l,this.values).apply(e)},toggle:function(e){var t=m.textNodes(e);t.length||(e.selectNodeContents(e.commonAncestorContainer),t=m.textNodes(e),t.length||(t=a.significantChildNodes(e.commonAncestorContainer))),this.apply(t)}}),y=s.extend({init:function(e){e.formatter=e.formatter(),s.fn.init.call(this,e)}}),b=c.extend({init:function(e){c.fn.init.call(this,i(e,{finder:new h(e.format),formatter:function(){return new g(e.format)}}))}}),k=l.extend({init:function(e){l.fn.init.call(this,e),this.finder=new h([{tags:a.blockElements}])},command:function(e){return new y(i(e,{formatter:function(){return new v([{tags:[e.value]}],{})}}))},update:function(e,t){var n;n=e.is("select")?e.data("kendoSelectBox"):e.find("select").data("kendoSelectBox"),n.close(),n.value(this.finder.getFormat(t))},initialize:function(e,t){var n=t.editor,i="formatBlock";new o.SelectBox(e,{dataTextField:"text",dataValueField:"value",dataSource:this.options.items?this.options.items:n.options.formatBlock,title:n.options.messages.formatBlock,change:function(){l.exec(n,i,this.value())},highlightFirst:!1}),e.closest(".k-widget").removeClass("k-"+i).find("*").andSelf().attr("unselectable","on")}});i(o,{BlockFormatFinder:h,BlockFormatter:g,GreedyBlockFormatter:v,FormatCommand:y,BlockFormatTool:b,FormatBlockTool:k}),f("formatBlock",new k({template:new d({template:u.dropDownListTemplate})})),p("justifyLeft",[{tags:a.blockElements,attr:{style:{textAlign:"left"}}},{tags:["img"],attr:{style:{"float":"left"}}}]),f("justifyLeft",new b({format:r.justifyLeft,template:new d({template:u.buttonTemplate,title:"Justify Left"})})),p("justifyCenter",[{tags:a.blockElements,attr:{style:{textAlign:"center"}}},{tags:["img"],attr:{style:{display:"block",marginLeft:"auto",marginRight:"auto"}}}]),f("justifyCenter",new b({format:r.justifyCenter,template:new d({template:u.buttonTemplate,title:"Justify Center"})})),p("justifyRight",[{tags:a.blockElements,attr:{style:{textAlign:"right"}}},{tags:["img"],attr:{style:{"float":"right"}}}]),f("justifyRight",new b({format:r.justifyRight,template:new d({template:u.buttonTemplate,title:"Justify Right"})})),p("justifyFull",[{tags:a.blockElements,attr:{style:{textAlign:"justify"}}}]),f("justifyFull",new b({format:r.justifyFull,template:new d({template:u.buttonTemplate,title:"Justify Full"})}))}(window.kendo.jQuery),function(e){var t=window.kendo,n=e.extend,i=t.ui.editor,o=i.Dom,r=i.Command,a=i.Tool,s=i.BlockFormatter,l=o.normalize,d=i.RangeUtils,c=i.EditorUtils.registerTool,u=r.extend({init:function(e){this.options=e,r.fn.init.call(this,e)},exec:function(){function e(e){if(e.firstChild&&o.is(e.firstChild,"br")&&o.remove(e.firstChild),o.isDataNode(e)&&!e.nodeValue&&(e=e.parentNode),e&&!o.is(e,"img")){for(;e.firstChild&&1==e.firstChild.nodeType;)e=e.firstChild;""===e.innerHTML&&(e.innerHTML=v)}}var n,i,r,a,c,u,f,p,m,h=this.getRange(),g=d.documentFromRange(h),v=t.support.browser.msie?"":'<br _moz_dirty="" />',y="p,h1,h2,h3,h4,h5,h6".split(","),b=o.parentOfType(h.startContainer,y),k=o.parentOfType(h.endContainer,y),w=b&&!k||!b&&k;if(h.deleteContents(),u=o.create(g,"a"),h.insertNode(u),u.parentNode||(a=h.commonAncestorContainer,a.innerHTML="",a.appendChild(u)),l(u.parentNode),f=o.parentOfType(u,["li"]),p=o.parentOfType(u,"h1,h2,h3,h4,h5,h6".split(",")),f?(m=h.cloneRange(),m.selectNode(f),d.textNodes(m).length||(c=o.create(g,"p"),f.nextSibling&&d.split(m,f.parentNode),o.insertAfter(c,f.parentNode),o.remove(1==f.parentNode.childNodes.length?f.parentNode:f),c.innerHTML=v,r=c)):p&&!u.nextSibling&&(c=o.create(g,"p"),o.insertAfter(c,p),c.innerHTML=v,o.remove(u),r=c),r||(f||p||new s([{tags:["p"]}]).apply([u]),h.selectNode(u),n=o.parentOfType(u,[f?"li":p?o.name(p):"p"]),d.split(h,n,w),i=n.previousSibling,o.is(i,"li")&&i.firstChild&&!o.is(i.firstChild,"br")&&(i=i.firstChild),r=n.nextSibling,o.is(r,"li")&&r.firstChild&&!o.is(r.firstChild,"br")&&(r=r.firstChild),o.remove(n),e(i),e(r),l(i)),l(r),o.is(r,"img"))h.setStartBefore(r);else{h.selectNodeContents(r);var C=d.textNodes(h)[0];C&&h.selectNodeContents(C)}h.collapse(!0),o.scrollTo(r),d.selectRange(h)}}),f=r.extend({init:function(e){this.options=e,r.fn.init.call(this,e)},exec:function(){var e=this.getRange();e.deleteContents();var n=o.create(d.documentFromRange(e),"br");if(e.insertNode(n),l(n.parentNode),!t.support.browser.msie&&(!n.nextSibling||o.isWhitespace(n.nextSibling))){var i=n.cloneNode(!0);i.setAttribute("_moz_dirty",""),o.insertAfter(i,n)}e.setStartAfter(n),e.collapse(!0),o.scrollTo(n.nextSibling),d.selectRange(e)
|
13
|
+
}});n(i,{ParagraphCommand:u,NewLineCommand:f}),c("insertLineBreak",new a({key:13,shift:!0,command:f})),c("insertParagraph",new a({key:13,command:u}))}(window.kendo.jQuery),function(e){var t=window.kendo,n=t.Class,i=e.extend,o=t.ui.editor,r=o.Dom,a=o.RangeUtils,s=o.EditorUtils,l=o.Command,d=o.ToolTemplate,c=o.FormatTool,u=o.BlockFormatFinder,f=a.textNodes,p=o.EditorUtils.registerTool,m=u.extend({init:function(e){this.tag=e;var t=this.tags=["ul"==e?"ol":"ul",e];u.fn.init.call(this,[{tags:t}])},isFormatted:function(e){for(var t,n=[],i=0;e.length>i;i++)(t=this.findFormat(e[i]))&&r.name(t)==this.tag&&n.push(t);if(1>n.length)return!1;if(n.length!=e.length)return!1;for(i=0;n.length>i&&n[i].parentNode==t.parentNode;i++)if(n[i]!=t)return!1;return!0},findSuitable:function(e){var t=r.parentOfType(e[0],this.tags);return t&&r.name(t)==this.tag?t:null}}),h=n.extend({init:function(e,t){var n=this;n.finder=new m(e),n.tag=e,n.unwrapTag=t},wrap:function(e,t){var n,i,o=r.create(e.ownerDocument,"li");for(n=0;t.length>n;n++)if(i=t[n],r.is(i,"li"))e.appendChild(i);else if(r.is(i,"ul")||r.is(i,"ol"))for(;i.firstChild;)e.appendChild(i.firstChild);else if(r.is(i,"td")){for(;i.firstChild;)o.appendChild(i.firstChild);e.appendChild(o),i.appendChild(e),e=e.cloneNode(!1),o=o.cloneNode(!1)}else o.appendChild(i),r.isBlock(i)&&(e.appendChild(o),r.unwrap(i),o=o.cloneNode(!1));o.firstChild&&e.appendChild(o)},containsAny:function(e,t){for(var n=0;t.length>n;n++)if(r.isAncestorOrSelf(e,t[n]))return!0;return!1},suitable:function(e,t){if("k-marker"==e.className){var n=e.nextSibling;if(n&&r.isBlock(n))return!1;if(n=e.previousSibling,n&&r.isBlock(n))return!1}return this.containsAny(e,t)||r.isInline(e)||3==e.nodeType},split:function(t){var n,i,o=f(t);if(o.length){n=r.parentOfType(o[0],["li"]),i=r.parentOfType(o[o.length-1],["li"]),t.setStartBefore(n),t.setEndAfter(i);for(var s=0,l=o.length;l>s;s++){var d=this.finder.findFormat(o[s]);if(d){var c=e(d).parents("ul,ol");c[0]?a.split(t,c.last()[0],!0):a.split(t,d,!0)}}}},merge:function(e,t){for(var n,i=t.previousSibling;i&&("k-marker"==i.className||3==i.nodeType&&r.isWhitespace(i));)i=i.previousSibling;if(i&&r.name(i)==e){for(;t.firstChild;)i.appendChild(t.firstChild);r.remove(t),t=i}for(n=t.nextSibling;n&&("k-marker"==n.className||3==n.nodeType&&r.isWhitespace(n));)n=n.nextSibling;if(n&&r.name(n)==e){for(;t.lastChild;)n.insertBefore(t.lastChild,n.firstChild);r.remove(t)}},applyOnSection:function(t,n){function i(){s.push(this)}var o,a=this.tag;o=1==n.length?r.parentOfType(n[0],["ul","ol"]):r.commonAncestor.apply(null,n),o||(o=r.parentOfType(n[0],["td"])||n[0].ownerDocument.body),r.isInline(o)&&(o=r.blockParentOrBody(o));var s=[],l=this.finder.findSuitable(n);l||(l=new m("ul"==a?"ol":"ul").findSuitable(n));var d=r.significantChildNodes(o);d.length||(d=n),/table|tbody/.test(r.name(o))&&(d=e.map(n,function(e){return r.parentOfType(e,["td"])}));for(var c=0;d.length>c;c++){var u=d[c],f=r.name(u);!this.suitable(u,n)||l&&r.isAncestorOrSelf(l,u)||(!l||"ul"!=f&&"ol"!=f?s.push(u):(e.each(u.childNodes,i),r.remove(u)))}s.length!=d.length||o==n[0].ownerDocument.body||/table|tbody|tr|td/.test(r.name(o))||(s=[o]),l||(l=r.create(o.ownerDocument,a),r.insertBefore(l,s[0])),this.wrap(l,s),r.is(l,a)||r.changeTag(l,a),this.merge(a,l)},apply:function(e){var t,n,i,o=0,a=[];do i=r.parentOfType(e[o],["td","body"]),t&&i==t?n.push(e[o]):(t&&a.push({section:t,nodes:n}),n=[e[o]],t=i),o++;while(e.length>o);for(a.push({section:t,nodes:n}),o=0;a.length>o;o++)this.applyOnSection(a[o].section,a[o].nodes)},unwrap:function(t){var n,i,o,a,s=t.ownerDocument.createDocumentFragment(),l=this.unwrapTag;for(i=t.firstChild;i;i=i.nextSibling){for(o=r.create(t.ownerDocument,l||"p");i.firstChild;)a=i.firstChild,r.isBlock(a)?(o.firstChild&&(s.appendChild(o),o=r.create(t.ownerDocument,l||"p")),s.appendChild(a)):o.appendChild(a);o.firstChild&&s.appendChild(o)}n=e(t).parents("ul,ol"),n[0]?(r.insertAfter(s,n.last()[0]),n.last().remove()):r.insertAfter(s,t),r.remove(t)},remove:function(e){for(var t,n=0,i=e.length;i>n;n++)t=this.finder.findFormat(e[n]),t&&this.unwrap(t)},toggle:function(e){var t=this,n=f(e),i=e.commonAncestorContainer;if(!n.length&&(e.selectNodeContents(i),n=f(e),!n.length)){var o=i.ownerDocument.createTextNode("");e.startContainer.appendChild(o),n=[o],e.selectNode(o.parentNode)}t.finder.isFormatted(n)?(t.split(e),t.remove(n)):t.apply(n)}}),g=l.extend({init:function(e){e.formatter=new h(e.tag),l.fn.init.call(this,e)}}),v=c.extend({init:function(e){this.options=e,c.fn.init.call(this,i(e,{finder:new m(e.tag)}))},command:function(e){return new g(i(e,{tag:this.options.tag}))}});i(o,{ListFormatFinder:m,ListFormatter:h,ListCommand:g,ListTool:v}),p("insertUnorderedList",new v({tag:"ul",template:new d({template:s.buttonTemplate,title:"Remove Link"})})),p("insertOrderedList",new v({tag:"ol",template:new d({template:s.buttonTemplate,title:"Remove Link"})}))}(window.kendo.jQuery),function(e){var t=window.kendo,n=t.Class,i=e.extend,o=t.ui.editor,r=o.Dom,a=o.RangeUtils,s=o.EditorUtils,l=o.Command,d=o.Tool,c=o.ToolTemplate,u=o.InlineFormatter,f=o.InlineFormatFinder,p=a.textNodes,m=o.EditorUtils.registerTool,h=n.extend({findSuitable:function(e){return r.parentOfType(e,["a"])}}),g=n.extend({init:function(){this.finder=new h},apply:function(e,t){var n,i,o,s,l=p(e);t.innerHTML?(n=a.getMarkers(e),i=a.documentFromRange(e),e.deleteContents(),s=r.create(i,"a",t),e.insertNode(s),n.length>1&&(r.insertAfter(n[n.length-1],s),r.insertAfter(n[1],s),r[l.length>0?"insertBefore":"insertAfter"](n[0],s))):(o=new u([{tags:["a"]}],t),o.finder=this.finder,o.apply(l))}}),v=l.extend({init:function(e){e.formatter={toggle:function(e){new u([{tags:["a"]}]).remove(p(e))}},this.options=e,l.fn.init.call(this,e)}}),y=l.extend({init:function(e){var t=this;t.options=e,l.fn.init.call(t,e),t.attributes=null,t.async=!0,t.formatter=new g},exec:function(){function n(t){var n,o,r,a=e("#k-editor-link-url",g.element).val();a&&"http://"!=a&&(l.attributes={href:a},n=e("#k-editor-link-title",g.element).val(),n&&(l.attributes.title=n),o=e("#k-editor-link-text",g.element).val(),o!==u&&(l.attributes.innerHTML=o||a),r=e("#k-editor-link-target",g.element).is(":checked"),r&&(l.attributes.target="_blank"),l.formatter.apply(d,l.attributes)),i(t),l.change&&l.change()}function i(e){e.preventDefault(),g.destroy(),r.windowFromDocument(a.documentFromRange(d)).focus(),l.releaseRange(d)}var o,l=this,d=l.getRange(),c=d.collapsed,u=null;d=l.lockRange(!0),o=p(d);var f=o.length?l.formatter.finder.findSuitable(o[0]):null,m=1>=o.length||2==o.length&&c,h="<div class='k-editor-dialog'><ol><li class='k-form-text-row'><label for='k-editor-link-url'>Web address</label><input type='text' class='k-input' id='k-editor-link-url'></li>"+(m?"<li class='k-form-text-row'><label for='k-editor-link-text'>Text</label><input type='text' class='k-input' id='k-editor-link-text'></li>":"")+"<li class='k-form-text-row'><label for='k-editor-link-title'>Tooltip</label><input type='text' class='k-input' id='k-editor-link-title'></li>"+"<li class='k-form-checkbox-row'><input type='checkbox' id='k-editor-link-target'><label for='k-editor-link-target'>Open link in new window</label></li>"+"</ol>"+"<div class='k-button-wrapper'>"+"<button class='k-dialog-insert k-button'>Insert</button>"+" or "+"<a href='#' class='k-dialog-close k-link'>Close</a>"+"</div>"+"</div>",g=s.createDialog(h,l.editor,e.extend({},l.editor.options.dialogOptions,{title:"Insert link",close:i})).hide().find(".k-dialog-insert").click(n).end().find(".k-dialog-close").click(i).end().find(".k-form-text-row input").keydown(function(e){var o=t.keys;e.keyCode==o.ENTER?n(e):e.keyCode==o.ESC&&i(e)}).end().find("#k-editor-link-url").val(f?f.getAttribute("href",2):"http://").end().find("#k-editor-link-text").val(o.length>0?1==o.length?o[0].nodeValue:o[0].nodeValue+o[1].nodeValue:"").end().find("#k-editor-link-title").val(f?f.title:"").end().find("#k-editor-link-target").attr("checked",f?"_blank"==f.target:!1).end().show().data("kendoWindow").center();m&&o.length>0&&(u=e("#k-editor-link-text",g.element).val()),e("#k-editor-link-url",g.element).focus().select()},redo:function(){var e=this,t=e.lockRange(!0);e.formatter.apply(t,e.attributes),e.releaseRange(t)}}),b=d.extend({init:function(t){this.options=t,this.finder=new f([{tags:["a"]}]),d.fn.init.call(this,e.extend(t,{command:v}))},initialize:function(e){e.attr("unselectable","on").addClass("k-state-disabled")},update:function(e,t){e.toggleClass("k-state-disabled",!this.finder.isFormatted(t)).removeClass("k-state-hover")}});i(t.ui.editor,{LinkFormatFinder:h,LinkFormatter:g,UnlinkCommand:v,LinkCommand:y,UnlinkTool:b}),m("createLink",new d({key:"K",ctrl:!0,command:y,template:new c({template:s.buttonTemplate,title:"Create Link"})})),m("unlink",new b({key:"K",ctrl:!0,shift:!0,template:new c({template:s.buttonTemplate,title:"Remove Link"})}))}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=e.extend,o=n.ui.editor,r=o.EditorUtils,a=o.Dom,s=r.registerTool,l=o.ToolTemplate,d=o.RangeUtils,c=o.Command,u=n.keys,f="Insert Image",p="#k-editor-image-url",m="#k-editor-image-title",h=c.extend({init:function(e){var t=this;c.fn.init.call(t,e),t.async=!0,t.attributes={}},insertImage:function(e,t){var n=this.attributes;if(n.src&&"http://"!=n.src){if(!e)return e=a.create(d.documentFromRange(t),"img",n),e.onload=e.onerror=function(){e.removeAttribute("complete"),e.removeAttribute("width"),e.removeAttribute("height")},t.deleteContents(),t.insertNode(e),t.setStartAfter(e),t.setEndAfter(e),d.selectRange(t),!0;a.attr(e,n)}return!1},_dialogTemplate:function(e){return n.template('<div class="k-editor-dialog"># if (showBrowser) { #<div class="k-imagebrowser"></div># } #<ol><li class="k-form-text-row"><label for="k-editor-image-url">#: messages.imageWebAddress #</label><input type="text" class="k-input" id="k-editor-image-url"></li><li class="k-form-text-row"><label for="k-editor-image-title">#: messages.imageAltText #</label><input type="text" class="k-input" id="k-editor-image-title"></li></ol><div class="k-button-wrapper"><button class="k-dialog-insert k-button">#: messages.dialogInsert #</button> #: messages.dialogButtonSeparator # <a href="\\#" class="k-dialog-close k-link">#: messages.dialogCancel #</a></div></div>')({messages:this.editor.options.messages,showBrowser:e})},redo:function(){var e=this,t=e.lockRange();e.insertImage(d.image(t),t)||e.releaseRange(t)},exec:function(){function o(t){g.attributes={src:e(p,c.element).val(),alt:e(m,c.element).val()},y=g.insertImage(b,v),s(t),g.change&&g.change()}function s(e){e.preventDefault(),c.destroy(),a.windowFromDocument(d.documentFromRange(v)).focus(),y||g.releaseRange(v)}function l(e){e.keyCode==u.ENTER?o(e):e.keyCode==u.ESC&&s(e)}var c,h,g=this,v=g.lockRange(),y=!1,b=d.image(v),k=g.editor.options,w=k.imageBrowser,C=!!(n.ui.ImageBrowser&&w&&w.transport&&w.transport.read!==t);h=C?{width:"960px"}:{},c=r.createDialog(g._dialogTemplate(C),g.editor,i(h,k.dialogOptions,{title:f,close:s,resizable:C,activate:function(){if(C){var e=this;new n.ui.ImageBrowser(e.element.find(".k-imagebrowser"),i({},w,{change:function(){e.element.find(p).val(this.value())},apply:o}))}}})).hide().find(".k-dialog-insert").click(o).end().find(".k-dialog-close").click(s).end().find(".k-form-text-row input").keydown(l).end().find(p).val(b?b.getAttribute("src",2):"http://").end().find(m).val(b?b.alt:"").end().show().data("kendoWindow").center(),e(p,c.element).focus().select()}});n.ui.editor.ImageCommand=h,s("insertImage",new o.Tool({command:h,template:new l({template:r.buttonTemplate,title:f})}))}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=n.ui.Widget,o=n.ui.DropDownList,r=n.ui.editor,a=r.Dom,s="change",l="k-state-selected",d="."+l,c=".k-selected-color",u="unselectable",f="background-color",p="aria-selected",m="aria-labelledby",h=n.keys,g=n.template('<div class="k-colorpicker-popup"><ul class="k-reset"># for(var i = 0; i < colors.length; i++) { #<li #=(id && i === 0) ? "id=\\""+id+"\\" aria-selected=\\"true\\"" : "" # class="k-item #= colors[i] == value ? "k-state-selected" : "" #" aria-label="\\##= colors[i]#"><div style="background-color:\\##= colors[i] #"></div></li># } #</ul></div>'),v=i.extend({init:function(t,n){var o,r=this;i.fn.init.call(r,t,n),t=r.element,n=r.options,r._value=n.value,r._ariaId=o=n.ariaId,o&&t.attr(m,o),r.popup=e(g({colors:n.colors,value:n.value.substring(1),id:o})).kendoPopup({anchor:t,toggleTarget:t.find(".k-icon")}).delegate(".k-item","click",function(t){r.select(e(t.currentTarget).find("div").css(f))}).find("*").attr(u,"on").end().data("kendoPopup"),t.attr("tabIndex",0).keydown(function(e){r.keydown(e)}).focus(function(){t.css("outline","1px dotted #000")}).blur(function(){t.css("outline","")}).delegate(".k-tool-icon","click",function(){r.select()}).find("*").attr(u,"on"),r._value&&t.find(c).css(f,r._value)},options:{name:"ColorPicker",colors:"000000,7f7f7f,880015,ed1c24,ff7f27,fff200,22b14c,00a2e8,3f48cc,a349a4,ffffff,c3c3c3,b97a57,ffaec9,ffc90e,efe4b0,b5e61d,99d9ea,7092be,c8bfe7".split(","),value:null},events:[s],select:function(e){var t=this;e?(e=a.toHex(e),t.trigger(s,{value:e})||(t.value(e),t.close())):t.trigger(s,{value:t._value})},open:function(){this.popup.open()},close:function(){this.popup.close()},toggle:function(){this.popup.toggle()},_applyAriaAttributes:function(e,t){var n=this;n.element.removeAttr(m),n.element.attr(m,n._ariaId),e.removeAttr("id"),e.attr(p,!1),t.attr({id:n._ariaId,"aria-selected":!0})},keydown:function(e){var t,n,i,o=this,r=o.popup.element,a=o.popup.visible(),s=!1,c=e.keyCode;c==h.DOWN?(a?(t=r.find(d),n=t[0]?t.next():r.find("li:first"),n[0]&&(t.removeClass(l),n.addClass(l),o._applyAriaAttributes(t,n))):o.open(),s=!0):c==h.UP?(a&&(t=r.find(d),i=t.prev(),i[0]&&(t.removeClass(l),i.addClass(l),o._applyAriaAttributes(t,i))),s=!0):c==h.TAB||c==h.RIGHT||c==h.LEFT?o.close():c==h.ENTER&&(r.find(d).click(),s=!0),s&&e.preventDefault()},value:function(e){var n=this;return e===t?n._value:(e=a.toHex(e),n._value=e,n.element.find(c).css(f,e),t)}}),y=o.extend({init:function(e,t){var n=this;o.fn.init.call(n,e,t),n.value(n.options.title)},options:{name:"SelectBox"},value:function(e){var n=this,i=o.fn.value.call(n,e);return e===t?i:(e!==o.fn.value.call(n)&&(n.text(n.options.title),n._current.removeClass("k-state-selected"),n.current(null),n._oldIndex=n.selectedIndex=-1),t)}});n.ui.editor.ColorPicker=v,n.ui.editor.SelectBox=y}(window.kendo.jQuery),function(e,t){function n(n,i){var o="rtl"==e(n).css("direction"),r=o?"Right":"Left",a="td"!=s.name(n)?"margin"+r:"padding"+r;return i===t?n.style[a]||0:(i>0?n.style[a]=i+"px":(n.style[a]="",n.style.cssText||n.removeAttribute("style")),t)}var i=window.kendo,o=i.Class,r=e.extend,a=i.ui.editor,s=a.Dom,l=a.EditorUtils,d=l.registerTool,c=a.Command,u=a.Tool,f=a.ToolTemplate,p=a.RangeUtils,m=s.blockElements,h=a.BlockFormatFinder,g=a.BlockFormatter,v=o.extend({init:function(){this.finder=new h([{tags:s.blockElements}])},apply:function(t){var i,o,r,a,l,d=this.finder.findSuitable(t),c=[];if(d.length){for(i=0,o=d.length;o>i;i++)s.is(d[i],"li")?e(d[i]).index()?0>e.inArray(d[i].parentNode,c)&&c.push(d[i]):c.push(d[i].parentNode):c.push(d[i]);for(;c.length;)if(r=c.shift(),s.is(r,"li")){a=r.parentNode,l=e(r).prev("li");var u=l.find("ul,ol").last(),f=e(r).children("ul,ol")[0];if(f&&l[0])u[0]?(u.append(r),u.append(e(f).children()),s.remove(f)):(l.append(f),f.insertBefore(r,f.firstChild));else for(f=l.children("ul,ol")[0],f||(f=s.create(r.ownerDocument,s.name(a)),l.append(f));r&&r.parentNode==a;)f.appendChild(r),r=c.shift()}else{var p=parseInt(n(r),10)+30;n(r,p);for(var m=0;c.length>m;m++)e.contains(r,c[m])&&c.splice(m,1)}}else{var h=new g([{tags:"p"}],{style:{marginLeft:30}});h.apply(t)}},remove:function(t){var i,o,r,a,s,l,d,c,u=this.finder.findSuitable(t);for(o=0,r=u.length;r>o;o++){if(d=e(u[o]),d.is("li")){if(a=d.parent(),s=a.parent(),s.is("li,ul,ol")&&!n(a[0])){if(i&&e.contains(i,s[0]))continue;l=d.nextAll("li"),l.length&&e(a[0].cloneNode(!1)).appendTo(d).append(l),s.is("li")?d.insertAfter(s):d.appendTo(s),a.children("li").length||a.remove();continue}if(i==a[0])continue;i=a[0]}else i=u[o];c=parseInt(n(i),10)-30,n(i,c)}}}),y=c.extend({init:function(e){e.formatter={toggle:function(e){(new v).apply(p.nodes(e))}},c.fn.init.call(this,e)}}),b=c.extend({init:function(e){e.formatter={toggle:function(e){(new v).remove(p.nodes(e))}},c.fn.init.call(this,e)}}),k=u.extend({init:function(e){u.fn.init.call(this,r(e,{command:b})),this.finder=new h([{tags:m}])},initialize:function(e){e.attr("unselectable","on").addClass("k-state-disabled")},update:function(i,o){var r,a,l,d,c=this.finder.findSuitable(o);for(l=0,d=c.length;d>l;l++)if(r=n(c[l]),r||(a=e(c[l]).parents("ul,ol").length,r=s.is(c[l],"li")&&(a>1||n(c[l].parentNode))||s.ofType(c[l],["ul","ol"])&&a>0),r)return i.removeClass("k-state-disabled"),t;i.addClass("k-state-disabled").removeClass("k-state-hover")}});r(a,{IndentFormatter:v,IndentCommand:y,OutdentCommand:b,OutdentTool:k}),d("indent",new u({command:y,template:new f({template:l.buttonTemplate,title:"Indent"})})),d("outdent",new k({template:new f({template:l.buttonTemplate,title:"Outdent"})}))}(window.kendo.jQuery),function(e){var t=window.kendo,n=e.extend,i=t.ui.editor,o=i.Dom,r=i.RangeUtils,a=i.EditorUtils,s=i.Command,l=i.Tool,d=i.ToolTemplate,c=s.extend({init:function(e){var t=this;t.options=e,s.fn.init.call(t,e),t.attributes=null,t.async=!0},exec:function(){function t(e){s.value(d.find(f).val()),i(e),a.change&&a.change(),s.trigger("change")}function i(e){e.preventDefault(),d.data("kendoWindow").destroy(),o.windowFromDocument(r.documentFromRange(l)).focus()}var a=this,s=a.editor,l=s.getRange(),d=e(c.template).appendTo(document.body),u=c.indent(s.value()),f=".k-editor-textarea";d.kendoWindow(n({},s.options.dialogOptions,{title:"View HTML",close:i})).hide().find(f).val(u).end().find(".k-dialog-update").click(t).end().find(".k-dialog-close").click(i).end().show().data("kendoWindow").center(),d.find(f).focus()}});n(c,{template:"<div class='k-editor-dialog'><textarea class='k-editor-textarea k-input'></textarea><div class='k-button-wrapper'><button class='k-dialog-update k-button'>Update</button> or <a href='#' class='k-dialog-close k-link'>Close</a></div></div>",indent:function(e){return e.replace(/<\/(p|li|ul|ol|h[1-6]|table|tr|td|th)>/gi,"</$1>\n").replace(/<(ul|ol)([^>]*)><li/gi,"<$1$2>\n<li").replace(/<br \/>/gi,"<br />\n").replace(/\n$/,"")}}),t.ui.editor.ViewHtmlCommand=c,i.EditorUtils.registerTool("viewHtml",new l({command:c,template:new d({template:a.buttonTemplate,title:"View HTML"})}))}(window.kendo.jQuery),function(e){var t=window.kendo,n=t.Class,i=e.extend,o=t.ui.editor,r=o.RangeUtils,a=o.Marker,s=n.extend({init:function(e){this.editor=e,this.formats=[]},apply:function(e){if(this.hasPending()){var t=new a;t.addCaret(e);var n=e.startContainer.childNodes[e.startOffset],o=n.previousSibling;if(o.nodeValue||(o=o.previousSibling),e.setStart(o,o.nodeValue.length-1),t.add(e),!r.textNodes(e).length)return t.remove(e),e.collapse(!0),this.editor.selectRange(e),void 0;for(var s,l=t.end.previousSibling.previousSibling,d=this.formats,c=0;d.length>c;c++){s=d[c];var u=s.command(i({range:e},s.options.params));u.editor=this.editor,u.exec(),e.selectNode(l)}t.remove(e),l.parentNode&&(e.setStart(l,1),e.collapse(!0)),this.clear(),this.editor.selectRange(e)}},hasPending:function(){return this.formats.length>0},isPending:function(e){return!!this.getPending(e)},getPending:function(e){for(var t=this.formats,n=0;t.length>n;n++)if(t[n].name==e)return t[n]},toggle:function(e){for(var t=this.formats,n=0;t.length>n;n++)if(t[n].name==e.name)return t[n].params&&t[n].params.value!=e.params.value?t[n].params.value=e.params.value:t.splice(n,1),void 0;t.push(e)},clear:function(){this.formats=[]}});i(o,{PendingFormats:s})}(window.kendo.jQuery);
|
@@ -1,10 +1,11 @@
|
|
1
1
|
/*
|
2
|
-
* Kendo UI Web v2012.
|
2
|
+
* Kendo UI Web v2012.3.1114 (http://kendoui.com)
|
3
3
|
* Copyright 2012 Telerik AD. All rights reserved.
|
4
4
|
*
|
5
|
-
* Kendo UI Web commercial licenses may be obtained at
|
5
|
+
* Kendo UI Web commercial licenses may be obtained at
|
6
|
+
* https://www.kendoui.com/purchase/license-agreement/kendo-ui-web-commercial.aspx
|
6
7
|
* If you do not own a commercial license, this file shall be governed by the
|
7
8
|
* GNU General Public License (GPL) version 3.
|
8
9
|
* For GPL requirements, please review: http://www.gnu.org/copyleft/gpl.html
|
9
10
|
*/
|
10
|
-
|
11
|
+
(function(e){function t(l,s){l.filters&&(l.filters=e.grep(l.filters,function(e){return t(e,s),e.filters?e.filters.length:e.field!=s}))}function l(e){var t,l,s,a,i,r;if(e&&e.length)for(r=[],t=0,l=e.length;l>t;t++)s=e[t],i=s.text||s.value||s,a=null==s.value?s.text||s:s.value,r[t]={text:i,value:a};return r}var s=window.kendo,a=s.ui,i="kendoNumericTextBox",r="kendoDatePicker",n=e.proxy,o="kendoPopup",d=".kendoFilterMenu",f="Is equal to",u="Is not equal to",p=a.Widget,c='<div><div class="k-filter-help-text">#=messages.info#</div><label><input type="radio" data-#=ns#bind="checked: filters[0].value" value="true" name="filters[0].value"/>#=messages.isTrue#</label><label><input type="radio" data-#=ns#bind="checked: filters[0].value" value="false" name="filters[0].value"/>#=messages.isFalse#</label><button type="submit" class="k-button">#=messages.filter#</button><button type="reset" class="k-button">#=messages.clear#</button></div>',v='<div><div class="k-filter-help-text">#=messages.info#</div><select data-#=ns#bind="value: filters[0].operator" data-#=ns#role="dropdownlist">#for(var op in operators){#<option value="#=op#">#=operators[op]#</option>#}#</select>#if(values){#<select data-#=ns#bind="value:filters[0].value" data-#=ns#text-field="text" data-#=ns#value-field="value" data-#=ns#source=\'#=kendo.stringify(values).replace(/\'/g,"&\\#39;")#\' data-#=ns#role="dropdownlist" data-#=ns#option-label="#=messages.selectValue#"></select>#}else{#<input data-#=ns#bind="value:filters[0].value" class="k-textbox" type="text" data-#=ns#type="#=type#"/>#}##if(extra){#<select class="k-filter-and" data-#=ns#bind="value: logic" data-#=ns#role="dropdownlist"><option value="and">#=messages.and#</option><option value="or">#=messages.or#</option></select><select data-#=ns#bind="value: filters[1].operator" data-#=ns#role="dropdownlist">#for(var op in operators){#<option value="#=op#">#=operators[op]#</option>#}#</select>#if(values){#<select data-#=ns#bind="value:filters[1].value" data-#=ns#text-field="text" data-#=ns#value-field="value" data-#=ns#source=\'#=kendo.stringify(values).replace(/\'/g,"&\\#39;")#\' data-#=ns#role="dropdownlist" data-#=ns#option-label="#=messages.selectValue#"></select>#}else{#<input data-#=ns#bind="value: filters[1].value" class="k-textbox" type="text" data-#=ns#type="#=type#"/>#}##}#<button type="submit" class="k-button">#=messages.filter#</button><button type="reset" class="k-button">#=messages.clear#</button></div>',g=p.extend({init:function(t,a){var f,u,g,m=this,h="string";p.fn.init.call(m,t,a),g=a.operators||{},t=m.element,a=m.options,a.appendToElement?m.link=e():(f=t.addClass("k-filterable").find(".k-grid-filter"),f[0]||(f=t.prepend('<a class="k-grid-filter" href="#"><span class="k-icon k-filter"/></a>').find(".k-grid-filter")),f.attr("tabindex",-1).on("click"+d,n(m._click,m))),m._refreshHandler=n(m.refresh,m),m.dataSource=a.dataSource.bind("change",m._refreshHandler),m.field=a.field||t.attr(s.attr("field")),m.model=m.dataSource.reader.model,m._parse=function(e){return e+""},m.model&&m.model.fields&&(u=m.model.fields[m.field],u&&(h=u.type||"string",m._parse=n(u.parse,u))),a.values&&(h="enums"),g=g[h]||a.operators[h],m.form=e('<form class="k-filter-menu"/>').html(s.template("boolean"===h?c:v)({field:m.field,ns:s.ns,messages:a.messages,extra:a.extra,operators:g,type:h,values:l(a.values)})).on("keydown"+d,n(m._keydown,m)).on("submit"+d,n(m._submit,m)).on("reset"+d,n(m._reset,m)),a.appendToElement?(t.append(m.form),m.popup=m.element.closest(".k-popup").data(o)):(m.popup=m.form[o]({anchor:f,open:n(m._open,m),activate:n(m._activate,m),close:m.options.closeCallback}).data(o),m.link=f),m.form.find("["+s.attr("type")+"=number]").removeClass("k-textbox")[i]().end().find("["+s.attr("type")+"=date]").removeClass("k-textbox")[r](),m.refresh()},refresh:function(){var e=this,t=e.dataSource.filter()||{filters:[],logic:"and"};e.filterModel=s.observable({logic:"and",filters:[{field:e.field,operator:"eq",value:""},{field:e.field,operator:"eq",value:""}]}),s.bind(e.form.children().first(),e.filterModel),e._bind(t)?e.link.addClass("k-state-active"):e.link.removeClass("k-state-active")},destroy:function(){var e=this;p.fn.destroy.call(e),s.unbind(e.form),s.destroy(e.form),e.form.unbind(d),e.popup.destroy(),e.link.unbind(d),e.dataSource.unbind("change",e._refreshHandler)},_bind:function(e){var t,l,s,a,i=this,r=e.filters,n=!1,o=0,d=i.filterModel;for(t=0,l=r.length;l>t;t++)a=r[t],a.field==i.field?(d.set("logic",e.logic),s=d.filters[o],s||(d.filters.push({field:i.field}),s=d.filters[o]),s.set("value",i._parse(a.value)),s.set("operator",a.operator),o++,n=!0):a.filters&&(n=n||i._bind(a));return n},_merge:function(l){var s,a,i,r=this,n=l.logic||"and",o=l.filters,d=r.dataSource.filter()||{filters:[],logic:"and"};for(t(d,r.field),o=e.grep(o,function(e){return""!==e.value}),a=0,i=o.length;i>a;a++)s=o[a],s.value=r._parse(s.value);return o.length&&(d.filters.length?(l.filters=o,"and"!==d.logic&&(d.filters=[{logic:d.logic,filters:d.filters}],d.logic="and"),o.length>1?d.filters.push(l):d.filters.push(o[0])):(d.filters=o,d.logic=n)),d},filter:function(e){e=this._merge(e),e.filters.length&&this.dataSource.filter(e)},clear:function(){var t=this,l=t.dataSource.filter()||{filters:[]};l.filters=e.grep(l.filters,function(l){return l.filters?(l.filters=e.grep(l.filters,function(e){return e.field!=t.field}),l.filters.length):l.field!=t.field}),l.filters.length||(l=null),t.dataSource.filter(l)},_submit:function(e){var t=this;e.preventDefault(),t.filter(t.filterModel.toJSON()),t.popup.close()},_reset:function(){this.clear(),this.popup.close()},_click:function(e){e.preventDefault(),e.stopPropagation(),this.popup.toggle()},_open:function(){var t;e(".k-filter-menu").not(this.form).each(function(){t=e(this).data(o),t&&t.close()})},_activate:function(){this.form.find(":focusable:first").focus()},_keydown:function(e){e.keyCode==s.keys.ESC&&this.popup.close()},options:{name:"FilterMenu",extra:!0,appendToElement:!1,type:"string",operators:{string:{eq:f,neq:u,startswith:"Starts with",contains:"Contains",doesnotcontain:"Does not contain",endswith:"Ends with"},number:{eq:f,neq:u,gte:"Is greater than or equal to",gt:"Is greater than",lte:"Is less than or equal to",lt:"Is less than"},date:{eq:f,neq:u,gte:"Is after or equal to",gt:"Is after",lte:"Is before or equal to",lt:"Is before"},enums:{eq:f,neq:u}},messages:{info:"Show items with value that:",isTrue:"is true",isFalse:"is false",filter:"Filter",clear:"Clear",and:"And",or:"Or",selectValue:"-Select value-"}}});a.plugin(g)})(window.kendo.jQuery);
|
@@ -1,10 +1,11 @@
|
|
1
1
|
/*
|
2
|
-
* Kendo UI Web v2012.
|
2
|
+
* Kendo UI Web v2012.3.1114 (http://kendoui.com)
|
3
3
|
* Copyright 2012 Telerik AD. All rights reserved.
|
4
4
|
*
|
5
|
-
* Kendo UI Web commercial licenses may be obtained at
|
5
|
+
* Kendo UI Web commercial licenses may be obtained at
|
6
|
+
* https://www.kendoui.com/purchase/license-agreement/kendo-ui-web-commercial.aspx
|
6
7
|
* If you do not own a commercial license, this file shall be governed by the
|
7
8
|
* GNU General Public License (GPL) version 3.
|
8
9
|
* For GPL requirements, please review: http://www.gnu.org/copyleft/gpl.html
|
9
10
|
*/
|
10
|
-
;(function(a,b){function ba(a,b,d){var e=c.directions[b],f=d?c.directions[e.reverse]:e;return{direction:f,offset:-f.modifier*(f.vertical?a.outerHeight():a.outerWidth())}}function _(a,b){if(k){var c=a.css(M);if(c==C)return b=="scale"?1:0;var d=c.match(new RegExp(b+"\\s*\\(([\\d\\w\\.]+)")),e=0;d?e=Q(d[1]):(d=c.match(p)||[0,0,0,0,0],b=b.toLowerCase(),r.test(b)?e=parseFloat(d[3]/d[2]):b=="translatey"?e=parseFloat(d[4]/d[2]):b=="scale"?e=parseFloat(d[2]):b=="rotate"&&(e=parseFloat(Math.atan2(d[2],d[1]))));return e}return parseFloat(a.css(b))}function $(c,d,e){var f=[],g={},h,i,l,m,n;for(i in d)h=i.toLowerCase(),n=k&&v.indexOf(h)!=-1,!j.hasHW3D&&n&&w.indexOf(h)==-1?delete d[i]:(m=!1,a.isFunction(d[i])?(l=d[i](c,e),l!==b&&(m=l)):m=d[i],m!==!1&&(n?f.push(i+"("+m+")"):g[i]=m));f.length&&(g[M]=f.join(" "));return g}function Z(c,d,e){var f,g;for(f in d)a.isFunction(d[f])&&(g=d[f](c,e),g!==b?d[f]=g:delete d[f]);return d}function Y(a){for(var b in a)v.indexOf(b)!=-1&&w.indexOf(b)==-1&&delete a[b];return a}function X(a){var b=a.object,c=0;!a||(b.css(a.setup).css(L),b.css(a.CSS).css(M),i.mozilla&&(b.one(l.event,function(){W(b,a)}),c=50),b.data(I,setTimeout(W,a.duration+c,b,a)))}function W(a,b){a.data(I)&&(clearTimeout(a.data(I)),a.removeData(I)),a.css(L,"").css(L),a.dequeue(),b.complete.call(a)}function V(a){var b=[];for(var c in a)b.push(c);return b}function U(b){var d=b.effects,e;d==="zoom"&&(d="zoomIn fadeIn"),d==="slide"&&(d="slide:left"),d==="fade"&&(d="fadeIn"),d==="overlay"&&(d="slideIn:left"),/^overlay:(.+)$/.test(d)&&(d="slideIn:"+RegExp.$1),e=b.reverse&&/^(slide:)/.test(d),e&&delete b.reverse,b.effects=a.extend(c.parseEffects(d,e),{show:!0});return b}function T(a){a.effects.slideIn=a.effects.slide,delete a.effects.slide,delete a.complete;return a}function S(a,b){var c={};if(b){if(document.defaultView&&document.defaultView.getComputedStyle){var d=document.defaultView.getComputedStyle(a,"");e(b,function(a,b){c[b]=d.getPropertyValue(b)})}else if(a.currentStyle){var f=a.currentStyle;e(b,function(a,b){c[b]=f[b.replace(/\-(\w)/g,function(a,b){return b.toUpperCase()})]})}}else c=document.defaultView.getComputedStyle(a,"");return c}function R(a,b){return Q(a.css(b))}function Q(a){return parseInt(a,10)}var c=window.kendo,d=c.fx,e=a.each,f=a.extend,g=a.proxy,h=c.size,i=a.browser,j=c.support,k=j.transforms,l=j.transitions,m={scale:0,scalex:0,scaley:0,scale3d:0},n={translate:0,translatex:0,translatey:0,translate3d:0},o=typeof document.documentElement.style.zoom!="undefined"&&!k,p=/matrix3?d?\s*\(.*,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?/i,q=/^(-?[\d\.\-]+)?[\w\s]*,?\s*(-?[\d\.\-]+)?[\w\s]*/i,r=/translatex?$/i,s=/(zoom|fade|expand)(\w+)/,t=/(zoom|fade|expand)/,u=/[xy]$/i,v=["perspective","rotate","rotatex","rotatey","rotatez","rotate3d","scale","scalex","scaley","scalez","scale3d","skew","skewx","skewy","translate","translatex","translatey","translatez","translate3d","matrix","matrix3d"],w=["rotate","scale","scalex","scaley","skew","skewx","skewy","translate","translatex","translatey","matrix"],x={rotate:"deg",scale:"",skew:"px",translate:"px"},y=k.css,z=Math.round,A="",B="px",C="none",D="auto",E="width",F="height",G="hidden",H="origin",I="abortId",J="overflow",K="translate",L=y+"transition",M=y+"transform",N=y+"perspective",O=y+"backface-visibility";c.directions={left:{reverse:"right",property:"left",transition:"translatex",vertical:!1,modifier:-1},right:{reverse:"left",property:"left",transition:"translatex",vertical:!1,modifier:1},down:{reverse:"up",property:"top",transition:"translatey",vertical:!0,modifier:1},up:{reverse:"down",property:"top",transition:"translatey",vertical:!0,modifier:-1},top:{reverse:"bottom"},bottom:{reverse:"top"},"in":{reverse:"out",modifier:-1},out:{reverse:"in",modifier:1}},f(a.fn,{kendoStop:function(a,b){return l?c.fx.stopQueue(this,a||!1,b||!1):this.stop(a,b)}});if(k&&!l){e(w,function(b,c){a.fn[c]=function(b){if(typeof b=="undefined")return _(this,c);var d=a(this)[0],e=c+"("+b+x[c.replace(u,"")]+")";d.style.cssText.indexOf(M)==-1?a(this).css(M,e):d.style.cssText=d.style.cssText.replace(new RegExp(c+"\\(.*?\\)","i"),e);return this},a.fx.step[c]=function(b){a(b.elem)[c](b.now)}});var P=a.fx.prototype.cur;a.fx.prototype.cur=function(){if(w.indexOf(this.prop)!=-1)return parseFloat(a(this.elem)[this.prop]());return P.apply(this,arguments)}}c.toggleClass=function(a,b,c,d){b&&(b=b.split(" "),l&&(c=f({exclusive:"all",duration:400,ease:"ease-out"},c),a.css(L,c.exclusive+" "+c.duration+"ms "+c.ease),setTimeout(function(){a.css(L,"").css(F)},c.duration)),e(b,function(b,c){a.toggleClass(c,d)}));return a},c.parseEffects=function(a,b){var d={};typeof a=="string"?e(a.split(" "),function(a,e){var f=!t.test(e),g=e.replace(s,function(a,b,c){return b+":"+c.toLowerCase()}),h=g.split(":"),i=h[1],j={};h.length>1&&(j.direction=b&&f?c.directions[i].reverse:i),d[h[0]]=j}):e(a,function(a){var e=this.direction;e&&b&&!t.test(a)&&(this.direction=c.directions[e].reverse),d[a]=this});return d},l&&f(c.fx,{transition:function(b,c,d){d=f({duration:200,ease:"ease-out",complete:null,exclusive:"all"},d),d.duration=a.fx?a.fx.speeds[d.duration]||d.duration:d.duration;var e=$(b,c,d),g={keys:V(e),CSS:e,object:b,setup:{},duration:d.duration,complete:d.complete};g.setup[L]=d.exclusive+" "+d.duration+"ms "+d.ease;var h=b.data("keys")||[];a.merge(h,g.keys),b.data("keys",a.unique(h)),X(g)},stopQueue:function(a,b,c){a.data(I)&&(clearTimeout(a.data(I)),a.removeData(I));var d=this,e,f=a.data("keys"),g=c===!1&&f;g&&(e=S(a[0],f)),a.css(L,"").css(L),g&&a.css(e),a.removeData("keys"),d.complete&&d.complete.call(a),a.stop(b);return a}}),c.fx.promise=function(b,d){var g=[],i;i=c.parseEffects(d.effects),d.effects=i,b.data("animating",!0);var j={keep:[],restore:[]},m={},n,p={setup:[],teardown:[]},q={},r=a.Deferred(function(g){if(h(i)){var o=f({},d,{complete:g.resolve});e(i,function(b,g){var h=c.fx[b];if(h){var i=c.directions[g.direction];g.direction&&i&&(g.direction=d.reverse?i.reverse:g.direction),o=f(!0,o,g),e(p,function(a){h[a]&&p[a].push(h[a])}),e(j,function(b){h[b]&&a.merge(j[b],h[b])}),h.css&&(m=f(m,h.css))}});if(p.setup.length){e(a.unique(j.keep),function(a,c){b.data(c)||b.data(c,b.css(c))}),d.show&&(m=f(m,{display:b.data("olddisplay")||"block"})),k&&!d.reset&&(m=Z(b,m,o),n=b.data("targetTransform"),n&&(m=f(n,m))),m=$(b,m,o),k&&!l&&(m=Y(m)),b.css(m).css(M),e(p.setup,function(){q=f(q,this(b,o))}),c.fx.animate&&(d.init(),b.data("targetTransform",q),c.fx.animate(b,q,o));return}}else d.show&&(b.css({display:b.data("olddisplay")||"block"}).css("display"),d.init());g.resolve()}).promise();g.push(r),a.when.apply(null,g).then(function(){b.removeData("animating").dequeue(),d.hide&&b.data("olddisplay",b.css("display")).hide();if(h(i)){var c=function(){e(a.unique(j.restore),function(a,c){b.css(c,b.data(c))})};c(),o&&!k&&setTimeout(c,0),e(p.teardown,function(){this(b,d)})}d.completeCallback&&d.completeCallback(b)})},c.fx.transitionPromise=function(a,b,d){c.fx.animateTo(a,b,d);return a},f(c.fx,{animate:function(c,g,h){var j=h.transition!==!1;delete h.transition,l&&"transition"in d&&j?d.transition(c,g,h):k?c.animate(Y(g),{queue:!1,show:!1,hide:!1,duration:h.duration,complete:h.complete}):c.each(function(){var c=a(this),d={};e(v,function(a,e){var h,i=g?g[e]+" ":null;if(i){var j=g;if(e in m&&g[e]!==b){h=i.match(q);if(o){var l=(1-h[1])/2;f(j,{zoom:+h[1],marginLeft:c.width()*l,marginTop:c.height()*l})}else k&&f(j,{scale:+h[0]})}else if(e in n&&g[e]!==b){var p=c.css("position"),r=p=="absolute"||p=="fixed";c.data(K)||(r?c.data(K,{top:R(c,"top")||0,left:R(c,"left")||0,bottom:R(c,"bottom"),right:R(c,"right")}):c.data(K,{top:R(c,"marginTop")||0,left:R(c,"marginLeft")||0}));var s=c.data(K);h=i.match(q);if(h){var t=e==K+"y"?+null:+h[1],u=e==K+"y"?+h[1]:+h[2];r?(isNaN(s.right)?isNaN(t)||f(j,{left:s.left+t}):isNaN(t)||f(j,{right:s.right-t}),isNaN(s.bottom)?isNaN(u)||f(j,{top:s.top+u}):isNaN(u)||f(j,{bottom:s.bottom-u})):(isNaN(t)||f(j,{marginLeft:s.left+t}),isNaN(u)||f(j,{marginTop:s.top+u}))}}!k&&e!="scale"&&e in j&&delete j[e],j&&f(d,j)}}),i.msie&&delete d.scale,c.animate(d,{queue:!1,show:!1,hide:!1,duration:h.duration,complete:h.complete})})},animateTo:function(b,c,d){function h(a){c[0].style.cssText="",b[0].style.cssText="",j.mobileOS.android||f.css(J,g),d.completeCallback&&d.completeCallback.call(b,a)}var e,f=b.parents().filter(c.parents()).first(),g;d=U(d),j.mobileOS.android||(g=f.css(J),f.css(J,"hidden")),a.each(d.effects,function(a,b){e=e||b.direction}),d.complete=i.msie?function(){setTimeout(h,0)}:h,d.reset=!0,"slide"in d.effects?(b.kendoAnimate(d),c.kendoAnimate(T(d))):(d.reverse?b:c).kendoAnimate(d)},fade:{keep:["opacity"],css:{opacity:function(a,b){var c=a[0].style.opacity;return b.effects.fade.direction=="in"&&(!c||c==1)?0:1}},restore:["opacity"],setup:function(a,b){return f({opacity:b.effects.fade.direction=="out"?0:1},b.properties)}},zoom:{css:{scale:function(a,b){var c=_(a,"scale");return b.effects.zoom.direction=="in"?c!=1?c:"0.01":1},zoom:function(a,c){var d=a[0].style.zoom;return c.effects.zoom.direction=="in"&&o?d?d:"0.01":b}},setup:function(a,b){var c=b.effects.zoom.direction=="out";if(o){var d=i.version,e=a[0].currentStyle,g=e.width.indexOf("%")!=-1?a.parent().width():a.width(),h=e.height.indexOf("%")!=-1?a.parent().height():Q(e.height),j=d<9&&b.effects.fade?0:(1-Q(a.css("zoom"))/100)/2;a.css({marginLeft:g*(d<8?0:j),marginTop:h*j})}return f({scale:c?.01:1},b.properties)}},slide:{setup:function(a,b){var c=b.reverse,d={},e=ba(a,b.effects.slide.direction,c),g=k&&b.transition!==!1?e.direction.transition:e.direction.property;e.offset/=-(b.divisor||1);if(!c){var h=a.data(H);!h&&h!==0&&a.data(H,_(a,g))}d[g]=c?a.data(H)||0:(a.data(H)||0)+e.offset+B;return f(d,b.properties)}},slideMargin:{setup:function(a,b){var c=a.data(H),d=b.offset,e,g={},h=b.reverse;!h&&!c&&c!==0&&a.data(H,parseFloat(a.css("margin-"+b.axis))),e=a.data(H)||0,g["margin-"+b.axis]=h?e:e+d;return f(g,b.properties)}},slideTo:{setup:function(a,b){var c=(b.offset+"").split(","),d={},e=b.reverse;k&&b.transition!==!1?(d.translatex=e?0:c[0],d.translatey=e?0:c[1]):(d.left=e?0:c[0],d.top=e?0:c[1]),a.css("left");return f(d,b.properties)}},slideIn:{css:{translatex:function(a,c){var d=ba(a,c.effects.slideIn.direction,c.reverse);return d.direction.transition=="translatex"?(c.reverse?0:d.offset)+B:b},translatey:function(a,c){var d=ba(a,c.effects.slideIn.direction,c.reverse);return d.direction.transition=="translatey"?(c.reverse?0:d.offset)+B:b}},setup:function(a,b){var c=b.reverse,d=ba(a,b.effects.slideIn.direction,c),e={};k&&b.transition!==!1?e[d.direction.transition]=(c?d.offset:0)+B:(c||a.css(d.direction.property,d.offset+B),e[d.direction.property]=(c?d.offset:0)+B,a.css(d.direction.property));return f(e,b.properties)}},expand:{keep:[J],css:{overflow:G},restore:[J],setup:function(a,c){var d=c.reverse,e=c.effects.expand.direction,g=(e?e=="vertical":!0)?F:E,h=a[0].style[g],i=a.data(g),j=parseFloat(i||h)||z(a.css(g,D)[g]()),k={};k[g]=(d?0:j)+B,a.css(g,d?j:0).css(g),i===b&&a.data(g,h);return f(k,c.properties)},teardown:function(a,b){var c=b.effects.expand.direction,d=(c?c=="vertical":!0)?F:E,e=a.data(d);(e==D||e===A)&&setTimeout(function(){a.css(d,D).css(d)},0)}},flip:{css:{rotatex:function(a,c){return c.effects.flip.direction=="vertical"?c.reverse?"180deg":"0deg":b},rotatey:function(a,c){return c.effects.flip.direction=="horizontal"?c.reverse?"180deg":"0deg":b}},setup:function(a,b){var d=b.effects.flip.direction=="horizontal"?"rotatey":"rotatex",e=b.reverse,g=a.parent(),h=b.degree,i=b.face,k=b.back,l=d+(e?"(180deg)":"(0deg)"),m=d+(e?"(0deg)":"(180deg)"),n={};j.hasHW3D?(g.css(N)==C&&g.css(N,500),a.css(y+"transform-style","preserve-3d"),i.css(O,G).css(M,l).css("z-index",e?0:-1),k.css(O,G).css(M,m).css("z-index",e?-1:0),n[d]=(e?"-":"")+(h?h:180)+"deg"):c.size(b.effects)==1&&(b.duration=0),i.show(),k.show();return f(n,b.properties)},teardown:function(b,c){c[c.reverse?"back":"face"].hide(),j.hasHW3D&&a().add(c.face).add(c.back).add(b).css(O,"")}},simple:{setup:function(a,b){return b.properties}}}),c.fx.expandVertical=c.fx.expand;var bb=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){setTimeout(a,1e3/60)},bc=c.Class.extend({init:function(){var a=this;a._tickProxy=g(a._tick,a),a._started=!1},tick:a.noop,done:a.noop,onEnd:a.noop,onCancel:a.noop,start:function(){this._started=!0,bb(this._tickProxy)},cancel:function(){this._started=!1,this.onCancel()},_tick:function(){var a=this;!a._started||(a.tick(),a.done()?(a._started=!1,a.onEnd()):bb(a._tickProxy))}}),bd=bc.extend({init:function(a){var b=this;f(b,a),bc.fn.init.call(b)},done:function(){return this.timePassed()>=this.duration},timePassed:function(){return Math.min(this.duration,+(new Date)-this.startDate)},moveTo:function(a){var b=this,c=b.movable;b.initial=c[b.axis],b.delta=a.location-b.initial,b.duration=a.duration||300,b.tick=b._easeProxy(a.ease),b.startDate=+(new Date),b.start()},_easeProxy:function(a){var b=this;return function(){b.movable.moveAxis(b.axis,a(b.timePassed(),b.initial,b.delta,b.duration))}}});f(bd,{easeOutExpo:function(a,b,c,d){return a==d?b+c:c*(-Math.pow(2,-10*a/d)+1)+b},easeOutBack:function(a,b,c,d,e){e=1.70158;return c*((a=a/d-1)*a*((e+1)*a+e)+1)+b}}),d.Animation=bc,d.Transition=bd})(jQuery);
|
11
|
+
(function(e,t){function i(e){return parseInt(e,10)}function r(e,t){return i(e.css(t))}function n(e){var t=e.effects;return"zoom"===t&&(t="zoom:in fade:in"),"fade"===t&&(t="fade:in"),"slide"===t&&(t="tile:left"),/^slide:(.+)$/.test(t)&&(t="tile:"+RegExp.$1),"overlay"===t&&(t="slideIn:left"),/^overlay:(.+)$/.test(t)&&(t="slideIn:"+RegExp.$1),e.effects=h.parseEffects(t),e}function s(e){var t=[];for(var i in e)t.push(i);return t}function o(e){for(var t in e)-1!=F.indexOf(t)&&-1==I.indexOf(t)&&delete e[t];return e}function a(e,t){var i,r,n,s,o=[],a={};for(r in t)i=r.toLowerCase(),s=w&&-1!=F.indexOf(i),!g.hasHW3D&&s&&-1==I.indexOf(i)?delete t[r]:(n=t[r],s?o.push(r+"("+n+")"):a[r]=n);return o.length&&(a[K]=o.join(" ")),a}function c(e,t){if(w){var r=e.css(K);if(r==L)return"scale"==t?1:0;var n=r.match(RegExp(t+"\\s*\\(([\\d\\w\\.]+)")),s=0;return n?s=i(n[1]):(n=r.match(C)||[0,0,0,0,0],t=t.toLowerCase(),E.test(t)?s=parseFloat(n[3]/n[2]):"translatey"==t?s=parseFloat(n[4]/n[2]):"scale"==t?s=parseFloat(n[2]):"rotate"==t&&(s=parseFloat(Math.atan2(n[2],n[1])))),s}return parseFloat(e.css(t))}function l(e){return e.toUpperCase()}function u(e){return e.replace(/^./,l)}function d(e,t){var i=it.extend(t),r=i.prototype.directions;D[e]=i,m.Element.prototype[e]=function(e,t,r,n){return new i(this.element,e,t,r,n)},v(r,function(t,r){m.Element.prototype[e+u(r)]=function(e,t,n){return new i(this.element,r,e,t,n)}})}function f(e,t,i){d(e,{directions:nt,restore:[t],startValue:function(e){return this._startValue=e,this},endValue:function(e){return this._endValue=e,this},shouldHide:function(){return"out"===this._direction&&this._end()===i?!this._reverse:this._reverse},_end:function(){return this._endValue||i},_start:function(){return this._startValue||1},prepare:function(e,i){var r=this,n=r.element.data(t),s=r.shouldHide(),o=isNaN(n)?r._start():n;e[t]=i[t]=r._end(),s?e[t]=o:i[t]=o}})}function p(e,t){var i=h.directions[t].vertical,r=e[i?W:M]()/2+"px";return ot[t].replace("$size",r)}var h=window.kendo,m=h.fx,v=e.each,x=e.extend,y=e.proxy,g=h.support,_=g.browser,w=g.transforms,k=g.transitions,b={scale:0,scalex:0,scaley:0,scale3d:0},T={translate:0,translatex:0,translatey:0,translate3d:0},z=document.documentElement.style.zoom!==t&&!w,C=/matrix3?d?\s*\(.*,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?/i,R=/^(-?[\d\.\-]+)?[\w\s]*,?\s*(-?[\d\.\-]+)?[\w\s]*/i,E=/translatex?$/i,P=/(zoom|fade|expand)(\w+)/,N=/(zoom|fade|expand)/,H=/[xy]$/i,F=["perspective","rotate","rotatex","rotatey","rotatez","rotate3d","scale","scalex","scaley","scalez","scale3d","skew","skewx","skewy","translate","translatex","translatey","translatez","translate3d","matrix","matrix3d"],I=["rotate","scale","scalex","scaley","skew","skewx","skewy","translate","translatex","translatey","matrix"],O={rotate:"deg",scale:"",skew:"px",translate:"px"},q=w.css,D={},$=Math.round,A="",S="px",L="none",V="auto",M="width",W="height",Q="hidden",j="origin",B="abortId",U="overflow",G="translate",J=q+"transition",K=q+"transform",X=q+"perspective",Y=q+"backface-visibility",Z={left:{reverse:"right",property:"left",transition:"translatex",vertical:!1,modifier:-1},right:{reverse:"left",property:"left",transition:"translatex",vertical:!1,modifier:1},down:{reverse:"up",property:"top",transition:"translatey",vertical:!0,modifier:1},up:{reverse:"down",property:"top",transition:"translatey",vertical:!0,modifier:-1},top:{reverse:"bottom"},bottom:{reverse:"top"},"in":{reverse:"out",modifier:-1},out:{reverse:"in",modifier:1},vertical:{reverse:"vertical"},horizontal:{reverse:"horizontal"}};if(h.directions=Z,x(e.fn,{kendoStop:function(e,t){return k?h.fx.stopQueue(this,e||!1,t||!1):this.stop(e,t)}}),w&&!k){v(I,function(i,r){e.fn[r]=function(i){if(i===t)return c(this,r);var n=e(this)[0],s=r+"("+i+O[r.replace(H,"")]+")";return-1==n.style.cssText.indexOf(K)?e(this).css(K,s):n.style.cssText=n.style.cssText.replace(RegExp(r+"\\(.*?\\)","i"),s),this},e.fx.step[r]=function(t){e(t.elem)[r](t.now)}});var et=e.fx.prototype.cur;e.fx.prototype.cur=function(){return-1!=I.indexOf(this.prop)?parseFloat(e(this.elem)[this.prop]()):et.apply(this,arguments)}}h.toggleClass=function(e,t,i,r){return t&&(t=t.split(" "),k&&(i=x({exclusive:"all",duration:400,ease:"ease-out"},i),e.css(J,i.exclusive+" "+i.duration+"ms "+i.ease),setTimeout(function(){e.css(J,"").css(W)},i.duration)),v(t,function(t,i){e.toggleClass(i,r)})),e},h.parseEffects=function(e,t){var i={};return"string"==typeof e?v(e.split(" "),function(e,r){var n=!N.test(r),s=r.replace(P,function(e,t,i){return t+":"+i.toLowerCase()}),o=s.split(":"),a=o[1],c={};o.length>1&&(c.direction=t&&n?Z[a].reverse:a),i[o[0]]=c}):v(e,function(e){var r=this.direction;r&&t&&!N.test(e)&&(this.direction=Z[r].reverse),i[e]=this}),i},k&&x(h.fx,{transition:function(t,i,r){var n,o,c=0,l=t.data("keys")||[];r=x({duration:200,ease:"ease-out",complete:null,exclusive:"all"},r);var u=function(){o&&(clearTimeout(o),o=null,t.removeData(B).dequeue().css(J,"").css(J),r.complete.call(t))};r.duration=e.fx?e.fx.speeds[r.duration]||r.duration:r.duration,n=a(t,i),e.merge(l,s(n)),t.data("keys",e.unique(l)).height(),t.css(J,r.exclusive+" "+r.duration+"ms "+r.ease).css(J),t.css(n).css(K),_.mozilla&&(t.one(k.event,u),c=50),o=setTimeout(u,r.duration+c),t.data(B,o)},stopQueue:function(e,t,i){e.data(B)&&(clearTimeout(e.data(B)),e.removeData(B));var r,n=this,s=e.data("keys"),o=i===!1&&s;return o&&(r=h.getComputedStyles(e[0],s)),e.css(J,"").css(J),o&&e.css(r),e.removeData("keys"),n.complete&&n.complete.call(e),e.stop(t),e}});var tt=h.Class.extend({init:function(e,t){var i=this;i.element=e,i.effects=[],i.options=t,i.restore=[]},run:function(t){var i,r,n,s,c,l,u=this,d=t.length,f=u.element,p=u.options,m=e.Deferred(),v={},y={};for(u.effects=t,m.then(e.proxy(u,"complete")),f.data("animating",!0),r=0;d>r;r++)for(i=t[r],i.setReverse(p.reverse),i.setOptions(p),u.addRestoreProperties(i.restore),i.prepare(v,y),c=i.children(),n=0,l=c.length;l>n;n++)c[n].duration(p.duration).run();for(var g in p.effects)x(y,p.effects[g].properties);for(f.is(":visible")||x(v,{display:f.data("olddisplay")||"block"}),w&&!p.reset&&(s=f.data("targetTransform"),s&&(v=x(s,v))),v=a(f,v),w&&!k&&(v=o(v)),f.css(v).css(K),r=0;d>r;r++)t[r].setup();return p.init&&p.init(),f.data("targetTransform",y),h.fx.animate(f,y,x({},p,{complete:m.resolve})),m.promise()},stop:function(){e(this.element).kendoStop()},addRestoreProperties:function(e){for(var t,i=this.element,r=0,n=e.length;n>r;r++)t=e[r],this.restore.push(t),i.data(t)||i.data(t,i.css(t))},restoreCallback:function(){for(var e=this.element,t=0,i=this.restore.length;i>t;t++){var r=this.restore[t];e.css(r,e.data(r))}},complete:function(){var t=this,i=0,r=t.element,n=t.options,s=t.effects,o=s.length;for(r.removeData("animating").dequeue(),n.hide&&r.data("olddisplay",r.css("display")).hide(),this.restoreCallback(),z&&!w&&setTimeout(e.proxy(this,"restoreCallback"),0);o>i;i++)s[i].teardown();n.completeCallback&&n.completeCallback(r)}});h.fx.promise=function(e,t){var i,r,n=[],s=new tt(e,t),o=h.parseEffects(t.effects);t.effects=o;for(var a in o)i=D[a],i&&(r=new i(e,o[a].direction),n.push(r));n[0]?s.run(n):(e.is(":visible")||e.css({display:e.data("olddisplay")||"block"}).css("display"),t.init&&t.init(),e.dequeue(),s.complete())},h.fx.transitionPromise=function(e,t,i){return h.fx.animateTo(e,t,i),e},x(h.fx,{animate:function(i,n,s){var a=s.transition!==!1;delete s.transition,k&&"transition"in m&&a?m.transition(i,n,s):w?i.animate(o(n),{queue:!1,show:!1,hide:!1,duration:s.duration,complete:s.complete}):i.each(function(){var i=e(this),o={};v(F,function(e,s){var a,c=n?n[s]+" ":null;if(c){var l=n;if(s in b&&n[s]!==t)a=c.match(R),w&&x(l,{scale:+a[0]});else if(s in T&&n[s]!==t){var u=i.css("position"),d="absolute"==u||"fixed"==u;i.data(G)||(d?i.data(G,{top:r(i,"top")||0,left:r(i,"left")||0,bottom:r(i,"bottom"),right:r(i,"right")}):i.data(G,{top:r(i,"marginTop")||0,left:r(i,"marginLeft")||0}));var f=i.data(G);if(a=c.match(R)){var p=s==G+"y"?0:+a[1],h=s==G+"y"?+a[1]:+a[2];d?(isNaN(f.right)?isNaN(p)||x(l,{left:f.left+p}):isNaN(p)||x(l,{right:f.right-p}),isNaN(f.bottom)?isNaN(h)||x(l,{top:f.top+h}):isNaN(h)||x(l,{bottom:f.bottom-h})):(isNaN(p)||x(l,{marginLeft:f.left+p}),isNaN(h)||x(l,{marginTop:f.top+h}))}}!w&&"scale"!=s&&s in l&&delete l[s],l&&x(o,l)}}),_.msie&&delete o.scale,i.animate(o,{queue:!1,show:!1,hide:!1,duration:s.duration,complete:s.complete})})},animateTo:function(t,i,r){function s(e){i[0].style.cssText="",t[0].style.cssText="",g.mobileOS.android||c.css(U,a),r.completeCallback&&r.completeCallback.call(t,e)}var o,a,c=t.parents().filter(i.parents()).first();r=n(r),g.mobileOS.android||(a=c.css(U),c.css(U,"hidden")),e.each(r.effects,function(e,t){o=o||t.direction}),r.complete=_.msie?function(){setTimeout(s,0)}:s,r.previous=r.reverse?i:t,r.reset=!0,(r.reverse?t:i).each(function(){e(this).kendoAnimate(x(!0,{},r)),r.complete=null,r.previous=null})}});var it=h.Class.extend({init:function(e,t){var i=this;i.element=e,i._direction=t,i.options={},i._additionalEffects=[],i.restore||(i.restore=[])},reverse:function(){return this._reverse=!0,this.run()},play:function(){return this._reverse=!1,this.run()},add:function(e){return this._additionalEffects.push(e),this},direction:function(e){return this._direction=e,this},duration:function(e){return this._duration=e,this},compositeRun:function(){var e=this,t=new tt(e.element,{reverse:e._reverse,duration:e._duration}),i=e._additionalEffects.concat([e]);return t.run(i)},run:function(){if(this._additionalEffects&&this._additionalEffects[0])return this.compositeRun();var t,i,r=this,n=r.element,s=0,c=r.restore,l=c.length,u=e.Deferred(),d={},f={},p=r.children(),m=p.length;for(u.then(e.proxy(r,"_complete")),n.data("animating",!0),s=0;l>s;s++)t=c[s],n.data(t)||n.data(t,n.css(t));for(s=0;m>s;s++)p[s].duration(r._duration).run();return r.prepare(d,f),n.is(":visible")||x(d,{display:n.data("olddisplay")||"block"}),w&&(i=n.data("targetTransform"),i&&(d=x(i,d))),d=a(n,d),w&&!k&&(d=o(d)),n.css(d).css(K),r.setup(),n.data("targetTransform",f),h.fx.animate(n,f,{duration:r._duration,complete:u.resolve}),u.promise()},stop:function(){var t=0,i=this.children(),r=i.length;for(t=0;r>t;t++)i[t].stop();return e(this.element).kendoStop(),this},restoreCallback:function(){for(var e=this.element,t=0,i=this.restore.length;i>t;t++){var r=this.restore[t];e.css(r,e.data(r))}},_complete:function(){var t=this,i=t.element;i.removeData("animating").dequeue(),t.restoreCallback(),t.shouldHide()&&i.data("olddisplay",i.css("display")).hide(),z&&!w&&setTimeout(e.proxy(t,"restoreCallback"),0),t.teardown()},setOptions:function(e){x(!0,this.options,e)},children:function(){return[]},shouldHide:e.noop,setup:e.noop,prepare:e.noop,teardown:e.noop,directions:[],setReverse:function(e){return this._reverse=e,this}}),rt=["left","right","up","down"],nt=["in","out"];d("slideIn",{directions:rt,prepare:function(e,t){var i,r=this,n=r.element,s=Z[r._direction],o=-s.modifier*(s.vertical?n.outerHeight():n.outerWidth()),a=o/(r.options&&r.options.divisor||1)+S,c="0px";r._reverse&&(i=e,e=t,t=i),w?(e[s.transition]=a,t[s.transition]=c):(e[s.property]=a,t[s.property]=c)}}),d("tile",{directions:rt,init:function(e,t,i){it.prototype.init.call(this,e,t),this.options={previous:i}},children:function(){var e=this,t=e._reverse,i=e.options.previous,r=e._direction,n=[m(e.element).slideIn(r).setReverse(t)];return i&&n.push(m(i).slideIn(Z[r].reverse).setReverse(!t)),n}}),f("fade","opacity",0),f("zoom","scale",.01),d("slideMargin",{prepare:function(e,t){var i,r=this,n=r.element,s=r.options,o=n.data(j),a=s.offset,c=r._reverse;c||null!==o||n.data(j,parseFloat(n.css("margin-"+s.axis))),i=n.data(j)||0,t["margin-"+s.axis]=c?i:i+a}}),d("slideTo",{prepare:function(e,t){var i=this,r=i.element,n=i.options,s=n.offset.split(","),o=i._reverse;w?(t.translatex=o?0:s[0],t.translatey=o?0:s[1]):(t.left=o?0:s[0],t.top=o?0:s[1]),r.css("left")}}),d("expand",{directions:["horizontal","vertical"],restore:[U],prepare:function(e,i){var r=this,n=r.element,s=r.options,o=r._reverse,a="vertical"===r._direction?W:M,c=n[0].style[a],l=n.data(a),u=parseFloat(l||c),d=$(n.css(a,V)[a]());e.overflow=Q,u=s&&s.reset?d||u:u||d,i[a]=(o?0:u)+S,e[a]=(o?u:0)+S,l===t&&n.data(a,c)},shouldHide:function(){return this._reverse},teardown:function(){var e=this,t=e.element,i="vertical"===e._direction?W:M,r=t.data(i);(r==V||r===A)&&setTimeout(function(){t.css(i,V).css(i)},0)}});var st={position:"absolute",marginLeft:0,marginTop:0,scale:1};d("transfer",{init:function(e,t){this.element=e,this.options={target:t},this.restore=[]},setup:function(){this.element.appendTo(document.body)},prepare:function(e,t){var i,r=this,n=r.element,s=r.options,o=r._reverse,a=s.target,l=c(n,"scale"),u=a.offset(),d=a.outerHeight()/n.outerHeight();x(e,st),t.scale=1,n.css(K,"scale(1)").css(K),i=n.offset(),n.css(K,"scale("+l+")");var f=0,p=0,h=u.left-i.left,m=u.top-i.top,v=f+n.outerWidth(),y=p,g=h+a.outerWidth(),_=m,w=(m-p)/(h-f),k=(_-y)/(g-v),b=(p-y-w*f+k*v)/(k-w),T=p+w*(b-f);e.top=i.top,e.left=i.left,e.transformOrigin=b+S+" "+T+S,o?e.scale=d:t.scale=d}});var ot={top:"rect(auto auto $size auto)",bottom:"rect($size auto auto auto)",left:"rect(auto $size auto auto)",right:"rect(auto auto auto $size)"},at={top:{start:"rotatex(0deg)",end:"rotatex(180deg)"},bottom:{start:"rotatex(-180deg)",end:"rotatex(0deg)"},left:{start:"rotatey(0deg)",end:"rotatey(-180deg)"},right:{start:"rotatey(180deg)",end:"rotatey(0deg)"}};d("turningPage",{directions:rt,init:function(e,t,i){it.prototype.init.call(this,e,t),this._container=i},prepare:function(e,t){var i=this,r=i._reverse,n=r?Z[i._direction].reverse:i._direction,s=at[n];e.zIndex=1,i._clipInHalf&&(e.clip=p(i._container,h.directions[n].reverse)),e[Y]=Q,t[K]=r?s.start:s.end,e[K]=r?s.end:s.start},setup:function(){this._container.append(this.element)},face:function(e){return this._face=e,this},shouldHide:function(){var e=this,t=e._reverse,i=e._face;return t&&!i||!t&&i},clipInHalf:function(e){return this._clipInHalf=e,this},temporary:function(e){return this._temporary=e,this},teardown:function(){this._temporary&&this.element.remove()}}),d("staticPage",{directions:rt,init:function(e,t,i){it.prototype.init.call(this,e,t),this._container=i},restore:["clip"],prepare:function(e){var t=this,i=t._reverse?Z[t._direction].reverse:t._direction;e.clip=p(t._container,i)},shouldHide:function(){var e=this,t=e._reverse,i=e._face;return t&&!i||!t&&i},face:function(e){return this._face=e,this}}),d("pageturn",{directions:["horizontal","vertical"],init:function(e,t,i,r){it.prototype.init.call(this,e,t),this.options={},this.options.face=i,this.options.back=r},children:function(){var e,t=this,i=t.options,r="horizontal"===t._direction?"left":"top",n=h.directions[r].reverse,s=t._reverse,o=i.face.clone(!0).removeAttr("id"),a=i.back.clone(!0).removeAttr("id"),c=t.element;return s&&(e=r,r=n,n=e),[m(i.face).staticPage(r,c).face(!0).setReverse(s),m(i.back).staticPage(n,c).setReverse(s),m(o).turningPage(r,c).face(!0).clipInHalf(!0).temporary(!0).setReverse(s),m(a).turningPage(n,c).clipInHalf(!0).temporary(!0).setReverse(s)]},prepare:function(e){e[X]=1e3,e.transformStyle="preserve-3d"},teardown:function(){this.element.find(".temp-pages").remove()}}),d("flip",{directions:["horizontal","vertical"],init:function(e,t,i,r){it.prototype.init.call(this,e,t),this.options={},this.options.face=i,this.options.back=r},children:function(){var e,t=this,i=t.options,r="horizontal"===t._direction?"left":"top",n=h.directions[r].reverse,s=t._reverse,o=t.element;return s&&(e=r,r=n,n=e),[m(i.face).turningPage(r,o).face(!0).setReverse(s),m(i.back).turningPage(n,o).setReverse(s)]},prepare:function(e){e[X]=1e3,e.transformStyle="preserve-3d"}});var ct=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){setTimeout(e,1e3/60)},lt=h.Class.extend({init:function(){var e=this;e._tickProxy=y(e._tick,e),e._started=!1},tick:e.noop,done:e.noop,onEnd:e.noop,onCancel:e.noop,start:function(){this.done()||(this._started=!0,ct(this._tickProxy))},cancel:function(){this._started=!1,this.onCancel()},_tick:function(){var e=this;e._started&&(e.tick(),e.done()?(e._started=!1,e.onEnd()):ct(e._tickProxy))}}),ut=lt.extend({init:function(e){var t=this;x(t,e),lt.fn.init.call(t)},done:function(){return this.timePassed()>=this.duration},timePassed:function(){return Math.min(this.duration,+new Date-this.startDate)},moveTo:function(e){var t=this,i=t.movable;t.initial=i[t.axis],t.delta=e.location-t.initial,t.duration=e.duration||300,t.tick=t._easeProxy(e.ease),t.startDate=+new Date,t.start()},_easeProxy:function(e){var t=this;return function(){t.movable.moveAxis(t.axis,e(t.timePassed(),t.initial,t.delta,t.duration))}}});x(ut,{easeOutExpo:function(e,t,i,r){return e==r?t+i:i*(-Math.pow(2,-10*e/r)+1)+t},easeOutBack:function(e,t,i,r,n){return n=1.70158,i*((e=e/r-1)*e*((n+1)*e+n)+1)+t}}),m.Animation=lt,m.Transition=ut,m.createEffect=d,m.Effects=D})(window.kendo.jQuery);
|
@@ -1,10 +1,12 @@
|
|
1
1
|
/*
|
2
|
-
* Kendo UI Web v2012.
|
2
|
+
* Kendo UI Web v2012.3.1114 (http://kendoui.com)
|
3
3
|
* Copyright 2012 Telerik AD. All rights reserved.
|
4
4
|
*
|
5
|
-
* Kendo UI Web commercial licenses may be obtained at
|
5
|
+
* Kendo UI Web commercial licenses may be obtained at
|
6
|
+
* https://www.kendoui.com/purchase/license-agreement/kendo-ui-web-commercial.aspx
|
6
7
|
* If you do not own a commercial license, this file shall be governed by the
|
7
8
|
* GNU General Public License (GPL) version 3.
|
8
9
|
* For GPL requirements, please review: http://www.gnu.org/copyleft/gpl.html
|
9
10
|
*/
|
10
|
-
;(function(a,b){function bm(a,b){var c,d,e;if(typeof a===U&&a===b)return a;if(j(a)&&a.name===b)return a;if(n(a))for(c=0,d=a.length;c<d;c++){e=a[c];if(typeof e===U&&e===b||e.name===b)return e}return null}function bk(b,d,e,f){var g=b.find(">colgroup"),h,i=l(d,function(a){h=a.width;if(h&&parseInt(h,10)!==0)return c.format('<col style="width:{0}"/>',typeof h===U?h:h+"px");return"<col />"});(e||g.find(".k-hierarchy-col").length)&&i.splice(0,0,'<col class="k-hierarchy-col" />'),g.length&&g.remove(),g=a("<colgroup/>").append(a(Array(f+1).join('<col class="k-group-col">')+i.join(""))),b.prepend(g)}function bj(a){a=a||{};var b=a.style;b&&(a.style=b.replace(/((.*)?)(display\s*:\s*none)\s*;?/i,"$1"));return a}function bi(a){a=a||{};var b=a.style;b?(b=b.replace(/((.*)?display)(.*)?:([^;]*)/i,"$1:none"),b===a.style&&(b=b.replace(/(.*)?/i,"display:none;$1"))):b="display:none";return k({},a,{style:b})}function bh(a){return m(a,function(a){return!a.hidden})}function bg(a,b,c){var d,e,f,g;c=n(c)?c:[c];for(d=0,e=c.length;d<e;d++)f=c[d],j(f)&&f.click&&(g=f.name||f.text,b.on(Q,"a.k-grid-"+g,{commandName:g},p(f.click,a)))}function bf(a,b,c){var d=a.eq(b),e=a.eq(c);d[b>c?"insertBefore":"insertAfter"](e)}function be(a){var b,c,d={},e={};if(!r(a)){n(a)||(a=[a]);for(b=0,c=a.length;b<c;b++)d[a[b].aggregate]=0,e[a[b].field]=d}return e}function bd(b,c){a("th, th .k-grid-filter, th .k-link",b).add(document.body).css("cursor",c)}function bc(b){var c=0;a("> .k-grouping-header, > .k-grid-toolbar",b).each(function(){c+=this.offsetHeight});return c}function ba(a){var b,c=" ";if(a){if(typeof a===U)return a;for(b in a)c+=b+'="'+a[b]+'"'}return c}function _(a){return Array(a+1).join('<td class="k-group-cell"> </td>')}var c=window.kendo,d=c.ui,e=c.data.DataSource,f=d.Groupable,g=c.support.tbodyInnerHtml,h=d.Widget,i=c.keys,j=a.isPlainObject,k=a.extend,l=a.map,m=a.grep,n=a.isArray,o=a.inArray,p=a.proxy,q=a.isFunction,r=a.isEmptyObject,s=Math,t="requestStart",u="error",v="tbody>tr:not(.k-grouping-row,.k-detail-row,.k-group-footer):visible",w=":not(.k-group-cell,.k-hierarchy-cell):visible",x="tbody>tr:not(.k-grouping-row,.k-detail-row,.k-group-footer) > td:not(.k-group-cell,.k-hierarchy-cell)",y=v+">td"+w,z=y+":first",A="edit",B="save",C="remove",D="detailInit",E="change",F="columnHide",G="columnShow",H="saveChanges",I="dataBound",J="detailExpand",K="detailCollapse",L="k-state-focused",M="k-focusable",N="k-state-selected",O="columnResize",P="columnReorder",Q="click",R="height",S="tabIndex",T="function",U="string",V="Are you sure you want to delete this record?",W=/(\}|\#)/ig,X=3,Y=/#/ig,Z='<a class="k-button k-button-icontext #=className#" #=attr# href="\\#"><span class="#=iconClass# #=imageClass#"></span>#=text#</a>',$=h.extend({init:function(a,b){var c=this;h.fn.init.call(c,a,b),c._refreshHandler=p(c.refresh,c),c.setDataSource(b.dataSource),c.wrap()},setDataSource:function(a){var b=this;b.dataSource&&b.dataSource.unbind(E,b._refreshHandler),b.dataSource=a,b.dataSource.bind(E,b._refreshHandler)},options:{name:"VirtualScrollable",itemHeight:a.noop},wrap:function(){var b=this,d=c.support.scrollbar()+1,e=b.element;e.css({width:"auto",paddingRight:d,overflow:"hidden"}),b.content=e.children().first(),b.wrapper=b.content.wrap('<div class="k-virtual-scrollable-wrap"/>').parent().bind("DOMMouseScroll",p(b._wheelScroll,b)).bind("mousewheel",p(b._wheelScroll,b)),c.support.touch&&(b.drag=new c.Drag(b.wrapper,{global:!0,move:function(a){b.verticalScrollbar.scrollTop(b.verticalScrollbar.scrollTop()-a.y.delta),a.preventDefault()}})),b.verticalScrollbar=a('<div class="k-scrollbar k-scrollbar-vertical" />').css({width:d}).appendTo(e).bind("scroll",p(b._scroll,b))},_wheelScroll:function(b){var c=this,d=c.verticalScrollbar.scrollTop(),e=b.originalEvent,f;b.preventDefault(),e.wheelDelta?f=e.wheelDelta:e.detail?f=-e.detail*10:a.browser.opera&&(f=-e.wheelDelta),c.verticalScrollbar.scrollTop(d+ -f)},_scroll:function(a){var b=this,c=a.currentTarget.scrollTop,d=b.dataSource,e=b.itemHeight,f=d.skip()||0,g=b._rangeStart||f,h=b.element.innerHeight(),i=!!(b._scrollbarTop&&b._scrollbarTop>c),j=s.max(s.floor(c/e),0),k=s.max(j+s.floor(h/e),0);b._scrollTop=c-g*e,b._scrollbarTop=c,b._fetch(j,k,i)||(b.wrapper[0].scrollTop=b._scrollTop)},_fetch:function(a,b,c){var d=this,e=d.dataSource,f=d.itemHeight,g=e.take(),h=d._rangeStart||e.skip()||0,i=s.floor(a/g)*g,j=!1,k=.33;a<h?(j=!0,h=s.max(0,b-g),d._scrollTop=(a-h)*f,d._page(h,g)):b>=h+g&&!c?(j=!0,h=a,d._scrollTop=f,d._page(h,g)):d._fetching||(a<i+g-g*k&&a>g&&e.prefetch(i-g,g),b>i+g*k&&e.prefetch(i+g,g));return j},_page:function(a,b){var d=this,e=d.dataSource;clearTimeout(d._timeout),d._fetching=!0,d._rangeStart=a,e.inRange(a,b)?e.range(a,b):(c.ui.progress(d.wrapper.parent(),!0),d._timeout=setTimeout(function(){e.range(a,b)},100))},refresh:function(){var a=this,b="",d=25e4,e=a.dataSource,f=a._rangeStart,g=c.support.scrollbar(),h=a.wrapper[0],i,j,k;c.ui.progress(a.wrapper.parent(),!1),clearTimeout(a._timeout),k=a.itemHeight=a.options.itemHeight()||0;var l=h.scrollWidth>h.offsetWidth?g:0;i=e.total()*k+l;for(j=0;j<s.floor(i/d);j++)b+='<div style="width:1px;height:'+d+'px"></div>';i%d&&(b+='<div style="width:1px;height:'+i%d+'px"></div>'),a.verticalScrollbar.html(b),h.scrollTop=a._scrollTop,a.drag&&a.drag.cancel(),f&&!a._fetching&&(a._rangeStart=e.skip()),a._fetching=!1}}),bb={create:{text:"Add new record",imageClass:"k-add",className:"k-grid-add",iconClass:"k-icon"},cancel:{text:"Cancel changes",imageClass:"k-cancel",className:"k-grid-cancel-changes",iconClass:"k-icon"},save:{text:"Save changes",imageClass:"k-update",className:"k-grid-save-changes",iconClass:"k-icon"},destroy:{text:"Delete",imageClass:"k-delete",className:"k-grid-delete",iconClass:"k-icon"},edit:{text:"Edit",imageClass:"k-edit",className:"k-grid-edit",iconClass:"k-icon"},update:{text:"Update",imageClass:"k-update",className:"k-grid-update",iconClass:"k-icon"},canceledit:{text:"Cancel",imageClass:"k-cancel",className:"k-grid-cancel",iconClass:"k-icon"}},bl=h.extend({init:function(a,b){var d=this;b=n(b)?{dataSource:b}:b,h.fn.init.call(d,a,b),d._element(),d._columns(d.options.columns),d._dataSource(),d._tbody(),d._pageable(),d._thead(),d._groupable(),d._toolbar(),d._setContentHeight(),d._templates(),d._navigatable(),d._selectable(),d._details(),d._editable(),d._attachCustomCommandsEvent(),d.options.autoBind&&d.dataSource.fetch(),c.notify(d)},events:[E,"dataBinding",I,J,K,D,A,B,C,H,O,P,G,F],setDataSource:function(a){var b=this;b.options.dataSource=a,b._dataSource(),b._pageable(),b.options.groupable&&b._groupable(),b._thead(),b.virtualScrollable&&b.virtualScrollable.setDataSource(b.options.dataSource),b.options.autoBind&&a.fetch()},options:{name:"Grid",columns:[],toolbar:null,autoBind:!0,filterable:!1,scrollable:!0,sortable:!1,selectable:!1,navigatable:!1,pageable:!1,editable:!1,groupable:!1,rowTemplate:"",altRowTemplate:"",dataSource:{},height:null,resizable:!1,reorderable:!1,columnMenu:!1},setOptions:function(a){var b=this;h.fn.setOptions.call(this,a),b._templates()},items:function(){return this.tbody.children(":not(.k-grouping-row,.k-detail-row,.k-group-footer)")},_attachCustomCommandsEvent:function(){var a=this,b=a.columns||[],c,d,e;for(d=0,e=b.length;d<e;d++)c=b[d].command,c&&bg(a,a.wrapper,c)},_element:function(){var b=this,c=b.element;c.is("table")||(b.options.scrollable?c=b.element.find("> .k-grid-content > table"):c=b.element.children("table"),c.length||(c=a("<table />").appendTo(b.element))),b.table=c.attr("cellspacing",0),b._wrapper()},_positionColumnResizeHandle:function(b){var c=this,d=c.options.scrollable,e=c.resizeHandle,f;c.thead.on("mousemove","th:not(.k-group-cell,.k-hierarchy-cell)",function(g){var h=a(this),i=h.offset().left+this.offsetWidth;g.clientX>i-X&&g.clientX<i+X?(bd(c.wrapper,h.css("cursor")),e||(e=c.resizeHandle=a('<div class="k-resize-handle"/>'),b.append(e)),f=this.offsetWidth,h.prevAll().each(function(){f+=this.offsetWidth}),e.css({top:d?0:bc(c.wrapper),left:f-X,height:h.outerHeight(),width:X*3}).data("th",h).show()):(bd(c.wrapper,""),e&&e.hide())})},_resizable:function(){var b=this,c=b.options,d,e,f,g,h;c.resizable&&(d=c.scrollable?b.wrapper.find(".k-grid-header-wrap"):b.wrapper,b._positionColumnResizeHandle(d),d.kendoResizable({handle:".k-resize-handle",hint:function(c){return a('<div class="k-grid-resize-indicator" />').css({height:c.data("th").outerHeight()+b.tbody.attr("clientHeight")})},start:function(d){var i=a(d.currentTarget).data("th"),j=a.inArray(i[0],i.parent().children(":visible")),k=b.tbody.parent(),l=b.footer||a();bd(b.wrapper,i.css("cursor")),c.scrollable?h=b.thead.parent().find("col:eq("+j+")").add(k.children("colgroup").find("col:eq("+j+")")).add(l.find("colgroup").find("col:eq("+j+")")):h=k.children("colgroup").find("col:eq("+j+")"),e=d.x.location,f=i.outerWidth(),g=b.tbody.outerWidth()},resize:function(d){var i=f+d.x.location-e,j=b.footer||a();i>10&&(h.css("width",i),c.scrollable&&(b._footerWidth=g+d.x.location-e,b.tbody.parent().add(b.thead.parent()).add(j.find("table")).css("width",b._footerWidth)))},resizeend:function(c){var d=a(c.currentTarget).data("th"),e=d.outerWidth(),g;bd(b.wrapper,""),f!=e&&(g=b.columns[d.parent().find("th:not(.k-group-cell,.k-hierarchy-cell)").index(d)],g.width=e,b.trigger(O,{column:g,oldWidth:f,newWidth:e})),b.resizeHandle.hide()}}))},_draggable:function(){var b=this;b.options.reorderable&&(b._draggableInstance=b.thead.kendoDraggable({group:c.guid(),filter:".k-header:not(.k-group-cell,.k-hierarchy-cell):visible["+c.attr("field")+"]",hint:function(b){return a('<div class="k-header k-drag-clue" />').css({width:b.width(),paddingLeft:b.css("paddingLeft"),paddingRight:b.css("paddingRight"),lineHeight:b.height()+"px",paddingTop:b.css("paddingTop"),paddingBottom:b.css("paddingBottom")}).html(b.attr(c.attr("title"))||b.attr(c.attr("field"))).prepend('<span class="k-icon k-drag-status k-denied" />')}}).data("kendoDraggable"))},_reorderable:function(){var a=this;a.options.reorderable&&a.thead.kendoReorderable({draggable:a._draggableInstance,change:function(b){var c=bh(a.columns)[b.oldIndex];a.trigger(P,{newIndex:b.newIndex,oldIndex:b.oldIndex,column:c}),a.reorderColumn(b.newIndex,c)}})},reorderColumn:function(b,c){var d=this,e=a.inArray(c,d.columns),f=a.inArray(c,bh(d.columns)),g,h,i,j=d.footer||d.wrapper.find(".k-grid-footer");if(e!==b){d.columns.splice(e,1),d.columns.splice(b,0,c),d._templates(),bf(d.thead.prev().find("col:not(.k-group-col,.k-hierarchy-col)"),f,b),d.options.scrollable&&bf(d.tbody.prev().find("col:not(.k-group-col,.k-hierarchy-col)"),f,b),bf(d.thead.find(".k-header:not(.k-group-cell,.k-hierarchy-cell)"),e,b),j&&j.length&&(bf(j.find(".k-grid-footer-wrap>table>colgroup>col:not(.k-group-col,.k-hierarchy-col)"),f,b),bf(j.find(".k-footer-template>td:not(.k-group-cell,.k-hierarchy-cell)"),e,b)),g=d.tbody.children(":not(.k-grouping-row,.k-detail-row)");for(h=0,i=g.length;h<i;h+=1)bf(g.eq(h).find(">td:not(.k-group-cell,.k-hierarchy-cell)"),e,b)}},cellIndex:function(b){return a(b).parent().find("td:not(.k-group-cell,.k-hierarchy-cell)").index(b)},_modelForContainer:function(b){b=a(b),!b.is("tr")&&this._editMode()!=="popup"&&(b=b.closest("tr"));var d=b.attr(c.attr("uid"));return this.dataSource.getByUid(d)},_editable:function(){var b=this,c=b.options.editable,d=function(){var c=document.activeElement,d=b._editContainer;d&&!a.contains(d[0],c)&&d[0]!==c&&!a(c).closest(".k-animation-container").length&&b.editable.end()&&b.closeCell()};if(c){var e=b._editMode();e==="incell"?c.update!==!1&&(b.wrapper.delegate("tr:not(.k-grouping-row) > td:not(.k-hierarchy-cell,.k-detail-cell,.k-group-cell,.k-edit-cell,:has(a.k-grid-delete))",Q,function(c){var d=a(this);d.closest("tbody")[0]===b.tbody[0]&&!a(c.target).is(":input")&&(b.editable?b.editable.end()&&(b.closeCell(),b.editCell(d)):b.editCell(d))}),b.wrapper.bind("focusin",function(a){clearTimeout(b.timer),b.timer=null}),b.wrapper.bind("focusout",function(a){b.timer=setTimeout(d,1)})):c.update!==!1&&b.wrapper.delegate("tbody>tr:not(.k-detail-row,.k-grouping-row):visible a.k-grid-edit",Q,function(c){c.preventDefault(),b.editRow(a(this).closest("tr"))}),c.destroy!==!1&&b.wrapper.delegate("tbody>tr:not(.k-detail-row,.k-grouping-row):visible a.k-grid-delete",Q,function(c){c.preventDefault(),b.removeRow(a(this).closest("tr"))})}},editCell:function(a){var b=this,c=b.columns[b.cellIndex(a)],d=b._modelForContainer(a);d&&(!d.editable||d.editable(c.field))&&!c.command&&c.field&&(b._attachModelChange(d),b._editContainer=a,b.editable=a.addClass("k-edit-cell").kendoEditable({fields:{field:c.field,format:c.format,editor:c.editor,values:c.values},model:d,change:function(c){b.trigger(B,{values:c.values,container:a,model:d})&&c.preventDefault()}}).data("kendoEditable"),a.parent().addClass("k-grid-edit-row"),b.trigger(A,{container:a,model:d}))},_destroyEditable:function(){var a=this;a.editable&&(a._detachModelChange(),a.editable.destroy(),delete a.editable,a._editMode()==="popup"&&a._editContainer.data("kendoWindow").close(),a._editContainer=null)},_attachModelChange:function(a){var b=this;b._modelChangeHandler=function(a){b._modelChange({field:a.field,model:this})},a.bind("change",b._modelChangeHandler)},_detachModelChange:function(){var a=this,b=a._editContainer,c=a._modelForContainer(b);c&&c.unbind(E,a._modelChangeHandler)},closeCell:function(){var b=this,d=b._editContainer.removeClass("k-edit-cell"),e=d.closest("tr").attr(c.attr("uid")),f=b.columns[b.cellIndex(d)],g=b.dataSource.getByUid(e);d.parent().removeClass("k-grid-edit-row"),b._destroyEditable(),b._displayCell(d,f,g),d.hasClass("k-dirty-cell")&&a('<span class="k-dirty"/>').prependTo(d)},_displayCell:function(a,b,d){var e=this,f={storage:{},count:0},g=k({},c.Template,e.options.templateSettings),h=c.template(e._cellTmpl(b,f),g);f.count>0&&(h=p(h,f.storage)),a.empty().html(h(d))},removeRow:function(b){var c=this,d,e;!c._confirmation()||(b=a(b).hide(),d=c._modelForContainer(b),d&&!c.trigger(C,{row:b,model:d})&&(c.dataSource.remove(d),e=c._editMode(),(e==="inline"||e==="popup")&&c.dataSource.sync()))},_editMode:function(){var a="incell",b=this.options.editable;b!==!0&&(typeof b=="string"?a=b:a=b.mode||a);return a},editRow:function(b){var c=this,d=c._modelForContainer(b),e=c._editMode(),f;c.cancelRow(),d&&(c._attachModelChange(d),e==="popup"?c._createPopupEditor(d):e==="inline"?c._createInlineEditor(b,d):e==="incell"&&a(b).children(w).each(function(){var b=a(this),e=c.columns[b.index()];d=c._modelForContainer(b);if(d&&(!d.editable||d.editable(e.field))&&e.field){c.editCell(b);return!1}}),f=c._editContainer,f.delegate("a.k-grid-cancel",Q,function(a){a.preventDefault(),c.cancelRow()}),f.delegate("a.k-grid-update",Q,function(a){a.preventDefault(),c.saveRow()}))},_createPopupEditor:function(b){var d=this,e="<div "+c.attr("uid")+'="'+b.uid+'"><div class="k-edit-form-container">',f,g,h=[],i,l,m,n,o,q,r=d.options.editable,s=j(r)?r.window:{},t=k({},c.Template,d.options.templateSettings);if(r.template){e+=c.template(window.unescape(r.template),t)(b);for(i=0,l=d.columns.length;i<l;i++)f=d.columns[i],f.command&&(g=bm(f.command,"edit"))}else for(i=0,l=d.columns.length;i<l;i++){f=d.columns[i];if(!f.command){e+='<div class="k-edit-label"><label for="'+f.field+'">'+(f.title||f.field||"")+"</label></div>";if((!b.editable||b.editable(f.field))&&f.field)h.push({field:f.field,format:f.format,editor:f.editor,values:f.values}),e+="<div "+c.attr("container-for")+'="'+f.field+'" class="k-edit-field"></div>';else{var u={storage:{},count:0};m=c.template(d._cellTmpl(f,u),t),u.count>0&&(m=p(m,u.storage)),e+='<div class="k-edit-field">'+m(b)+"</div>"}}else f.command&&(g=bm(f.command,"edit"))}g&&j(g)&&(g.text&&j(g.text)&&(n=g.text.update,o=g.text.cancel),g.attr&&(q=g.attr)),e+=d._createButton({name:"update",text:n,attr:q})+d._createButton({name:"canceledit",text:o,attr:q}),e+="</div></div>";var v=d._editContainer=a(e).appendTo(d.wrapper).eq(0).kendoWindow(k({modal:!0,resizable:!1,draggable:!0,title:"Edit",visible:!1},s)),w=v.data("kendoWindow");w.wrapper.delegate(".k-i-close","click",function(){d.cancelRow()}),d.editable=d._editContainer.kendoEditable({fields:h,model:b,clearContainer:!1}).data("kendoEditable"),w.center().open(),d.trigger(A,{container:v,model:b})},_createInlineEditor:function(b,c){var d=this,e,f,g,h=[];b.children(":not(.k-group-cell,.k-hierarchy-cell)").each(function(){f=a(this),e=d.columns[d.cellIndex(f)];if(!e.command&&e.field&&(!c.editable||c.editable(e.field)))h.push({field:e.field,format:e.format,editor:e.editor,values:e.values}),f.attr("data-container-for",e.field),f.empty();else if(e.command){g=bm(e.command,"edit");if(g){f.empty();var b,i,k;j(g)&&(g.text&&j(g.text)&&(b=g.text.update,i=g.text.cancel),g.attr&&(k=g.attr)),a(d._createButton({name:"update",text:b,attr:k})+d._createButton({name:"canceledit",text:i,attr:k})).appendTo(f)}}}),d._editContainer=b,d.editable=b.addClass("k-grid-edit-row").kendoEditable({fields:h,model:c,clearContainer:!1}).data("kendoEditable"),d.trigger(A,{container:b,model:c})},cancelRow:function(){var a=this,b=a._editContainer,d;b&&(d=a._modelForContainer(b),a.dataSource.cancelChanges(d),a._editMode()!=="popup"?a._displayRow(b):a._displayRow(a.items().filter("["+c.attr("uid")+"="+d.uid+"]")),a._destroyEditable())},saveRow:function(){var a=this,b=a._editContainer,c=a._modelForContainer(b),d=a.editable;b&&d&&d.end()&&!a.trigger(B,{container:b,model:c})&&(a._editMode()!=="popup"&&a._displayRow(b),a._destroyEditable(),a.dataSource.sync())},_displayRow:function(b){var c=this,d=c._modelForContainer(b);d&&b.replaceWith(a((b.hasClass("k-alt")?c.altRowTemplate:c.rowTemplate)(d)))},_showMessage:function(a){return window.confirm(a)},_confirmation:function(){var a=this,b=a.options.editable,c=b===!0||typeof b===U?V:b.confirmation;return c!==!1&&c!=null?a._showMessage(c):!0},cancelChanges:function(){this.dataSource.cancelChanges()},saveChanges:function(){var a=this;(a.editable&&a.editable.end()||!a.editable)&&!a.trigger(H)&&a.dataSource.sync()},addRow:function(){var a=this,b,d=a.dataSource,e=a._editMode(),f=a.options.editable.createAt||"",g=d.pageSize(),h=d.view()||[];if(a.editable&&a.editable.end()||!a.editable){e!="incell"&&a.cancelRow(),b=d.indexOf(h[0]),f.toLowerCase()=="bottom"&&(b+=h.length,g&&!d.options.serverPaging&&g<=h.length&&(b-=1)),b<0&&(b=0);var i=d.insert(b,{}),j=i.uid,k=a.table.find("tr["+c.attr("uid")+"="+j+"]"),l=k.children("td:not(.k-group-cell,.k-hierarchy-cell)").first();e!=="inline"&&e!=="popup"||!k.length?l.length&&a.editCell(l):a.editRow(k)}},_toolbar:function(){var b=this,d=b.wrapper,e=b.options.toolbar,f=b.options.editable,g,h;e&&(g=b.wrapper.find(".k-grid-toolbar"),g.length||(e=q(e)?e({}):typeof e===U?e:b._toolbarTmpl(e).replace(Y,"\\#"),h=p(c.template(e),b),g=a('<div class="k-toolbar k-grid-toolbar" />').html(h({})).prependTo(d)),f&&f.create!==!1&&g.delegate(".k-grid-add",Q,function(a){a.preventDefault(),b.addRow()}).delegate(".k-grid-cancel-changes",Q,function(a){a.preventDefault(),b.cancelChanges()}).delegate(".k-grid-save-changes",Q,function(a){a.preventDefault(),b.saveChanges()}))},_toolbarTmpl:function(a){var b=this,c,d,e="";if(n(a))for(c=0,d=a.length;c<d;c++)e+=b._createButton(a[c]);return e},_createButton:function(a){var b=a.template||Z,d=typeof a===U?a:a.name||a.text,e={className:"k-grid-"+d,text:d,imageClass:"",attr:"",iconClass:""};if(!d&&(!j(a)||!a.template))throw new Error("Custom commands should have name specified");j(a)?(a.className&&(a.className+=" "+e.className),d==="edit"&&j(a.text)&&(a=k(!0,{},a),a.text=a.text.edit),a.attr&&j(a.attr)&&(a.attr=ba(a.attr)),e=k(!0,e,bb[d],a)):e=k(!0,e,bb[d]);return c.template(b)(e)},_groupable:function(){var b=this,d=b.wrapper,e=b.options.groupable;b.groupable||b.table.delegate(".k-grouping-row .k-i-collapse, .k-grouping-row .k-i-expand",Q,function(c){var d=a(this),e=d.closest("tr");d.hasClass("k-i-collapse")?b.collapseGroup(e):b.expandGroup(e),c.preventDefault(),c.stopPropagation()}),e&&(d.has("div.k-grouping-header")[0]||a("<div />").addClass("k-grouping-header").html(" ").prependTo(d),b.groupable&&b.groupable.destroy(),b.groupable=new f(d,k({},e,{draggable:b._draggableInstance,groupContainer:">div.k-grouping-header",dataSource:b.dataSource,filter:".k-header:not(.k-group-cell,.k-hierarchy-cell):visible["+c.attr("field")+"]",allowDrag:b.options.reorderable})))},_selectable:function(){var a=this,b,d,e=a.options.selectable;e&&(b=typeof e===U&&e.toLowerCase().indexOf("multiple")>-1,d=typeof e===U&&e.toLowerCase().indexOf("cell")>-1,a.selectable=new c.ui.Selectable(a.table,{filter:">"+(d?x:"tbody>tr:not(.k-grouping-row,.k-detail-row,.k-group-footer)"),multiple:b,change:function(){a.trigger(E)}}),a.options.navigatable&&a.wrapper.keydown(function(c){var e=a.current();c.keyCode===i.SPACEBAR&&c.target==a.wrapper[0]&&!e.hasClass("k-edit-cell")&&(c.preventDefault(),c.stopPropagation(),e=d?e:e.parent(),b?c.ctrlKey?e.hasClass(N)&&(e.removeClass(N),e=null):a.selectable.clear():a.selectable.clear(),a.selectable.value(e))}))},clearSelection:function(){var a=this;a.selectable.clear(),a.trigger(E)},select:function(b){var c=this,d=c.selectable;b=a(b);if(b.length)d.options.multiple||(d.clear(),b=b.first()),d.value(b);else return d.value()},current:function(a){var c=this,d=c.options.scrollable,e=c._current;a!==b&&a.length&&(!e||e[0]!==a[0])&&(a.addClass(L),e&&e.removeClass(L),c._current=a,a.length&&d&&(c._scrollTo(a.parent()[0],c.content[0]),d.virtual?c._scrollTo(a[0],c.content.find(">.k-virtual-scrollable-wrap")[0]):c._scrollTo(a[0],c.content[0])));return c._current},_scrollTo:function(a,b){var c=a.tagName.toLowerCase()==="td",d=a[c?"offsetLeft":"offsetTop"],e=a[c?"offsetWidth":"offsetHeight"],f=b[c?"scrollLeft":"scrollTop"],g=b[c?"clientWidth":"clientHeight"],h=d+e;b[c?"scrollLeft":"scrollTop"]=f>d?d:h>f+g?h-g:f},_navigatable:function(){var b=this,c=b.wrapper,d=b.table.addClass(M),e=p(b.current,b),f="."+M+" "+y,g=a.browser,h=function(d){var f=a(d.currentTarget);f.closest("tbody")[0]===b.tbody[0]&&(e(f),a(d.target).is(":button,a,:input,a>.k-icon,textarea,span.k-icon,.k-input")||setTimeout(function(){c.focus()}),d.stopPropagation())};b.options.navigatable&&(c.bind({focus:function(){var a=b._current;a&&a.is(":visible")?a.addClass(L):e(b.table.find(z))},focusout:function(a){b._current&&b._current.removeClass(L),a.stopPropagation()},keydown:function(f){var h=f.keyCode,j=b.current(),k=f.shiftKey,l=b.dataSource,m=b.options.pageable,n=!a(f.target).is(":button,a,:input,a>.t-icon"),o=b._editMode()=="incell",p,q,r=!1;n&&i.UP===h?(e(j?j.parent().prevAll(v).last().children(":eq("+j.index()+"),:eq(0)").last():d.find(z)),r=!0):n&&i.DOWN===h?(e(j?j.parent().nextAll(v).first().children(":eq("+j.index()+"),:eq(0)").last():d.find(z)),r=!0):n&&i.LEFT===h?(e(j?j.prevAll(w+":first"):d.find(z)),r=!0):n&&i.RIGHT===h?(e(j?j.nextAll(":visible:first"):d.find(z)),r=!0):n&&m&&i.PAGEDOWN==h?(b._current=null,l.page(l.page()+1),r=!0):n&&m&&i.PAGEUP==h?(b._current=null,l.page(l.page()-1),r=!0):b.options.editable&&(j=j?j:d.find(z),i.ENTER==h||i.F2==h?(b._handleEditing(j),r=!0):i.TAB==h&&o?(q=k?j.prevAll(w+":first"):j.nextAll(":visible:first"),q.length||(q=j.parent()[k?"prevAll":"nextAll"]("tr:not(.k-grouping-row,.k-detail-row):visible").children(w+(k?":last":":first"))),q.length&&(b._handleEditing(j,q),r=!0)):i.ESC==h&&b._editContainer&&(b._editContainer.has(j[0])||j[0]===b._editContainer[0])&&(o?b.closeCell():(p=b.items().index(j.parent()),document.activeElement.blur(),b.cancelRow(),p>=0&&b.current(b.items().eq(p).children().filter(w).first())),g.msie&&parseInt(g.version,10)<9&&document.body.focus(),c.focus(),r=!0)),r&&(f.preventDefault(),f.stopPropagation())}}),c.delegate(f,"mousedown",h))},_handleEditing:function(b,c){var d=this,e=d._editMode(),f=d._editContainer,g,h;e=="incell"?h=b.hasClass("k-edit-cell"):h=b.parent().hasClass("k-grid-edit-row");if(d.editable){a.contains(f[0],document.activeElement)&&a(document.activeElement).blur();if(d.editable.end())e=="incell"?d.closeCell():(b.parent()[0]===f[0]?g=d.items().index(b.parent()):g=d.items().index(f),d.saveRow(),d.current(d.items().eq(g).children().filter(w).first()),h=!0);else{e=="incell"?d.current(f):d.current(f.children().filter(w).first()),f.find(":input:visible:first").focus();return}}c&&d.current(c),d.wrapper.focus();if(!h&&!c||c)e=="incell"?d.editCell(d.current()):d.editRow(d.current().parent())},_wrapper:function(){var a=this,b=a.table,c=a.options.height,d=a.element;d.is("div")||(d=d.wrap("<div/>").parent()),a.wrapper=d.addClass("k-grid k-widget").attr(S,s.max(b.attr(S)||0,0)),b.removeAttr(S),c&&(a.wrapper.css(R,c),b.css(R,"auto"))},_tbody:function(){var b=this,c=b.table,d;d=c.find(">tbody"),d.length||(d=a("<tbody/>").appendTo(c)),b.tbody=d},_scrollable:function(){var b=this,d,e,f=b.options,g=f.scrollable,h=c.support.scrollbar();if(g){d=b.wrapper.children(".k-grid-header"),d[0]||(d=a('<div class="k-grid-header" />').insertBefore(b.table)),d.css("padding-right",g.virtual?h+1:h),e=a('<table cellspacing="0" />'),e.append(b.thead),d.empty().append(a('<div class="k-grid-header-wrap" />').append(e)),b.content=b.table.parent(),b.content.is(".k-virtual-scrollable-wrap")&&(b.content=b.content.parent()),b.content.is(".k-grid-content, .k-virtual-scrollable-wrap")||(b.content=b.table.wrap('<div class="k-grid-content" />').parent()),g!==!0&&g.virtual&&!b.virtualScrollable&&(b.virtualScrollable=new $(b.content,{dataSource:b.dataSource,itemHeight:p(b._averageRowHeight,b)})),b.scrollables=d.children(".k-grid-header-wrap");if(g.virtual)b.content.find(">.k-virtual-scrollable-wrap").bind("scroll",function(){b.scrollables.scrollLeft(this.scrollLeft)});else{b.content.bind("scroll",function(){b.scrollables.scrollLeft(this.scrollLeft)});var i=c.touchScroller(b.content);i&&i.movable&&i.movable.bind("change",function(a){b.scrollables.scrollLeft(-a.sender.x)})}}},_setContentHeight:function(){var a=this,b=a.options,d=a.wrapper.innerHeight(),e=a.wrapper.children(".k-grid-header"),f=c.support.scrollbar();if(b.scrollable){d-=e.outerHeight(),a.pager&&(d-=a.pager.element.outerHeight()),b.groupable&&(d-=a.wrapper.children(".k-grouping-header").outerHeight()),b.toolbar&&(d-=a.wrapper.children(".k-grid-toolbar").outerHeight()),a.footerTemplate&&(d-=a.wrapper.children(".k-grid-footer").outerHeight());var g=function(a){var b,c;if(a[0].style.height)return!0;b=a.height(),a.height("auto"),c=a.height();if(b!=c){a.height("");return!0}a.height("");return!1};g(a.wrapper)&&(d>f*2?a.content.height(d):a.content.height(f*2+1))}},_averageRowHeight:function(){var a=this,b=a._rowHeight;a._rowHeight||(a._rowHeight=b=a.table.outerHeight()/a.table[0].rows.length,a._sum=b,a._measures=1);var c=a.table.outerHeight()/a.table[0].rows.length;b!==c&&(a._measures++,a._sum+=c,a._rowHeight=a._sum/a._measures);return b},_dataSource:function(){var a=this,c=a.options,d,f=c.dataSource;f=n(f)?{data:f}:f,j(f)&&(k(f,{table:a.table,fields:a.columns}),d=c.pageable,j(d)&&d.pageSize!==b&&(f.pageSize=d.pageSize)),a.dataSource&&a._refreshHandler?a.dataSource.unbind(E,a._refreshHandler).unbind(t,a._requestStartHandler).unbind(u,a._errorHandler):(a._refreshHandler=p(a.refresh,a),a._requestStartHandler=p(a._requestStart,a),a._errorHandler=p(a._error,a)),a.dataSource=e.create(f).bind(E,a._refreshHandler).bind(t,a._requestStartHandler).bind(u,a._errorHandler)},_error:function(){this._progress(!1)},_requestStart:function(){this._progress(!0)},_modelChange:function(b){var e=this,f=b.model,g=e.tbody.find("tr["+c.attr("uid")+"="+f.uid+"]"),h,i,j=g.hasClass("k-alt"),k,l,m;if(g.children(".k-edit-cell").length&&!e.options.rowTemplate)g.children(":not(.k-group-cell,.k-hierarchy-cell)").each(function(){h=a(this),i=e.columns[e.cellIndex(h)],i.field===b.field&&(h.hasClass("k-edit-cell")?h.addClass("k-dirty-cell"):(e._displayCell(h,i,f),a('<span class="k-dirty"/>').prependTo(h)))});else if(!g.hasClass("k-grid-edit-row")){k=a((j?e.altRowTemplate:e.rowTemplate)(f)),g.replaceWith(k);for(l=0,m=e.columns.length;l<m;l++)i=e.columns[l],i.field===b.field&&(h=k.children(":not(.k-group-cell,.k-hierarchy-cell)").eq(l),a('<span class="k-dirty"/>').prependTo(h));e.trigger("itemChange",{item:k,data:f,ns:d})}},_pageable:function(){var b=this,d,e=b.options.pageable;e&&(d=b.wrapper.children("div.k-grid-pager"),d.length||(d=a('<div class="k-pager-wrap k-grid-pager"/>').appendTo(b.wrapper)),b.pager&&b.pager.destroy(),typeof e=="object"&&e instanceof c.ui.Pager?b.pager=e:b.pager=new c.ui.Pager(d,k({},e,{dataSource:b.dataSource})))},_footer:function(){var b=this,c=b.dataSource.aggregates(),d="",e=b.footerTemplate,f=b.options,g;if(e){c=r(c)?be(b.dataSource.aggregate()):c,d=a(b._wrapFooter(e(c))),g=b.footer||b.wrapper.find(".k-grid-footer");if(g.length){var h=d;g.replaceWith(h),b.footer=h}else f.scrollable?b.footer=f.pageable?d.insertBefore(b.wrapper.children("div.k-grid-pager")):d.appendTo(b.wrapper):b.footer=d.insertBefore(b.tbody);if(f.scrollable){var i=!1;b.scrollables.each(function(){a(this).hasClass("k-grid-footer-wrap")&&(i=!0)}),i||(b.scrollables=b.scrollables.add(b.footer.children(".k-grid-footer-wrap")))}f.resizable&&b._footerWidth&&b.footer.find("table").css("width",b._footerWidth)}},_wrapFooter:function(b){var c=this,d="";if(c.options.scrollable){d=a('<div class="k-grid-footer"><div class="k-grid-footer-wrap"><table cellspacing="0"><tbody>'+b+"</tbody></table></div></div>"),c._appendCols(d.find("table"));return d}return'<tfoot class="k-grid-footer">'+b+"</tfoot>"},_columnMenu:function(){var b=this,d,e=b.columns,f,g=b.options,h=g.columnMenu,i,j,l,m;h&&(typeof h=="boolean"&&(h={}),b.thead.find("th:not(.k-hierarchy-cell,.k-group-cell)").each(function(n){f=e[n],m=a(this),!f.command&&(f.field||m.attr("data-"+c.ns+"field"))&&(d=m.data("kendoColumnMenu"),d&&d.destroy(),j=f.sortable!==!1&&h.sortable!==!1?g.sortable:!1,l=g.filterable&&f.filterable!==!1&&h.filterable!==!1?k({},f.filterable,g.filterable):!1,i={dataSource:b.dataSource,values:f.values,columns:h.columns,sortable:j,filterable:l,messages:h.messages,owner:b},m.kendoColumnMenu(i))}))},_filterable:function(){var b=this,d=b.columns,e,f,g=b.options.filterable;g&&!b.options.columnMenu&&b.thead.find("th:not(.k-hierarchy-cell,.k-group-cell)").each(function(h){e=a(this),d[h].filterable!==!1&&!d[h].command&&(d[h].field||e.attr("data-"+c.ns+"field"))&&(f=e.data("kendoFilterMenu"),f&&f.destroy(),e.kendoFilterMenu(k(!0,{},g,d[h].filterable,{dataSource:b.dataSource,values:d[h].values})))})},_sortable:function(){var b=this,d=b.columns,e,f=b.options.sortable;f&&b.thead.find("th:not(.k-hierarchy-cell,.k-group-cell)").each(function(g){e=d[g],e.sortable!==!1&&!e.command&&e.field&&a(this).attr("data-"+c.ns+"field",e.field).kendoSortable(k({},f,{dataSource:b.dataSource}))})},_columns:function(b){var d=this,e=d.table,f,g=e.find("col"),h=d.options.dataSource;b=b.length?b:l(e.find("th"),function(b,d){b=a(b);var e=b.attr(c.attr("sortable")),f=b.attr(c.attr("filterable")),h=b.attr(c.attr("type")),i=b.attr(c.attr("groupable")),j=b.attr(c.attr("field")),k=b.attr(c.attr("menu"));j||(j=b.text().replace(/\s|[^A-z0-9]/g,""));return{field:j,type:h,sortable:e!=="false",filterable:f!=="false",groupable:i!=="false",menu:k,template:b.attr(c.attr("template")),width:g.eq(d).css("width")}}),f=!(d.table.find("tbody tr").length>0&&(!h||!h.transport)),d.columns=l(b,function(a){a=typeof a===U?{field:a}:a,a.hidden&&(a.attributes=bi(a.attributes),a.footerAttributes=bi(a.footerAttributes),a.headerAttributes=bi(a.headerAttributes));return k({encoded:f},a)})},_tmpl:function(a,b){var d=this,e=k({},c.Template,d.options.templateSettings),f,g=d.columns.length,h,i={storage:{},count:0},j,l,m=d._hasDetails(),n=[],o=d.dataSource.group().length;if(!a){a="<tr",b&&n.push("k-alt"),m&&n.push("k-master-row"),n.length&&(a+=' class="'+n.join(" ")+'"'),g&&(a+=" "+c.attr("uid")+'="#=uid#"'),a+=">",o>0&&(a+=_(o)),m&&(a+='<td class="k-hierarchy-cell"><a class="k-icon k-plus" href="\\#"></a></td>');for(f=0;f<g;f++)j=d.columns[f],h=j.template,l=typeof h,a+="<td"+ba(j.attributes)+">",a+=d._cellTmpl(j,i),a+="</td>";a+="</tr>"}a=c.template(a,e);if(i.count>0)return p(a,i.storage);return a},_headerCellText:function(a){var b=this,d=k({},c.Template,b.options.templateSettings),e=a.headerTemplate,f=typeof e,g=a.title||a.field||"";f===T?g=c.template(e,d)({}):f===U&&(g=e);return g},_cellTmpl:function(a,b){var d=this,e=k({},c.Template,d.options.templateSettings),f=a.template,g=e.paramName,h="",i,l,m=a.format,o=typeof f,p=a.values;if(a.command){if(n(a.command)){for(i=0,l=a.command.length;i<l;i++)h+=d._createButton(a.command[i]);return h.replace(Y,"\\#")}return d._createButton(a.command).replace(Y,"\\#")}o===T?(b.storage["tmpl"+b.count]=f,h+="#=this.tmpl"+b.count+"("+g+")#",b.count++):o===U?h+=f:p&&p.length&&j(p[0])&&"value"in p[0]?(h+="#var v ="+c.stringify(p)+"#",h+="#for (var idx=0,length=v.length;idx<length;idx++) {#",h+="#if (v[idx].value == ",e.useWithBlock||(h+=g+"."),h+=a.field,h+=") { #",h+="${v[idx].text}",h+="#break;#",h+="#}#",h+="#}#"):(h+=a.encoded?"${":"#=",m&&(h+='kendo.format("'+m.replace(W,"\\$1")+'",'),e.useWithBlock||(h+=g+"."),h+=a.field,m&&(h+=")"),h+=a.encoded?"}":"#");return h},_templates:function(){var b=this,c=b.options,d=b.dataSource,e=d.group(),f=d.aggregate();b.rowTemplate=b._tmpl(c.rowTemplate),b.altRowTemplate=b._tmpl(c.altRowTemplate||c.rowTemplate,!0),b._hasDetails()&&(b.detailTemplate=b._detailTmpl(c.detailTemplate||""));if(!r(f)||m(b.columns,function(a){return a.footerTemplate}).length)b.footerTemplate=b._footerTmpl(f,"footerTemplate","k-footer-template");e.length&&m(b.columns,function(a){return a.groupFooterTemplate}).length&&(f=a.map(e,function(a){return a.aggregates}),b.groupFooterTemplate=b._footerTmpl(f,"groupFooterTemplate","k-group-footer"))},_footerTmpl:function(a,b,d){var e=this,f=k({},c.Template,e.options.templateSettings),g=f.paramName,h="",i,j,l=e.columns,m,n,o={},q=0,r={},s=e.dataSource,t=s.group().length,u=be(a),v;h+='<tr class="'+d+'">',t>0&&(h+=_(t)),e._hasDetails()&&(h+='<td class="k-hierarchy-cell"> </td>');for(i=0,j=e.columns.length;i<j;i++)v=l[i],m=v[b],n=typeof m,h+="<td"+ba(v.footerAttributes)+">",m?(n!==T&&(r=u[v.field]?k({},f,{paramName:g+"."+v.field}):{},m=c.template(m,r)),o["tmpl"+q]=m,h+="#=this.tmpl"+q+"("+g+")#",q++):h+=" ",h+="</td>";h+="</tr>",h=c.template(h,f);if(q>0)return p(h,o);return h},_detailTmpl:function(a){var b=this,d="",e=k({},c.Template,b.options.templateSettings),f=e.paramName,g={},h=0,i=b.dataSource.group().length,j=bh(b.columns).length,l=typeof a;d+='<tr class="k-detail-row">',i>0&&(d+=_(i)),d+='<td class="k-hierarchy-cell"></td><td class="k-detail-cell"'+(j?' colspan="'+j+'"':"")+">",l===T?(g["tmpl"+h]=a,d+="#=this.tmpl"+h+"("+f+")#",h++):d+=a,d+="</td></tr>",d=c.template(d,e);if(h>0)return p(d,g);return d},_hasDetails:function(){var a=this;return a.options.detailTemplate!==b||(a._events[D]||[]).length},_details:function(){var b=this;b.table.delegate(".k-hierarchy-cell .k-plus, .k-hierarchy-cell .k-minus",Q,function(c){var d=a(this),e=d.hasClass("k-plus"),f=d.closest("tr.k-master-row"),g,h=b.detailTemplate,i,j=b._hasDetails();d.toggleClass("k-plus",!e).toggleClass("k-minus",e),j&&!f.next().hasClass("k-detail-row")&&(i=b.dataItem(f),a(h(i)).addClass(f.hasClass("k-alt")?"k-alt":"").insertAfter(f),b.trigger(D,{masterRow:f,detailRow:f.next(),data:i,detailCell:f.next().find(".k-detail-cell")})),g=f.next(),b.trigger(e?J:K,{masterRow:f,detailRow:g}),g.toggle(e),c.preventDefault();return!1})},dataItem:function(b){return this._data[this.tbody.find("> tr:not(.k-grouping-row,.k-detail-row,.k-group-footer)").index(a(b))]},expandRow:function(b){a(b).find("> td .k-plus, > td .k-i-expand").click()},collapseRow:function(b){a(b).find("> td .k-minus, > td .k-i-collapse").click()},_thead:function(){var d=this,e=d.columns,f=d._hasDetails()&&e.length,g,h,i="",j=d.table.find(">thead"),k,l,m;j.length||(j=a("<thead/>").insertBefore(d.tbody)),k=d.element.find("tr:has(th):first"),k.length||(k=j.children().first(),k.length||(k=a("<tr/>")));if(!k.children().length){f&&(i+='<th class="k-hierarchy-cell"> </th>');for(g=0,h=e.length;g<h;g++)m=e[g],l=d._headerCellText(m),m.command?i+="<th"+ba(m.headerAttributes)+">"+l+"</th>":(i+="<th "+c.attr("field")+"='"+(m.field||"")+"' ",m.title&&(i+=c.attr("title")+'="'+m.title.replace(/'/g,"'")+'" '),m.groupable!==b&&(i+=c.attr("groupable")+"='"+m.groupable+"' "),m.aggregates&&(i+=c.attr("aggregates")+"='"+m.aggregates+"'"),i+=ba(m.headerAttributes),i+=">"+l+"</th>");k.html(i)}else f&&!k.find(".k-hierarchy-cell")[0]&&k.prepend('<th class="k-hierarchy-cell"> </th>');k.find("th").addClass("k-header"),d.options.scrollable||j.addClass("k-grid-header"),k.appendTo(j),d.thead=j,d._sortable(),d._filterable(),d._scrollable(),d._updateCols(),d._resizable(),d._draggable(),d._reorderable(),d._columnMenu()},_updateCols:function(){var a=this;a._appendCols(a.thead.parent().add(a.table))},_appendCols:function(a){var b=this;bk(a,bh(b.columns),b._hasDetails(),b.dataSource.group().length)},_autoColumns:function(a){if(a&&a.toJSON){var b=this,c;a=a.toJSON();for(c in a)b.columns.push({field:c});b._thead(),b._templates()}},_rowsHtml:function(a){var b=this,c="",d,e,f=b.rowTemplate,g=b.altRowTemplate;for(d=0,e=a.length;d<e;d++)d%2?c+=g(a[d]):c+=f(a[d]),b._data.push(a[d]);return c},_groupRowHtml:function(a,b,d){var e=this,f="",g,h,i=a.field,j=m(e.columns,function(a){return a.field==i})[0]||{},l=j.format?c.format(j.format,a.value):a.value,n=j.groupHeaderTemplate,o=(j.title||i)+": "+l,p=k({},{field:a.field,value:a.value},a.aggregates[a.field]),q=a.items;n&&(o=typeof n===T?n(p):c.template(n)(p)),f+='<tr class="k-grouping-row">'+_(d)+'<td colspan="'+b+'">'+'<p class="k-reset">'+'<a class="k-icon k-i-collapse" href="#"></a>'+o+"</p></td></tr>";if(a.hasSubgroups)for(g=0,h=q.length;g<h;g++)f+=e._groupRowHtml(q[g],b-1,d+1);else f+=e._rowsHtml(q);e.groupFooterTemplate&&(f+=e.groupFooterTemplate(a.aggregates));return f},collapseGroup:function(b){b=a(b).find(".k-icon").addClass("k-i-expand").removeClass("k-i-collapse").end();var c=b.find(".k-group-cell").length,d=1,e,f;b.nextAll("tr").each(function(){f=a(this),e=f.find(".k-group-cell").length,f.hasClass("k-grouping-row")?d++:f.hasClass("k-group-footer")&&d--;if(e<=c||f.hasClass("k-group-footer")&&d<0)return!1;f.hide()})},expandGroup:function(b){b=a(b).find(".k-icon").addClass("k-i-collapse").removeClass("k-i-expand").end();var c=this,d=b.find(".k-group-cell").length,e,f,g=1;b.nextAll("tr").each(function(){e=a(this),f=e.find(".k-group-cell").length;if(f<=d)return!1;f==d+1&&!e.hasClass("k-detail-row")&&(e.show(),e.hasClass("k-grouping-row")&&e.find(".k-icon").hasClass("k-i-collapse")&&c.expandGroup(e),e.hasClass("k-master-row")&&e.find(".k-icon").hasClass("k-minus")&&e.next().show()),e.hasClass("k-grouping-row")&&g++,e.hasClass("k-group-footer")&&(g==1?e.show():g--)})},_updateHeader:function(b){var c=this,d=c.thead.find("th.k-group-cell"),e=d.length;b>e?a(Array(b-e+1).join('<th class="k-group-cell k-header"> </th>')).prependTo(c.thead.find("tr")):b<e&&(e=e-b,a(m(d,function(a,b){return e>b})).remove())},_firstDataItem:function(a,b){a&&b&&(a.hasSubgroups?a=this._firstDataItem(a.items[0],b):a=a.items[0]);return a},hideColumn:function(b){var c=this,d,e,f,g,h,i,j=0,k,l=c.footer||c.wrapper.find(".k-grid-footer"),n=c.columns,p;typeof b=="number"?b=n[b]:b=m(n,function(a){return a.field===b})[0];if(!!b&&!b.hidden){p=o(b,bh(n)),b.hidden=!0,b.attributes=bi(b.attributes),b.footerAttributes=bi(b.footerAttributes),b.headerAttributes=bi(b.headerAttributes),c._templates(),c._updateCols(),c.thead.find(">tr>th:not(.k-hierarchy-cell,.k-group-cell):visible").eq(p).hide(),l&&(c._appendCols(l.find("table:first")),l.find(".k-footer-template>td:not(.k-hierarchy-cell,.k-group-cell):visible").eq(p).hide()),d=c.tbody.children();for(g=0,k=d.length;g<k;g+=1)e=d.eq(g),e.is(".k-grouping-row,.k-detail-row")?(f=e.children(":not(.k-group-cell):first,.k-detail-cell").last(),f.attr("colspan",parseInt(f.attr("colspan"),10)-1)):(e.hasClass("k-grid-edit-row")&&(f=e.children(".k-edit-container")[0])&&(f=a(f),f.attr("colspan",parseInt(f.attr("colspan"),10)-1),f.find("col").eq(p).remove(),e=f.find("tr:first")),e.children(":not(.k-group-cell,.k-hierarchy-cell):visible").eq(p).hide());h=c.thead.prev().find("col");for(g=0,k=h.length;g<k;g+=1){i=h[g].style.width;if(i&&i.indexOf("%")==-1)j+=parseInt(i,10);else{j=0;break}}j&&a(">.k-grid-header table:first,>.k-grid-footer table:first",c.wrapper).add(c.table).width(j),c.trigger(F,{column:b})}},showColumn:function(b){var c=this,d,e,f,g,h,i,j,k,l,n=c.columns,p=c.footer||c.wrapper.find(".k-grid-footer"),q;typeof b=="number"?b=n[b]:b=m(n,function(a){return a.field===b})[0];if(!!b&&!!b.hidden){q=o(b,n),b.hidden=!1,b.attributes=bj(b.attributes),b.footerAttributes=bj(b.footerAttributes),b.headerAttributes=bj(b.headerAttributes),c._templates(),c._updateCols(),c.thead.find(">tr>th:not(.k-hierarchy-cell,.k-group-cell)").eq(q).show(),p&&(c._appendCols(p.find("table:first")),p.find(".k-footer-template>td:not(.k-hierarchy-cell,.k-group-cell)").eq(q).show()),d=c.tbody.children();for(e=0,f=d.length;e<f;e+=1)g=d.eq(e),g.is(".k-grouping-row,.k-detail-row")?(h=g.children(":not(.k-group-cell):first,.k-detail-cell").last(),h.attr("colspan",parseInt(h.attr("colspan"),10)+1)):(g.hasClass("k-grid-edit-row")&&(h=g.children(".k-edit-container")[0])&&(h=a(h),h.attr("colspan",parseInt(h.attr("colspan"),10)+1),bk(h.find(">form>table"),bh(n),!1,0),g=h.find("tr:first")),g.children(":not(.k-group-cell,.k-hierarchy-cell)").eq(q).show());i=a(">.k-grid-header table:first,>.k-grid-footer table:first",c.wrapper).add(c.table);if(!b.width)i.width("");else{j=0,l=c.thead.prev().find("col");for(e=0,f=l.length;e<f;e+=1){k=l[e].style.width;if(k.indexOf("%")>-1){j=0;break}j+=parseInt(k,10)}j&&i.width(j)}c.trigger(G,{column:b})}},_progress:function(a){var b=this,d=b.element.is("table")?b.element.parent():b.content&&b.content.length?b.content:b.element;c.ui.progress(d,a)},refresh:function(b){var c=this,d,e,f="",h=c.dataSource.view(),i,j,k,l=c.current(),m=(c.dataSource.group()||[]).length,n=m+bh(c.columns).length;if(!b||b.action!=="itemchange"||!c.editable){c.trigger("dataBinding"),l&&l.hasClass("k-state-focused")&&(k=c.items().index(l.parent())),c._destroyEditable(),c._progress(!1),c._data=[],c.columns.length||(c._autoColumns(c._firstDataItem(h[0],m)),n=m+c.columns.length),c._group=m>0||c._group,c._group&&(c._templates(),c._updateCols(),c._updateHeader(m),c._group=m>0);if(m>0){c.detailTemplate&&n++;for(e=0,d=h.length;e<d;e++)f+=c._groupRowHtml(h[e],n,0)}else f+=c._rowsHtml(h);g?c.tbody[0].innerHTML=f:(j=document.createElement("div"),j.innerHTML="<table><tbody>"+f+"</tbody></table>",i=j.firstChild.firstChild,c.table[0].replaceChild(i,c.tbody[0]),c.tbody=a(i)),c._footer(),c._setContentHeight(),k>=0&&c.current(c.items().eq(k).children().filter(w).first()),c.trigger(I)}}});d.plugin(bl),d.plugin($)})(jQuery);
|
11
|
+
(function(e,t){function r(e){return Array(e+1).join('<td class="k-group-cell"> </td>')}function a(e){var t,r=" ";if(e){if(typeof e===lt)return e;for(t in e)r+=t+'="'+e[t]+'"'}return r}function o(t){var r=0;return e("> .k-grouping-header, > .k-grid-toolbar",t).each(function(){r+=this.offsetHeight}),r}function l(t,r){e("th, th .k-grid-filter, th .k-link",t).add(document.body).css("cursor",r)}function i(e){var t,r,a={},o={};if(!D(e))for(T(e)||(e=[e]),t=0,r=e.length;r>t;t++)a[e[t].aggregate]=0,o[e[t].field]=a;return o}function n(e,t,r){var a=e.eq(t),o=e.eq(r);a[t>r?"insertBefore":"insertAfter"](o)}function s(e,t,r){var a,o,l,i;for(r=T(r)?r:[r],a=0,o=r.length;o>a;a++)l=r[a],y(l)&&l.click&&(i=l.name||l.text,t.on("touchend "+tt,"a.k-grid-"+(i||"").replace(/\s/g,""),{commandName:i},R(l.click,e)))}function d(e){return x(e,function(e){return!e.hidden})}function c(e){e=e||{};var t=e.style;return t?(t=t.replace(/((.*)?display)(.*)?:([^;]*)/i,"$1:none"),t===e.style&&(t=t.replace(/(.*)?/i,"display:none;$1"))):t="display:none",C({},e,{style:t})}function u(e){e=e||{};var t=e.style;return t&&(e.style=t.replace(/(display\s*:\s*none\s*;?)*/gi,"")),e}function p(t,r,a,o){var l,i=t.find(">colgroup"),n=S(r,function(e){return l=e.width,l&&0!==parseInt(l,10)?g.format('<col style="width:{0}"/>',typeof l===lt?l:l+"px"):"<col />"});(a||i.find(".k-hierarchy-col").length)&&n.splice(0,0,'<col class="k-hierarchy-col" />'),i.length&&i.remove(),i=e("<colgroup/>").append(e(Array(o+1).join('<col class="k-group-col">')+n.join(""))),t.prepend(i)}function h(e,t){var r,a,o;if(typeof e===lt&&e===t)return e;if(y(e)&&e.name===t)return e;if(T(e))for(r=0,a=e.length;a>r;r++)if(o=e[r],typeof o===lt&&o===t||o.name===t)return o;return null}function f(t){var r=e(t.currentTarget),a=r.closest("table")[0];(a===this.table[0]||a===this.thead.parent()[0])&&(this.current(r),(r.is("th")||!e(t.target).is(":button,a,:input,a>.k-icon,textarea,span.k-icon,.k-input"))&&setTimeout(function(){a.focus()}),r.is("th")&&t.preventDefault())}var g=window.kendo,m=g.ui,b=g.data.DataSource,k=m.Groupable,v=g.support.tbodyInnerHtml,_=m.Widget,w=g.keys,y=e.isPlainObject,C=e.extend,S=e.map,x=e.grep,T=e.isArray,H=e.inArray,R=e.proxy,A=e.isFunction,D=e.isEmptyObject,E=Math,I="requestStart",M="error",W=":not(.k-group-cell):not(.k-hierarchy-cell):visible",q="tbody>tr:not(.k-grouping-row):not(.k-detail-row):not(.k-group-footer) > td:not(.k-group-cell):not(.k-hierarchy-cell)",N="tr:not(.k-footer-template):visible",B=":not(.k-group-cell):not(.k-hierarchy-cell):visible",z=N+":first>"+B+":first",L=".kendoGrid",F="edit",P="save",O="remove",G="detailInit",j="change",U="columnHide",$="columnShow",K="saveChanges",J="dataBound",V="detailExpand",X="detailCollapse",Q="k-state-focused",Y="k-state-selected",Z="columnResize",et="columnReorder",tt="click",rt="height",at="tabIndex",ot="function",lt="string",it="Are you sure you want to delete this record?",nt=/(\}|\#)/gi,st=3,dt=/#/gi,ct='<a class="k-button k-button-icontext #=className#" #=attr# href="\\#"><span class="#=iconClass# #=imageClass#"></span>#=text#</a>',ut=!1,pt=_.extend({init:function(e,t){var r=this;_.fn.init.call(r,e,t),r._refreshHandler=R(r.refresh,r),r.setDataSource(t.dataSource),r.wrap()},setDataSource:function(e){var t=this;t.dataSource&&t.dataSource.unbind(j,t._refreshHandler),t.dataSource=e,t.dataSource.bind(j,t._refreshHandler)},options:{name:"VirtualScrollable",itemHeight:e.noop},destroy:function(){var e=this;_.fn.destroy.call(e),e.dataSource.unbind(j,e._refreshHandler),e.wrapper.add(e.verticalScrollbar).off(L),e.drag&&e.drag.destroy()},wrap:function(){var t,r=this,a=g.support.scrollbar()+1,o=r.element;o.css({width:"auto",overflow:"hidden"}).css(ut?"padding-left":"padding-right",a),r.content=o.children().first(),t=r.wrapper=r.content.wrap('<div class="k-virtual-scrollable-wrap"/>').parent().bind("DOMMouseScroll"+L+" mousewheel"+L,R(r._wheelScroll,r)),g.support.kineticScrollNeeded&&(r.drag=new g.UserEvents(r.wrapper,{global:!0,move:function(e){r.verticalScrollbar.scrollTop(r.verticalScrollbar.scrollTop()-e.y.delta),t.scrollLeft(t.scrollLeft()-e.x.delta),e.preventDefault()}})),r.verticalScrollbar=e('<div class="k-scrollbar k-scrollbar-vertical" />').css({width:a}).appendTo(o).bind("scroll"+L,R(r._scroll,r))},_wheelScroll:function(e){var r,a=this,o=a.verticalScrollbar.scrollTop(),l=e.originalEvent,i=l.wheelDeltaY;l.wheelDelta?(i===t||i)&&(r=l.wheelDelta):l.detail&&l.axis===l.VERTICAL_AXIS&&(r=10*-l.detail),r&&(e.preventDefault(),a.verticalScrollbar.scrollTop(o+-r))},_scroll:function(e){var t=this,r=e.currentTarget.scrollTop,a=t.dataSource,o=t.itemHeight,l=a.skip()||0,i=t._rangeStart||l,n=t.element.innerHeight(),s=!!(t._scrollbarTop&&t._scrollbarTop>r),d=E.max(E.floor(r/o),0),c=E.max(d+E.floor(n/o),0);t._scrollTop=r-i*o,t._scrollbarTop=r,t._fetch(d,c,s)||(t.wrapper[0].scrollTop=t._scrollTop)},_fetch:function(e,t,r){var a=this,o=a.dataSource,l=a.itemHeight,i=o.take(),n=a._rangeStart||o.skip()||0,s=E.floor(e/i)*i,d=!1,c=.33;return n>e?(d=!0,n=E.max(0,t-i),a._scrollTop=(e-n)*l,a._page(n,i)):t>=n+i&&!r?(d=!0,n=e,a._scrollTop=l,a._page(n,i)):a._fetching||(s+i-i*c>e&&e>i&&o.prefetch(s-i,i),t>s+i*c&&o.prefetch(s+i,i)),d},_page:function(e,t){var r=this,a=r.dataSource;clearTimeout(r._timeout),r._fetching=!0,r._rangeStart=e,a.inRange(e,t)?a.range(e,t):(g.ui.progress(r.wrapper.parent(),!0),r._timeout=setTimeout(function(){a.range(e,t)},100))},refresh:function(){var e,t,r,a=this,o="",l=25e4,i=a.dataSource,n=a._rangeStart,s=g.support.kineticScrollNeeded?0:g.support.scrollbar(),d=a.wrapper[0];g.ui.progress(a.wrapper.parent(),!1),clearTimeout(a._timeout),r=a.itemHeight=a.options.itemHeight()||0;var c=d.scrollWidth>d.offsetWidth?s:0;for(e=i.total()*r+c,t=0;E.floor(e/l)>t;t++)o+='<div style="width:1px;height:'+l+'px"></div>';e%l&&(o+='<div style="width:1px;height:'+e%l+'px"></div>'),a.verticalScrollbar.html(o),d.scrollTop=a._scrollTop,a.drag&&a.drag.cancel(),n&&!a._fetching&&(a._rangeStart=i.skip()),a._fetching=!1}}),ht={create:{text:"Add new record",imageClass:"k-add",className:"k-grid-add",iconClass:"k-icon"},cancel:{text:"Cancel changes",imageClass:"k-cancel",className:"k-grid-cancel-changes",iconClass:"k-icon"},save:{text:"Save changes",imageClass:"k-update",className:"k-grid-save-changes",iconClass:"k-icon"},destroy:{text:"Delete",imageClass:"k-delete",className:"k-grid-delete",iconClass:"k-icon"},edit:{text:"Edit",imageClass:"k-edit",className:"k-grid-edit",iconClass:"k-icon"},update:{text:"Update",imageClass:"k-update",className:"k-grid-update",iconClass:"k-icon"},canceledit:{text:"Cancel",imageClass:"k-cancel",className:"k-grid-cancel",iconClass:"k-icon"}},ft=_.extend({init:function(e,t){var r=this;t=T(t)?{dataSource:t}:t,_.fn.init.call(r,e,t),ut=g.support.isRtl(e),r._element(),r._aria(),r._columns(r.options.columns),r._dataSource(),r._tbody(),r._pageable(),r._thead(),r._groupable(),r._toolbar(),r._setContentHeight(),r._templates(),r._navigatable(),r._selectable(),r._details(),r._editable(),r._attachCustomCommandsEvent(),r.options.autoBind?r.dataSource.fetch():r._footer(),g.notify(r)},events:[j,"dataBinding",J,V,X,G,F,P,O,K,Z,et,$,U],setDataSource:function(e){var t=this;t.options.dataSource=e,t._dataSource(),t._pageable(),t.options.groupable&&t._groupable(),t._thead(),t.virtualScrollable&&t.virtualScrollable.setDataSource(t.options.dataSource),t.options.autoBind&&e.fetch()},options:{name:"Grid",columns:[],toolbar:null,autoBind:!0,filterable:!1,scrollable:!0,sortable:!1,selectable:!1,navigatable:!1,pageable:!1,editable:!1,groupable:!1,rowTemplate:"",altRowTemplate:"",dataSource:{},height:null,resizable:!1,reorderable:!1,columnMenu:!1,detailTemplate:null},destroy:function(){var t=this;_.fn.destroy.call(t),t.pager&&t.pager.destroy(),t.groupable&&t.groupable.destroy(),t.virtualScrollable&&t.virtualScrollable.destroy(),t.thead.find("th").each(function(){var t=e(this),r=t.data("kendoFilterMenu"),a=t.data("kendoSortable"),o=t.data("kendoColumnMenu");r&&r.destroy(),a&&a.destroy(),o&&o.destroy()}),t._destroyEditable(),t.dataSource.unbind(j,t._refreshHandler).unbind(I,t._requestStartHandler).unbind(M,t._errorHandler),t.element.add(t.wrapper).add(t.table).add(t.thead).add(t.wrapper.find(">.k-grid-toolbar")),t.content&&t.element.add(t.content).add(t.content.find(">.k-virtual-scrollable-wrap")),t.element.off(L),g.destroy(t.wrapper)},setOptions:function(e){var t=this;_.fn.setOptions.call(this,e),t._templates()},items:function(){return this.tbody.children(":not(.k-grouping-row,.k-detail-row,.k-group-footer)")},_attachCustomCommandsEvent:function(){var e,t,r,a=this,o=a.columns||[];for(t=0,r=o.length;r>t;t++)e=o[t].command,e&&s(a,a.wrapper,e)},_aria:function(){var e=this.element.attr("id")||"aria";e&&(this._cellId=e+"_active_cell")},_element:function(){var t=this,r=t.element;r.is("table")||(r=t.options.scrollable?t.element.find("> .k-grid-content > table"):t.element.children("table"),r.length||(r=e("<table />").appendTo(t.element))),t.table=r.attr("cellspacing",0).attr("role",t._hasDetails()?"treegrid":"grid"),t._wrapper()},_positionColumnResizeHandle:function(t){var r,a=this,i=a.options.scrollable,n=a.resizeHandle;a.thead.on("mousemove"+L,"th:not(.k-group-cell,.k-hierarchy-cell)",function(s){var d=e(this),c=s.clientX,u=e(window).scrollLeft(),p=d.offset().left+(ut?0:this.offsetWidth);if(c+u>p-st&&p+st>c+u){if(n||(n=a.resizeHandle=e('<div class="k-resize-handle"/>'),t.append(n)),ut){var h=d.closest(".k-grid-header-wrap"),f=e.browser.msie?h.scrollLeft():0,g=e.browser.webkit?h[0].scrollWidth-h[0].offsetWidth-h.scrollLeft():0,m=e.browser.mozilla?h[0].scrollWidth-h[0].offsetWidth-(h[0].scrollWidth-h[0].offsetWidth-h.scrollLeft()):0;r=d.position().left-g+m-f}else r=this.offsetWidth,d.prevAll(":visible").each(function(){r+=this.offsetWidth});n.css({top:i?0:o(a.wrapper),left:r-st,height:d.outerHeight(),width:3*st}).data("th",d).show()}else n?n.hide():l(a.wrapper,"")})},_resizable:function(){var t,r,a,o,i,n=this,s=n.options;s.resizable&&(t=s.scrollable?n.wrapper.find(".k-grid-header-wrap:first"):n.wrapper,n._positionColumnResizeHandle(t),t.kendoResizable({handle:".k-resize-handle",hint:function(t){return e('<div class="k-grid-resize-indicator" />').css({height:t.data("th").outerHeight()+n.tbody.attr("clientHeight")})},start:function(t){var d=e(t.currentTarget).data("th"),c=e.inArray(d[0],d.parent().children(":visible")),u=n.tbody.parent(),p=n.footer||e();l(n.wrapper,"col-resize"),i=s.scrollable?n.thead.parent().find("col:eq("+c+")").add(u.children("colgroup").find("col:eq("+c+")")).add(p.find("colgroup").find("col:eq("+c+")")):u.children("colgroup").find("col:eq("+c+")"),r=t.x.location,a=d.outerWidth(),o=n.tbody.outerWidth()},resize:function(t){var l=ut?-1:1,d=a+t.x.location*l-r*l,c=n.footer||e();d>10&&(i.css("width",d),s.scrollable&&(n._footerWidth=o+t.x.location*l-r*l,n.tbody.parent().add(n.thead.parent()).add(c.find("table")).css("width",n._footerWidth)))},resizeend:function(t){var r,o=e(t.currentTarget).data("th"),i=o.outerWidth();l(n.wrapper,""),a!=i&&(r=n.columns[o.parent().find("th:not(.k-group-cell,.k-hierarchy-cell)").index(o)],r.width=i,n.trigger(Z,{column:r,oldWidth:a,newWidth:i})),n.resizeHandle.hide()}}))},_draggable:function(){var t=this;t.options.reorderable&&(t._draggableInstance=t.wrapper.kendoDraggable({group:g.guid(),filter:".k-header:not(.k-group-cell,.k-hierarchy-cell)",hint:function(t){return e('<div class="k-header k-drag-clue" />').css({width:t.width(),paddingLeft:t.css("paddingLeft"),paddingRight:t.css("paddingRight"),lineHeight:t.height()+"px",paddingTop:t.css("paddingTop"),paddingBottom:t.css("paddingBottom")}).html(t.attr(g.attr("title"))||t.attr(g.attr("field"))||t.text()).prepend('<span class="k-icon k-drag-status k-denied" />')}}).data("kendoDraggable"))},_reorderable:function(){var e=this;e.options.reorderable&&e.thead.kendoReorderable({draggable:e._draggableInstance,change:function(t){var r=H(e.columns[t.newIndex],e.columns),a=e.columns[t.oldIndex];e.trigger(et,{newIndex:r,oldIndex:H(a,e.columns),column:a}),e.reorderColumn(r,a)}})},reorderColumn:function(e,t){var r,a,o,l=this,i=H(t,l.columns),s=H(t,d(l.columns)),c=l.footer||l.wrapper.find(".k-grid-footer");if(i!==e)for(l.columns.splice(i,1),l.columns.splice(e,0,t),l._templates(),n(l.thead.prev().find("col:not(.k-group-col,.k-hierarchy-col)"),s,e),l.options.scrollable&&n(l.tbody.prev().find("col:not(.k-group-col,.k-hierarchy-col)"),s,e),n(l.thead.find(".k-header:not(.k-group-cell,.k-hierarchy-cell)"),i,e),c&&c.length&&(n(c.find(".k-grid-footer-wrap>table>colgroup>col:not(.k-group-col,.k-hierarchy-col)"),s,e),n(c.find(".k-footer-template>td:not(.k-group-cell,.k-hierarchy-cell)"),i,e)),r=l.tbody.children(":not(.k-grouping-row,.k-detail-row)"),a=0,o=r.length;o>a;a+=1)n(r.eq(a).find(">td:not(.k-group-cell,.k-hierarchy-cell)"),i,e)},cellIndex:function(t){return e(t).parent().children("td:not(.k-group-cell,.k-hierarchy-cell)").index(t)},_modelForContainer:function(t){t=e(t),t.is("tr")||"popup"===this._editMode()||(t=t.closest("tr"));var r=t.attr(g.attr("uid"));return this.dataSource.getByUid(r)},_editable:function(){var t=this,r=t.options.editable,a=function(){var r=document.activeElement,a=t._editContainer;!a||e.contains(a[0],r)||a[0]===r||e(r).closest(".k-animation-container").length||t.editable.end()&&t.closeCell()};if(r){var o=t._editMode();"incell"===o?r.update!==!1&&t.wrapper.on("touchend"+L+" "+tt+L,"tr:not(.k-grouping-row) > td",function(r){var a=e(this);a.hasClass("k-hierarchy-cell")||a.hasClass("k-detail-cell")||a.hasClass("k-group-cell")||a.hasClass("k-edit-cell")||a.has("a.k-grid-delete").length||a.has("button.k-grid-delete").length||a.closest("tbody")[0]!==t.tbody[0]||e(r.target).is(":input")||(t.editable?t.editable.end()&&(t.closeCell(),t.editCell(a)):t.editCell(a))}).on("focusin"+L,function(){clearTimeout(t.timer),t.timer=null}).on("focusout"+L,function(){t.timer=setTimeout(a,1)}):r.update!==!1&&t.wrapper.on("touchend"+L+" "+tt+L,"tbody>tr:not(.k-detail-row,.k-grouping-row):visible a.k-grid-edit",function(r){r.preventDefault(),t.editRow(e(this).closest("tr"))}),r.destroy!==!1?t.wrapper.on("touchend"+L+" "+tt+L,"tbody>tr:not(.k-detail-row,.k-grouping-row):visible .k-grid-delete",function(r){r.preventDefault(),r.stopPropagation(),t.removeRow(e(this).closest("tr"))}):t.wrapper.on("touchend"+L+" "+tt+L,"tbody>tr:not(.k-detail-row,.k-grouping-row):visible button.k-grid-delete",function(e){t._confirmation()||e.preventDefault()})}},editCell:function(e){var t=this,r=t.columns[t.cellIndex(e)],a=t._modelForContainer(e);!a||a.editable&&!a.editable(r.field)||r.command||!r.field||(t._attachModelChange(a),t._editContainer=e,t.editable=e.addClass("k-edit-cell").kendoEditable({fields:{field:r.field,format:r.format,editor:r.editor,values:r.values},model:a,change:function(r){t.trigger(P,{values:r.values,container:e,model:a})&&r.preventDefault()}}).data("kendoEditable"),e.parent().addClass("k-grid-edit-row"),t.trigger(F,{container:e,model:a}))},_destroyEditable:function(){var e=this,t=function(){e.editable&&(e._detachModelChange(),e.editable.destroy(),e.editable=null,e._editContainer=null)};e.editable&&("popup"===e._editMode()?e._editContainer.data("kendoWindow").bind("deactivate",t).close():t())},_attachModelChange:function(e){var t=this;t._modelChangeHandler=function(e){t._modelChange({field:e.field,model:this})},e.bind("change",t._modelChangeHandler)},_detachModelChange:function(){var e=this,t=e._editContainer,r=e._modelForContainer(t);r&&r.unbind(j,e._modelChangeHandler)},closeCell:function(){var t=this,r=t._editContainer.removeClass("k-edit-cell"),a=r.closest("tr").attr(g.attr("uid")),o=t.columns[t.cellIndex(r)],l=t.dataSource.getByUid(a);r.parent().removeClass("k-grid-edit-row"),t._destroyEditable(),t._displayCell(r,o,l),r.hasClass("k-dirty-cell")&&e('<span class="k-dirty"/>').prependTo(r)},_displayCell:function(e,t,r){var a=this,o={storage:{},count:0},l=C({},g.Template,a.options.templateSettings),i=g.template(a._cellTmpl(t,o),l);o.count>0&&(i=R(i,o.storage)),e.empty().html(i(r))},removeRow:function(t){var r,a,o=this;o._confirmation()&&(t=e(t).hide(),r=o._modelForContainer(t),r&&!o.trigger(O,{row:t,model:r})&&(o.dataSource.remove(r),a=o._editMode(),("inline"===a||"popup"===a)&&o.dataSource.sync()))},_editMode:function(){var e="incell",t=this.options.editable;return t!==!0&&(e="string"==typeof t?t:t.mode||e),e},editRow:function(r){var a,o=this,l=o._modelForContainer(r),i=o._editMode(),n=o.options.navigatable;o.cancelRow(),l&&(o._attachModelChange(l),"popup"===i?o._createPopupEditor(l):"inline"===i?o._createInlineEditor(r,l):"incell"===i&&e(r).children(W).each(function(){var r=e(this),a=o.columns[r.index()];return l=o._modelForContainer(r),l&&(!l.editable||l.editable(a.field))&&a.field?(o.editCell(r),!1):t}),a=o._editContainer,a.on("touchend"+L+" "+tt+L,"a.k-grid-cancel",function(t){t.preventDefault(),t.stopPropagation();var r=o.items().index(e(o.current()).parent());o.cancelRow(),n&&(o.current(o.items().eq(r).children().filter(B).first()),o.table.focus())}),a.on("touchend"+L+" "+tt+L,"a.k-grid-update",function(e){e.preventDefault(),e.stopPropagation(),o.saveRow()}))},_createPopupEditor:function(t){var r,a,o,l,i,n,s,d,c=this,u="<div "+g.attr("uid")+'="'+t.uid+'"><div class="k-edit-form-container">',p=[],f=c.options.editable,m=f.template,b=y(f)?f.window:{},k=C({},g.Template,c.options.templateSettings);if(m)for(typeof m===lt&&(m=window.unescape(m)),u+=g.template(m,k)(t),o=0,l=c.columns.length;l>o;o++)r=c.columns[o],r.command&&(a=h(r.command,"edit"));else for(o=0,l=c.columns.length;l>o;o++)if(r=c.columns[o],r.command)r.command&&(a=h(r.command,"edit"));else if(u+='<div class="k-edit-label"><label for="'+r.field+'">'+(r.title||r.field||"")+"</label></div>",t.editable&&!t.editable(r.field)||!r.field){var v={storage:{},count:0};i=g.template(c._cellTmpl(r,v),k),v.count>0&&(i=R(i,v.storage)),u+='<div class="k-edit-field">'+i(t)+"</div>"}else p.push({field:r.field,format:r.format,editor:r.editor,values:r.values}),u+="<div "+g.attr("container-for")+'="'+r.field+'" class="k-edit-field"></div>';a&&y(a)&&(a.text&&y(a.text)&&(n=a.text.update,s=a.text.cancel),a.attr&&(d=a.attr)),u+=c._createButton({name:"update",text:n,attr:d})+c._createButton({name:"canceledit",text:s,attr:d}),u+="</div></div>";var _=c._editContainer=e(u).appendTo(c.wrapper).eq(0).kendoWindow(C({modal:!0,resizable:!1,draggable:!0,title:"Edit",visible:!1,close:function(e){e.userTriggered&&c.cancelRow()}},b));c.editable=c._editContainer.kendoEditable({fields:p,model:t,clearContainer:!1}).data("kendoEditable"),_.data("kendoWindow").center().open(),c.trigger(F,{container:_,model:t})},_createInlineEditor:function(t,r){var a,o,l,i=this,n=[];t.children(":not(.k-group-cell,.k-hierarchy-cell)").each(function(){if(o=e(this),a=i.columns[i.cellIndex(o)],a.command||!a.field||r.editable&&!r.editable(a.field)){if(a.command&&(l=h(a.command,"edit"))){o.empty();var t,s,d;y(l)&&(l.text&&y(l.text)&&(t=l.text.update,s=l.text.cancel),l.attr&&(d=l.attr)),e(i._createButton({name:"update",text:t,attr:d})+i._createButton({name:"canceledit",text:s,attr:d})).appendTo(o)}}else n.push({field:a.field,format:a.format,editor:a.editor,values:a.values}),o.attr("data-container-for",a.field),o.empty()}),i._editContainer=t,i.editable=t.addClass("k-grid-edit-row").kendoEditable({fields:n,model:r,clearContainer:!1}).data("kendoEditable"),i.trigger(F,{container:t,model:r})},cancelRow:function(){var e,t=this,r=t._editContainer;r&&(e=t._modelForContainer(r),t.dataSource.cancelChanges(e),"popup"!==t._editMode()?t._displayRow(r):t._displayRow(t.items().filter("["+g.attr("uid")+"="+e.uid+"]")),t._destroyEditable())},saveRow:function(){var e=this,t=e._editContainer,r=e._modelForContainer(t),a=e.editable;t&&a&&a.end()&&!e.trigger(P,{container:t,model:r})&&e.dataSource.sync()},_displayRow:function(t){var r=this,a=r._modelForContainer(t);a&&t.replaceWith(e((t.hasClass("k-alt")?r.altRowTemplate:r.rowTemplate)(a)))},_showMessage:function(e){return window.confirm(e)},_confirmation:function(){var e=this,t=e.options.editable,r=t===!0||typeof t===lt?it:t.confirmation;return r!==!1&&null!=r?e._showMessage(r):!0},cancelChanges:function(){this.dataSource.cancelChanges()},saveChanges:function(){var e=this;(e.editable&&e.editable.end()||!e.editable)&&!e.trigger(K)&&e.dataSource.sync()},addRow:function(){var e,t=this,r=t.dataSource,a=t._editMode(),o=t.options.editable.createAt||"",l=r.pageSize(),i=r.view()||[];if(t.editable&&t.editable.end()||!t.editable){"incell"!=a&&t.cancelRow(),e=r.indexOf(i[0]),"bottom"==o.toLowerCase()&&(e+=i.length,l&&!r.options.serverPaging&&i.length>=l&&(e-=1)),0>e&&(e=0);var n=r.insert(e,{}),s=n.uid,d=t.table.find("tr["+g.attr("uid")+"="+s+"]"),c=d.children("td:not(.k-group-cell,.k-hierarchy-cell)").first();"inline"!==a&&"popup"!==a||!d.length?c.length&&t.editCell(c):t.editRow(d)}},_toolbar:function(){var t,r,a=this,o=a.wrapper,l=a.options.toolbar,i=a.options.editable;l&&(t=a.wrapper.find(".k-grid-toolbar"),t.length||(l=A(l)?l({}):typeof l===lt?l:a._toolbarTmpl(l).replace(dt,"\\#"),r=R(g.template(l),a),t=e('<div class="k-toolbar k-grid-toolbar" />').html(r({})).prependTo(o)),i&&i.create!==!1&&t.on("touchend"+L+" "+tt+L,".k-grid-add",function(e){e.preventDefault(),a.addRow()}).on("touchend"+L+" "+tt+L,".k-grid-cancel-changes",function(e){e.preventDefault(),a.cancelChanges()}).on("touchend"+L+" "+tt+L,".k-grid-save-changes",function(e){e.preventDefault(),a.saveChanges()}))},_toolbarTmpl:function(e){var t,r,a=this,o="";if(T(e))for(t=0,r=e.length;r>t;t++)o+=a._createButton(e[t]);return o},_createButton:function(e){var t=e.template||ct,r=typeof e===lt?e:e.name||e.text,o={className:"k-grid-"+(r||"").replace(/\s/g,""),text:r,imageClass:"",attr:"",iconClass:""};if(!(r||y(e)&&e.template))throw Error("Custom commands should have name specified");return y(e)?(e.className&&(e.className+=" "+o.className),"edit"===r&&y(e.text)&&(e=C(!0,{},e),e.text=e.text.edit),e.attr&&y(e.attr)&&(e.attr=a(e.attr)),o=C(!0,o,ht[r],e)):o=C(!0,o,ht[r]),g.template(t)(o)},_groupable:function(){var t=this;t.table.on("touchend"+L+" "+tt+L,".k-grouping-row .k-i-collapse, .k-grouping-row .k-i-expand",function(r){var a=e(this),o=a.closest("tr");a.hasClass("k-i-collapse")?t.collapseGroup(o):t.expandGroup(o),r.preventDefault(),r.stopPropagation()}),t._attachGroupable()},_attachGroupable:function(){var t=this,r=t.wrapper,a=t.options.groupable;a&&(r.has("div.k-grouping-header")[0]||e("<div />").addClass("k-grouping-header").prependTo(r),t.groupable&&t.groupable.destroy(),t.groupable=new k(r,C({},a,{draggable:t._draggableInstance,groupContainer:">div.k-grouping-header",dataSource:t.dataSource,filter:".k-header:not(.k-group-cell,.k-hierarchy-cell):visible["+g.attr("field")+"]",allowDrag:t.options.reorderable})))},_selectable:function(){var e,t,r=this,a=r.options.selectable;a&&(e=typeof a===lt&&a.toLowerCase().indexOf("multiple")>-1,t=typeof a===lt&&a.toLowerCase().indexOf("cell")>-1,r.selectable=new g.ui.Selectable(r.table,{filter:">"+(t?q:"tbody>tr:not(.k-grouping-row,.k-detail-row,.k-group-footer)"),aria:!0,multiple:e,change:function(){r.trigger(j)}}),r.options.navigatable&&r.table.on("keydown"+L,function(a){var o=r.current();a.keyCode===w.SPACEBAR&&a.target==r.table[0]&&!o.is(".k-edit-cell,.k-header")&&o.parent().is(":not(.k-grouping-row,.k-detail-row,.k-group-footer)")&&(a.preventDefault(),a.stopPropagation(),o=t?o:o.parent(),e?a.ctrlKey?o.hasClass(Y)&&(o.removeClass(Y),o=null):r.selectable.clear():r.selectable.clear(),r.selectable.value(o))}))},clearSelection:function(){var e=this;e.selectable.clear(),e.trigger(j)},select:function(r){var a=this,o=a.selectable;return r=e(r),r.length?(o.options.multiple||(o.clear(),r=r.first()),o.value(r),t):o.value()},current:function(e){var r=this,a=r.options.scrollable,o=r._current,l=r.table.add(r.thead.parent());return e!==t&&e.length&&(o&&o[0]===e[0]||(o&&(o.removeClass(Q).removeAttr("id"),l.removeAttr("aria-activedescendant")),e.attr("id",r._cellId),r._current=e.addClass(Q),l.attr("aria-activedescendant",r._cellId),e.length&&a&&(r._scrollTo(e.parent()[0],r.content[0]),a.virtual?r._scrollTo(e[0],r.content.find(">.k-virtual-scrollable-wrap")[0]):r._scrollTo(e[0],r.content[0])))),r._current},_removeCurrent:function(){this._current&&(this._current.removeClass(Q),this._current=null)},_scrollTo:function(e,t){var r="td"===e.tagName.toLowerCase(),a=e[r?"offsetLeft":"offsetTop"],o=e[r?"offsetWidth":"offsetHeight"],l=t[r?"scrollLeft":"scrollTop"],i=t[r?"clientWidth":"clientHeight"],n=a+o;t[r?"scrollLeft":"scrollTop"]=l>a?a:n>l+i?n-i:l},_navigatable:function(){var t=this,r=R(t.current,t),a=t.table,o=t.thead.parent(),l=a;t.options.navigatable&&(t.options.scrollable&&(l=a.add(o),o.attr(at,-1)),o.on("keydown"+L,function(e){e.altKey&&e.keyCode==w.DOWN&&(r().find(".k-grid-filter, .k-header-column-menu").click(),e.stopImmediatePropagation())}).find("a.k-link").attr("tabIndex",-1),a.attr(at,E.max(a.attr(at)||0,0)).on("mousedown"+L+" keydown"+L,".k-detail-cell",function(e){e.target!==e.currentTarget&&e.stopImmediatePropagation()}),l.on("mousedown"+L,N+">"+B,R(f,t)).on("focus"+L,function(){var t=r();t&&t.is(":visible")?t.addClass(Q):r(e(this).find(z)),this==a[0]?(o.attr(at,-1),a.attr(at,0)):(a.attr(at,-1),o.attr(at,0))}).on("focusout"+L,function(){var e=r();e&&e.removeClass(Q)}).on("keydown"+L,function(o){var l,i,n,s=o.keyCode,d=!1,c=!o.isDefaultPrevented()&&!e(o.target).is(":button,a,:input,a>.k-icon"),u=t.options.pageable,p=t.dataSource,h="incell"==t._editMode(),f=o.shiftKey,m=g.support.browser,b=r();if(b&&b.is("th")&&(c=!0),c&&s==w.UP)b?(i=b.parent().prevAll(N).first(),i[0]||(i=t.thead.parent().focus().find(N).first()),n=b.index(),b=i.children().eq(n),b[0]&&b.is(B)||(b=i.children(B).first())):b=a.find(z),d=!0,r(b);else if(c&&s==w.DOWN)b?(i=b.parent().nextAll(N).first(),!i[0]&&b.is("th")&&(i=t.tbody.parent().focus().end().find(N).first()),n=b.index(),b=i.children().eq(n),b[0]&&b.is(B)||(b=i.children(B).first())):b=a.find(z),d=!0,r(b);else if(c&&s==w.LEFT)r(b?b.prevAll(W+":first"):a.find(z)),d=!0;else if(c&&s==w.RIGHT)b?b.next()[0]&&(b=b.nextAll(W+":first")):b=a.find(z),d=!0,r(b);else if(c&&u&&w.PAGEDOWN==s)p.page(p.page()+1),d=!0;else if(c&&u&&w.PAGEUP==s)p.page(p.page()-1),d=!0;else if(s==w.ENTER||w.F2==s)if(b=b?b:a.find(z),b.is("th"))b.find(".k-link").click(),d=!0;else if(b.parent().is(".k-master-row,.k-grouping-row"))b.parent().find(".k-icon:first").click(),d=!0;else{var k=b.find(":focusable:first");!b.hasClass("k-edit-cell")&&k[0]&&b.hasClass("k-state-focused")?(k.focus(),d=!0):t.options.editable&&!e(o.target).is(":button,.k-button")&&(t._handleEditing(b),d=!0)}else if(w.ESC==s)b&&e.contains(b[0],document.activeElement)&&!b.hasClass("k-edit-cell")&&!b.parent().hasClass("k-grid-edit-row")?(t.table[0].focus(),d=!0):!t._editContainer||b&&!t._editContainer.has(b[0])&&b[0]!==t._editContainer[0]||(h?t.closeCell():(l=t.items().index(e(b).parent()),document.activeElement.blur(),t.cancelRow(),l>=0&&t.current(t.items().eq(l).children().filter(B).first())),m.msie&&9>parseInt(m.version,10)&&document.body.focus(),a.focus(),d=!0);else if(w.TAB==s){var v;b=e(b),t.options.editable&&h&&(v=e(document.activeElement).closest(".k-edit-cell"),v[0]&&v[0]!==b[0]&&(b=v)),v=f?b.prevAll(W+":first"):b.nextAll(":visible:first"),v.length||(v=b.parent()[f?"prevAll":"nextAll"]("tr:not(.k-grouping-row):not(.k-detail-row):visible:first").children(W+(f?":last":":first"))),!b.is("th")&&v.length&&t.options.editable&&h&&(t._handleEditing(b,v),d=!0)}d&&(o.preventDefault(),o.stopPropagation())}))},_handleEditing:function(r,a){var o,l,i=this,n=e(document.activeElement),s=i._editMode(),d=i._editContainer;if(l="incell"==s?r.hasClass("k-edit-cell"):r.parent().hasClass("k-grid-edit-row"),i.editable){if(e.contains(d[0],n[0])&&(n.blur(),g.support.browser.opera&&n.change()),!i.editable)return i.table.focus(),t;if(!i.editable.end())return"incell"==s?i.current(d):i.current(d.children().filter(W).first()),o=d.find(":focusable:first")[0],o&&o.focus(),t;"incell"==s?i.closeCell():(i.saveRow(),l=!0)}a&&i.current(a),i.table.focus(),(!l&&!a||a)&&("incell"==s?i.editCell(i.current()):i.editRow(i.current().parent()))},_wrapper:function(){var e=this,t=e.table,r=e.options.height,a=e.element;a.is("div")||(a=a.wrap("<div/>").parent()),e.wrapper=a.addClass("k-grid k-widget"),r&&(e.wrapper.css(rt,r),t.css(rt,"auto"))},_tbody:function(){var t,r=this,a=r.table;t=a.find(">tbody"),t.length||(t=e("<tbody/>").appendTo(a)),r.tbody=t},_scrollable:function(){var t,r,a=this,o=a.options,l=o.scrollable,i=l!==!0&&l.virtual&&!a.virtualScrollable,n=!g.support.kineticScrollNeeded||i?g.support.scrollbar():0;if(l){t=a.wrapper.children(".k-grid-header"),t[0]||(t=e('<div class="k-grid-header" />').insertBefore(a.table)),t.css(ut?"padding-left":"padding-right",l.virtual?n+1:n),r=e('<table role="grid" cellspacing="0" />'),r.append(a.thead),t.empty().append(e('<div class="k-grid-header-wrap" />').append(r)),a.content=a.table.parent(),a.content.is(".k-virtual-scrollable-wrap")&&(a.content=a.content.parent()),a.content.is(".k-grid-content, .k-virtual-scrollable-wrap")||(a.content=a.table.wrap('<div class="k-grid-content" />').parent()),i&&(a.virtualScrollable=new pt(a.content,{dataSource:a.dataSource,itemHeight:R(a._averageRowHeight,a)})),a.scrollables=t.children(".k-grid-header-wrap");var s=a.wrapper.find(".k-grid-footer"),d=ut&&e.browser.webkit?n:0;if(s.length&&(a.scrollables=a.scrollables.add(s.children(".k-grid-footer-wrap"))),l.virtual)a.content.find(">.k-virtual-scrollable-wrap").bind("scroll"+L,function(){a.scrollables.scrollLeft(this.scrollLeft+d)});else{a.content.bind("scroll"+L,function(){a.scrollables.scrollLeft(this.scrollLeft+d)});var c=g.touchScroller(a.content);c&&c.movable&&c.movable.bind("change",function(e){a.scrollables.scrollLeft(-e.sender.x)})}}},_setContentHeight:function(){var e=this,t=e.options,r=e.wrapper.innerHeight(),a=e.wrapper.children(".k-grid-header"),o=g.support.scrollbar();if(t.scrollable){r-=a.outerHeight(),e.pager&&(r-=e.pager.element.outerHeight()),t.groupable&&(r-=e.wrapper.children(".k-grouping-header").outerHeight()),t.toolbar&&(r-=e.wrapper.children(".k-grid-toolbar").outerHeight()),e.footerTemplate&&(r-=e.wrapper.children(".k-grid-footer").outerHeight());var l=function(e){var t,r;return e[0].style.height?!0:(t=e.height(),e.height("auto"),r=e.height(),t!=r?(e.height(""),!0):(e.height(""),!1))};l(e.wrapper)&&(r>2*o?e.content.height(r):e.content.height(2*o+1))}},_averageRowHeight:function(){var e=this._rowHeight;return this._rowHeight=e=this.table.outerHeight()/this.table[0].rows.length,e},_dataSource:function(){var e,r=this,a=r.options,o=a.dataSource;o=T(o)?{data:o}:o,y(o)&&(C(o,{table:r.table,fields:r.columns}),e=a.pageable,y(e)&&e.pageSize!==t&&(o.pageSize=e.pageSize)),r.dataSource&&r._refreshHandler?r.dataSource.unbind(j,r._refreshHandler).unbind(I,r._requestStartHandler).unbind(M,r._errorHandler):(r._refreshHandler=R(r.refresh,r),r._requestStartHandler=R(r._requestStart,r),r._errorHandler=R(r._error,r)),r.dataSource=b.create(o).bind(j,r._refreshHandler).bind(I,r._requestStartHandler).bind(M,r._errorHandler)},_error:function(){this._progress(!1)},_requestStart:function(){this._progress(!0)},_modelChange:function(t){var r,a,o,l,i,n=this,s=t.model,d=n.tbody.find("tr["+g.attr("uid")+"="+s.uid+"]"),c=d.hasClass("k-alt");if(d.children(".k-edit-cell").length&&!n.options.rowTemplate)d.children(":not(.k-group-cell,.k-hierarchy-cell)").each(function(){r=e(this),a=n.columns[n.cellIndex(r)],a.field===t.field&&(r.hasClass("k-edit-cell")?r.addClass("k-dirty-cell"):(n._displayCell(r,a,s),e('<span class="k-dirty"/>').prependTo(r)))});else if(!d.hasClass("k-grid-edit-row")){for(o=e((c?n.altRowTemplate:n.rowTemplate)(s)),d.replaceWith(o),l=0,i=n.columns.length;i>l;l++)a=n.columns[l],a.field===t.field&&(r=o.children(":not(.k-group-cell,.k-hierarchy-cell)").eq(l),e('<span class="k-dirty"/>').prependTo(r));n.trigger("itemChange",{item:o,data:s,ns:m})}},_pageable:function(){var t,r=this,a=r.options.pageable;a&&(t=r.wrapper.children("div.k-grid-pager"),t.length||(t=e('<div class="k-pager-wrap k-grid-pager"/>').appendTo(r.wrapper)),r.pager&&r.pager.destroy(),r.pager="object"==typeof a&&a instanceof g.ui.Pager?a:new g.ui.Pager(t,C({},a,{dataSource:r.dataSource})))
|
12
|
+
},_footer:function(){var t=this,r=t.dataSource.aggregates(),a="",o=t.footerTemplate,l=t.options,n=t.footer||t.wrapper.find(".k-grid-footer");if(o)if(r=D(r)?i(t.dataSource.aggregate()):r,a=e(t._wrapFooter(o(r))),n.length){var s=a;n.replaceWith(s),n=t.footer=s}else n=t.footer=l.scrollable?l.pageable?a.insertBefore(t.wrapper.children("div.k-grid-pager")):a.appendTo(t.wrapper):a.insertBefore(t.tbody);else n&&!t.footer&&(t.footer=n);n.length&&(l.scrollable&&(t.scrollables=t.scrollables.not(".k-grid-footer-wrap").add(t.footer.attr("tabindex",-1).children(".k-grid-footer-wrap"))),l.resizable&&t._footerWidth&&n.find("table").css("width",t._footerWidth))},_wrapFooter:function(t){var r=this,a="",o=g.support.mobileOS?0:g.support.scrollbar();return r.options.scrollable?(a=e('<div class="k-grid-footer"><div class="k-grid-footer-wrap"><table cellspacing="0"><tbody>'+t+"</tbody></table></div></div>"),r._appendCols(a.find("table")),a.css(ut?"padding-left":"padding-right",o),a):'<tfoot class="k-grid-footer">'+t+"</tfoot>"},_columnMenu:function(){var t,r,a,o,l,i,n=this,s=n.columns,d=n.options,c=d.columnMenu,u=function(){n.thead.parent().focus()};c&&("boolean"==typeof c&&(c={}),n.thead.find("th:not(.k-hierarchy-cell,.k-group-cell)").each(function(p){r=s[p],i=e(this),r.command||!r.field&&!i.attr("data-"+g.ns+"field")||(t=i.data("kendoColumnMenu"),t&&t.destroy(),o=r.sortable!==!1&&c.sortable!==!1?d.sortable:!1,l=d.filterable&&r.filterable!==!1&&c.filterable!==!1?C({},r.filterable,d.filterable):!1,a={dataSource:n.dataSource,values:r.values,columns:c.columns,sortable:o,filterable:l,messages:c.messages,owner:n,closeCallback:u},i.kendoColumnMenu(a))}))},_filterable:function(){var t,r,a=this,o=a.columns,l=function(){a.thead.parent().focus()},i=a.options.filterable;i&&!a.options.columnMenu&&a.thead.find("th:not(.k-hierarchy-cell,.k-group-cell)").each(function(n){t=e(this),o[n].filterable===!1||o[n].command||!o[n].field&&!t.attr("data-"+g.ns+"field")||(r=t.data("kendoFilterMenu"),r&&r.destroy(),t.kendoFilterMenu(C(!0,{},i,o[n].filterable,{dataSource:a.dataSource,values:o[n].values,closeCallback:l})))})},_sortable:function(){var t,r=this,a=r.columns,o=r.options.sortable;o&&r.thead.find("th:not(.k-hierarchy-cell,.k-group-cell)").each(function(l){t=a[l],t.sortable!==!1&&!t.command&&t.field&&e(this).attr("data-"+g.ns+"field",t.field).kendoSortable(C({},o,{dataSource:r.dataSource,aria:!0}))})},_columns:function(t){var r,a=this,o=a.table,l=o.find("col"),i=a.options.dataSource;t=t.length?t:S(o.find("th"),function(t,r){t=e(t);var a=t.attr(g.attr("sortable")),o=t.attr(g.attr("filterable")),i=t.attr(g.attr("type")),n=t.attr(g.attr("groupable")),s=t.attr(g.attr("field")),d=t.attr(g.attr("menu"));return s||(s=t.text().replace(/\s|[^A-z0-9]/g,"")),{field:s,type:i,sortable:"false"!==a,filterable:"false"!==o,groupable:"false"!==n,menu:d,template:t.attr(g.attr("template")),width:l.eq(r).css("width")}}),r=!(a.table.find("tbody tr").length>0&&(!i||!i.transport)),a.columns=S(t,function(e){return e=typeof e===lt?{field:e}:e,e.hidden&&(e.attributes=c(e.attributes),e.footerAttributes=c(e.footerAttributes),e.headerAttributes=c(e.headerAttributes)),C({encoded:r},e)})},_groups:function(){var e=this.dataSource.group();return e?e.length:0},_tmpl:function(e,t){var o,l,i,n,s=this,d=C({},g.Template,s.options.templateSettings),c=s.columns.length,u={storage:{},count:0},p=s._hasDetails(),h=[],f=s._groups();if(!e){for(e="<tr",t&&h.push("k-alt"),p&&h.push("k-master-row"),h.length&&(e+=' class="'+h.join(" ")+'"'),c&&(e+=" "+g.attr("uid")+'="#='+d.paramName+'.uid#"'),e+=" role='row'>",f>0&&(e+=r(f)),p&&(e+='<td class="k-hierarchy-cell"><a class="k-icon k-plus" href="\\#" tabindex="-1"></a></td>'),o=0;c>o;o++)i=s.columns[o],l=i.template,n=typeof l,e+="<td"+a(i.attributes)+" role='gridcell'>",e+=s._cellTmpl(i,u),e+="</td>";e+="</tr>"}return e=g.template(e,d),u.count>0?R(e,u.storage):e},_headerCellText:function(e){var t=this,r=C({},g.Template,t.options.templateSettings),a=e.headerTemplate,o=typeof a,l=e.title||e.field||"";return o===ot?l=g.template(a,r)({}):o===lt&&(l=a),l},_cellTmpl:function(e,t){var r,a,o=this,l=C({},g.Template,o.options.templateSettings),i=e.template,n=l.paramName,s=e.field,d="",c=e.format,u=typeof i,p=e.values;if(e.command){if(T(e.command)){for(r=0,a=e.command.length;a>r;r++)d+=o._createButton(e.command[r]);return d.replace(dt,"\\#")}return o._createButton(e.command).replace(dt,"\\#")}return u===ot?(t.storage["tmpl"+t.count]=i,d+="#=this.tmpl"+t.count+"("+n+")#",t.count++):u===lt?d+=i:p&&p.length&&y(p[0])&&"value"in p[0]?(d+="#var v ="+g.stringify(p)+"#",d+="#for (var idx=0,length=v.length;idx<length;idx++) {#",d+="#if (v[idx].value == ",l.useWithBlock||(d+=n+"."),d+=s,d+=") { #",d+="${v[idx].text}",d+="#break;#",d+="#}#",d+="#}#"):(d+=e.encoded?"${":"#=",c&&(d+='kendo.format("'+c.replace(nt,"\\$1")+'",'),s?(s=n+"."+s,d+=s+"==null?'':"+s):d+="''",c&&(d+=")"),d+=e.encoded?"}":"#"),d},_templates:function(){var t=this,r=t.options,a=t.dataSource,o=a.group(),l=t.footer||t.wrapper.find(".k-grid-footer"),i=a.aggregate();t.rowTemplate=t._tmpl(r.rowTemplate),t.altRowTemplate=t._tmpl(r.altRowTemplate||r.rowTemplate,!0),t._hasDetails()&&(t.detailTemplate=t._detailTmpl(r.detailTemplate||"")),(!D(i)&&!l.length||x(t.columns,function(e){return e.footerTemplate}).length)&&(t.footerTemplate=t._footerTmpl(i,"footerTemplate","k-footer-template")),o&&x(t.columns,function(e){return e.groupFooterTemplate}).length&&(i=e.map(o,function(e){return e.aggregates}),t.groupFooterTemplate=t._footerTmpl(i,"groupFooterTemplate","k-group-footer"))},_footerTmpl:function(e,t,o){var l,n,s,d,c,u=this,p=C({},g.Template,u.options.templateSettings),h=p.paramName,f="",m=u.columns,b={},k=0,v={},_=u._groups(),w=i(e);for(f+='<tr class="'+o+'">',_>0&&(f+=r(_)),u._hasDetails()&&(f+='<td class="k-hierarchy-cell"> </td>'),l=0,n=u.columns.length;n>l;l++)c=m[l],s=c[t],d=typeof s,f+="<td"+a(c.footerAttributes)+">",s?(d!==ot&&(v=w[c.field]?C({},p,{paramName:h+"."+c.field}):{},s=g.template(s,v)),b["tmpl"+k]=s,f+="#=this.tmpl"+k+"("+h+")#",k++):f+=" ",f+="</td>";return f+="</tr>",f=g.template(f,p),k>0?R(f,b):f},_detailTmpl:function(e){var t=this,a="",o=C({},g.Template,t.options.templateSettings),l=o.paramName,i={},n=0,s=t._groups(),c=d(t.columns).length,u=typeof e;return a+='<tr class="k-detail-row">',s>0&&(a+=r(s)),a+='<td class="k-hierarchy-cell"></td><td class="k-detail-cell"'+(c?' colspan="'+c+'"':"")+">",u===ot?(i["tmpl"+n]=e,a+="#=this.tmpl"+n+"("+l+")#",n++):a+=e,a+="</td></tr>",a=g.template(a,o),n>0?R(a,i):a},_hasDetails:function(){var e=this;return null!==e.options.detailTemplate||(e._events[G]||[]).length},_details:function(){var t=this;t.table.on("touchend"+L+" "+tt+L,".k-hierarchy-cell .k-plus, .k-hierarchy-cell .k-minus",function(r){var a,o,l=e(this),i=l.hasClass("k-plus"),n=l.closest("tr.k-master-row"),s=t.detailTemplate,d=t._hasDetails();return l.toggleClass("k-plus",!i).toggleClass("k-minus",i),d&&!n.next().hasClass("k-detail-row")&&(o=t.dataItem(n),e(s(o)).addClass(n.hasClass("k-alt")?"k-alt":"").insertAfter(n),t.trigger(G,{masterRow:n,detailRow:n.next(),data:o,detailCell:n.next().find(".k-detail-cell")})),a=n.next(),t.trigger(i?V:X,{masterRow:n,detailRow:a}),a.toggle(i),t._current&&t._current.attr("aria-expanded",i),r.preventDefault(),!1})},dataItem:function(t){return this._data[this.tbody.find("> tr:not(.k-grouping-row,.k-detail-row,.k-group-footer)").index(e(t))]},expandRow:function(t){e(t).find("> td .k-plus, > td .k-i-expand").click()},collapseRow:function(t){e(t).find("> td .k-minus, > td .k-i-collapse").click()},_thead:function(){var r,o,l,i,n,s=this,d=s.columns,c=s._hasDetails()&&d.length,u="",p=s.table.find(">thead");if(p.length||(p=e("<thead/>").insertBefore(s.tbody)),l=s.element.find("tr:has(th):first"),l.length||(l=p.children().first(),l.length||(l=e("<tr/>"))),l.children().length)c&&!l.find(".k-hierarchy-cell")[0]&&l.prepend('<th class="k-hierarchy-cell"> </th>');else{for(c&&(u+='<th class="k-hierarchy-cell"> </th>'),r=0,o=d.length;o>r;r++)n=d[r],i=s._headerCellText(n),n.command?u+="<th"+a(n.headerAttributes)+">"+i+"</th>":(u+="<th role='columnheader' "+g.attr("field")+"='"+(n.field||"")+"' ",n.title&&(u+=g.attr("title")+'="'+n.title.replace(/'/g,"'")+'" '),n.groupable!==t&&(u+=g.attr("groupable")+"='"+n.groupable+"' "),n.aggregates&&(u+=g.attr("aggregates")+"='"+n.aggregates+"'"),u+=a(n.headerAttributes),u+=">"+i+"</th>");l.html(u)}l.find("th").addClass("k-header"),s.options.scrollable||p.addClass("k-grid-header"),l.find("script").remove().end().appendTo(p),s.thead=p,s._sortable(),s._filterable(),s._scrollable(),s._updateCols(),s._resizable(),s._draggable(),s._reorderable(),s.groupable&&s._attachGroupable(),s._columnMenu()},_updateCols:function(){var e=this;e._appendCols(e.thead.parent().add(e.table))},_appendCols:function(e){var t=this;p(e,d(t.columns),t._hasDetails(),t._groups())},_autoColumns:function(e){if(e&&e.toJSON){var t,r=this;e=e.toJSON();for(t in e)r.columns.push({field:t});r._thead(),r._templates()}},_rowsHtml:function(e){var t,r,a=this,o="",l=a.rowTemplate,i=a.altRowTemplate;for(t=0,r=e.length;r>t;t++)o+=t%2?i(e[t]):l(e[t]),a._data.push(e[t]);return o},_groupRowHtml:function(e,t,a){var o,l,i=this,n="",s=e.field,d=x(i.columns,function(e){return e.field==s})[0]||{},c=d.format?g.format(d.format,e.value):e.value,u=d.groupHeaderTemplate,p=(d.title||s)+": "+c,h=C({},{field:e.field,value:e.value},e.aggregates[e.field]),f=i._groupAggregatesDefaultObject||{},m=e.items;if(u&&(p=typeof u===ot?u(h):g.template(u)(h)),n+='<tr class="k-grouping-row">'+r(a)+'<td colspan="'+t+'" aria-expanded="true">'+'<p class="k-reset">'+'<a class="k-icon k-i-collapse" href="#" tabindex="-1"></a>'+p+"</p></td></tr>",e.hasSubgroups)for(o=0,l=m.length;l>o;o++)n+=i._groupRowHtml(m[o],t-1,a+1);else n+=i._rowsHtml(m);return i.groupFooterTemplate&&(n+=i.groupFooterTemplate(C(f,e.aggregates))),n},collapseGroup:function(r){r=e(r).find(".k-icon").addClass("k-i-expand").removeClass("k-i-collapse").end();var a,o,l=r.find(".k-group-cell").length,i=1;r.find("td:first").attr("aria-expanded",!1),r.nextAll("tr").each(function(){return o=e(this),a=o.find(".k-group-cell").length,o.hasClass("k-grouping-row")?i++:o.hasClass("k-group-footer")&&i--,l>=a||o.hasClass("k-group-footer")&&0>i?!1:(o.hide(),t)})},expandGroup:function(r){r=e(r).find(".k-icon").addClass("k-i-collapse").removeClass("k-i-expand").end();var a,o,l=this,i=r.find(".k-group-cell").length,n=1;r.find("td:first").attr("aria-expanded",!0),r.nextAll("tr").each(function(){return a=e(this),o=a.find(".k-group-cell").length,i>=o?!1:(o!=i+1||a.hasClass("k-detail-row")||(a.show(),a.hasClass("k-grouping-row")&&a.find(".k-icon").hasClass("k-i-collapse")&&l.expandGroup(a),a.hasClass("k-master-row")&&a.find(".k-icon").hasClass("k-minus")&&a.next().show()),a.hasClass("k-grouping-row")&&n++,a.hasClass("k-group-footer")&&(1==n?a.show():n--),t)})},_updateHeader:function(t){var r=this,a=r.thead.find("th.k-group-cell"),o=a.length;t>o?e(Array(t-o+1).join('<th class="k-group-cell k-header"> </th>')).prependTo(r.thead.find("tr")):o>t&&(o-=t,e(x(a,function(e,t){return o>t})).remove())},_firstDataItem:function(e,t){return e&&t&&(e=e.hasSubgroups?this._firstDataItem(e.items[0],t):e.items[0]),e},hideColumn:function(t){var r,a,o,l,i,n,s,u,p,h=this,f=0,g=h.footer||h.wrapper.find(".k-grid-footer"),m=h.columns;if(t="number"==typeof t?m[t]:x(m,function(e){return e.field===t})[0],t&&!t.hidden){for(p=H(t,d(m)),t.hidden=!0,t.attributes=c(t.attributes),t.footerAttributes=c(t.footerAttributes),t.headerAttributes=c(t.headerAttributes),h._templates(),h._updateCols(),h.thead.find(">tr>th:not(.k-hierarchy-cell,.k-group-cell):visible").eq(p).hide(),g&&(h._appendCols(g.find("table:first")),g.find(".k-footer-template>td:not(.k-hierarchy-cell,.k-group-cell):visible").eq(p).hide()),r=h.tbody.children(),i=0,u=r.length;u>i;i+=1)a=r.eq(i),a.is(".k-grouping-row,.k-detail-row")?(o=a.children(":not(.k-group-cell):first,.k-detail-cell").last(),o.attr("colspan",parseInt(o.attr("colspan"),10)-1)):(a.hasClass("k-grid-edit-row")&&(o=a.children(".k-edit-container")[0])&&(o=e(o),o.attr("colspan",parseInt(o.attr("colspan"),10)-1),o.find("col").eq(p).remove(),a=o.find("tr:first")),a.children(":not(.k-group-cell,.k-hierarchy-cell):visible").eq(p).hide());for(n=h.thead.prev().find("col"),i=0,u=n.length;u>i;i+=1){if(s=n[i].style.width,!s||-1!=s.indexOf("%")){f=0;break}f+=parseInt(s,10)}l=e(">.k-grid-header table:first,>.k-grid-footer table:first",h.wrapper).add(h.table),f&&l.width(f),e.browser.msie&&8==parseInt(e.browser.version,10)&&(l.css("display","inline-table"),setTimeout(function(){l.css("display","table")},1)),h.trigger(U,{column:t})}},showColumn:function(t){var r,a,o,l,i,n,s,c,h,f,g=this,m=g.columns,b=g.footer||g.wrapper.find(".k-grid-footer");if(t="number"==typeof t?m[t]:x(m,function(e){return e.field===t})[0],t&&t.hidden){for(f=H(t,m),t.hidden=!1,t.attributes=u(t.attributes),t.footerAttributes=u(t.footerAttributes),t.headerAttributes=u(t.headerAttributes),g._templates(),g._updateCols(),g.thead.find(">tr>th:not(.k-hierarchy-cell,.k-group-cell)").eq(f).show(),b&&(g._appendCols(b.find("table:first")),b.find(".k-footer-template>td:not(.k-hierarchy-cell,.k-group-cell)").eq(f).show()),r=g.tbody.children(),a=0,o=r.length;o>a;a+=1)l=r.eq(a),l.is(".k-grouping-row,.k-detail-row")?(i=l.children(":not(.k-group-cell):first,.k-detail-cell").last(),i.attr("colspan",parseInt(i.attr("colspan"),10)+1)):(l.hasClass("k-grid-edit-row")&&(i=l.children(".k-edit-container")[0])&&(i=e(i),i.attr("colspan",parseInt(i.attr("colspan"),10)+1),p(i.find(">form>table"),d(m),!1,0),l=i.find("tr:first")),l.children(":not(.k-group-cell,.k-hierarchy-cell)").eq(f).show());if(n=e(">.k-grid-header table:first,>.k-grid-footer table:first",g.wrapper).add(g.table),t.width){for(s=0,h=g.thead.prev().find("col"),a=0,o=h.length;o>a;a+=1){if(c=h[a].style.width,c.indexOf("%")>-1){s=0;break}s+=parseInt(c,10)}s&&n.width(s)}else n.width("");g.trigger($,{column:t})}},_progress:function(e){var t=this,r=t.element.is("table")?t.element.parent():t.content&&t.content.length?t.content:t.element;g.ui.progress(r,e)},refresh:function(t){var r,a,o,l,n,s=this,c="",u=s.dataSource.view(),p=s.options.navigatable,h=e(s.current()),f=!1,g=(s.dataSource.group()||[]).length,m=g+d(s.columns).length;if(!(t&&"itemchange"===t.action&&s.editable||(t=t||{},s.trigger("dataBinding",{action:t.action||"rebind",index:t.index,items:t.items})))){if(p&&(s.table[0]===document.activeElement||e.contains(s.table[0],document.activeElement))&&(f=h.is("th"),n=0,f&&(n=s.thead.find("th:not(.k-group-cell)").index(h))),s._destroyEditable(),s._progress(!1),s._data=[],s.columns.length||(s._autoColumns(s._firstDataItem(u[0],g)),m=g+s.columns.length),s._group=g>0||s._group,s._group&&(s._templates(),s._updateCols(),s._updateHeader(g),s._group=g>0),g>0)for(s.detailTemplate&&m++,s.groupFooterTemplate&&(s._groupAggregatesDefaultObject=i(s.dataSource.aggregate())),a=0,r=u.length;r>a;a++)c+=s._groupRowHtml(u[a],m,0);else c+=s._rowsHtml(u);v?s.tbody[0].innerHTML=c:(l=document.createElement("div"),l.innerHTML="<table><tbody>"+c+"</tbody></table>",o=l.firstChild.firstChild,s.table[0].replaceChild(o,s.tbody[0]),s.tbody=e(o)),s._footer(),s._setContentHeight(),n>=0&&(s._removeCurrent(),f?s.current(s.thead.find("th:not(.k-group-cell)").eq(n)):s.current(s.items().eq(n).children().filter(W).first()),s._current.closest("table")[0].focus()),s.trigger(J)}}});m.plugin(ft),m.plugin(pt)})(window.kendo.jQuery);
|
@@ -1,10 +1,11 @@
|
|
1
1
|
/*
|
2
|
-
* Kendo UI Web v2012.
|
2
|
+
* Kendo UI Web v2012.3.1114 (http://kendoui.com)
|
3
3
|
* Copyright 2012 Telerik AD. All rights reserved.
|
4
4
|
*
|
5
|
-
* Kendo UI Web commercial licenses may be obtained at
|
5
|
+
* Kendo UI Web commercial licenses may be obtained at
|
6
|
+
* https://www.kendoui.com/purchase/license-agreement/kendo-ui-web-commercial.aspx
|
6
7
|
* If you do not own a commercial license, this file shall be governed by the
|
7
8
|
* GNU General Public License (GPL) version 3.
|
8
9
|
* For GPL requirements, please review: http://www.gnu.org/copyleft/gpl.html
|
9
10
|
*/
|
10
|
-
|
11
|
+
(function(t){function e(t){return t.position().top+3}var a=window.kendo,r=a.ui.Widget,n=t.proxy,i=".kendoGroupable",o=a.template('<div class="k-group-indicator" data-#=data.ns#field="${data.field}" data-#=data.ns#title="${data.title || ""}" data-#=data.ns#dir="${data.dir || "asc"}"><a href="\\#" class="k-link"><span class="k-icon k-si-arrow-${(data.dir || "asc") == "asc" ? "n" : "s"}">(sorted ${(data.dir || "asc") == "asc" ? "ascending": "descending"})</span>${data.title ? data.title: data.field}</a><a class="k-button k-button-icon k-button-bare"><span class="k-icon k-group-delete"></span></a></div>',{useWithBlock:!1}),d=function(e){return t('<div class="k-header k-drag-clue" />').css({width:e.width(),paddingLeft:e.css("paddingLeft"),paddingRight:e.css("paddingRight"),lineHeight:e.height()+"px",paddingTop:e.css("paddingTop"),paddingBottom:e.css("paddingBottom")}).html(e.attr(a.attr("title"))||e.attr(a.attr("field"))).prepend('<span class="k-icon k-drag-status k-denied" />')},s=t('<div class="k-grouping-dropclue"/>'),l=/(\[|\]|\$|\.|\:|\+)/g,c=r.extend({init:function(o,l){var c,g,u=this,p=a.guid(),f=n(u._intializePositions,u),h=u._dropCuePositions=[];r.fn.init.call(u,o,l),g=u.options.draggable||new a.ui.Draggable(u.element,{filter:u.options.filter,hint:d,group:p}),c=u.groupContainer=t(u.options.groupContainer,u.element).kendoDropTarget({group:g.options.group,dragenter:function(t){u._canDrag(t.draggable.currentTarget)&&(t.draggable.hint.find(".k-drag-status").removeClass("k-denied").addClass("k-add"),s.css({top:e(c),left:0}).appendTo(c))},dragleave:function(t){t.draggable.hint.find(".k-drag-status").removeClass("k-add").addClass("k-denied"),s.remove()},drop:function(e){var r,n=e.draggable.currentTarget,i=n.attr(a.attr("field")),o=n.attr(a.attr("title")),d=u.indicator(i),l=u._dropCuePositions,c=l[l.length-1];(n.hasClass("k-group-indicator")||u._canDrag(n))&&(c?(r=u._dropCuePosition(s.offset().left+parseInt(c.element.css("marginLeft"),10)+parseInt(c.element.css("marginRight"),10)),r&&u._canDrop(t(d),r.element,r.left)&&(r.before?r.element.before(d||u.buildIndicator(i,o)):r.element.after(d||u.buildIndicator(i,o)),u._change())):(u.groupContainer.append(u.buildIndicator(i,o)),u._change()))}}).kendoDraggable({filter:"div.k-group-indicator",hint:d,group:g.options.group,dragcancel:n(u._dragCancel,u),dragstart:function(t){var a=t.currentTarget,r=parseInt(a.css("marginLeft"),10),n=a.position().left-r;f(),s.css({top:e(c),left:n}).appendTo(c),this.hint.find(".k-drag-status").removeClass("k-denied").addClass("k-add")},dragend:function(){u._dragEnd(this)},drag:n(u._drag,u)}).on("click"+i,".k-button",function(e){e.preventDefault(),u._removeIndicator(t(this).parent())}).on("click"+i,".k-link",function(e){var r=t(this).parent(),n=u.buildIndicator(r.attr(a.attr("field")),r.attr(a.attr("title")),"asc"==r.attr(a.attr("dir"))?"desc":"asc");r.before(n).remove(),u._change(),e.preventDefault()}),g.bind(["dragend","dragcancel","dragstart","drag"],{dragend:function(){u._dragEnd(this)},dragcancel:n(u._dragCancel,u),dragstart:function(t){var e,a,r;return u.options.allowDrag||u._canDrag(t.currentTarget)?(f(),h.length?(e=h[h.length-1].element,a=parseInt(e.css("marginRight"),10),r=e.position().left+e.outerWidth()+a):r=0,undefined):(t.preventDefault(),undefined)},drag:n(u._drag,u)}),u.dataSource=u.options.dataSource,u.dataSource&&(u._refreshHandler=n(u.refresh,u),u.dataSource.bind("change",u._refreshHandler))},refresh:function(){var e=this,r=e.dataSource;e.groupContainer.empty().append(t.map(r.group()||[],function(t){var r=t.field.replace(l,"\\$1"),n=e.element.find(e.options.filter).filter("["+a.attr("field")+"="+r+"]");return e.buildIndicator(t.field,n.attr(a.attr("title")),t.dir)}).join("")),e._invalidateGroupContainer()},destroy:function(){var t=this;r.fn.destroy.call(t),t.groupContainer.off(i).kendoDraggable("destroy"),t.dataSource&&t._refreshHandler&&t.dataSource.unbind("change",t._refreshHandler)},options:{name:"Groupable",filter:"th",messages:{empty:"Drag a column header and drop it here to group by that column"}},indicator:function(e){var r=t(".k-group-indicator",this.groupContainer);return t.grep(r,function(r){return t(r).attr(a.attr("field"))===e})[0]},buildIndicator:function(t,e,r){return o({field:t,dir:r,title:e,ns:a.ns})},descriptors:function(){var e,r,n,i,o,d=this,s=t(".k-group-indicator",d.groupContainer);return e=d.element.find(d.options.filter).map(function(){var e=t(this),n=e.attr(a.attr("aggregates")),d=e.attr(a.attr("field"));if(n&&""!==n)for(r=n.split(","),n=[],i=0,o=r.length;o>i;i++)n.push({field:d,aggregate:r[i]});return n}).toArray(),t.map(s,function(r){return r=t(r),n=r.attr(a.attr("field")),{field:n,dir:r.attr(a.attr("dir")),aggregates:e||[]}})},_removeIndicator:function(t){var e=this;t.remove(),e._invalidateGroupContainer(),e._change()},_change:function(){var t=this;t.dataSource&&t.dataSource.group(t.descriptors())},_dropCuePosition:function(e){var a=this._dropCuePositions;if(s.is(":visible")&&0!==a.length){e=Math.ceil(e);var r=a[a.length-1],n=r.right,i=parseInt(r.element.css("marginLeft"),10),o=parseInt(r.element.css("marginRight"),10);return e>=n?e={left:r.element.position().left+r.element.outerWidth()+o,element:r.element,before:!1}:(e=t.grep(a,function(t){return e>=t.left&&t.right>=e})[0],e&&(e={left:e.element.position().left-i,element:e.element,before:!0})),e}},_drag:function(t){var e=a.touchLocation(t),r=this._dropCuePosition(e.x);r&&s.css({left:r.left})},_canDrag:function(t){var e=t.attr(a.attr("field"));return"false"!=t.attr(a.attr("groupable"))&&e&&(t.hasClass("k-group-indicator")||!this.indicator(e))},_canDrop:function(t,e,a){var r=t.next();return t[0]!==e[0]&&(!r[0]||e[0]!==r[0]||a>r.position().left)},_dragEnd:function(e){var r=this,n=e.currentTarget.attr(a.attr("field")),i=r.indicator(n);e!==r.options.draggable&&!e.dropped&&i&&r._removeIndicator(t(i)),r._dragCancel()},_dragCancel:function(){s.remove(),this._dropCuePositions=[]},_intializePositions:function(){var e,a=this,r=t(".k-group-indicator",a.groupContainer);a._dropCuePositions=t.map(r,function(a){return a=t(a),e=a.offset().left,{left:parseInt(e,10),right:parseInt(e+a.outerWidth(),10),element:a}})},_invalidateGroupContainer:function(){var t=this.groupContainer;t.is(":empty")&&t.html(this.options.messages.empty)}});a.ui.plugin(c)})(window.kendo.jQuery);
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/*
|
2
|
+
* Kendo UI Web v2012.3.1114 (http://kendoui.com)
|
3
|
+
* Copyright 2012 Telerik AD. All rights reserved.
|
4
|
+
*
|
5
|
+
* Kendo UI Web commercial licenses may be obtained at
|
6
|
+
* https://www.kendoui.com/purchase/license-agreement/kendo-ui-web-commercial.aspx
|
7
|
+
* If you do not own a commercial license, this file shall be governed by the
|
8
|
+
* GNU General Public License (GPL) version 3.
|
9
|
+
* For GPL requirements, please review: http://www.gnu.org/copyleft/gpl.html
|
10
|
+
*/
|
11
|
+
(function(e,t){function a(e,t,a){var i,r;e.on("dragenter"+_,function(){t(),r=new Date,i||(i=setInterval(function(){var e=new Date-r;e>100&&(a(),clearInterval(i),i=null)},100))}).on("dragover"+_,function(){r=new Date})}function i(e,t){var a=e[t];return l(a)?a.field||t:a}function r(e,a){return e!==t&&e.match(/\/$/)||(e=(e||"")+"/"),e+a}function n(e){if(!e)return"";var t=" bytes";return e>=1073741824?(t=" GB",e/=1073741824):e>=1048576?(t=" MB",e/=1048576):e>=1024&&(t=" KB",e/=1024),Math.round(100*e)/100+t}var o=window.kendo,s=o.ui.Widget,l=e.isPlainObject,d=e.proxy,u=e.extend,c=o.support.placeholder,p=e.isFunction,f=/(^\/|\/$)/g,h="change",m="apply",g="error",v="click",_=".kendoImageBrowser",k=".kendoBreadcrumbs",b=".kendoSearchBox",w="name",y="size",F="type",S={field:F,dir:"asc"},N=o.template('<li data-#=ns#value="#=value#" class="k-item">${text}</li>'),x=o.template('<li class="k-tile-empty"><strong>${text}</strong></li>'),B='<div class="k-widget k-toolbar k-floatwrap"><div class="k-toolbar-wrap">#if(showUpload) { # <div class="k-widget k-upload"><div class="k-button k-button-icontext k-button-bare k-upload-button"><span class="k-icon k-add"></span>#=messages.uploadFile#<input type="file" name="file" /></div></div>#}##if(showCreate) {#<button type="button" class="k-button k-button-icon k-button-bare"><span class="k-icon k-addfolder"></span></button>#}##if(showDelete) {#<button type="button" class="k-button k-button-icon k-button-bare k-state-disabled"><span class="k-icon k-delete"></span></button> #}#</div><div class="k-tiles-arrange">#=messages.orderBy#: <a href="\\#" class="k-link"><span>#=messages.orderByName#</span><span class="k-icon k-i-arrow-s"></span></a></div></div>';u(!0,o.data,{schemas:{imagebrowser:{data:function(e){return e.items||e||[]},model:{id:"name",fields:{name:"name",size:"size",type:"type"}}}}}),u(!0,o.data,{transports:{imagebrowser:o.data.RemoteTransport.extend({init:function(t){o.data.RemoteTransport.fn.init.call(this,e.extend(!0,{},this.options,t))},_call:function(t,a){a.data=e.extend({},a.data,{path:this.options.path()}),p(this.options[t])?this.options[t].call(this,a):o.data.RemoteTransport.fn[t].call(this,a)},read:function(e){this._call("read",e)},create:function(e){this._call("create",e)},destroy:function(e){this._call("destroy",e)},update:function(){},options:{read:{type:"POST"},update:{type:"POST"},create:{type:"POST"},destroy:{type:"POST"}}})}});var T;T=e.browser.msie&&8>parseFloat(e.browser.version)?function(e){return e.offsetTop}:function(t){return t.offsetTop-e(t).height()};var C=s.extend({init:function(e,t){var a=this;t=t||{},s.fn.init.call(a,e,t),a.element.addClass("k-imagebrowser"),a.element.on(v+_,".k-toolbar button:not(.k-state-disabled):has(.k-delete)",d(a._deleteClick,a)).on(v+_,".k-toolbar button:not(.k-state-disabled):has(.k-addfolder)",d(a._addClick,a)).on("keydown"+_,"li.k-state-selected input",d(a._directoryKeyDown,a)).on("blur"+_,"li.k-state-selected input",d(a._directoryBlur,a)),a._dataSource(),a.refresh(),a.path(a.options.path)},options:{name:"ImageBrowser",messages:{uploadFile:"Upload",orderBy:"Arrange by",orderByName:"Name",orderBySize:"Size",directoryNotFound:"A directory with this name was not found.",emptyFolder:"Empty Folder",deleteFile:'Are you sure you want to delete "{0}"?',invalidFileType:'The selected file "{0}" is not valid. Supported file types are {1}.',overwriteFile:'A file with name "{0}" already exists in the current directory. Do you want to overwrite it?',dropFilesHere:"drop files here to upload"},transport:{},path:"/",fileTypes:"*.png,*.gif,*.jpg,*.jpeg"},events:[g,h,m],destroy:function(){var e=this;s.fn.destroy.call(e),e.dataSource.unbind(g,e._errorHandler),e.element.add(e.list).add(e.toolbar).off(_),e.arrangeByPopup&&e.arrangeByPopup.destroy(),o.destroy(e.element)},value:function(){var e,a=this,i=a._selectedItem(),n=a.options.transport.imageUrl;return i&&"f"===i.get(a._getFieldName(F))?(e=r(a.path(),i.get(a._getFieldName(w))).replace(f,""),n&&(e=p(n)?n(e):o.format(n,e)),e):t},_selectedItem:function(){var e=this.listView,a=e.select();return a.length?this.dataSource.getByUid(a.attr(o.attr("uid"))):t},_toolbar:function(){var t,a,i=this,r=o.template(B),n=i.options.messages,s=[{text:n.orderByName,value:"name",ns:o.ns},{text:n.orderBySize,value:"size",ns:o.ns}];i.toolbar=e(r({messages:n,showUpload:i.options.transport.uploadUrl,showCreate:i.options.transport.create,showDelete:i.options.transport.destroy})).appendTo(i.element).find(".k-upload input").kendoUpload({multiple:!1,localization:{dropFilesHere:n.dropFilesHere},async:{saveUrl:i.options.transport.uploadUrl,autoUpload:!0},upload:d(i._fileUpload,i)}).end(),i.upload=i.toolbar.find(".k-upload input").data("kendoUpload"),t=i.toolbar.find(".k-tiles-arrange a"),i.arrangeByPopup=a=e("<ul>"+o.render(N,s)+"</ul>").kendoPopup({anchor:t}).on(v+_,"li",function(){var t=e(this),r=t.attr(o.attr("value"));i.toolbar.find(".k-tiles-arrange a span:first").html(t.text()),a.close(),i.orderBy(r)}).data("kendoPopup"),t.on(v+_,function(e){e.preventDefault(),a.toggle()}),i._attachDropzoneEvents()},_attachDropzoneEvents:function(){var t=this;t.options.transport.uploadUrl&&(a(e(document.documentElement),e.proxy(t._dropEnter,t),e.proxy(t._dropLeave,t)),t._scrollHandler=d(t._positionDropzone,t))},_dropEnter:function(){this._positionDropzone(),e(document).on("scroll"+_,this._scrollHandler)},_dropLeave:function(){this._removeDropzone(),e(document).off("scroll"+_,this._scrollHandler)},_positionDropzone:function(){var e=this,t=e.element,a=t.offset();e.toolbar.find(".k-dropzone").addClass("k-imagebrowser-dropzone").offset(a).css({width:t[0].clientWidth,height:t[0].clientHeight,lineHeight:t[0].clientHeight+"px"})},_removeDropzone:function(){this.toolbar.find(".k-dropzone").removeClass("k-imagebrowser-dropzone").css({width:"",height:"",lineHeight:"",top:"",left:""})},_deleteClick:function(){var e=this,t=e.listView.select(),a=o.format(e.options.messages.deleteFile,t.find("strong").text());t.length&&e._showMessage(a,"confirm")&&e.listView.remove(t)},_addClick:function(){this.createDirectory()},_fileUpload:function(e){var t,a=this,i=a.options,r=i.fileTypes,n=RegExp(("("+r.split(",").join(")|(")+")").replace(/\*\./g,".*."),"i"),s=e.files[0].name,l=a._getFieldName(w),d=a._getFieldName(y);n.test(s)?(e.data={path:a.path()},t=a._createFile(s),t?a.upload.one("success",function(e){t.set(l,e.response[l]),t.set(d,e.response[d]),a._tiles=a.listView.items().filter("["+o.attr("type")+"=f]")}):e.preventDefault()):(e.preventDefault(),a._showMessage(o.format(i.messages.invalidFileType,s,r)))},_findFile:function(e){var t,a,i,r=this.dataSource.data(),n=this._getFieldName(F),o=this._getFieldName(w);for(e=e.toLowerCase(),t=0,i=r.length;i>t;t++)if("f"===r[t].get(n)&&r[t].get(o).toLowerCase()===e){a=r[t];break}return a},_createFile:function(e){var t,a,i=this,r=0,n={},s=i._getFieldName(F),l=i.dataSource.view(),d=i._findFile(e);if(d&&!i._showMessage(o.format(i.options.messages.overwriteFile,e),"confirm"))return null;if(d)return d;for(t=0,a=l.length;a>t;t++)if("f"===l[t].get(s)){r=t;break}return n[s]="f",n[i._getFieldName(w)]=e,n[i._getFieldName(y)]=0,i.dataSource.insert(++r,n)},createDirectory:function(){var e,t,a=this,i=0,r=a._getFieldName(F),n=a._getFieldName(w),s=a.dataSource.data(),l=a._nameDirectory(),d=new a.dataSource.reader.model;for(e=0,t=s.length;t>e;e++)"d"===s[e].get(r)&&(i=e);d.set(r,"d"),d.set(n,l),a.listView.one("dataBound",function(){var e=a.listView.items().filter("["+o.attr("uid")+"="+d.uid+"]"),t=e.find("input");e.length&&this.edit(e),this.element.scrollTop(e.attr("offsetTop")-this.element[0].offsetHeight),setTimeout(function(){t.select()})}).one("save",function(e){var t=e.model.get(n);t?e.model.set(n,a._nameExists(t,d.uid)?a._nameDirectory():t):e.model.set(n,l)}),a.dataSource.insert(++i,d)},_directoryKeyDown:function(e){13==e.keyCode&&e.currentTarget.blur()},_directoryBlur:function(){this.listView.save()},_nameExists:function(e,t){var a,i,r=this.dataSource.data(),n=this._getFieldName(F),o=this._getFieldName(w);for(a=0,i=r.length;i>a;a++)if("d"===r[a].get(n)&&r[a].get(o).toLowerCase()===e.toLowerCase()&&r[a].uid!==t)return!0;return!1},_nameDirectory:function(){var t,a,i,r="New folder",n=this.dataSource.data(),o=[],s=this._getFieldName(F),l=this._getFieldName(w);for(a=0,i=n.length;i>a;a++)"d"===n[a].get(s)&&n[a].get(l).toLowerCase().indexOf(r.toLowerCase())>-1&&o.push(n[a].get(l));if(e.inArray(r,o)>-1){a=2;do t=r+" ("+a+")",a++;while(e.inArray(t,o)>-1);r=t}return r},orderBy:function(e){this.dataSource.sort([{field:this._getFieldName(F),dir:"asc"},{field:this._getFieldName(e),dir:"asc"}])},search:function(e){this.dataSource.filter({field:this._getFieldName(w),operator:"contains",value:e})},_content:function(){var t=this;t.list=e('<ul class="k-reset k-floats k-tiles" />').appendTo(t.element).on("scroll"+_,d(t._scroll,t)).on("dblclick"+_,"li",d(t._dblClick,t)),t.listView=new o.ui.ListView(t.list,{dataSource:t.dataSource,template:t._itemTmpl(),editTemplate:t._editTmpl(),selectable:!0,autoBind:!1,dataBinding:function(e){t.toolbar.find(".k-delete").parent().addClass("k-state-disabled"),("remove"===e.action||"sync"===e.action)&&e.preventDefault()},dataBound:function(){t.dataSource.view().length?(t._tiles=this.items().filter("["+o.attr("type")+"=f]"),t._scroll()):this.wrapper.append(x({text:t.options.messages.emptyFolder}))},change:d(t._listViewChange,t)})},_dblClick:function(t){var a=this,i=e(t.currentTarget);if(i.filter("["+o.attr("type")+"=d]").length){var n=a.dataSource.getByUid(i.attr(o.attr("uid")));n&&(a.path(r(a.path(),n.get(a._getFieldName(w)))),a.breadcrumbs.value(a.path()))}else i.filter("["+o.attr("type")+"=f]").length&&a.trigger(m)},_listViewChange:function(){var e=this._selectedItem();this.toolbar.find(".k-delete").parent().removeClass("k-state-disabled"),e&&"f"===e.get(this._getFieldName(F))&&this.trigger(h)},_dataSource:function(){var e,t=this,a=t.options,r=a.transport,n=u({},S),s={field:w,dir:"asc"},c={type:r.type||"imagebrowser",sort:[n,s]};l(r)&&(r.path=d(t.path,t),c.transport=r),l(a.schema)?(c.schema=a.schema,l(a.schema.model)&&a.schema.model.fields&&(n.field=i(a.schema.model.fields,F),s.field=i(a.schema.model.fields,w))):r.type&&l(o.data.schemas[r.type])&&(e=o.data.schemas[r.type],l(e.model)&&e.model.fields&&(n.field=i(e.model.fields,F),s.field=i(e.model.fields,w))),t.dataSource&&t._errorHandler?t.dataSource.unbind(g,t._errorHandler):t._errorHandler=d(t._error,t),t.dataSource=o.data.DataSource.create(c).bind(g,t._errorHandler)},_navigation:function(){var t=this,a=e('<div class="k-floatwrap"><input/><input/></div>').appendTo(this.element);t.breadcrumbs=a.find("input:first").kendoBreadcrumbs({value:t.options.path,change:function(){t.path(this.value())}}).data("kendoBreadcrumbs"),t.searchBox=a.parent().find("input:last").kendoSearchBox({change:function(){t.search(this.value())}}).data("kendoSearchBox")},_error:function(e){var t,a=this;a.trigger(g,e)||(t=e.xhr.status,"error"==e.status?"404"==t?a._showMessage(a.options.messages.directoryNotFound):"0"!=t&&a._showMessage("Error! The requested URL returned "+t+" - "+e.xhr.statusText):"timeout"==t&&a._showMessage("Error! Server timeout."))},_showMessage:function(e,t){return window[t||"alert"](e)},refresh:function(){var e=this;e._navigation(),e._toolbar(),e._content()},_loadImage:function(t){var a=this,i=e(t),r=a.dataSource.getByUid(i.attr(o.attr("uid"))),n=r.get(a._getFieldName(w)),s=e("<img />",{alt:n}).hide().on("load"+_,function(){e(this).prev().remove().end().addClass("k-image").fadeIn()});i.find(".k-loading").after(s),s.attr("src",a.options.transport.thumbnailUrl+"?path="+a.path()+encodeURIComponent(n)),t.loaded=!0},_scroll:function(){var e=this;e.options.transport&&e.options.transport.thumbnailUrl&&(clearTimeout(e._timeout),e._timeout=setTimeout(function(){var a=e.list.outerHeight(),i=e.list.scrollTop(),r=i+a;e._tiles.each(function(){var a=T(this),n=a+this.offsetHeight;return(a>=i&&r>a||n>=i&&r>n)&&e._loadImage(this),a>r?!1:t}),e._tiles=e._tiles.filter(function(){return!this.loaded})},250))},_editTmpl:function(){var e=this,t='<li class="k-tile k-state-selected" '+o.attr("uid")+'="#=uid#" ';return t+=o.attr("type")+'="${'+e._getFieldName(F)+'}">',t+="#if("+e._getFieldName(F)+' == "d") { #',t+='<div class="k-thumb"><span class="k-icon k-folder"></span></div>',t+="#}else{#",t+='<div class="k-thumb"><span class="k-icon k-loading"></span></div>',t+="#}#",t+="#if("+e._getFieldName(F)+' == "d") { #',t+='<input class="k-input" '+o.attr("bind")+'="value:'+e._getFieldName(w)+'"/>',t+="#}#",t+="</li>",d(o.template(t),{sizeFormatter:n})},_itemTmpl:function(){var e=this,t='<li class="k-tile" '+o.attr("uid")+'="#=uid#" ';return t+=o.attr("type")+'="${'+e._getFieldName(F)+'}">',t+="#if("+e._getFieldName(F)+' == "d") { #',t+='<div class="k-thumb"><span class="k-icon k-folder"></span></div>',t+="#}else{#",t+=e.options.transport&&e.options.transport.thumbnailUrl?'<div class="k-thumb"><span class="k-icon k-loading"></span></div>':'<div class="k-thumb"><span class="k-icon k-file"></span></div>',t+="#}#",t+="<strong>${"+e._getFieldName(w)+"}</strong>",t+="#if("+e._getFieldName(F)+' == "f") { # <span class="k-filesize">${this.sizeFormatter('+e._getFieldName(y)+")}</span> #}#",t+="</li>",d(o.template(t),{sizeFormatter:n})},_getFieldName:function(e){return i(this.dataSource.reader.model.fields,e)},path:function(e){var a=this,i=a._path||"";return e!==t?(a._path=e.replace(f,"")+"/",a.dataSource.read({path:a._path}),t):(i&&(i=i.replace(f,"")),"/"===i||""===i?"":i+"/")}}),D=s.extend({init:function(e,t){var a=this;t=t||{},s.fn.init.call(a,e,t),c&&a.element.attr("placeholder",a.options.label),a._wrapper(),a.element.on("keydown"+b,d(a._keydown,a)).on("change"+b,d(a._updateValue,a)),a.wrapper.on(v+b,"a",d(a._click,a)),c||a.element.on("focus"+b,d(a._focus,a)).on("blur"+b,d(a._blur,a))},options:{name:"SearchBox",label:"Search",value:""},events:[h],destroy:function(){var e=this;e.wrapper.add(e.element).add(e.label).off(b),s.fn.destroy.call(e)},_keydown:function(e){13===e.keyCode&&this._updateValue()},_click:function(e){e.preventDefault(),this._updateValue()},_updateValue:function(){var e=this,t=e.element.val();t!==e.value()&&(e.value(t),e.trigger(h))},_blur:function(){this._updateValue(),this._toggleLabel()},_toggleLabel:function(){c||this.label.toggle(!this.element.val())},_focus:function(){this.label.hide()},_wrapper:function(){var t=this.element,a=t.parents(".k-search-wrap");t[0].style.width="",t.addClass("k-input k-textbox"),a.length||(a=t.wrap(e('<div class="k-widget k-search-wrap k-textbox"/>')).parent(),c||e('<label style="display:block">'+this.options.label+"</label>").insertBefore(t),e('<a href="#" class="k-icon k-i-search k-search"/>').appendTo(a)),this.wrapper=a,this.label=a.find(">label")},value:function(e){var a=this;return e!==t?(a.options.value=e,a.element.val(e),a._toggleLabel(),t):a.options.value}}),z=s.extend({init:function(e,t){var a=this;t=t||{},s.fn.init.call(a,e,t),a._wrapper(),a.wrapper.on("focus"+k,"input",d(a._focus,a)).on("blur"+k,"input",d(a._blur,a)).on("keydown"+k,"input",d(a._keydown,a)).on(v+k,"a.k-i-arrow-n:first",d(a._rootClick,a)).on(v+k,"a:not(.k-i-arrow-n)",d(a._click,a)),a.value(a.options.value)},options:{name:"Breadcrumbs",gap:50},events:[h],destroy:function(){var e=this;s.fn.destroy.call(e),e.wrapper.add(e.wrapper.find("input")).add(e.wrapper.find("a")).off(k)},_update:function(e){e="/"===(e||"").charAt(0)?e:"/"+(e||""),e!==this.value()&&(this.value(e),this.trigger(h))},_click:function(t){t.preventDefault(),this._update(this._path(e(t.target).prevAll("a:not(.k-i-arrow-n)").andSelf()))},_rootClick:function(e){e.preventDefault(),this._update("")},_focus:function(){var e=this,t=e.element;e.overlay.hide(),e.element.val(e.value()),setTimeout(function(){t.select()})},_blur:function(){if(!this.overlay.is(":visible")){var e=this,t=e.element,a=t.val().replace(/\/{2,}/g,"/");e.overlay.show(),t.val(""),e._update(a)}},_keydown:function(e){var t=this;13===e.keyCode&&(t._blur(),setTimeout(function(){t.overlay.find("a:first").focus()}))},_wrapper:function(){var t,a=this.element,i=a.parents(".k-breadcrumbs");a[0].style.width="",a.addClass("k-input"),i.length||(i=a.wrap(e('<div class="k-widget k-breadcrumbs k-header k-state-default"/>')).parent()),t=i.find(".k-breadcrumbs-wrap"),t.length||(t=e('<div class="k-breadcrumbs-wrap"/>').appendTo(i)),this.wrapper=i,this.overlay=t},refresh:function(){var a,i,r,n,o="",s=this.value();for(s!==t&&s.match(/^\//)||(s="/"+(s||"")),a=s.split("/"),r=0,n=a.length;n>r;r++)i=a[r],i&&(o||(o+='<a href="#" class="k-icon k-i-arrow-n">root</a>'),o+='<a class="k-link" href="#">'+a[r]+"</a>",o+='<span class="k-icon k-i-arrow-e">></span>');this.overlay.empty().append(e(o)),this._adjustSectionWidth()},_adjustSectionWidth:function(){var t,a=this,i=a.wrapper,r=i.width()-a.options.gap,n=a.overlay.find("a");n.each(function(a){t=e(this),t.parent().width()>r&&(a==n.length-1?t.width(r):t.prev().andSelf().hide())})},value:function(e){return e!==t?(this._value=e.replace(/\/{2,}/g,"/"),this.refresh(),t):this._value},_path:function(t){return"/"+e.map(t,function(t){return e(t).text()}).join("/")}});o.ui.plugin(C),o.ui.plugin(z),o.ui.plugin(D)})(window.kendo.jQuery);
|
@@ -1,10 +1,11 @@
|
|
1
1
|
/*
|
2
|
-
* Kendo UI Web v2012.
|
2
|
+
* Kendo UI Web v2012.3.1114 (http://kendoui.com)
|
3
3
|
* Copyright 2012 Telerik AD. All rights reserved.
|
4
4
|
*
|
5
|
-
* Kendo UI Web commercial licenses may be obtained at
|
5
|
+
* Kendo UI Web commercial licenses may be obtained at
|
6
|
+
* https://www.kendoui.com/purchase/license-agreement/kendo-ui-web-commercial.aspx
|
6
7
|
* If you do not own a commercial license, this file shall be governed by the
|
7
8
|
* GNU General Public License (GPL) version 3.
|
8
9
|
* For GPL requirements, please review: http://www.gnu.org/copyleft/gpl.html
|
9
10
|
*/
|
10
|
-
|
11
|
+
(function(e,t){function a(t,n){t.filters&&(t.filters=e.grep(t.filters,function(e){return a(e,n),e.filters?e.filters.length:e.field!=n}))}var n=window.kendo,i=n.ui,r=i.Widget,o=n.keys,l=n.htmlEncode,s="id",u="li",d="change",c="character",f="k-state-focused",p="k-state-hover",h="k-loading",_="open",v="close",m="select",g="selected",b="requestStart",x="requestEnd",S="width",y=e.extend,w=e.proxy,F=n.support.browser,k=F.msie&&9>parseInt(F.version,10),T=/"/g,I=r.extend({init:function(t,a){var i,o=this,l=o.ns;r.fn.init.call(o,t,a),t=o.element,o._template(),o.ul=e('<ul unselectable="on" class="k-list k-reset"/>').css({overflow:n.support.kineticScrollNeeded?"":"auto"}).on("mouseenter"+l,u,function(){e(this).addClass(p)}).on("mouseleave"+l,u,function(){e(this).removeClass(p)}).on("touchend"+l+" click"+l,u,w(o._click,o)).attr({tabIndex:-1,role:"listbox","aria-hidden":!0}),o.list=e("<div class='k-list-container'/>").append(o.ul).on("mousedown"+l,function(e){e.preventDefault()}),i=t.attr(s),i&&(o.list.attr(s,i+"-list"),o.ul.attr(s,i+"_listbox"),o._optionID=i+"_option_selected")},items:function(){return this.ul[0].children},current:function(e){var a=this,n=a._optionID;return e===t?a._current:(a._current&&(a._current.removeClass(f).removeAttr("aria-selected").removeAttr(s),a._focused.removeAttr("aria-activedescendant")),e&&(e.addClass(f),a._scroll(e),n&&(e.attr("id",n),a._focused.attr("aria-activedescendant",n))),a._current=e,t)},destroy:function(){var e=this,t=e.ns;r.fn.destroy.call(e),e._unbindDataSource(),e.ul.off(t),e.list.off(t),e.popup.destroy(),e._form&&e._form.off("reset",e._resetHandler)},dataItem:function(e){var a=this;return e===t&&(e=a.selectedIndex),a._data()[e]},_accessors:function(){var e=this,t=e.element,a=e.options,i=n.getter,r=t.attr(n.attr("text-field")),o=t.attr(n.attr("value-field"));r&&(a.dataTextField=r),o&&(a.dataValueField=o),e._text=i(a.dataTextField),e._value=i(a.dataValueField)},_aria:function(){var e=this,a=e.options,n=e._focused;a.suggest!==t&&n.attr("aria-autocomplete",a.suggest?"both":"list"),e.element[0].id&&n.attr("aria-owns",e.ul[0].id),e.ul.attr("aria-live",a.filter&&"none"!==a.filter?"polite":"off")},_blur:function(){var e=this;e._change(),e.close()},_change:function(){var e,a=this,n=a.selectedIndex,i=a.value();i!==a._old?e=!0:n!==t&&n!==a._oldIndex&&(e=!0),e&&(a._old=i,a._oldIndex=n,a.trigger(d),a.element.trigger(d))},_click:function(t){t.isDefaultPrevented()||(this._accept(e(t.currentTarget)),"touchend"===t.type&&t.preventDefault())},_data:function(){return this.dataSource.view()},_enable:function(){var e=this,t=e.options;e.element.prop("disabled")&&(t.enable=!1),e.enable(t.enable)},_focus:function(e){var a=this;return a.popup.visible()&&e&&a.trigger(m,{item:e})?(a.close(),t):(a._select(e),a._blur(),t)},_height:function(e){if(e){var t=this,a=t.list,n=t.popup.visible(),i=t.options.height;a=a.add(a.parent(".k-animation-container")).show().height(t.ul[0].scrollHeight>i?i:"auto"),n||a.hide()}},_adjustListWidth:function(){var e,t,a=this.list,n=a[0].style.width,i=this.wrapper;if(a.data(S)||!n)return e=window.getComputedStyle?window.getComputedStyle(i[0],null):0,t=e?parseFloat(e.width):i.outerWidth(),e&&(F.mozilla||F.msie)&&(t+=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)+parseFloat(e.borderLeftWidth)+parseFloat(e.borderRightWidth)),n=t-(a.outerWidth()-a.width()),a.css({fontFamily:i.css("font-family"),width:n}).data(S,n),!0},_popup:function(){var e=this,t=e.list,a=e._focused,r=e.options,o=e.wrapper;e.popup=new i.Popup(t,y({},r.popup,{anchor:o,open:function(t){e._adjustListWidth(),e.trigger(_)?t.preventDefault():(a.attr("aria-expanded",!0),e.ul.attr("aria-hidden",!1))},close:function(t){e.trigger(v)?t.preventDefault():(a.attr("aria-expanded",!1),e.ul.attr("aria-hidden",!0))},animation:r.animation,isRtl:n.support.isRtl(o)})),e._touchScroller=n.touchScroller(e.popup.element)},_makeUnselectable:function(){k&&this.list.find("*").attr("unselectable","on")},_toggleHover:function(t){e(t.currentTarget).toggleClass(p,"mouseenter"===t.type)},_toggle:function(e){var a=this;e=e!==t?e:!a.popup.visible(),n.support.mobileOS||a._focused[0]===document.activeElement||a._focused.focus(),a[e?_:v]()},_scroll:function(e){if(e){e[0]&&(e=e[0]);var t=this.ul[0],a=e.offsetTop,n=e.offsetHeight,i=t.scrollTop,r=t.clientHeight,o=a+n;t.scrollTop=i>a?a:o>i+r?o-r:i}},_template:function(){var e=this,t=e.options,a=t.template,i=t.dataSource;e.element.is(m)&&e.element[0].length&&(i||(t.dataTextField=t.dataTextField||"text",t.dataValueField=t.dataValueField||"value")),a?(a=n.template(a),e.template=function(e){return'<li tabindex="-1" role="option" unselectable="on" class="k-item">'+a(e)+"</li>"}):e.template=n.template('<li tabindex="-1" role="option" unselectable="on" class="k-item">${data'+(t.dataTextField?".":"")+t.dataTextField+"}</li>",{useWithBlock:!1})},_unbindDataSource:function(){var e=this;e.dataSource.unbind(d,e._refreshHandler).unbind(b,e._requestStartHandler).unbind(x,e._requestEndHandler)}});y(I,{caret:function(e){var t,a=e.ownerDocument.selection;return t=a?Math.abs(a.createRange().moveStart(c,-e.value.length)):e.selectionStart},selectText:function(e,t,a){try{if(e.createTextRange){e.focus();var n=e.createTextRange();n.collapse(!0),n.moveStart(c,t),n.moveEnd(c,a-t),n.select()}else e.setSelectionRange(t,a)}catch(i){}},inArray:function(e,t){var a,n,i=t.children;if(!e||e.parentNode!==t)return-1;for(a=0,n=i.length;n>a;a++)if(e===i[a])return a;return-1}}),n.ui.List=I,i.Select=I.extend({init:function(e,t){I.fn.init.call(this,e,t)},setDataSource:function(e){this.options.dataSource=e,this._dataSource(),this.options.autoBind&&this.dataSource.fetch()},close:function(){this.popup.close()},_accessor:function(e,a){var n,i,r=this.element,o=r.is(m);return r=r[0],e===t?(o?(i=r.selectedIndex,i>-1&&(n=r.options[i],n&&(e=n.value))):e=r.value,e):(o?r.selectedIndex=a:r.value=e,t)},_hideBusy:function(){var e=this;clearTimeout(e._busy),e._arrow.removeClass(h),e._focused.attr("aria-busy",!1),e._busy=null},_showBusy:function(){var e=this;e._request=!0,e._busy||(e._busy=setTimeout(function(){e._focused.attr("aria-busy",!0),e._arrow.addClass(h)},100))},_requestEnd:function(){this._request=!1},_dataSource:function(){var t,a=this,i=a.element,r=a.options,o=r.dataSource||{};o=e.isArray(o)?{data:o}:o,i.is(m)&&(t=i[0].selectedIndex,t>-1&&(r.index=t),o.select=i,o.fields=[{field:r.dataTextField},{field:r.dataValueField}]),a.dataSource&&a._refreshHandler?a._unbindDataSource():(a._refreshHandler=w(a.refresh,a),a._requestStartHandler=w(a._showBusy,a),a._requestEndHandler=w(a._requestEnd,a)),a.dataSource=n.data.DataSource.create(o).bind(d,a._refreshHandler).bind(b,a._requestStartHandler).bind(x,a._requestEndHandler)},_index:function(e){var a,n,i,r=this,o=r._data();for(a=0,n=o.length;n>a;a++)if(i=r._value(o[a]),i===t&&(i=r._text(o[a])),i==e)return a;return-1},_get:function(t){var a,n,i=this,r=i._data();if("function"==typeof t)for(a=0,n=r.length;n>a;a++)if(t(r[a])){t=a;break}if("number"==typeof t){if(0>t)return e();t=e(i.ul[0].children[t])}return t&&t.nodeType&&(t=e(t)),t},_move:function(e){var t,a=this,n=e.keyCode,i=a.ul[0],r=a._current,l=n===o.DOWN;return n===o.UP||l?(e.altKey?a.toggle(l):l?(r=!r||-1===a.selectedIndex&&!a.value()?i.firstChild:r[0].nextSibling,a._select(r)):a._select(r?r[0].previousSibling:i.lastChild),e.preventDefault(),t=!0):n===o.ENTER||n===o.TAB?(a.popup.visible()&&e.preventDefault(),a._accept(r),t=!0):n===o.ESC&&(a.popup.visible()&&e.preventDefault(),a.close(),t=!0),t},_selectItem:function(e){var t=this,a=t.options;e=e||a.value||t.value(),e?t.value(e):t.select(a.index),t.trigger(g)},_valueOnFetch:function(e){var a=this;return a.ul[0].firstChild||a._fetch?(a._fetch=!1,t):(a.dataSource.one(d,function(){a._fetch=!0,a.value(e),a.trigger(g)}),a._request||a.dataSource.fetch(),!0)},_options:function(e,a){var n,i,r,o,s=this,u=s.element,d=u[0].selectedIndex,c=e.length,f="",p=0;for(a&&(f=a,p=1);c>p;p++)n="<option",i=e[p],r=s._text(i),o=s._value(i),o!==t&&(o+="",-1!==o.indexOf('"')&&(o=o.replace(T,""")),n+=' value="'+o+'"'),n+=">",r!==t&&(n+=l(r)),n+="</option>",f+=n;u.html(f),u[0].selectedIndex=d},_reset:function(){var e=this,t=e.element,a=t.closest("form");a[0]&&(e._resetHandler=function(){setTimeout(function(){e.value(t[0].value)})},e._form=a.on("reset",e._resetHandler))},_cascade:function(){var n,i,r,o,l,s=this,u=s.options,c=u.cascadeFrom;if(c){if(n=e("#"+c).data("kendo"+u.name),!n)return;r=n.options.dataValueField,o=function(){s.value(""),s.enable(!1)},l=function(){var e=s.value();e?s.dataSource.view()[0]?(s.value(e),-1==s.selectedIndex&&s.value("")):(s.value(""),s.value()&&(s.element.val(""),s.text(""))):s.select(u.index),s.trigger(g),s.enable()},i=function(){var e,t,i=n.dataItem(),u=i?n._value(i):null;u?(e=s.dataSource.filter()||{},a(e,r),t=e.filters||[],t.push({field:r,operator:"eq",value:u}),s.dataSource.one(d,l).filter(t)):o()},n.bind("cascade",o).bind(d,function(){i(),s.trigger("cascade")}).bind(g,function(){i()}),n._valueCalled!==t?i():n.value()||s.enable(!1)}}}),i.Select.removeFiltersForField=a})(window.kendo.jQuery);
|
@@ -1,10 +1,11 @@
|
|
1
1
|
/*
|
2
|
-
* Kendo UI Web v2012.
|
2
|
+
* Kendo UI Web v2012.3.1114 (http://kendoui.com)
|
3
3
|
* Copyright 2012 Telerik AD. All rights reserved.
|
4
4
|
*
|
5
|
-
* Kendo UI Web commercial licenses may be obtained at
|
5
|
+
* Kendo UI Web commercial licenses may be obtained at
|
6
|
+
* https://www.kendoui.com/purchase/license-agreement/kendo-ui-web-commercial.aspx
|
6
7
|
* If you do not own a commercial license, this file shall be governed by the
|
7
8
|
* GNU General Public License (GPL) version 3.
|
8
9
|
* For GPL requirements, please review: http://www.gnu.org/copyleft/gpl.html
|
9
10
|
*/
|
10
|
-
|
11
|
+
(function(e,t){var a=window.kendo,r="change",n="dataBound",i="dataBinding",l=a.ui.Widget,o=a.keys,s=">*",d="requestStart",c="error",u="k-state-focused",m="k-state-selected",f="k-edit-item",p="string",v="edit",b="remove",g="save",h="click",_=".kendoListView",S=e.proxy,E=a.ui.progress,w=a.data.DataSource,y=l.extend({init:function(t,r){var n=this;r=e.isArray(r)?{dataSource:r}:r,l.fn.init.call(n,t,r),r=n.options,n.wrapper=t=n.element,t[0].id&&(n._itemId=t[0].id+"_lv_active"),n._element(),n._dataSource(),n.template=a.template(r.template||""),n.altTemplate=a.template(r.altTemplate||r.template),n.editTemplate=a.template(r.editTemplate||""),n._navigatable(),n._selectable(),n._pageable(),n._crudHandlers(),n.options.autoBind&&n.dataSource.fetch(),a.notify(n)},events:[r,i,n,v,b,g],options:{name:"ListView",autoBind:!0,selectable:!1,navigatable:!1,template:"",altTemplate:"",editTemplate:""},_item:function(e){return this.element.children()[e]()},items:function(){return this.element.children()},setDataSource:function(e){this.options.dataSource=e,this._dataSource(),this.options.autoBind&&e.fetch()},_unbindDataSource:function(){var e=this;e.dataSource.unbind(r,e._refreshHandler).unbind(d,e._requestStartHandler).unbind(c,e._errorHandler)},_dataSource:function(){var e=this;e.dataSource&&e._refreshHandler?e._unbindDataSource():(e._refreshHandler=S(e.refresh,e),e._requestStartHandler=S(e._requestStart,e),e._errorHandler=S(e._error,e)),e.dataSource=w.create(e.options.dataSource).bind(r,e._refreshHandler).bind(d,e._requestStartHandler).bind(c,e._errorHandler)},_requestStart:function(){E(this.element,!0)},_error:function(){E(this.element,!1)},_element:function(){this.element.addClass("k-widget k-listview").attr("role","listbox")},refresh:function(r){var l,o,s,d,c,u=this,m=u.dataSource.view(),f="",p=u.template,v=u.altTemplate;if(r&&"itemchange"===r.action)return u.editable||(l=r.items[0],d=e.inArray(l,m),d>=0&&(s=e(p(l)).attr(a.attr("uid"),l.uid),u.items().eq(d).replaceWith(s),u.trigger("itemChange",{item:s,data:l}))),t;if(r=r||{},!u.trigger(i,{action:r.action||"rebind",items:r.items,index:r.index})){for(u._destroyEditable(),d=0,c=m.length;c>d;d++)f+=d%2?v(m[d]):p(m[d]);for(u.element.html(f),o=u.items(),d=0,c=m.length;c>d;d++)o.eq(d).attr(a.attr("uid"),m[d].uid).attr("role","option").attr("aria-selected","false");u.element[0]===document.activeElement&&u.options.navigatable&&u.current(o.eq(0)),u.trigger(n)}},_pageable:function(){var t,r,n=this,i=n.options.pageable;e.isPlainObject(i)&&(r=i.pagerId,t=e.extend({},i,{dataSource:n.dataSource,pagerId:null}),n.pager=new a.ui.Pager(e("#"+r),t))},_selectable:function(){var e,n,i=this,l=i.options.selectable,d=i.options.navigatable;l&&(e=typeof l===p&&l.toLowerCase().indexOf("multiple")>-1,e&&i.element.attr("aria-multiselectable",!0),i.selectable=new a.ui.Selectable(i.element,{aria:!0,multiple:e,filter:s,change:function(){i.trigger(r)}}),d&&i.element.on("keydown"+_,function(a){if(a.keyCode===o.SPACEBAR){if(n=i.current(),a.target==a.currentTarget&&a.preventDefault(),e)if(a.ctrlKey){if(n&&n.hasClass(m))return n.removeClass(m),t}else i.selectable.clear();else i.selectable.clear();i.selectable.value(n)}}))},current:function(e){var a=this,r=a.element,n=a._current;return e===t?n:(n&&(n.removeClass(u).removeAttr("id"),r.removeAttr("aria-activedescendant")),e&&e[0]&&(a._scrollTo(e[0]),r.attr("aria-activedescendant",a._itemId),e.addClass(u).attr("id",a._itemId)),a._current=e,t)},_scrollTo:function(t){var a,r=this,n=!1,i="scroll";"auto"==r.wrapper.css("overflow")||r.wrapper.css("overflow")==i?a=r.wrapper[0]:(a=window,n=!0);var l=function(r,l){var o=n?e(t).offset()[r.toLowerCase()]:t["offset"+r],s=t["client"+l],d=e(a)[i+r](),c=e(a)[l.toLowerCase()]();o+s>d+c?e(a)[i+r](o+s-c):d>o&&e(a)[i+r](o)};l("Top","Height"),l("Left","Width")},_navigatable:function(){var t=this,r=t.options.navigatable,n=t.element,i=function(a){t.current(e(a.currentTarget)),e(a.target).is(":button,a,:input,a>.k-icon,textarea")||n.focus()};r&&(t._tabindex(),n.on("focus"+_,function(){var e=t._current;e&&e.is(":visible")||(e=t._item("first")),t.current(e)}).on("focusout"+_,function(){t._current&&t._current.removeClass(u)}).on("keydown"+_,function(r){var i,l=r.keyCode,s=t.current(),d=e(r.target),c=!d.is(":button,textarea,a,a>.t-icon,input"),u=d.is(":text"),m=a.preventDefault,p=n.find("."+f);if(!(!c&&!u&&o.ESC!=l||u&&o.ESC!=l&&o.ENTER!=l))if(o.UP===l||o.LEFT===l)s&&(s=s.prev()),t.current(s&&s[0]?s:t._item("last")),m(r);else if(o.DOWN===l||o.RIGHT===l)s&&(s=s.next()),t.current(s&&s[0]?s:t._item("first")),m(r);else if(o.PAGEUP===l)t.current(null),t.dataSource.page(t.dataSource.page()-1),m(r);else if(o.PAGEDOWN===l)t.current(null),t.dataSource.page(t.dataSource.page()+1),m(r);else if(o.HOME===l)t.current(t._item("first")),m(r);else if(o.END===l)t.current(t._item("last")),m(r);else if(o.ENTER===l)if(0!==p.length&&(c||u)){i=t.items().index(p),document.activeElement.blur(),t.save();var v=function(){t.element.trigger("focus"),t.current(t.items().eq(i))};t.one("dataBound",v)}else""!==t.options.editTemplate&&t.edit(s);else if(o.ESC===l){if(p=n.find("."+f),0===p.length)return;i=t.items().index(p),t.cancel(),t.element.trigger("focus"),t.current(t.items().eq(i))}}),n.on("mousedown"+_+" touchstart"+_,s,S(i,t)))},clearSelection:function(){var e=this;e.selectable.clear(),e.trigger(r)},select:function(a){var r=this,n=r.selectable;return a=e(a),a.length?(n.options.multiple||(n.clear(),a=a.first()),n.value(a),t):n.value()},_destroyEditable:function(){var e=this;e.editable&&(e.editable.destroy(),delete e.editable)},_modelFromElement:function(e){var t=e.attr(a.attr("uid"));return this.dataSource.getByUid(t)},_closeEditable:function(t){var r,n,i=this,l=i.editable,o=!0;return l&&(t&&(o=l.end()),o&&(r=i._modelFromElement(l.element),n=e(i.template(r)).attr(a.attr("uid"),r.uid),i._destroyEditable(),l.element.replaceWith(n))),o},edit:function(t){var r=this,n=r._modelFromElement(t),i=e(r.editTemplate(n)).addClass(f);r.cancel(),i.attr(a.attr("uid"),n.uid),t.replaceWith(i),r.editable=i.kendoEditable({model:n,clearContainer:!1,errorTemplate:!1}).data("kendoEditable"),r.trigger(v,{model:n,item:i})},save:function(){var e=this,t=e.editable.element,a=e._modelFromElement(t);!e.trigger(g,{model:a,item:t})&&e._closeEditable(!0)&&e.dataSource.sync()},remove:function(e){var t=this,a=t.dataSource,r=t._modelFromElement(e);t.trigger(b,{model:r,item:e})||(e.hide(),a.remove(r),a.sync())},add:function(){var e=this,t=e.dataSource,a=t.indexOf((t.view()||[])[0]);0>a&&(a=0),e.cancel(),t.insert(a,{}),e.edit(e.element.children().first())},cancel:function(){var e=this,t=e.dataSource;e.editable&&(t.cancelChanges(e._modelFromElement(e.editable.element)),e._closeEditable(!1))},_crudHandlers:function(){var t=this,r="touchend"+_+" "+h+_;t.element.on(r,".k-edit-button",function(r){var n=e(this).closest("["+a.attr("uid")+"]");t.edit(n),r.preventDefault()}),t.element.on(r,".k-delete-button",function(r){var n=e(this).closest("["+a.attr("uid")+"]");t.remove(n),r.preventDefault()}),t.element.on(r,".k-update-button",function(e){t.save(),e.preventDefault()}),t.element.on(r,".k-cancel-button",function(e){t.cancel(),e.preventDefault()})},destroy:function(){var e=this;l.fn.destroy.call(e),e._unbindDataSource(),e._destroyEditable(),e.element.off(_),e.pager&&e.pager.destroy(),e.selectable&&e.selectable.destroy(),a.destroy(e.element)}});a.ui.plugin(y)})(window.kendo.jQuery);
|
@@ -1,10 +1,11 @@
|
|
1
1
|
/*
|
2
|
-
* Kendo UI Web v2012.
|
2
|
+
* Kendo UI Web v2012.3.1114 (http://kendoui.com)
|
3
3
|
* Copyright 2012 Telerik AD. All rights reserved.
|
4
4
|
*
|
5
|
-
* Kendo UI Web commercial licenses may be obtained at
|
5
|
+
* Kendo UI Web commercial licenses may be obtained at
|
6
|
+
* https://www.kendoui.com/purchase/license-agreement/kendo-ui-web-commercial.aspx
|
6
7
|
* If you do not own a commercial license, this file shall be governed by the
|
7
8
|
* GNU General Public License (GPL) version 3.
|
8
9
|
* For GPL requirements, please review: http://www.gnu.org/copyleft/gpl.html
|
9
10
|
*/
|
10
|
-
;(function(a,b){function P(b){b=a(b),b.filter(".k-first:not(:first-child)").removeClass(t),b.filter(".k-last:not(:last-child)").removeClass(p),b.filter(":first-child").addClass(t),b.filter(":last-child").addClass(p)}function O(b){b=a(b),b.find(".k-icon").remove(),b.filter(":has(.k-group)").children(".k-link:not(:has([class*=k-i-arrow]))").each(function(){var b=a(this),c=b.parent().parent();b.append("<span class='k-icon "+(c.hasClass(n+"-horizontal")?"k-i-arrow-s":"k-i-arrow-e")+"'/>")})}function N(b){b=a(b),b.addClass("k-item").children(l).addClass(u),b.children("a").addClass(o).children(l).addClass(u),b.filter(":not([disabled])").addClass(A),b.filter(".k-separator:empty").append(" "),b.filter("li[disabled]").addClass(B).removeAttr("disabled"),b.children("a").filter(":focus").parent().addClass("k-state-active"),b.children("."+o).length||b.contents().filter(function(){return!this.nodeName.match(k)&&(this.nodeType!=3||!!a.trim(this.nodeValue))}).wrapAll("<span class='"+o+"'/>"),O(b),P(b)}function M(b,c){try{return a.contains(b,c)}catch(d){return!1}}function L(a,b){a=a.split(" ")[!b+0]||a;var d={origin:["bottom","left"],position:["top","left"]},e=/left|right/.test(a);e?(d.origin=["top",a],d.position[1]=c.directions[a].reverse):(d.origin[0]=a,d.position[0]=c.directions[a].reverse),d.origin=d.origin.join(" "),d.position=d.position.join(" ");return d}function K(a,b){a=a.split(" ")[!b+0]||a;return a.replace("top","up").replace("bottom","down")}var c=window.kendo,d=c.ui,e=c.support.touch,f=a.extend,g=a.proxy,h=a.each,i=c.template,j=d.Widget,k=/^(ul|a|div)$/i,l="img",m="open",n="k-menu",o="k-link",p="k-last",q="close",r=e?"touchend":"click",s="timer",t="k-first",u="k-image",v="select",w="zIndex",x="mouseenter",y="mouseleave",z="kendoPopup",A="k-state-default",B="k-state-disabled",C=".k-group",D=":not(.k-list) > .k-item",E=".k-item.k-state-disabled",F=".k-item:not(.k-state-disabled)",G=".k-item:not(.k-state-disabled) > .k-link",H="div:not(.k-animation-container,.k-list-container)",I={content:i("<div class='k-content k-group'>#= content(item) #</div>"),group:i("<ul class='#= groupCssClass(group) #'#= groupAttributes(group) #>#= renderItems(data) #</ul>"),itemWrapper:i("<#= tag(item) # class='#= textClass(item) #'#= textAttributes(item) #>#= image(item) ##= sprite(item) ##= text(item) ##= arrow(data) #</#= tag(item) #>"),item:i("<li class='#= wrapperCssClass(group, item) #'>#= itemWrapper(data) ## if (item.items) { ##= subGroup({ items: item.items, menu: menu, group: { expanded: item.expanded } }) ## } #</li>"),image:i("<img class='k-image' alt='' src='#= imageUrl #' />"),arrow:i("<span class='#= arrowClass(item, group) #'></span>"),sprite:i("<span class='k-sprite #= spriteCssClass #'></span>"),empty:i("")},J={wrapperCssClass:function(a,b){var c="k-item",d=b.index;b.enabled===!1?c+=" k-state-disabled":c+=" k-state-default",a.firstLevel&&d===0&&(c+=" k-first"),d==a.length-1&&(c+=" k-last");return c},textClass:function(a){return o},textAttributes:function(a){return a.url?" href='"+a.url+"'":""},arrowClass:function(a,b){var c="k-icon";b.horizontal?c+=" k-i-arrow-s":c+=" k-i-arrow-e";return c},text:function(a){return a.encoded===!1?a.text:c.htmlEncode(a.text)},tag:function(a){return a.url?"a":"span"},groupAttributes:function(a){return a.expanded!==!0?" style='display:none'":""},groupCssClass:function(a){return"k-group"},content:function(a){return a.content?a.content:" "}},Q=j.extend({init:function(b,d){var f=this;j.fn.init.call(f,b,d),b=f.wrapper=f.element,d=f.options,d.dataSource&&(f.element.empty(),f.append(d.dataSource,b)),f._updateClasses(),d.animation===!1&&(d.animation={open:{show:!0,effects:{}},close:{hide:!0,effects:{}}}),f.nextItemZIndex=100,b.delegate(E,r,!1).delegate(F,r,g(f._click,f)),e?(d.openOnClick=!0,b.delegate(G,"touchstart touchend",f._toggleHover)):b.delegate(F,x,g(f._mouseenter,f)).delegate(F,y,g(f._mouseleave,f)).delegate(G,x+" "+y,f._toggleHover),d.openOnClick&&(f.clicked=!1,a(document).click(g(f._documentClick,f))),c.notify(f)},events:[m,q,v],options:{name:"Menu",animation:{open:{duration:200,show:!0},close:{duration:100}},orientation:"horizontal",direction:"default",openOnClick:!1,closeOnClick:!0,hoverDelay:100},enable:function(a,b){this._toggleDisabled(a,b!==!1);return this},disable:function(a){this._toggleDisabled(a,!1);return this},append:function(b,c){c=this.element.find(c);var d=this._insert(b,c,c.length?c.find("> .k-group, .k-animation-container > .k-group"):null);h(d.items,function(b){d.group.append(this);var c=d.contents[b];c&&a(this).append(c),O(this)}),O(c),P(d.group.find(".k-first, .k-last").add(d.items));return this},insertBefore:function(b,c){c=this.element.find(c);var d=this._insert(b,c,c.parent());h(d.items,function(b){c.before(this);var e=d.contents[b];e&&a(this).append(e),O(this),P(this)}),P(c);return this},insertAfter:function(b,c){c=this.element.find(c);var d=this._insert(b,c,c.parent());h(d.items,function(b){c.after(this);var e=d.contents[b];e&&a(this).append(e),O(this),P(this)}),P(c);return this},_insert:function(b,c,d){var e=this,g,h,i=[];if(!c||!c.length)d=e.element;var j=a.isPlainObject(b),k={firstLevel:d.hasClass(n),horizontal:d.hasClass(n+"-horizontal"),expanded:!0,length:d.children().length};c&&!d.length&&(d=a(Q.renderGroup({group:k})).appendTo(c)),j||a.isArray(b)?(g=a.map(j?[b]:b,function(b,c){return typeof b=="string"?a(b):a(Q.renderItem({group:k,item:f(b,{index:c})}))}),i=a.map(j?[b]:b,function(b,c){return b.content||b.contentUrl?a(Q.renderContent({item:f(b,{index:c})})):!1})):(g=a(b),h=g.find("> ul").addClass("k-group"),g=g.filter("li"),g.add(h.find("> li")).each(function(){N(this)}));return{items:g,group:d,contents:i}},remove:function(a){a=this.element.find(a);var b=this,c=a.parentsUntil(b.element,D),d=a.parent("ul");a.remove();if(d&&!d.children(D).length){var e=d.parent(".k-animation-container");e.length?e.remove():d.remove()}c.length&&(c=c.eq(0),O(c),P(c));return b},open:function(c){var d=this,e=d.options,g=e.orientation=="horizontal",h=e.direction;c=d.element.find(c),/^(top|bottom|default)$/.test(h)&&(h=g?(h+" right").replace("default","bottom"):"right"),c.siblings().find(">.k-popup:visible,>.k-animation-container>.k-popup:visible").each(function(){var b=a(this).data("kendoPopup");b&&b.close()}),c.each(function(){var c=a(this);clearTimeout(c.data(s)),c.data(s,setTimeout(function(){var a=c.find(".k-group:first:hidden"),i;if(a[0]&&d.trigger(m,{item:c[0]})===!1){c.data(w,c.css(w)),c.css(w,d.nextItemZIndex++),i=a.data(z);var j=c.parent().hasClass(n),k=j&&g,l=L(h,j),o=e.animation.open.effects,p=o!==b?o:"slideIn:"+K(h,j);i?(i=a.data(z),i.options.origin=l.origin,i.options.position=l.position,i.options.animation.open.effects=p):i=a.kendoPopup({origin:l.origin,position:l.position,collision:e.popupCollision!==b?e.popupCollision:k?"fit":"fit flip",anchor:c,appendTo:c,animation:{open:f(!0,{effects:p},e.animation.open),close:e.animation.close},close:function(a){var b=a.sender.wrapper.parent();d.trigger(q,{item:b[0]})===!1?(b.css(w,b.data(w)),b.removeData(w)):a.preventDefault()}}).data(z),i.open()}},d.options.hoverDelay))});return d},close:function(b){var c=this;b=c.element.find(b),b[0]||(b=c.element.find(">.k-item")),b.each(function(){var b=a(this);clearTimeout(b.data(s)),b.data(s,setTimeout(function(){var a=b.find(".k-group:first:visible"),c;a[0]&&(c=a.data(z),c.close())},c.options.hoverDelay))});return c},_toggleDisabled:function(b,c){b=this.element.find(b),b.each(function(){a(this).toggleClass(A,c).toggleClass(B,!c)})},_toggleHover:function(b){var d=a(c.eventTarget(b)).closest(D);d.parents("li."+B).length||d.toggleClass("k-state-hover",b.type==x||b.type=="touchstart")},_updateClasses:function(){var a=this;a.element.addClass("k-widget k-reset k-header "+n).addClass(n+"-"+a.options.orientation);var b=a.element.find("li > ul").addClass("k-group").end().find("> li,.k-group > li");b.each(function(){N(this)})},_mouseenter:function(b){var c=this,d=a(b.currentTarget),e=d.children(".k-animation-container").length||d.children(C).length;b.delegateTarget==d.parents(".k-menu")[0]&&((!c.options.openOnClick||c.clicked)&&!M(b.currentTarget,b.relatedTarget)&&e&&c.open(d),c.options.openOnClick&&c.clicked&&d.siblings().each(g(function(a,b){c.close(b)},c)))},_mouseleave:function(b){var c=this,d=a(b.currentTarget),e=d.children(".k-animation-container").length||d.children(C).length;d.parentsUntil(".k-animation-container",".k-list-container,.k-calendar-container")[0]?b.stopImmediatePropagation():!c.options.openOnClick&&!M(b.currentTarget,b.relatedTarget)&&e&&c.close(d)},_click:function(b){var d=this,f,h=a(c.eventTarget(b)),i=h.closest("."+o),j=i.attr("href"),k=h.closest(D),l=!!j&&j.charAt(j.length-1)!="#";if(!k.children(H)[0]){if(k.hasClass(B)){b.preventDefault();return}e&&k.siblings().each(g(function(a,b){d.close(b)},d)),!b.handled&&d.trigger(v,{item:k[0]})&&b.preventDefault(),b.handled=!0,d.options.closeOnClick&&!(j&&j.length>0)&&!k.children(C+",.k-animation-container").length&&d.close(i.parentsUntil(d.element,D));if((!k.parent().hasClass(n)||!d.options.openOnClick)&&!e)return;l||b.preventDefault(),d.clicked=!0,f=k.children(".k-animation-container, .k-group").is(":visible")?q:m,d[f](k)}},_documentClick:function(a){var b=this;M(b.element[0],a.target)||(b.clicked=!1)}});f(Q,{renderItem:function(a){a=f({menu:{},group:{}},a);var b=I.empty,c=a.item;return I.item(f(a,{image:c.imageUrl?I.image:b,sprite:c.spriteCssClass?I.sprite:b,itemWrapper:I.itemWrapper,arrow:c.items||c.content?I.arrow:b,subGroup:Q.renderGroup},J))},renderGroup:function(a){return I.group(f({renderItems:function(a){var b="",c=0,d=a.items,e=d?d.length:0,g=f({length:e},a.group);for(;c<e;c++)b+=Q.renderItem(f(a,{group:g,item:f({index:c},d[c])}));return b}},a,J))},renderContent:function(a){return I.content(f(a,J))}}),c.ui.plugin(Q)})(jQuery);
|
11
|
+
(function(e,t){function n(e,t){return e=e.split(" ")[!t+0]||e,e.replace("top","up").replace("bottom","down")}function i(e,t,n){e=e.split(" ")[!t+0]||e;var i={origin:["bottom",n?"right":"left"],position:["top",n?"right":"left"]},r=/left|right/.test(e);return r?(i.origin=["top",e],i.position[1]=l.directions[e].reverse):(i.origin[0]=e,i.position[0]=l.directions[e].reverse),i.origin=i.origin.join(" "),i.position=i.position.join(" "),i}function r(t,n){try{return e.contains(t,n)}catch(i){return!1}}function o(t){t=e(t),t.addClass("k-item").children(b).addClass(P),t.children("a").addClass(I).children(b).addClass(P),t.filter(":not([disabled])").addClass(z),t.filter(".k-separator:empty").append(" "),t.filter("li[disabled]").addClass(B).removeAttr("disabled").attr("aria-disabled",!0),t.children("a").filter(":focus").parent().addClass(N),t.filter("[role]").length||t.attr("role","menuitem"),t.children("."+I).length||t.contents().filter(function(){return!(this.nodeName.match(_)||3==this.nodeType&&!e.trim(this.nodeValue))}).wrapAll("<span class='"+I+"'/>"),a(t),s(t)}function a(t){t=e(t),t.find(".k-icon").remove(),t.filter(":has(.k-group)").children(".k-link:not(:has([class*=k-i-arrow]))").each(function(){var t=e(this),n=t.parent().parent();t.append("<span class='k-icon "+(n.hasClass(x+"-horizontal")?"k-i-arrow-s":"k-i-arrow-e")+"'/>")})}function s(t){t=e(t),t.filter(".k-first:not(:first-child)").removeClass(D),t.filter(".k-last:not(:last-child)").removeClass(H),t.filter(":first-child").addClass(D),t.filter(":last-child").addClass(H)}var l=window.kendo,d=l.ui,c=l.support.touch&&l.support.mobileOS||l.support.pointers,p=l.support.mousedown,u=l.support.click,m=e.extend,h=e.proxy,f=e.each,g=l.template,v=l.keys,k=d.Widget,_=/^(ul|a|div)$/i,C=".kendoMenu",b="img",w="open",x="k-menu",I="k-link",H="k-last",T="close",y="timer",D="k-first",P="k-image",A="select",O="zIndex",R="mouseenter",U="mouseleave",E="kendoPopup",z="k-state-default",S="k-state-hover",L="k-state-focused",B="k-state-disabled",G=".k-group",N="k-state-active",W=":not(.k-list) > .k-item",j=".k-item.k-state-disabled",M=".k-item:not(.k-state-disabled)",V=".k-item:not(.k-state-disabled) > .k-link",Z="div:not(.k-animation-container,.k-list-container)",$={content:g("<div class='k-content k-group'>#= content(item) #</div>"),group:g("<ul class='#= groupCssClass(group) #'#= groupAttributes(group) # role='menu' aria-hidden='true'>#= renderItems(data) #</ul>"),itemWrapper:g("<#= tag(item) # class='#= textClass(item) #'#= textAttributes(item) #>#= image(item) ##= sprite(item) ##= text(item) ##= arrow(data) #</#= tag(item) #>"),item:g("<li class='#= wrapperCssClass(group, item) #' role='menuitem' #=item.items ? \"aria-haspopup='true'\": \"\"##=item.enabled === false ? \"aria-disabled='true'\" : ''#>#= itemWrapper(data) ## if (item.items) { ##= subGroup({ items: item.items, menu: menu, group: { expanded: item.expanded } }) ## } #</li>"),image:g("<img class='k-image' alt='' src='#= imageUrl #' />"),arrow:g("<span class='#= arrowClass(item, group) #'></span>"),sprite:g("<span class='k-sprite #= spriteCssClass #'></span>"),empty:g("")},q={wrapperCssClass:function(e,t){var n="k-item",i=t.index;return n+=t.enabled===!1?" k-state-disabled":" k-state-default",e.firstLevel&&0===i&&(n+=" k-first"),i==e.length-1&&(n+=" k-last"),n},textClass:function(){return I},textAttributes:function(e){return e.url?" href='"+e.url+"'":""},arrowClass:function(e,t){var n="k-icon";return n+=t.horizontal?" k-i-arrow-s":" k-i-arrow-e"},text:function(e){return e.encoded===!1?e.text:l.htmlEncode(e.text)},tag:function(e){return e.url?"a":"span"},groupAttributes:function(e){return e.expanded!==!0?" style='display:none'":""},groupCssClass:function(){return"k-group"},content:function(e){return e.content?e.content:" "}},F=k.extend({init:function(t,n){var i=this;k.fn.init.call(i,t,n),t=i.wrapper=i.element,n=i.options,n.dataSource&&(i.element.empty(),i.append(n.dataSource,t)),i._updateClasses(),n.animation===!1&&(n.animation={open:{effects:{}},close:{hide:!0,effects:{}}}),i.nextItemZIndex=100,i._tabindex(),t.on("touchstart",function(t){i.element[0].blur(),i.element[0].focus(),setTimeout(function(){i._moveHover([],e(l.eventTarget(t)).closest(W))},200)}).on("MSPointerDown",function(t){i._oldHoverItem=e(t.target).closest(W)}).on(u+C,j,!1).on(u+C,M,h(i._click,i)).on("keydown"+C,h(i._keydown,i)).on("focus"+C,h(i._focus,i)).on("blur"+C,h(i._removeHoverItem,i)).on(R+C,M,h(i._mouseenter,i)).on(U+C,M,h(i._mouseleave,i)).on(R+C+" "+U+C+" "+p+C+" "+u+C,V,h(i._toggleHover,i)),n.openOnClick&&(i.clicked=!1,i._documentClickHandler=h(i._documentClick,i),e(document).click(i._documentClickHandler)),t.attr("role","menubar"),t[0].id&&(i._ariaId=l.format("{0}_mn_active",t[0].id)),l.notify(i)},events:[w,T,A],options:{name:"Menu",animation:{open:{duration:200},close:{duration:100}},orientation:"horizontal",direction:"default",openOnClick:!1,closeOnClick:!0,hoverDelay:100},destroy:function(){var t=this;k.fn.destroy.call(t),t.element.off(C),t._documentClickHandler&&e(document).unbind(t._documentClickHandler)},enable:function(e,t){return this._toggleDisabled(e,t!==!1),this},disable:function(e){return this._toggleDisabled(e,!1),this},append:function(t,n){n=this.element.find(n);var i=this._insert(t,n,n.length?n.find("> .k-group, .k-animation-container > .k-group"):null);return f(i.items,function(t){i.group.append(this);var n=i.contents[t];n&&e(this).append(n),a(this)}),a(n),s(i.group.find(".k-first, .k-last").add(i.items)),this},insertBefore:function(t,n){n=this.element.find(n);var i=this._insert(t,n,n.parent());return f(i.items,function(t){n.before(this);var r=i.contents[t];r&&e(this).append(r),a(this),s(this)}),s(n),this},insertAfter:function(t,n){n=this.element.find(n);var i=this._insert(t,n,n.parent());return f(i.items,function(t){n.after(this);var r=i.contents[t];r&&e(this).append(r),a(this),s(this)}),s(n),this},_insert:function(t,n,i){var r,a,s=this,l=[];n&&n.length||(i=s.element);var d=e.isPlainObject(t),c={firstLevel:i.hasClass(x),horizontal:i.hasClass(x+"-horizontal"),expanded:!0,length:i.children().length};return n&&!i.length&&(i=e(F.renderGroup({group:c})).appendTo(n)),d||e.isArray(t)?(r=e.map(d?[t]:t,function(t,n){return"string"==typeof t?e(t):e(F.renderItem({group:c,item:m(t,{index:n})}))}),l=e.map(d?[t]:t,function(t,n){return t.content||t.contentUrl?e(F.renderContent({item:m(t,{index:n})})):!1})):(r=e(t),a=r.find("> ul").addClass("k-group").attr("role","menu"),r=r.filter("li"),r.add(a.find("> li")).each(function(){o(this)})),{items:r,group:i,contents:l}},remove:function(e){e=this.element.find(e);var t=this,n=e.parentsUntil(t.element,W),i=e.parent("ul");if(e.remove(),i&&!i.children(W).length){var r=i.parent(".k-animation-container");r.length?r.remove():i.remove()}return n.length&&(n=n.eq(0),a(n),s(n)),t},open:function(r){var o=this,a=o.options,s="horizontal"==a.orientation,d=a.direction,c=l.support.isRtl(o.wrapper);return r=o.element.find(r),/^(top|bottom|default)$/.test(d)&&(d=c?s?(d+" left").replace("default","bottom"):"left":s?(d+" right").replace("default","bottom"):"right"),r.siblings().find(">.k-popup:visible,>.k-animation-container>.k-popup:visible").each(function(){var t=e(this).data("kendoPopup");t&&t.close()}),r.each(function(){var r=e(this);clearTimeout(r.data(y)),r.data(y,setTimeout(function(){var e,l=r.find(".k-group:first:hidden");if(l[0]&&o.trigger(w,{item:r[0]})===!1){r.data(O,r.css(O)),r.css(O,o.nextItemZIndex++),e=l.data(E);var p=r.parent().hasClass(x),u=p&&s,h=i(d,p,c),f=a.animation.open.effects,g=f!==t?f:"slideIn:"+n(d,p);e?(e=l.data(E),e.options.origin=h.origin,e.options.position=h.position,e.options.animation.open.effects=g):e=l.kendoPopup({origin:h.origin,position:h.position,collision:a.popupCollision!==t?a.popupCollision:u?"fit":"fit flip",anchor:r,appendTo:r,animation:{open:m(!0,{effects:g},a.animation.open),close:a.animation.close},close:function(e){var t=e.sender.wrapper.parent();o.trigger(T,{item:t[0]})?e.preventDefault():(t.css(O,t.data(O)),t.removeData(O))}}).data(E),l.removeAttr("aria-hidden"),e.open()}},o.options.hoverDelay))}),o},close:function(t){var n=this,i=n.element;return t=i.find(t),t.length||(t=i.find(">.k-item")),t.each(function(){var t=e(this);clearTimeout(t.data(y)),t.data(y,setTimeout(function(){var e=t.find(".k-group:first:visible").data(E);e&&(e.close(),e.element.attr("aria-hidden",!0))},n.options.hoverDelay))}),n},_toggleDisabled:function(t,n){this.element.find(t).each(function(){e(this).toggleClass(z,n).toggleClass(B,!n).attr("aria-disabled",!n)})},_toggleHover:function(t){var n=e(l.eventTarget(t)||t.target).closest(W),i=t.type==R||-1!==p.indexOf(t.type);n.parents("li."+B).length||n.toggleClass(S,i),this._removeHoverItem()},_removeHoverItem:function(){var e=this._oldHoverItem;e&&e.hasClass(L)&&(e.removeClass(L),this._oldHoverItem=null)},_updateClasses:function(){var e,t=this.element;t.addClass("k-widget k-reset k-header "+x).addClass(x+"-"+this.options.orientation),t.find("li > ul").addClass("k-group").attr("role","menu").attr("aria-hidden",t.is(":visible")),e=t.find("> li,.k-group > li"),e.each(function(){o(this)})},_mouseenter:function(t){var n=this,i=e(t.currentTarget),o=i.children(".k-animation-container").length||i.children(G).length;t.delegateTarget==i.parents(".k-menu")[0]&&((!n.options.openOnClick||n.clicked)&&!r(t.currentTarget,t.relatedTarget)&&o&&n.open(i),(n.options.openOnClick&&n.clicked||c)&&i.siblings().each(h(function(e,t){n.close(t)},n)))},_mouseleave:function(n){var i=this,o=e(n.currentTarget),a=o.children(".k-animation-container").length||o.children(G).length;return o.parentsUntil(".k-animation-container",".k-list-container,.k-calendar-container")[0]?(n.stopImmediatePropagation(),t):(i.options.openOnClick||c||r(n.currentTarget,n.relatedTarget)||!a||i.close(o),t)},_click:function(n){var i,r,o,a=this,s=a.options,d=e(l.eventTarget(n)),c=d[0]?d[0].nodeName.toUpperCase():"",p="INPUT"==c||"SELECT"==c||"BUTTON"==c,u=d.closest("."+I),m=d.closest(W),h=u.attr("href"),f=!!h&&"#"!=h.charAt(h.length-1);if(!m.children(Z)[0])return m.hasClass(B)?(n.preventDefault(),t):(n.handled||!a.trigger(A,{item:m[0]})||p||n.preventDefault(),n.handled=!0,r=m.children(G+",.k-animation-container"),o=r.is(":visible"),s.closeOnClick&&!f&&(!r.length||s.openOnClick&&o)?(m.removeClass(S).css("height"),a._oldHoverItem=a._findRootParent(m),a.close(u.parentsUntil(a.element,W)),a.clicked=!1,-1!="touchend MSPointerUp".indexOf(n.type)&&n.preventDefault(),t):((m.parent().hasClass(x)&&s.openOnClick||l.support.touch)&&(f||p||n.preventDefault(),a.clicked=!0,i=r.is(":visible")?T:w,a[i](m)),t))},_documentClick:function(e){r(this.element[0],e.target)||(this.clicked=!1)},_focus:function(e){var t=this,n=e.target,i=t._hoverItem();n==t.wrapper[0]&&i.length?t._moveHover([],i):n!=t.wrapper[0]||t._oldHoverItem||t._moveHover([],t.wrapper.children().first())},_keydown:function(e){var n,i,r,o=this,a=e.keyCode,s=o._oldHoverItem,d=l.support.isRtl(o.wrapper);if(e.target==e.currentTarget||a==v.ESC){if(s||(s=o._oldHoverItem=o._hoverItem()),i=o._itemBelongsToVertival(s),r=o._itemHasChildren(s),a==v.RIGHT)n=o[d?"_itemLeft":"_itemRight"](s,i,r);else if(a==v.LEFT)n=o[d?"_itemRight":"_itemLeft"](s,i,r);else if(a==v.DOWN)n=o._itemDown(s,i,r);else if(a==v.UP)n=o._itemUp(s,i,r);else if(a==v.ESC)n=o._itemEsc(s,i);else if(a==v.ENTER||a==v.SPACEBAR)n=s.children(".k-link"),n.length>0&&(o._click({target:n[0],preventDefault:function(){}}),o._moveHover(s,o._findRootParent(s)));else if(a==v.TAB)return n=o._findRootParent(s),o.close(n),o._moveHover(s,n),t;n&&n[0]&&(e.preventDefault(),e.stopPropagation())}},_hoverItem:function(){return this.wrapper.find("li.k-item.k-state-hover").filter(":visible")},_itemBelongsToVertival:function(e){var t=this.wrapper.hasClass("k-menu-vertical");return e.length?e.parent().hasClass("k-group")||t:t},_itemHasChildren:function(e){return e.length?e.children("ul.k-group, div.k-animation-container").length>0:!1},_moveHover:function(e,t){var n=this,i=n._ariaId;e.length&&t.length&&(e.removeClass(L),e[0].id===i&&e.removeAttr("id")),t.length&&(t[0].id&&(i=t[0].id),t.addClass(L),n._oldHoverItem=t,i&&(n.element.removeAttr("aria-activedescendant"),t.attr("id",i),n.element.attr("aria-activedescendant",i)))},_findRootParent:function(e){return e.parent().hasClass("k-menu")?e:e.parentsUntil(".k-menu","li.k-item").last()},_isRootItem:function(e){return e.parent().hasClass("k-menu")},_itemRight:function(e,t,n){var i,r,o=this;return t?n?(o.open(e),i=e.find(".k-group").children().first()):"horizontal"==o.options.orientation&&(r=o._findRootParent(e),o.close(r),i=r.next(),i.is(".k-separator")&&(i=i.next())):(i=e.next(),i.is(".k-separator")&&(i=i.next()),i.length||(i=e.parent().children().first())),i&&!i.length?i=o.wrapper.children(".k-item").first():i||(i=[]),o._moveHover(e,i),i},_itemLeft:function(e,t){var n,i=this;return t?(n=e.parent().closest(".k-item"),i.close(n),i._isRootItem(n)&&"horizontal"==i.options.orientation&&(n=n.prev(),n.is(".k-separator")&&(n=n.prev()))):(n=e.prev(),n.is(".k-separator")&&(n=n.prev()),n.length||(n=e.parent().children().last())),n.length||(n=i.wrapper.children(".k-item").last()),i._moveHover(e,n),n},_itemDown:function(e,t,n){var i,r=this;if(t)i=e.next(),i.is(".k-separator")&&(i=i.next());else{if(!n||e.hasClass(B))return;r.open(e),i=e.find(".k-group").children().first()}return!i.length&&e.length?i=e.parent().children().first():e.length||(i=r.wrapper.children(".k-item").first()),r._moveHover(e,i),i},_itemUp:function(e,t){var n,i=this;if(t)return n=e.prev(),n.is(".k-separator")&&(n=n.prev()),!n.length&&e.length?n=e.parent().children().last():e.length||(n=i.wrapper.children(".k-item").last()),i._moveHover(e,n),n},_itemEsc:function(e,t){var n,i=this;return t?(n=e.parent().closest(".k-item"),i.close(n),i._moveHover(e,n),n):e}});m(F,{renderItem:function(e){e=m({menu:{},group:{}},e);var t=$.empty,n=e.item;return $.item(m(e,{image:n.imageUrl?$.image:t,sprite:n.spriteCssClass?$.sprite:t,itemWrapper:$.itemWrapper,arrow:n.items||n.content?$.arrow:t,subGroup:F.renderGroup},q))},renderGroup:function(e){return $.group(m({renderItems:function(e){for(var t="",n=0,i=e.items,r=i?i.length:0,o=m({length:r},e.group);r>n;n++)t+=F.renderItem(m(e,{group:o,item:m({index:n},i[n])}));return t}},e,q))},renderContent:function(e){return $.content(m(e,q))}}),l.ui.plugin(F)})(window.kendo.jQuery);
|
@@ -1,10 +1,11 @@
|
|
1
1
|
/*
|
2
|
-
* Kendo UI Web v2012.
|
2
|
+
* Kendo UI Web v2012.3.1114 (http://kendoui.com)
|
3
3
|
* Copyright 2012 Telerik AD. All rights reserved.
|
4
4
|
*
|
5
|
-
* Kendo UI Web commercial licenses may be obtained at
|
5
|
+
* Kendo UI Web commercial licenses may be obtained at
|
6
|
+
* https://www.kendoui.com/purchase/license-agreement/kendo-ui-web-commercial.aspx
|
6
7
|
* If you do not own a commercial license, this file shall be governed by the
|
7
8
|
* GNU General Public License (GPL) version 3.
|
8
9
|
* For GPL requirements, please review: http://www.gnu.org/copyleft/gpl.html
|
9
10
|
*/
|
10
|
-
|
11
|
+
(function(e){var n=window.kendo,t=n.mobile,i=n.fx,s=t.ui,l=e.proxy,o=e.extend,a=s.Widget,r=n.Class,c=n.ui.Movable,u=n.ui.Pane,m=n.ui.PaneDimensions,p=i.Transition,d=i.Animation,h=Math.abs,f=500,v=.7,b=.93,x=.5,T="km-scroller-release",E="km-scroller-refresh",y="pull",C="change",_="resize",g="scroll",w=d.extend({init:function(e){var n=this;d.fn.init.call(n),o(n,e),n.userEvents.bind("gestureend",l(n.start,n)),n.tapCapture.bind("press",l(n.cancel,n))},done:function(){return.01>this.dimensions.minScale-this.movable.scale},tick:function(){var e=this.movable;e.scaleWith(1.1),this.dimensions.rescale(e.scale)},onEnd:function(){var e=this.movable;e.scaleTo(this.dimensions.minScale),this.dimensions.rescale(e.scale)}}),k=d.extend({init:function(e){var n=this;d.fn.init.call(n),o(n,e,{transition:new p({axis:e.axis,movable:e.movable,onEnd:function(){n._end()}})}),n.tapCapture.bind("press",function(){n.cancel()}),n.userEvents.bind("end",l(n.start,n)),n.userEvents.bind("gestureend",l(n.start,n)),n.userEvents.bind("tap",l(n.onEnd,n))},onCancel:function(){this.transition.cancel()},freeze:function(e){var n=this;n.cancel(),n._moveTo(e)},onEnd:function(){var e=this;e._outOfBounds()?e._snapBack():e._end()},done:function(){return 1>h(this.velocity)},start:function(e){var n=this;n.dimension.enabled&&(n._outOfBounds()?n._snapBack():(n.velocity=16*e.touch[n.axis].velocity,n.velocity&&(n.tapCapture.captureNext(),d.fn.start.call(n))))},tick:function(){var e=this,n=e.dimension,t=e._outOfBounds()?x:b,i=e.velocity*=t,s=e.movable[e.axis]+i;!e.elastic&&n.outOfBounds(s)&&(s=Math.max(Math.min(s,n.max),n.min),e.velocity=0),e.movable.moveAxis(e.axis,s)},_end:function(){this.tapCapture.cancelCapture(),this.end()},_outOfBounds:function(){return this.dimension.outOfBounds(this.movable[this.axis])},_snapBack:function(){var e=this,n=e.dimension,t=e.movable[e.axis]>n.max?n.max:n.min;e._moveTo(t)},_moveTo:function(e){this.transition.moveTo({location:e,duration:f,ease:p.easeOutExpo})}}),z=r.extend({init:function(n){var t=this,i="x"===n.axis,s=e('<div class="km-touch-scrollbar km-'+(i?"horizontal":"vertical")+'-scrollbar" />');o(t,n,{element:s,elementSize:0,movable:new c(s),scrollMovable:n.movable,size:i?"width":"height"}),t.scrollMovable.bind(C,l(t._move,t)),t.container.append(s)},_move:function(){var e=this,n=e.axis,t=e.dimension,i=t.size,s=e.scrollMovable,l=i/t.total,o=Math.round(-s[n]*l),a=Math.round(i*l);o+a>i?a=i-o:0>o&&(a+=o,o=0),e.elementSize!=a&&(e.element.css(e.size,a+"px"),e.elementSize=a),e.movable.moveAxis(n,o)},show:function(){this.element.css({opacity:v,visibility:"visible"})},hide:function(){this.element.css({opacity:0})}}),O=a.extend({init:function(t,i){var s=this;a.fn.init.call(s,t,i),t=s.element,t.css("overflow","hidden").addClass("km-scroll-wrapper").wrapInner('<div class="km-scroll-container"/>').prepend('<div class="km-scroll-header"/>');var l=t.children().eq(1),r=new n.TapCapture(t),p=new c(l),d=new m({element:l,container:t,forcedEnabled:s.options.zoom,change:function(){s.trigger(_)}}),f=new n.UserEvents(t,{allowSelection:!0,preventDragEvent:!0,multiTouch:s.options.zoom,start:function(e){d.refresh();var n=h(e.x.velocity),t=h(e.y.velocity);d.x.enabled&&2*n>=t||d.y.enabled&&2*t>=n?f.capture():f.cancel()}}),v=new u({movable:p,dimensions:d,userEvents:f,elastic:s.options.elastic}),b=new w({movable:p,dimensions:d,userEvents:f,tapCapture:r});p.bind(C,function(){s.scrollTop=-p.y,s.scrollLeft=-p.x,s.trigger(g,{scrollTop:s.scrollTop,scrollLeft:s.scrollLeft})}),o(s,{movable:p,dimensions:d,zoomSnapBack:b,userEvents:f,pane:v,tapCapture:r,pulled:!1,scrollElement:l,fixedContainer:t.children().first()}),s._initAxis("x"),s._initAxis("y"),d.refresh(),s.options.pullToRefresh&&s._initPullToRefresh(),n.onResize(e.proxy(s.reset,s))},scrollHeight:function(){return this.scrollElement[0].scrollHeight},scrollWidth:function(){return this.scrollElement[0].scrollWidth},options:{name:"Scroller",zoom:!1,pullOffset:140,elastic:!0,pullTemplate:"Pull to refresh",releaseTemplate:"Release to refresh",refreshTemplate:"Refreshing"},events:[y,g,_],setOptions:function(e){var n=this;a.fn.setOptions.call(n,e),e.pullToRefresh&&n._initPullToRefresh()},reset:function(){this.movable.moveTo({x:0,y:0})},scrollTo:function(e,n){this.movable.moveTo({x:e,y:n})},pullHandled:function(){var e=this;e.refreshHint.removeClass(E),e.hintContainer.html(e.pullTemplate({})),e.yinertia.onEnd(),e.xinertia.onEnd()},destroy:function(){a.fn.destroy.call(this),this.userEvents.destroy()},_initPullToRefresh:function(){var e=this;e.dimensions.y.forceEnabled(),e.pullTemplate=n.template(e.options.pullTemplate),e.releaseTemplate=n.template(e.options.releaseTemplate),e.refreshTemplate=n.template(e.options.refreshTemplate),e.scrollElement.prepend('<span class="km-scroller-pull"><span class="km-icon"></span><span class="km-template">'+e.pullTemplate({})+"</span></span>"),e.refreshHint=e.scrollElement.children().first(),e.hintContainer=e.refreshHint.children(".km-template"),e.pane.y.bind("change",l(e._paneChange,e)),e.userEvents.bind("end",l(e._dragEnd,e))},_dragEnd:function(){var e=this;e.pulled&&(e.pulled=!1,e.refreshHint.removeClass(T).addClass(E),e.hintContainer.html(e.refreshTemplate({})),e.trigger("pull"),e.yinertia.freeze(e.options.pullOffset/2))},_paneChange:function(){var e=this;e.movable.y/x>e.options.pullOffset?e.pulled||(e.pulled=!0,e.refreshHint.removeClass(E).addClass(T),e.hintContainer.html(e.releaseTemplate({}))):e.pulled&&(e.pulled=!1,e.refreshHint.removeClass(T),e.hintContainer.html(e.pullTemplate({})))},_initAxis:function(e){var n=this,t=n.movable,i=n.dimensions[e],s=n.tapCapture,l=new z({axis:e,movable:t,dimension:i,container:n.element}),o=new k({axis:e,movable:t,tapCapture:s,userEvents:n.userEvents,dimension:i,elastic:n.options.elastic,end:function(){l.hide()}});n[e+"inertia"]=o,n.pane[e].bind(C,function(){l.show()})}});s.plugin(O)})(window.kendo.jQuery);
|
@@ -1,10 +1,11 @@
|
|
1
1
|
/*
|
2
|
-
* Kendo UI Web v2012.
|
2
|
+
* Kendo UI Web v2012.3.1114 (http://kendoui.com)
|
3
3
|
* Copyright 2012 Telerik AD. All rights reserved.
|
4
4
|
*
|
5
|
-
* Kendo UI Web commercial licenses may be obtained at
|
5
|
+
* Kendo UI Web commercial licenses may be obtained at
|
6
|
+
* https://www.kendoui.com/purchase/license-agreement/kendo-ui-web-commercial.aspx
|
6
7
|
* If you do not own a commercial license, this file shall be governed by the
|
7
8
|
* GNU General Public License (GPL) version 3.
|
8
9
|
* For GPL requirements, please review: http://www.gnu.org/copyleft/gpl.html
|
9
10
|
*/
|
10
|
-
|
11
|
+
(function(e,t){function n(e,t){return'<span unselectable="on" class="k-link"><span unselectable="on" class="k-icon k-i-arrow-'+e+'" title="'+t+'">'+t+"</span></span>"}function a(n,a){var r,s=a!==t;if(document.selection)if(e(n).is(":visible")&&n.focus(),r=document.selection.createRange(),s)r.move("character",a),r.select();else{var o=n.createTextRange(),i=o.duplicate();o.moveToBookmark(r.getBookmark()),i.setEndPoint("EndToStart",o),a=i.text.length}else n.selectionStart!==t&&(s?(n.focus(),n.setSelectionRange(a,a)):a=n.selectionStart);return a}var r=window.kendo,s=r.keys,o=r.ui,i=o.Widget,u=r._extractFormat,l=r.parseFloat,c=r.support.placeholder,p=r.getCulture,d="change",_="disabled",f="k-input",m="spin",v=".kendoNumericTextBox",g="touchend",x="mouseleave"+v,h="touchstart"+v+" mousedown"+v,w="touchcancel"+v+" "+"touchend"+v+" mouseup"+v+" "+x,k="mouseenter"+v+" "+x,T="k-state-default",b="k-state-focused",y="k-state-hover",C=".",A="k-state-selected",E="k-state-disabled",N=null,R=e.proxy,S={190:".",188:","},O=i.extend({init:function(e,n){var a,s,o,l,c=this,p=n&&n.step!==t;i.fn.init.call(c,e,n),n=c.options,e=c.element.addClass(f).on("keydown"+v,R(c._keydown,c)).on("paste"+v,R(c._paste,c)).on("blur"+v,R(c._focusout,c)).attr("role","spinbutton"),n.placeholder=n.placeholder||e.attr("placeholder"),c._reset(),c._wrapper(),c._arrows(),c._input(),c._text.on(g+v,function(){c._toggleText(!1)}),r.support.mobileOS||c._text.on("focus"+v,R(c._click,c)),a=c.min(e.attr("min")),s=c.max(e.attr("max")),o=c._parse(e.attr("step")),n.min===N&&a!==N&&(n.min=a),n.max===N&&s!==N&&(n.max=s),p||o===N||(n.step=o),e.attr("aria-valuemin",n.min).attr("aria-valuemax",n.max),n.format=u(n.format),l=n.value,c.value(l!==N?l:e.val()),c.enable(!e.is("[disabled]")),r.notify(c)},options:{name:"NumericTextBox",decimals:N,min:N,max:N,value:N,step:1,culture:"",format:"n",spinners:!0,placeholder:"",upArrowText:"Increase value",downArrowText:"Decrease value"},events:[d,m],enable:function(e){var t=this,n=t._text.add(t.element),a=t._inputWrapper.off(k),r=t._upArrow.off(h),s=t._downArrow.off(h);t._toggleText(!0),e===!1?(a.removeClass(T).addClass(E),n.attr(_,_)):(a.addClass(T).removeClass(E).on(k,t._toggleHover),n.removeAttr(_),r.on(h,function(e){e.preventDefault(),t._spin(1),t._upArrow.addClass(A)}),s.on(h,function(e){e.preventDefault(),t._spin(-1),t._downArrow.addClass(A)}))},destroy:function(){var e=this;e.element.add(e._text).add(e._upArrow).add(e._downArrow).add(e._inputWrapper).off(v),e._form&&e._form.off("reset",e._resetHandler),i.fn.destroy.call(e)},min:function(e){return this._option("min",e)},max:function(e){return this._option("max",e)},step:function(e){return this._option("step",e)},value:function(e){var n,a=this;return e===t?a._value:(e=a._parse(e),n=a._adjust(e),e===n&&(a._update(e),a._old=a._value),t)},focus:function(){this._focusin()},_adjust:function(e){var t=this,n=t.options,a=n.min,r=n.max;return e===N?e:(a!==N&&a>e?e=a:r!==N&&e>r&&(e=r),e)},_arrows:function(){var t,a=this,r=a.options,s=r.spinners,o=a.element;t=o.siblings(".k-icon"),t[0]||(t=e(n("n",r.upArrowText)+n("s",r.downArrowText)).insertAfter(o),t.wrapAll('<span class="k-select"/>')),t.on(w,function(){clearTimeout(a._spinning),t.removeClass(A)}),s||(t.toggle(s),a._inputWrapper.addClass("k-expand-padding")),a._upArrow=t.eq(0),a._downArrow=t.eq(1)},_blur:function(){var e=this;e._toggleText(!0),e._change(e.element.val())},_click:function(e){var t=this;clearTimeout(t._focusing),t._focusing=setTimeout(function(){var n=e.target,r=a(n),s=n.value.substring(0,r),o=t._format(t.options.format),i=o[","],u=RegExp("\\"+i,"g"),l=RegExp("([\\d\\"+i+"]+)(\\"+o[C]+")?(\\d+)?"),c=l.exec(s),p=0;c&&(p=c[0].replace(u,"").length,-1!=s.indexOf("(")&&0>t._value&&p++),t._focusin(),a(t.element[0],p)})},_change:function(e){var t=this;t._update(e),e=t._value,t._old!=e&&(t._old=e,t.trigger(d),t.element.trigger(d))},_culture:function(e){return e||p(this.options.culture)},_focusin:function(){var e=this;e._inputWrapper.addClass(b),e._toggleText(!1),e.element[0].focus()},_focusout:function(){var e=this;clearTimeout(e._focusing),e._inputWrapper.removeClass(b),e._blur()},_format:function(e,t){var n=this._culture(t).numberFormat;return e=e.toLowerCase(),e.indexOf("c")>-1?n=n.currency:e.indexOf("p")>-1&&(n=n.percent),n},_input:function(){var t,n,a=this,r="k-formatted-value",s=a.element.show()[0],o=s.accessKey,i=a.wrapper;n=i.find(C+r),n[0]||(n=e("<input />").insertBefore(s).addClass(r)),t=n[0],t.type="text",t.style.cssText=s.style.cssText,t.tabIndex=s.tabIndex,s.tabIndex=0,s.type="text",n.attr("placeholder",a.options.placeholder),o&&(n.attr("accesskey",o),s.accessKey=""),a._text=n.attr("readonly",!0).addClass(s.className)},_keydown:function(e){var t=this,n=e.keyCode;n==s.DOWN?t._step(-1):n==s.UP?t._step(1):n==s.ENTER&&t._change(t.element.val()),t._prevent(n,e.shiftKey)&&!e.ctrlKey&&e.preventDefault()},_paste:function(e){var t=this,n=e.target,a=n.value;setTimeout(function(){t._parse(n.value)===N&&t._update(a)})},_prevent:function(e,t){var n,r=this,o=r.element[0],i=o.value,u=r.options,l=u.min,c=r._format(u.format),p=c[C],d=u.decimals,_=a(o),f=!0;return d===N&&(d=c.decimals),e>16&&21>e||e>32&&37>e||e>47&&58>e||e>95&&106>e||e==s.INSERT||e==s.DELETE||e==s.LEFT||e==s.RIGHT||e==s.TAB||e==s.BACKSPACE||e==s.ENTER?(f=!1,t&&(n=parseInt(String.fromCharCode(e),10),isNaN(n)||(o.value=i.substring(0,_)+n+i.substring(_),f=!0))):S[e]===p&&d>0&&-1==i.indexOf(p)?f=!1:!(l===N||0>l)||-1!=i.indexOf("-")||189!=e&&109!=e||0!==_?110==e&&d>0&&-1==i.indexOf(p)&&(o.value=i.substring(0,_)+p+i.substring(_)):f=!1,f},_option:function(e,n){var a=this,r=a.options;return n===t?r[e]:(n=a._parse(n),(n||"step"!==e)&&(r[e]=a._parse(n),a.element.attr("aria-value"+e,r[e])),t)},_spin:function(e,t){var n=this;t=t||500,clearTimeout(n._spinning),n._spinning=setTimeout(function(){n._spin(e,50)},t),n._step(e)},_step:function(e){var t=this,n=t.element,a=t._parse(n.val())||0;document.activeElement!=n[0]&&t._focusin(),a+=t.options.step*e,t._update(t._adjust(a)),t.trigger(m)},_toggleHover:function(t){e(t.currentTarget).toggleClass(y,"mouseenter"===t.type)},_toggleText:function(e){var t=this;t._text.toggle(e),t.element.toggle(!e)},_parse:function(e,t){return l(e,this._culture(t),this.options.format)},_update:function(e){var t,n=this,a=n.options,s=a.format,o=a.decimals,i=n._culture(),u=n._format(s,i);o===N&&(o=u.decimals),e=n._parse(e,i),t=e!==N,t&&(e=parseFloat(e.toFixed(o))),n._value=e=n._adjust(e),n._placeholder(r.toString(e,s,i)),n.element.val(t?(""+e).replace(C,u[C]):"").attr("aria-valuenow",e)},_placeholder:function(e){this._text.val(e),c||e||this._text.val(this.options.placeholder)},_wrapper:function(){var t,n=this,a=n.element,r=a[0];t=a.parents(".k-numerictextbox"),t.is("span.k-numerictextbox")||(t=a.hide().wrap('<span class="k-numeric-wrap k-state-default" />').parent(),t=t.wrap("<span/>").parent()),t[0].style.cssText=r.style.cssText,r.style.width="",n.wrapper=t.addClass("k-widget k-numerictextbox").addClass(r.className).css("display",""),n._inputWrapper=e(t[0].firstChild)},_reset:function(){var e=this,t=e.element,n=t.closest("form");n[0]&&(e._resetHandler=function(){setTimeout(function(){e.value(t[0].value)})},e._form=n.on("reset",e._resetHandler))}});o.plugin(O)})(window.kendo.jQuery);
|