spiderfw 0.6.38 → 0.6.39

Sign up to get free protection for your applications and to get access to all the features.
Files changed (515) hide show
  1. checksums.yaml +13 -5
  2. data/CHANGELOG +23 -0
  3. data/VERSION +1 -1
  4. data/apps/core/admin/views/admin.layout.shtml +6 -0
  5. data/apps/core/auth/controllers/login_controller.rb +1 -1
  6. data/apps/core/components/assets.rb +55 -6
  7. data/apps/core/components/public/bootstrap/scss/_variables.scss +5 -2
  8. data/apps/core/components/public/bootstrap/scss/bootstrap.css +942 -236
  9. data/apps/core/components/public/bootstrap/scss/responsive.css +187 -30
  10. data/apps/core/components/public/css/tinymce/skins/lightgray/AbsoluteLayout.less +17 -0
  11. data/apps/core/components/public/css/tinymce/skins/lightgray/Animations.less +10 -0
  12. data/apps/core/components/public/css/tinymce/skins/lightgray/Button.less +172 -0
  13. data/apps/core/components/public/css/tinymce/skins/lightgray/ButtonGroup.less +71 -0
  14. data/apps/core/components/public/css/tinymce/skins/lightgray/Checkbox.less +49 -0
  15. data/apps/core/components/public/css/tinymce/skins/lightgray/ColorBox.less +6 -0
  16. data/apps/core/components/public/css/tinymce/skins/lightgray/ColorButton.less +72 -0
  17. data/apps/core/components/public/css/tinymce/skins/lightgray/ColorPicker.less +80 -0
  18. data/apps/core/components/public/css/tinymce/skins/lightgray/ComboBox.less +39 -0
  19. data/apps/core/components/public/css/tinymce/skins/lightgray/Container.less +9 -0
  20. data/apps/core/components/public/css/tinymce/skins/lightgray/Content.Inline.less +4 -0
  21. data/apps/core/components/public/css/tinymce/skins/lightgray/Content.Objects.less +166 -0
  22. data/apps/core/components/public/css/tinymce/skins/lightgray/Content.less +27 -0
  23. data/apps/core/components/public/css/tinymce/skins/lightgray/CropRect.less +54 -0
  24. data/apps/core/components/public/css/tinymce/skins/lightgray/FieldSet.less +15 -0
  25. data/apps/core/components/public/css/tinymce/skins/lightgray/FitLayout.less +9 -0
  26. data/apps/core/components/public/css/tinymce/skins/lightgray/FloatPanel.less +69 -0
  27. data/apps/core/components/public/css/tinymce/skins/lightgray/FlowLayout.less +36 -0
  28. data/apps/core/components/public/css/tinymce/skins/lightgray/Icons.Ie7.less +136 -0
  29. data/apps/core/components/public/css/tinymce/skins/lightgray/Icons.less +180 -0
  30. data/apps/core/components/public/css/tinymce/skins/lightgray/Iframe.less +6 -0
  31. data/apps/core/components/public/css/tinymce/skins/lightgray/ImagePanel.less +20 -0
  32. data/apps/core/components/public/css/tinymce/skins/lightgray/InfoBox.less +71 -0
  33. data/apps/core/components/public/css/tinymce/skins/lightgray/Label.less +38 -0
  34. data/apps/core/components/public/css/tinymce/skins/lightgray/ListBox.less +26 -0
  35. data/apps/core/components/public/css/tinymce/skins/lightgray/Menu.less +34 -0
  36. data/apps/core/components/public/css/tinymce/skins/lightgray/MenuBar.less +32 -0
  37. data/apps/core/components/public/css/tinymce/skins/lightgray/MenuButton.less +34 -0
  38. data/apps/core/components/public/css/tinymce/skins/lightgray/MenuItem.less +142 -0
  39. data/apps/core/components/public/css/tinymce/skins/lightgray/Mixins.less +54 -0
  40. data/apps/core/components/public/css/tinymce/skins/lightgray/Notification.less +144 -0
  41. data/apps/core/components/public/css/tinymce/skins/lightgray/Panel.less +7 -0
  42. data/apps/core/components/public/css/tinymce/skins/lightgray/Path.less +45 -0
  43. data/apps/core/components/public/css/tinymce/skins/lightgray/Progress.less +34 -0
  44. data/apps/core/components/public/css/tinymce/skins/lightgray/Radio.less +1 -0
  45. data/apps/core/components/public/css/tinymce/skins/lightgray/Reset.less +32 -0
  46. data/apps/core/components/public/css/tinymce/skins/lightgray/ResizeHandle.less +18 -0
  47. data/apps/core/components/public/css/tinymce/skins/lightgray/Scrollable.less +44 -0
  48. data/apps/core/components/public/css/tinymce/skins/lightgray/SelectBox.less +6 -0
  49. data/apps/core/components/public/css/tinymce/skins/lightgray/Slider.less +29 -0
  50. data/apps/core/components/public/css/tinymce/skins/lightgray/Spacer.less +5 -0
  51. data/apps/core/components/public/css/tinymce/skins/lightgray/SplitButton.less +49 -0
  52. data/apps/core/components/public/css/tinymce/skins/lightgray/StackLayout.less +5 -0
  53. data/apps/core/components/public/css/tinymce/skins/lightgray/TabPanel.less +44 -0
  54. data/apps/core/components/public/css/tinymce/skins/lightgray/TextBox.less +41 -0
  55. data/apps/core/components/public/css/tinymce/skins/lightgray/Throbber.less +19 -0
  56. data/apps/core/components/public/css/tinymce/skins/lightgray/TinyMCE.less +159 -0
  57. data/apps/core/components/public/css/tinymce/skins/lightgray/ToolTip.less +129 -0
  58. data/apps/core/components/public/css/tinymce/skins/lightgray/Variables.less +214 -0
  59. data/apps/core/components/public/css/tinymce/skins/lightgray/Window.less +127 -0
  60. data/apps/core/components/public/css/tinymce/skins/lightgray/content.inline.min.css +1 -0
  61. data/apps/core/components/public/css/tinymce/skins/lightgray/content.min.css +1 -0
  62. data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/readme.md +1 -0
  63. data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/tinymce-small.eot +0 -0
  64. data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/tinymce-small.json +1277 -0
  65. data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/tinymce-small.svg +63 -0
  66. data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/tinymce-small.ttf +0 -0
  67. data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/tinymce-small.woff +0 -0
  68. data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/tinymce.eot +0 -0
  69. data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/tinymce.json +3381 -0
  70. data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/tinymce.svg +129 -0
  71. data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/tinymce.ttf +0 -0
  72. data/apps/core/components/public/css/tinymce/skins/lightgray/fonts/tinymce.woff +0 -0
  73. data/apps/core/components/public/css/tinymce/skins/lightgray/img/anchor.gif +0 -0
  74. data/apps/core/components/public/css/tinymce/skins/lightgray/img/loader.gif +0 -0
  75. data/apps/core/components/public/css/tinymce/skins/lightgray/img/object.gif +0 -0
  76. data/apps/core/components/public/css/tinymce/skins/lightgray/img/trans.gif +0 -0
  77. data/apps/core/components/public/css/tinymce/skins/lightgray/skin.dev.less +46 -0
  78. data/apps/core/components/public/css/tinymce/skins/lightgray/skin.ie7.dev.less +46 -0
  79. data/apps/core/components/public/css/tinymce/skins/lightgray/skin.ie7.less +2542 -0
  80. data/apps/core/components/public/css/tinymce/skins/lightgray/skin.ie7.min.css +1 -0
  81. data/apps/core/components/public/css/tinymce/skins/lightgray/skin.less +2586 -0
  82. data/apps/core/components/public/css/tinymce/skins/lightgray/skin.min.css +1 -0
  83. data/apps/core/components/public/js/bootbox_2/bootbox.js +551 -0
  84. data/apps/core/components/public/js/jquery/jquery-ui-1.9.2/ui/i18n/jquery.ui.datepicker-it-min.js +4 -0
  85. data/apps/core/components/public/js/spider.js +7 -3
  86. data/apps/core/components/public/js/tinymce/classes/AddOnManager.js +265 -0
  87. data/apps/core/components/public/js/tinymce/classes/Compat.js +90 -0
  88. data/apps/core/components/public/js/tinymce/classes/DragDropOverrides.js +224 -0
  89. data/apps/core/components/public/js/tinymce/classes/Editor.js +2221 -0
  90. data/apps/core/components/public/js/tinymce/classes/EditorCommands.js +1028 -0
  91. data/apps/core/components/public/js/tinymce/classes/EditorManager.js +715 -0
  92. data/apps/core/components/public/js/tinymce/classes/EditorObservable.js +204 -0
  93. data/apps/core/components/public/js/tinymce/classes/EditorUpload.js +191 -0
  94. data/apps/core/components/public/js/tinymce/classes/EnterKey.js +676 -0
  95. data/apps/core/components/public/js/tinymce/classes/Env.js +177 -0
  96. data/apps/core/components/public/js/tinymce/classes/FocusManager.js +266 -0
  97. data/apps/core/components/public/js/tinymce/classes/ForceBlocks.js +138 -0
  98. data/apps/core/components/public/js/tinymce/classes/Formatter.js +2378 -0
  99. data/apps/core/components/public/js/tinymce/classes/LegacyInput.js +82 -0
  100. data/apps/core/components/public/js/tinymce/classes/Mode.js +54 -0
  101. data/apps/core/components/public/js/tinymce/classes/NodeChange.js +154 -0
  102. data/apps/core/components/public/js/tinymce/classes/NotificationManager.js +156 -0
  103. data/apps/core/components/public/js/tinymce/classes/Register.js +34 -0
  104. data/apps/core/components/public/js/tinymce/classes/SelectionOverrides.js +810 -0
  105. data/apps/core/components/public/js/tinymce/classes/Shortcuts.js +172 -0
  106. data/apps/core/components/public/js/tinymce/classes/UndoManager.js +346 -0
  107. data/apps/core/components/public/js/tinymce/classes/WindowManager.js +278 -0
  108. data/apps/core/components/public/js/tinymce/classes/caret/CaretBookmark.js +263 -0
  109. data/apps/core/components/public/js/tinymce/classes/caret/CaretCandidate.js +86 -0
  110. data/apps/core/components/public/js/tinymce/classes/caret/CaretContainer.js +151 -0
  111. data/apps/core/components/public/js/tinymce/classes/caret/CaretPosition.js +371 -0
  112. data/apps/core/components/public/js/tinymce/classes/caret/CaretUtils.js +302 -0
  113. data/apps/core/components/public/js/tinymce/classes/caret/CaretWalker.js +215 -0
  114. data/apps/core/components/public/js/tinymce/classes/caret/FakeCaret.js +192 -0
  115. data/apps/core/components/public/js/tinymce/classes/caret/LineUtils.js +135 -0
  116. data/apps/core/components/public/js/tinymce/classes/caret/LineWalker.js +166 -0
  117. data/apps/core/components/public/js/tinymce/classes/data/Binding.js +79 -0
  118. data/apps/core/components/public/js/tinymce/classes/data/ObservableArray.js +196 -0
  119. data/apps/core/components/public/js/tinymce/classes/data/ObservableObject.js +194 -0
  120. data/apps/core/components/public/js/tinymce/classes/dom/BookmarkManager.js +456 -0
  121. data/apps/core/components/public/js/tinymce/classes/dom/ControlSelection.js +634 -0
  122. data/apps/core/components/public/js/tinymce/classes/dom/DOMUtils.js +1853 -0
  123. data/apps/core/components/public/js/tinymce/classes/dom/Dimensions.js +64 -0
  124. data/apps/core/components/public/js/tinymce/classes/dom/DomQuery.js +1578 -0
  125. data/apps/core/components/public/js/tinymce/classes/dom/ElementUtils.js +118 -0
  126. data/apps/core/components/public/js/tinymce/classes/dom/EventUtils.js +583 -0
  127. data/apps/core/components/public/js/tinymce/classes/dom/NodePath.js +50 -0
  128. data/apps/core/components/public/js/tinymce/classes/dom/NodeType.js +110 -0
  129. data/apps/core/components/public/js/tinymce/classes/dom/Range.js +785 -0
  130. data/apps/core/components/public/js/tinymce/classes/dom/RangeUtils.js +628 -0
  131. data/apps/core/components/public/js/tinymce/classes/dom/ScriptLoader.js +254 -0
  132. data/apps/core/components/public/js/tinymce/classes/dom/Selection.js +1008 -0
  133. data/apps/core/components/public/js/tinymce/classes/dom/Serializer.js +506 -0
  134. data/apps/core/components/public/js/tinymce/classes/dom/Sizzle.jQuery.js +23 -0
  135. data/apps/core/components/public/js/tinymce/classes/dom/Sizzle.js +2039 -0
  136. data/apps/core/components/public/js/tinymce/classes/dom/StyleSheetLoader.js +190 -0
  137. data/apps/core/components/public/js/tinymce/classes/dom/TreeWalker.js +127 -0
  138. data/apps/core/components/public/js/tinymce/classes/dom/TridentSelection.js +508 -0
  139. data/apps/core/components/public/js/tinymce/classes/file/BlobCache.js +72 -0
  140. data/apps/core/components/public/js/tinymce/classes/file/Conversions.js +106 -0
  141. data/apps/core/components/public/js/tinymce/classes/file/ImageScanner.js +145 -0
  142. data/apps/core/components/public/js/tinymce/classes/file/Uploader.js +193 -0
  143. data/apps/core/components/public/js/tinymce/classes/fmt/Hooks.js +66 -0
  144. data/apps/core/components/public/js/tinymce/classes/fmt/Preview.js +151 -0
  145. data/apps/core/components/public/js/tinymce/classes/geom/ClientRect.js +136 -0
  146. data/apps/core/components/public/js/tinymce/classes/geom/Rect.js +214 -0
  147. data/apps/core/components/public/js/tinymce/classes/html/DomParser.js +822 -0
  148. data/apps/core/components/public/js/tinymce/classes/html/Entities.js +268 -0
  149. data/apps/core/components/public/js/tinymce/classes/html/Node.js +496 -0
  150. data/apps/core/components/public/js/tinymce/classes/html/SaxParser.js +474 -0
  151. data/apps/core/components/public/js/tinymce/classes/html/Schema.js +1004 -0
  152. data/apps/core/components/public/js/tinymce/classes/html/Serializer.js +158 -0
  153. data/apps/core/components/public/js/tinymce/classes/html/Styles.js +363 -0
  154. data/apps/core/components/public/js/tinymce/classes/html/Writer.js +199 -0
  155. data/apps/core/components/public/js/tinymce/classes/jquery.tinymce.js +377 -0
  156. data/apps/core/components/public/js/tinymce/classes/text/ExtendingChar.js +53 -0
  157. data/apps/core/components/public/js/tinymce/classes/text/Zwsp.js +36 -0
  158. data/apps/core/components/public/js/tinymce/classes/ui/AbsoluteLayout.js +63 -0
  159. data/apps/core/components/public/js/tinymce/classes/ui/BoxUtils.js +98 -0
  160. data/apps/core/components/public/js/tinymce/classes/ui/Button.js +199 -0
  161. data/apps/core/components/public/js/tinymce/classes/ui/ButtonGroup.js +62 -0
  162. data/apps/core/components/public/js/tinymce/classes/ui/Checkbox.js +162 -0
  163. data/apps/core/components/public/js/tinymce/classes/ui/ClassList.js +149 -0
  164. data/apps/core/components/public/js/tinymce/classes/ui/Collection.js +438 -0
  165. data/apps/core/components/public/js/tinymce/classes/ui/ColorBox.js +72 -0
  166. data/apps/core/components/public/js/tinymce/classes/ui/ColorButton.js +124 -0
  167. data/apps/core/components/public/js/tinymce/classes/ui/ColorPicker.js +206 -0
  168. data/apps/core/components/public/js/tinymce/classes/ui/ComboBox.js +306 -0
  169. data/apps/core/components/public/js/tinymce/classes/ui/Container.js +506 -0
  170. data/apps/core/components/public/js/tinymce/classes/ui/Control.js +1301 -0
  171. data/apps/core/components/public/js/tinymce/classes/ui/DomUtils.js +107 -0
  172. data/apps/core/components/public/js/tinymce/classes/ui/DragHelper.js +144 -0
  173. data/apps/core/components/public/js/tinymce/classes/ui/ElementPath.js +79 -0
  174. data/apps/core/components/public/js/tinymce/classes/ui/Factory.js +105 -0
  175. data/apps/core/components/public/js/tinymce/classes/ui/FieldSet.js +59 -0
  176. data/apps/core/components/public/js/tinymce/classes/ui/FilePicker.js +85 -0
  177. data/apps/core/components/public/js/tinymce/classes/ui/FitLayout.js +48 -0
  178. data/apps/core/components/public/js/tinymce/classes/ui/FlexLayout.js +246 -0
  179. data/apps/core/components/public/js/tinymce/classes/ui/FloatPanel.js +409 -0
  180. data/apps/core/components/public/js/tinymce/classes/ui/FlowLayout.js +46 -0
  181. data/apps/core/components/public/js/tinymce/classes/ui/Form.js +157 -0
  182. data/apps/core/components/public/js/tinymce/classes/ui/FormItem.js +56 -0
  183. data/apps/core/components/public/js/tinymce/classes/ui/FormatControls.js +535 -0
  184. data/apps/core/components/public/js/tinymce/classes/ui/GridLayout.js +233 -0
  185. data/apps/core/components/public/js/tinymce/classes/ui/Iframe.js +85 -0
  186. data/apps/core/components/public/js/tinymce/classes/ui/InfoBox.js +93 -0
  187. data/apps/core/components/public/js/tinymce/classes/ui/KeyboardNavigation.js +406 -0
  188. data/apps/core/components/public/js/tinymce/classes/ui/Label.js +144 -0
  189. data/apps/core/components/public/js/tinymce/classes/ui/Layout.js +120 -0
  190. data/apps/core/components/public/js/tinymce/classes/ui/ListBox.js +152 -0
  191. data/apps/core/components/public/js/tinymce/classes/ui/Menu.js +195 -0
  192. data/apps/core/components/public/js/tinymce/classes/ui/MenuBar.js +33 -0
  193. data/apps/core/components/public/js/tinymce/classes/ui/MenuButton.js +268 -0
  194. data/apps/core/components/public/js/tinymce/classes/ui/MenuItem.js +336 -0
  195. data/apps/core/components/public/js/tinymce/classes/ui/MessageBox.js +202 -0
  196. data/apps/core/components/public/js/tinymce/classes/ui/Movable.js +200 -0
  197. data/apps/core/components/public/js/tinymce/classes/ui/Notification.js +154 -0
  198. data/apps/core/components/public/js/tinymce/classes/ui/Panel.js +67 -0
  199. data/apps/core/components/public/js/tinymce/classes/ui/PanelButton.js +114 -0
  200. data/apps/core/components/public/js/tinymce/classes/ui/Path.js +127 -0
  201. data/apps/core/components/public/js/tinymce/classes/ui/Progress.js +81 -0
  202. data/apps/core/components/public/js/tinymce/classes/ui/Radio.js +29 -0
  203. data/apps/core/components/public/js/tinymce/classes/ui/ReflowQueue.js +79 -0
  204. data/apps/core/components/public/js/tinymce/classes/ui/Resizable.js +68 -0
  205. data/apps/core/components/public/js/tinymce/classes/ui/ResizeHandle.js +86 -0
  206. data/apps/core/components/public/js/tinymce/classes/ui/Scrollable.js +141 -0
  207. data/apps/core/components/public/js/tinymce/classes/ui/SelectBox.js +106 -0
  208. data/apps/core/components/public/js/tinymce/classes/ui/Selector.js +369 -0
  209. data/apps/core/components/public/js/tinymce/classes/ui/Slider.js +161 -0
  210. data/apps/core/components/public/js/tinymce/classes/ui/Spacer.js +39 -0
  211. data/apps/core/components/public/js/tinymce/classes/ui/SplitButton.js +146 -0
  212. data/apps/core/components/public/js/tinymce/classes/ui/StackLayout.js +34 -0
  213. data/apps/core/components/public/js/tinymce/classes/ui/TabPanel.js +178 -0
  214. data/apps/core/components/public/js/tinymce/classes/ui/TextBox.js +208 -0
  215. data/apps/core/components/public/js/tinymce/classes/ui/Throbber.js +88 -0
  216. data/apps/core/components/public/js/tinymce/classes/ui/Toolbar.js +56 -0
  217. data/apps/core/components/public/js/tinymce/classes/ui/Tooltip.js +73 -0
  218. data/apps/core/components/public/js/tinymce/classes/ui/Widget.js +151 -0
  219. data/apps/core/components/public/js/tinymce/classes/ui/Window.js +474 -0
  220. data/apps/core/components/public/js/tinymce/classes/util/Arr.js +153 -0
  221. data/apps/core/components/public/js/tinymce/classes/util/Class.js +167 -0
  222. data/apps/core/components/public/js/tinymce/classes/util/Color.js +235 -0
  223. data/apps/core/components/public/js/tinymce/classes/util/Delay.js +191 -0
  224. data/apps/core/components/public/js/tinymce/classes/util/EventDispatcher.js +294 -0
  225. data/apps/core/components/public/js/tinymce/classes/util/Fun.js +87 -0
  226. data/apps/core/components/public/js/tinymce/classes/util/I18n.js +116 -0
  227. data/apps/core/components/public/js/tinymce/classes/util/JSON.js +109 -0
  228. data/apps/core/components/public/js/tinymce/classes/util/JSONP.js +38 -0
  229. data/apps/core/components/public/js/tinymce/classes/util/JSONRequest.js +110 -0
  230. data/apps/core/components/public/js/tinymce/classes/util/LocalStorage.js +213 -0
  231. data/apps/core/components/public/js/tinymce/classes/util/Observable.js +129 -0
  232. data/apps/core/components/public/js/tinymce/classes/util/Promise.js +200 -0
  233. data/apps/core/components/public/js/tinymce/classes/util/Quirks.js +1701 -0
  234. data/apps/core/components/public/js/tinymce/classes/util/Tools.js +442 -0
  235. data/apps/core/components/public/js/tinymce/classes/util/URI.js +411 -0
  236. data/apps/core/components/public/js/tinymce/classes/util/VK.js +37 -0
  237. data/apps/core/components/public/js/tinymce/classes/util/XHR.js +110 -0
  238. data/apps/core/components/public/js/tinymce/jquery.tinymce.min.js +1 -0
  239. data/apps/core/components/public/js/tinymce/langs/it.js +219 -0
  240. data/apps/core/components/public/js/tinymce/langs/readme.md +3 -0
  241. data/apps/core/components/public/js/tinymce/license.txt +504 -0
  242. data/apps/core/components/public/js/tinymce/plugins/advlist/plugin.js +97 -0
  243. data/apps/core/components/public/js/tinymce/plugins/advlist/plugin.min.js +1 -0
  244. data/apps/core/components/public/js/tinymce/plugins/anchor/plugin.js +55 -0
  245. data/apps/core/components/public/js/tinymce/plugins/anchor/plugin.min.js +1 -0
  246. data/apps/core/components/public/js/tinymce/plugins/autolink/plugin.js +204 -0
  247. data/apps/core/components/public/js/tinymce/plugins/autolink/plugin.min.js +1 -0
  248. data/apps/core/components/public/js/tinymce/plugins/autoresize/plugin.js +162 -0
  249. data/apps/core/components/public/js/tinymce/plugins/autoresize/plugin.min.js +1 -0
  250. data/apps/core/components/public/js/tinymce/plugins/autosave/plugin.js +165 -0
  251. data/apps/core/components/public/js/tinymce/plugins/autosave/plugin.min.js +1 -0
  252. data/apps/core/components/public/js/tinymce/plugins/bbcode/plugin.js +123 -0
  253. data/apps/core/components/public/js/tinymce/plugins/bbcode/plugin.min.js +1 -0
  254. data/apps/core/components/public/js/tinymce/plugins/charmap/plugin.js +450 -0
  255. data/apps/core/components/public/js/tinymce/plugins/charmap/plugin.min.js +1 -0
  256. data/apps/core/components/public/js/tinymce/plugins/code/plugin.js +60 -0
  257. data/apps/core/components/public/js/tinymce/plugins/code/plugin.min.js +1 -0
  258. data/apps/core/components/public/js/tinymce/plugins/codesample/classes/Dialog.js +121 -0
  259. data/apps/core/components/public/js/tinymce/plugins/codesample/classes/Plugin.js +95 -0
  260. data/apps/core/components/public/js/tinymce/plugins/codesample/classes/Prism.js +937 -0
  261. data/apps/core/components/public/js/tinymce/plugins/codesample/classes/Utils.js +33 -0
  262. data/apps/core/components/public/js/tinymce/plugins/codesample/css/prism.css +138 -0
  263. data/apps/core/components/public/js/tinymce/plugins/codesample/plugin.dev.js +141 -0
  264. data/apps/core/components/public/js/tinymce/plugins/codesample/plugin.js +1299 -0
  265. data/apps/core/components/public/js/tinymce/plugins/codesample/plugin.min.js +1 -0
  266. data/apps/core/components/public/js/tinymce/plugins/colorpicker/plugin.js +112 -0
  267. data/apps/core/components/public/js/tinymce/plugins/colorpicker/plugin.min.js +1 -0
  268. data/apps/core/components/public/js/tinymce/plugins/compat3x/css/dialog.css +118 -0
  269. data/apps/core/components/public/js/tinymce/plugins/compat3x/img/buttons.png +0 -0
  270. data/apps/core/components/public/js/tinymce/plugins/compat3x/img/icons.gif +0 -0
  271. data/apps/core/components/public/js/tinymce/plugins/compat3x/img/items.gif +0 -0
  272. data/apps/core/components/public/js/tinymce/plugins/compat3x/img/menu_arrow.gif +0 -0
  273. data/apps/core/components/public/js/tinymce/plugins/compat3x/img/menu_check.gif +0 -0
  274. data/apps/core/components/public/js/tinymce/plugins/compat3x/img/progress.gif +0 -0
  275. data/apps/core/components/public/js/tinymce/plugins/compat3x/img/tabs.gif +0 -0
  276. data/apps/core/components/public/js/tinymce/plugins/compat3x/plugin.js +297 -0
  277. data/apps/core/components/public/js/tinymce/plugins/compat3x/plugin.min.js +1 -0
  278. data/apps/core/components/public/js/tinymce/plugins/compat3x/tiny_mce_popup.js +542 -0
  279. data/apps/core/components/public/js/tinymce/plugins/compat3x/utils/editable_selects.js +70 -0
  280. data/apps/core/components/public/js/tinymce/plugins/compat3x/utils/form_utils.js +210 -0
  281. data/apps/core/components/public/js/tinymce/plugins/compat3x/utils/mctabs.js +164 -0
  282. data/apps/core/components/public/js/tinymce/plugins/compat3x/utils/validate.js +252 -0
  283. data/apps/core/components/public/js/tinymce/plugins/contextmenu/plugin.js +88 -0
  284. data/apps/core/components/public/js/tinymce/plugins/contextmenu/plugin.min.js +1 -0
  285. data/apps/core/components/public/js/tinymce/plugins/directionality/plugin.js +64 -0
  286. data/apps/core/components/public/js/tinymce/plugins/directionality/plugin.min.js +1 -0
  287. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-cool.gif +0 -0
  288. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-cry.gif +0 -0
  289. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-embarassed.gif +0 -0
  290. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-foot-in-mouth.gif +0 -0
  291. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-frown.gif +0 -0
  292. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-innocent.gif +0 -0
  293. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-kiss.gif +0 -0
  294. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-laughing.gif +0 -0
  295. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-money-mouth.gif +0 -0
  296. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-sealed.gif +0 -0
  297. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-smile.gif +0 -0
  298. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-surprised.gif +0 -0
  299. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-tongue-out.gif +0 -0
  300. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-undecided.gif +0 -0
  301. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-wink.gif +0 -0
  302. data/apps/core/components/public/js/tinymce/plugins/emoticons/img/smiley-yell.gif +0 -0
  303. data/apps/core/components/public/js/tinymce/plugins/emoticons/plugin.js +65 -0
  304. data/apps/core/components/public/js/tinymce/plugins/emoticons/plugin.min.js +1 -0
  305. data/apps/core/components/public/js/tinymce/plugins/example/dialog.html +8 -0
  306. data/apps/core/components/public/js/tinymce/plugins/example/plugin.js +68 -0
  307. data/apps/core/components/public/js/tinymce/plugins/example/plugin.min.js +1 -0
  308. data/apps/core/components/public/js/tinymce/plugins/example_dependency/plugin.js +22 -0
  309. data/apps/core/components/public/js/tinymce/plugins/example_dependency/plugin.min.js +1 -0
  310. data/apps/core/components/public/js/tinymce/plugins/fullpage/plugin.js +490 -0
  311. data/apps/core/components/public/js/tinymce/plugins/fullpage/plugin.min.js +1 -0
  312. data/apps/core/components/public/js/tinymce/plugins/fullscreen/plugin.js +154 -0
  313. data/apps/core/components/public/js/tinymce/plugins/fullscreen/plugin.min.js +1 -0
  314. data/apps/core/components/public/js/tinymce/plugins/hr/plugin.js +30 -0
  315. data/apps/core/components/public/js/tinymce/plugins/hr/plugin.min.js +1 -0
  316. data/apps/core/components/public/js/tinymce/plugins/image/plugin.js +630 -0
  317. data/apps/core/components/public/js/tinymce/plugins/image/plugin.min.js +1 -0
  318. data/apps/core/components/public/js/tinymce/plugins/imagetools/config/bolt/atomic.js +6 -0
  319. data/apps/core/components/public/js/tinymce/plugins/imagetools/config/bolt/browser.js +6 -0
  320. data/apps/core/components/public/js/tinymce/plugins/imagetools/config/bolt/demo.js +8 -0
  321. data/apps/core/components/public/js/tinymce/plugins/imagetools/config/bolt/prod.js +6 -0
  322. data/apps/core/components/public/js/tinymce/plugins/imagetools/plugin.js +2668 -0
  323. data/apps/core/components/public/js/tinymce/plugins/imagetools/plugin.min.js +1 -0
  324. data/apps/core/components/public/js/tinymce/plugins/imagetools/src/demo/html/demo.html +16 -0
  325. data/apps/core/components/public/js/tinymce/plugins/imagetools/src/demo/js/Demo.js +92 -0
  326. data/apps/core/components/public/js/tinymce/plugins/imagetools/src/main/js/CropRect.js +214 -0
  327. data/apps/core/components/public/js/tinymce/plugins/imagetools/src/main/js/Dialog.js +485 -0
  328. data/apps/core/components/public/js/tinymce/plugins/imagetools/src/main/js/ImagePanel.js +218 -0
  329. data/apps/core/components/public/js/tinymce/plugins/imagetools/src/main/js/Plugin.js +411 -0
  330. data/apps/core/components/public/js/tinymce/plugins/imagetools/src/main/js/UndoStack.js +57 -0
  331. data/apps/core/components/public/js/tinymce/plugins/importcss/plugin.js +227 -0
  332. data/apps/core/components/public/js/tinymce/plugins/importcss/plugin.min.js +1 -0
  333. data/apps/core/components/public/js/tinymce/plugins/insertdatetime/plugin.js +121 -0
  334. data/apps/core/components/public/js/tinymce/plugins/insertdatetime/plugin.min.js +1 -0
  335. data/apps/core/components/public/js/tinymce/plugins/layer/plugin.js +225 -0
  336. data/apps/core/components/public/js/tinymce/plugins/layer/plugin.min.js +1 -0
  337. data/apps/core/components/public/js/tinymce/plugins/legacyoutput/plugin.js +211 -0
  338. data/apps/core/components/public/js/tinymce/plugins/legacyoutput/plugin.min.js +1 -0
  339. data/apps/core/components/public/js/tinymce/plugins/link/plugin.js +403 -0
  340. data/apps/core/components/public/js/tinymce/plugins/link/plugin.min.js +1 -0
  341. data/apps/core/components/public/js/tinymce/plugins/lists/plugin.js +885 -0
  342. data/apps/core/components/public/js/tinymce/plugins/lists/plugin.min.js +1 -0
  343. data/apps/core/components/public/js/tinymce/plugins/media/moxieplayer.swf +0 -0
  344. data/apps/core/components/public/js/tinymce/plugins/media/plugin.js +878 -0
  345. data/apps/core/components/public/js/tinymce/plugins/media/plugin.min.js +1 -0
  346. data/apps/core/components/public/js/tinymce/plugins/nonbreaking/plugin.js +53 -0
  347. data/apps/core/components/public/js/tinymce/plugins/nonbreaking/plugin.min.js +1 -0
  348. data/apps/core/components/public/js/tinymce/plugins/noneditable/plugin.js +101 -0
  349. data/apps/core/components/public/js/tinymce/plugins/noneditable/plugin.min.js +1 -0
  350. data/apps/core/components/public/js/tinymce/plugins/pagebreak/plugin.js +88 -0
  351. data/apps/core/components/public/js/tinymce/plugins/pagebreak/plugin.min.js +1 -0
  352. data/apps/core/components/public/js/tinymce/plugins/paste/classes/Clipboard.js +672 -0
  353. data/apps/core/components/public/js/tinymce/plugins/paste/classes/Plugin.js +121 -0
  354. data/apps/core/components/public/js/tinymce/plugins/paste/classes/Quirks.js +159 -0
  355. data/apps/core/components/public/js/tinymce/plugins/paste/classes/Utils.js +140 -0
  356. data/apps/core/components/public/js/tinymce/plugins/paste/classes/WordFilter.js +500 -0
  357. data/apps/core/components/public/js/tinymce/plugins/paste/plugin.dev.js +142 -0
  358. data/apps/core/components/public/js/tinymce/plugins/paste/plugin.js +1708 -0
  359. data/apps/core/components/public/js/tinymce/plugins/paste/plugin.min.js +1 -0
  360. data/apps/core/components/public/js/tinymce/plugins/preview/plugin.js +88 -0
  361. data/apps/core/components/public/js/tinymce/plugins/preview/plugin.min.js +1 -0
  362. data/apps/core/components/public/js/tinymce/plugins/print/plugin.js +32 -0
  363. data/apps/core/components/public/js/tinymce/plugins/print/plugin.min.js +1 -0
  364. data/apps/core/components/public/js/tinymce/plugins/save/plugin.js +98 -0
  365. data/apps/core/components/public/js/tinymce/plugins/save/plugin.min.js +1 -0
  366. data/apps/core/components/public/js/tinymce/plugins/searchreplace/plugin.js +609 -0
  367. data/apps/core/components/public/js/tinymce/plugins/searchreplace/plugin.min.js +1 -0
  368. data/apps/core/components/public/js/tinymce/plugins/spellchecker/classes/DomTextMatcher.js +480 -0
  369. data/apps/core/components/public/js/tinymce/plugins/spellchecker/classes/Plugin.js +439 -0
  370. data/apps/core/components/public/js/tinymce/plugins/spellchecker/plugin.dev.js +139 -0
  371. data/apps/core/components/public/js/tinymce/plugins/spellchecker/plugin.js +1026 -0
  372. data/apps/core/components/public/js/tinymce/plugins/spellchecker/plugin.min.js +1 -0
  373. data/apps/core/components/public/js/tinymce/plugins/tabfocus/plugin.js +120 -0
  374. data/apps/core/components/public/js/tinymce/plugins/tabfocus/plugin.min.js +1 -0
  375. data/apps/core/components/public/js/tinymce/plugins/table/classes/CellSelection.js +202 -0
  376. data/apps/core/components/public/js/tinymce/plugins/table/classes/Dialogs.js +824 -0
  377. data/apps/core/components/public/js/tinymce/plugins/table/classes/Plugin.js +599 -0
  378. data/apps/core/components/public/js/tinymce/plugins/table/classes/Quirks.js +400 -0
  379. data/apps/core/components/public/js/tinymce/plugins/table/classes/ResizeBars.js +984 -0
  380. data/apps/core/components/public/js/tinymce/plugins/table/classes/TableGrid.js +941 -0
  381. data/apps/core/components/public/js/tinymce/plugins/table/classes/Utils.js +36 -0
  382. data/apps/core/components/public/js/tinymce/plugins/table/plugin.dev.js +142 -0
  383. data/apps/core/components/public/js/tinymce/plugins/table/plugin.js +4106 -0
  384. data/apps/core/components/public/js/tinymce/plugins/table/plugin.min.js +2 -0
  385. data/apps/core/components/public/js/tinymce/plugins/template/plugin.js +270 -0
  386. data/apps/core/components/public/js/tinymce/plugins/template/plugin.min.js +1 -0
  387. data/apps/core/components/public/js/tinymce/plugins/textcolor/plugin.js +282 -0
  388. data/apps/core/components/public/js/tinymce/plugins/textcolor/plugin.min.js +1 -0
  389. data/apps/core/components/public/js/tinymce/plugins/textpattern/plugin.js +268 -0
  390. data/apps/core/components/public/js/tinymce/plugins/textpattern/plugin.min.js +1 -0
  391. data/apps/core/components/public/js/tinymce/plugins/visualblocks/css/visualblocks.css +135 -0
  392. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/address.gif +0 -0
  393. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/article.gif +0 -0
  394. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/aside.gif +0 -0
  395. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/blockquote.gif +0 -0
  396. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/div.gif +0 -0
  397. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/dl.gif +0 -0
  398. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/figure.gif +0 -0
  399. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/h1.gif +0 -0
  400. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/h2.gif +0 -0
  401. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/h3.gif +0 -0
  402. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/h4.gif +0 -0
  403. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/h5.gif +0 -0
  404. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/h6.gif +0 -0
  405. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/hgroup.gif +0 -0
  406. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/ol.gif +0 -0
  407. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/p.gif +0 -0
  408. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/pre.gif +0 -0
  409. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/section.gif +0 -0
  410. data/apps/core/components/public/js/tinymce/plugins/visualblocks/img/ul.gif +0 -0
  411. data/apps/core/components/public/js/tinymce/plugins/visualblocks/plugin.js +86 -0
  412. data/apps/core/components/public/js/tinymce/plugins/visualblocks/plugin.min.js +1 -0
  413. data/apps/core/components/public/js/tinymce/plugins/visualchars/plugin.js +123 -0
  414. data/apps/core/components/public/js/tinymce/plugins/visualchars/plugin.min.js +1 -0
  415. data/apps/core/components/public/js/tinymce/plugins/wordcount/plugin.js +69 -0
  416. data/apps/core/components/public/js/tinymce/plugins/wordcount/plugin.min.js +1 -0
  417. data/apps/core/components/public/js/tinymce/skins/lightgray/AbsoluteLayout.less +17 -0
  418. data/apps/core/components/public/js/tinymce/skins/lightgray/Animations.less +10 -0
  419. data/apps/core/components/public/js/tinymce/skins/lightgray/Button.less +172 -0
  420. data/apps/core/components/public/js/tinymce/skins/lightgray/ButtonGroup.less +71 -0
  421. data/apps/core/components/public/js/tinymce/skins/lightgray/Checkbox.less +49 -0
  422. data/apps/core/components/public/js/tinymce/skins/lightgray/ColorBox.less +6 -0
  423. data/apps/core/components/public/js/tinymce/skins/lightgray/ColorButton.less +72 -0
  424. data/apps/core/components/public/js/tinymce/skins/lightgray/ColorPicker.less +80 -0
  425. data/apps/core/components/public/js/tinymce/skins/lightgray/ComboBox.less +39 -0
  426. data/apps/core/components/public/js/tinymce/skins/lightgray/Container.less +9 -0
  427. data/apps/core/components/public/js/tinymce/skins/lightgray/Content.Inline.less +4 -0
  428. data/apps/core/components/public/js/tinymce/skins/lightgray/Content.Objects.less +166 -0
  429. data/apps/core/components/public/js/tinymce/skins/lightgray/Content.less +27 -0
  430. data/apps/core/components/public/js/tinymce/skins/lightgray/CropRect.less +54 -0
  431. data/apps/core/components/public/js/tinymce/skins/lightgray/FieldSet.less +15 -0
  432. data/apps/core/components/public/js/tinymce/skins/lightgray/FitLayout.less +9 -0
  433. data/apps/core/components/public/js/tinymce/skins/lightgray/FloatPanel.less +69 -0
  434. data/apps/core/components/public/js/tinymce/skins/lightgray/FlowLayout.less +36 -0
  435. data/apps/core/components/public/js/tinymce/skins/lightgray/Icons.Ie7.less +136 -0
  436. data/apps/core/components/public/js/tinymce/skins/lightgray/Icons.less +180 -0
  437. data/apps/core/components/public/js/tinymce/skins/lightgray/Iframe.less +6 -0
  438. data/apps/core/components/public/js/tinymce/skins/lightgray/ImagePanel.less +20 -0
  439. data/apps/core/components/public/js/tinymce/skins/lightgray/InfoBox.less +71 -0
  440. data/apps/core/components/public/js/tinymce/skins/lightgray/Label.less +38 -0
  441. data/apps/core/components/public/js/tinymce/skins/lightgray/ListBox.less +26 -0
  442. data/apps/core/components/public/js/tinymce/skins/lightgray/Menu.less +34 -0
  443. data/apps/core/components/public/js/tinymce/skins/lightgray/MenuBar.less +32 -0
  444. data/apps/core/components/public/js/tinymce/skins/lightgray/MenuButton.less +34 -0
  445. data/apps/core/components/public/js/tinymce/skins/lightgray/MenuItem.less +142 -0
  446. data/apps/core/components/public/js/tinymce/skins/lightgray/Mixins.less +54 -0
  447. data/apps/core/components/public/js/tinymce/skins/lightgray/Notification.less +144 -0
  448. data/apps/core/components/public/js/tinymce/skins/lightgray/Panel.less +7 -0
  449. data/apps/core/components/public/js/tinymce/skins/lightgray/Path.less +45 -0
  450. data/apps/core/components/public/js/tinymce/skins/lightgray/Progress.less +34 -0
  451. data/apps/core/components/public/js/tinymce/skins/lightgray/Radio.less +1 -0
  452. data/apps/core/components/public/js/tinymce/skins/lightgray/Reset.less +32 -0
  453. data/apps/core/components/public/js/tinymce/skins/lightgray/ResizeHandle.less +18 -0
  454. data/apps/core/components/public/js/tinymce/skins/lightgray/Scrollable.less +44 -0
  455. data/apps/core/components/public/js/tinymce/skins/lightgray/SelectBox.less +6 -0
  456. data/apps/core/components/public/js/tinymce/skins/lightgray/Slider.less +29 -0
  457. data/apps/core/components/public/js/tinymce/skins/lightgray/Spacer.less +5 -0
  458. data/apps/core/components/public/js/tinymce/skins/lightgray/SplitButton.less +49 -0
  459. data/apps/core/components/public/js/tinymce/skins/lightgray/StackLayout.less +5 -0
  460. data/apps/core/components/public/js/tinymce/skins/lightgray/TabPanel.less +44 -0
  461. data/apps/core/components/public/js/tinymce/skins/lightgray/TextBox.less +41 -0
  462. data/apps/core/components/public/js/tinymce/skins/lightgray/Throbber.less +19 -0
  463. data/apps/core/components/public/js/tinymce/skins/lightgray/TinyMCE.less +159 -0
  464. data/apps/core/components/public/js/tinymce/skins/lightgray/ToolTip.less +129 -0
  465. data/apps/core/components/public/js/tinymce/skins/lightgray/Variables.less +214 -0
  466. data/apps/core/components/public/js/tinymce/skins/lightgray/Window.less +127 -0
  467. data/apps/core/components/public/js/tinymce/skins/lightgray/content.inline.min.css +1 -0
  468. data/apps/core/components/public/js/tinymce/skins/lightgray/content.min.css +1 -0
  469. data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/readme.md +1 -0
  470. data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/tinymce-small.eot +0 -0
  471. data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/tinymce-small.json +1277 -0
  472. data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/tinymce-small.svg +63 -0
  473. data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/tinymce-small.ttf +0 -0
  474. data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/tinymce-small.woff +0 -0
  475. data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/tinymce.eot +0 -0
  476. data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/tinymce.json +3381 -0
  477. data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/tinymce.svg +129 -0
  478. data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/tinymce.ttf +0 -0
  479. data/apps/core/components/public/js/tinymce/skins/lightgray/fonts/tinymce.woff +0 -0
  480. data/apps/core/components/public/js/tinymce/skins/lightgray/img/anchor.gif +0 -0
  481. data/apps/core/components/public/js/tinymce/skins/lightgray/img/loader.gif +0 -0
  482. data/apps/core/components/public/js/tinymce/skins/lightgray/img/object.gif +0 -0
  483. data/apps/core/components/public/js/tinymce/skins/lightgray/img/trans.gif +0 -0
  484. data/apps/core/components/public/js/tinymce/skins/lightgray/skin.dev.less +46 -0
  485. data/apps/core/components/public/js/tinymce/skins/lightgray/skin.ie7.dev.less +46 -0
  486. data/apps/core/components/public/js/tinymce/skins/lightgray/skin.ie7.less +2542 -0
  487. data/apps/core/components/public/js/tinymce/skins/lightgray/skin.ie7.min.css +1 -0
  488. data/apps/core/components/public/js/tinymce/skins/lightgray/skin.less +2586 -0
  489. data/apps/core/components/public/js/tinymce/skins/lightgray/skin.min.css +1 -0
  490. data/apps/core/components/public/js/tinymce/themes/modern/theme.js +878 -0
  491. data/apps/core/components/public/js/tinymce/themes/modern/theme.min.js +1 -0
  492. data/apps/core/components/public/js/tinymce/tinymce.dev.js +286 -0
  493. data/apps/core/components/public/js/tinymce/tinymce.js +45811 -0
  494. data/apps/core/components/public/js/tinymce/tinymce.min.js +13 -0
  495. data/apps/core/forms/widgets/form/form.rb +3 -1
  496. data/apps/core/forms/widgets/form/form.shtml +1 -0
  497. data/apps/core/forms/widgets/inputs/search_select/search_select.rb +1 -1
  498. data/apps/core/forms/widgets/inputs/select/select.rb +1 -1
  499. data/apps/core/forms/widgets/inputs/select/select.shtml +0 -1
  500. data/apps/messenger/backends/sms/skebby.rb +1 -1
  501. data/apps/messenger/controllers/mixins/messenger_helper.rb +23 -5
  502. data/lib/spiderfw/config/options/spider.rb +1 -1
  503. data/lib/spiderfw/controller/mixins/visual.rb +2 -0
  504. data/lib/spiderfw/http/adapters/rack.rb +10 -5
  505. data/lib/spiderfw/http/http.rb +4 -2
  506. data/lib/spiderfw/model/base_model.rb +4 -4
  507. data/lib/spiderfw/model/mappers/db_mapper.rb +4 -2
  508. data/lib/spiderfw/model/storage/db/adapters/mysql.rb +2 -1
  509. data/lib/spiderfw/model/storage/db/db_storage.rb +4 -0
  510. data/lib/spiderfw/spider.rb +6 -0
  511. data/lib/spiderfw/templates/layout.rb +1 -1
  512. data/lib/spiderfw/utils/monkey/object.rb +3 -0
  513. data/spider.gemspec +6 -2
  514. metadata +539 -42
  515. data/blueprints/.DS_Store +0 -0
