type_station 0.1.3 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/type_station/editables/admin_bar.js.coffee +19 -48
- data/app/assets/javascripts/type_station/editables/entity_editor.js.coffee +152 -0
- data/app/assets/javascripts/type_station/editables/file_editor.js.coffee +46 -0
- data/app/assets/javascripts/type_station/editables/link_finder.js.coffee +26 -26
- data/app/assets/javascripts/type_station/editables/text_html_editor.js.coffee +63 -0
- data/app/assets/javascripts/type_station/init.js.coffee +8 -50
- data/app/assets/javascripts/type_station/lib/models.js.coffee +5 -5
- data/app/assets/javascripts/type_station/lib/ts.js.coffee +84 -1
- data/app/assets/stylesheets/type_station/admin_bar.css.scss +10 -16
- data/app/assets/stylesheets/type_station/base.css.scss +26 -51
- data/app/controllers/type_station/admin/entities_controller.rb +53 -0
- data/app/controllers/type_station/admin/pages_controller.rb +4 -50
- data/app/controllers/type_station/application_controller.rb +1 -11
- data/app/controllers/type_station/pages_controller.rb +5 -5
- data/app/models/type_station/content.rb +14 -1
- data/app/models/type_station/entity.rb +80 -0
- data/app/models/type_station/page.rb +8 -120
- data/app/presenters/type_station/admin_bar_presenter.rb +9 -0
- data/app/presenters/type_station/content_presenter.rb +12 -2
- data/app/presenters/type_station/page_presenter.rb +6 -39
- data/app/presenters/type_station/presenter.rb +71 -0
- data/app/views/type_station/toolbars/_admin_bar.html.haml +18 -123
- data/config/routes.rb +3 -1
- data/lib/type_station/blocks/base.rb +32 -20
- data/lib/type_station/blocks/entity.rb +56 -0
- data/lib/type_station/blocks/field.rb +34 -0
- data/lib/type_station/concerns/path_generator.rb +69 -0
- data/lib/type_station/concerns/templatable.rb +16 -0
- data/lib/type_station/concerns.rb +2 -0
- data/lib/type_station/configuration.rb +8 -4
- data/lib/type_station/dsl.rb +6 -7
- data/lib/type_station/engine.rb +6 -0
- data/lib/type_station/railtie.rb +3 -5
- data/lib/type_station/version.rb +2 -2
- data/lib/type_station/view_helpers.rb +23 -86
- data/spec/dummy/app/helpers/another_name_helper.rb +1 -1
- data/spec/dummy/app/models/team.rb +3 -0
- data/spec/dummy/app/presenters/index_presenter.rb +18 -0
- data/spec/dummy/app/presenters/team_presenter.rb +7 -0
- data/spec/dummy/app/views/pages/index_other.html.erb +79 -78
- data/spec/dummy/config/initializers/config.rb +3 -3
- data/spec/dummy/config/mongoid.yml +2 -2
- data/spec/dummy/log/development.log +3229 -63846
- data/spec/dummy/tmp/cache/assets/development/sass/{d54c17bdece82ab7e34807e87c417af01a5b0646 → 5195863f2e60bebe518d97f94bb3d4b177b0b425}/chosen.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/631a1227c978d11ae414a23c82459b12296c5574/admin_bar.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/631a1227c978d11ae414a23c82459b12296c5574/base.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/{6fe6492bf5ccb83234e7598f9cf2dee000d6fd1d → d9d756bcf855b539202ff507923feaef562a86d9}/_ionicons-font.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/{6fe6492bf5ccb83234e7598f9cf2dee000d6fd1d → d9d756bcf855b539202ff507923feaef562a86d9}/_ionicons-icons.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/{6fe6492bf5ccb83234e7598f9cf2dee000d6fd1d → d9d756bcf855b539202ff507923feaef562a86d9}/_ionicons-variables.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/{6fe6492bf5ccb83234e7598f9cf2dee000d6fd1d → d9d756bcf855b539202ff507923feaef562a86d9}/ionicons.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/03faf403247b5c2b01bfc3b194c9a108 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{42a12b3c21e3f05a34cb05b0c63c690c → 04ce8830b8d9eb9869b4e717c72e4c77} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{ffa56cf66ebfb8bbe51b752fa5e854b7 → 05111c950181c5c7db004ab0537ad63a} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{12f3bf6fe9d52ff385ee5f0e1a94e256 → 06f720204faca086942ed12e58cc7e99} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{d11321573db03471f91362fca3d3c5c5 → 06fe7bcbc391b00c5a196a93f90ecabb} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/07a3408841510f4fb1eb0ede33cdb028 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/1057bd97781bd01e53c6be1c18815331 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{311ffc36d5a7e1d3216e672b3e57e7ed → 11a2e83f32c39554a1d8d1812fcfefa8} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/1e7d8fa3d4680fd1b85b0881f495525f +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/21bece9bdb4b2b78355dfc15633484fb +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{a37ae28c4ac4e0bc0e2cb4423c40b24c → 268002ee16dde5d8865159003c5b9f56} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{8bec81b5959299e431f5adfc6c410719 → 2b6923a6b24ec5ce8800fedede741151} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/2bf3770399e96a6b30d1d1078739c1f0 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/2e14a727c7ff43dcd32c2d15c7d4e49c +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{3030c5140945ca6d88763e4f9136b93d → 2ed9e055cb4bc9748131e083298e90f3} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{5c2d0bbd303da757c44328df9bccedf7 → 2f14bda8290314a0fd6c175fcad55e69} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{985af24e0c117b294f64311bf0187513 → 2fbff71a6bc8ae2a4172de51e568ea3b} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{f566af7037e0e3042b19bd5ee11b21c4 → 305b28bd53201553c837a27834d3fee9} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{c0c85148a1307bb6d6a87139811da3ad → 318672b968af34804563871c8b1e1d23} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{0b495c71c71a2d087e00d9f77c89b537 → 3203d681677ab8bf95858a71dca72ad1} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{4d6d33dd083743a6d1e0d708c4e4e7aa → 333827a9cf72b750448f816161e1ecda} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{0d8f54d1682f575aec8f27993d3af45e → 34c2fc984403383284ed5696d70c010e} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{0c7b9a1778b05de10a66fde42c60b47c → 35191399e8ceb198f89ffa9a8e5e6d18} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{90c324b461b60cdeb6b549dbf932f162 → 3af1f1791459e78c28c4e7e55115168b} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/412cf59ab3b41a364279e5d53ad68152 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{f7345825a6e023e880e9a0744a4896bd → 4440e4eecd7f5abe3a350795b7c562a3} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/48d06b052d87bd96e9e9b8a50a69b18a +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/4c48023968030daffd8c05e4e1ea78bf +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{7ef9b3c736e553151f79c509136b1c44 → 4d43e505f0233833295b19c57e3f51bb} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{b6cef25e5142cb56f70ca0a8d31f312e → 5374e389194ac8d6d65ecfcfb0659919} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{cf5014041f97c55eee7c67feddf11b81 → 5403ae64c2a793b44bcc6728afa05e81} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/55e73132107a6039a07892904fb85b3f +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/57096386bc19c2ad35327c072821d712 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/57a2ad49228767f4bdd4a7d12ab9fdeb +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{db1a08b3c680b077476f767a8addb44b → 58db8276645522fa111c4a297a6b3252} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/5963d34af3b79a722db1c029191b2127 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{da50fa3c24d736a5eb19bc107acd4ae7 → 5fd77f69e8769780727bcddc3bbef6da} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/6527d2ff5eb008ef2a32f7796a6490d6 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{8438f80ca5340a65edcf7a37bde5d43d → 6694f57666543a152f6f95b772233bd3} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/685c03a878584655eb4475b4cdacdd75 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/6aad7e14a81065dffac7093aacf234f2 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/6c54d2efe05a3f58e5194a546a67d7b3 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/6e3a8b3faf7a8b9b6491dc8a5c1e8d23 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{f1567fa9088d43b2fb0f9a0caa1ed107 → 6eea7ea5e4bfeeb41ccc235189ffd18b} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{d4248f8b11c6b21abffed4a5e718722d → 722eee3ce416c20905dda68eab3d517e} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{56afaea2e164564be4d5f5bbc7f81050 → 7960910c69f2bcf82925d090b4745c83} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{740af710fe4125080680a8561398cd43 → 7f512b27e66494dd23baf2e5fb34b96a} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{e842f1fb8542889be369b76982f3157c → 80dca6b775b0c8c933ba3bd53864a11f} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/82cfb0f0bcd16b930ec1befc0d5cd8b8 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/83c193129690d0c85c5370d822c4da82 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/83d012091edd332e8b52f58cf1a8aba5 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/848f8022bef8c0160c31cfa94841c896 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{0d5a85a524a12561b8cfff4e8d06b332 → 85944b215ca6c0d1a1d7806605dfd545} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{570677a99f6abc19d74f793d5cb24f5f → 88c61205fb088e828eaf562152fb80e1} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{849593e0c4cb1f2e2b3f7941be4bfb17 → 895bfeb62235ec6bfdc13f057e975c50} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/8a5150409eaf099549443d23d5d53c88 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/8db596b50a3235e0956dfbc06ac6c990 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/8f4346bc63f61c8274390947394eeeb7 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{79b7c5b4127ac19346c56dd224bf8b19 → 8feb7e7adc10eec24e0ab54bef0c0857} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{a87019c62b5fb3b3dc75db921d98ad59 → 95130b18f8c813f4fa587e14f232c241} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{98bae9585542e37b839b68b25937fdf6 → 963c4df95ae6a8d8e54c7fe89d702fff} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/973acef0f44b868ef5c17c4d65d80ab0 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{ce5a41536c75e4bc37a5b0be19e9f786 → 98a60691ad77eb6c878a60773f6ca69a} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/9a5b201b4dddc98127641bcf852a4ea8 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/9eafacb2fca5506e20523d97e92f5251 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/a0c3540cd0a5390bd8985db285d1574f +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/a17ca57bada5cb7cb8c1d0b10fbd9904 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{ff96189f6d2677d5fa7c400167c74874 → a1b319a55f70f85dbee50bcb28aa81d4} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{99fd048521a12239746f91aa138613bf → a51f09cb29d7bd6071434928f56887af} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{f084a3a159f23d2f0f9943c4a2e5f8e9 → a6195a184397922f6afd2e7bf3d4a7e7} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/a8ecf10c3e4c97b944e10c2cb0931fd5 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{0b230f1bf23bd7b1392e34cacde00da0 → aa5deb52794e98d34cc0b868202211ee} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/aa9f5420651d522078eadd9de8350d35 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{99a40b6133b9eaa016bd6cf01fff987a → aab1005ca95fedeee05cb5f8d06eaa6c} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{21f725a9b3479e57849414f8272a905b → ab1e4897ca815d147fb473e23bf35bd7} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{a87cf4d10d892fb23f2fc818d7ca7207 → afa9de4377b9615980b737000fc68a2a} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/b1fc0c5413b58bf1bf40a04dcd687d18 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/b3383c0b0b1d8449e7a9c742a544edb7 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/b3b877cfd5c63c892cfe8c6248e3d003 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{cad829df95038ddc2958dab7e1b591ad → b401f905161e2ce92571718065d5e35c} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/b62bf39167cc044d19958ff731ef6578 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/bb1b5b9fd84c67b2b994666f8162e79b +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/bc7d25832d4cd5332bdf3ec19783ae76 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/bcdec54b8cd89a231c20c7c45d8eca71 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{492de35b811aed43fc60de0227a5d0ab → bf1e850366946d51a864f66042acb16d} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/c06990d2e8f15c9de915a7b33d17dac5 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/c136f3c36aea515920f7a51809e79094 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{c0600b832214f9e16294a1c37c0c3f6e → c39ca879cd6484827df2dd7605577066} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/c4b181c541556124b2275b0ae4a94461 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/c7699aedd27ae409c1ccf0c02a7782fc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{ef7d0257e22920401b54d6662e627252 → c85e062576453cbe6504556843184e48} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/ccc931022e80caf6ac008099f2589e7d +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{a8e9ef7143431aa34568a350dad82af2 → cf5e51adf346ca56aee15b72f394fce9} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{b6f21db694cacb7f5bcbb93cf45f65ed → cf6bd170bc3f231ca9da6434bd53359b} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/cfcaaf334e027f46a4eddee54f3e3b27 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/d54b81fedb82c1d520b92cfd20e18ef5 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/d5de77884a5b0a88b13f76a0d8d2075e +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/d63daaafe9be33950037e285fb142eb5 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/ddf237d5e172776d2061090bbf8fc6a5 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{e736f7cd2394078039a3b11e6ee42802 → deb9cd21864c66e80861376afc6e17cd} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{d02809f043bce2445374a43a8f64b4b8 → e03864d9763609a4fa6412863f2c9a8c} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/e080ee3bf59ec12040e4cabaa97dc241 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/e1bc9024b810c879e24aa1de0f013358 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{147a08ea451b98ff5a28a0088b7d5c89 → e348418df158e4447a3120415eaeb3c5} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/e39cb3a82453b50e888022543695b4e2 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/e77bfcad61fabf7ed2d4dd21e881b8c8 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{a855b42a37290315d53e93434721869d → ea306a2a3565b22cd16bf45555e751b5} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/eb1b637b8414e22b792fe2f3549283e3 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{e8d6c5a2e13578e611f85cd7acd0088f → ebfd318084bf0cbcc2ab7ee6bf5c306c} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{42a7cd7e7e7d73b1882a085a3ed212b5 → ef58d6e4cfadfdd86e4f38c165c82e0a} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/f4205d4b499b80a483c15c2408be1874 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{7316e0f7a256fd92f78a590981226fbe → f4a54e3803a4dbd2339782565404ffc1} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{d1e5823c113c9ee03e6c6d7773eb6fac → f7fe63074e55b9b04eef14bac17d6344} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/f8a56681cc92b0dba2c2fdb753933a8b +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{f14e64162f52a8d2d22ff9e1c1cc4fac → f9c9583263fc196b23e3630ecaca20ef} +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/fba3208cb66e48884d72c7875e5ff4ca +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/{6f7174fb7f1fbb8e01d382a128a979e8 → fee315e7956140b77895e8a26e569ca5} +0 -0
- data/spec/dummy/tmp/pids/server.pid +1 -0
- data/vendor/assets/javascripts/medium-editor.js +1919 -1125
- data/vendor/assets/stylesheets/medium-editor/medium-editor.css +39 -9
- data/vendor/assets/stylesheets/medium-editor/themes/bootstrap.css +3 -5
- data/vendor/assets/stylesheets/medium-editor/themes/bootstrap.min.css +1 -1
- data/vendor/assets/stylesheets/medium-editor/themes/default.css +6 -8
- data/vendor/assets/stylesheets/medium-editor/themes/default.min.css +1 -1
- data/vendor/assets/stylesheets/medium-editor/themes/flat.css +2 -2
- data/vendor/assets/stylesheets/medium-editor/themes/mani.css +4 -4
- data/vendor/assets/stylesheets/medium-editor/themes/mani.min.css +1 -1
- data/vendor/assets/stylesheets/medium-editor/themes/roman.css +4 -4
- data/vendor/assets/stylesheets/medium-editor/themes/roman.min.css +1 -1
- metadata +337 -669
- data/app/assets/javascripts/type_station/editables/edit_link.js.coffee +0 -90
- data/app/assets/javascripts/type_station/editables/edit_page.js.coffee +0 -116
- data/app/assets/javascripts/type_station/editables/file.js.coffee +0 -66
- data/app/assets/javascripts/type_station/editables/image.js.coffee +0 -68
- data/app/assets/javascripts/type_station/editables/new_page.js.coffee +0 -79
- data/app/assets/javascripts/type_station/editables/text_html.js.coffee +0 -66
- data/app/views/layouts/type_station/application.html.erb +0 -14
- data/lib/type_station/blocks/edit_link.rb +0 -27
- data/lib/type_station/blocks/edit_page.rb +0 -28
- data/lib/type_station/blocks/editable_file.rb +0 -19
- data/lib/type_station/blocks/editable_html.rb +0 -15
- data/lib/type_station/blocks/editable_image.rb +0 -19
- data/lib/type_station/blocks/editable_text.rb +0 -19
- data/lib/type_station/blocks/new_collection.rb +0 -15
- data/lib/type_station/blocks/new_page.rb +0 -19
- data/lib/type_station/blocks/static_link.rb +0 -31
- data/lib/type_station/blocks/stickable.rb +0 -23
- data/lib/type_station/helpers/edit.rb +0 -36
- data/lib/type_station/helpers/editable.rb +0 -37
- data/lib/type_station/helpers/new.rb +0 -25
- data/lib/type_station/helpers/utilities.rb +0 -40
- data/lib/type_station/helpers.rb +0 -2
- data/spec/dummy/log/test.log +0 -1380
- data/spec/dummy/tmp/cache/assets/development/sass/d51071614a47c21d9e7a31bac67dfe51fed9abe3/_buttons.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/d51071614a47c21d9e7a31bac67dfe51fed9abe3/_mixins.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/d51071614a47c21d9e7a31bac67dfe51fed9abe3/_variables.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/e63a0fef5d60e74f917815e496f07ccb348b5adc/_alerts.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/e63a0fef5d60e74f917815e496f07ccb348b5adc/_background-variant.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/e63a0fef5d60e74f917815e496f07ccb348b5adc/_border-radius.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/e63a0fef5d60e74f917815e496f07ccb348b5adc/_buttons.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/e63a0fef5d60e74f917815e496f07ccb348b5adc/_center-block.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/e63a0fef5d60e74f917815e496f07ccb348b5adc/_clearfix.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/e63a0fef5d60e74f917815e496f07ccb348b5adc/_forms.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/e63a0fef5d60e74f917815e496f07ccb348b5adc/_gradients.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/e63a0fef5d60e74f917815e496f07ccb348b5adc/_grid-framework.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/e63a0fef5d60e74f917815e496f07ccb348b5adc/_grid.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/e63a0fef5d60e74f917815e496f07ccb348b5adc/_hide-text.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/e63a0fef5d60e74f917815e496f07ccb348b5adc/_image.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/e63a0fef5d60e74f917815e496f07ccb348b5adc/_labels.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/e63a0fef5d60e74f917815e496f07ccb348b5adc/_list-group.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/e63a0fef5d60e74f917815e496f07ccb348b5adc/_nav-divider.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/e63a0fef5d60e74f917815e496f07ccb348b5adc/_nav-vertical-align.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/e63a0fef5d60e74f917815e496f07ccb348b5adc/_opacity.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/e63a0fef5d60e74f917815e496f07ccb348b5adc/_pagination.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/e63a0fef5d60e74f917815e496f07ccb348b5adc/_panels.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/e63a0fef5d60e74f917815e496f07ccb348b5adc/_progress-bar.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/e63a0fef5d60e74f917815e496f07ccb348b5adc/_reset-filter.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/e63a0fef5d60e74f917815e496f07ccb348b5adc/_resize.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/e63a0fef5d60e74f917815e496f07ccb348b5adc/_responsive-visibility.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/e63a0fef5d60e74f917815e496f07ccb348b5adc/_size.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/e63a0fef5d60e74f917815e496f07ccb348b5adc/_tab-focus.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/e63a0fef5d60e74f917815e496f07ccb348b5adc/_table-row.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/e63a0fef5d60e74f917815e496f07ccb348b5adc/_text-emphasis.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/e63a0fef5d60e74f917815e496f07ccb348b5adc/_text-overflow.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/e63a0fef5d60e74f917815e496f07ccb348b5adc/_vendor-prefixes.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/fde2fd9fd4415e2893f7c202128d5909c847645f/admin_bar.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/fde2fd9fd4415e2893f7c202128d5909c847645f/base.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/07d82d3c1e3632b7f4bf807c2965e13b +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/0825425ebf24766be13ebf4e696dc267 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/0aa47ff15e22d0e74389460968c32717 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/0b163fa81b2ba6f9e0a9d3e6164af7cd +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/0cbda04368ddbf6d761e788334075e7c +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/0dd8d5d73e593c919592d3d02deb62e8 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/0e846d0579634bd3924d701ebcd09040 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/127cceefef1ada19384ec7fec980c5ee +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/182d8b06dcdb4f799088741f553903d3 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/1b64a5fd92110dbd078f4ea964e2d0ad +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/1d67ea254300e2a208df8f296477fca2 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/1ff95c0ddc6f6687c044d2a11b8323eb +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/2155dbeb10a65c2519b49179b3bc6f3a +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/2535956b4e5e79e8fbd3d30f68de7024 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/28ad54c6e5882957dd269b1b2a3c3c75 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/29a7d8d0307a932153f20c48b57ecda1 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/2d0ee72828e0dcbaf2390d3d67595461 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/2d13dd9465026b66cce912e30e142020 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/300f6f1e08668cacf691691df4d13889 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/30e3d4f790a4234a26c7f74efba15a2e +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/33ba18d4294cbb074bd3afee4728e2b9 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/3571d341c3629bb4c9034d2f924f34ac +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/3a3d03c0a92f21419e1e85991774a28b +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/3dea6de9e06b1e372ebf4790f5eecc48 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/3e7667a45f81a73030337cb8afe0acc3 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/4144b15d96ec80b5c7fb367b57aaeef3 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/43c1381ebee89f30d22f80f305f78ee6 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/450d192e072fd68fb5c20711bdd21c9e +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/4729c7f6ab6a91a079ab04a8f04e932b +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/48f052ab53e11ca42b15cc7f40fe2d4c +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/4c324a18fe6bf7dbf7a04cccbfdb366e +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/4fc791a177c880f50bf425e8d2862c20 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/51c578f550b2fd1ff7a873dbcf75b75b +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/535f36c50d5b36ff83bc03bc6a19b8fc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/539ac885f1ce2ff4f1d693223a77b74d +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/53ef9dcaf6b6ddcefceec48187797dc5 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/55c2f55c27a62b998b8d33555158da53 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/575f0b5d245887cf587b0169d6993308 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/579b1a727fe5b55dfe450b0835c56a65 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/5a806147b739da644a296d2def76c243 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/5d79ea654842f86bec8702b02616c633 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/60b14e8e4c0d91f7af9d162cf4c67a9c +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/61d7a0e99e49f7a9917d385223a97015 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/623a22125c47f6f4391fd1a56e40b8a0 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/65cf3864264ab5fd70d6e74a934adf8d +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/6b734dd1ce043b913eb812a20ea2d42f +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/6e0fcc860289a427d98aa4ee86bd12b7 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/709e51f7191f25018b0012df4ff6389f +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/70dfe9a7b27467587b0d4d00a7e0f6fb +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/71e10ee69b177ab54cb6033385a77ef9 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/735d50df5dc976a13b56aa81f5970298 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/73939a29e193b5a1fad031fa75f94119 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/73cc8ce397fbfe4408bcac87302a6952 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/7cfbbb15a3f9dcb4a5ee988ea309504d +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/7efe4acab136927c0b1df06d7c1212cd +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/7f14b0b39c11df4f58e03d390b589547 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/7fc9c7161658070c78790a28b4ff590f +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/825bd4dba50f1ea2c0ae5e8a3708119e +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/84822f25094f67b515ad5f452381dcb0 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/85c54085eea77d703dd054b1adcf309d +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/85d858ed64f06543161931735cb77748 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/85fe1c52386ac4419fdf124a22228a98 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/8803d0a63bbf3fce683c968d4a900480 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/887e2151ef4cd6e915fd9bfc27c41d7d +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/8b33a159429f95c8fbb14e5d45b01967 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/8caeabedf4518243187dbf20bf76a0d8 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/8e60a95e73cedfb4b58fbf6fc32564b3 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/92c1d07e65b1251e6a9f62064f749658 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/92d59399e3f951cc11721f03a2b328fd +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/966db607ae0e7aad72cf171b8fec537a +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/9a9290586c54792a989ea679f38ebc98 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/9c6580777be29320c993da37d292fcae +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/9c8cd77db76e28f0a074573a72509ce9 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/9d5a258ab9e431a1a7eaf931ed4c3fb3 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/9d961151482903524be9a51e312c8d49 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/a165e7cd7871ea0af12d29ef10193272 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/a2b3a282d5d8a5c20444d1a27f70a61e +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/a539d3e91d5fb8eeb973ac8706bbf5c9 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/ab4192212bd78e95967e5a716548236f +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/acbb40a3fca4d574f84a89894274b5ab +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/af97ed366de5933460d41b9198ddc99e +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/afad1821c4be2be037ae8672c21db00a +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/b0acb9e437685aa3f0c0a2ca751a04ce +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/b0b0cf6bca2dad4b85f30801d615eac4 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/b1a982f644c0350cb843b63d69a9506f +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/b772142455a4c78005e67264e239e867 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/b85e6623f6fed5c83a7a375ff15bdd79 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/b89a0282f37737eb86781a8ddbdf14a3 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/bc2f1083a88e2e7c4e88f13f025824ed +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/bcf0359847dcb2f9179c6a46248bcea5 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/bd3113e1418cbc640eb6e1b06d486163 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/c4e5a8fece2f70f43c6e7cc4a790def7 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/c4ec64020d1ff391bab8c2f0bbc7cd02 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/c501910d385d42ea0cf75ae3c4f220e6 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/c7628a8a59ea560abb9213543333222c +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/cb80f61fc678a70e99e16156ae6e07d1 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/cc9a378dda4e65e86b1f3fd522d019a1 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/cdaf4cc6f0288db4f6fa5b8073ac6272 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/cdedc95319572f0c3e36a3a5a044572d +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/d05d272f053261f2d5e3dcca85f19172 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/d05d2c6ed489a61e2a9756430af9f48f +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/d07ab5a5474c0fb71b3bd351947707e5 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/d1f0a2d6fd58a203f3ca66950c822c33 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/d3a2586089547d98e033029b94eb86a5 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/d9924e9691068558c4ce3a20bec7fea1 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/da9349ff5720f218552184c8fef40d7a +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/dd9f84cc20227ad66bbd1f26bbc11ccc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/de9d72cab443cce32e1d45e62d2b4c04 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/e03c578b73cf9936edc84ff2b48c07da +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/e04691fd3eaee6408ac1d1b7fade69e6 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/e40f49d676971d013ad991bdf2dc344b +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/e72700144fea9ebdc4813bc00f023fc7 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/e9b5bc7c65d160f7e31993bbe7a05d63 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/ebdd71d1c3cf34d7d174e5c1abb123b7 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/ec22367449630f093cf0449cea0abdfd +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/f479b0a1614f114b61a63664e172dec1 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/f6eeeb889d424f50b0f725d4656e0721 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/f7c0e18cf77ef251a27e9ff91578fb47 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/fa8cab89937bf25aa48b23445f1b4f64 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/fc5de94b46d8aff03ec5355f912a9a81 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/fd1cae0417fea68172ab7b747a1d6fd8 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/fd2dacd118d6197c3a9325e2103abe7d +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/fe43b3c0b7d3233a250ce9c46342919c +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/fde2fd9fd4415e2893f7c202128d5909c847645f/admin_bar.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/fde2fd9fd4415e2893f7c202128d5909c847645f/base.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/0825425ebf24766be13ebf4e696dc267 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/0b495c71c71a2d087e00d9f77c89b537 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/0cbda04368ddbf6d761e788334075e7c +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/0d8f54d1682f575aec8f27993d3af45e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/12f3bf6fe9d52ff385ee5f0e1a94e256 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/182d8b06dcdb4f799088741f553903d3 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/1b64a5fd92110dbd078f4ea964e2d0ad +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/2155dbeb10a65c2519b49179b3bc6f3a +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/21f725a9b3479e57849414f8272a905b +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/2535956b4e5e79e8fbd3d30f68de7024 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/28ad54c6e5882957dd269b1b2a3c3c75 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/29a7d8d0307a932153f20c48b57ecda1 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/2d13dd9465026b66cce912e30e142020 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/300f6f1e08668cacf691691df4d13889 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/311ffc36d5a7e1d3216e672b3e57e7ed +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/3a3d03c0a92f21419e1e85991774a28b +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/3dea6de9e06b1e372ebf4790f5eecc48 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/4144b15d96ec80b5c7fb367b57aaeef3 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/4729c7f6ab6a91a079ab04a8f04e932b +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/4c324a18fe6bf7dbf7a04cccbfdb366e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/535f36c50d5b36ff83bc03bc6a19b8fc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/55c2f55c27a62b998b8d33555158da53 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/56afaea2e164564be4d5f5bbc7f81050 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/570677a99f6abc19d74f793d5cb24f5f +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/579b1a727fe5b55dfe450b0835c56a65 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/6f7174fb7f1fbb8e01d382a128a979e8 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/735d50df5dc976a13b56aa81f5970298 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/7746e5b6582f701e40ad5ae69e7a6d25 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/7f14b0b39c11df4f58e03d390b589547 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/8091ad5bff4f0d3d70f874750430241b +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/825bd4dba50f1ea2c0ae5e8a3708119e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/849593e0c4cb1f2e2b3f7941be4bfb17 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/85d858ed64f06543161931735cb77748 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/8803d0a63bbf3fce683c968d4a900480 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/887e2151ef4cd6e915fd9bfc27c41d7d +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/8bec81b5959299e431f5adfc6c410719 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/90c324b461b60cdeb6b549dbf932f162 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/92d59399e3f951cc11721f03a2b328fd +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/966db607ae0e7aad72cf171b8fec537a +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/98bae9585542e37b839b68b25937fdf6 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/99fd048521a12239746f91aa138613bf +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/a539d3e91d5fb8eeb973ac8706bbf5c9 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/a87019c62b5fb3b3dc75db921d98ad59 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/a87cf4d10d892fb23f2fc818d7ca7207 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/ab4192212bd78e95967e5a716548236f +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/af97ed366de5933460d41b9198ddc99e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/b6cef25e5142cb56f70ca0a8d31f312e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/b6f21db694cacb7f5bcbb93cf45f65ed +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/bd3113e1418cbc640eb6e1b06d486163 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/c0600b832214f9e16294a1c37c0c3f6e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/cad829df95038ddc2958dab7e1b591ad +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/d05d272f053261f2d5e3dcca85f19172 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/d1e5823c113c9ee03e6c6d7773eb6fac +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/d1f0a2d6fd58a203f3ca66950c822c33 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/d3a2586089547d98e033029b94eb86a5 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/d4248f8b11c6b21abffed4a5e718722d +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/da50fa3c24d736a5eb19bc107acd4ae7 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/db1a08b3c680b077476f767a8addb44b +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/dd9f84cc20227ad66bbd1f26bbc11ccc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/de9d72cab443cce32e1d45e62d2b4c04 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e03c578b73cf9936edc84ff2b48c07da +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e842f1fb8542889be369b76982f3157c +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/ebdd71d1c3cf34d7d174e5c1abb123b7 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f14e64162f52a8d2d22ff9e1c1cc4fac +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f566af7037e0e3042b19bd5ee11b21c4 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/fd1cae0417fea68172ab7b747a1d6fd8 +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 076e91ac2110c51de4325569a5a2a9ecfbe59494
|
4
|
+
data.tar.gz: cb40f492adb569c06ee9785810b85f067f47ac03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7ed796836740e198b9e53ac34de3bea4279ab8fc2d309e0b09b4257ca1ac79a41ab98613b5b39f1fe5fe313736c9f401921f8d678d830c48bd8779f6e75fa3d
|
7
|
+
data.tar.gz: 1a0c04d30ee7e3f18cdbe3628d2507235b8e0ae735b59dbc601c322c6c2320a62869e8a4757b810e36b4a0a2e64364b157f830c15d86d9bc52645afdc4334b22
|
@@ -1,73 +1,44 @@
|
|
1
|
-
class
|
2
|
-
constructor: (@
|
3
|
-
template =
|
1
|
+
class @TypeStation.AdminBarEditor
|
2
|
+
constructor: (@ts, @$el, @data) ->
|
3
|
+
template = @$el.html()
|
4
4
|
$('body').append(template)
|
5
5
|
vex.defaultOptions.className = 'vex-theme-os'
|
6
6
|
|
7
|
-
$('#ts-admin-bar-edit').on 'click',
|
8
|
-
|
7
|
+
$('#ts-admin-bar-edit').on 'click', =>
|
8
|
+
@ts.enable()
|
9
9
|
false
|
10
10
|
|
11
|
-
$('#ts-admin-bar-cancel').on 'click',
|
12
|
-
|
13
|
-
if
|
11
|
+
$('#ts-admin-bar-cancel').on 'click', =>
|
12
|
+
@ts.disable()
|
13
|
+
if @ts.isChanged()
|
14
14
|
vex.dialog.confirm
|
15
15
|
message: 'You have unsaved changes, Do you want to discard them?'
|
16
16
|
callback: (value) ->
|
17
17
|
if value
|
18
18
|
window.location.reload()
|
19
19
|
false
|
20
|
-
|
21
|
-
$('#ts-admin-bar-save').on 'click',
|
20
|
+
|
21
|
+
$('#ts-admin-bar-save').on 'click', =>
|
22
22
|
vex.dialog.confirm
|
23
23
|
message: 'Are you sure you want to save changes?'
|
24
|
-
callback: (value)
|
24
|
+
callback: (value) =>
|
25
25
|
if value
|
26
|
-
|
26
|
+
@ts.save()
|
27
27
|
false
|
28
28
|
|
29
|
-
$('#ts-admin-bar input').on 'change', ->
|
30
|
-
model = window.TS.getModel $(@).data('ts-url')
|
31
|
-
model.set($(@).data('ts-key'), { field: $(@).data('ts-key'), value: $(@).val(), type: 'text' })
|
32
|
-
|
33
|
-
# $('.ts-brand').on 'click', ->
|
34
|
-
# $("#ts-admin-bar").toggleClass 'insert-open'
|
35
29
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
position: 'bottom center'
|
40
|
-
openOn: 'click'
|
41
|
-
classes: 'drop-theme-arrows-bounce-dark'
|
30
|
+
$titleEditor = $('#ts-admin-bar-title')
|
31
|
+
editor = new TypeStation.TextHtmlEditor(@ts, $titleEditor, $titleEditor.data('ts'))
|
32
|
+
@ts.editors.set $titleEditor.attr('id'), editor
|
42
33
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
vex.dialog.buttons.YES.text = 'Save'
|
47
|
-
vex.dialog.open
|
48
|
-
message: 'Manage page settings'
|
49
|
-
input: """
|
50
|
-
#{$('#ts-admin-bar-settings').html()}
|
51
|
-
"""
|
52
|
-
callback: (data) ->
|
53
|
-
if data
|
54
|
-
model = window.TS.getModel $('#ts-admin-bar-settings').data('ts-url')
|
55
|
-
vex.dialog.confirm
|
56
|
-
message: 'Are you sure you want to save changes?'
|
57
|
-
callback: (value) ->
|
58
|
-
if value
|
59
|
-
for k,v of data
|
60
|
-
model.set(k, { field: k, value: v, type: 'text' })
|
61
|
-
window.TS.save()
|
62
|
-
model.save ->
|
63
|
-
window.location.reload()
|
34
|
+
$editEditor = $('#ts-admin-bar-settings')
|
35
|
+
editor = new TypeStation.EntityEditor(@ts, $editEditor, $editEditor.data('ts'))
|
36
|
+
@ts.editors.set $editEditor.attr('id'), editor
|
64
37
|
|
65
38
|
enable: ->
|
66
|
-
$('body').addClass('ts-edit-mode');
|
67
39
|
$('#ts-admin-bar').removeClass('ts-hidden')
|
68
40
|
$('#ts-admin-bar-edit').addClass('ts-hidden')
|
69
41
|
|
70
42
|
disable: ->
|
71
|
-
$('body').removeClass('ts-edit-mode');
|
72
43
|
$('#ts-admin-bar').addClass('ts-hidden').removeClass 'insert-open'
|
73
|
-
$('#ts-admin-bar-edit').removeClass('ts-hidden')
|
44
|
+
$('#ts-admin-bar-edit').removeClass('ts-hidden')
|
@@ -0,0 +1,152 @@
|
|
1
|
+
moveEntityCall = (url, direction) ->
|
2
|
+
$.ajax
|
3
|
+
type: "PATCH"
|
4
|
+
url: url
|
5
|
+
dataType: 'json'
|
6
|
+
contentType: 'application/json'
|
7
|
+
data: JSON.stringify({direction: direction})
|
8
|
+
success: (data, status) -> window.location.reload()
|
9
|
+
|
10
|
+
deleteEntityCall = (url) ->
|
11
|
+
$.ajax
|
12
|
+
type: "DELETE"
|
13
|
+
url: url
|
14
|
+
dataType: 'json'
|
15
|
+
contentType: 'application/json'
|
16
|
+
data: {}
|
17
|
+
success: (data, status) -> window.location.reload()
|
18
|
+
|
19
|
+
createEntityCall = (url, data) ->
|
20
|
+
$.ajax
|
21
|
+
type: "POST"
|
22
|
+
url: url
|
23
|
+
dataType: 'json'
|
24
|
+
contentType: 'application/json'
|
25
|
+
data: JSON.stringify(data)
|
26
|
+
success: (data, status) ->
|
27
|
+
window.location.reload()
|
28
|
+
|
29
|
+
|
30
|
+
buildFields = (editor) ->
|
31
|
+
fields = editor.data.fields
|
32
|
+
inputs = ''
|
33
|
+
|
34
|
+
defaultValues = {}
|
35
|
+
for field in fields
|
36
|
+
if field.default
|
37
|
+
defaultValues[field.name] = field.default
|
38
|
+
|
39
|
+
modelValues = if editor.data.action == 'edit' then editor.data.values else defaultValues
|
40
|
+
|
41
|
+
for field in fields
|
42
|
+
if field.label
|
43
|
+
label = "<label for='#{field.name}'>#{if field.required then '*' else ''}#{field.label}</label>"
|
44
|
+
input = switch field.type
|
45
|
+
when "text" then "<input type='text' name='#{field.name}' id='#{field.name}' value='#{if modelValues[field.name] then modelValues[field.name] else ''}' />"
|
46
|
+
when "textarea" then "<textarea name='#{field.name}' id='#{field.name}' rows='5'>#{if modelValues[field.name] then modelValues[field.name] else ''}</textarea>"
|
47
|
+
when "select"
|
48
|
+
select = "<select name='#{field.name}' id='#{field.name}'>"
|
49
|
+
for o in field.options
|
50
|
+
select += "<option value='#{o[1]}' #{if modelValues[field.name] == o[1] then 'selected'}>#{o[0]}</option>"
|
51
|
+
select += "</select>"
|
52
|
+
select
|
53
|
+
when "multiple_select"
|
54
|
+
select = "<select name='#{field.name}' id='#{field.name}' class='multiple_select' multiple>"
|
55
|
+
for o in field.options
|
56
|
+
select += "<option value='#{o[1]}' #{if modelValues[field.name] && modelValues[field.name].indexOf(o[1]) > -1 then 'selected' else ''}>#{o[0]}</option>"
|
57
|
+
select += "</select>"
|
58
|
+
select
|
59
|
+
inputs += "<div class'vex-custom-field-wrapper'>#{label}<div class='vex-custom-input-wrapper'>#{input}</div></div>"
|
60
|
+
else
|
61
|
+
inputs += "<input type='hidden' name='#{field.name}' id='#{field.name}' value='#{if modelValues[field.name] then modelValues[field.name] else ''}' />"
|
62
|
+
inputs
|
63
|
+
|
64
|
+
handleDeleteEntity = (editor) ->
|
65
|
+
vex.dialog.confirm
|
66
|
+
message: 'Are you sure you want to delete this?'
|
67
|
+
callback: (value) ->
|
68
|
+
if value
|
69
|
+
deleteEntityCall(editor.data.url)
|
70
|
+
|
71
|
+
|
72
|
+
handleMoveEntity = (editor) ->
|
73
|
+
moveEntityCall(editor.data.url, editor.data.options.direction)
|
74
|
+
|
75
|
+
handleCreateEditEntity = (editor) ->
|
76
|
+
self = editor
|
77
|
+
vex.dialog.buttons.YES.text = if self.data.action == 'edit' then 'Save' else 'Create'
|
78
|
+
|
79
|
+
vex_message_type = if self.data.type == 'TypeStation::Page' then 'Page' else self.data.type
|
80
|
+
vex_message = "#{if self.data.action == 'edit' then 'Edit' else 'Create'} #{vex_message_type || 'Page'}"
|
81
|
+
|
82
|
+
vex.dialog.open
|
83
|
+
message: vex_message
|
84
|
+
input: buildFields(self)
|
85
|
+
afterOpen: ($vexContent) ->
|
86
|
+
$("select.multiple_select", $vexContent).chosen()
|
87
|
+
callback: (data) ->
|
88
|
+
if data
|
89
|
+
if self.data.action == 'edit'
|
90
|
+
model = self.ts.getModel self.data.url
|
91
|
+
vex.dialog.confirm
|
92
|
+
message: 'Are you sure you want to save changes?'
|
93
|
+
callback: (value) ->
|
94
|
+
if value
|
95
|
+
self.ts.save()
|
96
|
+
for k,v of data
|
97
|
+
model.set(k, { field: k, value: v, type: self.fields[k].type })
|
98
|
+
model.save ->
|
99
|
+
window.location.reload()
|
100
|
+
else
|
101
|
+
json = {}
|
102
|
+
contents = []
|
103
|
+
valid = true
|
104
|
+
for k,v of data
|
105
|
+
field = self.fields[k]
|
106
|
+
if valid
|
107
|
+
valid = if field.required then (v.length > 0) else true
|
108
|
+
else
|
109
|
+
break
|
110
|
+
contents.push({ field: k, value: v, type: field.type })
|
111
|
+
json['contents'] = contents
|
112
|
+
json['parent_id'] = self.data.parent_id if self.data.parent_id
|
113
|
+
json['_type'] = self.data.type if self.data.type
|
114
|
+
|
115
|
+
if valid
|
116
|
+
if self.ts.isChanged()
|
117
|
+
vex.dialog.buttons.YES.text = 'Save'
|
118
|
+
vex.dialog.confirm
|
119
|
+
message: 'You have unsaved changes, Do you want to save them before creating this?'
|
120
|
+
callback: (value) ->
|
121
|
+
if value
|
122
|
+
self.ts.save()
|
123
|
+
createEntityCall(self.data.create_url, json)
|
124
|
+
else
|
125
|
+
createEntityCall(self.data.create_url, json)
|
126
|
+
else
|
127
|
+
vex.dialog.buttons.YES.text = 'Ok'
|
128
|
+
vex.dialog.alert
|
129
|
+
message: 'Please fill in all required fields'
|
130
|
+
callback: ->
|
131
|
+
self.$el.click()
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
class @TypeStation.EntityEditor
|
136
|
+
constructor: (@ts, @$el, @data) ->
|
137
|
+
vex.defaultOptions.className = 'vex-theme-os'
|
138
|
+
@fields = {}
|
139
|
+
for field in @data.fields
|
140
|
+
@fields[field.name] = field
|
141
|
+
|
142
|
+
enable: ->
|
143
|
+
@disable()
|
144
|
+
self = @
|
145
|
+
@$el.on 'click', ->
|
146
|
+
switch self.data.action
|
147
|
+
when 'edit', 'create' then handleCreateEditEntity(self)
|
148
|
+
when 'move' then handleMoveEntity(self)
|
149
|
+
when 'delete' then handleDeleteEntity(self)
|
150
|
+
|
151
|
+
disable: ->
|
152
|
+
@$el.off 'click'
|
@@ -0,0 +1,46 @@
|
|
1
|
+
buildUploader = (editor) ->
|
2
|
+
$input = $('<input/>')
|
3
|
+
$label = $('<label/>')
|
4
|
+
|
5
|
+
$labelIcon = $('<i/>').addClass "ts-file-style-icon #{if editor.data.type == 'image' then 'ion-image' else 'ion-android-attach'}"
|
6
|
+
# $labelText = $('<span/>').addClass('ts-file-style-text').text('Upload image')
|
7
|
+
|
8
|
+
$label
|
9
|
+
.addClass 'ts-file-editor'
|
10
|
+
.addClass('ts-editable-button')
|
11
|
+
.addClass('ts-button')
|
12
|
+
|
13
|
+
$input
|
14
|
+
.attr({type: "file", name: "file", class: 'ts-editable-file-input', style: 'display: none', 'data-form-data': JSON.stringify(editor.data.options.cloudinary), 'data-element-id': editor.$el.attr('id')})
|
15
|
+
.cloudinary_fileupload()
|
16
|
+
.bind 'cloudinaryprogress', (e, data) ->
|
17
|
+
$('.ts-progress-bar').css('width', Math.round((data.loaded * 100.0) / data.total) + '%')
|
18
|
+
.bind 'cloudinarystart', (e, data) ->
|
19
|
+
$(this).prop('disabled', true)
|
20
|
+
$('body').append($('<div>').addClass('ts-progress-bar'))
|
21
|
+
.bind 'cloudinarydone', (e, data) ->
|
22
|
+
$element = $("##{$(this).data('elementId')}")
|
23
|
+
for imageTag in $('.ts-editable-image-tag', $element)
|
24
|
+
$(imageTag).attr('src', $.cloudinary.url(data.result.public_id, $.extend({}, {format: data.result.format}, $(imageTag).data())))
|
25
|
+
for linkTag in $('.ts-editable-link-tag', $element)
|
26
|
+
$(linkTag).attr('href', $.cloudinary.url(data.result.public_id, {resource_type: 'raw', format: data.result.format}))
|
27
|
+
$(this).prop('disabled', false)
|
28
|
+
$('.ts-progress-bar').remove()
|
29
|
+
|
30
|
+
model = editor.ts.getModel editor.data.url
|
31
|
+
model.set(editor.data.field, { field: editor.data.field, value: {identifier: data.result.public_id, format: data.result.format}, type: editor.data.type })
|
32
|
+
|
33
|
+
$label
|
34
|
+
# .append $labelText
|
35
|
+
.append $labelIcon
|
36
|
+
.append $input
|
37
|
+
|
38
|
+
|
39
|
+
class @TypeStation.FileEditor
|
40
|
+
constructor: (@ts, @$el, @data) ->
|
41
|
+
@$el.addClass('ts-block')
|
42
|
+
enable: ->
|
43
|
+
@$el.append(buildUploader(@))
|
44
|
+
|
45
|
+
disable: ->
|
46
|
+
@$el.find('.ts-file-editor').remove()
|
@@ -1,26 +1,26 @@
|
|
1
|
-
class window.TS.LinkFinder
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
1
|
+
# class window.TS.LinkFinder
|
2
|
+
# constructor: (@elements) ->
|
3
|
+
#
|
4
|
+
# enable: ->
|
5
|
+
# setTimeout(->
|
6
|
+
# $('.ts-link-finder, .medium-editor-toolbar-input').textcomplete [
|
7
|
+
# {
|
8
|
+
# match: /^\/(\w*)$/
|
9
|
+
# index: 1
|
10
|
+
# search: (term, callback) ->
|
11
|
+
# $.ajax
|
12
|
+
# method: 'GET'
|
13
|
+
# url: window.TS.ADMIN_PAGES_URL
|
14
|
+
# dataType: 'json'
|
15
|
+
# contentType: 'application/json'
|
16
|
+
# data: {path: term}
|
17
|
+
# success: (data, status) ->
|
18
|
+
# callback(data.pages)
|
19
|
+
# replace: (page) -> page.path#.substring(1)
|
20
|
+
# template: (page) -> "#{page.title} (#{page.path})"
|
21
|
+
# }
|
22
|
+
# ],
|
23
|
+
# zIndex: 10000
|
24
|
+
# , 500)
|
25
|
+
#
|
26
|
+
# disable: ->
|
@@ -0,0 +1,63 @@
|
|
1
|
+
hasFontAwesome = false
|
2
|
+
updateGlobalValue = ($el, value) ->
|
3
|
+
match = "[data-ts-field=#{$el.data('ts-field')}][data-ts-id=#{$el.data('ts-id')}]"
|
4
|
+
$("input#{match}").not($el).val(value)
|
5
|
+
$("#{match}").not(':input').not($el).html(value)
|
6
|
+
|
7
|
+
haveFontAwesome = ->
|
8
|
+
unless hasFontAwesome
|
9
|
+
for k, stylesheet of document.styleSheets
|
10
|
+
if stylesheet?.href?.match(/font-awesome/g)
|
11
|
+
hasFontAwesome = true
|
12
|
+
break
|
13
|
+
hasFontAwesome
|
14
|
+
|
15
|
+
isIE = -> !!(navigator.userAgent.indexOf('MSIE') != -1 || navigator.appVersion.indexOf('Trident/') > 0)
|
16
|
+
|
17
|
+
|
18
|
+
class @TypeStation.TextHtmlEditor
|
19
|
+
constructor: (@ts, @$el, @data) ->
|
20
|
+
|
21
|
+
if @data.type == 'text'
|
22
|
+
@$el.addClass('ts-block-text')
|
23
|
+
|
24
|
+
editorOptions =
|
25
|
+
disableReturn: true
|
26
|
+
# buttons: ['bold', 'italic', 'underline', 'anchor']
|
27
|
+
disableToolbar: true
|
28
|
+
anchorInputPlaceholder: 'Type a link'
|
29
|
+
imageDragging: false
|
30
|
+
# anchorInputCheckboxLabel: true
|
31
|
+
# checkLinkFormat: true
|
32
|
+
else
|
33
|
+
@$el.addClass('ts-block')
|
34
|
+
|
35
|
+
editorOptions =
|
36
|
+
#buttons: ['bold', 'italic', 'underline', 'anchor', 'header1', 'header2', 'unorderedlist', 'orderedlist', 'justifyLeft', 'justifyFull', 'justifyCenter', 'justifyRight']
|
37
|
+
buttons: ['bold', 'italic', 'underline', 'anchor', 'header1', 'header2', 'unorderedlist', 'orderedlist']
|
38
|
+
buttonLabels: (if haveFontAwesome() then 'fontawesome' else null)
|
39
|
+
anchorInputPlaceholder: 'Type a link'
|
40
|
+
imageDragging: false
|
41
|
+
# anchorInputCheckboxLabel: true
|
42
|
+
# checkLinkFormat: true
|
43
|
+
|
44
|
+
@editor = new MediumEditor @$el, editorOptions
|
45
|
+
@editor.deactivate()
|
46
|
+
@$el.attr('data-ts-id', @data.id).attr('data-ts-field', @data.field)
|
47
|
+
|
48
|
+
enable: ->
|
49
|
+
@editor.activate()
|
50
|
+
self = @
|
51
|
+
eventName = if isIE() then 'keyup' else 'input'
|
52
|
+
@$el.on eventName, ->
|
53
|
+
model = self.ts.getModel self.data.url
|
54
|
+
if $(@).is(':input')
|
55
|
+
model.set(self.data.field, { field: self.data.field, value: $(@).val(), type: self.data.type })
|
56
|
+
updateGlobalValue($(@), $(@).val())
|
57
|
+
else
|
58
|
+
model.set(self.data.field, { field: self.data.field, value: $(@).html(), type: self.data.type })
|
59
|
+
updateGlobalValue($(@), $(@).html())
|
60
|
+
|
61
|
+
disable: ->
|
62
|
+
@editor.deactivate()
|
63
|
+
@$el.off 'input'
|
@@ -1,6 +1,4 @@
|
|
1
|
-
window.TS
|
2
|
-
window.TS.editors = new window.TS.Store
|
3
|
-
|
1
|
+
window.TS = {} unless window.TS
|
4
2
|
window.TS.onSave = -> null unless window.TS['onSave']
|
5
3
|
window.TS.onSaved = -> null unless window.TS['onSaved']
|
6
4
|
|
@@ -10,51 +8,11 @@ window.TS.onEnabled = -> null unless window.TS['onEnabled']
|
|
10
8
|
window.TS.onDisable = -> null unless window.TS['onDisable']
|
11
9
|
window.TS.onDisabled = -> null unless window.TS['onDisabled']
|
12
10
|
|
13
|
-
window.TS.getModel = (url) ->
|
14
|
-
model = @models.get url
|
15
|
-
unless model
|
16
|
-
model = new window.TS.Model url
|
17
|
-
@models.set url, model
|
18
|
-
model
|
19
|
-
|
20
|
-
window.TS.enable = ->
|
21
|
-
window.location.hash = '#!ts-edit-enable'
|
22
|
-
@onEnable()
|
23
|
-
@editors.each (id, editor) -> editor.enable()
|
24
|
-
@onEnabled()
|
25
|
-
$(window).on 'beforeunload', =>
|
26
|
-
if @isChanged()
|
27
|
-
return 'You have unsaved changes. Are you sure you want to leave?'
|
28
|
-
else
|
29
|
-
return
|
30
|
-
|
31
|
-
window.TS.disable = ->
|
32
|
-
window.location.hash = '#!ts-edit-disable'
|
33
|
-
@onDisable()
|
34
|
-
@editors.each (id, editor) -> editor.disable()
|
35
|
-
@onDisabled()
|
36
|
-
$(window).off 'beforeunload'
|
37
|
-
|
38
|
-
window.TS.save = ->
|
39
|
-
@onSave()
|
40
|
-
@models.each (id, model) -> model.save()
|
41
|
-
@onSaved()
|
42
|
-
|
43
|
-
window.TS.isChanged = ->
|
44
|
-
dirtyArray = []
|
45
|
-
@models.each (id, model) -> dirtyArray.push model.isChanged()
|
46
|
-
$.grep(dirtyArray, (a) -> a == true ).length > 0
|
47
|
-
|
48
11
|
window.TS.init = ->
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
@editors.set 'ts-link-finder', new window.TS.LinkFinder null
|
57
|
-
@editors.set 'ts-edit-page', new window.TS.EditPage $('.ts-edit-page')
|
58
|
-
|
59
|
-
if window.location.hash.replace(/^#!/, '') == 'ts-edit-enable'
|
60
|
-
window.TS.enable()
|
12
|
+
window.typeStation = new TypeStation $('[data-ts]'),
|
13
|
+
onSave: window.TS.onSave
|
14
|
+
onSaved: window.TS.onSaved
|
15
|
+
onEnable: window.TS.onEnable
|
16
|
+
onEnabled: window.TS.onEnabled
|
17
|
+
onDisable: window.TS.onDisable
|
18
|
+
onDisabled: window.TS.onDisabled
|
@@ -1,14 +1,14 @@
|
|
1
|
-
class
|
1
|
+
class @TypeStation.Store
|
2
2
|
constructor: (@id = null) ->
|
3
3
|
@STORE = {}
|
4
4
|
get: (key) -> @STORE[key]
|
5
5
|
set: (key, value) -> @STORE[key] = value
|
6
6
|
|
7
|
-
each: (callback) ->
|
7
|
+
each: (callback) ->
|
8
8
|
for key, value of @STORE
|
9
9
|
callback?(key, value)
|
10
10
|
|
11
|
-
class
|
11
|
+
class @TypeStation.Model extends @TypeStation.Store
|
12
12
|
|
13
13
|
constructor: (@id = null) ->
|
14
14
|
super
|
@@ -38,6 +38,6 @@ class window.TS.Model extends window.TS.Store
|
|
38
38
|
dataType: 'json'
|
39
39
|
contentType: 'application/json'
|
40
40
|
data: JSON.stringify({contents: data})
|
41
|
-
success: (data) ->
|
41
|
+
success: (data) ->
|
42
42
|
self._reset() #reset model to a clean state
|
43
|
-
callback(data)
|
43
|
+
callback(data)
|
@@ -1 +1,84 @@
|
|
1
|
-
|
1
|
+
setCookie = (cname, cvalue, exdays) ->
|
2
|
+
d = new Date
|
3
|
+
d.setTime d.getTime() + exdays * 24 * 60 * 60 * 1000
|
4
|
+
expires = 'expires=' + d.toUTCString()
|
5
|
+
document.cookie = cname + '=' + cvalue + '; ' + expires + '; path=/'
|
6
|
+
return
|
7
|
+
|
8
|
+
getCookie = (cname) ->
|
9
|
+
name = cname + '='
|
10
|
+
ca = document.cookie.split(';')
|
11
|
+
i = 0
|
12
|
+
while i < ca.length
|
13
|
+
c = ca[i]
|
14
|
+
while c.charAt(0) == ' '
|
15
|
+
c = c.substring(1)
|
16
|
+
if c.indexOf(name) == 0
|
17
|
+
return c.substring(name.length, c.length)
|
18
|
+
i++
|
19
|
+
''
|
20
|
+
|
21
|
+
buildEditor = (ts, $el, data) ->
|
22
|
+
if data.action
|
23
|
+
switch data.action
|
24
|
+
when 'create', 'edit', 'delete', 'move'
|
25
|
+
new TypeStation.EntityEditor(ts, $el, data)
|
26
|
+
else
|
27
|
+
switch data.type
|
28
|
+
when 'text', 'html' then new TypeStation.TextHtmlEditor(ts, $el, data)
|
29
|
+
when 'image', 'file' then new TypeStation.FileEditor(ts, $el, data)
|
30
|
+
|
31
|
+
class @TypeStation
|
32
|
+
constructor: (@elements, @callbacks = {}) ->
|
33
|
+
@models = new TypeStation.Store
|
34
|
+
@editors = new TypeStation.Store
|
35
|
+
|
36
|
+
if $adminBar = $('#ts-admin-bar-template')
|
37
|
+
@editors.set 'ts-admin-bar', new TypeStation.AdminBarEditor(@, $adminBar, {})
|
38
|
+
|
39
|
+
self = @
|
40
|
+
@elements.each ->
|
41
|
+
$el = $(@)
|
42
|
+
data = $el.data('ts')
|
43
|
+
self.editors.set $el.attr('id'), buildEditor(self, $el, data)
|
44
|
+
|
45
|
+
@enable() if getCookie("ts-enabled") == '1'
|
46
|
+
|
47
|
+
enable: ->
|
48
|
+
setCookie('ts-enabled', 1, 1)
|
49
|
+
$('body').addClass('ts-enable')
|
50
|
+
|
51
|
+
@callbacks['onEnable']() if @callbacks['onEnable']
|
52
|
+
@editors.each (id, editor) -> editor?.enable?()
|
53
|
+
@callbacks['onEnabled']() if @callbacks['onEnabled']
|
54
|
+
$(window).on 'beforeunload', =>
|
55
|
+
if @isChanged()
|
56
|
+
return 'You have unsaved changes. Are you sure you want to leave?'
|
57
|
+
else
|
58
|
+
return
|
59
|
+
|
60
|
+
disable: ->
|
61
|
+
setCookie('ts-enabled', 0, 1)
|
62
|
+
$('body').removeClass('ts-enable')
|
63
|
+
|
64
|
+
@callbacks['onDisable']() if @callbacks['onDisable']
|
65
|
+
@editors.each (id, editor) -> editor?.disable?()
|
66
|
+
@callbacks['onDisabled']() if @callbacks['onDisabled']
|
67
|
+
$(window).off 'beforeunload'
|
68
|
+
|
69
|
+
getModel: (url) ->
|
70
|
+
model = @models.get url
|
71
|
+
unless model
|
72
|
+
model = new TypeStation.Model url
|
73
|
+
@models.set url, model
|
74
|
+
model
|
75
|
+
|
76
|
+
isChanged: ->
|
77
|
+
dirtyArray = []
|
78
|
+
@models.each (id, model) -> dirtyArray.push model.isChanged()
|
79
|
+
$.grep(dirtyArray, (a) -> a == true ).length > 0
|
80
|
+
|
81
|
+
save: ->
|
82
|
+
@callbacks['onSave']() if @callbacks['onSave']
|
83
|
+
@models.each (id, model) -> model.save()
|
84
|
+
@callbacks['onSaved']() if @callbacks['onSaved']
|