morrigan_editor_rails 0.0.1 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (281) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/morrigan_editor_rails/main.js.erb +2 -1
  3. data/app/assets/stylesheets/morrigan_editor_rails/morrigan-jquery-editor.css +2 -0
  4. data/app/helpers/morrigan_editor_rails/application_helper.rb +7 -0
  5. data/lib/morrigan_editor_rails/version.rb +1 -1
  6. data/test/dummy/{public/assets/morrigan_editor_rails/iframe-93d4936ce81b8a587abd68279b479b59.css → app/assets/stylesheets/editor_iframe.css} +4 -0
  7. data/test/dummy/config/environments/development.rb +3 -0
  8. data/test/dummy/config/initializers/assets.rb +1 -1
  9. data/test/dummy/config/initializers/morrigan_editor_rails.rb +5 -0
  10. data/test/dummy/log/development.log +5486 -0
  11. data/test/dummy/log/production.log +93 -0
  12. metadata +10 -546
  13. data/test/dummy/public/assets/FontAwesome-0ee664430e2da5ac56f2c971f0c63439.otf +0 -0
  14. data/test/dummy/public/assets/application-5d9d85d8335ff5721dca488f2d3688c5.css +0 -1834
  15. data/test/dummy/public/assets/application-5d9d85d8335ff5721dca488f2d3688c5.css.gz +0 -0
  16. data/test/dummy/public/assets/application-b05116063bc54b50b0fc8e88b4ed45b7.js +0 -5
  17. data/test/dummy/public/assets/application-b05116063bc54b50b0fc8e88b4ed45b7.js.gz +0 -0
  18. data/test/dummy/public/assets/application-b447577661d7c947a02fc712ce3d54f8.css +0 -16
  19. data/test/dummy/public/assets/application-b447577661d7c947a02fc712ce3d54f8.css.gz +0 -0
  20. data/test/dummy/public/assets/application-d3e06ca2fe4671e7a5d4e3d53c3b6cb3.js +0 -0
  21. data/test/dummy/public/assets/application-d3e06ca2fe4671e7a5d4e3d53c3b6cb3.js.gz +0 -0
  22. data/test/dummy/public/assets/fontawesome-webfont-2e73f13fc92463b8c5adb7ced8b5d5b3.woff +0 -0
  23. data/test/dummy/public/assets/fontawesome-webfont-43e93d81f55ce274e25bf3f75828fafc.eot +0 -0
  24. data/test/dummy/public/assets/fontawesome-webfont-45b82a11e17bf3eff3a6c1bd3eeb9921.ttf +0 -0
  25. data/test/dummy/public/assets/fontawesome-webfont-53cbb7cd1e1b43f08a90a14e42a2fcee.svg +0 -504
  26. data/test/dummy/public/assets/jquery-ui/animated-overlay-b5c0e0b06482d0e89bffaf0debe20059.gif +0 -0
  27. data/test/dummy/public/assets/jquery-ui/ui-bg_flat_0_aaaaaa_40x100-52033e8f8b9950eb2d17d7546faf10b4.png +0 -0
  28. data/test/dummy/public/assets/jquery-ui/ui-bg_flat_75_ffffff_40x100-9ec4bccc0ec08b6cb2a3dc5b142c9719.png +0 -0
  29. data/test/dummy/public/assets/jquery-ui/ui-bg_glass_55_fbf9ee_1x400-991430c1b213887d326620964ba40d2c.png +0 -0
  30. data/test/dummy/public/assets/jquery-ui/ui-bg_glass_65_ffffff_1x400-9c9ed386167ac17fc071f66c8cc4e6b5.png +0 -0
  31. data/test/dummy/public/assets/jquery-ui/ui-bg_glass_75_dadada_1x400-837edac49ae0a7f6f4639ccb9bd43c45.png +0 -0
  32. data/test/dummy/public/assets/jquery-ui/ui-bg_glass_75_e6e6e6_1x400-e398a4beda0443dfcec41bb22617dfc6.png +0 -0
  33. data/test/dummy/public/assets/jquery-ui/ui-bg_glass_95_fef1ec_1x400-86dd6772ce1bd01efa2d05c35fd9f0b5.png +0 -0
  34. data/test/dummy/public/assets/jquery-ui/ui-bg_highlight-soft_75_cccccc_1x100-0b73c10c5d594c1b003abf738969cdd5.png +0 -0
  35. data/test/dummy/public/assets/jquery-ui/ui-icons_222222_256x240-e4c1f6f86abd1a26b45c6d05a5f55520.png +0 -0
  36. data/test/dummy/public/assets/jquery-ui/ui-icons_2e83ff_256x240-321c7442bc996b1c2ce61babe7dfb644.png +0 -0
  37. data/test/dummy/public/assets/jquery-ui/ui-icons_454545_256x240-279585d60e34996188801101c02b0798.png +0 -0
  38. data/test/dummy/public/assets/jquery-ui/ui-icons_888888_256x240-7ddf0b271b9e1bfb11b436320a3a9463.png +0 -0
  39. data/test/dummy/public/assets/jquery-ui/ui-icons_cd0a0a_256x240-869786ce2d622313ecb58eac27734b40.png +0 -0
  40. data/test/dummy/public/assets/manifest-46f4a276c4039d42dc50b69b8ac12233.json +0 -1
  41. data/test/dummy/public/assets/morrigan_editor_rails/application-2c25763efa1ea44c67dbcd60f809c658.css +0 -1817
  42. data/test/dummy/public/assets/morrigan_editor_rails/application-2c25763efa1ea44c67dbcd60f809c658.css.gz +0 -0
  43. data/test/dummy/public/assets/morrigan_editor_rails/application-3eb996b320cc28baa482e10d3ba74811.css +0 -245
  44. data/test/dummy/public/assets/morrigan_editor_rails/application-3eb996b320cc28baa482e10d3ba74811.css.gz +0 -0
  45. data/test/dummy/public/assets/morrigan_editor_rails/application-76ff70872a2c7bd087c5a784454fdcbf.js +0 -1
  46. data/test/dummy/public/assets/morrigan_editor_rails/application-76ff70872a2c7bd087c5a784454fdcbf.js.gz +0 -0
  47. data/test/dummy/public/assets/morrigan_editor_rails/application-b05116063bc54b50b0fc8e88b4ed45b7.js +0 -5
  48. data/test/dummy/public/assets/morrigan_editor_rails/application-b05116063bc54b50b0fc8e88b4ed45b7.js.gz +0 -0
  49. data/test/dummy/public/assets/morrigan_editor_rails/iframe-93d4936ce81b8a587abd68279b479b59.css.gz +0 -0
  50. data/test/dummy/tmp/cache/assets/development/sprockets/0321185df67e40bb3d25cd9337d2e385 +0 -0
  51. data/test/dummy/tmp/cache/assets/development/sprockets/03e1339eff7bcd68961c6ebdb153644b +0 -0
  52. data/test/dummy/tmp/cache/assets/development/sprockets/04948aacd517f6321408a23ec2cf2e8b +0 -0
  53. data/test/dummy/tmp/cache/assets/development/sprockets/0610b50a9901b0a2eca737d8e7d2df4b +0 -0
  54. data/test/dummy/tmp/cache/assets/development/sprockets/092800bd18a5a96af8478489a4506eaf +0 -0
  55. data/test/dummy/tmp/cache/assets/development/sprockets/09813fb06f8819289e4d255076279e18 +0 -0
  56. data/test/dummy/tmp/cache/assets/development/sprockets/0c11377f5ad51416949263789e357c4c +0 -0
  57. data/test/dummy/tmp/cache/assets/development/sprockets/0caecb91e6d9e452d53f31ca3964f79f +0 -0
  58. data/test/dummy/tmp/cache/assets/development/sprockets/11ac1275e4692ee633b3c71b1c0bebb1 +0 -0
  59. data/test/dummy/tmp/cache/assets/development/sprockets/131967afa143dc8b7c46f5a217a6fa46 +0 -0
  60. data/test/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  61. data/test/dummy/tmp/cache/assets/development/sprockets/1568af041aa62d4031484f66405395c1 +0 -0
  62. data/test/dummy/tmp/cache/assets/development/sprockets/1627275c923b4943e38a21568937484d +0 -0
  63. data/test/dummy/tmp/cache/assets/development/sprockets/165355c398d384fb242c7c8a5532a3d8 +0 -0
  64. data/test/dummy/tmp/cache/assets/development/sprockets/19df4d11f557925c9bc7cb43578262e0 +0 -0
  65. data/test/dummy/tmp/cache/assets/development/sprockets/1db5c2b3a1138df948a5e88032482a02 +0 -0
  66. data/test/dummy/tmp/cache/assets/development/sprockets/1e7f5993a53ac2d5f4e340b4d30c82fa +0 -0
  67. data/test/dummy/tmp/cache/assets/development/sprockets/1eb00276a56856d27894122e801cea9e +0 -0
  68. data/test/dummy/tmp/cache/assets/development/sprockets/20e68a2461ec2ce4d88685eb2eff16e2 +0 -0
  69. data/test/dummy/tmp/cache/assets/development/sprockets/21e0c27bff259f767f698abebdb76299 +0 -0
  70. data/test/dummy/tmp/cache/assets/development/sprockets/21f02a02275d56fe5d76b703527b23d2 +0 -0
  71. data/test/dummy/tmp/cache/assets/development/sprockets/24abd23f27e203f719f88a78e5896a8f +0 -0
  72. data/test/dummy/tmp/cache/assets/development/sprockets/261af5ee646085a4961021fe32cc566c +0 -0
  73. data/test/dummy/tmp/cache/assets/development/sprockets/26ed15cf1b1bc0bddf4af089b3bb3d33 +0 -0
  74. data/test/dummy/tmp/cache/assets/development/sprockets/27a5bd50809b05e00f8452041f27defa +0 -0
  75. data/test/dummy/tmp/cache/assets/development/sprockets/285add66fb6488ba76ff575577dbd7f0 +0 -0
  76. data/test/dummy/tmp/cache/assets/development/sprockets/2b5cb8530a7a99b3a8a2f15ba14cf951 +0 -0
  77. data/test/dummy/tmp/cache/assets/development/sprockets/2d64754f4c82d6ae4d30ca64c8845bc7 +0 -0
  78. data/test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  79. data/test/dummy/tmp/cache/assets/development/sprockets/3057e979013485b60820bbc714a17f48 +0 -0
  80. data/test/dummy/tmp/cache/assets/development/sprockets/305b26fd4eec32622cd245e7e14a9902 +0 -0
  81. data/test/dummy/tmp/cache/assets/development/sprockets/30cccc5e4ef7bec14d1ac7bc7cc5e2f8 +0 -0
  82. data/test/dummy/tmp/cache/assets/development/sprockets/31ab1d6acf577e64fd258d229d207e59 +0 -0
  83. data/test/dummy/tmp/cache/assets/development/sprockets/3311bfd0df44b78f2dbdc3307d5a8e9f +0 -0
  84. data/test/dummy/tmp/cache/assets/development/sprockets/33b77053db9b4ed4e7e2a6e09a36f5fd +0 -0
  85. data/test/dummy/tmp/cache/assets/development/sprockets/341745765db05cc4c68995b4f4e39604 +0 -0
  86. data/test/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  87. data/test/dummy/tmp/cache/assets/development/sprockets/3672c41e6db53e97984682a1ad650d6f +0 -0
  88. data/test/dummy/tmp/cache/assets/development/sprockets/3b5cc9e4bac2c88831bb6ed7123131b7 +0 -0
  89. data/test/dummy/tmp/cache/assets/development/sprockets/3da0d6c0233f50dfe7159acf3404fa1d +0 -0
  90. data/test/dummy/tmp/cache/assets/development/sprockets/3effcc056262db5d2008bc7c6cf7489c +0 -0
  91. data/test/dummy/tmp/cache/assets/development/sprockets/4351525a108108f6192fc5387e453818 +0 -0
  92. data/test/dummy/tmp/cache/assets/development/sprockets/45fa6684beecb1f47b504c645cd13d74 +0 -0
  93. data/test/dummy/tmp/cache/assets/development/sprockets/4931c0ce6688a380bfc814df8e8bc6e3 +0 -0
  94. data/test/dummy/tmp/cache/assets/development/sprockets/4ada4e87544fdf2c95f38e383b6d11b5 +0 -0
  95. data/test/dummy/tmp/cache/assets/development/sprockets/4b025d7472b6b56e65bd626895e9c4c0 +0 -0
  96. data/test/dummy/tmp/cache/assets/development/sprockets/4ba383dd6ec1f1afc27223824db4f457 +0 -0
  97. data/test/dummy/tmp/cache/assets/development/sprockets/4db7f5fba90627a1a61931591491dcf4 +0 -0
  98. data/test/dummy/tmp/cache/assets/development/sprockets/51ffcaad707969960737655c2c223646 +0 -0
  99. data/test/dummy/tmp/cache/assets/development/sprockets/543958ca14afb95bbd93b55b7ac039cb +0 -0
  100. data/test/dummy/tmp/cache/assets/development/sprockets/55aff9808a8f3b94c4c614c3d44de610 +0 -0
  101. data/test/dummy/tmp/cache/assets/development/sprockets/55f300def7082e0e8894bf13ba1a6e85 +0 -0
  102. data/test/dummy/tmp/cache/assets/development/sprockets/5630e76b0def5573fcc8ccafd03f999a +0 -0
  103. data/test/dummy/tmp/cache/assets/development/sprockets/5643fd23961c801885d334b9d91df10e +0 -0
  104. data/test/dummy/tmp/cache/assets/development/sprockets/5ae44866f65a3c1c70ac7f5e4e9e8ada +0 -0
  105. data/test/dummy/tmp/cache/assets/development/sprockets/5b062b88b0ebb5c59eff6ecb3ec187e0 +0 -0
  106. data/test/dummy/tmp/cache/assets/development/sprockets/5dff01fe5dc9d7360ffc28bf99768306 +0 -0
  107. data/test/dummy/tmp/cache/assets/development/sprockets/5fc153905da1e5638b3194f45b0bd518 +0 -0
  108. data/test/dummy/tmp/cache/assets/development/sprockets/64722984598132f8ac30183766b0dd35 +0 -0
  109. data/test/dummy/tmp/cache/assets/development/sprockets/64d9c6efddaa74954e277731b2ff35d8 +0 -0
  110. data/test/dummy/tmp/cache/assets/development/sprockets/65497f75b82f8f0244f7ce35e7a441de +0 -0
  111. data/test/dummy/tmp/cache/assets/development/sprockets/667be9aaff6922cfc307d2aef0d20155 +0 -0
  112. data/test/dummy/tmp/cache/assets/development/sprockets/670af6208613d95a01f67bd7698977ca +0 -0
  113. data/test/dummy/tmp/cache/assets/development/sprockets/6899d2e976400c1fd62b154e6674aa2e +0 -0
  114. data/test/dummy/tmp/cache/assets/development/sprockets/6aafd5e1553b224b2e8cbde9894e2258 +0 -0
  115. data/test/dummy/tmp/cache/assets/development/sprockets/6cec73a1dbc690ab10f5a2340aa8e5a1 +0 -0
  116. data/test/dummy/tmp/cache/assets/development/sprockets/6d18b8bfd186ca130994040626f1236a +0 -0
  117. data/test/dummy/tmp/cache/assets/development/sprockets/70bc086882ef55cf7c9559f6cfb6d0f7 +0 -0
  118. data/test/dummy/tmp/cache/assets/development/sprockets/723d939c3ed433c4194986cb1c3507e4 +0 -0
  119. data/test/dummy/tmp/cache/assets/development/sprockets/738336559a9b4c5634fe949f1533d18d +0 -0
  120. data/test/dummy/tmp/cache/assets/development/sprockets/738d20441dc2db3daf94fc801d0b749f +0 -0
  121. data/test/dummy/tmp/cache/assets/development/sprockets/73d36b8ce4aed83d2de01ddd3b1b215b +0 -0
  122. data/test/dummy/tmp/cache/assets/development/sprockets/7404c3a6418ab85fecfbe08a3e49fb09 +0 -0
  123. data/test/dummy/tmp/cache/assets/development/sprockets/74fdea8b59cc67802fe7c93a1388c29d +0 -0
  124. data/test/dummy/tmp/cache/assets/development/sprockets/783d4f6f094d6c7ef5c35f00b637f45f +0 -0
  125. data/test/dummy/tmp/cache/assets/development/sprockets/7d524a66b3d1c1758ede69bf9d62bd69 +0 -0
  126. data/test/dummy/tmp/cache/assets/development/sprockets/7f156dc99b191c09d91d4892823faf7c +0 -0
  127. data/test/dummy/tmp/cache/assets/development/sprockets/802d75b370122c5a6a27f468cbf628a0 +0 -0
  128. data/test/dummy/tmp/cache/assets/development/sprockets/80951849171128f842bf8ab6eed8927b +0 -0
  129. data/test/dummy/tmp/cache/assets/development/sprockets/85d4ee080e5f140e3875f6c9f19ec335 +0 -0
  130. data/test/dummy/tmp/cache/assets/development/sprockets/862aa884a910ed39f85c10c46585baf1 +0 -0
  131. data/test/dummy/tmp/cache/assets/development/sprockets/87979023010b6a744323476cc9d46897 +0 -0
  132. data/test/dummy/tmp/cache/assets/development/sprockets/8b4b0571bc6bceed77ea9d67a31cbcfb +0 -0
  133. data/test/dummy/tmp/cache/assets/development/sprockets/8e36ec2be40c955f90b23b320584c189 +0 -0
  134. data/test/dummy/tmp/cache/assets/development/sprockets/900963b318e41fc312cfa0c26a49d9a8 +0 -0
  135. data/test/dummy/tmp/cache/assets/development/sprockets/90c5335a27fffe032beda891c25caa91 +0 -0
  136. data/test/dummy/tmp/cache/assets/development/sprockets/92a25f2119a691a2054f8791fb329abc +0 -0
  137. data/test/dummy/tmp/cache/assets/development/sprockets/94ba0ce43390611a9cf148e7d61a985e +0 -0
  138. data/test/dummy/tmp/cache/assets/development/sprockets/9545ff1b6f25a295a615fedf3d9ce653 +0 -0
  139. data/test/dummy/tmp/cache/assets/development/sprockets/9638a39246fade955b32f50726130a41 +0 -0
  140. data/test/dummy/tmp/cache/assets/development/sprockets/96554de8dd673b00ec6de3d7b9ce7279 +0 -0
  141. data/test/dummy/tmp/cache/assets/development/sprockets/968722a2d9059f1b9e09054f0ded5983 +0 -0
  142. data/test/dummy/tmp/cache/assets/development/sprockets/9741144d89c2bdc161d6aa876d47dc54 +0 -0
  143. data/test/dummy/tmp/cache/assets/development/sprockets/9ec445575fbe149a0abf5581fc782c0e +0 -0
  144. data/test/dummy/tmp/cache/assets/development/sprockets/a0eb37113fe7d9f74dc2f7dab6335c0d +0 -0
  145. data/test/dummy/tmp/cache/assets/development/sprockets/a165ed02557046eb86639600af323a42 +0 -0
  146. data/test/dummy/tmp/cache/assets/development/sprockets/a3a10a53974bb94c03743dff3b8a7712 +0 -0
  147. data/test/dummy/tmp/cache/assets/development/sprockets/a4674c57d471e349811bf9015e0bb0aa +0 -0
  148. data/test/dummy/tmp/cache/assets/development/sprockets/a63031eebc585d7d4c73b109dcaef7ab +0 -0
  149. data/test/dummy/tmp/cache/assets/development/sprockets/a65b378bd76aa841321c05ed998b2be8 +0 -0
  150. data/test/dummy/tmp/cache/assets/development/sprockets/a76e10e60a77abadef90284eb02d617d +0 -0
  151. data/test/dummy/tmp/cache/assets/development/sprockets/abc182b9bf1173963d6ff14892f1198f +0 -0
  152. data/test/dummy/tmp/cache/assets/development/sprockets/ac20e633649b099d4510c51800e92509 +0 -0
  153. data/test/dummy/tmp/cache/assets/development/sprockets/ad0177260aced4dde036899458fed5b1 +0 -0
  154. data/test/dummy/tmp/cache/assets/development/sprockets/b1fca3b536dcd71e0f0f04597921b746 +0 -0
  155. data/test/dummy/tmp/cache/assets/development/sprockets/b5ba3b627b6d1694d05398bc69add4a4 +0 -0
  156. data/test/dummy/tmp/cache/assets/development/sprockets/b7a4acdbe133653d2184b8676098c06e +0 -0
  157. data/test/dummy/tmp/cache/assets/development/sprockets/b997032241c368015b78c01cda8fb95b +0 -0
  158. data/test/dummy/tmp/cache/assets/development/sprockets/bb303f1f4e186fd522af42c989bde916 +0 -0
  159. data/test/dummy/tmp/cache/assets/development/sprockets/bdf7a9f9ad09c351a23156ea51b309e5 +0 -0
  160. data/test/dummy/tmp/cache/assets/development/sprockets/be9248bb5ad1baf293d1248d601efaaf +0 -0
  161. data/test/dummy/tmp/cache/assets/development/sprockets/bee0437b881469b143b739613750a3be +0 -0
  162. data/test/dummy/tmp/cache/assets/development/sprockets/bf2f87df19f2d1c849a4f6245553880b +0 -0
  163. data/test/dummy/tmp/cache/assets/development/sprockets/bf65075e056ebf9a40e628d610777d56 +0 -0
  164. data/test/dummy/tmp/cache/assets/development/sprockets/bfa762041885279e7c8fe4a9a62be7d3 +0 -0
  165. data/test/dummy/tmp/cache/assets/development/sprockets/c063ad7a08240a74dff7288152b3d363 +0 -0
  166. data/test/dummy/tmp/cache/assets/development/sprockets/c0e62549e67404bacf7444400cb05ad6 +0 -0
  167. data/test/dummy/tmp/cache/assets/development/sprockets/c65a5c1953f6db8c4889a4a281f1c38e +0 -0
  168. data/test/dummy/tmp/cache/assets/development/sprockets/cd1940a81ce614cc11931fe258692acb +0 -0
  169. data/test/dummy/tmp/cache/assets/development/sprockets/cd85b9366bc5f3f1fffe58b0c95ad640 +0 -0
  170. data/test/dummy/tmp/cache/assets/development/sprockets/cde4d69e5340a5fdff14a15395b09754 +0 -0
  171. data/test/dummy/tmp/cache/assets/development/sprockets/ce968fc7b385299b9920848ba992bba3 +0 -0
  172. data/test/dummy/tmp/cache/assets/development/sprockets/cef88d7383e5c841717e78a7fe2f93a8 +0 -0
  173. data/test/dummy/tmp/cache/assets/development/sprockets/cf24959a2a954dc9b412c6e18eaebe7c +0 -0
  174. data/test/dummy/tmp/cache/assets/development/sprockets/cf2c9ff2d31202713fa1d127c3315cd0 +0 -0
  175. data/test/dummy/tmp/cache/assets/development/sprockets/cf6ca7de953faa380b36e54eb75a78b9 +0 -0
  176. data/test/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  177. data/test/dummy/tmp/cache/assets/development/sprockets/d18c37db337a14b152f9e409c40129e3 +0 -0
  178. data/test/dummy/tmp/cache/assets/development/sprockets/d4426367f94684ff1a00a65b322bd8ce +0 -0
  179. data/test/dummy/tmp/cache/assets/development/sprockets/d4e11a3bb074775e2ac1e41f7cfc444c +0 -0
  180. data/test/dummy/tmp/cache/assets/development/sprockets/d73bc0fc2189e6ae7cb59c50707b51f4 +0 -0
  181. data/test/dummy/tmp/cache/assets/development/sprockets/d73be4268256b23fad7da7c3bbc6a297 +0 -0
  182. data/test/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  183. data/test/dummy/tmp/cache/assets/development/sprockets/d83408e74da3ed32025f99f441cfe546 +0 -0
  184. data/test/dummy/tmp/cache/assets/development/sprockets/da3f432129d762202201653f1fff5fc0 +0 -0
  185. data/test/dummy/tmp/cache/assets/development/sprockets/dca2dcac26fb981cf50463376c2812f6 +0 -0
  186. data/test/dummy/tmp/cache/assets/development/sprockets/e1cc9b1775e8ee16ae97ccf72ee0161c +0 -0
  187. data/test/dummy/tmp/cache/assets/development/sprockets/e6e5e010457e6197330309d38389d068 +0 -0
  188. data/test/dummy/tmp/cache/assets/development/sprockets/e7ec1731e510bdfb33f21ed2a0d2fda0 +0 -0
  189. data/test/dummy/tmp/cache/assets/development/sprockets/e906347e6a20e1ad8d34f31e0d2ac79a +0 -0
  190. data/test/dummy/tmp/cache/assets/development/sprockets/e95c8caf76355ea153236c73c0c93c2c +0 -0
  191. data/test/dummy/tmp/cache/assets/development/sprockets/eb2c3698df750c7c99a1f52b5462bb09 +0 -0
  192. data/test/dummy/tmp/cache/assets/development/sprockets/ec3c456c5908aa82b2279276c230baf3 +0 -0
  193. data/test/dummy/tmp/cache/assets/development/sprockets/ec8f89f47b4b0a16dcde3e5579f47d4b +0 -0
  194. data/test/dummy/tmp/cache/assets/development/sprockets/ec997013aa18ee0fa1b00bbf8283ce3f +0 -0
  195. data/test/dummy/tmp/cache/assets/development/sprockets/eda077c74db6201b5989642ecd8c4361 +0 -0
  196. data/test/dummy/tmp/cache/assets/development/sprockets/edc1dbe3537a9e0d17f74a12233b8574 +0 -0
  197. data/test/dummy/tmp/cache/assets/development/sprockets/ef6a2031ddc4c25518bd5b7da05980ea +0 -0
  198. data/test/dummy/tmp/cache/assets/development/sprockets/f05cedc33b8ef6a2a53c6683ed59fcda +0 -0
  199. data/test/dummy/tmp/cache/assets/development/sprockets/f5eaca1050a93fa117d1320e4d77e625 +0 -0
  200. data/test/dummy/tmp/cache/assets/development/sprockets/f71a0f222190bc4d6adb2f84a3e493c8 +0 -0
  201. data/test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  202. data/test/dummy/tmp/cache/assets/development/sprockets/f800b5c038f2c0b7abaff7196bb7dc4f +0 -0
  203. data/test/dummy/tmp/cache/assets/development/sprockets/f95bcd17a28696d1b7384e55d21c5e71 +0 -0
  204. data/test/dummy/tmp/cache/assets/development/sprockets/f9c812dc9510ae65c55f0438735bfcc3 +0 -0
  205. data/test/dummy/tmp/cache/assets/development/sprockets/fa54025f04071ac4022e7d532c58513f +0 -0
  206. data/test/dummy/tmp/cache/assets/development/sprockets/fa54f83fd4d0a2c36ff161a7f5406828 +0 -0
  207. data/test/dummy/tmp/cache/assets/development/sprockets/fa707e9dacab90f24198586f2ed18184 +0 -0
  208. data/test/dummy/tmp/cache/assets/development/sprockets/faef49d6ae9c3dc9db00521b59a8bc1a +0 -0
  209. data/test/dummy/tmp/cache/assets/development/sprockets/fd31617d454f515dc7ccb68a36bb42a4 +0 -0
  210. data/test/dummy/tmp/cache/assets/production/sprockets/03e1339eff7bcd68961c6ebdb153644b +0 -0
  211. data/test/dummy/tmp/cache/assets/production/sprockets/092800bd18a5a96af8478489a4506eaf +0 -0
  212. data/test/dummy/tmp/cache/assets/production/sprockets/0e19f8202609949dabc07ed8b095470b +0 -0
  213. data/test/dummy/tmp/cache/assets/production/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  214. data/test/dummy/tmp/cache/assets/production/sprockets/19ec4693e7f8034682758ebeb784caf4 +0 -0
  215. data/test/dummy/tmp/cache/assets/production/sprockets/1a93153ce3836c5d6837723f6d5a244c +0 -0
  216. data/test/dummy/tmp/cache/assets/production/sprockets/1e78d36ec03d73575ed3f02e1a84d8da +0 -0
  217. data/test/dummy/tmp/cache/assets/production/sprockets/1e7f5993a53ac2d5f4e340b4d30c82fa +0 -0
  218. data/test/dummy/tmp/cache/assets/production/sprockets/1f0f08c54d915b04f25266fb88281f6e +0 -0
  219. data/test/dummy/tmp/cache/assets/production/sprockets/20a26da8529e3a51c5e1ce3c47f1db90 +0 -0
  220. data/test/dummy/tmp/cache/assets/production/sprockets/21f02a02275d56fe5d76b703527b23d2 +0 -0
  221. data/test/dummy/tmp/cache/assets/production/sprockets/237c8eab1ea38442b26d8710e5556b99 +0 -0
  222. data/test/dummy/tmp/cache/assets/production/sprockets/26ed15cf1b1bc0bddf4af089b3bb3d33 +0 -0
  223. data/test/dummy/tmp/cache/assets/production/sprockets/27a5bd50809b05e00f8452041f27defa +0 -0
  224. data/test/dummy/tmp/cache/assets/production/sprockets/28aecca92286e0662b612d8c9fc4d759 +0 -0
  225. data/test/dummy/tmp/cache/assets/production/sprockets/2aa5266b019ec8eef0bcf65b922a63e6 +0 -0
  226. data/test/dummy/tmp/cache/assets/production/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  227. data/test/dummy/tmp/cache/assets/production/sprockets/3057e979013485b60820bbc714a17f48 +0 -0
  228. data/test/dummy/tmp/cache/assets/production/sprockets/30cccc5e4ef7bec14d1ac7bc7cc5e2f8 +0 -0
  229. data/test/dummy/tmp/cache/assets/production/sprockets/319a811d32f03d31d3e1d7afb14f41eb +0 -0
  230. data/test/dummy/tmp/cache/assets/production/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  231. data/test/dummy/tmp/cache/assets/production/sprockets/3c119f15854a0be1964494bfc871a214 +0 -0
  232. data/test/dummy/tmp/cache/assets/production/sprockets/47ea87fe292c37f25cfbdc27b4ca2f4c +0 -0
  233. data/test/dummy/tmp/cache/assets/production/sprockets/4948c0b011347c0a6735a2ca2e535ffb +0 -0
  234. data/test/dummy/tmp/cache/assets/production/sprockets/4db7f5fba90627a1a61931591491dcf4 +0 -0
  235. data/test/dummy/tmp/cache/assets/production/sprockets/4ee2b4107242bb84c1a7fff870637ea2 +0 -0
  236. data/test/dummy/tmp/cache/assets/production/sprockets/505d2141082342a40629715a8ccdab64 +0 -0
  237. data/test/dummy/tmp/cache/assets/production/sprockets/543958ca14afb95bbd93b55b7ac039cb +0 -0
  238. data/test/dummy/tmp/cache/assets/production/sprockets/5dff01fe5dc9d7360ffc28bf99768306 +0 -0
  239. data/test/dummy/tmp/cache/assets/production/sprockets/670af6208613d95a01f67bd7698977ca +0 -0
  240. data/test/dummy/tmp/cache/assets/production/sprockets/6d18b8bfd186ca130994040626f1236a +0 -0
  241. data/test/dummy/tmp/cache/assets/production/sprockets/70bc086882ef55cf7c9559f6cfb6d0f7 +0 -0
  242. data/test/dummy/tmp/cache/assets/production/sprockets/7404c3a6418ab85fecfbe08a3e49fb09 +0 -0
  243. data/test/dummy/tmp/cache/assets/production/sprockets/74fdea8b59cc67802fe7c93a1388c29d +0 -0
  244. data/test/dummy/tmp/cache/assets/production/sprockets/783d4f6f094d6c7ef5c35f00b637f45f +0 -0
  245. data/test/dummy/tmp/cache/assets/production/sprockets/7925c24c53084dc9987bf9eaebf534f3 +0 -0
  246. data/test/dummy/tmp/cache/assets/production/sprockets/7c94e39026e1b69c7de824cea32b66b5 +0 -0
  247. data/test/dummy/tmp/cache/assets/production/sprockets/80951849171128f842bf8ab6eed8927b +0 -0
  248. data/test/dummy/tmp/cache/assets/production/sprockets/87dd8b056add6e6fd9ae20535509de81 +0 -0
  249. data/test/dummy/tmp/cache/assets/production/sprockets/8a2bdcc15fd8625edd63cee50c21e46e +0 -0
  250. data/test/dummy/tmp/cache/assets/production/sprockets/8b4b0571bc6bceed77ea9d67a31cbcfb +0 -0
  251. data/test/dummy/tmp/cache/assets/production/sprockets/8d5c3d413736edecc6bc775540172f09 +0 -0
  252. data/test/dummy/tmp/cache/assets/production/sprockets/90c5335a27fffe032beda891c25caa91 +0 -0
  253. data/test/dummy/tmp/cache/assets/production/sprockets/92a25f2119a691a2054f8791fb329abc +0 -0
  254. data/test/dummy/tmp/cache/assets/production/sprockets/9545ff1b6f25a295a615fedf3d9ce653 +0 -0
  255. data/test/dummy/tmp/cache/assets/production/sprockets/968722a2d9059f1b9e09054f0ded5983 +0 -0
  256. data/test/dummy/tmp/cache/assets/production/sprockets/97e6f53ed13baa9f3e154c950b1dfc7a +0 -0
  257. data/test/dummy/tmp/cache/assets/production/sprockets/9d53f65dc02ac342964571b4a52bd7e1 +0 -0
  258. data/test/dummy/tmp/cache/assets/production/sprockets/a26112ddbf1829adea4a7713471eafe7 +0 -0
  259. data/test/dummy/tmp/cache/assets/production/sprockets/a662aec525173c644ccd45afd6eaaf91 +0 -0
  260. data/test/dummy/tmp/cache/assets/production/sprockets/a76e10e60a77abadef90284eb02d617d +0 -0
  261. data/test/dummy/tmp/cache/assets/production/sprockets/ab0a007b34cc2e2db6a1c2280b07f7fb +0 -0
  262. data/test/dummy/tmp/cache/assets/production/sprockets/ad060ac8e1d548c83d147081a6b7ebae +0 -0
  263. data/test/dummy/tmp/cache/assets/production/sprockets/afaf5379ab34b4826f87462ee039b106 +0 -0
  264. data/test/dummy/tmp/cache/assets/production/sprockets/b5ba3b627b6d1694d05398bc69add4a4 +0 -0
  265. data/test/dummy/tmp/cache/assets/production/sprockets/b997032241c368015b78c01cda8fb95b +0 -0
  266. data/test/dummy/tmp/cache/assets/production/sprockets/bf2f87df19f2d1c849a4f6245553880b +0 -0
  267. data/test/dummy/tmp/cache/assets/production/sprockets/c063ad7a08240a74dff7288152b3d363 +0 -0
  268. data/test/dummy/tmp/cache/assets/production/sprockets/c0e62549e67404bacf7444400cb05ad6 +0 -0
  269. data/test/dummy/tmp/cache/assets/production/sprockets/c4eb0e779c4215872b4e9467852495b9 +0 -0
  270. data/test/dummy/tmp/cache/assets/production/sprockets/c7a30ef0a33b813f17b48482c4605cb5 +0 -0
  271. data/test/dummy/tmp/cache/assets/production/sprockets/cf2c9ff2d31202713fa1d127c3315cd0 +0 -0
  272. data/test/dummy/tmp/cache/assets/production/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  273. data/test/dummy/tmp/cache/assets/production/sprockets/d18c37db337a14b152f9e409c40129e3 +0 -0
  274. data/test/dummy/tmp/cache/assets/production/sprockets/d73bc0fc2189e6ae7cb59c50707b51f4 +0 -0
  275. data/test/dummy/tmp/cache/assets/production/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  276. data/test/dummy/tmp/cache/assets/production/sprockets/dda643fb5a9c5352b382ac7f8e7b9fd7 +0 -0
  277. data/test/dummy/tmp/cache/assets/production/sprockets/df9cddc8374d865bcb77173e6c6a18a3 +0 -0
  278. data/test/dummy/tmp/cache/assets/production/sprockets/ec8f89f47b4b0a16dcde3e5579f47d4b +0 -0
  279. data/test/dummy/tmp/cache/assets/production/sprockets/f6f036d8e1c0b10fa5cb30ce8eb22d03 +0 -0
  280. data/test/dummy/tmp/cache/assets/production/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  281. data/test/dummy/tmp/pids/server.pid +0 -1