@@ -0,0 +1 @@
1
+ !function(a,b){"use strict";function c(a,b){for(var c,d=[],f=0;f<a.length;++f){if(c=g[a[f]]||e(a[f]),!c)throw"module definition dependecy not found: "+a[f];d.push(c)}b.apply(null,d)}function d(a,d,e){if("string"!=typeof a)throw"invalid module definition, module id must be defined and be a string";if(d===b)throw"invalid module definition, dependencies must be specified";if(e===b)throw"invalid module definition, definition function must be specified";c(d,function(){g[a]=e.apply(null,arguments)})}function e(b){for(var c=a,d=b.split(/[.\/]/),e=0;e<d.length;++e){if(!c[d[e]])return;c=c[d[e]]}return c}function f(c){var d,e,f,h,i;for(d=0;d<c.length;d++){e=a,f=c[d],h=f.split(/[.\/]/);for(var j=0;j<h.length-1;++j)e[h[j]]===b&&(e[h[j]]={}),e=e[h[j]];e[h[h.length-1]]=g[f]}if(a.AMDLC_TESTS){i=a.privateModules||{};for(f in g)i[f]=g[f];for(d=0;d<c.length;d++)delete i[c[d]];a.privateModules=i}}var g={};d("tinymce/spellcheckerplugin/DomTextMatcher",[],function(){function a(a){return a&&1==a.nodeType&&"false"===a.contentEditable}return function(b,c){function d(a,b){if(!a[0])throw"findAndReplaceDOMText cannot handle zero-length matches";return{start:a.index,end:a.index+a[0].length,text:a[0],data:b}}function e(b){var c;if(3===b.nodeType)return b.data;if(y[b.nodeName]&&!x[b.nodeName])return"";if(a(b))return"\n";if(c="",(x[b.nodeName]||z[b.nodeName])&&(c+="\n"),b=b.firstChild)do c+=e(b);while(b=b.nextSibling);return c}function f(b,c,d){var e,f,g,h,i,j=[],k=0,l=b,m=0;c=c.slice(0),c.sort(function(a,b){return a.start-b.start}),i=c.shift();a:for(;;){if((x[l.nodeName]||z[l.nodeName]||a(l))&&k++,3===l.nodeType&&(!f&&l.length+k>=i.end?(f=l,h=i.end-k):e&&j.push(l),!e&&l.length+k>i.start&&(e=l,g=i.start-k),k+=l.length),e&&f){if(l=d({startNode:e,startNodeIndex:g,endNode:f,endNodeIndex:h,innerNodes:j,match:i.text,matchIndex:m}),k-=f.length-h,e=null,f=null,j=[],i=c.shift(),m++,!i)break}else if(y[l.nodeName]&&!x[l.nodeName]||!l.firstChild){if(l.nextSibling){l=l.nextSibling;continue}}else if(!a(l)){l=l.firstChild;continue}for(;;){if(l.nextSibling){l=l.nextSibling;break}if(l.parentNode===b)break a;l=l.parentNode}}}function g(a){function b(b,c){var d=A[c];d.stencil||(d.stencil=a(d));var e=d.stencil.cloneNode(!1);return e.setAttribute("data-mce-index",c),b&&e.appendChild(B.doc.createTextNode(b)),e}return function(a){var c,d,e,f=a.startNode,g=a.endNode,h=a.matchIndex,i=B.doc;if(f===g){var j=f;e=j.parentNode,a.startNodeIndex>0&&(c=i.createTextNode(j.data.substring(0,a.startNodeIndex)),e.insertBefore(c,j));var k=b(a.match,h);return e.insertBefore(k,j),a.endNodeIndex<j.length&&(d=i.createTextNode(j.data.substring(a.endNodeIndex)),e.insertBefore(d,j)),j.parentNode.removeChild(j),k}c=i.createTextNode(f.data.substring(0,a.startNodeIndex)),d=i.createTextNode(g.data.substring(a.endNodeIndex));for(var l=b(f.data.substring(a.startNodeIndex),h),m=[],n=0,o=a.innerNodes.length;o>n;++n){var p=a.innerNodes[n],q=b(p.data,h);p.parentNode.replaceChild(q,p),m.push(q)}var r=b(g.data.substring(0,a.endNodeIndex),h);return e=f.parentNode,e.insertBefore(c,f),e.insertBefore(l,f),e.removeChild(f),e=g.parentNode,e.insertBefore(r,g),e.insertBefore(d,g),e.removeChild(g),r}}function h(a){var b=a.parentNode;b.insertBefore(a.firstChild,a),a.parentNode.removeChild(a)}function i(a){var c=b.getElementsByTagName("*"),d=[];a="number"==typeof a?""+a:null;for(var e=0;e<c.length;e++){var f=c[e],g=f.getAttribute("data-mce-index");null!==g&&g.length&&(g!==a&&null!==a||d.push(f))}return d}function j(a){for(var b=A.length;b--;)if(A[b]===a)return b;return-1}function k(a){var b=[];return l(function(c,d){a(c,d)&&b.push(c)}),A=b,this}function l(a){for(var b=0,c=A.length;c>b&&a(A[b],b)!==!1;b++);return this}function m(a){return A.length&&f(b,A,g(a)),this}function n(a,b){if(w&&a.global)for(;v=a.exec(w);)A.push(d(v,b));return this}function o(a){var b,c=i(a?j(a):null);for(b=c.length;b--;)h(c[b]);return this}function p(a){return A[a.getAttribute("data-mce-index")]}function q(a){return i(j(a))[0]}function r(a,b,c){return A.push({start:a,end:a+b,text:w.substr(a,b),data:c}),this}function s(a){var b=i(j(a)),d=c.dom.createRng();return d.setStartBefore(b[0]),d.setEndAfter(b[b.length-1]),d}function t(a,b){var d=s(a);return d.deleteContents(),b.length>0&&d.insertNode(c.dom.doc.createTextNode(b)),d}function u(){return A.splice(0,A.length),o(),this}var v,w,x,y,z,A=[],B=c.dom;return x=c.schema.getBlockElements(),y=c.schema.getWhiteSpaceElements(),z=c.schema.getShortEndedElements(),w=e(b),{text:w,matches:A,each:l,filter:k,reset:u,matchFromElement:p,elementFromMatch:q,find:n,add:r,wrap:m,unwrap:o,replace:t,rangeFromMatch:s,indexOf:j}}}),d("tinymce/spellcheckerplugin/Plugin",["tinymce/spellcheckerplugin/DomTextMatcher","tinymce/PluginManager","tinymce/util/Tools","tinymce/ui/Menu","tinymce/dom/DOMUtils","tinymce/util/XHR","tinymce/util/URI","tinymce/util/JSON"],function(a,b,c,d,e,f,g,h){b.add("spellchecker",function(b,i){function j(){return E.textMatcher||(E.textMatcher=new a(b.getBody(),b)),E.textMatcher}function k(a,b){var d=[];return c.each(b,function(a){d.push({selectable:!0,text:a.name,data:a.value})}),d}function l(a){for(var b in a)return!1;return!0}function m(a,f){var g=[],h=A[a];c.each(h,function(a){g.push({text:a,onclick:function(){b.insertContent(b.dom.encode(a)),b.dom.remove(f),r()}})}),g.push({text:"-"}),D&&g.push({text:"Add to Dictionary",onclick:function(){s(a,f)}}),g.push.apply(g,[{text:"Ignore",onclick:function(){t(a,f)}},{text:"Ignore all",onclick:function(){t(a,f,!0)}}]),C=new d({items:g,context:"contextmenu",onautohide:function(a){-1!=a.target.className.indexOf("spellchecker")&&a.preventDefault()},onhide:function(){C.remove(),C=null}}),C.renderTo(document.body);var i=e.DOM.getPos(b.getContentAreaContainer()),j=b.dom.getPos(f[0]),k=b.dom.getRoot();"BODY"==k.nodeName?(j.x-=k.ownerDocument.documentElement.scrollLeft||k.scrollLeft,j.y-=k.ownerDocument.documentElement.scrollTop||k.scrollTop):(j.x-=k.scrollLeft,j.y-=k.scrollTop),i.x+=j.x,i.y+=j.y,C.moveTo(i.x,i.y+f[0].offsetHeight)}function n(){return b.getParam("spellchecker_wordchar_pattern")||new RegExp('[^\\s!"#$%&()*+,-./:;<=>?@[\\]^_{|}`\xa7\xa9\xab\xae\xb1\xb6\xb7\xb8\xbb\xbc\xbd\xbe\xbf\xd7\xf7\xa4\u201d\u201c\u201e\xa0\u2002\u2003\u2009]+',"g")}function o(a,d,e,j){var k={method:a},l="";"spellcheck"==a&&(k.text=d,k.lang=F.spellchecker_language),"addToDictionary"==a&&(k.word=d),c.each(k,function(a,b){l&&(l+="&"),l+=b+"="+encodeURIComponent(a)}),f.send({url:new g(i).toAbsolute(F.spellchecker_rpc_url),type:"post",content_type:"application/x-www-form-urlencoded",data:l,success:function(a){if(a=h.parse(a))a.error?j(a.error):e(a);else{var c=b.translate("Server response wasn't proper JSON.");j(c)}},error:function(){var a=b.translate("The spelling service was not found: (")+F.spellchecker_rpc_url+b.translate(")");j(a)}})}function p(a,b,c,d){var e=F.spellchecker_callback||o;e.call(E,a,b,c,d)}function q(){function a(a){b.notificationManager.open({text:a,type:"error"}),b.setProgressState(!1),u()}u()||(b.setProgressState(!0),p("spellcheck",j().text,y,a),b.focus())}function r(){b.dom.select("span.mce-spellchecker-word").length||u()}function s(a,c){b.setProgressState(!0),p("addToDictionary",a,function(){b.setProgressState(!1),b.dom.remove(c,!0),r()},function(a){b.notificationManager.open({text:a,type:"error"}),b.setProgressState(!1)})}function t(a,d,e){b.selection.collapse(),e?c.each(b.dom.select("span.mce-spellchecker-word"),function(c){c.getAttribute("data-mce-word")==a&&b.dom.remove(c,!0)}):b.dom.remove(d,!0),r()}function u(){return j().reset(),E.textMatcher=null,B?(B=!1,b.fire("SpellcheckEnd"),!0):void 0}function v(a){var b=a.getAttribute("data-mce-index");return"number"==typeof b?""+b:b}function w(a){var d,e=[];if(d=c.toArray(b.getBody().getElementsByTagName("span")),d.length)for(var f=0;f<d.length;f++){var g=v(d[f]);null!==g&&g.length&&g===a.toString()&&e.push(d[f])}return e}function x(a){var b=F.spellchecker_language;a.control.items().each(function(a){a.active(a.settings.data===b)})}function y(a){var c;if(a.words?(D=!!a.dictionary,c=a.words):c=a,b.setProgressState(!1),l(c)){var d=b.translate("No misspellings found.");return b.notificationManager.open({text:d,type:"info"}),void(B=!1)}A=c,j().find(n()).filter(function(a){return!!c[a.text]}).wrap(function(a){return b.dom.create("span",{"class":"mce-spellchecker-word","data-mce-bogus":1,"data-mce-word":a.text})}),B=!0,b.fire("SpellcheckStart")}var z,A,B,C,D,E=this,F=b.settings,G=F.spellchecker_languages||"English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr_FR,German=de,Italian=it,Polish=pl,Portuguese=pt_BR,Spanish=es,Swedish=sv";z=k("Language",c.map(G.split(","),function(a){return a=a.split("="),{name:a[0],value:a[1]}})),b.on("click",function(a){var c=a.target;if("mce-spellchecker-word"==c.className){a.preventDefault();var d=w(v(c));if(d.length>0){var e=b.dom.createRng();e.setStartBefore(d[0]),e.setEndAfter(d[d.length-1]),b.selection.setRng(e),m(c.getAttribute("data-mce-word"),d)}}}),b.addMenuItem("spellchecker",{text:"Spellcheck",context:"tools",onclick:q,selectable:!0,onPostRender:function(){var a=this;a.active(B),b.on("SpellcheckStart SpellcheckEnd",function(){a.active(B)})}});var H={tooltip:"Spellcheck",onclick:q,onPostRender:function(){var a=this;b.on("SpellcheckStart SpellcheckEnd",function(){a.active(B)})}};z.length>1&&(H.type="splitbutton",H.menu=z,H.onshow=x,H.onselect=function(a){F.spellchecker_language=a.control.settings.data}),b.addButton("spellchecker",H),b.addCommand("mceSpellCheck",q),b.on("remove",function(){C&&(C.remove(),C=null)}),b.on("change",r),this.getTextMatcher=j,this.getWordCharPattern=n,this.markErrors=y,this.getLanguage=function(){return F.spellchecker_language},F.spellchecker_language=F.spellchecker_language||F.language||"en"})}),f(["tinymce/spellcheckerplugin/DomTextMatcher"])}(this);
@@ -0,0 +1,120 @@
1
+ /**
2
+ * plugin.js
3
+ *
4
+ * Released under LGPL License.
5
+ * Copyright (c) 1999-2015 Ephox Corp. All rights reserved
6
+ *
7
+ * License: http://www.tinymce.com/license
8
+ * Contributing: http://www.tinymce.com/contributing
9
+ */
10
+
11
+ /*global tinymce:true */
12
+
13
+ tinymce.PluginManager.add('tabfocus', function(editor) {
14
+ var DOM = tinymce.DOM, each = tinymce.each, explode = tinymce.explode;
15
+
16
+ function tabCancel(e) {
17
+ if (e.keyCode === 9 && !e.ctrlKey && !e.altKey && !e.metaKey) {
18
+ e.preventDefault();
19
+ }
20
+ }
21
+
22
+ function tabHandler(e) {
23
+ var x, el, v, i;
24
+
25
+ if (e.keyCode !== 9 || e.ctrlKey || e.altKey || e.metaKey || e.isDefaultPrevented()) {
26
+ return;
27
+ }
28
+
29
+ function find(direction) {
30
+ el = DOM.select(':input:enabled,*[tabindex]:not(iframe)');
31
+
32
+ function canSelectRecursive(e) {
33
+ return e.nodeName === "BODY" || (e.type != 'hidden' &&
34
+ e.style.display != "none" &&
35
+ e.style.visibility != "hidden" && canSelectRecursive(e.parentNode));
36
+ }
37
+
38
+ function canSelect(el) {
39
+ return /INPUT|TEXTAREA|BUTTON/.test(el.tagName) && tinymce.get(e.id) && el.tabIndex != -1 && canSelectRecursive(el);
40
+ }
41
+
42
+ each(el, function(e, i) {
43
+ if (e.id == editor.id) {
44
+ x = i;
45
+ return false;
46
+ }
47
+ });
48
+ if (direction > 0) {
49
+ for (i = x + 1; i < el.length; i++) {
50
+ if (canSelect(el[i])) {
51
+ return el[i];
52
+ }
53
+ }
54
+ } else {
55
+ for (i = x - 1; i >= 0; i--) {
56
+ if (canSelect(el[i])) {
57
+ return el[i];
58
+ }
59
+ }
60
+ }
61
+
62
+ return null;
63
+ }
64
+
65
+ v = explode(editor.getParam('tab_focus', editor.getParam('tabfocus_elements', ':prev,:next')));
66
+
67
+ if (v.length == 1) {
68
+ v[1] = v[0];
69
+ v[0] = ':prev';
70
+ }
71
+
72
+ // Find element to focus
73
+ if (e.shiftKey) {
74
+ if (v[0] == ':prev') {
75
+ el = find(-1);
76
+ } else {
77
+ el = DOM.get(v[0]);
78
+ }
79
+ } else {
80
+ if (v[1] == ':next') {
81
+ el = find(1);
82
+ } else {
83
+ el = DOM.get(v[1]);
84
+ }
85
+ }
86
+
87
+ if (el) {
88
+ var focusEditor = tinymce.get(el.id || el.name);
89
+
90
+ if (el.id && focusEditor) {
91
+ focusEditor.focus();
92
+ } else {
93
+ tinymce.util.Delay.setTimeout(function() {
94
+ if (!tinymce.Env.webkit) {
95
+ window.focus();
96
+ }
97
+
98
+ el.focus();
99
+ }, 10);
100
+ }
101
+
102
+ e.preventDefault();
103
+ }
104
+ }
105
+
106
+ editor.on('init', function() {
107
+ if (editor.inline) {
108
+ // Remove default tabIndex in inline mode
109
+ tinymce.DOM.setAttrib(editor.getBody(), 'tabIndex', null);
110
+ }
111
+
112
+ editor.on('keyup', tabCancel);
113
+
114
+ if (tinymce.Env.gecko) {
115
+ editor.on('keypress keydown', tabHandler);
116
+ } else {
117
+ editor.on('keydown', tabHandler);
118
+ }
119
+ });
120
+ });
@@ -0,0 +1 @@
1
+ tinymce.PluginManager.add("tabfocus",function(a){function b(a){9!==a.keyCode||a.ctrlKey||a.altKey||a.metaKey||a.preventDefault()}function c(b){function c(c){function f(a){return"BODY"===a.nodeName||"hidden"!=a.type&&"none"!=a.style.display&&"hidden"!=a.style.visibility&&f(a.parentNode)}function i(a){return/INPUT|TEXTAREA|BUTTON/.test(a.tagName)&&tinymce.get(b.id)&&-1!=a.tabIndex&&f(a)}if(h=d.select(":input:enabled,*[tabindex]:not(iframe)"),e(h,function(b,c){return b.id==a.id?(g=c,!1):void 0}),c>0){for(j=g+1;j<h.length;j++)if(i(h[j]))return h[j]}else for(j=g-1;j>=0;j--)if(i(h[j]))return h[j];return null}var g,h,i,j;if(!(9!==b.keyCode||b.ctrlKey||b.altKey||b.metaKey||b.isDefaultPrevented())&&(i=f(a.getParam("tab_focus",a.getParam("tabfocus_elements",":prev,:next"))),1==i.length&&(i[1]=i[0],i[0]=":prev"),h=b.shiftKey?":prev"==i[0]?c(-1):d.get(i[0]):":next"==i[1]?c(1):d.get(i[1]))){var k=tinymce.get(h.id||h.name);h.id&&k?k.focus():tinymce.util.Delay.setTimeout(function(){tinymce.Env.webkit||window.focus(),h.focus()},10),b.preventDefault()}}var d=tinymce.DOM,e=tinymce.each,f=tinymce.explode;a.on("init",function(){a.inline&&tinymce.DOM.setAttrib(a.getBody(),"tabIndex",null),a.on("keyup",b),tinymce.Env.gecko?a.on("keypress keydown",c):a.on("keydown",c)})});
@@ -0,0 +1,202 @@
1
+ /**
2
+ * CellSelection.js
3
+ *
4
+ * Released under LGPL License.
5
+ * Copyright (c) 1999-2015 Ephox Corp. All rights reserved
6
+ *
7
+ * License: http://www.tinymce.com/license
8
+ * Contributing: http://www.tinymce.com/contributing
9
+ */
10
+
11
+ /**
12
+ * This class handles table cell selection by faking it using a css class that gets applied
13
+ * to cells when dragging the mouse from one cell to another.
14
+ *
15
+ * @class tinymce.tableplugin.CellSelection
16
+ * @private
17
+ */
18
+ define("tinymce/tableplugin/CellSelection", [
19
+ "tinymce/tableplugin/TableGrid",
20
+ "tinymce/dom/TreeWalker",
21
+ "tinymce/util/Tools"
22
+ ], function(TableGrid, TreeWalker, Tools) {
23
+ return function(editor) {
24
+ var dom = editor.dom, tableGrid, startCell, startTable, lastMouseOverTarget, hasCellSelection = true, resizing;
25
+
26
+ function clear(force) {
27
+ // Restore selection possibilities
28
+ editor.getBody().style.webkitUserSelect = '';
29
+
30
+ if (force || hasCellSelection) {
31
+ editor.$('td[data-mce-selected],th[data-mce-selected]').removeAttr('data-mce-selected');
32
+ hasCellSelection = false;
33
+ }
34
+ }
35
+
36
+ function isCellInTable(table, cell) {
37
+ if (!table || !cell) {
38
+ return false;
39
+ }
40
+
41
+ return table === dom.getParent(cell, 'table');
42
+ }
43
+
44
+ function cellSelectionHandler(e) {
45
+ var sel, target = e.target, currentCell;
46
+
47
+ if (resizing) {
48
+ return;
49
+ }
50
+
51
+ // Fake mouse enter by keeping track of last mouse over
52
+ if (target === lastMouseOverTarget) {
53
+ return;
54
+ }
55
+
56
+ lastMouseOverTarget = target;
57
+
58
+ if (startTable && startCell) {
59
+ currentCell = dom.getParent(target, 'td,th');
60
+
61
+ if (!isCellInTable(startTable, currentCell)) {
62
+ currentCell = dom.getParent(startTable, 'td,th');
63
+ }
64
+
65
+ // Selection inside first cell is normal until we have expanted
66
+ if (startCell === currentCell && !hasCellSelection) {
67
+ return;
68
+ }
69
+
70
+ if (isCellInTable(startTable, currentCell)) {
71
+ e.preventDefault();
72
+
73
+ if (!tableGrid) {
74
+ tableGrid = new TableGrid(editor, startTable, startCell);
75
+ editor.getBody().style.webkitUserSelect = 'none';
76
+ }
77
+
78
+ tableGrid.setEndCell(currentCell);
79
+ hasCellSelection = true;
80
+
81
+ // Remove current selection
82
+ sel = editor.selection.getSel();
83
+
84
+ try {
85
+ if (sel.removeAllRanges) {
86
+ sel.removeAllRanges();
87
+ } else {
88
+ sel.empty();
89
+ }
90
+ } catch (ex) {
91
+ // IE9 might throw errors here
92
+ }
93
+ }
94
+ }
95
+ }
96
+
97
+ editor.on('SelectionChange', function(e) {
98
+ if (hasCellSelection) {
99
+ e.stopImmediatePropagation();
100
+ }
101
+ }, true);
102
+
103
+ // Add cell selection logic
104
+ editor.on('MouseDown', function(e) {
105
+ if (e.button != 2 && !resizing) {
106
+ clear();
107
+
108
+ startCell = dom.getParent(e.target, 'td,th');
109
+ startTable = dom.getParent(startCell, 'table');
110
+ }
111
+ });
112
+
113
+ editor.on('mouseover', cellSelectionHandler);
114
+
115
+ editor.on('remove', function() {
116
+ dom.unbind(editor.getDoc(), 'mouseover', cellSelectionHandler);
117
+ clear();
118
+ });
119
+
120
+ editor.on('MouseUp', function() {
121
+ var rng, sel = editor.selection, selectedCells, walker, node, lastNode;
122
+
123
+ function setPoint(node, start) {
124
+ var walker = new TreeWalker(node, node);
125
+
126
+ do {
127
+ // Text node
128
+ if (node.nodeType == 3 && Tools.trim(node.nodeValue).length !== 0) {
129
+ if (start) {
130
+ rng.setStart(node, 0);
131
+ } else {
132
+ rng.setEnd(node, node.nodeValue.length);
133
+ }
134
+
135
+ return;
136
+ }
137
+
138
+ // BR element
139
+ if (node.nodeName == 'BR') {
140
+ if (start) {
141
+ rng.setStartBefore(node);
142
+ } else {
143
+ rng.setEndBefore(node);
144
+ }
145
+
146
+ return;
147
+ }
148
+ } while ((node = (start ? walker.next() : walker.prev())));
149
+ }
150
+
151
+ // Move selection to startCell
152
+ if (startCell) {
153
+ if (tableGrid) {
154
+ editor.getBody().style.webkitUserSelect = '';
155
+ }
156
+
157
+ // Try to expand text selection as much as we can only Gecko supports cell selection
158
+ selectedCells = dom.select('td[data-mce-selected],th[data-mce-selected]');
159
+ if (selectedCells.length > 0) {
160
+ rng = dom.createRng();
161
+ node = selectedCells[0];
162
+ rng.setStartBefore(node);
163
+ rng.setEndAfter(node);
164
+
165
+ setPoint(node, 1);
166
+ walker = new TreeWalker(node, dom.getParent(selectedCells[0], 'table'));
167
+
168
+ do {
169
+ if (node.nodeName == 'TD' || node.nodeName == 'TH') {
170
+ if (!dom.getAttrib(node, 'data-mce-selected')) {
171
+ break;
172
+ }
173
+
174
+ lastNode = node;
175
+ }
176
+ } while ((node = walker.next()));
177
+
178
+ setPoint(lastNode);
179
+
180
+ sel.setRng(rng);
181
+ }
182
+
183
+ editor.nodeChanged();
184
+ startCell = tableGrid = startTable = lastMouseOverTarget = null;
185
+ }
186
+ });
187
+
188
+ editor.on('KeyUp Drop SetContent', function(e) {
189
+ clear(e.type == 'setcontent');
190
+ startCell = tableGrid = startTable = lastMouseOverTarget = null;
191
+ resizing = false;
192
+ });
193
+
194
+ editor.on('ObjectResizeStart ObjectResized', function(e) {
195
+ resizing = e.type != 'objectresized';
196
+ });
197
+
198
+ return {
199
+ clear: clear
200
+ };
201
+ };
202
+ });
@@ -0,0 +1,824 @@
1
+ /**
2
+ * Dialogs.js
3
+ *
4
+ * Released under LGPL License.
5
+ * Copyright (c) 1999-2015 Ephox Corp. All rights reserved
6
+ *
7
+ * License: http://www.tinymce.com/license
8
+ * Contributing: http://www.tinymce.com/contributing
9
+ */
10
+
11
+ /*eslint dot-notation:0*/
12
+
13
+ /**
14
+ * ...
15
+ *
16
+ * @class tinymce.tableplugin.Dialogs
17
+ * @private
18
+ */
19
+ define("tinymce/tableplugin/Dialogs", [
20
+ "tinymce/util/Tools",
21
+ "tinymce/Env"
22
+ ], function(Tools, Env) {
23
+ var each = Tools.each;
24
+
25
+ return function(editor) {
26
+ var self = this;
27
+
28
+ function createColorPickAction() {
29
+ var colorPickerCallback = editor.settings.color_picker_callback;
30
+
31
+ if (colorPickerCallback) {
32
+ return function() {
33
+ var self = this;
34
+
35
+ colorPickerCallback.call(
36
+ editor,
37
+ function(value) {
38
+ self.value(value).fire('change');
39
+ },
40
+ self.value()
41
+ );
42
+ };
43
+ }
44
+ }
45
+
46
+ function createStyleForm(dom) {
47
+ return {
48
+ title: 'Advanced',
49
+ type: 'form',
50
+ defaults: {
51
+ onchange: function() {
52
+ updateStyle(dom, this.parents().reverse()[0], this.name() == "style");
53
+ }
54
+ },
55
+ items: [
56
+ {
57
+ label: 'Style',
58
+ name: 'style',
59
+ type: 'textbox'
60
+ },
61
+
62
+ {
63
+ type: 'form',
64
+ padding: 0,
65
+ formItemDefaults: {
66
+ layout: 'grid',
67
+ alignH: ['start', 'right']
68
+ },
69
+ defaults: {
70
+ size: 7
71
+ },
72
+ items: [
73
+ {
74
+ label: 'Border color',
75
+ type: 'colorbox',
76
+ name: 'borderColor',
77
+ onaction: createColorPickAction()
78
+ },
79
+
80
+ {
81
+ label: 'Background color',
82
+ type: 'colorbox',
83
+ name: 'backgroundColor',
84
+ onaction: createColorPickAction()
85
+ }
86
+ ]
87
+ }
88
+ ]
89
+ };
90
+ }
91
+
92
+ function removePxSuffix(size) {
93
+ return size ? size.replace(/px$/, '') : "";
94
+ }
95
+
96
+ function addSizeSuffix(size) {
97
+ if (/^[0-9]+$/.test(size)) {
98
+ size += "px";
99
+ }
100
+
101
+ return size;
102
+ }
103
+
104
+ function unApplyAlign(elm) {
105
+ each('left center right'.split(' '), function(name) {
106
+ editor.formatter.remove('align' + name, {}, elm);
107
+ });
108
+ }
109
+
110
+ function unApplyVAlign(elm) {
111
+ each('top middle bottom'.split(' '), function(name) {
112
+ editor.formatter.remove('valign' + name, {}, elm);
113
+ });
114
+ }
115
+
116
+ function buildListItems(inputList, itemCallback, startItems) {
117
+ function appendItems(values, output) {
118
+ output = output || [];
119
+
120
+ Tools.each(values, function(item) {
121
+ var menuItem = {text: item.text || item.title};
122
+
123
+ if (item.menu) {
124
+ menuItem.menu = appendItems(item.menu);
125
+ } else {
126
+ menuItem.value = item.value;
127
+
128
+ if (itemCallback) {
129
+ itemCallback(menuItem);
130
+ }
131
+ }
132
+
133
+ output.push(menuItem);
134
+ });
135
+
136
+ return output;
137
+ }
138
+
139
+ return appendItems(inputList, startItems || []);
140
+ }
141
+
142
+ function updateStyle(dom, win, isStyleCtrl) {
143
+ var data = win.toJSON();
144
+ var css = dom.parseStyle(data.style);
145
+
146
+ if (isStyleCtrl) {
147
+ win.find('#borderColor').value(css["border-color"] || '')[0].fire('change');
148
+ win.find('#backgroundColor').value(css["background-color"] || '')[0].fire('change');
149
+ } else {
150
+ css["border-color"] = data.borderColor;
151
+ css["background-color"] = data.backgroundColor;
152
+ }
153
+
154
+ win.find('#style').value(dom.serializeStyle(dom.parseStyle(dom.serializeStyle(css))));
155
+ }
156
+
157
+ function appendStylesToData(dom, data, elm) {
158
+ var css = dom.parseStyle(dom.getAttrib(elm, 'style'));
159
+
160
+ if (css["border-color"]) {
161
+ data.borderColor = css["border-color"];
162
+ }
163
+
164
+ if (css["background-color"]) {
165
+ data.backgroundColor = css["background-color"];
166
+ }
167
+
168
+ data.style = dom.serializeStyle(css);
169
+ }
170
+
171
+ function mergeStyles(dom, elm, styles) {
172
+ var css = dom.parseStyle(dom.getAttrib(elm, 'style'));
173
+
174
+ each(styles, function(style) {
175
+ css[style.name] = style.value;
176
+ });
177
+
178
+ dom.setAttrib(elm, 'style', dom.serializeStyle(dom.parseStyle(dom.serializeStyle(css))));
179
+ }
180
+
181
+ self.tableProps = function() {
182
+ self.table(true);
183
+ };
184
+
185
+ self.table = function(isProps) {
186
+ var dom = editor.dom, tableElm, colsCtrl, rowsCtrl, classListCtrl, data = {}, generalTableForm, stylesToMerge;
187
+
188
+ function onSubmitTableForm() {
189
+
190
+ //Explore the layers of the table till we find the first layer of tds or ths
191
+ function styleTDTH(elm, name, value) {
192
+ if (elm.tagName === "TD" || elm.tagName === "TH") {
193
+ dom.setStyle(elm, name, value);
194
+ } else {
195
+ if (elm.children) {
196
+ for (var i = 0; i < elm.children.length; i++) {
197
+ styleTDTH(elm.children[i], name, value);
198
+ }
199
+ }
200
+ }
201
+ }
202
+
203
+ var captionElm;
204
+
205
+ updateStyle(dom, this);
206
+ data = Tools.extend(data, this.toJSON());
207
+
208
+ if (data["class"] === false) {
209
+ delete data["class"];
210
+ }
211
+
212
+ editor.undoManager.transact(function() {
213
+ if (!tableElm) {
214
+ tableElm = editor.plugins.table.insertTable(data.cols || 1, data.rows || 1);
215
+ }
216
+
217
+ editor.dom.setAttribs(tableElm, {
218
+ style: data.style,
219
+ 'class': data['class']
220
+ });
221
+
222
+ if (editor.settings.table_style_by_css) {
223
+ stylesToMerge = [];
224
+ stylesToMerge.push({name: 'border', value: data.border});
225
+ stylesToMerge.push({name: 'border-spacing', value: addSizeSuffix(data.cellspacing)});
226
+ mergeStyles(dom, tableElm, stylesToMerge);
227
+ dom.setAttribs(tableElm, {
228
+ 'data-mce-border-color': data.borderColor,
229
+ 'data-mce-cell-padding': data.cellpadding,
230
+ 'data-mce-border': data.border
231
+ });
232
+ if (tableElm.children) {
233
+ for (var i = 0; i < tableElm.children.length; i++) {
234
+ styleTDTH(tableElm.children[i], 'border', data.border);
235
+ styleTDTH(tableElm.children[i], 'padding', addSizeSuffix(data.cellpadding));
236
+ }
237
+ }
238
+ } else {
239
+ editor.dom.setAttribs(tableElm, {
240
+ border: data.border,
241
+ cellpadding: data.cellpadding,
242
+ cellspacing: data.cellspacing
243
+ });
244
+ }
245
+
246
+ if (dom.getAttrib(tableElm, 'width') && !editor.settings.table_style_by_css) {
247
+ dom.setAttrib(tableElm, 'width', removePxSuffix(data.width));
248
+ } else {
249
+ dom.setStyle(tableElm, 'width', addSizeSuffix(data.width));
250
+ }
251
+
252
+ dom.setStyle(tableElm, 'height', addSizeSuffix(data.height));
253
+
254
+ // Toggle caption on/off
255
+ captionElm = dom.select('caption', tableElm)[0];
256
+
257
+ if (captionElm && !data.caption) {
258
+ dom.remove(captionElm);
259
+ }
260
+
261
+ if (!captionElm && data.caption) {
262
+ captionElm = dom.create('caption');
263
+ captionElm.innerHTML = !Env.ie ? '<br data-mce-bogus="1"/>' : '\u00a0';
264
+ tableElm.insertBefore(captionElm, tableElm.firstChild);
265
+ }
266
+ unApplyAlign(tableElm);
267
+ if (data.align) {
268
+ editor.formatter.apply('align' + data.align, {}, tableElm);
269
+ }
270
+
271
+ editor.focus();
272
+ editor.addVisual();
273
+ });
274
+ }
275
+
276
+ function getTDTHOverallStyle(elm, name) {
277
+ var cells = editor.dom.select("td,th", elm), firstChildStyle;
278
+
279
+ function checkChildren(firstChildStyle, elms) {
280
+
281
+ for (var i = 0; i < elms.length; i++) {
282
+ var currentStyle = dom.getStyle(elms[i], name);
283
+ if (typeof firstChildStyle === "undefined") {
284
+ firstChildStyle = currentStyle;
285
+ }
286
+ if (firstChildStyle != currentStyle) {
287
+ return "";
288
+ }
289
+ }
290
+
291
+ return firstChildStyle;
292
+
293
+ }
294
+
295
+ firstChildStyle = checkChildren(firstChildStyle, cells);
296
+
297
+ return firstChildStyle;
298
+ }
299
+
300
+ if (isProps === true) {
301
+ tableElm = dom.getParent(editor.selection.getStart(), 'table');
302
+
303
+ if (tableElm) {
304
+ data = {
305
+ width: removePxSuffix(dom.getStyle(tableElm, 'width') || dom.getAttrib(tableElm, 'width')),
306
+ height: removePxSuffix(dom.getStyle(tableElm, 'height') || dom.getAttrib(tableElm, 'height')),
307
+ cellspacing: removePxSuffix(dom.getStyle(tableElm, 'border-spacing') ||
308
+ dom.getAttrib(tableElm, 'cellspacing')),
309
+ cellpadding: dom.getAttrib(tableElm, 'data-mce-cell-padding') || dom.getAttrib(tableElm, 'cellpadding') ||
310
+ getTDTHOverallStyle(tableElm, 'padding'),
311
+ border: dom.getAttrib(tableElm, 'data-mce-border') || dom.getAttrib(tableElm, 'border') ||
312
+ getTDTHOverallStyle(tableElm, 'border'),
313
+ borderColor: dom.getAttrib(tableElm, 'data-mce-border-color'),
314
+ caption: !!dom.select('caption', tableElm)[0],
315
+ 'class': dom.getAttrib(tableElm, 'class')
316
+ };
317
+
318
+ each('left center right'.split(' '), function(name) {
319
+ if (editor.formatter.matchNode(tableElm, 'align' + name)) {
320
+ data.align = name;
321
+ }
322
+ });
323
+ }
324
+ } else {
325
+ colsCtrl = {label: 'Cols', name: 'cols'};
326
+ rowsCtrl = {label: 'Rows', name: 'rows'};
327
+ }
328
+
329
+ if (editor.settings.table_class_list) {
330
+ if (data["class"]) {
331
+ data["class"] = data["class"].replace(/\s*mce\-item\-table\s*/g, '');
332
+ }
333
+
334
+ classListCtrl = {
335
+ name: 'class',
336
+ type: 'listbox',
337
+ label: 'Class',
338
+ values: buildListItems(
339
+ editor.settings.table_class_list,
340
+ function(item) {
341
+ if (item.value) {
342
+ item.textStyle = function() {
343
+ return editor.formatter.getCssText({block: 'table', classes: [item.value]});
344
+ };
345
+ }
346
+ }
347
+ )
348
+ };
349
+ }
350
+
351
+ generalTableForm = {
352
+ type: 'form',
353
+ layout: 'flex',
354
+ direction: 'column',
355
+ labelGapCalc: 'children',
356
+ padding: 0,
357
+ items: [
358
+ {
359
+ type: 'form',
360
+ labelGapCalc: false,
361
+ padding: 0,
362
+ layout: 'grid',
363
+ columns: 2,
364
+ defaults: {
365
+ type: 'textbox',
366
+ maxWidth: 50
367
+ },
368
+ items: (editor.settings.table_appearance_options !== false) ? [
369
+ colsCtrl,
370
+ rowsCtrl,
371
+ {label: 'Width', name: 'width'},
372
+ {label: 'Height', name: 'height'},
373
+ {label: 'Cell spacing', name: 'cellspacing'},
374
+ {label: 'Cell padding', name: 'cellpadding'},
375
+ {label: 'Border', name: 'border'},
376
+ {label: 'Caption', name: 'caption', type: 'checkbox'}
377
+ ] : [
378
+ colsCtrl,
379
+ rowsCtrl,
380
+ {label: 'Width', name: 'width'},
381
+ {label: 'Height', name: 'height'}
382
+ ]
383
+ },
384
+
385
+ {
386
+ label: 'Alignment',
387
+ name: 'align',
388
+ type: 'listbox',
389
+ text: 'None',
390
+ values: [
391
+ {text: 'None', value: ''},
392
+ {text: 'Left', value: 'left'},
393
+ {text: 'Center', value: 'center'},
394
+ {text: 'Right', value: 'right'}
395
+ ]
396
+ },
397
+
398
+ classListCtrl
399
+ ]
400
+ };
401
+
402
+ if (editor.settings.table_advtab !== false) {
403
+ appendStylesToData(dom, data, tableElm);
404
+
405
+ editor.windowManager.open({
406
+ title: "Table properties",
407
+ data: data,
408
+ bodyType: 'tabpanel',
409
+ body: [
410
+ {
411
+ title: 'General',
412
+ type: 'form',
413
+ items: generalTableForm
414
+ },
415
+ createStyleForm(dom)
416
+ ],
417
+
418
+ onsubmit: onSubmitTableForm
419
+ });
420
+ } else {
421
+ editor.windowManager.open({
422
+ title: "Table properties",
423
+ data: data,
424
+ body: generalTableForm,
425
+ onsubmit: onSubmitTableForm
426
+ });
427
+ }
428
+ };
429
+
430
+ self.merge = function(grid, cell) {
431
+ editor.windowManager.open({
432
+ title: "Merge cells",
433
+ body: [
434
+ {label: 'Cols', name: 'cols', type: 'textbox', value: '1', size: 10},
435
+ {label: 'Rows', name: 'rows', type: 'textbox', value: '1', size: 10}
436
+ ],
437
+ onsubmit: function() {
438
+ var data = this.toJSON();
439
+
440
+ editor.undoManager.transact(function() {
441
+ grid.merge(cell, data.cols, data.rows);
442
+ });
443
+ }
444
+ });
445
+ };
446
+
447
+ self.cell = function() {
448
+ var dom = editor.dom, cellElm, data, classListCtrl, cells = [];
449
+
450
+ function onSubmitCellForm() {
451
+ updateStyle(dom, this);
452
+ data = Tools.extend(data, this.toJSON());
453
+
454
+ editor.undoManager.transact(function() {
455
+ each(cells, function(cellElm) {
456
+ editor.dom.setAttribs(cellElm, {
457
+ scope: data.scope,
458
+ style: data.style,
459
+ 'class': data['class']
460
+ });
461
+
462
+ editor.dom.setStyles(cellElm, {
463
+ width: addSizeSuffix(data.width),
464
+ height: addSizeSuffix(data.height)
465
+ });
466
+
467
+ // Switch cell type
468
+ if (data.type && cellElm.nodeName.toLowerCase() != data.type) {
469
+ cellElm = dom.rename(cellElm, data.type);
470
+ }
471
+
472
+ // Apply/remove alignment
473
+ unApplyAlign(cellElm);
474
+ if (data.align) {
475
+ editor.formatter.apply('align' + data.align, {}, cellElm);
476
+ }
477
+
478
+ // Apply/remove vertical alignment
479
+ unApplyVAlign(cellElm);
480
+ if (data.valign) {
481
+ editor.formatter.apply('valign' + data.valign, {}, cellElm);
482
+ }
483
+ });
484
+
485
+ editor.focus();
486
+ });
487
+ }
488
+
489
+ // Get selected cells or the current cell
490
+ cells = editor.dom.select('td[data-mce-selected],th[data-mce-selected]');
491
+ cellElm = editor.dom.getParent(editor.selection.getStart(), 'td,th');
492
+ if (!cells.length && cellElm) {
493
+ cells.push(cellElm);
494
+ }
495
+
496
+ cellElm = cellElm || cells[0];
497
+
498
+ if (!cellElm) {
499
+ // If this element is null, return now to avoid crashing.
500
+ return;
501
+ }
502
+
503
+ data = {
504
+ width: removePxSuffix(dom.getStyle(cellElm, 'width') || dom.getAttrib(cellElm, 'width')),
505
+ height: removePxSuffix(dom.getStyle(cellElm, 'height') || dom.getAttrib(cellElm, 'height')),
506
+ scope: dom.getAttrib(cellElm, 'scope'),
507
+ 'class': dom.getAttrib(cellElm, 'class')
508
+ };
509
+
510
+ data.type = cellElm.nodeName.toLowerCase();
511
+
512
+ each('left center right'.split(' '), function(name) {
513
+ if (editor.formatter.matchNode(cellElm, 'align' + name)) {
514
+ data.align = name;
515
+ }
516
+ });
517
+
518
+ each('top middle bottom'.split(' '), function(name) {
519
+ if (editor.formatter.matchNode(cellElm, 'valign' + name)) {
520
+ data.valign = name;
521
+ }
522
+ });
523
+
524
+ if (editor.settings.table_cell_class_list) {
525
+ classListCtrl = {
526
+ name: 'class',
527
+ type: 'listbox',
528
+ label: 'Class',
529
+ values: buildListItems(
530
+ editor.settings.table_cell_class_list,
531
+ function(item) {
532
+ if (item.value) {
533
+ item.textStyle = function() {
534
+ return editor.formatter.getCssText({block: 'td', classes: [item.value]});
535
+ };
536
+ }
537
+ }
538
+ )
539
+ };
540
+ }
541
+
542
+ var generalCellForm = {
543
+ type: 'form',
544
+ layout: 'flex',
545
+ direction: 'column',
546
+ labelGapCalc: 'children',
547
+ padding: 0,
548
+ items: [
549
+ {
550
+ type: 'form',
551
+ layout: 'grid',
552
+ columns: 2,
553
+ labelGapCalc: false,
554
+ padding: 0,
555
+ defaults: {
556
+ type: 'textbox',
557
+ maxWidth: 50
558
+ },
559
+ items: [
560
+ {label: 'Width', name: 'width'},
561
+ {label: 'Height', name: 'height'},
562
+ {
563
+ label: 'Cell type',
564
+ name: 'type',
565
+ type: 'listbox',
566
+ text: 'None',
567
+ minWidth: 90,
568
+ maxWidth: null,
569
+ values: [
570
+ {text: 'Cell', value: 'td'},
571
+ {text: 'Header cell', value: 'th'}
572
+ ]
573
+ },
574
+ {
575
+ label: 'Scope',
576
+ name: 'scope',
577
+ type: 'listbox',
578
+ text: 'None',
579
+ minWidth: 90,
580
+ maxWidth: null,
581
+ values: [
582
+ {text: 'None', value: ''},
583
+ {text: 'Row', value: 'row'},
584
+ {text: 'Column', value: 'col'},
585
+ {text: 'Row group', value: 'rowgroup'},
586
+ {text: 'Column group', value: 'colgroup'}
587
+ ]
588
+ },
589
+ {
590
+ label: 'H Align',
591
+ name: 'align',
592
+ type: 'listbox',
593
+ text: 'None',
594
+ minWidth: 90,
595
+ maxWidth: null,
596
+ values: [
597
+ {text: 'None', value: ''},
598
+ {text: 'Left', value: 'left'},
599
+ {text: 'Center', value: 'center'},
600
+ {text: 'Right', value: 'right'}
601
+ ]
602
+ },
603
+ {
604
+ label: 'V Align',
605
+ name: 'valign',
606
+ type: 'listbox',
607
+ text: 'None',
608
+ minWidth: 90,
609
+ maxWidth: null,
610
+ values: [
611
+ {text: 'None', value: ''},
612
+ {text: 'Top', value: 'top'},
613
+ {text: 'Middle', value: 'middle'},
614
+ {text: 'Bottom', value: 'bottom'}
615
+ ]
616
+ }
617
+ ]
618
+ },
619
+
620
+ classListCtrl
621
+ ]
622
+ };
623
+
624
+ if (editor.settings.table_cell_advtab !== false) {
625
+ appendStylesToData(dom, data, cellElm);
626
+
627
+ editor.windowManager.open({
628
+ title: "Cell properties",
629
+ bodyType: 'tabpanel',
630
+ data: data,
631
+ body: [
632
+ {
633
+ title: 'General',
634
+ type: 'form',
635
+ items: generalCellForm
636
+ },
637
+
638
+ createStyleForm(dom)
639
+ ],
640
+
641
+ onsubmit: onSubmitCellForm
642
+ });
643
+ } else {
644
+ editor.windowManager.open({
645
+ title: "Cell properties",
646
+ data: data,
647
+ body: generalCellForm,
648
+ onsubmit: onSubmitCellForm
649
+ });
650
+ }
651
+ };
652
+
653
+ self.row = function() {
654
+ var dom = editor.dom, tableElm, cellElm, rowElm, classListCtrl, data, rows = [], generalRowForm;
655
+
656
+ function onSubmitRowForm() {
657
+ var tableElm, oldParentElm, parentElm;
658
+
659
+ updateStyle(dom, this);
660
+ data = Tools.extend(data, this.toJSON());
661
+
662
+ editor.undoManager.transact(function() {
663
+ var toType = data.type;
664
+
665
+ each(rows, function(rowElm) {
666
+ editor.dom.setAttribs(rowElm, {
667
+ scope: data.scope,
668
+ style: data.style,
669
+ 'class': data['class']
670
+ });
671
+
672
+ editor.dom.setStyles(rowElm, {
673
+ height: addSizeSuffix(data.height)
674
+ });
675
+
676
+ if (toType != rowElm.parentNode.nodeName.toLowerCase()) {
677
+ tableElm = dom.getParent(rowElm, 'table');
678
+
679
+ oldParentElm = rowElm.parentNode;
680
+ parentElm = dom.select(toType, tableElm)[0];
681
+ if (!parentElm) {
682
+ parentElm = dom.create(toType);
683
+ if (tableElm.firstChild) {
684
+ tableElm.insertBefore(parentElm, tableElm.firstChild);
685
+ } else {
686
+ tableElm.appendChild(parentElm);
687
+ }
688
+ }
689
+
690
+ parentElm.appendChild(rowElm);
691
+
692
+ if (!oldParentElm.hasChildNodes()) {
693
+ dom.remove(oldParentElm);
694
+ }
695
+ }
696
+
697
+ // Apply/remove alignment
698
+ unApplyAlign(rowElm);
699
+ if (data.align) {
700
+ editor.formatter.apply('align' + data.align, {}, rowElm);
701
+ }
702
+ });
703
+
704
+ editor.focus();
705
+ });
706
+ }
707
+
708
+ tableElm = editor.dom.getParent(editor.selection.getStart(), 'table');
709
+ cellElm = editor.dom.getParent(editor.selection.getStart(), 'td,th');
710
+
711
+ each(tableElm.rows, function(row) {
712
+ each(row.cells, function(cell) {
713
+ if (dom.getAttrib(cell, 'data-mce-selected') || cell == cellElm) {
714
+ rows.push(row);
715
+ return false;
716
+ }
717
+ });
718
+ });
719
+
720
+ rowElm = rows[0];
721
+ if (!rowElm) {
722
+ // If this element is null, return now to avoid crashing.
723
+ return;
724
+ }
725
+
726
+ data = {
727
+ height: removePxSuffix(dom.getStyle(rowElm, 'height') || dom.getAttrib(rowElm, 'height')),
728
+ scope: dom.getAttrib(rowElm, 'scope'),
729
+ 'class': dom.getAttrib(rowElm, 'class')
730
+ };
731
+
732
+ data.type = rowElm.parentNode.nodeName.toLowerCase();
733
+
734
+ each('left center right'.split(' '), function(name) {
735
+ if (editor.formatter.matchNode(rowElm, 'align' + name)) {
736
+ data.align = name;
737
+ }
738
+ });
739
+
740
+ if (editor.settings.table_row_class_list) {
741
+ classListCtrl = {
742
+ name: 'class',
743
+ type: 'listbox',
744
+ label: 'Class',
745
+ values: buildListItems(
746
+ editor.settings.table_row_class_list,
747
+ function(item) {
748
+ if (item.value) {
749
+ item.textStyle = function() {
750
+ return editor.formatter.getCssText({block: 'tr', classes: [item.value]});
751
+ };
752
+ }
753
+ }
754
+ )
755
+ };
756
+ }
757
+
758
+ generalRowForm = {
759
+ type: 'form',
760
+ columns: 2,
761
+ padding: 0,
762
+ defaults: {
763
+ type: 'textbox'
764
+ },
765
+ items: [
766
+ {
767
+ type: 'listbox',
768
+ name: 'type',
769
+ label: 'Row type',
770
+ text: 'None',
771
+ maxWidth: null,
772
+ values: [
773
+ {text: 'Header', value: 'thead'},
774
+ {text: 'Body', value: 'tbody'},
775
+ {text: 'Footer', value: 'tfoot'}
776
+ ]
777
+ },
778
+ {
779
+ type: 'listbox',
780
+ name: 'align',
781
+ label: 'Alignment',
782
+ text: 'None',
783
+ maxWidth: null,
784
+ values: [
785
+ {text: 'None', value: ''},
786
+ {text: 'Left', value: 'left'},
787
+ {text: 'Center', value: 'center'},
788
+ {text: 'Right', value: 'right'}
789
+ ]
790
+ },
791
+ {label: 'Height', name: 'height'},
792
+ classListCtrl
793
+ ]
794
+ };
795
+
796
+ if (editor.settings.table_row_advtab !== false) {
797
+ appendStylesToData(dom, data, rowElm);
798
+
799
+ editor.windowManager.open({
800
+ title: "Row properties",
801
+ data: data,
802
+ bodyType: 'tabpanel',
803
+ body: [
804
+ {
805
+ title: 'General',
806
+ type: 'form',
807
+ items: generalRowForm
808
+ },
809
+ createStyleForm(dom)
810
+ ],
811
+
812
+ onsubmit: onSubmitRowForm
813
+ });
814
+ } else {
815
+ editor.windowManager.open({
816
+ title: "Row properties",
817
+ data: data,
818
+ body: generalRowForm,
819
+ onsubmit: onSubmitRowForm
820
+ });
821
+ }
822
+ };
823
+ };
824
+ });