adminlte 1.3.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (489) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +53 -0
  4. data/lib/adminlte.rb +6 -0
  5. data/lib/adminlte/version.rb +3 -0
  6. data/vendor/assets/fonts/FontAwesome.otf +0 -0
  7. data/vendor/assets/fonts/fontawesome-webfont.eot +0 -0
  8. data/vendor/assets/fonts/fontawesome-webfont.svg +414 -0
  9. data/vendor/assets/fonts/fontawesome-webfont.ttf +0 -0
  10. data/vendor/assets/fonts/fontawesome-webfont.woff +0 -0
  11. data/vendor/assets/fonts/glyphicons-halflings-regular.eot +0 -0
  12. data/vendor/assets/fonts/glyphicons-halflings-regular.svg +229 -0
  13. data/vendor/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
  14. data/vendor/assets/fonts/glyphicons-halflings-regular.woff +0 -0
  15. data/vendor/assets/fonts/ionicons.eot +0 -0
  16. data/vendor/assets/fonts/ionicons.svg +1623 -0
  17. data/vendor/assets/fonts/ionicons.ttf +0 -0
  18. data/vendor/assets/fonts/ionicons.woff +0 -0
  19. data/vendor/assets/img/ajax-loader.gif +0 -0
  20. data/vendor/assets/img/ajax-loader1.gif +0 -0
  21. data/vendor/assets/img/avatar.png +0 -0
  22. data/vendor/assets/img/avatar04.png +0 -0
  23. data/vendor/assets/img/avatar2.png +0 -0
  24. data/vendor/assets/img/avatar3.png +0 -0
  25. data/vendor/assets/img/avatar5.png +0 -0
  26. data/vendor/assets/img/blur-background04.jpg +0 -0
  27. data/vendor/assets/img/blur-background08.jpg +0 -0
  28. data/vendor/assets/img/blur-background09.jpg +0 -0
  29. data/vendor/assets/img/bootstrap-colorpicker/alpha-horizontal.png +0 -0
  30. data/vendor/assets/img/bootstrap-colorpicker/alpha.png +0 -0
  31. data/vendor/assets/img/bootstrap-colorpicker/hue-horizontal.png +0 -0
  32. data/vendor/assets/img/bootstrap-colorpicker/hue.png +0 -0
  33. data/vendor/assets/img/bootstrap-colorpicker/saturation.png +0 -0
  34. data/vendor/assets/img/credit/american-express.png +0 -0
  35. data/vendor/assets/img/credit/cirrus.png +0 -0
  36. data/vendor/assets/img/credit/mastercard.png +0 -0
  37. data/vendor/assets/img/credit/mestro.png +0 -0
  38. data/vendor/assets/img/credit/paypal.png +0 -0
  39. data/vendor/assets/img/credit/paypal2.png +0 -0
  40. data/vendor/assets/img/credit/visa.png +0 -0
  41. data/vendor/assets/img/icons.png +0 -0
  42. data/vendor/assets/img/sprite-skin-flat.png +0 -0
  43. data/vendor/assets/img/sprite-skin-nice.png +0 -0
  44. data/vendor/assets/img/user-bg.png +0 -0
  45. data/vendor/assets/img/user.jpg +0 -0
  46. data/vendor/assets/img/user2.jpg +0 -0
  47. data/vendor/assets/javascripts/AdminLTE/app.js +1060 -0
  48. data/vendor/assets/javascripts/AdminLTE/bootstrap.js +2006 -0
  49. data/vendor/assets/javascripts/AdminLTE/dashboard.js +254 -0
  50. data/vendor/assets/javascripts/AdminLTE/plugins/bootstrap-slider/bootstrap-slider.js +388 -0
  51. data/vendor/assets/javascripts/AdminLTE/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js +6 -0
  52. data/vendor/assets/javascripts/AdminLTE/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.js +350 -0
  53. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/CHANGES.md +378 -0
  54. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/LICENSE.md +1264 -0
  55. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/README.md +39 -0
  56. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/adapters/jquery.js +10 -0
  57. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/build-config.js +142 -0
  58. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/ckeditor.js +900 -0
  59. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/config.js +38 -0
  60. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/contents.css +123 -0
  61. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/af.js +5 -0
  62. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/ar.js +5 -0
  63. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/bg.js +5 -0
  64. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/bn.js +5 -0
  65. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/bs.js +5 -0
  66. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/ca.js +5 -0
  67. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/cs.js +5 -0
  68. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/cy.js +5 -0
  69. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/da.js +5 -0
  70. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/de.js +5 -0
  71. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/el.js +5 -0
  72. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/en-au.js +5 -0
  73. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/en-ca.js +5 -0
  74. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/en-gb.js +5 -0
  75. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/en.js +5 -0
  76. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/eo.js +5 -0
  77. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/es.js +5 -0
  78. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/et.js +5 -0
  79. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/eu.js +5 -0
  80. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/fa.js +5 -0
  81. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/fi.js +5 -0
  82. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/fo.js +5 -0
  83. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/fr-ca.js +5 -0
  84. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/fr.js +5 -0
  85. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/gl.js +5 -0
  86. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/gu.js +5 -0
  87. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/he.js +5 -0
  88. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/hi.js +5 -0
  89. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/hr.js +5 -0
  90. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/hu.js +5 -0
  91. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/id.js +5 -0
  92. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/is.js +5 -0
  93. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/it.js +5 -0
  94. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/ja.js +5 -0
  95. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/ka.js +5 -0
  96. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/km.js +5 -0
  97. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/ko.js +5 -0
  98. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/ku.js +5 -0
  99. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/lt.js +5 -0
  100. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/lv.js +5 -0
  101. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/mk.js +5 -0
  102. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/mn.js +5 -0
  103. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/ms.js +5 -0
  104. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/nb.js +5 -0
  105. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/nl.js +5 -0
  106. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/no.js +5 -0
  107. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/pl.js +5 -0
  108. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/pt-br.js +5 -0
  109. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/pt.js +5 -0
  110. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/ro.js +5 -0
  111. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/ru.js +5 -0
  112. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/si.js +5 -0
  113. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/sk.js +5 -0
  114. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/sl.js +5 -0
  115. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/sq.js +5 -0
  116. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/sr-latn.js +5 -0
  117. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/sr.js +5 -0
  118. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/sv.js +5 -0
  119. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/th.js +5 -0
  120. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/tr.js +5 -0
  121. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/ug.js +5 -0
  122. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/uk.js +5 -0
  123. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/vi.js +5 -0
  124. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/zh-cn.js +5 -0
  125. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/lang/zh.js +5 -0
  126. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +10 -0
  127. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/_translationstatus.txt +25 -0
  128. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/ar.js +9 -0
  129. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/bg.js +9 -0
  130. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/ca.js +10 -0
  131. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/cs.js +10 -0
  132. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/cy.js +9 -0
  133. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/da.js +9 -0
  134. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/de.js +10 -0
  135. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/el.js +10 -0
  136. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +9 -0
  137. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/eo.js +10 -0
  138. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/es.js +10 -0
  139. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/et.js +9 -0
  140. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/fa.js +9 -0
  141. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/fi.js +10 -0
  142. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/fr-ca.js +10 -0
  143. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/fr.js +11 -0
  144. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/gl.js +10 -0
  145. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/gu.js +9 -0
  146. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/he.js +9 -0
  147. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/hi.js +9 -0
  148. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/hr.js +9 -0
  149. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/hu.js +10 -0
  150. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/id.js +9 -0
  151. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/it.js +10 -0
  152. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/ja.js +8 -0
  153. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/km.js +9 -0
  154. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/ko.js +9 -0
  155. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/ku.js +10 -0
  156. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/lt.js +9 -0
  157. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/lv.js +11 -0
  158. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/mk.js +9 -0
  159. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/mn.js +9 -0
  160. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/nb.js +9 -0
  161. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/nl.js +10 -0
  162. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/no.js +9 -0
  163. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/pl.js +10 -0
  164. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/pt-br.js +9 -0
  165. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/pt.js +10 -0
  166. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/ro.js +9 -0
  167. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +9 -0
  168. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/si.js +8 -0
  169. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/sk.js +10 -0
  170. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/sl.js +10 -0
  171. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/sq.js +9 -0
  172. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/sr-latn.js +9 -0
  173. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/sr.js +9 -0
  174. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/sv.js +10 -0
  175. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/th.js +9 -0
  176. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/tr.js +10 -0
  177. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/ug.js +9 -0
  178. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/uk.js +10 -0
  179. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/vi.js +9 -0
  180. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/zh-cn.js +7 -0
  181. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/a11yhelp/dialogs/lang/zh.js +7 -0
  182. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/about/dialogs/about.js +7 -0
  183. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor.png +0 -0
  184. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
  185. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/clipboard/dialogs/paste.js +11 -0
  186. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/dialog/dialogDefinition.js +4 -0
  187. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/fakeobjects/images/spacer.gif +0 -0
  188. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/icons.png +0 -0
  189. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/icons_hidpi.png +0 -0
  190. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/image/dialogs/image.js +43 -0
  191. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/image/images/noimage.png +0 -0
  192. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/link/dialogs/anchor.js +8 -0
  193. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/link/dialogs/link.js +37 -0
  194. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/link/images/anchor.png +0 -0
  195. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/link/images/hidpi/anchor.png +0 -0
  196. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/magicline/images/hidpi/icon.png +0 -0
  197. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/magicline/images/icon.png +0 -0
  198. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/pastefromword/filter/default.js +31 -0
  199. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/scayt/LICENSE.md +28 -0
  200. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/scayt/README.md +25 -0
  201. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/scayt/dialogs/options.js +20 -0
  202. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/scayt/dialogs/toolbar.css +71 -0
  203. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/_translationstatus.txt +20 -0
  204. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/ar.js +13 -0
  205. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/bg.js +13 -0
  206. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/ca.js +14 -0
  207. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/cs.js +13 -0
  208. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/cy.js +14 -0
  209. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/de.js +13 -0
  210. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/el.js +13 -0
  211. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/en.js +13 -0
  212. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/eo.js +12 -0
  213. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/es.js +13 -0
  214. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/et.js +13 -0
  215. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/fa.js +12 -0
  216. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/fi.js +13 -0
  217. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/fr-ca.js +10 -0
  218. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/fr.js +11 -0
  219. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/gl.js +13 -0
  220. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/he.js +12 -0
  221. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/hr.js +13 -0
  222. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/hu.js +12 -0
  223. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/id.js +13 -0
  224. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/it.js +14 -0
  225. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/ja.js +9 -0
  226. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/km.js +13 -0
  227. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/ku.js +13 -0
  228. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/lv.js +13 -0
  229. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/nb.js +11 -0
  230. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/nl.js +13 -0
  231. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/no.js +11 -0
  232. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/pl.js +12 -0
  233. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/pt-br.js +11 -0
  234. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/pt.js +13 -0
  235. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/ru.js +13 -0
  236. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/si.js +13 -0
  237. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/sk.js +13 -0
  238. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/sl.js +12 -0
  239. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/sq.js +13 -0
  240. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/sv.js +11 -0
  241. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/th.js +13 -0
  242. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/tr.js +12 -0
  243. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/ug.js +13 -0
  244. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/uk.js +12 -0
  245. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/vi.js +14 -0
  246. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/zh-cn.js +9 -0
  247. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/lang/zh.js +12 -0
  248. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/specialchar/dialogs/specialchar.js +14 -0
  249. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/table/dialogs/table.js +21 -0
  250. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/tabletools/dialogs/tableCell.js +16 -0
  251. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/wsc/LICENSE.md +28 -0
  252. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/wsc/README.md +25 -0
  253. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/wsc/dialogs/ciframe.html +66 -0
  254. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/wsc/dialogs/tmp.html +118 -0
  255. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +52 -0
  256. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/wsc/dialogs/wsc.css +82 -0
  257. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/wsc/dialogs/wsc.js +67 -0
  258. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/plugins/wsc/dialogs/wsc_ie.js +11 -0
  259. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/dialog.css +5 -0
  260. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/dialog_ie.css +5 -0
  261. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/dialog_ie7.css +5 -0
  262. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/dialog_ie8.css +5 -0
  263. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/dialog_iequirks.css +5 -0
  264. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/dialog_opera.css +5 -0
  265. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/editor.css +5 -0
  266. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/editor_gecko.css +5 -0
  267. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/editor_ie.css +5 -0
  268. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/editor_ie7.css +5 -0
  269. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/editor_ie8.css +5 -0
  270. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/editor_iequirks.css +5 -0
  271. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/icons.png +0 -0
  272. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/icons_hidpi.png +0 -0
  273. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/images/arrow.png +0 -0
  274. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/images/close.png +0 -0
  275. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/images/hidpi/close.png +0 -0
  276. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/images/hidpi/lock-open.png +0 -0
  277. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/images/hidpi/lock.png +0 -0
  278. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/images/hidpi/refresh.png +0 -0
  279. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/images/lock-open.png +0 -0
  280. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/images/lock.png +0 -0
  281. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/images/refresh.png +0 -0
  282. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/skins/moono/readme.md +51 -0
  283. data/vendor/assets/javascripts/AdminLTE/plugins/ckeditor/styles.js +111 -0
  284. data/vendor/assets/javascripts/AdminLTE/plugins/colorpicker/bootstrap-colorpicker.js +949 -0
  285. data/vendor/assets/javascripts/AdminLTE/plugins/colorpicker/bootstrap-colorpicker.min.js +1 -0
  286. data/vendor/assets/javascripts/AdminLTE/plugins/datatables/dataTables.bootstrap.js +250 -0
  287. data/vendor/assets/javascripts/AdminLTE/plugins/datatables/jquery.dataTables.js +12099 -0
  288. data/vendor/assets/javascripts/AdminLTE/plugins/daterangepicker/daterangepicker.js +883 -0
  289. data/vendor/assets/javascripts/AdminLTE/plugins/flot/excanvas.js +1428 -0
  290. data/vendor/assets/javascripts/AdminLTE/plugins/flot/excanvas.min.js +1 -0
  291. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.colorhelpers.js +180 -0
  292. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.colorhelpers.min.js +1 -0
  293. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.canvas.js +345 -0
  294. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.canvas.min.js +1 -0
  295. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.categories.js +190 -0
  296. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.categories.min.js +1 -0
  297. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.crosshair.js +176 -0
  298. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.crosshair.min.js +1 -0
  299. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.errorbars.js +353 -0
  300. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.errorbars.min.js +1 -0
  301. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.fillbetween.js +226 -0
  302. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.fillbetween.min.js +1 -0
  303. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.image.js +241 -0
  304. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.image.min.js +1 -0
  305. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.js +3137 -0
  306. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.min.js +2 -0
  307. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.navigate.js +346 -0
  308. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.navigate.min.js +1 -0
  309. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.pie.js +817 -0
  310. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.pie.min.js +1 -0
  311. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.resize.js +60 -0
  312. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.resize.min.js +1 -0
  313. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.selection.js +360 -0
  314. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.selection.min.js +1 -0
  315. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.stack.js +188 -0
  316. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.stack.min.js +1 -0
  317. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.symbol.js +71 -0
  318. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.symbol.min.js +1 -0
  319. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.threshold.js +142 -0
  320. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.threshold.min.js +1 -0
  321. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.time.js +431 -0
  322. data/vendor/assets/javascripts/AdminLTE/plugins/flot/jquery.flot.time.min.js +1 -0
  323. data/vendor/assets/javascripts/AdminLTE/plugins/fullcalendar/fullcalendar.js +6110 -0
  324. data/vendor/assets/javascripts/AdminLTE/plugins/fullcalendar/fullcalendar.min.js +7 -0
  325. data/vendor/assets/javascripts/AdminLTE/plugins/iCheck/icheck.js +506 -0
  326. data/vendor/assets/javascripts/AdminLTE/plugins/iCheck/icheck.min.js +10 -0
  327. data/vendor/assets/javascripts/AdminLTE/plugins/input-mask/jquery.inputmask.date.extensions.js +488 -0
  328. data/vendor/assets/javascripts/AdminLTE/plugins/input-mask/jquery.inputmask.extensions.js +122 -0
  329. data/vendor/assets/javascripts/AdminLTE/plugins/input-mask/jquery.inputmask.js +1632 -0
  330. data/vendor/assets/javascripts/AdminLTE/plugins/input-mask/jquery.inputmask.numeric.extensions.js +177 -0
  331. data/vendor/assets/javascripts/AdminLTE/plugins/input-mask/jquery.inputmask.phone.extensions.js +50 -0
  332. data/vendor/assets/javascripts/AdminLTE/plugins/input-mask/jquery.inputmask.regex.extensions.js +170 -0
  333. data/vendor/assets/javascripts/AdminLTE/plugins/input-mask/phone-codes/phone-be.json +45 -0
  334. data/vendor/assets/javascripts/AdminLTE/plugins/input-mask/phone-codes/phone-codes.json +294 -0
  335. data/vendor/assets/javascripts/AdminLTE/plugins/input-mask/phone-codes/readme.txt +1 -0
  336. data/vendor/assets/javascripts/AdminLTE/plugins/ionslider/ion.rangeSlider.min.js +22 -0
  337. data/vendor/assets/javascripts/AdminLTE/plugins/jqueryKnob/jquery.knob.js +764 -0
  338. data/vendor/assets/javascripts/AdminLTE/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js +8 -0
  339. data/vendor/assets/javascripts/AdminLTE/plugins/jvectormap/jquery-jvectormap-world-mill-en.js +1 -0
  340. data/vendor/assets/javascripts/AdminLTE/plugins/misc/html5shiv.js +8 -0
  341. data/vendor/assets/javascripts/AdminLTE/plugins/misc/jquery.ba-resize.min.js +9 -0
  342. data/vendor/assets/javascripts/AdminLTE/plugins/misc/jquery.placeholder.js +187 -0
  343. data/vendor/assets/javascripts/AdminLTE/plugins/misc/modernizr.min.js +4 -0
  344. data/vendor/assets/javascripts/AdminLTE/plugins/misc/respond.min.js +1 -0
  345. data/vendor/assets/javascripts/AdminLTE/plugins/morris/morris.js +1888 -0
  346. data/vendor/assets/javascripts/AdminLTE/plugins/morris/morris.min.js +2 -0
  347. data/vendor/assets/javascripts/AdminLTE/plugins/slimScroll/jquery.slimscroll.js +464 -0
  348. data/vendor/assets/javascripts/AdminLTE/plugins/slimScroll/jquery.slimscroll.min.js +16 -0
  349. data/vendor/assets/javascripts/AdminLTE/plugins/slimScroll/slimScroll.jquery.json +30 -0
  350. data/vendor/assets/javascripts/AdminLTE/plugins/sparkline/jquery.sparkline.js +3054 -0
  351. data/vendor/assets/javascripts/AdminLTE/plugins/sparkline/jquery.sparkline.min.js +5 -0
  352. data/vendor/assets/javascripts/AdminLTE/plugins/timepicker/bootstrap-timepicker.js +903 -0
  353. data/vendor/assets/javascripts/AdminLTE/plugins/timepicker/bootstrap-timepicker.min.js +5 -0
  354. data/vendor/assets/stylesheets/AdminLTE.css.scss +3539 -0
  355. data/vendor/assets/stylesheets/adminlte/plugins/bootstrap-slider/slider.css.scss.css +166 -0
  356. data/vendor/assets/stylesheets/adminlte/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.css.scss.css +102 -0
  357. data/vendor/assets/stylesheets/adminlte/plugins/colorpicker/bootstrap-colorpicker.css.scss.css +214 -0
  358. data/vendor/assets/stylesheets/adminlte/plugins/datatables/dataTables.bootstrap.css.scss.css +223 -0
  359. data/vendor/assets/stylesheets/adminlte/plugins/datatables/images/sort_asc.png +0 -0
  360. data/vendor/assets/stylesheets/adminlte/plugins/datatables/images/sort_asc_disabled.png +0 -0
  361. data/vendor/assets/stylesheets/adminlte/plugins/datatables/images/sort_both.png +0 -0
  362. data/vendor/assets/stylesheets/adminlte/plugins/datatables/images/sort_desc.png +0 -0
  363. data/vendor/assets/stylesheets/adminlte/plugins/datatables/images/sort_desc_disabled.png +0 -0
  364. data/vendor/assets/stylesheets/adminlte/plugins/daterangepicker/daterangepicker-bs3.css.scss.css +245 -0
  365. data/vendor/assets/stylesheets/adminlte/plugins/fullcalendar/fullcalendar.css.scss.css +617 -0
  366. data/vendor/assets/stylesheets/adminlte/plugins/fullcalendar/fullcalendar.print.css.scss.css +29 -0
  367. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/all.css +61 -0
  368. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/_all.css +560 -0
  369. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/aero.css +56 -0
  370. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/aero.png +0 -0
  371. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/aero@2x.png +0 -0
  372. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/blue.css +56 -0
  373. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/blue.png +0 -0
  374. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/blue@2x.png +0 -0
  375. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/flat.css +56 -0
  376. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/flat.png +0 -0
  377. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/flat@2x.png +0 -0
  378. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/green.css +56 -0
  379. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/green.png +0 -0
  380. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/green@2x.png +0 -0
  381. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/grey.css +56 -0
  382. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/grey.png +0 -0
  383. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/grey@2x.png +0 -0
  384. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/orange.css +56 -0
  385. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/orange.png +0 -0
  386. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/orange@2x.png +0 -0
  387. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/pink.css +56 -0
  388. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/pink.png +0 -0
  389. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/pink@2x.png +0 -0
  390. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/purple.css +56 -0
  391. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/purple.png +0 -0
  392. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/purple@2x.png +0 -0
  393. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/red.css +56 -0
  394. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/red.png +0 -0
  395. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/red@2x.png +0 -0
  396. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/yellow.css +56 -0
  397. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/yellow.png +0 -0
  398. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/flat/yellow@2x.png +0 -0
  399. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/futurico/futurico.css +56 -0
  400. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/futurico/futurico.png +0 -0
  401. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/futurico/futurico@2x.png +0 -0
  402. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/line/_all.css +740 -0
  403. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/line/aero.css +74 -0
  404. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/line/blue.css +74 -0
  405. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/line/green.css +74 -0
  406. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/line/grey.css +74 -0
  407. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/line/line.css +74 -0
  408. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/line/line.png +0 -0
  409. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/line/line@2x.png +0 -0
  410. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/line/orange.css +74 -0
  411. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/line/pink.css +74 -0
  412. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/line/purple.css +74 -0
  413. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/line/red.css +74 -0
  414. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/line/yellow.css +74 -0
  415. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/_all.css +557 -0
  416. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/aero.css +62 -0
  417. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/aero.png +0 -0
  418. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/aero@2x.png +0 -0
  419. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/blue.css +62 -0
  420. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/blue.png +0 -0
  421. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/blue@2x.png +0 -0
  422. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/green.css +62 -0
  423. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/green.png +0 -0
  424. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/green@2x.png +0 -0
  425. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/grey.css +62 -0
  426. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/grey.png +0 -0
  427. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/grey@2x.png +0 -0
  428. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/minimal.css +62 -0
  429. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/minimal.png +0 -0
  430. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/minimal@2x.png +0 -0
  431. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/orange.css +62 -0
  432. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/orange.png +0 -0
  433. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/orange@2x.png +0 -0
  434. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/pink.css +62 -0
  435. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/pink.png +0 -0
  436. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/pink@2x.png +0 -0
  437. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/purple.css +62 -0
  438. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/purple.png +0 -0
  439. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/purple@2x.png +0 -0
  440. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/red.css +62 -0
  441. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/red.png +0 -0
  442. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/red@2x.png +0 -0
  443. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/yellow.css +62 -0
  444. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/yellow.png +0 -0
  445. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/minimal/yellow@2x.png +0 -0
  446. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/polaris/polaris.css +62 -0
  447. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/polaris/polaris.png +0 -0
  448. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/polaris/polaris@2x.png +0 -0
  449. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/_all.css +620 -0
  450. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/aero.css +62 -0
  451. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/aero.png +0 -0
  452. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/aero@2x.png +0 -0
  453. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/blue.css +62 -0
  454. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/blue.png +0 -0
  455. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/blue@2x.png +0 -0
  456. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/green.css +62 -0
  457. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/green.png +0 -0
  458. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/green@2x.png +0 -0
  459. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/grey.css +62 -0
  460. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/grey.png +0 -0
  461. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/grey@2x.png +0 -0
  462. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/orange.css +62 -0
  463. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/orange.png +0 -0
  464. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/orange@2x.png +0 -0
  465. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/pink.css +62 -0
  466. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/pink.png +0 -0
  467. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/pink@2x.png +0 -0
  468. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/purple.css +62 -0
  469. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/purple.png +0 -0
  470. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/purple@2x.png +0 -0
  471. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/red.css +62 -0
  472. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/red.png +0 -0
  473. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/red@2x.png +0 -0
  474. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/square.css +62 -0
  475. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/square.png +0 -0
  476. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/square@2x.png +0 -0
  477. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/yellow.css +62 -0
  478. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/yellow.png +0 -0
  479. data/vendor/assets/stylesheets/adminlte/plugins/iCheck/square/yellow@2x.png +0 -0
  480. data/vendor/assets/stylesheets/adminlte/plugins/ionslider/ion.rangeSlider.css.scss.css +126 -0
  481. data/vendor/assets/stylesheets/adminlte/plugins/ionslider/ion.rangeSlider.skinFlat.css.scss.css +89 -0
  482. data/vendor/assets/stylesheets/adminlte/plugins/ionslider/ion.rangeSlider.skinNice.css.scss.css +85 -0
  483. data/vendor/assets/stylesheets/adminlte/plugins/jvectormap/jquery-jvectormap-1.2.2.css.scss.css +36 -0
  484. data/vendor/assets/stylesheets/adminlte/plugins/morris/morris.css.scss.css +2 -0
  485. data/vendor/assets/stylesheets/adminlte/plugins/timepicker/bootstrap-timepicker.css.scss +121 -0
  486. data/vendor/assets/stylesheets/bootstrap.css.scss +7118 -0
  487. data/vendor/assets/stylesheets/font-awesome.css.scss +1338 -0
  488. data/vendor/assets/stylesheets/ionicons.css.scss +2183 -0
  489. metadata +574 -0
