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,2 @@
1
+ /*1.5.4*/
2
+ (function(){var f=0,l=[],n={},j={},a={"<":"lt",">":"gt","&":"amp",'"':"quot","'":"#39"},m=/[<>&\"\']/g,b,c=window.setTimeout,d={},e;function h(){this.returnValue=false}function k(){this.cancelBubble=true}(function(o){var p=o.split(/,/),q,s,r;for(q=0;q<p.length;q+=2){r=p[q+1].split(/ /);for(s=0;s<r.length;s++){j[r[s]]=p[q]}}})("application/msword,doc dot,application/pdf,pdf,application/pgp-signature,pgp,application/postscript,ps ai eps,application/rtf,rtf,application/vnd.ms-excel,xls xlb,application/vnd.ms-powerpoint,ppt pps pot,application/zip,zip,application/x-shockwave-flash,swf swfl,application/vnd.openxmlformats-officedocument.wordprocessingml.document,docx,application/vnd.openxmlformats-officedocument.wordprocessingml.template,dotx,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,xlsx,application/vnd.openxmlformats-officedocument.presentationml.presentation,pptx,application/vnd.openxmlformats-officedocument.presentationml.template,potx,application/vnd.openxmlformats-officedocument.presentationml.slideshow,ppsx,application/x-javascript,js,application/json,json,audio/mpeg,mpga mpega mp2 mp3,audio/x-wav,wav,audio/mp4,m4a,image/bmp,bmp,image/gif,gif,image/jpeg,jpeg jpg jpe,image/photoshop,psd,image/png,png,image/svg+xml,svg svgz,image/tiff,tiff tif,text/plain,asc txt text diff log,text/html,htm html xhtml,text/css,css,text/csv,csv,text/rtf,rtf,video/mpeg,mpeg mpg mpe,video/quicktime,qt mov,video/mp4,mp4,video/x-m4v,m4v,video/x-flv,flv,video/x-ms-wmv,wmv,video/avi,avi,video/webm,webm,video/vnd.rn-realvideo,rv,application/vnd.oasis.opendocument.formula-template,otf,application/octet-stream,exe");var g={VERSION:"1.5.4",STOPPED:1,STARTED:2,QUEUED:1,UPLOADING:2,FAILED:4,DONE:5,GENERIC_ERROR:-100,HTTP_ERROR:-200,IO_ERROR:-300,SECURITY_ERROR:-400,INIT_ERROR:-500,FILE_SIZE_ERROR:-600,FILE_EXTENSION_ERROR:-601,IMAGE_FORMAT_ERROR:-700,IMAGE_MEMORY_ERROR:-701,IMAGE_DIMENSIONS_ERROR:-702,mimeTypes:j,ua:(function(){var s=navigator,r=s.userAgent,t=s.vendor,p,o,q;p=/WebKit/.test(r);q=p&&t.indexOf("Apple")!==-1;o=window.opera&&window.opera.buildNumber;return{windows:navigator.platform.indexOf("Win")!==-1,ie:!p&&!o&&(/MSIE/gi).test(r)&&(/Explorer/gi).test(s.appName),webkit:p,gecko:!p&&/Gecko/.test(r),safari:q,opera:!!o}}()),typeOf:function(p){return({}).toString.call(p).match(/\s([a-z|A-Z]+)/)[1].toLowerCase()},extend:function(o){g.each(arguments,function(p,q){if(q>0){g.each(p,function(s,r){o[r]=s})}});return o},cleanName:function(o){var p,q;q=[/[\300-\306]/g,"A",/[\340-\346]/g,"a",/\307/g,"C",/\347/g,"c",/[\310-\313]/g,"E",/[\350-\353]/g,"e",/[\314-\317]/g,"I",/[\354-\357]/g,"i",/\321/g,"N",/\361/g,"n",/[\322-\330]/g,"O",/[\362-\370]/g,"o",/[\331-\334]/g,"U",/[\371-\374]/g,"u"];for(p=0;p<q.length;p+=2){o=o.replace(q[p],q[p+1])}o=o.replace(/\s+/g,"_");o=o.replace(/[^a-z0-9_\-\.]+/gi,"");return o},addRuntime:function(o,p){p.name=o;l[o]=p;l.push(p);return p},guid:function(){var o=new Date().getTime().toString(32),p;for(p=0;p<5;p++){o+=Math.floor(Math.random()*65535).toString(32)}return(g.guidPrefix||"p")+o+(f++).toString(32)},buildUrl:function(p,o){var q="";g.each(o,function(s,r){q+=(q?"&":"")+encodeURIComponent(r)+"="+encodeURIComponent(s)});if(q){p+=(p.indexOf("?")>0?"&":"?")+q}return p},each:function(r,s){var q,p,o;if(r){q=r.length;if(q===b){for(p in r){if(r.hasOwnProperty(p)){if(s(r[p],p)===false){return}}}}else{for(o=0;o<q;o++){if(s(r[o],o)===false){return}}}}},formatSize:function(o){if(o===b||/\D/.test(o)){return g.translate("N/A")}if(o>1073741824){return Math.round(o/1073741824,1)+" GB"}if(o>1048576){return Math.round(o/1048576,1)+" MB"}if(o>1024){return Math.round(o/1024,1)+" KB"}return o+" b"},getPos:function(p,t){var u=0,s=0,w,v=document,q,r;p=p;t=t||v.body;function o(C){var A,B,z=0,D=0;if(C){B=C.getBoundingClientRect();A=v.compatMode==="CSS1Compat"?v.documentElement:v.body;z=B.left+A.scrollLeft;D=B.top+A.scrollTop}return{x:z,y:D}}if(p&&p.getBoundingClientRect&&((navigator.userAgent.indexOf("MSIE")>0)&&(v.documentMode<8))){q=o(p);r=o(t);return{x:q.x-r.x,y:q.y-r.y}}w=p;while(w&&w!=t&&w.nodeType){u+=w.offsetLeft||0;s+=w.offsetTop||0;w=w.offsetParent}w=p.parentNode;while(w&&w!=t&&w.nodeType){u-=w.scrollLeft||0;s-=w.scrollTop||0;w=w.parentNode}return{x:u,y:s}},getSize:function(o){return{w:o.offsetWidth||o.clientWidth,h:o.offsetHeight||o.clientHeight}},parseSize:function(o){var p;if(typeof(o)=="string"){o=/^([0-9]+)([mgk]?)$/.exec(o.toLowerCase().replace(/[^0-9mkg]/g,""));p=o[2];o=+o[1];if(p=="g"){o*=1073741824}if(p=="m"){o*=1048576}if(p=="k"){o*=1024}}return o},xmlEncode:function(o){return o?(""+o).replace(m,function(p){return a[p]?"&"+a[p]+";":p}):o},toArray:function(q){var p,o=[];for(p=0;p<q.length;p++){o[p]=q[p]}return o},inArray:function(q,r){if(r){if(Array.prototype.indexOf){return Array.prototype.indexOf.call(r,q)}for(var o=0,p=r.length;o<p;o++){if(r[o]===q){return o}}}return -1},addI18n:function(o){return g.extend(n,o)},translate:function(o){return n[o]||o},isEmptyObj:function(o){if(o===b){return true}for(var p in o){return false}return true},hasClass:function(q,p){var o;if(q.className==""){return false}o=new RegExp("(^|\\s+)"+p+"(\\s+|$)");return o.test(q.className)},addClass:function(p,o){if(!g.hasClass(p,o)){p.className=p.className==""?o:p.className.replace(/\s+$/,"")+" "+o}},removeClass:function(q,p){var o=new RegExp("(^|\\s+)"+p+"(\\s+|$)");q.className=q.className.replace(o,function(s,r,t){return r===" "&&t===" "?" ":""})},getStyle:function(p,o){if(p.currentStyle){return p.currentStyle[o]}else{if(window.getComputedStyle){return window.getComputedStyle(p,null)[o]}}},addEvent:function(t,o,u){var s,r,q,p;p=arguments[3];o=o.toLowerCase();if(e===b){e="Plupload_"+g.guid()}if(t.addEventListener){s=u;t.addEventListener(o,s,false)}else{if(t.attachEvent){s=function(){var v=window.event;if(!v.target){v.target=v.srcElement}v.preventDefault=h;v.stopPropagation=k;u(v)};t.attachEvent("on"+o,s)}}if(t[e]===b){t[e]=g.guid()}if(!d.hasOwnProperty(t[e])){d[t[e]]={}}r=d[t[e]];if(!r.hasOwnProperty(o)){r[o]=[]}r[o].push({func:s,orig:u,key:p})},removeEvent:function(t,o){var r,u,q;if(typeof(arguments[2])=="function"){u=arguments[2]}else{q=arguments[2]}o=o.toLowerCase();if(t[e]&&d[t[e]]&&d[t[e]][o]){r=d[t[e]][o]}else{return}for(var p=r.length-1;p>=0;p--){if(r[p].key===q||r[p].orig===u){if(t.removeEventListener){t.removeEventListener(o,r[p].func,false)}else{if(t.detachEvent){t.detachEvent("on"+o,r[p].func)}}r[p].orig=null;r[p].func=null;r.splice(p,1);if(u!==b){break}}}if(!r.length){delete d[t[e]][o]}if(g.isEmptyObj(d[t[e]])){delete d[t[e]];try{delete t[e]}catch(s){t[e]=b}}},removeAllEvents:function(p){var o=arguments[1];if(p[e]===b||!p[e]){return}g.each(d[p[e]],function(r,q){g.removeEvent(p,q,o)})}};g.Uploader=function(s){var p={},v,u=[],r,q=false;v=new g.QueueProgress();s=g.extend({chunk_size:0,multipart:true,multi_selection:true,file_data_name:"file",filters:[]},s);function t(){var x,y=0,w;if(this.state==g.STARTED){for(w=0;w<u.length;w++){if(!x&&u[w].status==g.QUEUED){x=u[w];x.status=g.UPLOADING;if(this.trigger("BeforeUpload",x)){this.trigger("UploadFile",x)}}else{y++}}if(y==u.length){this.stop();this.trigger("UploadComplete",u)}}}function o(){var x,w;v.reset();for(x=0;x<u.length;x++){w=u[x];if(w.size!==b){v.size+=w.size;v.loaded+=w.loaded}else{v.size=b}if(w.status==g.DONE){v.uploaded++}else{if(w.status==g.FAILED){v.failed++}else{v.queued++}}}if(v.size===b){v.percent=u.length>0?Math.ceil(v.uploaded/u.length*100):0}else{v.bytesPerSec=Math.ceil(v.loaded/((+new Date()-r||1)/1000));v.percent=v.size>0?Math.ceil(v.loaded/v.size*100):0}}g.extend(this,{state:g.STOPPED,runtime:"",features:{},files:u,settings:s,total:v,id:g.guid(),init:function(){var B=this,C,y,x,A=0,z;if(typeof(s.preinit)=="function"){s.preinit(B)}else{g.each(s.preinit,function(E,D){B.bind(D,E)})}s.page_url=s.page_url||document.location.pathname.replace(/\/[^\/]+$/g,"/");if(!/^(\w+:\/\/|\/)/.test(s.url)){s.url=s.page_url+s.url}s.chunk_size=g.parseSize(s.chunk_size);s.max_file_size=g.parseSize(s.max_file_size);B.bind("FilesAdded",function(D,G){var F,E,I=0,J,H=s.filters;if(H&&H.length){J=[];g.each(H,function(K){g.each(K.extensions.split(/,/),function(L){if(/^\s*\*\s*$/.test(L)){J.push("\\.*")}else{J.push("\\."+L.replace(new RegExp("["+("/^$.*+?|()[]{}\\".replace(/./g,"\\$&"))+"]","g"),"\\$&"))}})});J=new RegExp(J.join("|")+"$","i")}for(F=0;F<G.length;F++){E=G[F];E.loaded=0;E.percent=0;E.status=g.QUEUED;if(J&&!J.test(E.name)){D.trigger("Error",{code:g.FILE_EXTENSION_ERROR,message:g.translate("File extension error."),file:E});continue}if(E.size!==b&&E.size>s.max_file_size){D.trigger("Error",{code:g.FILE_SIZE_ERROR,message:g.translate("File size error."),file:E});continue}u.push(E);I++}if(I){c(function(){B.trigger("QueueChanged");B.refresh()},1)}else{return false}});if(s.unique_names){B.bind("UploadFile",function(D,E){var G=E.name.match(/\.([^.]+)$/),F="tmp";if(G){F=G[1]}E.target_name=E.id+"."+F})}B.bind("UploadProgress",function(D,E){E.percent=E.size>0?Math.ceil(E.loaded/E.size*100):100;o()});B.bind("StateChanged",function(D){if(D.state==g.STARTED){r=(+new Date())}else{if(D.state==g.STOPPED){for(C=D.files.length-1;C>=0;C--){if(D.files[C].status==g.UPLOADING){D.files[C].status=g.QUEUED;o()}}}}});B.bind("QueueChanged",o);B.bind("Error",function(D,E){if(E.file){E.file.status=g.FAILED;o();if(D.state==g.STARTED){c(function(){t.call(B)},1)}}});B.bind("FileUploaded",function(D,E){E.status=g.DONE;E.loaded=E.size;D.trigger("UploadProgress",E);c(function(){t.call(B)},1)});if(s.runtimes){y=[];z=s.runtimes.split(/\s?,\s?/);for(C=0;C<z.length;C++){if(l[z[C]]){y.push(l[z[C]])}}}else{y=l}function w(){var G=y[A++],F,D,E;if(G){F=G.getFeatures();D=B.settings.required_features;if(D){D=D.split(",");for(E=0;E<D.length;E++){if(!F[D[E]]){w();return}}}G.init(B,function(H){if(H&&H.success){B.features=F;B.runtime=G.name;B.trigger("Init",{runtime:G.name});B.trigger("PostInit");B.refresh()}else{w()}})}else{B.trigger("Error",{code:g.INIT_ERROR,message:g.translate("Init error.")})}}w();if(typeof(s.init)=="function"){s.init(B)}else{g.each(s.init,function(E,D){B.bind(D,E)})}},refresh:function(){this.trigger("Refresh")},start:function(){if(u.length&&this.state!=g.STARTED){this.state=g.STARTED;this.trigger("StateChanged");t.call(this)}},stop:function(){if(this.state!=g.STOPPED){this.state=g.STOPPED;this.trigger("CancelUpload");this.trigger("StateChanged")}},disableBrowse:function(){q=arguments[0]!==b?arguments[0]:true;this.trigger("DisableBrowse",q)},getFile:function(x){var w;for(w=u.length-1;w>=0;w--){if(u[w].id===x){return u[w]}}},removeFile:function(x){var w;for(w=u.length-1;w>=0;w--){if(u[w].id===x.id){return this.splice(w,1)[0]}}},splice:function(y,w){var x;x=u.splice(y===b?0:y,w===b?u.length:w);this.trigger("FilesRemoved",x);this.trigger("QueueChanged");return x},trigger:function(x){var z=p[x.toLowerCase()],y,w;if(z){w=Array.prototype.slice.call(arguments);w[0]=this;for(y=0;y<z.length;y++){if(z[y].func.apply(z[y].scope,w)===false){return false}}}return true},hasEventListener:function(w){return !!p[w.toLowerCase()]},bind:function(w,y,x){var z;w=w.toLowerCase();z=p[w]||[];z.push({func:y,scope:x||this});p[w]=z},unbind:function(w){w=w.toLowerCase();var z=p[w],x,y=arguments[1];if(z){if(y!==b){for(x=z.length-1;x>=0;x--){if(z[x].func===y){z.splice(x,1);break}}}else{z=[]}if(!z.length){delete p[w]}}},unbindAll:function(){var w=this;g.each(p,function(y,x){w.unbind(x)})},destroy:function(){this.stop();this.trigger("Destroy");this.unbindAll()}})};g.File=function(r,p,q){var o=this;o.id=r;o.name=p;o.size=q;o.loaded=0;o.percent=0;o.status=0};g.Runtime=function(){this.getFeatures=function(){};this.init=function(o,p){}};g.QueueProgress=function(){var o=this;o.size=0;o.loaded=0;o.uploaded=0;o.failed=0;o.queued=0;o.percent=0;o.bytesPerSec=0;o.reset=function(){o.size=o.loaded=o.uploaded=o.failed=o.queued=o.percent=o.bytesPerSec=0}};g.runtimes={};window.plupload=g})();(function(){if(window.google&&google.gears){return}var a=null;if(typeof GearsFactory!="undefined"){a=new GearsFactory()}else{try{a=new ActiveXObject("Gears.Factory");if(a.getBuildInfo().indexOf("ie_mobile")!=-1){a.privateSetGlobalObject(this)}}catch(b){if((typeof navigator.mimeTypes!="undefined")&&navigator.mimeTypes["application/x-googlegears"]){a=document.createElement("object");a.style.display="none";a.width=0;a.height=0;a.type="application/x-googlegears";document.documentElement.appendChild(a)}}}if(!a){return}if(!window.google){window.google={}}if(!google.gears){google.gears={factory:a}}})();(function(e,b,c,d){var f={};function a(h,k,m){var g,j,l,o;j=google.gears.factory.create("beta.canvas");try{j.decode(h);if(!k.width){k.width=j.width}if(!k.height){k.height=j.height}o=Math.min(width/j.width,height/j.height);if(o<1||(o===1&&m==="image/jpeg")){j.resize(Math.round(j.width*o),Math.round(j.height*o));if(k.quality){return j.encode(m,{quality:k.quality/100})}return j.encode(m)}}catch(n){}return h}c.runtimes.Gears=c.addRuntime("gears",{getFeatures:function(){return{dragdrop:true,jpgresize:true,pngresize:true,chunks:true,progress:true,multipart:true,multi_selection:true}},init:function(l,n){var m,h,g=false;if(!e.google||!google.gears){return n({success:false})}try{m=google.gears.factory.create("beta.desktop")}catch(k){return n({success:false})}function j(q){var p,o,r=[],s;for(o=0;o<q.length;o++){p=q[o];s=c.guid();f[s]=p.blob;r.push(new c.File(s,p.name,p.blob.length))}l.trigger("FilesAdded",r)}l.bind("PostInit",function(){var p=l.settings,o=b.getElementById(p.drop_element);if(o){c.addEvent(o,"dragover",function(q){m.setDropEffect(q,"copy");q.preventDefault()},l.id);c.addEvent(o,"drop",function(r){var q=m.getDragData(r,"application/x-gears-files");if(q){j(q.files)}r.preventDefault()},l.id);o=0}c.addEvent(b.getElementById(p.browse_button),"click",function(u){var t=[],r,q,s;u.preventDefault();if(g){return}no_type_restriction:for(r=0;r<p.filters.length;r++){s=p.filters[r].extensions.split(",");for(q=0;q<s.length;q++){if(s[q]==="*"){t=[];break no_type_restriction}t.push("."+s[q])}}m.openFiles(j,{singleFile:!p.multi_selection,filter:t})},l.id)});l.bind("CancelUpload",function(){if(h.abort){h.abort()}});l.bind("UploadFile",function(u,r){var w=0,v,s,t=0,q=u.settings.resize,o;if(q&&/\.(png|jpg|jpeg)$/i.test(r.name)){f[r.id]=a(f[r.id],q,/\.png$/i.test(r.name)?"image/png":"image/jpeg")}r.size=f[r.id].length;s=u.settings.chunk_size;o=s>0;v=Math.ceil(r.size/s);if(!o){s=r.size;v=1}function p(){var C,y=u.settings.multipart,x=0,B={name:r.target_name||r.name},z=u.settings.url;function A(E){var D,J="----pluploadboundary"+c.guid(),G="--",I="\r\n",F,H;if(y){h.setRequestHeader("Content-Type","multipart/form-data; boundary="+J);D=google.gears.factory.create("beta.blobbuilder");c.each(c.extend(B,u.settings.multipart_params),function(L,K){D.append(G+J+I+'Content-Disposition: form-data; name="'+K+'"'+I+I);D.append(L+I)});H=c.mimeTypes[r.name.replace(/^.+\.([^.]+)/,"$1").toLowerCase()]||"application/octet-stream";D.append(G+J+I+'Content-Disposition: form-data; name="'+u.settings.file_data_name+'"; filename="'+r.name+'"'+I+"Content-Type: "+H+I+I);D.append(E);D.append(I+G+J+G+I);F=D.getAsBlob();x=F.length-E.length;E=F}h.send(E)}if(r.status==c.DONE||r.status==c.FAILED||u.state==c.STOPPED){return}if(o){B.chunk=w;B.chunks=v}C=Math.min(s,r.size-(w*s));if(!y){z=c.buildUrl(u.settings.url,B)}h=google.gears.factory.create("beta.httprequest");h.open("POST",z);if(!y){h.setRequestHeader("Content-Disposition",'attachment; filename="'+r.name+'"');h.setRequestHeader("Content-Type","application/octet-stream")}c.each(u.settings.headers,function(E,D){h.setRequestHeader(D,E)});h.upload.onprogress=function(D){r.loaded=t+D.loaded-x;u.trigger("UploadProgress",r)};h.onreadystatechange=function(){var D;if(h.readyState==4&&u.state!==c.STOPPED){if(h.status==200){D={chunk:w,chunks:v,response:h.responseText,status:h.status};u.trigger("ChunkUploaded",r,D);if(D.cancelled){r.status=c.FAILED;return}t+=C;if(++w>=v){r.status=c.DONE;u.trigger("FileUploaded",r,{response:h.responseText,status:h.status})}else{p()}}else{u.trigger("Error",{code:c.HTTP_ERROR,message:c.translate("HTTP Error."),file:r,chunk:w,chunks:v,status:h.status})}}};if(w<v){A(f[r.id].slice(w*s,C))}}p()});l.bind("DisableBrowse",function(o,p){g=p});l.bind("Destroy",function(o){var p,q,r={browseButton:o.settings.browse_button,dropElm:o.settings.drop_element};for(p in r){q=b.getElementById(r[p]);if(q){c.removeAllEvents(q,o.id)}}});n({success:true})}})})(window,document,plupload);(function(g,b,d,e){var a={},h={};function c(o){var n,m=typeof o,j,l,k;if(o===e||o===null){return"null"}if(m==="string"){n="\bb\tt\nn\ff\rr\"\"''\\\\";return'"'+o.replace(/([\u0080-\uFFFF\x00-\x1f\"])/g,function(r,q){var p=n.indexOf(q);if(p+1){return"\\"+n.charAt(p+1)}r=q.charCodeAt().toString(16);return"\\u"+"0000".substring(r.length)+r})+'"'}if(m=="object"){j=o.length!==e;n="";if(j){for(l=0;l<o.length;l++){if(n){n+=","}n+=c(o[l])}n="["+n+"]"}else{for(k in o){if(o.hasOwnProperty(k)){if(n){n+=","}n+=c(k)+":"+c(o[k])}}n="{"+n+"}"}return n}return""+o}function f(s){var v=false,j=null,o=null,k,l,m,u,n,q=0;try{try{o=new ActiveXObject("AgControl.AgControl");if(o.IsVersionSupported(s)){v=true}o=null}catch(r){var p=navigator.plugins["Silverlight Plug-In"];if(p){k=p.description;if(k==="1.0.30226.2"){k="2.0.30226.2"}l=k.split(".");while(l.length>3){l.pop()}while(l.length<4){l.push(0)}m=s.split(".");while(m.length>4){m.pop()}do{u=parseInt(m[q],10);n=parseInt(l[q],10);q++}while(q<m.length&&u===n);if(u<=n&&!isNaN(u)){v=true}}}}catch(t){v=false}return v}d.silverlight={trigger:function(n,k){var m=a[n],l,j;if(m){j=d.toArray(arguments).slice(1);j[0]="Silverlight:"+k;setTimeout(function(){m.trigger.apply(m,j)},0)}}};d.runtimes.Silverlight=d.addRuntime("silverlight",{getFeatures:function(){return{jpgresize:true,pngresize:true,chunks:true,progress:true,multipart:true,multi_selection:true}},init:function(p,q){var o,m="",n=p.settings.filters,l,k=b.body;if(!f("2.0.31005.0")||(g.opera&&g.opera.buildNumber)){q({success:false});return}h[p.id]=false;a[p.id]=p;o=b.createElement("div");o.id=p.id+"_silverlight_container";d.extend(o.style,{position:"absolute",top:"0px",background:p.settings.shim_bgcolor||"transparent",zIndex:99999,width:"100px",height:"100px",overflow:"hidden",opacity:p.settings.shim_bgcolor||b.documentMode>8?"":0.01});o.className="plupload silverlight";if(p.settings.container){k=b.getElementById(p.settings.container);if(d.getStyle(k,"position")==="static"){k.style.position="relative"}}k.appendChild(o);for(l=0;l<n.length;l++){m+=(m!=""?"|":"")+n[l].title+" | *."+n[l].extensions.replace(/,/g,";*.")}o.innerHTML='<object id="'+p.id+'_silverlight" data="data:application/x-silverlight," type="application/x-silverlight-2" style="outline:none;" width="1024" height="1024"><param name="source" value="'+p.settings.silverlight_xap_url+'"/><param name="background" value="Transparent"/><param name="windowless" value="true"/><param name="enablehtmlaccess" value="true"/><param name="initParams" value="id='+p.id+",filter="+m+",multiselect="+p.settings.multi_selection+'"/></object>';function j(){return b.getElementById(p.id+"_silverlight").content.Upload}p.bind("Silverlight:Init",function(){var r,s={};if(h[p.id]){return}h[p.id]=true;p.bind("Silverlight:StartSelectFiles",function(t){r=[]});p.bind("Silverlight:SelectFile",function(t,w,u,v){var x;x=d.guid();s[x]=w;s[w]=x;r.push(new d.File(x,u,v))});p.bind("Silverlight:SelectSuccessful",function(){if(r.length){p.trigger("FilesAdded",r)}});p.bind("Silverlight:UploadChunkError",function(t,w,u,x,v){p.trigger("Error",{code:d.IO_ERROR,message:"IO Error.",details:v,file:t.getFile(s[w])})});p.bind("Silverlight:UploadFileProgress",function(t,x,u,w){var v=t.getFile(s[x]);if(v.status!=d.FAILED){v.size=w;v.loaded=u;t.trigger("UploadProgress",v)}});p.bind("Refresh",function(t){var u,v,w;u=b.getElementById(t.settings.browse_button);if(u){v=d.getPos(u,b.getElementById(t.settings.container));w=d.getSize(u);d.extend(b.getElementById(t.id+"_silverlight_container").style,{top:v.y+"px",left:v.x+"px",width:w.w+"px",height:w.h+"px"})}});p.bind("Silverlight:UploadChunkSuccessful",function(t,w,u,z,y){var x,v=t.getFile(s[w]);x={chunk:u,chunks:z,response:y};t.trigger("ChunkUploaded",v,x);if(v.status!=d.FAILED&&t.state!==d.STOPPED){j().UploadNextChunk()}if(u==z-1){v.status=d.DONE;t.trigger("FileUploaded",v,{response:y})}});p.bind("Silverlight:UploadSuccessful",function(t,w,u){var v=t.getFile(s[w]);v.status=d.DONE;t.trigger("FileUploaded",v,{response:u})});p.bind("FilesRemoved",function(t,v){var u;for(u=0;u<v.length;u++){j().RemoveFile(s[v[u].id])}});p.bind("UploadFile",function(t,v){var w=t.settings,u=w.resize||{};j().UploadFile(s[v.id],t.settings.url,c({name:v.target_name||v.name,mime:d.mimeTypes[v.name.replace(/^.+\.([^.]+)/,"$1").toLowerCase()]||"application/octet-stream",chunk_size:w.chunk_size,image_width:u.width,image_height:u.height,image_quality:u.quality||90,multipart:!!w.multipart,multipart_params:w.multipart_params||{},file_data_name:w.file_data_name,headers:w.headers}))});p.bind("CancelUpload",function(){j().CancelUpload()});p.bind("Silverlight:MouseEnter",function(t){var u,v;u=b.getElementById(p.settings.browse_button);v=t.settings.browse_button_hover;if(u&&v){d.addClass(u,v)}});p.bind("Silverlight:MouseLeave",function(t){var u,v;u=b.getElementById(p.settings.browse_button);v=t.settings.browse_button_hover;if(u&&v){d.removeClass(u,v)}});p.bind("Silverlight:MouseLeftButtonDown",function(t){var u,v;u=b.getElementById(p.settings.browse_button);v=t.settings.browse_button_active;if(u&&v){d.addClass(u,v);d.addEvent(b.body,"mouseup",function(){d.removeClass(u,v)})}});p.bind("Sliverlight:StartSelectFiles",function(t){var u,v;u=b.getElementById(p.settings.browse_button);v=t.settings.browse_button_active;if(u&&v){d.removeClass(u,v)}});p.bind("DisableBrowse",function(t,u){j().DisableBrowse(u)});p.bind("Destroy",function(t){var u;d.removeAllEvents(b.body,t.id);delete h[t.id];delete a[t.id];u=b.getElementById(t.id+"_silverlight_container");if(u){k.removeChild(u)}});q({success:true})})}})})(window,document,plupload);(function(f,b,d,e){var a={},g={};function c(){var h;try{h=navigator.plugins["Shockwave Flash"];h=h.description}catch(k){try{h=new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version")}catch(j){h="0.0"}}h=h.match(/\d+/g);return parseFloat(h[0]+"."+h[1])}d.flash={trigger:function(k,h,j){setTimeout(function(){var n=a[k],m,l;if(n){n.trigger("Flash:"+h,j)}},0)}};d.runtimes.Flash=d.addRuntime("flash",{getFeatures:function(){return{jpgresize:true,pngresize:true,maxWidth:8091,maxHeight:8091,chunks:true,progress:true,multipart:true,multi_selection:true}},init:function(n,p){var l,m,h=0,j=b.body;if(c()<10){p({success:false});return}g[n.id]=false;a[n.id]=n;l=b.getElementById(n.settings.browse_button);m=b.createElement("div");m.id=n.id+"_flash_container";d.extend(m.style,{position:"absolute",top:"0px",background:n.settings.shim_bgcolor||"transparent",zIndex:99999,width:"100%",height:"100%"});m.className="plupload flash";if(n.settings.container){j=b.getElementById(n.settings.container);if(d.getStyle(j,"position")==="static"){j.style.position="relative"}}j.appendChild(m);(function(){var q,r;q='<object id="'+n.id+'_flash" type="application/x-shockwave-flash" data="'+n.settings.flash_swf_url+'" ';if(d.ua.ie){q+='classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" '}q+='width="100%" height="100%" style="outline:0"><param name="movie" value="'+n.settings.flash_swf_url+'" /><param name="flashvars" value="id='+escape(n.id)+'" /><param name="wmode" value="transparent" /><param name="allowscriptaccess" value="always" /></object>';if(d.ua.ie){r=b.createElement("div");m.appendChild(r);r.outerHTML=q;r=null}else{m.innerHTML=q}}());function o(){return b.getElementById(n.id+"_flash")}function k(){if(h++>5000){p({success:false});return}if(g[n.id]===false){setTimeout(k,1)}}k();l=m=null;n.bind("Destroy",function(q){var r;d.removeAllEvents(b.body,q.id);delete g[q.id];delete a[q.id];r=b.getElementById(q.id+"_flash_container");if(r){j.removeChild(r)}});n.bind("Flash:Init",function(){var s={},r;try{o().setFileFilters(n.settings.filters,n.settings.multi_selection)}catch(q){p({success:false});return}if(g[n.id]){return}g[n.id]=true;n.bind("UploadFile",function(t,v){var w=t.settings,u=n.settings.resize||{};o().uploadFile(s[v.id],w.url,{name:v.target_name||v.name,mime:d.mimeTypes[v.name.replace(/^.+\.([^.]+)/,"$1").toLowerCase()]||"application/octet-stream",chunk_size:w.chunk_size,width:u.width,height:u.height,quality:u.quality,multipart:w.multipart,multipart_params:w.multipart_params||{},file_data_name:w.file_data_name,format:/\.(jpg|jpeg)$/i.test(v.name)?"jpg":"png",headers:w.headers,urlstream_upload:w.urlstream_upload})});n.bind("CancelUpload",function(){o().cancelUpload()});n.bind("Flash:UploadProcess",function(u,t){var v=u.getFile(s[t.id]);if(v.status!=d.FAILED){v.loaded=t.loaded;v.size=t.size;u.trigger("UploadProgress",v)}});n.bind("Flash:UploadChunkComplete",function(t,v){var w,u=t.getFile(s[v.id]);w={chunk:v.chunk,chunks:v.chunks,response:v.text};t.trigger("ChunkUploaded",u,w);if(u.status!==d.FAILED&&t.state!==d.STOPPED){o().uploadNextChunk()}if(v.chunk==v.chunks-1){u.status=d.DONE;t.trigger("FileUploaded",u,{response:v.text})}});n.bind("Flash:SelectFiles",function(t,w){var v,u,x=[],y;for(u=0;u<w.length;u++){v=w[u];y=d.guid();s[y]=v.id;s[v.id]=y;x.push(new d.File(y,v.name,v.size))}if(x.length){n.trigger("FilesAdded",x)}});n.bind("Flash:SecurityError",function(t,u){n.trigger("Error",{code:d.SECURITY_ERROR,message:d.translate("Security error."),details:u.message,file:n.getFile(s[u.id])})});n.bind("Flash:GenericError",function(t,u){n.trigger("Error",{code:d.GENERIC_ERROR,message:d.translate("Generic error."),details:u.message,file:n.getFile(s[u.id])})});n.bind("Flash:IOError",function(t,u){n.trigger("Error",{code:d.IO_ERROR,message:d.translate("IO error."),details:u.message,file:n.getFile(s[u.id])})});n.bind("Flash:ImageError",function(t,u){n.trigger("Error",{code:parseInt(u.code,10),message:d.translate("Image error."),file:n.getFile(s[u.id])})});n.bind("Flash:StageEvent:rollOver",function(t){var u,v;u=b.getElementById(n.settings.browse_button);v=t.settings.browse_button_hover;if(u&&v){d.addClass(u,v)}});n.bind("Flash:StageEvent:rollOut",function(t){var u,v;u=b.getElementById(n.settings.browse_button);v=t.settings.browse_button_hover;if(u&&v){d.removeClass(u,v)}});n.bind("Flash:StageEvent:mouseDown",function(t){var u,v;u=b.getElementById(n.settings.browse_button);v=t.settings.browse_button_active;if(u&&v){d.addClass(u,v);d.addEvent(b.body,"mouseup",function(){d.removeClass(u,v)},t.id)}});n.bind("Flash:StageEvent:mouseUp",function(t){var u,v;u=b.getElementById(n.settings.browse_button);v=t.settings.browse_button_active;if(u&&v){d.removeClass(u,v)}});n.bind("Flash:ExifData",function(t,u){n.trigger("ExifData",n.getFile(s[u.id]),u.data)});n.bind("Flash:GpsData",function(t,u){n.trigger("GpsData",n.getFile(s[u.id]),u.data)});n.bind("QueueChanged",function(t){n.refresh()});n.bind("FilesRemoved",function(t,v){var u;for(u=0;u<v.length;u++){o().removeFile(s[v[u].id])}});n.bind("StateChanged",function(t){n.refresh()});n.bind("Refresh",function(t){var u,v,w;o().setFileFilters(n.settings.filters,n.settings.multi_selection);u=b.getElementById(t.settings.browse_button);if(u){v=d.getPos(u,b.getElementById(t.settings.container));w=d.getSize(u);d.extend(b.getElementById(t.id+"_flash_container").style,{top:v.y+"px",left:v.x+"px",width:w.w+"px",height:w.h+"px"})}});n.bind("DisableBrowse",function(t,u){o().disableBrowse(u)});p({success:true})})}})})(window,document,plupload);(function(a){a.runtimes.BrowserPlus=a.addRuntime("browserplus",{getFeatures:function(){return{dragdrop:true,jpgresize:true,pngresize:true,chunks:true,progress:true,multipart:true,multi_selection:true}},init:function(g,j){var e=window.BrowserPlus,h={},d=g.settings,c=d.resize;function f(o){var n,m,k=[],l,p;for(m=0;m<o.length;m++){l=o[m];p=a.guid();h[p]=l;k.push(new a.File(p,l.name,l.size))}if(m){g.trigger("FilesAdded",k)}}function b(){var k=false;g.bind("PostInit",function(){var o,m=d.drop_element,q=g.id+"_droptarget",l=document.getElementById(m),n;function r(t,s){e.DragAndDrop.AddDropTarget({id:t},function(u){e.DragAndDrop.AttachCallbacks({id:t,hover:function(v){if(!v&&s){s()}},drop:function(v){if(s){s()}f(v)}},function(){})})}function p(){document.getElementById(q).style.top="-1000px"}if(l){if(document.attachEvent&&(/MSIE/gi).test(navigator.userAgent)){o=document.createElement("div");o.setAttribute("id",q);a.extend(o.style,{position:"absolute",top:"-1000px",background:"red",filter:"alpha(opacity=0)",opacity:0});document.body.appendChild(o);a.addEvent(l,"dragenter",function(t){var s,u;s=document.getElementById(m);u=a.getPos(s);a.extend(document.getElementById(q).style,{top:u.y+"px",left:u.x+"px",width:s.offsetWidth+"px",height:s.offsetHeight+"px"})});r(q,p)}else{r(m)}}a.addEvent(document.getElementById(d.browse_button),"click",function(y){var s=[],u,t,x=d.filters,w,v;y.preventDefault();if(k){return}no_type_restriction:for(u=0;u<x.length;u++){w=x[u].extensions.split(",");for(t=0;t<w.length;t++){if(w[t]==="*"){s=[];break no_type_restriction}v=a.mimeTypes[w[t]];if(v&&a.inArray(v,s)===-1){s.push(a.mimeTypes[w[t]])}}}e.FileBrowse.OpenBrowseDialog({mimeTypes:s},function(z){if(z.success){f(z.value)}})});l=o=null});g.bind("CancelUpload",function(){e.Uploader.cancel({},function(){})});g.bind("DisableBrowse",function(l,m){k=m});g.bind("UploadFile",function(o,l){var n=h[l.id],t={},m=o.settings.chunk_size,p,q=[];function s(u,w){var v;if(l.status==a.FAILED){return}t.name=l.target_name||l.name;if(m){t.chunk=""+u;t.chunks=""+w}v=q.shift();e.Uploader.upload({url:o.settings.url,files:{file:v},cookies:document.cookies,postvars:a.extend(t,o.settings.multipart_params),progressCallback:function(z){var y,x=0;p[u]=parseInt(z.filePercent*v.size/100,10);for(y=0;y<p.length;y++){x+=p[y]}l.loaded=x;o.trigger("UploadProgress",l)}},function(y){var x,z;if(y.success){x=y.value.statusCode;if(m){o.trigger("ChunkUploaded",l,{chunk:u,chunks:w,response:y.value.body,status:x})}if(q.length>0){s(++u,w)}else{l.status=a.DONE;o.trigger("FileUploaded",l,{response:y.value.body,status:x});if(x>=400){o.trigger("Error",{code:a.HTTP_ERROR,message:a.translate("HTTP Error."),file:l,status:x})}}}else{o.trigger("Error",{code:a.GENERIC_ERROR,message:a.translate("Generic Error."),file:l,details:y.error})}})}function r(u){l.size=u.size;if(m){e.FileAccess.chunk({file:u,chunkSize:m},function(x){if(x.success){var y=x.value,v=y.length;p=Array(v);for(var w=0;w<v;w++){p[w]=0;q.push(y[w])}s(0,v)}})}else{p=Array(1);q.push(u);s(0,1)}}if(c&&/\.(png|jpg|jpeg)$/i.test(l.name)){BrowserPlus.ImageAlter.transform({file:n,quality:c.quality||90,actions:[{scale:{maxwidth:c.width,maxheight:c.height}}]},function(u){if(u.success){r(u.value.file)}})}else{r(n)}});j({success:true})}if(e){e.init(function(l){var k=[{service:"Uploader",version:"3"},{service:"DragAndDrop",version:"1"},{service:"FileBrowse",version:"1"},{service:"FileAccess",version:"2"}];if(c){k.push({service:"ImageAlter",version:"4"})}if(l.success){e.require({services:k},function(m){if(m.success){b()}else{j()}})}else{j()}})}else{j()}}})})(plupload);(function(h,k,j,e){var c={},g;function m(o,p){var n;if("FileReader" in h){n=new FileReader();n.readAsDataURL(o);n.onload=function(){p(n.result)}}else{return p(o.getAsDataURL())}}function l(o,p){var n;if("FileReader" in h){n=new FileReader();n.readAsBinaryString(o);n.onload=function(){p(n.result)}}else{return p(o.getAsBinary())}}function d(r,p,n,v){var q,o,u,s,t=this;m(c[r.id],function(w){q=k.createElement("canvas");q.style.display="none";k.body.appendChild(q);o=q.getContext("2d");u=new Image();u.onerror=u.onabort=function(){v({success:false})};u.onload=function(){var B,x,z,y,A;if(!p.width){p.width=u.width}if(!p.height){p.height=u.height}s=Math.min(p.width/u.width,p.height/u.height);if(s<1||(s===1&&n==="image/jpeg")){B=Math.round(u.width*s);x=Math.round(u.height*s);q.width=B;q.height=x;o.drawImage(u,0,0,B,x);if(n==="image/jpeg"){y=new f(atob(w.substring(w.indexOf("base64,")+7)));if(y.headers&&y.headers.length){A=new a();if(A.init(y.get("exif")[0])){A.setExif("PixelXDimension",B);A.setExif("PixelYDimension",x);y.set("exif",A.getBinary());if(t.hasEventListener("ExifData")){t.trigger("ExifData",r,A.EXIF())}if(t.hasEventListener("GpsData")){t.trigger("GpsData",r,A.GPS())}}}if(p.quality){try{w=q.toDataURL(n,p.quality/100)}catch(C){w=q.toDataURL(n)}}}else{w=q.toDataURL(n)}w=w.substring(w.indexOf("base64,")+7);w=atob(w);if(y&&y.headers&&y.headers.length){w=y.restore(w);y.purge()}q.parentNode.removeChild(q);v({success:true,data:w})}else{v({success:false})}};u.src=w})}j.runtimes.Html5=j.addRuntime("html5",{getFeatures:function(){var s,o,r,q,p,n;o=r=p=n=false;if(h.XMLHttpRequest){s=new XMLHttpRequest();r=!!s.upload;o=!!(s.sendAsBinary||s.upload)}if(o){q=!!(s.sendAsBinary||(h.Uint8Array&&h.ArrayBuffer));p=!!(File&&(File.prototype.getAsDataURL||h.FileReader)&&q);n=!!(File&&(File.prototype.mozSlice||File.prototype.webkitSlice||File.prototype.slice))}g=j.ua.safari&&j.ua.windows;return{html5:o,dragdrop:(function(){var t=k.createElement("div");return("draggable" in t)||("ondragstart" in t&&"ondrop" in t)}()),jpgresize:p,pngresize:p,multipart:p||!!h.FileReader||!!h.FormData,canSendBinary:q,cantSendBlobInFormData:!!(j.ua.gecko&&h.FormData&&h.FileReader&&!FileReader.prototype.readAsArrayBuffer),progress:r,chunks:n,multi_selection:!(j.ua.safari&&j.ua.windows),triggerDialog:(j.ua.gecko&&h.FormData||j.ua.webkit)}},init:function(p,r){var n,q;function o(w){var u,t,v=[],x,s={};for(t=0;t<w.length;t++){u=w[t];if(s[u.name]){continue}s[u.name]=true;x=j.guid();c[x]=u;v.push(new j.File(x,u.fileName||u.name,u.fileSize||u.size))}if(v.length){p.trigger("FilesAdded",v)}}n=this.getFeatures();if(!n.html5){r({success:false});return}p.bind("Init",function(w){var G,F,C=[],v,D,t=w.settings.filters,u,B,s=k.body,E;G=k.createElement("div");G.id=w.id+"_html5_container";j.extend(G.style,{position:"absolute",background:p.settings.shim_bgcolor||"transparent",width:"100px",height:"100px",overflow:"hidden",zIndex:99999,opacity:p.settings.shim_bgcolor?"":0});G.className="plupload html5";if(p.settings.container){s=k.getElementById(p.settings.container);if(j.getStyle(s,"position")==="static"){s.style.position="relative"}}s.appendChild(G);no_type_restriction:for(v=0;v<t.length;v++){u=t[v].extensions.split(/,/);for(D=0;D<u.length;D++){if(u[D]==="*"){C=[];break no_type_restriction}B=j.mimeTypes[u[D]];if(B&&j.inArray(B,C)===-1){C.push(B)}}}G.innerHTML='<input id="'+p.id+'_html5" style="font-size:999px" type="file" accept="'+C.join(",")+'" '+(p.settings.multi_selection&&p.features.multi_selection?'multiple="multiple"':"")+" />";G.scrollTop=100;E=k.getElementById(p.id+"_html5");if(w.features.triggerDialog){j.extend(E.style,{position:"absolute",width:"100%",height:"100%"})}else{j.extend(E.style,{cssFloat:"right",styleFloat:"right"})}E.onchange=function(){o(this.files);this.value=""};F=k.getElementById(w.settings.browse_button);if(F){var z=w.settings.browse_button_hover,A=w.settings.browse_button_active,x=w.features.triggerDialog?F:G;if(z){j.addEvent(x,"mouseover",function(){j.addClass(F,z)},w.id);j.addEvent(x,"mouseout",function(){j.removeClass(F,z)},w.id)}if(A){j.addEvent(x,"mousedown",function(){j.addClass(F,A)},w.id);j.addEvent(k.body,"mouseup",function(){j.removeClass(F,A)},w.id)}if(w.features.triggerDialog){j.addEvent(F,"click",function(H){var y=k.getElementById(w.id+"_html5");if(y&&!y.disabled){y.click()}H.preventDefault()},w.id)}}});p.bind("PostInit",function(){var s=k.getElementById(p.settings.drop_element);if(s){if(g){j.addEvent(s,"dragenter",function(w){var v,t,u;v=k.getElementById(p.id+"_drop");if(!v){v=k.createElement("input");v.setAttribute("type","file");v.setAttribute("id",p.id+"_drop");v.setAttribute("multiple","multiple");j.addEvent(v,"change",function(){o(this.files);j.removeEvent(v,"change",p.id);v.parentNode.removeChild(v)},p.id);s.appendChild(v)}t=j.getPos(s,k.getElementById(p.settings.container));u=j.getSize(s);if(j.getStyle(s,"position")==="static"){j.extend(s.style,{position:"relative"})}j.extend(v.style,{position:"absolute",display:"block",top:0,left:0,width:u.w+"px",height:u.h+"px",opacity:0})},p.id);return}j.addEvent(s,"dragover",function(t){t.preventDefault()},p.id);j.addEvent(s,"drop",function(u){var t=u.dataTransfer;if(t&&t.files){o(t.files)}u.preventDefault()},p.id)}});p.bind("Refresh",function(s){var t,u,v,x,w;t=k.getElementById(p.settings.browse_button);if(t){u=j.getPos(t,k.getElementById(s.settings.container));v=j.getSize(t);x=k.getElementById(p.id+"_html5_container");j.extend(x.style,{top:u.y+"px",left:u.x+"px",width:v.w+"px",height:v.h+"px"});if(p.features.triggerDialog){if(j.getStyle(t,"position")==="static"){j.extend(t.style,{position:"relative"})}w=parseInt(j.getStyle(t,"z-index"),10);if(isNaN(w)){w=0}j.extend(t.style,{zIndex:w});j.extend(x.style,{zIndex:w-1})}}});p.bind("DisableBrowse",function(s,u){var t=k.getElementById(s.id+"_html5");if(t){t.disabled=u}});p.bind("CancelUpload",function(){if(q&&q.abort){q.abort()}});p.bind("UploadFile",function(s,u){var v=s.settings,y,t;function x(A,D,z){var B;if(File.prototype.slice){try{A.slice();return A.slice(D,z)}catch(C){return A.slice(D,z-D)}}else{if(B=File.prototype.webkitSlice||File.prototype.mozSlice){return B.call(A,D,z)}else{return null}}}function w(A){var D=0,C=0,z=("FileReader" in h)?new FileReader:null;function B(){var I,M,K,L,H,J,F,E=s.settings.url;function G(V){var T=0,N="----pluploadboundary"+j.guid(),O,P="--",U="\r\n",R="";q=new XMLHttpRequest;if(q.upload){q.upload.onprogress=function(W){u.loaded=Math.min(u.size,C+W.loaded-T);s.trigger("UploadProgress",u)}}q.onreadystatechange=function(){var W,Y;if(q.readyState==4&&s.state!==j.STOPPED){try{W=q.status}catch(X){W=0}if(W>=400){s.trigger("Error",{code:j.HTTP_ERROR,message:j.translate("HTTP Error."),file:u,status:W})}else{if(K){Y={chunk:D,chunks:K,response:q.responseText,status:W};s.trigger("ChunkUploaded",u,Y);C+=J;if(Y.cancelled){u.status=j.FAILED;return}u.loaded=Math.min(u.size,(D+1)*H)}else{u.loaded=u.size}s.trigger("UploadProgress",u);V=I=O=R=null;if(!K||++D>=K){u.status=j.DONE;s.trigger("FileUploaded",u,{response:q.responseText,status:W})}else{B()}}}};if(s.settings.multipart&&n.multipart){L.name=u.target_name||u.name;q.open("post",E,true);j.each(s.settings.headers,function(X,W){q.setRequestHeader(W,X)});if(typeof(V)!=="string"&&!!h.FormData){O=new FormData();j.each(j.extend(L,s.settings.multipart_params),function(X,W){O.append(W,X)});O.append(s.settings.file_data_name,V);q.send(O);return}if(typeof(V)==="string"){q.setRequestHeader("Content-Type","multipart/form-data; boundary="+N);j.each(j.extend(L,s.settings.multipart_params),function(X,W){R+=P+N+U+'Content-Disposition: form-data; name="'+W+'"'+U+U;R+=unescape(encodeURIComponent(X))+U});F=j.mimeTypes[u.name.replace(/^.+\.([^.]+)/,"$1").toLowerCase()]||"application/octet-stream";R+=P+N+U+'Content-Disposition: form-data; name="'+s.settings.file_data_name+'"; filename="'+unescape(encodeURIComponent(u.name))+'"'+U+"Content-Type: "+F+U+U+V+U+P+N+P+U;T=R.length-V.length;V=R;if(q.sendAsBinary){q.sendAsBinary(V)}else{if(n.canSendBinary){var S=new Uint8Array(V.length);for(var Q=0;Q<V.length;Q++){S[Q]=(V.charCodeAt(Q)&255)}q.send(S.buffer)}}return}}E=j.buildUrl(s.settings.url,j.extend(L,s.settings.multipart_params));q.open("post",E,true);q.setRequestHeader("Content-Type","application/octet-stream");j.each(s.settings.headers,function(X,W){q.setRequestHeader(W,X)});q.send(V)}if(u.status==j.DONE||u.status==j.FAILED||s.state==j.STOPPED){return}L={name:u.target_name||u.name};if(v.chunk_size&&u.size>v.chunk_size&&(n.chunks||typeof(A)=="string")){H=v.chunk_size;K=Math.ceil(u.size/H);J=Math.min(H,u.size-(D*H));if(typeof(A)=="string"){I=A.substring(D*H,D*H+J)}else{I=x(A,D*H,D*H+J)}L.chunk=D;L.chunks=K}else{J=u.size;I=A}if(s.settings.multipart&&n.multipart&&typeof(I)!=="string"&&z&&n.cantSendBlobInFormData&&n.chunks&&s.settings.chunk_size){z.onload=function(){G(z.result)};z.readAsBinaryString(I)}else{G(I)}}B()}y=c[u.id];if(n.jpgresize&&s.settings.resize&&/\.(png|jpg|jpeg)$/i.test(u.name)){d.call(s,u,s.settings.resize,/\.png$/i.test(u.name)?"image/png":"image/jpeg",function(z){if(z.success){u.size=z.data.length;w(z.data)}else{if(n.chunks){w(y)}else{l(y,w)}}})}else{if(!n.chunks&&n.jpgresize){l(y,w)}else{w(y)}}});p.bind("Destroy",function(s){var u,v,t=k.body,w={inputContainer:s.id+"_html5_container",inputFile:s.id+"_html5",browseButton:s.settings.browse_button,dropElm:s.settings.drop_element};for(u in w){v=k.getElementById(w[u]);if(v){j.removeAllEvents(v,s.id)}}j.removeAllEvents(k.body,s.id);if(s.settings.container){t=k.getElementById(s.settings.container)}t.removeChild(k.getElementById(w.inputContainer))});r({success:true})}});function b(){var q=false,o;function r(t,v){var s=q?0:-8*(v-1),w=0,u;for(u=0;u<v;u++){w|=(o.charCodeAt(t+u)<<Math.abs(s+u*8))}return w}function n(u,s,t){var t=arguments.length===3?t:o.length-s-1;o=o.substr(0,s)+u+o.substr(t+s)}function p(t,u,w){var x="",s=q?0:-8*(w-1),v;for(v=0;v<w;v++){x+=String.fromCharCode((u>>Math.abs(s+v*8))&255)}n(x,t,w)}return{II:function(s){if(s===e){return q}else{q=s}},init:function(s){q=false;o=s},SEGMENT:function(s,u,t){switch(arguments.length){case 1:return o.substr(s,o.length-s-1);case 2:return o.substr(s,u);case 3:n(t,s,u);break;default:return o}},BYTE:function(s){return r(s,1)},SHORT:function(s){return r(s,2)},LONG:function(s,t){if(t===e){return r(s,4)}else{p(s,t,4)}},SLONG:function(s){var t=r(s,4);return(t>2147483647?t-4294967296:t)},STRING:function(s,t){var u="";for(t+=s;s<t;s++){u+=String.fromCharCode(r(s,1))}return u}}}function f(s){var u={65505:{app:"EXIF",name:"APP1",signature:"Exif\0"},65506:{app:"ICC",name:"APP2",signature:"ICC_PROFILE\0"},65517:{app:"IPTC",name:"APP13",signature:"Photoshop 3.0\0"}},t=[],r,n,p=e,q=0,o;r=new b();r.init(s);if(r.SHORT(0)!==65496){return}n=2;o=Math.min(1048576,s.length);while(n<=o){p=r.SHORT(n);if(p>=65488&&p<=65495){n+=2;continue}if(p===65498||p===65497){break}q=r.SHORT(n+2)+2;if(u[p]&&r.STRING(n+4,u[p].signature.length)===u[p].signature){t.push({hex:p,app:u[p].app.toUpperCase(),name:u[p].name.toUpperCase(),start:n,length:q,segment:r.SEGMENT(n,q)})}n+=q}r.init(null);return{headers:t,restore:function(y){r.init(y);var w=new f(y);if(!w.headers){return false}for(var x=w.headers.length;x>0;x--){var z=w.headers[x-1];r.SEGMENT(z.start,z.length,"")}w.purge();n=r.SHORT(2)==65504?4+r.SHORT(4):2;for(var x=0,v=t.length;x<v;x++){r.SEGMENT(n,0,t[x].segment);n+=t[x].length}return r.SEGMENT()},get:function(x){var y=[];for(var w=0,v=t.length;w<v;w++){if(t[w].app===x.toUpperCase()){y.push(t[w].segment)}}return y},set:function(y,x){var z=[];if(typeof(x)==="string"){z.push(x)}else{z=x}for(var w=ii=0,v=t.length;w<v;w++){if(t[w].app===y.toUpperCase()){t[w].segment=z[ii];t[w].length=z[ii].length;ii++}if(ii>=z.length){break}}},purge:function(){t=[];r.init(null)}}}function a(){var q,n,o={},t;q=new b();n={tiff:{274:"Orientation",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer"},exif:{36864:"ExifVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",36867:"DateTimeOriginal",33434:"ExposureTime",33437:"FNumber",34855:"ISOSpeedRatings",37377:"ShutterSpeedValue",37378:"ApertureValue",37383:"MeteringMode",37384:"LightSource",37385:"Flash",41986:"ExposureMode",41987:"WhiteBalance",41990:"SceneCaptureType",41988:"DigitalZoomRatio",41992:"Contrast",41993:"Saturation",41994:"Sharpness"},gps:{0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude"}};t={ColorSpace:{1:"sRGB",0:"Uncalibrated"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{1:"Daylight",2:"Fliorescent",3:"Tungsten",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 -5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire.",1:"Flash fired.",5:"Strobe return light not detected.",7:"Strobe return light detected.",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},ExposureMode:{0:"Auto exposure",1:"Manual exposure",2:"Auto bracket"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},GPSLatitudeRef:{N:"North latitude",S:"South latitude"},GPSLongitudeRef:{E:"East longitude",W:"West longitude"}};function p(u,C){var w=q.SHORT(u),z,F,G,B,A,v,x,D,E=[],y={};for(z=0;z<w;z++){x=v=u+12*z+2;G=C[q.SHORT(x)];if(G===e){continue}B=q.SHORT(x+=2);A=q.LONG(x+=2);x+=4;E=[];switch(B){case 1:case 7:if(A>4){x=q.LONG(x)+o.tiffHeader}for(F=0;F<A;F++){E[F]=q.BYTE(x+F)}break;case 2:if(A>4){x=q.LONG(x)+o.tiffHeader}y[G]=q.STRING(x,A-1);continue;case 3:if(A>2){x=q.LONG(x)+o.tiffHeader}for(F=0;F<A;F++){E[F]=q.SHORT(x+F*2)}break;case 4:if(A>1){x=q.LONG(x)+o.tiffHeader}for(F=0;F<A;F++){E[F]=q.LONG(x+F*4)}break;case 5:x=q.LONG(x)+o.tiffHeader;for(F=0;F<A;F++){E[F]=q.LONG(x+F*4)/q.LONG(x+F*4+4)}break;case 9:x=q.LONG(x)+o.tiffHeader;for(F=0;F<A;F++){E[F]=q.SLONG(x+F*4)}break;case 10:x=q.LONG(x)+o.tiffHeader;for(F=0;F<A;F++){E[F]=q.SLONG(x+F*4)/q.SLONG(x+F*4+4)}break;default:continue}D=(A==1?E[0]:E);if(t.hasOwnProperty(G)&&typeof D!="object"){y[G]=t[G][D]}else{y[G]=D}}return y}function s(){var v=e,u=o.tiffHeader;q.II(q.SHORT(u)==18761);if(q.SHORT(u+=2)!==42){return false}o.IFD0=o.tiffHeader+q.LONG(u+=2);v=p(o.IFD0,n.tiff);o.exifIFD=("ExifIFDPointer" in v?o.tiffHeader+v.ExifIFDPointer:e);o.gpsIFD=("GPSInfoIFDPointer" in v?o.tiffHeader+v.GPSInfoIFDPointer:e);return true}function r(w,u,z){var B,y,x,A=0;if(typeof(u)==="string"){var v=n[w.toLowerCase()];for(hex in v){if(v[hex]===u){u=hex;break}}}B=o[w.toLowerCase()+"IFD"];y=q.SHORT(B);for(i=0;i<y;i++){x=B+12*i+2;if(q.SHORT(x)==u){A=x+8;break}}if(!A){return false}q.LONG(A,z);return true}return{init:function(u){o={tiffHeader:10};if(u===e||!u.length){return false}q.init(u);if(q.SHORT(0)===65505&&q.STRING(4,5).toUpperCase()==="EXIF\0"){return s()}return false},EXIF:function(){var v;v=p(o.exifIFD,n.exif);if(v.ExifVersion&&j.typeOf(v.ExifVersion)==="array"){for(var w=0,u="";w<v.ExifVersion.length;w++){u+=String.fromCharCode(v.ExifVersion[w])}v.ExifVersion=u}return v},GPS:function(){var u;u=p(o.gpsIFD,n.gps);if(u.GPSVersionID){u.GPSVersionID=u.GPSVersionID.join(".")}return u},setExif:function(u,v){if(u!=="PixelXDimension"&&u!=="PixelYDimension"){return false}return r("exif",u,v)},getBinary:function(){return q.SEGMENT()}}}})(window,document,plupload);(function(d,a,b,c){function e(f){return a.getElementById(f)}b.runtimes.Html4=b.addRuntime("html4",{getFeatures:function(){return{multipart:true,triggerDialog:(b.ua.gecko&&d.FormData||b.ua.webkit)}},init:function(f,g){f.bind("Init",function(p){var j=a.body,n,h="javascript",k,x,q,z=[],r=/MSIE/.test(navigator.userAgent),t=[],m=p.settings.filters,o,l,s,w;no_type_restriction:for(o=0;o<m.length;o++){l=m[o].extensions.split(/,/);for(w=0;w<l.length;w++){if(l[w]==="*"){t=[];break no_type_restriction}s=b.mimeTypes[l[w]];if(s&&b.inArray(s,t)===-1){t.push(s)}}}t=t.join(",");function v(){var C,A,y,B;q=b.guid();z.push(q);C=a.createElement("form");C.setAttribute("id","form_"+q);C.setAttribute("method","post");C.setAttribute("enctype","multipart/form-data");C.setAttribute("encoding","multipart/form-data");C.setAttribute("target",p.id+"_iframe");C.style.position="absolute";A=a.createElement("input");A.setAttribute("id","input_"+q);A.setAttribute("type","file");A.setAttribute("accept",t);A.setAttribute("size",1);B=e(p.settings.browse_button);if(p.features.triggerDialog&&B){b.addEvent(e(p.settings.browse_button),"click",function(D){if(!A.disabled){A.click()}D.preventDefault()},p.id)}b.extend(A.style,{width:"100%",height:"100%",opacity:0,fontSize:"99px",cursor:"pointer"});b.extend(C.style,{overflow:"hidden"});y=p.settings.shim_bgcolor;if(y){C.style.background=y}if(r){b.extend(A.style,{filter:"alpha(opacity=0)"})}b.addEvent(A,"change",function(G){var E=G.target,D,F=[],H;if(E.value){e("form_"+q).style.top=-1048575+"px";D=E.value.replace(/\\/g,"/");D=D.substring(D.length,D.lastIndexOf("/")+1);F.push(new b.File(q,D));if(!p.features.triggerDialog){b.removeAllEvents(C,p.id)}else{b.removeEvent(B,"click",p.id)}b.removeEvent(A,"change",p.id);v();if(F.length){f.trigger("FilesAdded",F)}}},p.id);C.appendChild(A);j.appendChild(C);p.refresh()}function u(){var y=a.createElement("div");y.innerHTML='<iframe id="'+p.id+'_iframe" name="'+p.id+'_iframe" src="'+h+':&quot;&quot;" style="display:none"></iframe>';n=y.firstChild;j.appendChild(n);b.addEvent(n,"load",function(D){var E=D.target,C,A;if(!k){return}try{C=E.contentWindow.document||E.contentDocument||d.frames[E.id].document}catch(B){p.trigger("Error",{code:b.SECURITY_ERROR,message:b.translate("Security error."),file:k});return}A=C.body.innerHTML;if(A){k.status=b.DONE;k.loaded=1025;k.percent=100;p.trigger("UploadProgress",k);p.trigger("FileUploaded",k,{response:A})}},p.id)}if(p.settings.container){j=e(p.settings.container);if(b.getStyle(j,"position")==="static"){j.style.position="relative"}}p.bind("UploadFile",function(y,B){var C,A;if(B.status==b.DONE||B.status==b.FAILED||y.state==b.STOPPED){return}C=e("form_"+B.id);A=e("input_"+B.id);A.setAttribute("name",y.settings.file_data_name);C.setAttribute("action",y.settings.url);b.each(b.extend({name:B.target_name||B.name},y.settings.multipart_params),function(F,D){var E=a.createElement("input");b.extend(E,{type:"hidden",name:D,value:F});C.insertBefore(E,C.firstChild)});k=B;e("form_"+q).style.top=-1048575+"px";C.submit()});p.bind("FileUploaded",function(y){y.refresh()});p.bind("StateChanged",function(y){if(y.state==b.STARTED){u()}else{if(y.state==b.STOPPED){d.setTimeout(function(){b.removeEvent(n,"load",y.id);if(n.parentNode){n.parentNode.removeChild(n)}},0)}}b.each(y.files,function(B,A){if(B.status===b.DONE||B.status===b.FAILED){var C=e("form_"+B.id);if(C){C.parentNode.removeChild(C)}}})});p.bind("Refresh",function(A){var G,B,C,D,y,H,I,F,E;G=e(A.settings.browse_button);if(G){y=b.getPos(G,e(A.settings.container));H=b.getSize(G);I=e("form_"+q);F=e("input_"+q);b.extend(I.style,{top:y.y+"px",left:y.x+"px",width:H.w+"px",height:H.h+"px"});if(A.features.triggerDialog){if(b.getStyle(G,"position")==="static"){b.extend(G.style,{position:"relative"})}E=parseInt(G.style.zIndex,10);if(isNaN(E)){E=0}b.extend(G.style,{zIndex:E});b.extend(I.style,{zIndex:E-1})}C=A.settings.browse_button_hover;D=A.settings.browse_button_active;B=A.features.triggerDialog?G:I;if(C){b.addEvent(B,"mouseover",function(){b.addClass(G,C)},A.id);b.addEvent(B,"mouseout",function(){b.removeClass(G,C)},A.id)}if(D){b.addEvent(B,"mousedown",function(){b.addClass(G,D)},A.id);b.addEvent(a.body,"mouseup",function(){b.removeClass(G,D)},A.id)}}});f.bind("FilesRemoved",function(y,B){var A,C;for(A=0;A<B.length;A++){C=e("form_"+B[A].id);if(C){C.parentNode.removeChild(C)}}});f.bind("DisableBrowse",function(y,B){var A=a.getElementById("input_"+q);if(A){A.disabled=B}});f.bind("Destroy",function(y){var A,B,C,D={inputContainer:"form_"+q,inputFile:"input_"+q,browseButton:y.settings.browse_button};for(A in D){B=e(D[A]);if(B){b.removeAllEvents(B,y.id)}}b.removeAllEvents(a.body,y.id);b.each(z,function(F,E){C=e("form_"+F);if(C){j.removeChild(C)}})});v()});g({success:true})}})})(window,document,plupload);
@@ -1,52 +1,11 @@
1
1
  Ext.define("Compass.ErpApp.Shared.UploadWindow",{
2
2
  extend:"Ext.window.Window",
3
3
  alias:'widget.erpappshared_uploadwindow',
4
- statusIconRenderer : function(value){
5
- switch(value){
6
- default:
7
- return value;
8
- case 'Pending':
9
- return '<img src="/images/erp_app/desktop/applications/file_manager/hourglass.png" width=16 height=16>';
10
- case 'Sending':
11
- return '<img src="/images/erp_app/desktop/applications/file_manager/loading.gif" width=16 height=16>';
12
- case 'Error':
13
- return '<img src="/images/erp_app/desktop/applications/file_manager/cross.png" width=16 height=16>';
14
- case 'Cancelled':
15
- case 'Aborted':
16
- return '<img src="/images/erp_app/desktop/applications/file_manager/cancel.png" width=16 height=16>';
17
- case 'Uploaded':
18
- return '<img src="/images/erp_app/desktop/applications/file_manager/tick.png" width=16 height=16>';
19
- }
20
- },
21
-
22
- progressBarColumnRenderer : function(value, meta, record, rowIndex, colIndex, store){
23
- meta.css += ' x-grid3-td-progress-cell';
24
- var progressClass = "x-grid3-td-progress-cell-pending";
25
- if(value == 100){
26
- progressClass = "x-grid3-td-progress-cell-complete";
27
- }
28
-
29
- var progressBarColumnTemplate = new Ext.XTemplate(
30
- '<div class="ux-progress-cell-inner ux-progress-cell-inner-center ux-progress-cell-background '+progressClass+'" style="left:{value}%">',
31
- '<div>{value} %</div>',
32
- '</div>'
33
- )
34
- return progressBarColumnTemplate.apply({
35
- value: value
36
- });
37
- },
38
-
39
- updateFileUploadRecord : function(id, column, value){
40
- var rec = this.awesomeUploaderGrid.store.getById(id);
41
- rec.set(column, value);
42
- rec.commit();
43
- },
44
4
 
45
5
  initComponent: function() {
46
6
  this.callParent(arguments);
47
7
  this.addEvents(
48
- /**
49
- * @event fileuploaded
8
+ /*** @event fileuploaded
50
9
  * Fired after file is uploaded.
51
10
  * @param {Compass.ErpApp.Shared.UploadWindow } uploadWindow This object
52
11
  */
@@ -59,195 +18,43 @@ Ext.define("Compass.ErpApp.Shared.UploadWindow",{
59
18
  config = {};
60
19
  }
61
20
  var self = this;
62
- config['extraPostData'] = config['extraPostData'] || {};
63
- config['extraPostData']['authenticity_token'] = Compass.ErpApp.AuthentictyToken;
64
21
 
65
- this.awesomeUploader = new Ext.create("Ext.ux.AwesomeUploader",{
22
+ config.extraPostData = Ext.applyIf({authenticity_token:Compass.ErpApp.AuthentictyToken}, config.extraPostData);
23
+ query_string = '?' + Ext.Object.toQueryString(config.extraPostData);
24
+
25
+ if (typeof ErpApp.FileUpload.maxSize == 'number'){
26
+ max_file_size = ErpApp.FileUpload.maxSize + 'mb'
27
+ }else{
28
+ max_file_size = ErpApp.FileUpload.maxSize
29
+ }
30
+
31
+ this.plUploader = Ext.create("Ext.ux.panel.UploadPanel",{
66
32
  region:'center',
67
- standardUploadUrl:config['standardUploadUrl'] || './file_manager/base/upload_file',
68
- flashUploadUrl:config['flashUploadUrl'] ||'./file_manager/base/upload_file',
69
- xhrUploadUrl:config['xhrUploadUrl'] ||'./file_manager/base/upload_file',
70
- extraPostData:config['extraPostData'],
71
- awesomeUploaderRoot:'/awsome_uploader/',
72
- height:40,
73
- allowDragAndDropAnywhere:true,
74
- autoStartUpload:config['autoStartUpload'] || true,
75
- maxFileSizeBytes: ErpApp.FileUpload.maxSize,
33
+ url: (config.standardUploadUrl || './file_manager/base/upload_file') + query_string,
34
+ max_file_size: max_file_size,
76
35
  listeners:{
77
36
  scope:this,
78
- fileselected:function(awesomeUploader, file){
79
- self.awesomeUploaderGrid.store.insert(1,[{
80
- id:file.id,
81
- name:file.name,
82
- size:file.size,
83
- status:'Pending',
84
- progress:0
85
- }]);
86
- },
87
- uploadstart:function(awesomeUploader, file){
88
- self.updateFileUploadRecord(file.id, 'status', 'Sending');
89
- },
90
- uploadprogress:function(awesomeUploader, fileId, bytesComplete, bytesTotal){
91
- self.updateFileUploadRecord(fileId, 'progress', Math.round((bytesComplete / bytesTotal)*100) );
92
- },
93
- uploadcomplete:function(awesomeUploader, file, serverData, resultObject){
94
- //Ext.Msg.alert('Data returned from server'+ serverData);
37
+ 'uploadcomplete':function(pluploader, success, failed){
38
+ if(success){
95
39
 
96
- try{
97
- var result = Ext.decode(serverData);//throws a SyntaxError.
98
- }catch(e){
99
- resultObject.error = 'Invalid JSON data returned';
100
- //Invalid json data. Return false here and "uploaderror" event will be called for this file. Show error message there.
101
- return false;
102
- }
103
- resultObject = result;
104
40
 
105
- if(result.success){
106
- self.updateFileUploadRecord(file.id, 'progress', 100 );
107
- self.updateFileUploadRecord(file.id, 'status', 'Uploaded' );
108
41
  this.fireEvent('fileuploaded', this);
42
+ self.close();
109
43
  }else{
110
44
  return false;
111
45
  }
112
- },
113
- uploadaborted:function(awesomeUploader, file ){
114
- self.updateFileUploadRecord(file.id, 'status', 'Aborted' );
115
- },
116
- uploadremoved:function(awesomeUploader, file ){
117
- self.awesomeUploaderGrid.store.remove(self.awesomeUploaderGrid.store.getById(file.id));
118
- },
119
- uploaderror:function(awesomeUploader, file, serverData, resultObject){
120
- resultObject = resultObject || {};
121
-
122
- var error = 'Error! ';
123
- if(resultObject.error){
124
- error += resultObject.error;
125
- }
126
-
127
- self.updateFileUploadRecord(file.id, 'progress', 0 );
128
- self.updateFileUploadRecord(file.id, 'status', 'Error' );
129
-
130
46
  }
131
47
  }
132
48
  });
133
49
 
134
- this.awesomeUploaderGrid = Ext.create("Ext.grid.GridPanel",{
135
- width:420,
136
- region:'south',
137
- height:200,
138
- tbar:[
139
- {
140
- text:'Start Upload',
141
- icon:'/images/erp_app/desktop/applications/file_manager/tick.png',
142
- scope:this,
143
- handler:function(){
144
- self.awesomeUploader.startUpload();
145
- }
146
- },
147
- {
148
- text:'Abort',
149
- icon:'/images/erp_app/desktop/applications/file_manager/cancel.png',
150
- scope:this,
151
- handler:function(){
152
- var selModel = self.awesomeUploaderGrid.getSelectionModel();
153
- if(!selModel.hasSelection()){
154
- Ext.Msg.alert('','Please select an upload to cancel');
155
- return true;
156
- }
157
- var rec = selModel.selected.first();
158
- self.awesomeUploader.abortUpload(rec.data.id);
159
- }
160
- },
161
- {
162
- text:'Abort All',
163
- icon:'/images/erp_app/desktop/applications/file_manager/cancel.png',
164
- scope:this,
165
- handler:function(){
166
- self.awesomeUploader.abortAllUploads();
167
- }
168
- },
169
- {
170
- text:'Remove',
171
- icon:'/images/erp_app/desktop/applications/file_manager/cross.png',
172
- scope:this,
173
- handler:function(){
174
- var selModel = self.awesomeUploaderGrid.getSelectionModel();
175
- if(!selModel.hasSelection()){
176
- Ext.Msg.alert('','Please select an upload to cancel');
177
- return true;
178
- }
179
- var rec = selModel.selected.first();
180
- self.awesomeUploader.removeUpload(rec.data.id);
181
- }
182
- },
183
- {
184
- text:'Remove All',
185
- icon:'/images/erp_app/desktop/applications/file_manager/cross.png',
186
- scope:this,
187
- handler:function(){
188
- self.awesomeUploader.removeAllUploads();
189
- }
190
- }],
191
- store:Ext.create("Ext.data.Store",{
192
- proxy: {
193
- type: 'memory',
194
- reader: {
195
- type: 'json'
196
- }
197
- },
198
- fields: ['id','name','size','status','progress']
199
- }),
200
- columns:[
201
- {
202
- header:'File Name',
203
- menuDisabled:true,
204
- sortable:false,
205
- dataIndex:'name',
206
- width:150
207
- },
208
- {
209
- header:'Size',
210
- dataIndex:'size',
211
- menuDisabled:true,
212
- sortable:false,
213
- width:60,
214
- renderer:Ext.util.Format.fileSize
215
- },
216
- {
217
- header:'&nbsp;',
218
- dataIndex:'status',
219
- menuDisabled:true,
220
- sortable:false,
221
- width:30,
222
- renderer:self.statusIconRenderer
223
- },
224
- {
225
- header:'Status',
226
- dataIndex:'status',
227
- menuDisabled:true,
228
- sortable:false,
229
- width:60
230
- },
231
- {
232
- header:'Progress',
233
- dataIndex:'progress',
234
- menuDisabled:true,
235
- sortable:false,
236
- width:100,
237
- renderer:self.progressBarColumnRenderer
238
- }
239
- ]
240
-
241
- });
242
-
243
50
  config = Ext.apply({
244
51
  title:'File Upload',
245
52
  layout:'border',
246
53
  autoWidth:true,
247
- height:275,
248
- width:455,
54
+ height:300,
55
+ width:800,
249
56
  iconCls:'icon-upload',
250
- items:[this.awesomeUploader,this.awesomeUploaderGrid]
57
+ items:[this.plUploader]
251
58
  }, config);
252
59
 
253
60
  this.callParent([config]);
@@ -1,24 +1,18 @@
1
- Ext.define("Compass.ErpApp.Desktop.Applications.ControlPanel.ProfileManagementPanel",{
1
+ Ext.define("Compass.ErpApp.Shared.ProfileManagementPanel",{
2
2
  extend:"Ext.Panel",
3
- alias:"widget.controlpanel_profilemanagementpanel",
4
- setWindowStatus : function(status){
5
- this.findParentByType('statuswindow').setStatus(status);
6
- },
7
-
8
- clearWindowStatus : function(){
9
- this.findParentByType('statuswindow').clearStatus();
10
- },
3
+ alias:"widget.shared_profilemanagementpanel",
11
4
 
12
5
  constructor : function(config) {
13
6
  var self = this;
14
7
  this.emailForm = {
15
8
  xtype:'form',
16
9
  labelWidth: 110,
10
+ border:false,
17
11
  title:'Update Email',
18
- anchor:'100% 50%',
12
+ anchor:'100% 40%',
19
13
  bodyStyle:'padding:5px 5px 0',
20
14
  buttonAlign:'left',
21
- url: '/erp_app/desktop/control_panel/profile_management/update_email',
15
+ url: '/erp_app/shared/profile_management/update_email',
22
16
  items: [
23
17
  {
24
18
  xtype:'textfield',
@@ -31,15 +25,14 @@ Ext.define("Compass.ErpApp.Desktop.Applications.ControlPanel.ProfileManagementPa
31
25
  ],
32
26
  buttons:[
33
27
  {
34
- text:'Submit',
28
+ text:'Update',
35
29
  listeners:{
36
30
  'click':function(button){
37
- var formPanel = button.findParentByType('form');
38
- self.setWindowStatus('Updating email ...');
31
+ var formPanel = button.up('form');
39
32
  formPanel.getForm().submit({
33
+ waitMsg:'Updating Email ...',
40
34
  reset:false,
41
35
  success:function(form, action){
42
- self.clearWindowStatus();
43
36
  var obj = Ext.decode(action.response.responseText);
44
37
  if(obj.success){
45
38
  var newEmail = form.getValues().email;
@@ -51,8 +44,7 @@ Ext.define("Compass.ErpApp.Desktop.Applications.ControlPanel.ProfileManagementPa
51
44
  }
52
45
  },
53
46
  failure:function(form, action){
54
- self.clearWindowStatus();
55
- var obj = Ext.decode(action.response.responseText);
47
+ var obj = Ext.decode(action.response.responseText);
56
48
  if(Compass.ErpApp.Utility.isBlank(obj.message)){
57
49
  Ext.Msg.alert("Error", 'Error updating email.');
58
50
  }
@@ -69,9 +61,10 @@ Ext.define("Compass.ErpApp.Desktop.Applications.ControlPanel.ProfileManagementPa
69
61
 
70
62
  this.passwordForm = {
71
63
  xtype:'form',
64
+ border:false,
72
65
  labelWidth: 110,
73
66
  title:'Update Password',
74
- anchor:'100% 50%',
67
+ anchor:'100% 60%',
75
68
  bodyStyle:'padding:5px 5px 0',
76
69
  buttonAlign:'left',
77
70
  url: '/users/update_password',
@@ -103,15 +96,14 @@ Ext.define("Compass.ErpApp.Desktop.Applications.ControlPanel.ProfileManagementPa
103
96
  ],
104
97
  buttons:[
105
98
  {
106
- text:'Submit',
99
+ text:'Update',
107
100
  listeners:{
108
101
  'click':function(button){
109
102
  var formPanel = button.findParentByType('form');
110
- self.setWindowStatus('Updating password ...');
111
103
  formPanel.getForm().submit({
104
+ waitMsg:'Updating password ...',
112
105
  reset:true,
113
106
  success:function(form, action){
114
- self.clearWindowStatus();
115
107
  var obj = Ext.decode(action.response.responseText);
116
108
  if(obj.success){
117
109
  Ext.Msg.alert("Success", 'Password changed.');
@@ -121,7 +113,6 @@ Ext.define("Compass.ErpApp.Desktop.Applications.ControlPanel.ProfileManagementPa
121
113
  }
122
114
  },
123
115
  failure:function(form, action){
124
- self.clearWindowStatus();
125
116
  var obj = Ext.decode(action.response.responseText);
126
117
  if(Compass.ErpApp.Utility.isBlank(obj.message)){
127
118
  Ext.Msg.alert("Error", 'Error updating password.');
@@ -140,7 +131,7 @@ Ext.define("Compass.ErpApp.Desktop.Applications.ControlPanel.ProfileManagementPa
140
131
  config = Ext.apply({
141
132
  title:'Profile',
142
133
  layout:'anchor',
143
- items:[this.passwordForm, this.emailForm]
134
+ items:[this.emailForm, this.passwordForm]
144
135
  }, config);
145
136
 
146
137
  this.callParent([config]);