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,190 @@
1
+ /**
2
+ * StyleSheetLoader.js
3
+ *
4
+ * Released under LGPL License.
5
+ * Copyright (c) 1999-2015 Ephox Corp. All rights reserved
6
+ *
7
+ * License: http://www.tinymce.com/license
8
+ * Contributing: http://www.tinymce.com/contributing
9
+ */
10
+
11
+ /**
12
+ * This class handles loading of external stylesheets and fires events when these are loaded.
13
+ *
14
+ * @class tinymce.dom.StyleSheetLoader
15
+ * @private
16
+ */
17
+ define("tinymce/dom/StyleSheetLoader", [
18
+ "tinymce/util/Tools",
19
+ "tinymce/util/Delay"
20
+ ], function(Tools, Delay) {
21
+ "use strict";
22
+
23
+ return function(document, settings) {
24
+ var idCount = 0, loadedStates = {}, maxLoadTime;
25
+
26
+ settings = settings || {};
27
+ maxLoadTime = settings.maxLoadTime || 5000;
28
+
29
+ function appendToHead(node) {
30
+ document.getElementsByTagName('head')[0].appendChild(node);
31
+ }
32
+
33
+ /**
34
+ * Loads the specified css style sheet file and call the loadedCallback once it's finished loading.
35
+ *
36
+ * @method load
37
+ * @param {String} url Url to be loaded.
38
+ * @param {Function} loadedCallback Callback to be executed when loaded.
39
+ * @param {Function} errorCallback Callback to be executed when failed loading.
40
+ */
41
+ function load(url, loadedCallback, errorCallback) {
42
+ var link, style, startTime, state;
43
+
44
+ function passed() {
45
+ var callbacks = state.passed, i = callbacks.length;
46
+
47
+ while (i--) {
48
+ callbacks[i]();
49
+ }
50
+
51
+ state.status = 2;
52
+ state.passed = [];
53
+ state.failed = [];
54
+ }
55
+
56
+ function failed() {
57
+ var callbacks = state.failed, i = callbacks.length;
58
+
59
+ while (i--) {
60
+ callbacks[i]();
61
+ }
62
+
63
+ state.status = 3;
64
+ state.passed = [];
65
+ state.failed = [];
66
+ }
67
+
68
+ // Sniffs for older WebKit versions that have the link.onload but a broken one
69
+ function isOldWebKit() {
70
+ var webKitChunks = navigator.userAgent.match(/WebKit\/(\d*)/);
71
+ return !!(webKitChunks && webKitChunks[1] < 536);
72
+ }
73
+
74
+ // Calls the waitCallback until the test returns true or the timeout occurs
75
+ function wait(testCallback, waitCallback) {
76
+ if (!testCallback()) {
77
+ // Wait for timeout
78
+ if ((new Date().getTime()) - startTime < maxLoadTime) {
79
+ Delay.setTimeout(waitCallback);
80
+ } else {
81
+ failed();
82
+ }
83
+ }
84
+ }
85
+
86
+ // Workaround for WebKit that doesn't properly support the onload event for link elements
87
+ // Or WebKit that fires the onload event before the StyleSheet is added to the document
88
+ function waitForWebKitLinkLoaded() {
89
+ wait(function() {
90
+ var styleSheets = document.styleSheets, styleSheet, i = styleSheets.length, owner;
91
+
92
+ while (i--) {
93
+ styleSheet = styleSheets[i];
94
+ owner = styleSheet.ownerNode ? styleSheet.ownerNode : styleSheet.owningElement;
95
+ if (owner && owner.id === link.id) {
96
+ passed();
97
+ return true;
98
+ }
99
+ }
100
+ }, waitForWebKitLinkLoaded);
101
+ }
102
+
103
+ // Workaround for older Geckos that doesn't have any onload event for StyleSheets
104
+ function waitForGeckoLinkLoaded() {
105
+ wait(function() {
106
+ try {
107
+ // Accessing the cssRules will throw an exception until the CSS file is loaded
108
+ var cssRules = style.sheet.cssRules;
109
+ passed();
110
+ return !!cssRules;
111
+ } catch (ex) {
112
+ // Ignore
113
+ }
114
+ }, waitForGeckoLinkLoaded);
115
+ }
116
+
117
+ url = Tools._addCacheSuffix(url);
118
+
119
+ if (!loadedStates[url]) {
120
+ state = {
121
+ passed: [],
122
+ failed: []
123
+ };
124
+
125
+ loadedStates[url] = state;
126
+ } else {
127
+ state = loadedStates[url];
128
+ }
129
+
130
+ if (loadedCallback) {
131
+ state.passed.push(loadedCallback);
132
+ }
133
+
134
+ if (errorCallback) {
135
+ state.failed.push(errorCallback);
136
+ }
137
+
138
+ // Is loading wait for it to pass
139
+ if (state.status == 1) {
140
+ return;
141
+ }
142
+
143
+ // Has finished loading and was success
144
+ if (state.status == 2) {
145
+ passed();
146
+ return;
147
+ }
148
+
149
+ // Has finished loading and was a failure
150
+ if (state.status == 3) {
151
+ failed();
152
+ return;
153
+ }
154
+
155
+ // Start loading
156
+ state.status = 1;
157
+ link = document.createElement('link');
158
+ link.rel = 'stylesheet';
159
+ link.type = 'text/css';
160
+ link.id = 'u' + (idCount++);
161
+ link.async = false;
162
+ link.defer = false;
163
+ startTime = new Date().getTime();
164
+
165
+ // Feature detect onload on link element and sniff older webkits since it has an broken onload event
166
+ if ("onload" in link && !isOldWebKit()) {
167
+ link.onload = waitForWebKitLinkLoaded;
168
+ link.onerror = failed;
169
+ } else {
170
+ // Sniff for old Firefox that doesn't support the onload event on link elements
171
+ // TODO: Remove this in the future when everyone uses modern browsers
172
+ if (navigator.userAgent.indexOf("Firefox") > 0) {
173
+ style = document.createElement('style');
174
+ style.textContent = '@import "' + url + '"';
175
+ waitForGeckoLinkLoaded();
176
+ appendToHead(style);
177
+ return;
178
+ }
179
+
180
+ // Use the id owner on older webkits
181
+ waitForWebKitLinkLoaded();
182
+ }
183
+
184
+ appendToHead(link);
185
+ link.href = url;
186
+ }
187
+
188
+ this.load = load;
189
+ };
190
+ });
@@ -0,0 +1,127 @@
1
+ /**
2
+ * TreeWalker.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
+ * TreeWalker class enables you to walk the DOM in a linear manner.
13
+ *
14
+ * @class tinymce.dom.TreeWalker
15
+ * @example
16
+ * var walker = new tinymce.dom.TreeWalker(startNode);
17
+ *
18
+ * do {
19
+ * console.log(walker.current());
20
+ * } while (walker.next());
21
+ */
22
+ define("tinymce/dom/TreeWalker", [], function() {
23
+ /**
24
+ * Constructs a new TreeWalker instance.
25
+ *
26
+ * @constructor
27
+ * @method TreeWalker
28
+ * @param {Node} startNode Node to start walking from.
29
+ * @param {node} rootNode Optional root node to never walk out of.
30
+ */
31
+ return function(startNode, rootNode) {
32
+ var node = startNode;
33
+
34
+ function findSibling(node, startName, siblingName, shallow) {
35
+ var sibling, parent;
36
+
37
+ if (node) {
38
+ // Walk into nodes if it has a start
39
+ if (!shallow && node[startName]) {
40
+ return node[startName];
41
+ }
42
+
43
+ // Return the sibling if it has one
44
+ if (node != rootNode) {
45
+ sibling = node[siblingName];
46
+ if (sibling) {
47
+ return sibling;
48
+ }
49
+
50
+ // Walk up the parents to look for siblings
51
+ for (parent = node.parentNode; parent && parent != rootNode; parent = parent.parentNode) {
52
+ sibling = parent[siblingName];
53
+ if (sibling) {
54
+ return sibling;
55
+ }
56
+ }
57
+ }
58
+ }
59
+ }
60
+
61
+ function findPreviousNode(node, startName, siblingName, shallow) {
62
+ var sibling, parent, child;
63
+
64
+ if (node) {
65
+ sibling = node[siblingName];
66
+ if (rootNode && sibling === rootNode) {
67
+ return;
68
+ }
69
+
70
+ if (sibling) {
71
+ if (!shallow) {
72
+ // Walk up the parents to look for siblings
73
+ for (child = sibling[startName]; child; child = child[startName]) {
74
+ if (!child[startName]) {
75
+ return child;
76
+ }
77
+ }
78
+ }
79
+
80
+ return sibling;
81
+ }
82
+
83
+ parent = node.parentNode;
84
+ if (parent && parent !== rootNode) {
85
+ return parent;
86
+ }
87
+ }
88
+ }
89
+
90
+ /**
91
+ * Returns the current node.
92
+ *
93
+ * @method current
94
+ * @return {Node} Current node where the walker is.
95
+ */
96
+ this.current = function() {
97
+ return node;
98
+ };
99
+
100
+ /**
101
+ * Walks to the next node in tree.
102
+ *
103
+ * @method next
104
+ * @return {Node} Current node where the walker is after moving to the next node.
105
+ */
106
+ this.next = function(shallow) {
107
+ node = findSibling(node, 'firstChild', 'nextSibling', shallow);
108
+ return node;
109
+ };
110
+
111
+ /**
112
+ * Walks to the previous node in tree.
113
+ *
114
+ * @method prev
115
+ * @return {Node} Current node where the walker is after moving to the previous node.
116
+ */
117
+ this.prev = function(shallow) {
118
+ node = findSibling(node, 'lastChild', 'previousSibling', shallow);
119
+ return node;
120
+ };
121
+
122
+ this.prev2 = function(shallow) {
123
+ node = findPreviousNode(node, 'lastChild', 'previousSibling', shallow);
124
+ return node;
125
+ };
126
+ };
127
+ });
@@ -0,0 +1,508 @@
1
+ /**
2
+ * TridentSelection.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
+ * Selection class for old explorer versions. This one fakes the
13
+ * native selection object available on modern browsers.
14
+ *
15
+ * @private
16
+ * @class tinymce.dom.TridentSelection
17
+ */
18
+ define("tinymce/dom/TridentSelection", [], function() {
19
+ function Selection(selection) {
20
+ var self = this, dom = selection.dom, FALSE = false;
21
+
22
+ function getPosition(rng, start) {
23
+ var checkRng, startIndex = 0, endIndex, inside,
24
+ children, child, offset, index, position = -1, parent;
25
+
26
+ // Setup test range, collapse it and get the parent
27
+ checkRng = rng.duplicate();
28
+ checkRng.collapse(start);
29
+ parent = checkRng.parentElement();
30
+
31
+ // Check if the selection is within the right document
32
+ if (parent.ownerDocument !== selection.dom.doc) {
33
+ return;
34
+ }
35
+
36
+ // IE will report non editable elements as it's parent so look for an editable one
37
+ while (parent.contentEditable === "false") {
38
+ parent = parent.parentNode;
39
+ }
40
+
41
+ // If parent doesn't have any children then return that we are inside the element
42
+ if (!parent.hasChildNodes()) {
43
+ return {node: parent, inside: 1};
44
+ }
45
+
46
+ // Setup node list and endIndex
47
+ children = parent.children;
48
+ endIndex = children.length - 1;
49
+
50
+ // Perform a binary search for the position
51
+ while (startIndex <= endIndex) {
52
+ index = Math.floor((startIndex + endIndex) / 2);
53
+
54
+ // Move selection to node and compare the ranges
55
+ child = children[index];
56
+ checkRng.moveToElementText(child);
57
+ position = checkRng.compareEndPoints(start ? 'StartToStart' : 'EndToEnd', rng);
58
+
59
+ // Before/after or an exact match
60
+ if (position > 0) {
61
+ endIndex = index - 1;
62
+ } else if (position < 0) {
63
+ startIndex = index + 1;
64
+ } else {
65
+ return {node: child};
66
+ }
67
+ }
68
+
69
+ // Check if child position is before or we didn't find a position
70
+ if (position < 0) {
71
+ // No element child was found use the parent element and the offset inside that
72
+ if (!child) {
73
+ checkRng.moveToElementText(parent);
74
+ checkRng.collapse(true);
75
+ child = parent;
76
+ inside = true;
77
+ } else {
78
+ checkRng.collapse(false);
79
+ }
80
+
81
+ // Walk character by character in text node until we hit the selected range endpoint,
82
+ // hit the end of document or parent isn't the right one
83
+ // We need to walk char by char since rng.text or rng.htmlText will trim line endings
84
+ offset = 0;
85
+ while (checkRng.compareEndPoints(start ? 'StartToStart' : 'StartToEnd', rng) !== 0) {
86
+ if (checkRng.move('character', 1) === 0 || parent != checkRng.parentElement()) {
87
+ break;
88
+ }
89
+
90
+ offset++;
91
+ }
92
+ } else {
93
+ // Child position is after the selection endpoint
94
+ checkRng.collapse(true);
95
+
96
+ // Walk character by character in text node until we hit the selected range endpoint, hit
97
+ // the end of document or parent isn't the right one
98
+ offset = 0;
99
+ while (checkRng.compareEndPoints(start ? 'StartToStart' : 'StartToEnd', rng) !== 0) {
100
+ if (checkRng.move('character', -1) === 0 || parent != checkRng.parentElement()) {
101
+ break;
102
+ }
103
+
104
+ offset++;
105
+ }
106
+ }
107
+
108
+ return {node: child, position: position, offset: offset, inside: inside};
109
+ }
110
+
111
+ // Returns a W3C DOM compatible range object by using the IE Range API
112
+ function getRange() {
113
+ var ieRange = selection.getRng(), domRange = dom.createRng(), element, collapsed, tmpRange, element2, bookmark;
114
+
115
+ // If selection is outside the current document just return an empty range
116
+ element = ieRange.item ? ieRange.item(0) : ieRange.parentElement();
117
+ if (element.ownerDocument != dom.doc) {
118
+ return domRange;
119
+ }
120
+
121
+ collapsed = selection.isCollapsed();
122
+
123
+ // Handle control selection
124
+ if (ieRange.item) {
125
+ domRange.setStart(element.parentNode, dom.nodeIndex(element));
126
+ domRange.setEnd(domRange.startContainer, domRange.startOffset + 1);
127
+
128
+ return domRange;
129
+ }
130
+
131
+ function findEndPoint(start) {
132
+ var endPoint = getPosition(ieRange, start), container, offset, textNodeOffset = 0, sibling, undef, nodeValue;
133
+
134
+ container = endPoint.node;
135
+ offset = endPoint.offset;
136
+
137
+ if (endPoint.inside && !container.hasChildNodes()) {
138
+ domRange[start ? 'setStart' : 'setEnd'](container, 0);
139
+ return;
140
+ }
141
+
142
+ if (offset === undef) {
143
+ domRange[start ? 'setStartBefore' : 'setEndAfter'](container);
144
+ return;
145
+ }
146
+
147
+ if (endPoint.position < 0) {
148
+ sibling = endPoint.inside ? container.firstChild : container.nextSibling;
149
+
150
+ if (!sibling) {
151
+ domRange[start ? 'setStartAfter' : 'setEndAfter'](container);
152
+ return;
153
+ }
154
+
155
+ if (!offset) {
156
+ if (sibling.nodeType == 3) {
157
+ domRange[start ? 'setStart' : 'setEnd'](sibling, 0);
158
+ } else {
159
+ domRange[start ? 'setStartBefore' : 'setEndBefore'](sibling);
160
+ }
161
+
162
+ return;
163
+ }
164
+
165
+ // Find the text node and offset
166
+ while (sibling) {
167
+ if (sibling.nodeType == 3) {
168
+ nodeValue = sibling.nodeValue;
169
+ textNodeOffset += nodeValue.length;
170
+
171
+ // We are at or passed the position we where looking for
172
+ if (textNodeOffset >= offset) {
173
+ container = sibling;
174
+ textNodeOffset -= offset;
175
+ textNodeOffset = nodeValue.length - textNodeOffset;
176
+ break;
177
+ }
178
+ }
179
+
180
+ sibling = sibling.nextSibling;
181
+ }
182
+ } else {
183
+ // Find the text node and offset
184
+ sibling = container.previousSibling;
185
+
186
+ if (!sibling) {
187
+ return domRange[start ? 'setStartBefore' : 'setEndBefore'](container);
188
+ }
189
+
190
+ // If there isn't any text to loop then use the first position
191
+ if (!offset) {
192
+ if (container.nodeType == 3) {
193
+ domRange[start ? 'setStart' : 'setEnd'](sibling, container.nodeValue.length);
194
+ } else {
195
+ domRange[start ? 'setStartAfter' : 'setEndAfter'](sibling);
196
+ }
197
+
198
+ return;
199
+ }
200
+
201
+ while (sibling) {
202
+ if (sibling.nodeType == 3) {
203
+ textNodeOffset += sibling.nodeValue.length;
204
+
205
+ // We are at or passed the position we where looking for
206
+ if (textNodeOffset >= offset) {
207
+ container = sibling;
208
+ textNodeOffset -= offset;
209
+ break;
210
+ }
211
+ }
212
+
213
+ sibling = sibling.previousSibling;
214
+ }
215
+ }
216
+
217
+ domRange[start ? 'setStart' : 'setEnd'](container, textNodeOffset);
218
+ }
219
+
220
+ try {
221
+ // Find start point
222
+ findEndPoint(true);
223
+
224
+ // Find end point if needed
225
+ if (!collapsed) {
226
+ findEndPoint();
227
+ }
228
+ } catch (ex) {
229
+ // IE has a nasty bug where text nodes might throw "invalid argument" when you
230
+ // access the nodeValue or other properties of text nodes. This seems to happen when
231
+ // text nodes are split into two nodes by a delete/backspace call.
232
+ // So let us detect and try to fix it.
233
+ if (ex.number == -2147024809) {
234
+ // Get the current selection
235
+ bookmark = self.getBookmark(2);
236
+
237
+ // Get start element
238
+ tmpRange = ieRange.duplicate();
239
+ tmpRange.collapse(true);
240
+ element = tmpRange.parentElement();
241
+
242
+ // Get end element
243
+ if (!collapsed) {
244
+ tmpRange = ieRange.duplicate();
245
+ tmpRange.collapse(false);
246
+ element2 = tmpRange.parentElement();
247
+ element2.innerHTML = element2.innerHTML;
248
+ }
249
+
250
+ // Remove the broken elements
251
+ element.innerHTML = element.innerHTML;
252
+
253
+ // Restore the selection
254
+ self.moveToBookmark(bookmark);
255
+
256
+ // Since the range has moved we need to re-get it
257
+ ieRange = selection.getRng();
258
+
259
+ // Find start point
260
+ findEndPoint(true);
261
+
262
+ // Find end point if needed
263
+ if (!collapsed) {
264
+ findEndPoint();
265
+ }
266
+ } else {
267
+ throw ex; // Throw other errors
268
+ }
269
+ }
270
+
271
+ return domRange;
272
+ }
273
+
274
+ this.getBookmark = function(type) {
275
+ var rng = selection.getRng(), bookmark = {};
276
+
277
+ function getIndexes(node) {
278
+ var parent, root, children, i, indexes = [];
279
+
280
+ parent = node.parentNode;
281
+ root = dom.getRoot().parentNode;
282
+
283
+ while (parent != root && parent.nodeType !== 9) {
284
+ children = parent.children;
285
+
286
+ i = children.length;
287
+ while (i--) {
288
+ if (node === children[i]) {
289
+ indexes.push(i);
290
+ break;
291
+ }
292
+ }
293
+
294
+ node = parent;
295
+ parent = parent.parentNode;
296
+ }
297
+
298
+ return indexes;
299
+ }
300
+
301
+ function getBookmarkEndPoint(start) {
302
+ var position;
303
+
304
+ position = getPosition(rng, start);
305
+ if (position) {
306
+ return {
307
+ position: position.position,
308
+ offset: position.offset,
309
+ indexes: getIndexes(position.node),
310
+ inside: position.inside
311
+ };
312
+ }
313
+ }
314
+
315
+ // Non ubstructive bookmark
316
+ if (type === 2) {
317
+ // Handle text selection
318
+ if (!rng.item) {
319
+ bookmark.start = getBookmarkEndPoint(true);
320
+
321
+ if (!selection.isCollapsed()) {
322
+ bookmark.end = getBookmarkEndPoint();
323
+ }
324
+ } else {
325
+ bookmark.start = {ctrl: true, indexes: getIndexes(rng.item(0))};
326
+ }
327
+ }
328
+
329
+ return bookmark;
330
+ };
331
+
332
+ this.moveToBookmark = function(bookmark) {
333
+ var rng, body = dom.doc.body;
334
+
335
+ function resolveIndexes(indexes) {
336
+ var node, i, idx, children;
337
+
338
+ node = dom.getRoot();
339
+ for (i = indexes.length - 1; i >= 0; i--) {
340
+ children = node.children;
341
+ idx = indexes[i];
342
+
343
+ if (idx <= children.length - 1) {
344
+ node = children[idx];
345
+ }
346
+ }
347
+
348
+ return node;
349
+ }
350
+
351
+ function setBookmarkEndPoint(start) {
352
+ var endPoint = bookmark[start ? 'start' : 'end'], moveLeft, moveRng, undef, offset;
353
+
354
+ if (endPoint) {
355
+ moveLeft = endPoint.position > 0;
356
+
357
+ moveRng = body.createTextRange();
358
+ moveRng.moveToElementText(resolveIndexes(endPoint.indexes));
359
+
360
+ offset = endPoint.offset;
361
+ if (offset !== undef) {
362
+ moveRng.collapse(endPoint.inside || moveLeft);
363
+ moveRng.moveStart('character', moveLeft ? -offset : offset);
364
+ } else {
365
+ moveRng.collapse(start);
366
+ }
367
+
368
+ rng.setEndPoint(start ? 'StartToStart' : 'EndToStart', moveRng);
369
+
370
+ if (start) {
371
+ rng.collapse(true);
372
+ }
373
+ }
374
+ }
375
+
376
+ if (bookmark.start) {
377
+ if (bookmark.start.ctrl) {
378
+ rng = body.createControlRange();
379
+ rng.addElement(resolveIndexes(bookmark.start.indexes));
380
+ rng.select();
381
+ } else {
382
+ rng = body.createTextRange();
383
+ setBookmarkEndPoint(true);
384
+ setBookmarkEndPoint();
385
+ rng.select();
386
+ }
387
+ }
388
+ };
389
+
390
+ this.addRange = function(rng) {
391
+ var ieRng, ctrlRng, startContainer, startOffset, endContainer, endOffset, sibling,
392
+ doc = selection.dom.doc, body = doc.body, nativeRng, ctrlElm;
393
+
394
+ function setEndPoint(start) {
395
+ var container, offset, marker, tmpRng, nodes;
396
+
397
+ marker = dom.create('a');
398
+ container = start ? startContainer : endContainer;
399
+ offset = start ? startOffset : endOffset;
400
+ tmpRng = ieRng.duplicate();
401
+
402
+ if (container == doc || container == doc.documentElement) {
403
+ container = body;
404
+ offset = 0;
405
+ }
406
+
407
+ if (container.nodeType == 3) {
408
+ container.parentNode.insertBefore(marker, container);
409
+ tmpRng.moveToElementText(marker);
410
+ tmpRng.moveStart('character', offset);
411
+ dom.remove(marker);
412
+ ieRng.setEndPoint(start ? 'StartToStart' : 'EndToEnd', tmpRng);
413
+ } else {
414
+ nodes = container.childNodes;
415
+
416
+ if (nodes.length) {
417
+ if (offset >= nodes.length) {
418
+ dom.insertAfter(marker, nodes[nodes.length - 1]);
419
+ } else {
420
+ container.insertBefore(marker, nodes[offset]);
421
+ }
422
+
423
+ tmpRng.moveToElementText(marker);
424
+ } else if (container.canHaveHTML) {
425
+ // Empty node selection for example <div>|</div>
426
+ // Setting innerHTML with a span marker then remove that marker seems to keep empty block elements open
427
+ container.innerHTML = '<span>&#xFEFF;</span>';
428
+ marker = container.firstChild;
429
+ tmpRng.moveToElementText(marker);
430
+ tmpRng.collapse(FALSE); // Collapse false works better than true for some odd reason
431
+ }
432
+
433
+ ieRng.setEndPoint(start ? 'StartToStart' : 'EndToEnd', tmpRng);
434
+ dom.remove(marker);
435
+ }
436
+ }
437
+
438
+ // Setup some shorter versions
439
+ startContainer = rng.startContainer;
440
+ startOffset = rng.startOffset;
441
+ endContainer = rng.endContainer;
442
+ endOffset = rng.endOffset;
443
+ ieRng = body.createTextRange();
444
+
445
+ // If single element selection then try making a control selection out of it
446
+ if (startContainer == endContainer && startContainer.nodeType == 1) {
447
+ // Trick to place the caret inside an empty block element like <p></p>
448
+ if (startOffset == endOffset && !startContainer.hasChildNodes()) {
449
+ if (startContainer.canHaveHTML) {
450
+ // Check if previous sibling is an empty block if it is then we need to render it
451
+ // IE would otherwise move the caret into the sibling instead of the empty startContainer see: #5236
452
+ // Example this: <p></p><p>|</p> would become this: <p>|</p><p></p>
453
+ sibling = startContainer.previousSibling;
454
+ if (sibling && !sibling.hasChildNodes() && dom.isBlock(sibling)) {
455
+ sibling.innerHTML = '&#xFEFF;';
456
+ } else {
457
+ sibling = null;
458
+ }
459
+
460
+ startContainer.innerHTML = '<span>&#xFEFF;</span><span>&#xFEFF;</span>';
461
+ ieRng.moveToElementText(startContainer.lastChild);
462
+ ieRng.select();
463
+ dom.doc.selection.clear();
464
+ startContainer.innerHTML = '';
465
+
466
+ if (sibling) {
467
+ sibling.innerHTML = '';
468
+ }
469
+ return;
470
+ }
471
+
472
+ startOffset = dom.nodeIndex(startContainer);
473
+ startContainer = startContainer.parentNode;
474
+ }
475
+
476
+ if (startOffset == endOffset - 1) {
477
+ try {
478
+ ctrlElm = startContainer.childNodes[startOffset];
479
+ ctrlRng = body.createControlRange();
480
+ ctrlRng.addElement(ctrlElm);
481
+ ctrlRng.select();
482
+
483
+ // Check if the range produced is on the correct element and is a control range
484
+ // On IE 8 it will select the parent contentEditable container if you select an inner element see: #5398
485
+ nativeRng = selection.getRng();
486
+ if (nativeRng.item && ctrlElm === nativeRng.item(0)) {
487
+ return;
488
+ }
489
+ } catch (ex) {
490
+ // Ignore
491
+ }
492
+ }
493
+ }
494
+
495
+ // Set start/end point of selection
496
+ setEndPoint(true);
497
+ setEndPoint();
498
+
499
+ // Select the new range and scroll it into view
500
+ ieRng.select();
501
+ };
502
+
503
+ // Expose range method
504
+ this.getRangeAt = getRange;
505
+ }
506
+
507
+ return Selection;
508
+ });