@@ -0,0 +1,122 @@
1
+ /*
2
+ Input Mask plugin extensions
3
+ http://github.com/RobinHerbots/jquery.inputmask
4
+ Copyright (c) 2010 - 2014 Robin Herbots
5
+ Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
6
+ Version: 0.0.0
7
+
8
+ Optional extensions on the jquery.inputmask base
9
+ */
10
+ (function ($) {
11
+ //extra definitions
12
+ $.extend($.inputmask.defaults.definitions, {
13
+ 'A': {
14
+ validator: "[A-Za-z]",
15
+ cardinality: 1,
16
+ casing: "upper" //auto uppercasing
17
+ },
18
+ '#': {
19
+ validator: "[A-Za-z\u0410-\u044F\u0401\u04510-9]",
20
+ cardinality: 1,
21
+ casing: "upper"
22
+ }
23
+ });
24
+ $.extend($.inputmask.defaults.aliases, {
25
+ 'url': {
26
+ mask: "ir",
27
+ placeholder: "",
28
+ separator: "",
29
+ defaultPrefix: "http://",
30
+ regex: {
31
+ urlpre1: new RegExp("[fh]"),
32
+ urlpre2: new RegExp("(ft|ht)"),
33
+ urlpre3: new RegExp("(ftp|htt)"),
34
+ urlpre4: new RegExp("(ftp:|http|ftps)"),
35
+ urlpre5: new RegExp("(ftp:/|ftps:|http:|https)"),
36
+ urlpre6: new RegExp("(ftp://|ftps:/|http:/|https:)"),
37
+ urlpre7: new RegExp("(ftp://|ftps://|http://|https:/)"),
38
+ urlpre8: new RegExp("(ftp://|ftps://|http://|https://)")
39
+ },
40
+ definitions: {
41
+ 'i': {
42
+ validator: function (chrs, buffer, pos, strict, opts) {
43
+ return true;
44
+ },
45
+ cardinality: 8,
46
+ prevalidator: (function () {
47
+ var result = [], prefixLimit = 8;
48
+ for (var i = 0; i < prefixLimit; i++) {
49
+ result[i] = (function () {
50
+ var j = i;
51
+ return {
52
+ validator: function (chrs, buffer, pos, strict, opts) {
53
+ if (opts.regex["urlpre" + (j + 1)]) {
54
+ var tmp = chrs, k;
55
+ if (((j + 1) - chrs.length) > 0) {
56
+ tmp = buffer.join('').substring(0, ((j + 1) - chrs.length)) + "" + tmp;
57
+ }
58
+ var isValid = opts.regex["urlpre" + (j + 1)].test(tmp);
59
+ if (!strict && !isValid) {
60
+ pos = pos - j;
61
+ for (k = 0; k < opts.defaultPrefix.length; k++) {
62
+ buffer[pos] = opts.defaultPrefix[k]; pos++;
63
+ }
64
+ for (k = 0; k < tmp.length - 1; k++) {
65
+ buffer[pos] = tmp[k]; pos++;
66
+ }
67
+ return { "pos": pos };
68
+ }
69
+ return isValid;
70
+ } else {
71
+ return false;
72
+ }
73
+ }, cardinality: j
74
+ };
75
+ })();
76
+ }
77
+ return result;
78
+ })()
79
+ },
80
+ "r": {
81
+ validator: ".",
82
+ cardinality: 50
83
+ }
84
+ },
85
+ insertMode: false,
86
+ autoUnmask: false
87
+ },
88
+ "ip": { //ip-address mask
89
+ mask: ["[[x]y]z.[[x]y]z.[[x]y]z.x[yz]", "[[x]y]z.[[x]y]z.[[x]y]z.[[x]y][z]"],
90
+ definitions: {
91
+ 'x': {
92
+ validator: "[012]",
93
+ cardinality: 1,
94
+ definitionSymbol: "i"
95
+ },
96
+ 'y': {
97
+ validator: function (chrs, buffer, pos, strict, opts) {
98
+ if (pos - 1 > -1 && buffer[pos - 1] != ".")
99
+ chrs = buffer[pos - 1] + chrs;
100
+ else chrs = "0" + chrs;
101
+ return new RegExp("2[0-5]|[01][0-9]").test(chrs);
102
+ },
103
+ cardinality: 1,
104
+ definitionSymbol: "i"
105
+ },
106
+ 'z': {
107
+ validator: function (chrs, buffer, pos, strict, opts) {
108
+ if (pos - 1 > -1 && buffer[pos - 1] != ".") {
109
+ chrs = buffer[pos - 1] + chrs;
110
+ if (pos - 2 > -1 && buffer[pos - 2] != ".") {
111
+ chrs = buffer[pos - 2] + chrs;
112
+ } else chrs = "0" + chrs;
113
+ } else chrs = "00" + chrs;
114
+ return new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]").test(chrs);
115
+ },
116
+ cardinality: 1,
117
+ definitionSymbol: "i"
118
+ }
119
+ }
120
+ }
121
+ });
122
+ })(jQuery);
@@ -0,0 +1,1632 @@
1
+ /**
2
+ * @license Input Mask plugin for jquery
3
+ * http://github.com/RobinHerbots/jquery.inputmask
4
+ * Copyright (c) 2010 - 2014 Robin Herbots
5
+ * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
6
+ * Version: 0.0.0
7
+ */
8
+
9
+ (function ($) {
10
+ if ($.fn.inputmask === undefined) {
11
+ //helper functions
12
+ function isInputEventSupported(eventName) {
13
+ var el = document.createElement('input'),
14
+ eventName = 'on' + eventName,
15
+ isSupported = (eventName in el);
16
+ if (!isSupported) {
17
+ el.setAttribute(eventName, 'return;');
18
+ isSupported = typeof el[eventName] == 'function';
19
+ }
20
+ el = null;
21
+ return isSupported;
22
+ }
23
+ function resolveAlias(aliasStr, options, opts) {
24
+ var aliasDefinition = opts.aliases[aliasStr];
25
+ if (aliasDefinition) {
26
+ if (aliasDefinition.alias) resolveAlias(aliasDefinition.alias, undefined, opts); //alias is another alias
27
+ $.extend(true, opts, aliasDefinition); //merge alias definition in the options
28
+ $.extend(true, opts, options); //reapply extra given options
29
+ return true;
30
+ }
31
+ return false;
32
+ }
33
+ function generateMaskSets(opts) {
34
+ var ms = [];
35
+ var genmasks = []; //used to keep track of the masks that where processed, to avoid duplicates
36
+ function getMaskTemplate(mask) {
37
+ if (opts.numericInput) {
38
+ mask = mask.split('').reverse().join('');
39
+ }
40
+ var escaped = false, outCount = 0, greedy = opts.greedy, repeat = opts.repeat;
41
+ if (repeat == "*") greedy = false;
42
+ //if (greedy == true && opts.placeholder == "") opts.placeholder = " ";
43
+ if (mask.length == 1 && greedy == false && repeat != 0) { opts.placeholder = ""; } //hide placeholder with single non-greedy mask
44
+ var singleMask = $.map(mask.split(""), function (element, index) {
45
+ var outElem = [];
46
+ if (element == opts.escapeChar) {
47
+ escaped = true;
48
+ }
49
+ else if ((element != opts.optionalmarker.start && element != opts.optionalmarker.end) || escaped) {
50
+ var maskdef = opts.definitions[element];
51
+ if (maskdef && !escaped) {
52
+ for (var i = 0; i < maskdef.cardinality; i++) {
53
+ outElem.push(opts.placeholder.charAt((outCount + i) % opts.placeholder.length));
54
+ }
55
+ } else {
56
+ outElem.push(element);
57
+ escaped = false;
58
+ }
59
+ outCount += outElem.length;
60
+ return outElem;
61
+ }
62
+ });
63
+
64
+ //allocate repetitions
65
+ var repeatedMask = singleMask.slice();
66
+ for (var i = 1; i < repeat && greedy; i++) {
67
+ repeatedMask = repeatedMask.concat(singleMask.slice());
68
+ }
69
+
70
+ return { "mask": repeatedMask, "repeat": repeat, "greedy": greedy };
71
+ }
72
+ //test definition => {fn: RegExp/function, cardinality: int, optionality: bool, newBlockMarker: bool, offset: int, casing: null/upper/lower, def: definitionSymbol}
73
+ function getTestingChain(mask) {
74
+ if (opts.numericInput) {
75
+ mask = mask.split('').reverse().join('');
76
+ }
77
+ var isOptional = false, escaped = false;
78
+ var newBlockMarker = false; //indicates wheter the begin/ending of a block should be indicated
79
+
80
+ return $.map(mask.split(""), function (element, index) {
81
+ var outElem = [];
82
+
83
+ if (element == opts.escapeChar) {
84
+ escaped = true;
85
+ } else if (element == opts.optionalmarker.start && !escaped) {
86
+ isOptional = true;
87
+ newBlockMarker = true;
88
+ }
89
+ else if (element == opts.optionalmarker.end && !escaped) {
90
+ isOptional = false;
91
+ newBlockMarker = true;
92
+ }
93
+ else {
94
+ var maskdef = opts.definitions[element];
95
+ if (maskdef && !escaped) {
96
+ var prevalidators = maskdef["prevalidator"], prevalidatorsL = prevalidators ? prevalidators.length : 0;
97
+ for (var i = 1; i < maskdef.cardinality; i++) {
98
+ var prevalidator = prevalidatorsL >= i ? prevalidators[i - 1] : [], validator = prevalidator["validator"], cardinality = prevalidator["cardinality"];
99
+ outElem.push({ fn: validator ? typeof validator == 'string' ? new RegExp(validator) : new function () { this.test = validator; } : new RegExp("."), cardinality: cardinality ? cardinality : 1, optionality: isOptional, newBlockMarker: isOptional == true ? newBlockMarker : false, offset: 0, casing: maskdef["casing"], def: maskdef["definitionSymbol"] || element });
100
+ if (isOptional == true) //reset newBlockMarker
101
+ newBlockMarker = false;
102
+ }
103
+ outElem.push({ fn: maskdef.validator ? typeof maskdef.validator == 'string' ? new RegExp(maskdef.validator) : new function () { this.test = maskdef.validator; } : new RegExp("."), cardinality: maskdef.cardinality, optionality: isOptional, newBlockMarker: newBlockMarker, offset: 0, casing: maskdef["casing"], def: maskdef["definitionSymbol"] || element });
104
+ } else {
105
+ outElem.push({ fn: null, cardinality: 0, optionality: isOptional, newBlockMarker: newBlockMarker, offset: 0, casing: null, def: element });
106
+ escaped = false;
107
+ }
108
+ //reset newBlockMarker
109
+ newBlockMarker = false;
110
+ return outElem;
111
+ }
112
+ });
113
+ }
114
+ function markOptional(maskPart) { //needed for the clearOptionalTail functionality
115
+ return opts.optionalmarker.start + maskPart + opts.optionalmarker.end;
116
+ }
117
+ function splitFirstOptionalEndPart(maskPart) {
118
+ var optionalStartMarkers = 0, optionalEndMarkers = 0, mpl = maskPart.length;
119
+ for (var i = 0; i < mpl; i++) {
120
+ if (maskPart.charAt(i) == opts.optionalmarker.start) {
121
+ optionalStartMarkers++;
122
+ }
123
+ if (maskPart.charAt(i) == opts.optionalmarker.end) {
124
+ optionalEndMarkers++;
125
+ }
126
+ if (optionalStartMarkers > 0 && optionalStartMarkers == optionalEndMarkers)
127
+ break;
128
+ }
129
+ var maskParts = [maskPart.substring(0, i)];
130
+ if (i < mpl) {
131
+ maskParts.push(maskPart.substring(i + 1, mpl));
132
+ }
133
+ return maskParts;
134
+ }
135
+ function splitFirstOptionalStartPart(maskPart) {
136
+ var mpl = maskPart.length;
137
+ for (var i = 0; i < mpl; i++) {
138
+ if (maskPart.charAt(i) == opts.optionalmarker.start) {
139
+ break;
140
+ }
141
+ }
142
+ var maskParts = [maskPart.substring(0, i)];
143
+ if (i < mpl) {
144
+ maskParts.push(maskPart.substring(i + 1, mpl));
145
+ }
146
+ return maskParts;
147
+ }
148
+ function generateMask(maskPrefix, maskPart, metadata) {
149
+ var maskParts = splitFirstOptionalEndPart(maskPart);
150
+ var newMask, maskTemplate;
151
+
152
+ var masks = splitFirstOptionalStartPart(maskParts[0]);
153
+ if (masks.length > 1) {
154
+ newMask = maskPrefix + masks[0] + markOptional(masks[1]) + (maskParts.length > 1 ? maskParts[1] : "");
155
+ if ($.inArray(newMask, genmasks) == -1 && newMask != "") {
156
+ genmasks.push(newMask);
157
+ maskTemplate = getMaskTemplate(newMask);
158
+ ms.push({
159
+ "mask": newMask,
160
+ "_buffer": maskTemplate["mask"],
161
+ "buffer": maskTemplate["mask"].slice(),
162
+ "tests": getTestingChain(newMask),
163
+ "lastValidPosition": -1,
164
+ "greedy": maskTemplate["greedy"],
165
+ "repeat": maskTemplate["repeat"],
166
+ "metadata": metadata
167
+ });
168
+ }
169
+ newMask = maskPrefix + masks[0] + (maskParts.length > 1 ? maskParts[1] : "");
170
+ if ($.inArray(newMask, genmasks) == -1 && newMask != "") {
171
+ genmasks.push(newMask);
172
+ maskTemplate = getMaskTemplate(newMask);
173
+ ms.push({
174
+ "mask": newMask,
175
+ "_buffer": maskTemplate["mask"],
176
+ "buffer": maskTemplate["mask"].slice(),
177
+ "tests": getTestingChain(newMask),
178
+ "lastValidPosition": -1,
179
+ "greedy": maskTemplate["greedy"],
180
+ "repeat": maskTemplate["repeat"],
181
+ "metadata": metadata
182
+ });
183
+ }
184
+ if (splitFirstOptionalStartPart(masks[1]).length > 1) { //optional contains another optional
185
+ generateMask(maskPrefix + masks[0], masks[1] + maskParts[1], metadata);
186
+ }
187
+ if (maskParts.length > 1 && splitFirstOptionalStartPart(maskParts[1]).length > 1) {
188
+ generateMask(maskPrefix + masks[0] + markOptional(masks[1]), maskParts[1], metadata);
189
+ generateMask(maskPrefix + masks[0], maskParts[1], metadata);
190
+ }
191
+ }
192
+ else {
193
+ newMask = maskPrefix + maskParts;
194
+ if ($.inArray(newMask, genmasks) == -1 && newMask != "") {
195
+ genmasks.push(newMask);
196
+ maskTemplate = getMaskTemplate(newMask);
197
+ ms.push({
198
+ "mask": newMask,
199
+ "_buffer": maskTemplate["mask"],
200
+ "buffer": maskTemplate["mask"].slice(),
201
+ "tests": getTestingChain(newMask),
202
+ "lastValidPosition": -1,
203
+ "greedy": maskTemplate["greedy"],
204
+ "repeat": maskTemplate["repeat"],
205
+ "metadata": metadata
206
+ });
207
+ }
208
+ }
209
+
210
+ }
211
+
212
+ if ($.isFunction(opts.mask)) { //allow mask to be a preprocessing fn - should return a valid mask
213
+ opts.mask = opts.mask.call(this, opts);
214
+ }
215
+ if ($.isArray(opts.mask)) {
216
+ $.each(opts.mask, function (ndx, msk) {
217
+ if (msk["mask"] != undefined) {
218
+ generateMask("", msk["mask"].toString(), msk);
219
+ } else
220
+ generateMask("", msk.toString());
221
+ });
222
+ } else generateMask("", opts.mask.toString());
223
+
224
+ return opts.greedy ? ms : ms.sort(function (a, b) { return a["mask"].length - b["mask"].length; });
225
+ }
226
+
227
+ var msie10 = navigator.userAgent.match(new RegExp("msie 10", "i")) !== null,
228
+ iphone = navigator.userAgent.match(new RegExp("iphone", "i")) !== null,
229
+ android = navigator.userAgent.match(new RegExp("android.*safari.*", "i")) !== null,
230
+ androidchrome = navigator.userAgent.match(new RegExp("android.*chrome.*", "i")) !== null,
231
+ pasteEvent = isInputEventSupported('paste') ? 'paste' : isInputEventSupported('input') ? 'input' : "propertychange";
232
+
233
+
234
+ //masking scope
235
+ //actionObj definition see below
236
+ function maskScope(masksets, activeMasksetIndex, opts, actionObj) {
237
+ var isRTL = false,
238
+ valueOnFocus = getActiveBuffer().join(''),
239
+ $el, chromeValueOnInput,
240
+ skipKeyPressEvent = false, //Safari 5.1.x - modal dialog fires keypress twice workaround
241
+ skipInputEvent = false, //skip when triggered from within inputmask
242
+ ignorable = false;
243
+
244
+
245
+ //maskset helperfunctions
246
+
247
+ function getActiveMaskSet() {
248
+ return masksets[activeMasksetIndex];
249
+ }
250
+
251
+ function getActiveTests() {
252
+ return getActiveMaskSet()['tests'];
253
+ }
254
+
255
+ function getActiveBufferTemplate() {
256
+ return getActiveMaskSet()['_buffer'];
257
+ }
258
+
259
+ function getActiveBuffer() {
260
+ return getActiveMaskSet()['buffer'];
261
+ }
262
+
263
+ function isValid(pos, c, strict) { //strict true ~ no correction or autofill
264
+ strict = strict === true; //always set a value to strict to prevent possible strange behavior in the extensions
265
+
266
+ function _isValid(position, activeMaskset, c, strict) {
267
+ var testPos = determineTestPosition(position), loopend = c ? 1 : 0, chrs = '', buffer = activeMaskset["buffer"];
268
+ for (var i = activeMaskset['tests'][testPos].cardinality; i > loopend; i--) {
269
+ chrs += getBufferElement(buffer, testPos - (i - 1));
270
+ }
271
+
272
+ if (c) {
273
+ chrs += c;
274
+ }
275
+
276
+ //return is false or a json object => { pos: ??, c: ??} or true
277
+ return activeMaskset['tests'][testPos].fn != null ?
278
+ activeMaskset['tests'][testPos].fn.test(chrs, buffer, position, strict, opts)
279
+ : (c == getBufferElement(activeMaskset['_buffer'], position, true) || c == opts.skipOptionalPartCharacter) ?
280
+ { "refresh": true, c: getBufferElement(activeMaskset['_buffer'], position, true), pos: position }
281
+ : false;
282
+ }
283
+
284
+ function PostProcessResults(maskForwards, results) {
285
+ var hasValidActual = false;
286
+ $.each(results, function (ndx, rslt) {
287
+ hasValidActual = $.inArray(rslt["activeMasksetIndex"], maskForwards) == -1 && rslt["result"] !== false;
288
+ if (hasValidActual) return false;
289
+ });
290
+ if (hasValidActual) { //strip maskforwards
291
+ results = $.map(results, function (rslt, ndx) {
292
+ if ($.inArray(rslt["activeMasksetIndex"], maskForwards) == -1) {
293
+ return rslt;
294
+ } else {
295
+ masksets[rslt["activeMasksetIndex"]]["lastValidPosition"] = actualLVP;
296
+ }
297
+ });
298
+ } else { //keep maskforwards with the least forward
299
+ var lowestPos = -1, lowestIndex = -1, rsltValid;
300
+ $.each(results, function (ndx, rslt) {
301
+ if ($.inArray(rslt["activeMasksetIndex"], maskForwards) != -1 && rslt["result"] !== false & (lowestPos == -1 || lowestPos > rslt["result"]["pos"])) {
302
+ lowestPos = rslt["result"]["pos"];
303
+ lowestIndex = rslt["activeMasksetIndex"];
304
+ }
305
+ });
306
+ results = $.map(results, function (rslt, ndx) {
307
+ if ($.inArray(rslt["activeMasksetIndex"], maskForwards) != -1) {
308
+ if (rslt["result"]["pos"] == lowestPos) {
309
+ return rslt;
310
+ } else if (rslt["result"] !== false) {
311
+ for (var i = pos; i < lowestPos; i++) {
312
+ rsltValid = _isValid(i, masksets[rslt["activeMasksetIndex"]], masksets[lowestIndex]["buffer"][i], true);
313
+ if (rsltValid === false) {
314
+ masksets[rslt["activeMasksetIndex"]]["lastValidPosition"] = lowestPos - 1;
315
+ break;
316
+ } else {
317
+ setBufferElement(masksets[rslt["activeMasksetIndex"]]["buffer"], i, masksets[lowestIndex]["buffer"][i], true);
318
+ masksets[rslt["activeMasksetIndex"]]["lastValidPosition"] = i;
319
+ }
320
+ }
321
+ //also check check for the lowestpos with the new input
322
+ rsltValid = _isValid(lowestPos, masksets[rslt["activeMasksetIndex"]], c, true);
323
+ if (rsltValid !== false) {
324
+ setBufferElement(masksets[rslt["activeMasksetIndex"]]["buffer"], lowestPos, c, true);
325
+ masksets[rslt["activeMasksetIndex"]]["lastValidPosition"] = lowestPos;
326
+ }
327
+ //console.log("ndx " + rslt["activeMasksetIndex"] + " validate " + masksets[rslt["activeMasksetIndex"]]["buffer"].join('') + " lv " + masksets[rslt["activeMasksetIndex"]]['lastValidPosition']);
328
+ return rslt;
329
+ }
330
+ }
331
+ });
332
+ }
333
+ return results;
334
+ }
335
+
336
+ if (strict) {
337
+ var result = _isValid(pos, getActiveMaskSet(), c, strict); //only check validity in current mask when validating strict
338
+ if (result === true) {
339
+ result = { "pos": pos }; //always take a possible corrected maskposition into account
340
+ }
341
+ return result;
342
+ }
343
+
344
+ var results = [], result = false, currentActiveMasksetIndex = activeMasksetIndex,
345
+ actualBuffer = getActiveBuffer().slice(), actualLVP = getActiveMaskSet()["lastValidPosition"],
346
+ actualPrevious = seekPrevious(pos),
347
+ maskForwards = [];
348
+ $.each(masksets, function (index, value) {
349
+ if (typeof (value) == "object") {
350
+ activeMasksetIndex = index;
351
+
352
+ var maskPos = pos;
353
+ var lvp = getActiveMaskSet()['lastValidPosition'],
354
+ rsltValid;
355
+ if (lvp == actualLVP) {
356
+ if ((maskPos - actualLVP) > 1) {
357
+ for (var i = lvp == -1 ? 0 : lvp; i < maskPos; i++) {
358
+ rsltValid = _isValid(i, getActiveMaskSet(), actualBuffer[i], true);
359
+ if (rsltValid === false) {
360
+ break;
361
+ } else {
362
+ setBufferElement(getActiveBuffer(), i, actualBuffer[i], true);
363
+ if (rsltValid === true) {
364
+ rsltValid = { "pos": i }; //always take a possible corrected maskposition into account
365
+ }
366
+ var newValidPosition = rsltValid.pos || i;
367
+ if (getActiveMaskSet()['lastValidPosition'] < newValidPosition)
368
+ getActiveMaskSet()['lastValidPosition'] = newValidPosition; //set new position from isValid
369
+ }
370
+ }
371
+ }
372
+ //does the input match on a further position?
373
+ if (!isMask(maskPos) && !_isValid(maskPos, getActiveMaskSet(), c, strict)) {
374
+ var maxForward = seekNext(maskPos) - maskPos;
375
+ for (var fw = 0; fw < maxForward; fw++) {
376
+ if (_isValid(++maskPos, getActiveMaskSet(), c, strict) !== false)
377
+ break;
378
+ }
379
+ maskForwards.push(activeMasksetIndex);
380
+ //console.log('maskforward ' + activeMasksetIndex + " pos " + pos + " maskPos " + maskPos);
381
+ }
382
+ }
383
+
384
+ if (getActiveMaskSet()['lastValidPosition'] >= actualLVP || activeMasksetIndex == currentActiveMasksetIndex) {
385
+ if (maskPos >= 0 && maskPos < getMaskLength()) {
386
+ result = _isValid(maskPos, getActiveMaskSet(), c, strict);
387
+ if (result !== false) {
388
+ if (result === true) {
389
+ result = { "pos": maskPos }; //always take a possible corrected maskposition into account
390
+ }
391
+ var newValidPosition = result.pos || maskPos;
392
+ if (getActiveMaskSet()['lastValidPosition'] < newValidPosition)
393
+ getActiveMaskSet()['lastValidPosition'] = newValidPosition; //set new position from isValid
394
+ }
395
+ //console.log("pos " + pos + " ndx " + activeMasksetIndex + " validate " + getActiveBuffer().join('') + " lv " + getActiveMaskSet()['lastValidPosition']);
396
+ results.push({ "activeMasksetIndex": index, "result": result });
397
+ }
398
+ }
399
+ }
400
+ });
401
+ activeMasksetIndex = currentActiveMasksetIndex; //reset activeMasksetIndex
402
+
403
+ return PostProcessResults(maskForwards, results); //return results of the multiple mask validations
404
+ }
405
+
406
+ function determineActiveMasksetIndex() {
407
+ var currentMasksetIndex = activeMasksetIndex,
408
+ highestValid = { "activeMasksetIndex": 0, "lastValidPosition": -1, "next": -1 };
409
+ $.each(masksets, function (index, value) {
410
+ if (typeof (value) == "object") {
411
+ activeMasksetIndex = index;
412
+ if (getActiveMaskSet()['lastValidPosition'] > highestValid['lastValidPosition']) {
413
+ highestValid["activeMasksetIndex"] = index;
414
+ highestValid["lastValidPosition"] = getActiveMaskSet()['lastValidPosition'];
415
+ highestValid["next"] = seekNext(getActiveMaskSet()['lastValidPosition']);
416
+ } else if (getActiveMaskSet()['lastValidPosition'] == highestValid['lastValidPosition'] &&
417
+ (highestValid['next'] == -1 || highestValid['next'] > seekNext(getActiveMaskSet()['lastValidPosition']))) {
418
+ highestValid["activeMasksetIndex"] = index;
419
+ highestValid["lastValidPosition"] = getActiveMaskSet()['lastValidPosition'];
420
+ highestValid["next"] = seekNext(getActiveMaskSet()['lastValidPosition']);
421
+ }
422
+ }
423
+ });
424
+
425
+ activeMasksetIndex = highestValid["lastValidPosition"] != -1 && masksets[currentMasksetIndex]["lastValidPosition"] == highestValid["lastValidPosition"] ? currentMasksetIndex : highestValid["activeMasksetIndex"];
426
+ if (currentMasksetIndex != activeMasksetIndex) {
427
+ clearBuffer(getActiveBuffer(), seekNext(highestValid["lastValidPosition"]), getMaskLength());
428
+ getActiveMaskSet()["writeOutBuffer"] = true;
429
+ }
430
+ $el.data('_inputmask')['activeMasksetIndex'] = activeMasksetIndex; //store the activeMasksetIndex
431
+ }
432
+
433
+ function isMask(pos) {
434
+ var testPos = determineTestPosition(pos);
435
+ var test = getActiveTests()[testPos];
436
+
437
+ return test != undefined ? test.fn : false;
438
+ }
439
+
440
+ function determineTestPosition(pos) {
441
+ return pos % getActiveTests().length;
442
+ }
443
+
444
+ function getMaskLength() {
445
+ return opts.getMaskLength(getActiveBufferTemplate(), getActiveMaskSet()['greedy'], getActiveMaskSet()['repeat'], getActiveBuffer(), opts);
446
+ }
447
+
448
+ //pos: from position
449
+
450
+ function seekNext(pos) {
451
+ var maskL = getMaskLength();
452
+ if (pos >= maskL) return maskL;
453
+ var position = pos;
454
+ while (++position < maskL && !isMask(position)) {
455
+ }
456
+ return position;
457
+ }
458
+
459
+ //pos: from position
460
+
461
+ function seekPrevious(pos) {
462
+ var position = pos;
463
+ if (position <= 0) return 0;
464
+
465
+ while (--position > 0 && !isMask(position)) {
466
+ }
467
+ ;
468
+ return position;
469
+ }
470
+
471
+ function setBufferElement(buffer, position, element, autoPrepare) {
472
+ if (autoPrepare) position = prepareBuffer(buffer, position);
473
+
474
+ var test = getActiveTests()[determineTestPosition(position)];
475
+ var elem = element;
476
+ if (elem != undefined && test != undefined) {
477
+ switch (test.casing) {
478
+ case "upper":
479
+ elem = element.toUpperCase();
480
+ break;
481
+ case "lower":
482
+ elem = element.toLowerCase();
483
+ break;
484
+ }
485
+ }
486
+
487
+ buffer[position] = elem;
488
+ }
489
+
490
+ function getBufferElement(buffer, position, autoPrepare) {
491
+ if (autoPrepare) position = prepareBuffer(buffer, position);
492
+ return buffer[position];
493
+ }
494
+
495
+ //needed to handle the non-greedy mask repetitions
496
+
497
+ function prepareBuffer(buffer, position) {
498
+ var j;
499
+ while (buffer[position] == undefined && buffer.length < getMaskLength()) {
500
+ j = 0;
501
+ while (getActiveBufferTemplate()[j] !== undefined) { //add a new buffer
502
+ buffer.push(getActiveBufferTemplate()[j++]);
503
+ }
504
+ }
505
+
506
+ return position;
507
+ }
508
+
509
+ function writeBuffer(input, buffer, caretPos) {
510
+ input._valueSet(buffer.join(''));
511
+ if (caretPos != undefined) {
512
+ caret(input, caretPos);
513
+ }
514
+ }
515
+
516
+ function clearBuffer(buffer, start, end, stripNomasks) {
517
+ for (var i = start, maskL = getMaskLength() ; i < end && i < maskL; i++) {
518
+ if (stripNomasks === true) {
519
+ if (!isMask(i))
520
+ setBufferElement(buffer, i, "");
521
+ } else
522
+ setBufferElement(buffer, i, getBufferElement(getActiveBufferTemplate().slice(), i, true));
523
+ }
524
+ }
525
+
526
+ function setReTargetPlaceHolder(buffer, pos) {
527
+ var testPos = determineTestPosition(pos);
528
+ setBufferElement(buffer, pos, getBufferElement(getActiveBufferTemplate(), testPos));
529
+ }
530
+
531
+ function getPlaceHolder(pos) {
532
+ return opts.placeholder.charAt(pos % opts.placeholder.length);
533
+ }
534
+
535
+ function checkVal(input, writeOut, strict, nptvl, intelliCheck) {
536
+ var inputValue = nptvl != undefined ? nptvl.slice() : truncateInput(input._valueGet()).split('');
537
+
538
+ $.each(masksets, function (ndx, ms) {
539
+ if (typeof (ms) == "object") {
540
+ ms["buffer"] = ms["_buffer"].slice();
541
+ ms["lastValidPosition"] = -1;
542
+ ms["p"] = -1;
543
+ }
544
+ });
545
+ if (strict !== true) activeMasksetIndex = 0;
546
+ if (writeOut) input._valueSet(""); //initial clear
547
+ var ml = getMaskLength();
548
+ $.each(inputValue, function (ndx, charCode) {
549
+ if (intelliCheck === true) {
550
+ var p = getActiveMaskSet()["p"], lvp = p == -1 ? p : seekPrevious(p),
551
+ pos = lvp == -1 ? ndx : seekNext(lvp);
552
+ if ($.inArray(charCode, getActiveBufferTemplate().slice(lvp + 1, pos)) == -1) {
553
+ keypressEvent.call(input, undefined, true, charCode.charCodeAt(0), writeOut, strict, ndx);
554
+ }
555
+ } else {
556
+ keypressEvent.call(input, undefined, true, charCode.charCodeAt(0), writeOut, strict, ndx);
557
+ }
558
+ });
559
+
560
+ if (strict === true && getActiveMaskSet()["p"] != -1) {
561
+ getActiveMaskSet()["lastValidPosition"] = seekPrevious(getActiveMaskSet()["p"]);
562
+ }
563
+ }
564
+
565
+ function escapeRegex(str) {
566
+ return $.inputmask.escapeRegex.call(this, str);
567
+ }
568
+
569
+ function truncateInput(inputValue) {
570
+ return inputValue.replace(new RegExp("(" + escapeRegex(getActiveBufferTemplate().join('')) + ")*$"), "");
571
+ }
572
+
573
+ function clearOptionalTail(input) {
574
+ var buffer = getActiveBuffer(), tmpBuffer = buffer.slice(), testPos, pos;
575
+ for (var pos = tmpBuffer.length - 1; pos >= 0; pos--) {
576
+ var testPos = determineTestPosition(pos);
577
+ if (getActiveTests()[testPos].optionality) {
578
+ if (!isMask(pos) || !isValid(pos, buffer[pos], true))
579
+ tmpBuffer.pop();
580
+ else break;
581
+ } else break;
582
+ }
583
+ writeBuffer(input, tmpBuffer);
584
+ }
585
+
586
+ function unmaskedvalue($input, skipDatepickerCheck) {
587
+ if (getActiveTests() && (skipDatepickerCheck === true || !$input.hasClass('hasDatepicker'))) {
588
+ //checkVal(input, false, true);
589
+ var umValue = $.map(getActiveBuffer(), function (element, index) {
590
+ return isMask(index) && isValid(index, element, true) ? element : null;
591
+ });
592
+ var unmaskedValue = (isRTL ? umValue.reverse() : umValue).join('');
593
+ return opts.onUnMask != undefined ? opts.onUnMask.call(this, getActiveBuffer().join(''), unmaskedValue) : unmaskedValue;
594
+ } else {
595
+ return $input[0]._valueGet();
596
+ }
597
+ }
598
+
599
+ function TranslatePosition(pos) {
600
+ if (isRTL && typeof pos == 'number' && (!opts.greedy || opts.placeholder != "")) {
601
+ var bffrLght = getActiveBuffer().length;
602
+ pos = bffrLght - pos;
603
+ }
604
+ return pos;
605
+ }
606
+
607
+ function caret(input, begin, end) {
608
+ var npt = input.jquery && input.length > 0 ? input[0] : input, range;
609
+ if (typeof begin == 'number') {
610
+ begin = TranslatePosition(begin);
611
+ end = TranslatePosition(end);
612
+ if (!$(input).is(':visible')) {
613
+ return;
614
+ }
615
+ end = (typeof end == 'number') ? end : begin;
616
+ npt.scrollLeft = npt.scrollWidth;
617
+ if (opts.insertMode == false && begin == end) end++; //set visualization for insert/overwrite mode
618
+ if (npt.setSelectionRange) {
619
+ npt.selectionStart = begin;
620
+ npt.selectionEnd = android ? begin : end;
621
+
622
+ } else if (npt.createTextRange) {
623
+ range = npt.createTextRange();
624
+ range.collapse(true);
625
+ range.moveEnd('character', end);
626
+ range.moveStart('character', begin);
627
+ range.select();
628
+ }
629
+ } else {
630
+ if (!$(input).is(':visible')) {
631
+ return { "begin": 0, "end": 0 };
632
+ }
633
+ if (npt.setSelectionRange) {
634
+ begin = npt.selectionStart;
635
+ end = npt.selectionEnd;
636
+ } else if (document.selection && document.selection.createRange) {
637
+ range = document.selection.createRange();
638
+ begin = 0 - range.duplicate().moveStart('character', -100000);
639
+ end = begin + range.text.length;
640
+ }
641
+ begin = TranslatePosition(begin);
642
+ end = TranslatePosition(end);
643
+ return { "begin": begin, "end": end };
644
+ }
645
+ }
646
+
647
+ function isComplete(buffer) { //return true / false / undefined (repeat *)
648
+ if (opts.repeat == "*") return undefined;
649
+ var complete = false, highestValidPosition = 0, currentActiveMasksetIndex = activeMasksetIndex;
650
+ $.each(masksets, function (ndx, ms) {
651
+ if (typeof (ms) == "object") {
652
+ activeMasksetIndex = ndx;
653
+ var aml = seekPrevious(getMaskLength());
654
+ if (ms["lastValidPosition"] >= highestValidPosition && ms["lastValidPosition"] == aml) {
655
+ var msComplete = true;
656
+ for (var i = 0; i <= aml; i++) {
657
+ var mask = isMask(i), testPos = determineTestPosition(i);
658
+ if ((mask && (buffer[i] == undefined || buffer[i] == getPlaceHolder(i))) || (!mask && buffer[i] != getActiveBufferTemplate()[testPos])) {
659
+ msComplete = false;
660
+ break;
661
+ }
662
+ }
663
+ complete = complete || msComplete;
664
+ if (complete) //break loop
665
+ return false;
666
+ }
667
+ highestValidPosition = ms["lastValidPosition"];
668
+ }
669
+ });
670
+ activeMasksetIndex = currentActiveMasksetIndex; //reset activeMaskset
671
+ return complete;
672
+ }
673
+
674
+ function isSelection(begin, end) {
675
+ return isRTL ? (begin - end) > 1 || ((begin - end) == 1 && opts.insertMode) :
676
+ (end - begin) > 1 || ((end - begin) == 1 && opts.insertMode);
677
+ }
678
+
679
+
680
+ //private functions
681
+ function installEventRuler(npt) {
682
+ var events = $._data(npt).events;
683
+
684
+ $.each(events, function (eventType, eventHandlers) {
685
+ $.each(eventHandlers, function (ndx, eventHandler) {
686
+ if (eventHandler.namespace == "inputmask") {
687
+ if (eventHandler.type != "setvalue") {
688
+ var handler = eventHandler.handler;
689
+ eventHandler.handler = function (e) {
690
+ if (this.readOnly || this.disabled)
691
+ e.preventDefault;
692
+ else
693
+ return handler.apply(this, arguments);
694
+ };
695
+ }
696
+ }
697
+ });
698
+ });
699
+ }
700
+
701
+ function patchValueProperty(npt) {
702
+ var valueProperty;
703
+ if (Object.getOwnPropertyDescriptor)
704
+ valueProperty = Object.getOwnPropertyDescriptor(npt, "value");
705
+ if (valueProperty && valueProperty.get) {
706
+ if (!npt._valueGet) {
707
+ var valueGet = valueProperty.get;
708
+ var valueSet = valueProperty.set;
709
+ npt._valueGet = function () {
710
+ return isRTL ? valueGet.call(this).split('').reverse().join('') : valueGet.call(this);
711
+ };
712
+ npt._valueSet = function (value) {
713
+ valueSet.call(this, isRTL ? value.split('').reverse().join('') : value);
714
+ };
715
+
716
+ Object.defineProperty(npt, "value", {
717
+ get: function () {
718
+ var $self = $(this), inputData = $(this).data('_inputmask'), masksets = inputData['masksets'],
719
+ activeMasksetIndex = inputData['activeMasksetIndex'];
720
+ return inputData && inputData['opts'].autoUnmask ? $self.inputmask('unmaskedvalue') : valueGet.call(this) != masksets[activeMasksetIndex]['_buffer'].join('') ? valueGet.call(this) : '';
721
+ },
722
+ set: function (value) {
723
+ valueSet.call(this, value);
724
+ $(this).triggerHandler('setvalue.inputmask');
725
+ }
726
+ });
727
+ }
728
+ } else if (document.__lookupGetter__ && npt.__lookupGetter__("value")) {
729
+ if (!npt._valueGet) {
730
+ var valueGet = npt.__lookupGetter__("value");
731
+ var valueSet = npt.__lookupSetter__("value");
732
+ npt._valueGet = function () {
733
+ return isRTL ? valueGet.call(this).split('').reverse().join('') : valueGet.call(this);
734
+ };
735
+ npt._valueSet = function (value) {
736
+ valueSet.call(this, isRTL ? value.split('').reverse().join('') : value);
737
+ };
738
+
739
+ npt.__defineGetter__("value", function () {
740
+ var $self = $(this), inputData = $(this).data('_inputmask'), masksets = inputData['masksets'],
741
+ activeMasksetIndex = inputData['activeMasksetIndex'];
742
+ return inputData && inputData['opts'].autoUnmask ? $self.inputmask('unmaskedvalue') : valueGet.call(this) != masksets[activeMasksetIndex]['_buffer'].join('') ? valueGet.call(this) : '';
743
+ });
744
+ npt.__defineSetter__("value", function (value) {
745
+ valueSet.call(this, value);
746
+ $(this).triggerHandler('setvalue.inputmask');
747
+ });
748
+ }
749
+ } else {
750
+ if (!npt._valueGet) {
751
+ npt._valueGet = function () { return isRTL ? this.value.split('').reverse().join('') : this.value; };
752
+ npt._valueSet = function (value) { this.value = isRTL ? value.split('').reverse().join('') : value; };
753
+ }
754
+ if ($.valHooks.text == undefined || $.valHooks.text.inputmaskpatch != true) {
755
+ var valueGet = $.valHooks.text && $.valHooks.text.get ? $.valHooks.text.get : function (elem) { return elem.value; };
756
+ var valueSet = $.valHooks.text && $.valHooks.text.set ? $.valHooks.text.set : function (elem, value) {
757
+ elem.value = value;
758
+ return elem;
759
+ };
760
+
761
+ jQuery.extend($.valHooks, {
762
+ text: {
763
+ get: function (elem) {
764
+ var $elem = $(elem);
765
+ if ($elem.data('_inputmask')) {
766
+ if ($elem.data('_inputmask')['opts'].autoUnmask)
767
+ return $elem.inputmask('unmaskedvalue');
768
+ else {
769
+ var result = valueGet(elem),
770
+ inputData = $elem.data('_inputmask'), masksets = inputData['masksets'],
771
+ activeMasksetIndex = inputData['activeMasksetIndex'];
772
+ return result != masksets[activeMasksetIndex]['_buffer'].join('') ? result : '';
773
+ }
774
+ } else return valueGet(elem);
775
+ },
776
+ set: function (elem, value) {
777
+ var $elem = $(elem);
778
+ var result = valueSet(elem, value);
779
+ if ($elem.data('_inputmask')) $elem.triggerHandler('setvalue.inputmask');
780
+ return result;
781
+ },
782
+ inputmaskpatch: true
783
+ }
784
+ });
785
+ }
786
+ }
787
+ }
788
+
789
+ //shift chars to left from start to end and put c at end position if defined
790
+
791
+ function shiftL(start, end, c, maskJumps) {
792
+ var buffer = getActiveBuffer();
793
+ if (maskJumps !== false) //jumping over nonmask position
794
+ while (!isMask(start) && start - 1 >= 0) start--;
795
+ for (var i = start; i < end && i < getMaskLength() ; i++) {
796
+ if (isMask(i)) {
797
+ setReTargetPlaceHolder(buffer, i);
798
+ var j = seekNext(i);
799
+ var p = getBufferElement(buffer, j);
800
+ if (p != getPlaceHolder(j)) {
801
+ if (j < getMaskLength() && isValid(i, p, true) !== false && getActiveTests()[determineTestPosition(i)].def == getActiveTests()[determineTestPosition(j)].def) {
802
+ setBufferElement(buffer, i, p, true);
803
+ } else {
804
+ if (isMask(i))
805
+ break;
806
+ }
807
+ }
808
+ } else {
809
+ setReTargetPlaceHolder(buffer, i);
810
+ }
811
+ }
812
+ if (c != undefined)
813
+ setBufferElement(buffer, seekPrevious(end), c);
814
+
815
+ if (getActiveMaskSet()["greedy"] == false) {
816
+ var trbuffer = truncateInput(buffer.join('')).split('');
817
+ buffer.length = trbuffer.length;
818
+ for (var i = 0, bl = buffer.length; i < bl; i++) {
819
+ buffer[i] = trbuffer[i];
820
+ }
821
+ if (buffer.length == 0) getActiveMaskSet()["buffer"] = getActiveBufferTemplate().slice();
822
+ }
823
+ return start; //return the used start position
824
+ }
825
+
826
+ function shiftR(start, end, c) {
827
+ var buffer = getActiveBuffer();
828
+ if (getBufferElement(buffer, start, true) != getPlaceHolder(start)) {
829
+ for (var i = seekPrevious(end) ; i > start && i >= 0; i--) {
830
+ if (isMask(i)) {
831
+ var j = seekPrevious(i);
832
+ var t = getBufferElement(buffer, j);
833
+ if (t != getPlaceHolder(j)) {
834
+ if (isValid(j, t, true) !== false && getActiveTests()[determineTestPosition(i)].def == getActiveTests()[determineTestPosition(j)].def) {
835
+ setBufferElement(buffer, i, t, true);
836
+ setReTargetPlaceHolder(buffer, j);
837
+ } //else break;
838
+ }
839
+ } else
840
+ setReTargetPlaceHolder(buffer, i);
841
+ }
842
+ }
843
+ if (c != undefined && getBufferElement(buffer, start) == getPlaceHolder(start))
844
+ setBufferElement(buffer, start, c);
845
+ var lengthBefore = buffer.length;
846
+ if (getActiveMaskSet()["greedy"] == false) {
847
+ var trbuffer = truncateInput(buffer.join('')).split('');
848
+ buffer.length = trbuffer.length;
849
+ for (var i = 0, bl = buffer.length; i < bl; i++) {
850
+ buffer[i] = trbuffer[i];
851
+ }
852
+ if (buffer.length == 0) getActiveMaskSet()["buffer"] = getActiveBufferTemplate().slice();
853
+ }
854
+ return end - (lengthBefore - buffer.length); //return new start position
855
+ }
856
+
857
+ ;
858
+
859
+
860
+ function HandleRemove(input, k, pos) {
861
+ if (opts.numericInput || isRTL) {
862
+ switch (k) {
863
+ case opts.keyCode.BACKSPACE:
864
+ k = opts.keyCode.DELETE;
865
+ break;
866
+ case opts.keyCode.DELETE:
867
+ k = opts.keyCode.BACKSPACE;
868
+ break;
869
+ }
870
+ if (isRTL) {
871
+ var pend = pos.end;
872
+ pos.end = pos.begin;
873
+ pos.begin = pend;
874
+ }
875
+ }
876
+
877
+ var isSelection = true;
878
+ if (pos.begin == pos.end) {
879
+ var posBegin = k == opts.keyCode.BACKSPACE ? pos.begin - 1 : pos.begin;
880
+ if (opts.isNumeric && opts.radixPoint != "" && getActiveBuffer()[posBegin] == opts.radixPoint) {
881
+ pos.begin = (getActiveBuffer().length - 1 == posBegin) /* radixPoint is latest? delete it */ ? pos.begin : k == opts.keyCode.BACKSPACE ? posBegin : seekNext(posBegin);
882
+ pos.end = pos.begin;
883
+ }
884
+ isSelection = false;
885
+ if (k == opts.keyCode.BACKSPACE)
886
+ pos.begin--;
887
+ else if (k == opts.keyCode.DELETE)
888
+ pos.end++;
889
+ } else if (pos.end - pos.begin == 1 && !opts.insertMode) {
890
+ isSelection = false;
891
+ if (k == opts.keyCode.BACKSPACE)
892
+ pos.begin--;
893
+ }
894
+
895
+ clearBuffer(getActiveBuffer(), pos.begin, pos.end);
896
+
897
+ var ml = getMaskLength();
898
+ if (opts.greedy == false) {
899
+ shiftL(pos.begin, ml, undefined, !isRTL && (k == opts.keyCode.BACKSPACE && !isSelection));
900
+ } else {
901
+ var newpos = pos.begin;
902
+ for (var i = pos.begin; i < pos.end; i++) { //seeknext to skip placeholders at start in selection
903
+ if (isMask(i) || !isSelection)
904
+ newpos = shiftL(pos.begin, ml, undefined, !isRTL && (k == opts.keyCode.BACKSPACE && !isSelection));
905
+ }
906
+ if (!isSelection) pos.begin = newpos;
907
+ }
908
+ var firstMaskPos = seekNext(-1);
909
+ clearBuffer(getActiveBuffer(), pos.begin, pos.end, true);
910
+ checkVal(input, false, masksets[1] == undefined || firstMaskPos >= pos.end, getActiveBuffer());
911
+ if (getActiveMaskSet()['lastValidPosition'] < firstMaskPos) {
912
+ getActiveMaskSet()["lastValidPosition"] = -1;
913
+ getActiveMaskSet()["p"] = firstMaskPos;
914
+ } else {
915
+ getActiveMaskSet()["p"] = pos.begin;
916
+ }
917
+ }
918
+
919
+ function keydownEvent(e) {
920
+ //Safari 5.1.x - modal dialog fires keypress twice workaround
921
+ skipKeyPressEvent = false;
922
+ var input = this, $input = $(input), k = e.keyCode, pos = caret(input);
923
+
924
+ //backspace, delete, and escape get special treatment
925
+ if (k == opts.keyCode.BACKSPACE || k == opts.keyCode.DELETE || (iphone && k == 127) || e.ctrlKey && k == 88) { //backspace/delete
926
+ e.preventDefault(); //stop default action but allow propagation
927
+ if (k == 88) valueOnFocus = getActiveBuffer().join('');
928
+ HandleRemove(input, k, pos);
929
+ determineActiveMasksetIndex();
930
+ writeBuffer(input, getActiveBuffer(), getActiveMaskSet()["p"]);
931
+ if (input._valueGet() == getActiveBufferTemplate().join(''))
932
+ $input.trigger('cleared');
933
+
934
+ if (opts.showTooltip) { //update tooltip
935
+ $input.prop("title", getActiveMaskSet()["mask"]);
936
+ }
937
+ } else if (k == opts.keyCode.END || k == opts.keyCode.PAGE_DOWN) { //when END or PAGE_DOWN pressed set position at lastmatch
938
+ setTimeout(function () {
939
+ var caretPos = seekNext(getActiveMaskSet()["lastValidPosition"]);
940
+ if (!opts.insertMode && caretPos == getMaskLength() && !e.shiftKey) caretPos--;
941
+ caret(input, e.shiftKey ? pos.begin : caretPos, caretPos);
942
+ }, 0);
943
+ } else if ((k == opts.keyCode.HOME && !e.shiftKey) || k == opts.keyCode.PAGE_UP) { //Home or page_up
944
+ caret(input, 0, e.shiftKey ? pos.begin : 0);
945
+ } else if (k == opts.keyCode.ESCAPE || (k == 90 && e.ctrlKey)) { //escape && undo
946
+ checkVal(input, true, false, valueOnFocus.split(''));
947
+ $input.click();
948
+ } else if (k == opts.keyCode.INSERT && !(e.shiftKey || e.ctrlKey)) { //insert
949
+ opts.insertMode = !opts.insertMode;
950
+ caret(input, !opts.insertMode && pos.begin == getMaskLength() ? pos.begin - 1 : pos.begin);
951
+ } else if (opts.insertMode == false && !e.shiftKey) {
952
+ if (k == opts.keyCode.RIGHT) {
953
+ setTimeout(function () {
954
+ var caretPos = caret(input);
955
+ caret(input, caretPos.begin);
956
+ }, 0);
957
+ } else if (k == opts.keyCode.LEFT) {
958
+ setTimeout(function () {
959
+ var caretPos = caret(input);
960
+ caret(input, caretPos.begin - 1);
961
+ }, 0);
962
+ }
963
+ }
964
+
965
+ var currentCaretPos = caret(input);
966
+ if (opts.onKeyDown.call(this, e, getActiveBuffer(), opts) === true) //extra stuff to execute on keydown
967
+ caret(input, currentCaretPos.begin, currentCaretPos.end);
968
+ ignorable = $.inArray(k, opts.ignorables) != -1;
969
+ }
970
+
971
+
972
+ function keypressEvent(e, checkval, k, writeOut, strict, ndx) {
973
+ //Safari 5.1.x - modal dialog fires keypress twice workaround
974
+ if (k == undefined && skipKeyPressEvent) return false;
975
+ skipKeyPressEvent = true;
976
+
977
+ var input = this, $input = $(input);
978
+
979
+ e = e || window.event;
980
+ var k = checkval ? k : (e.which || e.charCode || e.keyCode);
981
+
982
+ if (checkval !== true && (!(e.ctrlKey && e.altKey) && (e.ctrlKey || e.metaKey || ignorable))) {
983
+ return true;
984
+ } else {
985
+ if (k) {
986
+ //special treat the decimal separator
987
+ if (checkval !== true && k == 46 && e.shiftKey == false && opts.radixPoint == ",") k = 44;
988
+
989
+ var pos, results, result, c = String.fromCharCode(k);
990
+ if (checkval) {
991
+ var pcaret = strict ? ndx : getActiveMaskSet()["lastValidPosition"] + 1;
992
+ pos = { begin: pcaret, end: pcaret };
993
+ } else {
994
+ pos = caret(input);
995
+ }
996
+
997
+ //should we clear a possible selection??
998
+ var isSlctn = isSelection(pos.begin, pos.end), redetermineLVP = false,
999
+ initialIndex = activeMasksetIndex;
1000
+ if (isSlctn) {
1001
+ activeMasksetIndex = initialIndex;
1002
+ $.each(masksets, function (ndx, lmnt) { //init undobuffer for recovery when not valid
1003
+ if (typeof (lmnt) == "object") {
1004
+ activeMasksetIndex = ndx;
1005
+ getActiveMaskSet()["undoBuffer"] = getActiveBuffer().join('');
1006
+ }
1007
+ });
1008
+ HandleRemove(input, opts.keyCode.DELETE, pos);
1009
+ if (!opts.insertMode) { //preserve some space
1010
+ $.each(masksets, function (ndx, lmnt) {
1011
+ if (typeof (lmnt) == "object") {
1012
+ activeMasksetIndex = ndx;
1013
+ shiftR(pos.begin, getMaskLength());
1014
+ getActiveMaskSet()["lastValidPosition"] = seekNext(getActiveMaskSet()["lastValidPosition"]);
1015
+ }
1016
+ });
1017
+ }
1018
+ activeMasksetIndex = initialIndex; //restore index
1019
+ }
1020
+
1021
+ var radixPosition = getActiveBuffer().join('').indexOf(opts.radixPoint);
1022
+ if (opts.isNumeric && checkval !== true && radixPosition != -1) {
1023
+ if (opts.greedy && pos.begin <= radixPosition) {
1024
+ pos.begin = seekPrevious(pos.begin);
1025
+ pos.end = pos.begin;
1026
+ } else if (c == opts.radixPoint) {
1027
+ pos.begin = radixPosition;
1028
+ pos.end = pos.begin;
1029
+ }
1030
+ }
1031
+
1032
+
1033
+ var p = pos.begin;
1034
+ results = isValid(p, c, strict);
1035
+ if (strict === true) results = [{ "activeMasksetIndex": activeMasksetIndex, "result": results }];
1036
+ var minimalForwardPosition = -1;
1037
+ $.each(results, function (index, result) {
1038
+ activeMasksetIndex = result["activeMasksetIndex"];
1039
+ getActiveMaskSet()["writeOutBuffer"] = true;
1040
+ var np = result["result"];
1041
+ if (np !== false) {
1042
+ var refresh = false, buffer = getActiveBuffer();
1043
+ if (np !== true) {
1044
+ refresh = np["refresh"]; //only rewrite buffer from isValid
1045
+ p = np.pos != undefined ? np.pos : p; //set new position from isValid
1046
+ c = np.c != undefined ? np.c : c; //set new char from isValid
1047
+ }
1048
+ if (refresh !== true) {
1049
+ if (opts.insertMode == true) {
1050
+ var lastUnmaskedPosition = getMaskLength();
1051
+ var bfrClone = buffer.slice();
1052
+ while (getBufferElement(bfrClone, lastUnmaskedPosition, true) != getPlaceHolder(lastUnmaskedPosition) && lastUnmaskedPosition >= p) {
1053
+ lastUnmaskedPosition = lastUnmaskedPosition == 0 ? -1 : seekPrevious(lastUnmaskedPosition);
1054
+ }
1055
+ if (lastUnmaskedPosition >= p) {
1056
+ shiftR(p, getMaskLength(), c);
1057
+ //shift the lvp if needed
1058
+ var lvp = getActiveMaskSet()["lastValidPosition"], nlvp = seekNext(lvp);
1059
+ if (nlvp != getMaskLength() && lvp >= p && (getBufferElement(getActiveBuffer(), nlvp, true) != getPlaceHolder(nlvp))) {
1060
+ getActiveMaskSet()["lastValidPosition"] = nlvp;
1061
+ }
1062
+ } else getActiveMaskSet()["writeOutBuffer"] = false;
1063
+ } else setBufferElement(buffer, p, c, true);
1064
+ if (minimalForwardPosition == -1 || minimalForwardPosition > seekNext(p)) {
1065
+ minimalForwardPosition = seekNext(p);
1066
+ }
1067
+ } else if (!strict) {
1068
+ var nextPos = p < getMaskLength() ? p + 1 : p;
1069
+ if (minimalForwardPosition == -1 || minimalForwardPosition > nextPos) {
1070
+ minimalForwardPosition = nextPos;
1071
+ }
1072
+ }
1073
+ if (minimalForwardPosition > getActiveMaskSet()["p"])
1074
+ getActiveMaskSet()["p"] = minimalForwardPosition; //needed for checkval strict
1075
+ }
1076
+ });
1077
+
1078
+ if (strict !== true) {
1079
+ activeMasksetIndex = initialIndex;
1080
+ determineActiveMasksetIndex();
1081
+ }
1082
+ if (writeOut !== false) {
1083
+ $.each(results, function (ndx, rslt) {
1084
+ if (rslt["activeMasksetIndex"] == activeMasksetIndex) {
1085
+ result = rslt;
1086
+ return false;
1087
+ }
1088
+ });
1089
+ if (result != undefined) {
1090
+ var self = this;
1091
+ setTimeout(function () { opts.onKeyValidation.call(self, result["result"], opts); }, 0);
1092
+ if (getActiveMaskSet()["writeOutBuffer"] && result["result"] !== false) {
1093
+ var buffer = getActiveBuffer();
1094
+
1095
+ var newCaretPosition;
1096
+ if (checkval) {
1097
+ newCaretPosition = undefined;
1098
+ } else if (opts.numericInput) {
1099
+ if (p > radixPosition) {
1100
+ newCaretPosition = seekPrevious(minimalForwardPosition);
1101
+ } else if (c == opts.radixPoint) {
1102
+ newCaretPosition = minimalForwardPosition - 1;
1103
+ } else newCaretPosition = seekPrevious(minimalForwardPosition - 1);
1104
+ } else {
1105
+ newCaretPosition = minimalForwardPosition;
1106
+ }
1107
+
1108
+ writeBuffer(input, buffer, newCaretPosition);
1109
+ if (checkval !== true) {
1110
+ setTimeout(function () { //timeout needed for IE
1111
+ if (isComplete(buffer) === true)
1112
+ $input.trigger("complete");
1113
+ skipInputEvent = true;
1114
+ $input.trigger("input");
1115
+ }, 0);
1116
+ }
1117
+ } else if (isSlctn) {
1118
+ getActiveMaskSet()["buffer"] = getActiveMaskSet()["undoBuffer"].split('');
1119
+ }
1120
+ }
1121
+ }
1122
+
1123
+ if (opts.showTooltip) { //update tooltip
1124
+ $input.prop("title", getActiveMaskSet()["mask"]);
1125
+ }
1126
+
1127
+ //needed for IE8 and below
1128
+ if (e) e.preventDefault ? e.preventDefault() : e.returnValue = false;
1129
+ }
1130
+ }
1131
+ }
1132
+
1133
+ function keyupEvent(e) {
1134
+ var $input = $(this), input = this, k = e.keyCode, buffer = getActiveBuffer();
1135
+
1136
+ if (androidchrome && k == opts.keyCode.BACKSPACE) {
1137
+ if (chromeValueOnInput == input._valueGet())
1138
+ keydownEvent.call(this, e);
1139
+ }
1140
+
1141
+ opts.onKeyUp.call(this, e, buffer, opts); //extra stuff to execute on keyup
1142
+ if (k == opts.keyCode.TAB && opts.showMaskOnFocus) {
1143
+ if ($input.hasClass('focus.inputmask') && input._valueGet().length == 0) {
1144
+ buffer = getActiveBufferTemplate().slice();
1145
+ writeBuffer(input, buffer);
1146
+ caret(input, 0);
1147
+ valueOnFocus = getActiveBuffer().join('');
1148
+ } else {
1149
+ writeBuffer(input, buffer);
1150
+ if (buffer.join('') == getActiveBufferTemplate().join('') && $.inArray(opts.radixPoint, buffer) != -1) {
1151
+ caret(input, TranslatePosition(0));
1152
+ $input.click();
1153
+ } else
1154
+ caret(input, TranslatePosition(0), TranslatePosition(getMaskLength()));
1155
+ }
1156
+ }
1157
+ }
1158
+
1159
+ function inputEvent(e) {
1160
+ if (skipInputEvent === true) {
1161
+ skipInputEvent = false;
1162
+ return true;
1163
+ }
1164
+ var input = this, $input = $(input);
1165
+
1166
+ chromeValueOnInput = getActiveBuffer().join('');
1167
+ checkVal(input, false, false);
1168
+ writeBuffer(input, getActiveBuffer());
1169
+ if (isComplete(getActiveBuffer()) === true)
1170
+ $input.trigger("complete");
1171
+ $input.click();
1172
+ }
1173
+
1174
+ function mask(el) {
1175
+ $el = $(el);
1176
+ if ($el.is(":input")) {
1177
+ //store tests & original buffer in the input element - used to get the unmasked value
1178
+ $el.data('_inputmask', {
1179
+ 'masksets': masksets,
1180
+ 'activeMasksetIndex': activeMasksetIndex,
1181
+ 'opts': opts,
1182
+ 'isRTL': false
1183
+ });
1184
+
1185
+ //show tooltip
1186
+ if (opts.showTooltip) {
1187
+ $el.prop("title", getActiveMaskSet()["mask"]);
1188
+ }
1189
+
1190
+ //correct greedy setting if needed
1191
+ getActiveMaskSet()['greedy'] = getActiveMaskSet()['greedy'] ? getActiveMaskSet()['greedy'] : getActiveMaskSet()['repeat'] == 0;
1192
+
1193
+ //handle maxlength attribute
1194
+ if ($el.attr("maxLength") != null) //only when the attribute is set
1195
+ {
1196
+ var maxLength = $el.prop('maxLength');
1197
+ if (maxLength > -1) { //handle *-repeat
1198
+ $.each(masksets, function (ndx, ms) {
1199
+ if (typeof (ms) == "object") {
1200
+ if (ms["repeat"] == "*") {
1201
+ ms["repeat"] = maxLength;
1202
+ }
1203
+ }
1204
+ });
1205
+ }
1206
+ if (getMaskLength() >= maxLength && maxLength > -1) { //FF sets no defined max length to -1
1207
+ if (maxLength < getActiveBufferTemplate().length) getActiveBufferTemplate().length = maxLength;
1208
+ if (getActiveMaskSet()['greedy'] == false) {
1209
+ getActiveMaskSet()['repeat'] = Math.round(maxLength / getActiveBufferTemplate().length);
1210
+ }
1211
+ $el.prop('maxLength', getMaskLength() * 2);
1212
+ }
1213
+ }
1214
+
1215
+ patchValueProperty(el);
1216
+
1217
+ if (opts.numericInput) opts.isNumeric = opts.numericInput;
1218
+ if (el.dir == "rtl" || (opts.numericInput && opts.rightAlignNumerics) || (opts.isNumeric && opts.rightAlignNumerics))
1219
+ $el.css("text-align", "right");
1220
+
1221
+ if (el.dir == "rtl" || opts.numericInput) {
1222
+ el.dir = "ltr";
1223
+ $el.removeAttr("dir");
1224
+ var inputData = $el.data('_inputmask');
1225
+ inputData['isRTL'] = true;
1226
+ $el.data('_inputmask', inputData);
1227
+ isRTL = true;
1228
+ }
1229
+
1230
+ //unbind all events - to make sure that no other mask will interfere when re-masking
1231
+ $el.unbind(".inputmask");
1232
+ $el.removeClass('focus.inputmask');
1233
+ //bind events
1234
+ $el.closest('form').bind("submit", function () { //trigger change on submit if any
1235
+ if (valueOnFocus != getActiveBuffer().join('')) {
1236
+ $el.change();
1237
+ }
1238
+ }).bind('reset', function () {
1239
+ setTimeout(function () {
1240
+ $el.trigger("setvalue");
1241
+ }, 0);
1242
+ });
1243
+ $el.bind("mouseenter.inputmask", function () {
1244
+ var $input = $(this), input = this;
1245
+ if (!$input.hasClass('focus.inputmask') && opts.showMaskOnHover) {
1246
+ if (input._valueGet() != getActiveBuffer().join('')) {
1247
+ writeBuffer(input, getActiveBuffer());
1248
+ }
1249
+ }
1250
+ }).bind("blur.inputmask", function () {
1251
+ var $input = $(this), input = this, nptValue = input._valueGet(), buffer = getActiveBuffer();
1252
+ $input.removeClass('focus.inputmask');
1253
+ if (valueOnFocus != getActiveBuffer().join('')) {
1254
+ $input.change();
1255
+ }
1256
+ if (opts.clearMaskOnLostFocus && nptValue != '') {
1257
+ if (nptValue == getActiveBufferTemplate().join(''))
1258
+ input._valueSet('');
1259
+ else { //clearout optional tail of the mask
1260
+ clearOptionalTail(input);
1261
+ }
1262
+ }
1263
+ if (isComplete(buffer) === false) {
1264
+ $input.trigger("incomplete");
1265
+ if (opts.clearIncomplete) {
1266
+ $.each(masksets, function (ndx, ms) {
1267
+ if (typeof (ms) == "object") {
1268
+ ms["buffer"] = ms["_buffer"].slice();
1269
+ ms["lastValidPosition"] = -1;
1270
+ }
1271
+ });
1272
+ activeMasksetIndex = 0;
1273
+ if (opts.clearMaskOnLostFocus)
1274
+ input._valueSet('');
1275
+ else {
1276
+ buffer = getActiveBufferTemplate().slice();
1277
+ writeBuffer(input, buffer);
1278
+ }
1279
+ }
1280
+ }
1281
+ }).bind("focus.inputmask", function () {
1282
+ var $input = $(this), input = this, nptValue = input._valueGet();
1283
+ if (opts.showMaskOnFocus && !$input.hasClass('focus.inputmask') && (!opts.showMaskOnHover || (opts.showMaskOnHover && nptValue == ''))) {
1284
+ if (input._valueGet() != getActiveBuffer().join('')) {
1285
+ writeBuffer(input, getActiveBuffer(), seekNext(getActiveMaskSet()["lastValidPosition"]));
1286
+ }
1287
+ }
1288
+ $input.addClass('focus.inputmask');
1289
+ valueOnFocus = getActiveBuffer().join('');
1290
+ }).bind("mouseleave.inputmask", function () {
1291
+ var $input = $(this), input = this;
1292
+ if (opts.clearMaskOnLostFocus) {
1293
+ if (!$input.hasClass('focus.inputmask') && input._valueGet() != $input.attr("placeholder")) {
1294
+ if (input._valueGet() == getActiveBufferTemplate().join('') || input._valueGet() == '')
1295
+ input._valueSet('');
1296
+ else { //clearout optional tail of the mask
1297
+ clearOptionalTail(input);
1298
+ }
1299
+ }
1300
+ }
1301
+ }).bind("click.inputmask", function () {
1302
+ var input = this;
1303
+ setTimeout(function () {
1304
+ var selectedCaret = caret(input), buffer = getActiveBuffer();
1305
+ if (selectedCaret.begin == selectedCaret.end) {
1306
+ var clickPosition = isRTL ? TranslatePosition(selectedCaret.begin) : selectedCaret.begin,
1307
+ lvp = getActiveMaskSet()["lastValidPosition"],
1308
+ lastPosition;
1309
+ if (opts.isNumeric) {
1310
+ lastPosition = opts.skipRadixDance === false && opts.radixPoint != "" && $.inArray(opts.radixPoint, buffer) != -1 ?
1311
+ (opts.numericInput ? seekNext($.inArray(opts.radixPoint, buffer)) : $.inArray(opts.radixPoint, buffer)) :
1312
+ seekNext(lvp);
1313
+ } else {
1314
+ lastPosition = seekNext(lvp);
1315
+ }
1316
+ if (clickPosition < lastPosition) {
1317
+ if (isMask(clickPosition))
1318
+ caret(input, clickPosition);
1319
+ else caret(input, seekNext(clickPosition));
1320
+ } else
1321
+ caret(input, lastPosition);
1322
+ }
1323
+ }, 0);
1324
+ }).bind('dblclick.inputmask', function () {
1325
+ var input = this;
1326
+ setTimeout(function () {
1327
+ caret(input, 0, seekNext(getActiveMaskSet()["lastValidPosition"]));
1328
+ }, 0);
1329
+ }).bind(pasteEvent + ".inputmask dragdrop.inputmask drop.inputmask", function (e) {
1330
+ if (skipInputEvent === true) {
1331
+ skipInputEvent = false;
1332
+ return true;
1333
+ }
1334
+ var input = this, $input = $(input);
1335
+
1336
+ //paste event for IE8 and lower I guess ;-)
1337
+ if (e.type == "propertychange" && input._valueGet().length <= getMaskLength()) {
1338
+ return true;
1339
+ }
1340
+ setTimeout(function () {
1341
+ var pasteValue = opts.onBeforePaste != undefined ? opts.onBeforePaste.call(this, input._valueGet()) : input._valueGet();
1342
+ checkVal(input, true, false, pasteValue.split(''), true);
1343
+ if (isComplete(getActiveBuffer()) === true)
1344
+ $input.trigger("complete");
1345
+ $input.click();
1346
+ }, 0);
1347
+ }).bind('setvalue.inputmask', function () {
1348
+ var input = this;
1349
+ checkVal(input, true);
1350
+ valueOnFocus = getActiveBuffer().join('');
1351
+ if (input._valueGet() == getActiveBufferTemplate().join(''))
1352
+ input._valueSet('');
1353
+ }).bind('complete.inputmask', opts.oncomplete
1354
+ ).bind('incomplete.inputmask', opts.onincomplete
1355
+ ).bind('cleared.inputmask', opts.oncleared
1356
+ ).bind("keyup.inputmask", keyupEvent);
1357
+
1358
+ if (androidchrome) {
1359
+ $el.bind("input.inputmask", inputEvent);
1360
+ } else {
1361
+ $el.bind("keydown.inputmask", keydownEvent
1362
+ ).bind("keypress.inputmask", keypressEvent);
1363
+ }
1364
+
1365
+ if (msie10)
1366
+ $el.bind("input.inputmask", inputEvent);
1367
+
1368
+ //apply mask
1369
+ checkVal(el, true, false);
1370
+ valueOnFocus = getActiveBuffer().join('');
1371
+ // Wrap document.activeElement in a try/catch block since IE9 throw "Unspecified error" if document.activeElement is undefined when we are in an IFrame.
1372
+ var activeElement;
1373
+ try {
1374
+ activeElement = document.activeElement;
1375
+ } catch (e) {
1376
+ }
1377
+ if (activeElement === el) { //position the caret when in focus
1378
+ $el.addClass('focus.inputmask');
1379
+ caret(el, seekNext(getActiveMaskSet()["lastValidPosition"]));
1380
+ } else if (opts.clearMaskOnLostFocus) {
1381
+ if (getActiveBuffer().join('') == getActiveBufferTemplate().join('')) {
1382
+ el._valueSet('');
1383
+ } else {
1384
+ clearOptionalTail(el);
1385
+ }
1386
+ } else {
1387
+ writeBuffer(el, getActiveBuffer());
1388
+ }
1389
+
1390
+ installEventRuler(el);
1391
+ }
1392
+ }
1393
+
1394
+ //action object
1395
+ if (actionObj != undefined) {
1396
+ switch (actionObj["action"]) {
1397
+ case "isComplete":
1398
+ return isComplete(actionObj["buffer"]);
1399
+ case "unmaskedvalue":
1400
+ isRTL = actionObj["$input"].data('_inputmask')['isRTL'];
1401
+ return unmaskedvalue(actionObj["$input"], actionObj["skipDatepickerCheck"]);
1402
+ case "mask":
1403
+ mask(actionObj["el"]);
1404
+ break;
1405
+ case "format":
1406
+ $el = $({});
1407
+ $el.data('_inputmask', {
1408
+ 'masksets': masksets,
1409
+ 'activeMasksetIndex': activeMasksetIndex,
1410
+ 'opts': opts,
1411
+ 'isRTL': opts.numericInput
1412
+ });
1413
+ if (opts.numericInput) {
1414
+ opts.isNumeric = opts.numericInput;
1415
+ isRTL = true;
1416
+ }
1417
+
1418
+ checkVal($el, false, false, actionObj["value"].split(''), true);
1419
+ return getActiveBuffer().join('');
1420
+ }
1421
+ }
1422
+ };
1423
+
1424
+ $.inputmask = {
1425
+ //options default
1426
+ defaults: {
1427
+ placeholder: "_",
1428
+ optionalmarker: { start: "[", end: "]" },
1429
+ quantifiermarker: { start: "{", end: "}" },
1430
+ groupmarker: { start: "(", end: ")" },
1431
+ escapeChar: "\\",
1432
+ mask: null,
1433
+ oncomplete: $.noop, //executes when the mask is complete
1434
+ onincomplete: $.noop, //executes when the mask is incomplete and focus is lost
1435
+ oncleared: $.noop, //executes when the mask is cleared
1436
+ repeat: 0, //repetitions of the mask: * ~ forever, otherwise specify an integer
1437
+ greedy: true, //true: allocated buffer for the mask and repetitions - false: allocate only if needed
1438
+ autoUnmask: false, //automatically unmask when retrieving the value with $.fn.val or value if the browser supports __lookupGetter__ or getOwnPropertyDescriptor
1439
+ clearMaskOnLostFocus: true,
1440
+ insertMode: true, //insert the input or overwrite the input
1441
+ clearIncomplete: false, //clear the incomplete input on blur
1442
+ aliases: {}, //aliases definitions => see jquery.inputmask.extensions.js
1443
+ onKeyUp: $.noop, //override to implement autocomplete on certain keys for example
1444
+ onKeyDown: $.noop, //override to implement autocomplete on certain keys for example
1445
+ onBeforePaste: undefined, //executes before masking the pasted value to allow preprocessing of the pasted value. args => pastedValue => return processedValue
1446
+ onUnMask: undefined, //executes after unmasking to allow postprocessing of the unmaskedvalue. args => maskedValue, unmaskedValue
1447
+ showMaskOnFocus: true, //show the mask-placeholder when the input has focus
1448
+ showMaskOnHover: true, //show the mask-placeholder when hovering the empty input
1449
+ onKeyValidation: $.noop, //executes on every key-press with the result of isValid. Params: result, opts
1450
+ skipOptionalPartCharacter: " ", //a character which can be used to skip an optional part of a mask
1451
+ showTooltip: false, //show the activemask as tooltip
1452
+ numericInput: false, //numericInput input direction style (input shifts to the left while holding the caret position)
1453
+ //numeric basic properties
1454
+ isNumeric: false, //enable numeric features
1455
+ radixPoint: "", //".", // | ","
1456
+ skipRadixDance: false, //disable radixpoint caret positioning
1457
+ rightAlignNumerics: true, //align numerics to the right
1458
+ //numeric basic properties
1459
+ definitions: {
1460
+ '9': {
1461
+ validator: "[0-9]",
1462
+ cardinality: 1
1463
+ },
1464
+ 'a': {
1465
+ validator: "[A-Za-z\u0410-\u044F\u0401\u0451]",
1466
+ cardinality: 1
1467
+ },
1468
+ '*': {
1469
+ validator: "[A-Za-z\u0410-\u044F\u0401\u04510-9]",
1470
+ cardinality: 1
1471
+ }
1472
+ },
1473
+ keyCode: {
1474
+ ALT: 18, BACKSPACE: 8, CAPS_LOCK: 20, COMMA: 188, COMMAND: 91, COMMAND_LEFT: 91, COMMAND_RIGHT: 93, CONTROL: 17, DELETE: 46, DOWN: 40, END: 35, ENTER: 13, ESCAPE: 27, HOME: 36, INSERT: 45, LEFT: 37, MENU: 93, NUMPAD_ADD: 107, NUMPAD_DECIMAL: 110, NUMPAD_DIVIDE: 111, NUMPAD_ENTER: 108,
1475
+ NUMPAD_MULTIPLY: 106, NUMPAD_SUBTRACT: 109, PAGE_DOWN: 34, PAGE_UP: 33, PERIOD: 190, RIGHT: 39, SHIFT: 16, SPACE: 32, TAB: 9, UP: 38, WINDOWS: 91
1476
+ },
1477
+ //specify keycodes which should not be considered in the keypress event, otherwise the preventDefault will stop their default behavior especially in FF
1478
+ ignorables: [8, 9, 13, 19, 27, 33, 34, 35, 36, 37, 38, 39, 40, 45, 46, 93, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123],
1479
+ getMaskLength: function (buffer, greedy, repeat, currentBuffer, opts) {
1480
+ var calculatedLength = buffer.length;
1481
+ if (!greedy) {
1482
+ if (repeat == "*") {
1483
+ calculatedLength = currentBuffer.length + 1;
1484
+ } else if (repeat > 1) {
1485
+ calculatedLength += (buffer.length * (repeat - 1));
1486
+ }
1487
+ }
1488
+ return calculatedLength;
1489
+ }
1490
+ },
1491
+ escapeRegex: function (str) {
1492
+ var specials = ['/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\'];
1493
+ return str.replace(new RegExp('(\\' + specials.join('|\\') + ')', 'gim'), '\\$1');
1494
+ },
1495
+ format: function (value, options) {
1496
+ var opts = $.extend(true, {}, $.inputmask.defaults, options);
1497
+ resolveAlias(opts.alias, options, opts);
1498
+ return maskScope(generateMaskSets(opts), 0, opts, { "action": "format", "value": value });
1499
+ }
1500
+ };
1501
+
1502
+ $.fn.inputmask = function (fn, options) {
1503
+ var opts = $.extend(true, {}, $.inputmask.defaults, options),
1504
+ masksets,
1505
+ activeMasksetIndex = 0;
1506
+
1507
+ if (typeof fn === "string") {
1508
+ switch (fn) {
1509
+ case "mask":
1510
+ //resolve possible aliases given by options
1511
+ resolveAlias(opts.alias, options, opts);
1512
+ masksets = generateMaskSets(opts);
1513
+ if (masksets.length == 0) { return this; }
1514
+
1515
+ return this.each(function () {
1516
+ maskScope($.extend(true, {}, masksets), 0, opts, { "action": "mask", "el": this });
1517
+ });
1518
+ case "unmaskedvalue":
1519
+ var $input = $(this), input = this;
1520
+ if ($input.data('_inputmask')) {
1521
+ masksets = $input.data('_inputmask')['masksets'];
1522
+ activeMasksetIndex = $input.data('_inputmask')['activeMasksetIndex'];
1523
+ opts = $input.data('_inputmask')['opts'];
1524
+ return maskScope(masksets, activeMasksetIndex, opts, { "action": "unmaskedvalue", "$input": $input });
1525
+ } else return $input.val();
1526
+ case "remove":
1527
+ return this.each(function () {
1528
+ var $input = $(this), input = this;
1529
+ if ($input.data('_inputmask')) {
1530
+ masksets = $input.data('_inputmask')['masksets'];
1531
+ activeMasksetIndex = $input.data('_inputmask')['activeMasksetIndex'];
1532
+ opts = $input.data('_inputmask')['opts'];
1533
+ //writeout the unmaskedvalue
1534
+ input._valueSet(maskScope(masksets, activeMasksetIndex, opts, { "action": "unmaskedvalue", "$input": $input, "skipDatepickerCheck": true }));
1535
+ //clear data
1536
+ $input.removeData('_inputmask');
1537
+ //unbind all events
1538
+ $input.unbind(".inputmask");
1539
+ $input.removeClass('focus.inputmask');
1540
+ //restore the value property
1541
+ var valueProperty;
1542
+ if (Object.getOwnPropertyDescriptor)
1543
+ valueProperty = Object.getOwnPropertyDescriptor(input, "value");
1544
+ if (valueProperty && valueProperty.get) {
1545
+ if (input._valueGet) {
1546
+ Object.defineProperty(input, "value", {
1547
+ get: input._valueGet,
1548
+ set: input._valueSet
1549
+ });
1550
+ }
1551
+ } else if (document.__lookupGetter__ && input.__lookupGetter__("value")) {
1552
+ if (input._valueGet) {
1553
+ input.__defineGetter__("value", input._valueGet);
1554
+ input.__defineSetter__("value", input._valueSet);
1555
+ }
1556
+ }
1557
+ try { //try catch needed for IE7 as it does not supports deleting fns
1558
+ delete input._valueGet;
1559
+ delete input._valueSet;
1560
+ } catch (e) {
1561
+ input._valueGet = undefined;
1562
+ input._valueSet = undefined;
1563
+
1564
+ }
1565
+ }
1566
+ });
1567
+ break;
1568
+ case "getemptymask": //return the default (empty) mask value, usefull for setting the default value in validation
1569
+ if (this.data('_inputmask')) {
1570
+ masksets = this.data('_inputmask')['masksets'];
1571
+ activeMasksetIndex = this.data('_inputmask')['activeMasksetIndex'];
1572
+ return masksets[activeMasksetIndex]['_buffer'].join('');
1573
+ }
1574
+ else return "";
1575
+ case "hasMaskedValue": //check wheter the returned value is masked or not; currently only works reliable when using jquery.val fn to retrieve the value
1576
+ return this.data('_inputmask') ? !this.data('_inputmask')['opts'].autoUnmask : false;
1577
+ case "isComplete":
1578
+ masksets = this.data('_inputmask')['masksets'];
1579
+ activeMasksetIndex = this.data('_inputmask')['activeMasksetIndex'];
1580
+ opts = this.data('_inputmask')['opts'];
1581
+ return maskScope(masksets, activeMasksetIndex, opts, { "action": "isComplete", "buffer": this[0]._valueGet().split('') });
1582
+ case "getmetadata": //return mask metadata if exists
1583
+ if (this.data('_inputmask')) {
1584
+ masksets = this.data('_inputmask')['masksets'];
1585
+ activeMasksetIndex = this.data('_inputmask')['activeMasksetIndex'];
1586
+ return masksets[activeMasksetIndex]['metadata'];
1587
+ }
1588
+ else return undefined;
1589
+ default:
1590
+ //check if the fn is an alias
1591
+ if (!resolveAlias(fn, options, opts)) {
1592
+ //maybe fn is a mask so we try
1593
+ //set mask
1594
+ opts.mask = fn;
1595
+ }
1596
+ masksets = generateMaskSets(opts);
1597
+ if (masksets.length == 0) { return this; }
1598
+ return this.each(function () {
1599
+ maskScope($.extend(true, {}, masksets), activeMasksetIndex, opts, { "action": "mask", "el": this });
1600
+ });
1601
+
1602
+ break;
1603
+ }
1604
+ } else if (typeof fn == "object") {
1605
+ opts = $.extend(true, {}, $.inputmask.defaults, fn);
1606
+
1607
+ resolveAlias(opts.alias, fn, opts); //resolve aliases
1608
+ masksets = generateMaskSets(opts);
1609
+ if (masksets.length == 0) { return this; }
1610
+ return this.each(function () {
1611
+ maskScope($.extend(true, {}, masksets), activeMasksetIndex, opts, { "action": "mask", "el": this });
1612
+ });
1613
+ } else if (fn == undefined) {
1614
+ //look for data-inputmask atribute - the attribute should only contain optipns
1615
+ return this.each(function () {
1616
+ var attrOptions = $(this).attr("data-inputmask");
1617
+ if (attrOptions && attrOptions != "") {
1618
+ try {
1619
+ attrOptions = attrOptions.replace(new RegExp("'", "g"), '"');
1620
+ var dataoptions = $.parseJSON("{" + attrOptions + "}");
1621
+ $.extend(true, dataoptions, options);
1622
+ opts = $.extend(true, {}, $.inputmask.defaults, dataoptions);
1623
+ resolveAlias(opts.alias, dataoptions, opts);
1624
+ opts.alias = undefined;
1625
+ $(this).inputmask(opts);
1626
+ } catch (ex) { } //need a more relax parseJSON
1627
+ }
1628
+ });
1629
+ }
1630
+ };
1631
+ }
1632
+ })(jQuery);