@@ -1,245 +0,0 @@
1
- .morrigan-editor {
2
- margin:0;
3
- padding:0;
4
- border: 1px solid #ddd;
5
- position: relative;
6
- font-family: Helvetica, Arial, Verdana, Tahoma, sans-serif;
7
- font-size: 13px;
8
- background-color: white;
9
- }
10
-
11
- .morrigan-editor * {
12
- font-family: Helvetica, Arial, Verdana, Tahoma, sans-serif;
13
- }
14
-
15
- .morrigan-editor .mrge-clear {
16
- clear: both;
17
- }
18
-
19
- /* Toolbox */
20
-
21
- .morrigan-editor .mrge-toolbox {
22
- padding: 2px 0 2px 0;
23
- border-bottom: 1px solid #ddd;
24
- }
25
-
26
- .morrigan-editor .mrge-toolbox ul {
27
- clear:both;
28
- margin: 0;
29
- padding: 2px 0 0 4px;
30
- }
31
-
32
- .morrigan-editor .mrge-toolbox li {
33
- list-style: none;
34
- float:left;
35
- margin: 0 4px 2px 0;
36
- padding: 2px 0 2px 2px;
37
- background-color: #eee;
38
- }
39
-
40
- .morrigan-editor .mrge-toolbox li a {
41
- height: 24px;
42
- width:24px;
43
- display: inline-block;
44
- float: left;
45
- margin: 0 2px 0 0;
46
- line-height: 24px;
47
- }
48
-
49
- .morrigan-editor .mrge-toolbox .mrge-action {
50
- background-color: #eeeeee;
51
- text-align: center;
52
- font-size: 18px;
53
- cursor: pointer;
54
- }
55
-
56
- .morrigan-editor .mrge-toolbox .mrge-action-list {
57
- position: relative;
58
- width: auto;
59
- padding: 0 5px 0 5px;
60
- }
61
-
62
- .morrigan-editor .mrge-toolbox .mrge-action-dropdown {
63
- background-color: white;
64
- position: absolute;
65
- top:27px;
66
- left:0;
67
- padding: 2px 2px 0 2px;
68
- border: 1px solid #eee;
69
- }
70
-
71
- .morrigan-editor .mrge-toolbox .mrge-action-dropdown div {
72
- padding-bottom: 2px;
73
- }
74
-
75
- .morrigan-editor .mrge-toolbox .mrge-disabled {
76
- background-color: #eee;
77
- color: gray;
78
- cursor: default;
79
- }
80
-
81
- /* Popup */
82
-
83
- .morrigan-editor .mrge-popup-wrapper {
84
- display: none;
85
- }
86
-
87
- .morrigan-editor .mrge-popup-overlay {
88
- position: absolute;
89
- top: 0;
90
- left: 0;
91
- right: 0;
92
- bottom: 0;
93
- background: white;
94
- z-index: 99;
95
- opacity: 0.7;
96
- }
97
-
98
- .morrigan-editor .mrge-popup {
99
- z-index: 100;
100
- position: absolute;
101
- width: 350px;
102
- background: white;
103
- }
104
-
105
- .morrigan-editor .mrge-popup-box-wrapper {
106
- padding: 10px;
107
- }
108
-
109
- .morrigan-editor .mrge-popup .mrge-popup-header {
110
- background-color: #eee;
111
- position: absolute;
112
- width: 100%;
113
- top:0;
114
- }
115
-
116
- .morrigan-editor .mrge-popup .mrge-popup-header .mrge-popup-close {
117
- width: 18px;
118
- height: 18px;
119
- float: right;
120
- font-size: 18px;
121
- text-align: center;
122
- cursor: pointer;
123
- }
124
-
125
- .morrigan-editor .mrge-popup .mrge-popup-header .mrge-popup-close:hover {
126
- color: #999;
127
- }
128
-
129
- .morrigan-editor .mrge-popup .mrge-popup-content {
130
- margin: 46px 0 46px 0;
131
- }
132
-
133
- .morrigan-editor .mrge-popup .mrge-popup-content .mrge-divider {
134
- margin: 10px 0 10px 10px;
135
- }
136
-
137
- .morrigan-editor .mrge-popup .mrge-popup-content input {
138
- outline: none;
139
- width: 330px;
140
-
141
- }
142
-
143
- .morrigan-editor .mrge-popup .mrge-popup-content input[type="text"] {
144
- width: 326px;
145
- }
146
-
147
- .morrigan-editor .mrge-popup .mrge-popup-actions {
148
- padding-top: 0;
149
- position: absolute;
150
- width: 100%;
151
- bottom: 0;
152
- }
153
-
154
- .morrigan-editor .mrge-popup .mrge-popup-btn {
155
- cursor: pointer;
156
- display: none;
157
- float: left;
158
- padding: 5px 10px;
159
- background-color: #eee;
160
- margin-right: 10px;
161
- width: 50px;
162
- text-align: center;
163
- }
164
-
165
- .morrigan-editor .mrge-popup .mrge-popup-btn:hover {
166
- background-color: #ccc;
167
- }
168
-
169
- .morrigan-editor .mrge-popup .mrge-popup-btn.mrge-popup-ok {
170
- background-color: #666;
171
- color: #eee;
172
- }
173
-
174
- .morrigan-editor .mrge-popup .mrge-popup-btn.mrge-popup-ok:hover {
175
- background-color: #888;
176
- }
177
-
178
- .morrigan-editor .mrge-popup .mrge-popup-btn.mrge-active {
179
- display: block;
180
- }
181
-
182
- /* Support elements */
183
-
184
- .morrigan-editor .mrge-support-elements {
185
- display: none;
186
- }
187
-
188
- /* Loader */
189
-
190
- .morrigan-editor .mrge-loader-wrapper {
191
- display: none;
192
- }
193
-
194
- .morrigan-editor .mrge-loader-wrapper.active {
195
- display: block;
196
- }
197
-
198
- .morrigan-editor .mrge-loader-wrapper .mrge-loader-background {
199
- position: absolute;
200
- top: 0;
201
- left: 0;
202
- right: 0;
203
- bottom: 0;
204
- background: white;
205
- z-index: 99;
206
- opacity: 0.7;
207
- }
208
-
209
- .morrigan-editor .mrge-loader-wrapper .mrge-loader-icon {
210
- top:50%;
211
- left: 50%;
212
- font-size: 50px;
213
- margin: -25px 0 0 -22px;
214
- position: absolute;
215
- z-index: 100;
216
- }
217
-
218
- /* Content */
219
-
220
- .morrigan-editor .mrge-content {
221
- width: 100%;
222
- /*TODO: for iphone support*/
223
- /*overflow-y:auto; */
224
- /*-webkit-overflow-scrolling:touch;*/
225
- }
226
-
227
- .morrigan-editor .mrge-content iframe {
228
- width: 100%;
229
- height: 100%;
230
- }
231
- /*
232
- * This is a manifest file that'll be compiled into application.css, which will include all the files
233
- * listed below.
234
- *
235
- * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
236
- * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
237
- *
238
- * You're free to add application-wide styles to this file and they'll appear at the bottom of the
239
- * compiled file so the styles you add here take precedence over styles defined in any styles
240
- * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
241
- * file per style scope.
242
- *
243
-
244
- */
245
-
@@ -1 +0,0 @@
1
- $.widget("morrigan.morrigan_editor",{options:{height:"600px",width:"900px",doctype:"<!DOCTYPE html>",notSupportedMsg:"Your browser is not supported.",iframeStyles:"/iframe.css",imageUpload:null,spellCheck:!0,toolbox:[[["format"],["bold","italy","strike"],["img","video"],["alignLeft","alignCenter","alignRight"],["orderedList","unorderedList"],["link","unLink"]]],popup:{actions:{ok:{caption:"Ok"},cancel:{caption:"Cancel"}}},block:{mediaBlock:{width:{def:"350px",max:"400px"},height:{def:"270px",max:"430px",video:"205px"}}}},_browser:{},_content:null,_window:null,_actionManager:null,_selectionManager:null,_actionSupport:null,_popup:null,_uploader:null,_loader:null,_blockManager:null,_options:{},_actions:{video:{name:"video",view:{activeBackground:"#aaa",inactiveBackground:"#eee",title:"Video",classes:"fa fa-youtube-play"},popup:{title:"Add video",height:"130px",html:'<form action="/video/create" method="post" enctype="multipart/form-data" target="mrge-support-iframe"><div class="mrge-option"><input type="text" placeholder=" add video HTML code here" name="video_html"></div></form>',actions:["ok","cancel"],onShow:function(e,t){var n;isIframeCodeCorrect=function(e){return/^<iframe.* src=\".*><\/iframe>\s*$/.test(e)},exec=function(){var i=e.find('input[name="video_html"]').val();isIframeCodeCorrect(i)?(t._browser.ie&&t._selectionManager.restoreInternalRange(n),t._blockManager.addBlock({videoHTML:i}),t._popup.hidePopup()):alert("Video HTML is not correct")},e.find(".mrge-popup-ok").on("click",function(){exec()}),t._browser.ie&&(n=t._selectionManager.getInternalRange())},onHide:function(e){e.find(".mrge-popup-ok").off("click")}}},img:{name:"img",view:{activeBackground:"#aaa",inactiveBackground:"#eee",title:"Image",classes:"fa fa-picture-o"},popup:{title:"Add image",height:"200px",actions:["ok","cancel"],customForm:function(e,t){var n='<form action="'+e.options.imageUpload+'" method="post" enctype="multipart/form-data" target="mrge-support-iframe"><div class="mrge-option"><input type="file" name="upload_img"/></div><div class="mrge-divider">or</div><div class="mrge-option"><input type="text" placeholder=" add image link here" name="upload_url"></div></form>';t.html(n)},onShow:function(e,t){var n;haveFileToUpload=function(){var t=e.find('[name="upload_img"]'),n=e.find('[name="upload_url"]');return""!=t.val()||""!=n.val()},uploadImage=function(){var i;t._uploader.prepareToLoad(),e.find("form").submit(),t._loader.showLoader();var o=setInterval(function(){i=t._uploader.getData(),i&&(clearInterval(o),t._loader.hideLoader(),t._browser.ie&&t._selectionManager.restoreInternalRange(n),t._blockManager.addBlock({imageUrl:i.data}))},100)},exec=function(){haveFileToUpload()&&(t._popup.hidePopup(),uploadImage())},e.find('input[type="file"]').on("change",function(){exec()}),e.find(".mrge-popup-ok").on("click",function(){exec()}),t._browser.ie&&(n=t._selectionManager.getInternalRange())},onHide:function(e){e.find(".mrge-popup-ok").off("click")}}},alignLeft:{name:"alignLeft",view:{activeBackground:"#aaa",inactiveBackground:"#eee",title:"Align Left",classes:"fa fa-align-left"},onClickHandler:function(e){var t=e._selectionManager.getCustomSelection(),n=e._selectionManager.isCaret(t),i=e._selectionManager.getTopSelectedElements(t,n),o=$(i).filter(function(){return"DIV"!=this.nodeName});$(o).css("text-align",""),e._content.trigger("mouseup")},selectionHandler:function(e,t){var n=t.topElements,i=$(n).first().css("text-align"),o=$(n).filter(function(){return"DIV"!=this.nodeName}),r=$(o).filter(function(){return $(this).css("text-align")==i});this.changeActiveIcon(o.length==r.length&&("left"==i||"start"==i))}},alignCenter:{name:"alignCenter",view:{activeBackground:"#aaa",inactiveBackground:"#eee",title:"Align Center",classes:"fa fa-align-center"},onClickHandler:function(e){var t=e._selectionManager.getCustomSelection(),n=e._selectionManager.isCaret(t),i=e._selectionManager.getTopSelectedElements(t,n),o=$(i).first().css("text-align"),r=$(i).filter(function(){return"DIV"!=this.nodeName}),a=$(r).filter(function(){return $(this).css("text-align")==o});r.length==a.length&&"center"==o?$(r).css("text-align",""):$(r).css("text-align","center"),e._content.trigger("mouseup")},selectionHandler:function(e,t){var n=t.topElements,i=$(n).first().css("text-align"),o=$(n).filter(function(){return"DIV"!=this.nodeName}),r=$(o).filter(function(){return $(this).css("text-align")==i});this.changeActiveIcon(o.length==r.length&&"center"==i)}},alignRight:{name:"alignRight",view:{activeBackground:"#aaa",inactiveBackground:"#eee",title:"Align Right",classes:"fa fa-align-right"},onClickHandler:function(e){var t=e._selectionManager.getCustomSelection(),n=e._selectionManager.isCaret(t),i=e._selectionManager.getTopSelectedElements(t,n),o=$(i).first().css("text-align"),r=$(i).filter(function(){return"DIV"!=this.nodeName}),a=$(r).filter(function(){return $(this).css("text-align")==o});r.length==a.length&&"right"==o?$(r).css("text-align",""):$(r).css("text-align","right"),e._content.trigger("mouseup")},selectionHandler:function(e,t){var n=t.topElements,i=$(n).first().css("text-align"),o=$(n).filter(function(){return"DIV"!=this.nodeName}),r=$(o).filter(function(){return $(this).css("text-align")==i});this.changeActiveIcon(o.length==r.length&&"right"==i)}},orderedList:{name:"orderedList",view:{activeBackground:"#aaa",inactiveBackground:"#eee",title:"Ordered List",classes:"fa fa-list-ol"},onClickHandler:function(e,t){e._window.document.execCommand("InsertOrderedList",!1,null),t.changeActiveIcon(e._window.document.queryCommandState("InsertOrderedList")),e._actionManager.findAction("unorderedList").changeActiveIcon(e._window.document.queryCommandState("InsertUnorderedList"));var n=e._selectionManager.getCustomSelection(),i=e._selectionManager.isCaret(n),o=e._selectionManager.getTopSelectedElements(n,i);$(o[0]).find("ol").unwrap()},selectionHandler:function(e){this.changeActiveIcon(e._window.document.queryCommandState("InsertOrderedList"))}},unorderedList:{name:"unorderedList",view:{activeBackground:"#aaa",inactiveBackground:"#eee",title:"Unordered List",classes:"fa fa-list-ul"},onClickHandler:function(e,t){e._window.document.execCommand("InsertUnorderedList",!1,null),t.changeActiveIcon(e._window.document.queryCommandState("InsertUnorderedList")),e._actionManager.findAction("orderedList").changeActiveIcon(e._window.document.queryCommandState("InsertOrderedList"));var n=e._selectionManager.getCustomSelection(),i=e._selectionManager.isCaret(n),o=e._selectionManager.getTopSelectedElements(n,i);$(o[0]).find("ul").unwrap()},selectionHandler:function(e){this.changeActiveIcon(e._window.document.queryCommandState("InsertUnorderedList"))}},bold:{name:"bold",view:{activeBackground:"#aaa",inactiveBackground:"#eee",title:"Bold",classes:"fa fa-bold"},onClickHandler:function(e,t){e._window.document.execCommand("bold",!1,null),t.changeActiveIcon(e._window.document.queryCommandState("bold"))},selectionHandler:function(e){this.changeActiveIcon(e._window.document.queryCommandState("bold"))}},italy:{name:"italy",view:{activeBackground:"#aaa",inactiveBackground:"#eee",title:"Italy",classes:"fa fa-italic"},onClickHandler:function(e,t){e._window.document.execCommand("italic",!1,null),t.changeActiveIcon(e._window.document.queryCommandState("italic"))},selectionHandler:function(e){this.changeActiveIcon(e._window.document.queryCommandState("italic"))}},strike:{name:"strike",view:{title:"Strike",activeBackground:"#aaa",inactiveBackground:"#eee",classes:"fa fa-strikethrough"},onClickHandler:function(e,t){e._window.document.execCommand("strikethrough",!1,null),t.changeActiveIcon(e._window.document.queryCommandState("strikethrough"))},selectionHandler:function(e){this.changeActiveIcon(e._window.document.queryCommandState("strikethrough"))}},unLink:{name:"unLink",view:{title:"Unlink",activeBackground:"#aaa",inactiveBackground:"#eee",classes:"fa fa-unlink"},onClickHandler:function(e){e._window.document.execCommand("Unlink",!1,null)}},link:{name:"link",view:{activeBackground:"#aaa",inactiveBackground:"#eee",title:"Link",classes:"fa fa-link"},popup:{title:"Add link",height:"130px",html:'<div class="mrge-option"><input type="text" placeholder=" URL" name="url"></div>',actions:["ok","cancel"],onShow:function(e,t){var n,i=function(e){return 0==e.indexOf("http")?e:"http://"+e};exec=function(){var o=i(e.find('input[name="url"]').val());t._browser.ie&&t._selectionManager.restoreInternalRange(n),t._window.document.execCommand("CreateLink",!1,o),t._popup.hidePopup()},e.find(".mrge-popup-ok").on("click",function(){exec()}),t._browser.ie&&(n=t._selectionManager.getInternalRange())},onHide:function(e){e.find(".mrge-popup-ok").off("click")}}},format:{name:"format",view:{text:"Format",title:"Paragraph format"},changeStatus:function(e){if(e){var t=this.config.dropdown.matchList[e];isNaN(t)||this.config.dropdown.currentActionItemIndex==t?isNaN(t)&&0!=this.config.dropdown.currentActionItemIndex&&(this.config.dropdown.currentActionItemIndex=0,$(this.element).children("span.mrge-action-text").text(this.config.dropdown.actionList[0].text)):(this.config.dropdown.currentActionItemIndex=t,$(this.element).children("span.mrge-action-text").text(this.config.dropdown.actionList[t].text))}else-1!=this.config.dropdown.currentActionItemIndex&&(this.config.dropdown.currentActionItemIndex=-1,$(this.element).children("span.mrge-action-text").text(this.config.view.text))},selectionHandler:function(e,t){var n,i,o,r=t.topElements;r.length>0&&r[0]?(i=r[0].nodeName,o=$(r).filter(function(){return this.nodeName===i}),o.length==r.length&&(n=i)):n="P",this.changeStatus(n)},dropdown:{width:"150px",actionList:[{text:"Paragraph",tag:"P",onClickHandler:function(e,t){if(e._browser.webkit){var n=e._selectionManager.getCustomSelection(),i=e._selectionManager.isCaret(n),o=e._selectionManager.getTopSelectedElements(n,i);e._actionSupport.mutateBlock(o,"P",n)}else e._window.document.execCommand("formatblock",!1,"<p>");t.changeStatus("P")}},{text:"Heading 1",tag:"H2",onClickHandler:function(e,t){if(e._browser.webkit){var n=e._selectionManager.getCustomSelection(),i=e._selectionManager.isCaret(n),o=e._selectionManager.getTopSelectedElements(n,i);e._actionSupport.mutateBlock(o,"H2",n)}else e._window.document.execCommand("formatblock",!1,"<h2>");t.changeStatus("H2")}},{text:"Heading 2",tag:"H3",onClickHandler:function(e,t){if(e._browser.webkit){var n=e._selectionManager.getCustomSelection(),i=e._selectionManager.isCaret(n),o=e._selectionManager.getTopSelectedElements(n,i);e._actionSupport.mutateBlock(o,"H3",n)}else e._window.document.execCommand("formatblock",!1,"<h3>");t.changeStatus("H3")}},{text:"Heading 3",tag:"H4",onClickHandler:function(e,t){if(e._browser.webkit){var n=e._selectionManager.getCustomSelection(),i=e._selectionManager.isCaret(n),o=e._selectionManager.getTopSelectedElements(n,i);e._actionSupport.mutateBlock(o,"H4",n)}else e._window.document.execCommand("formatblock",!1,"<h4>");t.changeStatus("H4")}}]}}},ActionManager:function(e){this.editor=e,this.actions=[],this.disabledActions=[],this.selectionChangedSubscribers=[],this.findAction=function(e){return $.grep(this.actions,function(t){return t.config.name==e})[0]},this.addAction=function(e,t){var n=new this.editor.Action(e,t);this.actions.push(n);var i=this.actions.length-1;n.enabled||this.disabledActions.push(i),n.selectionHandler&&this.selectionChangedSubscribers.push(i)}},Action:function(e,t){var n=this;this.element=t,this.config=e,this.enabled=!1,e.view.activeBackground&&e.view.inactiveBackground&&(this.activeState=!1,this.changeActiveIcon=function(e){void 0==e?this.activeState?this.setInactiveIcon():this.setActiveIcon():e&&!this.activeState?this.setActiveIcon():!e&&this.activeState&&this.setInactiveIcon()},this.setActiveIcon=function(){this.element.css("background-color",e.view.activeBackground).addClass("mrge-active"),this.activeState=!0},this.setInactiveIcon=function(){this.element.css("background-color",e.view.inactiveBackground).removeClass("mrge-active"),this.activeState=!1}),this.changeStatus=e.changeStatus,this.config.dropdown?(this.config.dropdown.shown=!1,this.config.dropdown.currentActionItemIndex=-1,this.dropDownShow=function(){this.element.children(".mrge-action-dropdown").show(),this.config.dropdown.shown=!0},this.dropDownHide=function(){this.config.dropdown.shown=!1,this.element.children(".mrge-action-dropdown").hide()},this.config.dropdown.matchList={},$(this.config.dropdown.actionList).each(function(e){n.config.dropdown.matchList[this.tag]=e})):this.onClickHandler=e.onClickHandler,this.selectionHandler=this.config.selectionHandler},ActionSupport:function(e){this.editor=e,this.mutateBlock=function(e,t,n){var i=this._saveSelection(n),o=!1;$(e).each(function(){this.nodeName!=t&&($(this).replaceWith("<"+t+">"+this.innerHTML+"</"+t+">"),o=!0)}),o&&this._restoreSelection(i)},this._saveSelection=function(e){var t=e.selection,n=this._getNodePath(t.anchorNode),i=this._getNodePath(t.focusNode);return this._isCorrectSequenceSelection(t)?{anchorNodePath:n,anchorOffset:t.anchorOffset,focusNodePath:i,focusOffset:t.focusOffset}:{anchorNodePath:i,anchorOffset:t.focusOffset,focusNodePath:n,focusOffset:t.anchorOffset}},this._isCorrectSequenceSelection=function(e){var t=this.editor._window.document.createRange();return t.setStart(e.anchorNode,e.anchorOffset),t.setEnd(e.focusNode,e.focusOffset),t.startOffset==e.anchorOffset&&t.startContainer==e.anchorNode},this._restoreSelection=function(e){var t=this._getNodeFromPath(e.anchorNodePath),n=this._getNodeFromPath(e.focusNodePath),i=this.editor._window.getSelection(),o=this.editor._window.document.createRange();o.setStart(t,e.anchorOffset),o.setEnd(n,e.focusOffset),i.removeAllRanges(),i.addRange(o)},this._getNodeFromPath=function(e){for(var t=this.editor._content;0!=e.length;){var n=e.pop();t=t.contents().eq(n)}return t.get(0)},this._getNodePath=function(e){for(var t=[],n=e;"BODY"!=n.nodeName;)t.push($(n.parentNode).contents().index(n)),n=n.parentNode;return t},this.addParamToUrl=function(e,t,n){return e+(e.split("?")[1]?"&":"?")+t+"="+n}},BlockManager:function(e){this.element=null,this.current_block=null,this._bindEvents=function(){var t=this;e._content.on("dragstart","img",function(e){return e.preventDefault(),!1}).on("mouseenter",".mrge-content-block",function(){t.showBlockManager(this)}).on("mouseleave",".mrge-content-block",function(){t.hideBlockManager(this)}).on("click",".mrge-content-block-top",function(){t._moveUp()}).on("click",".mrge-content-block-bottom",function(){t._moveDown()}).on("click",".mrge-content-block-close",function(){t.removeBlock()})},this._bindEvents(),this.showBlockManager=function(e){this.current_block=e,$(e).append('<div class="mrge-content-block-top mrge-content-block-move-action mrge-temp-support-element" contenteditable="false">\u25b2</div>'),$(e).append('<div class="mrge-content-block-bottom mrge-content-block-move-action mrge-temp-support-element" contenteditable="false">\u25bc</div>'),$(e).append('<div class="mrge-content-block-close mrge-temp-support-element fa fa-close" contenteditable="false">\xd7</div>')},this._moveUp=function(){var t,n=this._getElementsNearCurrentBlock(!0),i=this._getNearElementForCurrentBlock(n,!0);if(i.length){var o=this._getNearBlock(n,!0);t=o&&this._needToGoToBlock(o,i,!0)?this._insertBlockRelative(this.current_block,o,!0):this._insertBlockRelative(this.current_block,i,!0)}e._selectionManager.clearSelection()},this._needToGoToBlock=function(e,t,n){if(n){var i=e.offset().top+e.outerHeight(!0),o=$(this.current_block).offset().top-t.outerHeight(!0);return i>=o}var r=e.offset().top,a=$(this.current_block).offset().top+$(this.current_block).outerHeight(!0);return a>=r},this._needToGoFromBlocks=function(e){var t=e.offset().top+e.outerHeight(!0),n=$(this.current_block).offset().top;return t>=n},this._getTargetToMoveFromBlocks=function(e){for(var t=e.offset().top+e.outerHeight(!0),n=e.next();n.length>0;){if("P"==n[0].nodeName&&n.offset().top+n.outerHeight(!0)>t)return n;n=n.next()}return null},this._insertBlockRelative=function(t,n,i){var o=$(t).clone();return e._selectionManager.clearSelection(),$(t).remove(),i?o.insertBefore(n):o.insertAfter(n),o},this._getNearBlock=function(e,t){var n=$(this.current_block).hasClass("mrge-left-side")?"mrge-left-side":"mrge-right-side",i=$.grep(e,function(e){return $(e).hasClass("mrge-content-block")&&$(e).hasClass(n)});return i.length>0?t?$(i).last():$(i).first():null},this._getNearElementForCurrentBlock=function(e,t){return t?$(e).last():$(e).first()},this._getElementsNearCurrentBlock=function(t){var n,i=e._content.children(),o=$(this.current_block).index();return n=t?i.slice(0,o):i.slice(o+1,i.length),$.grep(n,function(e){return!$(e).hasClass("mrge-support-element")})},this._moveDown=function(){var t,n=this._getElementsNearCurrentBlock(!1),i=this._getNearElementForCurrentBlock(n,!1);if(i.length){var o=this._getNearBlock(n,!1);if(o&&this._needToGoToBlock(o,i,!1))o=this._insertBlockRelative(o,this.current_block,!0),t=this._insertBlockRelative(this.current_block,o,!1);else{var r=this._getElementsNearCurrentBlock(!0),a=this._getNearBlock(r,!0);if(a&&this._needToGoFromBlocks(a)){var c=this._getTargetToMoveFromBlocks(a);if(!c)return;t=this._insertBlockRelative(this.current_block,c,!1)}else t=this._insertBlockRelative(this.current_block,i,!1)}}e._selectionManager.clearSelection()},this.hideBlockManager=function(){e._content.find(".mrge-temp-support-element").remove()},this.addBlock=function(t){{var n=e._selectionManager.getCustomSelection(),i=e._selectionManager.isCaret(n),o=e._selectionManager.getTopSelectedElements(n,i);new e.Block(e,o[0],t)}},this.removeBlock=function(){$(this.current_block).detach(),this.hideBlockManager()}},Block:function(e,t,n){if(this.editor=e,this.element=this._formSelf(n),void 0===t){var i=$("<p><br /></p>");i.appendTo(e._content),this.element.insertBefore(i)}else this.element.insertBefore(t)},_blockMethodsInitialize:function(e){this.Block.prototype._formSelf=function(t){var n,i;t.imageUrl?(n=$('<img src="'+t.imageUrl+'">'),n.css("max-width",this.editor.options.block.mediaBlock.width.def),n.css("max-height",this.editor.options.block.mediaBlock.height.def)):t.videoHTML&&(n=$(t.videoHTML),n.attr("src",e._actionSupport.addParamToUrl(n.attr("src"),"wmode","opaque")),n.width(this.editor.options.block.mediaBlock.width.video||this.editor.options.block.mediaBlock.width.def),n.height(this.editor.options.block.mediaBlock.height.video),n.attr("wmode","Opaque"),n.attr("frameborder","0")),i=$('<div class="mrge-content-block mrge-left-side" contenteditable="false"><div class="mrge-content-block-item"></div></div>');var o=this.editor.options.block.mediaBlock.width.def,r=this.editor.options.block.mediaBlock.height.def;return i.css("max-width",o),i.css("max-height",r),i.children().css("max-width",o),i.children().css("max-height",r),i.children().append(n),i}},Builder:function(e){this.editor=e,this.exec=function(){this._setupMainElement(),this._buildToolbox(),this._buildContentField(),this._buildSupportElements()},this._setupMainElement=function(){e.element.width(e.options.width).height(e.options.height).addClass("morrigan-editor")},this._buildToolbox=function(){_formToolboxItem=function(t){var n,i,o=$("<a></a>");return t.view.title&&o.attr("title",t.view.title),t.view.classes&&o.addClass(t.view.classes),t.view.disabledIcon&&o.css("background",t.view.disabledIcon),t.view.text&&o.append($("<span></span>").text(t.view.text).addClass("mrge-action-text")),o.addClass("mrge-disabled mrge-action mrge-action-"+t.name),t.dropdown&&(o.addClass("mrge-action-list"),n=$('<div class="mrge-action-dropdown" style="display: none;"></div>'),t.dropdown.width&&n.width(t.dropdown.width),$(t.dropdown.actionList).each(function(){i=$("<div></div>").text(this.text),this.element=i,n.append(i)}),o.append(n)),e._browser.ie&&(o.attr("unselectable","on"),o.find("*").attr("unselectable","on")),e._actionManager.addAction(t,o),o},_formToolboxBlock=function(t){var n=$("<li></li>");return $(t).each(function(){n.append(_formToolboxItem(e._actions[this]))}),n},_formToolboxLine=function(e){var t=$("<ul></ul>");return $(e).each(function(){t.append(_formToolboxBlock(this))}),t},formToolbox=function(){var t=$('<div class="mrge-toolbox"></div>');return $(e.options.toolbox).each(function(){t.append(_formToolboxLine(this))}),t.append($('<div class="mrge-clear"></div>')),t},e.element.append(formToolbox())},this._buildContentField=function(){contentFieldHeight=function(){var t=e.element.find(".mrge-toolbox").outerHeight(!0);return e.element.height()-t},iframeBodyHeight=function(e){var t=e.contents().find("body"),n=t.outerHeight(!0)-t.height();return e.height()-n},defaultContentFieldContent=function(){return e._browser.ie?"<p></p>":e._browser.ff||e._browser.webkit?"":"<p><br></p>"},setupIframe=function(t){e._window=t.get(0).contentWindow;var n=e._window.document;n.open(),n.write(e.options.doctype),n.write("<html style='cursor: text;height: 100%;'>"),n.write("<head><link href='"+e.options.iframeStyles+"' media='all' rel='stylesheet' type='text/css'></head>"),n.write("<body contenteditable='true' class='mrge-iframe-body'>"+defaultContentFieldContent()+"</body></html>"),n.close(),e._content=t.contents().find("body"),setTimeout(function(){e._content.height(iframeBodyHeight(t))},100),e.options.spellCheck||e._content.attr("spellcheck",!1)};var t=$("<div class='mrge-content' style='height: "+contentFieldHeight()+"px'><iframe frameborder='0' class='mrge-content-iframe'></iframe></div>");e.element.append(t),setupIframe(t.find("iframe"))},this._buildSupportElements=function(){e.element.append("<div class='mrge-support-elements'></div>")}},EventBinder:function(e){this.keyCodesAffectedDomChanges=[8,13,33,34,35,36,37,38,39,40,46],this.editor=e,this.bindDefaultEvents=function(){this._defaultActivateWidgetsEvent(),this._defaultBehaviorEvents()},this._defaultActivateWidgetsEvent=function(){e.element.find("iframe").contents().find("body").on("focus",function(){var t=e._actionManager,n=t.disabledActions.slice();$.each(n,function(e,n){t.enableAction(n)})})},this._defaultBehaviorEvents=function(){var t=this;e._content.on("keydown",function(e){t._defaultBehaviorKeyDownHandler(e)}).on("keyup",function(e){t._defaultBehaviorKeyUpHandler(e)}).on("mouseup",function(e){window.setTimeout(function(){t._defaultBehaviorMouseEvent(e)},10)})},this._defaultBehaviorMouseEvent=function(t){var n=e._selectionManager.getCustomSelection(),i=e._selectionManager.isCaret(n),o=e._selectionManager.getTopSelectedElements(n,i);this._onSelectionChangedHandlers(t,o,i)},this._defaultBehaviorKeyUpHandler=function(t){if(e._browser.ff||e._browser.webkit||-1!=$.inArray(t.keyCode,this.keyCodesAffectedDomChanges)){var n=e._selectionManager.getCustomSelection(),i=e._selectionManager.isCaret(n),o=e._selectionManager.getTopSelectedElements(n,i);if(o[0]&&3!=o[0].nodeType&&"DIV"!=o[0].nodeName||e._window.document.execCommand("formatBlock",!1,"p"),3===o[0].nodeType)return;this._onSelectionChangedHandlers(t,o,i)}},this._onSelectionChangedHandlers=function(t,n,i){$(e._actionManager.selectionChangedSubscribers).each(function(){e._actionManager.actions[this].selectionHandler(e,{topElements:n,isCaret:i},t)})},this._defaultBehaviorKeyDownHandler=function(){},this.bindCustomEvents=function(){var t=this;$(e._actionManager.actions).each(function(){this.config.dropdown?t._bindEventsToDropDown(this):this.config.popup?t._bindEventsToPopupAction(this):t._bindEventsToSimpleAction(this)})},this._bindEventsToPopupAction=function(t){t.element.on("click",function(){t.enabled&&e._popup.showPopup(t)})},this._bindEventsToSimpleAction=function(t){t.element.on("click",function(){t.enabled&&t.onClickHandler(e,t)})},this._bindEventsToDropDown=function(e){var t=this;e.element.on("click",function(){e.enabled&&(e.config.dropdown.shown?e.dropDownHide():e.dropDownShow())}),$(e.config.dropdown.actionList).each(function(){t._bindEventsToDropDownAction(this,e)})},this._bindEventsToDropDownAction=function(t,n){t.element.on("click",function(){t.onClickHandler(e,n)})}},Popup:function(e){this.editor=e,this.currentAction=null,this.element=null,this._formSelf=function(){var t=$("<div class='mrge-popup-wrapper'><div class='mrge-popup-overlay'></div></div>"),n=$("<div class='mrge-popup'><div class='mrge-popup-header'><div class='mrge-popup-box-wrapper'><span class='mrge-header-name'></span><div class='mrge-popup-close fa fa-times'></div></div><div class='mrge-clear'></div></div><div class='mrge-popup-content'><div class='mrge-popup-box-wrapper'></div></div>"),i=$("<div class='mrge-popup-actions'><div class='mrge-popup-box-wrapper'></div></div>");$.each(e.options.popup.actions,function(e){var t=$("<div class='mrge-popup-"+e+" mrge-popup-btn'>"+this.caption+"</div>");this.element=t,i.children(".mrge-popup-box-wrapper").append(t)}),i.children(".mrge-popup-box-wrapper").append('<div class="mrge-clear"></div>'),n.append(i),t.append(n),e.element.append(t),this.element=t},this._bindMainEvents=function(){var e=this;this.element.on("click",".mrge-popup-close",function(){e.hidePopup()}).on("click",".mrge-popup-cancel",function(){e.hidePopup()})},this._formSelf(),this._bindMainEvents(),this._bindCustomEvents=function(e){e.config.popup.onShow(this.element,this.editor)},this._unbindCustomEvents=function(e){e.config.popup.onHide&&e.config.popup.onHide(this.element)},this.showPopup=function(e){this.currentAction=e,this._configure(e.config.popup),this._bindCustomEvents(e),this._locateAndShow()},this.hidePopup=function(){this._unbindCustomEvents(this.currentAction),this.currentAction=null,this.element.hide()},this._configure=function(t){this.element.find(".mrge-header-name").text(t.title),this.element.find(".mrge-popup").height(t.height);var n=this.element.find(".mrge-popup-content .mrge-popup-box-wrapper");n.empty(),t.customForm?t.customForm(e,n):n.append(t.html),this.element.find(".mrge-popup-actions .mrge-popup-btn.mrge-active").removeClass("mrge-active"),$.each(t.actions,function(){e.options.popup.actions[this].element.addClass("mrge-active")})},this._locateAndShow=function(){var t=this.element.find(".mrge-popup"),n=e.element.height()/2-t.height()/2,i=e.element.width()/2-t.width()/2;n=0>n?0:n,i=0>i?0:i,t.css("top",n),t.css("left",i),this.element.show()}},Uploader:function(e){this.editor=e,this.element=null,this._formSelf=function(){var t=$("<iframe class='mrge-support-iframe' name='mrge-support-iframe'></iframe>");e.element.children(".mrge-support-elements").append(t),this.element=t},this.prepareToLoad=function(){this.element.contents().empty()},this.getData=function(){return this.element.contents().find("body").text()?JSON.parse(this.element.contents().find("body").text()):null},this._formSelf()},Loader:function(e){this.editor=e,this.element=null,this._formSelf=function(){var t=$("<div class='mrge-loader-wrapper'><div class='mrge-loader-background'></div><div class='mrge-loader-icon fa fa-spinner fa-spin'></div></div>");e.element.append(t),this.element=t},this._formSelf(),this.showLoader=function(){this.element.addClass("active")},this.hideLoader=function(){this.element.removeClass("active")}},EditorError:function(e){this.editor=e,this.exec=function(t){e.element.text(t)}},SelectionManager:function(e){this.editor=e,this.getInternalRange=function(){var t;if(e._window.getSelection){if(t=e._window.getSelection(),t.rangeCount)return t.getRangeAt(0)}else if(e._window.document.selection)return e._window.document.selection.createRange();return null},this.restoreInternalRange=function(t){if(null!=t)if(t.select)t.select();else{var n=e._window.getSelection();n.removeAllRanges(),n.addRange(t)}},this.getCustomSelection=function(){var e={},t=this.editor._window;return t.getSelection?e.selection=t.getSelection():e.range=t.document.selection.createRange(),e},this.isLastEmptyPTagSelected=function(e){var t=e.selection;return this.isCaret(e)&&"P"==t.focusNode.nodeName&&"<br>"==t.focusNode.innerHTML&&1==$(t.focusNode).closest("body").children("p").length},this.isCaret=function(e){if(e.range)return 0==e.range.boundingWidth;var t=e.selection;return t.anchorOffset==t.focusOffset&&t.anchorNode==t.focusNode},this.getTopSelectedElements=function(e,t){var n,i,o,r;if(e.selection){if(n=e.selection,null===n.anchorNode)return[];if(i=this._getPreBodyNode(n.anchorNode),null===i)return[];if(t)return[i];o=this._getPreBodyNode(n.focusNode),r=$(i).position().top<$(o).position().top?this._getElementBetween(i,o):this._getElementBetween(o,i)}else r=this._ie8GetTopSelectedElements(e.range);return $.grep(r,function(e){return"DIV"!=e.nodeName})},this._ie8GetTopSelectedElements=function(t){var n=e._content,i=e.element.find("iframe").contents().find("html")[0].scrollTop,o=t.boundingTop+i,r=o+t.boundingHeight,a=n.children(),c=[];return $(a).each(function(){(this.offsetTop>=o||this.offsetTop+this.offsetHeight>o)&&this.offsetTop<r&&c.push(this)}),c},this._getPreBodyNode=function(e){return"BODY"==e.nodeName?null:"BODY"==e.parentNode.nodeName?e:$(e).closest("body > *").get(0)},this._getElementBetween=function(e,t){var n,i;for(n=e,i=[];n!=t;)i.push(n),n=n.nextSibling;return i.push(t),i},this.clearSelection=function(){var t;e._window.getSelection?(t=e._window.getSelection(),t.removeAllRanges()):e._window.document.selection.empty()}},_actionManagerMethodInitialize:function(){this.ActionManager.prototype.enableAction=function(e){var t=this.actions[e];t.actionEnable();var n=$.inArray(e,this.disabledActions);-1!=n&&this.disabledActions.splice(n,1)}},_actionMethodsInitialize:function(){this.Action.prototype.actionEnable=function(){this.element.removeClass("mrge-disabled"),$(this.element).css("background",this.config.view.icon),this.enabled=!0}},_getBrowser:function(){var e={},t=navigator.userAgent;if(-1!=t.indexOf("WebKit"))e.webkit=!0;else if(-1!=t.indexOf("Firefox"))e.ff=!0;else if(-1!=t.indexOf("MSIE")){if(/MSIE\s([\d.]+)/.test(navigator.userAgent)){var n=parseInt(RegExp.$1);8==n?e.ie=8:n>8&&(e.ie=!0)}}else t.indexOf("Trident")&&(e.ie=!0);return e.ie||e.ff||e.webkit||(e.nonSupported=!0),e},_prepare:function(){return this._browser=this._getBrowser(),this._browser.nonSupported?(new this.EditorError(this).exec(this.options.notSupportedMsg),!1):(this._actionMethodsInitialize(),this._actionManagerMethodInitialize(),this._blockMethodsInitialize(this),!0)},_createSupportObjects:function(){this._actionManager=new this.ActionManager(this),this._selectionManager=new this.SelectionManager(this),this._actionSupport=new this.ActionSupport(this)},_createSupportObjectsAfterBuildHTML:function(){this._popup=new this.Popup(this),this._uploader=new this.Uploader(this),this._loader=new this.Loader(this),this._blockManager=new this.BlockManager(this)},_buildHTML:function(){new this.Builder(this).exec()},_bindEvents:function(){var e=new this.EventBinder(this);e.bindDefaultEvents(),e.bindCustomEvents()},_setupForBrowser:function(){this._browser.ie&&$.each(this.element.find("*"),function(){$(this).attr("unselectable","on")})},_create:function(){this._prepare()&&(this._createSupportObjects(),this._buildHTML(),this._createSupportObjectsAfterBuildHTML(),this._bindEvents(),this._setupForBrowser())},html:function(e){if(e){var t=this._content.children();return t.detach(),this._content.append(e).get(0)}var n,i=this._content.clone();return i.find(".mrge-temp-support-element").remove(),i.find("br").remove(),i.find("b").each(function(){n=this.innerHTML,$(this).replaceWith($("<strong></strong>").html(n))}),i.find("i").each(function(){n=this.innerHTML,$(this).replaceWith($("<em></em>").html(n))}),i.html()}});