rdcms 1.0.26

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1676) hide show
  1. checksums.yaml +7 -0
  2. data/CC-LICENSE +85 -0
  3. data/README.markdown +2 -0
  4. data/Rakefile +40 -0
  5. data/app/assets/images/ansehen.png +0 -0
  6. data/app/assets/images/arrow.png +0 -0
  7. data/app/assets/images/bearbeiten.png +0 -0
  8. data/app/assets/images/close.png +0 -0
  9. data/app/assets/images/create.png +0 -0
  10. data/app/assets/images/edit.png +0 -0
  11. data/app/assets/images/empty.png +0 -0
  12. data/app/assets/images/favicon.ico +0 -0
  13. data/app/assets/images/favicons/apple-touch-icon-144x144-precomposed.png +0 -0
  14. data/app/assets/images/favicons/apple-touch-icon-72x72-precomposed.png +0 -0
  15. data/app/assets/images/favicons/apple-touch-icon-precomposed.png +0 -0
  16. data/app/assets/images/favicons/favicon.png +0 -0
  17. data/app/assets/images/fonts/glyphs.eot +0 -0
  18. data/app/assets/images/fonts/glyphs.svg +1901 -0
  19. data/app/assets/images/fonts/glyphs.ttf +0 -0
  20. data/app/assets/images/fonts/glyphs.woff +0 -0
  21. data/app/assets/images/import.jpg +0 -0
  22. data/app/assets/images/loading.gif +0 -0
  23. data/app/assets/images/loeschen.png +0 -0
  24. data/app/assets/images/logo.png +0 -0
  25. data/app/assets/images/logo_fullscreen.png +0 -0
  26. data/app/assets/images/marker.png +0 -0
  27. data/app/assets/images/mask.png +0 -0
  28. data/app/assets/images/missing.png +0 -0
  29. data/app/assets/images/missing/thumb.png +0 -0
  30. data/app/assets/images/open-graph.png +0 -0
  31. data/app/assets/images/rdcms.png +0 -0
  32. data/app/assets/images/rdcms/chosen-sprite.png +0 -0
  33. data/app/assets/images/rdcms/flags.png +0 -0
  34. data/app/assets/images/rdcms/progressbar.gif +0 -0
  35. data/app/assets/images/rdcms/select2/select2-spinner.gif +0 -0
  36. data/app/assets/images/rdcms/select2/select2.png +0 -0
  37. data/app/assets/images/rdcms/select2/select2x2.png +0 -0
  38. data/app/assets/images/rdcms/sliders/blank.gif +0 -0
  39. data/app/assets/images/rdcms/sliders/controlsSprite.png +0 -0
  40. data/app/assets/images/rdcms/sliders/empty.png +0 -0
  41. data/app/assets/images/rdcms/sliders/grab.png +0 -0
  42. data/app/assets/images/rdcms/sliders/grabbing.png +0 -0
  43. data/app/assets/images/rdcms/sliders/loading.gif +0 -0
  44. data/app/assets/images/rdcms/sliders/pattern_bg.png +0 -0
  45. data/app/assets/images/rdcms/sliders/pattern_dl.png +0 -0
  46. data/app/assets/images/rdcms/sliders/rs-minimal-white.png +0 -0
  47. data/app/assets/images/rdcms/sliders/rs-universal.png +0 -0
  48. data/app/assets/images/rdcms/sliders/sliderBG.png +0 -0
  49. data/app/assets/images/rdcms/sliders/sprite.png +0 -0
  50. data/app/assets/images/tree.png +0 -0
  51. data/app/assets/images/undo.png +0 -0
  52. data/app/assets/images/unterartikel.png +0 -0
  53. data/app/assets/images/wheel.png +0 -0
  54. data/app/assets/javascripts/ckeditor/config.js +117 -0
  55. data/app/assets/javascripts/ckeditor/plugins/bidi/icons/bidiltr.png +0 -0
  56. data/app/assets/javascripts/ckeditor/plugins/bidi/icons/bidirtl.png +0 -0
  57. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/af.js +8 -0
  58. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/ar.js +8 -0
  59. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/bg.js +8 -0
  60. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/bn.js +8 -0
  61. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/bs.js +8 -0
  62. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/ca.js +8 -0
  63. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/cs.js +8 -0
  64. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/cy.js +8 -0
  65. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/da.js +8 -0
  66. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/de.js +8 -0
  67. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/el.js +8 -0
  68. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/en-au.js +8 -0
  69. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/en-ca.js +8 -0
  70. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/en-gb.js +8 -0
  71. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/en.js +8 -0
  72. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/eo.js +8 -0
  73. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/es.js +8 -0
  74. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/et.js +8 -0
  75. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/eu.js +8 -0
  76. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/fa.js +8 -0
  77. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/fi.js +8 -0
  78. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/fo.js +8 -0
  79. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/fr-ca.js +8 -0
  80. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/fr.js +8 -0
  81. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/gl.js +8 -0
  82. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/gu.js +8 -0
  83. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/he.js +8 -0
  84. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/hi.js +8 -0
  85. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/hr.js +8 -0
  86. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/hu.js +8 -0
  87. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/is.js +8 -0
  88. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/it.js +8 -0
  89. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/ja.js +8 -0
  90. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/ka.js +8 -0
  91. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/km.js +8 -0
  92. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/ko.js +8 -0
  93. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/ku.js +8 -0
  94. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/lt.js +8 -0
  95. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/lv.js +8 -0
  96. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/mk.js +8 -0
  97. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/mn.js +8 -0
  98. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/ms.js +8 -0
  99. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/nb.js +8 -0
  100. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/nl.js +8 -0
  101. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/no.js +8 -0
  102. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/pl.js +8 -0
  103. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/pt-br.js +8 -0
  104. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/pt.js +8 -0
  105. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/ro.js +8 -0
  106. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/ru.js +8 -0
  107. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/sk.js +8 -0
  108. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/sl.js +8 -0
  109. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/sr-latn.js +8 -0
  110. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/sr.js +8 -0
  111. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/sv.js +8 -0
  112. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/th.js +8 -0
  113. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/tr.js +8 -0
  114. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/ug.js +8 -0
  115. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/uk.js +8 -0
  116. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/vi.js +8 -0
  117. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/zh-cn.js +8 -0
  118. data/app/assets/javascripts/ckeditor/plugins/bidi/lang/zh.js +8 -0
  119. data/app/assets/javascripts/ckeditor/plugins/bidi/plugin.js +300 -0
  120. data/app/assets/javascripts/ckeditor/plugins/colorbutton/icons/bgcolor.png +0 -0
  121. data/app/assets/javascripts/ckeditor/plugins/colorbutton/icons/textcolor.png +0 -0
  122. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/af.js +53 -0
  123. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/ar.js +53 -0
  124. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/bg.js +53 -0
  125. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/bn.js +53 -0
  126. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/bs.js +53 -0
  127. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/ca.js +53 -0
  128. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/cs.js +53 -0
  129. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/cy.js +53 -0
  130. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/da.js +53 -0
  131. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/de.js +53 -0
  132. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/el.js +53 -0
  133. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/en-au.js +53 -0
  134. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/en-ca.js +53 -0
  135. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/en-gb.js +53 -0
  136. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/en.js +53 -0
  137. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/eo.js +53 -0
  138. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/es.js +53 -0
  139. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/et.js +53 -0
  140. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/eu.js +53 -0
  141. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/fa.js +53 -0
  142. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/fi.js +53 -0
  143. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/fo.js +53 -0
  144. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/fr-ca.js +53 -0
  145. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/fr.js +53 -0
  146. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/gl.js +53 -0
  147. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/gu.js +53 -0
  148. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/he.js +53 -0
  149. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/hi.js +53 -0
  150. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/hr.js +53 -0
  151. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/hu.js +53 -0
  152. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/is.js +53 -0
  153. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/it.js +53 -0
  154. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/ja.js +53 -0
  155. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/ka.js +53 -0
  156. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/km.js +53 -0
  157. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/ko.js +53 -0
  158. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/ku.js +53 -0
  159. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/lt.js +53 -0
  160. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/lv.js +53 -0
  161. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/mk.js +53 -0
  162. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/mn.js +53 -0
  163. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/ms.js +53 -0
  164. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/nb.js +53 -0
  165. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/nl.js +53 -0
  166. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/no.js +53 -0
  167. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/pl.js +53 -0
  168. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/pt-br.js +53 -0
  169. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/pt.js +53 -0
  170. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/ro.js +53 -0
  171. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/ru.js +53 -0
  172. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/sk.js +53 -0
  173. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/sl.js +53 -0
  174. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/sr-latn.js +53 -0
  175. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/sr.js +53 -0
  176. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/sv.js +53 -0
  177. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/th.js +53 -0
  178. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/tr.js +53 -0
  179. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/ug.js +53 -0
  180. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/uk.js +53 -0
  181. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/vi.js +53 -0
  182. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/zh-cn.js +53 -0
  183. data/app/assets/javascripts/ckeditor/plugins/colorbutton/lang/zh.js +53 -0
  184. data/app/assets/javascripts/ckeditor/plugins/colorbutton/plugin.js +273 -0
  185. data/app/assets/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.js +340 -0
  186. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/af.js +11 -0
  187. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/ar.js +11 -0
  188. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/bg.js +11 -0
  189. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/bn.js +11 -0
  190. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/bs.js +11 -0
  191. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/ca.js +11 -0
  192. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/cs.js +11 -0
  193. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/cy.js +11 -0
  194. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/da.js +11 -0
  195. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/de.js +11 -0
  196. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/el.js +11 -0
  197. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/en-au.js +11 -0
  198. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/en-ca.js +11 -0
  199. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/en-gb.js +11 -0
  200. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/en.js +11 -0
  201. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/eo.js +11 -0
  202. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/es.js +11 -0
  203. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/et.js +11 -0
  204. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/eu.js +11 -0
  205. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/fa.js +11 -0
  206. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/fi.js +11 -0
  207. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/fo.js +11 -0
  208. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/fr-ca.js +11 -0
  209. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/fr.js +11 -0
  210. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/gl.js +11 -0
  211. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/gu.js +11 -0
  212. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/he.js +11 -0
  213. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/hi.js +11 -0
  214. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/hr.js +11 -0
  215. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/hu.js +11 -0
  216. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/is.js +11 -0
  217. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/it.js +11 -0
  218. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/ja.js +11 -0
  219. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/ka.js +11 -0
  220. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/km.js +11 -0
  221. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/ko.js +11 -0
  222. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/ku.js +11 -0
  223. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/lt.js +11 -0
  224. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/lv.js +11 -0
  225. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/mk.js +11 -0
  226. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/mn.js +11 -0
  227. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/ms.js +11 -0
  228. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/nb.js +11 -0
  229. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/nl.js +11 -0
  230. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/no.js +11 -0
  231. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/pl.js +11 -0
  232. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/pt-br.js +11 -0
  233. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/pt.js +11 -0
  234. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/ro.js +11 -0
  235. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/ru.js +11 -0
  236. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/sk.js +11 -0
  237. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/sl.js +11 -0
  238. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/sr-latn.js +11 -0
  239. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/sr.js +11 -0
  240. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/sv.js +11 -0
  241. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/th.js +11 -0
  242. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/tr.js +11 -0
  243. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/ug.js +11 -0
  244. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/uk.js +11 -0
  245. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/vi.js +11 -0
  246. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/zh-cn.js +11 -0
  247. data/app/assets/javascripts/ckeditor/plugins/colordialog/lang/zh.js +11 -0
  248. data/app/assets/javascripts/ckeditor/plugins/colordialog/plugin.js +65 -0
  249. data/app/assets/javascripts/ckeditor/plugins/entities/plugin.js +236 -0
  250. data/app/assets/javascripts/ckeditor/plugins/font/lang/af.js +14 -0
  251. data/app/assets/javascripts/ckeditor/plugins/font/lang/ar.js +14 -0
  252. data/app/assets/javascripts/ckeditor/plugins/font/lang/bg.js +14 -0
  253. data/app/assets/javascripts/ckeditor/plugins/font/lang/bn.js +14 -0
  254. data/app/assets/javascripts/ckeditor/plugins/font/lang/bs.js +14 -0
  255. data/app/assets/javascripts/ckeditor/plugins/font/lang/ca.js +14 -0
  256. data/app/assets/javascripts/ckeditor/plugins/font/lang/cs.js +14 -0
  257. data/app/assets/javascripts/ckeditor/plugins/font/lang/cy.js +14 -0
  258. data/app/assets/javascripts/ckeditor/plugins/font/lang/da.js +14 -0
  259. data/app/assets/javascripts/ckeditor/plugins/font/lang/de.js +14 -0
  260. data/app/assets/javascripts/ckeditor/plugins/font/lang/el.js +14 -0
  261. data/app/assets/javascripts/ckeditor/plugins/font/lang/en-au.js +14 -0
  262. data/app/assets/javascripts/ckeditor/plugins/font/lang/en-ca.js +14 -0
  263. data/app/assets/javascripts/ckeditor/plugins/font/lang/en-gb.js +14 -0
  264. data/app/assets/javascripts/ckeditor/plugins/font/lang/en.js +14 -0
  265. data/app/assets/javascripts/ckeditor/plugins/font/lang/eo.js +14 -0
  266. data/app/assets/javascripts/ckeditor/plugins/font/lang/es.js +14 -0
  267. data/app/assets/javascripts/ckeditor/plugins/font/lang/et.js +14 -0
  268. data/app/assets/javascripts/ckeditor/plugins/font/lang/eu.js +14 -0
  269. data/app/assets/javascripts/ckeditor/plugins/font/lang/fa.js +14 -0
  270. data/app/assets/javascripts/ckeditor/plugins/font/lang/fi.js +14 -0
  271. data/app/assets/javascripts/ckeditor/plugins/font/lang/fo.js +14 -0
  272. data/app/assets/javascripts/ckeditor/plugins/font/lang/fr-ca.js +14 -0
  273. data/app/assets/javascripts/ckeditor/plugins/font/lang/fr.js +14 -0
  274. data/app/assets/javascripts/ckeditor/plugins/font/lang/gl.js +14 -0
  275. data/app/assets/javascripts/ckeditor/plugins/font/lang/gu.js +14 -0
  276. data/app/assets/javascripts/ckeditor/plugins/font/lang/he.js +14 -0
  277. data/app/assets/javascripts/ckeditor/plugins/font/lang/hi.js +14 -0
  278. data/app/assets/javascripts/ckeditor/plugins/font/lang/hr.js +14 -0
  279. data/app/assets/javascripts/ckeditor/plugins/font/lang/hu.js +14 -0
  280. data/app/assets/javascripts/ckeditor/plugins/font/lang/is.js +14 -0
  281. data/app/assets/javascripts/ckeditor/plugins/font/lang/it.js +14 -0
  282. data/app/assets/javascripts/ckeditor/plugins/font/lang/ja.js +14 -0
  283. data/app/assets/javascripts/ckeditor/plugins/font/lang/ka.js +14 -0
  284. data/app/assets/javascripts/ckeditor/plugins/font/lang/km.js +14 -0
  285. data/app/assets/javascripts/ckeditor/plugins/font/lang/ko.js +14 -0
  286. data/app/assets/javascripts/ckeditor/plugins/font/lang/ku.js +14 -0
  287. data/app/assets/javascripts/ckeditor/plugins/font/lang/lt.js +14 -0
  288. data/app/assets/javascripts/ckeditor/plugins/font/lang/lv.js +14 -0
  289. data/app/assets/javascripts/ckeditor/plugins/font/lang/mk.js +14 -0
  290. data/app/assets/javascripts/ckeditor/plugins/font/lang/mn.js +14 -0
  291. data/app/assets/javascripts/ckeditor/plugins/font/lang/ms.js +14 -0
  292. data/app/assets/javascripts/ckeditor/plugins/font/lang/nb.js +14 -0
  293. data/app/assets/javascripts/ckeditor/plugins/font/lang/nl.js +14 -0
  294. data/app/assets/javascripts/ckeditor/plugins/font/lang/no.js +14 -0
  295. data/app/assets/javascripts/ckeditor/plugins/font/lang/pl.js +14 -0
  296. data/app/assets/javascripts/ckeditor/plugins/font/lang/pt-br.js +14 -0
  297. data/app/assets/javascripts/ckeditor/plugins/font/lang/pt.js +14 -0
  298. data/app/assets/javascripts/ckeditor/plugins/font/lang/ro.js +14 -0
  299. data/app/assets/javascripts/ckeditor/plugins/font/lang/ru.js +14 -0
  300. data/app/assets/javascripts/ckeditor/plugins/font/lang/sk.js +14 -0
  301. data/app/assets/javascripts/ckeditor/plugins/font/lang/sl.js +14 -0
  302. data/app/assets/javascripts/ckeditor/plugins/font/lang/sr-latn.js +14 -0
  303. data/app/assets/javascripts/ckeditor/plugins/font/lang/sr.js +14 -0
  304. data/app/assets/javascripts/ckeditor/plugins/font/lang/sv.js +14 -0
  305. data/app/assets/javascripts/ckeditor/plugins/font/lang/th.js +14 -0
  306. data/app/assets/javascripts/ckeditor/plugins/font/lang/tr.js +14 -0
  307. data/app/assets/javascripts/ckeditor/plugins/font/lang/ug.js +14 -0
  308. data/app/assets/javascripts/ckeditor/plugins/font/lang/uk.js +14 -0
  309. data/app/assets/javascripts/ckeditor/plugins/font/lang/vi.js +14 -0
  310. data/app/assets/javascripts/ckeditor/plugins/font/lang/zh-cn.js +14 -0
  311. data/app/assets/javascripts/ckeditor/plugins/font/lang/zh.js +14 -0
  312. data/app/assets/javascripts/ckeditor/plugins/font/plugin.js +222 -0
  313. data/app/assets/javascripts/ckeditor/plugins/format/lang/af.js +18 -0
  314. data/app/assets/javascripts/ckeditor/plugins/format/lang/ar.js +18 -0
  315. data/app/assets/javascripts/ckeditor/plugins/format/lang/bg.js +18 -0
  316. data/app/assets/javascripts/ckeditor/plugins/format/lang/bn.js +18 -0
  317. data/app/assets/javascripts/ckeditor/plugins/format/lang/bs.js +18 -0
  318. data/app/assets/javascripts/ckeditor/plugins/format/lang/ca.js +18 -0
  319. data/app/assets/javascripts/ckeditor/plugins/format/lang/cs.js +18 -0
  320. data/app/assets/javascripts/ckeditor/plugins/format/lang/cy.js +18 -0
  321. data/app/assets/javascripts/ckeditor/plugins/format/lang/da.js +18 -0
  322. data/app/assets/javascripts/ckeditor/plugins/format/lang/de.js +18 -0
  323. data/app/assets/javascripts/ckeditor/plugins/format/lang/el.js +18 -0
  324. data/app/assets/javascripts/ckeditor/plugins/format/lang/en-au.js +18 -0
  325. data/app/assets/javascripts/ckeditor/plugins/format/lang/en-ca.js +18 -0
  326. data/app/assets/javascripts/ckeditor/plugins/format/lang/en-gb.js +18 -0
  327. data/app/assets/javascripts/ckeditor/plugins/format/lang/en.js +18 -0
  328. data/app/assets/javascripts/ckeditor/plugins/format/lang/eo.js +18 -0
  329. data/app/assets/javascripts/ckeditor/plugins/format/lang/es.js +18 -0
  330. data/app/assets/javascripts/ckeditor/plugins/format/lang/et.js +18 -0
  331. data/app/assets/javascripts/ckeditor/plugins/format/lang/eu.js +18 -0
  332. data/app/assets/javascripts/ckeditor/plugins/format/lang/fa.js +18 -0
  333. data/app/assets/javascripts/ckeditor/plugins/format/lang/fi.js +18 -0
  334. data/app/assets/javascripts/ckeditor/plugins/format/lang/fo.js +18 -0
  335. data/app/assets/javascripts/ckeditor/plugins/format/lang/fr-ca.js +18 -0
  336. data/app/assets/javascripts/ckeditor/plugins/format/lang/fr.js +18 -0
  337. data/app/assets/javascripts/ckeditor/plugins/format/lang/gl.js +18 -0
  338. data/app/assets/javascripts/ckeditor/plugins/format/lang/gu.js +18 -0
  339. data/app/assets/javascripts/ckeditor/plugins/format/lang/he.js +18 -0
  340. data/app/assets/javascripts/ckeditor/plugins/format/lang/hi.js +18 -0
  341. data/app/assets/javascripts/ckeditor/plugins/format/lang/hr.js +18 -0
  342. data/app/assets/javascripts/ckeditor/plugins/format/lang/hu.js +18 -0
  343. data/app/assets/javascripts/ckeditor/plugins/format/lang/is.js +18 -0
  344. data/app/assets/javascripts/ckeditor/plugins/format/lang/it.js +18 -0
  345. data/app/assets/javascripts/ckeditor/plugins/format/lang/ja.js +18 -0
  346. data/app/assets/javascripts/ckeditor/plugins/format/lang/ka.js +18 -0
  347. data/app/assets/javascripts/ckeditor/plugins/format/lang/km.js +18 -0
  348. data/app/assets/javascripts/ckeditor/plugins/format/lang/ko.js +18 -0
  349. data/app/assets/javascripts/ckeditor/plugins/format/lang/ku.js +18 -0
  350. data/app/assets/javascripts/ckeditor/plugins/format/lang/lt.js +18 -0
  351. data/app/assets/javascripts/ckeditor/plugins/format/lang/lv.js +18 -0
  352. data/app/assets/javascripts/ckeditor/plugins/format/lang/mk.js +18 -0
  353. data/app/assets/javascripts/ckeditor/plugins/format/lang/mn.js +18 -0
  354. data/app/assets/javascripts/ckeditor/plugins/format/lang/ms.js +18 -0
  355. data/app/assets/javascripts/ckeditor/plugins/format/lang/nb.js +18 -0
  356. data/app/assets/javascripts/ckeditor/plugins/format/lang/nl.js +18 -0
  357. data/app/assets/javascripts/ckeditor/plugins/format/lang/no.js +18 -0
  358. data/app/assets/javascripts/ckeditor/plugins/format/lang/pl.js +18 -0
  359. data/app/assets/javascripts/ckeditor/plugins/format/lang/pt-br.js +18 -0
  360. data/app/assets/javascripts/ckeditor/plugins/format/lang/pt.js +18 -0
  361. data/app/assets/javascripts/ckeditor/plugins/format/lang/ro.js +18 -0
  362. data/app/assets/javascripts/ckeditor/plugins/format/lang/ru.js +18 -0
  363. data/app/assets/javascripts/ckeditor/plugins/format/lang/sk.js +18 -0
  364. data/app/assets/javascripts/ckeditor/plugins/format/lang/sl.js +18 -0
  365. data/app/assets/javascripts/ckeditor/plugins/format/lang/sr-latn.js +18 -0
  366. data/app/assets/javascripts/ckeditor/plugins/format/lang/sr.js +18 -0
  367. data/app/assets/javascripts/ckeditor/plugins/format/lang/sv.js +18 -0
  368. data/app/assets/javascripts/ckeditor/plugins/format/lang/th.js +18 -0
  369. data/app/assets/javascripts/ckeditor/plugins/format/lang/tr.js +18 -0
  370. data/app/assets/javascripts/ckeditor/plugins/format/lang/ug.js +18 -0
  371. data/app/assets/javascripts/ckeditor/plugins/format/lang/uk.js +18 -0
  372. data/app/assets/javascripts/ckeditor/plugins/format/lang/vi.js +18 -0
  373. data/app/assets/javascripts/ckeditor/plugins/format/lang/zh-cn.js +18 -0
  374. data/app/assets/javascripts/ckeditor/plugins/format/lang/zh.js +18 -0
  375. data/app/assets/javascripts/ckeditor/plugins/format/plugin.js +205 -0
  376. data/app/assets/javascripts/ckeditor/plugins/indent/icons/indent-rtl.png +0 -0
  377. data/app/assets/javascripts/ckeditor/plugins/indent/icons/indent.png +0 -0
  378. data/app/assets/javascripts/ckeditor/plugins/indent/icons/outdent-rtl.png +0 -0
  379. data/app/assets/javascripts/ckeditor/plugins/indent/icons/outdent.png +0 -0
  380. data/app/assets/javascripts/ckeditor/plugins/indent/lang/af.js +8 -0
  381. data/app/assets/javascripts/ckeditor/plugins/indent/lang/ar.js +8 -0
  382. data/app/assets/javascripts/ckeditor/plugins/indent/lang/bg.js +8 -0
  383. data/app/assets/javascripts/ckeditor/plugins/indent/lang/bn.js +8 -0
  384. data/app/assets/javascripts/ckeditor/plugins/indent/lang/bs.js +8 -0
  385. data/app/assets/javascripts/ckeditor/plugins/indent/lang/ca.js +8 -0
  386. data/app/assets/javascripts/ckeditor/plugins/indent/lang/cs.js +8 -0
  387. data/app/assets/javascripts/ckeditor/plugins/indent/lang/cy.js +8 -0
  388. data/app/assets/javascripts/ckeditor/plugins/indent/lang/da.js +8 -0
  389. data/app/assets/javascripts/ckeditor/plugins/indent/lang/de.js +8 -0
  390. data/app/assets/javascripts/ckeditor/plugins/indent/lang/el.js +8 -0
  391. data/app/assets/javascripts/ckeditor/plugins/indent/lang/en-au.js +8 -0
  392. data/app/assets/javascripts/ckeditor/plugins/indent/lang/en-ca.js +8 -0
  393. data/app/assets/javascripts/ckeditor/plugins/indent/lang/en-gb.js +8 -0
  394. data/app/assets/javascripts/ckeditor/plugins/indent/lang/en.js +8 -0
  395. data/app/assets/javascripts/ckeditor/plugins/indent/lang/eo.js +8 -0
  396. data/app/assets/javascripts/ckeditor/plugins/indent/lang/es.js +8 -0
  397. data/app/assets/javascripts/ckeditor/plugins/indent/lang/et.js +8 -0
  398. data/app/assets/javascripts/ckeditor/plugins/indent/lang/eu.js +8 -0
  399. data/app/assets/javascripts/ckeditor/plugins/indent/lang/fa.js +8 -0
  400. data/app/assets/javascripts/ckeditor/plugins/indent/lang/fi.js +8 -0
  401. data/app/assets/javascripts/ckeditor/plugins/indent/lang/fo.js +8 -0
  402. data/app/assets/javascripts/ckeditor/plugins/indent/lang/fr-ca.js +8 -0
  403. data/app/assets/javascripts/ckeditor/plugins/indent/lang/fr.js +8 -0
  404. data/app/assets/javascripts/ckeditor/plugins/indent/lang/gl.js +8 -0
  405. data/app/assets/javascripts/ckeditor/plugins/indent/lang/gu.js +8 -0
  406. data/app/assets/javascripts/ckeditor/plugins/indent/lang/he.js +8 -0
  407. data/app/assets/javascripts/ckeditor/plugins/indent/lang/hi.js +8 -0
  408. data/app/assets/javascripts/ckeditor/plugins/indent/lang/hr.js +8 -0
  409. data/app/assets/javascripts/ckeditor/plugins/indent/lang/hu.js +8 -0
  410. data/app/assets/javascripts/ckeditor/plugins/indent/lang/is.js +8 -0
  411. data/app/assets/javascripts/ckeditor/plugins/indent/lang/it.js +8 -0
  412. data/app/assets/javascripts/ckeditor/plugins/indent/lang/ja.js +8 -0
  413. data/app/assets/javascripts/ckeditor/plugins/indent/lang/ka.js +8 -0
  414. data/app/assets/javascripts/ckeditor/plugins/indent/lang/km.js +8 -0
  415. data/app/assets/javascripts/ckeditor/plugins/indent/lang/ko.js +8 -0
  416. data/app/assets/javascripts/ckeditor/plugins/indent/lang/ku.js +8 -0
  417. data/app/assets/javascripts/ckeditor/plugins/indent/lang/lt.js +8 -0
  418. data/app/assets/javascripts/ckeditor/plugins/indent/lang/lv.js +8 -0
  419. data/app/assets/javascripts/ckeditor/plugins/indent/lang/mk.js +8 -0
  420. data/app/assets/javascripts/ckeditor/plugins/indent/lang/mn.js +8 -0
  421. data/app/assets/javascripts/ckeditor/plugins/indent/lang/ms.js +8 -0
  422. data/app/assets/javascripts/ckeditor/plugins/indent/lang/nb.js +8 -0
  423. data/app/assets/javascripts/ckeditor/plugins/indent/lang/nl.js +8 -0
  424. data/app/assets/javascripts/ckeditor/plugins/indent/lang/no.js +8 -0
  425. data/app/assets/javascripts/ckeditor/plugins/indent/lang/pl.js +8 -0
  426. data/app/assets/javascripts/ckeditor/plugins/indent/lang/pt-br.js +8 -0
  427. data/app/assets/javascripts/ckeditor/plugins/indent/lang/pt.js +8 -0
  428. data/app/assets/javascripts/ckeditor/plugins/indent/lang/ro.js +8 -0
  429. data/app/assets/javascripts/ckeditor/plugins/indent/lang/ru.js +8 -0
  430. data/app/assets/javascripts/ckeditor/plugins/indent/lang/sk.js +8 -0
  431. data/app/assets/javascripts/ckeditor/plugins/indent/lang/sl.js +8 -0
  432. data/app/assets/javascripts/ckeditor/plugins/indent/lang/sr-latn.js +8 -0
  433. data/app/assets/javascripts/ckeditor/plugins/indent/lang/sr.js +8 -0
  434. data/app/assets/javascripts/ckeditor/plugins/indent/lang/sv.js +8 -0
  435. data/app/assets/javascripts/ckeditor/plugins/indent/lang/th.js +8 -0
  436. data/app/assets/javascripts/ckeditor/plugins/indent/lang/tr.js +8 -0
  437. data/app/assets/javascripts/ckeditor/plugins/indent/lang/ug.js +8 -0
  438. data/app/assets/javascripts/ckeditor/plugins/indent/lang/uk.js +8 -0
  439. data/app/assets/javascripts/ckeditor/plugins/indent/lang/vi.js +8 -0
  440. data/app/assets/javascripts/ckeditor/plugins/indent/lang/zh-cn.js +8 -0
  441. data/app/assets/javascripts/ckeditor/plugins/indent/lang/zh.js +8 -0
  442. data/app/assets/javascripts/ckeditor/plugins/indent/plugin.js +417 -0
  443. data/app/assets/javascripts/ckeditor/plugins/justify/icons/justifyblock.png +0 -0
  444. data/app/assets/javascripts/ckeditor/plugins/justify/icons/justifycenter.png +0 -0
  445. data/app/assets/javascripts/ckeditor/plugins/justify/icons/justifyleft.png +0 -0
  446. data/app/assets/javascripts/ckeditor/plugins/justify/icons/justifyright.png +0 -0
  447. data/app/assets/javascripts/ckeditor/plugins/justify/lang/af.js +10 -0
  448. data/app/assets/javascripts/ckeditor/plugins/justify/lang/ar.js +10 -0
  449. data/app/assets/javascripts/ckeditor/plugins/justify/lang/bg.js +10 -0
  450. data/app/assets/javascripts/ckeditor/plugins/justify/lang/bn.js +10 -0
  451. data/app/assets/javascripts/ckeditor/plugins/justify/lang/bs.js +10 -0
  452. data/app/assets/javascripts/ckeditor/plugins/justify/lang/ca.js +10 -0
  453. data/app/assets/javascripts/ckeditor/plugins/justify/lang/cs.js +10 -0
  454. data/app/assets/javascripts/ckeditor/plugins/justify/lang/cy.js +10 -0
  455. data/app/assets/javascripts/ckeditor/plugins/justify/lang/da.js +10 -0
  456. data/app/assets/javascripts/ckeditor/plugins/justify/lang/de.js +10 -0
  457. data/app/assets/javascripts/ckeditor/plugins/justify/lang/el.js +10 -0
  458. data/app/assets/javascripts/ckeditor/plugins/justify/lang/en-au.js +10 -0
  459. data/app/assets/javascripts/ckeditor/plugins/justify/lang/en-ca.js +10 -0
  460. data/app/assets/javascripts/ckeditor/plugins/justify/lang/en-gb.js +10 -0
  461. data/app/assets/javascripts/ckeditor/plugins/justify/lang/en.js +10 -0
  462. data/app/assets/javascripts/ckeditor/plugins/justify/lang/eo.js +10 -0
  463. data/app/assets/javascripts/ckeditor/plugins/justify/lang/es.js +10 -0
  464. data/app/assets/javascripts/ckeditor/plugins/justify/lang/et.js +10 -0
  465. data/app/assets/javascripts/ckeditor/plugins/justify/lang/eu.js +10 -0
  466. data/app/assets/javascripts/ckeditor/plugins/justify/lang/fa.js +10 -0
  467. data/app/assets/javascripts/ckeditor/plugins/justify/lang/fi.js +10 -0
  468. data/app/assets/javascripts/ckeditor/plugins/justify/lang/fo.js +10 -0
  469. data/app/assets/javascripts/ckeditor/plugins/justify/lang/fr-ca.js +10 -0
  470. data/app/assets/javascripts/ckeditor/plugins/justify/lang/fr.js +10 -0
  471. data/app/assets/javascripts/ckeditor/plugins/justify/lang/gl.js +10 -0
  472. data/app/assets/javascripts/ckeditor/plugins/justify/lang/gu.js +10 -0
  473. data/app/assets/javascripts/ckeditor/plugins/justify/lang/he.js +10 -0
  474. data/app/assets/javascripts/ckeditor/plugins/justify/lang/hi.js +10 -0
  475. data/app/assets/javascripts/ckeditor/plugins/justify/lang/hr.js +10 -0
  476. data/app/assets/javascripts/ckeditor/plugins/justify/lang/hu.js +10 -0
  477. data/app/assets/javascripts/ckeditor/plugins/justify/lang/is.js +10 -0
  478. data/app/assets/javascripts/ckeditor/plugins/justify/lang/it.js +10 -0
  479. data/app/assets/javascripts/ckeditor/plugins/justify/lang/ja.js +10 -0
  480. data/app/assets/javascripts/ckeditor/plugins/justify/lang/ka.js +10 -0
  481. data/app/assets/javascripts/ckeditor/plugins/justify/lang/km.js +10 -0
  482. data/app/assets/javascripts/ckeditor/plugins/justify/lang/ko.js +10 -0
  483. data/app/assets/javascripts/ckeditor/plugins/justify/lang/ku.js +10 -0
  484. data/app/assets/javascripts/ckeditor/plugins/justify/lang/lt.js +10 -0
  485. data/app/assets/javascripts/ckeditor/plugins/justify/lang/lv.js +10 -0
  486. data/app/assets/javascripts/ckeditor/plugins/justify/lang/mk.js +10 -0
  487. data/app/assets/javascripts/ckeditor/plugins/justify/lang/mn.js +10 -0
  488. data/app/assets/javascripts/ckeditor/plugins/justify/lang/ms.js +10 -0
  489. data/app/assets/javascripts/ckeditor/plugins/justify/lang/nb.js +10 -0
  490. data/app/assets/javascripts/ckeditor/plugins/justify/lang/nl.js +10 -0
  491. data/app/assets/javascripts/ckeditor/plugins/justify/lang/no.js +10 -0
  492. data/app/assets/javascripts/ckeditor/plugins/justify/lang/pl.js +10 -0
  493. data/app/assets/javascripts/ckeditor/plugins/justify/lang/pt-br.js +10 -0
  494. data/app/assets/javascripts/ckeditor/plugins/justify/lang/pt.js +10 -0
  495. data/app/assets/javascripts/ckeditor/plugins/justify/lang/ro.js +10 -0
  496. data/app/assets/javascripts/ckeditor/plugins/justify/lang/ru.js +10 -0
  497. data/app/assets/javascripts/ckeditor/plugins/justify/lang/sk.js +10 -0
  498. data/app/assets/javascripts/ckeditor/plugins/justify/lang/sl.js +10 -0
  499. data/app/assets/javascripts/ckeditor/plugins/justify/lang/sr-latn.js +10 -0
  500. data/app/assets/javascripts/ckeditor/plugins/justify/lang/sr.js +10 -0
  501. data/app/assets/javascripts/ckeditor/plugins/justify/lang/sv.js +10 -0
  502. data/app/assets/javascripts/ckeditor/plugins/justify/lang/th.js +10 -0
  503. data/app/assets/javascripts/ckeditor/plugins/justify/lang/tr.js +10 -0
  504. data/app/assets/javascripts/ckeditor/plugins/justify/lang/ug.js +10 -0
  505. data/app/assets/javascripts/ckeditor/plugins/justify/lang/uk.js +10 -0
  506. data/app/assets/javascripts/ckeditor/plugins/justify/lang/vi.js +10 -0
  507. data/app/assets/javascripts/ckeditor/plugins/justify/lang/zh-cn.js +10 -0
  508. data/app/assets/javascripts/ckeditor/plugins/justify/lang/zh.js +10 -0
  509. data/app/assets/javascripts/ckeditor/plugins/justify/plugin.js +218 -0
  510. data/app/assets/javascripts/ckeditor/plugins/list/icons/bulletedlist-rtl.png +0 -0
  511. data/app/assets/javascripts/ckeditor/plugins/list/icons/bulletedlist.png +0 -0
  512. data/app/assets/javascripts/ckeditor/plugins/list/icons/numberedlist-rtl.png +0 -0
  513. data/app/assets/javascripts/ckeditor/plugins/list/icons/numberedlist.png +0 -0
  514. data/app/assets/javascripts/ckeditor/plugins/list/lang/af.js +8 -0
  515. data/app/assets/javascripts/ckeditor/plugins/list/lang/ar.js +8 -0
  516. data/app/assets/javascripts/ckeditor/plugins/list/lang/bg.js +8 -0
  517. data/app/assets/javascripts/ckeditor/plugins/list/lang/bn.js +8 -0
  518. data/app/assets/javascripts/ckeditor/plugins/list/lang/bs.js +8 -0
  519. data/app/assets/javascripts/ckeditor/plugins/list/lang/ca.js +8 -0
  520. data/app/assets/javascripts/ckeditor/plugins/list/lang/cs.js +8 -0
  521. data/app/assets/javascripts/ckeditor/plugins/list/lang/cy.js +8 -0
  522. data/app/assets/javascripts/ckeditor/plugins/list/lang/da.js +8 -0
  523. data/app/assets/javascripts/ckeditor/plugins/list/lang/de.js +8 -0
  524. data/app/assets/javascripts/ckeditor/plugins/list/lang/el.js +8 -0
  525. data/app/assets/javascripts/ckeditor/plugins/list/lang/en-au.js +8 -0
  526. data/app/assets/javascripts/ckeditor/plugins/list/lang/en-ca.js +8 -0
  527. data/app/assets/javascripts/ckeditor/plugins/list/lang/en-gb.js +8 -0
  528. data/app/assets/javascripts/ckeditor/plugins/list/lang/en.js +8 -0
  529. data/app/assets/javascripts/ckeditor/plugins/list/lang/eo.js +8 -0
  530. data/app/assets/javascripts/ckeditor/plugins/list/lang/es.js +8 -0
  531. data/app/assets/javascripts/ckeditor/plugins/list/lang/et.js +8 -0
  532. data/app/assets/javascripts/ckeditor/plugins/list/lang/eu.js +8 -0
  533. data/app/assets/javascripts/ckeditor/plugins/list/lang/fa.js +8 -0
  534. data/app/assets/javascripts/ckeditor/plugins/list/lang/fi.js +8 -0
  535. data/app/assets/javascripts/ckeditor/plugins/list/lang/fo.js +8 -0
  536. data/app/assets/javascripts/ckeditor/plugins/list/lang/fr-ca.js +8 -0
  537. data/app/assets/javascripts/ckeditor/plugins/list/lang/fr.js +8 -0
  538. data/app/assets/javascripts/ckeditor/plugins/list/lang/gl.js +8 -0
  539. data/app/assets/javascripts/ckeditor/plugins/list/lang/gu.js +8 -0
  540. data/app/assets/javascripts/ckeditor/plugins/list/lang/he.js +8 -0
  541. data/app/assets/javascripts/ckeditor/plugins/list/lang/hi.js +8 -0
  542. data/app/assets/javascripts/ckeditor/plugins/list/lang/hr.js +8 -0
  543. data/app/assets/javascripts/ckeditor/plugins/list/lang/hu.js +8 -0
  544. data/app/assets/javascripts/ckeditor/plugins/list/lang/is.js +8 -0
  545. data/app/assets/javascripts/ckeditor/plugins/list/lang/it.js +8 -0
  546. data/app/assets/javascripts/ckeditor/plugins/list/lang/ja.js +8 -0
  547. data/app/assets/javascripts/ckeditor/plugins/list/lang/ka.js +8 -0
  548. data/app/assets/javascripts/ckeditor/plugins/list/lang/km.js +8 -0
  549. data/app/assets/javascripts/ckeditor/plugins/list/lang/ko.js +8 -0
  550. data/app/assets/javascripts/ckeditor/plugins/list/lang/ku.js +8 -0
  551. data/app/assets/javascripts/ckeditor/plugins/list/lang/lt.js +8 -0
  552. data/app/assets/javascripts/ckeditor/plugins/list/lang/lv.js +8 -0
  553. data/app/assets/javascripts/ckeditor/plugins/list/lang/mk.js +8 -0
  554. data/app/assets/javascripts/ckeditor/plugins/list/lang/mn.js +8 -0
  555. data/app/assets/javascripts/ckeditor/plugins/list/lang/ms.js +8 -0
  556. data/app/assets/javascripts/ckeditor/plugins/list/lang/nb.js +8 -0
  557. data/app/assets/javascripts/ckeditor/plugins/list/lang/nl.js +8 -0
  558. data/app/assets/javascripts/ckeditor/plugins/list/lang/no.js +8 -0
  559. data/app/assets/javascripts/ckeditor/plugins/list/lang/pl.js +8 -0
  560. data/app/assets/javascripts/ckeditor/plugins/list/lang/pt-br.js +8 -0
  561. data/app/assets/javascripts/ckeditor/plugins/list/lang/pt.js +8 -0
  562. data/app/assets/javascripts/ckeditor/plugins/list/lang/ro.js +8 -0
  563. data/app/assets/javascripts/ckeditor/plugins/list/lang/ru.js +8 -0
  564. data/app/assets/javascripts/ckeditor/plugins/list/lang/sk.js +8 -0
  565. data/app/assets/javascripts/ckeditor/plugins/list/lang/sl.js +8 -0
  566. data/app/assets/javascripts/ckeditor/plugins/list/lang/sr-latn.js +8 -0
  567. data/app/assets/javascripts/ckeditor/plugins/list/lang/sr.js +8 -0
  568. data/app/assets/javascripts/ckeditor/plugins/list/lang/sv.js +8 -0
  569. data/app/assets/javascripts/ckeditor/plugins/list/lang/th.js +8 -0
  570. data/app/assets/javascripts/ckeditor/plugins/list/lang/tr.js +8 -0
  571. data/app/assets/javascripts/ckeditor/plugins/list/lang/ug.js +8 -0
  572. data/app/assets/javascripts/ckeditor/plugins/list/lang/uk.js +8 -0
  573. data/app/assets/javascripts/ckeditor/plugins/list/lang/vi.js +8 -0
  574. data/app/assets/javascripts/ckeditor/plugins/list/lang/zh-cn.js +8 -0
  575. data/app/assets/javascripts/ckeditor/plugins/list/lang/zh.js +8 -0
  576. data/app/assets/javascripts/ckeditor/plugins/list/plugin.js +961 -0
  577. data/app/assets/javascripts/ckeditor/plugins/listblock/plugin.js +230 -0
  578. data/app/assets/javascripts/ckeditor/plugins/liststyle/dialogs/liststyle.js +199 -0
  579. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/af.js +25 -0
  580. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/ar.js +25 -0
  581. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/bg.js +25 -0
  582. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/bn.js +25 -0
  583. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/bs.js +25 -0
  584. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/ca.js +25 -0
  585. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/cs.js +25 -0
  586. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/cy.js +25 -0
  587. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/da.js +25 -0
  588. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/de.js +25 -0
  589. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/el.js +25 -0
  590. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/en-au.js +25 -0
  591. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/en-ca.js +25 -0
  592. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/en-gb.js +25 -0
  593. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/en.js +25 -0
  594. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/eo.js +25 -0
  595. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/es.js +25 -0
  596. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/et.js +25 -0
  597. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/eu.js +25 -0
  598. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/fa.js +25 -0
  599. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/fi.js +25 -0
  600. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/fo.js +25 -0
  601. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/fr-ca.js +25 -0
  602. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/fr.js +25 -0
  603. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/gl.js +25 -0
  604. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/gu.js +25 -0
  605. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/he.js +25 -0
  606. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/hi.js +25 -0
  607. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/hr.js +25 -0
  608. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/hu.js +25 -0
  609. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/is.js +25 -0
  610. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/it.js +25 -0
  611. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/ja.js +25 -0
  612. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/ka.js +25 -0
  613. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/km.js +25 -0
  614. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/ko.js +25 -0
  615. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/ku.js +25 -0
  616. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/lt.js +25 -0
  617. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/lv.js +25 -0
  618. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/mk.js +25 -0
  619. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/mn.js +25 -0
  620. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/ms.js +25 -0
  621. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/nb.js +25 -0
  622. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/nl.js +25 -0
  623. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/no.js +25 -0
  624. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/pl.js +25 -0
  625. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/pt-br.js +25 -0
  626. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/pt.js +25 -0
  627. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/ro.js +25 -0
  628. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/ru.js +25 -0
  629. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/sk.js +25 -0
  630. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/sl.js +25 -0
  631. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/sr-latn.js +25 -0
  632. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/sr.js +25 -0
  633. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/sv.js +25 -0
  634. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/th.js +25 -0
  635. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/tr.js +25 -0
  636. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/ug.js +25 -0
  637. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/uk.js +25 -0
  638. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/vi.js +25 -0
  639. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/zh-cn.js +25 -0
  640. data/app/assets/javascripts/ckeditor/plugins/liststyle/lang/zh.js +25 -0
  641. data/app/assets/javascripts/ckeditor/plugins/liststyle/plugin.js +51 -0
  642. data/app/assets/javascripts/ckeditor/plugins/maximize/icons/maximize.png +0 -0
  643. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/af.js +8 -0
  644. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/ar.js +8 -0
  645. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/bg.js +8 -0
  646. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/bn.js +8 -0
  647. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/bs.js +8 -0
  648. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/ca.js +8 -0
  649. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/cs.js +8 -0
  650. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/cy.js +8 -0
  651. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/da.js +8 -0
  652. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/de.js +8 -0
  653. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/el.js +8 -0
  654. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/en-au.js +8 -0
  655. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/en-ca.js +8 -0
  656. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/en-gb.js +8 -0
  657. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/en.js +8 -0
  658. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/eo.js +8 -0
  659. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/es.js +8 -0
  660. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/et.js +8 -0
  661. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/eu.js +8 -0
  662. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/fa.js +8 -0
  663. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/fi.js +8 -0
  664. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/fo.js +8 -0
  665. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/fr-ca.js +8 -0
  666. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/fr.js +8 -0
  667. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/gl.js +8 -0
  668. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/gu.js +8 -0
  669. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/he.js +8 -0
  670. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/hi.js +8 -0
  671. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/hr.js +8 -0
  672. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/hu.js +8 -0
  673. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/is.js +8 -0
  674. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/it.js +8 -0
  675. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/ja.js +8 -0
  676. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/ka.js +8 -0
  677. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/km.js +8 -0
  678. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/ko.js +8 -0
  679. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/ku.js +8 -0
  680. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/lt.js +8 -0
  681. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/lv.js +8 -0
  682. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/mk.js +8 -0
  683. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/mn.js +8 -0
  684. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/ms.js +8 -0
  685. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/nb.js +8 -0
  686. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/nl.js +8 -0
  687. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/no.js +8 -0
  688. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/pl.js +8 -0
  689. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/pt-br.js +8 -0
  690. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/pt.js +8 -0
  691. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/ro.js +8 -0
  692. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/ru.js +8 -0
  693. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/sk.js +8 -0
  694. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/sl.js +8 -0
  695. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/sr-latn.js +8 -0
  696. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/sr.js +8 -0
  697. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/sv.js +8 -0
  698. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/th.js +8 -0
  699. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/tr.js +8 -0
  700. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/ug.js +8 -0
  701. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/uk.js +8 -0
  702. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/vi.js +8 -0
  703. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/zh-cn.js +8 -0
  704. data/app/assets/javascripts/ckeditor/plugins/maximize/lang/zh.js +8 -0
  705. data/app/assets/javascripts/ckeditor/plugins/maximize/plugin.js +301 -0
  706. data/app/assets/javascripts/ckeditor/plugins/pagebreak/icons/pagebreak-rtl.png +0 -0
  707. data/app/assets/javascripts/ckeditor/plugins/pagebreak/icons/pagebreak.png +0 -0
  708. data/app/assets/javascripts/ckeditor/plugins/pagebreak/images/pagebreak.gif +0 -0
  709. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/af.js +8 -0
  710. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/ar.js +8 -0
  711. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/bg.js +8 -0
  712. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/bn.js +8 -0
  713. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/bs.js +8 -0
  714. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/ca.js +8 -0
  715. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/cs.js +8 -0
  716. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/cy.js +8 -0
  717. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/da.js +8 -0
  718. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/de.js +8 -0
  719. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/el.js +8 -0
  720. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/en-au.js +8 -0
  721. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/en-ca.js +8 -0
  722. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/en-gb.js +8 -0
  723. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/en.js +8 -0
  724. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/eo.js +8 -0
  725. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/es.js +8 -0
  726. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/et.js +8 -0
  727. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/eu.js +8 -0
  728. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/fa.js +8 -0
  729. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/fi.js +8 -0
  730. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/fo.js +8 -0
  731. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/fr-ca.js +8 -0
  732. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/fr.js +8 -0
  733. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/gl.js +8 -0
  734. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/gu.js +8 -0
  735. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/he.js +8 -0
  736. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/hi.js +8 -0
  737. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/hr.js +8 -0
  738. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/hu.js +8 -0
  739. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/is.js +8 -0
  740. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/it.js +8 -0
  741. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/ja.js +8 -0
  742. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/ka.js +8 -0
  743. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/km.js +8 -0
  744. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/ko.js +8 -0
  745. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/ku.js +8 -0
  746. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/lt.js +8 -0
  747. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/lv.js +8 -0
  748. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/mk.js +8 -0
  749. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/mn.js +8 -0
  750. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/ms.js +8 -0
  751. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/nb.js +8 -0
  752. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/nl.js +8 -0
  753. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/no.js +8 -0
  754. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/pl.js +8 -0
  755. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/pt-br.js +8 -0
  756. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/pt.js +8 -0
  757. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/ro.js +8 -0
  758. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/ru.js +8 -0
  759. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/sk.js +8 -0
  760. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/sl.js +8 -0
  761. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/sr-latn.js +8 -0
  762. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/sr.js +8 -0
  763. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/sv.js +8 -0
  764. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/th.js +8 -0
  765. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/tr.js +8 -0
  766. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/ug.js +8 -0
  767. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/uk.js +8 -0
  768. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/vi.js +8 -0
  769. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/zh-cn.js +8 -0
  770. data/app/assets/javascripts/ckeditor/plugins/pagebreak/lang/zh.js +8 -0
  771. data/app/assets/javascripts/ckeditor/plugins/pagebreak/plugin.js +129 -0
  772. data/app/assets/javascripts/ckeditor/plugins/panelbutton/plugin.js +138 -0
  773. data/app/assets/javascripts/ckeditor/plugins/preview/icons/preview-rtl.png +0 -0
  774. data/app/assets/javascripts/ckeditor/plugins/preview/icons/preview.png +0 -0
  775. data/app/assets/javascripts/ckeditor/plugins/preview/lang/af.js +7 -0
  776. data/app/assets/javascripts/ckeditor/plugins/preview/lang/ar.js +7 -0
  777. data/app/assets/javascripts/ckeditor/plugins/preview/lang/bg.js +7 -0
  778. data/app/assets/javascripts/ckeditor/plugins/preview/lang/bn.js +7 -0
  779. data/app/assets/javascripts/ckeditor/plugins/preview/lang/bs.js +7 -0
  780. data/app/assets/javascripts/ckeditor/plugins/preview/lang/ca.js +7 -0
  781. data/app/assets/javascripts/ckeditor/plugins/preview/lang/cs.js +7 -0
  782. data/app/assets/javascripts/ckeditor/plugins/preview/lang/cy.js +7 -0
  783. data/app/assets/javascripts/ckeditor/plugins/preview/lang/da.js +7 -0
  784. data/app/assets/javascripts/ckeditor/plugins/preview/lang/de.js +7 -0
  785. data/app/assets/javascripts/ckeditor/plugins/preview/lang/el.js +7 -0
  786. data/app/assets/javascripts/ckeditor/plugins/preview/lang/en-au.js +7 -0
  787. data/app/assets/javascripts/ckeditor/plugins/preview/lang/en-ca.js +7 -0
  788. data/app/assets/javascripts/ckeditor/plugins/preview/lang/en-gb.js +7 -0
  789. data/app/assets/javascripts/ckeditor/plugins/preview/lang/en.js +7 -0
  790. data/app/assets/javascripts/ckeditor/plugins/preview/lang/eo.js +7 -0
  791. data/app/assets/javascripts/ckeditor/plugins/preview/lang/es.js +7 -0
  792. data/app/assets/javascripts/ckeditor/plugins/preview/lang/et.js +7 -0
  793. data/app/assets/javascripts/ckeditor/plugins/preview/lang/eu.js +7 -0
  794. data/app/assets/javascripts/ckeditor/plugins/preview/lang/fa.js +7 -0
  795. data/app/assets/javascripts/ckeditor/plugins/preview/lang/fi.js +7 -0
  796. data/app/assets/javascripts/ckeditor/plugins/preview/lang/fo.js +7 -0
  797. data/app/assets/javascripts/ckeditor/plugins/preview/lang/fr-ca.js +7 -0
  798. data/app/assets/javascripts/ckeditor/plugins/preview/lang/fr.js +7 -0
  799. data/app/assets/javascripts/ckeditor/plugins/preview/lang/gl.js +7 -0
  800. data/app/assets/javascripts/ckeditor/plugins/preview/lang/gu.js +7 -0
  801. data/app/assets/javascripts/ckeditor/plugins/preview/lang/he.js +7 -0
  802. data/app/assets/javascripts/ckeditor/plugins/preview/lang/hi.js +7 -0
  803. data/app/assets/javascripts/ckeditor/plugins/preview/lang/hr.js +7 -0
  804. data/app/assets/javascripts/ckeditor/plugins/preview/lang/hu.js +7 -0
  805. data/app/assets/javascripts/ckeditor/plugins/preview/lang/is.js +7 -0
  806. data/app/assets/javascripts/ckeditor/plugins/preview/lang/it.js +7 -0
  807. data/app/assets/javascripts/ckeditor/plugins/preview/lang/ja.js +7 -0
  808. data/app/assets/javascripts/ckeditor/plugins/preview/lang/ka.js +7 -0
  809. data/app/assets/javascripts/ckeditor/plugins/preview/lang/km.js +7 -0
  810. data/app/assets/javascripts/ckeditor/plugins/preview/lang/ko.js +7 -0
  811. data/app/assets/javascripts/ckeditor/plugins/preview/lang/ku.js +7 -0
  812. data/app/assets/javascripts/ckeditor/plugins/preview/lang/lt.js +7 -0
  813. data/app/assets/javascripts/ckeditor/plugins/preview/lang/lv.js +7 -0
  814. data/app/assets/javascripts/ckeditor/plugins/preview/lang/mk.js +7 -0
  815. data/app/assets/javascripts/ckeditor/plugins/preview/lang/mn.js +7 -0
  816. data/app/assets/javascripts/ckeditor/plugins/preview/lang/ms.js +7 -0
  817. data/app/assets/javascripts/ckeditor/plugins/preview/lang/nb.js +7 -0
  818. data/app/assets/javascripts/ckeditor/plugins/preview/lang/nl.js +7 -0
  819. data/app/assets/javascripts/ckeditor/plugins/preview/lang/no.js +7 -0
  820. data/app/assets/javascripts/ckeditor/plugins/preview/lang/pl.js +7 -0
  821. data/app/assets/javascripts/ckeditor/plugins/preview/lang/pt-br.js +7 -0
  822. data/app/assets/javascripts/ckeditor/plugins/preview/lang/pt.js +7 -0
  823. data/app/assets/javascripts/ckeditor/plugins/preview/lang/ro.js +7 -0
  824. data/app/assets/javascripts/ckeditor/plugins/preview/lang/ru.js +7 -0
  825. data/app/assets/javascripts/ckeditor/plugins/preview/lang/sk.js +7 -0
  826. data/app/assets/javascripts/ckeditor/plugins/preview/lang/sl.js +7 -0
  827. data/app/assets/javascripts/ckeditor/plugins/preview/lang/sr-latn.js +7 -0
  828. data/app/assets/javascripts/ckeditor/plugins/preview/lang/sr.js +7 -0
  829. data/app/assets/javascripts/ckeditor/plugins/preview/lang/sv.js +7 -0
  830. data/app/assets/javascripts/ckeditor/plugins/preview/lang/th.js +7 -0
  831. data/app/assets/javascripts/ckeditor/plugins/preview/lang/tr.js +7 -0
  832. data/app/assets/javascripts/ckeditor/plugins/preview/lang/ug.js +7 -0
  833. data/app/assets/javascripts/ckeditor/plugins/preview/lang/uk.js +7 -0
  834. data/app/assets/javascripts/ckeditor/plugins/preview/lang/vi.js +7 -0
  835. data/app/assets/javascripts/ckeditor/plugins/preview/lang/zh-cn.js +7 -0
  836. data/app/assets/javascripts/ckeditor/plugins/preview/lang/zh.js +7 -0
  837. data/app/assets/javascripts/ckeditor/plugins/preview/plugin.js +117 -0
  838. data/app/assets/javascripts/ckeditor/plugins/preview/preview.html +10 -0
  839. data/app/assets/javascripts/ckeditor/plugins/print/icons/print.png +0 -0
  840. data/app/assets/javascripts/ckeditor/plugins/print/lang/af.js +7 -0
  841. data/app/assets/javascripts/ckeditor/plugins/print/lang/ar.js +7 -0
  842. data/app/assets/javascripts/ckeditor/plugins/print/lang/bg.js +7 -0
  843. data/app/assets/javascripts/ckeditor/plugins/print/lang/bn.js +7 -0
  844. data/app/assets/javascripts/ckeditor/plugins/print/lang/bs.js +7 -0
  845. data/app/assets/javascripts/ckeditor/plugins/print/lang/ca.js +7 -0
  846. data/app/assets/javascripts/ckeditor/plugins/print/lang/cs.js +7 -0
  847. data/app/assets/javascripts/ckeditor/plugins/print/lang/cy.js +7 -0
  848. data/app/assets/javascripts/ckeditor/plugins/print/lang/da.js +7 -0
  849. data/app/assets/javascripts/ckeditor/plugins/print/lang/de.js +7 -0
  850. data/app/assets/javascripts/ckeditor/plugins/print/lang/el.js +7 -0
  851. data/app/assets/javascripts/ckeditor/plugins/print/lang/en-au.js +7 -0
  852. data/app/assets/javascripts/ckeditor/plugins/print/lang/en-ca.js +7 -0
  853. data/app/assets/javascripts/ckeditor/plugins/print/lang/en-gb.js +7 -0
  854. data/app/assets/javascripts/ckeditor/plugins/print/lang/en.js +7 -0
  855. data/app/assets/javascripts/ckeditor/plugins/print/lang/eo.js +7 -0
  856. data/app/assets/javascripts/ckeditor/plugins/print/lang/es.js +7 -0
  857. data/app/assets/javascripts/ckeditor/plugins/print/lang/et.js +7 -0
  858. data/app/assets/javascripts/ckeditor/plugins/print/lang/eu.js +7 -0
  859. data/app/assets/javascripts/ckeditor/plugins/print/lang/fa.js +7 -0
  860. data/app/assets/javascripts/ckeditor/plugins/print/lang/fi.js +7 -0
  861. data/app/assets/javascripts/ckeditor/plugins/print/lang/fo.js +7 -0
  862. data/app/assets/javascripts/ckeditor/plugins/print/lang/fr-ca.js +7 -0
  863. data/app/assets/javascripts/ckeditor/plugins/print/lang/fr.js +7 -0
  864. data/app/assets/javascripts/ckeditor/plugins/print/lang/gl.js +7 -0
  865. data/app/assets/javascripts/ckeditor/plugins/print/lang/gu.js +7 -0
  866. data/app/assets/javascripts/ckeditor/plugins/print/lang/he.js +7 -0
  867. data/app/assets/javascripts/ckeditor/plugins/print/lang/hi.js +7 -0
  868. data/app/assets/javascripts/ckeditor/plugins/print/lang/hr.js +7 -0
  869. data/app/assets/javascripts/ckeditor/plugins/print/lang/hu.js +7 -0
  870. data/app/assets/javascripts/ckeditor/plugins/print/lang/is.js +7 -0
  871. data/app/assets/javascripts/ckeditor/plugins/print/lang/it.js +7 -0
  872. data/app/assets/javascripts/ckeditor/plugins/print/lang/ja.js +7 -0
  873. data/app/assets/javascripts/ckeditor/plugins/print/lang/ka.js +7 -0
  874. data/app/assets/javascripts/ckeditor/plugins/print/lang/km.js +7 -0
  875. data/app/assets/javascripts/ckeditor/plugins/print/lang/ko.js +7 -0
  876. data/app/assets/javascripts/ckeditor/plugins/print/lang/ku.js +7 -0
  877. data/app/assets/javascripts/ckeditor/plugins/print/lang/lt.js +7 -0
  878. data/app/assets/javascripts/ckeditor/plugins/print/lang/lv.js +7 -0
  879. data/app/assets/javascripts/ckeditor/plugins/print/lang/mk.js +7 -0
  880. data/app/assets/javascripts/ckeditor/plugins/print/lang/mn.js +7 -0
  881. data/app/assets/javascripts/ckeditor/plugins/print/lang/ms.js +7 -0
  882. data/app/assets/javascripts/ckeditor/plugins/print/lang/nb.js +7 -0
  883. data/app/assets/javascripts/ckeditor/plugins/print/lang/nl.js +7 -0
  884. data/app/assets/javascripts/ckeditor/plugins/print/lang/no.js +7 -0
  885. data/app/assets/javascripts/ckeditor/plugins/print/lang/pl.js +7 -0
  886. data/app/assets/javascripts/ckeditor/plugins/print/lang/pt-br.js +7 -0
  887. data/app/assets/javascripts/ckeditor/plugins/print/lang/pt.js +7 -0
  888. data/app/assets/javascripts/ckeditor/plugins/print/lang/ro.js +7 -0
  889. data/app/assets/javascripts/ckeditor/plugins/print/lang/ru.js +7 -0
  890. data/app/assets/javascripts/ckeditor/plugins/print/lang/sk.js +7 -0
  891. data/app/assets/javascripts/ckeditor/plugins/print/lang/sl.js +7 -0
  892. data/app/assets/javascripts/ckeditor/plugins/print/lang/sr-latn.js +7 -0
  893. data/app/assets/javascripts/ckeditor/plugins/print/lang/sr.js +7 -0
  894. data/app/assets/javascripts/ckeditor/plugins/print/lang/sv.js +7 -0
  895. data/app/assets/javascripts/ckeditor/plugins/print/lang/th.js +7 -0
  896. data/app/assets/javascripts/ckeditor/plugins/print/lang/tr.js +7 -0
  897. data/app/assets/javascripts/ckeditor/plugins/print/lang/ug.js +7 -0
  898. data/app/assets/javascripts/ckeditor/plugins/print/lang/uk.js +7 -0
  899. data/app/assets/javascripts/ckeditor/plugins/print/lang/vi.js +7 -0
  900. data/app/assets/javascripts/ckeditor/plugins/print/lang/zh-cn.js +7 -0
  901. data/app/assets/javascripts/ckeditor/plugins/print/lang/zh.js +7 -0
  902. data/app/assets/javascripts/ckeditor/plugins/print/plugin.js +44 -0
  903. data/app/assets/javascripts/ckeditor/plugins/save/icons/save.png +0 -0
  904. data/app/assets/javascripts/ckeditor/plugins/save/lang/af.js +7 -0
  905. data/app/assets/javascripts/ckeditor/plugins/save/lang/ar.js +7 -0
  906. data/app/assets/javascripts/ckeditor/plugins/save/lang/bg.js +7 -0
  907. data/app/assets/javascripts/ckeditor/plugins/save/lang/bn.js +7 -0
  908. data/app/assets/javascripts/ckeditor/plugins/save/lang/bs.js +7 -0
  909. data/app/assets/javascripts/ckeditor/plugins/save/lang/ca.js +7 -0
  910. data/app/assets/javascripts/ckeditor/plugins/save/lang/cs.js +7 -0
  911. data/app/assets/javascripts/ckeditor/plugins/save/lang/cy.js +7 -0
  912. data/app/assets/javascripts/ckeditor/plugins/save/lang/da.js +7 -0
  913. data/app/assets/javascripts/ckeditor/plugins/save/lang/de.js +7 -0
  914. data/app/assets/javascripts/ckeditor/plugins/save/lang/el.js +7 -0
  915. data/app/assets/javascripts/ckeditor/plugins/save/lang/en-au.js +7 -0
  916. data/app/assets/javascripts/ckeditor/plugins/save/lang/en-ca.js +7 -0
  917. data/app/assets/javascripts/ckeditor/plugins/save/lang/en-gb.js +7 -0
  918. data/app/assets/javascripts/ckeditor/plugins/save/lang/en.js +7 -0
  919. data/app/assets/javascripts/ckeditor/plugins/save/lang/eo.js +7 -0
  920. data/app/assets/javascripts/ckeditor/plugins/save/lang/es.js +7 -0
  921. data/app/assets/javascripts/ckeditor/plugins/save/lang/et.js +7 -0
  922. data/app/assets/javascripts/ckeditor/plugins/save/lang/eu.js +7 -0
  923. data/app/assets/javascripts/ckeditor/plugins/save/lang/fa.js +7 -0
  924. data/app/assets/javascripts/ckeditor/plugins/save/lang/fi.js +7 -0
  925. data/app/assets/javascripts/ckeditor/plugins/save/lang/fo.js +7 -0
  926. data/app/assets/javascripts/ckeditor/plugins/save/lang/fr-ca.js +7 -0
  927. data/app/assets/javascripts/ckeditor/plugins/save/lang/fr.js +7 -0
  928. data/app/assets/javascripts/ckeditor/plugins/save/lang/gl.js +7 -0
  929. data/app/assets/javascripts/ckeditor/plugins/save/lang/gu.js +7 -0
  930. data/app/assets/javascripts/ckeditor/plugins/save/lang/he.js +7 -0
  931. data/app/assets/javascripts/ckeditor/plugins/save/lang/hi.js +7 -0
  932. data/app/assets/javascripts/ckeditor/plugins/save/lang/hr.js +7 -0
  933. data/app/assets/javascripts/ckeditor/plugins/save/lang/hu.js +7 -0
  934. data/app/assets/javascripts/ckeditor/plugins/save/lang/is.js +7 -0
  935. data/app/assets/javascripts/ckeditor/plugins/save/lang/it.js +7 -0
  936. data/app/assets/javascripts/ckeditor/plugins/save/lang/ja.js +7 -0
  937. data/app/assets/javascripts/ckeditor/plugins/save/lang/ka.js +7 -0
  938. data/app/assets/javascripts/ckeditor/plugins/save/lang/km.js +7 -0
  939. data/app/assets/javascripts/ckeditor/plugins/save/lang/ko.js +7 -0
  940. data/app/assets/javascripts/ckeditor/plugins/save/lang/ku.js +7 -0
  941. data/app/assets/javascripts/ckeditor/plugins/save/lang/lt.js +7 -0
  942. data/app/assets/javascripts/ckeditor/plugins/save/lang/lv.js +7 -0
  943. data/app/assets/javascripts/ckeditor/plugins/save/lang/mk.js +7 -0
  944. data/app/assets/javascripts/ckeditor/plugins/save/lang/mn.js +7 -0
  945. data/app/assets/javascripts/ckeditor/plugins/save/lang/ms.js +7 -0
  946. data/app/assets/javascripts/ckeditor/plugins/save/lang/nb.js +7 -0
  947. data/app/assets/javascripts/ckeditor/plugins/save/lang/nl.js +7 -0
  948. data/app/assets/javascripts/ckeditor/plugins/save/lang/no.js +7 -0
  949. data/app/assets/javascripts/ckeditor/plugins/save/lang/pl.js +7 -0
  950. data/app/assets/javascripts/ckeditor/plugins/save/lang/pt-br.js +7 -0
  951. data/app/assets/javascripts/ckeditor/plugins/save/lang/pt.js +7 -0
  952. data/app/assets/javascripts/ckeditor/plugins/save/lang/ro.js +7 -0
  953. data/app/assets/javascripts/ckeditor/plugins/save/lang/ru.js +7 -0
  954. data/app/assets/javascripts/ckeditor/plugins/save/lang/sk.js +7 -0
  955. data/app/assets/javascripts/ckeditor/plugins/save/lang/sl.js +7 -0
  956. data/app/assets/javascripts/ckeditor/plugins/save/lang/sr-latn.js +7 -0
  957. data/app/assets/javascripts/ckeditor/plugins/save/lang/sr.js +7 -0
  958. data/app/assets/javascripts/ckeditor/plugins/save/lang/sv.js +7 -0
  959. data/app/assets/javascripts/ckeditor/plugins/save/lang/th.js +7 -0
  960. data/app/assets/javascripts/ckeditor/plugins/save/lang/tr.js +7 -0
  961. data/app/assets/javascripts/ckeditor/plugins/save/lang/ug.js +7 -0
  962. data/app/assets/javascripts/ckeditor/plugins/save/lang/uk.js +7 -0
  963. data/app/assets/javascripts/ckeditor/plugins/save/lang/vi.js +7 -0
  964. data/app/assets/javascripts/ckeditor/plugins/save/lang/zh-cn.js +7 -0
  965. data/app/assets/javascripts/ckeditor/plugins/save/lang/zh.js +7 -0
  966. data/app/assets/javascripts/ckeditor/plugins/save/plugin.js +53 -0
  967. data/app/assets/javascripts/ckeditor/plugins/selectall/icons/selectall.png +0 -0
  968. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/af.js +7 -0
  969. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/ar.js +7 -0
  970. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/bg.js +7 -0
  971. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/bn.js +7 -0
  972. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/bs.js +7 -0
  973. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/ca.js +7 -0
  974. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/cs.js +7 -0
  975. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/cy.js +7 -0
  976. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/da.js +7 -0
  977. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/de.js +7 -0
  978. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/el.js +7 -0
  979. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/en-au.js +7 -0
  980. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/en-ca.js +7 -0
  981. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/en-gb.js +7 -0
  982. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/en.js +7 -0
  983. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/eo.js +7 -0
  984. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/es.js +7 -0
  985. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/et.js +7 -0
  986. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/eu.js +7 -0
  987. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/fa.js +7 -0
  988. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/fi.js +7 -0
  989. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/fo.js +7 -0
  990. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/fr-ca.js +7 -0
  991. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/fr.js +7 -0
  992. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/gl.js +7 -0
  993. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/gu.js +7 -0
  994. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/he.js +7 -0
  995. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/hi.js +7 -0
  996. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/hr.js +7 -0
  997. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/hu.js +7 -0
  998. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/is.js +7 -0
  999. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/it.js +7 -0
  1000. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/ja.js +7 -0
  1001. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/ka.js +7 -0
  1002. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/km.js +7 -0
  1003. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/ko.js +7 -0
  1004. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/ku.js +7 -0
  1005. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/lt.js +7 -0
  1006. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/lv.js +7 -0
  1007. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/mk.js +7 -0
  1008. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/mn.js +7 -0
  1009. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/ms.js +7 -0
  1010. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/nb.js +7 -0
  1011. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/nl.js +7 -0
  1012. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/no.js +7 -0
  1013. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/pl.js +7 -0
  1014. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/pt-br.js +7 -0
  1015. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/pt.js +7 -0
  1016. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/ro.js +7 -0
  1017. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/ru.js +7 -0
  1018. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/sk.js +7 -0
  1019. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/sl.js +7 -0
  1020. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/sr-latn.js +7 -0
  1021. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/sr.js +7 -0
  1022. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/sv.js +7 -0
  1023. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/th.js +7 -0
  1024. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/tr.js +7 -0
  1025. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/ug.js +7 -0
  1026. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/uk.js +7 -0
  1027. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/vi.js +7 -0
  1028. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/zh-cn.js +7 -0
  1029. data/app/assets/javascripts/ckeditor/plugins/selectall/lang/zh.js +7 -0
  1030. data/app/assets/javascripts/ckeditor/plugins/selectall/plugin.js +57 -0
  1031. data/app/assets/javascripts/ckeditor/plugins/showblocks/icons/showblocks-rtl.png +0 -0
  1032. data/app/assets/javascripts/ckeditor/plugins/showblocks/icons/showblocks.png +0 -0
  1033. data/app/assets/javascripts/ckeditor/plugins/showblocks/images/block_address.png +0 -0
  1034. data/app/assets/javascripts/ckeditor/plugins/showblocks/images/block_blockquote.png +0 -0
  1035. data/app/assets/javascripts/ckeditor/plugins/showblocks/images/block_div.png +0 -0
  1036. data/app/assets/javascripts/ckeditor/plugins/showblocks/images/block_h1.png +0 -0
  1037. data/app/assets/javascripts/ckeditor/plugins/showblocks/images/block_h2.png +0 -0
  1038. data/app/assets/javascripts/ckeditor/plugins/showblocks/images/block_h3.png +0 -0
  1039. data/app/assets/javascripts/ckeditor/plugins/showblocks/images/block_h4.png +0 -0
  1040. data/app/assets/javascripts/ckeditor/plugins/showblocks/images/block_h5.png +0 -0
  1041. data/app/assets/javascripts/ckeditor/plugins/showblocks/images/block_h6.png +0 -0
  1042. data/app/assets/javascripts/ckeditor/plugins/showblocks/images/block_p.png +0 -0
  1043. data/app/assets/javascripts/ckeditor/plugins/showblocks/images/block_pre.png +0 -0
  1044. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/af.js +7 -0
  1045. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/ar.js +7 -0
  1046. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/bg.js +7 -0
  1047. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/bn.js +7 -0
  1048. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/bs.js +7 -0
  1049. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/ca.js +7 -0
  1050. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/cs.js +7 -0
  1051. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/cy.js +7 -0
  1052. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/da.js +7 -0
  1053. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/de.js +7 -0
  1054. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/el.js +7 -0
  1055. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/en-au.js +7 -0
  1056. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/en-ca.js +7 -0
  1057. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/en-gb.js +7 -0
  1058. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/en.js +7 -0
  1059. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/eo.js +7 -0
  1060. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/es.js +7 -0
  1061. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/et.js +7 -0
  1062. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/eu.js +7 -0
  1063. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/fa.js +7 -0
  1064. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/fi.js +7 -0
  1065. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/fo.js +7 -0
  1066. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/fr-ca.js +7 -0
  1067. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/fr.js +7 -0
  1068. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/gl.js +7 -0
  1069. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/gu.js +7 -0
  1070. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/he.js +7 -0
  1071. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/hi.js +7 -0
  1072. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/hr.js +7 -0
  1073. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/hu.js +7 -0
  1074. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/is.js +7 -0
  1075. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/it.js +7 -0
  1076. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/ja.js +7 -0
  1077. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/ka.js +7 -0
  1078. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/km.js +7 -0
  1079. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/ko.js +7 -0
  1080. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/ku.js +7 -0
  1081. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/lt.js +7 -0
  1082. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/lv.js +7 -0
  1083. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/mk.js +7 -0
  1084. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/mn.js +7 -0
  1085. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/ms.js +7 -0
  1086. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/nb.js +7 -0
  1087. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/nl.js +7 -0
  1088. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/no.js +7 -0
  1089. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/pl.js +7 -0
  1090. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/pt-br.js +7 -0
  1091. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/pt.js +7 -0
  1092. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/ro.js +7 -0
  1093. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/ru.js +7 -0
  1094. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/sk.js +7 -0
  1095. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/sl.js +7 -0
  1096. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/sr-latn.js +7 -0
  1097. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/sr.js +7 -0
  1098. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/sv.js +7 -0
  1099. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/th.js +7 -0
  1100. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/tr.js +7 -0
  1101. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/ug.js +7 -0
  1102. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/uk.js +7 -0
  1103. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/vi.js +7 -0
  1104. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/zh-cn.js +7 -0
  1105. data/app/assets/javascripts/ckeditor/plugins/showblocks/lang/zh.js +7 -0
  1106. data/app/assets/javascripts/ckeditor/plugins/showblocks/plugin.js +182 -0
  1107. data/app/assets/javascripts/ckeditor/plugins/showborders/plugin.js +174 -0
  1108. data/app/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.css +84 -0
  1109. data/app/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.js +203 -0
  1110. data/app/assets/javascripts/ckeditor/plugins/templates/icons/templates-rtl.png +0 -0
  1111. data/app/assets/javascripts/ckeditor/plugins/templates/icons/templates.png +0 -0
  1112. data/app/assets/javascripts/ckeditor/plugins/templates/lang/af.js +12 -0
  1113. data/app/assets/javascripts/ckeditor/plugins/templates/lang/ar.js +12 -0
  1114. data/app/assets/javascripts/ckeditor/plugins/templates/lang/bg.js +12 -0
  1115. data/app/assets/javascripts/ckeditor/plugins/templates/lang/bn.js +12 -0
  1116. data/app/assets/javascripts/ckeditor/plugins/templates/lang/bs.js +12 -0
  1117. data/app/assets/javascripts/ckeditor/plugins/templates/lang/ca.js +12 -0
  1118. data/app/assets/javascripts/ckeditor/plugins/templates/lang/cs.js +12 -0
  1119. data/app/assets/javascripts/ckeditor/plugins/templates/lang/cy.js +12 -0
  1120. data/app/assets/javascripts/ckeditor/plugins/templates/lang/da.js +12 -0
  1121. data/app/assets/javascripts/ckeditor/plugins/templates/lang/de.js +12 -0
  1122. data/app/assets/javascripts/ckeditor/plugins/templates/lang/el.js +12 -0
  1123. data/app/assets/javascripts/ckeditor/plugins/templates/lang/en-au.js +12 -0
  1124. data/app/assets/javascripts/ckeditor/plugins/templates/lang/en-ca.js +12 -0
  1125. data/app/assets/javascripts/ckeditor/plugins/templates/lang/en-gb.js +12 -0
  1126. data/app/assets/javascripts/ckeditor/plugins/templates/lang/en.js +12 -0
  1127. data/app/assets/javascripts/ckeditor/plugins/templates/lang/eo.js +12 -0
  1128. data/app/assets/javascripts/ckeditor/plugins/templates/lang/es.js +12 -0
  1129. data/app/assets/javascripts/ckeditor/plugins/templates/lang/et.js +12 -0
  1130. data/app/assets/javascripts/ckeditor/plugins/templates/lang/eu.js +12 -0
  1131. data/app/assets/javascripts/ckeditor/plugins/templates/lang/fa.js +12 -0
  1132. data/app/assets/javascripts/ckeditor/plugins/templates/lang/fi.js +12 -0
  1133. data/app/assets/javascripts/ckeditor/plugins/templates/lang/fo.js +12 -0
  1134. data/app/assets/javascripts/ckeditor/plugins/templates/lang/fr-ca.js +12 -0
  1135. data/app/assets/javascripts/ckeditor/plugins/templates/lang/fr.js +12 -0
  1136. data/app/assets/javascripts/ckeditor/plugins/templates/lang/gl.js +12 -0
  1137. data/app/assets/javascripts/ckeditor/plugins/templates/lang/gu.js +12 -0
  1138. data/app/assets/javascripts/ckeditor/plugins/templates/lang/he.js +12 -0
  1139. data/app/assets/javascripts/ckeditor/plugins/templates/lang/hi.js +12 -0
  1140. data/app/assets/javascripts/ckeditor/plugins/templates/lang/hr.js +12 -0
  1141. data/app/assets/javascripts/ckeditor/plugins/templates/lang/hu.js +12 -0
  1142. data/app/assets/javascripts/ckeditor/plugins/templates/lang/is.js +12 -0
  1143. data/app/assets/javascripts/ckeditor/plugins/templates/lang/it.js +12 -0
  1144. data/app/assets/javascripts/ckeditor/plugins/templates/lang/ja.js +12 -0
  1145. data/app/assets/javascripts/ckeditor/plugins/templates/lang/ka.js +12 -0
  1146. data/app/assets/javascripts/ckeditor/plugins/templates/lang/km.js +12 -0
  1147. data/app/assets/javascripts/ckeditor/plugins/templates/lang/ko.js +12 -0
  1148. data/app/assets/javascripts/ckeditor/plugins/templates/lang/ku.js +12 -0
  1149. data/app/assets/javascripts/ckeditor/plugins/templates/lang/lt.js +12 -0
  1150. data/app/assets/javascripts/ckeditor/plugins/templates/lang/lv.js +12 -0
  1151. data/app/assets/javascripts/ckeditor/plugins/templates/lang/mk.js +12 -0
  1152. data/app/assets/javascripts/ckeditor/plugins/templates/lang/mn.js +12 -0
  1153. data/app/assets/javascripts/ckeditor/plugins/templates/lang/ms.js +12 -0
  1154. data/app/assets/javascripts/ckeditor/plugins/templates/lang/nb.js +12 -0
  1155. data/app/assets/javascripts/ckeditor/plugins/templates/lang/nl.js +12 -0
  1156. data/app/assets/javascripts/ckeditor/plugins/templates/lang/no.js +12 -0
  1157. data/app/assets/javascripts/ckeditor/plugins/templates/lang/pl.js +12 -0
  1158. data/app/assets/javascripts/ckeditor/plugins/templates/lang/pt-br.js +12 -0
  1159. data/app/assets/javascripts/ckeditor/plugins/templates/lang/pt.js +12 -0
  1160. data/app/assets/javascripts/ckeditor/plugins/templates/lang/ro.js +12 -0
  1161. data/app/assets/javascripts/ckeditor/plugins/templates/lang/ru.js +12 -0
  1162. data/app/assets/javascripts/ckeditor/plugins/templates/lang/sk.js +12 -0
  1163. data/app/assets/javascripts/ckeditor/plugins/templates/lang/sl.js +12 -0
  1164. data/app/assets/javascripts/ckeditor/plugins/templates/lang/sr-latn.js +12 -0
  1165. data/app/assets/javascripts/ckeditor/plugins/templates/lang/sr.js +12 -0
  1166. data/app/assets/javascripts/ckeditor/plugins/templates/lang/sv.js +12 -0
  1167. data/app/assets/javascripts/ckeditor/plugins/templates/lang/th.js +12 -0
  1168. data/app/assets/javascripts/ckeditor/plugins/templates/lang/tr.js +12 -0
  1169. data/app/assets/javascripts/ckeditor/plugins/templates/lang/ug.js +12 -0
  1170. data/app/assets/javascripts/ckeditor/plugins/templates/lang/uk.js +12 -0
  1171. data/app/assets/javascripts/ckeditor/plugins/templates/lang/vi.js +12 -0
  1172. data/app/assets/javascripts/ckeditor/plugins/templates/lang/zh-cn.js +12 -0
  1173. data/app/assets/javascripts/ckeditor/plugins/templates/lang/zh.js +12 -0
  1174. data/app/assets/javascripts/ckeditor/plugins/templates/plugin.js +90 -0
  1175. data/app/assets/javascripts/ckeditor/plugins/templates/templates/default.js +89 -0
  1176. data/app/assets/javascripts/ckeditor/plugins/templates/templates/images/template1.gif +0 -0
  1177. data/app/assets/javascripts/ckeditor/plugins/templates/templates/images/template2.gif +0 -0
  1178. data/app/assets/javascripts/ckeditor/plugins/templates/templates/images/template3.gif +0 -0
  1179. data/app/assets/javascripts/ckeditor/plugins/undo/icons/redo-rtl.png +0 -0
  1180. data/app/assets/javascripts/ckeditor/plugins/undo/icons/redo.png +0 -0
  1181. data/app/assets/javascripts/ckeditor/plugins/undo/icons/undo-rtl.png +0 -0
  1182. data/app/assets/javascripts/ckeditor/plugins/undo/icons/undo.png +0 -0
  1183. data/app/assets/javascripts/ckeditor/plugins/undo/lang/af.js +8 -0
  1184. data/app/assets/javascripts/ckeditor/plugins/undo/lang/ar.js +8 -0
  1185. data/app/assets/javascripts/ckeditor/plugins/undo/lang/bg.js +8 -0
  1186. data/app/assets/javascripts/ckeditor/plugins/undo/lang/bn.js +8 -0
  1187. data/app/assets/javascripts/ckeditor/plugins/undo/lang/bs.js +8 -0
  1188. data/app/assets/javascripts/ckeditor/plugins/undo/lang/ca.js +8 -0
  1189. data/app/assets/javascripts/ckeditor/plugins/undo/lang/cs.js +8 -0
  1190. data/app/assets/javascripts/ckeditor/plugins/undo/lang/cy.js +8 -0
  1191. data/app/assets/javascripts/ckeditor/plugins/undo/lang/da.js +8 -0
  1192. data/app/assets/javascripts/ckeditor/plugins/undo/lang/de.js +8 -0
  1193. data/app/assets/javascripts/ckeditor/plugins/undo/lang/el.js +8 -0
  1194. data/app/assets/javascripts/ckeditor/plugins/undo/lang/en-au.js +8 -0
  1195. data/app/assets/javascripts/ckeditor/plugins/undo/lang/en-ca.js +8 -0
  1196. data/app/assets/javascripts/ckeditor/plugins/undo/lang/en-gb.js +8 -0
  1197. data/app/assets/javascripts/ckeditor/plugins/undo/lang/en.js +8 -0
  1198. data/app/assets/javascripts/ckeditor/plugins/undo/lang/eo.js +8 -0
  1199. data/app/assets/javascripts/ckeditor/plugins/undo/lang/es.js +8 -0
  1200. data/app/assets/javascripts/ckeditor/plugins/undo/lang/et.js +8 -0
  1201. data/app/assets/javascripts/ckeditor/plugins/undo/lang/eu.js +8 -0
  1202. data/app/assets/javascripts/ckeditor/plugins/undo/lang/fa.js +8 -0
  1203. data/app/assets/javascripts/ckeditor/plugins/undo/lang/fi.js +8 -0
  1204. data/app/assets/javascripts/ckeditor/plugins/undo/lang/fo.js +8 -0
  1205. data/app/assets/javascripts/ckeditor/plugins/undo/lang/fr-ca.js +8 -0
  1206. data/app/assets/javascripts/ckeditor/plugins/undo/lang/fr.js +8 -0
  1207. data/app/assets/javascripts/ckeditor/plugins/undo/lang/gl.js +8 -0
  1208. data/app/assets/javascripts/ckeditor/plugins/undo/lang/gu.js +8 -0
  1209. data/app/assets/javascripts/ckeditor/plugins/undo/lang/he.js +8 -0
  1210. data/app/assets/javascripts/ckeditor/plugins/undo/lang/hi.js +8 -0
  1211. data/app/assets/javascripts/ckeditor/plugins/undo/lang/hr.js +8 -0
  1212. data/app/assets/javascripts/ckeditor/plugins/undo/lang/hu.js +8 -0
  1213. data/app/assets/javascripts/ckeditor/plugins/undo/lang/is.js +8 -0
  1214. data/app/assets/javascripts/ckeditor/plugins/undo/lang/it.js +8 -0
  1215. data/app/assets/javascripts/ckeditor/plugins/undo/lang/ja.js +8 -0
  1216. data/app/assets/javascripts/ckeditor/plugins/undo/lang/ka.js +8 -0
  1217. data/app/assets/javascripts/ckeditor/plugins/undo/lang/km.js +8 -0
  1218. data/app/assets/javascripts/ckeditor/plugins/undo/lang/ko.js +8 -0
  1219. data/app/assets/javascripts/ckeditor/plugins/undo/lang/ku.js +8 -0
  1220. data/app/assets/javascripts/ckeditor/plugins/undo/lang/lt.js +8 -0
  1221. data/app/assets/javascripts/ckeditor/plugins/undo/lang/lv.js +8 -0
  1222. data/app/assets/javascripts/ckeditor/plugins/undo/lang/mk.js +8 -0
  1223. data/app/assets/javascripts/ckeditor/plugins/undo/lang/mn.js +8 -0
  1224. data/app/assets/javascripts/ckeditor/plugins/undo/lang/ms.js +8 -0
  1225. data/app/assets/javascripts/ckeditor/plugins/undo/lang/nb.js +8 -0
  1226. data/app/assets/javascripts/ckeditor/plugins/undo/lang/nl.js +8 -0
  1227. data/app/assets/javascripts/ckeditor/plugins/undo/lang/no.js +8 -0
  1228. data/app/assets/javascripts/ckeditor/plugins/undo/lang/pl.js +8 -0
  1229. data/app/assets/javascripts/ckeditor/plugins/undo/lang/pt-br.js +8 -0
  1230. data/app/assets/javascripts/ckeditor/plugins/undo/lang/pt.js +8 -0
  1231. data/app/assets/javascripts/ckeditor/plugins/undo/lang/ro.js +8 -0
  1232. data/app/assets/javascripts/ckeditor/plugins/undo/lang/ru.js +8 -0
  1233. data/app/assets/javascripts/ckeditor/plugins/undo/lang/sk.js +8 -0
  1234. data/app/assets/javascripts/ckeditor/plugins/undo/lang/sl.js +8 -0
  1235. data/app/assets/javascripts/ckeditor/plugins/undo/lang/sr-latn.js +8 -0
  1236. data/app/assets/javascripts/ckeditor/plugins/undo/lang/sr.js +8 -0
  1237. data/app/assets/javascripts/ckeditor/plugins/undo/lang/sv.js +8 -0
  1238. data/app/assets/javascripts/ckeditor/plugins/undo/lang/th.js +8 -0
  1239. data/app/assets/javascripts/ckeditor/plugins/undo/lang/tr.js +8 -0
  1240. data/app/assets/javascripts/ckeditor/plugins/undo/lang/ug.js +8 -0
  1241. data/app/assets/javascripts/ckeditor/plugins/undo/lang/uk.js +8 -0
  1242. data/app/assets/javascripts/ckeditor/plugins/undo/lang/vi.js +8 -0
  1243. data/app/assets/javascripts/ckeditor/plugins/undo/lang/zh-cn.js +8 -0
  1244. data/app/assets/javascripts/ckeditor/plugins/undo/lang/zh.js +8 -0
  1245. data/app/assets/javascripts/ckeditor/plugins/undo/plugin.js +639 -0
  1246. data/app/assets/javascripts/ckeditor/skins/moono/dialog.css.scss +8 -0
  1247. data/app/assets/javascripts/ckeditor/skins/moono/dialog_ie.css.scss +8 -0
  1248. data/app/assets/javascripts/ckeditor/skins/moono/dialog_ie7.css.scss +8 -0
  1249. data/app/assets/javascripts/ckeditor/skins/moono/dialog_ie8.css.scss +8 -0
  1250. data/app/assets/javascripts/ckeditor/skins/moono/dialog_iequirks.css.scss +8 -0
  1251. data/app/assets/javascripts/ckeditor/skins/moono/dialog_opera.css.scss +8 -0
  1252. data/app/assets/javascripts/ckeditor/skins/moono/editor.css.scss +8 -0
  1253. data/app/assets/javascripts/ckeditor/skins/moono/editor_gecko.css.scss +8 -0
  1254. data/app/assets/javascripts/ckeditor/skins/moono/editor_ie.css.scss +8 -0
  1255. data/app/assets/javascripts/ckeditor/skins/moono/editor_ie7.css.scss +8 -0
  1256. data/app/assets/javascripts/ckeditor/skins/moono/editor_ie8.css.scss +8 -0
  1257. data/app/assets/javascripts/ckeditor/skins/moono/editor_iequirks.css.scss +8 -0
  1258. data/app/assets/javascripts/ckeditor/skins/moono/icons.png +0 -0
  1259. data/app/assets/javascripts/ckeditor/skins/moono/images/arrow.png +0 -0
  1260. data/app/assets/javascripts/ckeditor/skins/moono/images/close.png +0 -0
  1261. data/app/assets/javascripts/ckeditor/skins/moono/images/mini.png +0 -0
  1262. data/app/assets/javascripts/ckeditor/skins/moono/readme.md +51 -0
  1263. data/app/assets/javascripts/index_slider.js.coffee +142 -0
  1264. data/app/assets/javascripts/partners.js.coffee +113 -0
  1265. data/app/assets/javascripts/rdcms/active_admin.js +188 -0
  1266. data/app/assets/javascripts/rdcms/admin/farbtastic.js +345 -0
  1267. data/app/assets/javascripts/rdcms/admin/formstyle.js.coffee +70 -0
  1268. data/app/assets/javascripts/rdcms/admin/keymaster.js +185 -0
  1269. data/app/assets/javascripts/rdcms/admin/moment.js +6 -0
  1270. data/app/assets/javascripts/rdcms/application.js +81 -0
  1271. data/app/assets/javascripts/rdcms/full_screen.js +12 -0
  1272. data/app/assets/javascripts/rdcms/gmaps.js +1683 -0
  1273. data/app/assets/javascripts/rdcms/init/bootstrap.js.coffee +13 -0
  1274. data/app/assets/javascripts/rdcms/init/hash.js +164 -0
  1275. data/app/assets/javascripts/rdcms/init/select2.js +15 -0
  1276. data/app/assets/javascripts/rdcms/init/social.js.coffee +84 -0
  1277. data/app/assets/javascripts/rdcms/plugins/interface.js +7 -0
  1278. data/app/assets/javascripts/rdcms/plugins/interface/accordion.js +165 -0
  1279. data/app/assets/javascripts/rdcms/plugins/interface/carousel.js +257 -0
  1280. data/app/assets/javascripts/rdcms/plugins/interface/easing.js +124 -0
  1281. data/app/assets/javascripts/rdcms/plugins/interface/fisheye.js +146 -0
  1282. data/app/assets/javascripts/rdcms/plugins/interface/iautocompleter.js +536 -0
  1283. data/app/assets/javascripts/rdcms/plugins/interface/iautoscroller.js +112 -0
  1284. data/app/assets/javascripts/rdcms/plugins/interface/idrag.js +588 -0
  1285. data/app/assets/javascripts/rdcms/plugins/interface/idrop.js +323 -0
  1286. data/app/assets/javascripts/rdcms/plugins/interface/iexpander.js +114 -0
  1287. data/app/assets/javascripts/rdcms/plugins/interface/ifx.js +490 -0
  1288. data/app/assets/javascripts/rdcms/plugins/interface/ifxblind.js +212 -0
  1289. data/app/assets/javascripts/rdcms/plugins/interface/ifxbounce.js +89 -0
  1290. data/app/assets/javascripts/rdcms/plugins/interface/ifxdrop.js +300 -0
  1291. data/app/assets/javascripts/rdcms/plugins/interface/ifxfold.js +157 -0
  1292. data/app/assets/javascripts/rdcms/plugins/interface/ifxhighlight.js +64 -0
  1293. data/app/assets/javascripts/rdcms/plugins/interface/ifxopenclose.js +227 -0
  1294. data/app/assets/javascripts/rdcms/plugins/interface/ifxpulsate.js +77 -0
  1295. data/app/assets/javascripts/rdcms/plugins/interface/ifxscale.js +290 -0
  1296. data/app/assets/javascripts/rdcms/plugins/interface/ifxscrollto.js +111 -0
  1297. data/app/assets/javascripts/rdcms/plugins/interface/ifxshake.js +97 -0
  1298. data/app/assets/javascripts/rdcms/plugins/interface/ifxslide.js +349 -0
  1299. data/app/assets/javascripts/rdcms/plugins/interface/ifxtransfer.js +123 -0
  1300. data/app/assets/javascripts/rdcms/plugins/interface/imagebox.js +595 -0
  1301. data/app/assets/javascripts/rdcms/plugins/interface/iresizable.js +453 -0
  1302. data/app/assets/javascripts/rdcms/plugins/interface/iselect.js +275 -0
  1303. data/app/assets/javascripts/rdcms/plugins/interface/islider.js +301 -0
  1304. data/app/assets/javascripts/rdcms/plugins/interface/islideshow.js +422 -0
  1305. data/app/assets/javascripts/rdcms/plugins/interface/isortables.js +392 -0
  1306. data/app/assets/javascripts/rdcms/plugins/interface/itooltip.js +184 -0
  1307. data/app/assets/javascripts/rdcms/plugins/interface/ittabs.js +92 -0
  1308. data/app/assets/javascripts/rdcms/plugins/interface/iutil.js +245 -0
  1309. data/app/assets/javascripts/rdcms/plugins/jquery.chosen.init.js +6 -0
  1310. data/app/assets/javascripts/rdcms/plugins/jquery.chosen.min.js +10 -0
  1311. data/app/assets/javascripts/rdcms/plugins/jquery.easing.1.3.js +205 -0
  1312. data/app/assets/javascripts/rdcms/plugins/jquery.iframe-transport.js +165 -0
  1313. data/app/assets/javascripts/rdcms/plugins/jquery.mb.browser.js +104 -0
  1314. data/app/assets/javascripts/rdcms/plugins/jquery.meio.mask.js +717 -0
  1315. data/app/assets/javascripts/rdcms/plugins/jquery.metadata.js +120 -0
  1316. data/app/assets/javascripts/rdcms/plugins/jquery.mousewheel.min.js +12 -0
  1317. data/app/assets/javascripts/rdcms/plugins/jquery.parallax-1.1.3.js +69 -0
  1318. data/app/assets/javascripts/rdcms/plugins/jquery.tools.min.js +51 -0
  1319. data/app/assets/javascripts/rdcms/plugins/jquery.ui.widget.js +282 -0
  1320. data/app/assets/javascripts/rdcms/plugins/modernizr.2.5.3.min.js +4 -0
  1321. data/app/assets/javascripts/rdcms/plugins/rails.validations.action_view.js.coffee +45 -0
  1322. data/app/assets/javascripts/rdcms/plugins/rails.validations.js +602 -0
  1323. data/app/assets/javascripts/rdcms/plugins/royalslider.js +1776 -0
  1324. data/app/assets/javascripts/rdcms/plugins/select2/select2.js +3065 -0
  1325. data/app/assets/javascripts/rdcms/plugins/select2/select2_locale_ca.js +17 -0
  1326. data/app/assets/javascripts/rdcms/plugins/select2/select2_locale_cs.js +49 -0
  1327. data/app/assets/javascripts/rdcms/plugins/select2/select2_locale_da.js +17 -0
  1328. data/app/assets/javascripts/rdcms/plugins/select2/select2_locale_de.js +15 -0
  1329. data/app/assets/javascripts/rdcms/plugins/select2/select2_locale_es.js +15 -0
  1330. data/app/assets/javascripts/rdcms/plugins/select2/select2_locale_et.js +17 -0
  1331. data/app/assets/javascripts/rdcms/plugins/select2/select2_locale_eu.js +43 -0
  1332. data/app/assets/javascripts/rdcms/plugins/select2/select2_locale_fr.js +15 -0
  1333. data/app/assets/javascripts/rdcms/plugins/select2/select2_locale_gl.js +43 -0
  1334. data/app/assets/javascripts/rdcms/plugins/select2/select2_locale_he.js +17 -0
  1335. data/app/assets/javascripts/rdcms/plugins/select2/select2_locale_hr.js +42 -0
  1336. data/app/assets/javascripts/rdcms/plugins/select2/select2_locale_hu.js +15 -0
  1337. data/app/assets/javascripts/rdcms/plugins/select2/select2_locale_is.js +16 -0
  1338. data/app/assets/javascripts/rdcms/plugins/select2/select2_locale_it.js +15 -0
  1339. data/app/assets/javascripts/rdcms/plugins/select2/select2_locale_ja.js +15 -0
  1340. data/app/assets/javascripts/rdcms/plugins/select2/select2_locale_lt.js +29 -0
  1341. data/app/assets/javascripts/rdcms/plugins/select2/select2_locale_lv.js +16 -0
  1342. data/app/assets/javascripts/rdcms/plugins/select2/select2_locale_mk.js +17 -0
  1343. data/app/assets/javascripts/rdcms/plugins/select2/select2_locale_nl.js +15 -0
  1344. data/app/assets/javascripts/rdcms/plugins/select2/select2_locale_no.js +18 -0
  1345. data/app/assets/javascripts/rdcms/plugins/select2/select2_locale_pl.js +37 -0
  1346. data/app/assets/javascripts/rdcms/plugins/select2/select2_locale_pt-BR.js +15 -0
  1347. data/app/assets/javascripts/rdcms/plugins/select2/select2_locale_pt-PT.js +15 -0
  1348. data/app/assets/javascripts/rdcms/plugins/select2/select2_locale_ro.js +15 -0
  1349. data/app/assets/javascripts/rdcms/plugins/select2/select2_locale_ru.js +15 -0
  1350. data/app/assets/javascripts/rdcms/plugins/select2/select2_locale_sk.js +48 -0
  1351. data/app/assets/javascripts/rdcms/plugins/select2/select2_locale_sv.js +17 -0
  1352. data/app/assets/javascripts/rdcms/plugins/select2/select2_locale_tr.js +17 -0
  1353. data/app/assets/javascripts/rdcms/plugins/select2/select2_locale_ua.js +17 -0
  1354. data/app/assets/javascripts/rdcms/plugins/select2/select2_locale_vi.js +18 -0
  1355. data/app/assets/javascripts/rdcms/plugins/select2/select2_locale_zh-CN.js +14 -0
  1356. data/app/assets/javascripts/rdcms/plugins/select2/select2_locale_zh-TW.js +14 -0
  1357. data/app/assets/javascripts/rdcms/raphael.js +5815 -0
  1358. data/app/assets/javascripts/rdcms/single_upload.js.coffee +4 -0
  1359. data/app/assets/javascripts/rdcms/sliders.js +4 -0
  1360. data/app/assets/javascripts/rdcms/upload_selector.js.coffee +100 -0
  1361. data/app/assets/stylesheets/active_admin/_forms.css.scss +282 -0
  1362. data/app/assets/stylesheets/application_print.css.scss +10 -0
  1363. data/app/assets/stylesheets/rdcms/active_admin.css.scss +713 -0
  1364. data/app/assets/stylesheets/rdcms/application.css.scss +106 -0
  1365. data/app/assets/stylesheets/rdcms/bootstrap_and_overrides.css.less +35 -0
  1366. data/app/assets/stylesheets/rdcms/chosen.css +392 -0
  1367. data/app/assets/stylesheets/rdcms/dock.css.scss +86 -0
  1368. data/app/assets/stylesheets/rdcms/farbtastic.css +51 -0
  1369. data/app/assets/stylesheets/rdcms/flags.css +248 -0
  1370. data/app/assets/stylesheets/rdcms/formstyle.css.scss +20 -0
  1371. data/app/assets/stylesheets/rdcms/full_screen.css.scss +276 -0
  1372. data/app/assets/stylesheets/rdcms/glyphs.css +1202 -0
  1373. data/app/assets/stylesheets/rdcms/jquery.fileupload-ui.css.scss +112 -0
  1374. data/app/assets/stylesheets/rdcms/navbars.css.scss +238 -0
  1375. data/app/assets/stylesheets/rdcms/overlays.css.scss +42 -0
  1376. data/app/assets/stylesheets/rdcms/select2/select2.css +652 -0
  1377. data/app/assets/stylesheets/rdcms/single_upload.css.scss +11 -0
  1378. data/app/assets/stylesheets/rdcms/sliders.css.scss +1635 -0
  1379. data/app/assets/stylesheets/rdcms/sponsor.css.scss +105 -0
  1380. data/app/assets/stylesheets/rdcms/uploads.css.scss +67 -0
  1381. data/app/controllers/api/v1/base_controller.rb +14 -0
  1382. data/app/controllers/api/v1/tokens_controller.rb +30 -0
  1383. data/app/controllers/application_controller.rb +39 -0
  1384. data/app/controllers/articles_controller.rb +329 -0
  1385. data/app/controllers/contact_us_controller.rb +4 -0
  1386. data/app/controllers/galleries_controller.rb +24 -0
  1387. data/app/controllers/movies_controller.rb +32 -0
  1388. data/app/controllers/pages_controller.rb +17 -0
  1389. data/app/controllers/partners_controller.rb +9 -0
  1390. data/app/controllers/posts_controller.rb +337 -0
  1391. data/app/controllers/visitors/omniauth_callbacks_controller.rb +41 -0
  1392. data/app/helpers/application_helper.rb +4 -0
  1393. data/app/helpers/articles_helper.rb +171 -0
  1394. data/app/helpers/posts_helper.rb +171 -0
  1395. data/app/helpers/rdcms_helper.rb +374 -0
  1396. data/app/helpers/uploads_helper.rb +24 -0
  1397. data/app/mailers/confirmation_mailer.rb +42 -0
  1398. data/app/models/ability.rb +80 -0
  1399. data/app/models/analytic.rb +136 -0
  1400. data/app/models/article.rb +512 -0
  1401. data/app/models/article_image.rb +16 -0
  1402. data/app/models/article_widget.rb +15 -0
  1403. data/app/models/ckeditor/asset.rb +4 -0
  1404. data/app/models/ckeditor/attachment_file.rb +12 -0
  1405. data/app/models/ckeditor/picture.rb +14 -0
  1406. data/app/models/comment.rb +39 -0
  1407. data/app/models/gallery.rb +56 -0
  1408. data/app/models/help.rb +15 -0
  1409. data/app/models/import.rb +68 -0
  1410. data/app/models/location.rb +34 -0
  1411. data/app/models/menu.rb +57 -0
  1412. data/app/models/metatag.rb +17 -0
  1413. data/app/models/movie.rb +3 -0
  1414. data/app/models/page.rb +30 -0
  1415. data/app/models/partner.rb +79 -0
  1416. data/app/models/permission.rb +23 -0
  1417. data/app/models/post.rb +329 -0
  1418. data/app/models/role.rb +15 -0
  1419. data/app/models/role_user.rb +16 -0
  1420. data/app/models/setting.rb +182 -0
  1421. data/app/models/slider.rb +87 -0
  1422. data/app/models/standardize_numbers.rb +23 -0
  1423. data/app/models/upload.rb +156 -0
  1424. data/app/models/user.rb +98 -0
  1425. data/app/models/visitor.rb +106 -0
  1426. data/app/models/vita.rb +19 -0
  1427. data/app/models/widget.rb +165 -0
  1428. data/app/views/admin/_single_upload.html.erb +134 -0
  1429. data/app/views/admin/_slider.html.erb +52 -0
  1430. data/app/views/admin/_upload.html.erb +214 -0
  1431. data/app/views/admin/_upload_selector.html.erb +47 -0
  1432. data/app/views/admin/analytics/_google.html.erb +323 -0
  1433. data/app/views/admin/articles/_article_type.html.erb +9 -0
  1434. data/app/views/admin/articles/_image_module_sidebar.html.erb +36 -0
  1435. data/app/views/admin/articles/_index_of_articles_sidebar.html.erb +11 -0
  1436. data/app/views/admin/articles/_layout_sidebar.html.erb +8 -0
  1437. data/app/views/admin/articles/_select_article_type.html.erb +20 -0
  1438. data/app/views/admin/articles/_toggle_expert_mode.html.erb +5 -0
  1439. data/app/views/admin/articles/_widgets_sidebar.html.erb +14 -0
  1440. data/app/views/admin/articles/toggle_expert_mode.js.erb +7 -0
  1441. data/app/views/admin/galleries/_form.html.erb +45 -0
  1442. data/app/views/admin/galleries/_show.html.erb +44 -0
  1443. data/app/views/admin/helps/_index.html.erb +1 -0
  1444. data/app/views/admin/pages/_form.html.erb +41 -0
  1445. data/app/views/admin/pages/_show.html.erb +21 -0
  1446. data/app/views/admin/partners/_form.html.erb +49 -0
  1447. data/app/views/admin/partners/_index.html.erb +147 -0
  1448. data/app/views/admin/partners/edit.html.erb +3 -0
  1449. data/app/views/admin/posts/_form.html.erb +49 -0
  1450. data/app/views/admin/posts/_index.html.erb +22 -0
  1451. data/app/views/admin/posts/_show.html.erb +30 -0
  1452. data/app/views/admin/settings/_company.html.erb +65 -0
  1453. data/app/views/admin/settings/_visualization.html.erb +341 -0
  1454. data/app/views/admin/shared/_item.html.erb +22 -0
  1455. data/app/views/admin/shared/_overview.html.erb +8 -0
  1456. data/app/views/admin/sliders/_form.html.erb +51 -0
  1457. data/app/views/admin/sliders/_index.html.erb +185 -0
  1458. data/app/views/admin/sliders/_show.html.erb +22 -0
  1459. data/app/views/admin/sliders/form.html.erb +1 -0
  1460. data/app/views/admin/uploads/_show.html.erb +57 -0
  1461. data/app/views/admin/users/_vita_steps.html.erb +3 -0
  1462. data/app/views/articles/_bugherd.html.erb +8 -0
  1463. data/app/views/articles/_show.html.erb +74 -0
  1464. data/app/views/articles/show.html.erb +1 -0
  1465. data/app/views/articles/show.rss.builder +28 -0
  1466. data/app/views/articles/sitemap.xml.builder +10 -0
  1467. data/app/views/galleries/_search.html.erb +6 -0
  1468. data/app/views/galleries/index.html.erb +49 -0
  1469. data/app/views/galleries/show.html.erb +101 -0
  1470. data/app/views/imports/attributes.html.erb +25 -0
  1471. data/app/views/layouts/ajax.html.erb +1 -0
  1472. data/app/views/layouts/rdcms/active_admin_resque.html.erb +35 -0
  1473. data/app/views/layouts/rdcms/application.html.erb +1 -0
  1474. data/app/views/layouts/rdcms/bare_layout.html.erb +8 -0
  1475. data/app/views/layouts/rdcms/pdf.html.erb +1 -0
  1476. data/app/views/movies/index.html.erb +77 -0
  1477. data/app/views/pages/index.html.erb +0 -0
  1478. data/app/views/pages/show.html.erb +17 -0
  1479. data/app/views/partners/index.html.erb +33 -0
  1480. data/app/views/posts/_bugherd.html.erb +8 -0
  1481. data/app/views/posts/_edit_post_link.html.erb +7 -0
  1482. data/app/views/posts/_headers.html.erb +41 -0
  1483. data/app/views/posts/_search.html.erb +6 -0
  1484. data/app/views/posts/index.html.erb +93 -0
  1485. data/app/views/posts/show.html.erb +55 -0
  1486. data/app/views/uploads/index.html.erb +142 -0
  1487. data/app/worker/articles_cache_worker.rb +20 -0
  1488. data/app/worker/posts_cache_worker.rb +20 -0
  1489. data/config/initializers/active_admin_devise.rb +22 -0
  1490. data/config/initializers/acts_as_taggable.rb +5 -0
  1491. data/config/initializers/check_for_migrations.rb +21 -0
  1492. data/config/initializers/compass.rb +24 -0
  1493. data/config/initializers/devise.rb +216 -0
  1494. data/config/initializers/extend.rb +28 -0
  1495. data/config/initializers/fix_ssl.rb +16 -0
  1496. data/config/initializers/formtastic.rb +77 -0
  1497. data/config/initializers/geocoder.rb +9 -0
  1498. data/config/initializers/helper.rb +3 -0
  1499. data/config/initializers/http_validator.rb +22 -0
  1500. data/config/initializers/liquid_tags.rb +14 -0
  1501. data/config/initializers/net.rb +13 -0
  1502. data/config/initializers/notification.rb +3 -0
  1503. data/config/initializers/posts_controller_hooks.rb +6 -0
  1504. data/config/initializers/settings.rb +9 -0
  1505. data/config/locales/active_admin.br.yml +162 -0
  1506. data/config/locales/active_admin.de.yml +149 -0
  1507. data/config/locales/active_admin.en.yml +121 -0
  1508. data/config/locales/active_admin.es.yml +99 -0
  1509. data/config/locales/activerecord.br.yml +332 -0
  1510. data/config/locales/activerecord.de.yml +167 -0
  1511. data/config/locales/activerecord.en.yml +237 -0
  1512. data/config/locales/activerecord.es.yml +253 -0
  1513. data/config/locales/article_types.br.yml +34 -0
  1514. data/config/locales/article_types.de.yml +36 -0
  1515. data/config/locales/ckeditor.br.yml +8 -0
  1516. data/config/locales/contact_us.br.yml +34 -0
  1517. data/config/locales/contact_us.de.yml +25 -0
  1518. data/config/locales/contact_us.en.yml +34 -0
  1519. data/config/locales/contact_us.es.yml +34 -0
  1520. data/config/locales/de.yml +210 -0
  1521. data/config/locales/devise.br.yml +71 -0
  1522. data/config/locales/devise.de.yml +55 -0
  1523. data/config/locales/devise.en.yml +55 -0
  1524. data/config/locales/devise.es.yml +68 -0
  1525. data/config/locales/en.yml +215 -0
  1526. data/config/locales/formtastic.br.yml +10 -0
  1527. data/config/locales/formtastic.de.yml +10 -0
  1528. data/config/locales/formtastic.en.yml +10 -0
  1529. data/config/locales/rails.br.yml +229 -0
  1530. data/config/locales/rails.en.yml +225 -0
  1531. data/config/locales/rails.es.yml +219 -0
  1532. data/config/locales/rdcms.br.yml +3 -0
  1533. data/config/locales/rdcms.de.yml +3 -0
  1534. data/config/locales/rdcms.en.yml +3 -0
  1535. data/config/routes.rb +80 -0
  1536. data/config/schedule.rb +20 -0
  1537. data/config/settings.yml +141 -0
  1538. data/config/sidekiq.yml +6 -0
  1539. data/config/sunspot.yml.tmpl +24 -0
  1540. data/db/migrate/20120109093658_create_articles.rb +9 -0
  1541. data/db/migrate/20120109111205_add_devise_to_admin_users.rb +56 -0
  1542. data/db/migrate/20120109121212_create_admin_notes.rb +16 -0
  1543. data/db/migrate/20120109121213_move_admin_notes_to_comments.rb +25 -0
  1544. data/db/migrate/20120109140423_create_roles.rb +10 -0
  1545. data/db/migrate/20120109141338_create_role_users.rb +9 -0
  1546. data/db/migrate/20120110112157_add_urlname_to_article.rb +7 -0
  1547. data/db/migrate/20120110114803_create_friendly_id_slugs.rb +18 -0
  1548. data/db/migrate/20120112163045_add_body_to_articles.rb +6 -0
  1549. data/db/migrate/20120112171037_add_ancestry_to_articles.rb +5 -0
  1550. data/db/migrate/20120112172723_add_index_to_articles.rb +9 -0
  1551. data/db/migrate/20120113100243_create_menus.rb +12 -0
  1552. data/db/migrate/20120113101714_add_ancestry_to_menus.rb +6 -0
  1553. data/db/migrate/20120113170904_add_startpage_to_article.rb +5 -0
  1554. data/db/migrate/20120120095700_create_metatags.rb +11 -0
  1555. data/db/migrate/20120125145920_add_fields_to_articles.rb +9 -0
  1556. data/db/migrate/20120125161800_add_noindex_to_articles.rb +5 -0
  1557. data/db/migrate/20120126132846_create_uploads.rb +14 -0
  1558. data/db/migrate/20120206110452_create_locations.rb +15 -0
  1559. data/db/migrate/20120209100956_create_settings.rb +11 -0
  1560. data/db/migrate/20120217085735_add_options_to_users.rb +15 -0
  1561. data/db/migrate/20120217085835_add_default_users_and_roles.rb +13 -0
  1562. data/db/migrate/20120221100021_create_helps.rb +11 -0
  1563. data/db/migrate/20120307151355_add_breadcrumb_to_articles.rb +5 -0
  1564. data/db/migrate/20120312111338_create_widgets.rb +12 -0
  1565. data/db/migrate/20120312150558_create_article_widgets.rb +10 -0
  1566. data/db/migrate/20120313125443_create_permissions.rb +16 -0
  1567. data/db/migrate/20120313142221_add_name_to_widgets.rb +6 -0
  1568. data/db/migrate/20120313142421_add_sorter_to_widgets.rb +6 -0
  1569. data/db/migrate/20120314102039_add_template_to_articles.rb +6 -0
  1570. data/db/migrate/20120315161536_add_sorter_to_menu.rb +5 -0
  1571. data/db/migrate/20120321102414_acts_as_taggable_on_migration.rb +30 -0
  1572. data/db/migrate/20120321114923_add_articleindex_to_articles.rb +7 -0
  1573. data/db/migrate/20120321120727_add_social_sharing_to_articles.rb +5 -0
  1574. data/db/migrate/20120321130204_add_articleindeximages_to_articles.rb +5 -0
  1575. data/db/migrate/20120321131058_create_article_images.rb +10 -0
  1576. data/db/migrate/20120416154848_create_vita.rb +13 -0
  1577. data/db/migrate/20120420094029_add_cachable_to_articles.rb +5 -0
  1578. data/db/migrate/20120423141814_add_imagegallery_to_articles.rb +5 -0
  1579. data/db/migrate/20120509125734_add_title_to_locations.rb +5 -0
  1580. data/db/migrate/20120604141401_add_article_type_to_articles.rb +5 -0
  1581. data/db/migrate/20120605082035_add_description_to_menus.rb +6 -0
  1582. data/db/migrate/20120608095444_add_teaser_title_to_menu.rb +5 -0
  1583. data/db/migrate/20120608121356_create_versions.rb +18 -0
  1584. data/db/migrate/20120611082814_create_imports.rb +13 -0
  1585. data/db/migrate/20120615085225_add_externalurl_to_article.rb +5 -0
  1586. data/db/migrate/20120615150128_add_attachable_to_uploads.rb +6 -0
  1587. data/db/migrate/20120618122627_add_indextag_to_articles.rb +5 -0
  1588. data/db/migrate/20120618132330_add_sliderfields_to_widgets.rb +5 -0
  1589. data/db/migrate/20120618141449_add_teaser_to_widgets.rb +5 -0
  1590. data/db/migrate/20120619123238_add_sorter_to_articles.rb +5 -0
  1591. data/db/migrate/20120619132259_add_reverse_sort_to_articles.rb +5 -0
  1592. data/db/migrate/20120625131154_add_author_to_articles.rb +5 -0
  1593. data/db/migrate/20120627122742_add_sorter_limit_to_articles.rb +5 -0
  1594. data/db/migrate/20120718153348_add_nottags_to_articles.rb +5 -0
  1595. data/db/migrate/20120730103912_add_use_frontend_tags_to_articles.rb +5 -0
  1596. data/db/migrate/20120807124808_add_image_to_menus.rb +5 -0
  1597. data/db/migrate/20120814111900_add_default_and_description.rb +6 -0
  1598. data/db/migrate/20120814114800_change_default_type_to_widgets.rb +6 -0
  1599. data/db/migrate/20120821105002_add_alttext_to_uploads.rb +5 -0
  1600. data/db/migrate/20120904190034_create_galleries.rb +22 -0
  1601. data/db/migrate/20120910042532_create_posts.rb +29 -0
  1602. data/db/migrate/20120914225926_create_ckeditor_assets.rb +26 -0
  1603. data/db/migrate/20120926133635_add_position_to_article_images.rb +5 -0
  1604. data/db/migrate/20120927035810_create_sliders.rb +27 -0
  1605. data/db/migrate/20120928092721_create_comments.rb +16 -0
  1606. data/db/migrate/20120928105956_devise_create_visitors.rb +46 -0
  1607. data/db/migrate/20121001092249_add_names_to_visitors.rb +6 -0
  1608. data/db/migrate/20121002143111_add_columns_to_visitors.rb +8 -0
  1609. data/db/migrate/20121003102003_add_dynamicredirect_to_articles.rb +6 -0
  1610. data/db/migrate/20121003140056_add_token_to_visitors.rb +12 -0
  1611. data/db/migrate/20121006095912_add_commentable_to_article.rb +5 -0
  1612. data/db/migrate/20121007125002_add_activesince_to_articles.rb +5 -0
  1613. data/db/migrate/20121011062432_add_username_to_visitors.rb +5 -0
  1614. data/db/migrate/20121015071150_add_link_title_to_articles.rb +5 -0
  1615. data/db/migrate/20121025010009_create_newsletters.rb +13 -0
  1616. data/db/migrate/20121029131138_add_offline_setter_to_widgets.rb +7 -0
  1617. data/db/migrate/20121030112343_add_offline_active_to_widgets.rb +5 -0
  1618. data/db/migrate/20121030120838_add_alternative_content_to_widgets.rb +5 -0
  1619. data/db/migrate/20121105220423_create_galleries_uploads.rb +8 -0
  1620. data/db/migrate/20121121144623_add_datum_to_widgets.rb +6 -0
  1621. data/db/migrate/20121122091033_add_sorter_number_to_uploads.rb +5 -0
  1622. data/db/migrate/20121122181647_create_settings_uploads.rb +7 -0
  1623. data/db/migrate/20121123202532_create_pages.rb +22 -0
  1624. data/db/migrate/20121206104701_add_type_to_settings.rb +5 -0
  1625. data/db/migrate/20130104145454_add_weektimes_to_widgets.rb +7 -0
  1626. data/db/migrate/20130107160705_create_partners.rb +31 -0
  1627. data/db/migrate/20130107202954_create_partners_uploads.rb +7 -0
  1628. data/db/migrate/20130114154115_add_sorter_to_permissions.rb +5 -0
  1629. data/db/migrate/20130115104440_add_expert_mode_to_users.rb +5 -0
  1630. data/db/migrate/20130128170204_add_default_article_type_for_nil.rb +11 -0
  1631. data/db/migrate/20130129092029_add_poly_to_locations.rb +6 -0
  1632. data/db/migrate/20130204102953_add_locationoption_to_locations.rb +5 -0
  1633. data/db/migrate/20130205084748_add_loginable_to_visitors.rb +6 -0
  1634. data/db/migrate/20130211223344_add_columns_to_post.rb +15 -0
  1635. data/db/migrate/20130211230935_rename_columns_in_metatags.rb +6 -0
  1636. data/db/migrate/20130211235312_rename_columns_in_posts.rb +5 -0
  1637. data/db/seeds.rb +16 -0
  1638. data/lib/ca-bundle.crt +3895 -0
  1639. data/lib/generators/rdcms/articletype/USAGE +14 -0
  1640. data/lib/generators/rdcms/articletype/articletype_generator.rb +27 -0
  1641. data/lib/generators/rdcms/articletype/templates/edit_index.html.erb +8 -0
  1642. data/lib/generators/rdcms/articletype/templates/edit_show.html.erb +11 -0
  1643. data/lib/generators/rdcms/articletype/templates/index.html.erb +27 -0
  1644. data/lib/generators/rdcms/articletype/templates/initializer.rb +14 -0
  1645. data/lib/generators/rdcms/articletype/templates/show.html.erb +11 -0
  1646. data/lib/generators/rdcms/install_generator.rb +207 -0
  1647. data/lib/generators/rdcms/templates/active_admin.css.scss +2 -0
  1648. data/lib/generators/rdcms/templates/active_admin.js +1 -0
  1649. data/lib/generators/rdcms/templates/active_admin.rb.erb +157 -0
  1650. data/lib/generators/rdcms/templates/assets/images/icons/icon-bookmark-40x40-light.png +0 -0
  1651. data/lib/generators/rdcms/templates/assets/images/icons/icon-pdf-40x40-light.png +0 -0
  1652. data/lib/generators/rdcms/templates/assets/images/icons/icon-print-40x40-light.png +0 -0
  1653. data/lib/generators/rdcms/templates/assets/javascripts/active_admin.js +1 -0
  1654. data/lib/generators/rdcms/templates/assets/javascripts/application.js +20 -0
  1655. data/lib/generators/rdcms/templates/assets/stylesheets/active_admin.css.scss +2 -0
  1656. data/lib/generators/rdcms/templates/assets/stylesheets/application.css.scss +17 -0
  1657. data/lib/generators/rdcms/templates/database.yml.erb +30 -0
  1658. data/lib/generators/rdcms/templates/deploy.rb.erb +120 -0
  1659. data/lib/generators/rdcms/templates/errbit.rb.erb +6 -0
  1660. data/lib/generators/rdcms/templates/extend_posts_controller.rb +21 -0
  1661. data/lib/generators/rdcms/templates/newrelic.yml.erb +223 -0
  1662. data/lib/generators/rdcms/templates/rvmrc.erb +1 -0
  1663. data/lib/generators/rdcms/templates/seeds.rb.erb +174 -0
  1664. data/lib/generators/rdcms/templates/views/layouts/_footer.html.erb +1 -0
  1665. data/lib/generators/rdcms/templates/views/layouts/_header.html.erb +1 -0
  1666. data/lib/generators/rdcms/templates/views/layouts/_header_meta.html.erb +21 -0
  1667. data/lib/generators/rdcms/templates/views/layouts/_header_slider.html.erb +14 -0
  1668. data/lib/generators/rdcms/templates/views/layouts/application.html.erb +32 -0
  1669. data/lib/generators/rdcms/templates/views/layouts/pdf.html.erb +15 -0
  1670. data/lib/rdcms.rb +3 -0
  1671. data/lib/rdcms/acts_as_setting.rb +13 -0
  1672. data/lib/rdcms/engine.rb +48 -0
  1673. data/lib/rdcms/version.rb +3 -0
  1674. data/lib/tasks/rdcms_tasks.rake +12 -0
  1675. data/lib/tasks/travis.rake +7 -0
  1676. metadata +2638 -0
