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,33 @@
1
+ /**
2
+ * Utils.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
+ * Various utility functions.
13
+ *
14
+ * @class tinymce.codesample.Utils
15
+ * @private
16
+ */
17
+ define("tinymce/codesampleplugin/Utils", [
18
+ ], function() {
19
+ function isCodeSample(elm) {
20
+ return elm && elm.nodeName == 'PRE' && elm.className.indexOf('language-') !== -1;
21
+ }
22
+
23
+ function trimArg(predicateFn) {
24
+ return function(arg1, arg2) {
25
+ return predicateFn(arg2);
26
+ };
27
+ }
28
+
29
+ return {
30
+ isCodeSample: isCodeSample,
31
+ trimArg: trimArg
32
+ };
33
+ });
@@ -0,0 +1,138 @@
1
+ /* http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript */
2
+ /**
3
+ * prism.js default theme for JavaScript, CSS and HTML
4
+ * Based on dabblet (http://dabblet.com)
5
+ * @author Lea Verou
6
+ */
7
+
8
+ code[class*="language-"],
9
+ pre[class*="language-"] {
10
+ color: black;
11
+ text-shadow: 0 1px white;
12
+ font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
13
+ direction: ltr;
14
+ text-align: left;
15
+ white-space: pre;
16
+ word-spacing: normal;
17
+ word-break: normal;
18
+ word-wrap: normal;
19
+ line-height: 1.5;
20
+
21
+ -moz-tab-size: 4;
22
+ -o-tab-size: 4;
23
+ tab-size: 4;
24
+
25
+ -webkit-hyphens: none;
26
+ -moz-hyphens: none;
27
+ -ms-hyphens: none;
28
+ hyphens: none;
29
+ }
30
+
31
+ pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
32
+ code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
33
+ text-shadow: none;
34
+ background: #b3d4fc;
35
+ }
36
+
37
+ pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
38
+ code[class*="language-"]::selection, code[class*="language-"] ::selection {
39
+ text-shadow: none;
40
+ background: #b3d4fc;
41
+ }
42
+
43
+ @media print {
44
+ code[class*="language-"],
45
+ pre[class*="language-"] {
46
+ text-shadow: none;
47
+ }
48
+ }
49
+
50
+ /* Code blocks */
51
+ pre[class*="language-"] {
52
+ padding: 1em;
53
+ margin: .5em 0;
54
+ overflow: auto;
55
+ }
56
+
57
+ :not(pre) > code[class*="language-"],
58
+ pre[class*="language-"] {
59
+ background: #f5f2f0;
60
+ }
61
+
62
+ /* Inline code */
63
+ :not(pre) > code[class*="language-"] {
64
+ padding: .1em;
65
+ border-radius: .3em;
66
+ }
67
+
68
+ .token.comment,
69
+ .token.prolog,
70
+ .token.doctype,
71
+ .token.cdata {
72
+ color: slategray;
73
+ }
74
+
75
+ .token.punctuation {
76
+ color: #999;
77
+ }
78
+
79
+ .namespace {
80
+ opacity: .7;
81
+ }
82
+
83
+ .token.property,
84
+ .token.tag,
85
+ .token.boolean,
86
+ .token.number,
87
+ .token.constant,
88
+ .token.symbol,
89
+ .token.deleted {
90
+ color: #905;
91
+ }
92
+
93
+ .token.selector,
94
+ .token.attr-name,
95
+ .token.string,
96
+ .token.char,
97
+ .token.builtin,
98
+ .token.inserted {
99
+ color: #690;
100
+ }
101
+
102
+ .token.operator,
103
+ .token.entity,
104
+ .token.url,
105
+ .language-css .token.string,
106
+ .style .token.string {
107
+ color: #a67f59;
108
+ background: hsla(0, 0%, 100%, .5);
109
+ }
110
+
111
+ .token.atrule,
112
+ .token.attr-value,
113
+ .token.keyword {
114
+ color: #07a;
115
+ }
116
+
117
+ .token.function {
118
+ color: #DD4A68;
119
+ }
120
+
121
+ .token.regex,
122
+ .token.important,
123
+ .token.variable {
124
+ color: #e90;
125
+ }
126
+
127
+ .token.important,
128
+ .token.bold {
129
+ font-weight: bold;
130
+ }
131
+ .token.italic {
132
+ font-style: italic;
133
+ }
134
+
135
+ .token.entity {
136
+ cursor: help;
137
+ }
138
+
@@ -0,0 +1,141 @@
1
+ /**
2
+ * Inline development version. Only to be used while developing since it uses document.write to load scripts.
3
+ */
4
+
5
+ /*jshint smarttabs:true, undef:true, latedef:true, curly:true, bitwise:true, camelcase:true */
6
+ /*globals $code */
7
+
8
+ (function(exports) {
9
+ "use strict";
10
+
11
+ var html = "", baseDir;
12
+ var modules = {}, exposedModules = [], moduleCount = 0;
13
+
14
+ var scripts = document.getElementsByTagName('script');
15
+ for (var i = 0; i < scripts.length; i++) {
16
+ var src = scripts[i].src;
17
+
18
+ if (src.indexOf('/plugin.dev.js') != -1) {
19
+ baseDir = src.substring(0, src.lastIndexOf('/'));
20
+ }
21
+ }
22
+
23
+ function require(ids, callback) {
24
+ var module, defs = [];
25
+
26
+ for (var i = 0; i < ids.length; ++i) {
27
+ module = modules[ids[i]] || resolve(ids[i]);
28
+ if (!module) {
29
+ throw 'module definition dependecy not found: ' + ids[i];
30
+ }
31
+
32
+ defs.push(module);
33
+ }
34
+
35
+ callback.apply(null, defs);
36
+ }
37
+
38
+ function resolve(id) {
39
+ if (exports.privateModules && id in exports.privateModules) {
40
+ return;
41
+ }
42
+
43
+ var target = exports;
44
+ var fragments = id.split(/[.\/]/);
45
+
46
+ for (var fi = 0; fi < fragments.length; ++fi) {
47
+ if (!target[fragments[fi]]) {
48
+ return;
49
+ }
50
+
51
+ target = target[fragments[fi]];
52
+ }
53
+
54
+ return target;
55
+ }
56
+
57
+ function register(id) {
58
+ var target = exports;
59
+ var fragments = id.split(/[.\/]/);
60
+
61
+ for (var fi = 0; fi < fragments.length - 1; ++fi) {
62
+ if (target[fragments[fi]] === undefined) {
63
+ target[fragments[fi]] = {};
64
+ }
65
+
66
+ target = target[fragments[fi]];
67
+ }
68
+
69
+ target[fragments[fragments.length - 1]] = modules[id];
70
+ }
71
+
72
+ function define(id, dependencies, definition) {
73
+ var privateModules, i;
74
+
75
+ if (typeof id !== 'string') {
76
+ throw 'invalid module definition, module id must be defined and be a string';
77
+ }
78
+
79
+ if (dependencies === undefined) {
80
+ throw 'invalid module definition, dependencies must be specified';
81
+ }
82
+
83
+ if (definition === undefined) {
84
+ throw 'invalid module definition, definition function must be specified';
85
+ }
86
+
87
+ require(dependencies, function() {
88
+ modules[id] = definition.apply(null, arguments);
89
+ });
90
+
91
+ if (--moduleCount === 0) {
92
+ for (i = 0; i < exposedModules.length; i++) {
93
+ register(exposedModules[i]);
94
+ }
95
+ }
96
+
97
+ // Expose private modules for unit tests
98
+ if (exports.AMDLC_TESTS) {
99
+ privateModules = exports.privateModules || {};
100
+
101
+ for (id in modules) {
102
+ privateModules[id] = modules[id];
103
+ }
104
+
105
+ for (i = 0; i < exposedModules.length; i++) {
106
+ delete privateModules[exposedModules[i]];
107
+ }
108
+
109
+ exports.privateModules = privateModules;
110
+ }
111
+
112
+ }
113
+
114
+ function expose(ids) {
115
+ exposedModules = ids;
116
+ }
117
+
118
+ function writeScripts() {
119
+ document.write(html);
120
+ }
121
+
122
+ function load(path) {
123
+ html += '<script type="text/javascript" src="' + baseDir + '/' + path + '"></script>\n';
124
+ moduleCount++;
125
+ }
126
+
127
+ // Expose globally
128
+ exports.define = define;
129
+ exports.require = require;
130
+
131
+ expose(["tinymce/codesampleplugin/Prism","tinymce/codesampleplugin/Utils","tinymce/codesampleplugin/Dialog","tinymce/codesampleplugin/Plugin"]);
132
+
133
+ load('classes/Prism.js');
134
+ load('classes/Utils.js');
135
+ load('classes/Dialog.js');
136
+ load('classes/Plugin.js');
137
+
138
+ writeScripts();
139
+ })(this);
140
+
141
+ // $hash: 9c4ada63b5645db45543e738bf9ed4dd
@@ -0,0 +1,1299 @@
1
+ /**
2
+ * Compiled inline version. (Library mode)
3
+ */
4
+
5
+ /*jshint smarttabs:true, undef:true, latedef:true, curly:true, bitwise:true, camelcase:true */
6
+ /*globals $code */
7
+
8
+ (function(exports, undefined) {
9
+ "use strict";
10
+
11
+ var modules = {};
12
+
13
+ function require(ids, callback) {
14
+ var module, defs = [];
15
+
16
+ for (var i = 0; i < ids.length; ++i) {
17
+ module = modules[ids[i]] || resolve(ids[i]);
18
+ if (!module) {
19
+ throw 'module definition dependecy not found: ' + ids[i];
20
+ }
21
+
22
+ defs.push(module);
23
+ }
24
+
25
+ callback.apply(null, defs);
26
+ }
27
+
28
+ function define(id, dependencies, definition) {
29
+ if (typeof id !== 'string') {
30
+ throw 'invalid module definition, module id must be defined and be a string';
31
+ }
32
+
33
+ if (dependencies === undefined) {
34
+ throw 'invalid module definition, dependencies must be specified';
35
+ }
36
+
37
+ if (definition === undefined) {
38
+ throw 'invalid module definition, definition function must be specified';
39
+ }
40
+
41
+ require(dependencies, function() {
42
+ modules[id] = definition.apply(null, arguments);
43
+ });
44
+ }
45
+
46
+ function defined(id) {
47
+ return !!modules[id];
48
+ }
49
+
50
+ function resolve(id) {
51
+ var target = exports;
52
+ var fragments = id.split(/[.\/]/);
53
+
54
+ for (var fi = 0; fi < fragments.length; ++fi) {
55
+ if (!target[fragments[fi]]) {
56
+ return;
57
+ }
58
+
59
+ target = target[fragments[fi]];
60
+ }
61
+
62
+ return target;
63
+ }
64
+
65
+ function expose(ids) {
66
+ var i, target, id, fragments, privateModules;
67
+
68
+ for (i = 0; i < ids.length; i++) {
69
+ target = exports;
70
+ id = ids[i];
71
+ fragments = id.split(/[.\/]/);
72
+
73
+ for (var fi = 0; fi < fragments.length - 1; ++fi) {
74
+ if (target[fragments[fi]] === undefined) {
75
+ target[fragments[fi]] = {};
76
+ }
77
+
78
+ target = target[fragments[fi]];
79
+ }
80
+
81
+ target[fragments[fragments.length - 1]] = modules[id];
82
+ }
83
+
84
+ // Expose private modules for unit tests
85
+ if (exports.AMDLC_TESTS) {
86
+ privateModules = exports.privateModules || {};
87
+
88
+ for (id in modules) {
89
+ privateModules[id] = modules[id];
90
+ }
91
+
92
+ for (i = 0; i < ids.length; i++) {
93
+ delete privateModules[ids[i]];
94
+ }
95
+
96
+ exports.privateModules = privateModules;
97
+ }
98
+ }
99
+
100
+ // Included from: js/tinymce/plugins/codesample/classes/Prism.js
101
+
102
+ /**
103
+ * Prism.js
104
+ *
105
+ * Released under LGPL License.
106
+ * Copyright (c) 1999-2015 Ephox Corp. All rights reserved
107
+ *
108
+ * License: http://www.tinymce.com/license
109
+ * Contributing: http://www.tinymce.com/contributing
110
+ *
111
+ * Import of prism. Disabled DOMContentLoaded event listener.
112
+ */
113
+
114
+ define("tinymce/codesampleplugin/Prism", [], function() {
115
+ var window = {};
116
+ // ------------------ Start wrap
117
+
118
+ /* http://prismjs.com/download.html?themes=prism-dark&languages=markup+css+clike+javascript+c+csharp+cpp+java+php+python+ruby */
119
+ var _self = (typeof window !== 'undefined')
120
+ ? window // if in browser
121
+ : (
122
+ (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope)
123
+ ? self // if in worker
124
+ : {} // if in node js
125
+ );
126
+
127
+ /**
128
+ * Prism: Lightweight, robust, elegant syntax highlighting
129
+ * MIT license http://www.opensource.org/licenses/mit-license.php/
130
+ * @author Lea Verou http://lea.verou.me
131
+ */
132
+
133
+ var Prism = (function(){
134
+
135
+ // Private helper vars
136
+ var lang = /\blang(?:uage)?-(?!\*)(\w+)\b/i;
137
+
138
+ var _ = _self.Prism = {
139
+ util: {
140
+ encode: function (tokens) {
141
+ if (tokens instanceof Token) {
142
+ return new Token(tokens.type, _.util.encode(tokens.content), tokens.alias);
143
+ } else if (_.util.type(tokens) === 'Array') {
144
+ return tokens.map(_.util.encode);
145
+ } else {
146
+ return tokens.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/\u00a0/g, ' ');
147
+ }
148
+ },
149
+
150
+ type: function (o) {
151
+ return Object.prototype.toString.call(o).match(/\[object (\w+)\]/)[1];
152
+ },
153
+
154
+ // Deep clone a language definition (e.g. to extend it)
155
+ clone: function (o) {
156
+ var type = _.util.type(o);
157
+
158
+ switch (type) {
159
+ case 'Object':
160
+ var clone = {};
161
+
162
+ for (var key in o) {
163
+ if (o.hasOwnProperty(key)) {
164
+ clone[key] = _.util.clone(o[key]);
165
+ }
166
+ }
167
+
168
+ return clone;
169
+
170
+ case 'Array':
171
+ // Check for existence for IE8
172
+ return o.map && o.map(function(v) { return _.util.clone(v); });
173
+ }
174
+
175
+ return o;
176
+ }
177
+ },
178
+
179
+ languages: {
180
+ extend: function (id, redef) {
181
+ var lang = _.util.clone(_.languages[id]);
182
+
183
+ for (var key in redef) {
184
+ lang[key] = redef[key];
185
+ }
186
+
187
+ return lang;
188
+ },
189
+
190
+ /**
191
+ * Insert a token before another token in a language literal
192
+ * As this needs to recreate the object (we cannot actually insert before keys in object literals),
193
+ * we cannot just provide an object, we need anobject and a key.
194
+ * @param inside The key (or language id) of the parent
195
+ * @param before The key to insert before. If not provided, the function appends instead.
196
+ * @param insert Object with the key/value pairs to insert
197
+ * @param root The object that contains `inside`. If equal to Prism.languages, it can be omitted.
198
+ */
199
+ insertBefore: function (inside, before, insert, root) {
200
+ root = root || _.languages;
201
+ var grammar = root[inside];
202
+
203
+ if (arguments.length == 2) {
204
+ insert = arguments[1];
205
+
206
+ for (var newToken in insert) {
207
+ if (insert.hasOwnProperty(newToken)) {
208
+ grammar[newToken] = insert[newToken];
209
+ }
210
+ }
211
+
212
+ return grammar;
213
+ }
214
+
215
+ var ret = {};
216
+
217
+ for (var token in grammar) {
218
+
219
+ if (grammar.hasOwnProperty(token)) {
220
+
221
+ if (token == before) {
222
+
223
+ for (var newToken in insert) {
224
+
225
+ if (insert.hasOwnProperty(newToken)) {
226
+ ret[newToken] = insert[newToken];
227
+ }
228
+ }
229
+ }
230
+
231
+ ret[token] = grammar[token];
232
+ }
233
+ }
234
+
235
+ // Update references in other language definitions
236
+ _.languages.DFS(_.languages, function(key, value) {
237
+ if (value === root[inside] && key != inside) {
238
+ this[key] = ret;
239
+ }
240
+ });
241
+
242
+ return root[inside] = ret;
243
+ },
244
+
245
+ // Traverse a language definition with Depth First Search
246
+ DFS: function(o, callback, type) {
247
+ for (var i in o) {
248
+ if (o.hasOwnProperty(i)) {
249
+ callback.call(o, i, o[i], type || i);
250
+
251
+ if (_.util.type(o[i]) === 'Object') {
252
+ _.languages.DFS(o[i], callback);
253
+ }
254
+ else if (_.util.type(o[i]) === 'Array') {
255
+ _.languages.DFS(o[i], callback, i);
256
+ }
257
+ }
258
+ }
259
+ }
260
+ },
261
+ plugins: {},
262
+
263
+ highlightAll: function(async, callback) {
264
+ var elements = document.querySelectorAll('code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code');
265
+
266
+ for (var i=0, element; element = elements[i++];) {
267
+ _.highlightElement(element, async === true, callback);
268
+ }
269
+ },
270
+
271
+ highlightElement: function(element, async, callback) {
272
+ // Find language
273
+ var language, grammar, parent = element;
274
+
275
+ while (parent && !lang.test(parent.className)) {
276
+ parent = parent.parentNode;
277
+ }
278
+
279
+ if (parent) {
280
+ language = (parent.className.match(lang) || [,''])[1];
281
+ grammar = _.languages[language];
282
+ }
283
+
284
+ // Set language on the element, if not present
285
+ element.className = element.className.replace(lang, '').replace(/\s+/g, ' ') + ' language-' + language;
286
+
287
+ // Set language on the parent, for styling
288
+ parent = element.parentNode;
289
+
290
+ if (/pre/i.test(parent.nodeName)) {
291
+ parent.className = parent.className.replace(lang, '').replace(/\s+/g, ' ') + ' language-' + language;
292
+ }
293
+
294
+ var code = element.textContent;
295
+
296
+ var env = {
297
+ element: element,
298
+ language: language,
299
+ grammar: grammar,
300
+ code: code
301
+ };
302
+
303
+ if (!code || !grammar) {
304
+ _.hooks.run('complete', env);
305
+ return;
306
+ }
307
+
308
+ _.hooks.run('before-highlight', env);
309
+
310
+ if (async && _self.Worker) {
311
+ var worker = new Worker(_.filename);
312
+
313
+ worker.onmessage = function(evt) {
314
+ env.highlightedCode = evt.data;
315
+
316
+ _.hooks.run('before-insert', env);
317
+
318
+ env.element.innerHTML = env.highlightedCode;
319
+
320
+ callback && callback.call(env.element);
321
+ _.hooks.run('after-highlight', env);
322
+ _.hooks.run('complete', env);
323
+ };
324
+
325
+ worker.postMessage(JSON.stringify({
326
+ language: env.language,
327
+ code: env.code,
328
+ immediateClose: true
329
+ }));
330
+ }
331
+ else {
332
+ env.highlightedCode = _.highlight(env.code, env.grammar, env.language);
333
+
334
+ _.hooks.run('before-insert', env);
335
+
336
+ env.element.innerHTML = env.highlightedCode;
337
+
338
+ callback && callback.call(element);
339
+
340
+ _.hooks.run('after-highlight', env);
341
+ _.hooks.run('complete', env);
342
+ }
343
+ },
344
+
345
+ highlight: function (text, grammar, language) {
346
+ var tokens = _.tokenize(text, grammar);
347
+ return Token.stringify(_.util.encode(tokens), language);
348
+ },
349
+
350
+ tokenize: function(text, grammar, language) {
351
+ var Token = _.Token;
352
+
353
+ var strarr = [text];
354
+
355
+ var rest = grammar.rest;
356
+
357
+ if (rest) {
358
+ for (var token in rest) {
359
+ grammar[token] = rest[token];
360
+ }
361
+
362
+ delete grammar.rest;
363
+ }
364
+
365
+ tokenloop: for (var token in grammar) {
366
+ if(!grammar.hasOwnProperty(token) || !grammar[token]) {
367
+ continue;
368
+ }
369
+
370
+ var patterns = grammar[token];
371
+ patterns = (_.util.type(patterns) === "Array") ? patterns : [patterns];
372
+
373
+ for (var j = 0; j < patterns.length; ++j) {
374
+ var pattern = patterns[j],
375
+ inside = pattern.inside,
376
+ lookbehind = !!pattern.lookbehind,
377
+ lookbehindLength = 0,
378
+ alias = pattern.alias;
379
+
380
+ pattern = pattern.pattern || pattern;
381
+
382
+ for (var i=0; i<strarr.length; i++) { // Don’t cache length as it changes during the loop
383
+
384
+ var str = strarr[i];
385
+
386
+ if (strarr.length > text.length) {
387
+ // Something went terribly wrong, ABORT, ABORT!
388
+ break tokenloop;
389
+ }
390
+
391
+ if (str instanceof Token) {
392
+ continue;
393
+ }
394
+
395
+ pattern.lastIndex = 0;
396
+
397
+ var match = pattern.exec(str);
398
+
399
+ if (match) {
400
+ if(lookbehind) {
401
+ lookbehindLength = match[1].length;
402
+ }
403
+
404
+ var from = match.index - 1 + lookbehindLength,
405
+ match = match[0].slice(lookbehindLength),
406
+ len = match.length,
407
+ to = from + len,
408
+ before = str.slice(0, from + 1),
409
+ after = str.slice(to + 1);
410
+
411
+ var args = [i, 1];
412
+
413
+ if (before) {
414
+ args.push(before);
415
+ }
416
+
417
+ var wrapped = new Token(token, inside? _.tokenize(match, inside) : match, alias);
418
+
419
+ args.push(wrapped);
420
+
421
+ if (after) {
422
+ args.push(after);
423
+ }
424
+
425
+ Array.prototype.splice.apply(strarr, args);
426
+ }
427
+ }
428
+ }
429
+ }
430
+
431
+ return strarr;
432
+ },
433
+
434
+ hooks: {
435
+ all: {},
436
+
437
+ add: function (name, callback) {
438
+ var hooks = _.hooks.all;
439
+
440
+ hooks[name] = hooks[name] || [];
441
+
442
+ hooks[name].push(callback);
443
+ },
444
+
445
+ run: function (name, env) {
446
+ var callbacks = _.hooks.all[name];
447
+
448
+ if (!callbacks || !callbacks.length) {
449
+ return;
450
+ }
451
+
452
+ for (var i=0, callback; callback = callbacks[i++];) {
453
+ callback(env);
454
+ }
455
+ }
456
+ }
457
+ };
458
+
459
+ var Token = _.Token = function(type, content, alias) {
460
+ this.type = type;
461
+ this.content = content;
462
+ this.alias = alias;
463
+ };
464
+
465
+ Token.stringify = function(o, language, parent) {
466
+ if (typeof o == 'string') {
467
+ return o;
468
+ }
469
+
470
+ if (_.util.type(o) === 'Array') {
471
+ return o.map(function(element) {
472
+ return Token.stringify(element, language, o);
473
+ }).join('');
474
+ }
475
+
476
+ var env = {
477
+ type: o.type,
478
+ content: Token.stringify(o.content, language, parent),
479
+ tag: 'span',
480
+ classes: ['token', o.type],
481
+ attributes: {},
482
+ language: language,
483
+ parent: parent
484
+ };
485
+
486
+ if (env.type == 'comment') {
487
+ env.attributes['spellcheck'] = 'true';
488
+ }
489
+
490
+ if (o.alias) {
491
+ var aliases = _.util.type(o.alias) === 'Array' ? o.alias : [o.alias];
492
+ Array.prototype.push.apply(env.classes, aliases);
493
+ }
494
+
495
+ _.hooks.run('wrap', env);
496
+
497
+ var attributes = '';
498
+
499
+ for (var name in env.attributes) {
500
+ attributes += (attributes ? ' ' : '') + name + '="' + (env.attributes[name] || '') + '"';
501
+ }
502
+
503
+ return '<' + env.tag + ' class="' + env.classes.join(' ') + '" ' + attributes + '>' + env.content + '</' + env.tag + '>';
504
+
505
+ };
506
+
507
+ if (!_self.document) {
508
+ if (!_self.addEventListener) {
509
+ // in Node.js
510
+ return _self.Prism;
511
+ }
512
+ // In worker
513
+ _self.addEventListener('message', function(evt) {
514
+ var message = JSON.parse(evt.data),
515
+ lang = message.language,
516
+ code = message.code,
517
+ immediateClose = message.immediateClose;
518
+
519
+ _self.postMessage(_.highlight(code, _.languages[lang], lang));
520
+ if (immediateClose) {
521
+ _self.close();
522
+ }
523
+ }, false);
524
+
525
+ return _self.Prism;
526
+ }
527
+ /*
528
+ // Get current script and highlight
529
+ var script = document.getElementsByTagName('script');
530
+
531
+ script = script[script.length - 1];
532
+
533
+ if (script) {
534
+ _.filename = script.src;
535
+
536
+ if (document.addEventListener && !script.hasAttribute('data-manual')) {
537
+ document.addEventListener('DOMContentLoaded', _.highlightAll);
538
+ }
539
+ }
540
+
541
+ return _self.Prism;
542
+ */
543
+ })();
544
+
545
+ if (typeof module !== 'undefined' && module.exports) {
546
+ module.exports = Prism;
547
+ }
548
+
549
+ // hack for components to work correctly in node.js
550
+ if (typeof global !== 'undefined') {
551
+ global.Prism = Prism;
552
+ }
553
+ ;
554
+ Prism.languages.markup = {
555
+ 'comment': /<!--[\w\W]*?-->/,
556
+ 'prolog': /<\?[\w\W]+?\?>/,
557
+ 'doctype': /<!DOCTYPE[\w\W]+?>/,
558
+ 'cdata': /<!\[CDATA\[[\w\W]*?]]>/i,
559
+ 'tag': {
560
+ pattern: /<\/?[^\s>\/=.]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i,
561
+ inside: {
562
+ 'tag': {
563
+ pattern: /^<\/?[^\s>\/]+/i,
564
+ inside: {
565
+ 'punctuation': /^<\/?/,
566
+ 'namespace': /^[^\s>\/:]+:/
567
+ }
568
+ },
569
+ 'attr-value': {
570
+ pattern: /=(?:('|")[\w\W]*?(\1)|[^\s>]+)/i,
571
+ inside: {
572
+ 'punctuation': /[=>"']/
573
+ }
574
+ },
575
+ 'punctuation': /\/?>/,
576
+ 'attr-name': {
577
+ pattern: /[^\s>\/]+/,
578
+ inside: {
579
+ 'namespace': /^[^\s>\/:]+:/
580
+ }
581
+ }
582
+
583
+ }
584
+ },
585
+ 'entity': /&#?[\da-z]{1,8};/i
586
+ };
587
+
588
+ // Plugin to make entity title show the real entity, idea by Roman Komarov
589
+ Prism.hooks.add('wrap', function(env) {
590
+
591
+ if (env.type === 'entity') {
592
+ env.attributes['title'] = env.content.replace(/&amp;/, '&');
593
+ }
594
+ });
595
+
596
+ Prism.languages.xml = Prism.languages.markup;
597
+ Prism.languages.html = Prism.languages.markup;
598
+ Prism.languages.mathml = Prism.languages.markup;
599
+ Prism.languages.svg = Prism.languages.markup;
600
+
601
+ Prism.languages.css = {
602
+ 'comment': /\/\*[\w\W]*?\*\//,
603
+ 'atrule': {
604
+ pattern: /@[\w-]+?.*?(;|(?=\s*\{))/i,
605
+ inside: {
606
+ 'rule': /@[\w-]+/
607
+ // See rest below
608
+ }
609
+ },
610
+ 'url': /url\((?:(["'])(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,
611
+ 'selector': /[^\{\}\s][^\{\};]*?(?=\s*\{)/,
612
+ 'string': /("|')(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1/,
613
+ 'property': /(\b|\B)[\w-]+(?=\s*:)/i,
614
+ 'important': /\B!important\b/i,
615
+ 'function': /[-a-z0-9]+(?=\()/i,
616
+ 'punctuation': /[(){};:]/
617
+ };
618
+
619
+ Prism.languages.css['atrule'].inside.rest = Prism.util.clone(Prism.languages.css);
620
+
621
+ if (Prism.languages.markup) {
622
+ Prism.languages.insertBefore('markup', 'tag', {
623
+ 'style': {
624
+ pattern: /<style[\w\W]*?>[\w\W]*?<\/style>/i,
625
+ inside: {
626
+ 'tag': {
627
+ pattern: /<style[\w\W]*?>|<\/style>/i,
628
+ inside: Prism.languages.markup.tag.inside
629
+ },
630
+ rest: Prism.languages.css
631
+ },
632
+ alias: 'language-css'
633
+ }
634
+ });
635
+
636
+ Prism.languages.insertBefore('inside', 'attr-value', {
637
+ 'style-attr': {
638
+ pattern: /\s*style=("|').*?\1/i,
639
+ inside: {
640
+ 'attr-name': {
641
+ pattern: /^\s*style/i,
642
+ inside: Prism.languages.markup.tag.inside
643
+ },
644
+ 'punctuation': /^\s*=\s*['"]|['"]\s*$/,
645
+ 'attr-value': {
646
+ pattern: /.+/i,
647
+ inside: Prism.languages.css
648
+ }
649
+ },
650
+ alias: 'language-css'
651
+ }
652
+ }, Prism.languages.markup.tag);
653
+ };
654
+ Prism.languages.clike = {
655
+ 'comment': [
656
+ {
657
+ pattern: /(^|[^\\])\/\*[\w\W]*?\*\//,
658
+ lookbehind: true
659
+ },
660
+ {
661
+ pattern: /(^|[^\\:])\/\/.*/,
662
+ lookbehind: true
663
+ }
664
+ ],
665
+ 'string': /(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
666
+ 'class-name': {
667
+ pattern: /((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/i,
668
+ lookbehind: true,
669
+ inside: {
670
+ punctuation: /(\.|\\)/
671
+ }
672
+ },
673
+ 'keyword': /\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,
674
+ 'boolean': /\b(true|false)\b/,
675
+ 'function': /[a-z0-9_]+(?=\()/i,
676
+ 'number': /\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i,
677
+ 'operator': /--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,
678
+ 'punctuation': /[{}[\];(),.:]/
679
+ };
680
+
681
+ Prism.languages.javascript = Prism.languages.extend('clike', {
682
+ 'keyword': /\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/,
683
+ 'number': /\b-?(0x[\dA-Fa-f]+|0b[01]+|0o[0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/,
684
+ // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444)
685
+ 'function': /[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/i
686
+ });
687
+
688
+ Prism.languages.insertBefore('javascript', 'keyword', {
689
+ 'regex': {
690
+ pattern: /(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\\\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})]))/,
691
+ lookbehind: true
692
+ }
693
+ });
694
+
695
+ Prism.languages.insertBefore('javascript', 'class-name', {
696
+ 'template-string': {
697
+ pattern: /`(?:\\`|\\?[^`])*`/,
698
+ inside: {
699
+ 'interpolation': {
700
+ pattern: /\$\{[^}]+\}/,
701
+ inside: {
702
+ 'interpolation-punctuation': {
703
+ pattern: /^\$\{|\}$/,
704
+ alias: 'punctuation'
705
+ },
706
+ rest: Prism.languages.javascript
707
+ }
708
+ },
709
+ 'string': /[\s\S]+/
710
+ }
711
+ }
712
+ });
713
+
714
+ if (Prism.languages.markup) {
715
+ Prism.languages.insertBefore('markup', 'tag', {
716
+ 'script': {
717
+ pattern: /<script[\w\W]*?>[\w\W]*?<\/script>/i,
718
+ inside: {
719
+ 'tag': {
720
+ pattern: /<script[\w\W]*?>|<\/script>/i,
721
+ inside: Prism.languages.markup.tag.inside
722
+ },
723
+ rest: Prism.languages.javascript
724
+ },
725
+ alias: 'language-javascript'
726
+ }
727
+ });
728
+ }
729
+
730
+ Prism.languages.js = Prism.languages.javascript;
731
+ Prism.languages.c = Prism.languages.extend('clike', {
732
+ 'keyword': /\b(asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,
733
+ 'operator': /\-[>-]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|?\||[~^%?*\/]/,
734
+ 'number': /\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)[ful]*\b/i
735
+ });
736
+
737
+ Prism.languages.insertBefore('c', 'string', {
738
+ 'macro': {
739
+ // allow for multiline macro definitions
740
+ // spaces after the # character compile fine with gcc
741
+ pattern: /(^\s*)#\s*[a-z]+([^\r\n\\]|\\.|\\(?:\r\n?|\n))*/im,
742
+ lookbehind: true,
743
+ alias: 'property',
744
+ inside: {
745
+ // highlight the path of the include statement as a string
746
+ 'string': {
747
+ pattern: /(#\s*include\s*)(<.+?>|("|')(\\?.)+?\3)/,
748
+ lookbehind: true
749
+ }
750
+ }
751
+ }
752
+ });
753
+
754
+ delete Prism.languages.c['class-name'];
755
+ delete Prism.languages.c['boolean'];
756
+
757
+ Prism.languages.csharp = Prism.languages.extend('clike', {
758
+ 'keyword': /\b(abstract|as|async|await|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|do|double|else|enum|event|explicit|extern|false|finally|fixed|float|for|foreach|goto|if|implicit|in|int|interface|internal|is|lock|long|namespace|new|null|object|operator|out|override|params|private|protected|public|readonly|ref|return|sbyte|sealed|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|virtual|void|volatile|while|add|alias|ascending|async|await|descending|dynamic|from|get|global|group|into|join|let|orderby|partial|remove|select|set|value|var|where|yield)\b/,
759
+ 'string': [
760
+ /@("|')(\1\1|\\\1|\\?(?!\1)[\s\S])*\1/,
761
+ /("|')(\\?.)*?\1/
762
+ ],
763
+ 'number': /\b-?(0x[\da-f]+|\d*\.?\d+)\b/i
764
+ });
765
+
766
+ Prism.languages.insertBefore('csharp', 'keyword', {
767
+ 'preprocessor': {
768
+ pattern: /(^\s*)#.*/m,
769
+ lookbehind: true
770
+ }
771
+ });
772
+
773
+ Prism.languages.cpp = Prism.languages.extend('c', {
774
+ 'keyword': /\b(alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,
775
+ 'boolean': /\b(true|false)\b/,
776
+ 'operator': /[-+]{1,2}|!=?|<{1,2}=?|>{1,2}=?|\->|:{1,2}|={1,2}|\^|~|%|&{1,2}|\|?\||\?|\*|\/|\b(and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/
777
+ });
778
+
779
+ Prism.languages.insertBefore('cpp', 'keyword', {
780
+ 'class-name': {
781
+ pattern: /(class\s+)[a-z0-9_]+/i,
782
+ lookbehind: true
783
+ }
784
+ });
785
+ Prism.languages.java = Prism.languages.extend('clike', {
786
+ 'keyword': /\b(abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while)\b/,
787
+ 'number': /\b0b[01]+\b|\b0x[\da-f]*\.?[\da-fp\-]+\b|\b\d*\.?\d+(?:e[+-]?\d+)?[df]?\b/i,
788
+ 'operator': {
789
+ pattern: /(^|[^.])(?:\+[+=]?|-[-=]?|!=?|<<?=?|>>?>?=?|==?|&[&=]?|\|[|=]?|\*=?|\/=?|%=?|\^=?|[?:~])/m,
790
+ lookbehind: true
791
+ }
792
+ });
793
+ /**
794
+ * Original by Aaron Harun: http://aahacreative.com/2012/07/31/php-syntax-highlighting-prism/
795
+ * Modified by Miles Johnson: http://milesj.me
796
+ *
797
+ * Supports the following:
798
+ * - Extends clike syntax
799
+ * - Support for PHP 5.3+ (namespaces, traits, generators, etc)
800
+ * - Smarter constant and function matching
801
+ *
802
+ * Adds the following new token classes:
803
+ * constant, delimiter, variable, function, package
804
+ */
805
+
806
+ Prism.languages.php = Prism.languages.extend('clike', {
807
+ 'keyword': /\b(and|or|xor|array|as|break|case|cfunction|class|const|continue|declare|default|die|do|else|elseif|enddeclare|endfor|endforeach|endif|endswitch|endwhile|extends|for|foreach|function|include|include_once|global|if|new|return|static|switch|use|require|require_once|var|while|abstract|interface|public|implements|private|protected|parent|throw|null|echo|print|trait|namespace|final|yield|goto|instanceof|finally|try|catch)\b/i,
808
+ 'constant': /\b[A-Z0-9_]{2,}\b/,
809
+ 'comment': {
810
+ pattern: /(^|[^\\])(?:\/\*[\w\W]*?\*\/|\/\/.*)/,
811
+ lookbehind: true
812
+ }
813
+ });
814
+
815
+ // Shell-like comments are matched after strings, because they are less
816
+ // common than strings containing hashes...
817
+ Prism.languages.insertBefore('php', 'class-name', {
818
+ 'shell-comment': {
819
+ pattern: /(^|[^\\])#.*/,
820
+ lookbehind: true,
821
+ alias: 'comment'
822
+ }
823
+ });
824
+
825
+ Prism.languages.insertBefore('php', 'keyword', {
826
+ 'delimiter': /\?>|<\?(?:php)?/i,
827
+ 'variable': /\$\w+\b/i,
828
+ 'package': {
829
+ pattern: /(\\|namespace\s+|use\s+)[\w\\]+/,
830
+ lookbehind: true,
831
+ inside: {
832
+ punctuation: /\\/
833
+ }
834
+ }
835
+ });
836
+
837
+ // Must be defined after the function pattern
838
+ Prism.languages.insertBefore('php', 'operator', {
839
+ 'property': {
840
+ pattern: /(->)[\w]+/,
841
+ lookbehind: true
842
+ }
843
+ });
844
+
845
+ // Add HTML support of the markup language exists
846
+ if (Prism.languages.markup) {
847
+
848
+ // Tokenize all inline PHP blocks that are wrapped in <?php ?>
849
+ // This allows for easy PHP + markup highlighting
850
+ Prism.hooks.add('before-highlight', function(env) {
851
+ if (env.language !== 'php') {
852
+ return;
853
+ }
854
+
855
+ env.tokenStack = [];
856
+
857
+ env.backupCode = env.code;
858
+ env.code = env.code.replace(/(?:<\?php|<\?)[\w\W]*?(?:\?>)/ig, function(match) {
859
+ env.tokenStack.push(match);
860
+
861
+ return '{{{PHP' + env.tokenStack.length + '}}}';
862
+ });
863
+ });
864
+
865
+ // Restore env.code for other plugins (e.g. line-numbers)
866
+ Prism.hooks.add('before-insert', function(env) {
867
+ if (env.language === 'php') {
868
+ env.code = env.backupCode;
869
+ delete env.backupCode;
870
+ }
871
+ });
872
+
873
+ // Re-insert the tokens after highlighting
874
+ Prism.hooks.add('after-highlight', function(env) {
875
+ if (env.language !== 'php') {
876
+ return;
877
+ }
878
+
879
+ for (var i = 0, t; t = env.tokenStack[i]; i++) {
880
+ // The replace prevents $$, $&, $`, $', $n, $nn from being interpreted as special patterns
881
+ env.highlightedCode = env.highlightedCode.replace('{{{PHP' + (i + 1) + '}}}', Prism.highlight(t, env.grammar, 'php').replace(/\$/g, '$$$$'));
882
+ }
883
+
884
+ env.element.innerHTML = env.highlightedCode;
885
+ });
886
+
887
+ // Wrap tokens in classes that are missing them
888
+ Prism.hooks.add('wrap', function(env) {
889
+ if (env.language === 'php' && env.type === 'markup') {
890
+ env.content = env.content.replace(/(\{\{\{PHP[0-9]+\}\}\})/g, "<span class=\"token php\">$1</span>");
891
+ }
892
+ });
893
+
894
+ // Add the rules before all others
895
+ Prism.languages.insertBefore('php', 'comment', {
896
+ 'markup': {
897
+ pattern: /<[^?]\/?(.*?)>/,
898
+ inside: Prism.languages.markup
899
+ },
900
+ 'php': /\{\{\{PHP[0-9]+\}\}\}/
901
+ });
902
+ }
903
+ ;
904
+ Prism.languages.python= {
905
+ 'comment': {
906
+ pattern: /(^|[^\\])#.*/,
907
+ lookbehind: true
908
+ },
909
+ 'string': /"""[\s\S]+?"""|'''[\s\S]+?'''|("|')(?:\\?.)*?\1/,
910
+ 'function' : {
911
+ pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_][a-zA-Z0-9_]*(?=\()/g,
912
+ lookbehind: true
913
+ },
914
+ 'class-name': {
915
+ pattern: /(\bclass\s+)[a-z0-9_]+/i,
916
+ lookbehind: true
917
+ },
918
+ 'keyword' : /\b(?:as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|pass|print|raise|return|try|while|with|yield)\b/,
919
+ 'boolean' : /\b(?:True|False)\b/,
920
+ 'number' : /\b-?(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,
921
+ 'operator' : /[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not)\b/,
922
+ 'punctuation' : /[{}[\];(),.:]/
923
+ };
924
+
925
+ /**
926
+ * Original by Samuel Flores
927
+ *
928
+ * Adds the following new token classes:
929
+ * constant, builtin, variable, symbol, regex
930
+ */
931
+ (function(Prism) {
932
+ Prism.languages.ruby = Prism.languages.extend('clike', {
933
+ 'comment': /#(?!\{[^\r\n]*?\}).*/,
934
+ 'keyword': /\b(alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|false|for|if|in|module|new|next|nil|not|or|raise|redo|require|rescue|retry|return|self|super|then|throw|true|undef|unless|until|when|while|yield)\b/
935
+ });
936
+
937
+ var interpolation = {
938
+ pattern: /#\{[^}]+\}/,
939
+ inside: {
940
+ 'delimiter': {
941
+ pattern: /^#\{|\}$/,
942
+ alias: 'tag'
943
+ },
944
+ rest: Prism.util.clone(Prism.languages.ruby)
945
+ }
946
+ };
947
+
948
+ Prism.languages.insertBefore('ruby', 'keyword', {
949
+ 'regex': [
950
+ {
951
+ pattern: /%r([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1[gim]{0,3}/,
952
+ inside: {
953
+ 'interpolation': interpolation
954
+ }
955
+ },
956
+ {
957
+ pattern: /%r\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/,
958
+ inside: {
959
+ 'interpolation': interpolation
960
+ }
961
+ },
962
+ {
963
+ // Here we need to specifically allow interpolation
964
+ pattern: /%r\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/,
965
+ inside: {
966
+ 'interpolation': interpolation
967
+ }
968
+ },
969
+ {
970
+ pattern: /%r\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/,
971
+ inside: {
972
+ 'interpolation': interpolation
973
+ }
974
+ },
975
+ {
976
+ pattern: /%r<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/,
977
+ inside: {
978
+ 'interpolation': interpolation
979
+ }
980
+ },
981
+ {
982
+ pattern: /(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/,
983
+ lookbehind: true
984
+ }
985
+ ],
986
+ 'variable': /[@$]+[a-zA-Z_][a-zA-Z_0-9]*(?:[?!]|\b)/,
987
+ 'symbol': /:[a-zA-Z_][a-zA-Z_0-9]*(?:[?!]|\b)/
988
+ });
989
+
990
+ Prism.languages.insertBefore('ruby', 'number', {
991
+ 'builtin': /\b(Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|File|Fixnum|Fload|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,
992
+ 'constant': /\b[A-Z][a-zA-Z_0-9]*(?:[?!]|\b)/
993
+ });
994
+
995
+ Prism.languages.ruby.string = [
996
+ {
997
+ pattern: /%[qQiIwWxs]?([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1/,
998
+ inside: {
999
+ 'interpolation': interpolation
1000
+ }
1001
+ },
1002
+ {
1003
+ pattern: /%[qQiIwWxs]?\((?:[^()\\]|\\[\s\S])*\)/,
1004
+ inside: {
1005
+ 'interpolation': interpolation
1006
+ }
1007
+ },
1008
+ {
1009
+ // Here we need to specifically allow interpolation
1010
+ pattern: /%[qQiIwWxs]?\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/,
1011
+ inside: {
1012
+ 'interpolation': interpolation
1013
+ }
1014
+ },
1015
+ {
1016
+ pattern: /%[qQiIwWxs]?\[(?:[^\[\]\\]|\\[\s\S])*\]/,
1017
+ inside: {
1018
+ 'interpolation': interpolation
1019
+ }
1020
+ },
1021
+ {
1022
+ pattern: /%[qQiIwWxs]?<(?:[^<>\\]|\\[\s\S])*>/,
1023
+ inside: {
1024
+ 'interpolation': interpolation
1025
+ }
1026
+ },
1027
+ {
1028
+ pattern: /("|')(#\{[^}]+\}|\\(?:\r?\n|\r)|\\?.)*?\1/,
1029
+ inside: {
1030
+ 'interpolation': interpolation
1031
+ }
1032
+ }
1033
+ ];
1034
+ }(Prism));
1035
+
1036
+ // ------------------ End wrap
1037
+ return Prism;
1038
+ });
1039
+
1040
+ // Included from: js/tinymce/plugins/codesample/classes/Utils.js
1041
+
1042
+ /**
1043
+ * Utils.js
1044
+ *
1045
+ * Released under LGPL License.
1046
+ * Copyright (c) 1999-2015 Ephox Corp. All rights reserved
1047
+ *
1048
+ * License: http://www.tinymce.com/license
1049
+ * Contributing: http://www.tinymce.com/contributing
1050
+ */
1051
+
1052
+ /**
1053
+ * Various utility functions.
1054
+ *
1055
+ * @class tinymce.codesample.Utils
1056
+ * @private
1057
+ */
1058
+ define("tinymce/codesampleplugin/Utils", [
1059
+ ], function() {
1060
+ function isCodeSample(elm) {
1061
+ return elm && elm.nodeName == 'PRE' && elm.className.indexOf('language-') !== -1;
1062
+ }
1063
+
1064
+ function trimArg(predicateFn) {
1065
+ return function(arg1, arg2) {
1066
+ return predicateFn(arg2);
1067
+ };
1068
+ }
1069
+
1070
+ return {
1071
+ isCodeSample: isCodeSample,
1072
+ trimArg: trimArg
1073
+ };
1074
+ });
1075
+
1076
+ // Included from: js/tinymce/plugins/codesample/classes/Dialog.js
1077
+
1078
+ /**
1079
+ * Dialog.js
1080
+ *
1081
+ * Released under LGPL License.
1082
+ * Copyright (c) 1999-2015 Ephox Corp. All rights reserved
1083
+ *
1084
+ * License: http://www.tinymce.com/license
1085
+ * Contributing: http://www.tinymce.com/contributing
1086
+ */
1087
+
1088
+ /**
1089
+ * Contains all dialog logic.
1090
+ *
1091
+ * @class tinymce.codesample.Dialog
1092
+ * @private
1093
+ */
1094
+ define("tinymce/codesampleplugin/Dialog", [
1095
+ "tinymce/dom/DOMUtils",
1096
+ "tinymce/codesampleplugin/Utils",
1097
+ "tinymce/codesampleplugin/Prism"
1098
+ ], function(DOMUtils, Utils, Prism) {
1099
+ var DOM = DOMUtils.DOM;
1100
+
1101
+ var languages = [
1102
+ {text: 'HTML/XML', value: 'markup'},
1103
+ {text: 'JavaScript', value: 'javascript'},
1104
+ {text: 'CSS', value: 'css'},
1105
+ {text: 'PHP', value: 'php'},
1106
+ {text: 'Ruby', value: 'ruby'},
1107
+ {text: 'Python', value: 'python'},
1108
+ {text: 'Java', value: 'java'},
1109
+ {text: 'C', value: 'c'},
1110
+ {text: 'C#', value: 'csharp'},
1111
+ {text: 'C++', value: 'cpp'}
1112
+ ];
1113
+
1114
+ function insertCodeSample(editor, language, code) {
1115
+ editor.undoManager.transact(function() {
1116
+ var node = getSelectedCodeSample(editor);
1117
+
1118
+ code = DOM.encode(code);
1119
+
1120
+ if (node) {
1121
+ editor.dom.setAttrib(node, 'class', 'language-' + language);
1122
+ node.innerHTML = code;
1123
+ Prism.highlightElement(node);
1124
+ editor.selection.select(node);
1125
+ } else {
1126
+ editor.insertContent('<pre id="__new" class="language-' + language + '">' + code + '</pre>');
1127
+ editor.selection.select(editor.$('#__new').removeAttr('id')[0]);
1128
+ }
1129
+ });
1130
+ }
1131
+
1132
+ function getSelectedCodeSample(editor) {
1133
+ var node = editor.selection.getNode();
1134
+
1135
+ if (Utils.isCodeSample(node)) {
1136
+ return node;
1137
+ }
1138
+
1139
+ return null;
1140
+ }
1141
+
1142
+ function getCurrentCode(editor) {
1143
+ var node = getSelectedCodeSample(editor);
1144
+
1145
+ if (node) {
1146
+ return node.textContent;
1147
+ }
1148
+
1149
+ return '';
1150
+ }
1151
+
1152
+ function getCurrentLanguage(editor) {
1153
+ var matches, node = getSelectedCodeSample(editor);
1154
+
1155
+ if (node) {
1156
+ matches = node.className.match(/language-(\w+)/);
1157
+ return matches ? matches[1] : '';
1158
+ }
1159
+
1160
+ return '';
1161
+ }
1162
+
1163
+ return {
1164
+ open: function(editor) {
1165
+ editor.windowManager.open({
1166
+ title: "Insert/Edit code sample",
1167
+ minWidth: Math.min(DOM.getViewPort().w, 800),
1168
+ minHeight: Math.min(DOM.getViewPort().h, 650),
1169
+ layout: 'fit',
1170
+ body: [
1171
+ {
1172
+ type: 'listbox',
1173
+ name: 'language',
1174
+ label: 'Language',
1175
+ maxWidth: 200,
1176
+ value: getCurrentLanguage(editor),
1177
+ values: languages
1178
+ },
1179
+
1180
+ {
1181
+ type: 'textbox',
1182
+ name: 'code',
1183
+ multiline: true,
1184
+ spellcheck: false,
1185
+ ariaLabel: 'Code view',
1186
+ flex: 1,
1187
+ style: 'direction: ltr; text-align: left',
1188
+ classes: 'monospace',
1189
+ value: getCurrentCode(editor)
1190
+ }
1191
+ ],
1192
+ onSubmit: function(e) {
1193
+ insertCodeSample(editor, e.data.language, e.data.code);
1194
+ }
1195
+ });
1196
+ }
1197
+ };
1198
+ });
1199
+
1200
+ // Included from: js/tinymce/plugins/codesample/classes/Plugin.js
1201
+
1202
+ /**
1203
+ * Plugin.js
1204
+ *
1205
+ * Released under LGPL License.
1206
+ * Copyright (c) 1999-2015 Ephox Corp. All rights reserved
1207
+ *
1208
+ * License: http://www.tinymce.com/license
1209
+ * Contributing: http://www.tinymce.com/contributing
1210
+ */
1211
+
1212
+ /**
1213
+ * Main plugin logic.
1214
+ *
1215
+ * @class tinymce.codesample.Plugin
1216
+ * @private
1217
+ */
1218
+ define("tinymce/codesampleplugin/Plugin", [
1219
+ "tinymce/Env",
1220
+ "tinymce/PluginManager",
1221
+ "tinymce/codesampleplugin/Prism",
1222
+ "tinymce/codesampleplugin/Dialog",
1223
+ "tinymce/codesampleplugin/Utils"
1224
+ ], function(Env, PluginManager, Prism, Dialog, Utils) {
1225
+ var addedCss, trimArg = Utils.trimArg;
1226
+
1227
+ PluginManager.add('codesample', function(editor, pluginUrl) {
1228
+ var $ = editor.$;
1229
+
1230
+ if (!Env.ceFalse) {
1231
+ return;
1232
+ }
1233
+
1234
+ function loadCss() {
1235
+ var linkElm;
1236
+
1237
+ if (!addedCss) {
1238
+ addedCss = true;
1239
+ linkElm = editor.dom.create('link', {
1240
+ rel: 'stylesheet',
1241
+ href: pluginUrl + '/css/prism.css'
1242
+ });
1243
+
1244
+ editor.getDoc().getElementsByTagName('head')[0].appendChild(linkElm);
1245
+ }
1246
+ }
1247
+
1248
+ editor.on('PreProcess', function(e) {
1249
+ $('pre[contenteditable=false]', e.node).
1250
+ filter(trimArg(Utils.isCodeSample)).
1251
+ each(function(idx, elm) {
1252
+ var $elm = $(elm), code = elm.textContent;
1253
+
1254
+ $elm.attr('class', $.trim($elm.attr('class')));
1255
+ $elm.removeAttr('contentEditable');
1256
+
1257
+ $elm.empty().append($('<code></code>').each(function() {
1258
+ // Needs to be textContent since innerText produces BR:s
1259
+ this.textContent = code;
1260
+ }));
1261
+ });
1262
+ });
1263
+
1264
+ editor.on('SetContent', function() {
1265
+ var unprocessedCodeSamples = $('pre').filter(trimArg(Utils.isCodeSample)).filter(function(idx, elm) {
1266
+ return elm.contentEditable !== "false";
1267
+ });
1268
+
1269
+ if (unprocessedCodeSamples.length) {
1270
+ editor.undoManager.transact(function() {
1271
+ unprocessedCodeSamples.each(function(idx, elm) {
1272
+ $(elm).find('br').each(function(idx, elm) {
1273
+ elm.parentNode.replaceChild(editor.getDoc().createTextNode('\n'), elm);
1274
+ });
1275
+
1276
+ elm.contentEditable = false;
1277
+ elm.innerHTML = editor.dom.encode(elm.textContent);
1278
+ Prism.highlightElement(elm);
1279
+ elm.className = $.trim(elm.className);
1280
+ });
1281
+ });
1282
+ }
1283
+ });
1284
+
1285
+ editor.addCommand('codesample', function() {
1286
+ Dialog.open(editor);
1287
+ });
1288
+
1289
+ editor.addButton('codesample', {
1290
+ cmd: 'codesample',
1291
+ title: 'Insert/Edit code sample'
1292
+ });
1293
+
1294
+ editor.on('init', loadCss);
1295
+ });
1296
+ });
1297
+
1298
+ expose(["tinymce/codesampleplugin/Prism","tinymce/codesampleplugin/Utils","tinymce/codesampleplugin/Dialog","tinymce/codesampleplugin/Plugin"]);
1299
+ })(this);