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,1004 @@
1
+ /**
2
+ * Schema.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
+ * Schema validator class.
13
+ *
14
+ * @class tinymce.html.Schema
15
+ * @example
16
+ * if (tinymce.activeEditor.schema.isValidChild('p', 'span'))
17
+ * alert('span is valid child of p.');
18
+ *
19
+ * if (tinymce.activeEditor.schema.getElementRule('p'))
20
+ * alert('P is a valid element.');
21
+ *
22
+ * @class tinymce.html.Schema
23
+ * @version 3.4
24
+ */
25
+ define("tinymce/html/Schema", [
26
+ "tinymce/util/Tools"
27
+ ], function(Tools) {
28
+ var mapCache = {}, dummyObj = {};
29
+ var makeMap = Tools.makeMap, each = Tools.each, extend = Tools.extend, explode = Tools.explode, inArray = Tools.inArray;
30
+
31
+ function split(items, delim) {
32
+ return items ? items.split(delim || ' ') : [];
33
+ }
34
+
35
+ /**
36
+ * Builds a schema lookup table
37
+ *
38
+ * @private
39
+ * @param {String} type html4, html5 or html5-strict schema type.
40
+ * @return {Object} Schema lookup table.
41
+ */
42
+ function compileSchema(type) {
43
+ var schema = {}, globalAttributes, blockContent;
44
+ var phrasingContent, flowContent, html4BlockContent, html4PhrasingContent;
45
+
46
+ function add(name, attributes, children) {
47
+ var ni, i, attributesOrder, args = arguments;
48
+
49
+ function arrayToMap(array, obj) {
50
+ var map = {}, i, l;
51
+
52
+ for (i = 0, l = array.length; i < l; i++) {
53
+ map[array[i]] = obj || {};
54
+ }
55
+
56
+ return map;
57
+ }
58
+
59
+ children = children || [];
60
+ attributes = attributes || "";
61
+
62
+ if (typeof children === "string") {
63
+ children = split(children);
64
+ }
65
+
66
+ // Split string children
67
+ for (i = 3; i < args.length; i++) {
68
+ if (typeof args[i] === "string") {
69
+ args[i] = split(args[i]);
70
+ }
71
+
72
+ children.push.apply(children, args[i]);
73
+ }
74
+
75
+ name = split(name);
76
+ ni = name.length;
77
+ while (ni--) {
78
+ attributesOrder = [].concat(globalAttributes, split(attributes));
79
+ schema[name[ni]] = {
80
+ attributes: arrayToMap(attributesOrder),
81
+ attributesOrder: attributesOrder,
82
+ children: arrayToMap(children, dummyObj)
83
+ };
84
+ }
85
+ }
86
+
87
+ function addAttrs(name, attributes) {
88
+ var ni, schemaItem, i, l;
89
+
90
+ name = split(name);
91
+ ni = name.length;
92
+ attributes = split(attributes);
93
+ while (ni--) {
94
+ schemaItem = schema[name[ni]];
95
+ for (i = 0, l = attributes.length; i < l; i++) {
96
+ schemaItem.attributes[attributes[i]] = {};
97
+ schemaItem.attributesOrder.push(attributes[i]);
98
+ }
99
+ }
100
+ }
101
+
102
+ // Use cached schema
103
+ if (mapCache[type]) {
104
+ return mapCache[type];
105
+ }
106
+
107
+ // Attributes present on all elements
108
+ globalAttributes = split("id accesskey class dir lang style tabindex title");
109
+
110
+ // Event attributes can be opt-in/opt-out
111
+ /*eventAttributes = split("onabort onblur oncancel oncanplay oncanplaythrough onchange onclick onclose oncontextmenu oncuechange " +
112
+ "ondblclick ondrag ondragend ondragenter ondragleave ondragover ondragstart ondrop ondurationchange onemptied onended " +
113
+ "onerror onfocus oninput oninvalid onkeydown onkeypress onkeyup onload onloadeddata onloadedmetadata onloadstart " +
114
+ "onmousedown onmousemove onmouseout onmouseover onmouseup onmousewheel onpause onplay onplaying onprogress onratechange " +
115
+ "onreset onscroll onseeked onseeking onseeking onselect onshow onstalled onsubmit onsuspend ontimeupdate onvolumechange " +
116
+ "onwaiting"
117
+ );*/
118
+
119
+ // Block content elements
120
+ blockContent = split(
121
+ "address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul"
122
+ );
123
+
124
+ // Phrasing content elements from the HTML5 spec (inline)
125
+ phrasingContent = split(
126
+ "a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd " +
127
+ "label map noscript object q s samp script select small span strong sub sup " +
128
+ "textarea u var #text #comment"
129
+ );
130
+
131
+ // Add HTML5 items to globalAttributes, blockContent, phrasingContent
132
+ if (type != "html4") {
133
+ globalAttributes.push.apply(globalAttributes, split("contenteditable contextmenu draggable dropzone " +
134
+ "hidden spellcheck translate"));
135
+ blockContent.push.apply(blockContent, split("article aside details dialog figure header footer hgroup section nav"));
136
+ phrasingContent.push.apply(phrasingContent, split("audio canvas command datalist mark meter output picture " +
137
+ "progress time wbr video ruby bdi keygen"));
138
+ }
139
+
140
+ // Add HTML4 elements unless it's html5-strict
141
+ if (type != "html5-strict") {
142
+ globalAttributes.push("xml:lang");
143
+
144
+ html4PhrasingContent = split("acronym applet basefont big font strike tt");
145
+ phrasingContent.push.apply(phrasingContent, html4PhrasingContent);
146
+
147
+ each(html4PhrasingContent, function(name) {
148
+ add(name, "", phrasingContent);
149
+ });
150
+
151
+ html4BlockContent = split("center dir isindex noframes");
152
+ blockContent.push.apply(blockContent, html4BlockContent);
153
+
154
+ // Flow content elements from the HTML5 spec (block+inline)
155
+ flowContent = [].concat(blockContent, phrasingContent);
156
+
157
+ each(html4BlockContent, function(name) {
158
+ add(name, "", flowContent);
159
+ });
160
+ }
161
+
162
+ // Flow content elements from the HTML5 spec (block+inline)
163
+ flowContent = flowContent || [].concat(blockContent, phrasingContent);
164
+
165
+ // HTML4 base schema TODO: Move HTML5 specific attributes to HTML5 specific if statement
166
+ // Schema items <element name>, <specific attributes>, <children ..>
167
+ add("html", "manifest", "head body");
168
+ add("head", "", "base command link meta noscript script style title");
169
+ add("title hr noscript br");
170
+ add("base", "href target");
171
+ add("link", "href rel media hreflang type sizes hreflang");
172
+ add("meta", "name http-equiv content charset");
173
+ add("style", "media type scoped");
174
+ add("script", "src async defer type charset");
175
+ add("body", "onafterprint onbeforeprint onbeforeunload onblur onerror onfocus " +
176
+ "onhashchange onload onmessage onoffline ononline onpagehide onpageshow " +
177
+ "onpopstate onresize onscroll onstorage onunload", flowContent);
178
+ add("address dt dd div caption", "", flowContent);
179
+ add("h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn", "", phrasingContent);
180
+ add("blockquote", "cite", flowContent);
181
+ add("ol", "reversed start type", "li");
182
+ add("ul", "", "li");
183
+ add("li", "value", flowContent);
184
+ add("dl", "", "dt dd");
185
+ add("a", "href target rel media hreflang type", phrasingContent);
186
+ add("q", "cite", phrasingContent);
187
+ add("ins del", "cite datetime", flowContent);
188
+ add("img", "src sizes srcset alt usemap ismap width height");
189
+ add("iframe", "src name width height", flowContent);
190
+ add("embed", "src type width height");
191
+ add("object", "data type typemustmatch name usemap form width height", flowContent, "param");
192
+ add("param", "name value");
193
+ add("map", "name", flowContent, "area");
194
+ add("area", "alt coords shape href target rel media hreflang type");
195
+ add("table", "border", "caption colgroup thead tfoot tbody tr" + (type == "html4" ? " col" : ""));
196
+ add("colgroup", "span", "col");
197
+ add("col", "span");
198
+ add("tbody thead tfoot", "", "tr");
199
+ add("tr", "", "td th");
200
+ add("td", "colspan rowspan headers", flowContent);
201
+ add("th", "colspan rowspan headers scope abbr", flowContent);
202
+ add("form", "accept-charset action autocomplete enctype method name novalidate target", flowContent);
203
+ add("fieldset", "disabled form name", flowContent, "legend");
204
+ add("label", "form for", phrasingContent);
205
+ add("input", "accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate " +
206
+ "formtarget height list max maxlength min multiple name pattern readonly required size src step type value width"
207
+ );
208
+ add("button", "disabled form formaction formenctype formmethod formnovalidate formtarget name type value",
209
+ type == "html4" ? flowContent : phrasingContent);
210
+ add("select", "disabled form multiple name required size", "option optgroup");
211
+ add("optgroup", "disabled label", "option");
212
+ add("option", "disabled label selected value");
213
+ add("textarea", "cols dirname disabled form maxlength name readonly required rows wrap");
214
+ add("menu", "type label", flowContent, "li");
215
+ add("noscript", "", flowContent);
216
+
217
+ // Extend with HTML5 elements
218
+ if (type != "html4") {
219
+ add("wbr");
220
+ add("ruby", "", phrasingContent, "rt rp");
221
+ add("figcaption", "", flowContent);
222
+ add("mark rt rp summary bdi", "", phrasingContent);
223
+ add("canvas", "width height", flowContent);
224
+ add("video", "src crossorigin poster preload autoplay mediagroup loop " +
225
+ "muted controls width height buffered", flowContent, "track source");
226
+ add("audio", "src crossorigin preload autoplay mediagroup loop muted controls buffered volume", flowContent, "track source");
227
+ add("picture", "", "img source");
228
+ add("source", "src srcset type media sizes");
229
+ add("track", "kind src srclang label default");
230
+ add("datalist", "", phrasingContent, "option");
231
+ add("article section nav aside header footer", "", flowContent);
232
+ add("hgroup", "", "h1 h2 h3 h4 h5 h6");
233
+ add("figure", "", flowContent, "figcaption");
234
+ add("time", "datetime", phrasingContent);
235
+ add("dialog", "open", flowContent);
236
+ add("command", "type label icon disabled checked radiogroup command");
237
+ add("output", "for form name", phrasingContent);
238
+ add("progress", "value max", phrasingContent);
239
+ add("meter", "value min max low high optimum", phrasingContent);
240
+ add("details", "open", flowContent, "summary");
241
+ add("keygen", "autofocus challenge disabled form keytype name");
242
+ }
243
+
244
+ // Extend with HTML4 attributes unless it's html5-strict
245
+ if (type != "html5-strict") {
246
+ addAttrs("script", "language xml:space");
247
+ addAttrs("style", "xml:space");
248
+ addAttrs("object", "declare classid code codebase codetype archive standby align border hspace vspace");
249
+ addAttrs("embed", "align name hspace vspace");
250
+ addAttrs("param", "valuetype type");
251
+ addAttrs("a", "charset name rev shape coords");
252
+ addAttrs("br", "clear");
253
+ addAttrs("applet", "codebase archive code object alt name width height align hspace vspace");
254
+ addAttrs("img", "name longdesc align border hspace vspace");
255
+ addAttrs("iframe", "longdesc frameborder marginwidth marginheight scrolling align");
256
+ addAttrs("font basefont", "size color face");
257
+ addAttrs("input", "usemap align");
258
+ addAttrs("select", "onchange");
259
+ addAttrs("textarea");
260
+ addAttrs("h1 h2 h3 h4 h5 h6 div p legend caption", "align");
261
+ addAttrs("ul", "type compact");
262
+ addAttrs("li", "type");
263
+ addAttrs("ol dl menu dir", "compact");
264
+ addAttrs("pre", "width xml:space");
265
+ addAttrs("hr", "align noshade size width");
266
+ addAttrs("isindex", "prompt");
267
+ addAttrs("table", "summary width frame rules cellspacing cellpadding align bgcolor");
268
+ addAttrs("col", "width align char charoff valign");
269
+ addAttrs("colgroup", "width align char charoff valign");
270
+ addAttrs("thead", "align char charoff valign");
271
+ addAttrs("tr", "align char charoff valign bgcolor");
272
+ addAttrs("th", "axis align char charoff valign nowrap bgcolor width height");
273
+ addAttrs("form", "accept");
274
+ addAttrs("td", "abbr axis scope align char charoff valign nowrap bgcolor width height");
275
+ addAttrs("tfoot", "align char charoff valign");
276
+ addAttrs("tbody", "align char charoff valign");
277
+ addAttrs("area", "nohref");
278
+ addAttrs("body", "background bgcolor text link vlink alink");
279
+ }
280
+
281
+ // Extend with HTML5 attributes unless it's html4
282
+ if (type != "html4") {
283
+ addAttrs("input button select textarea", "autofocus");
284
+ addAttrs("input textarea", "placeholder");
285
+ addAttrs("a", "download");
286
+ addAttrs("link script img", "crossorigin");
287
+ addAttrs("iframe", "sandbox seamless allowfullscreen"); // Excluded: srcdoc
288
+ }
289
+
290
+ // Special: iframe, ruby, video, audio, label
291
+
292
+ // Delete children of the same name from it's parent
293
+ // For example: form can't have a child of the name form
294
+ each(split('a form meter progress dfn'), function(name) {
295
+ if (schema[name]) {
296
+ delete schema[name].children[name];
297
+ }
298
+ });
299
+
300
+ // Delete header, footer, sectioning and heading content descendants
301
+ /*each('dt th address', function(name) {
302
+ delete schema[name].children[name];
303
+ });*/
304
+
305
+ // Caption can't have tables
306
+ delete schema.caption.children.table;
307
+
308
+ // Delete scripts by default due to possible XSS
309
+ delete schema.script;
310
+
311
+ // TODO: LI:s can only have value if parent is OL
312
+
313
+ // TODO: Handle transparent elements
314
+ // a ins del canvas map
315
+
316
+ mapCache[type] = schema;
317
+
318
+ return schema;
319
+ }
320
+
321
+ function compileElementMap(value, mode) {
322
+ var styles;
323
+
324
+ if (value) {
325
+ styles = {};
326
+
327
+ if (typeof value == 'string') {
328
+ value = {
329
+ '*': value
330
+ };
331
+ }
332
+
333
+ // Convert styles into a rule list
334
+ each(value, function(value, key) {
335
+ styles[key] = styles[key.toUpperCase()] = mode == 'map' ? makeMap(value, /[, ]/) : explode(value, /[, ]/);
336
+ });
337
+ }
338
+
339
+ return styles;
340
+ }
341
+
342
+ /**
343
+ * Constructs a new Schema instance.
344
+ *
345
+ * @constructor
346
+ * @method Schema
347
+ * @param {Object} settings Name/value settings object.
348
+ */
349
+ return function(settings) {
350
+ var self = this, elements = {}, children = {}, patternElements = [], validStyles, invalidStyles, schemaItems;
351
+ var whiteSpaceElementsMap, selfClosingElementsMap, shortEndedElementsMap, boolAttrMap, validClasses;
352
+ var blockElementsMap, nonEmptyElementsMap, moveCaretBeforeOnEnterElementsMap, textBlockElementsMap, textInlineElementsMap;
353
+ var customElementsMap = {}, specialElements = {};
354
+
355
+ // Creates an lookup table map object for the specified option or the default value
356
+ function createLookupTable(option, default_value, extendWith) {
357
+ var value = settings[option];
358
+
359
+ if (!value) {
360
+ // Get cached default map or make it if needed
361
+ value = mapCache[option];
362
+
363
+ if (!value) {
364
+ value = makeMap(default_value, ' ', makeMap(default_value.toUpperCase(), ' '));
365
+ value = extend(value, extendWith);
366
+
367
+ mapCache[option] = value;
368
+ }
369
+ } else {
370
+ // Create custom map
371
+ value = makeMap(value, /[, ]/, makeMap(value.toUpperCase(), /[, ]/));
372
+ }
373
+
374
+ return value;
375
+ }
376
+
377
+ settings = settings || {};
378
+ schemaItems = compileSchema(settings.schema);
379
+
380
+ // Allow all elements and attributes if verify_html is set to false
381
+ if (settings.verify_html === false) {
382
+ settings.valid_elements = '*[*]';
383
+ }
384
+
385
+ validStyles = compileElementMap(settings.valid_styles);
386
+ invalidStyles = compileElementMap(settings.invalid_styles, 'map');
387
+ validClasses = compileElementMap(settings.valid_classes, 'map');
388
+
389
+ // Setup map objects
390
+ whiteSpaceElementsMap = createLookupTable('whitespace_elements', 'pre script noscript style textarea video audio iframe object');
391
+ selfClosingElementsMap = createLookupTable('self_closing_elements', 'colgroup dd dt li option p td tfoot th thead tr');
392
+ shortEndedElementsMap = createLookupTable('short_ended_elements', 'area base basefont br col frame hr img input isindex link ' +
393
+ 'meta param embed source wbr track');
394
+ boolAttrMap = createLookupTable('boolean_attributes', 'checked compact declare defer disabled ismap multiple nohref noresize ' +
395
+ 'noshade nowrap readonly selected autoplay loop controls');
396
+ nonEmptyElementsMap = createLookupTable('non_empty_elements', 'td th iframe video audio object script', shortEndedElementsMap);
397
+ moveCaretBeforeOnEnterElementsMap = createLookupTable('move_caret_before_on_enter_elements', 'table', nonEmptyElementsMap);
398
+ textBlockElementsMap = createLookupTable('text_block_elements', 'h1 h2 h3 h4 h5 h6 p div address pre form ' +
399
+ 'blockquote center dir fieldset header footer article section hgroup aside nav figure');
400
+ blockElementsMap = createLookupTable('block_elements', 'hr table tbody thead tfoot ' +
401
+ 'th tr td li ol ul caption dl dt dd noscript menu isindex option ' +
402
+ 'datalist select optgroup figcaption', textBlockElementsMap);
403
+ textInlineElementsMap = createLookupTable('text_inline_elements', 'span strong b em i font strike u var cite ' +
404
+ 'dfn code mark q sup sub samp');
405
+
406
+ each((settings.special || 'script noscript style textarea').split(' '), function(name) {
407
+ specialElements[name] = new RegExp('<\/' + name + '[^>]*>', 'gi');
408
+ });
409
+
410
+ // Converts a wildcard expression string to a regexp for example *a will become /.*a/.
411
+ function patternToRegExp(str) {
412
+ return new RegExp('^' + str.replace(/([?+*])/g, '.$1') + '$');
413
+ }
414
+
415
+ // Parses the specified valid_elements string and adds to the current rules
416
+ // This function is a bit hard to read since it's heavily optimized for speed
417
+ function addValidElements(validElements) {
418
+ var ei, el, ai, al, matches, element, attr, attrData, elementName, attrName, attrType, attributes, attributesOrder,
419
+ prefix, outputName, globalAttributes, globalAttributesOrder, key, value,
420
+ elementRuleRegExp = /^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/,
421
+ attrRuleRegExp = /^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,
422
+ hasPatternsRegExp = /[*?+]/;
423
+
424
+ if (validElements) {
425
+ // Split valid elements into an array with rules
426
+ validElements = split(validElements, ',');
427
+
428
+ if (elements['@']) {
429
+ globalAttributes = elements['@'].attributes;
430
+ globalAttributesOrder = elements['@'].attributesOrder;
431
+ }
432
+
433
+ // Loop all rules
434
+ for (ei = 0, el = validElements.length; ei < el; ei++) {
435
+ // Parse element rule
436
+ matches = elementRuleRegExp.exec(validElements[ei]);
437
+ if (matches) {
438
+ // Setup local names for matches
439
+ prefix = matches[1];
440
+ elementName = matches[2];
441
+ outputName = matches[3];
442
+ attrData = matches[5];
443
+
444
+ // Create new attributes and attributesOrder
445
+ attributes = {};
446
+ attributesOrder = [];
447
+
448
+ // Create the new element
449
+ element = {
450
+ attributes: attributes,
451
+ attributesOrder: attributesOrder
452
+ };
453
+
454
+ // Padd empty elements prefix
455
+ if (prefix === '#') {
456
+ element.paddEmpty = true;
457
+ }
458
+
459
+ // Remove empty elements prefix
460
+ if (prefix === '-') {
461
+ element.removeEmpty = true;
462
+ }
463
+
464
+ if (matches[4] === '!') {
465
+ element.removeEmptyAttrs = true;
466
+ }
467
+
468
+ // Copy attributes from global rule into current rule
469
+ if (globalAttributes) {
470
+ for (key in globalAttributes) {
471
+ attributes[key] = globalAttributes[key];
472
+ }
473
+
474
+ attributesOrder.push.apply(attributesOrder, globalAttributesOrder);
475
+ }
476
+
477
+ // Attributes defined
478
+ if (attrData) {
479
+ attrData = split(attrData, '|');
480
+ for (ai = 0, al = attrData.length; ai < al; ai++) {
481
+ matches = attrRuleRegExp.exec(attrData[ai]);
482
+ if (matches) {
483
+ attr = {};
484
+ attrType = matches[1];
485
+ attrName = matches[2].replace(/::/g, ':');
486
+ prefix = matches[3];
487
+ value = matches[4];
488
+
489
+ // Required
490
+ if (attrType === '!') {
491
+ element.attributesRequired = element.attributesRequired || [];
492
+ element.attributesRequired.push(attrName);
493
+ attr.required = true;
494
+ }
495
+
496
+ // Denied from global
497
+ if (attrType === '-') {
498
+ delete attributes[attrName];
499
+ attributesOrder.splice(inArray(attributesOrder, attrName), 1);
500
+ continue;
501
+ }
502
+
503
+ // Default value
504
+ if (prefix) {
505
+ // Default value
506
+ if (prefix === '=') {
507
+ element.attributesDefault = element.attributesDefault || [];
508
+ element.attributesDefault.push({name: attrName, value: value});
509
+ attr.defaultValue = value;
510
+ }
511
+
512
+ // Forced value
513
+ if (prefix === ':') {
514
+ element.attributesForced = element.attributesForced || [];
515
+ element.attributesForced.push({name: attrName, value: value});
516
+ attr.forcedValue = value;
517
+ }
518
+
519
+ // Required values
520
+ if (prefix === '<') {
521
+ attr.validValues = makeMap(value, '?');
522
+ }
523
+ }
524
+
525
+ // Check for attribute patterns
526
+ if (hasPatternsRegExp.test(attrName)) {
527
+ element.attributePatterns = element.attributePatterns || [];
528
+ attr.pattern = patternToRegExp(attrName);
529
+ element.attributePatterns.push(attr);
530
+ } else {
531
+ // Add attribute to order list if it doesn't already exist
532
+ if (!attributes[attrName]) {
533
+ attributesOrder.push(attrName);
534
+ }
535
+
536
+ attributes[attrName] = attr;
537
+ }
538
+ }
539
+ }
540
+ }
541
+
542
+ // Global rule, store away these for later usage
543
+ if (!globalAttributes && elementName == '@') {
544
+ globalAttributes = attributes;
545
+ globalAttributesOrder = attributesOrder;
546
+ }
547
+
548
+ // Handle substitute elements such as b/strong
549
+ if (outputName) {
550
+ element.outputName = elementName;
551
+ elements[outputName] = element;
552
+ }
553
+
554
+ // Add pattern or exact element
555
+ if (hasPatternsRegExp.test(elementName)) {
556
+ element.pattern = patternToRegExp(elementName);
557
+ patternElements.push(element);
558
+ } else {
559
+ elements[elementName] = element;
560
+ }
561
+ }
562
+ }
563
+ }
564
+ }
565
+
566
+ function setValidElements(validElements) {
567
+ elements = {};
568
+ patternElements = [];
569
+
570
+ addValidElements(validElements);
571
+
572
+ each(schemaItems, function(element, name) {
573
+ children[name] = element.children;
574
+ });
575
+ }
576
+
577
+ // Adds custom non HTML elements to the schema
578
+ function addCustomElements(customElements) {
579
+ var customElementRegExp = /^(~)?(.+)$/;
580
+
581
+ if (customElements) {
582
+ // Flush cached items since we are altering the default maps
583
+ mapCache.text_block_elements = mapCache.block_elements = null;
584
+
585
+ each(split(customElements, ','), function(rule) {
586
+ var matches = customElementRegExp.exec(rule),
587
+ inline = matches[1] === '~',
588
+ cloneName = inline ? 'span' : 'div',
589
+ name = matches[2];
590
+
591
+ children[name] = children[cloneName];
592
+ customElementsMap[name] = cloneName;
593
+
594
+ // If it's not marked as inline then add it to valid block elements
595
+ if (!inline) {
596
+ blockElementsMap[name.toUpperCase()] = {};
597
+ blockElementsMap[name] = {};
598
+ }
599
+
600
+ // Add elements clone if needed
601
+ if (!elements[name]) {
602
+ var customRule = elements[cloneName];
603
+
604
+ customRule = extend({}, customRule);
605
+ delete customRule.removeEmptyAttrs;
606
+ delete customRule.removeEmpty;
607
+
608
+ elements[name] = customRule;
609
+ }
610
+
611
+ // Add custom elements at span/div positions
612
+ each(children, function(element, elmName) {
613
+ if (element[cloneName]) {
614
+ children[elmName] = element = extend({}, children[elmName]);
615
+ element[name] = element[cloneName];
616
+ }
617
+ });
618
+ });
619
+ }
620
+ }
621
+
622
+ // Adds valid children to the schema object
623
+ function addValidChildren(validChildren) {
624
+ var childRuleRegExp = /^([+\-]?)(\w+)\[([^\]]+)\]$/;
625
+
626
+ // Invalidate the schema cache if the schema is mutated
627
+ mapCache[settings.schema] = null;
628
+
629
+ if (validChildren) {
630
+ each(split(validChildren, ','), function(rule) {
631
+ var matches = childRuleRegExp.exec(rule), parent, prefix;
632
+
633
+ if (matches) {
634
+ prefix = matches[1];
635
+
636
+ // Add/remove items from default
637
+ if (prefix) {
638
+ parent = children[matches[2]];
639
+ } else {
640
+ parent = children[matches[2]] = {'#comment': {}};
641
+ }
642
+
643
+ parent = children[matches[2]];
644
+
645
+ each(split(matches[3], '|'), function(child) {
646
+ if (prefix === '-') {
647
+ delete parent[child];
648
+ } else {
649
+ parent[child] = {};
650
+ }
651
+ });
652
+ }
653
+ });
654
+ }
655
+ }
656
+
657
+ function getElementRule(name) {
658
+ var element = elements[name], i;
659
+
660
+ // Exact match found
661
+ if (element) {
662
+ return element;
663
+ }
664
+
665
+ // No exact match then try the patterns
666
+ i = patternElements.length;
667
+ while (i--) {
668
+ element = patternElements[i];
669
+
670
+ if (element.pattern.test(name)) {
671
+ return element;
672
+ }
673
+ }
674
+ }
675
+
676
+ if (!settings.valid_elements) {
677
+ // No valid elements defined then clone the elements from the schema spec
678
+ each(schemaItems, function(element, name) {
679
+ elements[name] = {
680
+ attributes: element.attributes,
681
+ attributesOrder: element.attributesOrder
682
+ };
683
+
684
+ children[name] = element.children;
685
+ });
686
+
687
+ // Switch these on HTML4
688
+ if (settings.schema != "html5") {
689
+ each(split('strong/b em/i'), function(item) {
690
+ item = split(item, '/');
691
+ elements[item[1]].outputName = item[0];
692
+ });
693
+ }
694
+
695
+ // Add default alt attribute for images
696
+ elements.img.attributesDefault = [{name: 'alt', value: ''}];
697
+
698
+ // Remove these if they are empty by default
699
+ each(split('ol ul sub sup blockquote span font a table tbody tr strong em b i'), function(name) {
700
+ if (elements[name]) {
701
+ elements[name].removeEmpty = true;
702
+ }
703
+ });
704
+
705
+ // Padd these by default
706
+ each(split('p h1 h2 h3 h4 h5 h6 th td pre div address caption'), function(name) {
707
+ elements[name].paddEmpty = true;
708
+ });
709
+
710
+ // Remove these if they have no attributes
711
+ each(split('span'), function(name) {
712
+ elements[name].removeEmptyAttrs = true;
713
+ });
714
+
715
+ // Remove these by default
716
+ // TODO: Reenable in 4.1
717
+ /*each(split('script style'), function(name) {
718
+ delete elements[name];
719
+ });*/
720
+ } else {
721
+ setValidElements(settings.valid_elements);
722
+ }
723
+
724
+ addCustomElements(settings.custom_elements);
725
+ addValidChildren(settings.valid_children);
726
+ addValidElements(settings.extended_valid_elements);
727
+
728
+ // Todo: Remove this when we fix list handling to be valid
729
+ addValidChildren('+ol[ul|ol],+ul[ul|ol]');
730
+
731
+ // Delete invalid elements
732
+ if (settings.invalid_elements) {
733
+ each(explode(settings.invalid_elements), function(item) {
734
+ if (elements[item]) {
735
+ delete elements[item];
736
+ }
737
+ });
738
+ }
739
+
740
+ // If the user didn't allow span only allow internal spans
741
+ if (!getElementRule('span')) {
742
+ addValidElements('span[!data-mce-type|*]');
743
+ }
744
+
745
+ /**
746
+ * Name/value map object with valid parents and children to those parents.
747
+ *
748
+ * @example
749
+ * children = {
750
+ * div:{p:{}, h1:{}}
751
+ * };
752
+ * @field children
753
+ * @type Object
754
+ */
755
+ self.children = children;
756
+
757
+ /**
758
+ * Name/value map object with valid styles for each element.
759
+ *
760
+ * @method getValidStyles
761
+ * @type Object
762
+ */
763
+ self.getValidStyles = function() {
764
+ return validStyles;
765
+ };
766
+
767
+ /**
768
+ * Name/value map object with valid styles for each element.
769
+ *
770
+ * @method getInvalidStyles
771
+ * @type Object
772
+ */
773
+ self.getInvalidStyles = function() {
774
+ return invalidStyles;
775
+ };
776
+
777
+ /**
778
+ * Name/value map object with valid classes for each element.
779
+ *
780
+ * @method getValidClasses
781
+ * @type Object
782
+ */
783
+ self.getValidClasses = function() {
784
+ return validClasses;
785
+ };
786
+
787
+ /**
788
+ * Returns a map with boolean attributes.
789
+ *
790
+ * @method getBoolAttrs
791
+ * @return {Object} Name/value lookup map for boolean attributes.
792
+ */
793
+ self.getBoolAttrs = function() {
794
+ return boolAttrMap;
795
+ };
796
+
797
+ /**
798
+ * Returns a map with block elements.
799
+ *
800
+ * @method getBlockElements
801
+ * @return {Object} Name/value lookup map for block elements.
802
+ */
803
+ self.getBlockElements = function() {
804
+ return blockElementsMap;
805
+ };
806
+
807
+ /**
808
+ * Returns a map with text block elements. Such as: p,h1-h6,div,address
809
+ *
810
+ * @method getTextBlockElements
811
+ * @return {Object} Name/value lookup map for block elements.
812
+ */
813
+ self.getTextBlockElements = function() {
814
+ return textBlockElementsMap;
815
+ };
816
+
817
+ /**
818
+ * Returns a map of inline text format nodes for example strong/span or ins.
819
+ *
820
+ * @method getTextInlineElements
821
+ * @return {Object} Name/value lookup map for text format elements.
822
+ */
823
+ self.getTextInlineElements = function() {
824
+ return textInlineElementsMap;
825
+ };
826
+
827
+ /**
828
+ * Returns a map with short ended elements such as BR or IMG.
829
+ *
830
+ * @method getShortEndedElements
831
+ * @return {Object} Name/value lookup map for short ended elements.
832
+ */
833
+ self.getShortEndedElements = function() {
834
+ return shortEndedElementsMap;
835
+ };
836
+
837
+ /**
838
+ * Returns a map with self closing tags such as <li>.
839
+ *
840
+ * @method getSelfClosingElements
841
+ * @return {Object} Name/value lookup map for self closing tags elements.
842
+ */
843
+ self.getSelfClosingElements = function() {
844
+ return selfClosingElementsMap;
845
+ };
846
+
847
+ /**
848
+ * Returns a map with elements that should be treated as contents regardless if it has text
849
+ * content in them or not such as TD, VIDEO or IMG.
850
+ *
851
+ * @method getNonEmptyElements
852
+ * @return {Object} Name/value lookup map for non empty elements.
853
+ */
854
+ self.getNonEmptyElements = function() {
855
+ return nonEmptyElementsMap;
856
+ };
857
+
858
+ /**
859
+ * Returns a map with elements that the caret should be moved in front of after enter is
860
+ * pressed
861
+ *
862
+ * @method getMoveCaretBeforeOnEnterElements
863
+ * @return {Object} Name/value lookup map for elements to place the caret in front of.
864
+ */
865
+ self.getMoveCaretBeforeOnEnterElements = function() {
866
+ return moveCaretBeforeOnEnterElementsMap;
867
+ };
868
+
869
+ /**
870
+ * Returns a map with elements where white space is to be preserved like PRE or SCRIPT.
871
+ *
872
+ * @method getWhiteSpaceElements
873
+ * @return {Object} Name/value lookup map for white space elements.
874
+ */
875
+ self.getWhiteSpaceElements = function() {
876
+ return whiteSpaceElementsMap;
877
+ };
878
+
879
+ /**
880
+ * Returns a map with special elements. These are elements that needs to be parsed
881
+ * in a special way such as script, style, textarea etc. The map object values
882
+ * are regexps used to find the end of the element.
883
+ *
884
+ * @method getSpecialElements
885
+ * @return {Object} Name/value lookup map for special elements.
886
+ */
887
+ self.getSpecialElements = function() {
888
+ return specialElements;
889
+ };
890
+
891
+ /**
892
+ * Returns true/false if the specified element and it's child is valid or not
893
+ * according to the schema.
894
+ *
895
+ * @method isValidChild
896
+ * @param {String} name Element name to check for.
897
+ * @param {String} child Element child to verify.
898
+ * @return {Boolean} True/false if the element is a valid child of the specified parent.
899
+ */
900
+ self.isValidChild = function(name, child) {
901
+ var parent = children[name];
902
+
903
+ return !!(parent && parent[child]);
904
+ };
905
+
906
+ /**
907
+ * Returns true/false if the specified element name and optional attribute is
908
+ * valid according to the schema.
909
+ *
910
+ * @method isValid
911
+ * @param {String} name Name of element to check.
912
+ * @param {String} attr Optional attribute name to check for.
913
+ * @return {Boolean} True/false if the element and attribute is valid.
914
+ */
915
+ self.isValid = function(name, attr) {
916
+ var attrPatterns, i, rule = getElementRule(name);
917
+
918
+ // Check if it's a valid element
919
+ if (rule) {
920
+ if (attr) {
921
+ // Check if attribute name exists
922
+ if (rule.attributes[attr]) {
923
+ return true;
924
+ }
925
+
926
+ // Check if attribute matches a regexp pattern
927
+ attrPatterns = rule.attributePatterns;
928
+ if (attrPatterns) {
929
+ i = attrPatterns.length;
930
+ while (i--) {
931
+ if (attrPatterns[i].pattern.test(name)) {
932
+ return true;
933
+ }
934
+ }
935
+ }
936
+ } else {
937
+ return true;
938
+ }
939
+ }
940
+
941
+ // No match
942
+ return false;
943
+ };
944
+
945
+ /**
946
+ * Returns true/false if the specified element is valid or not
947
+ * according to the schema.
948
+ *
949
+ * @method getElementRule
950
+ * @param {String} name Element name to check for.
951
+ * @return {Object} Element object or undefined if the element isn't valid.
952
+ */
953
+ self.getElementRule = getElementRule;
954
+
955
+ /**
956
+ * Returns an map object of all custom elements.
957
+ *
958
+ * @method getCustomElements
959
+ * @return {Object} Name/value map object of all custom elements.
960
+ */
961
+ self.getCustomElements = function() {
962
+ return customElementsMap;
963
+ };
964
+
965
+ /**
966
+ * Parses a valid elements string and adds it to the schema. The valid elements
967
+ * format is for example "element[attr=default|otherattr]".
968
+ * Existing rules will be replaced with the ones specified, so this extends the schema.
969
+ *
970
+ * @method addValidElements
971
+ * @param {String} valid_elements String in the valid elements format to be parsed.
972
+ */
973
+ self.addValidElements = addValidElements;
974
+
975
+ /**
976
+ * Parses a valid elements string and sets it to the schema. The valid elements
977
+ * format is for example "element[attr=default|otherattr]".
978
+ * Existing rules will be replaced with the ones specified, so this extends the schema.
979
+ *
980
+ * @method setValidElements
981
+ * @param {String} valid_elements String in the valid elements format to be parsed.
982
+ */
983
+ self.setValidElements = setValidElements;
984
+
985
+ /**
986
+ * Adds custom non HTML elements to the schema.
987
+ *
988
+ * @method addCustomElements
989
+ * @param {String} custom_elements Comma separated list of custom elements to add.
990
+ */
991
+ self.addCustomElements = addCustomElements;
992
+
993
+ /**
994
+ * Parses a valid children string and adds them to the schema structure. The valid children
995
+ * format is for example: "element[child1|child2]".
996
+ *
997
+ * @method addValidChildren
998
+ * @param {String} valid_children Valid children elements string to parse
999
+ */
1000
+ self.addValidChildren = addValidChildren;
1001
+
1002
+ self.elements = elements;
1003
+ };
1004
+ });