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,1028 @@
1
+ /**
2
+ * EditorCommands.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 enables you to add custom editor commands and it contains
13
+ * overrides for native browser commands to address various bugs and issues.
14
+ *
15
+ * @class tinymce.EditorCommands
16
+ */
17
+ define("tinymce/EditorCommands", [
18
+ "tinymce/html/Serializer",
19
+ "tinymce/Env",
20
+ "tinymce/util/Tools",
21
+ "tinymce/dom/ElementUtils",
22
+ "tinymce/dom/RangeUtils",
23
+ "tinymce/dom/TreeWalker"
24
+ ], function(Serializer, Env, Tools, ElementUtils, RangeUtils, TreeWalker) {
25
+ // Added for compression purposes
26
+ var each = Tools.each, extend = Tools.extend;
27
+ var map = Tools.map, inArray = Tools.inArray, explode = Tools.explode;
28
+ var isIE = Env.ie, isOldIE = Env.ie && Env.ie < 11;
29
+ var TRUE = true, FALSE = false;
30
+
31
+ return function(editor) {
32
+ var dom, selection, formatter,
33
+ commands = {state: {}, exec: {}, value: {}},
34
+ settings = editor.settings,
35
+ bookmark;
36
+
37
+ editor.on('PreInit', function() {
38
+ dom = editor.dom;
39
+ selection = editor.selection;
40
+ settings = editor.settings;
41
+ formatter = editor.formatter;
42
+ });
43
+
44
+ /**
45
+ * Executes the specified command.
46
+ *
47
+ * @method execCommand
48
+ * @param {String} command Command to execute.
49
+ * @param {Boolean} ui Optional user interface state.
50
+ * @param {Object} value Optional value for command.
51
+ * @param {Object} args Optional extra arguments to the execCommand.
52
+ * @return {Boolean} true/false if the command was found or not.
53
+ */
54
+ function execCommand(command, ui, value, args) {
55
+ var func, customCommand, state = 0;
56
+
57
+ if (!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(command) && (!args || !args.skip_focus)) {
58
+ editor.focus();
59
+ }
60
+
61
+ args = editor.fire('BeforeExecCommand', {command: command, ui: ui, value: value});
62
+ if (args.isDefaultPrevented()) {
63
+ return false;
64
+ }
65
+
66
+ customCommand = command.toLowerCase();
67
+ if ((func = commands.exec[customCommand])) {
68
+ func(customCommand, ui, value);
69
+ editor.fire('ExecCommand', {command: command, ui: ui, value: value});
70
+ return true;
71
+ }
72
+
73
+ // Plugin commands
74
+ each(editor.plugins, function(p) {
75
+ if (p.execCommand && p.execCommand(command, ui, value)) {
76
+ editor.fire('ExecCommand', {command: command, ui: ui, value: value});
77
+ state = true;
78
+ return false;
79
+ }
80
+ });
81
+
82
+ if (state) {
83
+ return state;
84
+ }
85
+
86
+ // Theme commands
87
+ if (editor.theme && editor.theme.execCommand && editor.theme.execCommand(command, ui, value)) {
88
+ editor.fire('ExecCommand', {command: command, ui: ui, value: value});
89
+ return true;
90
+ }
91
+
92
+ // Browser commands
93
+ try {
94
+ state = editor.getDoc().execCommand(command, ui, value);
95
+ } catch (ex) {
96
+ // Ignore old IE errors
97
+ }
98
+
99
+ if (state) {
100
+ editor.fire('ExecCommand', {command: command, ui: ui, value: value});
101
+ return true;
102
+ }
103
+
104
+ return false;
105
+ }
106
+
107
+ /**
108
+ * Queries the current state for a command for example if the current selection is "bold".
109
+ *
110
+ * @method queryCommandState
111
+ * @param {String} command Command to check the state of.
112
+ * @return {Boolean/Number} true/false if the selected contents is bold or not, -1 if it's not found.
113
+ */
114
+ function queryCommandState(command) {
115
+ var func;
116
+
117
+ // Is hidden then return undefined
118
+ if (editor._isHidden()) {
119
+ return;
120
+ }
121
+
122
+ command = command.toLowerCase();
123
+ if ((func = commands.state[command])) {
124
+ return func(command);
125
+ }
126
+
127
+ // Browser commands
128
+ try {
129
+ return editor.getDoc().queryCommandState(command);
130
+ } catch (ex) {
131
+ // Fails sometimes see bug: 1896577
132
+ }
133
+
134
+ return false;
135
+ }
136
+
137
+ /**
138
+ * Queries the command value for example the current fontsize.
139
+ *
140
+ * @method queryCommandValue
141
+ * @param {String} command Command to check the value of.
142
+ * @return {Object} Command value of false if it's not found.
143
+ */
144
+ function queryCommandValue(command) {
145
+ var func;
146
+
147
+ // Is hidden then return undefined
148
+ if (editor._isHidden()) {
149
+ return;
150
+ }
151
+
152
+ command = command.toLowerCase();
153
+ if ((func = commands.value[command])) {
154
+ return func(command);
155
+ }
156
+
157
+ // Browser commands
158
+ try {
159
+ return editor.getDoc().queryCommandValue(command);
160
+ } catch (ex) {
161
+ // Fails sometimes see bug: 1896577
162
+ }
163
+ }
164
+
165
+ /**
166
+ * Adds commands to the command collection.
167
+ *
168
+ * @method addCommands
169
+ * @param {Object} command_list Name/value collection with commands to add, the names can also be comma separated.
170
+ * @param {String} type Optional type to add, defaults to exec. Can be value or state as well.
171
+ */
172
+ function addCommands(command_list, type) {
173
+ type = type || 'exec';
174
+
175
+ each(command_list, function(callback, command) {
176
+ each(command.toLowerCase().split(','), function(command) {
177
+ commands[type][command] = callback;
178
+ });
179
+ });
180
+ }
181
+
182
+ function addCommand(command, callback, scope) {
183
+ command = command.toLowerCase();
184
+ commands.exec[command] = function(command, ui, value, args) {
185
+ return callback.call(scope || editor, ui, value, args);
186
+ };
187
+ }
188
+
189
+ /**
190
+ * Returns true/false if the command is supported or not.
191
+ *
192
+ * @method queryCommandSupported
193
+ * @param {String} command Command that we check support for.
194
+ * @return {Boolean} true/false if the command is supported or not.
195
+ */
196
+ function queryCommandSupported(command) {
197
+ command = command.toLowerCase();
198
+
199
+ if (commands.exec[command]) {
200
+ return true;
201
+ }
202
+
203
+ // Browser commands
204
+ try {
205
+ return editor.getDoc().queryCommandSupported(command);
206
+ } catch (ex) {
207
+ // Fails sometimes see bug: 1896577
208
+ }
209
+
210
+ return false;
211
+ }
212
+
213
+ function addQueryStateHandler(command, callback, scope) {
214
+ command = command.toLowerCase();
215
+ commands.state[command] = function() {
216
+ return callback.call(scope || editor);
217
+ };
218
+ }
219
+
220
+ function addQueryValueHandler(command, callback, scope) {
221
+ command = command.toLowerCase();
222
+ commands.value[command] = function() {
223
+ return callback.call(scope || editor);
224
+ };
225
+ }
226
+
227
+ function hasCustomCommand(command) {
228
+ command = command.toLowerCase();
229
+ return !!commands.exec[command];
230
+ }
231
+
232
+ // Expose public methods
233
+ extend(this, {
234
+ execCommand: execCommand,
235
+ queryCommandState: queryCommandState,
236
+ queryCommandValue: queryCommandValue,
237
+ queryCommandSupported: queryCommandSupported,
238
+ addCommands: addCommands,
239
+ addCommand: addCommand,
240
+ addQueryStateHandler: addQueryStateHandler,
241
+ addQueryValueHandler: addQueryValueHandler,
242
+ hasCustomCommand: hasCustomCommand
243
+ });
244
+
245
+ // Private methods
246
+
247
+ function execNativeCommand(command, ui, value) {
248
+ if (ui === undefined) {
249
+ ui = FALSE;
250
+ }
251
+
252
+ if (value === undefined) {
253
+ value = null;
254
+ }
255
+
256
+ return editor.getDoc().execCommand(command, ui, value);
257
+ }
258
+
259
+ function isFormatMatch(name) {
260
+ return formatter.match(name);
261
+ }
262
+
263
+ function toggleFormat(name, value) {
264
+ formatter.toggle(name, value ? {value: value} : undefined);
265
+ editor.nodeChanged();
266
+ }
267
+
268
+ function storeSelection(type) {
269
+ bookmark = selection.getBookmark(type);
270
+ }
271
+
272
+ function restoreSelection() {
273
+ selection.moveToBookmark(bookmark);
274
+ }
275
+
276
+ // Add execCommand overrides
277
+ addCommands({
278
+ // Ignore these, added for compatibility
279
+ 'mceResetDesignMode,mceBeginUndoLevel': function() {},
280
+
281
+ // Add undo manager logic
282
+ 'mceEndUndoLevel,mceAddUndoLevel': function() {
283
+ editor.undoManager.add();
284
+ },
285
+
286
+ 'Cut,Copy,Paste': function(command) {
287
+ var doc = editor.getDoc(), failed;
288
+
289
+ // Try executing the native command
290
+ try {
291
+ execNativeCommand(command);
292
+ } catch (ex) {
293
+ // Command failed
294
+ failed = TRUE;
295
+ }
296
+
297
+ // Present alert message about clipboard access not being available
298
+ if (failed || !doc.queryCommandSupported(command)) {
299
+ var msg = editor.translate(
300
+ "Your browser doesn't support direct access to the clipboard. " +
301
+ "Please use the Ctrl+X/C/V keyboard shortcuts instead."
302
+ );
303
+
304
+ if (Env.mac) {
305
+ msg = msg.replace(/Ctrl\+/g, '\u2318+');
306
+ }
307
+
308
+ editor.notificationManager.open({text: msg, type: 'error'});
309
+ }
310
+ },
311
+
312
+ // Override unlink command
313
+ unlink: function() {
314
+ if (selection.isCollapsed()) {
315
+ var elm = selection.getNode();
316
+ if (elm.tagName == 'A') {
317
+ editor.dom.remove(elm, true);
318
+ }
319
+
320
+ return;
321
+ }
322
+
323
+ formatter.remove("link");
324
+ },
325
+
326
+ // Override justify commands to use the text formatter engine
327
+ 'JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone': function(command) {
328
+ var align = command.substring(7);
329
+
330
+ if (align == 'full') {
331
+ align = 'justify';
332
+ }
333
+
334
+ // Remove all other alignments first
335
+ each('left,center,right,justify'.split(','), function(name) {
336
+ if (align != name) {
337
+ formatter.remove('align' + name);
338
+ }
339
+ });
340
+
341
+ if (align != 'none') {
342
+ toggleFormat('align' + align);
343
+ }
344
+ },
345
+
346
+ // Override list commands to fix WebKit bug
347
+ 'InsertUnorderedList,InsertOrderedList': function(command) {
348
+ var listElm, listParent;
349
+
350
+ execNativeCommand(command);
351
+
352
+ // WebKit produces lists within block elements so we need to split them
353
+ // we will replace the native list creation logic to custom logic later on
354
+ // TODO: Remove this when the list creation logic is removed
355
+ listElm = dom.getParent(selection.getNode(), 'ol,ul');
356
+ if (listElm) {
357
+ listParent = listElm.parentNode;
358
+
359
+ // If list is within a text block then split that block
360
+ if (/^(H[1-6]|P|ADDRESS|PRE)$/.test(listParent.nodeName)) {
361
+ storeSelection();
362
+ dom.split(listParent, listElm);
363
+ restoreSelection();
364
+ }
365
+ }
366
+ },
367
+
368
+ // Override commands to use the text formatter engine
369
+ 'Bold,Italic,Underline,Strikethrough,Superscript,Subscript': function(command) {
370
+ toggleFormat(command);
371
+ },
372
+
373
+ // Override commands to use the text formatter engine
374
+ 'ForeColor,HiliteColor,FontName': function(command, ui, value) {
375
+ toggleFormat(command, value);
376
+ },
377
+
378
+ FontSize: function(command, ui, value) {
379
+ var fontClasses, fontSizes;
380
+
381
+ // Convert font size 1-7 to styles
382
+ if (value >= 1 && value <= 7) {
383
+ fontSizes = explode(settings.font_size_style_values);
384
+ fontClasses = explode(settings.font_size_classes);
385
+
386
+ if (fontClasses) {
387
+ value = fontClasses[value - 1] || value;
388
+ } else {
389
+ value = fontSizes[value - 1] || value;
390
+ }
391
+ }
392
+
393
+ toggleFormat(command, value);
394
+ },
395
+
396
+ RemoveFormat: function(command) {
397
+ formatter.remove(command);
398
+ },
399
+
400
+ mceBlockQuote: function() {
401
+ toggleFormat('blockquote');
402
+ },
403
+
404
+ FormatBlock: function(command, ui, value) {
405
+ return toggleFormat(value || 'p');
406
+ },
407
+
408
+ mceCleanup: function() {
409
+ var bookmark = selection.getBookmark();
410
+
411
+ editor.setContent(editor.getContent({cleanup: TRUE}), {cleanup: TRUE});
412
+
413
+ selection.moveToBookmark(bookmark);
414
+ },
415
+
416
+ mceRemoveNode: function(command, ui, value) {
417
+ var node = value || selection.getNode();
418
+
419
+ // Make sure that the body node isn't removed
420
+ if (node != editor.getBody()) {
421
+ storeSelection();
422
+ editor.dom.remove(node, TRUE);
423
+ restoreSelection();
424
+ }
425
+ },
426
+
427
+ mceSelectNodeDepth: function(command, ui, value) {
428
+ var counter = 0;
429
+
430
+ dom.getParent(selection.getNode(), function(node) {
431
+ if (node.nodeType == 1 && counter++ == value) {
432
+ selection.select(node);
433
+ return FALSE;
434
+ }
435
+ }, editor.getBody());
436
+ },
437
+
438
+ mceSelectNode: function(command, ui, value) {
439
+ selection.select(value);
440
+ },
441
+
442
+ mceInsertContent: function(command, ui, value) {
443
+ var parser, serializer, parentNode, rootNode, fragment, args;
444
+ var marker, rng, node, node2, bookmarkHtml, merge, data;
445
+ var textInlineElements = editor.schema.getTextInlineElements();
446
+
447
+ function trimOrPaddLeftRight(html) {
448
+ var rng, container, offset;
449
+
450
+ rng = selection.getRng(true);
451
+ container = rng.startContainer;
452
+ offset = rng.startOffset;
453
+
454
+ function hasSiblingText(siblingName) {
455
+ return container[siblingName] && container[siblingName].nodeType == 3;
456
+ }
457
+
458
+ if (container.nodeType == 3) {
459
+ if (offset > 0) {
460
+ html = html.replace(/^&nbsp;/, ' ');
461
+ } else if (!hasSiblingText('previousSibling')) {
462
+ html = html.replace(/^ /, '&nbsp;');
463
+ }
464
+
465
+ if (offset < container.length) {
466
+ html = html.replace(/&nbsp;(<br>|)$/, ' ');
467
+ } else if (!hasSiblingText('nextSibling')) {
468
+ html = html.replace(/(&nbsp;| )(<br>|)$/, '&nbsp;');
469
+ }
470
+ }
471
+
472
+ return html;
473
+ }
474
+
475
+ // Removes &nbsp; from a [b] c -> a &nbsp;c -> a c
476
+ function trimNbspAfterDeleteAndPaddValue() {
477
+ var rng, container, offset;
478
+
479
+ rng = selection.getRng(true);
480
+ container = rng.startContainer;
481
+ offset = rng.startOffset;
482
+
483
+ if (container.nodeType == 3 && rng.collapsed) {
484
+ if (container.data[offset] === '\u00a0') {
485
+ container.deleteData(offset, 1);
486
+
487
+ if (!/[\u00a0| ]$/.test(value)) {
488
+ value += ' ';
489
+ }
490
+ } else if (container.data[offset - 1] === '\u00a0') {
491
+ container.deleteData(offset - 1, 1);
492
+
493
+ if (!/[\u00a0| ]$/.test(value)) {
494
+ value = ' ' + value;
495
+ }
496
+ }
497
+ }
498
+ }
499
+
500
+ function markInlineFormatElements(fragment) {
501
+ if (merge) {
502
+ for (node = fragment.firstChild; node; node = node.walk(true)) {
503
+ if (textInlineElements[node.name]) {
504
+ node.attr('data-mce-new', "true");
505
+ }
506
+ }
507
+ }
508
+ }
509
+
510
+ function reduceInlineTextElements() {
511
+ if (merge) {
512
+ var root = editor.getBody(), elementUtils = new ElementUtils(dom);
513
+
514
+ each(dom.select('*[data-mce-new]'), function(node) {
515
+ node.removeAttribute('data-mce-new');
516
+
517
+ for (var testNode = node.parentNode; testNode && testNode != root; testNode = testNode.parentNode) {
518
+ if (elementUtils.compare(testNode, node)) {
519
+ dom.remove(node, true);
520
+ }
521
+ }
522
+ });
523
+ }
524
+ }
525
+
526
+ function canHaveChildren(node) {
527
+ return node && !editor.schema.getShortEndedElements()[node.nodeName];
528
+ }
529
+
530
+ function moveSelectionToMarker(marker) {
531
+ var parentEditableFalseElm;
532
+
533
+ function getContentEditableFalseParent(node) {
534
+ var root = editor.getBody();
535
+
536
+ for (; node && node !== root; node = node.parentNode) {
537
+ if (editor.dom.getContentEditable(node) === 'false') {
538
+ return node;
539
+ }
540
+ }
541
+
542
+ return null;
543
+ }
544
+
545
+ if (!marker) {
546
+ return;
547
+ }
548
+
549
+ selection.scrollIntoView(marker);
550
+
551
+ // If marker is in cE=false then move selection to that element instead
552
+ parentEditableFalseElm = getContentEditableFalseParent(marker);
553
+ if (parentEditableFalseElm) {
554
+ dom.remove(marker);
555
+ selection.select(parentEditableFalseElm);
556
+ return;
557
+ }
558
+
559
+ // Move selection before marker and remove it
560
+ rng = dom.createRng();
561
+
562
+ // If previous sibling is a text node set the selection to the end of that node
563
+ node = marker.previousSibling;
564
+ if (node && node.nodeType == 3) {
565
+ rng.setStart(node, node.nodeValue.length);
566
+
567
+ // TODO: Why can't we normalize on IE
568
+ if (!isIE) {
569
+ node2 = marker.nextSibling;
570
+ if (node2 && node2.nodeType == 3) {
571
+ node.appendData(node2.data);
572
+ node2.parentNode.removeChild(node2);
573
+ }
574
+ }
575
+ } else {
576
+ // If the previous sibling isn't a text node or doesn't exist set the selection before the marker node
577
+ rng.setStartBefore(marker);
578
+ rng.setEndBefore(marker);
579
+ }
580
+
581
+ // Remove the marker node and set the new range
582
+ dom.remove(marker);
583
+ selection.setRng(rng);
584
+ }
585
+
586
+ if (typeof value != 'string') {
587
+ merge = value.merge;
588
+ data = value.data;
589
+ value = value.content;
590
+ }
591
+
592
+ // Check for whitespace before/after value
593
+ if (/^ | $/.test(value)) {
594
+ value = trimOrPaddLeftRight(value);
595
+ }
596
+
597
+ // Setup parser and serializer
598
+ parser = editor.parser;
599
+ serializer = new Serializer({
600
+ validate: settings.validate
601
+ }, editor.schema);
602
+ bookmarkHtml = '<span id="mce_marker" data-mce-type="bookmark">&#xFEFF;&#x200B;</span>';
603
+
604
+ // Run beforeSetContent handlers on the HTML to be inserted
605
+ args = {content: value, format: 'html', selection: true};
606
+ editor.fire('BeforeSetContent', args);
607
+ value = args.content;
608
+
609
+ // Add caret at end of contents if it's missing
610
+ if (value.indexOf('{$caret}') == -1) {
611
+ value += '{$caret}';
612
+ }
613
+
614
+ // Replace the caret marker with a span bookmark element
615
+ value = value.replace(/\{\$caret\}/, bookmarkHtml);
616
+
617
+ // If selection is at <body>|<p></p> then move it into <body><p>|</p>
618
+ rng = selection.getRng();
619
+ var caretElement = rng.startContainer || (rng.parentElement ? rng.parentElement() : null);
620
+ var body = editor.getBody();
621
+ if (caretElement === body && selection.isCollapsed()) {
622
+ if (dom.isBlock(body.firstChild) && canHaveChildren(body.firstChild) && dom.isEmpty(body.firstChild)) {
623
+ rng = dom.createRng();
624
+ rng.setStart(body.firstChild, 0);
625
+ rng.setEnd(body.firstChild, 0);
626
+ selection.setRng(rng);
627
+ }
628
+ }
629
+
630
+ // Insert node maker where we will insert the new HTML and get it's parent
631
+ if (!selection.isCollapsed()) {
632
+ // Fix for #2595 seems that delete removes one extra character on
633
+ // WebKit for some odd reason if you double click select a word
634
+ editor.selection.setRng(editor.selection.getRng());
635
+ editor.getDoc().execCommand('Delete', false, null);
636
+ trimNbspAfterDeleteAndPaddValue();
637
+ }
638
+
639
+ parentNode = selection.getNode();
640
+
641
+ // Parse the fragment within the context of the parent node
642
+ var parserArgs = {context: parentNode.nodeName.toLowerCase(), data: data};
643
+ fragment = parser.parse(value, parserArgs);
644
+
645
+ markInlineFormatElements(fragment);
646
+
647
+ // Move the caret to a more suitable location
648
+ node = fragment.lastChild;
649
+ if (node.attr('id') == 'mce_marker') {
650
+ marker = node;
651
+
652
+ for (node = node.prev; node; node = node.walk(true)) {
653
+ if (node.type == 3 || !dom.isBlock(node.name)) {
654
+ if (editor.schema.isValidChild(node.parent.name, 'span')) {
655
+ node.parent.insert(marker, node, node.name === 'br');
656
+ }
657
+ break;
658
+ }
659
+ }
660
+ }
661
+
662
+ editor._selectionOverrides.showBlockCaretContainer(parentNode);
663
+
664
+ // If parser says valid we can insert the contents into that parent
665
+ if (!parserArgs.invalid) {
666
+ value = serializer.serialize(fragment);
667
+
668
+ // Check if parent is empty or only has one BR element then set the innerHTML of that parent
669
+ node = parentNode.firstChild;
670
+ node2 = parentNode.lastChild;
671
+ if (!node || (node === node2 && node.nodeName === 'BR')) {
672
+ dom.setHTML(parentNode, value);
673
+ } else {
674
+ selection.setContent(value);
675
+ }
676
+ } else {
677
+ // If the fragment was invalid within that context then we need
678
+ // to parse and process the parent it's inserted into
679
+
680
+ // Insert bookmark node and get the parent
681
+ selection.setContent(bookmarkHtml);
682
+ parentNode = selection.getNode();
683
+ rootNode = editor.getBody();
684
+
685
+ // Opera will return the document node when selection is in root
686
+ if (parentNode.nodeType == 9) {
687
+ parentNode = node = rootNode;
688
+ } else {
689
+ node = parentNode;
690
+ }
691
+
692
+ // Find the ancestor just before the root element
693
+ while (node !== rootNode) {
694
+ parentNode = node;
695
+ node = node.parentNode;
696
+ }
697
+
698
+ // Get the outer/inner HTML depending on if we are in the root and parser and serialize that
699
+ value = parentNode == rootNode ? rootNode.innerHTML : dom.getOuterHTML(parentNode);
700
+ value = serializer.serialize(
701
+ parser.parse(
702
+ // Need to replace by using a function since $ in the contents would otherwise be a problem
703
+ value.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i, function() {
704
+ return serializer.serialize(fragment);
705
+ })
706
+ )
707
+ );
708
+
709
+ // Set the inner/outer HTML depending on if we are in the root or not
710
+ if (parentNode == rootNode) {
711
+ dom.setHTML(rootNode, value);
712
+ } else {
713
+ dom.setOuterHTML(parentNode, value);
714
+ }
715
+ }
716
+
717
+ reduceInlineTextElements();
718
+ moveSelectionToMarker(dom.get('mce_marker'));
719
+ editor.fire('SetContent', args);
720
+ editor.addVisual();
721
+ },
722
+
723
+ mceInsertRawHTML: function(command, ui, value) {
724
+ selection.setContent('tiny_mce_marker');
725
+ editor.setContent(
726
+ editor.getContent().replace(/tiny_mce_marker/g, function() {
727
+ return value;
728
+ })
729
+ );
730
+ },
731
+
732
+ mceToggleFormat: function(command, ui, value) {
733
+ toggleFormat(value);
734
+ },
735
+
736
+ mceSetContent: function(command, ui, value) {
737
+ editor.setContent(value);
738
+ },
739
+
740
+ 'Indent,Outdent': function(command) {
741
+ var intentValue, indentUnit, value;
742
+
743
+ // Setup indent level
744
+ intentValue = settings.indentation;
745
+ indentUnit = /[a-z%]+$/i.exec(intentValue);
746
+ intentValue = parseInt(intentValue, 10);
747
+
748
+ if (!queryCommandState('InsertUnorderedList') && !queryCommandState('InsertOrderedList')) {
749
+ // If forced_root_blocks is set to false we don't have a block to indent so lets create a div
750
+ if (!settings.forced_root_block && !dom.getParent(selection.getNode(), dom.isBlock)) {
751
+ formatter.apply('div');
752
+ }
753
+
754
+ each(selection.getSelectedBlocks(), function(element) {
755
+ if (dom.getContentEditable(element) === "false") {
756
+ return;
757
+ }
758
+
759
+ if (element.nodeName != "LI") {
760
+ var indentStyleName = editor.getParam('indent_use_margin', false) ? 'margin' : 'padding';
761
+
762
+ indentStyleName += dom.getStyle(element, 'direction', true) == 'rtl' ? 'Right' : 'Left';
763
+
764
+ if (command == 'outdent') {
765
+ value = Math.max(0, parseInt(element.style[indentStyleName] || 0, 10) - intentValue);
766
+ dom.setStyle(element, indentStyleName, value ? value + indentUnit : '');
767
+ } else {
768
+ value = (parseInt(element.style[indentStyleName] || 0, 10) + intentValue) + indentUnit;
769
+ dom.setStyle(element, indentStyleName, value);
770
+ }
771
+ }
772
+ });
773
+ } else {
774
+ execNativeCommand(command);
775
+ }
776
+ },
777
+
778
+ mceRepaint: function() {
779
+ },
780
+
781
+ InsertHorizontalRule: function() {
782
+ editor.execCommand('mceInsertContent', false, '<hr />');
783
+ },
784
+
785
+ mceToggleVisualAid: function() {
786
+ editor.hasVisual = !editor.hasVisual;
787
+ editor.addVisual();
788
+ },
789
+
790
+ mceReplaceContent: function(command, ui, value) {
791
+ editor.execCommand('mceInsertContent', false, value.replace(/\{\$selection\}/g, selection.getContent({format: 'text'})));
792
+ },
793
+
794
+ mceInsertLink: function(command, ui, value) {
795
+ var anchor;
796
+
797
+ if (typeof value == 'string') {
798
+ value = {href: value};
799
+ }
800
+
801
+ anchor = dom.getParent(selection.getNode(), 'a');
802
+
803
+ // Spaces are never valid in URLs and it's a very common mistake for people to make so we fix it here.
804
+ value.href = value.href.replace(' ', '%20');
805
+
806
+ // Remove existing links if there could be child links or that the href isn't specified
807
+ if (!anchor || !value.href) {
808
+ formatter.remove('link');
809
+ }
810
+
811
+ // Apply new link to selection
812
+ if (value.href) {
813
+ formatter.apply('link', value, anchor);
814
+ }
815
+ },
816
+
817
+ selectAll: function() {
818
+ var root = dom.getRoot(), rng;
819
+
820
+ if (selection.getRng().setStart) {
821
+ rng = dom.createRng();
822
+ rng.setStart(root, 0);
823
+ rng.setEnd(root, root.childNodes.length);
824
+ selection.setRng(rng);
825
+ } else {
826
+ // IE will render it's own root level block elements and sometimes
827
+ // even put font elements in them when the user starts typing. So we need to
828
+ // move the selection to a more suitable element from this:
829
+ // <body>|<p></p></body> to this: <body><p>|</p></body>
830
+ rng = selection.getRng();
831
+ if (!rng.item) {
832
+ rng.moveToElementText(root);
833
+ rng.select();
834
+ }
835
+ }
836
+ },
837
+
838
+ "delete": function() {
839
+ execNativeCommand("Delete");
840
+
841
+ // Check if body is empty after the delete call if so then set the contents
842
+ // to an empty string and move the caret to any block produced by that operation
843
+ // this fixes the issue with root blocks not being properly produced after a delete call on IE
844
+ var body = editor.getBody();
845
+
846
+ if (dom.isEmpty(body)) {
847
+ editor.setContent('');
848
+
849
+ if (body.firstChild && dom.isBlock(body.firstChild)) {
850
+ editor.selection.setCursorLocation(body.firstChild, 0);
851
+ } else {
852
+ editor.selection.setCursorLocation(body, 0);
853
+ }
854
+ }
855
+ },
856
+
857
+ mceNewDocument: function() {
858
+ editor.setContent('');
859
+ },
860
+
861
+ InsertLineBreak: function(command, ui, value) {
862
+ // We load the current event in from EnterKey.js when appropriate to heed
863
+ // certain event-specific variations such as ctrl-enter in a list
864
+ var evt = value;
865
+ var brElm, extraBr, marker;
866
+ var rng = selection.getRng(true);
867
+ new RangeUtils(dom).normalize(rng);
868
+
869
+ var offset = rng.startOffset;
870
+ var container = rng.startContainer;
871
+
872
+ // Resolve node index
873
+ if (container.nodeType == 1 && container.hasChildNodes()) {
874
+ var isAfterLastNodeInContainer = offset > container.childNodes.length - 1;
875
+
876
+ container = container.childNodes[Math.min(offset, container.childNodes.length - 1)] || container;
877
+ if (isAfterLastNodeInContainer && container.nodeType == 3) {
878
+ offset = container.nodeValue.length;
879
+ } else {
880
+ offset = 0;
881
+ }
882
+ }
883
+
884
+ var parentBlock = dom.getParent(container, dom.isBlock);
885
+ var parentBlockName = parentBlock ? parentBlock.nodeName.toUpperCase() : ''; // IE < 9 & HTML5
886
+ var containerBlock = parentBlock ? dom.getParent(parentBlock.parentNode, dom.isBlock) : null;
887
+ var containerBlockName = containerBlock ? containerBlock.nodeName.toUpperCase() : ''; // IE < 9 & HTML5
888
+
889
+ // Enter inside block contained within a LI then split or insert before/after LI
890
+ var isControlKey = evt && evt.ctrlKey;
891
+ if (containerBlockName == 'LI' && !isControlKey) {
892
+ parentBlock = containerBlock;
893
+ parentBlockName = containerBlockName;
894
+ }
895
+
896
+ // Walks the parent block to the right and look for BR elements
897
+ function hasRightSideContent() {
898
+ var walker = new TreeWalker(container, parentBlock), node;
899
+ var nonEmptyElementsMap = editor.schema.getNonEmptyElements();
900
+
901
+ while ((node = walker.next())) {
902
+ if (nonEmptyElementsMap[node.nodeName.toLowerCase()] || node.length > 0) {
903
+ return true;
904
+ }
905
+ }
906
+ }
907
+
908
+ if (container && container.nodeType == 3 && offset >= container.nodeValue.length) {
909
+ // Insert extra BR element at the end block elements
910
+ if (!isOldIE && !hasRightSideContent()) {
911
+ brElm = dom.create('br');
912
+ rng.insertNode(brElm);
913
+ rng.setStartAfter(brElm);
914
+ rng.setEndAfter(brElm);
915
+ extraBr = true;
916
+ }
917
+ }
918
+
919
+ brElm = dom.create('br');
920
+ rng.insertNode(brElm);
921
+
922
+ // Rendering modes below IE8 doesn't display BR elements in PRE unless we have a \n before it
923
+ var documentMode = dom.doc.documentMode;
924
+ if (isOldIE && parentBlockName == 'PRE' && (!documentMode || documentMode < 8)) {
925
+ brElm.parentNode.insertBefore(dom.doc.createTextNode('\r'), brElm);
926
+ }
927
+
928
+ // Insert temp marker and scroll to that
929
+ marker = dom.create('span', {}, '&nbsp;');
930
+ brElm.parentNode.insertBefore(marker, brElm);
931
+ selection.scrollIntoView(marker);
932
+ dom.remove(marker);
933
+
934
+ if (!extraBr) {
935
+ rng.setStartAfter(brElm);
936
+ rng.setEndAfter(brElm);
937
+ } else {
938
+ rng.setStartBefore(brElm);
939
+ rng.setEndBefore(brElm);
940
+ }
941
+
942
+ selection.setRng(rng);
943
+ editor.undoManager.add();
944
+
945
+ return TRUE;
946
+ }
947
+ });
948
+
949
+ // Add queryCommandState overrides
950
+ addCommands({
951
+ // Override justify commands
952
+ 'JustifyLeft,JustifyCenter,JustifyRight,JustifyFull': function(command) {
953
+ var name = 'align' + command.substring(7);
954
+ var nodes = selection.isCollapsed() ? [dom.getParent(selection.getNode(), dom.isBlock)] : selection.getSelectedBlocks();
955
+ var matches = map(nodes, function(node) {
956
+ return !!formatter.matchNode(node, name);
957
+ });
958
+ return inArray(matches, TRUE) !== -1;
959
+ },
960
+
961
+ 'Bold,Italic,Underline,Strikethrough,Superscript,Subscript': function(command) {
962
+ return isFormatMatch(command);
963
+ },
964
+
965
+ mceBlockQuote: function() {
966
+ return isFormatMatch('blockquote');
967
+ },
968
+
969
+ Outdent: function() {
970
+ var node;
971
+
972
+ if (settings.inline_styles) {
973
+ if ((node = dom.getParent(selection.getStart(), dom.isBlock)) && parseInt(node.style.paddingLeft, 10) > 0) {
974
+ return TRUE;
975
+ }
976
+
977
+ if ((node = dom.getParent(selection.getEnd(), dom.isBlock)) && parseInt(node.style.paddingLeft, 10) > 0) {
978
+ return TRUE;
979
+ }
980
+ }
981
+
982
+ return (
983
+ queryCommandState('InsertUnorderedList') ||
984
+ queryCommandState('InsertOrderedList') ||
985
+ (!settings.inline_styles && !!dom.getParent(selection.getNode(), 'BLOCKQUOTE'))
986
+ );
987
+ },
988
+
989
+ 'InsertUnorderedList,InsertOrderedList': function(command) {
990
+ var list = dom.getParent(selection.getNode(), 'ul,ol');
991
+
992
+ return list &&
993
+ (
994
+ command === 'insertunorderedlist' && list.tagName === 'UL' ||
995
+ command === 'insertorderedlist' && list.tagName === 'OL'
996
+ );
997
+ }
998
+ }, 'state');
999
+
1000
+ // Add queryCommandValue overrides
1001
+ addCommands({
1002
+ 'FontSize,FontName': function(command) {
1003
+ var value = 0, parent;
1004
+
1005
+ if ((parent = dom.getParent(selection.getNode(), 'span'))) {
1006
+ if (command == 'fontsize') {
1007
+ value = parent.style.fontSize;
1008
+ } else {
1009
+ value = parent.style.fontFamily.replace(/, /g, ',').replace(/[\'\"]/g, '').toLowerCase();
1010
+ }
1011
+ }
1012
+
1013
+ return value;
1014
+ }
1015
+ }, 'value');
1016
+
1017
+ // Add undo manager logic
1018
+ addCommands({
1019
+ Undo: function() {
1020
+ editor.undoManager.undo();
1021
+ },
1022
+
1023
+ Redo: function() {
1024
+ editor.undoManager.redo();
1025
+ }
1026
+ });
1027
+ };
1028
+ });