erp_app 4.0.0 → 4.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1264) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/art/desktop-logo.jpg +0 -0
  3. data/app/assets/images/art/desktop-logo.png +0 -0
  4. data/{public → app/assets}/images/btn/left_panel/left_panel_16x16.png +0 -0
  5. data/{public → app/assets}/images/btn/left_right_panel/left_right_panel_16x16.png +0 -0
  6. data/{public → app/assets}/images/btn/right_panel/right_panel_16x16.png +0 -0
  7. data/{public → app/assets}/images/btn/save/save_16x16.png +0 -0
  8. data/{public → app/assets}/images/btn/save_all/save_all_16x16.png +0 -0
  9. data/{public → app/assets}/images/btn_light/add/add_16x16.png +0 -0
  10. data/{public → app/assets}/images/btn_light/left_panel/left_panel_16x16.png +0 -0
  11. data/{public → app/assets}/images/btn_light/left_right_panel/left_right_panel_16x16.png +0 -0
  12. data/{public → app/assets}/images/btn_light/right_panel/right_panel_16x16.png +0 -0
  13. data/{public → app/assets}/images/btn_light/save/save_16x16.png +0 -0
  14. data/{public → app/assets}/images/btn_light/save_all/save_all_16x16.png +0 -0
  15. data/{public → app/assets}/images/checked.gif +0 -0
  16. data/{public → app/assets}/images/erp_app/ajax-loader.gif +0 -0
  17. data/{public → app/assets}/images/erp_app/desktop/applications/file_manager/cancel.png +0 -0
  18. data/{public → app/assets}/images/erp_app/desktop/applications/file_manager/cross.png +0 -0
  19. data/{public → app/assets}/images/erp_app/desktop/applications/file_manager/hourglass.png +0 -0
  20. data/{public → app/assets}/images/erp_app/desktop/applications/file_manager/loading.gif +0 -0
  21. data/{public → app/assets}/images/erp_app/desktop/applications/file_manager/tick.png +0 -0
  22. data/app/assets/images/erp_app/desktop/applications/security_management/manage_capabilities.png +0 -0
  23. data/app/assets/images/erp_app/desktop/applications/security_management/manage_groups.png +0 -0
  24. data/app/assets/images/erp_app/desktop/applications/security_management/manage_roles.png +0 -0
  25. data/app/assets/images/erp_app/desktop/applications/security_management/manage_users.png +0 -0
  26. data/{public → app/assets}/images/erp_app/desktop/compass_logo_start_icon.png +0 -0
  27. data/{public → app/assets}/images/erp_app/desktop/image_add.png +0 -0
  28. data/{public → app/assets}/images/erp_app/desktop/themes.png +0 -0
  29. data/{public → app/assets}/images/erp_app/ext_loading_image.gif +0 -0
  30. data/{public → app/assets}/images/erp_app/mobile/green_light.png +0 -0
  31. data/{public → app/assets}/images/erp_app/mobile/red_light.png +0 -0
  32. data/{public → app/assets}/images/erp_app/mobile/yellow_light.png +0 -0
  33. data/{public → app/assets}/images/erp_app/organizer/applications/crm/business.png +0 -0
  34. data/{public → app/assets}/images/erp_app/organizer/applications/crm/business_64x64.png +0 -0
  35. data/{public → app/assets}/images/erp_app/organizer/applications/crm/customer-contact.png +0 -0
  36. data/{public → app/assets}/images/erp_app/organizer/applications/crm/customer_360_64x64.png +0 -0
  37. data/{public → app/assets}/images/erp_app/organizer/applications/crm/people.png +0 -0
  38. data/{public → app/assets}/images/erp_app/organizer/applications/crm/person.png +0 -0
  39. data/{public → app/assets}/images/erp_app/organizer/applications/crm/toolbar_find.png +0 -0
  40. data/{public → app/assets}/images/erp_app/organizer/applications/crm/vcard.png +0 -0
  41. data/{public → app/assets}/images/help.jpg +0 -0
  42. data/{public → app/assets}/images/icons/accept/accept_16x16.png +0 -0
  43. data/{public → app/assets}/images/icons/accept/accept_24x24.png +0 -0
  44. data/{public → app/assets}/images/icons/accept/accept_32x32.png +0 -0
  45. data/{public → app/assets}/images/icons/add/add_16x16.png +0 -0
  46. data/{public → app/assets}/images/icons/add/add_light_16x16.png +0 -0
  47. data/{public → app/assets}/images/icons/arrow_down_blue/arrow_down_blue_16x16.png +0 -0
  48. data/{public → app/assets}/images/icons/arrow_down_blue/arrow_down_blue_24x24.png +0 -0
  49. data/{public → app/assets}/images/icons/arrow_down_blue/arrow_down_blue_32x32.png +0 -0
  50. data/{public → app/assets}/images/icons/arrow_down_blue/arrow_down_blue_48x48.png +0 -0
  51. data/{public → app/assets}/images/icons/arrow_left_blue/arrow_left_blue_16x16.png +0 -0
  52. data/{public → app/assets}/images/icons/arrow_left_blue/arrow_left_blue_32x32.png +0 -0
  53. data/{public → app/assets}/images/icons/arrow_left_blue/arrow_left_blue_48x48.png +0 -0
  54. data/{public → app/assets}/images/icons/arrow_right_blue/arrow_right_blue_16x16.png +0 -0
  55. data/{public → app/assets}/images/icons/arrow_right_blue/arrow_right_blue_32x32.png +0 -0
  56. data/{public → app/assets}/images/icons/arrow_right_blue/arrow_right_blue_48x48.png +0 -0
  57. data/{public → app/assets}/images/icons/arrow_up_blue/arrow_up_blue_16x16.png +0 -0
  58. data/{public → app/assets}/images/icons/arrow_up_blue/arrow_up_blue_24x24.png +0 -0
  59. data/{public → app/assets}/images/icons/arrow_up_blue/arrow_up_blue_32x32.png +0 -0
  60. data/{public → app/assets}/images/icons/arrow_up_blue/arrow_up_blue_48x48.png +0 -0
  61. data/{public → app/assets}/images/icons/article/article_16x16.png +0 -0
  62. data/app/assets/images/icons/audio/audio_16x16.png +0 -0
  63. data/{public → app/assets}/images/icons/blog/blog_16x16.png +0 -0
  64. data/{public → app/assets}/images/icons/blog/blog_24x24.png +0 -0
  65. data/{public → app/assets}/images/icons/blog/blog_32x32.png +0 -0
  66. data/{public → app/assets}/images/icons/blog/blog_48x48.png +0 -0
  67. data/{public → app/assets}/images/icons/book/book_16x16.png +0 -0
  68. data/{public → app/assets}/images/icons/calendar/calendar_16x16.png +0 -0
  69. data/app/assets/images/icons/calendar/calendar_48x48.png +0 -0
  70. data/{public → app/assets}/images/icons/calendar/calendar_64x64.png +0 -0
  71. data/{public → app/assets}/images/icons/calendar/calendar_light_16x16.png +0 -0
  72. data/{public → app/assets}/images/icons/code/code_16x16.png +0 -0
  73. data/{public → app/assets}/images/icons/console/console_16x16.png +0 -0
  74. data/{public → app/assets}/images/icons/console/console_64x64.png +0 -0
  75. data/{public → app/assets}/images/icons/contact-us/contact-us_48x48.png +0 -0
  76. data/{public → app/assets}/images/icons/content/content_16x16.png +0 -0
  77. data/app/assets/images/icons/control_panel/control_panel_105x105.png +0 -0
  78. data/app/assets/images/icons/control_panel/control_panel_105x105_active.png +0 -0
  79. data/{public → app/assets}/images/icons/control_panel/control_panel_16x16.png +0 -0
  80. data/{public → app/assets}/images/icons/control_panel/control_panel_48x48.png +0 -0
  81. data/{public → app/assets}/images/icons/control_panel/control_panel_64x64.png +0 -0
  82. data/{public → app/assets}/images/icons/copy/copy_16x16.png +0 -0
  83. data/{public → app/assets}/images/icons/creditcards/creditcards_16x16.png +0 -0
  84. data/{public → app/assets}/images/icons/creditcards/creditcards_24x24.png +0 -0
  85. data/{public → app/assets}/images/icons/creditcards/creditcards_32x32.png +0 -0
  86. data/{public → app/assets}/images/icons/creditcards/creditcards_48x48.png +0 -0
  87. data/{public → app/assets}/images/icons/creditcards/creditcards_64x64.png +0 -0
  88. data/{public → app/assets}/images/icons/crm/crm_16x16.png +0 -0
  89. data/{public → app/assets}/images/icons/crm/crm_light_16x16.png +0 -0
  90. data/{public → app/assets}/images/icons/csr/csr_16x16.png +0 -0
  91. data/{public → app/assets}/images/icons/csr/csr_256x256.png +0 -0
  92. data/{public → app/assets}/images/icons/csr/csr_500x500.png +0 -0
  93. data/{public → app/assets}/images/icons/data/data_16x16.png +0 -0
  94. data/{public → app/assets}/images/icons/data/data_32x32.png +0 -0
  95. data/{public → app/assets}/images/icons/data/data_64x64.png +0 -0
  96. data/app/assets/images/icons/database/database_105x105.png +0 -0
  97. data/app/assets/images/icons/database/database_105x105_active.png +0 -0
  98. data/{public → app/assets}/images/icons/database/database_16x16.png +0 -0
  99. data/{public → app/assets}/images/icons/database_column/database_column_16x16.png +0 -0
  100. data/{public → app/assets}/images/icons/db_edit_data/db_edit_data_16x16.png +0 -0
  101. data/{public → app/assets}/images/icons/db_table/db_table_16x16.png +0 -0
  102. data/{public → app/assets}/images/icons/delete/delete_16x16.png +0 -0
  103. data/{public → app/assets}/images/icons/delete/delete_24x24.png +0 -0
  104. data/{public → app/assets}/images/icons/delete/delete_32x32.png +0 -0
  105. data/{public → app/assets}/images/icons/delete/delete_48x48.png +0 -0
  106. data/{public → app/assets}/images/icons/doc_settings/doc_settings_16x16.png +0 -0
  107. data/{public → app/assets}/images/icons/document/document_16x16.png +0 -0
  108. data/{public → app/assets}/images/icons/document/document_24x24.png +0 -0
  109. data/{public → app/assets}/images/icons/document/document_32x32.png +0 -0
  110. data/{public → app/assets}/images/icons/document/document_48x48.png +0 -0
  111. data/{public → app/assets}/images/icons/document_check/document_check_16x16.png +0 -0
  112. data/{public → app/assets}/images/icons/document_check/document_check_24x24.png +0 -0
  113. data/{public → app/assets}/images/icons/document_check/document_check_32x32.png +0 -0
  114. data/{public → app/assets}/images/icons/document_check/document_check_48x48.png +0 -0
  115. data/{public → app/assets}/images/icons/document_down/document_down_16x16.png +0 -0
  116. data/{public → app/assets}/images/icons/document_down/document_down_24x24.png +0 -0
  117. data/{public → app/assets}/images/icons/document_down/document_down_32x32.png +0 -0
  118. data/{public → app/assets}/images/icons/document_down/document_down_48x48.png +0 -0
  119. data/{public → app/assets}/images/icons/document_edit/document_edit_16x16.png +0 -0
  120. data/{public → app/assets}/images/icons/document_edit/document_edit_24x24.png +0 -0
  121. data/{public → app/assets}/images/icons/document_edit/document_edit_32x32.png +0 -0
  122. data/{public → app/assets}/images/icons/document_edit/document_edit_48x48.png +0 -0
  123. data/{public → app/assets}/images/icons/document_info/document_info_16x16.png +0 -0
  124. data/{public → app/assets}/images/icons/document_info/document_info_24x24.png +0 -0
  125. data/{public → app/assets}/images/icons/document_info/document_info_32x32.png +0 -0
  126. data/{public → app/assets}/images/icons/document_info/document_info_48x48.png +0 -0
  127. data/{public → app/assets}/images/icons/document_lock/document_lock_16x16.png +0 -0
  128. data/{public → app/assets}/images/icons/document_lock/document_lock_24x24.png +0 -0
  129. data/{public → app/assets}/images/icons/document_lock/document_lock_32x32.png +0 -0
  130. data/{public → app/assets}/images/icons/document_lock/document_lock_48x48.png +0 -0
  131. data/{public → app/assets}/images/icons/document_ok/document_ok_16x16.png +0 -0
  132. data/{public → app/assets}/images/icons/document_ok/document_ok_24x24.png +0 -0
  133. data/{public → app/assets}/images/icons/document_ok/document_ok_32x32.png +0 -0
  134. data/{public → app/assets}/images/icons/document_ok/document_ok_48x48.png +0 -0
  135. data/{public → app/assets}/images/icons/document_out/document_out_16x16.png +0 -0
  136. data/{public → app/assets}/images/icons/document_out/document_out_24x24.png +0 -0
  137. data/{public → app/assets}/images/icons/document_out/document_out_32x32.png +0 -0
  138. data/{public → app/assets}/images/icons/document_out/document_out_48x48.png +0 -0
  139. data/{public → app/assets}/images/icons/document_pulse/document_pulse_16x16.png +0 -0
  140. data/{public → app/assets}/images/icons/document_pulse/document_pulse_24x24.png +0 -0
  141. data/{public → app/assets}/images/icons/document_pulse/document_pulse_32x32.png +0 -0
  142. data/{public → app/assets}/images/icons/document_pulse/document_pulse_48x48.png +0 -0
  143. data/{public → app/assets}/images/icons/document_pulse/document_pulse_64x64.png +0 -0
  144. data/{public → app/assets}/images/icons/document_up/document_up_16x16.png +0 -0
  145. data/{public → app/assets}/images/icons/document_up/document_up_24x24.png +0 -0
  146. data/{public → app/assets}/images/icons/document_up/document_up_32x32.png +0 -0
  147. data/{public → app/assets}/images/icons/document_up/document_up_48x48.png +0 -0
  148. data/{public → app/assets}/images/icons/documents/documents_16x16.png +0 -0
  149. data/{public → app/assets}/images/icons/documents/documents_24x24.png +0 -0
  150. data/{public → app/assets}/images/icons/documents/documents_32x32.png +0 -0
  151. data/{public → app/assets}/images/icons/documents/documents_48x48.png +0 -0
  152. data/{public → app/assets}/images/icons/edit/edit_16x16.png +0 -0
  153. data/{public → app/assets}/images/icons/edit/edit_24x24.png +0 -0
  154. data/{public → app/assets}/images/icons/edit/edit_32x32.png +0 -0
  155. data/{public → app/assets}/images/icons/edit/edit_48x48.png +0 -0
  156. data/{public → app/assets}/images/icons/exit/exit_16x16.png +0 -0
  157. data/{public → app/assets}/images/icons/exit/exit_24x24.png +0 -0
  158. data/{public → app/assets}/images/icons/exit/exit_32x32.png +0 -0
  159. data/{public → app/assets}/images/icons/exit/exit_48x48.png +0 -0
  160. data/{public → app/assets}/images/icons/eye/eye_16x16.png +0 -0
  161. data/{public → app/assets}/images/icons/eye/eye_24x24.png +0 -0
  162. data/{public → app/assets}/images/icons/eye/eye_32x32.png +0 -0
  163. data/{public → app/assets}/images/icons/eye/eye_48x48.png +0 -0
  164. data/app/assets/images/icons/file-upload/file_upload-light.png +0 -0
  165. data/app/assets/images/icons/file-upload/file_upload_16x16-light.png +0 -0
  166. data/app/assets/images/icons/file-upload/file_upload_16x16.png +0 -0
  167. data/{public → app/assets}/images/icons/file_manager/file_manager_16x16.png +0 -0
  168. data/{public → app/assets}/images/icons/file_manager/file_manager_light_16x16.png +0 -0
  169. data/{public → app/assets}/images/icons/folder/folder_16x16.png +0 -0
  170. data/{public → app/assets}/images/icons/folder/folder_24x24.png +0 -0
  171. data/{public → app/assets}/images/icons/folder/folder_32x32.png +0 -0
  172. data/{public → app/assets}/images/icons/folder/folder_48x48.png +0 -0
  173. data/{public → app/assets}/images/icons/folders/folders_64x64.png +0 -0
  174. data/{public → app/assets}/images/icons/footprints/footprints_16x16.png +0 -0
  175. data/{public → app/assets}/images/icons/footprints/footprints_light_16x16.png +0 -0
  176. data/{public → app/assets}/images/icons/form/form_16x16.png +0 -0
  177. data/{public → app/assets}/images/icons/form/form_light_16x16.png +0 -0
  178. data/{public → app/assets}/images/icons/gantt/gantt_24x24.png +0 -0
  179. data/{public → app/assets}/images/icons/gear/gear_16x16.png +0 -0
  180. data/{public → app/assets}/images/icons/gear/gear_24x24.png +0 -0
  181. data/{public → app/assets}/images/icons/gear/gear_32x32.png +0 -0
  182. data/{public → app/assets}/images/icons/gear/gear_48x48.png +0 -0
  183. data/{public → app/assets}/images/icons/gear/gear_light_16x16.png +0 -0
  184. data/app/assets/images/icons/globe/globe_105x105.png +0 -0
  185. data/app/assets/images/icons/globe/globe_105x105_active.png +0 -0
  186. data/{public → app/assets}/images/icons/globe/globe_16x16.png +0 -0
  187. data/{public → app/assets}/images/icons/globe/globe_64x64.png +0 -0
  188. data/{public → app/assets}/images/icons/globe/globe_light_16x16.png +0 -0
  189. data/{public → app/assets}/images/icons/globe_disconnected/globe_disconnected_16x16.png +0 -0
  190. data/{public → app/assets}/images/icons/globe_disconnected/globe_disconnected_24x24.png +0 -0
  191. data/{public → app/assets}/images/icons/globe_disconnected/globe_disconnected_32x32.png +0 -0
  192. data/{public → app/assets}/images/icons/globe_disconnected/globe_disconnected_48x48.png +0 -0
  193. data/{public → app/assets}/images/icons/google-map/google-map_48x48.png +0 -0
  194. data/{public → app/assets}/images/icons/grid/grid_16x16.png +0 -0
  195. data/{public → app/assets}/images/icons/grid/grid_64x64.png +0 -0
  196. data/app/assets/images/icons/hide/hide_16x16.png +0 -0
  197. data/app/assets/images/icons/hide/hide_32x32.png +0 -0
  198. data/app/assets/images/icons/hide/hide_48x48.png +0 -0
  199. data/{public → app/assets}/images/icons/hierarchy/hierarchy_16x16.png +0 -0
  200. data/{public → app/assets}/images/icons/history/history_16x16.png +0 -0
  201. data/{public → app/assets}/images/icons/history/history_64x64.png +0 -0
  202. data/{public → app/assets}/images/icons/history/history_light_16x16.png +0 -0
  203. data/{public → app/assets}/images/icons/home/home_16x16.png +0 -0
  204. data/{public → app/assets}/images/icons/home/home_48x48.png +0 -0
  205. data/{public → app/assets}/images/icons/ia/ia_16x16.png +0 -0
  206. data/{public → app/assets}/images/icons/index/index_16x16.png +0 -0
  207. data/{public → app/assets}/images/icons/index/index_24x24.png +0 -0
  208. data/{public → app/assets}/images/icons/index/index_32x32.png +0 -0
  209. data/{public → app/assets}/images/icons/index/index_48x48.png +0 -0
  210. data/{public → app/assets}/images/icons/information/information_16x16.png +0 -0
  211. data/app/assets/images/icons/information/information_light_16x16.png +0 -0
  212. data/{public → app/assets}/images/icons/invoicing/invoicing_48x48.png +0 -0
  213. data/{public → app/assets}/images/icons/invoicing/invoicing_64x64.png +0 -0
  214. data/app/assets/images/icons/key/key_105x105.png +0 -0
  215. data/app/assets/images/icons/key/key_105x105_active.png +0 -0
  216. data/app/assets/images/icons/key/key_16x16-light.png +0 -0
  217. data/{public → app/assets}/images/icons/key/key_16x16.png +0 -0
  218. data/{public → app/assets}/images/icons/key/key_64x64.png +0 -0
  219. data/{public → app/assets}/images/icons/knitkit/knitkit_16x16.png +0 -0
  220. data/{public → app/assets}/images/icons/knitkit/knitkit_48x48.png +0 -0
  221. data/{public → app/assets}/images/icons/knitkit/knitkit_light_16x16.png +0 -0
  222. data/app/assets/images/icons/link/link_16x16.png +0 -0
  223. data/app/assets/images/icons/login/login_48x48.png +0 -0
  224. data/{public → app/assets}/images/icons/magnifying-glass/magnifying-glass_48x48.png +0 -0
  225. data/{public → app/assets}/images/icons/mail/mail_16x16.png +0 -0
  226. data/{public → app/assets}/images/icons/mail/mail_24x24.png +0 -0
  227. data/{public → app/assets}/images/icons/mail/mail_32x32.png +0 -0
  228. data/app/assets/images/icons/mail/mail_48x48.png +0 -0
  229. data/app/assets/images/icons/manage_profile/manage_profile_48x48.png +0 -0
  230. data/{public → app/assets}/images/icons/map/map_16x16.png +0 -0
  231. data/{public → app/assets}/images/icons/map/map_24x24.png +0 -0
  232. data/{public → app/assets}/images/icons/map/map_32x32.png +0 -0
  233. data/app/assets/images/icons/map/map_48x48.png +0 -0
  234. data/{public → app/assets}/images/icons/menu/menu_16x16.png +0 -0
  235. data/{public → app/assets}/images/icons/next/next_16x16.png +0 -0
  236. data/{public → app/assets}/images/icons/next/next_24x24.png +0 -0
  237. data/{public → app/assets}/images/icons/next/next_32x32.png +0 -0
  238. data/{public → app/assets}/images/icons/next/next_48x48.png +0 -0
  239. data/{public → app/assets}/images/icons/note/note_16x16.png +0 -0
  240. data/{public → app/assets}/images/icons/note/note_24x24.png +0 -0
  241. data/{public → app/assets}/images/icons/note/note_32x32.png +0 -0
  242. data/{public → app/assets}/images/icons/note/note_48x48.png +0 -0
  243. data/{public → app/assets}/images/icons/ordered_list/ordered_list_16x16.png +0 -0
  244. data/app/assets/images/icons/package/logo.png +0 -0
  245. data/{public → app/assets}/images/icons/package/package_16x16.png +0 -0
  246. data/{public → app/assets}/images/icons/package/package_24x24.png +0 -0
  247. data/{public → app/assets}/images/icons/package/package_32x32.png +0 -0
  248. data/app/assets/images/icons/package/package_48x48.png +0 -0
  249. data/{public → app/assets}/images/icons/package/package_64x64.png +0 -0
  250. data/{public → app/assets}/images/icons/package/package_light_16x16.png +0 -0
  251. data/{public → app/assets}/images/icons/palette/palette_64x64.png +0 -0
  252. data/{public → app/assets}/images/icons/person/person_16x16.png +0 -0
  253. data/{public → app/assets}/images/icons/phone/phone_16x16.png +0 -0
  254. data/{public → app/assets}/images/icons/phone/phone_64x64.png +0 -0
  255. data/{public → app/assets}/images/icons/picture/picture_16x16.png +0 -0
  256. data/{public → app/assets}/images/icons/play/play_16x16.png +0 -0
  257. data/{public → app/assets}/images/icons/preferences/preferences_16x16.png +0 -0
  258. data/{public → app/assets}/images/icons/preferences/preferences_24x24.png +0 -0
  259. data/{public → app/assets}/images/icons/preferences/preferences_32x32.png +0 -0
  260. data/{public → app/assets}/images/icons/preferences/preferences_48x48.png +0 -0
  261. data/{public → app/assets}/images/icons/preview/preview_16x16.png +0 -0
  262. data/{public → app/assets}/images/icons/preview/preview_24x24.png +0 -0
  263. data/{public → app/assets}/images/icons/preview/preview_32x32.png +0 -0
  264. data/{public → app/assets}/images/icons/preview/preview_48x48.png +0 -0
  265. data/{public → app/assets}/images/icons/product/product_16x16.png +0 -0
  266. data/{public → app/assets}/images/icons/product/product_24x24.png +0 -0
  267. data/{public → app/assets}/images/icons/product/product_32x32.png +0 -0
  268. data/app/assets/images/icons/product/product_48x48.png +0 -0
  269. data/{public → app/assets}/images/icons/product/product_64x64.png +0 -0
  270. data/{public → app/assets}/images/icons/product/product_light_16x16.png +0 -0
  271. data/{public → app/assets}/images/icons/properties/properties_16x16.png +0 -0
  272. data/{public → app/assets}/images/icons/properties/properties_24x24.png +0 -0
  273. data/{public → app/assets}/images/icons/properties/properties_32x32.png +0 -0
  274. data/{public → app/assets}/images/icons/properties/properties_48x48.png +0 -0
  275. data/{public → app/assets}/images/icons/query/query_16x16.png +0 -0
  276. data/app/assets/images/icons/recycle/recycle_16x16.png +0 -0
  277. data/{public → app/assets}/images/icons/recycle/recycle_24x24.png +0 -0
  278. data/{public → app/assets}/images/icons/recycle/recycle_32x32.png +0 -0
  279. data/{public → app/assets}/images/icons/recycle/recycle_48x48.png +0 -0
  280. data/{public → app/assets}/images/icons/redo/redo_16x16.png +0 -0
  281. data/{public → app/assets}/images/icons/redo/redo_24x24.png +0 -0
  282. data/{public → app/assets}/images/icons/redo/redo_32x32.png +0 -0
  283. data/{public → app/assets}/images/icons/redo/redo_48x48.png +0 -0
  284. data/{public → app/assets}/images/icons/refresh/refresh_16x16.png +0 -0
  285. data/{public → app/assets}/images/icons/refresh/refresh_24x24.png +0 -0
  286. data/{public → app/assets}/images/icons/refresh/refresh_32x32.png +0 -0
  287. data/{public → app/assets}/images/icons/refresh/refresh_48x48.png +0 -0
  288. data/{public → app/assets}/images/icons/remove/remove_16x16.png +0 -0
  289. data/{public → app/assets}/images/icons/remove/remove_24x24.png +0 -0
  290. data/{public → app/assets}/images/icons/remove/remove_32x32.png +0 -0
  291. data/{public → app/assets}/images/icons/remove/remove_48x48.png +0 -0
  292. data/{public → app/assets}/images/icons/rename/rename_16x16.png +0 -0
  293. data/{public → app/assets}/images/icons/rename/rename_24x24.png +0 -0
  294. data/{public → app/assets}/images/icons/rename/rename_32xr2.png +0 -0
  295. data/{public → app/assets}/images/icons/rename/rename_48x48.png +0 -0
  296. data/{public → app/assets}/images/icons/report/report_16x16.png +0 -0
  297. data/app/assets/images/icons/reset_password/reset_password_48x48.png +0 -0
  298. data/{public → app/assets}/images/icons/rowselect/rowselect_16x16.png +0 -0
  299. data/{public → app/assets}/images/icons/save/save_16x16.png +0 -0
  300. data/{public → app/assets}/images/icons/save/save_24x24.png +0 -0
  301. data/{public → app/assets}/images/icons/save/save_32x32.png +0 -0
  302. data/{public → app/assets}/images/icons/save/save_48x48.png +0 -0
  303. data/{public → app/assets}/images/icons/save_as/save_as_16x16.png +0 -0
  304. data/{public → app/assets}/images/icons/save_as/save_as_24x24.png +0 -0
  305. data/{public → app/assets}/images/icons/save_as/save_as_32x32.png +0 -0
  306. data/{public → app/assets}/images/icons/save_as/save_as_48x48.png +0 -0
  307. data/{public → app/assets}/images/icons/scaffold/scaffold_16x16.png +0 -0
  308. data/{public → app/assets}/images/icons/scaffold/scaffold_light_16x16.png +0 -0
  309. data/{public → app/assets}/images/icons/search/search_16x16.png +0 -0
  310. data/{public → app/assets}/images/icons/search/search_24x24.png +0 -0
  311. data/{public → app/assets}/images/icons/search/search_32x32.png +0 -0
  312. data/app/assets/images/icons/search/search_48x48.png +0 -0
  313. data/{public → app/assets}/images/icons/search/search_light_16x16.png +0 -0
  314. data/{public → app/assets}/images/icons/section/section_16x16.png +0 -0
  315. data/{public → app/assets}/images/icons/section/section_24x24.png +0 -0
  316. data/{public → app/assets}/images/icons/section/section_32x32.png +0 -0
  317. data/{public → app/assets}/images/icons/section/section_48x48.png +0 -0
  318. data/{public → app/assets}/images/icons/section_lock/section_lock_16x16.png +0 -0
  319. data/{public → app/assets}/images/icons/section_lock/section_lock_24x24.png +0 -0
  320. data/{public → app/assets}/images/icons/section_lock/section_lock_32x32.png +0 -0
  321. data/{public → app/assets}/images/icons/section_lock/section_lock_48x48.png +0 -0
  322. data/{public → app/assets}/images/icons/secure/secure_16x16.png +0 -0
  323. data/{public → app/assets}/images/icons/settings/settings_16x16.png +0 -0
  324. data/{public → app/assets}/images/icons/settings/settings_light_16x16.png +0 -0
  325. data/{public → app/assets}/images/icons/shopping_cart/shopping_card_64x64.png +0 -0
  326. data/{public → app/assets}/images/icons/shopping_cart/shopping_cart_32x32.png +0 -0
  327. data/app/assets/images/icons/shopping_cart/shopping_cart_48x48.png +0 -0
  328. data/{public → app/assets}/images/icons/sign_up/sign_up_32x32.png +0 -0
  329. data/app/assets/images/icons/sign_up/sign_up_48x48.png +0 -0
  330. data/{public → app/assets}/images/icons/sign_up/sign_up_64x64.png +0 -0
  331. data/{public → app/assets}/images/icons/simple_arrow/simple_arrow_16x16.png +0 -0
  332. data/{public → app/assets}/images/icons/small_gear/small_gear_16x16.png +0 -0
  333. data/{public → app/assets}/images/icons/sql/sql_16x16.png +0 -0
  334. data/{public → app/assets}/images/icons/tables/tables_16x16.png +0 -0
  335. data/app/assets/images/icons/template/template_16x16.png +0 -0
  336. data/{public → app/assets}/images/icons/theme/theme_16x16.png +0 -0
  337. data/{public → app/assets}/images/icons/theme_upload/theme_upload_16x16.png +0 -0
  338. data/{public → app/assets}/images/icons/ticket/tag_16x16.png +0 -0
  339. data/{public → app/assets}/images/icons/undo/undo_16x16.png +0 -0
  340. data/app/assets/images/icons/unhide/unhide_16x16.png +0 -0
  341. data/app/assets/images/icons/user/user_105x105.png +0 -0
  342. data/app/assets/images/icons/user/user_105x105_active.png +0 -0
  343. data/{public → app/assets}/images/icons/user/user_128x128.png +0 -0
  344. data/{public → app/assets}/images/icons/user/user_16x16.png +0 -0
  345. data/app/assets/images/icons/user/user_48x48.png +0 -0
  346. data/{public → app/assets}/images/icons/user/user_64x64.png +0 -0
  347. data/{public → app/assets}/images/icons/user/user_light_16x16.png +0 -0
  348. data/{public → app/assets}/images/icons/user_mgt/user_mgt_16x16.png +0 -0
  349. data/{public → app/assets}/images/icons/user_mgt/user_mgt_light_16x16.png +0 -0
  350. data/{public → app/assets}/images/icons/vcard/vcard_16x16.png +0 -0
  351. data/{public → app/assets}/images/icons/view/view_16x16.png +0 -0
  352. data/{public → app/assets}/images/icons/view/view_24x24.png +0 -0
  353. data/{public → app/assets}/images/icons/view/view_32x32.png +0 -0
  354. data/{public → app/assets}/images/icons/view/view_48x48.png +0 -0
  355. data/{public → app/assets}/images/icons/warning/waring_16x16.png +0 -0
  356. data/app/assets/images/icons/website/website_105x105.png +0 -0
  357. data/app/assets/images/icons/website/website_105x105_active.png +0 -0
  358. data/{public → app/assets}/images/icons/website/website_16x16.png +0 -0
  359. data/{public → app/assets}/images/icons/website_download/website_download_16x16.png +0 -0
  360. data/{public → app/assets}/images/icons/website_publications/website_publications_16x16.png +0 -0
  361. data/{public → app/assets}/images/icons/website_upload/website_upload_16x16.png +0 -0
  362. data/{public → app/assets}/images/img_blank.png +0 -0
  363. data/{public → app/assets}/images/loading_icon.gif +0 -0
  364. data/app/assets/images/splash/icons/console_icon.png +0 -0
  365. data/app/assets/images/splash/icons/console_icon_active.png +0 -0
  366. data/app/assets/images/splash/icons/db_icon.png +0 -0
  367. data/app/assets/images/splash/icons/db_icon_active.png +0 -0
  368. data/app/assets/images/splash/icons/help_icon.png +0 -0
  369. data/app/assets/images/splash/icons/help_icon_active.png +0 -0
  370. data/{public → app/assets}/images/splash_screen/browse_docs_icon.png +0 -0
  371. data/{public → app/assets}/images/splash_screen/contact_mgt_icon.png +0 -0
  372. data/{public → app/assets}/images/splash_screen/desktop_icon.png +0 -0
  373. data/{public → app/assets}/images/tab/tab-default-close.png +0 -0
  374. data/{public → app/assets}/images/unchecked.gif +0 -0
  375. data/{public → app/assets}/images/wallpaper/truenorth_tech.png +0 -0
  376. data/app/assets/javascripts/codemirror_compassae.js +31 -0
  377. data/app/assets/javascripts/erp_app/authentication/compass_user.js +97 -0
  378. data/app/assets/javascripts/erp_app/desktop/app.js +15 -0
  379. data/app/assets/javascripts/erp_app/desktop/applications/audit_log_viewer/app.js +13 -0
  380. data/app/assets/javascripts/erp_app/desktop/applications/audit_log_viewer/module.js +38 -0
  381. data/app/assets/javascripts/erp_app/desktop/applications/configuration_management/app.js +17 -0
  382. data/{public → app/assets}/javascripts/erp_app/desktop/applications/configuration_management/configuration_options_panel.js +0 -0
  383. data/{public → app/assets}/javascripts/erp_app/desktop/applications/configuration_management/configuration_tree_panel.js +0 -0
  384. data/{public → app/assets}/javascripts/erp_app/desktop/applications/configuration_management/configuration_types_panel.js +0 -0
  385. data/app/assets/javascripts/erp_app/desktop/applications/configuration_management/module.js +96 -0
  386. data/{public/javascripts/erp_app/desktop/applications/configuration_management/stores.0.js → app/assets/javascripts/erp_app/desktop/applications/configuration_management/stores.js} +0 -0
  387. data/app/assets/javascripts/erp_app/desktop/applications/file_manager/app.js +13 -0
  388. data/app/assets/javascripts/erp_app/desktop/applications/file_manager/module.js +134 -0
  389. data/app/assets/javascripts/erp_app/desktop/applications/job_tracker/app.js +14 -0
  390. data/{public → app/assets}/javascripts/erp_app/desktop/applications/job_tracker/jobs_grid.js +0 -0
  391. data/app/assets/javascripts/erp_app/desktop/applications/job_tracker/module.js +44 -0
  392. data/app/assets/javascripts/erp_app/desktop/applications/security_management/app.js +24 -0
  393. data/app/assets/javascripts/erp_app/desktop/applications/security_management/capabilities_panel.js +54 -0
  394. data/app/assets/javascripts/erp_app/desktop/applications/security_management/capabilities_widget.js +245 -0
  395. data/{public → app/assets}/javascripts/erp_app/desktop/applications/security_management/common_widget.js +0 -0
  396. data/app/assets/javascripts/erp_app/desktop/applications/security_management/groups_effective_security.js +80 -0
  397. data/app/assets/javascripts/erp_app/desktop/applications/security_management/groups_panel.js +271 -0
  398. data/app/assets/javascripts/erp_app/desktop/applications/security_management/groups_widget.js +245 -0
  399. data/app/assets/javascripts/erp_app/desktop/applications/security_management/mixins/widget.js +39 -0
  400. data/app/assets/javascripts/erp_app/desktop/applications/security_management/module.js +155 -0
  401. data/app/assets/javascripts/erp_app/desktop/applications/security_management/north_panel.js +23 -0
  402. data/app/assets/javascripts/erp_app/desktop/applications/security_management/roles_panel.js +334 -0
  403. data/app/assets/javascripts/erp_app/desktop/applications/security_management/roles_widget.js +258 -0
  404. data/app/assets/javascripts/erp_app/desktop/applications/security_management/south_panel.js +70 -0
  405. data/app/assets/javascripts/erp_app/desktop/applications/system_management/app.js +15 -0
  406. data/app/assets/javascripts/erp_app/desktop/applications/system_management/form.js +100 -0
  407. data/app/assets/javascripts/erp_app/desktop/applications/system_management/module.js +227 -0
  408. data/app/assets/javascripts/erp_app/desktop/applications/system_management/stores.js +48 -0
  409. data/app/assets/javascripts/erp_app/desktop/applications/tail/app.js +14 -0
  410. data/{public → app/assets}/javascripts/erp_app/desktop/applications/tail/module.js +0 -0
  411. data/{public → app/assets}/javascripts/erp_app/desktop/applications/tail/tail_panel.js +0 -0
  412. data/app/assets/javascripts/erp_app/desktop/applications/user_management/app.js +13 -0
  413. data/app/assets/javascripts/erp_app/desktop/applications/user_management/module.js +454 -0
  414. data/app/assets/javascripts/erp_app/desktop/applications/web_navigator/app.js +13 -0
  415. data/{public → app/assets}/javascripts/erp_app/desktop/applications/web_navigator/module.js +0 -0
  416. data/app/assets/javascripts/erp_app/desktop/ext_ux_desktop_module.js +1016 -0
  417. data/app/assets/javascripts/erp_app/desktop/select_roles_window.js +267 -0
  418. data/app/assets/javascripts/erp_app/ecommerce/credit_card_window.js +343 -0
  419. data/app/assets/javascripts/erp_app/jquery_support.js +45 -0
  420. data/app/assets/javascripts/erp_app/login/ResetPassword.js +128 -0
  421. data/app/assets/javascripts/erp_app/login/mobile.js +77 -0
  422. data/app/assets/javascripts/erp_app/login/window.js +238 -0
  423. data/app/assets/javascripts/erp_app/organizer/app.js +15 -0
  424. data/app/assets/javascripts/erp_app/organizer/applications/crm/app.js +14 -0
  425. data/app/assets/javascripts/erp_app/organizer/applications/crm/base.js +64 -0
  426. data/{public → app/assets}/javascripts/erp_app/organizer/applications/crm/relationship_grid.js +0 -0
  427. data/app/assets/javascripts/erp_app/organizer/layout.js +258 -0
  428. data/{public → app/assets}/javascripts/erp_app/organizer/preference_window.js +0 -0
  429. data/app/assets/javascripts/erp_app/shared/DateTimeField.js +77 -0
  430. data/app/assets/javascripts/erp_app/shared/MoneyField.js +120 -0
  431. data/app/assets/javascripts/erp_app/shared/MultiOptions.js +182 -0
  432. data/app/assets/javascripts/erp_app/shared/Party/AppsInstalledPanel.js +302 -0
  433. data/app/assets/javascripts/erp_app/shared/Party/LoginInfoPanel.js +291 -0
  434. data/app/assets/javascripts/erp_app/shared/Party/SecurityPanel.js +448 -0
  435. data/app/assets/javascripts/erp_app/shared/Party/UserTypePanel.js +198 -0
  436. data/{public → app/assets}/javascripts/erp_app/shared/PartySearchField.js +0 -0
  437. data/app/assets/javascripts/erp_app/shared/TimePickerField.js +189 -0
  438. data/{public → app/assets}/javascripts/erp_app/shared/TransitionCardLayout.js +0 -0
  439. data/app/assets/javascripts/erp_app/shared/TypeSelectionTree.js +510 -0
  440. data/app/assets/javascripts/erp_app/shared/active_ext/active_ext_grid.js +351 -0
  441. data/{public → app/assets}/javascripts/erp_app/shared/active_ext/active_ext_grid_panel.js +0 -0
  442. data/app/assets/javascripts/erp_app/shared/audit_log/GridPanel.js +214 -0
  443. data/{public → app/assets}/javascripts/erp_app/shared/audit_log/ItemGridPanel.js +0 -0
  444. data/app/assets/javascripts/erp_app/shared/audit_log/TabPanel.js +116 -0
  445. data/app/assets/javascripts/erp_app/shared/compass_ckeditor.js +267 -0
  446. data/app/assets/javascripts/erp_app/shared/compass_codemirror.js +464 -0
  447. data/{public → app/assets}/javascripts/erp_app/shared/configuration/configuration_form.js +0 -0
  448. data/app/assets/javascripts/erp_app/shared/configuration/configuration_panel.js +141 -0
  449. data/{public → app/assets}/javascripts/erp_app/shared/coolclock/tray_clock2.js +0 -0
  450. data/app/assets/javascripts/erp_app/shared/crm/ContactMechanismGrid.js +754 -0
  451. data/app/assets/javascripts/erp_app/shared/crm/PartyDetailsPanel.js +344 -0
  452. data/app/assets/javascripts/erp_app/shared/crm/PartyForm.js +321 -0
  453. data/{public → app/assets}/javascripts/erp_app/shared/crm/PartyFormPanel.js +0 -0
  454. data/app/assets/javascripts/erp_app/shared/crm/PartyGrid.js +595 -0
  455. data/app/assets/javascripts/erp_app/shared/crm/UserForm.js +302 -0
  456. data/app/assets/javascripts/erp_app/shared/crm/UsersGrid.js +535 -0
  457. data/app/assets/javascripts/erp_app/shared/dynamic_editable_grid.js +181 -0
  458. data/app/assets/javascripts/erp_app/shared/dynamic_editable_grid_loader_panel.js +65 -0
  459. data/app/assets/javascripts/erp_app/shared/dynamic_form_fields.js +104 -0
  460. data/{public → app/assets}/javascripts/erp_app/shared/encryption/encryption.js +0 -0
  461. data/app/assets/javascripts/erp_app/shared/erp_app_shared.js +13 -0
  462. data/app/assets/javascripts/erp_app/shared/file_manager_tree.js +750 -0
  463. data/app/assets/javascripts/erp_app/shared/file_upload/Ext.ux.panel.UploadPanel.js +581 -0
  464. data/{public → app/assets}/javascripts/erp_app/shared/file_upload/plupload.flash.swf +0 -0
  465. data/{public → app/assets}/javascripts/erp_app/shared/file_upload/plupload.full.js +0 -0
  466. data/{public → app/assets}/javascripts/erp_app/shared/file_upload/plupload.silverlight.xap +0 -0
  467. data/app/assets/javascripts/erp_app/shared/file_upload/upload_window.js +65 -0
  468. data/{public → app/assets}/javascripts/erp_app/shared/google_map_panel.js +0 -0
  469. data/app/assets/javascripts/erp_app/shared/notes_grid.js +338 -0
  470. data/{public → app/assets}/javascripts/erp_app/shared/preferences/application_management_panel.js +0 -0
  471. data/{public → app/assets}/javascripts/erp_app/shared/preferences/form.js +0 -0
  472. data/app/assets/javascripts/erp_app/shared/profile_management_panel.js +140 -0
  473. data/{public → app/assets}/javascripts/erp_app/shared/status_window.js +0 -0
  474. data/app/assets/javascripts/erp_app/utility.js +809 -0
  475. data/app/assets/javascripts/erp_app/widgets.js +122 -0
  476. data/{public → app/assets}/javascripts/jquery_plugins/jquery.address.min.js +0 -0
  477. data/{public → app/assets}/javascripts/jquery_plugins/jquery.loadmask.min.js +0 -0
  478. data/app/assets/stylesheets/codemirror_compassae.css +14 -0
  479. data/app/assets/stylesheets/erp_app/desktop/applications/audit_log_viewer/app.css +11 -0
  480. data/app/assets/stylesheets/erp_app/desktop/applications/configuration_management/app.css +11 -0
  481. data/app/assets/stylesheets/erp_app/desktop/applications/file_manager/app.css +11 -0
  482. data/app/assets/stylesheets/erp_app/desktop/applications/job_tracker/app.css +11 -0
  483. data/app/assets/stylesheets/erp_app/desktop/applications/scaffold/app.css +11 -0
  484. data/app/assets/stylesheets/erp_app/desktop/applications/security_management/app.css +12 -0
  485. data/{public → app/assets}/stylesheets/erp_app/desktop/applications/security_management/styles.css +0 -0
  486. data/app/assets/stylesheets/erp_app/desktop/applications/tail/app.css +11 -0
  487. data/app/assets/stylesheets/erp_app/desktop/applications/user_management/app.css +11 -0
  488. data/app/assets/stylesheets/erp_app/desktop/base.css +262 -0
  489. data/app/assets/stylesheets/erp_app/login/main.css +17 -0
  490. data/app/assets/stylesheets/erp_app/organizer/applications/crm/app.css +12 -0
  491. data/app/assets/stylesheets/erp_app/organizer/base.css +19 -0
  492. data/app/assets/stylesheets/erp_app/shared/compass-ext-all.css +599 -0
  493. data/app/assets/stylesheets/erp_app/shared/crm.css +45 -0
  494. data/app/assets/stylesheets/erp_app/shared/erp_app_shared.css +12 -0
  495. data/{public → app/assets}/stylesheets/erp_app/shared/grid_cell.css +0 -0
  496. data/{public → app/assets}/stylesheets/erp_app/shared/hover_finger.css +0 -0
  497. data/app/assets/stylesheets/jquery_plugins/jquery.loadmask.css +53 -0
  498. data/app/controllers/api/v1/applications_controller.rb +179 -0
  499. data/app/controllers/erp_app/application_controller.rb +7 -1
  500. data/app/controllers/erp_app/desktop/base_controller.rb +0 -1
  501. data/app/controllers/erp_app/desktop/file_manager/base_controller.rb +5 -3
  502. data/app/controllers/erp_app/desktop/system_management/types_controller.rb +126 -0
  503. data/app/controllers/erp_app/desktop/user_management/application_management_controller.rb +68 -36
  504. data/app/controllers/erp_app/desktop/user_management/base_controller.rb +0 -0
  505. data/app/controllers/erp_app/desktop/user_management/role_management_controller.rb +0 -0
  506. data/app/controllers/erp_app/login_controller.rb +30 -2
  507. data/app/controllers/erp_app/organizer/base_controller.rb +3 -30
  508. data/app/controllers/erp_app/organizer/crm/contact_mechanisms_controller.rb +4 -2
  509. data/app/controllers/erp_app/organizer/crm/parties_controller.rb +26 -2
  510. data/app/controllers/erp_app/organizer/crm/users_controller.rb +22 -0
  511. data/app/controllers/erp_app/public_controller.rb +3 -0
  512. data/app/controllers/erp_app/shared/audit_log_controller.rb +1 -1
  513. data/app/controllers/erp_app/shared/configuration_controller.rb +1 -1
  514. data/app/controllers/erp_app/shared/notes_controller.rb +0 -6
  515. data/app/controllers/erp_app/widget_proxy_controller.rb +19 -5
  516. data/app/mailers/crm_mailer.rb +2 -1
  517. data/app/models/application.rb +88 -6
  518. data/app/models/configuration.rb +7 -0
  519. data/app/models/configuration_item.rb +6 -0
  520. data/app/models/extensions/party.rb +9 -0
  521. data/app/models/extensions/user.rb +42 -15
  522. data/app/models/preference_type.rb +1 -1
  523. data/app/views/erp_app/desktop/base/index.erb +253 -203
  524. data/app/views/erp_app/login/index.erb +28 -20
  525. data/app/views/erp_app/login/reset_password.erb +30 -0
  526. data/app/views/erp_app/organizer/base/index.erb +28 -23
  527. data/app/views/erp_app/organizer/crm/parties/details.erb +1 -1
  528. data/config/routes.rb +29 -17
  529. data/db/data_migrations/20110728201729_erp_app_setup.rb +168 -240
  530. data/db/data_migrations/20110728201730_add_system_management_tool.rb +27 -0
  531. data/db/data_migrations/20150929185612_add_applications_to_dba_org.rb +31 -0
  532. data/db/migrate/20080805000096_base_app_framework.rb +36 -44
  533. data/lib/erp_app.rb +2 -2
  534. data/lib/erp_app/config.rb +9 -3
  535. data/lib/erp_app/engine.rb +114 -12
  536. data/lib/erp_app/extensions/compass_ae/erp_tech_svcs/session_controller.rb +27 -0
  537. data/lib/erp_app/extensions/railties/action_view/base.rb +32 -6
  538. data/lib/erp_app/extensions/railties/action_view/helpers/include_helper.rb +37 -30
  539. data/lib/erp_app/version.rb +1 -1
  540. data/lib/erp_app/widgets/base.rb +6 -4
  541. data/lib/erp_app/widgets/loader.rb +1 -1
  542. data/lib/erp_app/widgets/railties/action_view/helpers/widget_helper.rb +12 -12
  543. data/lib/generators/admin_tool/USAGE +23 -0
  544. data/lib/generators/admin_tool/admin_tool_generator.rb +28 -0
  545. data/lib/generators/admin_tool/templates/INSTALL +23 -0
  546. data/lib/generators/{desktop_application/templates/public/module.js.erb → admin_tool/templates/assets/javascripts/Module.js.erb} +0 -0
  547. data/lib/generators/admin_tool/templates/assets/javascripts/app.js.erb +17 -0
  548. data/lib/generators/admin_tool/templates/assets/stylesheets/app.css.erb +11 -0
  549. data/lib/generators/{desktop_application → admin_tool}/templates/controllers/controller_template.erb +0 -0
  550. data/lib/generators/{desktop_application → admin_tool}/templates/migrate/migration_template.erb +0 -0
  551. data/lib/generators/application/USAGE +23 -0
  552. data/lib/generators/application/application_generator.rb +28 -0
  553. data/lib/generators/application/templates/INSTALL +23 -0
  554. data/lib/generators/application/templates/assets/javascripts/Application.js.erb +20 -0
  555. data/lib/generators/application/templates/assets/javascripts/app.js.erb +17 -0
  556. data/lib/generators/application/templates/assets/stylesheets/app.css.erb +11 -0
  557. data/lib/generators/application/templates/controllers/controller_template.erb +9 -0
  558. data/lib/generators/application/templates/migrate/migration_template.erb +21 -0
  559. data/lib/generators/cms_widget/templates/engine/engine_template.erb +2 -2
  560. data/lib/generators/cms_widget/templates/helpers/controller/controller_helper_template.erb +1 -1
  561. data/lib/generators/cms_widget/templates/helpers/view/view_helper_template.erb +1 -1
  562. data/lib/generators/cms_widget/templates/javascript/base.js.erb +1 -1
  563. data/public/javascripts/{erp_app/ckeditor → ckeditor}/ckeditor.js +0 -0
  564. data/public/javascripts/ckeditor/config.js +14 -0
  565. data/public/javascripts/{erp_app/ckeditor → ckeditor}/contents.css +0 -0
  566. data/public/javascripts/{erp_app/ckeditor → ckeditor}/lang/en.js +0 -0
  567. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/a11yhelp.js +0 -0
  568. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/_translationstatus.txt +0 -0
  569. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/ar.js +0 -0
  570. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/bg.js +0 -0
  571. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/ca.js +0 -0
  572. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/cs.js +0 -0
  573. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/cy.js +0 -0
  574. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/da.js +0 -0
  575. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/de.js +0 -0
  576. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/el.js +0 -0
  577. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/en.js +0 -0
  578. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/eo.js +0 -0
  579. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/es.js +0 -0
  580. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/et.js +0 -0
  581. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/fa.js +0 -0
  582. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/fi.js +0 -0
  583. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/fr-ca.js +0 -0
  584. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/fr.js +0 -0
  585. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/gl.js +0 -0
  586. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/gu.js +0 -0
  587. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/he.js +0 -0
  588. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/hi.js +0 -0
  589. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/hr.js +0 -0
  590. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/hu.js +0 -0
  591. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/id.js +0 -0
  592. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/it.js +0 -0
  593. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/ja.js +0 -0
  594. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/km.js +0 -0
  595. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/ku.js +0 -0
  596. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/lt.js +0 -0
  597. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/lv.js +0 -0
  598. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/mk.js +0 -0
  599. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/mn.js +0 -0
  600. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/nb.js +0 -0
  601. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/nl.js +0 -0
  602. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/no.js +0 -0
  603. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/pl.js +0 -0
  604. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/pt-br.js +0 -0
  605. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/pt.js +0 -0
  606. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/ro.js +0 -0
  607. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/ru.js +0 -0
  608. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/si.js +0 -0
  609. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/sk.js +0 -0
  610. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/sl.js +0 -0
  611. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/sq.js +0 -0
  612. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/sr-latn.js +0 -0
  613. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/sr.js +0 -0
  614. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/sv.js +0 -0
  615. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/th.js +0 -0
  616. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/tr.js +0 -0
  617. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/ug.js +0 -0
  618. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/uk.js +0 -0
  619. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/vi.js +0 -0
  620. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/a11yhelp/dialogs/lang/zh-cn.js +0 -0
  621. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/about/dialogs/about.js +0 -0
  622. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/about/dialogs/hidpi/logo_ckeditor.png +0 -0
  623. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/about/dialogs/logo_ckeditor.png +0 -0
  624. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/clipboard/dialogs/paste.js +0 -0
  625. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/codemirror/lang/en.js +0 -0
  626. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/codemirror/plugin.js +0 -0
  627. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/colordialog/dialogs/colordialog.js +0 -0
  628. data/public/javascripts/ckeditor/plugins/compasssave/plugin.js +22 -0
  629. data/public/javascripts/ckeditor/plugins/dialog/dialogDefinition.js +1006 -0
  630. data/public/javascripts/ckeditor/plugins/dialog/plugin.js +3232 -0
  631. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/div/dialogs/div.js +0 -0
  632. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/fakeobjects/images/spacer.gif +0 -0
  633. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/find/dialogs/find.js +0 -0
  634. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/flash/dialogs/flash.js +0 -0
  635. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/flash/images/placeholder.png +0 -0
  636. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/forms/dialogs/button.js +0 -0
  637. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/forms/dialogs/checkbox.js +0 -0
  638. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/forms/dialogs/form.js +0 -0
  639. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/forms/dialogs/hiddenfield.js +0 -0
  640. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/forms/dialogs/radio.js +0 -0
  641. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/forms/dialogs/select.js +0 -0
  642. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/forms/dialogs/textarea.js +0 -0
  643. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/forms/dialogs/textfield.js +0 -0
  644. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/forms/images/hiddenfield.gif +0 -0
  645. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/icons.png +0 -0
  646. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/icons_hidpi.png +0 -0
  647. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/iframe/dialogs/iframe.js +0 -0
  648. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/iframe/images/placeholder.png +0 -0
  649. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/image/dialogs/image.js +0 -0
  650. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/image/images/noimage.png +0 -0
  651. data/public/javascripts/ckeditor/plugins/inlineeditsave/plugin.js +42 -0
  652. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/jwplayer/config.js +0 -0
  653. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/jwplayer/dialogs/jwplayer.js +0 -0
  654. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/jwplayer/help.txt +0 -0
  655. data/public/javascripts/erp_app/ckeditor/plugins/jwplayer/jwplayer/JW Player Quick Start Guide.pdf b/data/public/javascripts/ckeditor/plugins/jwplayer/jwplayer/JW Player Quick Start → Guide.pdf +0 -0
  656. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/jwplayer/jwplayer/jwPlayer.gif +0 -0
  657. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/jwplayer/jwplayer/jwplayer.js +0 -0
  658. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/jwplayer/jwplayer/license.txt +0 -0
  659. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/jwplayer/jwplayer/player.swf +0 -0
  660. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/jwplayer/jwplayer/preview.jpg +0 -0
  661. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/jwplayer/jwplayer/readme.html +0 -0
  662. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/jwplayer/jwplayer/skin/beelden.zip +0 -0
  663. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/jwplayer/jwplayer/skin/glow.zip +0 -0
  664. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/jwplayer/jwplayer/skin/modieus.zip +0 -0
  665. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/jwplayer/jwplayer/skin/simple.zip +0 -0
  666. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/jwplayer/jwplayer/skin/snel.zip +0 -0
  667. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/jwplayer/jwplayer/skin/stijl.zip +0 -0
  668. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/jwplayer/jwplayer/skin/stormtrooper.zip +0 -0
  669. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/jwplayer/jwplayer/swfobject.js +0 -0
  670. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/jwplayer/jwplayer/video.mp4 +0 -0
  671. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/jwplayer/jwplayer/yt.swf +0 -0
  672. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/jwplayer/plugin.js +0 -0
  673. data/public/javascripts/ckeditor/plugins/knitkitthemes/plugin.js +116 -0
  674. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/link/dialogs/anchor.js +0 -0
  675. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/link/dialogs/link.js +0 -0
  676. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/link/images/anchor.png +0 -0
  677. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/link/images/hidpi/anchor.png +0 -0
  678. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/liststyle/dialogs/liststyle.js +0 -0
  679. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/magicline/images/hidpi/icon.png +0 -0
  680. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/magicline/images/icon.png +0 -0
  681. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/pagebreak/images/pagebreak.gif +0 -0
  682. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/pastefromword/filter/default.js +0 -0
  683. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/preview/preview.html +0 -0
  684. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/scayt/LICENSE.md +0 -0
  685. data/public/javascripts/ckeditor/plugins/scayt/README.md +25 -0
  686. data/public/javascripts/ckeditor/plugins/scayt/dialogs/options.js +473 -0
  687. data/public/javascripts/ckeditor/plugins/scayt/dialogs/toolbar.css +71 -0
  688. data/public/javascripts/ckeditor/plugins/scayt/icons/hidpi/scayt.png +0 -0
  689. data/public/javascripts/ckeditor/plugins/scayt/icons/scayt.png +0 -0
  690. data/public/javascripts/ckeditor/plugins/scayt/lang/af.js +34 -0
  691. data/public/javascripts/ckeditor/plugins/scayt/lang/ar.js +34 -0
  692. data/public/javascripts/ckeditor/plugins/scayt/lang/bg.js +34 -0
  693. data/public/javascripts/ckeditor/plugins/scayt/lang/bn.js +34 -0
  694. data/public/javascripts/ckeditor/plugins/scayt/lang/bs.js +34 -0
  695. data/public/javascripts/ckeditor/plugins/scayt/lang/ca.js +34 -0
  696. data/public/javascripts/ckeditor/plugins/scayt/lang/cs.js +34 -0
  697. data/public/javascripts/ckeditor/plugins/scayt/lang/cy.js +34 -0
  698. data/public/javascripts/ckeditor/plugins/scayt/lang/da.js +34 -0
  699. data/public/javascripts/ckeditor/plugins/scayt/lang/de.js +34 -0
  700. data/public/javascripts/ckeditor/plugins/scayt/lang/el.js +34 -0
  701. data/public/javascripts/ckeditor/plugins/scayt/lang/en-au.js +34 -0
  702. data/public/javascripts/ckeditor/plugins/scayt/lang/en-ca.js +34 -0
  703. data/public/javascripts/ckeditor/plugins/scayt/lang/en-gb.js +34 -0
  704. data/public/javascripts/ckeditor/plugins/scayt/lang/en.js +34 -0
  705. data/public/javascripts/ckeditor/plugins/scayt/lang/eo.js +34 -0
  706. data/public/javascripts/ckeditor/plugins/scayt/lang/es.js +34 -0
  707. data/public/javascripts/ckeditor/plugins/scayt/lang/et.js +34 -0
  708. data/public/javascripts/ckeditor/plugins/scayt/lang/eu.js +34 -0
  709. data/public/javascripts/ckeditor/plugins/scayt/lang/fa.js +34 -0
  710. data/public/javascripts/ckeditor/plugins/scayt/lang/fi.js +34 -0
  711. data/public/javascripts/ckeditor/plugins/scayt/lang/fo.js +34 -0
  712. data/public/javascripts/ckeditor/plugins/scayt/lang/fr-ca.js +34 -0
  713. data/public/javascripts/ckeditor/plugins/scayt/lang/fr.js +34 -0
  714. data/public/javascripts/ckeditor/plugins/scayt/lang/gl.js +34 -0
  715. data/public/javascripts/ckeditor/plugins/scayt/lang/gu.js +34 -0
  716. data/public/javascripts/ckeditor/plugins/scayt/lang/he.js +34 -0
  717. data/public/javascripts/ckeditor/plugins/scayt/lang/hi.js +34 -0
  718. data/public/javascripts/ckeditor/plugins/scayt/lang/hr.js +34 -0
  719. data/public/javascripts/ckeditor/plugins/scayt/lang/hu.js +34 -0
  720. data/public/javascripts/ckeditor/plugins/scayt/lang/is.js +34 -0
  721. data/public/javascripts/ckeditor/plugins/scayt/lang/it.js +34 -0
  722. data/public/javascripts/ckeditor/plugins/scayt/lang/ja.js +34 -0
  723. data/public/javascripts/ckeditor/plugins/scayt/lang/ka.js +34 -0
  724. data/public/javascripts/ckeditor/plugins/scayt/lang/km.js +34 -0
  725. data/public/javascripts/ckeditor/plugins/scayt/lang/ko.js +34 -0
  726. data/public/javascripts/ckeditor/plugins/scayt/lang/ku.js +34 -0
  727. data/public/javascripts/ckeditor/plugins/scayt/lang/lt.js +34 -0
  728. data/public/javascripts/ckeditor/plugins/scayt/lang/lv.js +34 -0
  729. data/public/javascripts/ckeditor/plugins/scayt/lang/mk.js +34 -0
  730. data/public/javascripts/ckeditor/plugins/scayt/lang/mn.js +34 -0
  731. data/public/javascripts/ckeditor/plugins/scayt/lang/ms.js +34 -0
  732. data/public/javascripts/ckeditor/plugins/scayt/lang/nb.js +34 -0
  733. data/public/javascripts/ckeditor/plugins/scayt/lang/nl.js +34 -0
  734. data/public/javascripts/ckeditor/plugins/scayt/lang/no.js +34 -0
  735. data/public/javascripts/ckeditor/plugins/scayt/lang/pl.js +34 -0
  736. data/public/javascripts/ckeditor/plugins/scayt/lang/pt-br.js +34 -0
  737. data/public/javascripts/ckeditor/plugins/scayt/lang/pt.js +34 -0
  738. data/public/javascripts/ckeditor/plugins/scayt/lang/ro.js +34 -0
  739. data/public/javascripts/ckeditor/plugins/scayt/lang/ru.js +34 -0
  740. data/public/javascripts/ckeditor/plugins/scayt/lang/sk.js +34 -0
  741. data/public/javascripts/ckeditor/plugins/scayt/lang/sl.js +34 -0
  742. data/public/javascripts/ckeditor/plugins/scayt/lang/sr-latn.js +34 -0
  743. data/public/javascripts/ckeditor/plugins/scayt/lang/sr.js +34 -0
  744. data/public/javascripts/ckeditor/plugins/scayt/lang/sv.js +34 -0
  745. data/public/javascripts/ckeditor/plugins/scayt/lang/th.js +34 -0
  746. data/public/javascripts/ckeditor/plugins/scayt/lang/tr.js +34 -0
  747. data/public/javascripts/ckeditor/plugins/scayt/lang/ug.js +34 -0
  748. data/public/javascripts/ckeditor/plugins/scayt/lang/uk.js +34 -0
  749. data/public/javascripts/ckeditor/plugins/scayt/lang/vi.js +34 -0
  750. data/public/javascripts/ckeditor/plugins/scayt/lang/zh-cn.js +34 -0
  751. data/public/javascripts/ckeditor/plugins/scayt/lang/zh.js +34 -0
  752. data/public/javascripts/ckeditor/plugins/scayt/plugin.js +894 -0
  753. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/showblocks/images/block_address.png +0 -0
  754. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/showblocks/images/block_blockquote.png +0 -0
  755. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/showblocks/images/block_div.png +0 -0
  756. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/showblocks/images/block_h1.png +0 -0
  757. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/showblocks/images/block_h2.png +0 -0
  758. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/showblocks/images/block_h3.png +0 -0
  759. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/showblocks/images/block_h4.png +0 -0
  760. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/showblocks/images/block_h5.png +0 -0
  761. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/showblocks/images/block_h6.png +0 -0
  762. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/showblocks/images/block_p.png +0 -0
  763. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/showblocks/images/block_pre.png +0 -0
  764. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/smiley/dialogs/smiley.js +0 -0
  765. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/smiley/images/angel_smile.gif +0 -0
  766. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/smiley/images/angry_smile.gif +0 -0
  767. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/smiley/images/broken_heart.gif +0 -0
  768. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/smiley/images/confused_smile.gif +0 -0
  769. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/smiley/images/cry_smile.gif +0 -0
  770. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/smiley/images/devil_smile.gif +0 -0
  771. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/smiley/images/embaressed_smile.gif +0 -0
  772. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/smiley/images/embarrassed_smile.gif +0 -0
  773. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/smiley/images/envelope.gif +0 -0
  774. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/smiley/images/heart.gif +0 -0
  775. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/smiley/images/kiss.gif +0 -0
  776. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/smiley/images/lightbulb.gif +0 -0
  777. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/smiley/images/omg_smile.gif +0 -0
  778. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/smiley/images/regular_smile.gif +0 -0
  779. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/smiley/images/sad_smile.gif +0 -0
  780. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/smiley/images/shades_smile.gif +0 -0
  781. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/smiley/images/teeth_smile.gif +0 -0
  782. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/smiley/images/thumbs_down.gif +0 -0
  783. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/smiley/images/thumbs_up.gif +0 -0
  784. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/smiley/images/tongue_smile.gif +0 -0
  785. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/smiley/images/tounge_smile.gif +0 -0
  786. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
  787. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/smiley/images/wink_smile.gif +0 -0
  788. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/lang/_translationstatus.txt +0 -0
  789. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/lang/ar.js +0 -0
  790. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/lang/bg.js +0 -0
  791. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/lang/ca.js +0 -0
  792. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/lang/cs.js +0 -0
  793. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/lang/cy.js +0 -0
  794. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/lang/de.js +0 -0
  795. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/lang/el.js +0 -0
  796. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/lang/en.js +0 -0
  797. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/lang/eo.js +0 -0
  798. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/lang/es.js +0 -0
  799. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/lang/et.js +0 -0
  800. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/lang/fa.js +0 -0
  801. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/lang/fi.js +0 -0
  802. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/lang/fr-ca.js +0 -0
  803. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/lang/fr.js +0 -0
  804. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/lang/gl.js +0 -0
  805. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/lang/he.js +0 -0
  806. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/lang/hr.js +0 -0
  807. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/lang/hu.js +0 -0
  808. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/lang/id.js +0 -0
  809. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/lang/it.js +0 -0
  810. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/lang/ja.js +0 -0
  811. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/lang/ku.js +0 -0
  812. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/lang/lv.js +0 -0
  813. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/lang/nb.js +0 -0
  814. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/lang/nl.js +0 -0
  815. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/lang/no.js +0 -0
  816. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/lang/pl.js +0 -0
  817. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/lang/pt-br.js +0 -0
  818. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/lang/pt.js +0 -0
  819. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/lang/ru.js +0 -0
  820. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/lang/si.js +0 -0
  821. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/lang/sk.js +0 -0
  822. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/lang/sl.js +0 -0
  823. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/lang/sq.js +0 -0
  824. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/lang/sv.js +0 -0
  825. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/lang/th.js +0 -0
  826. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/lang/tr.js +0 -0
  827. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/lang/ug.js +0 -0
  828. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/lang/uk.js +0 -0
  829. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/lang/vi.js +0 -0
  830. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/lang/zh-cn.js +0 -0
  831. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/specialchar/dialogs/specialchar.js +0 -0
  832. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/syntaxhighlight/dialogs/syntaxhighlight.js +0 -0
  833. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/syntaxhighlight/icons/syntaxhighlight.png +0 -0
  834. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/syntaxhighlight/lang/de.js +0 -0
  835. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/syntaxhighlight/lang/en.js +0 -0
  836. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/syntaxhighlight/lang/fr.js +0 -0
  837. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/syntaxhighlight/lang/zh-cn.js +0 -0
  838. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/syntaxhighlight/plugin.js +0 -0
  839. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/table/dialogs/table.js +0 -0
  840. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/tabletools/dialogs/tableCell.js +0 -0
  841. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/templates/dialogs/templates.css +0 -0
  842. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/templates/dialogs/templates.js +0 -0
  843. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/templates/templates/default.js +0 -0
  844. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/templates/templates/images/template1.gif +0 -0
  845. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/templates/templates/images/template2.gif +0 -0
  846. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/templates/templates/images/template3.gif +0 -0
  847. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/wsc/LICENSE.md +0 -0
  848. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/wsc/README.md +0 -0
  849. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/wsc/dialogs/ciframe.html +0 -0
  850. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/wsc/dialogs/tmp.html +0 -0
  851. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/wsc/dialogs/tmpFrameset.html +0 -0
  852. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/wsc/dialogs/wsc.css +0 -0
  853. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/wsc/dialogs/wsc.js +0 -0
  854. data/public/javascripts/{erp_app/ckeditor → ckeditor}/plugins/wsc/dialogs/wsc_ie.js +0 -0
  855. data/public/javascripts/{erp_app/ckeditor → ckeditor}/skins/moono/dialog.css +0 -0
  856. data/public/javascripts/{erp_app/ckeditor → ckeditor}/skins/moono/dialog_ie.css +0 -0
  857. data/public/javascripts/{erp_app/ckeditor → ckeditor}/skins/moono/dialog_ie7.css +0 -0
  858. data/public/javascripts/{erp_app/ckeditor → ckeditor}/skins/moono/dialog_ie8.css +0 -0
  859. data/public/javascripts/{erp_app/ckeditor → ckeditor}/skins/moono/dialog_iequirks.css +0 -0
  860. data/public/javascripts/{erp_app/ckeditor → ckeditor}/skins/moono/dialog_opera.css +0 -0
  861. data/public/javascripts/{erp_app/ckeditor → ckeditor}/skins/moono/editor.css +0 -0
  862. data/public/javascripts/{erp_app/ckeditor → ckeditor}/skins/moono/editor_gecko.css +0 -0
  863. data/public/javascripts/{erp_app/ckeditor → ckeditor}/skins/moono/editor_ie.css +0 -0
  864. data/public/javascripts/{erp_app/ckeditor → ckeditor}/skins/moono/editor_ie7.css +0 -0
  865. data/public/javascripts/{erp_app/ckeditor → ckeditor}/skins/moono/editor_ie8.css +0 -0
  866. data/public/javascripts/{erp_app/ckeditor → ckeditor}/skins/moono/editor_iequirks.css +0 -0
  867. data/public/javascripts/{erp_app/ckeditor → ckeditor}/skins/moono/icons.png +0 -0
  868. data/public/javascripts/{erp_app/ckeditor → ckeditor}/skins/moono/icons_hidpi.png +0 -0
  869. data/public/javascripts/{erp_app/ckeditor → ckeditor}/skins/moono/images/arrow.png +0 -0
  870. data/public/javascripts/{erp_app/ckeditor → ckeditor}/skins/moono/images/close.png +0 -0
  871. data/public/javascripts/{erp_app/ckeditor → ckeditor}/skins/moono/images/hidpi/close.png +0 -0
  872. data/public/javascripts/{erp_app/ckeditor → ckeditor}/skins/moono/images/hidpi/lock-open.png +0 -0
  873. data/public/javascripts/{erp_app/ckeditor → ckeditor}/skins/moono/images/hidpi/lock.png +0 -0
  874. data/public/javascripts/{erp_app/ckeditor → ckeditor}/skins/moono/images/hidpi/refresh.png +0 -0
  875. data/public/javascripts/{erp_app/ckeditor → ckeditor}/skins/moono/images/lock-open.png +0 -0
  876. data/public/javascripts/{erp_app/ckeditor → ckeditor}/skins/moono/images/lock.png +0 -0
  877. data/public/javascripts/{erp_app/ckeditor → ckeditor}/skins/moono/images/refresh.png +0 -0
  878. data/public/javascripts/{erp_app/ckeditor → ckeditor}/skins/moono/readme.md +0 -0
  879. data/public/javascripts/{erp_app/ckeditor → ckeditor}/styles.js +0 -0
  880. data/public/javascripts/{erp_app/highslide/highslide → highslide}/graphics/close.png +0 -0
  881. data/public/javascripts/{erp_app/highslide/highslide → highslide}/graphics/closeX.png +0 -0
  882. data/public/javascripts/{erp_app/highslide/highslide → highslide}/graphics/controlbar-black-border.gif +0 -0
  883. data/public/javascripts/{erp_app/highslide/highslide → highslide}/graphics/controlbar-text-buttons.png +0 -0
  884. data/public/javascripts/{erp_app/highslide/highslide → highslide}/graphics/controlbar-white-small.gif +0 -0
  885. data/public/javascripts/{erp_app/highslide/highslide → highslide}/graphics/controlbar-white.gif +0 -0
  886. data/public/javascripts/{erp_app/highslide/highslide → highslide}/graphics/controlbar2.gif +0 -0
  887. data/public/javascripts/{erp_app/highslide/highslide → highslide}/graphics/controlbar3.gif +0 -0
  888. data/public/javascripts/{erp_app/highslide/highslide → highslide}/graphics/controlbar4-hover.gif +0 -0
  889. data/public/javascripts/{erp_app/highslide/highslide → highslide}/graphics/controlbar4.gif +0 -0
  890. data/public/javascripts/{erp_app/highslide/highslide → highslide}/graphics/fullexpand.gif +0 -0
  891. data/public/javascripts/{erp_app/highslide/highslide → highslide}/graphics/geckodimmer.png +0 -0
  892. data/public/javascripts/{erp_app/highslide/highslide → highslide}/graphics/icon.gif +0 -0
  893. data/public/javascripts/{erp_app/highslide/highslide → highslide}/graphics/loader.gif +0 -0
  894. data/public/javascripts/{erp_app/highslide/highslide → highslide}/graphics/loader.white.gif +0 -0
  895. data/public/javascripts/{erp_app/highslide/highslide → highslide}/graphics/outlines/Outlines.psd +0 -0
  896. data/public/javascripts/{erp_app/highslide/highslide → highslide}/graphics/outlines/beveled.png +0 -0
  897. data/public/javascripts/{erp_app/highslide/highslide → highslide}/graphics/outlines/drop-shadow.png +0 -0
  898. data/public/javascripts/{erp_app/highslide/highslide → highslide}/graphics/outlines/glossy-dark.png +0 -0
  899. data/public/javascripts/{erp_app/highslide/highslide → highslide}/graphics/outlines/outer-glow.png +0 -0
  900. data/public/javascripts/{erp_app/highslide/highslide → highslide}/graphics/outlines/rounded-black.png +0 -0
  901. data/public/javascripts/{erp_app/highslide/highslide → highslide}/graphics/outlines/rounded-white.png +0 -0
  902. data/public/javascripts/{erp_app/highslide/highslide → highslide}/graphics/resize.gif +0 -0
  903. data/public/javascripts/{erp_app/highslide/highslide → highslide}/graphics/scrollarrows.png +0 -0
  904. data/public/javascripts/{erp_app/highslide/highslide → highslide}/graphics/zoomin.cur +0 -0
  905. data/public/javascripts/{erp_app/highslide/highslide → highslide}/graphics/zoomout.cur +0 -0
  906. data/public/javascripts/highslide/highslide-full.js +3320 -0
  907. data/public/javascripts/highslide/highslide-full.min.js +9 -0
  908. data/public/javascripts/highslide/highslide-full.packed.js +9 -0
  909. data/public/javascripts/{erp_app/highslide/highslide → highslide}/highslide-ie6.css +0 -0
  910. data/public/javascripts/highslide/highslide-with-gallery.js +2657 -0
  911. data/public/javascripts/highslide/highslide-with-gallery.min.js +9 -0
  912. data/public/javascripts/highslide/highslide-with-gallery.packed.js +9 -0
  913. data/public/javascripts/highslide/highslide-with-html.js +2481 -0
  914. data/public/javascripts/highslide/highslide-with-html.min.js +9 -0
  915. data/public/javascripts/highslide/highslide-with-html.packed.js +9 -0
  916. data/public/javascripts/highslide/highslide.cfg.js +27 -0
  917. data/public/javascripts/highslide/highslide.css +889 -0
  918. data/public/javascripts/highslide/highslide.js +1891 -0
  919. data/public/javascripts/highslide/highslide.min.js +9 -0
  920. data/public/javascripts/highslide/highslide.packed.js +9 -0
  921. data/spec/models/organizer_application_spec.rb +3 -3
  922. metadata +914 -980
  923. data/app/assets/stylesheets/erp_app/application.css +0 -7
  924. data/app/controllers/erp_app/desktop/scaffold/base_controller.rb +0 -90
  925. data/app/controllers/erp_app/desktop/security_management/base_controller.rb +0 -47
  926. data/app/controllers/erp_app/desktop/security_management/capabilities_controller.rb +0 -125
  927. data/app/controllers/erp_app/desktop/security_management/groups_controller.rb +0 -198
  928. data/app/controllers/erp_app/desktop/security_management/roles_controller.rb +0 -183
  929. data/app/controllers/erp_app/desktop/security_management/users_controller.rb +0 -140
  930. data/app/controllers/erp_app/mobile/base_controller.rb +0 -21
  931. data/app/controllers/erp_app/mobile/login_controller.rb +0 -11
  932. data/app/controllers/erp_app/mobile/user_management/base_controller.rb +0 -20
  933. data/app/models/app_container.rb +0 -31
  934. data/app/models/desktop.rb +0 -72
  935. data/app/models/mobile.rb +0 -9
  936. data/app/models/mobile_application.rb +0 -6
  937. data/app/models/organizer.rb +0 -11
  938. data/app/models/organizer_application.rb +0 -2
  939. data/app/observers/user_app_container_observer.rb +0 -20
  940. data/app/views/erp_app/mobile/base/index.erb +0 -44
  941. data/app/views/erp_app/mobile/login/index.erb +0 -21
  942. data/config/initializers/erp_app.rb +0 -5
  943. data/db/data_migrations/20110728201733_update_preferences.rb +0 -52
  944. data/db/data_migrations/20110816161238_create_desktop_app_audit_log_viewer.rb +0 -23
  945. data/db/data_migrations/20110817160743_add_file_manager_application.rb +0 -31
  946. data/db/data_migrations/20111108183739_add_default_capabilities.rb +0 -22
  947. data/db/data_migrations/20111108183740_add_new_contact_widgets.rb +0 -41
  948. data/db/data_migrations/20120229160222_add_userinfo_widget.rb +0 -28
  949. data/db/data_migrations/20120405193721_create_party_and_role_type_for_communication_events.rb +0 -10
  950. data/db/data_migrations/20120411180756_create_user_management_mobile_application.rb +0 -16
  951. data/db/data_migrations/20120418164215_create_configuration_management_desktop_application.rb +0 -26
  952. data/db/data_migrations/20121018143910_create_job_tracker_desktop_application.rb +0 -22
  953. data/db/data_migrations/20121018172347_created_tracked_jobs.rb +0 -14
  954. data/db/data_migrations/20121130201859_upgrade_remove_system_mgmt_app.rb +0 -15
  955. data/db/data_migrations/20121218175028_create_security_management_desktop_application.rb +0 -28
  956. data/db/data_migrations/20130411200351_add_job_tracker_mobile_app.rb +0 -16
  957. data/db/data_migrations/20130703181549_create_tail_desktop_application.rb +0 -19
  958. data/db/data_migrations/20131102171801_add_customer_role_type.rb +0 -11
  959. data/db/data_migrations/20131108191057_add_customer_employee_reln.rb +0 -26
  960. data/db/data_migrations/20140122205941_remove_theme_preference.rb +0 -21
  961. data/db/migrate/20120920145259_add_job_tracker.rb +0 -19
  962. data/db/migrate/20130410182333_update_mobile_application.rb +0 -27
  963. data/db/migrate/20131112013049_add_erp_app_missing_indexes.rb +0 -31
  964. data/db/migrate/20131129205550_add_precedence_to_configuration_item_types.rb +0 -7
  965. data/lib/active_ext/active_ext.rb +0 -587
  966. data/lib/active_ext/core.rb +0 -105
  967. data/lib/active_ext/data_structures/column.rb +0 -21
  968. data/lib/active_ext/data_structures/columns.rb +0 -69
  969. data/lib/active_ext/data_structures/data_structures.rb +0 -2
  970. data/lib/active_ext/ext_helpers/column_builder.rb +0 -136
  971. data/lib/active_ext/ext_helpers/data_helper.rb +0 -67
  972. data/lib/active_ext/ext_helpers/ext_helpers.rb +0 -5
  973. data/lib/active_ext/ext_helpers/field_builder.rb +0 -146
  974. data/lib/active_ext/ext_helpers/form_builder.rb +0 -49
  975. data/lib/active_ext/ext_helpers/table_builder.rb +0 -77
  976. data/lib/erp_app/application_resource_loader.rb +0 -4
  977. data/lib/erp_app/application_resource_loader/base_loader.rb +0 -17
  978. data/lib/erp_app/application_resource_loader/desktop_organizer_loader.rb +0 -71
  979. data/lib/erp_app/application_resource_loader/mobile_loader.rb +0 -46
  980. data/lib/erp_app/application_resource_loader/shared_loader.rb +0 -26
  981. data/lib/erp_app/extensions/railties/action_view/helpers/active_ext_helper.rb +0 -17
  982. data/lib/erp_app/extensions/railties/action_view/helpers/tag_helper.rb +0 -38
  983. data/lib/generators/active_ext/USAGE +0 -16
  984. data/lib/generators/active_ext/active_ext_generator.rb +0 -43
  985. data/lib/generators/active_ext/templates/INSTALL +0 -11
  986. data/lib/generators/active_ext/templates/controllers/controller_template.erb +0 -23
  987. data/lib/generators/active_ext/templates/public/module.js.erb +0 -16
  988. data/lib/generators/active_ext/templates/views/create.html.erb +0 -19
  989. data/lib/generators/active_ext/templates/views/edit.html.erb +0 -65
  990. data/lib/generators/active_ext/templates/views/new.html.erb +0 -41
  991. data/lib/generators/active_ext/templates/views/show.html.erb +0 -58
  992. data/lib/generators/active_ext/templates/views/update.html.erb +0 -1
  993. data/lib/generators/compass_ae_mobile/USAGE +0 -9
  994. data/lib/generators/compass_ae_mobile/compass_ae_mobile_generator.rb +0 -38
  995. data/lib/generators/compass_ae_mobile/templates/controllers/controller_template.erb +0 -4
  996. data/lib/generators/compass_ae_mobile/templates/javascripts/main_template.erb +0 -29
  997. data/lib/generators/compass_ae_mobile/templates/views/view_template.erb +0 -25
  998. data/lib/generators/desktop_application/USAGE +0 -24
  999. data/lib/generators/desktop_application/desktop_application_generator.rb +0 -25
  1000. data/lib/generators/desktop_application/templates/INSTALL +0 -25
  1001. data/lib/generators/mobile_application/USAGE +0 -24
  1002. data/lib/generators/mobile_application/mobile_application_generator.rb +0 -25
  1003. data/lib/generators/mobile_application/templates/controllers/controller_template.erb +0 -13
  1004. data/lib/generators/mobile_application/templates/migrate/migration_template.erb +0 -14
  1005. data/lib/generators/mobile_application/templates/public/app.js.erb +0 -24
  1006. data/lib/generators/organizer_application/USAGE +0 -27
  1007. data/lib/generators/organizer_application/organizer_application_generator.rb +0 -25
  1008. data/lib/generators/organizer_application/templates/INSTALL +0 -28
  1009. data/lib/generators/organizer_application/templates/controllers/controller_template.erb +0 -12
  1010. data/lib/generators/organizer_application/templates/migrate/migration_template.erb +0 -14
  1011. data/lib/generators/organizer_application/templates/public/base.js.erb +0 -28
  1012. data/public/images/art/compass-ae-logo-reverse-1.png +0 -0
  1013. data/public/images/erp_app/desktop/applications/security_management/manage_capabilities.png +0 -0
  1014. data/public/images/erp_app/desktop/applications/security_management/manage_groups.png +0 -0
  1015. data/public/images/erp_app/desktop/applications/security_management/manage_roles.png +0 -0
  1016. data/public/images/erp_app/desktop/applications/security_management/manage_users.png +0 -0
  1017. data/public/images/icons/fieldtypes/business_party.png +0 -0
  1018. data/public/images/icons/fieldtypes/check.png +0 -0
  1019. data/public/images/icons/fieldtypes/date.png +0 -0
  1020. data/public/images/icons/fieldtypes/display.png +0 -0
  1021. data/public/images/icons/fieldtypes/email.png +0 -0
  1022. data/public/images/icons/fieldtypes/file.png +0 -0
  1023. data/public/images/icons/fieldtypes/file_assets.png +0 -0
  1024. data/public/images/icons/fieldtypes/image.png +0 -0
  1025. data/public/images/icons/fieldtypes/money.png +0 -0
  1026. data/public/images/icons/fieldtypes/number.png +0 -0
  1027. data/public/images/icons/fieldtypes/password.png +0 -0
  1028. data/public/images/icons/fieldtypes/question.png +0 -0
  1029. data/public/images/icons/fieldtypes/radio.png +0 -0
  1030. data/public/images/icons/fieldtypes/select.png +0 -0
  1031. data/public/images/icons/fieldtypes/text.png +0 -0
  1032. data/public/images/icons/fieldtypes/text.psd +0 -0
  1033. data/public/images/icons/fieldtypes/text_area.png +0 -0
  1034. data/public/images/icons/fieldtypes/time.png +0 -0
  1035. data/public/images/icons/fieldtypes/yes_no.png +0 -0
  1036. data/public/images/icons/login/login_48x48.png +0 -0
  1037. data/public/images/icons/mail/mail_48x48.png +0 -0
  1038. data/public/images/icons/manage-profile/manage-profile_48x48.png +0 -0
  1039. data/public/images/icons/map/map_48x48.png +0 -0
  1040. data/public/images/icons/package/package_48x48.png +0 -0
  1041. data/public/images/icons/product/product_48x48.png +0 -0
  1042. data/public/images/icons/recycle/recycle_16x16.png +0 -0
  1043. data/public/images/icons/reset-password/reset-password_48x48.png +0 -0
  1044. data/public/images/icons/search/search_48x48.png +0 -0
  1045. data/public/images/icons/shopping_cart/shopping_cart_48x48.png +0 -0
  1046. data/public/images/icons/sign_up/sign_up_48x48.png +0 -0
  1047. data/public/images/icons/signup/signup_48x48.png +0 -0
  1048. data/public/javascripts/erp_app/authentication/compass_user.js +0 -94
  1049. data/public/javascripts/erp_app/ckeditor/config.js +0 -12
  1050. data/public/javascripts/erp_app/ckeditor/plugins/compasssave/plugin.js +0 -22
  1051. data/public/javascripts/erp_app/ckeditor/plugins/dialog/dialogDefinition.js +0 -4
  1052. data/public/javascripts/erp_app/ckeditor/plugins/inlineeditsave/plugin.js +0 -42
  1053. data/public/javascripts/erp_app/ckeditor/plugins/knitkitthemes/plugin.js +0 -116
  1054. data/public/javascripts/erp_app/ckeditor/plugins/scayt/README.md +0 -25
  1055. data/public/javascripts/erp_app/ckeditor/plugins/scayt/dialogs/options.js +0 -20
  1056. data/public/javascripts/erp_app/ckeditor/plugins/scayt/dialogs/toolbar.css +0 -71
  1057. data/public/javascripts/erp_app/ckeditor_example_config_override.js +0 -45
  1058. data/public/javascripts/erp_app/codemirror/lib/codemirror.css +0 -272
  1059. data/public/javascripts/erp_app/codemirror/lib/codemirror.js +0 -55
  1060. data/public/javascripts/erp_app/codemirror/theme/3024-day.css +0 -34
  1061. data/public/javascripts/erp_app/codemirror/theme/3024-night.css +0 -34
  1062. data/public/javascripts/erp_app/codemirror/theme/ambiance-mobile.css +0 -5
  1063. data/public/javascripts/erp_app/codemirror/theme/ambiance.css +0 -74
  1064. data/public/javascripts/erp_app/codemirror/theme/base16-dark.css +0 -34
  1065. data/public/javascripts/erp_app/codemirror/theme/base16-light.css +0 -34
  1066. data/public/javascripts/erp_app/codemirror/theme/blackboard.css +0 -28
  1067. data/public/javascripts/erp_app/codemirror/theme/cobalt.css +0 -21
  1068. data/public/javascripts/erp_app/codemirror/theme/eclipse.css +0 -23
  1069. data/public/javascripts/erp_app/codemirror/theme/elegant.css +0 -13
  1070. data/public/javascripts/erp_app/codemirror/theme/erlang-dark.css +0 -30
  1071. data/public/javascripts/erp_app/codemirror/theme/lesser-dark.css +0 -43
  1072. data/public/javascripts/erp_app/codemirror/theme/mbo.css +0 -37
  1073. data/public/javascripts/erp_app/codemirror/theme/mdn-like.css +0 -44
  1074. data/public/javascripts/erp_app/codemirror/theme/midnight.css +0 -43
  1075. data/public/javascripts/erp_app/codemirror/theme/monokai.css +0 -29
  1076. data/public/javascripts/erp_app/codemirror/theme/neat.css +0 -12
  1077. data/public/javascripts/erp_app/codemirror/theme/neo.css +0 -40
  1078. data/public/javascripts/erp_app/codemirror/theme/night.css +0 -24
  1079. data/public/javascripts/erp_app/codemirror/theme/paraiso-dark.css +0 -34
  1080. data/public/javascripts/erp_app/codemirror/theme/paraiso-light.css +0 -34
  1081. data/public/javascripts/erp_app/codemirror/theme/pastel-on-dark.css +0 -48
  1082. data/public/javascripts/erp_app/codemirror/theme/rubyblue.css +0 -21
  1083. data/public/javascripts/erp_app/codemirror/theme/solarized.css +0 -167
  1084. data/public/javascripts/erp_app/codemirror/theme/the-matrix.css +0 -26
  1085. data/public/javascripts/erp_app/codemirror/theme/tomorrow-night-eighties.css +0 -34
  1086. data/public/javascripts/erp_app/codemirror/theme/twilight.css +0 -28
  1087. data/public/javascripts/erp_app/codemirror/theme/vibrant-ink.css +0 -30
  1088. data/public/javascripts/erp_app/codemirror/theme/xq-dark.css +0 -49
  1089. data/public/javascripts/erp_app/codemirror/theme/xq-light.css +0 -43
  1090. data/public/javascripts/erp_app/codemirror_highlight.js +0 -17
  1091. data/public/javascripts/erp_app/desktop/applications/audit_log_viewer/module.js +0 -38
  1092. data/public/javascripts/erp_app/desktop/applications/configuration_management/module.js +0 -95
  1093. data/public/javascripts/erp_app/desktop/applications/control_panel/module.js +0 -73
  1094. data/public/javascripts/erp_app/desktop/applications/file_manager/module.js +0 -120
  1095. data/public/javascripts/erp_app/desktop/applications/job_tracker/module.js +0 -44
  1096. data/public/javascripts/erp_app/desktop/applications/scaffold/models_tree_panel.js +0 -86
  1097. data/public/javascripts/erp_app/desktop/applications/scaffold/module.js +0 -62
  1098. data/public/javascripts/erp_app/desktop/applications/security_management/capabilities_panel.js +0 -62
  1099. data/public/javascripts/erp_app/desktop/applications/security_management/capabilities_widget.js +0 -241
  1100. data/public/javascripts/erp_app/desktop/applications/security_management/groups_effective_security.js +0 -94
  1101. data/public/javascripts/erp_app/desktop/applications/security_management/groups_panel.js +0 -298
  1102. data/public/javascripts/erp_app/desktop/applications/security_management/groups_widget.js +0 -241
  1103. data/public/javascripts/erp_app/desktop/applications/security_management/module.js +0 -173
  1104. data/public/javascripts/erp_app/desktop/applications/security_management/north_panel.js +0 -31
  1105. data/public/javascripts/erp_app/desktop/applications/security_management/roles_panel.js +0 -309
  1106. data/public/javascripts/erp_app/desktop/applications/security_management/roles_widget.js +0 -241
  1107. data/public/javascripts/erp_app/desktop/applications/security_management/south_panel.js +0 -126
  1108. data/public/javascripts/erp_app/desktop/applications/security_management/users_effective_security.js +0 -128
  1109. data/public/javascripts/erp_app/desktop/applications/security_management/users_panel.js +0 -59
  1110. data/public/javascripts/erp_app/desktop/applications/security_management/users_widget.js +0 -245
  1111. data/public/javascripts/erp_app/desktop/applications/user_management/module.js +0 -469
  1112. data/public/javascripts/erp_app/desktop/applications/user_management/personal_info_panel.js +0 -117
  1113. data/public/javascripts/erp_app/desktop/applications/user_management/role_management_panel.js +0 -208
  1114. data/public/javascripts/erp_app/desktop/applications/user_management/user_application_mgt_panel.js +0 -206
  1115. data/public/javascripts/erp_app/desktop/ext_ux_desktop_module.js +0 -1014
  1116. data/public/javascripts/erp_app/ecommerce/credit_card_window.js +0 -329
  1117. data/public/javascripts/erp_app/highslide/examples/ajax.html +0 -51
  1118. data/public/javascripts/erp_app/highslide/examples/flash.html +0 -61
  1119. data/public/javascripts/erp_app/highslide/examples/gallery-controls-in-heading.html +0 -89
  1120. data/public/javascripts/erp_app/highslide/examples/gallery-dark.html +0 -93
  1121. data/public/javascripts/erp_app/highslide/examples/gallery-floating-caption.html +0 -91
  1122. data/public/javascripts/erp_app/highslide/examples/gallery-floating-thumbs.html +0 -144
  1123. data/public/javascripts/erp_app/highslide/examples/gallery-horizontal-strip.html +0 -147
  1124. data/public/javascripts/erp_app/highslide/examples/gallery-in-box.html +0 -95
  1125. data/public/javascripts/erp_app/highslide/examples/gallery-in-page.html +0 -221
  1126. data/public/javascripts/erp_app/highslide/examples/gallery-thumbstrip-above.html +0 -142
  1127. data/public/javascripts/erp_app/highslide/examples/gallery-vertical-strip.html +0 -178
  1128. data/public/javascripts/erp_app/highslide/examples/gallery-white.html +0 -90
  1129. data/public/javascripts/erp_app/highslide/examples/headline.html +0 -49
  1130. data/public/javascripts/erp_app/highslide/examples/html.html +0 -67
  1131. data/public/javascripts/erp_app/highslide/examples/iframe.html +0 -44
  1132. data/public/javascripts/erp_app/highslide/examples/image-map.html +0 -49
  1133. data/public/javascripts/erp_app/highslide/examples/includes/Flash.swf +0 -0
  1134. data/public/javascripts/erp_app/highslide/examples/includes/ajax.htm +0 -45
  1135. data/public/javascripts/erp_app/highslide/examples/includes/include-short.htm +0 -40
  1136. data/public/javascripts/erp_app/highslide/examples/inline.html +0 -50
  1137. data/public/javascripts/erp_app/highslide/examples/mini-galleries.html +0 -135
  1138. data/public/javascripts/erp_app/highslide/examples/mini-gallery.html +0 -89
  1139. data/public/javascripts/erp_app/highslide/examples/no-border.html +0 -62
  1140. data/public/javascripts/erp_app/highslide/examples/no-outline.html +0 -52
  1141. data/public/javascripts/erp_app/highslide/examples/outer-glow.html +0 -53
  1142. data/public/javascripts/erp_app/highslide/examples/white-10px.html +0 -51
  1143. data/public/javascripts/erp_app/highslide/examples/white-rounded-outline.html +0 -51
  1144. data/public/javascripts/erp_app/highslide/examples/youtube.html +0 -62
  1145. data/public/javascripts/erp_app/highslide/highslide/highslide-full.js +0 -3302
  1146. data/public/javascripts/erp_app/highslide/highslide/highslide-full.min.js +0 -9
  1147. data/public/javascripts/erp_app/highslide/highslide/highslide-full.packed.js +0 -9
  1148. data/public/javascripts/erp_app/highslide/highslide/highslide-with-gallery.js +0 -2639
  1149. data/public/javascripts/erp_app/highslide/highslide/highslide-with-gallery.min.js +0 -9
  1150. data/public/javascripts/erp_app/highslide/highslide/highslide-with-gallery.packed.js +0 -9
  1151. data/public/javascripts/erp_app/highslide/highslide/highslide-with-html.js +0 -2476
  1152. data/public/javascripts/erp_app/highslide/highslide/highslide-with-html.min.js +0 -9
  1153. data/public/javascripts/erp_app/highslide/highslide/highslide-with-html.packed.js +0 -9
  1154. data/public/javascripts/erp_app/highslide/highslide/highslide.css +0 -886
  1155. data/public/javascripts/erp_app/highslide/highslide/highslide.js +0 -1886
  1156. data/public/javascripts/erp_app/highslide/highslide/highslide.min.js +0 -9
  1157. data/public/javascripts/erp_app/highslide/highslide/highslide.packed.js +0 -9
  1158. data/public/javascripts/erp_app/highslide/images/full-image.jpg +0 -0
  1159. data/public/javascripts/erp_app/highslide/images/full6.jpg +0 -0
  1160. data/public/javascripts/erp_app/highslide/images/gallery1.jpg +0 -0
  1161. data/public/javascripts/erp_app/highslide/images/gallery1.thumb.jpg +0 -0
  1162. data/public/javascripts/erp_app/highslide/images/gallery2.jpg +0 -0
  1163. data/public/javascripts/erp_app/highslide/images/gallery2.thumb.jpg +0 -0
  1164. data/public/javascripts/erp_app/highslide/images/gallery3.jpg +0 -0
  1165. data/public/javascripts/erp_app/highslide/images/gallery3.thumb.jpg +0 -0
  1166. data/public/javascripts/erp_app/highslide/images/nordic.gif +0 -0
  1167. data/public/javascripts/erp_app/highslide/images/thumb6.jpg +0 -0
  1168. data/public/javascripts/erp_app/highslide/images/thumbnail.jpg +0 -0
  1169. data/public/javascripts/erp_app/highslide/images/thumbstrip01.jpg +0 -0
  1170. data/public/javascripts/erp_app/highslide/images/thumbstrip01.thumb.png +0 -0
  1171. data/public/javascripts/erp_app/highslide/images/thumbstrip02.jpg +0 -0
  1172. data/public/javascripts/erp_app/highslide/images/thumbstrip02.thumb.png +0 -0
  1173. data/public/javascripts/erp_app/highslide/images/thumbstrip03.jpg +0 -0
  1174. data/public/javascripts/erp_app/highslide/images/thumbstrip03.thumb.png +0 -0
  1175. data/public/javascripts/erp_app/highslide/images/thumbstrip04.jpg +0 -0
  1176. data/public/javascripts/erp_app/highslide/images/thumbstrip04.thumb.png +0 -0
  1177. data/public/javascripts/erp_app/highslide/images/thumbstrip05.jpg +0 -0
  1178. data/public/javascripts/erp_app/highslide/images/thumbstrip05.thumb.png +0 -0
  1179. data/public/javascripts/erp_app/highslide/images/thumbstrip06.jpg +0 -0
  1180. data/public/javascripts/erp_app/highslide/images/thumbstrip06.thumb.png +0 -0
  1181. data/public/javascripts/erp_app/highslide/images/thumbstrip07.jpg +0 -0
  1182. data/public/javascripts/erp_app/highslide/images/thumbstrip07.thumb.png +0 -0
  1183. data/public/javascripts/erp_app/highslide/images/thumbstrip08.jpg +0 -0
  1184. data/public/javascripts/erp_app/highslide/images/thumbstrip08.thumb.png +0 -0
  1185. data/public/javascripts/erp_app/highslide/images/thumbstrip09.jpg +0 -0
  1186. data/public/javascripts/erp_app/highslide/images/thumbstrip09.thumb.png +0 -0
  1187. data/public/javascripts/erp_app/highslide/images/thumbstrip10.jpg +0 -0
  1188. data/public/javascripts/erp_app/highslide/images/thumbstrip10.thumb.png +0 -0
  1189. data/public/javascripts/erp_app/highslide/images/thumbstrip11.jpg +0 -0
  1190. data/public/javascripts/erp_app/highslide/images/thumbstrip11.thumb.png +0 -0
  1191. data/public/javascripts/erp_app/highslide/images/thumbstrip12.jpg +0 -0
  1192. data/public/javascripts/erp_app/highslide/images/thumbstrip12.thumb.png +0 -0
  1193. data/public/javascripts/erp_app/highslide/images/thumbstrip13.jpg +0 -0
  1194. data/public/javascripts/erp_app/highslide/images/thumbstrip13.thumb.png +0 -0
  1195. data/public/javascripts/erp_app/highslide/images/thumbstrip14.jpg +0 -0
  1196. data/public/javascripts/erp_app/highslide/images/thumbstrip14.thumb.png +0 -0
  1197. data/public/javascripts/erp_app/highslide/images/thumbstrip15.jpg +0 -0
  1198. data/public/javascripts/erp_app/highslide/images/thumbstrip15.thumb.png +0 -0
  1199. data/public/javascripts/erp_app/highslide/images/thumbstrip16.jpg +0 -0
  1200. data/public/javascripts/erp_app/highslide/images/thumbstrip16.thumb.png +0 -0
  1201. data/public/javascripts/erp_app/highslide/images/thumbstrip17.jpg +0 -0
  1202. data/public/javascripts/erp_app/highslide/images/thumbstrip17.thumb.png +0 -0
  1203. data/public/javascripts/erp_app/highslide/images/thumbstrip18.jpg +0 -0
  1204. data/public/javascripts/erp_app/highslide/images/thumbstrip18.thumb.png +0 -0
  1205. data/public/javascripts/erp_app/highslide/images/thumbstrip19.jpg +0 -0
  1206. data/public/javascripts/erp_app/highslide/images/thumbstrip19.thumb.png +0 -0
  1207. data/public/javascripts/erp_app/highslide/images/thumbstrip20.jpg +0 -0
  1208. data/public/javascripts/erp_app/highslide/images/thumbstrip20.thumb.png +0 -0
  1209. data/public/javascripts/erp_app/highslide/images/thumbstrip21.jpg +0 -0
  1210. data/public/javascripts/erp_app/highslide/images/thumbstrip21.thumb.png +0 -0
  1211. data/public/javascripts/erp_app/highslide/images/thumbstrip22.jpg +0 -0
  1212. data/public/javascripts/erp_app/highslide/images/thumbstrip22.thumb.png +0 -0
  1213. data/public/javascripts/erp_app/highslide/images/thumbstrip23.jpg +0 -0
  1214. data/public/javascripts/erp_app/highslide/images/thumbstrip23.thumb.png +0 -0
  1215. data/public/javascripts/erp_app/highslide/images/thumbstrip24.jpg +0 -0
  1216. data/public/javascripts/erp_app/highslide/images/thumbstrip24.thumb.png +0 -0
  1217. data/public/javascripts/erp_app/highslide/index.htm +0 -68
  1218. data/public/javascripts/erp_app/jquery_support.js +0 -31
  1219. data/public/javascripts/erp_app/login/mobile.js +0 -58
  1220. data/public/javascripts/erp_app/login/window.js +0 -124
  1221. data/public/javascripts/erp_app/mobile/app.js +0 -74
  1222. data/public/javascripts/erp_app/mobile/applications/job_tracker/app.js +0 -177
  1223. data/public/javascripts/erp_app/mobile/applications/job_tracker/model/job.js +0 -15
  1224. data/public/javascripts/erp_app/mobile/applications/job_tracker/store/jobs.js +0 -16
  1225. data/public/javascripts/erp_app/mobile/applications/job_tracker/view/templates.js +0 -22
  1226. data/public/javascripts/erp_app/mobile/applications/user_management/app.js +0 -112
  1227. data/public/javascripts/erp_app/mobile/applications/user_management/app/model/user.js +0 -14
  1228. data/public/javascripts/erp_app/mobile/applications/user_management/app/store/users.js +0 -19
  1229. data/public/javascripts/erp_app/mobile/applications/user_management/app/view/templates.js +0 -34
  1230. data/public/javascripts/erp_app/mobile/mobile_base.js +0 -10
  1231. data/public/javascripts/erp_app/organizer/applications/crm/base.js +0 -64
  1232. data/public/javascripts/erp_app/organizer/default_menu_tree_panel.js +0 -69
  1233. data/public/javascripts/erp_app/organizer/layout.js +0 -267
  1234. data/public/javascripts/erp_app/shared/MoneyField.js +0 -119
  1235. data/public/javascripts/erp_app/shared/active_ext/active_ext_grid.js +0 -351
  1236. data/public/javascripts/erp_app/shared/audit_log/GridPanel.js +0 -214
  1237. data/public/javascripts/erp_app/shared/audit_log/TabPanel.js +0 -103
  1238. data/public/javascripts/erp_app/shared/compass_ckeditor.js +0 -264
  1239. data/public/javascripts/erp_app/shared/compass_codemirror.js +0 -466
  1240. data/public/javascripts/erp_app/shared/configuration/configuration_panel.js +0 -128
  1241. data/public/javascripts/erp_app/shared/crm/ContactMechanismGrid.js +0 -812
  1242. data/public/javascripts/erp_app/shared/crm/PartyDetailsPanel.js +0 -344
  1243. data/public/javascripts/erp_app/shared/crm/PartyForm.js +0 -321
  1244. data/public/javascripts/erp_app/shared/crm/PartyGrid.js +0 -591
  1245. data/public/javascripts/erp_app/shared/crm/UserForm.js +0 -307
  1246. data/public/javascripts/erp_app/shared/crm/UsersGrid.js +0 -492
  1247. data/public/javascripts/erp_app/shared/dynamic_editable_grid.js +0 -140
  1248. data/public/javascripts/erp_app/shared/dynamic_editable_grid_loader_panel.js +0 -64
  1249. data/public/javascripts/erp_app/shared/dynamic_form_fields.js +0 -99
  1250. data/public/javascripts/erp_app/shared/file_manager_tree.js +0 -722
  1251. data/public/javascripts/erp_app/shared/file_upload/Ext.ux.panel.UploadPanel.js +0 -580
  1252. data/public/javascripts/erp_app/shared/file_upload/upload_window.js +0 -63
  1253. data/public/javascripts/erp_app/shared/notes_grid.js +0 -338
  1254. data/public/javascripts/erp_app/shared/profile_management_panel.js +0 -137
  1255. data/public/javascripts/erp_app/utility.js +0 -654
  1256. data/public/javascripts/erp_app/widgets.js +0 -82
  1257. data/public/stylesheets/erp_app/desktop/base.css +0 -254
  1258. data/public/stylesheets/erp_app/login/main.css +0 -4
  1259. data/public/stylesheets/erp_app/mobile/applications/user_management/main.css +0 -21
  1260. data/public/stylesheets/erp_app/mobile/mobile.css +0 -47
  1261. data/public/stylesheets/erp_app/organizer/base.css +0 -6
  1262. data/public/stylesheets/erp_app/shared/compass-ext-all.css +0 -547
  1263. data/public/stylesheets/erp_app/shared/crm.css +0 -45
  1264. data/public/stylesheets/jquery_plugins/jquery.loadmask.css +0 -40
