erp_app 3.0.7 → 3.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (537) hide show
  1. data/README.md +23 -0
  2. data/app/controllers/erp_app/application_controller.rb +1 -0
  3. data/app/controllers/erp_app/desktop/file_manager/base_controller.rb +33 -23
  4. data/app/controllers/erp_app/public_controller.rb +2 -3
  5. data/app/controllers/erp_app/shared/configuration_controller.rb +1 -0
  6. data/app/controllers/erp_app/shared/notes_controller.rb +1 -0
  7. data/app/controllers/erp_app/shared/profile_management_controller.rb +22 -0
  8. data/app/controllers/erp_app/widget_proxy_controller.rb +2 -1
  9. data/app/models/configuration.rb +7 -0
  10. data/app/views/erp_app/desktop/base/index.erb +2 -3
  11. data/app/views/erp_app/login/index.erb +1 -1
  12. data/app/views/erp_app/mobile/base/index.erb +1 -0
  13. data/app/views/erp_app/organizer/base/index.erb +2 -3
  14. data/config/routes.rb +1 -1
  15. data/lib/active_ext/ext_helpers/column_builder.rb +118 -118
  16. data/lib/erp_app/config.rb +8 -4
  17. data/lib/erp_app/extensions/railties/action_view/base.rb +0 -1
  18. data/lib/erp_app/extensions/railties/action_view/helpers/include_helper.rb +18 -3
  19. data/lib/erp_app/version.rb +1 -1
  20. data/lib/erp_app/widgets/base.rb +5 -4
  21. data/lib/erp_app/widgets/loader.rb +2 -2
  22. data/public/images/btn/left_panel/left_panel_16x16.png +0 -0
  23. data/public/images/btn/left_right_panel/left_right_panel_16x16.png +0 -0
  24. data/public/images/btn/right_panel/right_panel_16x16.png +0 -0
  25. data/public/images/btn/save/save_16x16.png +0 -0
  26. data/public/images/btn/save_all/save_all_16x16.png +0 -0
  27. data/public/javascripts/erp_app/ckeditor/ckeditor.js +138 -135
  28. data/public/javascripts/erp_app/ckeditor/config.js +1 -1
  29. data/public/javascripts/erp_app/ckeditor/contents.css +1 -1
  30. data/public/javascripts/erp_app/ckeditor/lang/_languages.js +1 -1
  31. data/public/javascripts/erp_app/ckeditor/lang/_translationstatus.txt +62 -59
  32. data/public/javascripts/erp_app/ckeditor/lang/af.js +2 -2
  33. data/public/javascripts/erp_app/ckeditor/lang/ar.js +2 -2
  34. data/public/javascripts/erp_app/ckeditor/lang/bg.js +2 -2
  35. data/public/javascripts/erp_app/ckeditor/lang/bn.js +2 -2
  36. data/public/javascripts/erp_app/ckeditor/lang/bs.js +2 -2
  37. data/public/javascripts/erp_app/ckeditor/lang/ca.js +2 -2
  38. data/public/javascripts/erp_app/ckeditor/lang/cs.js +2 -2
  39. data/public/javascripts/erp_app/ckeditor/lang/cy.js +2 -2
  40. data/public/javascripts/erp_app/ckeditor/lang/da.js +2 -2
  41. data/public/javascripts/erp_app/ckeditor/lang/de.js +2 -2
  42. data/public/javascripts/erp_app/ckeditor/lang/el.js +2 -2
  43. data/public/javascripts/erp_app/ckeditor/lang/en-au.js +2 -2
  44. data/public/javascripts/erp_app/ckeditor/lang/en-ca.js +2 -2
  45. data/public/javascripts/erp_app/ckeditor/lang/en-gb.js +2 -2
  46. data/public/javascripts/erp_app/ckeditor/lang/en.js +2 -2
  47. data/public/javascripts/erp_app/ckeditor/lang/eo.js +2 -2
  48. data/public/javascripts/erp_app/ckeditor/lang/es.js +2 -2
  49. data/public/javascripts/erp_app/ckeditor/lang/et.js +2 -2
  50. data/public/javascripts/erp_app/ckeditor/lang/eu.js +2 -2
  51. data/public/javascripts/erp_app/ckeditor/lang/fa.js +2 -2
  52. data/public/javascripts/erp_app/ckeditor/lang/fi.js +2 -2
  53. data/public/javascripts/erp_app/ckeditor/lang/fo.js +2 -2
  54. data/public/javascripts/erp_app/ckeditor/lang/fr-ca.js +2 -2
  55. data/public/javascripts/erp_app/ckeditor/lang/fr.js +2 -2
  56. data/public/javascripts/erp_app/ckeditor/lang/gl.js +2 -2
  57. data/public/javascripts/erp_app/ckeditor/lang/gu.js +2 -2
  58. data/public/javascripts/erp_app/ckeditor/lang/he.js +2 -2
  59. data/public/javascripts/erp_app/ckeditor/lang/hi.js +2 -2
  60. data/public/javascripts/erp_app/ckeditor/lang/hr.js +2 -2
  61. data/public/javascripts/erp_app/ckeditor/lang/hu.js +2 -2
  62. data/public/javascripts/erp_app/ckeditor/lang/id.js +6 -0
  63. data/public/javascripts/erp_app/ckeditor/lang/is.js +2 -2
  64. data/public/javascripts/erp_app/ckeditor/lang/it.js +2 -2
  65. data/public/javascripts/erp_app/ckeditor/lang/ja.js +2 -2
  66. data/public/javascripts/erp_app/ckeditor/lang/ka.js +2 -2
  67. data/public/javascripts/erp_app/ckeditor/lang/km.js +2 -2
  68. data/public/javascripts/erp_app/ckeditor/lang/ko.js +2 -2
  69. data/public/javascripts/erp_app/ckeditor/lang/lt.js +2 -2
  70. data/public/javascripts/erp_app/ckeditor/lang/lv.js +2 -2
  71. data/public/javascripts/erp_app/ckeditor/lang/mk.js +6 -0
  72. data/public/javascripts/erp_app/ckeditor/lang/mn.js +2 -2
  73. data/public/javascripts/erp_app/ckeditor/lang/ms.js +2 -2
  74. data/public/javascripts/erp_app/ckeditor/lang/nb.js +2 -2
  75. data/public/javascripts/erp_app/ckeditor/lang/nl.js +2 -2
  76. data/public/javascripts/erp_app/ckeditor/lang/no.js +2 -2
  77. data/public/javascripts/erp_app/ckeditor/lang/pl.js +2 -2
  78. data/public/javascripts/erp_app/ckeditor/lang/pt-br.js +2 -2
  79. data/public/javascripts/erp_app/ckeditor/lang/pt.js +2 -2
  80. data/public/javascripts/erp_app/ckeditor/lang/ro.js +2 -2
  81. data/public/javascripts/erp_app/ckeditor/lang/ru.js +2 -2
  82. data/public/javascripts/erp_app/ckeditor/lang/sk.js +2 -2
  83. data/public/javascripts/erp_app/ckeditor/lang/sl.js +2 -2
  84. data/public/javascripts/erp_app/ckeditor/lang/sr-latn.js +2 -2
  85. data/public/javascripts/erp_app/ckeditor/lang/sr.js +2 -2
  86. data/public/javascripts/erp_app/ckeditor/lang/sv.js +2 -2
  87. data/public/javascripts/erp_app/ckeditor/lang/th.js +2 -2
  88. data/public/javascripts/erp_app/ckeditor/lang/tr.js +2 -2
  89. data/public/javascripts/erp_app/ckeditor/lang/ug.js +6 -0
  90. data/public/javascripts/erp_app/ckeditor/lang/uk.js +2 -2
  91. data/public/javascripts/erp_app/ckeditor/lang/vi.js +2 -2
  92. data/public/javascripts/erp_app/ckeditor/lang/zh-cn.js +2 -2
  93. data/public/javascripts/erp_app/ckeditor/lang/zh.js +2 -2
  94. data/public/javascripts/erp_app/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +1 -1
  95. data/public/javascripts/erp_app/ckeditor/plugins/a11yhelp/lang/_translationstatus.txt +25 -0
  96. data/public/javascripts/erp_app/ckeditor/plugins/a11yhelp/lang/cs.js +6 -0
  97. data/public/javascripts/erp_app/ckeditor/plugins/a11yhelp/lang/cy.js +6 -0
  98. data/public/javascripts/erp_app/ckeditor/plugins/a11yhelp/lang/da.js +6 -0
  99. data/public/javascripts/erp_app/ckeditor/plugins/a11yhelp/lang/de.js +6 -0
  100. data/public/javascripts/erp_app/ckeditor/plugins/a11yhelp/lang/el.js +6 -0
  101. data/public/javascripts/erp_app/ckeditor/plugins/a11yhelp/lang/en.js +2 -2
  102. data/public/javascripts/erp_app/ckeditor/plugins/a11yhelp/lang/eo.js +6 -0
  103. data/public/javascripts/erp_app/ckeditor/plugins/a11yhelp/lang/fa.js +6 -0
  104. data/public/javascripts/erp_app/ckeditor/plugins/a11yhelp/lang/fi.js +6 -0
  105. data/public/javascripts/erp_app/ckeditor/plugins/a11yhelp/lang/fr.js +6 -0
  106. data/public/javascripts/erp_app/ckeditor/plugins/a11yhelp/lang/gu.js +6 -0
  107. data/public/javascripts/erp_app/ckeditor/plugins/a11yhelp/lang/he.js +2 -2
  108. data/public/javascripts/erp_app/ckeditor/plugins/a11yhelp/lang/it.js +6 -0
  109. data/public/javascripts/erp_app/ckeditor/plugins/a11yhelp/lang/mk.js +6 -0
  110. data/public/javascripts/erp_app/ckeditor/plugins/a11yhelp/lang/nb.js +6 -0
  111. data/public/javascripts/erp_app/ckeditor/plugins/a11yhelp/lang/nl.js +6 -0
  112. data/public/javascripts/erp_app/ckeditor/plugins/a11yhelp/lang/no.js +6 -0
  113. data/public/javascripts/erp_app/ckeditor/plugins/a11yhelp/lang/pt-br.js +6 -0
  114. data/public/javascripts/erp_app/ckeditor/plugins/a11yhelp/lang/ro.js +6 -0
  115. data/public/javascripts/erp_app/ckeditor/plugins/a11yhelp/lang/tr.js +6 -0
  116. data/public/javascripts/erp_app/ckeditor/plugins/a11yhelp/lang/ug.js +6 -0
  117. data/public/javascripts/erp_app/ckeditor/plugins/a11yhelp/lang/vi.js +6 -0
  118. data/public/javascripts/erp_app/ckeditor/plugins/a11yhelp/lang/zh-cn.js +6 -0
  119. data/public/javascripts/erp_app/ckeditor/plugins/about/dialogs/about.js +1 -1
  120. data/public/javascripts/erp_app/ckeditor/plugins/adobeair/plugin.js +1 -1
  121. data/public/javascripts/erp_app/ckeditor/plugins/ajax/plugin.js +1 -1
  122. data/public/javascripts/erp_app/ckeditor/plugins/autogrow/plugin.js +2 -2
  123. data/public/javascripts/erp_app/ckeditor/plugins/bbcode/plugin.js +1 -1
  124. data/public/javascripts/erp_app/ckeditor/plugins/clipboard/dialogs/paste.js +2 -2
  125. data/public/javascripts/erp_app/ckeditor/plugins/colordialog/dialogs/colordialog.js +3 -3
  126. data/public/javascripts/erp_app/ckeditor/plugins/devtools/lang/_translationstatus.txt +28 -0
  127. data/public/javascripts/erp_app/ckeditor/plugins/devtools/lang/bg.js +6 -0
  128. data/public/javascripts/erp_app/ckeditor/plugins/devtools/lang/cs.js +6 -0
  129. data/public/javascripts/erp_app/ckeditor/plugins/devtools/lang/cy.js +6 -0
  130. data/public/javascripts/erp_app/ckeditor/plugins/devtools/lang/da.js +6 -0
  131. data/public/javascripts/erp_app/ckeditor/plugins/devtools/lang/de.js +6 -0
  132. data/public/javascripts/erp_app/ckeditor/plugins/devtools/lang/el.js +6 -0
  133. data/public/javascripts/erp_app/ckeditor/plugins/devtools/lang/en.js +1 -1
  134. data/public/javascripts/erp_app/ckeditor/plugins/devtools/lang/eo.js +6 -0
  135. data/public/javascripts/erp_app/ckeditor/plugins/devtools/lang/et.js +6 -0
  136. data/public/javascripts/erp_app/ckeditor/plugins/devtools/lang/fa.js +6 -0
  137. data/public/javascripts/erp_app/ckeditor/plugins/devtools/lang/fi.js +6 -0
  138. data/public/javascripts/erp_app/ckeditor/plugins/devtools/lang/fr.js +6 -0
  139. data/public/javascripts/erp_app/ckeditor/plugins/devtools/lang/gu.js +6 -0
  140. data/public/javascripts/erp_app/ckeditor/plugins/devtools/lang/he.js +6 -0
  141. data/public/javascripts/erp_app/ckeditor/plugins/devtools/lang/hr.js +6 -0
  142. data/public/javascripts/erp_app/ckeditor/plugins/devtools/lang/it.js +6 -0
  143. data/public/javascripts/erp_app/ckeditor/plugins/devtools/lang/nb.js +6 -0
  144. data/public/javascripts/erp_app/ckeditor/plugins/devtools/lang/nl.js +6 -0
  145. data/public/javascripts/erp_app/ckeditor/plugins/devtools/lang/no.js +6 -0
  146. data/public/javascripts/erp_app/ckeditor/plugins/devtools/lang/pl.js +6 -0
  147. data/public/javascripts/erp_app/ckeditor/plugins/devtools/lang/pt-br.js +6 -0
  148. data/public/javascripts/erp_app/ckeditor/plugins/devtools/lang/tr.js +6 -0
  149. data/public/javascripts/erp_app/ckeditor/plugins/devtools/lang/ug.js +6 -0
  150. data/public/javascripts/erp_app/ckeditor/plugins/devtools/lang/uk.js +6 -0
  151. data/public/javascripts/erp_app/ckeditor/plugins/devtools/lang/vi.js +6 -0
  152. data/public/javascripts/erp_app/ckeditor/plugins/devtools/lang/zh-cn.js +6 -0
  153. data/public/javascripts/erp_app/ckeditor/plugins/devtools/plugin.js +2 -2
  154. data/public/javascripts/erp_app/ckeditor/plugins/dialog/dialogDefinition.js +1 -1
  155. data/public/javascripts/erp_app/ckeditor/plugins/div/dialogs/div.js +1 -1
  156. data/public/javascripts/erp_app/ckeditor/plugins/docprops/dialogs/docprops.js +1 -1
  157. data/public/javascripts/erp_app/ckeditor/plugins/docprops/plugin.js +1 -1
  158. data/public/javascripts/erp_app/ckeditor/plugins/find/dialogs/find.js +3 -3
  159. data/public/javascripts/erp_app/ckeditor/plugins/flash/dialogs/flash.js +4 -4
  160. data/public/javascripts/erp_app/ckeditor/plugins/forms/dialogs/button.js +1 -1
  161. data/public/javascripts/erp_app/ckeditor/plugins/forms/dialogs/checkbox.js +1 -1
  162. data/public/javascripts/erp_app/ckeditor/plugins/forms/dialogs/form.js +1 -1
  163. data/public/javascripts/erp_app/ckeditor/plugins/forms/dialogs/hiddenfield.js +1 -1
  164. data/public/javascripts/erp_app/ckeditor/plugins/forms/dialogs/radio.js +1 -1
  165. data/public/javascripts/erp_app/ckeditor/plugins/forms/dialogs/select.js +1 -1
  166. data/public/javascripts/erp_app/ckeditor/plugins/forms/dialogs/textarea.js +1 -1
  167. data/public/javascripts/erp_app/ckeditor/plugins/forms/dialogs/textfield.js +1 -1
  168. data/public/javascripts/erp_app/ckeditor/plugins/iframe/dialogs/iframe.js +1 -1
  169. data/public/javascripts/erp_app/ckeditor/plugins/iframedialog/plugin.js +1 -1
  170. data/public/javascripts/erp_app/ckeditor/plugins/image/dialogs/image.js +9 -9
  171. data/public/javascripts/erp_app/ckeditor/plugins/inlineeditsave/plugin.js +40 -0
  172. data/public/javascripts/erp_app/ckeditor/plugins/link/dialogs/anchor.js +2 -2
  173. data/public/javascripts/erp_app/ckeditor/plugins/link/dialogs/link.js +5 -5
  174. data/public/javascripts/erp_app/ckeditor/plugins/liststyle/dialogs/liststyle.js +1 -1
  175. data/public/javascripts/erp_app/ckeditor/plugins/pastefromword/filter/default.js +1 -1
  176. data/public/javascripts/erp_app/ckeditor/plugins/pastetext/dialogs/pastetext.js +1 -1
  177. data/public/javascripts/erp_app/ckeditor/plugins/placeholder/dialogs/placeholder.js +1 -1
  178. data/public/javascripts/erp_app/ckeditor/plugins/placeholder/lang/_translationstatus.txt +27 -0
  179. data/public/javascripts/erp_app/ckeditor/plugins/placeholder/lang/bg.js +6 -0
  180. data/public/javascripts/erp_app/ckeditor/plugins/placeholder/lang/cs.js +6 -0
  181. data/public/javascripts/erp_app/ckeditor/plugins/placeholder/lang/cy.js +6 -0
  182. data/public/javascripts/erp_app/ckeditor/plugins/placeholder/lang/da.js +6 -0
  183. data/public/javascripts/erp_app/ckeditor/plugins/placeholder/lang/de.js +6 -0
  184. data/public/javascripts/erp_app/ckeditor/plugins/placeholder/lang/el.js +6 -0
  185. data/public/javascripts/erp_app/ckeditor/plugins/placeholder/lang/en.js +1 -1
  186. data/public/javascripts/erp_app/ckeditor/plugins/placeholder/lang/eo.js +6 -0
  187. data/public/javascripts/erp_app/ckeditor/plugins/placeholder/lang/et.js +6 -0
  188. data/public/javascripts/erp_app/ckeditor/plugins/placeholder/lang/fa.js +6 -0
  189. data/public/javascripts/erp_app/ckeditor/plugins/placeholder/lang/fi.js +6 -0
  190. data/public/javascripts/erp_app/ckeditor/plugins/placeholder/lang/fr.js +6 -0
  191. data/public/javascripts/erp_app/ckeditor/plugins/placeholder/lang/he.js +1 -1
  192. data/public/javascripts/erp_app/ckeditor/plugins/placeholder/lang/hr.js +6 -0
  193. data/public/javascripts/erp_app/ckeditor/plugins/placeholder/lang/it.js +6 -0
  194. data/public/javascripts/erp_app/ckeditor/plugins/placeholder/lang/nb.js +6 -0
  195. data/public/javascripts/erp_app/ckeditor/plugins/placeholder/lang/nl.js +6 -0
  196. data/public/javascripts/erp_app/ckeditor/plugins/placeholder/lang/no.js +6 -0
  197. data/public/javascripts/erp_app/ckeditor/plugins/placeholder/lang/pl.js +6 -0
  198. data/public/javascripts/erp_app/ckeditor/plugins/placeholder/lang/pt-br.js +6 -0
  199. data/public/javascripts/erp_app/ckeditor/plugins/placeholder/lang/tr.js +6 -0
  200. data/public/javascripts/erp_app/ckeditor/plugins/placeholder/lang/ug.js +6 -0
  201. data/public/javascripts/erp_app/ckeditor/plugins/placeholder/lang/uk.js +6 -0
  202. data/public/javascripts/erp_app/ckeditor/plugins/placeholder/lang/vi.js +6 -0
  203. data/public/javascripts/erp_app/ckeditor/plugins/placeholder/lang/zh-cn.js +6 -0
  204. data/public/javascripts/erp_app/ckeditor/plugins/placeholder/plugin.js +2 -2
  205. data/public/javascripts/erp_app/ckeditor/plugins/preview/preview.html +10 -0
  206. data/public/javascripts/erp_app/ckeditor/plugins/scayt/dialogs/options.js +1 -1
  207. data/public/javascripts/erp_app/ckeditor/plugins/scayt/dialogs/toolbar.css +1 -1
  208. data/public/javascripts/erp_app/ckeditor/plugins/smiley/dialogs/smiley.js +1 -1
  209. data/public/javascripts/erp_app/ckeditor/plugins/specialchar/dialogs/specialchar.js +1 -1
  210. data/public/javascripts/erp_app/ckeditor/plugins/specialchar/lang/_translationstatus.txt +22 -0
  211. data/public/javascripts/erp_app/ckeditor/plugins/specialchar/lang/cs.js +6 -0
  212. data/public/javascripts/erp_app/ckeditor/plugins/specialchar/lang/cy.js +6 -0
  213. data/public/javascripts/erp_app/ckeditor/plugins/specialchar/lang/de.js +6 -0
  214. data/public/javascripts/erp_app/ckeditor/plugins/specialchar/lang/el.js +6 -0
  215. data/public/javascripts/erp_app/ckeditor/plugins/specialchar/lang/en.js +1 -1
  216. data/public/javascripts/erp_app/ckeditor/plugins/specialchar/lang/eo.js +6 -0
  217. data/public/javascripts/erp_app/ckeditor/plugins/specialchar/lang/et.js +6 -0
  218. data/public/javascripts/erp_app/ckeditor/plugins/specialchar/lang/fa.js +6 -0
  219. data/public/javascripts/erp_app/ckeditor/plugins/specialchar/lang/fi.js +6 -0
  220. data/public/javascripts/erp_app/ckeditor/plugins/specialchar/lang/fr.js +6 -0
  221. data/public/javascripts/erp_app/ckeditor/plugins/specialchar/lang/he.js +6 -0
  222. data/public/javascripts/erp_app/ckeditor/plugins/specialchar/lang/hr.js +6 -0
  223. data/public/javascripts/erp_app/ckeditor/plugins/specialchar/lang/it.js +6 -0
  224. data/public/javascripts/erp_app/ckeditor/plugins/specialchar/lang/nb.js +6 -0
  225. data/public/javascripts/erp_app/ckeditor/plugins/specialchar/lang/nl.js +6 -0
  226. data/public/javascripts/erp_app/ckeditor/plugins/specialchar/lang/no.js +6 -0
  227. data/public/javascripts/erp_app/ckeditor/plugins/specialchar/lang/pt-br.js +6 -0
  228. data/public/javascripts/erp_app/ckeditor/plugins/specialchar/lang/tr.js +6 -0
  229. data/public/javascripts/erp_app/ckeditor/plugins/specialchar/lang/ug.js +6 -0
  230. data/public/javascripts/erp_app/ckeditor/plugins/specialchar/lang/zh-cn.js +6 -0
  231. data/public/javascripts/erp_app/ckeditor/plugins/styles/styles/default.js +1 -1
  232. data/public/javascripts/erp_app/ckeditor/plugins/stylesheetparser/plugin.js +1 -1
  233. data/public/javascripts/erp_app/ckeditor/plugins/table/dialogs/table.js +5 -5
  234. data/public/javascripts/erp_app/ckeditor/plugins/tableresize/plugin.js +1 -1
  235. data/public/javascripts/erp_app/ckeditor/plugins/tabletools/dialogs/tableCell.js +3 -3
  236. data/public/javascripts/erp_app/ckeditor/plugins/templates/dialogs/templates.js +1 -1
  237. data/public/javascripts/erp_app/ckeditor/plugins/templates/templates/default.js +1 -1
  238. data/public/javascripts/erp_app/ckeditor/plugins/uicolor/dialogs/uicolor.js +1 -1
  239. data/public/javascripts/erp_app/ckeditor/plugins/uicolor/lang/_translationstatus.txt +28 -0
  240. data/public/javascripts/erp_app/ckeditor/plugins/uicolor/lang/bg.js +6 -0
  241. data/public/javascripts/erp_app/ckeditor/plugins/uicolor/lang/cs.js +6 -0
  242. data/public/javascripts/erp_app/ckeditor/plugins/uicolor/lang/cy.js +6 -0
  243. data/public/javascripts/erp_app/ckeditor/plugins/uicolor/lang/da.js +6 -0
  244. data/public/javascripts/erp_app/ckeditor/plugins/uicolor/lang/de.js +6 -0
  245. data/public/javascripts/erp_app/ckeditor/plugins/uicolor/lang/el.js +6 -0
  246. data/public/javascripts/erp_app/ckeditor/plugins/uicolor/lang/en.js +1 -1
  247. data/public/javascripts/erp_app/ckeditor/plugins/uicolor/lang/eo.js +6 -0
  248. data/public/javascripts/erp_app/ckeditor/plugins/uicolor/lang/et.js +6 -0
  249. data/public/javascripts/erp_app/ckeditor/plugins/uicolor/lang/fa.js +6 -0
  250. data/public/javascripts/erp_app/ckeditor/plugins/uicolor/lang/fi.js +6 -0
  251. data/public/javascripts/erp_app/ckeditor/plugins/uicolor/lang/fr.js +6 -0
  252. data/public/javascripts/erp_app/ckeditor/plugins/uicolor/lang/he.js +1 -1
  253. data/public/javascripts/erp_app/ckeditor/plugins/uicolor/lang/hr.js +6 -0
  254. data/public/javascripts/erp_app/ckeditor/plugins/uicolor/lang/it.js +6 -0
  255. data/public/javascripts/erp_app/ckeditor/plugins/uicolor/lang/mk.js +6 -0
  256. data/public/javascripts/erp_app/ckeditor/plugins/uicolor/lang/nb.js +6 -0
  257. data/public/javascripts/erp_app/ckeditor/plugins/uicolor/lang/nl.js +6 -0
  258. data/public/javascripts/erp_app/ckeditor/plugins/uicolor/lang/no.js +6 -0
  259. data/public/javascripts/erp_app/ckeditor/plugins/uicolor/lang/pl.js +6 -0
  260. data/public/javascripts/erp_app/ckeditor/plugins/uicolor/lang/pt-br.js +6 -0
  261. data/public/javascripts/erp_app/ckeditor/plugins/uicolor/lang/tr.js +6 -0
  262. data/public/javascripts/erp_app/ckeditor/plugins/uicolor/lang/ug.js +6 -0
  263. data/public/javascripts/erp_app/ckeditor/plugins/uicolor/lang/uk.js +6 -0
  264. data/public/javascripts/erp_app/ckeditor/plugins/uicolor/lang/vi.js +6 -0
  265. data/public/javascripts/erp_app/ckeditor/plugins/uicolor/lang/zh-cn.js +6 -0
  266. data/public/javascripts/erp_app/ckeditor/plugins/uicolor/plugin.js +2 -2
  267. data/public/javascripts/erp_app/ckeditor/plugins/uicolor/yui/assets/yui.css +1 -1
  268. data/public/javascripts/erp_app/ckeditor/plugins/uicolor/yui/yui.js +1 -1
  269. data/public/javascripts/erp_app/ckeditor/plugins/wsc/dialogs/ciframe.html +1 -1
  270. data/public/javascripts/erp_app/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +1 -1
  271. data/public/javascripts/erp_app/ckeditor/plugins/wsc/dialogs/wsc.css +1 -1
  272. data/public/javascripts/erp_app/ckeditor/plugins/wsc/dialogs/wsc.js +1 -1
  273. data/public/javascripts/erp_app/ckeditor/plugins/xml/plugin.js +1 -1
  274. data/public/javascripts/erp_app/ckeditor/skins/kama/dialog.css +6 -6
  275. data/public/javascripts/erp_app/ckeditor/skins/kama/editor.css +1 -1
  276. data/public/javascripts/erp_app/ckeditor/skins/kama/skin.js +1 -1
  277. data/public/javascripts/erp_app/ckeditor/skins/kama/templates.css +1 -1
  278. data/public/javascripts/erp_app/ckeditor/skins/office2003/dialog.css +6 -5
  279. data/public/javascripts/erp_app/ckeditor/skins/office2003/editor.css +1 -1
  280. data/public/javascripts/erp_app/ckeditor/skins/office2003/skin.js +1 -1
  281. data/public/javascripts/erp_app/ckeditor/skins/office2003/templates.css +1 -1
  282. data/public/javascripts/erp_app/ckeditor/skins/v2/dialog.css +5 -5
  283. data/public/javascripts/erp_app/ckeditor/skins/v2/editor.css +1 -1
  284. data/public/javascripts/erp_app/ckeditor/skins/v2/skin.js +1 -1
  285. data/public/javascripts/erp_app/ckeditor/skins/v2/templates.css +1 -1
  286. data/public/javascripts/erp_app/ckeditor/themes/default/theme.js +1 -1
  287. data/public/javascripts/erp_app/ckeditor_example_config_override.js +2 -1
  288. data/public/javascripts/erp_app/codemirror/LICENSE +5 -1
  289. data/public/javascripts/erp_app/codemirror/README.md +6 -4
  290. data/public/javascripts/erp_app/codemirror/{css → doc}/baboon.png +0 -0
  291. data/public/javascripts/erp_app/codemirror/{css → doc}/baboon_vector.svg +0 -0
  292. data/public/javascripts/erp_app/codemirror/doc/compress.html +155 -0
  293. data/public/javascripts/erp_app/codemirror/{css → doc}/docs.css +0 -0
  294. data/public/javascripts/erp_app/codemirror/doc/internals.html +494 -0
  295. data/public/javascripts/erp_app/codemirror/{manual.html → doc/manual.html} +465 -167
  296. data/public/javascripts/erp_app/codemirror/doc/oldrelease.html +267 -0
  297. data/public/javascripts/erp_app/codemirror/doc/reporting.html +57 -0
  298. data/public/javascripts/erp_app/codemirror/doc/upgrade_v2.2.html +95 -0
  299. data/public/javascripts/erp_app/codemirror/keymap/emacs.js +29 -0
  300. data/public/javascripts/erp_app/codemirror/keymap/vim.js +785 -0
  301. data/public/javascripts/erp_app/codemirror/lib/codemirror.css +116 -14
  302. data/public/javascripts/erp_app/codemirror/lib/codemirror.js +2128 -1054
  303. data/public/javascripts/erp_app/codemirror/lib/util/closetag.js +164 -0
  304. data/public/javascripts/erp_app/codemirror/lib/util/dialog.css +27 -0
  305. data/public/javascripts/erp_app/codemirror/lib/util/dialog.js +67 -0
  306. data/public/javascripts/erp_app/codemirror/lib/util/foldcode.js +196 -0
  307. data/public/javascripts/erp_app/codemirror/lib/util/formatting.js +299 -0
  308. data/public/javascripts/erp_app/codemirror/lib/util/javascript-hint.js +134 -0
  309. data/public/javascripts/erp_app/codemirror/lib/util/loadmode.js +51 -0
  310. data/public/javascripts/erp_app/codemirror/lib/util/match-highlighter.js +44 -0
  311. data/public/javascripts/erp_app/codemirror/lib/util/multiplex.js +81 -0
  312. data/public/javascripts/erp_app/codemirror/lib/{overlay.js → util/overlay.js} +3 -2
  313. data/public/javascripts/erp_app/codemirror/lib/util/pig-hint.js +123 -0
  314. data/public/javascripts/erp_app/codemirror/lib/util/runmode.js +49 -0
  315. data/public/javascripts/erp_app/codemirror/lib/util/search.js +118 -0
  316. data/public/javascripts/erp_app/codemirror/lib/util/searchcursor.js +117 -0
  317. data/public/javascripts/erp_app/codemirror/lib/util/simple-hint.css +16 -0
  318. data/public/javascripts/erp_app/codemirror/lib/util/simple-hint.js +76 -0
  319. data/public/javascripts/erp_app/codemirror/lib/util/xml-hint.js +137 -0
  320. data/public/javascripts/erp_app/codemirror/mode/clike/clike.js +50 -17
  321. data/public/javascripts/erp_app/codemirror/mode/clike/index.html +4 -5
  322. data/public/javascripts/erp_app/codemirror/mode/clike/scala.html +765 -0
  323. data/public/javascripts/erp_app/codemirror/mode/clojure/clojure.js +207 -0
  324. data/public/javascripts/erp_app/codemirror/mode/clojure/index.html +66 -0
  325. data/public/javascripts/erp_app/codemirror/mode/coffeescript/coffeescript.js +101 -63
  326. data/public/javascripts/erp_app/codemirror/mode/coffeescript/index.html +9 -4
  327. data/public/javascripts/erp_app/codemirror/mode/css/css.js +4 -4
  328. data/public/javascripts/erp_app/codemirror/mode/css/index.html +3 -4
  329. data/public/javascripts/erp_app/codemirror/mode/diff/diff.js +24 -5
  330. data/public/javascripts/erp_app/codemirror/mode/diff/index.html +12 -7
  331. data/public/javascripts/erp_app/codemirror/mode/ecl/ecl.js +203 -0
  332. data/public/javascripts/erp_app/codemirror/mode/ecl/index.html +42 -0
  333. data/public/javascripts/erp_app/codemirror/mode/erlang/erlang.js +463 -0
  334. data/public/javascripts/erp_app/codemirror/mode/erlang/index.html +62 -0
  335. data/public/javascripts/erp_app/codemirror/mode/gfm/gfm.js +144 -0
  336. data/public/javascripts/erp_app/codemirror/mode/gfm/index.html +47 -0
  337. data/public/javascripts/erp_app/codemirror/mode/go/go.js +170 -0
  338. data/public/javascripts/erp_app/codemirror/mode/go/index.html +72 -0
  339. data/public/javascripts/erp_app/codemirror/mode/groovy/groovy.js +210 -0
  340. data/public/javascripts/erp_app/codemirror/mode/groovy/index.html +71 -0
  341. data/public/javascripts/erp_app/codemirror/mode/haskell/index.html +3 -3
  342. data/public/javascripts/erp_app/codemirror/mode/haxe/haxe.js +432 -0
  343. data/public/javascripts/erp_app/codemirror/mode/haxe/index.html +90 -0
  344. data/public/javascripts/erp_app/codemirror/mode/htmlembedded/htmlembedded.js +68 -0
  345. data/public/javascripts/erp_app/codemirror/mode/htmlembedded/index.html +49 -0
  346. data/public/javascripts/erp_app/codemirror/mode/htmlmixed/htmlmixed.js +8 -2
  347. data/public/javascripts/erp_app/codemirror/mode/htmlmixed/index.html +3 -4
  348. data/public/javascripts/erp_app/codemirror/mode/javascript/index.html +3 -4
  349. data/public/javascripts/erp_app/codemirror/mode/javascript/javascript.js +26 -13
  350. data/public/javascripts/erp_app/codemirror/mode/jinja2/index.html +37 -0
  351. data/public/javascripts/erp_app/codemirror/mode/jinja2/jinja2.js +42 -0
  352. data/public/javascripts/erp_app/codemirror/mode/less/index.html +618 -0
  353. data/public/javascripts/erp_app/codemirror/mode/less/less.js +232 -0
  354. data/public/javascripts/erp_app/codemirror/mode/lua/index.html +3 -3
  355. data/public/javascripts/erp_app/codemirror/mode/lua/lua.js +5 -3
  356. data/public/javascripts/erp_app/codemirror/mode/markdown/index.html +340 -0
  357. data/public/javascripts/erp_app/codemirror/mode/markdown/markdown.js +268 -0
  358. data/public/javascripts/erp_app/codemirror/mode/mysql/index.html +41 -0
  359. data/public/javascripts/erp_app/codemirror/mode/mysql/mysql.js +186 -0
  360. data/public/javascripts/erp_app/codemirror/mode/ntriples/index.html +32 -0
  361. data/public/javascripts/erp_app/codemirror/mode/ntriples/ntriples.js +172 -0
  362. data/public/javascripts/erp_app/codemirror/mode/ocaml/index.html +130 -0
  363. data/public/javascripts/erp_app/codemirror/mode/ocaml/ocaml.js +114 -0
  364. data/public/javascripts/erp_app/codemirror/mode/pascal/LICENSE +7 -0
  365. data/public/javascripts/erp_app/codemirror/mode/pascal/index.html +48 -0
  366. data/public/javascripts/erp_app/codemirror/mode/pascal/pascal.js +94 -0
  367. data/public/javascripts/erp_app/codemirror/mode/perl/LICENSE +19 -0
  368. data/public/javascripts/erp_app/codemirror/mode/perl/index.html +62 -0
  369. data/public/javascripts/erp_app/codemirror/mode/perl/perl.js +816 -0
  370. data/public/javascripts/erp_app/codemirror/mode/php/index.html +4 -5
  371. data/public/javascripts/erp_app/codemirror/mode/php/php.js +62 -27
  372. data/public/javascripts/erp_app/codemirror/mode/pig/index.html +42 -0
  373. data/public/javascripts/erp_app/codemirror/mode/pig/pig.js +172 -0
  374. data/public/javascripts/erp_app/codemirror/mode/plsql/index.html +3 -4
  375. data/public/javascripts/erp_app/codemirror/mode/plsql/plsql.js +2 -2
  376. data/public/javascripts/erp_app/codemirror/mode/properties/index.html +40 -0
  377. data/public/javascripts/erp_app/codemirror/mode/properties/properties.js +63 -0
  378. data/public/javascripts/erp_app/codemirror/mode/python/index.html +3 -4
  379. data/public/javascripts/erp_app/codemirror/mode/python/python.js +59 -42
  380. data/public/javascripts/erp_app/codemirror/mode/r/index.html +5 -5
  381. data/public/javascripts/erp_app/codemirror/mode/r/r.js +9 -2
  382. data/public/javascripts/erp_app/codemirror/mode/rpm/changes/changes.js +19 -0
  383. data/public/javascripts/erp_app/codemirror/mode/rpm/changes/index.html +53 -0
  384. data/public/javascripts/erp_app/codemirror/mode/rpm/spec/index.html +99 -0
  385. data/public/javascripts/erp_app/codemirror/mode/rpm/spec/spec.css +5 -0
  386. data/public/javascripts/erp_app/codemirror/mode/rpm/spec/spec.js +66 -0
  387. data/public/javascripts/erp_app/codemirror/mode/rst/index.html +4 -5
  388. data/public/javascripts/erp_app/codemirror/mode/rst/rst.js +15 -22
  389. data/public/javascripts/erp_app/codemirror/mode/ruby/index.html +3 -4
  390. data/public/javascripts/erp_app/codemirror/mode/ruby/ruby.js +49 -36
  391. data/public/javascripts/erp_app/codemirror/mode/rust/index.html +48 -0
  392. data/public/javascripts/erp_app/codemirror/mode/rust/rust.js +432 -0
  393. data/public/javascripts/erp_app/codemirror/mode/scheme/index.html +3 -4
  394. data/public/javascripts/erp_app/codemirror/mode/scheme/scheme.js +71 -23
  395. data/public/javascripts/erp_app/codemirror/mode/shell/index.html +50 -0
  396. data/public/javascripts/erp_app/codemirror/mode/shell/shell.js +118 -0
  397. data/public/javascripts/erp_app/codemirror/mode/smalltalk/index.html +3 -4
  398. data/public/javascripts/erp_app/codemirror/mode/smalltalk/smalltalk.js +137 -120
  399. data/public/javascripts/erp_app/codemirror/mode/smarty/index.html +82 -0
  400. data/public/javascripts/erp_app/codemirror/mode/smarty/smarty.js +148 -0
  401. data/public/javascripts/erp_app/codemirror/mode/sparql/index.html +3 -4
  402. data/public/javascripts/erp_app/codemirror/mode/stex/index.html +4 -5
  403. data/public/javascripts/erp_app/codemirror/mode/stex/stex.js +22 -7
  404. data/public/javascripts/erp_app/codemirror/mode/stex/test.html +263 -0
  405. data/public/javascripts/erp_app/codemirror/mode/tiddlywiki/index.html +140 -0
  406. data/public/javascripts/erp_app/codemirror/mode/tiddlywiki/tiddlywiki.css +14 -0
  407. data/public/javascripts/erp_app/codemirror/mode/tiddlywiki/tiddlywiki.js +384 -0
  408. data/public/javascripts/erp_app/codemirror/mode/tiki/index.html +82 -0
  409. data/public/javascripts/erp_app/codemirror/mode/tiki/tiki.css +26 -0
  410. data/public/javascripts/erp_app/codemirror/mode/tiki/tiki.js +316 -0
  411. data/public/javascripts/erp_app/codemirror/mode/vb/LICENSE.txt +21 -0
  412. data/public/javascripts/erp_app/codemirror/mode/vb/index.html +88 -0
  413. data/public/javascripts/erp_app/codemirror/mode/vb/vb.js +260 -0
  414. data/public/javascripts/erp_app/codemirror/mode/vbscript/index.html +42 -0
  415. data/public/javascripts/erp_app/codemirror/mode/vbscript/vbscript.js +26 -0
  416. data/public/javascripts/erp_app/codemirror/mode/velocity/index.html +3 -3
  417. data/public/javascripts/erp_app/codemirror/mode/verilog/index.html +210 -0
  418. data/public/javascripts/erp_app/codemirror/mode/verilog/verilog.js +194 -0
  419. data/public/javascripts/erp_app/codemirror/mode/xml/index.html +7 -5
  420. data/public/javascripts/erp_app/codemirror/mode/xml/xml.js +127 -32
  421. data/public/javascripts/erp_app/codemirror/mode/xquery/LICENSE +20 -0
  422. data/public/javascripts/erp_app/codemirror/mode/xquery/index.html +222 -0
  423. data/public/javascripts/erp_app/codemirror/mode/xquery/test/index.html +27 -0
  424. data/public/javascripts/erp_app/codemirror/mode/xquery/test/testBase.js +42 -0
  425. data/public/javascripts/erp_app/codemirror/mode/xquery/test/testEmptySequenceKeyword.js +16 -0
  426. data/public/javascripts/erp_app/codemirror/mode/xquery/test/testMultiAttr.js +16 -0
  427. data/public/javascripts/erp_app/codemirror/mode/xquery/test/testNamespaces.js +91 -0
  428. data/public/javascripts/erp_app/codemirror/mode/xquery/test/testProcessingInstructions.js +16 -0
  429. data/public/javascripts/erp_app/codemirror/mode/xquery/test/testQuotes.js +19 -0
  430. data/public/javascripts/erp_app/codemirror/mode/xquery/xquery.js +448 -0
  431. data/public/javascripts/erp_app/codemirror/mode/yaml/index.html +3 -4
  432. data/public/javascripts/erp_app/codemirror/package.json +29 -0
  433. data/public/javascripts/erp_app/codemirror/test/driver.js +42 -0
  434. data/public/javascripts/erp_app/codemirror/test/index.html +55 -0
  435. data/public/javascripts/erp_app/codemirror/test/mode_test.css +22 -0
  436. data/public/javascripts/erp_app/codemirror/test/mode_test.js +164 -0
  437. data/public/javascripts/erp_app/codemirror/test/test.js +467 -0
  438. data/public/javascripts/erp_app/codemirror/theme/ambiance.css +81 -0
  439. data/public/javascripts/erp_app/codemirror/theme/blackboard.css +25 -0
  440. data/public/javascripts/erp_app/codemirror/theme/cobalt.css +18 -0
  441. data/public/javascripts/erp_app/codemirror/theme/eclipse.css +25 -0
  442. data/public/javascripts/erp_app/codemirror/theme/elegant.css +3 -2
  443. data/public/javascripts/erp_app/codemirror/theme/erlang-dark.css +21 -0
  444. data/public/javascripts/erp_app/codemirror/theme/lesser-dark.css +44 -0
  445. data/public/javascripts/erp_app/codemirror/theme/monokai.css +28 -0
  446. data/public/javascripts/erp_app/codemirror/theme/neat.css +4 -3
  447. data/public/javascripts/erp_app/codemirror/theme/night.css +2 -1
  448. data/public/javascripts/erp_app/codemirror/theme/rubyblue.css +21 -0
  449. data/public/javascripts/erp_app/codemirror/theme/vibrant-ink.css +27 -0
  450. data/public/javascripts/erp_app/codemirror/theme/xq-dark.css +46 -0
  451. data/public/javascripts/erp_app/codemirror_highlight.js +17 -0
  452. data/public/javascripts/erp_app/desktop/applications/audit_log_viewer/module.js +1 -57
  453. data/public/javascripts/erp_app/desktop/applications/control_panel/application_management_panel.js +1 -2
  454. data/public/javascripts/erp_app/desktop/applications/control_panel/module.js +1 -1
  455. data/public/javascripts/erp_app/desktop/applications/file_manager/module.js +12 -1
  456. data/public/javascripts/erp_app/desktop/ext_ux_desktop_module.js +9 -1
  457. data/public/javascripts/erp_app/jquery_support.js +6 -1
  458. data/public/javascripts/erp_app/login/window.js +1 -1
  459. data/public/javascripts/erp_app/organizer/default_menu_tree_panel.js +3 -1
  460. data/public/javascripts/erp_app/organizer/layout.js +92 -79
  461. data/public/javascripts/erp_app/organizer/preference_window.js +1 -1
  462. data/public/javascripts/erp_app/{desktop/applications/audit_log_viewer → shared/audit_log}/audit_log_grid_panel.js +1 -0
  463. data/public/javascripts/erp_app/{desktop/applications/audit_log_viewer → shared/audit_log}/audit_log_item_grid_panel.js +0 -0
  464. data/public/javascripts/erp_app/shared/audit_log/audit_log_tab_panel.js +52 -0
  465. data/public/javascripts/erp_app/shared/compass_ckeditor.js +51 -1
  466. data/public/javascripts/erp_app/shared/compass_codemirror.js +2 -8
  467. data/public/javascripts/erp_app/shared/configuration/configuration_panel.js +24 -22
  468. data/public/javascripts/erp_app/shared/dynamic_editable_grid.js +1 -0
  469. data/public/javascripts/erp_app/shared/dynamic_editable_grid_loader_panel.js +5 -1
  470. data/public/javascripts/erp_app/shared/file_manager_tree.js +358 -270
  471. data/public/javascripts/erp_app/shared/file_upload/Ext.ux.panel.UploadPanel.js +580 -0
  472. data/public/javascripts/erp_app/shared/file_upload/plupload.flash.swf +0 -0
  473. data/public/javascripts/erp_app/shared/file_upload/plupload.full.js +2 -0
  474. data/public/javascripts/erp_app/shared/file_upload/plupload.silverlight.xap +0 -0
  475. data/public/javascripts/erp_app/shared/file_upload/upload_window.js +19 -212
  476. data/public/javascripts/erp_app/{desktop/applications/control_panel → shared}/profile_management_panel.js +14 -23
  477. data/public/javascripts/erp_app/utility.js +340 -272
  478. data/public/javascripts/erp_app/widgets.js +2 -2
  479. data/public/javascripts/extjs/MultiCellSelectionModel.js +490 -0
  480. data/public/javascripts/jquery_plugins/jquery.address.min.js +21 -24
  481. data/public/stylesheets/erp_app/desktop/base.css +3 -1
  482. data/public/stylesheets/erp_app/shared/compass-ext-all.css +29 -0
  483. data/public/stylesheets/erp_app/shared/hover_finger.css +4 -0
  484. metadata +267 -71
  485. data/app/controllers/erp_app/desktop/control_panel/profile_management_controller.rb +0 -23
  486. data/app/models/extensions/party.rb +0 -39
  487. data/public/images/icons/add/Thumbs.db +0 -0
  488. data/public/images/icons/calendar/Thumbs.db +0 -0
  489. data/public/images/icons/copy/Thumbs.db +0 -0
  490. data/public/images/icons/cut/Thumbs.db +0 -0
  491. data/public/images/icons/delete/Thumbs.db +0 -0
  492. data/public/images/icons/edit/Thumbs.db +0 -0
  493. data/public/images/icons/folder/Thumbs.db +0 -0
  494. data/public/images/icons/gear/Thumbs.db +0 -0
  495. data/public/images/icons/globe/Thumbs.db +0 -0
  496. data/public/images/icons/grid/Thumbs.db +0 -0
  497. data/public/images/icons/help/Thumbs.db +0 -0
  498. data/public/images/icons/information/Thumbs.db +0 -0
  499. data/public/images/icons/key/Thumbs.db +0 -0
  500. data/public/images/icons/log_out/Thumbs.db +0 -0
  501. data/public/images/icons/mail/Thumbs.db +0 -0
  502. data/public/images/icons/new/Thumbs.db +0 -0
  503. data/public/images/icons/next/Thumbs.db +0 -0
  504. data/public/images/icons/open/Thumbs.db +0 -0
  505. data/public/images/icons/paste/Thumbs.db +0 -0
  506. data/public/images/icons/picture/Thumbs.db +0 -0
  507. data/public/images/icons/presentation/Thumbs.db +0 -0
  508. data/public/images/icons/preview/Thumbs.db +0 -0
  509. data/public/images/icons/previous/Thumbs.db +0 -0
  510. data/public/images/icons/print/Thumbs.db +0 -0
  511. data/public/images/icons/properties/Thumbs.db +0 -0
  512. data/public/images/icons/redo/Thumbs.db +0 -0
  513. data/public/images/icons/refresh/Thumbs.db +0 -0
  514. data/public/images/icons/remove/Thumbs.db +0 -0
  515. data/public/images/icons/rename/Thumbs.db +0 -0
  516. data/public/images/icons/save/Thumbs.db +0 -0
  517. data/public/images/icons/search/Thumbs.db +0 -0
  518. data/public/images/icons/send/Thumbs.db +0 -0
  519. data/public/images/icons/settings/Thumbs.db +0 -0
  520. data/public/images/icons/synchronize/Thumbs.db +0 -0
  521. data/public/images/icons/undo/Thumbs.db +0 -0
  522. data/public/images/icons/upload/Thumbs.db +0 -0
  523. data/public/images/icons/user/Thumbs.db +0 -0
  524. data/public/images/icons/zoom_in/Thumbs.db +0 -0
  525. data/public/images/icons/zoom_out/Thumbs.db +0 -0
  526. data/public/javascripts/erp_app/ckeditor/plugins/jwplayer/jwplayer/Thumbs.db +0 -0
  527. data/public/javascripts/erp_app/codemirror/lib/runmode.js +0 -27
  528. data/public/javascripts/erp_app/codemirror/mode/diff/diff.css +0 -3
  529. data/public/javascripts/erp_app/codemirror/mode/rst/rst.css +0 -75
  530. data/public/javascripts/erp_app/codemirror/mode/xmlpure/index.html +0 -60
  531. data/public/javascripts/erp_app/codemirror/mode/xmlpure/xmlpure.js +0 -481
  532. data/public/javascripts/erp_app/codemirror/theme/default.css +0 -19
  533. data/public/javascripts/erp_app/shared/file_upload/Ext.ux.AwesomeUploader.js +0 -511
  534. data/public/javascripts/erp_app/shared/file_upload/Ext.ux.AwesomeUploaderLocalization.js +0 -45
  535. data/public/javascripts/erp_app/shared/file_upload/Ext.ux.XHRUpload.js +0 -138
  536. data/public/javascripts/erp_app/tinymce/Ext.ux.TinyMCE.js +0 -689
  537. data/public/javascripts/erp_app/tinymce/center_region.js +0 -611