@@ -0,0 +1,3065 @@
1
+ /*
2
+ Copyright 2012 Igor Vaynberg
3
+
4
+ Version: @@ver@@ Timestamp: @@timestamp@@
5
+
6
+ This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU
7
+ General Public License version 2 (the "GPL License"). You may choose either license to govern your
8
+ use of this software only upon the condition that you accept all of the terms of either the Apache
9
+ License or the GPL License.
10
+
11
+ You may obtain a copy of the Apache License and the GPL License at:
12
+
13
+ http://www.apache.org/licenses/LICENSE-2.0
14
+ http://www.gnu.org/licenses/gpl-2.0.html
15
+
16
+ Unless required by applicable law or agreed to in writing, software distributed under the
17
+ Apache License or the GPL Licesnse is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
18
+ CONDITIONS OF ANY KIND, either express or implied. See the Apache License and the GPL License for
19
+ the specific language governing permissions and limitations under the Apache License and the GPL License.
20
+ */
21
+ (function ($) {
22
+ if(typeof $.fn.each2 == "undefined"){
23
+ $.fn.extend({
24
+ /*
25
+ * 4-10 times faster .each replacement
26
+ * use it carefully, as it overrides jQuery context of element on each iteration
27
+ */
28
+ each2 : function (c) {
29
+ var j = $([0]), i = -1, l = this.length;
30
+ while (
31
+ ++i < l
32
+ && (j.context = j[0] = this[i])
33
+ && c.call(j[0], i, j) !== false //"this"=DOM, i=index, j=jQuery object
34
+ );
35
+ return this;
36
+ }
37
+ });
38
+ }
39
+ })(jQuery);
40
+
41
+ (function ($, undefined) {
42
+ "use strict";
43
+ /*global document, window, jQuery, console */
44
+
45
+ if (window.Select2 !== undefined) {
46
+ return;
47
+ }
48
+
49
+ var KEY, AbstractSelect2, SingleSelect2, MultiSelect2, nextUid, sizer,
50
+ lastMousePosition={x:0,y:0}, $document, scrollBarDimensions,
51
+
52
+ KEY = {
53
+ TAB: 9,
54
+ ENTER: 13,
55
+ ESC: 27,
56
+ SPACE: 32,
57
+ LEFT: 37,
58
+ UP: 38,
59
+ RIGHT: 39,
60
+ DOWN: 40,
61
+ SHIFT: 16,
62
+ CTRL: 17,
63
+ ALT: 18,
64
+ PAGE_UP: 33,
65
+ PAGE_DOWN: 34,
66
+ HOME: 36,
67
+ END: 35,
68
+ BACKSPACE: 8,
69
+ DELETE: 46,
70
+ isArrow: function (k) {
71
+ k = k.which ? k.which : k;
72
+ switch (k) {
73
+ case KEY.LEFT:
74
+ case KEY.RIGHT:
75
+ case KEY.UP:
76
+ case KEY.DOWN:
77
+ return true;
78
+ }
79
+ return false;
80
+ },
81
+ isControl: function (e) {
82
+ var k = e.which;
83
+ switch (k) {
84
+ case KEY.SHIFT:
85
+ case KEY.CTRL:
86
+ case KEY.ALT:
87
+ return true;
88
+ }
89
+
90
+ if (e.metaKey) return true;
91
+
92
+ return false;
93
+ },
94
+ isFunctionKey: function (k) {
95
+ k = k.which ? k.which : k;
96
+ return k >= 112 && k <= 123;
97
+ }
98
+ },
99
+ MEASURE_SCROLLBAR_TEMPLATE = "<div class='select2-measure-scrollbar'></div>";
100
+
101
+ $document = $(document);
102
+
103
+ nextUid=(function() { var counter=1; return function() { return counter++; }; }());
104
+
105
+ function indexOf(value, array) {
106
+ var i = 0, l = array.length;
107
+ for (; i < l; i = i + 1) {
108
+ if (equal(value, array[i])) return i;
109
+ }
110
+ return -1;
111
+ }
112
+
113
+ function measureScrollbar () {
114
+ var $template = $( MEASURE_SCROLLBAR_TEMPLATE );
115
+ $template.appendTo('body');
116
+
117
+ var dim = {
118
+ width: $template.width() - $template[0].clientWidth,
119
+ height: $template.height() - $template[0].clientHeight
120
+ };
121
+ $template.remove();
122
+
123
+ return dim;
124
+ }
125
+
126
+ /**
127
+ * Compares equality of a and b
128
+ * @param a
129
+ * @param b
130
+ */
131
+ function equal(a, b) {
132
+ if (a === b) return true;
133
+ if (a === undefined || b === undefined) return false;
134
+ if (a === null || b === null) return false;
135
+ if (a.constructor === String) return a+'' === b+''; // IE requires a+'' instead of just a
136
+ if (b.constructor === String) return b+'' === a+''; // IE requires b+'' instead of just b
137
+ return false;
138
+ }
139
+
140
+ /**
141
+ * Splits the string into an array of values, trimming each value. An empty array is returned for nulls or empty
142
+ * strings
143
+ * @param string
144
+ * @param separator
145
+ */
146
+ function splitVal(string, separator) {
147
+ var val, i, l;
148
+ if (string === null || string.length < 1) return [];
149
+ val = string.split(separator);
150
+ for (i = 0, l = val.length; i < l; i = i + 1) val[i] = $.trim(val[i]);
151
+ return val;
152
+ }
153
+
154
+ function getSideBorderPadding(element) {
155
+ return element.outerWidth(false) - element.width();
156
+ }
157
+
158
+ function installKeyUpChangeEvent(element) {
159
+ var key="keyup-change-value";
160
+ element.on("keydown", function () {
161
+ if ($.data(element, key) === undefined) {
162
+ $.data(element, key, element.val());
163
+ }
164
+ });
165
+ element.on("keyup", function () {
166
+ var val= $.data(element, key);
167
+ if (val !== undefined && element.val() !== val) {
168
+ $.removeData(element, key);
169
+ element.trigger("keyup-change");
170
+ }
171
+ });
172
+ }
173
+
174
+ $document.on("mousemove", function (e) {
175
+ lastMousePosition.x = e.pageX;
176
+ lastMousePosition.y = e.pageY;
177
+ });
178
+
179
+ /**
180
+ * filters mouse events so an event is fired only if the mouse moved.
181
+ *
182
+ * filters out mouse events that occur when mouse is stationary but
183
+ * the elements under the pointer are scrolled.
184
+ */
185
+ function installFilteredMouseMove(element) {
186
+ element.on("mousemove", function (e) {
187
+ var lastpos = lastMousePosition;
188
+ if (lastpos === undefined || lastpos.x !== e.pageX || lastpos.y !== e.pageY) {
189
+ $(e.target).trigger("mousemove-filtered", e);
190
+ }
191
+ });
192
+ }
193
+
194
+ /**
195
+ * Debounces a function. Returns a function that calls the original fn function only if no invocations have been made
196
+ * within the last quietMillis milliseconds.
197
+ *
198
+ * @param quietMillis number of milliseconds to wait before invoking fn
199
+ * @param fn function to be debounced
200
+ * @param ctx object to be used as this reference within fn
201
+ * @return debounced version of fn
202
+ */
203
+ function debounce(quietMillis, fn, ctx) {
204
+ ctx = ctx || undefined;
205
+ var timeout;
206
+ return function () {
207
+ var args = arguments;
208
+ window.clearTimeout(timeout);
209
+ timeout = window.setTimeout(function() {
210
+ fn.apply(ctx, args);
211
+ }, quietMillis);
212
+ };
213
+ }
214
+
215
+ /**
216
+ * A simple implementation of a thunk
217
+ * @param formula function used to lazily initialize the thunk
218
+ * @return {Function}
219
+ */
220
+ function thunk(formula) {
221
+ var evaluated = false,
222
+ value;
223
+ return function() {
224
+ if (evaluated === false) { value = formula(); evaluated = true; }
225
+ return value;
226
+ };
227
+ };
228
+
229
+ function installDebouncedScroll(threshold, element) {
230
+ var notify = debounce(threshold, function (e) { element.trigger("scroll-debounced", e);});
231
+ element.on("scroll", function (e) {
232
+ if (indexOf(e.target, element.get()) >= 0) notify(e);
233
+ });
234
+ }
235
+
236
+ function focus($el) {
237
+ if ($el[0] === document.activeElement) return;
238
+
239
+ /* set the focus in a 0 timeout - that way the focus is set after the processing
240
+ of the current event has finished - which seems like the only reliable way
241
+ to set focus */
242
+ window.setTimeout(function() {
243
+ var el=$el[0], pos=$el.val().length, range;
244
+
245
+ $el.focus();
246
+
247
+ /* make sure el received focus so we do not error out when trying to manipulate the caret.
248
+ sometimes modals or others listeners may steal it after its set */
249
+ if ($el.is(":visible") && el === document.activeElement) {
250
+
251
+ /* after the focus is set move the caret to the end, necessary when we val()
252
+ just before setting focus */
253
+ if(el.setSelectionRange)
254
+ {
255
+ el.setSelectionRange(pos, pos);
256
+ }
257
+ else if (el.createTextRange) {
258
+ range = el.createTextRange();
259
+ range.collapse(false);
260
+ range.select();
261
+ }
262
+ }
263
+ }, 0);
264
+ }
265
+
266
+ function getCursorInfo(el) {
267
+ el = $(el)[0];
268
+ var offset = 0;
269
+ var length = 0;
270
+ if ('selectionStart' in el) {
271
+ offset = el.selectionStart;
272
+ length = el.selectionEnd - offset;
273
+ } else if ('selection' in document) {
274
+ el.focus();
275
+ var sel = document.selection.createRange();
276
+ length = document.selection.createRange().text.length;
277
+ sel.moveStart('character', -el.value.length);
278
+ offset = sel.text.length - length;
279
+ }
280
+ return { offset: offset, length: length };
281
+ }
282
+
283
+ function killEvent(event) {
284
+ event.preventDefault();
285
+ event.stopPropagation();
286
+ }
287
+ function killEventImmediately(event) {
288
+ event.preventDefault();
289
+ event.stopImmediatePropagation();
290
+ }
291
+
292
+ function measureTextWidth(e) {
293
+ if (!sizer){
294
+ var style = e[0].currentStyle || window.getComputedStyle(e[0], null);
295
+ sizer = $(document.createElement("div")).css({
296
+ position: "absolute",
297
+ left: "-10000px",
298
+ top: "-10000px",
299
+ display: "none",
300
+ fontSize: style.fontSize,
301
+ fontFamily: style.fontFamily,
302
+ fontStyle: style.fontStyle,
303
+ fontWeight: style.fontWeight,
304
+ letterSpacing: style.letterSpacing,
305
+ textTransform: style.textTransform,
306
+ whiteSpace: "nowrap"
307
+ });
308
+ sizer.attr("class","select2-sizer");
309
+ $("body").append(sizer);
310
+ }
311
+ sizer.text(e.val());
312
+ return sizer.width();
313
+ }
314
+
315
+ function syncCssClasses(dest, src, adapter) {
316
+ var classes, replacements = [], adapted;
317
+
318
+ classes = dest.attr("class");
319
+ if (classes) {
320
+ classes = '' + classes; // for IE which returns object
321
+ $(classes.split(" ")).each2(function() {
322
+ if (this.indexOf("select2-") === 0) {
323
+ replacements.push(this);
324
+ }
325
+ });
326
+ }
327
+ classes = src.attr("class");
328
+ if (classes) {
329
+ classes = '' + classes; // for IE which returns object
330
+ $(classes.split(" ")).each2(function() {
331
+ if (this.indexOf("select2-") !== 0) {
332
+ adapted = adapter(this);
333
+ if (adapted) {
334
+ replacements.push(this);
335
+ }
336
+ }
337
+ });
338
+ }
339
+ dest.attr("class", replacements.join(" "));
340
+ }
341
+
342
+
343
+ function markMatch(text, term, markup, escapeMarkup) {
344
+ var match=text.toUpperCase().indexOf(term.toUpperCase()),
345
+ tl=term.length;
346
+
347
+ if (match<0) {
348
+ markup.push(escapeMarkup(text));
349
+ return;
350
+ }
351
+
352
+ markup.push(escapeMarkup(text.substring(0, match)));
353
+ markup.push("<span class='select2-match'>");
354
+ markup.push(escapeMarkup(text.substring(match, match + tl)));
355
+ markup.push("</span>");
356
+ markup.push(escapeMarkup(text.substring(match + tl, text.length)));
357
+ }
358
+
359
+ /**
360
+ * Produces an ajax-based query function
361
+ *
362
+ * @param options object containing configuration paramters
363
+ * @param options.params parameter map for the transport ajax call, can contain such options as cache, jsonpCallback, etc. see $.ajax
364
+ * @param options.transport function that will be used to execute the ajax request. must be compatible with parameters supported by $.ajax
365
+ * @param options.url url for the data
366
+ * @param options.data a function(searchTerm, pageNumber, context) that should return an object containing query string parameters for the above url.
367
+ * @param options.dataType request data type: ajax, jsonp, other datatatypes supported by jQuery's $.ajax function or the transport function if specified
368
+ * @param options.quietMillis (optional) milliseconds to wait before making the ajaxRequest, helps debounce the ajax function if invoked too often
369
+ * @param options.results a function(remoteData, pageNumber) that converts data returned form the remote request to the format expected by Select2.
370
+ * The expected format is an object containing the following keys:
371
+ * results array of objects that will be used as choices
372
+ * more (optional) boolean indicating whether there are more results available
373
+ * Example: {results:[{id:1, text:'Red'},{id:2, text:'Blue'}], more:true}
374
+ */
375
+ function ajax(options) {
376
+ var timeout, // current scheduled but not yet executed request
377
+ requestSequence = 0, // sequence used to drop out-of-order responses
378
+ handler = null,
379
+ quietMillis = options.quietMillis || 100,
380
+ ajaxUrl = options.url,
381
+ self = this;
382
+
383
+ return function (query) {
384
+ window.clearTimeout(timeout);
385
+ timeout = window.setTimeout(function () {
386
+ requestSequence += 1; // increment the sequence
387
+ var requestNumber = requestSequence, // this request's sequence number
388
+ data = options.data, // ajax data function
389
+ url = ajaxUrl, // ajax url string or function
390
+ transport = options.transport || $.fn.select2.ajaxDefaults.transport,
391
+ // deprecated - to be removed in 4.0 - use params instead
392
+ deprecated = {
393
+ type: options.type || 'GET', // set type of request (GET or POST)
394
+ cache: options.cache || false,
395
+ jsonpCallback: options.jsonpCallback||undefined,
396
+ dataType: options.dataType||"json"
397
+ },
398
+ params = $.extend({}, $.fn.select2.ajaxDefaults.params, deprecated);
399
+
400
+ data = data ? data.call(self, query.term, query.page, query.context) : null;
401
+ url = (typeof url === 'function') ? url.call(self, query.term, query.page, query.context) : url;
402
+
403
+ if( null !== handler) { handler.abort(); }
404
+
405
+ if (options.params) {
406
+ if ($.isFunction(options.params)) {
407
+ $.extend(params, options.params.call(self));
408
+ } else {
409
+ $.extend(params, options.params);
410
+ }
411
+ }
412
+
413
+ $.extend(params, {
414
+ url: url,
415
+ dataType: options.dataType,
416
+ data: data,
417
+ success: function (data) {
418
+ if (requestNumber < requestSequence) {
419
+ return;
420
+ }
421
+ // TODO - replace query.page with query so users have access to term, page, etc.
422
+ var results = options.results(data, query.page);
423
+ query.callback(results);
424
+ }
425
+ });
426
+ handler = transport.call(self, params);
427
+ }, quietMillis);
428
+ };
429
+ }
430
+
431
+ /**
432
+ * Produces a query function that works with a local array
433
+ *
434
+ * @param options object containing configuration parameters. The options parameter can either be an array or an
435
+ * object.
436
+ *
437
+ * If the array form is used it is assumed that it contains objects with 'id' and 'text' keys.
438
+ *
439
+ * If the object form is used ti is assumed that it contains 'data' and 'text' keys. The 'data' key should contain
440
+ * an array of objects that will be used as choices. These objects must contain at least an 'id' key. The 'text'
441
+ * key can either be a String in which case it is expected that each element in the 'data' array has a key with the
442
+ * value of 'text' which will be used to match choices. Alternatively, text can be a function(item) that can extract
443
+ * the text.
444
+ */
445
+ function local(options) {
446
+ var data = options, // data elements
447
+ dataText,
448
+ tmp,
449
+ text = function (item) { return ""+item.text; }; // function used to retrieve the text portion of a data item that is matched against the search
450
+
451
+ if ($.isArray(data)) {
452
+ tmp = data;
453
+ data = { results: tmp };
454
+ }
455
+
456
+ if ($.isFunction(data) === false) {
457
+ tmp = data;
458
+ data = function() { return tmp; };
459
+ }
460
+
461
+ var dataItem = data();
462
+ if (dataItem.text) {
463
+ text = dataItem.text;
464
+ // if text is not a function we assume it to be a key name
465
+ if (!$.isFunction(text)) {
466
+ dataText = dataItem.text; // we need to store this in a separate variable because in the next step data gets reset and data.text is no longer available
467
+ text = function (item) { return item[dataText]; };
468
+ }
469
+ }
470
+
471
+ return function (query) {
472
+ var t = query.term, filtered = { results: [] }, process;
473
+ if (t === "") {
474
+ query.callback(data());
475
+ return;
476
+ }
477
+
478
+ process = function(datum, collection) {
479
+ var group, attr;
480
+ datum = datum[0];
481
+ if (datum.children) {
482
+ group = {};
483
+ for (attr in datum) {
484
+ if (datum.hasOwnProperty(attr)) group[attr]=datum[attr];
485
+ }
486
+ group.children=[];
487
+ $(datum.children).each2(function(i, childDatum) { process(childDatum, group.children); });
488
+ if (group.children.length || query.matcher(t, text(group), datum)) {
489
+ collection.push(group);
490
+ }
491
+ } else {
492
+ if (query.matcher(t, text(datum), datum)) {
493
+ collection.push(datum);
494
+ }
495
+ }
496
+ };
497
+
498
+ $(data().results).each2(function(i, datum) { process(datum, filtered.results); });
499
+ query.callback(filtered);
500
+ };
501
+ }
502
+
503
+ // TODO javadoc
504
+ function tags(data) {
505
+ var isFunc = $.isFunction(data);
506
+ return function (query) {
507
+ var t = query.term, filtered = {results: []};
508
+ $(isFunc ? data() : data).each(function () {
509
+ var isObject = this.text !== undefined,
510
+ text = isObject ? this.text : this;
511
+ if (t === "" || query.matcher(t, text)) {
512
+ filtered.results.push(isObject ? this : {id: this, text: this});
513
+ }
514
+ });
515
+ query.callback(filtered);
516
+ };
517
+ }
518
+
519
+ /**
520
+ * Checks if the formatter function should be used.
521
+ *
522
+ * Throws an error if it is not a function. Returns true if it should be used,
523
+ * false if no formatting should be performed.
524
+ *
525
+ * @param formatter
526
+ */
527
+ function checkFormatter(formatter, formatterName) {
528
+ if ($.isFunction(formatter)) return true;
529
+ if (!formatter) return false;
530
+ throw new Error("formatterName must be a function or a falsy value");
531
+ }
532
+
533
+ function evaluate(val) {
534
+ return $.isFunction(val) ? val() : val;
535
+ }
536
+
537
+ function countResults(results) {
538
+ var count = 0;
539
+ $.each(results, function(i, item) {
540
+ if (item.children) {
541
+ count += countResults(item.children);
542
+ } else {
543
+ count++;
544
+ }
545
+ });
546
+ return count;
547
+ }
548
+
549
+ /**
550
+ * Default tokenizer. This function uses breaks the input on substring match of any string from the
551
+ * opts.tokenSeparators array and uses opts.createSearchChoice to create the choice object. Both of those
552
+ * two options have to be defined in order for the tokenizer to work.
553
+ *
554
+ * @param input text user has typed so far or pasted into the search field
555
+ * @param selection currently selected choices
556
+ * @param selectCallback function(choice) callback tho add the choice to selection
557
+ * @param opts select2's opts
558
+ * @return undefined/null to leave the current input unchanged, or a string to change the input to the returned value
559
+ */
560
+ function defaultTokenizer(input, selection, selectCallback, opts) {
561
+ var original = input, // store the original so we can compare and know if we need to tell the search to update its text
562
+ dupe = false, // check for whether a token we extracted represents a duplicate selected choice
563
+ token, // token
564
+ index, // position at which the separator was found
565
+ i, l, // looping variables
566
+ separator; // the matched separator
567
+
568
+ if (!opts.createSearchChoice || !opts.tokenSeparators || opts.tokenSeparators.length < 1) return undefined;
569
+
570
+ while (true) {
571
+ index = -1;
572
+
573
+ for (i = 0, l = opts.tokenSeparators.length; i < l; i++) {
574
+ separator = opts.tokenSeparators[i];
575
+ index = input.indexOf(separator);
576
+ if (index >= 0) break;
577
+ }
578
+
579
+ if (index < 0) break; // did not find any token separator in the input string, bail
580
+
581
+ token = input.substring(0, index);
582
+ input = input.substring(index + separator.length);
583
+
584
+ if (token.length > 0) {
585
+ token = opts.createSearchChoice(token, selection);
586
+ if (token !== undefined && token !== null && opts.id(token) !== undefined && opts.id(token) !== null) {
587
+ dupe = false;
588
+ for (i = 0, l = selection.length; i < l; i++) {
589
+ if (equal(opts.id(token), opts.id(selection[i]))) {
590
+ dupe = true; break;
591
+ }
592
+ }
593
+
594
+ if (!dupe) selectCallback(token);
595
+ }
596
+ }
597
+ }
598
+
599
+ if (original!==input) return input;
600
+ }
601
+
602
+ /**
603
+ * Creates a new class
604
+ *
605
+ * @param superClass
606
+ * @param methods
607
+ */
608
+ function clazz(SuperClass, methods) {
609
+ var constructor = function () {};
610
+ constructor.prototype = new SuperClass;
611
+ constructor.prototype.constructor = constructor;
612
+ constructor.prototype.parent = SuperClass.prototype;
613
+ constructor.prototype = $.extend(constructor.prototype, methods);
614
+ return constructor;
615
+ }
616
+
617
+ AbstractSelect2 = clazz(Object, {
618
+
619
+ // abstract
620
+ bind: function (func) {
621
+ var self = this;
622
+ return function () {
623
+ func.apply(self, arguments);
624
+ };
625
+ },
626
+
627
+ // abstract
628
+ init: function (opts) {
629
+ var results, search, resultsSelector = ".select2-results", disabled, readonly;
630
+
631
+ // prepare options
632
+ this.opts = opts = this.prepareOpts(opts);
633
+
634
+ this.id=opts.id;
635
+
636
+ // destroy if called on an existing component
637
+ if (opts.element.data("select2") !== undefined &&
638
+ opts.element.data("select2") !== null) {
639
+ this.destroy();
640
+ }
641
+
642
+ this.container = this.createContainer();
643
+
644
+ this.containerId="s2id_"+(opts.element.attr("id") || "autogen"+nextUid());
645
+ this.containerSelector="#"+this.containerId.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g, '\\$1');
646
+ this.container.attr("id", this.containerId);
647
+
648
+ // cache the body so future lookups are cheap
649
+ this.body = thunk(function() { return opts.element.closest("body"); });
650
+
651
+ syncCssClasses(this.container, this.opts.element, this.opts.adaptContainerCssClass);
652
+
653
+ this.container.css(evaluate(opts.containerCss));
654
+ this.container.addClass(evaluate(opts.containerCssClass));
655
+
656
+ this.elementTabIndex = this.opts.element.attr("tabindex");
657
+
658
+ // swap container for the element
659
+ this.opts.element
660
+ .data("select2", this)
661
+ .attr("tabindex", "-1")
662
+ .before(this.container);
663
+ this.container.data("select2", this);
664
+
665
+ this.dropdown = this.container.find(".select2-drop");
666
+ this.dropdown.addClass(evaluate(opts.dropdownCssClass));
667
+ this.dropdown.data("select2", this);
668
+
669
+ this.results = results = this.container.find(resultsSelector);
670
+ this.search = search = this.container.find("input.select2-input");
671
+
672
+ this.resultsPage = 0;
673
+ this.context = null;
674
+
675
+ // initialize the container
676
+ this.initContainer();
677
+
678
+ installFilteredMouseMove(this.results);
679
+ this.dropdown.on("mousemove-filtered touchstart touchmove touchend", resultsSelector, this.bind(this.highlightUnderEvent));
680
+
681
+ installDebouncedScroll(80, this.results);
682
+ this.dropdown.on("scroll-debounced", resultsSelector, this.bind(this.loadMoreIfNeeded));
683
+
684
+ // do not propagate change event from the search field out of the component
685
+ $(this.container).on("change", ".select2-input", function(e) {e.stopPropagation();});
686
+ $(this.dropdown).on("change", ".select2-input", function(e) {e.stopPropagation();});
687
+
688
+ // if jquery.mousewheel plugin is installed we can prevent out-of-bounds scrolling of results via mousewheel
689
+ if ($.fn.mousewheel) {
690
+ results.mousewheel(function (e, delta, deltaX, deltaY) {
691
+ var top = results.scrollTop(), height;
692
+ if (deltaY > 0 && top - deltaY <= 0) {
693
+ results.scrollTop(0);
694
+ killEvent(e);
695
+ } else if (deltaY < 0 && results.get(0).scrollHeight - results.scrollTop() + deltaY <= results.height()) {
696
+ results.scrollTop(results.get(0).scrollHeight - results.height());
697
+ killEvent(e);
698
+ }
699
+ });
700
+ }
701
+
702
+ installKeyUpChangeEvent(search);
703
+ search.on("keyup-change input paste", this.bind(this.updateResults));
704
+ search.on("focus", function () { search.addClass("select2-focused"); });
705
+ search.on("blur", function () { search.removeClass("select2-focused");});
706
+
707
+ this.dropdown.on("mouseup", resultsSelector, this.bind(function (e) {
708
+ if ($(e.target).closest(".select2-result-selectable").length > 0) {
709
+ this.highlightUnderEvent(e);
710
+ this.selectHighlighted(e);
711
+ }
712
+ }));
713
+
714
+ // trap all mouse events from leaving the dropdown. sometimes there may be a modal that is listening
715
+ // for mouse events outside of itself so it can close itself. since the dropdown is now outside the select2's
716
+ // dom it will trigger the popup close, which is not what we want
717
+ this.dropdown.on("click mouseup mousedown", function (e) { e.stopPropagation(); });
718
+
719
+ if ($.isFunction(this.opts.initSelection)) {
720
+ // initialize selection based on the current value of the source element
721
+ this.initSelection();
722
+
723
+ // if the user has provided a function that can set selection based on the value of the source element
724
+ // we monitor the change event on the element and trigger it, allowing for two way synchronization
725
+ this.monitorSource();
726
+ }
727
+
728
+ if (opts.maximumInputLength !== null) {
729
+ this.search.attr("maxlength", opts.maximumInputLength);
730
+ }
731
+
732
+ var disabled = opts.element.prop("disabled");
733
+ if (disabled === undefined) disabled = false;
734
+ this.enable(!disabled);
735
+
736
+ var readonly = opts.element.prop("readonly");
737
+ if (readonly === undefined) readonly = false;
738
+ this.readonly(readonly);
739
+
740
+ // Calculate size of scrollbar
741
+ scrollBarDimensions = scrollBarDimensions || measureScrollbar();
742
+
743
+ this.autofocus = opts.element.prop("autofocus")
744
+ opts.element.prop("autofocus", false);
745
+ if (this.autofocus) this.focus();
746
+ },
747
+
748
+ // abstract
749
+ destroy: function () {
750
+ var select2 = this.opts.element.data("select2");
751
+
752
+ if (this.propertyObserver) { delete this.propertyObserver; this.propertyObserver = null; }
753
+
754
+ if (select2 !== undefined) {
755
+
756
+ select2.container.remove();
757
+ select2.dropdown.remove();
758
+ select2.opts.element
759
+ .removeClass("select2-offscreen")
760
+ .removeData("select2")
761
+ .off(".select2")
762
+ .attr({"tabindex": this.elementTabIndex})
763
+ .prop("autofocus", this.autofocus||false)
764
+ .show();
765
+ }
766
+ },
767
+
768
+ // abstract
769
+ optionToData: function(element) {
770
+ if (element.is("option")) {
771
+ return {
772
+ id:element.prop("value"),
773
+ text:element.text(),
774
+ element: element.get(),
775
+ css: element.attr("class"),
776
+ disabled: element.prop("disabled"),
777
+ locked: equal(element.attr("locked"), "locked")
778
+ };
779
+ } else if (element.is("optgroup")) {
780
+ return {
781
+ text:element.attr("label"),
782
+ children:[],
783
+ element: element.get(),
784
+ css: element.attr("class")
785
+ };
786
+ }
787
+ },
788
+
789
+ // abstract
790
+ prepareOpts: function (opts) {
791
+ var element, select, idKey, ajaxUrl, self = this;
792
+
793
+ element = opts.element;
794
+
795
+ if (element.get(0).tagName.toLowerCase() === "select") {
796
+ this.select = select = opts.element;
797
+ }
798
+
799
+ if (select) {
800
+ // these options are not allowed when attached to a select because they are picked up off the element itself
801
+ $.each(["id", "multiple", "ajax", "query", "createSearchChoice", "initSelection", "data", "tags"], function () {
802
+ if (this in opts) {
803
+ throw new Error("Option '" + this + "' is not allowed for Select2 when attached to a <select> element.");
804
+ }
805
+ });
806
+ }
807
+
808
+ opts = $.extend({}, {
809
+ populateResults: function(container, results, query) {
810
+ var populate, data, result, children, id=this.opts.id;
811
+
812
+ populate=function(results, container, depth) {
813
+
814
+ var i, l, result, selectable, disabled, compound, node, label, innerContainer, formatted;
815
+
816
+ results = opts.sortResults(results, container, query);
817
+
818
+ for (i = 0, l = results.length; i < l; i = i + 1) {
819
+
820
+ result=results[i];
821
+
822
+ disabled = (result.disabled === true);
823
+ selectable = (!disabled) && (id(result) !== undefined);
824
+
825
+ compound=result.children && result.children.length > 0;
826
+
827
+ node=$("<li></li>");
828
+ node.addClass("select2-results-dept-"+depth);
829
+ node.addClass("select2-result");
830
+ node.addClass(selectable ? "select2-result-selectable" : "select2-result-unselectable");
831
+ if (disabled) { node.addClass("select2-disabled"); }
832
+ if (compound) { node.addClass("select2-result-with-children"); }
833
+ node.addClass(self.opts.formatResultCssClass(result));
834
+
835
+ label=$(document.createElement("div"));
836
+ label.addClass("select2-result-label");
837
+
838
+ formatted=opts.formatResult(result, label, query, self.opts.escapeMarkup);
839
+ if (formatted!==undefined) {
840
+ label.html(formatted);
841
+ }
842
+
843
+ node.append(label);
844
+
845
+ if (compound) {
846
+
847
+ innerContainer=$("<ul></ul>");
848
+ innerContainer.addClass("select2-result-sub");
849
+ populate(result.children, innerContainer, depth+1);
850
+ node.append(innerContainer);
851
+ }
852
+
853
+ node.data("select2-data", result);
854
+ container.append(node);
855
+ }
856
+ };
857
+
858
+ populate(results, container, 0);
859
+ }
860
+ }, $.fn.select2.defaults, opts);
861
+
862
+ if (typeof(opts.id) !== "function") {
863
+ idKey = opts.id;
864
+ opts.id = function (e) { return e[idKey]; };
865
+ }
866
+
867
+ if ($.isArray(opts.element.data("select2Tags"))) {
868
+ if ("tags" in opts) {
869
+ throw "tags specified as both an attribute 'data-select2-tags' and in options of Select2 " + opts.element.attr("id");
870
+ }
871
+ opts.tags=opts.element.data("select2Tags");
872
+ }
873
+
874
+ if (select) {
875
+ opts.query = this.bind(function (query) {
876
+ var data = { results: [], more: false },
877
+ term = query.term,
878
+ children, firstChild, process;
879
+
880
+ process=function(element, collection) {
881
+ var group;
882
+ if (element.is("option")) {
883
+ if (query.matcher(term, element.text(), element)) {
884
+ collection.push(self.optionToData(element));
885
+ }
886
+ } else if (element.is("optgroup")) {
887
+ group=self.optionToData(element);
888
+ element.children().each2(function(i, elm) { process(elm, group.children); });
889
+ if (group.children.length>0) {
890
+ collection.push(group);
891
+ }
892
+ }
893
+ };
894
+
895
+ children=element.children();
896
+
897
+ // ignore the placeholder option if there is one
898
+ if (this.getPlaceholder() !== undefined && children.length > 0) {
899
+ firstChild = children[0];
900
+ if ($(firstChild).text() === "") {
901
+ children=children.not(firstChild);
902
+ }
903
+ }
904
+
905
+ children.each2(function(i, elm) { process(elm, data.results); });
906
+
907
+ query.callback(data);
908
+ });
909
+ // this is needed because inside val() we construct choices from options and there id is hardcoded
910
+ opts.id=function(e) { return e.id; };
911
+ opts.formatResultCssClass = function(data) { return data.css; };
912
+ } else {
913
+ if (!("query" in opts)) {
914
+
915
+ if ("ajax" in opts) {
916
+ ajaxUrl = opts.element.data("ajax-url");
917
+ if (ajaxUrl && ajaxUrl.length > 0) {
918
+ opts.ajax.url = ajaxUrl;
919
+ }
920
+ opts.query = ajax.call(opts.element, opts.ajax);
921
+ } else if ("data" in opts) {
922
+ opts.query = local(opts.data);
923
+ } else if ("tags" in opts) {
924
+ opts.query = tags(opts.tags);
925
+ if (opts.createSearchChoice === undefined) {
926
+ opts.createSearchChoice = function (term) { return {id: term, text: term}; };
927
+ }
928
+ if (opts.initSelection === undefined) {
929
+ opts.initSelection = function (element, callback) {
930
+ var data = [];
931
+ $(splitVal(element.val(), opts.separator)).each(function () {
932
+ var id = this, text = this, tags=opts.tags;
933
+ if ($.isFunction(tags)) tags=tags();
934
+ $(tags).each(function() { if (equal(this.id, id)) { text = this.text; return false; } });
935
+ data.push({id: id, text: text});
936
+ });
937
+
938
+ callback(data);
939
+ };
940
+ }
941
+ }
942
+ }
943
+ }
944
+ if (typeof(opts.query) !== "function") {
945
+ throw "query function not defined for Select2 " + opts.element.attr("id");
946
+ }
947
+
948
+ return opts;
949
+ },
950
+
951
+ /**
952
+ * Monitor the original element for changes and update select2 accordingly
953
+ */
954
+ // abstract
955
+ monitorSource: function () {
956
+ var el = this.opts.element, sync;
957
+
958
+ el.on("change.select2", this.bind(function (e) {
959
+ if (this.opts.element.data("select2-change-triggered") !== true) {
960
+ this.initSelection();
961
+ }
962
+ }));
963
+
964
+ sync = this.bind(function () {
965
+
966
+ var enabled, readonly, self = this;
967
+
968
+ // sync enabled state
969
+
970
+ var disabled = el.prop("disabled");
971
+ if (disabled === undefined) disabled = false;
972
+ this.enable(!disabled);
973
+
974
+ var readonly = el.prop("readonly");
975
+ if (readonly === undefined) readonly = false;
976
+ this.readonly(readonly);
977
+
978
+ syncCssClasses(this.container, this.opts.element, this.opts.adaptContainerCssClass);
979
+ this.container.addClass(evaluate(this.opts.containerCssClass));
980
+
981
+ syncCssClasses(this.dropdown, this.opts.element, this.opts.adaptDropdownCssClass);
982
+ this.dropdown.addClass(evaluate(this.opts.dropdownCssClass));
983
+
984
+ });
985
+
986
+ // mozilla and IE
987
+ el.on("propertychange.select2 DOMAttrModified.select2", sync);
988
+
989
+
990
+ // hold onto a reference of the callback to work around a chromium bug
991
+ if (this.mutationCallback === undefined) {
992
+ this.mutationCallback = function (mutations) {
993
+ mutations.forEach(sync);
994
+ }
995
+ }
996
+
997
+ // safari and chrome
998
+ if (typeof WebKitMutationObserver !== "undefined") {
999
+ if (this.propertyObserver) { delete this.propertyObserver; this.propertyObserver = null; }
1000
+ this.propertyObserver = new WebKitMutationObserver(this.mutationCallback);
1001
+ this.propertyObserver.observe(el.get(0), { attributes:true, subtree:false });
1002
+ }
1003
+ },
1004
+
1005
+ // abstract
1006
+ triggerSelect: function(data) {
1007
+ var evt = $.Event("select2-selecting", { val: this.id(data), object: data });
1008
+ this.opts.element.trigger(evt);
1009
+ return !evt.isDefaultPrevented();
1010
+ },
1011
+
1012
+ /**
1013
+ * Triggers the change event on the source element
1014
+ */
1015
+ // abstract
1016
+ triggerChange: function (details) {
1017
+
1018
+ details = details || {};
1019
+ details= $.extend({}, details, { type: "change", val: this.val() });
1020
+ // prevents recursive triggering
1021
+ this.opts.element.data("select2-change-triggered", true);
1022
+ this.opts.element.trigger(details);
1023
+ this.opts.element.data("select2-change-triggered", false);
1024
+
1025
+ // some validation frameworks ignore the change event and listen instead to keyup, click for selects
1026
+ // so here we trigger the click event manually
1027
+ this.opts.element.click();
1028
+
1029
+ // ValidationEngine ignorea the change event and listens instead to blur
1030
+ // so here we trigger the blur event manually if so desired
1031
+ if (this.opts.blurOnChange)
1032
+ this.opts.element.blur();
1033
+ },
1034
+
1035
+ //abstract
1036
+ isInterfaceEnabled: function()
1037
+ {
1038
+ return this.enabledInterface === true;
1039
+ },
1040
+
1041
+ // abstract
1042
+ enableInterface: function() {
1043
+ var enabled = this._enabled && !this._readonly,
1044
+ disabled = !enabled;
1045
+
1046
+ if (enabled === this.enabledInterface) return false;
1047
+
1048
+ this.container.toggleClass("select2-container-disabled", disabled);
1049
+ this.close();
1050
+ this.enabledInterface = enabled;
1051
+
1052
+ return true;
1053
+ },
1054
+
1055
+ // abstract
1056
+ enable: function(enabled) {
1057
+ if (enabled === undefined) enabled = true;
1058
+ if (this._enabled === enabled) return false;
1059
+ this._enabled = enabled;
1060
+
1061
+ this.opts.element.prop("disabled", !enabled);
1062
+ this.enableInterface();
1063
+ return true;
1064
+ },
1065
+
1066
+ // abstract
1067
+ readonly: function(enabled) {
1068
+ if (enabled === undefined) enabled = false;
1069
+ if (this._readonly === enabled) return false;
1070
+ this._readonly = enabled;
1071
+
1072
+ this.opts.element.prop("readonly", enabled);
1073
+ this.enableInterface();
1074
+ return true;
1075
+ },
1076
+
1077
+ // abstract
1078
+ opened: function () {
1079
+ return this.container.hasClass("select2-dropdown-open");
1080
+ },
1081
+
1082
+ // abstract
1083
+ positionDropdown: function() {
1084
+ var $dropdown = this.dropdown,
1085
+ offset = this.container.offset(),
1086
+ height = this.container.outerHeight(false),
1087
+ width = this.container.outerWidth(false),
1088
+ dropHeight = $dropdown.outerHeight(false),
1089
+ viewPortRight = $(window).scrollLeft() + $(window).width(),
1090
+ viewportBottom = $(window).scrollTop() + $(window).height(),
1091
+ dropTop = offset.top + height,
1092
+ dropLeft = offset.left,
1093
+ enoughRoomBelow = dropTop + dropHeight <= viewportBottom,
1094
+ enoughRoomAbove = (offset.top - dropHeight) >= this.body().scrollTop(),
1095
+ dropWidth = $dropdown.outerWidth(false),
1096
+ enoughRoomOnRight = dropLeft + dropWidth <= viewPortRight,
1097
+ aboveNow = $dropdown.hasClass("select2-drop-above"),
1098
+ bodyOffset,
1099
+ above,
1100
+ css,
1101
+ resultsListNode;
1102
+
1103
+ if (this.opts.dropdownAutoWidth) {
1104
+ resultsListNode = $('.select2-results', $dropdown)[0];
1105
+ $dropdown.addClass('select2-drop-auto-width');
1106
+ $dropdown.css('width', '');
1107
+ // Add scrollbar width to dropdown if vertical scrollbar is present
1108
+ dropWidth = $dropdown.outerWidth(false) + (resultsListNode.scrollHeight === resultsListNode.clientHeight ? 0 : scrollBarDimensions.width);
1109
+ dropWidth > width ? width = dropWidth : dropWidth = width;
1110
+ enoughRoomOnRight = dropLeft + dropWidth <= viewPortRight;
1111
+ }
1112
+ else {
1113
+ this.container.removeClass('select2-drop-auto-width');
1114
+ }
1115
+
1116
+ //console.log("below/ droptop:", dropTop, "dropHeight", dropHeight, "sum", (dropTop+dropHeight)+" viewport bottom", viewportBottom, "enough?", enoughRoomBelow);
1117
+ //console.log("above/ offset.top", offset.top, "dropHeight", dropHeight, "top", (offset.top-dropHeight), "scrollTop", this.body().scrollTop(), "enough?", enoughRoomAbove);
1118
+
1119
+ // fix positioning when body has an offset and is not position: static
1120
+
1121
+ if (this.body().css('position') !== 'static') {
1122
+ bodyOffset = this.body().offset();
1123
+ dropTop -= bodyOffset.top;
1124
+ dropLeft -= bodyOffset.left;
1125
+ }
1126
+
1127
+ // always prefer the current above/below alignment, unless there is not enough room
1128
+
1129
+ if (aboveNow) {
1130
+ above = true;
1131
+ if (!enoughRoomAbove && enoughRoomBelow) above = false;
1132
+ } else {
1133
+ above = false;
1134
+ if (!enoughRoomBelow && enoughRoomAbove) above = true;
1135
+ }
1136
+
1137
+ if (!enoughRoomOnRight) {
1138
+ dropLeft = offset.left + width - dropWidth;
1139
+ }
1140
+
1141
+ if (above) {
1142
+ dropTop = offset.top - dropHeight;
1143
+ this.container.addClass("select2-drop-above");
1144
+ $dropdown.addClass("select2-drop-above");
1145
+ }
1146
+ else {
1147
+ this.container.removeClass("select2-drop-above");
1148
+ $dropdown.removeClass("select2-drop-above");
1149
+ }
1150
+
1151
+ css = $.extend({
1152
+ top: dropTop,
1153
+ left: dropLeft,
1154
+ width: width
1155
+ }, evaluate(this.opts.dropdownCss));
1156
+
1157
+ $dropdown.css(css);
1158
+ },
1159
+
1160
+ // abstract
1161
+ shouldOpen: function() {
1162
+ var event;
1163
+
1164
+ if (this.opened()) return false;
1165
+
1166
+ if (this._enabled === false || this._readonly === true) return false;
1167
+
1168
+ event = $.Event("select2-opening");
1169
+ this.opts.element.trigger(event);
1170
+ return !event.isDefaultPrevented();
1171
+ },
1172
+
1173
+ // abstract
1174
+ clearDropdownAlignmentPreference: function() {
1175
+ // clear the classes used to figure out the preference of where the dropdown should be opened
1176
+ this.container.removeClass("select2-drop-above");
1177
+ this.dropdown.removeClass("select2-drop-above");
1178
+ },
1179
+
1180
+ /**
1181
+ * Opens the dropdown
1182
+ *
1183
+ * @return {Boolean} whether or not dropdown was opened. This method will return false if, for example,
1184
+ * the dropdown is already open, or if the 'open' event listener on the element called preventDefault().
1185
+ */
1186
+ // abstract
1187
+ open: function () {
1188
+
1189
+ if (!this.shouldOpen()) return false;
1190
+
1191
+ this.opening();
1192
+
1193
+ return true;
1194
+ },
1195
+
1196
+ /**
1197
+ * Performs the opening of the dropdown
1198
+ */
1199
+ // abstract
1200
+ opening: function() {
1201
+ var cid = this.containerId,
1202
+ scroll = "scroll." + cid,
1203
+ resize = "resize."+cid,
1204
+ orient = "orientationchange."+cid,
1205
+ mask;
1206
+
1207
+ this.container.addClass("select2-dropdown-open").addClass("select2-container-active");
1208
+
1209
+ this.clearDropdownAlignmentPreference();
1210
+
1211
+ if(this.dropdown[0] !== this.body().children().last()[0]) {
1212
+ this.dropdown.detach().appendTo(this.body());
1213
+ }
1214
+
1215
+ // create the dropdown mask if doesnt already exist
1216
+ mask = $("#select2-drop-mask");
1217
+ if (mask.length == 0) {
1218
+ mask = $(document.createElement("div"));
1219
+ mask.attr("id","select2-drop-mask").attr("class","select2-drop-mask");
1220
+ mask.hide();
1221
+ mask.appendTo(this.body());
1222
+ mask.on("mousedown touchstart", function (e) {
1223
+ var dropdown = $("#select2-drop"), self;
1224
+ if (dropdown.length > 0) {
1225
+ self=dropdown.data("select2");
1226
+ if (self.opts.selectOnBlur) {
1227
+ self.selectHighlighted({noFocus: true});
1228
+ }
1229
+ self.close();
1230
+ e.preventDefault();
1231
+ e.stopPropagation();
1232
+ }
1233
+ });
1234
+ }
1235
+
1236
+ // ensure the mask is always right before the dropdown
1237
+ if (this.dropdown.prev()[0] !== mask[0]) {
1238
+ this.dropdown.before(mask);
1239
+ }
1240
+
1241
+ // move the global id to the correct dropdown
1242
+ $("#select2-drop").removeAttr("id");
1243
+ this.dropdown.attr("id", "select2-drop");
1244
+
1245
+ // show the elements
1246
+ mask.css(_makeMaskCss());
1247
+ mask.show();
1248
+ this.dropdown.show();
1249
+ this.positionDropdown();
1250
+
1251
+ this.dropdown.addClass("select2-drop-active");
1252
+ this.ensureHighlightVisible();
1253
+
1254
+ // attach listeners to events that can change the position of the container and thus require
1255
+ // the position of the dropdown to be updated as well so it does not come unglued from the container
1256
+ var that = this;
1257
+ this.container.parents().add(window).each(function () {
1258
+ $(this).on(resize+" "+scroll+" "+orient, function (e) {
1259
+ $("#select2-drop-mask").css(_makeMaskCss());
1260
+ that.positionDropdown();
1261
+ });
1262
+ });
1263
+
1264
+ function _makeMaskCss() {
1265
+ return {
1266
+ width : Math.max(document.documentElement.scrollWidth, $(window).width()),
1267
+ height : Math.max(document.documentElement.scrollHeight, $(window).height())
1268
+ }
1269
+ }
1270
+ },
1271
+
1272
+ // abstract
1273
+ close: function () {
1274
+ if (!this.opened()) return;
1275
+
1276
+ var cid = this.containerId,
1277
+ scroll = "scroll." + cid,
1278
+ resize = "resize."+cid,
1279
+ orient = "orientationchange."+cid;
1280
+
1281
+ // unbind event listeners
1282
+ this.container.parents().add(window).each(function () { $(this).off(scroll).off(resize).off(orient); });
1283
+
1284
+ this.clearDropdownAlignmentPreference();
1285
+
1286
+ $("#select2-drop-mask").hide();
1287
+ this.dropdown.removeAttr("id"); // only the active dropdown has the select2-drop id
1288
+ this.dropdown.hide();
1289
+ this.container.removeClass("select2-dropdown-open");
1290
+ this.results.empty();
1291
+
1292
+
1293
+ this.clearSearch();
1294
+ this.search.removeClass("select2-active");
1295
+ this.opts.element.trigger($.Event("select2-close"));
1296
+ },
1297
+
1298
+ // abstract
1299
+ clearSearch: function () {
1300
+
1301
+ },
1302
+
1303
+ //abstract
1304
+ getMaximumSelectionSize: function() {
1305
+ return evaluate(this.opts.maximumSelectionSize);
1306
+ },
1307
+
1308
+ // abstract
1309
+ ensureHighlightVisible: function () {
1310
+ var results = this.results, children, index, child, hb, rb, y, more;
1311
+
1312
+ index = this.highlight();
1313
+
1314
+ if (index < 0) return;
1315
+
1316
+ if (index == 0) {
1317
+
1318
+ // if the first element is highlighted scroll all the way to the top,
1319
+ // that way any unselectable headers above it will also be scrolled
1320
+ // into view
1321
+
1322
+ results.scrollTop(0);
1323
+ return;
1324
+ }
1325
+
1326
+ children = this.findHighlightableChoices().find('.select2-result-label');
1327
+
1328
+ child = $(children[index]);
1329
+
1330
+ hb = child.offset().top + child.outerHeight(true);
1331
+
1332
+ // if this is the last child lets also make sure select2-more-results is visible
1333
+ if (index === children.length - 1) {
1334
+ more = results.find("li.select2-more-results");
1335
+ if (more.length > 0) {
1336
+ hb = more.offset().top + more.outerHeight(true);
1337
+ }
1338
+ }
1339
+
1340
+ rb = results.offset().top + results.outerHeight(true);
1341
+ if (hb > rb) {
1342
+ results.scrollTop(results.scrollTop() + (hb - rb));
1343
+ }
1344
+ y = child.offset().top - results.offset().top;
1345
+
1346
+ // make sure the top of the element is visible
1347
+ if (y < 0 && child.css('display') != 'none' ) {
1348
+ results.scrollTop(results.scrollTop() + y); // y is negative
1349
+ }
1350
+ },
1351
+
1352
+ // abstract
1353
+ findHighlightableChoices: function() {
1354
+ return this.results.find(".select2-result-selectable:not(.select2-selected):not(.select2-disabled)");
1355
+ },
1356
+
1357
+ // abstract
1358
+ moveHighlight: function (delta) {
1359
+ var choices = this.findHighlightableChoices(),
1360
+ index = this.highlight();
1361
+
1362
+ while (index > -1 && index < choices.length) {
1363
+ index += delta;
1364
+ var choice = $(choices[index]);
1365
+ if (choice.hasClass("select2-result-selectable") && !choice.hasClass("select2-disabled") && !choice.hasClass("select2-selected")) {
1366
+ this.highlight(index);
1367
+ break;
1368
+ }
1369
+ }
1370
+ },
1371
+
1372
+ // abstract
1373
+ highlight: function (index) {
1374
+ var choices = this.findHighlightableChoices(),
1375
+ choice,
1376
+ data;
1377
+
1378
+ if (arguments.length === 0) {
1379
+ return indexOf(choices.filter(".select2-highlighted")[0], choices.get());
1380
+ }
1381
+
1382
+ if (index >= choices.length) index = choices.length - 1;
1383
+ if (index < 0) index = 0;
1384
+
1385
+ this.results.find(".select2-highlighted").removeClass("select2-highlighted");
1386
+
1387
+ choice = $(choices[index]);
1388
+ choice.addClass("select2-highlighted");
1389
+
1390
+ this.ensureHighlightVisible();
1391
+
1392
+ data = choice.data("select2-data");
1393
+ if (data) {
1394
+ this.opts.element.trigger({ type: "select2-highlight", val: this.id(data), choice: data });
1395
+ }
1396
+ },
1397
+
1398
+ // abstract
1399
+ countSelectableResults: function() {
1400
+ return this.findHighlightableChoices().length;
1401
+ },
1402
+
1403
+ // abstract
1404
+ highlightUnderEvent: function (event) {
1405
+ var el = $(event.target).closest(".select2-result-selectable");
1406
+ if (el.length > 0 && !el.is(".select2-highlighted")) {
1407
+ var choices = this.findHighlightableChoices();
1408
+ this.highlight(choices.index(el));
1409
+ } else if (el.length == 0) {
1410
+ // if we are over an unselectable item remove al highlights
1411
+ this.results.find(".select2-highlighted").removeClass("select2-highlighted");
1412
+ }
1413
+ },
1414
+
1415
+ // abstract
1416
+ loadMoreIfNeeded: function () {
1417
+ var results = this.results,
1418
+ more = results.find("li.select2-more-results"),
1419
+ below, // pixels the element is below the scroll fold, below==0 is when the element is starting to be visible
1420
+ offset = -1, // index of first element without data
1421
+ page = this.resultsPage + 1,
1422
+ self=this,
1423
+ term=this.search.val(),
1424
+ context=this.context;
1425
+
1426
+ if (more.length === 0) return;
1427
+ below = more.offset().top - results.offset().top - results.height();
1428
+
1429
+ if (below <= this.opts.loadMorePadding) {
1430
+ more.addClass("select2-active");
1431
+ this.opts.query({
1432
+ element: this.opts.element,
1433
+ term: term,
1434
+ page: page,
1435
+ context: context,
1436
+ matcher: this.opts.matcher,
1437
+ callback: this.bind(function (data) {
1438
+
1439
+ // ignore a response if the select2 has been closed before it was received
1440
+ if (!self.opened()) return;
1441
+
1442
+
1443
+ self.opts.populateResults.call(this, results, data.results, {term: term, page: page, context:context});
1444
+ self.postprocessResults(data, false, false);
1445
+
1446
+ if (data.more===true) {
1447
+ more.detach().appendTo(results).text(self.opts.formatLoadMore(page+1));
1448
+ window.setTimeout(function() { self.loadMoreIfNeeded(); }, 10);
1449
+ } else {
1450
+ more.remove();
1451
+ }
1452
+ self.positionDropdown();
1453
+ self.resultsPage = page;
1454
+ self.context = data.context;
1455
+ })});
1456
+ }
1457
+ },
1458
+
1459
+ /**
1460
+ * Default tokenizer function which does nothing
1461
+ */
1462
+ tokenize: function() {
1463
+
1464
+ },
1465
+
1466
+ /**
1467
+ * @param initial whether or not this is the call to this method right after the dropdown has been opened
1468
+ */
1469
+ // abstract
1470
+ updateResults: function (initial) {
1471
+ var search = this.search,
1472
+ results = this.results,
1473
+ opts = this.opts,
1474
+ data,
1475
+ self = this,
1476
+ input,
1477
+ term = search.val(),
1478
+ lastTerm=$.data(this.container, "select2-last-term");
1479
+
1480
+ // prevent duplicate queries against the same term
1481
+ if (initial !== true && lastTerm && equal(term, lastTerm)) return;
1482
+
1483
+ $.data(this.container, "select2-last-term", term);
1484
+
1485
+ // if the search is currently hidden we do not alter the results
1486
+ if (initial !== true && (this.showSearchInput === false || !this.opened())) {
1487
+ return;
1488
+ }
1489
+
1490
+ function postRender() {
1491
+ results.scrollTop(0);
1492
+ search.removeClass("select2-active");
1493
+ self.positionDropdown();
1494
+ }
1495
+
1496
+ function render(html) {
1497
+ results.html(html);
1498
+ postRender();
1499
+ }
1500
+
1501
+ var maxSelSize = this.getMaximumSelectionSize();
1502
+ if (maxSelSize >=1) {
1503
+ data = this.data();
1504
+ if ($.isArray(data) && data.length >= maxSelSize && checkFormatter(opts.formatSelectionTooBig, "formatSelectionTooBig")) {
1505
+ render("<li class='select2-selection-limit'>" + opts.formatSelectionTooBig(maxSelSize) + "</li>");
1506
+ return;
1507
+ }
1508
+ }
1509
+
1510
+ if (search.val().length < opts.minimumInputLength) {
1511
+ if (checkFormatter(opts.formatInputTooShort, "formatInputTooShort")) {
1512
+ render("<li class='select2-no-results'>" + opts.formatInputTooShort(search.val(), opts.minimumInputLength) + "</li>");
1513
+ } else {
1514
+ render("");
1515
+ }
1516
+ if (initial && this.showSearch) this.showSearch(true);
1517
+ return;
1518
+ }
1519
+
1520
+ if (opts.maximumInputLength && search.val().length > opts.maximumInputLength) {
1521
+ if (checkFormatter(opts.formatInputTooLong, "formatInputTooLong")) {
1522
+ render("<li class='select2-no-results'>" + opts.formatInputTooLong(search.val(), opts.maximumInputLength) + "</li>");
1523
+ } else {
1524
+ render("");
1525
+ }
1526
+ return;
1527
+ }
1528
+
1529
+ if (opts.formatSearching && this.findHighlightableChoices().length === 0) {
1530
+ render("<li class='select2-searching'>" + opts.formatSearching() + "</li>");
1531
+ }
1532
+
1533
+ search.addClass("select2-active");
1534
+
1535
+ // give the tokenizer a chance to pre-process the input
1536
+ input = this.tokenize();
1537
+ if (input != undefined && input != null) {
1538
+ search.val(input);
1539
+ }
1540
+
1541
+ this.resultsPage = 1;
1542
+
1543
+ opts.query({
1544
+ element: opts.element,
1545
+ term: search.val(),
1546
+ page: this.resultsPage,
1547
+ context: null,
1548
+ matcher: opts.matcher,
1549
+ callback: this.bind(function (data) {
1550
+ var def; // default choice
1551
+
1552
+ // ignore a response if the select2 has been closed before it was received
1553
+ if (!this.opened()) {
1554
+ this.search.removeClass("select2-active");
1555
+ return;
1556
+ }
1557
+
1558
+ // save context, if any
1559
+ this.context = (data.context===undefined) ? null : data.context;
1560
+ // create a default choice and prepend it to the list
1561
+ if (this.opts.createSearchChoice && search.val() !== "") {
1562
+ def = this.opts.createSearchChoice.call(null, search.val(), data.results);
1563
+ if (def !== undefined && def !== null && self.id(def) !== undefined && self.id(def) !== null) {
1564
+ if ($(data.results).filter(
1565
+ function () {
1566
+ return equal(self.id(this), self.id(def));
1567
+ }).length === 0) {
1568
+ data.results.unshift(def);
1569
+ }
1570
+ }
1571
+ }
1572
+
1573
+ if (data.results.length === 0 && checkFormatter(opts.formatNoMatches, "formatNoMatches")) {
1574
+ render("<li class='select2-no-results'>" + opts.formatNoMatches(search.val()) + "</li>");
1575
+ return;
1576
+ }
1577
+
1578
+ results.empty();
1579
+ self.opts.populateResults.call(this, results, data.results, {term: search.val(), page: this.resultsPage, context:null});
1580
+
1581
+ if (data.more === true && checkFormatter(opts.formatLoadMore, "formatLoadMore")) {
1582
+ results.append("<li class='select2-more-results'>" + self.opts.escapeMarkup(opts.formatLoadMore(this.resultsPage)) + "</li>");
1583
+ window.setTimeout(function() { self.loadMoreIfNeeded(); }, 10);
1584
+ }
1585
+
1586
+ this.postprocessResults(data, initial);
1587
+
1588
+ postRender();
1589
+
1590
+ this.opts.element.trigger({ type: "select2-loaded", data:data });
1591
+ })});
1592
+ },
1593
+
1594
+ // abstract
1595
+ cancel: function () {
1596
+ this.close();
1597
+ },
1598
+
1599
+ // abstract
1600
+ blur: function () {
1601
+ // if selectOnBlur == true, select the currently highlighted option
1602
+ if (this.opts.selectOnBlur)
1603
+ this.selectHighlighted({noFocus: true});
1604
+
1605
+ this.close();
1606
+ this.container.removeClass("select2-container-active");
1607
+ // synonymous to .is(':focus'), which is available in jquery >= 1.6
1608
+ if (this.search[0] === document.activeElement) { this.search.blur(); }
1609
+ this.clearSearch();
1610
+ this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus");
1611
+ },
1612
+
1613
+ // abstract
1614
+ focusSearch: function () {
1615
+ focus(this.search);
1616
+ },
1617
+
1618
+ // abstract
1619
+ selectHighlighted: function (options) {
1620
+ var index=this.highlight(),
1621
+ highlighted=this.results.find(".select2-highlighted"),
1622
+ data = highlighted.closest('.select2-result').data("select2-data");
1623
+
1624
+ if (data) {
1625
+ this.highlight(index);
1626
+ this.onSelect(data, options);
1627
+ }
1628
+ },
1629
+
1630
+ // abstract
1631
+ getPlaceholder: function () {
1632
+ return this.opts.element.attr("placeholder") ||
1633
+ this.opts.element.attr("data-placeholder") || // jquery 1.4 compat
1634
+ this.opts.element.data("placeholder") ||
1635
+ this.opts.placeholder;
1636
+ },
1637
+
1638
+ /**
1639
+ * Get the desired width for the container element. This is
1640
+ * derived first from option `width` passed to select2, then
1641
+ * the inline 'style' on the original element, and finally
1642
+ * falls back to the jQuery calculated element width.
1643
+ */
1644
+ // abstract
1645
+ initContainerWidth: function () {
1646
+ function resolveContainerWidth() {
1647
+ var style, attrs, matches, i, l;
1648
+
1649
+ if (this.opts.width === "off") {
1650
+ return null;
1651
+ } else if (this.opts.width === "element"){
1652
+ return this.opts.element.outerWidth(false) === 0 ? 'auto' : this.opts.element.outerWidth(false) + 'px';
1653
+ } else if (this.opts.width === "copy" || this.opts.width === "resolve") {
1654
+ // check if there is inline style on the element that contains width
1655
+ style = this.opts.element.attr('style');
1656
+ if (style !== undefined) {
1657
+ attrs = style.split(';');
1658
+ for (i = 0, l = attrs.length; i < l; i = i + 1) {
1659
+ matches = attrs[i].replace(/\s/g, '')
1660
+ .match(/width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i);
1661
+ if (matches !== null && matches.length >= 1)
1662
+ return matches[1];
1663
+ }
1664
+ }
1665
+
1666
+ // next check if css('width') can resolve a width that is percent based, this is sometimes possible
1667
+ // when attached to input type=hidden or elements hidden via css
1668
+ style = this.opts.element.css('width');
1669
+ if (style && style.length > 0) return style;
1670
+
1671
+ if (this.opts.width === "resolve") {
1672
+ // finally, fallback on the calculated width of the element
1673
+ return (this.opts.element.outerWidth(false) === 0 ? 'auto' : this.opts.element.outerWidth(false) + 'px');
1674
+ }
1675
+
1676
+ return null;
1677
+ } else if ($.isFunction(this.opts.width)) {
1678
+ return this.opts.width();
1679
+ } else {
1680
+ return this.opts.width;
1681
+ }
1682
+ };
1683
+
1684
+ var width = resolveContainerWidth.call(this);
1685
+ if (width !== null) {
1686
+ this.container.css("width", width);
1687
+ }
1688
+ }
1689
+ });
1690
+
1691
+ SingleSelect2 = clazz(AbstractSelect2, {
1692
+
1693
+ // single
1694
+
1695
+ createContainer: function () {
1696
+ var container = $(document.createElement("div")).attr({
1697
+ "class": "select2-container"
1698
+ }).html([
1699
+ "<a href='javascript:void(0)' onclick='return false;' class='select2-choice' tabindex='-1'>",
1700
+ " <span>&nbsp;</span><abbr class='select2-search-choice-close'></abbr>",
1701
+ " <div><b></b></div>" ,
1702
+ "</a>",
1703
+ "<input class='select2-focusser select2-offscreen' type='text'/>",
1704
+ "<div class='select2-drop select2-display-none'>" ,
1705
+ " <div class='select2-search'>" ,
1706
+ " <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input'/>" ,
1707
+ " </div>" ,
1708
+ " <ul class='select2-results'>" ,
1709
+ " </ul>" ,
1710
+ "</div>"].join(""));
1711
+ return container;
1712
+ },
1713
+
1714
+ // single
1715
+ enableInterface: function() {
1716
+ if (this.parent.enableInterface.apply(this, arguments)) {
1717
+ this.focusser.prop("disabled", !this.isInterfaceEnabled());
1718
+ }
1719
+ },
1720
+
1721
+ // single
1722
+ opening: function () {
1723
+ var el, range;
1724
+ this.parent.opening.apply(this, arguments);
1725
+ if (this.showSearchInput !== false) {
1726
+ // IE appends focusser.val() at the end of field :/ so we manually insert it at the beginning using a range
1727
+ // all other browsers handle this just fine
1728
+
1729
+ this.search.val(this.focusser.val());
1730
+ }
1731
+ this.search.focus();
1732
+ // in IE we have to move the cursor to the end after focussing, otherwise it will be at the beginning and
1733
+ // new text will appear *before* focusser.val()
1734
+ el = this.search.get(0);
1735
+ if (el.createTextRange) {
1736
+ range = el.createTextRange();
1737
+ range.collapse(false);
1738
+ range.select();
1739
+ }
1740
+
1741
+ this.focusser.prop("disabled", true).val("");
1742
+ this.updateResults(true);
1743
+ this.opts.element.trigger($.Event("select2-open"));
1744
+ },
1745
+
1746
+ // single
1747
+ close: function () {
1748
+ if (!this.opened()) return;
1749
+ this.parent.close.apply(this, arguments);
1750
+ this.focusser.removeAttr("disabled");
1751
+ this.focusser.focus();
1752
+ },
1753
+
1754
+ // single
1755
+ focus: function () {
1756
+ if (this.opened()) {
1757
+ this.close();
1758
+ } else {
1759
+ this.focusser.removeAttr("disabled");
1760
+ this.focusser.focus();
1761
+ }
1762
+ },
1763
+
1764
+ // single
1765
+ isFocused: function () {
1766
+ return this.container.hasClass("select2-container-active");
1767
+ },
1768
+
1769
+ // single
1770
+ cancel: function () {
1771
+ this.parent.cancel.apply(this, arguments);
1772
+ this.focusser.removeAttr("disabled");
1773
+ this.focusser.focus();
1774
+ },
1775
+
1776
+ // single
1777
+ initContainer: function () {
1778
+
1779
+ var selection,
1780
+ container = this.container,
1781
+ dropdown = this.dropdown;
1782
+
1783
+ this.showSearch(false);
1784
+
1785
+ this.selection = selection = container.find(".select2-choice");
1786
+
1787
+ this.focusser = container.find(".select2-focusser");
1788
+
1789
+ // rewrite labels from original element to focusser
1790
+ this.focusser.attr("id", "s2id_autogen"+nextUid());
1791
+
1792
+ $("label[for='" + this.opts.element.attr("id") + "']")
1793
+ .attr('for', this.focusser.attr('id'));
1794
+
1795
+ this.focusser.attr("tabindex", this.elementTabIndex);
1796
+
1797
+ this.search.on("keydown", this.bind(function (e) {
1798
+ if (!this.isInterfaceEnabled()) return;
1799
+
1800
+ if (e.which === KEY.PAGE_UP || e.which === KEY.PAGE_DOWN) {
1801
+ // prevent the page from scrolling
1802
+ killEvent(e);
1803
+ return;
1804
+ }
1805
+
1806
+ switch (e.which) {
1807
+ case KEY.UP:
1808
+ case KEY.DOWN:
1809
+ this.moveHighlight((e.which === KEY.UP) ? -1 : 1);
1810
+ killEvent(e);
1811
+ return;
1812
+ case KEY.ENTER:
1813
+ this.selectHighlighted();
1814
+ killEvent(e);
1815
+ return;
1816
+ case KEY.TAB:
1817
+ this.selectHighlighted({noFocus: true});
1818
+ return;
1819
+ case KEY.ESC:
1820
+ this.cancel(e);
1821
+ killEvent(e);
1822
+ return;
1823
+ }
1824
+ }));
1825
+
1826
+ this.search.on("blur", this.bind(function(e) {
1827
+ // a workaround for chrome to keep the search field focussed when the scroll bar is used to scroll the dropdown.
1828
+ // without this the search field loses focus which is annoying
1829
+ if (document.activeElement === this.body().get(0)) {
1830
+ window.setTimeout(this.bind(function() {
1831
+ this.search.focus();
1832
+ }), 0);
1833
+ }
1834
+ }));
1835
+
1836
+ this.focusser.on("keydown", this.bind(function (e) {
1837
+ if (!this.isInterfaceEnabled()) return;
1838
+
1839
+ if (e.which === KEY.TAB || KEY.isControl(e) || KEY.isFunctionKey(e) || e.which === KEY.ESC) {
1840
+ return;
1841
+ }
1842
+
1843
+ if (this.opts.openOnEnter === false && e.which === KEY.ENTER) {
1844
+ killEvent(e);
1845
+ return;
1846
+ }
1847
+
1848
+ if (e.which == KEY.DOWN || e.which == KEY.UP
1849
+ || (e.which == KEY.ENTER && this.opts.openOnEnter)) {
1850
+ this.open();
1851
+ killEvent(e);
1852
+ return;
1853
+ }
1854
+
1855
+ if (e.which == KEY.DELETE || e.which == KEY.BACKSPACE) {
1856
+ if (this.opts.allowClear) {
1857
+ this.clear();
1858
+ }
1859
+ killEvent(e);
1860
+ return;
1861
+ }
1862
+ }));
1863
+
1864
+
1865
+ installKeyUpChangeEvent(this.focusser);
1866
+ this.focusser.on("keyup-change input", this.bind(function(e) {
1867
+ e.stopPropagation();
1868
+ if (this.opened()) return;
1869
+ this.open();
1870
+ }));
1871
+
1872
+ selection.on("mousedown", "abbr", this.bind(function (e) {
1873
+ if (!this.isInterfaceEnabled()) return;
1874
+ this.clear();
1875
+ killEventImmediately(e);
1876
+ this.close();
1877
+ this.selection.focus();
1878
+ }));
1879
+
1880
+ selection.on("mousedown", this.bind(function (e) {
1881
+
1882
+ if (!this.container.hasClass("select2-container-active")) {
1883
+ this.opts.element.trigger($.Event("select2-focus"));
1884
+ }
1885
+
1886
+ if (this.opened()) {
1887
+ this.close();
1888
+ } else if (this.isInterfaceEnabled()) {
1889
+ this.open();
1890
+ }
1891
+
1892
+ killEvent(e);
1893
+ }));
1894
+
1895
+ dropdown.on("mousedown", this.bind(function() { this.search.focus(); }));
1896
+
1897
+ selection.on("focus", this.bind(function(e) {
1898
+ killEvent(e);
1899
+ }));
1900
+
1901
+ this.focusser.on("focus", this.bind(function(){
1902
+ if (!this.container.hasClass("select2-container-active")) {
1903
+ this.opts.element.trigger($.Event("select2-focus"));
1904
+ }
1905
+ this.container.addClass("select2-container-active");
1906
+ })).on("blur", this.bind(function() {
1907
+ if (!this.opened()) {
1908
+ this.container.removeClass("select2-container-active");
1909
+ this.opts.element.trigger($.Event("select2-blur"));
1910
+ }
1911
+ }));
1912
+ this.search.on("focus", this.bind(function(){
1913
+ if (!this.container.hasClass("select2-container-active")) {
1914
+ this.opts.element.trigger($.Event("select2-focus"));
1915
+ }
1916
+ this.container.addClass("select2-container-active");
1917
+ }));
1918
+
1919
+ this.initContainerWidth();
1920
+ this.opts.element.addClass("select2-offscreen");
1921
+ this.setPlaceholder();
1922
+
1923
+ },
1924
+
1925
+ // single
1926
+ clear: function(triggerChange) {
1927
+ var data=this.selection.data("select2-data");
1928
+ if (data) { // guard against queued quick consecutive clicks
1929
+ this.opts.element.val("");
1930
+ this.selection.find("span").empty();
1931
+ this.selection.removeData("select2-data");
1932
+ this.setPlaceholder();
1933
+
1934
+ if (triggerChange !== false){
1935
+ this.opts.element.trigger({ type: "select2-removed", val: this.id(data), choice: data });
1936
+ this.triggerChange({removed:data});
1937
+ }
1938
+ }
1939
+ },
1940
+
1941
+ /**
1942
+ * Sets selection based on source element's value
1943
+ */
1944
+ // single
1945
+ initSelection: function () {
1946
+ var selected;
1947
+ if (this.opts.element.val() === "" && this.opts.element.text() === "") {
1948
+ this.updateSelection([]);
1949
+ this.close();
1950
+ this.setPlaceholder();
1951
+ } else {
1952
+ var self = this;
1953
+ this.opts.initSelection.call(null, this.opts.element, function(selected){
1954
+ if (selected !== undefined && selected !== null) {
1955
+ self.updateSelection(selected);
1956
+ self.close();
1957
+ self.setPlaceholder();
1958
+ }
1959
+ });
1960
+ }
1961
+ },
1962
+
1963
+ // single
1964
+ prepareOpts: function () {
1965
+ var opts = this.parent.prepareOpts.apply(this, arguments),
1966
+ self=this;
1967
+
1968
+ if (opts.element.get(0).tagName.toLowerCase() === "select") {
1969
+ // install the selection initializer
1970
+ opts.initSelection = function (element, callback) {
1971
+ var selected = element.find(":selected");
1972
+ // a single select box always has a value, no need to null check 'selected'
1973
+ callback(self.optionToData(selected));
1974
+ };
1975
+ } else if ("data" in opts) {
1976
+ // install default initSelection when applied to hidden input and data is local
1977
+ opts.initSelection = opts.initSelection || function (element, callback) {
1978
+ var id = element.val();
1979
+ //search in data by id, storing the actual matching item
1980
+ var match = null;
1981
+ opts.query({
1982
+ matcher: function(term, text, el){
1983
+ var is_match = equal(id, opts.id(el));
1984
+ if (is_match) {
1985
+ match = el;
1986
+ }
1987
+ return is_match;
1988
+ },
1989
+ callback: !$.isFunction(callback) ? $.noop : function() {
1990
+ callback(match);
1991
+ }
1992
+ });
1993
+ };
1994
+ }
1995
+
1996
+ return opts;
1997
+ },
1998
+
1999
+ // single
2000
+ getPlaceholder: function() {
2001
+ // if a placeholder is specified on a single select without the first empty option ignore it
2002
+ if (this.select) {
2003
+ if (this.select.find("option").first().text() !== "") {
2004
+ return undefined;
2005
+ }
2006
+ }
2007
+
2008
+ return this.parent.getPlaceholder.apply(this, arguments);
2009
+ },
2010
+
2011
+ // single
2012
+ setPlaceholder: function () {
2013
+ var placeholder = this.getPlaceholder();
2014
+
2015
+ if (this.opts.element.val() === "" && placeholder !== undefined) {
2016
+
2017
+ // check for a first blank option if attached to a select
2018
+ if (this.select && this.select.find("option:first").text() !== "") return;
2019
+
2020
+ this.selection.find("span").html(this.opts.escapeMarkup(placeholder));
2021
+
2022
+ this.selection.addClass("select2-default");
2023
+
2024
+ this.container.removeClass("select2-allowclear");
2025
+ }
2026
+ },
2027
+
2028
+ // single
2029
+ postprocessResults: function (data, initial, noHighlightUpdate) {
2030
+ var selected = 0, self = this, showSearchInput = true;
2031
+
2032
+ // find the selected element in the result list
2033
+
2034
+ this.findHighlightableChoices().each2(function (i, elm) {
2035
+ if (equal(self.id(elm.data("select2-data")), self.opts.element.val())) {
2036
+ selected = i;
2037
+ return false;
2038
+ }
2039
+ });
2040
+
2041
+ // and highlight it
2042
+ if (noHighlightUpdate !== false) {
2043
+ this.highlight(selected);
2044
+ }
2045
+
2046
+ // show the search box if this is the first we got the results and there are enough of them for search
2047
+
2048
+ if (initial === true && this.showSearchInput === false) {
2049
+ var min=this.opts.minimumResultsForSearch;
2050
+ if (min>=0) {
2051
+ this.showSearch(countResults(data.results)>=min);
2052
+ }
2053
+ }
2054
+
2055
+ },
2056
+
2057
+ // single
2058
+ showSearch: function(showSearchInput) {
2059
+ this.showSearchInput = showSearchInput;
2060
+
2061
+ this.dropdown.find(".select2-search").toggleClass("select2-search-hidden", !showSearchInput);
2062
+ this.dropdown.find(".select2-search").toggleClass("select2-offscreen", !showSearchInput);
2063
+ //add "select2-with-searchbox" to the container if search box is shown
2064
+ $(this.dropdown, this.container).toggleClass("select2-with-searchbox", showSearchInput);
2065
+ },
2066
+
2067
+ // single
2068
+ onSelect: function (data, options) {
2069
+
2070
+ if (!this.triggerSelect(data)) { return; }
2071
+
2072
+ var old = this.opts.element.val(),
2073
+ oldData = this.data();
2074
+
2075
+ this.opts.element.val(this.id(data));
2076
+ this.updateSelection(data);
2077
+
2078
+ this.opts.element.trigger({ type: "select2-selected", val: this.id(data), choice: data });
2079
+
2080
+ this.close();
2081
+
2082
+ if (!options || !options.noFocus)
2083
+ this.selection.focus();
2084
+
2085
+ if (!equal(old, this.id(data))) { this.triggerChange({added:data,removed:oldData}); }
2086
+ },
2087
+
2088
+ // single
2089
+ updateSelection: function (data) {
2090
+
2091
+ var container=this.selection.find("span"), formatted, cssClass;
2092
+
2093
+ this.selection.data("select2-data", data);
2094
+
2095
+ container.empty();
2096
+ formatted=this.opts.formatSelection(data, container);
2097
+ if (formatted !== undefined) {
2098
+ container.append(this.opts.escapeMarkup(formatted));
2099
+ }
2100
+ cssClass=this.opts.formatSelectionCssClass(data, container);
2101
+ if (cssClass !== undefined) {
2102
+ container.addClass(cssClass);
2103
+ }
2104
+
2105
+ this.selection.removeClass("select2-default");
2106
+
2107
+ if (this.opts.allowClear && this.getPlaceholder() !== undefined) {
2108
+ this.container.addClass("select2-allowclear");
2109
+ }
2110
+ },
2111
+
2112
+ // single
2113
+ val: function () {
2114
+ var val,
2115
+ triggerChange = false,
2116
+ data = null,
2117
+ self = this,
2118
+ oldData = this.data();
2119
+
2120
+ if (arguments.length === 0) {
2121
+ return this.opts.element.val();
2122
+ }
2123
+
2124
+ val = arguments[0];
2125
+
2126
+ if (arguments.length > 1) {
2127
+ triggerChange = arguments[1];
2128
+ }
2129
+
2130
+ if (this.select) {
2131
+ this.select
2132
+ .val(val)
2133
+ .find(":selected").each2(function (i, elm) {
2134
+ data = self.optionToData(elm);
2135
+ return false;
2136
+ });
2137
+ this.updateSelection(data);
2138
+ this.setPlaceholder();
2139
+ if (triggerChange) {
2140
+ this.triggerChange({added: data, removed:oldData});
2141
+ }
2142
+ } else {
2143
+ if (this.opts.initSelection === undefined) {
2144
+ throw new Error("cannot call val() if initSelection() is not defined");
2145
+ }
2146
+ // val is an id. !val is true for [undefined,null,'',0] - 0 is legal
2147
+ if (!val && val !== 0) {
2148
+ this.clear(triggerChange);
2149
+ return;
2150
+ }
2151
+ this.opts.element.val(val);
2152
+ this.opts.initSelection(this.opts.element, function(data){
2153
+ self.opts.element.val(!data ? "" : self.id(data));
2154
+ self.updateSelection(data);
2155
+ self.setPlaceholder();
2156
+ if (triggerChange) {
2157
+ self.triggerChange({added: data, removed:oldData});
2158
+ }
2159
+ });
2160
+ }
2161
+ },
2162
+
2163
+ // single
2164
+ clearSearch: function () {
2165
+ this.search.val("");
2166
+ this.focusser.val("");
2167
+ },
2168
+
2169
+ // single
2170
+ data: function(value, triggerChange) {
2171
+ var data;
2172
+
2173
+ if (arguments.length === 0) {
2174
+ data = this.selection.data("select2-data");
2175
+ if (data == undefined) data = null;
2176
+ return data;
2177
+ } else {
2178
+ if (!value || value === "") {
2179
+ this.clear(triggerChange);
2180
+ } else {
2181
+ data = this.data();
2182
+ this.opts.element.val(!value ? "" : this.id(value));
2183
+ this.updateSelection(value);
2184
+ if (triggerChange) {
2185
+ this.triggerChange({added: value, removed:data});
2186
+ }
2187
+ }
2188
+ }
2189
+ }
2190
+ });
2191
+
2192
+ MultiSelect2 = clazz(AbstractSelect2, {
2193
+
2194
+ // multi
2195
+ createContainer: function () {
2196
+ var container = $(document.createElement("div")).attr({
2197
+ "class": "select2-container select2-container-multi"
2198
+ }).html([
2199
+ " <ul class='select2-choices'>",
2200
+ //"<li class='select2-search-choice'><span>California</span><a href="javascript:void(0)" class="select2-search-choice-close"></a></li>" ,
2201
+ " <li class='select2-search-field'>" ,
2202
+ " <input type='text' autocomplete='off' autocorrect='off' autocapitilize='off' spellcheck='false' class='select2-input'>" ,
2203
+ " </li>" ,
2204
+ "</ul>" ,
2205
+ "<div class='select2-drop select2-drop-multi select2-display-none'>" ,
2206
+ " <ul class='select2-results'>" ,
2207
+ " </ul>" ,
2208
+ "</div>"].join(""));
2209
+ return container;
2210
+ },
2211
+
2212
+ // multi
2213
+ prepareOpts: function () {
2214
+ var opts = this.parent.prepareOpts.apply(this, arguments),
2215
+ self=this;
2216
+
2217
+ // TODO validate placeholder is a string if specified
2218
+
2219
+ if (opts.element.get(0).tagName.toLowerCase() === "select") {
2220
+ // install sthe selection initializer
2221
+ opts.initSelection = function (element, callback) {
2222
+
2223
+ var data = [];
2224
+
2225
+ element.find(":selected").each2(function (i, elm) {
2226
+ data.push(self.optionToData(elm));
2227
+ });
2228
+ callback(data);
2229
+ };
2230
+ } else if ("data" in opts) {
2231
+ // install default initSelection when applied to hidden input and data is local
2232
+ opts.initSelection = opts.initSelection || function (element, callback) {
2233
+ var ids = splitVal(element.val(), opts.separator);
2234
+ //search in data by array of ids, storing matching items in a list
2235
+ var matches = [];
2236
+ opts.query({
2237
+ matcher: function(term, text, el){
2238
+ var is_match = $.grep(ids, function(id) {
2239
+ return equal(id, opts.id(el));
2240
+ }).length;
2241
+ if (is_match) {
2242
+ matches.push(el);
2243
+ }
2244
+ return is_match;
2245
+ },
2246
+ callback: !$.isFunction(callback) ? $.noop : function() {
2247
+ // reorder matches based on the order they appear in the ids array because right now
2248
+ // they are in the order in which they appear in data array
2249
+ var ordered = [];
2250
+ for (var i = 0; i < ids.length; i++) {
2251
+ var id = ids[i];
2252
+ for (var j = 0; j < matches.length; j++) {
2253
+ var match = matches[j];
2254
+ if (equal(id, opts.id(match))) {
2255
+ ordered.push(match);
2256
+ matches.splice(j, 1);
2257
+ break;
2258
+ }
2259
+ }
2260
+ }
2261
+ callback(ordered);
2262
+ }
2263
+ });
2264
+ };
2265
+ }
2266
+
2267
+ return opts;
2268
+ },
2269
+
2270
+ selectChoice: function (choice) {
2271
+
2272
+ var selected = this.container.find(".select2-search-choice-focus");
2273
+ if (selected.length && choice && choice[0] == selected[0]) {
2274
+
2275
+ } else {
2276
+ if (selected.length) {
2277
+ this.opts.element.trigger("choice-deselected", selected);
2278
+ }
2279
+ selected.removeClass("select2-search-choice-focus");
2280
+ if (choice && choice.length) {
2281
+ this.close();
2282
+ choice.addClass("select2-search-choice-focus");
2283
+ this.opts.element.trigger("choice-selected", choice);
2284
+ }
2285
+ }
2286
+ },
2287
+
2288
+ // multi
2289
+ initContainer: function () {
2290
+
2291
+ var selector = ".select2-choices", selection;
2292
+
2293
+ this.searchContainer = this.container.find(".select2-search-field");
2294
+ this.selection = selection = this.container.find(selector);
2295
+
2296
+ var _this = this;
2297
+ this.selection.on("mousedown", ".select2-search-choice", function (e) {
2298
+ //killEvent(e);
2299
+ _this.search[0].focus();
2300
+ _this.selectChoice($(this));
2301
+ })
2302
+ //.sortable({
2303
+ // items: " > li",
2304
+ // tolerance: "pointer",
2305
+ // revert: 100
2306
+ //});
2307
+
2308
+ // rewrite labels from original element to focusser
2309
+ this.search.attr("id", "s2id_autogen"+nextUid());
2310
+ $("label[for='" + this.opts.element.attr("id") + "']")
2311
+ .attr('for', this.search.attr('id'));
2312
+
2313
+ this.search.on("input paste", this.bind(function() {
2314
+ if (!this.isInterfaceEnabled()) return;
2315
+ if (!this.opened()) {
2316
+ this.open();
2317
+ }
2318
+ }));
2319
+
2320
+ this.search.attr("tabindex", this.elementTabIndex);
2321
+
2322
+ this.keydowns = 0;
2323
+ this.search.on("keydown", this.bind(function (e) {
2324
+ if (!this.isInterfaceEnabled()) return;
2325
+
2326
+ ++this.keydowns;
2327
+ var selected = selection.find(".select2-search-choice-focus");
2328
+ var prev = selected.prev(".select2-search-choice:not(.select2-locked)");
2329
+ var next = selected.next(".select2-search-choice:not(.select2-locked)");
2330
+ var pos = getCursorInfo(this.search);
2331
+
2332
+ if (selected.length &&
2333
+ (e.which == KEY.LEFT || e.which == KEY.RIGHT || e.which == KEY.BACKSPACE || e.which == KEY.DELETE || e.which == KEY.ENTER)) {
2334
+ var selectedChoice = selected;
2335
+ if (e.which == KEY.LEFT && prev.length) {
2336
+ selectedChoice = prev;
2337
+ }
2338
+ else if (e.which == KEY.RIGHT) {
2339
+ selectedChoice = next.length ? next : null;
2340
+ }
2341
+ else if (e.which === KEY.BACKSPACE) {
2342
+ this.unselect(selected.first());
2343
+ this.search.width(10);
2344
+ selectedChoice = prev.length ? prev : next;
2345
+ } else if (e.which == KEY.DELETE) {
2346
+ this.unselect(selected.first());
2347
+ this.search.width(10);
2348
+ selectedChoice = next.length ? next : null;
2349
+ } else if (e.which == KEY.ENTER) {
2350
+ selectedChoice = null;
2351
+ }
2352
+
2353
+ this.selectChoice(selectedChoice);
2354
+ killEvent(e);
2355
+ if (!selectedChoice || !selectedChoice.length) {
2356
+ this.open();
2357
+ }
2358
+ return;
2359
+ } else if (((e.which === KEY.BACKSPACE && this.keydowns == 1)
2360
+ || e.which == KEY.LEFT) && (pos.offset == 0 && !pos.length)) {
2361
+
2362
+ this.selectChoice(selection.find(".select2-search-choice:not(.select2-locked)").last());
2363
+ killEvent(e);
2364
+ return;
2365
+ } else {
2366
+ this.selectChoice(null);
2367
+ }
2368
+
2369
+ if (this.opened()) {
2370
+ switch (e.which) {
2371
+ case KEY.UP:
2372
+ case KEY.DOWN:
2373
+ this.moveHighlight((e.which === KEY.UP) ? -1 : 1);
2374
+ killEvent(e);
2375
+ return;
2376
+ case KEY.ENTER:
2377
+ this.selectHighlighted();
2378
+ killEvent(e);
2379
+ return;
2380
+ case KEY.TAB:
2381
+ this.selectHighlighted({noFocus:true});
2382
+ return;
2383
+ case KEY.ESC:
2384
+ this.cancel(e);
2385
+ killEvent(e);
2386
+ return;
2387
+ }
2388
+ }
2389
+
2390
+ if (e.which === KEY.TAB || KEY.isControl(e) || KEY.isFunctionKey(e)
2391
+ || e.which === KEY.BACKSPACE || e.which === KEY.ESC) {
2392
+ return;
2393
+ }
2394
+
2395
+ if (e.which === KEY.ENTER) {
2396
+ if (this.opts.openOnEnter === false) {
2397
+ return;
2398
+ } else if (e.altKey || e.ctrlKey || e.shiftKey || e.metaKey) {
2399
+ return;
2400
+ }
2401
+ }
2402
+
2403
+ this.open();
2404
+
2405
+ if (e.which === KEY.PAGE_UP || e.which === KEY.PAGE_DOWN) {
2406
+ // prevent the page from scrolling
2407
+ killEvent(e);
2408
+ }
2409
+
2410
+ if (e.which === KEY.ENTER) {
2411
+ // prevent form from being submitted
2412
+ killEvent(e);
2413
+ }
2414
+
2415
+ }));
2416
+
2417
+ this.search.on("keyup", this.bind(function (e) {
2418
+ this.keydowns = 0;
2419
+ this.resizeSearch();
2420
+ })
2421
+ );
2422
+
2423
+ this.search.on("blur", this.bind(function(e) {
2424
+ this.container.removeClass("select2-container-active");
2425
+ this.search.removeClass("select2-focused");
2426
+ this.selectChoice(null);
2427
+ if (!this.opened()) this.clearSearch();
2428
+ e.stopImmediatePropagation();
2429
+ this.opts.element.trigger($.Event("select2-blur"));
2430
+ }));
2431
+
2432
+ this.container.on("mousedown", selector, this.bind(function (e) {
2433
+ if (!this.isInterfaceEnabled()) return;
2434
+ if ($(e.target).closest(".select2-search-choice").length > 0) {
2435
+ // clicked inside a select2 search choice, do not open
2436
+ return;
2437
+ }
2438
+ this.selectChoice(null);
2439
+ this.clearPlaceholder();
2440
+ if (!this.container.hasClass("select2-container-active")) {
2441
+ this.opts.element.trigger($.Event("select2-focus"));
2442
+ }
2443
+ this.open();
2444
+ this.focusSearch();
2445
+ e.preventDefault();
2446
+ }));
2447
+
2448
+ this.container.on("focus", selector, this.bind(function () {
2449
+ if (!this.isInterfaceEnabled()) return;
2450
+ if (!this.container.hasClass("select2-container-active")) {
2451
+ this.opts.element.trigger($.Event("select2-focus"));
2452
+ }
2453
+ this.container.addClass("select2-container-active");
2454
+ this.dropdown.addClass("select2-drop-active");
2455
+ this.clearPlaceholder();
2456
+ }));
2457
+
2458
+ this.initContainerWidth();
2459
+ this.opts.element.addClass("select2-offscreen");
2460
+
2461
+ // set the placeholder if necessary
2462
+ this.clearSearch();
2463
+ },
2464
+
2465
+ // multi
2466
+ enableInterface: function() {
2467
+ if (this.parent.enableInterface.apply(this, arguments)) {
2468
+ this.search.prop("disabled", !this.isInterfaceEnabled());
2469
+ }
2470
+ },
2471
+
2472
+ // multi
2473
+ initSelection: function () {
2474
+ var data;
2475
+ if (this.opts.element.val() === "" && this.opts.element.text() === "") {
2476
+ this.updateSelection([]);
2477
+ this.close();
2478
+ // set the placeholder if necessary
2479
+ this.clearSearch();
2480
+ }
2481
+ if (this.select || this.opts.element.val() !== "") {
2482
+ var self = this;
2483
+ this.opts.initSelection.call(null, this.opts.element, function(data){
2484
+ if (data !== undefined && data !== null) {
2485
+ self.updateSelection(data);
2486
+ self.close();
2487
+ // set the placeholder if necessary
2488
+ self.clearSearch();
2489
+ }
2490
+ });
2491
+ }
2492
+ },
2493
+
2494
+ // multi
2495
+ clearSearch: function () {
2496
+ var placeholder = this.getPlaceholder(),
2497
+ maxWidth = this.getMaxSearchWidth();
2498
+
2499
+ if (placeholder !== undefined && this.getVal().length === 0 && this.search.hasClass("select2-focused") === false) {
2500
+ this.search.val(placeholder).addClass("select2-default");
2501
+ // stretch the search box to full width of the container so as much of the placeholder is visible as possible
2502
+ // we could call this.resizeSearch(), but we do not because that requires a sizer and we do not want to create one so early because of a firefox bug, see #944
2503
+ this.search.width(maxWidth > 0 ? maxWidth : this.container.css("width"));
2504
+ } else {
2505
+ this.search.val("").width(10);
2506
+ }
2507
+ },
2508
+
2509
+ // multi
2510
+ clearPlaceholder: function () {
2511
+ if (this.search.hasClass("select2-default")) {
2512
+ this.search.val("").removeClass("select2-default");
2513
+ }
2514
+ },
2515
+
2516
+ // multi
2517
+ opening: function () {
2518
+ this.clearPlaceholder(); // should be done before super so placeholder is not used to search
2519
+ this.resizeSearch();
2520
+
2521
+ this.parent.opening.apply(this, arguments);
2522
+
2523
+ this.focusSearch();
2524
+
2525
+ this.updateResults(true);
2526
+ this.search.focus();
2527
+ this.opts.element.trigger($.Event("select2-open"));
2528
+ },
2529
+
2530
+ // multi
2531
+ close: function () {
2532
+ if (!this.opened()) return;
2533
+ this.parent.close.apply(this, arguments);
2534
+ },
2535
+
2536
+ // multi
2537
+ focus: function () {
2538
+ this.close();
2539
+ this.search.focus();
2540
+ //this.opts.element.triggerHandler("focus");
2541
+ },
2542
+
2543
+ // multi
2544
+ isFocused: function () {
2545
+ return this.search.hasClass("select2-focused");
2546
+ },
2547
+
2548
+ // multi
2549
+ updateSelection: function (data) {
2550
+ var ids = [], filtered = [], self = this;
2551
+
2552
+ // filter out duplicates
2553
+ $(data).each(function () {
2554
+ if (indexOf(self.id(this), ids) < 0) {
2555
+ ids.push(self.id(this));
2556
+ filtered.push(this);
2557
+ }
2558
+ });
2559
+ data = filtered;
2560
+
2561
+ this.selection.find(".select2-search-choice").remove();
2562
+ $(data).each(function () {
2563
+ self.addSelectedChoice(this);
2564
+ });
2565
+ self.postprocessResults();
2566
+ },
2567
+
2568
+ // multi
2569
+ tokenize: function() {
2570
+ var input = this.search.val();
2571
+ input = this.opts.tokenizer(input, this.data(), this.bind(this.onSelect), this.opts);
2572
+ if (input != null && input != undefined) {
2573
+ this.search.val(input);
2574
+ if (input.length > 0) {
2575
+ this.open();
2576
+ }
2577
+ }
2578
+
2579
+ },
2580
+
2581
+ // multi
2582
+ onSelect: function (data, options) {
2583
+
2584
+ if (!this.triggerSelect(data)) { return; }
2585
+
2586
+ this.addSelectedChoice(data);
2587
+
2588
+ this.opts.element.trigger({ type: "selected", val: this.id(data), choice: data });
2589
+
2590
+ if (this.select || !this.opts.closeOnSelect) this.postprocessResults();
2591
+
2592
+ if (this.opts.closeOnSelect) {
2593
+ this.close();
2594
+ this.search.width(10);
2595
+ } else {
2596
+ if (this.countSelectableResults()>0) {
2597
+ this.search.width(10);
2598
+ this.resizeSearch();
2599
+ if (this.getMaximumSelectionSize() > 0 && this.val().length >= this.getMaximumSelectionSize()) {
2600
+ // if we reached max selection size repaint the results so choices
2601
+ // are replaced with the max selection reached message
2602
+ this.updateResults(true);
2603
+ }
2604
+ this.positionDropdown();
2605
+ } else {
2606
+ // if nothing left to select close
2607
+ this.close();
2608
+ this.search.width(10);
2609
+ }
2610
+ }
2611
+
2612
+ // since its not possible to select an element that has already been
2613
+ // added we do not need to check if this is a new element before firing change
2614
+ this.triggerChange({ added: data });
2615
+
2616
+ if (!options || !options.noFocus)
2617
+ this.focusSearch();
2618
+ },
2619
+
2620
+ // multi
2621
+ cancel: function () {
2622
+ this.close();
2623
+ this.focusSearch();
2624
+ },
2625
+
2626
+ addSelectedChoice: function (data) {
2627
+ var enableChoice = !data.locked,
2628
+ enabledItem = $(
2629
+ "<li class='select2-search-choice'>" +
2630
+ " <div></div>" +
2631
+ " <a href='#' onclick='return false;' class='select2-search-choice-close' tabindex='-1'></a>" +
2632
+ "</li>"),
2633
+ disabledItem = $(
2634
+ "<li class='select2-search-choice select2-locked'>" +
2635
+ "<div></div>" +
2636
+ "</li>");
2637
+ var choice = enableChoice ? enabledItem : disabledItem,
2638
+ id = this.id(data),
2639
+ val = this.getVal(),
2640
+ formatted,
2641
+ cssClass;
2642
+
2643
+ formatted=this.opts.formatSelection(data, choice.find("div"));
2644
+ if (formatted != undefined) {
2645
+ choice.find("div").replaceWith("<div title='"+this.opts.escapeMarkup(formatted)+"'>"+this.opts.escapeMarkup(formatted)+"</div>");
2646
+ }
2647
+ cssClass=this.opts.formatSelectionCssClass(data, choice.find("div"));
2648
+ if (cssClass != undefined) {
2649
+ choice.addClass(cssClass);
2650
+ }
2651
+
2652
+ if(enableChoice){
2653
+ choice.find(".select2-search-choice-close")
2654
+ .on("mousedown", killEvent)
2655
+ .on("click dblclick", this.bind(function (e) {
2656
+ if (!this.isInterfaceEnabled()) return;
2657
+
2658
+ $(e.target).closest(".select2-search-choice").fadeOut('fast', this.bind(function(){
2659
+ this.unselect($(e.target));
2660
+ this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus");
2661
+ this.close();
2662
+ this.focusSearch();
2663
+ })).dequeue();
2664
+ killEvent(e);
2665
+ })).on("focus", this.bind(function () {
2666
+ if (!this.isInterfaceEnabled()) return;
2667
+ this.container.addClass("select2-container-active");
2668
+ this.dropdown.addClass("select2-drop-active");
2669
+ }));
2670
+ }
2671
+
2672
+ choice.data("select2-data", data);
2673
+ choice.insertBefore(this.searchContainer);
2674
+
2675
+ val.push(id);
2676
+ this.setVal(val);
2677
+ },
2678
+
2679
+ // multi
2680
+ unselect: function (selected) {
2681
+ var val = this.getVal(),
2682
+ data,
2683
+ index;
2684
+
2685
+ selected = selected.closest(".select2-search-choice");
2686
+
2687
+ if (selected.length === 0) {
2688
+ throw "Invalid argument: " + selected + ". Must be .select2-search-choice";
2689
+ }
2690
+
2691
+ data = selected.data("select2-data");
2692
+
2693
+ if (!data) {
2694
+ // prevent a race condition when the 'x' is clicked really fast repeatedly the event can be queued
2695
+ // and invoked on an element already removed
2696
+ return;
2697
+ }
2698
+
2699
+ index = indexOf(this.id(data), val);
2700
+
2701
+ if (index >= 0) {
2702
+ val.splice(index, 1);
2703
+ this.setVal(val);
2704
+ if (this.select) this.postprocessResults();
2705
+ }
2706
+ selected.remove();
2707
+
2708
+ this.opts.element.trigger({ type: "removed", val: this.id(data), choice: data });
2709
+ this.triggerChange({ removed: data });
2710
+ },
2711
+
2712
+ // multi
2713
+ postprocessResults: function (data, initial, noHighlightUpdate) {
2714
+ var val = this.getVal(),
2715
+ choices = this.results.find(".select2-result"),
2716
+ compound = this.results.find(".select2-result-with-children"),
2717
+ self = this;
2718
+
2719
+ choices.each2(function (i, choice) {
2720
+ var id = self.id(choice.data("select2-data"));
2721
+ if (indexOf(id, val) >= 0) {
2722
+ choice.addClass("select2-selected");
2723
+ // mark all children of the selected parent as selected
2724
+ choice.find(".select2-result-selectable").addClass("select2-selected");
2725
+ }
2726
+ });
2727
+
2728
+ compound.each2(function(i, choice) {
2729
+ // hide an optgroup if it doesnt have any selectable children
2730
+ if (!choice.is('.select2-result-selectable')
2731
+ && choice.find(".select2-result-selectable:not(.select2-selected)").length === 0) {
2732
+ choice.addClass("select2-selected");
2733
+ }
2734
+ });
2735
+
2736
+ if (this.highlight() == -1 && noHighlightUpdate !== false){
2737
+ self.highlight(0);
2738
+ }
2739
+
2740
+ //If all results are chosen render formatNoMAtches
2741
+ if(!this.opts.createSearchChoice && !choices.filter('.select2-result:not(.select2-selected)').length > 0){
2742
+ this.results.append("<li class='select2-no-results'>" + self.opts.formatNoMatches(self.search.val()) + "</li>");
2743
+ }
2744
+
2745
+ },
2746
+
2747
+ // multi
2748
+ getMaxSearchWidth: function() {
2749
+ return this.selection.width() - getSideBorderPadding(this.search);
2750
+ },
2751
+
2752
+ // multi
2753
+ resizeSearch: function () {
2754
+ var minimumWidth, left, maxWidth, containerLeft, searchWidth,
2755
+ sideBorderPadding = getSideBorderPadding(this.search);
2756
+
2757
+ minimumWidth = measureTextWidth(this.search) + 10;
2758
+
2759
+ left = this.search.offset().left;
2760
+
2761
+ maxWidth = this.selection.width();
2762
+ containerLeft = this.selection.offset().left;
2763
+
2764
+ searchWidth = maxWidth - (left - containerLeft) - sideBorderPadding;
2765
+
2766
+ if (searchWidth < minimumWidth) {
2767
+ searchWidth = maxWidth - sideBorderPadding;
2768
+ }
2769
+
2770
+ if (searchWidth < 40) {
2771
+ searchWidth = maxWidth - sideBorderPadding;
2772
+ }
2773
+
2774
+ if (searchWidth <= 0) {
2775
+ searchWidth = minimumWidth;
2776
+ }
2777
+
2778
+ this.search.width(searchWidth);
2779
+ },
2780
+
2781
+ // multi
2782
+ getVal: function () {
2783
+ var val;
2784
+ if (this.select) {
2785
+ val = this.select.val();
2786
+ return val === null ? [] : val;
2787
+ } else {
2788
+ val = this.opts.element.val();
2789
+ return splitVal(val, this.opts.separator);
2790
+ }
2791
+ },
2792
+
2793
+ // multi
2794
+ setVal: function (val) {
2795
+ var unique;
2796
+ if (this.select) {
2797
+ this.select.val(val);
2798
+ } else {
2799
+ unique = [];
2800
+ // filter out duplicates
2801
+ $(val).each(function () {
2802
+ if (indexOf(this, unique) < 0) unique.push(this);
2803
+ });
2804
+ this.opts.element.val(unique.length === 0 ? "" : unique.join(this.opts.separator));
2805
+ }
2806
+ },
2807
+
2808
+ // multi
2809
+ buildChangeDetails: function (old, current) {
2810
+ var current = current.slice(0),
2811
+ old = old.slice(0);
2812
+
2813
+ // remove intersection from each array
2814
+ for (var i = 0; i < current.length; i++) {
2815
+ for (var j = 0; j < old.length; j++) {
2816
+ if (equal(this.opts.id(current[i]), this.opts.id(old[j]))) {
2817
+ current.splice(i, 1);
2818
+ i--;
2819
+ old.splice(j, 1);
2820
+ j--;
2821
+ }
2822
+ }
2823
+ }
2824
+
2825
+ return {added: current, removed: old};
2826
+ },
2827
+
2828
+
2829
+ // multi
2830
+ val: function (val, triggerChange) {
2831
+ var oldData, self=this, changeDetails;
2832
+
2833
+ if (arguments.length === 0) {
2834
+ return this.getVal();
2835
+ }
2836
+
2837
+ oldData=this.data();
2838
+ if (!oldData.length) oldData=[];
2839
+
2840
+ // val is an id. !val is true for [undefined,null,'',0] - 0 is legal
2841
+ if (!val && val !== 0) {
2842
+ this.opts.element.val("");
2843
+ this.updateSelection([]);
2844
+ this.clearSearch();
2845
+ if (triggerChange) {
2846
+ this.triggerChange({added: this.data(), removed: oldData});
2847
+ }
2848
+ return;
2849
+ }
2850
+
2851
+ // val is a list of ids
2852
+ this.setVal(val);
2853
+
2854
+ if (this.select) {
2855
+ this.opts.initSelection(this.select, this.bind(this.updateSelection));
2856
+ if (triggerChange) {
2857
+ this.triggerChange(this.buildChangeDetails(oldData, this.data()));
2858
+ }
2859
+ } else {
2860
+ if (this.opts.initSelection === undefined) {
2861
+ throw new Error("val() cannot be called if initSelection() is not defined");
2862
+ }
2863
+
2864
+ this.opts.initSelection(this.opts.element, function(data){
2865
+ var ids=$(data).map(self.id);
2866
+ self.setVal(ids);
2867
+ self.updateSelection(data);
2868
+ self.clearSearch();
2869
+ if (triggerChange) {
2870
+ self.triggerChange(this.buildChangeDetails(oldData, this.data()));
2871
+ }
2872
+ });
2873
+ }
2874
+ this.clearSearch();
2875
+ },
2876
+
2877
+ // multi
2878
+ onSortStart: function() {
2879
+ if (this.select) {
2880
+ throw new Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.");
2881
+ }
2882
+
2883
+ // collapse search field into 0 width so its container can be collapsed as well
2884
+ this.search.width(0);
2885
+ // hide the container
2886
+ this.searchContainer.hide();
2887
+ },
2888
+
2889
+ // multi
2890
+ onSortEnd:function() {
2891
+
2892
+ var val=[], self=this;
2893
+
2894
+ // show search and move it to the end of the list
2895
+ this.searchContainer.show();
2896
+ // make sure the search container is the last item in the list
2897
+ this.searchContainer.appendTo(this.searchContainer.parent());
2898
+ // since we collapsed the width in dragStarted, we resize it here
2899
+ this.resizeSearch();
2900
+
2901
+ // update selection
2902
+
2903
+ this.selection.find(".select2-search-choice").each(function() {
2904
+ val.push(self.opts.id($(this).data("select2-data")));
2905
+ });
2906
+ this.setVal(val);
2907
+ this.triggerChange();
2908
+ },
2909
+
2910
+ // multi
2911
+ data: function(values, triggerChange) {
2912
+ var self=this, ids, old;
2913
+ if (arguments.length === 0) {
2914
+ return this.selection
2915
+ .find(".select2-search-choice")
2916
+ .map(function() { return $(this).data("select2-data"); })
2917
+ .get();
2918
+ } else {
2919
+ old = this.data();
2920
+ if (!values) { values = []; }
2921
+ ids = $.map(values, function(e) { return self.opts.id(e); });
2922
+ this.setVal(ids);
2923
+ this.updateSelection(values);
2924
+ this.clearSearch();
2925
+ if (triggerChange) {
2926
+ this.triggerChange(this.buildChangeDetails(old, this.data()));
2927
+ }
2928
+ }
2929
+ }
2930
+ });
2931
+
2932
+ $.fn.select2 = function () {
2933
+
2934
+ var args = Array.prototype.slice.call(arguments, 0),
2935
+ opts,
2936
+ select2,
2937
+ value, multiple,
2938
+ allowedMethods = ["val", "destroy", "opened", "open", "close", "focus", "isFocused", "container", "onSortStart", "onSortEnd", "enable", "readonly", "positionDropdown", "data"],
2939
+ valueMethods = ["val", "opened", "isFocused", "container", "data"];
2940
+
2941
+ this.each(function () {
2942
+ if (args.length === 0 || typeof(args[0]) === "object") {
2943
+ opts = args.length === 0 ? {} : $.extend({}, args[0]);
2944
+ opts.element = $(this);
2945
+
2946
+ if (opts.element.get(0).tagName.toLowerCase() === "select") {
2947
+ multiple = opts.element.prop("multiple");
2948
+ } else {
2949
+ multiple = opts.multiple || false;
2950
+ if ("tags" in opts) {opts.multiple = multiple = true;}
2951
+ }
2952
+
2953
+ select2 = multiple ? new MultiSelect2() : new SingleSelect2();
2954
+ select2.init(opts);
2955
+ } else if (typeof(args[0]) === "string") {
2956
+
2957
+ if (indexOf(args[0], allowedMethods) < 0) {
2958
+ throw "Unknown method: " + args[0];
2959
+ }
2960
+
2961
+ value = undefined;
2962
+ select2 = $(this).data("select2");
2963
+ if (select2 === undefined) return;
2964
+ if (args[0] === "container") {
2965
+ value=select2.container;
2966
+ } else {
2967
+ value = select2[args[0]].apply(select2, args.slice(1));
2968
+ }
2969
+ if (indexOf(args[0], valueMethods) >= 0) {
2970
+ return false;
2971
+ }
2972
+ } else {
2973
+ throw "Invalid arguments to select2 plugin: " + args;
2974
+ }
2975
+ });
2976
+ return (value === undefined) ? this : value;
2977
+ };
2978
+
2979
+ // plugin defaults, accessible to users
2980
+ $.fn.select2.defaults = {
2981
+ width: "copy",
2982
+ loadMorePadding: 0,
2983
+ closeOnSelect: true,
2984
+ openOnEnter: true,
2985
+ containerCss: {},
2986
+ dropdownCss: {},
2987
+ containerCssClass: "",
2988
+ dropdownCssClass: "",
2989
+ formatResult: function(result, container, query, escapeMarkup) {
2990
+ var markup=[];
2991
+ markMatch(result.text, query.term, markup, escapeMarkup);
2992
+ return markup.join("");
2993
+ },
2994
+ formatSelection: function (data, container) {
2995
+ return data ? data.text : undefined;
2996
+ },
2997
+ sortResults: function (results, container, query) {
2998
+ return results;
2999
+ },
3000
+ formatResultCssClass: function(data) {return undefined;},
3001
+ formatSelectionCssClass: function(data, container) {return undefined;},
3002
+ formatNoMatches: function () { return "No matches found"; },
3003
+ formatInputTooShort: function (input, min) { var n = min - input.length; return "Please enter " + n + " more character" + (n == 1? "" : "s"); },
3004
+ formatInputTooLong: function (input, max) { var n = input.length - max; return "Please delete " + n + " character" + (n == 1? "" : "s"); },
3005
+ formatSelectionTooBig: function (limit) { return "You can only select " + limit + " item" + (limit == 1 ? "" : "s"); },
3006
+ formatLoadMore: function (pageNumber) { return "Loading more results..."; },
3007
+ formatSearching: function () { return "Searching..."; },
3008
+ minimumResultsForSearch: 0,
3009
+ minimumInputLength: 0,
3010
+ maximumInputLength: null,
3011
+ maximumSelectionSize: 0,
3012
+ id: function (e) { return e.id; },
3013
+ matcher: function(term, text) {
3014
+ return (''+text).toUpperCase().indexOf((''+term).toUpperCase()) >= 0;
3015
+ },
3016
+ separator: ",",
3017
+ tokenSeparators: [],
3018
+ tokenizer: defaultTokenizer,
3019
+ escapeMarkup: function (markup) {
3020
+ var replace_map = {
3021
+ '\\': '&#92;',
3022
+ '&': '&amp;',
3023
+ '<': '&lt;',
3024
+ '>': '&gt;',
3025
+ '"': '&quot;',
3026
+ "'": '&#39;',
3027
+ "/": '&#47;'
3028
+ };
3029
+
3030
+ return String(markup).replace(/[&<>"'\/\\]/g, function (match) {
3031
+ return replace_map[match];
3032
+ });
3033
+ },
3034
+ blurOnChange: false,
3035
+ selectOnBlur: false,
3036
+ adaptContainerCssClass: function(c) { return c; },
3037
+ adaptDropdownCssClass: function(c) { return null; }
3038
+ };
3039
+
3040
+ $.fn.select2.ajaxDefaults = {
3041
+ transport: $.ajax,
3042
+ params: {
3043
+ type: "GET",
3044
+ cache: false,
3045
+ dataType: "json"
3046
+ }
3047
+ };
3048
+
3049
+ // exports
3050
+ window.Select2 = {
3051
+ query: {
3052
+ ajax: ajax,
3053
+ local: local,
3054
+ tags: tags
3055
+ }, util: {
3056
+ debounce: debounce,
3057
+ markMatch: markMatch
3058
+ }, "class": {
3059
+ "abstract": AbstractSelect2,
3060
+ "single": SingleSelect2,
3061
+ "multi": MultiSelect2
3062
+ }
3063
+ };
3064
+
3065
+ }(jQuery));