@@ -0,0 +1,3232 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3
+ * For licensing, see LICENSE.md or http://ckeditor.com/license
4
+ */
5
+
6
+ /**
7
+ * @fileOverview The floating dialog plugin.
8
+ */
9
+
10
+ /**
11
+ * No resize for this dialog.
12
+ *
13
+ * @readonly
14
+ * @property {Number} [=0]
15
+ * @member CKEDITOR
16
+ */
17
+ CKEDITOR.DIALOG_RESIZE_NONE = 0;
18
+
19
+ /**
20
+ * Only allow horizontal resizing for this dialog, disable vertical resizing.
21
+ *
22
+ * @readonly
23
+ * @property {Number} [=1]
24
+ * @member CKEDITOR
25
+ */
26
+ CKEDITOR.DIALOG_RESIZE_WIDTH = 1;
27
+
28
+ /**
29
+ * Only allow vertical resizing for this dialog, disable horizontal resizing.
30
+ *
31
+ * @readonly
32
+ * @property {Number} [=2]
33
+ * @member CKEDITOR
34
+ */
35
+ CKEDITOR.DIALOG_RESIZE_HEIGHT = 2;
36
+
37
+ /**
38
+ * Allow the dialog to be resized in both directions.
39
+ *
40
+ * @readonly
41
+ * @property {Number} [=3]
42
+ * @member CKEDITOR
43
+ */
44
+ CKEDITOR.DIALOG_RESIZE_BOTH = 3;
45
+
46
+ (function() {
47
+ var cssLength = CKEDITOR.tools.cssLength;
48
+
49
+ function isTabVisible( tabId ) {
50
+ return !!this._.tabs[ tabId ][ 0 ].$.offsetHeight;
51
+ }
52
+
53
+ function getPreviousVisibleTab() {
54
+ var tabId = this._.currentTabId,
55
+ length = this._.tabIdList.length,
56
+ tabIndex = CKEDITOR.tools.indexOf( this._.tabIdList, tabId ) + length;
57
+
58
+ for ( var i = tabIndex - 1; i > tabIndex - length; i-- ) {
59
+ if ( isTabVisible.call( this, this._.tabIdList[ i % length ] ) )
60
+ return this._.tabIdList[ i % length ];
61
+ }
62
+
63
+ return null;
64
+ }
65
+
66
+ function getNextVisibleTab() {
67
+ var tabId = this._.currentTabId,
68
+ length = this._.tabIdList.length,
69
+ tabIndex = CKEDITOR.tools.indexOf( this._.tabIdList, tabId );
70
+
71
+ for ( var i = tabIndex + 1; i < tabIndex + length; i++ ) {
72
+ if ( isTabVisible.call( this, this._.tabIdList[ i % length ] ) )
73
+ return this._.tabIdList[ i % length ];
74
+ }
75
+
76
+ return null;
77
+ }
78
+
79
+
80
+ function clearOrRecoverTextInputValue( container, isRecover ) {
81
+ var inputs = container.$.getElementsByTagName( 'input' );
82
+ for ( var i = 0, length = inputs.length; i < length; i++ ) {
83
+ var item = new CKEDITOR.dom.element( inputs[ i ] );
84
+
85
+ if ( item.getAttribute( 'type' ).toLowerCase() == 'text' ) {
86
+ if ( isRecover ) {
87
+ item.setAttribute( 'value', item.getCustomData( 'fake_value' ) || '' );
88
+ item.removeCustomData( 'fake_value' );
89
+ } else {
90
+ item.setCustomData( 'fake_value', item.getAttribute( 'value' ) );
91
+ item.setAttribute( 'value', '' );
92
+ }
93
+ }
94
+ }
95
+ }
96
+
97
+ // Handle dialog element validation state UI changes.
98
+ function handleFieldValidated( isValid, msg ) {
99
+ var input = this.getInputElement();
100
+ if ( input ) {
101
+ isValid ? input.removeAttribute( 'aria-invalid' ) : input.setAttribute( 'aria-invalid', true );
102
+ }
103
+
104
+ if ( !isValid ) {
105
+ if ( this.select )
106
+ this.select();
107
+ else
108
+ this.focus();
109
+ }
110
+
111
+ msg && alert( msg );
112
+
113
+ this.fire( 'validated', { valid: isValid, msg: msg } );
114
+ }
115
+
116
+ function resetField() {
117
+ var input = this.getInputElement();
118
+ input && input.removeAttribute( 'aria-invalid' );
119
+ }
120
+
121
+ var templateSource = '<div class="cke_reset_all {editorId} {editorDialogClass} {hidpi}' +
122
+ '" dir="{langDir}"' +
123
+ ' lang="{langCode}"' +
124
+ ' role="dialog"' +
125
+ ' aria-labelledby="cke_dialog_title_{id}"' +
126
+ '>' +
127
+ '<table class="cke_dialog ' + CKEDITOR.env.cssClass + ' cke_{langDir}"' +
128
+ ' style="position:absolute" role="presentation">' +
129
+ '<tr><td role="presentation">' +
130
+ '<div class="cke_dialog_body" role="presentation">' +
131
+ '<div id="cke_dialog_title_{id}" class="cke_dialog_title" role="presentation"></div>' +
132
+ '<a id="cke_dialog_close_button_{id}" class="cke_dialog_close_button" href="javascript:void(0)" title="{closeTitle}" role="button"><span class="cke_label">X</span></a>' +
133
+ '<div id="cke_dialog_tabs_{id}" class="cke_dialog_tabs" role="tablist"></div>' +
134
+ '<table class="cke_dialog_contents" role="presentation">' +
135
+ '<tr>' +
136
+ '<td id="cke_dialog_contents_{id}" class="cke_dialog_contents_body" role="presentation"></td>' +
137
+ '</tr>' +
138
+ '<tr>' +
139
+ '<td id="cke_dialog_footer_{id}" class="cke_dialog_footer" role="presentation"></td>' +
140
+ '</tr>' +
141
+ '</table>' +
142
+ '</div>' +
143
+ '</td></tr>' +
144
+ '</table>' +
145
+ '</div>';
146
+
147
+ function buildDialog( editor ) {
148
+ var element = CKEDITOR.dom.element.createFromHtml( CKEDITOR.addTemplate( 'dialog', templateSource ).output({
149
+ id: CKEDITOR.tools.getNextNumber(),
150
+ editorId: editor.id,
151
+ langDir: editor.lang.dir,
152
+ langCode: editor.langCode,
153
+ editorDialogClass: 'cke_editor_' + editor.name.replace( /\./g, '\\.' ) + '_dialog',
154
+ closeTitle: editor.lang.common.close,
155
+ hidpi: CKEDITOR.env.hidpi ? 'cke_hidpi' : ''
156
+ }));
157
+
158
+ // TODO: Change this to getById(), so it'll support custom templates.
159
+ var body = element.getChild( [ 0, 0, 0, 0, 0 ] ),
160
+ title = body.getChild( 0 ),
161
+ close = body.getChild( 1 );
162
+
163
+ // IFrame shim for dialog that masks activeX in IE. (#7619)
164
+ if ( CKEDITOR.env.ie && !CKEDITOR.env.ie6Compat ) {
165
+ var src = 'javascript:void(function(){' + encodeURIComponent( 'document.open();(' + CKEDITOR.tools.fixDomain + ')();document.close();' ) + '}())',
166
+ iframe = CKEDITOR.dom.element.createFromHtml( '<iframe' +
167
+ ' frameBorder="0"' +
168
+ ' class="cke_iframe_shim"' +
169
+ ' src="' + src + '"' +
170
+ ' tabIndex="-1"' +
171
+ '></iframe>' );
172
+ iframe.appendTo( body.getParent() );
173
+ }
174
+
175
+ // Make the Title and Close Button unselectable.
176
+ title.unselectable();
177
+ close.unselectable();
178
+
179
+ return {
180
+ element: element,
181
+ parts: {
182
+ dialog: element.getChild( 0 ),
183
+ title: title,
184
+ close: close,
185
+ tabs: body.getChild( 2 ),
186
+ contents: body.getChild( [ 3, 0, 0, 0 ] ),
187
+ footer: body.getChild( [ 3, 0, 1, 0 ] )
188
+ }
189
+ };
190
+ }
191
+
192
+ /**
193
+ * This is the base class for runtime dialog objects. An instance of this
194
+ * class represents a single named dialog for a single editor instance.
195
+ *
196
+ * var dialogObj = new CKEDITOR.dialog( editor, 'smiley' );
197
+ *
198
+ * @class
199
+ * @constructor Creates a dialog class instance.
200
+ * @param {Object} editor The editor which created the dialog.
201
+ * @param {String} dialogName The dialog's registered name.
202
+ */
203
+ CKEDITOR.dialog = function( editor, dialogName ) {
204
+ // Load the dialog definition.
205
+ var definition = CKEDITOR.dialog._.dialogDefinitions[ dialogName ],
206
+ defaultDefinition = CKEDITOR.tools.clone( defaultDialogDefinition ),
207
+ buttonsOrder = editor.config.dialog_buttonsOrder || 'OS',
208
+ dir = editor.lang.dir,
209
+ tabsToRemove = {},
210
+ i, processed, stopPropagation;
211
+
212
+ if ( ( buttonsOrder == 'OS' && CKEDITOR.env.mac ) || // The buttons in MacOS Apps are in reverse order (#4750)
213
+ ( buttonsOrder == 'rtl' && dir == 'ltr' ) || ( buttonsOrder == 'ltr' && dir == 'rtl' ) )
214
+ defaultDefinition.buttons.reverse();
215
+
216
+
217
+ // Completes the definition with the default values.
218
+ definition = CKEDITOR.tools.extend( definition( editor ), defaultDefinition );
219
+
220
+ // Clone a functionally independent copy for this dialog.
221
+ definition = CKEDITOR.tools.clone( definition );
222
+
223
+ // Create a complex definition object, extending it with the API
224
+ // functions.
225
+ definition = new definitionObject( this, definition );
226
+
227
+ var doc = CKEDITOR.document;
228
+
229
+ var themeBuilt = buildDialog( editor );
230
+
231
+ // Initialize some basic parameters.
232
+ this._ = {
233
+ editor: editor,
234
+ element: themeBuilt.element,
235
+ name: dialogName,
236
+ contentSize: { width: 0, height: 0 },
237
+ size: { width: 0, height: 0 },
238
+ contents: {},
239
+ buttons: {},
240
+ accessKeyMap: {},
241
+
242
+ // Initialize the tab and page map.
243
+ tabs: {},
244
+ tabIdList: [],
245
+ currentTabId: null,
246
+ currentTabIndex: null,
247
+ pageCount: 0,
248
+ lastTab: null,
249
+ tabBarMode: false,
250
+
251
+ // Initialize the tab order array for input widgets.
252
+ focusList: [],
253
+ currentFocusIndex: 0,
254
+ hasFocus: false
255
+ };
256
+
257
+ this.parts = themeBuilt.parts;
258
+
259
+ CKEDITOR.tools.setTimeout( function() {
260
+ editor.fire( 'ariaWidget', this.parts.contents );
261
+ }, 0, this );
262
+
263
+ // Set the startup styles for the dialog, avoiding it enlarging the
264
+ // page size on the dialog creation.
265
+ var startStyles = {
266
+ position: CKEDITOR.env.ie6Compat ? 'absolute' : 'fixed',
267
+ top: 0,
268
+ visibility: 'hidden'
269
+ };
270
+
271
+ startStyles[ dir == 'rtl' ? 'right' : 'left' ] = 0;
272
+ this.parts.dialog.setStyles( startStyles );
273
+
274
+
275
+ // Call the CKEDITOR.event constructor to initialize this instance.
276
+ CKEDITOR.event.call( this );
277
+
278
+ // Fire the "dialogDefinition" event, making it possible to customize
279
+ // the dialog definition.
280
+ this.definition = definition = CKEDITOR.fire( 'dialogDefinition', {
281
+ name: dialogName,
282
+ definition: definition
283
+ }, editor ).definition;
284
+
285
+ // Cache tabs that should be removed.
286
+ if ( !( 'removeDialogTabs' in editor._ ) && editor.config.removeDialogTabs ) {
287
+ var removeContents = editor.config.removeDialogTabs.split( ';' );
288
+
289
+ for ( i = 0; i < removeContents.length; i++ ) {
290
+ var parts = removeContents[ i ].split( ':' );
291
+ if ( parts.length == 2 ) {
292
+ var removeDialogName = parts[ 0 ];
293
+ if ( !tabsToRemove[ removeDialogName ] )
294
+ tabsToRemove[ removeDialogName ] = [];
295
+ tabsToRemove[ removeDialogName ].push( parts[ 1 ] );
296
+ }
297
+ }
298
+ editor._.removeDialogTabs = tabsToRemove;
299
+ }
300
+
301
+ // Remove tabs of this dialog.
302
+ if ( editor._.removeDialogTabs && ( tabsToRemove = editor._.removeDialogTabs[ dialogName ] ) ) {
303
+ for ( i = 0; i < tabsToRemove.length; i++ )
304
+ definition.removeContents( tabsToRemove[ i ] );
305
+ }
306
+
307
+ // Initialize load, show, hide, ok and cancel events.
308
+ if ( definition.onLoad )
309
+ this.on( 'load', definition.onLoad );
310
+
311
+ if ( definition.onShow )
312
+ this.on( 'show', definition.onShow );
313
+
314
+ if ( definition.onHide )
315
+ this.on( 'hide', definition.onHide );
316
+
317
+ if ( definition.onOk ) {
318
+ this.on( 'ok', function( evt ) {
319
+ // Dialog confirm might probably introduce content changes (#5415).
320
+ editor.fire( 'saveSnapshot' );
321
+ setTimeout( function() {
322
+ editor.fire( 'saveSnapshot' );
323
+ }, 0 );
324
+ if ( definition.onOk.call( this, evt ) === false )
325
+ evt.data.hide = false;
326
+ });
327
+ }
328
+
329
+ if ( definition.onCancel ) {
330
+ this.on( 'cancel', function( evt ) {
331
+ if ( definition.onCancel.call( this, evt ) === false )
332
+ evt.data.hide = false;
333
+ });
334
+ }
335
+
336
+ var me = this;
337
+
338
+ // Iterates over all items inside all content in the dialog, calling a
339
+ // function for each of them.
340
+ var iterContents = function( func ) {
341
+ var contents = me._.contents,
342
+ stop = false;
343
+
344
+ for ( var i in contents ) {
345
+ for ( var j in contents[ i ] ) {
346
+ stop = func.call( this, contents[ i ][ j ] );
347
+ if ( stop )
348
+ return;
349
+ }
350
+ }
351
+ };
352
+
353
+ this.on( 'ok', function( evt ) {
354
+ iterContents( function( item ) {
355
+ if ( item.validate ) {
356
+ var retval = item.validate( this ),
357
+ invalid = typeof( retval ) == 'string' || retval === false;
358
+
359
+ if ( invalid ) {
360
+ evt.data.hide = false;
361
+ evt.stop();
362
+ }
363
+
364
+ handleFieldValidated.call( item, !invalid, typeof retval == 'string' ? retval : undefined );
365
+ return invalid;
366
+ }
367
+ });
368
+ }, this, null, 0 );
369
+
370
+ this.on( 'cancel', function( evt ) {
371
+ iterContents( function( item ) {
372
+ if ( item.isChanged() ) {
373
+ if ( !confirm( editor.lang.common.confirmCancel ) )
374
+ evt.data.hide = false;
375
+ return true;
376
+ }
377
+ });
378
+ }, this, null, 0 );
379
+
380
+ this.parts.close.on( 'click', function( evt ) {
381
+ if ( this.fire( 'cancel', { hide: true } ).hide !== false )
382
+ this.hide();
383
+ evt.data.preventDefault();
384
+ }, this );
385
+
386
+ // Sort focus list according to tab order definitions.
387
+ function setupFocus() {
388
+ var focusList = me._.focusList;
389
+ focusList.sort( function( a, b ) {
390
+ // Mimics browser tab order logics;
391
+ if ( a.tabIndex != b.tabIndex )
392
+ return b.tabIndex - a.tabIndex;
393
+ // Sort is not stable in some browsers,
394
+ // fall-back the comparator to 'focusIndex';
395
+ else
396
+ return a.focusIndex - b.focusIndex;
397
+ });
398
+
399
+ var size = focusList.length;
400
+ for ( var i = 0; i < size; i++ )
401
+ focusList[ i ].focusIndex = i;
402
+ }
403
+
404
+ function changeFocus( offset ) {
405
+ var focusList = me._.focusList;
406
+ offset = offset || 0;
407
+
408
+ if ( focusList.length < 1 )
409
+ return;
410
+
411
+ var current = me._.currentFocusIndex;
412
+
413
+ // Trigger the 'blur' event of any input element before anything,
414
+ // since certain UI updates may depend on it.
415
+ try {
416
+ focusList[ current ].getInputElement().$.blur();
417
+ } catch ( e ) {}
418
+
419
+ var startIndex = ( current + offset + focusList.length ) % focusList.length,
420
+ currentIndex = startIndex;
421
+ while ( offset && !focusList[ currentIndex ].isFocusable() ) {
422
+ currentIndex = ( currentIndex + offset + focusList.length ) % focusList.length;
423
+ if ( currentIndex == startIndex )
424
+ break;
425
+ }
426
+
427
+ focusList[ currentIndex ].focus();
428
+
429
+ // Select whole field content.
430
+ if ( focusList[ currentIndex ].type == 'text' )
431
+ focusList[ currentIndex ].select();
432
+ }
433
+
434
+ this.changeFocus = changeFocus;
435
+
436
+
437
+ function keydownHandler( evt ) {
438
+ // If I'm not the top dialog, ignore.
439
+ if ( me != CKEDITOR.dialog._.currentTop )
440
+ return;
441
+
442
+ var keystroke = evt.data.getKeystroke(),
443
+ rtl = editor.lang.dir == 'rtl',
444
+ button;
445
+
446
+ processed = stopPropagation = 0;
447
+
448
+ if ( keystroke == 9 || keystroke == CKEDITOR.SHIFT + 9 ) {
449
+ var shiftPressed = ( keystroke == CKEDITOR.SHIFT + 9 );
450
+
451
+ // Handling Tab and Shift-Tab.
452
+ if ( me._.tabBarMode ) {
453
+ // Change tabs.
454
+ var nextId = shiftPressed ? getPreviousVisibleTab.call( me ) : getNextVisibleTab.call( me );
455
+ me.selectPage( nextId );
456
+ me._.tabs[ nextId ][ 0 ].focus();
457
+ } else {
458
+ // Change the focus of inputs.
459
+ changeFocus( shiftPressed ? -1 : 1 );
460
+ }
461
+
462
+ processed = 1;
463
+ } else if ( keystroke == CKEDITOR.ALT + 121 && !me._.tabBarMode && me.getPageCount() > 1 ) {
464
+ // Alt-F10 puts focus into the current tab item in the tab bar.
465
+ me._.tabBarMode = true;
466
+ me._.tabs[ me._.currentTabId ][ 0 ].focus();
467
+ processed = 1;
468
+ } else if ( ( keystroke == 37 || keystroke == 39 ) && me._.tabBarMode ) {
469
+ // Arrow keys - used for changing tabs.
470
+ nextId = ( keystroke == ( rtl ? 39 : 37 ) ? getPreviousVisibleTab.call( me ) : getNextVisibleTab.call( me ) );
471
+ me.selectPage( nextId );
472
+ me._.tabs[ nextId ][ 0 ].focus();
473
+ processed = 1;
474
+ } else if ( ( keystroke == 13 || keystroke == 32 ) && me._.tabBarMode ) {
475
+ this.selectPage( this._.currentTabId );
476
+ this._.tabBarMode = false;
477
+ this._.currentFocusIndex = -1;
478
+ changeFocus( 1 );
479
+ processed = 1;
480
+ }
481
+ // If user presses enter key in a text box, it implies clicking OK for the dialog.
482
+ else if ( keystroke == 13 /*ENTER*/ ) {
483
+ // Don't do that for a target that handles ENTER.
484
+ var target = evt.data.getTarget();
485
+ if ( !target.is( 'a', 'button', 'select', 'textarea' ) && ( !target.is( 'input' ) || target.$.type != 'button' ) ) {
486
+ button = this.getButton( 'ok' );
487
+ button && CKEDITOR.tools.setTimeout( button.click, 0, button );
488
+ processed = 1;
489
+ }
490
+ stopPropagation = 1; // Always block the propagation (#4269)
491
+ } else if ( keystroke == 27 /*ESC*/ ) {
492
+ button = this.getButton( 'cancel' );
493
+
494
+ // If there's a Cancel button, click it, else just fire the cancel event and hide the dialog.
495
+ if ( button )
496
+ CKEDITOR.tools.setTimeout( button.click, 0, button );
497
+ else {
498
+ if ( this.fire( 'cancel', { hide: true } ).hide !== false )
499
+ this.hide();
500
+ }
501
+ stopPropagation = 1; // Always block the propagation (#4269)
502
+ } else
503
+ return;
504
+
505
+ keypressHandler( evt );
506
+ }
507
+
508
+ function keypressHandler( evt ) {
509
+ if ( processed )
510
+ evt.data.preventDefault( 1 );
511
+ else if ( stopPropagation )
512
+ evt.data.stopPropagation();
513
+ }
514
+
515
+ var dialogElement = this._.element;
516
+
517
+ editor.focusManager.add( dialogElement, 1 );
518
+
519
+ // Add the dialog keyboard handlers.
520
+ this.on( 'show', function() {
521
+ dialogElement.on( 'keydown', keydownHandler, this );
522
+
523
+ // Some browsers instead, don't cancel key events in the keydown, but in the
524
+ // keypress. So we must do a longer trip in those cases. (#4531,#8985)
525
+ if ( CKEDITOR.env.opera || CKEDITOR.env.gecko )
526
+ dialogElement.on( 'keypress', keypressHandler, this );
527
+
528
+ });
529
+ this.on( 'hide', function() {
530
+ dialogElement.removeListener( 'keydown', keydownHandler );
531
+ if ( CKEDITOR.env.opera || CKEDITOR.env.gecko )
532
+ dialogElement.removeListener( 'keypress', keypressHandler );
533
+
534
+ // Reset fields state when closing dialog.
535
+ iterContents( function( item ) {
536
+ resetField.apply( item );
537
+ });
538
+ });
539
+ this.on( 'iframeAdded', function( evt ) {
540
+ var doc = new CKEDITOR.dom.document( evt.data.iframe.$.contentWindow.document );
541
+ doc.on( 'keydown', keydownHandler, this, null, 0 );
542
+ });
543
+
544
+ // Auto-focus logic in dialog.
545
+ this.on( 'show', function() {
546
+ // Setup tabIndex on showing the dialog instead of on loading
547
+ // to allow dynamic tab order happen in dialog definition.
548
+ setupFocus();
549
+
550
+ if ( editor.config.dialog_startupFocusTab && me._.pageCount > 1 ) {
551
+ me._.tabBarMode = true;
552
+ me._.tabs[ me._.currentTabId ][ 0 ].focus();
553
+ } else if ( !this._.hasFocus ) {
554
+ this._.currentFocusIndex = -1;
555
+
556
+ // Decide where to put the initial focus.
557
+ if ( definition.onFocus ) {
558
+ var initialFocus = definition.onFocus.call( this );
559
+ // Focus the field that the user specified.
560
+ initialFocus && initialFocus.focus();
561
+ }
562
+ // Focus the first field in layout order.
563
+ else
564
+ changeFocus( 1 );
565
+ }
566
+ }, this, null, 0xffffffff );
567
+
568
+ // IE6 BUG: Text fields and text areas are only half-rendered the first time the dialog appears in IE6 (#2661).
569
+ // This is still needed after [2708] and [2709] because text fields in hidden TR tags are still broken.
570
+ if ( CKEDITOR.env.ie6Compat ) {
571
+ this.on( 'load', function( evt ) {
572
+ var outer = this.getElement(),
573
+ inner = outer.getFirst();
574
+ inner.remove();
575
+ inner.appendTo( outer );
576
+ }, this );
577
+ }
578
+
579
+ initDragAndDrop( this );
580
+ initResizeHandles( this );
581
+
582
+ // Insert the title.
583
+ ( new CKEDITOR.dom.text( definition.title, CKEDITOR.document ) ).appendTo( this.parts.title );
584
+
585
+ // Insert the tabs and contents.
586
+ for ( i = 0; i < definition.contents.length; i++ ) {
587
+ var page = definition.contents[ i ];
588
+ page && this.addPage( page );
589
+ }
590
+
591
+ this.parts[ 'tabs' ].on( 'click', function( evt ) {
592
+ var target = evt.data.getTarget();
593
+ // If we aren't inside a tab, bail out.
594
+ if ( target.hasClass( 'cke_dialog_tab' ) ) {
595
+ // Get the ID of the tab, without the 'cke_' prefix and the unique number suffix.
596
+ var id = target.$.id;
597
+ this.selectPage( id.substring( 4, id.lastIndexOf( '_' ) ) );
598
+
599
+ if ( this._.tabBarMode ) {
600
+ this._.tabBarMode = false;
601
+ this._.currentFocusIndex = -1;
602
+ changeFocus( 1 );
603
+ }
604
+ evt.data.preventDefault();
605
+ }
606
+ }, this );
607
+
608
+ // Insert buttons.
609
+ var buttonsHtml = [],
610
+ buttons = CKEDITOR.dialog._.uiElementBuilders.hbox.build( this, {
611
+ type: 'hbox',
612
+ className: 'cke_dialog_footer_buttons',
613
+ widths: [],
614
+ children: definition.buttons
615
+ }, buttonsHtml ).getChild();
616
+ this.parts.footer.setHtml( buttonsHtml.join( '' ) );
617
+
618
+ for ( i = 0; i < buttons.length; i++ )
619
+ this._.buttons[ buttons[ i ].id ] = buttons[ i ];
620
+ };
621
+
622
+ // Focusable interface. Use it via dialog.addFocusable.
623
+ function Focusable( dialog, element, index ) {
624
+ this.element = element;
625
+ this.focusIndex = index;
626
+ // TODO: support tabIndex for focusables.
627
+ this.tabIndex = 0;
628
+ this.isFocusable = function() {
629
+ return !element.getAttribute( 'disabled' ) && element.isVisible();
630
+ };
631
+ this.focus = function() {
632
+ dialog._.currentFocusIndex = this.focusIndex;
633
+ this.element.focus();
634
+ };
635
+ // Bind events
636
+ element.on( 'keydown', function( e ) {
637
+ if ( e.data.getKeystroke() in { 32:1,13:1 } )
638
+ this.fire( 'click' );
639
+ });
640
+ element.on( 'focus', function() {
641
+ this.fire( 'mouseover' );
642
+ });
643
+ element.on( 'blur', function() {
644
+ this.fire( 'mouseout' );
645
+ });
646
+ }
647
+
648
+ // Re-layout the dialog on window resize.
649
+ function resizeWithWindow( dialog ) {
650
+ var win = CKEDITOR.document.getWindow();
651
+ function resizeHandler() { dialog.layout(); }
652
+ win.on( 'resize', resizeHandler );
653
+ dialog.on( 'hide', function() { win.removeListener( 'resize', resizeHandler ); } );
654
+ }
655
+
656
+ CKEDITOR.dialog.prototype = {
657
+ destroy: function() {
658
+ this.hide();
659
+ this._.element.remove();
660
+ },
661
+
662
+ /**
663
+ * Resizes the dialog.
664
+ *
665
+ * dialogObj.resize( 800, 640 );
666
+ *
667
+ * @method
668
+ * @param {Number} width The width of the dialog in pixels.
669
+ * @param {Number} height The height of the dialog in pixels.
670
+ */
671
+ resize: (function() {
672
+ return function( width, height ) {
673
+ if ( this._.contentSize && this._.contentSize.width == width && this._.contentSize.height == height )
674
+ return;
675
+
676
+ CKEDITOR.dialog.fire( 'resize', {
677
+ dialog: this,
678
+ width: width,
679
+ height: height
680
+ }, this._.editor );
681
+
682
+ this.fire( 'resize', {
683
+ width: width,
684
+ height: height
685
+ }, this._.editor );
686
+
687
+ var contents = this.parts.contents;
688
+ contents.setStyles({
689
+ width: width + 'px',
690
+ height: height + 'px'
691
+ });
692
+
693
+ // Update dialog position when dimension get changed in RTL.
694
+ if ( this._.editor.lang.dir == 'rtl' && this._.position )
695
+ this._.position.x = CKEDITOR.document.getWindow().getViewPaneSize().width - this._.contentSize.width - parseInt( this._.element.getFirst().getStyle( 'right' ), 10 );
696
+
697
+ this._.contentSize = { width: width, height: height };
698
+ };
699
+ })(),
700
+
701
+ /**
702
+ * Gets the current size of the dialog in pixels.
703
+ *
704
+ * var width = dialogObj.getSize().width;
705
+ *
706
+ * @returns {Object}
707
+ * @returns {Number} return.width
708
+ * @returns {Number} return.height
709
+ */
710
+ getSize: function() {
711
+ var element = this._.element.getFirst();
712
+ return { width: element.$.offsetWidth || 0, height: element.$.offsetHeight || 0 };
713
+ },
714
+
715
+ /**
716
+ * Moves the dialog to an `(x, y)` coordinate relative to the window.
717
+ *
718
+ * dialogObj.move( 10, 40 );
719
+ *
720
+ * @method
721
+ * @param {Number} x The target x-coordinate.
722
+ * @param {Number} y The target y-coordinate.
723
+ * @param {Boolean} save Flag indicate whether the dialog position should be remembered on next open up.
724
+ */
725
+ move: function( x, y, save ) {
726
+
727
+ // The dialog may be fixed positioned or absolute positioned. Ask the
728
+ // browser what is the current situation first.
729
+ var element = this._.element.getFirst(), rtl = this._.editor.lang.dir == 'rtl';
730
+ var isFixed = element.getComputedStyle( 'position' ) == 'fixed';
731
+
732
+ // (#8888) In some cases of a very small viewport, dialog is incorrectly
733
+ // positioned in IE7. It also happens that it remains sticky and user cannot
734
+ // scroll down/up to reveal dialog's content below/above the viewport; this is
735
+ // cumbersome.
736
+ // The only way to fix this is to move mouse out of the browser and
737
+ // go back to see that dialog position is automagically fixed. No events,
738
+ // no style change - pure magic. This is a IE7 rendering issue, which can be
739
+ // fixed with dummy style redraw on each move.
740
+ if ( CKEDITOR.env.ie )
741
+ element.setStyle( 'zoom', '100%' );
742
+
743
+ if ( isFixed && this._.position && this._.position.x == x && this._.position.y == y )
744
+ return;
745
+
746
+ // Save the current position.
747
+ this._.position = { x: x, y: y };
748
+
749
+ // If not fixed positioned, add scroll position to the coordinates.
750
+ if ( !isFixed ) {
751
+ var scrollPosition = CKEDITOR.document.getWindow().getScrollPosition();
752
+ x += scrollPosition.x;
753
+ y += scrollPosition.y;
754
+ }
755
+
756
+ // Translate coordinate for RTL.
757
+ if ( rtl ) {
758
+ var dialogSize = this.getSize(), viewPaneSize = CKEDITOR.document.getWindow().getViewPaneSize();
759
+ x = viewPaneSize.width - dialogSize.width - x;
760
+ }
761
+
762
+ var styles = { 'top': ( y > 0 ? y : 0 ) + 'px' };
763
+ styles[ rtl ? 'right' : 'left' ] = ( x > 0 ? x : 0 ) + 'px';
764
+
765
+ element.setStyles( styles );
766
+
767
+ save && ( this._.moved = 1 );
768
+ },
769
+
770
+ /**
771
+ * Gets the dialog's position in the window.
772
+ *
773
+ * var dialogX = dialogObj.getPosition().x;
774
+ *
775
+ * @returns {Object}
776
+ * @returns {Number} return.x
777
+ * @returns {Number} return.y
778
+ */
779
+ getPosition: function() {
780
+ return CKEDITOR.tools.extend( {}, this._.position );
781
+ },
782
+
783
+ /**
784
+ * Shows the dialog box.
785
+ *
786
+ * dialogObj.show();
787
+ */
788
+ show: function() {
789
+ // Insert the dialog's element to the root document.
790
+ var element = this._.element;
791
+ var definition = this.definition;
792
+ if ( !( element.getParent() && element.getParent().equals( CKEDITOR.document.getBody() ) ) )
793
+ element.appendTo( CKEDITOR.document.getBody() );
794
+ else
795
+ element.setStyle( 'display', 'block' );
796
+
797
+ // FIREFOX BUG: Fix vanishing caret for Firefox 2 or Gecko 1.8.
798
+ if ( CKEDITOR.env.gecko && CKEDITOR.env.version < 10900 ) {
799
+ var dialogElement = this.parts.dialog;
800
+ dialogElement.setStyle( 'position', 'absolute' );
801
+ setTimeout( function() {
802
+ dialogElement.setStyle( 'position', 'fixed' );
803
+ }, 0 );
804
+ }
805
+
806
+
807
+ // First, set the dialog to an appropriate size.
808
+ this.resize( this._.contentSize && this._.contentSize.width || definition.width || definition.minWidth, this._.contentSize && this._.contentSize.height || definition.height || definition.minHeight );
809
+
810
+ // Reset all inputs back to their default value.
811
+ this.reset();
812
+
813
+ // Select the first tab by default.
814
+ this.selectPage( this.definition.contents[ 0 ].id );
815
+
816
+ // Set z-index.
817
+ if ( CKEDITOR.dialog._.currentZIndex === null )
818
+ CKEDITOR.dialog._.currentZIndex = this._.editor.config.baseFloatZIndex;
819
+ this._.element.getFirst().setStyle( 'z-index', CKEDITOR.dialog._.currentZIndex += 10 );
820
+
821
+ // Maintain the dialog ordering and dialog cover.
822
+ if ( CKEDITOR.dialog._.currentTop === null ) {
823
+ CKEDITOR.dialog._.currentTop = this;
824
+ this._.parentDialog = null;
825
+ showCover( this._.editor );
826
+
827
+ } else {
828
+ this._.parentDialog = CKEDITOR.dialog._.currentTop;
829
+ var parentElement = this._.parentDialog.getElement().getFirst();
830
+ parentElement.$.style.zIndex -= Math.floor( this._.editor.config.baseFloatZIndex / 2 );
831
+ CKEDITOR.dialog._.currentTop = this;
832
+ }
833
+
834
+ element.on( 'keydown', accessKeyDownHandler );
835
+ element.on( CKEDITOR.env.opera ? 'keypress' : 'keyup', accessKeyUpHandler );
836
+
837
+ // Reset the hasFocus state.
838
+ this._.hasFocus = false;
839
+
840
+ CKEDITOR.tools.setTimeout( function() {
841
+ this.layout();
842
+ resizeWithWindow( this );
843
+
844
+ this.parts.dialog.setStyle( 'visibility', '' );
845
+
846
+ // Execute onLoad for the first show.
847
+ this.fireOnce( 'load', {} );
848
+ CKEDITOR.ui.fire( 'ready', this );
849
+
850
+ this.fire( 'show', {} );
851
+ this._.editor.fire( 'dialogShow', this );
852
+
853
+ if ( !this._.parentDialog )
854
+ this._.editor.focusManager.lock();
855
+
856
+ // Save the initial values of the dialog.
857
+ this.foreach( function( contentObj ) {
858
+ contentObj.setInitValue && contentObj.setInitValue();
859
+ });
860
+
861
+ }, 100, this );
862
+ },
863
+
864
+ /**
865
+ * Rearrange the dialog to its previous position or the middle of the window.
866
+ *
867
+ * @since 3.5
868
+ */
869
+ layout: function() {
870
+ var el = this.parts.dialog;
871
+ var dialogSize = this.getSize();
872
+ var win = CKEDITOR.document.getWindow(),
873
+ viewSize = win.getViewPaneSize();
874
+
875
+ var posX = ( viewSize.width - dialogSize.width ) / 2,
876
+ posY = ( viewSize.height - dialogSize.height ) / 2;
877
+
878
+ // Switch to absolute position when viewport is smaller than dialog size.
879
+ if ( !CKEDITOR.env.ie6Compat ) {
880
+ if ( dialogSize.height + ( posY > 0 ? posY : 0 ) > viewSize.height ||
881
+ dialogSize.width + ( posX > 0 ? posX : 0 ) > viewSize.width )
882
+ el.setStyle( 'position', 'absolute' );
883
+ else
884
+ el.setStyle( 'position', 'fixed' );
885
+ }
886
+
887
+ this.move( this._.moved ? this._.position.x : posX,
888
+ this._.moved ? this._.position.y : posY );
889
+ },
890
+
891
+ /**
892
+ * Executes a function for each UI element.
893
+ *
894
+ * @param {Function} fn Function to execute for each UI element.
895
+ * @returns {CKEDITOR.dialog} The current dialog object.
896
+ */
897
+ foreach: function( fn ) {
898
+ for ( var i in this._.contents ) {
899
+ for ( var j in this._.contents[ i ] )
900
+ fn.call( this, this._.contents[ i ][ j ] );
901
+ }
902
+ return this;
903
+ },
904
+
905
+ /**
906
+ * Resets all input values in the dialog.
907
+ *
908
+ * dialogObj.reset();
909
+ *
910
+ * @method
911
+ * @chainable
912
+ */
913
+ reset: (function() {
914
+ var fn = function( widget ) {
915
+ if ( widget.reset )
916
+ widget.reset( 1 );
917
+ };
918
+ return function() {
919
+ this.foreach( fn );
920
+ return this;
921
+ };
922
+ })(),
923
+
924
+
925
+ /**
926
+ * Calls the {@link CKEDITOR.dialog.definition.uiElement#setup} method of each
927
+ * of the UI elements, with the arguments passed through it.
928
+ * It is usually being called when the dialog is opened, to put the initial value inside the field.
929
+ *
930
+ * dialogObj.setupContent();
931
+ *
932
+ * var timestamp = ( new Date() ).valueOf();
933
+ * dialogObj.setupContent( timestamp );
934
+ */
935
+ setupContent: function() {
936
+ var args = arguments;
937
+ this.foreach( function( widget ) {
938
+ if ( widget.setup )
939
+ widget.setup.apply( widget, args );
940
+ });
941
+ },
942
+
943
+ /**
944
+ * Calls the {@link CKEDITOR.dialog.definition.uiElement#commit} method of each
945
+ * of the UI elements, with the arguments passed through it.
946
+ * It is usually being called when the user confirms the dialog, to process the values.
947
+ *
948
+ * dialogObj.commitContent();
949
+ *
950
+ * var timestamp = ( new Date() ).valueOf();
951
+ * dialogObj.commitContent( timestamp );
952
+ */
953
+ commitContent: function() {
954
+ var args = arguments;
955
+ this.foreach( function( widget ) {
956
+ // Make sure IE triggers "change" event on last focused input before closing the dialog. (#7915)
957
+ if ( CKEDITOR.env.ie && this._.currentFocusIndex == widget.focusIndex )
958
+ widget.getInputElement().$.blur();
959
+
960
+ if ( widget.commit )
961
+ widget.commit.apply( widget, args );
962
+ });
963
+ },
964
+
965
+ /**
966
+ * Hides the dialog box.
967
+ *
968
+ * dialogObj.hide();
969
+ */
970
+ hide: function() {
971
+ if ( !this.parts.dialog.isVisible() )
972
+ return;
973
+
974
+ this.fire( 'hide', {} );
975
+ this._.editor.fire( 'dialogHide', this );
976
+ // Reset the tab page.
977
+ this.selectPage( this._.tabIdList[ 0 ] );
978
+ var element = this._.element;
979
+ element.setStyle( 'display', 'none' );
980
+ this.parts.dialog.setStyle( 'visibility', 'hidden' );
981
+ // Unregister all access keys associated with this dialog.
982
+ unregisterAccessKey( this );
983
+
984
+ // Close any child(top) dialogs first.
985
+ while ( CKEDITOR.dialog._.currentTop != this )
986
+ CKEDITOR.dialog._.currentTop.hide();
987
+
988
+ // Maintain dialog ordering and remove cover if needed.
989
+ if ( !this._.parentDialog )
990
+ hideCover( this._.editor );
991
+ else {
992
+ var parentElement = this._.parentDialog.getElement().getFirst();
993
+ parentElement.setStyle( 'z-index', parseInt( parentElement.$.style.zIndex, 10 ) + Math.floor( this._.editor.config.baseFloatZIndex / 2 ) );
994
+ }
995
+ CKEDITOR.dialog._.currentTop = this._.parentDialog;
996
+
997
+ // Deduct or clear the z-index.
998
+ if ( !this._.parentDialog ) {
999
+ CKEDITOR.dialog._.currentZIndex = null;
1000
+
1001
+ // Remove access key handlers.
1002
+ element.removeListener( 'keydown', accessKeyDownHandler );
1003
+ element.removeListener( CKEDITOR.env.opera ? 'keypress' : 'keyup', accessKeyUpHandler );
1004
+
1005
+ var editor = this._.editor;
1006
+ editor.focus();
1007
+
1008
+ // Give a while before unlock, waiting for focus to return to the editable. (#172)
1009
+ setTimeout( function() { editor.focusManager.unlock(); }, 0 );
1010
+
1011
+ } else
1012
+ CKEDITOR.dialog._.currentZIndex -= 10;
1013
+
1014
+ delete this._.parentDialog;
1015
+ // Reset the initial values of the dialog.
1016
+ this.foreach( function( contentObj ) {
1017
+ contentObj.resetInitValue && contentObj.resetInitValue();
1018
+ });
1019
+ },
1020
+
1021
+ /**
1022
+ * Adds a tabbed page into the dialog.
1023
+ *
1024
+ * @param {Object} contents Content definition.
1025
+ */
1026
+ addPage: function( contents ) {
1027
+ if ( contents.requiredContent && !this._.editor.filter.check( contents.requiredContent ) )
1028
+ return;
1029
+
1030
+ var pageHtml = [],
1031
+ titleHtml = contents.label ? ' title="' + CKEDITOR.tools.htmlEncode( contents.label ) + '"' : '',
1032
+ elements = contents.elements,
1033
+ vbox = CKEDITOR.dialog._.uiElementBuilders.vbox.build( this, {
1034
+ type: 'vbox',
1035
+ className: 'cke_dialog_page_contents',
1036
+ children: contents.elements,
1037
+ expand: !!contents.expand,
1038
+ padding: contents.padding,
1039
+ style: contents.style || 'width: 100%;'
1040
+ }, pageHtml );
1041
+
1042
+ var contentMap = this._.contents[ contents.id ] = {},
1043
+ cursor,
1044
+ children = vbox.getChild(),
1045
+ enabledFields = 0;
1046
+
1047
+ while ( ( cursor = children.shift() ) ) {
1048
+ // Count all allowed fields.
1049
+ if ( !cursor.notAllowed && cursor.type != 'hbox' && cursor.type != 'vbox' )
1050
+ enabledFields++;
1051
+
1052
+ contentMap[ cursor.id ] = cursor;
1053
+ if ( typeof( cursor.getChild ) == 'function' )
1054
+ children.push.apply( children, cursor.getChild() );
1055
+ }
1056
+
1057
+ // If all fields are disabled (because they are not allowed) hide this tab.
1058
+ if ( !enabledFields )
1059
+ contents.hidden = true;
1060
+
1061
+ // Create the HTML for the tab and the content block.
1062
+ var page = CKEDITOR.dom.element.createFromHtml( pageHtml.join( '' ) );
1063
+ page.setAttribute( 'role', 'tabpanel' );
1064
+
1065
+ var env = CKEDITOR.env;
1066
+ var tabId = 'cke_' + contents.id + '_' + CKEDITOR.tools.getNextNumber(),
1067
+ tab = CKEDITOR.dom.element.createFromHtml( [
1068
+ '<a class="cke_dialog_tab"',
1069
+ ( this._.pageCount > 0 ? ' cke_last' : 'cke_first' ),
1070
+ titleHtml,
1071
+ ( !!contents.hidden ? ' style="display:none"' : '' ),
1072
+ ' id="', tabId, '"',
1073
+ env.gecko && env.version >= 10900 && !env.hc ? '' : ' href="javascript:void(0)"',
1074
+ ' tabIndex="-1"',
1075
+ ' hidefocus="true"',
1076
+ ' role="tab">',
1077
+ contents.label,
1078
+ '</a>'
1079
+ ].join( '' ) );
1080
+
1081
+ page.setAttribute( 'aria-labelledby', tabId );
1082
+
1083
+ // Take records for the tabs and elements created.
1084
+ this._.tabs[ contents.id ] = [ tab, page ];
1085
+ this._.tabIdList.push( contents.id );
1086
+ !contents.hidden && this._.pageCount++;
1087
+ this._.lastTab = tab;
1088
+ this.updateStyle();
1089
+
1090
+ // Attach the DOM nodes.
1091
+
1092
+ page.setAttribute( 'name', contents.id );
1093
+ page.appendTo( this.parts.contents );
1094
+
1095
+ tab.unselectable();
1096
+ this.parts.tabs.append( tab );
1097
+
1098
+ // Add access key handlers if access key is defined.
1099
+ if ( contents.accessKey ) {
1100
+ registerAccessKey( this, this, 'CTRL+' + contents.accessKey, tabAccessKeyDown, tabAccessKeyUp );
1101
+ this._.accessKeyMap[ 'CTRL+' + contents.accessKey ] = contents.id;
1102
+ }
1103
+ },
1104
+
1105
+ /**
1106
+ * Activates a tab page in the dialog by its id.
1107
+ *
1108
+ * dialogObj.selectPage( 'tab_1' );
1109
+ *
1110
+ * @param {String} id The id of the dialog tab to be activated.
1111
+ */
1112
+ selectPage: function( id ) {
1113
+ if ( this._.currentTabId == id )
1114
+ return;
1115
+
1116
+ // Returning true means that the event has been canceled
1117
+ if ( this.fire( 'selectPage', { page: id, currentPage: this._.currentTabId } ) === true )
1118
+ return;
1119
+
1120
+ // Hide the non-selected tabs and pages.
1121
+ for ( var i in this._.tabs ) {
1122
+ var tab = this._.tabs[ i ][ 0 ],
1123
+ page = this._.tabs[ i ][ 1 ];
1124
+ if ( i != id ) {
1125
+ tab.removeClass( 'cke_dialog_tab_selected' );
1126
+ page.hide();
1127
+ }
1128
+ page.setAttribute( 'aria-hidden', i != id );
1129
+ }
1130
+
1131
+ var selected = this._.tabs[ id ];
1132
+ selected[ 0 ].addClass( 'cke_dialog_tab_selected' );
1133
+
1134
+ // [IE] an invisible input[type='text'] will enlarge it's width
1135
+ // if it's value is long when it shows, so we clear it's value
1136
+ // before it shows and then recover it (#5649)
1137
+ if ( CKEDITOR.env.ie6Compat || CKEDITOR.env.ie7Compat ) {
1138
+ clearOrRecoverTextInputValue( selected[ 1 ] );
1139
+ selected[ 1 ].show();
1140
+ setTimeout( function() {
1141
+ clearOrRecoverTextInputValue( selected[ 1 ], 1 );
1142
+ }, 0 );
1143
+ } else
1144
+ selected[ 1 ].show();
1145
+
1146
+ this._.currentTabId = id;
1147
+ this._.currentTabIndex = CKEDITOR.tools.indexOf( this._.tabIdList, id );
1148
+ },
1149
+
1150
+ /**
1151
+ * Dialog state-specific style updates.
1152
+ */
1153
+ updateStyle: function() {
1154
+ // If only a single page shown, a different style is used in the central pane.
1155
+ this.parts.dialog[ ( this._.pageCount === 1 ? 'add' : 'remove' ) + 'Class' ]( 'cke_single_page' );
1156
+ },
1157
+
1158
+ /**
1159
+ * Hides a page's tab away from the dialog.
1160
+ *
1161
+ * dialog.hidePage( 'tab_3' );
1162
+ *
1163
+ * @param {String} id The page's Id.
1164
+ */
1165
+ hidePage: function( id ) {
1166
+ var tab = this._.tabs[ id ] && this._.tabs[ id ][ 0 ];
1167
+ if ( !tab || this._.pageCount == 1 || !tab.isVisible() )
1168
+ return;
1169
+ // Switch to other tab first when we're hiding the active tab.
1170
+ else if ( id == this._.currentTabId )
1171
+ this.selectPage( getPreviousVisibleTab.call( this ) );
1172
+
1173
+ tab.hide();
1174
+ this._.pageCount--;
1175
+ this.updateStyle();
1176
+ },
1177
+
1178
+ /**
1179
+ * Unhides a page's tab.
1180
+ *
1181
+ * dialog.showPage( 'tab_2' );
1182
+ *
1183
+ * @param {String} id The page's Id.
1184
+ */
1185
+ showPage: function( id ) {
1186
+ var tab = this._.tabs[ id ] && this._.tabs[ id ][ 0 ];
1187
+ if ( !tab )
1188
+ return;
1189
+ tab.show();
1190
+ this._.pageCount++;
1191
+ this.updateStyle();
1192
+ },
1193
+
1194
+ /**
1195
+ * Gets the root DOM element of the dialog.
1196
+ *
1197
+ * var dialogElement = dialogObj.getElement().getFirst();
1198
+ * dialogElement.setStyle( 'padding', '5px' );
1199
+ *
1200
+ * @returns {CKEDITOR.dom.element} The `<span>` element containing this dialog.
1201
+ */
1202
+ getElement: function() {
1203
+ return this._.element;
1204
+ },
1205
+
1206
+ /**
1207
+ * Gets the name of the dialog.
1208
+ *
1209
+ * var dialogName = dialogObj.getName();
1210
+ *
1211
+ * @returns {String} The name of this dialog.
1212
+ */
1213
+ getName: function() {
1214
+ return this._.name;
1215
+ },
1216
+
1217
+ /**
1218
+ * Gets a dialog UI element object from a dialog page.
1219
+ *
1220
+ * dialogObj.getContentElement( 'tabId', 'elementId' ).setValue( 'Example' );
1221
+ *
1222
+ * @param {String} pageId id of dialog page.
1223
+ * @param {String} elementId id of UI element.
1224
+ * @returns {CKEDITOR.ui.dialog.uiElement} The dialog UI element.
1225
+ */
1226
+ getContentElement: function( pageId, elementId ) {
1227
+ var page = this._.contents[ pageId ];
1228
+ return page && page[ elementId ];
1229
+ },
1230
+
1231
+ /**
1232
+ * Gets the value of a dialog UI element.
1233
+ *
1234
+ * alert( dialogObj.getValueOf( 'tabId', 'elementId' ) );
1235
+ *
1236
+ * @param {String} pageId id of dialog page.
1237
+ * @param {String} elementId id of UI element.
1238
+ * @returns {Object} The value of the UI element.
1239
+ */
1240
+ getValueOf: function( pageId, elementId ) {
1241
+ return this.getContentElement( pageId, elementId ).getValue();
1242
+ },
1243
+
1244
+ /**
1245
+ * Sets the value of a dialog UI element.
1246
+ *
1247
+ * dialogObj.setValueOf( 'tabId', 'elementId', 'Example' );
1248
+ *
1249
+ * @param {String} pageId id of the dialog page.
1250
+ * @param {String} elementId id of the UI element.
1251
+ * @param {Object} value The new value of the UI element.
1252
+ */
1253
+ setValueOf: function( pageId, elementId, value ) {
1254
+ return this.getContentElement( pageId, elementId ).setValue( value );
1255
+ },
1256
+
1257
+ /**
1258
+ * Gets the UI element of a button in the dialog's button row.
1259
+ *
1260
+ * @returns {CKEDITOR.ui.dialog.button} The button object.
1261
+ *
1262
+ * @param {String} id The id of the button.
1263
+ */
1264
+ getButton: function( id ) {
1265
+ return this._.buttons[ id ];
1266
+ },
1267
+
1268
+ /**
1269
+ * Simulates a click to a dialog button in the dialog's button row.
1270
+ *
1271
+ * @returns The return value of the dialog's `click` event.
1272
+ *
1273
+ * @param {String} id The id of the button.
1274
+ */
1275
+ click: function( id ) {
1276
+ return this._.buttons[ id ].click();
1277
+ },
1278
+
1279
+ /**
1280
+ * Disables a dialog button.
1281
+ *
1282
+ * @param {String} id The id of the button.
1283
+ */
1284
+ disableButton: function( id ) {
1285
+ return this._.buttons[ id ].disable();
1286
+ },
1287
+
1288
+ /**
1289
+ * Enables a dialog button.
1290
+ *
1291
+ * @param {String} id The id of the button.
1292
+ */
1293
+ enableButton: function( id ) {
1294
+ return this._.buttons[ id ].enable();
1295
+ },
1296
+
1297
+ /**
1298
+ * Gets the number of pages in the dialog.
1299
+ *
1300
+ * @returns {Number} Page count.
1301
+ */
1302
+ getPageCount: function() {
1303
+ return this._.pageCount;
1304
+ },
1305
+
1306
+ /**
1307
+ * Gets the editor instance which opened this dialog.
1308
+ *
1309
+ * @returns {CKEDITOR.editor} Parent editor instances.
1310
+ */
1311
+ getParentEditor: function() {
1312
+ return this._.editor;
1313
+ },
1314
+
1315
+ /**
1316
+ * Gets the element that was selected when opening the dialog, if any.
1317
+ *
1318
+ * @returns {CKEDITOR.dom.element} The element that was selected, or `null`.
1319
+ */
1320
+ getSelectedElement: function() {
1321
+ return this.getParentEditor().getSelection().getSelectedElement();
1322
+ },
1323
+
1324
+ /**
1325
+ * Adds element to dialog's focusable list.
1326
+ *
1327
+ * @param {CKEDITOR.dom.element} element
1328
+ * @param {Number} [index]
1329
+ */
1330
+ addFocusable: function( element, index ) {
1331
+ if ( typeof index == 'undefined' ) {
1332
+ index = this._.focusList.length;
1333
+ this._.focusList.push( new Focusable( this, element, index ) );
1334
+ } else {
1335
+ this._.focusList.splice( index, 0, new Focusable( this, element, index ) );
1336
+ for ( var i = index + 1; i < this._.focusList.length; i++ )
1337
+ this._.focusList[ i ].focusIndex++;
1338
+ }
1339
+ }
1340
+ };
1341
+
1342
+ CKEDITOR.tools.extend( CKEDITOR.dialog, {
1343
+ /**
1344
+ * Registers a dialog.
1345
+ *
1346
+ * // Full sample plugin, which does not only register a dialog window but also adds an item to the context menu.
1347
+ * // To open the dialog window, choose "Open dialog" in the context menu.
1348
+ * CKEDITOR.plugins.add( 'myplugin', {
1349
+ * init: function( editor ) {
1350
+ * editor.addCommand( 'mydialog',new CKEDITOR.dialogCommand( 'mydialog' ) );
1351
+ *
1352
+ * if ( editor.contextMenu ) {
1353
+ * editor.addMenuGroup( 'mygroup', 10 );
1354
+ * editor.addMenuItem( 'My Dialog', {
1355
+ * label: 'Open dialog',
1356
+ * command: 'mydialog',
1357
+ * group: 'mygroup'
1358
+ * } );
1359
+ * editor.contextMenu.addListener( function( element ) {
1360
+ * return { 'My Dialog': CKEDITOR.TRISTATE_OFF };
1361
+ * } );
1362
+ * }
1363
+ *
1364
+ * CKEDITOR.dialog.add( 'mydialog', function( api ) {
1365
+ * // CKEDITOR.dialog.definition
1366
+ * var dialogDefinition = {
1367
+ * title: 'Sample dialog',
1368
+ * minWidth: 390,
1369
+ * minHeight: 130,
1370
+ * contents: [
1371
+ * {
1372
+ * id: 'tab1',
1373
+ * label: 'Label',
1374
+ * title: 'Title',
1375
+ * expand: true,
1376
+ * padding: 0,
1377
+ * elements: [
1378
+ * {
1379
+ * type: 'html',
1380
+ * html: '<p>This is some sample HTML content.</p>'
1381
+ * },
1382
+ * {
1383
+ * type: 'textarea',
1384
+ * id: 'textareaId',
1385
+ * rows: 4,
1386
+ * cols: 40
1387
+ * }
1388
+ * ]
1389
+ * }
1390
+ * ],
1391
+ * buttons: [ CKEDITOR.dialog.okButton, CKEDITOR.dialog.cancelButton ],
1392
+ * onOk: function() {
1393
+ * // "this" is now a CKEDITOR.dialog object.
1394
+ * // Accessing dialog elements:
1395
+ * var textareaObj = this.getContentElement( 'tab1', 'textareaId' );
1396
+ * alert( "You have entered: " + textareaObj.getValue() );
1397
+ * }
1398
+ * };
1399
+ *
1400
+ * return dialogDefinition;
1401
+ * } );
1402
+ * }
1403
+ * } );
1404
+ *
1405
+ * CKEDITOR.replace( 'editor1', { extraPlugins: 'myplugin' } );
1406
+ *
1407
+ * @static
1408
+ * @param {String} name The dialog's name.
1409
+ * @param {Function/String} dialogDefinition
1410
+ * A function returning the dialog's definition, or the URL to the `.js` file holding the function.
1411
+ * The function should accept an argument `editor` which is the current editor instance, and
1412
+ * return an object conforming to {@link CKEDITOR.dialog.definition}.
1413
+ * @see CKEDITOR.dialog.definition
1414
+ */
1415
+ add: function( name, dialogDefinition ) {
1416
+ // Avoid path registration from multiple instances override definition.
1417
+ if ( !this._.dialogDefinitions[ name ] || typeof dialogDefinition == 'function' )
1418
+ this._.dialogDefinitions[ name ] = dialogDefinition;
1419
+ },
1420
+
1421
+ /**
1422
+ * @static
1423
+ * @todo
1424
+ */
1425
+ exists: function( name ) {
1426
+ return !!this._.dialogDefinitions[ name ];
1427
+ },
1428
+
1429
+ /**
1430
+ * @static
1431
+ * @todo
1432
+ */
1433
+ getCurrent: function() {
1434
+ return CKEDITOR.dialog._.currentTop;
1435
+ },
1436
+
1437
+ /**
1438
+ * Check whether tab wasn't removed by {@link CKEDITOR.config#removeDialogTabs}.
1439
+ *
1440
+ * @since 4.1
1441
+ * @static
1442
+ * @param {CKEDITOR.editor} editor
1443
+ * @param {String} dialogName
1444
+ * @param {String} tabName
1445
+ * @returns {Boolean}
1446
+ */
1447
+ isTabEnabled: function( editor, dialogName, tabName ) {
1448
+ var cfg = editor.config.removeDialogTabs;
1449
+
1450
+ return !( cfg && cfg.match( new RegExp( '(?:^|;)' + dialogName + ':' + tabName + '(?:$|;)', 'i' ) ) );
1451
+ },
1452
+
1453
+ /**
1454
+ * The default OK button for dialogs. Fires the `ok` event and closes the dialog if the event succeeds.
1455
+ *
1456
+ * @static
1457
+ * @method
1458
+ */
1459
+ okButton: (function() {
1460
+ var retval = function( editor, override ) {
1461
+ override = override || {};
1462
+ return CKEDITOR.tools.extend({
1463
+ id: 'ok',
1464
+ type: 'button',
1465
+ label: editor.lang.common.ok,
1466
+ 'class': 'cke_dialog_ui_button_ok',
1467
+ onClick: function( evt ) {
1468
+ var dialog = evt.data.dialog;
1469
+ if ( dialog.fire( 'ok', { hide: true } ).hide !== false )
1470
+ dialog.hide();
1471
+ }
1472
+ }, override, true );
1473
+ };
1474
+ retval.type = 'button';
1475
+ retval.override = function( override ) {
1476
+ return CKEDITOR.tools.extend( function( editor ) {
1477
+ return retval( editor, override );
1478
+ }, { type: 'button' }, true );
1479
+ };
1480
+ return retval;
1481
+ })(),
1482
+
1483
+ /**
1484
+ * The default cancel button for dialogs. Fires the `cancel` event and
1485
+ * closes the dialog if no UI element value changed.
1486
+ *
1487
+ * @static
1488
+ * @method
1489
+ */
1490
+ cancelButton: (function() {
1491
+ var retval = function( editor, override ) {
1492
+ override = override || {};
1493
+ return CKEDITOR.tools.extend({
1494
+ id: 'cancel',
1495
+ type: 'button',
1496
+ label: editor.lang.common.cancel,
1497
+ 'class': 'cke_dialog_ui_button_cancel',
1498
+ onClick: function( evt ) {
1499
+ var dialog = evt.data.dialog;
1500
+ if ( dialog.fire( 'cancel', { hide: true } ).hide !== false )
1501
+ dialog.hide();
1502
+ }
1503
+ }, override, true );
1504
+ };
1505
+ retval.type = 'button';
1506
+ retval.override = function( override ) {
1507
+ return CKEDITOR.tools.extend( function( editor ) {
1508
+ return retval( editor, override );
1509
+ }, { type: 'button' }, true );
1510
+ };
1511
+ return retval;
1512
+ })(),
1513
+
1514
+ /**
1515
+ * Registers a dialog UI element.
1516
+ *
1517
+ * @static
1518
+ * @param {String} typeName The name of the UI element.
1519
+ * @param {Function} builder The function to build the UI element.
1520
+ */
1521
+ addUIElement: function( typeName, builder ) {
1522
+ this._.uiElementBuilders[ typeName ] = builder;
1523
+ }
1524
+ });
1525
+
1526
+ CKEDITOR.dialog._ = {
1527
+ uiElementBuilders: {},
1528
+
1529
+ dialogDefinitions: {},
1530
+
1531
+ currentTop: null,
1532
+
1533
+ currentZIndex: null
1534
+ };
1535
+
1536
+ // "Inherit" (copy actually) from CKEDITOR.event.
1537
+ CKEDITOR.event.implementOn( CKEDITOR.dialog );
1538
+ CKEDITOR.event.implementOn( CKEDITOR.dialog.prototype );
1539
+
1540
+ var defaultDialogDefinition = {
1541
+ resizable: CKEDITOR.DIALOG_RESIZE_BOTH,
1542
+ minWidth: 600,
1543
+ minHeight: 400,
1544
+ buttons: [ CKEDITOR.dialog.okButton, CKEDITOR.dialog.cancelButton ]
1545
+ };
1546
+
1547
+ // Tool function used to return an item from an array based on its id
1548
+ // property.
1549
+ var getById = function( array, id, recurse ) {
1550
+ for ( var i = 0, item;
1551
+ ( item = array[ i ] ); i++ ) {
1552
+ if ( item.id == id )
1553
+ return item;
1554
+ if ( recurse && item[ recurse ] ) {
1555
+ var retval = getById( item[ recurse ], id, recurse );
1556
+ if ( retval )
1557
+ return retval;
1558
+ }
1559
+ }
1560
+ return null;
1561
+ };
1562
+
1563
+ // Tool function used to add an item into an array.
1564
+ var addById = function( array, newItem, nextSiblingId, recurse, nullIfNotFound ) {
1565
+ if ( nextSiblingId ) {
1566
+ for ( var i = 0, item;
1567
+ ( item = array[ i ] ); i++ ) {
1568
+ if ( item.id == nextSiblingId ) {
1569
+ array.splice( i, 0, newItem );
1570
+ return newItem;
1571
+ }
1572
+
1573
+ if ( recurse && item[ recurse ] ) {
1574
+ var retval = addById( item[ recurse ], newItem, nextSiblingId, recurse, true );
1575
+ if ( retval )
1576
+ return retval;
1577
+ }
1578
+ }
1579
+
1580
+ if ( nullIfNotFound )
1581
+ return null;
1582
+ }
1583
+
1584
+ array.push( newItem );
1585
+ return newItem;
1586
+ };
1587
+
1588
+ // Tool function used to remove an item from an array based on its id.
1589
+ var removeById = function( array, id, recurse ) {
1590
+ for ( var i = 0, item;
1591
+ ( item = array[ i ] ); i++ ) {
1592
+ if ( item.id == id )
1593
+ return array.splice( i, 1 );
1594
+ if ( recurse && item[ recurse ] ) {
1595
+ var retval = removeById( item[ recurse ], id, recurse );
1596
+ if ( retval )
1597
+ return retval;
1598
+ }
1599
+ }
1600
+ return null;
1601
+ };
1602
+
1603
+ /**
1604
+ * This class is not really part of the API. It is the `definition` property value
1605
+ * passed to `dialogDefinition` event handlers.
1606
+ *
1607
+ * CKEDITOR.on( 'dialogDefinition', function( evt ) {
1608
+ * var definition = evt.data.definition;
1609
+ * var content = definition.getContents( 'page1' );
1610
+ * // ...
1611
+ * } );
1612
+ *
1613
+ * @private
1614
+ * @class CKEDITOR.dialog.definitionObject
1615
+ * @extends CKEDITOR.dialog.definition
1616
+ * @constructor Creates a definitionObject class instance.
1617
+ */
1618
+ var definitionObject = function( dialog, dialogDefinition ) {
1619
+ // TODO : Check if needed.
1620
+ this.dialog = dialog;
1621
+
1622
+ // Transform the contents entries in contentObjects.
1623
+ var contents = dialogDefinition.contents;
1624
+ for ( var i = 0, content;
1625
+ ( content = contents[ i ] ); i++ )
1626
+ contents[ i ] = content && new contentObject( dialog, content );
1627
+
1628
+ CKEDITOR.tools.extend( this, dialogDefinition );
1629
+ };
1630
+
1631
+ definitionObject.prototype = {
1632
+ /**
1633
+ * Gets a content definition.
1634
+ *
1635
+ * @param {String} id The id of the content definition.
1636
+ * @returns {CKEDITOR.dialog.definition.content} The content definition matching id.
1637
+ */
1638
+ getContents: function( id ) {
1639
+ return getById( this.contents, id );
1640
+ },
1641
+
1642
+ /**
1643
+ * Gets a button definition.
1644
+ *
1645
+ * @param {String} id The id of the button definition.
1646
+ * @returns {CKEDITOR.dialog.definition.button} The button definition matching id.
1647
+ */
1648
+ getButton: function( id ) {
1649
+ return getById( this.buttons, id );
1650
+ },
1651
+
1652
+ /**
1653
+ * Adds a content definition object under this dialog definition.
1654
+ *
1655
+ * @param {CKEDITOR.dialog.definition.content} contentDefinition The
1656
+ * content definition.
1657
+ * @param {String} [nextSiblingId] The id of an existing content
1658
+ * definition which the new content definition will be inserted
1659
+ * before. Omit if the new content definition is to be inserted as
1660
+ * the last item.
1661
+ * @returns {CKEDITOR.dialog.definition.content} The inserted content definition.
1662
+ */
1663
+ addContents: function( contentDefinition, nextSiblingId ) {
1664
+ return addById( this.contents, contentDefinition, nextSiblingId );
1665
+ },
1666
+
1667
+ /**
1668
+ * Adds a button definition object under this dialog definition.
1669
+ *
1670
+ * @param {CKEDITOR.dialog.definition.button} buttonDefinition The
1671
+ * button definition.
1672
+ * @param {String} [nextSiblingId] The id of an existing button
1673
+ * definition which the new button definition will be inserted
1674
+ * before. Omit if the new button definition is to be inserted as
1675
+ * the last item.
1676
+ * @returns {CKEDITOR.dialog.definition.button} The inserted button definition.
1677
+ */
1678
+ addButton: function( buttonDefinition, nextSiblingId ) {
1679
+ return addById( this.buttons, buttonDefinition, nextSiblingId );
1680
+ },
1681
+
1682
+ /**
1683
+ * Removes a content definition from this dialog definition.
1684
+ *
1685
+ * @param {String} id The id of the content definition to be removed.
1686
+ * @returns {CKEDITOR.dialog.definition.content} The removed content definition.
1687
+ */
1688
+ removeContents: function( id ) {
1689
+ removeById( this.contents, id );
1690
+ },
1691
+
1692
+ /**
1693
+ * Removes a button definition from the dialog definition.
1694
+ *
1695
+ * @param {String} id The id of the button definition to be removed.
1696
+ * @returns {CKEDITOR.dialog.definition.button} The removed button definition.
1697
+ */
1698
+ removeButton: function( id ) {
1699
+ removeById( this.buttons, id );
1700
+ }
1701
+ };
1702
+
1703
+ /**
1704
+ * This class is not really part of the API. It is the template of the
1705
+ * objects representing content pages inside the
1706
+ * CKEDITOR.dialog.definitionObject.
1707
+ *
1708
+ * CKEDITOR.on( 'dialogDefinition', function( evt ) {
1709
+ * var definition = evt.data.definition;
1710
+ * var content = definition.getContents( 'page1' );
1711
+ * content.remove( 'textInput1' );
1712
+ * // ...
1713
+ * } );
1714
+ *
1715
+ * @private
1716
+ * @class CKEDITOR.dialog.definition.contentObject
1717
+ * @constructor Creates a contentObject class instance.
1718
+ */
1719
+ function contentObject( dialog, contentDefinition ) {
1720
+ this._ = {
1721
+ dialog: dialog
1722
+ };
1723
+
1724
+ CKEDITOR.tools.extend( this, contentDefinition );
1725
+ }
1726
+
1727
+ contentObject.prototype = {
1728
+ /**
1729
+ * Gets a UI element definition under the content definition.
1730
+ *
1731
+ * @param {String} id The id of the UI element definition.
1732
+ * @returns {CKEDITOR.dialog.definition.uiElement}
1733
+ */
1734
+ get: function( id ) {
1735
+ return getById( this.elements, id, 'children' );
1736
+ },
1737
+
1738
+ /**
1739
+ * Adds a UI element definition to the content definition.
1740
+ *
1741
+ * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition The
1742
+ * UI elemnet definition to be added.
1743
+ * @param {String} nextSiblingId The id of an existing UI element
1744
+ * definition which the new UI element definition will be inserted
1745
+ * before. Omit if the new button definition is to be inserted as
1746
+ * the last item.
1747
+ * @returns {CKEDITOR.dialog.definition.uiElement} The element definition inserted.
1748
+ */
1749
+ add: function( elementDefinition, nextSiblingId ) {
1750
+ return addById( this.elements, elementDefinition, nextSiblingId, 'children' );
1751
+ },
1752
+
1753
+ /**
1754
+ * Removes a UI element definition from the content definition.
1755
+ *
1756
+ * @param {String} id The id of the UI element definition to be removed.
1757
+ * @returns {CKEDITOR.dialog.definition.uiElement} The element definition removed.
1758
+ */
1759
+ remove: function( id ) {
1760
+ removeById( this.elements, id, 'children' );
1761
+ }
1762
+ };
1763
+
1764
+ function initDragAndDrop( dialog ) {
1765
+ var lastCoords = null,
1766
+ abstractDialogCoords = null,
1767
+ element = dialog.getElement().getFirst(),
1768
+ editor = dialog.getParentEditor(),
1769
+ magnetDistance = editor.config.dialog_magnetDistance,
1770
+ margins = CKEDITOR.skin.margins || [ 0, 0, 0, 0 ];
1771
+
1772
+ if ( typeof magnetDistance == 'undefined' )
1773
+ magnetDistance = 20;
1774
+
1775
+ function mouseMoveHandler( evt ) {
1776
+ var dialogSize = dialog.getSize(),
1777
+ viewPaneSize = CKEDITOR.document.getWindow().getViewPaneSize(),
1778
+ x = evt.data.$.screenX,
1779
+ y = evt.data.$.screenY,
1780
+ dx = x - lastCoords.x,
1781
+ dy = y - lastCoords.y,
1782
+ realX, realY;
1783
+
1784
+ lastCoords = { x: x, y: y };
1785
+ abstractDialogCoords.x += dx;
1786
+ abstractDialogCoords.y += dy;
1787
+
1788
+ if ( abstractDialogCoords.x + margins[ 3 ] < magnetDistance )
1789
+ realX = -margins[ 3 ];
1790
+ else if ( abstractDialogCoords.x - margins[ 1 ] > viewPaneSize.width - dialogSize.width - magnetDistance )
1791
+ realX = viewPaneSize.width - dialogSize.width + ( editor.lang.dir == 'rtl' ? 0 : margins[ 1 ] );
1792
+ else
1793
+ realX = abstractDialogCoords.x;
1794
+
1795
+ if ( abstractDialogCoords.y + margins[ 0 ] < magnetDistance )
1796
+ realY = -margins[ 0 ];
1797
+ else if ( abstractDialogCoords.y - margins[ 2 ] > viewPaneSize.height - dialogSize.height - magnetDistance )
1798
+ realY = viewPaneSize.height - dialogSize.height + margins[ 2 ];
1799
+ else
1800
+ realY = abstractDialogCoords.y;
1801
+
1802
+ dialog.move( realX, realY, 1 );
1803
+
1804
+ evt.data.preventDefault();
1805
+ }
1806
+
1807
+ function mouseUpHandler( evt ) {
1808
+ CKEDITOR.document.removeListener( 'mousemove', mouseMoveHandler );
1809
+ CKEDITOR.document.removeListener( 'mouseup', mouseUpHandler );
1810
+
1811
+ if ( CKEDITOR.env.ie6Compat ) {
1812
+ var coverDoc = currentCover.getChild( 0 ).getFrameDocument();
1813
+ coverDoc.removeListener( 'mousemove', mouseMoveHandler );
1814
+ coverDoc.removeListener( 'mouseup', mouseUpHandler );
1815
+ }
1816
+ }
1817
+
1818
+ dialog.parts.title.on( 'mousedown', function( evt ) {
1819
+ lastCoords = { x: evt.data.$.screenX, y: evt.data.$.screenY };
1820
+
1821
+ CKEDITOR.document.on( 'mousemove', mouseMoveHandler );
1822
+ CKEDITOR.document.on( 'mouseup', mouseUpHandler );
1823
+ abstractDialogCoords = dialog.getPosition();
1824
+
1825
+ if ( CKEDITOR.env.ie6Compat ) {
1826
+ var coverDoc = currentCover.getChild( 0 ).getFrameDocument();
1827
+ coverDoc.on( 'mousemove', mouseMoveHandler );
1828
+ coverDoc.on( 'mouseup', mouseUpHandler );
1829
+ }
1830
+
1831
+ evt.data.preventDefault();
1832
+ }, dialog );
1833
+ }
1834
+
1835
+ function initResizeHandles( dialog ) {
1836
+ var def = dialog.definition,
1837
+ resizable = def.resizable;
1838
+
1839
+ if ( resizable == CKEDITOR.DIALOG_RESIZE_NONE )
1840
+ return;
1841
+
1842
+ var editor = dialog.getParentEditor();
1843
+ var wrapperWidth, wrapperHeight, viewSize, origin, startSize, dialogCover;
1844
+
1845
+ var mouseDownFn = CKEDITOR.tools.addFunction( function( $event ) {
1846
+ startSize = dialog.getSize();
1847
+
1848
+ var content = dialog.parts.contents,
1849
+ iframeDialog = content.$.getElementsByTagName( 'iframe' ).length;
1850
+
1851
+ // Shim to help capturing "mousemove" over iframe.
1852
+ if ( iframeDialog ) {
1853
+ dialogCover = CKEDITOR.dom.element.createFromHtml( '<div class="cke_dialog_resize_cover" style="height: 100%; position: absolute; width: 100%;"></div>' );
1854
+ content.append( dialogCover );
1855
+ }
1856
+
1857
+ // Calculate the offset between content and chrome size.
1858
+ wrapperHeight = startSize.height - dialog.parts.contents.getSize( 'height', !( CKEDITOR.env.gecko || CKEDITOR.env.opera || CKEDITOR.env.ie && CKEDITOR.env.quirks ) );
1859
+ wrapperWidth = startSize.width - dialog.parts.contents.getSize( 'width', 1 );
1860
+
1861
+ origin = { x: $event.screenX, y: $event.screenY };
1862
+
1863
+ viewSize = CKEDITOR.document.getWindow().getViewPaneSize();
1864
+
1865
+ CKEDITOR.document.on( 'mousemove', mouseMoveHandler );
1866
+ CKEDITOR.document.on( 'mouseup', mouseUpHandler );
1867
+
1868
+ if ( CKEDITOR.env.ie6Compat ) {
1869
+ var coverDoc = currentCover.getChild( 0 ).getFrameDocument();
1870
+ coverDoc.on( 'mousemove', mouseMoveHandler );
1871
+ coverDoc.on( 'mouseup', mouseUpHandler );
1872
+ }
1873
+
1874
+ $event.preventDefault && $event.preventDefault();
1875
+ });
1876
+
1877
+ // Prepend the grip to the dialog.
1878
+ dialog.on( 'load', function() {
1879
+ var direction = '';
1880
+ if ( resizable == CKEDITOR.DIALOG_RESIZE_WIDTH )
1881
+ direction = ' cke_resizer_horizontal';
1882
+ else if ( resizable == CKEDITOR.DIALOG_RESIZE_HEIGHT )
1883
+ direction = ' cke_resizer_vertical';
1884
+ var resizer = CKEDITOR.dom.element.createFromHtml(
1885
+ '<div' +
1886
+ ' class="cke_resizer' + direction + ' cke_resizer_' + editor.lang.dir + '"' +
1887
+ ' title="' + CKEDITOR.tools.htmlEncode( editor.lang.common.resize ) + '"' +
1888
+ ' onmousedown="CKEDITOR.tools.callFunction(' + mouseDownFn + ', event )">' +
1889
+ // BLACK LOWER RIGHT TRIANGLE (ltr)
1890
+ // BLACK LOWER LEFT TRIANGLE (rtl)
1891
+ ( editor.lang.dir == 'ltr' ? '\u25E2' : '\u25E3' ) +
1892
+ '</div>' );
1893
+ dialog.parts.footer.append( resizer, 1 );
1894
+ });
1895
+ editor.on( 'destroy', function() {
1896
+ CKEDITOR.tools.removeFunction( mouseDownFn );
1897
+ });
1898
+
1899
+ function mouseMoveHandler( evt ) {
1900
+ var rtl = editor.lang.dir == 'rtl',
1901
+ dx = ( evt.data.$.screenX - origin.x ) * ( rtl ? -1 : 1 ),
1902
+ dy = evt.data.$.screenY - origin.y,
1903
+ width = startSize.width,
1904
+ height = startSize.height,
1905
+ internalWidth = width + dx * ( dialog._.moved ? 1 : 2 ),
1906
+ internalHeight = height + dy * ( dialog._.moved ? 1 : 2 ),
1907
+ element = dialog._.element.getFirst(),
1908
+ right = rtl && element.getComputedStyle( 'right' ),
1909
+ position = dialog.getPosition();
1910
+
1911
+ if ( position.y + internalHeight > viewSize.height )
1912
+ internalHeight = viewSize.height - position.y;
1913
+
1914
+ if ( ( rtl ? right : position.x ) + internalWidth > viewSize.width )
1915
+ internalWidth = viewSize.width - ( rtl ? right : position.x );
1916
+
1917
+ // Make sure the dialog will not be resized to the wrong side when it's in the leftmost position for RTL.
1918
+ if ( ( resizable == CKEDITOR.DIALOG_RESIZE_WIDTH || resizable == CKEDITOR.DIALOG_RESIZE_BOTH ) )
1919
+ width = Math.max( def.minWidth || 0, internalWidth - wrapperWidth );
1920
+
1921
+ if ( resizable == CKEDITOR.DIALOG_RESIZE_HEIGHT || resizable == CKEDITOR.DIALOG_RESIZE_BOTH )
1922
+ height = Math.max( def.minHeight || 0, internalHeight - wrapperHeight );
1923
+
1924
+ dialog.resize( width, height );
1925
+
1926
+ if ( !dialog._.moved )
1927
+ dialog.layout();
1928
+
1929
+ evt.data.preventDefault();
1930
+ }
1931
+
1932
+ function mouseUpHandler() {
1933
+ CKEDITOR.document.removeListener( 'mouseup', mouseUpHandler );
1934
+ CKEDITOR.document.removeListener( 'mousemove', mouseMoveHandler );
1935
+
1936
+ if ( dialogCover ) {
1937
+ dialogCover.remove();
1938
+ dialogCover = null;
1939
+ }
1940
+
1941
+ if ( CKEDITOR.env.ie6Compat ) {
1942
+ var coverDoc = currentCover.getChild( 0 ).getFrameDocument();
1943
+ coverDoc.removeListener( 'mouseup', mouseUpHandler );
1944
+ coverDoc.removeListener( 'mousemove', mouseMoveHandler );
1945
+ }
1946
+ }
1947
+ }
1948
+
1949
+ var resizeCover;
1950
+ // Caching resuable covers and allowing only one cover
1951
+ // on screen.
1952
+ var covers = {},
1953
+ currentCover;
1954
+
1955
+ function cancelEvent( ev ) {
1956
+ ev.data.preventDefault( 1 );
1957
+ }
1958
+
1959
+ function showCover( editor ) {
1960
+ var win = CKEDITOR.document.getWindow();
1961
+ var config = editor.config,
1962
+ backgroundColorStyle = config.dialog_backgroundCoverColor || 'white',
1963
+ backgroundCoverOpacity = config.dialog_backgroundCoverOpacity,
1964
+ baseFloatZIndex = config.baseFloatZIndex,
1965
+ coverKey = CKEDITOR.tools.genKey( backgroundColorStyle, backgroundCoverOpacity, baseFloatZIndex ),
1966
+ coverElement = covers[ coverKey ];
1967
+
1968
+ if ( !coverElement ) {
1969
+ var html = [
1970
+ '<div tabIndex="-1" style="position: ', ( CKEDITOR.env.ie6Compat ? 'absolute' : 'fixed' ),
1971
+ '; z-index: ', baseFloatZIndex,
1972
+ '; top: 0px; left: 0px; ',
1973
+ ( !CKEDITOR.env.ie6Compat ? 'background-color: ' + backgroundColorStyle : '' ),
1974
+ '" class="cke_dialog_background_cover">'
1975
+ ];
1976
+
1977
+ if ( CKEDITOR.env.ie6Compat ) {
1978
+ // Support for custom document.domain in IE.
1979
+ var iframeHtml = '<html><body style=\\\'background-color:' + backgroundColorStyle + ';\\\'></body></html>';
1980
+
1981
+ html.push( '<iframe' +
1982
+ ' hidefocus="true"' +
1983
+ ' frameborder="0"' +
1984
+ ' id="cke_dialog_background_iframe"' +
1985
+ ' src="javascript:' );
1986
+
1987
+ html.push( 'void((function(){' + encodeURIComponent(
1988
+ 'document.open();' +
1989
+ // Support for custom document.domain in IE.
1990
+ '(' + CKEDITOR.tools.fixDomain + ')();' +
1991
+ 'document.write( \'' + iframeHtml + '\' );' +
1992
+ 'document.close();'
1993
+ ) + '})())' );
1994
+
1995
+ html.push( '"' +
1996
+ ' style="' +
1997
+ 'position:absolute;' +
1998
+ 'left:0;' +
1999
+ 'top:0;' +
2000
+ 'width:100%;' +
2001
+ 'height: 100%;' +
2002
+ 'filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0)">' +
2003
+ '</iframe>' );
2004
+ }
2005
+
2006
+ html.push( '</div>' );
2007
+
2008
+ coverElement = CKEDITOR.dom.element.createFromHtml( html.join( '' ) );
2009
+ coverElement.setOpacity( backgroundCoverOpacity != undefined ? backgroundCoverOpacity : 0.5 );
2010
+
2011
+ coverElement.on( 'keydown', cancelEvent );
2012
+ coverElement.on( 'keypress', cancelEvent );
2013
+ coverElement.on( 'keyup', cancelEvent );
2014
+
2015
+ coverElement.appendTo( CKEDITOR.document.getBody() );
2016
+ covers[ coverKey ] = coverElement;
2017
+ } else
2018
+ coverElement.show();
2019
+
2020
+ // Makes the dialog cover a focus holder as well.
2021
+ editor.focusManager.add( coverElement );
2022
+
2023
+ currentCover = coverElement;
2024
+ var resizeFunc = function() {
2025
+ var size = win.getViewPaneSize();
2026
+ coverElement.setStyles({
2027
+ width: size.width + 'px',
2028
+ height: size.height + 'px'
2029
+ });
2030
+ };
2031
+
2032
+ var scrollFunc = function() {
2033
+ var pos = win.getScrollPosition(),
2034
+ cursor = CKEDITOR.dialog._.currentTop;
2035
+ coverElement.setStyles({
2036
+ left: pos.x + 'px',
2037
+ top: pos.y + 'px'
2038
+ });
2039
+
2040
+ if ( cursor ) {
2041
+ do {
2042
+ var dialogPos = cursor.getPosition();
2043
+ cursor.move( dialogPos.x, dialogPos.y );
2044
+ } while ( ( cursor = cursor._.parentDialog ) );
2045
+ }
2046
+ };
2047
+
2048
+ resizeCover = resizeFunc;
2049
+ win.on( 'resize', resizeFunc );
2050
+ resizeFunc();
2051
+ // Using Safari/Mac, focus must be kept where it is (#7027)
2052
+ if ( !( CKEDITOR.env.mac && CKEDITOR.env.webkit ) )
2053
+ coverElement.focus();
2054
+
2055
+ if ( CKEDITOR.env.ie6Compat ) {
2056
+ // IE BUG: win.$.onscroll assignment doesn't work.. it must be window.onscroll.
2057
+ // So we need to invent a really funny way to make it work.
2058
+ var myScrollHandler = function() {
2059
+ scrollFunc();
2060
+ arguments.callee.prevScrollHandler.apply( this, arguments );
2061
+ };
2062
+ win.$.setTimeout( function() {
2063
+ myScrollHandler.prevScrollHandler = window.onscroll ||
2064
+ function() {};
2065
+ window.onscroll = myScrollHandler;
2066
+ }, 0 );
2067
+ scrollFunc();
2068
+ }
2069
+ }
2070
+
2071
+ function hideCover( editor ) {
2072
+ if ( !currentCover )
2073
+ return;
2074
+
2075
+ editor.focusManager.remove( currentCover );
2076
+ var win = CKEDITOR.document.getWindow();
2077
+ currentCover.hide();
2078
+ win.removeListener( 'resize', resizeCover );
2079
+
2080
+ if ( CKEDITOR.env.ie6Compat ) {
2081
+ win.$.setTimeout( function() {
2082
+ var prevScrollHandler = window.onscroll && window.onscroll.prevScrollHandler;
2083
+ window.onscroll = prevScrollHandler || null;
2084
+ }, 0 );
2085
+ }
2086
+ resizeCover = null;
2087
+ }
2088
+
2089
+ function removeCovers() {
2090
+ for ( var coverId in covers )
2091
+ covers[ coverId ].remove();
2092
+ covers = {};
2093
+ }
2094
+
2095
+ var accessKeyProcessors = {};
2096
+
2097
+ var accessKeyDownHandler = function( evt ) {
2098
+ var ctrl = evt.data.$.ctrlKey || evt.data.$.metaKey,
2099
+ alt = evt.data.$.altKey,
2100
+ shift = evt.data.$.shiftKey,
2101
+ key = String.fromCharCode( evt.data.$.keyCode ),
2102
+ keyProcessor = accessKeyProcessors[ ( ctrl ? 'CTRL+' : '' ) + ( alt ? 'ALT+' : '' ) + ( shift ? 'SHIFT+' : '' ) + key ];
2103
+
2104
+ if ( !keyProcessor || !keyProcessor.length )
2105
+ return;
2106
+
2107
+ keyProcessor = keyProcessor[ keyProcessor.length - 1 ];
2108
+ keyProcessor.keydown && keyProcessor.keydown.call( keyProcessor.uiElement, keyProcessor.dialog, keyProcessor.key );
2109
+ evt.data.preventDefault();
2110
+ };
2111
+
2112
+ var accessKeyUpHandler = function( evt ) {
2113
+ var ctrl = evt.data.$.ctrlKey || evt.data.$.metaKey,
2114
+ alt = evt.data.$.altKey,
2115
+ shift = evt.data.$.shiftKey,
2116
+ key = String.fromCharCode( evt.data.$.keyCode ),
2117
+ keyProcessor = accessKeyProcessors[ ( ctrl ? 'CTRL+' : '' ) + ( alt ? 'ALT+' : '' ) + ( shift ? 'SHIFT+' : '' ) + key ];
2118
+
2119
+ if ( !keyProcessor || !keyProcessor.length )
2120
+ return;
2121
+
2122
+ keyProcessor = keyProcessor[ keyProcessor.length - 1 ];
2123
+ if ( keyProcessor.keyup ) {
2124
+ keyProcessor.keyup.call( keyProcessor.uiElement, keyProcessor.dialog, keyProcessor.key );
2125
+ evt.data.preventDefault();
2126
+ }
2127
+ };
2128
+
2129
+ var registerAccessKey = function( uiElement, dialog, key, downFunc, upFunc ) {
2130
+ var procList = accessKeyProcessors[ key ] || ( accessKeyProcessors[ key ] = [] );
2131
+ procList.push({
2132
+ uiElement: uiElement,
2133
+ dialog: dialog,
2134
+ key: key,
2135
+ keyup: upFunc || uiElement.accessKeyUp,
2136
+ keydown: downFunc || uiElement.accessKeyDown
2137
+ });
2138
+ };
2139
+
2140
+ var unregisterAccessKey = function( obj ) {
2141
+ for ( var i in accessKeyProcessors ) {
2142
+ var list = accessKeyProcessors[ i ];
2143
+ for ( var j = list.length - 1; j >= 0; j-- ) {
2144
+ if ( list[ j ].dialog == obj || list[ j ].uiElement == obj )
2145
+ list.splice( j, 1 );
2146
+ }
2147
+ if ( list.length === 0 )
2148
+ delete accessKeyProcessors[ i ];
2149
+ }
2150
+ };
2151
+
2152
+ var tabAccessKeyUp = function( dialog, key ) {
2153
+ if ( dialog._.accessKeyMap[ key ] )
2154
+ dialog.selectPage( dialog._.accessKeyMap[ key ] );
2155
+ };
2156
+
2157
+ var tabAccessKeyDown = function( dialog, key ) {};
2158
+
2159
+ (function() {
2160
+ CKEDITOR.ui.dialog = {
2161
+ /**
2162
+ * The base class of all dialog UI elements.
2163
+ *
2164
+ * @class CKEDITOR.ui.dialog.uiElement
2165
+ * @constructor Creates a uiElement class instance.
2166
+ * @param {CKEDITOR.dialog} dialog Parent dialog object.
2167
+ * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition Element
2168
+ * definition.
2169
+ *
2170
+ * Accepted fields:
2171
+ *
2172
+ * * `id` (Required) The id of the UI element. See {@link CKEDITOR.dialog#getContentElement}.
2173
+ * * `type` (Required) The type of the UI element. The
2174
+ * value to this field specifies which UI element class will be used to
2175
+ * generate the final widget.
2176
+ * * `title` (Optional) The popup tooltip for the UI
2177
+ * element.
2178
+ * * `hidden` (Optional) A flag that tells if the element
2179
+ * should be initially visible.
2180
+ * * `className` (Optional) Additional CSS class names
2181
+ * to add to the UI element. Separated by space.
2182
+ * * `style` (Optional) Additional CSS inline styles
2183
+ * to add to the UI element. A semicolon (;) is required after the last
2184
+ * style declaration.
2185
+ * * `accessKey` (Optional) The alphanumeric access key
2186
+ * for this element. Access keys are automatically prefixed by CTRL.
2187
+ * * `on*` (Optional) Any UI element definition field that
2188
+ * starts with `on` followed immediately by a capital letter and
2189
+ * probably more letters is an event handler. Event handlers may be further
2190
+ * divided into registered event handlers and DOM event handlers. Please
2191
+ * refer to {@link CKEDITOR.ui.dialog.uiElement#registerEvents} and
2192
+ * {@link CKEDITOR.ui.dialog.uiElement#eventProcessors} for more information.
2193
+ *
2194
+ * @param {Array} htmlList
2195
+ * List of HTML code to be added to the dialog's content area.
2196
+ * @param {Function/String} [nodeNameArg='div']
2197
+ * A function returning a string, or a simple string for the node name for
2198
+ * the root DOM node.
2199
+ * @param {Function/Object} [stylesArg={}]
2200
+ * A function returning an object, or a simple object for CSS styles applied
2201
+ * to the DOM node.
2202
+ * @param {Function/Object} [attributesArg={}]
2203
+ * A fucntion returning an object, or a simple object for attributes applied
2204
+ * to the DOM node.
2205
+ * @param {Function/String} [contentsArg='']
2206
+ * A function returning a string, or a simple string for the HTML code inside
2207
+ * the root DOM node. Default is empty string.
2208
+ */
2209
+ uiElement: function( dialog, elementDefinition, htmlList, nodeNameArg, stylesArg, attributesArg, contentsArg ) {
2210
+ if ( arguments.length < 4 )
2211
+ return;
2212
+
2213
+ var nodeName = ( nodeNameArg.call ? nodeNameArg( elementDefinition ) : nodeNameArg ) || 'div',
2214
+ html = [ '<', nodeName, ' ' ],
2215
+ styles = ( stylesArg && stylesArg.call ? stylesArg( elementDefinition ) : stylesArg ) || {},
2216
+ attributes = ( attributesArg && attributesArg.call ? attributesArg( elementDefinition ) : attributesArg ) || {},
2217
+ innerHTML = ( contentsArg && contentsArg.call ? contentsArg.call( this, dialog, elementDefinition ) : contentsArg ) || '',
2218
+ domId = this.domId = attributes.id || CKEDITOR.tools.getNextId() + '_uiElement',
2219
+ id = this.id = elementDefinition.id,
2220
+ i;
2221
+
2222
+ if ( elementDefinition.requiredContent && !dialog.getParentEditor().filter.check( elementDefinition.requiredContent ) ) {
2223
+ styles.display = 'none';
2224
+ this.notAllowed = true;
2225
+ }
2226
+
2227
+ // Set the id, a unique id is required for getElement() to work.
2228
+ attributes.id = domId;
2229
+
2230
+ // Set the type and definition CSS class names.
2231
+ var classes = {};
2232
+ if ( elementDefinition.type )
2233
+ classes[ 'cke_dialog_ui_' + elementDefinition.type ] = 1;
2234
+ if ( elementDefinition.className )
2235
+ classes[ elementDefinition.className ] = 1;
2236
+ if ( elementDefinition.disabled )
2237
+ classes[ 'cke_disabled' ] = 1;
2238
+
2239
+ var attributeClasses = ( attributes[ 'class' ] && attributes[ 'class' ].split ) ? attributes[ 'class' ].split( ' ' ) : [];
2240
+ for ( i = 0; i < attributeClasses.length; i++ ) {
2241
+ if ( attributeClasses[ i ] )
2242
+ classes[ attributeClasses[ i ] ] = 1;
2243
+ }
2244
+ var finalClasses = [];
2245
+ for ( i in classes )
2246
+ finalClasses.push( i );
2247
+ attributes[ 'class' ] = finalClasses.join( ' ' );
2248
+
2249
+ // Set the popup tooltop.
2250
+ if ( elementDefinition.title )
2251
+ attributes.title = elementDefinition.title;
2252
+
2253
+ // Write the inline CSS styles.
2254
+ var styleStr = ( elementDefinition.style || '' ).split( ';' );
2255
+
2256
+ // Element alignment support.
2257
+ if ( elementDefinition.align ) {
2258
+ var align = elementDefinition.align;
2259
+ styles[ 'margin-left' ] = align == 'left' ? 0 : 'auto';
2260
+ styles[ 'margin-right' ] = align == 'right' ? 0 : 'auto';
2261
+ }
2262
+
2263
+ for ( i in styles )
2264
+ styleStr.push( i + ':' + styles[ i ] );
2265
+ if ( elementDefinition.hidden )
2266
+ styleStr.push( 'display:none' );
2267
+ for ( i = styleStr.length - 1; i >= 0; i-- ) {
2268
+ if ( styleStr[ i ] === '' )
2269
+ styleStr.splice( i, 1 );
2270
+ }
2271
+ if ( styleStr.length > 0 )
2272
+ attributes.style = ( attributes.style ? ( attributes.style + '; ' ) : '' ) + styleStr.join( '; ' );
2273
+
2274
+ // Write the attributes.
2275
+ for ( i in attributes )
2276
+ html.push( i + '="' + CKEDITOR.tools.htmlEncode( attributes[ i ] ) + '" ' );
2277
+
2278
+ // Write the content HTML.
2279
+ html.push( '>', innerHTML, '</', nodeName, '>' );
2280
+
2281
+ // Add contents to the parent HTML array.
2282
+ htmlList.push( html.join( '' ) );
2283
+
2284
+ ( this._ || ( this._ = {} ) ).dialog = dialog;
2285
+
2286
+ // Override isChanged if it is defined in element definition.
2287
+ if ( typeof( elementDefinition.isChanged ) == 'boolean' )
2288
+ this.isChanged = function() {
2289
+ return elementDefinition.isChanged;
2290
+ };
2291
+ if ( typeof( elementDefinition.isChanged ) == 'function' )
2292
+ this.isChanged = elementDefinition.isChanged;
2293
+
2294
+ // Overload 'get(set)Value' on definition.
2295
+ if ( typeof( elementDefinition.setValue ) == 'function' ) {
2296
+ this.setValue = CKEDITOR.tools.override( this.setValue, function( org ) {
2297
+ return function( val ) {
2298
+ org.call( this, elementDefinition.setValue.call( this, val ) );
2299
+ };
2300
+ });
2301
+ }
2302
+
2303
+ if ( typeof( elementDefinition.getValue ) == 'function' ) {
2304
+ this.getValue = CKEDITOR.tools.override( this.getValue, function( org ) {
2305
+ return function() {
2306
+ return elementDefinition.getValue.call( this, org.call( this ) );
2307
+ };
2308
+ });
2309
+ }
2310
+
2311
+ // Add events.
2312
+ CKEDITOR.event.implementOn( this );
2313
+
2314
+ this.registerEvents( elementDefinition );
2315
+ if ( this.accessKeyUp && this.accessKeyDown && elementDefinition.accessKey )
2316
+ registerAccessKey( this, dialog, 'CTRL+' + elementDefinition.accessKey );
2317
+
2318
+ var me = this;
2319
+ dialog.on( 'load', function() {
2320
+ var input = me.getInputElement();
2321
+ if ( input ) {
2322
+ var focusClass = me.type in { 'checkbox':1,'ratio':1 } && CKEDITOR.env.ie && CKEDITOR.env.version < 8 ? 'cke_dialog_ui_focused' : '';
2323
+ input.on( 'focus', function() {
2324
+ dialog._.tabBarMode = false;
2325
+ dialog._.hasFocus = true;
2326
+ me.fire( 'focus' );
2327
+ focusClass && this.addClass( focusClass );
2328
+
2329
+ });
2330
+
2331
+ input.on( 'blur', function() {
2332
+ me.fire( 'blur' );
2333
+ focusClass && this.removeClass( focusClass );
2334
+ });
2335
+ }
2336
+ });
2337
+
2338
+ // Register the object as a tab focus if it can be included.
2339
+ if ( this.keyboardFocusable ) {
2340
+ this.tabIndex = elementDefinition.tabIndex || 0;
2341
+
2342
+ this.focusIndex = dialog._.focusList.push( this ) - 1;
2343
+ this.on( 'focus', function() {
2344
+ dialog._.currentFocusIndex = me.focusIndex;
2345
+ });
2346
+ }
2347
+
2348
+ // Completes this object with everything we have in the
2349
+ // definition.
2350
+ CKEDITOR.tools.extend( this, elementDefinition );
2351
+ },
2352
+
2353
+ /**
2354
+ * Horizontal layout box for dialog UI elements, auto-expends to available width of container.
2355
+ *
2356
+ * @class CKEDITOR.ui.dialog.hbox
2357
+ * @extends CKEDITOR.ui.dialog.uiElement
2358
+ * @constructor Creates a hbox class instance.
2359
+ * @param {CKEDITOR.dialog} dialog Parent dialog object.
2360
+ * @param {Array} childObjList
2361
+ * Array of {@link CKEDITOR.ui.dialog.uiElement} objects inside this container.
2362
+ * @param {Array} childHtmlList
2363
+ * Array of HTML code that correspond to the HTML output of all the
2364
+ * objects in childObjList.
2365
+ * @param {Array} htmlList
2366
+ * Array of HTML code that this element will output to.
2367
+ * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition
2368
+ * The element definition. Accepted fields:
2369
+ *
2370
+ * * `widths` (Optional) The widths of child cells.
2371
+ * * `height` (Optional) The height of the layout.
2372
+ * * `padding` (Optional) The padding width inside child cells.
2373
+ * * `align` (Optional) The alignment of the whole layout.
2374
+ */
2375
+ hbox: function( dialog, childObjList, childHtmlList, htmlList, elementDefinition ) {
2376
+ if ( arguments.length < 4 )
2377
+ return;
2378
+
2379
+ this._ || ( this._ = {} );
2380
+
2381
+ var children = this._.children = childObjList,
2382
+ widths = elementDefinition && elementDefinition.widths || null,
2383
+ height = elementDefinition && elementDefinition.height || null,
2384
+ styles = {},
2385
+ i;
2386
+ /** @ignore */
2387
+ var innerHTML = function() {
2388
+ var html = [ '<tbody><tr class="cke_dialog_ui_hbox">' ];
2389
+ for ( i = 0; i < childHtmlList.length; i++ ) {
2390
+ var className = 'cke_dialog_ui_hbox_child',
2391
+ styles = [];
2392
+ if ( i === 0 )
2393
+ className = 'cke_dialog_ui_hbox_first';
2394
+ if ( i == childHtmlList.length - 1 )
2395
+ className = 'cke_dialog_ui_hbox_last';
2396
+ html.push( '<td class="', className, '" role="presentation" ' );
2397
+ if ( widths ) {
2398
+ if ( widths[ i ] )
2399
+ styles.push( 'width:' + cssLength( widths[ i ] ) );
2400
+ } else
2401
+ styles.push( 'width:' + Math.floor( 100 / childHtmlList.length ) + '%' );
2402
+ if ( height )
2403
+ styles.push( 'height:' + cssLength( height ) );
2404
+ if ( elementDefinition && elementDefinition.padding != undefined )
2405
+ styles.push( 'padding:' + cssLength( elementDefinition.padding ) );
2406
+ // In IE Quirks alignment has to be done on table cells. (#7324)
2407
+ if ( CKEDITOR.env.ie && CKEDITOR.env.quirks && children[ i ].align )
2408
+ styles.push( 'text-align:' + children[ i ].align );
2409
+ if ( styles.length > 0 )
2410
+ html.push( 'style="' + styles.join( '; ' ) + '" ' );
2411
+ html.push( '>', childHtmlList[ i ], '</td>' );
2412
+ }
2413
+ html.push( '</tr></tbody>' );
2414
+ return html.join( '' );
2415
+ };
2416
+
2417
+ var attribs = { role: 'presentation' };
2418
+ elementDefinition && elementDefinition.align && ( attribs.align = elementDefinition.align );
2419
+
2420
+ CKEDITOR.ui.dialog.uiElement.call( this, dialog, elementDefinition || { type: 'hbox' }, htmlList, 'table', styles, attribs, innerHTML );
2421
+ },
2422
+
2423
+ /**
2424
+ * Vertical layout box for dialog UI elements.
2425
+ *
2426
+ * @class CKEDITOR.ui.dialog.vbox
2427
+ * @extends CKEDITOR.ui.dialog.hbox
2428
+ * @constructor Creates a vbox class instance.
2429
+ * @param {CKEDITOR.dialog} dialog Parent dialog object.
2430
+ * @param {Array} childObjList
2431
+ * Array of {@link CKEDITOR.ui.dialog.uiElement} objects inside this container.
2432
+ * @param {Array} childHtmlList
2433
+ * Array of HTML code that correspond to the HTML output of all the
2434
+ * objects in childObjList.
2435
+ * @param {Array} htmlList Array of HTML code that this element will output to.
2436
+ * @param {CKEDITOR.dialog.definition.uiElement} elementDefinition
2437
+ * The element definition. Accepted fields:
2438
+ *
2439
+ * * `width` (Optional) The width of the layout.
2440
+ * * `heights` (Optional) The heights of individual cells.
2441
+ * * `align` (Optional) The alignment of the layout.
2442
+ * * `padding` (Optional) The padding width inside child cells.
2443
+ * * `expand` (Optional) Whether the layout should expand
2444
+ * vertically to fill its container.
2445
+ */
2446
+ vbox: function( dialog, childObjList, childHtmlList, htmlList, elementDefinition ) {
2447
+ if ( arguments.length < 3 )
2448
+ return;
2449
+
2450
+ this._ || ( this._ = {} );
2451
+
2452
+ var children = this._.children = childObjList,
2453
+ width = elementDefinition && elementDefinition.width || null,
2454
+ heights = elementDefinition && elementDefinition.heights || null;
2455
+ /** @ignore */
2456
+ var innerHTML = function() {
2457
+ var html = [ '<table role="presentation" cellspacing="0" border="0" ' ];
2458
+ html.push( 'style="' );
2459
+ if ( elementDefinition && elementDefinition.expand )
2460
+ html.push( 'height:100%;' );
2461
+ html.push( 'width:' + cssLength( width || '100%' ), ';' );
2462
+
2463
+ // (#10123) Temp fix for dialog broken layout in latest webkit.
2464
+ if ( CKEDITOR.env.webkit )
2465
+ html.push( 'float:none;' );
2466
+
2467
+ html.push( '"' );
2468
+ html.push( 'align="', CKEDITOR.tools.htmlEncode(
2469
+ ( elementDefinition && elementDefinition.align ) || ( dialog.getParentEditor().lang.dir == 'ltr' ? 'left' : 'right' ) ), '" ' );
2470
+
2471
+ html.push( '><tbody>' );
2472
+ for ( var i = 0; i < childHtmlList.length; i++ ) {
2473
+ var styles = [];
2474
+ html.push( '<tr><td role="presentation" ' );
2475
+ if ( width )
2476
+ styles.push( 'width:' + cssLength( width || '100%' ) );
2477
+ if ( heights )
2478
+ styles.push( 'height:' + cssLength( heights[ i ] ) );
2479
+ else if ( elementDefinition && elementDefinition.expand )
2480
+ styles.push( 'height:' + Math.floor( 100 / childHtmlList.length ) + '%' );
2481
+ if ( elementDefinition && elementDefinition.padding != undefined )
2482
+ styles.push( 'padding:' + cssLength( elementDefinition.padding ) );
2483
+ // In IE Quirks alignment has to be done on table cells. (#7324)
2484
+ if ( CKEDITOR.env.ie && CKEDITOR.env.quirks && children[ i ].align )
2485
+ styles.push( 'text-align:' + children[ i ].align );
2486
+ if ( styles.length > 0 )
2487
+ html.push( 'style="', styles.join( '; ' ), '" ' );
2488
+ html.push( ' class="cke_dialog_ui_vbox_child">', childHtmlList[ i ], '</td></tr>' );
2489
+ }
2490
+ html.push( '</tbody></table>' );
2491
+ return html.join( '' );
2492
+ };
2493
+ CKEDITOR.ui.dialog.uiElement.call( this, dialog, elementDefinition || { type: 'vbox' }, htmlList, 'div', null, { role: 'presentation' }, innerHTML );
2494
+ }
2495
+ };
2496
+ })();
2497
+
2498
+ /** @class CKEDITOR.ui.dialog.uiElement */
2499
+ CKEDITOR.ui.dialog.uiElement.prototype = {
2500
+ /**
2501
+ * Gets the root DOM element of this dialog UI object.
2502
+ *
2503
+ * uiElement.getElement().hide();
2504
+ *
2505
+ * @returns {CKEDITOR.dom.element} Root DOM element of UI object.
2506
+ */
2507
+ getElement: function() {
2508
+ return CKEDITOR.document.getById( this.domId );
2509
+ },
2510
+
2511
+ /**
2512
+ * Gets the DOM element that the user inputs values.
2513
+ *
2514
+ * This function is used by {@link #setValue}, {@link #getValue} and {@link #focus}. It should
2515
+ * be overrided in child classes where the input element isn't the root
2516
+ * element.
2517
+ *
2518
+ * var rawValue = textInput.getInputElement().$.value;
2519
+ *
2520
+ * @returns {CKEDITOR.dom.element} The element where the user input values.
2521
+ */
2522
+ getInputElement: function() {
2523
+ return this.getElement();
2524
+ },
2525
+
2526
+ /**
2527
+ * Gets the parent dialog object containing this UI element.
2528
+ *
2529
+ * var dialog = uiElement.getDialog();
2530
+ *
2531
+ * @returns {CKEDITOR.dialog} Parent dialog object.
2532
+ */
2533
+ getDialog: function() {
2534
+ return this._.dialog;
2535
+ },
2536
+
2537
+ /**
2538
+ * Sets the value of this dialog UI object.
2539
+ *
2540
+ * uiElement.setValue( 'Dingo' );
2541
+ *
2542
+ * @chainable
2543
+ * @param {Object} value The new value.
2544
+ * @param {Boolean} noChangeEvent Internal commit, to supress `change` event on this element.
2545
+ */
2546
+ setValue: function( value, noChangeEvent ) {
2547
+ this.getInputElement().setValue( value );
2548
+ !noChangeEvent && this.fire( 'change', { value: value } );
2549
+ return this;
2550
+ },
2551
+
2552
+ /**
2553
+ * Gets the current value of this dialog UI object.
2554
+ *
2555
+ * var myValue = uiElement.getValue();
2556
+ *
2557
+ * @returns {Object} The current value.
2558
+ */
2559
+ getValue: function() {
2560
+ return this.getInputElement().getValue();
2561
+ },
2562
+
2563
+ /**
2564
+ * Tells whether the UI object's value has changed.
2565
+ *
2566
+ * if ( uiElement.isChanged() )
2567
+ * confirm( 'Value changed! Continue?' );
2568
+ *
2569
+ * @returns {Boolean} `true` if changed, `false` if not changed.
2570
+ */
2571
+ isChanged: function() {
2572
+ // Override in input classes.
2573
+ return false;
2574
+ },
2575
+
2576
+ /**
2577
+ * Selects the parent tab of this element. Usually called by focus() or overridden focus() methods.
2578
+ *
2579
+ * focus : function() {
2580
+ * this.selectParentTab();
2581
+ * // do something else.
2582
+ * }
2583
+ *
2584
+ * @chainable
2585
+ */
2586
+ selectParentTab: function() {
2587
+ var element = this.getInputElement(),
2588
+ cursor = element,
2589
+ tabId;
2590
+ while ( ( cursor = cursor.getParent() ) && cursor.$.className.search( 'cke_dialog_page_contents' ) == -1 ) {
2591
+ /*jsl:pass*/
2592
+ }
2593
+
2594
+ // Some widgets don't have parent tabs (e.g. OK and Cancel buttons).
2595
+ if ( !cursor )
2596
+ return this;
2597
+
2598
+ tabId = cursor.getAttribute( 'name' );
2599
+ // Avoid duplicate select.
2600
+ if ( this._.dialog._.currentTabId != tabId )
2601
+ this._.dialog.selectPage( tabId );
2602
+ return this;
2603
+ },
2604
+
2605
+ /**
2606
+ * Puts the focus to the UI object. Switches tabs if the UI object isn't in the active tab page.
2607
+ *
2608
+ * uiElement.focus();
2609
+ *
2610
+ * @chainable
2611
+ */
2612
+ focus: function() {
2613
+ this.selectParentTab().getInputElement().focus();
2614
+ return this;
2615
+ },
2616
+
2617
+ /**
2618
+ * Registers the `on*` event handlers defined in the element definition.
2619
+ *
2620
+ * The default behavior of this function is:
2621
+ *
2622
+ * 1. If the on* event is defined in the class's eventProcesors list,
2623
+ * then the registration is delegated to the corresponding function
2624
+ * in the eventProcessors list.
2625
+ * 2. If the on* event is not defined in the eventProcessors list, then
2626
+ * register the event handler under the corresponding DOM event of
2627
+ * the UI element's input DOM element (as defined by the return value
2628
+ * of {@link #getInputElement}).
2629
+ *
2630
+ * This function is only called at UI element instantiation, but can
2631
+ * be overridded in child classes if they require more flexibility.
2632
+ *
2633
+ * @chainable
2634
+ * @param {CKEDITOR.dialog.definition.uiElement} definition The UI element
2635
+ * definition.
2636
+ */
2637
+ registerEvents: function( definition ) {
2638
+ var regex = /^on([A-Z]\w+)/,
2639
+ match;
2640
+
2641
+ var registerDomEvent = function( uiElement, dialog, eventName, func ) {
2642
+ dialog.on( 'load', function() {
2643
+ uiElement.getInputElement().on( eventName, func, uiElement );
2644
+ });
2645
+ };
2646
+
2647
+ for ( var i in definition ) {
2648
+ if ( !( match = i.match( regex ) ) )
2649
+ continue;
2650
+ if ( this.eventProcessors[ i ] )
2651
+ this.eventProcessors[ i ].call( this, this._.dialog, definition[ i ] );
2652
+ else
2653
+ registerDomEvent( this, this._.dialog, match[ 1 ].toLowerCase(), definition[ i ] );
2654
+ }
2655
+
2656
+ return this;
2657
+ },
2658
+
2659
+ /**
2660
+ * The event processor list used by
2661
+ * {@link CKEDITOR.ui.dialog.uiElement#getInputElement} at UI element
2662
+ * instantiation. The default list defines three `on*` events:
2663
+ *
2664
+ * 1. `onLoad` - Called when the element's parent dialog opens for the
2665
+ * first time.
2666
+ * 2. `onShow` - Called whenever the element's parent dialog opens.
2667
+ * 3. `onHide` - Called whenever the element's parent dialog closes.
2668
+ *
2669
+ * // This connects the 'click' event in CKEDITOR.ui.dialog.button to onClick
2670
+ * // handlers in the UI element's definitions.
2671
+ * CKEDITOR.ui.dialog.button.eventProcessors = CKEDITOR.tools.extend( {},
2672
+ * CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,
2673
+ * { onClick : function( dialog, func ) { this.on( 'click', func ); } },
2674
+ * true
2675
+ * );
2676
+ *
2677
+ * @property {Object}
2678
+ */
2679
+ eventProcessors: {
2680
+ onLoad: function( dialog, func ) {
2681
+ dialog.on( 'load', func, this );
2682
+ },
2683
+
2684
+ onShow: function( dialog, func ) {
2685
+ dialog.on( 'show', func, this );
2686
+ },
2687
+
2688
+ onHide: function( dialog, func ) {
2689
+ dialog.on( 'hide', func, this );
2690
+ }
2691
+ },
2692
+
2693
+ /**
2694
+ * The default handler for a UI element's access key down event, which
2695
+ * tries to put focus to the UI element.
2696
+ *
2697
+ * Can be overridded in child classes for more sophisticaed behavior.
2698
+ *
2699
+ * @param {CKEDITOR.dialog} dialog The parent dialog object.
2700
+ * @param {String} key The key combination pressed. Since access keys
2701
+ * are defined to always include the `CTRL` key, its value should always
2702
+ * include a `'CTRL+'` prefix.
2703
+ */
2704
+ accessKeyDown: function( dialog, key ) {
2705
+ this.focus();
2706
+ },
2707
+
2708
+ /**
2709
+ * The default handler for a UI element's access key up event, which
2710
+ * does nothing.
2711
+ *
2712
+ * Can be overridded in child classes for more sophisticated behavior.
2713
+ *
2714
+ * @param {CKEDITOR.dialog} dialog The parent dialog object.
2715
+ * @param {String} key The key combination pressed. Since access keys
2716
+ * are defined to always include the `CTRL` key, its value should always
2717
+ * include a `'CTRL+'` prefix.
2718
+ */
2719
+ accessKeyUp: function( dialog, key ) {},
2720
+
2721
+ /**
2722
+ * Disables a UI element.
2723
+ */
2724
+ disable: function() {
2725
+ var element = this.getElement(),
2726
+ input = this.getInputElement();
2727
+ input.setAttribute( 'disabled', 'true' );
2728
+ element.addClass( 'cke_disabled' );
2729
+ },
2730
+
2731
+ /**
2732
+ * Enables a UI element.
2733
+ */
2734
+ enable: function() {
2735
+ var element = this.getElement(),
2736
+ input = this.getInputElement();
2737
+ input.removeAttribute( 'disabled' );
2738
+ element.removeClass( 'cke_disabled' );
2739
+ },
2740
+
2741
+ /**
2742
+ * Determines whether an UI element is enabled or not.
2743
+ *
2744
+ * @returns {Boolean} Whether the UI element is enabled.
2745
+ */
2746
+ isEnabled: function() {
2747
+ return !this.getElement().hasClass( 'cke_disabled' );
2748
+ },
2749
+
2750
+ /**
2751
+ * Determines whether an UI element is visible or not.
2752
+ *
2753
+ * @returns {Boolean} Whether the UI element is visible.
2754
+ */
2755
+ isVisible: function() {
2756
+ return this.getInputElement().isVisible();
2757
+ },
2758
+
2759
+ /**
2760
+ * Determines whether an UI element is focus-able or not.
2761
+ * Focus-able is defined as being both visible and enabled.
2762
+ *
2763
+ * @returns {Boolean} Whether the UI element can be focused.
2764
+ */
2765
+ isFocusable: function() {
2766
+ if ( !this.isEnabled() || !this.isVisible() )
2767
+ return false;
2768
+ return true;
2769
+ }
2770
+ };
2771
+
2772
+ /** @class CKEDITOR.ui.dialog.hbox */
2773
+ CKEDITOR.ui.dialog.hbox.prototype = CKEDITOR.tools.extend( new CKEDITOR.ui.dialog.uiElement, {
2774
+ /**
2775
+ * Gets a child UI element inside this container.
2776
+ *
2777
+ * var checkbox = hbox.getChild( [0,1] );
2778
+ * checkbox.setValue( true );
2779
+ *
2780
+ * @param {Array/Number} indices An array or a single number to indicate the child's
2781
+ * position in the container's descendant tree. Omit to get all the children in an array.
2782
+ * @returns {Array/CKEDITOR.ui.dialog.uiElement} Array of all UI elements in the container
2783
+ * if no argument given, or the specified UI element if indices is given.
2784
+ */
2785
+ getChild: function( indices ) {
2786
+ // If no arguments, return a clone of the children array.
2787
+ if ( arguments.length < 1 )
2788
+ return this._.children.concat();
2789
+
2790
+ // If indices isn't array, make it one.
2791
+ if ( !indices.splice )
2792
+ indices = [ indices ];
2793
+
2794
+ // Retrieve the child element according to tree position.
2795
+ if ( indices.length < 2 )
2796
+ return this._.children[ indices[ 0 ] ];
2797
+ else
2798
+ return ( this._.children[ indices[ 0 ] ] && this._.children[ indices[ 0 ] ].getChild ) ? this._.children[ indices[ 0 ] ].getChild( indices.slice( 1, indices.length ) ) : null;
2799
+ }
2800
+ }, true );
2801
+
2802
+ CKEDITOR.ui.dialog.vbox.prototype = new CKEDITOR.ui.dialog.hbox();
2803
+
2804
+ (function() {
2805
+ var commonBuilder = {
2806
+ build: function( dialog, elementDefinition, output ) {
2807
+ var children = elementDefinition.children,
2808
+ child,
2809
+ childHtmlList = [],
2810
+ childObjList = [];
2811
+ for ( var i = 0;
2812
+ ( i < children.length && ( child = children[ i ] ) ); i++ ) {
2813
+ var childHtml = [];
2814
+ childHtmlList.push( childHtml );
2815
+ childObjList.push( CKEDITOR.dialog._.uiElementBuilders[ child.type ].build( dialog, child, childHtml ) );
2816
+ }
2817
+ return new CKEDITOR.ui.dialog[ elementDefinition.type ]( dialog, childObjList, childHtmlList, output, elementDefinition );
2818
+ }
2819
+ };
2820
+
2821
+ CKEDITOR.dialog.addUIElement( 'hbox', commonBuilder );
2822
+ CKEDITOR.dialog.addUIElement( 'vbox', commonBuilder );
2823
+ })();
2824
+
2825
+ /**
2826
+ * Generic dialog command. It opens a specific dialog when executed.
2827
+ *
2828
+ * // Register the "link" command, which opens the "link" dialog.
2829
+ * editor.addCommand( 'link', new CKEDITOR.dialogCommand( 'link' ) );
2830
+ *
2831
+ * @class
2832
+ * @constructor Creates a dialogCommand class instance.
2833
+ * @extends CKEDITOR.commandDefinition
2834
+ * @param {String} dialogName The name of the dialog to open when executing
2835
+ * this command.
2836
+ * @param {Object} [ext] Additional command definition's properties.
2837
+ */
2838
+ CKEDITOR.dialogCommand = function( dialogName, ext ) {
2839
+ this.dialogName = dialogName;
2840
+ CKEDITOR.tools.extend( this, ext, true );
2841
+ };
2842
+
2843
+ CKEDITOR.dialogCommand.prototype = {
2844
+ exec: function( editor ) {
2845
+ // Special treatment for Opera. (#8031)
2846
+ CKEDITOR.env.opera ? CKEDITOR.tools.setTimeout( function() {
2847
+ editor.openDialog( this.dialogName );
2848
+ }, 0, this ) : editor.openDialog( this.dialogName );
2849
+ },
2850
+
2851
+ // Dialog commands just open a dialog ui, thus require no undo logic,
2852
+ // undo support should dedicate to specific dialog implementation.
2853
+ canUndo: false,
2854
+
2855
+ editorFocus: 1
2856
+ };
2857
+
2858
+ (function() {
2859
+ var notEmptyRegex = /^([a]|[^a])+$/,
2860
+ integerRegex = /^\d*$/,
2861
+ numberRegex = /^\d*(?:\.\d+)?$/,
2862
+ htmlLengthRegex = /^(((\d*(\.\d+))|(\d*))(px|\%)?)?$/,
2863
+ cssLengthRegex = /^(((\d*(\.\d+))|(\d*))(px|em|ex|in|cm|mm|pt|pc|\%)?)?$/i,
2864
+ inlineStyleRegex = /^(\s*[\w-]+\s*:\s*[^:;]+(?:;|$))*$/;
2865
+
2866
+ CKEDITOR.VALIDATE_OR = 1;
2867
+ CKEDITOR.VALIDATE_AND = 2;
2868
+
2869
+ CKEDITOR.dialog.validate = {
2870
+ functions: function() {
2871
+ var args = arguments;
2872
+ return function() {
2873
+ /**
2874
+ * It's important for validate functions to be able to accept the value
2875
+ * as argument in addition to this.getValue(), so that it is possible to
2876
+ * combine validate functions together to make more sophisticated
2877
+ * validators.
2878
+ */
2879
+ var value = this && this.getValue ? this.getValue() : args[ 0 ];
2880
+
2881
+ var msg = undefined,
2882
+ relation = CKEDITOR.VALIDATE_AND,
2883
+ functions = [],
2884
+ i;
2885
+
2886
+ for ( i = 0; i < args.length; i++ ) {
2887
+ if ( typeof( args[ i ] ) == 'function' )
2888
+ functions.push( args[ i ] );
2889
+ else
2890
+ break;
2891
+ }
2892
+
2893
+ if ( i < args.length && typeof( args[ i ] ) == 'string' ) {
2894
+ msg = args[ i ];
2895
+ i++;
2896
+ }
2897
+
2898
+ if ( i < args.length && typeof( args[ i ] ) == 'number' )
2899
+ relation = args[ i ];
2900
+
2901
+ var passed = ( relation == CKEDITOR.VALIDATE_AND ? true : false );
2902
+ for ( i = 0; i < functions.length; i++ ) {
2903
+ if ( relation == CKEDITOR.VALIDATE_AND )
2904
+ passed = passed && functions[ i ]( value );
2905
+ else
2906
+ passed = passed || functions[ i ]( value );
2907
+ }
2908
+
2909
+ return !passed ? msg : true;
2910
+ };
2911
+ },
2912
+
2913
+ regex: function( regex, msg ) {
2914
+ /*
2915
+ * Can be greatly shortened by deriving from functions validator if code size
2916
+ * turns out to be more important than performance.
2917
+ */
2918
+ return function() {
2919
+ var value = this && this.getValue ? this.getValue() : arguments[ 0 ];
2920
+ return !regex.test( value ) ? msg : true;
2921
+ };
2922
+ },
2923
+
2924
+ notEmpty: function( msg ) {
2925
+ return this.regex( notEmptyRegex, msg );
2926
+ },
2927
+
2928
+ integer: function( msg ) {
2929
+ return this.regex( integerRegex, msg );
2930
+ },
2931
+
2932
+ 'number': function( msg ) {
2933
+ return this.regex( numberRegex, msg );
2934
+ },
2935
+
2936
+ 'cssLength': function( msg ) {
2937
+ return this.functions( function( val ) {
2938
+ return cssLengthRegex.test( CKEDITOR.tools.trim( val ) );
2939
+ }, msg );
2940
+ },
2941
+
2942
+ 'htmlLength': function( msg ) {
2943
+ return this.functions( function( val ) {
2944
+ return htmlLengthRegex.test( CKEDITOR.tools.trim( val ) );
2945
+ }, msg );
2946
+ },
2947
+
2948
+ 'inlineStyle': function( msg ) {
2949
+ return this.functions( function( val ) {
2950
+ return inlineStyleRegex.test( CKEDITOR.tools.trim( val ) );
2951
+ }, msg );
2952
+ },
2953
+
2954
+ equals: function( value, msg ) {
2955
+ return this.functions( function( val ) {
2956
+ return val == value;
2957
+ }, msg );
2958
+ },
2959
+
2960
+ notEqual: function( value, msg ) {
2961
+ return this.functions( function( val ) {
2962
+ return val != value;
2963
+ }, msg );
2964
+ }
2965
+ };
2966
+
2967
+ CKEDITOR.on( 'instanceDestroyed', function( evt ) {
2968
+ // Remove dialog cover on last instance destroy.
2969
+ if ( CKEDITOR.tools.isEmpty( CKEDITOR.instances ) ) {
2970
+ var currentTopDialog;
2971
+ while ( ( currentTopDialog = CKEDITOR.dialog._.currentTop ) )
2972
+ currentTopDialog.hide();
2973
+ removeCovers();
2974
+ }
2975
+
2976
+ var dialogs = evt.editor._.storedDialogs;
2977
+ for ( var name in dialogs )
2978
+ dialogs[ name ].destroy();
2979
+
2980
+ });
2981
+
2982
+ })();
2983
+
2984
+ // Extend the CKEDITOR.editor class with dialog specific functions.
2985
+ CKEDITOR.tools.extend( CKEDITOR.editor.prototype, {
2986
+ /**
2987
+ * Loads and opens a registered dialog.
2988
+ *
2989
+ * CKEDITOR.instances.editor1.openDialog( 'smiley' );
2990
+ *
2991
+ * @member CKEDITOR.editor
2992
+ * @param {String} dialogName The registered name of the dialog.
2993
+ * @param {Function} callback The function to be invoked after dialog instance created.
2994
+ * @returns {CKEDITOR.dialog} The dialog object corresponding to the dialog displayed.
2995
+ * `null` if the dialog name is not registered.
2996
+ * @see CKEDITOR.dialog#add
2997
+ */
2998
+ openDialog: function( dialogName, callback ) {
2999
+ var dialog = null, dialogDefinitions = CKEDITOR.dialog._.dialogDefinitions[ dialogName ];
3000
+
3001
+ if ( CKEDITOR.dialog._.currentTop === null )
3002
+ showCover( this );
3003
+
3004
+ // If the dialogDefinition is already loaded, open it immediately.
3005
+ if ( typeof dialogDefinitions == 'function' ) {
3006
+ var storedDialogs = this._.storedDialogs || ( this._.storedDialogs = {} );
3007
+
3008
+ dialog = storedDialogs[ dialogName ] || ( storedDialogs[ dialogName ] = new CKEDITOR.dialog( this, dialogName ) );
3009
+
3010
+ callback && callback.call( dialog, dialog );
3011
+ dialog.show();
3012
+
3013
+ } else if ( dialogDefinitions == 'failed' ) {
3014
+ hideCover( this );
3015
+ throw new Error( '[CKEDITOR.dialog.openDialog] Dialog "' + dialogName + '" failed when loading definition.' );
3016
+ } else if ( typeof dialogDefinitions == 'string' ) {
3017
+
3018
+ CKEDITOR.scriptLoader.load( CKEDITOR.getUrl( dialogDefinitions ),
3019
+ function() {
3020
+ var dialogDefinition = CKEDITOR.dialog._.dialogDefinitions[ dialogName ];
3021
+ // In case of plugin error, mark it as loading failed.
3022
+ if ( typeof dialogDefinition != 'function' )
3023
+ CKEDITOR.dialog._.dialogDefinitions[ dialogName ] = 'failed';
3024
+
3025
+ this.openDialog( dialogName, callback );
3026
+ }, this, 0, 1 );
3027
+ }
3028
+
3029
+ CKEDITOR.skin.loadPart( 'dialog' );
3030
+
3031
+ return dialog;
3032
+ }
3033
+ });
3034
+ })();
3035
+
3036
+ CKEDITOR.plugins.add( 'dialog', {
3037
+ requires: 'dialogui',
3038
+ init: function( editor ) {
3039
+ editor.on( 'contentDom', function() {
3040
+ var editable = editor.editable();
3041
+ // Open dialog on double-clicks.
3042
+ editable.attachListener( editable, 'dblclick', function( evt ) {
3043
+ if ( editor.readOnly )
3044
+ return false;
3045
+
3046
+ var data = { element: evt.data.getTarget() };
3047
+ editor.fire( 'doubleclick', data );
3048
+ data.dialog && editor.openDialog( data.dialog );
3049
+
3050
+ return 1;
3051
+ });
3052
+ });
3053
+ }
3054
+ });
3055
+
3056
+ // Dialog related configurations.
3057
+
3058
+ /**
3059
+ * The color of the dialog background cover. It should be a valid CSS color string.
3060
+ *
3061
+ * config.dialog_backgroundCoverColor = 'rgb(255, 254, 253)';
3062
+ *
3063
+ * @cfg {String} [dialog_backgroundCoverColor='white']
3064
+ * @member CKEDITOR.config
3065
+ */
3066
+
3067
+ /**
3068
+ * The opacity of the dialog background cover. It should be a number within the
3069
+ * range `[0.0, 1.0]`.
3070
+ *
3071
+ * config.dialog_backgroundCoverOpacity = 0.7;
3072
+ *
3073
+ * @cfg {Number} [dialog_backgroundCoverOpacity=0.5]
3074
+ * @member CKEDITOR.config
3075
+ */
3076
+
3077
+ /**
3078
+ * If the dialog has more than one tab, put focus into the first tab as soon as dialog is opened.
3079
+ *
3080
+ * config.dialog_startupFocusTab = true;
3081
+ *
3082
+ * @cfg {Boolean} [dialog_startupFocusTab=false]
3083
+ * @member CKEDITOR.config
3084
+ */
3085
+
3086
+ /**
3087
+ * The distance of magnetic borders used in moving and resizing dialogs,
3088
+ * measured in pixels.
3089
+ *
3090
+ * config.dialog_magnetDistance = 30;
3091
+ *
3092
+ * @cfg {Number} [dialog_magnetDistance=20]
3093
+ * @member CKEDITOR.config
3094
+ */
3095
+
3096
+ /**
3097
+ * The guideline to follow when generating the dialog buttons. There are 3 possible options:
3098
+ *
3099
+ * * `'OS'` - the buttons will be displayed in the default order of the user's OS;
3100
+ * * `'ltr'` - for Left-To-Right order;
3101
+ * * `'rtl'` - for Right-To-Left order.
3102
+ *
3103
+ * Example:
3104
+ *
3105
+ * config.dialog_buttonsOrder = 'rtl';
3106
+ *
3107
+ * @since 3.5
3108
+ * @cfg {String} [dialog_buttonsOrder='OS']
3109
+ * @member CKEDITOR.config
3110
+ */
3111
+
3112
+ /**
3113
+ * The dialog contents to removed. It's a string composed by dialog name and tab name with a colon between them.
3114
+ *
3115
+ * Separate each pair with semicolon (see example).
3116
+ *
3117
+ * **Note:** All names are case-sensitive.
3118
+ *
3119
+ * **Note:** Be cautious when specifying dialog tabs that are mandatory,
3120
+ * like `'info'`, dialog functionality might be broken because of this!
3121
+ *
3122
+ * config.removeDialogTabs = 'flash:advanced;image:Link';
3123
+ *
3124
+ * @since 3.5
3125
+ * @cfg {String} [removeDialogTabs='']
3126
+ * @member CKEDITOR.config
3127
+ */
3128
+
3129
+ /**
3130
+ * Fired when a dialog definition is about to be used to create a dialog into
3131
+ * an editor instance. This event makes it possible to customize the definition
3132
+ * before creating it.
3133
+ *
3134
+ * Note that this event is called only the first time a specific dialog is
3135
+ * opened. Successive openings will use the cached dialog, and this event will
3136
+ * not get fired.
3137
+ *
3138
+ * @event dialogDefinition
3139
+ * @member CKEDITOR
3140
+ * @param {CKEDITOR.dialog.definition} data The dialog defination that
3141
+ * is being loaded.
3142
+ * @param {CKEDITOR.editor} editor The editor instance that will use the dialog.
3143
+ */
3144
+
3145
+ /**
3146
+ * Fired when a tab is going to be selected in a dialog.
3147
+ *
3148
+ * @event selectPage
3149
+ * @member CKEDITOR.dialog
3150
+ * @param data
3151
+ * @param {String} data.page The id of the page that it's gonna be selected.
3152
+ * @param {String} data.currentPage The id of the current page.
3153
+ */
3154
+
3155
+ /**
3156
+ * Fired when the user tries to dismiss a dialog.
3157
+ *
3158
+ * @event cancel
3159
+ * @member CKEDITOR.dialog
3160
+ * @param data
3161
+ * @param {Boolean} data.hide Whether the event should proceed or not.
3162
+ */
3163
+
3164
+ /**
3165
+ * Fired when the user tries to confirm a dialog.
3166
+ *
3167
+ * @event ok
3168
+ * @member CKEDITOR.dialog
3169
+ * @param data
3170
+ * @param {Boolean} data.hide Whether the event should proceed or not.
3171
+ */
3172
+
3173
+ /**
3174
+ * Fired when a dialog is shown.
3175
+ *
3176
+ * @event show
3177
+ * @member CKEDITOR.dialog
3178
+ */
3179
+
3180
+ /**
3181
+ * Fired when a dialog is shown.
3182
+ *
3183
+ * @event dialogShow
3184
+ * @member CKEDITOR.editor
3185
+ * @param {CKEDITOR.editor} editor This editor instance.
3186
+ * @param {CKEDITOR.dialog} data The opened dialog instance.
3187
+ */
3188
+
3189
+ /**
3190
+ * Fired when a dialog is hidden.
3191
+ *
3192
+ * @event hide
3193
+ * @member CKEDITOR.dialog
3194
+ */
3195
+
3196
+ /**
3197
+ * Fired when a dialog is hidden.
3198
+ *
3199
+ * @event dialogHide
3200
+ * @member CKEDITOR.editor
3201
+ * @param {CKEDITOR.editor} editor This editor instance.
3202
+ * @param {CKEDITOR.dialog} data The hidden dialog instance.
3203
+ */
3204
+
3205
+ /**
3206
+ * Fired when a dialog is being resized. The event is fired on
3207
+ * both the {@link CKEDITOR.dialog} object and the dialog instance
3208
+ * since 3.5.3, previously it's available only in the global object.
3209
+ *
3210
+ * @static
3211
+ * @event resize
3212
+ * @member CKEDITOR.dialog
3213
+ * @param data
3214
+ * @param {CKEDITOR.dialog} data.dialog The dialog being resized (if
3215
+ * it's fired on the dialog itself, this parameter isn't sent).
3216
+ * @param {String} data.skin The skin name.
3217
+ * @param {Number} data.width The new width.
3218
+ * @param {Number} data.height The new height.
3219
+ */
3220
+
3221
+ /**
3222
+ * Fired when a dialog is being resized. The event is fired on
3223
+ * both the {@link CKEDITOR.dialog} object and the dialog instance
3224
+ * since 3.5.3, previously it's available only in the global object.
3225
+ *
3226
+ * @since 3.5
3227
+ * @event resize
3228
+ * @member CKEDITOR.dialog
3229
+ * @param data
3230
+ * @param {Number} data.width The new width.
3231
+ * @param {Number} data.height The new height.
3232
+ */