@@ -0,0 +1,765 @@
1
+ <!doctype html>
2
+ <html>
3
+ <head>
4
+ <title>CodeMirror: C-like mode</title>
5
+ <link rel="stylesheet" href="../../lib/codemirror.css">
6
+ <link rel="stylesheet" href="../../theme/ambiance.css">
7
+ <script src="../../lib/codemirror.js"></script>
8
+ <script src="clike.js"></script>
9
+ <link rel="stylesheet" href="../../doc/docs.css">
10
+ <style>
11
+ body
12
+ {
13
+ margin: 0;
14
+ padding: 0;
15
+ max-width:inherit;
16
+ height: 100%;
17
+ }
18
+ html, form, .CodeMirror, .CodeMirror-scroll
19
+ {
20
+ height: 100%;
21
+ }
22
+ </style>
23
+ </head>
24
+ <body>
25
+ <form>
26
+ <textarea id="code" name="code">
27
+
28
+ /* __ *\
29
+ ** ________ ___ / / ___ Scala API **
30
+ ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL **
31
+ ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
32
+ ** /____/\___/_/ |_/____/_/ | | **
33
+ ** |/ **
34
+ \* */
35
+
36
+ package scala.collection
37
+
38
+ import generic._
39
+ import mutable.{ Builder, ListBuffer }
40
+ import annotation.{tailrec, migration, bridge}
41
+ import annotation.unchecked.{ uncheckedVariance => uV }
42
+ import parallel.ParIterable
43
+
44
+ /** A template trait for traversable collections of type `Traversable[A]`.
45
+ *
46
+ * $traversableInfo
47
+ * @define mutability
48
+ * @define traversableInfo
49
+ * This is a base trait of all kinds of $mutability Scala collections. It
50
+ * implements the behavior common to all collections, in terms of a method
51
+ * `foreach` with signature:
52
+ * {{{
53
+ * def foreach[U](f: Elem => U): Unit
54
+ * }}}
55
+ * Collection classes mixing in this trait provide a concrete
56
+ * `foreach` method which traverses all the
57
+ * elements contained in the collection, applying a given function to each.
58
+ * They also need to provide a method `newBuilder`
59
+ * which creates a builder for collections of the same kind.
60
+ *
61
+ * A traversable class might or might not have two properties: strictness
62
+ * and orderedness. Neither is represented as a type.
63
+ *
64
+ * The instances of a strict collection class have all their elements
65
+ * computed before they can be used as values. By contrast, instances of
66
+ * a non-strict collection class may defer computation of some of their
67
+ * elements until after the instance is available as a value.
68
+ * A typical example of a non-strict collection class is a
69
+ * <a href="../immutable/Stream.html" target="ContentFrame">
70
+ * `scala.collection.immutable.Stream`</a>.
71
+ * A more general class of examples are `TraversableViews`.
72
+ *
73
+ * If a collection is an instance of an ordered collection class, traversing
74
+ * its elements with `foreach` will always visit elements in the
75
+ * same order, even for different runs of the program. If the class is not
76
+ * ordered, `foreach` can visit elements in different orders for
77
+ * different runs (but it will keep the same order in the same run).'
78
+ *
79
+ * A typical example of a collection class which is not ordered is a
80
+ * `HashMap` of objects. The traversal order for hash maps will
81
+ * depend on the hash codes of its elements, and these hash codes might
82
+ * differ from one run to the next. By contrast, a `LinkedHashMap`
83
+ * is ordered because it's `foreach` method visits elements in the
84
+ * order they were inserted into the `HashMap`.
85
+ *
86
+ * @author Martin Odersky
87
+ * @version 2.8
88
+ * @since 2.8
89
+ * @tparam A the element type of the collection
90
+ * @tparam Repr the type of the actual collection containing the elements.
91
+ *
92
+ * @define Coll Traversable
93
+ * @define coll traversable collection
94
+ */
95
+ trait TraversableLike[+A, +Repr] extends HasNewBuilder[A, Repr]
96
+ with FilterMonadic[A, Repr]
97
+ with TraversableOnce[A]
98
+ with GenTraversableLike[A, Repr]
99
+ with Parallelizable[A, ParIterable[A]]
100
+ {
101
+ self =>
102
+
103
+ import Traversable.breaks._
104
+
105
+ /** The type implementing this traversable */
106
+ protected type Self = Repr
107
+
108
+ /** The collection of type $coll underlying this `TraversableLike` object.
109
+ * By default this is implemented as the `TraversableLike` object itself,
110
+ * but this can be overridden.
111
+ */
112
+ def repr: Repr = this.asInstanceOf[Repr]
113
+
114
+ /** The underlying collection seen as an instance of `$Coll`.
115
+ * By default this is implemented as the current collection object itself,
116
+ * but this can be overridden.
117
+ */
118
+ protected[this] def thisCollection: Traversable[A] = this.asInstanceOf[Traversable[A]]
119
+
120
+ /** A conversion from collections of type `Repr` to `$Coll` objects.
121
+ * By default this is implemented as just a cast, but this can be overridden.
122
+ */
123
+ protected[this] def toCollection(repr: Repr): Traversable[A] = repr.asInstanceOf[Traversable[A]]
124
+
125
+ /** Creates a new builder for this collection type.
126
+ */
127
+ protected[this] def newBuilder: Builder[A, Repr]
128
+
129
+ protected[this] def parCombiner = ParIterable.newCombiner[A]
130
+
131
+ /** Applies a function `f` to all elements of this $coll.
132
+ *
133
+ * Note: this method underlies the implementation of most other bulk operations.
134
+ * It's important to implement this method in an efficient way.
135
+ *
136
+ *
137
+ * @param f the function that is applied for its side-effect to every element.
138
+ * The result of function `f` is discarded.
139
+ *
140
+ * @tparam U the type parameter describing the result of function `f`.
141
+ * This result will always be ignored. Typically `U` is `Unit`,
142
+ * but this is not necessary.
143
+ *
144
+ * @usecase def foreach(f: A => Unit): Unit
145
+ */
146
+ def foreach[U](f: A => U): Unit
147
+
148
+ /** Tests whether this $coll is empty.
149
+ *
150
+ * @return `true` if the $coll contain no elements, `false` otherwise.
151
+ */
152
+ def isEmpty: Boolean = {
153
+ var result = true
154
+ breakable {
155
+ for (x <- this) {
156
+ result = false
157
+ break
158
+ }
159
+ }
160
+ result
161
+ }
162
+
163
+ /** Tests whether this $coll is known to have a finite size.
164
+ * All strict collections are known to have finite size. For a non-strict collection
165
+ * such as `Stream`, the predicate returns `true` if all elements have been computed.
166
+ * It returns `false` if the stream is not yet evaluated to the end.
167
+ *
168
+ * Note: many collection methods will not work on collections of infinite sizes.
169
+ *
170
+ * @return `true` if this collection is known to have finite size, `false` otherwise.
171
+ */
172
+ def hasDefiniteSize = true
173
+
174
+ def ++[B >: A, That](that: GenTraversableOnce[B])(implicit bf: CanBuildFrom[Repr, B, That]): That = {
175
+ val b = bf(repr)
176
+ if (that.isInstanceOf[IndexedSeqLike[_, _]]) b.sizeHint(this, that.seq.size)
177
+ b ++= thisCollection
178
+ b ++= that.seq
179
+ b.result
180
+ }
181
+
182
+ @bridge
183
+ def ++[B >: A, That](that: TraversableOnce[B])(implicit bf: CanBuildFrom[Repr, B, That]): That =
184
+ ++(that: GenTraversableOnce[B])(bf)
185
+
186
+ /** Concatenates this $coll with the elements of a traversable collection.
187
+ * It differs from ++ in that the right operand determines the type of the
188
+ * resulting collection rather than the left one.
189
+ *
190
+ * @param that the traversable to append.
191
+ * @tparam B the element type of the returned collection.
192
+ * @tparam That $thatinfo
193
+ * @param bf $bfinfo
194
+ * @return a new collection of type `That` which contains all elements
195
+ * of this $coll followed by all elements of `that`.
196
+ *
197
+ * @usecase def ++:[B](that: TraversableOnce[B]): $Coll[B]
198
+ *
199
+ * @return a new $coll which contains all elements of this $coll
200
+ * followed by all elements of `that`.
201
+ */
202
+ def ++:[B >: A, That](that: TraversableOnce[B])(implicit bf: CanBuildFrom[Repr, B, That]): That = {
203
+ val b = bf(repr)
204
+ if (that.isInstanceOf[IndexedSeqLike[_, _]]) b.sizeHint(this, that.size)
205
+ b ++= that
206
+ b ++= thisCollection
207
+ b.result
208
+ }
209
+
210
+ /** This overload exists because: for the implementation of ++: we should reuse
211
+ * that of ++ because many collections override it with more efficient versions.
212
+ * Since TraversableOnce has no '++' method, we have to implement that directly,
213
+ * but Traversable and down can use the overload.
214
+ */
215
+ def ++:[B >: A, That](that: Traversable[B])(implicit bf: CanBuildFrom[Repr, B, That]): That =
216
+ (that ++ seq)(breakOut)
217
+
218
+ def map[B, That](f: A => B)(implicit bf: CanBuildFrom[Repr, B, That]): That = {
219
+ val b = bf(repr)
220
+ b.sizeHint(this)
221
+ for (x <- this) b += f(x)
222
+ b.result
223
+ }
224
+
225
+ def flatMap[B, That](f: A => GenTraversableOnce[B])(implicit bf: CanBuildFrom[Repr, B, That]): That = {
226
+ val b = bf(repr)
227
+ for (x <- this) b ++= f(x).seq
228
+ b.result
229
+ }
230
+
231
+ /** Selects all elements of this $coll which satisfy a predicate.
232
+ *
233
+ * @param p the predicate used to test elements.
234
+ * @return a new $coll consisting of all elements of this $coll that satisfy the given
235
+ * predicate `p`. The order of the elements is preserved.
236
+ */
237
+ def filter(p: A => Boolean): Repr = {
238
+ val b = newBuilder
239
+ for (x <- this)
240
+ if (p(x)) b += x
241
+ b.result
242
+ }
243
+
244
+ /** Selects all elements of this $coll which do not satisfy a predicate.
245
+ *
246
+ * @param p the predicate used to test elements.
247
+ * @return a new $coll consisting of all elements of this $coll that do not satisfy the given
248
+ * predicate `p`. The order of the elements is preserved.
249
+ */
250
+ def filterNot(p: A => Boolean): Repr = filter(!p(_))
251
+
252
+ def collect[B, That](pf: PartialFunction[A, B])(implicit bf: CanBuildFrom[Repr, B, That]): That = {
253
+ val b = bf(repr)
254
+ for (x <- this) if (pf.isDefinedAt(x)) b += pf(x)
255
+ b.result
256
+ }
257
+
258
+ /** Builds a new collection by applying an option-valued function to all
259
+ * elements of this $coll on which the function is defined.
260
+ *
261
+ * @param f the option-valued function which filters and maps the $coll.
262
+ * @tparam B the element type of the returned collection.
263
+ * @tparam That $thatinfo
264
+ * @param bf $bfinfo
265
+ * @return a new collection of type `That` resulting from applying the option-valued function
266
+ * `f` to each element and collecting all defined results.
267
+ * The order of the elements is preserved.
268
+ *
269
+ * @usecase def filterMap[B](f: A => Option[B]): $Coll[B]
270
+ *
271
+ * @param pf the partial function which filters and maps the $coll.
272
+ * @return a new $coll resulting from applying the given option-valued function
273
+ * `f` to each element and collecting all defined results.
274
+ * The order of the elements is preserved.
275
+ def filterMap[B, That](f: A => Option[B])(implicit bf: CanBuildFrom[Repr, B, That]): That = {
276
+ val b = bf(repr)
277
+ for (x <- this)
278
+ f(x) match {
279
+ case Some(y) => b += y
280
+ case _ =>
281
+ }
282
+ b.result
283
+ }
284
+ */
285
+
286
+ /** Partitions this $coll in two ${coll}s according to a predicate.
287
+ *
288
+ * @param p the predicate on which to partition.
289
+ * @return a pair of ${coll}s: the first $coll consists of all elements that
290
+ * satisfy the predicate `p` and the second $coll consists of all elements
291
+ * that don't. The relative order of the elements in the resulting ${coll}s
292
+ * is the same as in the original $coll.
293
+ */
294
+ def partition(p: A => Boolean): (Repr, Repr) = {
295
+ val l, r = newBuilder
296
+ for (x <- this) (if (p(x)) l else r) += x
297
+ (l.result, r.result)
298
+ }
299
+
300
+ def groupBy[K](f: A => K): immutable.Map[K, Repr] = {
301
+ val m = mutable.Map.empty[K, Builder[A, Repr]]
302
+ for (elem <- this) {
303
+ val key = f(elem)
304
+ val bldr = m.getOrElseUpdate(key, newBuilder)
305
+ bldr += elem
306
+ }
307
+ val b = immutable.Map.newBuilder[K, Repr]
308
+ for ((k, v) <- m)
309
+ b += ((k, v.result))
310
+
311
+ b.result
312
+ }
313
+
314
+ /** Tests whether a predicate holds for all elements of this $coll.
315
+ *
316
+ * $mayNotTerminateInf
317
+ *
318
+ * @param p the predicate used to test elements.
319
+ * @return `true` if the given predicate `p` holds for all elements
320
+ * of this $coll, otherwise `false`.
321
+ */
322
+ def forall(p: A => Boolean): Boolean = {
323
+ var result = true
324
+ breakable {
325
+ for (x <- this)
326
+ if (!p(x)) { result = false; break }
327
+ }
328
+ result
329
+ }
330
+
331
+ /** Tests whether a predicate holds for some of the elements of this $coll.
332
+ *
333
+ * $mayNotTerminateInf
334
+ *
335
+ * @param p the predicate used to test elements.
336
+ * @return `true` if the given predicate `p` holds for some of the
337
+ * elements of this $coll, otherwise `false`.
338
+ */
339
+ def exists(p: A => Boolean): Boolean = {
340
+ var result = false
341
+ breakable {
342
+ for (x <- this)
343
+ if (p(x)) { result = true; break }
344
+ }
345
+ result
346
+ }
347
+
348
+ /** Finds the first element of the $coll satisfying a predicate, if any.
349
+ *
350
+ * $mayNotTerminateInf
351
+ * $orderDependent
352
+ *
353
+ * @param p the predicate used to test elements.
354
+ * @return an option value containing the first element in the $coll
355
+ * that satisfies `p`, or `None` if none exists.
356
+ */
357
+ def find(p: A => Boolean): Option[A] = {
358
+ var result: Option[A] = None
359
+ breakable {
360
+ for (x <- this)
361
+ if (p(x)) { result = Some(x); break }
362
+ }
363
+ result
364
+ }
365
+
366
+ def scan[B >: A, That](z: B)(op: (B, B) => B)(implicit cbf: CanBuildFrom[Repr, B, That]): That = scanLeft(z)(op)
367
+
368
+ def scanLeft[B, That](z: B)(op: (B, A) => B)(implicit bf: CanBuildFrom[Repr, B, That]): That = {
369
+ val b = bf(repr)
370
+ b.sizeHint(this, 1)
371
+ var acc = z
372
+ b += acc
373
+ for (x <- this) { acc = op(acc, x); b += acc }
374
+ b.result
375
+ }
376
+
377
+ @migration(2, 9,
378
+ "This scanRight definition has changed in 2.9.\n" +
379
+ "The previous behavior can be reproduced with scanRight.reverse."
380
+ )
381
+ def scanRight[B, That](z: B)(op: (A, B) => B)(implicit bf: CanBuildFrom[Repr, B, That]): That = {
382
+ var scanned = List(z)
383
+ var acc = z
384
+ for (x <- reversed) {
385
+ acc = op(x, acc)
386
+ scanned ::= acc
387
+ }
388
+ val b = bf(repr)
389
+ for (elem <- scanned) b += elem
390
+ b.result
391
+ }
392
+
393
+ /** Selects the first element of this $coll.
394
+ * $orderDependent
395
+ * @return the first element of this $coll.
396
+ * @throws `NoSuchElementException` if the $coll is empty.
397
+ */
398
+ def head: A = {
399
+ var result: () => A = () => throw new NoSuchElementException
400
+ breakable {
401
+ for (x <- this) {
402
+ result = () => x
403
+ break
404
+ }
405
+ }
406
+ result()
407
+ }
408
+
409
+ /** Optionally selects the first element.
410
+ * $orderDependent
411
+ * @return the first element of this $coll if it is nonempty, `None` if it is empty.
412
+ */
413
+ def headOption: Option[A] = if (isEmpty) None else Some(head)
414
+
415
+ /** Selects all elements except the first.
416
+ * $orderDependent
417
+ * @return a $coll consisting of all elements of this $coll
418
+ * except the first one.
419
+ * @throws `UnsupportedOperationException` if the $coll is empty.
420
+ */
421
+ override def tail: Repr = {
422
+ if (isEmpty) throw new UnsupportedOperationException("empty.tail")
423
+ drop(1)
424
+ }
425
+
426
+ /** Selects the last element.
427
+ * $orderDependent
428
+ * @return The last element of this $coll.
429
+ * @throws NoSuchElementException If the $coll is empty.
430
+ */
431
+ def last: A = {
432
+ var lst = head
433
+ for (x <- this)
434
+ lst = x
435
+ lst
436
+ }
437
+
438
+ /** Optionally selects the last element.
439
+ * $orderDependent
440
+ * @return the last element of this $coll$ if it is nonempty, `None` if it is empty.
441
+ */
442
+ def lastOption: Option[A] = if (isEmpty) None else Some(last)
443
+
444
+ /** Selects all elements except the last.
445
+ * $orderDependent
446
+ * @return a $coll consisting of all elements of this $coll
447
+ * except the last one.
448
+ * @throws `UnsupportedOperationException` if the $coll is empty.
449
+ */
450
+ def init: Repr = {
451
+ if (isEmpty) throw new UnsupportedOperationException("empty.init")
452
+ var lst = head
453
+ var follow = false
454
+ val b = newBuilder
455
+ b.sizeHint(this, -1)
456
+ for (x <- this.seq) {
457
+ if (follow) b += lst
458
+ else follow = true
459
+ lst = x
460
+ }
461
+ b.result
462
+ }
463
+
464
+ def take(n: Int): Repr = slice(0, n)
465
+
466
+ def drop(n: Int): Repr =
467
+ if (n <= 0) {
468
+ val b = newBuilder
469
+ b.sizeHint(this)
470
+ b ++= thisCollection result
471
+ }
472
+ else sliceWithKnownDelta(n, Int.MaxValue, -n)
473
+
474
+ def slice(from: Int, until: Int): Repr = sliceWithKnownBound(math.max(from, 0), until)
475
+
476
+ // Precondition: from >= 0, until > 0, builder already configured for building.
477
+ private[this] def sliceInternal(from: Int, until: Int, b: Builder[A, Repr]): Repr = {
478
+ var i = 0
479
+ breakable {
480
+ for (x <- this.seq) {
481
+ if (i >= from) b += x
482
+ i += 1
483
+ if (i >= until) break
484
+ }
485
+ }
486
+ b.result
487
+ }
488
+ // Precondition: from >= 0
489
+ private[scala] def sliceWithKnownDelta(from: Int, until: Int, delta: Int): Repr = {
490
+ val b = newBuilder
491
+ if (until <= from) b.result
492
+ else {
493
+ b.sizeHint(this, delta)
494
+ sliceInternal(from, until, b)
495
+ }
496
+ }
497
+ // Precondition: from >= 0
498
+ private[scala] def sliceWithKnownBound(from: Int, until: Int): Repr = {
499
+ val b = newBuilder
500
+ if (until <= from) b.result
501
+ else {
502
+ b.sizeHintBounded(until - from, this)
503
+ sliceInternal(from, until, b)
504
+ }
505
+ }
506
+
507
+ def takeWhile(p: A => Boolean): Repr = {
508
+ val b = newBuilder
509
+ breakable {
510
+ for (x <- this) {
511
+ if (!p(x)) break
512
+ b += x
513
+ }
514
+ }
515
+ b.result
516
+ }
517
+
518
+ def dropWhile(p: A => Boolean): Repr = {
519
+ val b = newBuilder
520
+ var go = false
521
+ for (x <- this) {
522
+ if (!p(x)) go = true
523
+ if (go) b += x
524
+ }
525
+ b.result
526
+ }
527
+
528
+ def span(p: A => Boolean): (Repr, Repr) = {
529
+ val l, r = newBuilder
530
+ var toLeft = true
531
+ for (x <- this) {
532
+ toLeft = toLeft && p(x)
533
+ (if (toLeft) l else r) += x
534
+ }
535
+ (l.result, r.result)
536
+ }
537
+
538
+ def splitAt(n: Int): (Repr, Repr) = {
539
+ val l, r = newBuilder
540
+ l.sizeHintBounded(n, this)
541
+ if (n >= 0) r.sizeHint(this, -n)
542
+ var i = 0
543
+ for (x <- this) {
544
+ (if (i < n) l else r) += x
545
+ i += 1
546
+ }
547
+ (l.result, r.result)
548
+ }
549
+
550
+ /** Iterates over the tails of this $coll. The first value will be this
551
+ * $coll and the final one will be an empty $coll, with the intervening
552
+ * values the results of successive applications of `tail`.
553
+ *
554
+ * @return an iterator over all the tails of this $coll
555
+ * @example `List(1,2,3).tails = Iterator(List(1,2,3), List(2,3), List(3), Nil)`
556
+ */
557
+ def tails: Iterator[Repr] = iterateUntilEmpty(_.tail)
558
+
559
+ /** Iterates over the inits of this $coll. The first value will be this
560
+ * $coll and the final one will be an empty $coll, with the intervening
561
+ * values the results of successive applications of `init`.
562
+ *
563
+ * @return an iterator over all the inits of this $coll
564
+ * @example `List(1,2,3).inits = Iterator(List(1,2,3), List(1,2), List(1), Nil)`
565
+ */
566
+ def inits: Iterator[Repr] = iterateUntilEmpty(_.init)
567
+
568
+ /** Copies elements of this $coll to an array.
569
+ * Fills the given array `xs` with at most `len` elements of
570
+ * this $coll, starting at position `start`.
571
+ * Copying will stop once either the end of the current $coll is reached,
572
+ * or the end of the array is reached, or `len` elements have been copied.
573
+ *
574
+ * $willNotTerminateInf
575
+ *
576
+ * @param xs the array to fill.
577
+ * @param start the starting index.
578
+ * @param len the maximal number of elements to copy.
579
+ * @tparam B the type of the elements of the array.
580
+ *
581
+ *
582
+ * @usecase def copyToArray(xs: Array[A], start: Int, len: Int): Unit
583
+ */
584
+ def copyToArray[B >: A](xs: Array[B], start: Int, len: Int) {
585
+ var i = start
586
+ val end = (start + len) min xs.length
587
+ breakable {
588
+ for (x <- this) {
589
+ if (i >= end) break
590
+ xs(i) = x
591
+ i += 1
592
+ }
593
+ }
594
+ }
595
+
596
+ def toTraversable: Traversable[A] = thisCollection
597
+ def toIterator: Iterator[A] = toStream.iterator
598
+ def toStream: Stream[A] = toBuffer.toStream
599
+
600
+ /** Converts this $coll to a string.
601
+ *
602
+ * @return a string representation of this collection. By default this
603
+ * string consists of the `stringPrefix` of this $coll,
604
+ * followed by all elements separated by commas and enclosed in parentheses.
605
+ */
606
+ override def toString = mkString(stringPrefix + "(", ", ", ")")
607
+
608
+ /** Defines the prefix of this object's `toString` representation.
609
+ *
610
+ * @return a string representation which starts the result of `toString`
611
+ * applied to this $coll. By default the string prefix is the
612
+ * simple name of the collection class $coll.
613
+ */
614
+ def stringPrefix : String = {
615
+ var string = repr.asInstanceOf[AnyRef].getClass.getName
616
+ val idx1 = string.lastIndexOf('.' : Int)
617
+ if (idx1 != -1) string = string.substring(idx1 + 1)
618
+ val idx2 = string.indexOf('$')
619
+ if (idx2 != -1) string = string.substring(0, idx2)
620
+ string
621
+ }
622
+
623
+ /** Creates a non-strict view of this $coll.
624
+ *
625
+ * @return a non-strict view of this $coll.
626
+ */
627
+ def view = new TraversableView[A, Repr] {
628
+ protected lazy val underlying = self.repr
629
+ override def foreach[U](f: A => U) = self foreach f
630
+ }
631
+
632
+ /** Creates a non-strict view of a slice of this $coll.
633
+ *
634
+ * Note: the difference between `view` and `slice` is that `view` produces
635
+ * a view of the current $coll, whereas `slice` produces a new $coll.
636
+ *
637
+ * Note: `view(from, to)` is equivalent to `view.slice(from, to)`
638
+ * $orderDependent
639
+ *
640
+ * @param from the index of the first element of the view
641
+ * @param until the index of the element following the view
642
+ * @return a non-strict view of a slice of this $coll, starting at index `from`
643
+ * and extending up to (but not including) index `until`.
644
+ */
645
+ def view(from: Int, until: Int): TraversableView[A, Repr] = view.slice(from, until)
646
+
647
+ /** Creates a non-strict filter of this $coll.
648
+ *
649
+ * Note: the difference between `c filter p` and `c withFilter p` is that
650
+ * the former creates a new collection, whereas the latter only
651
+ * restricts the domain of subsequent `map`, `flatMap`, `foreach`,
652
+ * and `withFilter` operations.
653
+ * $orderDependent
654
+ *
655
+ * @param p the predicate used to test elements.
656
+ * @return an object of class `WithFilter`, which supports
657
+ * `map`, `flatMap`, `foreach`, and `withFilter` operations.
658
+ * All these operations apply to those elements of this $coll which
659
+ * satisfy the predicate `p`.
660
+ */
661
+ def withFilter(p: A => Boolean): FilterMonadic[A, Repr] = new WithFilter(p)
662
+
663
+ /** A class supporting filtered operations. Instances of this class are
664
+ * returned by method `withFilter`.
665
+ */
666
+ class WithFilter(p: A => Boolean) extends FilterMonadic[A, Repr] {
667
+
668
+ /** Builds a new collection by applying a function to all elements of the
669
+ * outer $coll containing this `WithFilter` instance that satisfy predicate `p`.
670
+ *
671
+ * @param f the function to apply to each element.
672
+ * @tparam B the element type of the returned collection.
673
+ * @tparam That $thatinfo
674
+ * @param bf $bfinfo
675
+ * @return a new collection of type `That` resulting from applying
676
+ * the given function `f` to each element of the outer $coll
677
+ * that satisfies predicate `p` and collecting the results.
678
+ *
679
+ * @usecase def map[B](f: A => B): $Coll[B]
680
+ *
681
+ * @return a new $coll resulting from applying the given function
682
+ * `f` to each element of the outer $coll that satisfies
683
+ * predicate `p` and collecting the results.
684
+ */
685
+ def map[B, That](f: A => B)(implicit bf: CanBuildFrom[Repr, B, That]): That = {
686
+ val b = bf(repr)
687
+ for (x <- self)
688
+ if (p(x)) b += f(x)
689
+ b.result
690
+ }
691
+
692
+ /** Builds a new collection by applying a function to all elements of the
693
+ * outer $coll containing this `WithFilter` instance that satisfy
694
+ * predicate `p` and concatenating the results.
695
+ *
696
+ * @param f the function to apply to each element.
697
+ * @tparam B the element type of the returned collection.
698
+ * @tparam That $thatinfo
699
+ * @param bf $bfinfo
700
+ * @return a new collection of type `That` resulting from applying
701
+ * the given collection-valued function `f` to each element
702
+ * of the outer $coll that satisfies predicate `p` and
703
+ * concatenating the results.
704
+ *
705
+ * @usecase def flatMap[B](f: A => TraversableOnce[B]): $Coll[B]
706
+ *
707
+ * @return a new $coll resulting from applying the given collection-valued function
708
+ * `f` to each element of the outer $coll that satisfies predicate `p` and concatenating the results.
709
+ */
710
+ def flatMap[B, That](f: A => GenTraversableOnce[B])(implicit bf: CanBuildFrom[Repr, B, That]): That = {
711
+ val b = bf(repr)
712
+ for (x <- self)
713
+ if (p(x)) b ++= f(x).seq
714
+ b.result
715
+ }
716
+
717
+ /** Applies a function `f` to all elements of the outer $coll containing
718
+ * this `WithFilter` instance that satisfy predicate `p`.
719
+ *
720
+ * @param f the function that is applied for its side-effect to every element.
721
+ * The result of function `f` is discarded.
722
+ *
723
+ * @tparam U the type parameter describing the result of function `f`.
724
+ * This result will always be ignored. Typically `U` is `Unit`,
725
+ * but this is not necessary.
726
+ *
727
+ * @usecase def foreach(f: A => Unit): Unit
728
+ */
729
+ def foreach[U](f: A => U): Unit =
730
+ for (x <- self)
731
+ if (p(x)) f(x)
732
+
733
+ /** Further refines the filter for this $coll.
734
+ *
735
+ * @param q the predicate used to test elements.
736
+ * @return an object of class `WithFilter`, which supports
737
+ * `map`, `flatMap`, `foreach`, and `withFilter` operations.
738
+ * All these operations apply to those elements of this $coll which
739
+ * satisfy the predicate `q` in addition to the predicate `p`.
740
+ */
741
+ def withFilter(q: A => Boolean): WithFilter =
742
+ new WithFilter(x => p(x) && q(x))
743
+ }
744
+
745
+ // A helper for tails and inits.
746
+ private def iterateUntilEmpty(f: Traversable[A @uV] => Traversable[A @uV]): Iterator[Repr] = {
747
+ val it = Iterator.iterate(thisCollection)(f) takeWhile (x => !x.isEmpty)
748
+ it ++ Iterator(Nil) map (newBuilder ++= _ result)
749
+ }
750
+ }
751
+
752
+
753
+ </textarea>
754
+ </form>
755
+
756
+ <script>
757
+ var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
758
+ lineNumbers: true,
759
+ matchBrackets: true,
760
+ theme: "ambiance",
761
+ mode: "text/x-scala"
762
+ });
763
+ </script>
764
+ </body>
765
+ </html>