locomotivecms 3.0.1 → 3.1.0.rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +5 -2
- data/app/api/locomotive/api.rb +4 -0
- data/app/api/locomotive/api/entities/site_entity.rb +8 -0
- data/app/api/locomotive/api/forms/site_form.rb +1 -1
- data/app/api/locomotive/api/helpers/params_helper.rb +14 -3
- data/app/api/locomotive/api/middlewares/logger_middleware.rb +1 -3
- data/app/api/locomotive/api/resources/current_site_resource.rb +3 -1
- data/app/api/locomotive/api/resources/page_resource.rb +2 -2
- data/app/api/locomotive/api/resources/site_resource.rb +4 -0
- data/app/assets/images/locomotive/blank.png +0 -0
- data/app/assets/images/locomotive/icons/flags/bf.png +0 -0
- data/app/assets/images/locomotive/icons/flags/bg.png +0 -0
- data/app/assets/images/locomotive/icons/flags/cs.png +0 -0
- data/app/assets/images/locomotive/icons/flags/de.png +0 -0
- data/app/assets/images/locomotive/icons/flags/en.png +0 -0
- data/app/assets/images/locomotive/icons/flags/es.png +0 -0
- data/app/assets/images/locomotive/icons/flags/et.png +0 -0
- data/app/assets/images/locomotive/icons/flags/fr.png +0 -0
- data/app/assets/images/locomotive/icons/flags/it.png +0 -0
- data/app/assets/images/locomotive/icons/flags/ja.png +0 -0
- data/app/assets/images/locomotive/icons/flags/lt.png +0 -0
- data/app/assets/images/locomotive/icons/flags/mg.png +0 -0
- data/app/assets/images/locomotive/icons/flags/nb.png +0 -0
- data/app/assets/images/locomotive/icons/flags/nl.png +0 -0
- data/app/assets/images/locomotive/icons/flags/pl.png +0 -0
- data/app/assets/images/locomotive/icons/flags/pt-BR.png +0 -0
- data/app/assets/images/locomotive/icons/flags/pt.png +0 -0
- data/app/assets/images/locomotive/icons/flags/ru.png +0 -0
- data/app/assets/images/locomotive/icons/flags/sk.png +0 -0
- data/app/assets/images/locomotive/icons/flags/sr.png +0 -0
- data/app/assets/images/locomotive/icons/flags/sv.png +0 -0
- data/app/assets/images/locomotive/icons/flags/zh-CN.png +0 -0
- data/app/assets/javascripts/locomotive.js +3 -1
- data/app/assets/javascripts/locomotive/utils/core_ext.js +10 -0
- data/app/assets/javascripts/locomotive/utils/wysihtml5.js.coffee +0 -16
- data/app/assets/javascripts/locomotive/views/application_view.js.coffee +20 -3
- data/app/assets/javascripts/locomotive/views/current_site/edit_view.js.coffee +7 -0
- data/app/assets/javascripts/locomotive/views/current_site_metafields/index_view.js.coffee +7 -0
- data/app/assets/javascripts/locomotive/views/editable_elements/edit_view.js.coffee +2 -2
- data/app/assets/javascripts/locomotive/views/editable_elements/iframe_view.js.coffee +10 -0
- data/app/assets/javascripts/locomotive/views/editable_elements/index_view.js.coffee +11 -6
- data/app/assets/javascripts/locomotive/views/editable_elements/text_highlighter_view.js.coffee +6 -1
- data/app/assets/javascripts/locomotive/views/inputs/file_view.js.coffee +1 -8
- data/app/assets/javascripts/locomotive/views/inputs/image_view.js.coffee +84 -0
- data/app/assets/javascripts/locomotive/views/inputs/rte/edit_table_view.js.coffee +2 -0
- data/app/assets/javascripts/locomotive/views/inputs/rte/file_view.js.coffee +5 -3
- data/app/assets/javascripts/locomotive/views/inputs/rte/image_view.js.coffee +14 -0
- data/app/assets/javascripts/locomotive/views/inputs/rte/link_view.js.coffee +9 -3
- data/app/assets/javascripts/locomotive/views/inputs/rte/table_view.js.coffee +7 -2
- data/app/assets/javascripts/locomotive/views/inputs/rte_view.js.coffee.erb +19 -6
- data/app/assets/javascripts/locomotive/views/inputs/simple_image_view.js.coffee +17 -40
- data/app/assets/javascripts/locomotive/views/shared/drawer_view.js.coffee +8 -6
- data/app/assets/javascripts/locomotive/views/shared/form_view.js.coffee +30 -8
- data/app/assets/javascripts/locomotive/views/shared/sidebar_view.js.coffee +31 -2
- data/app/assets/stylesheets/locomotive/account.scss +14 -10
- data/app/assets/stylesheets/locomotive/application.scss +101 -24
- data/app/assets/stylesheets/locomotive/live_editing_error.scss +48 -4
- data/app/assets/stylesheets/locomotive/live_editing_iframe.scss +0 -2
- data/app/assets/stylesheets/locomotive/new/_actionbar.scss +83 -0
- data/app/assets/stylesheets/locomotive/{account → new}/_brand.scss +0 -0
- data/app/assets/stylesheets/locomotive/new/_content.scss +65 -0
- data/app/assets/stylesheets/locomotive/new/_drawer.scss +53 -0
- data/app/assets/stylesheets/locomotive/new/_files.scss +124 -0
- data/app/assets/stylesheets/locomotive/{account → new}/_forms.scss +0 -0
- data/app/assets/stylesheets/locomotive/{account → new}/_keyframes.scss +0 -0
- data/app/assets/stylesheets/locomotive/{account → new}/_navigation.scss +85 -0
- data/app/assets/stylesheets/locomotive/{account → new}/_navs.scss +0 -0
- data/app/assets/stylesheets/locomotive/{account → new}/_notify.scss +0 -0
- data/app/assets/stylesheets/locomotive/{account → new}/_public.scss +0 -0
- data/app/assets/stylesheets/locomotive/new/_sidebar.scss +177 -0
- data/app/assets/stylesheets/locomotive/new/_transitions.scss +96 -0
- data/app/assets/stylesheets/locomotive/{account → new}/_type.scss +0 -0
- data/app/assets/stylesheets/locomotive/{account → new}/_variables.scss +0 -0
- data/app/assets/stylesheets/locomotive/{components → old}/_activity_feed.scss +0 -0
- data/app/assets/stylesheets/locomotive/{base → old}/_buttons.scss +0 -0
- data/app/assets/stylesheets/locomotive/{components → old}/_content_assets.scss +49 -48
- data/app/assets/stylesheets/locomotive/{components → old}/_dashboard.scss +0 -0
- data/app/assets/stylesheets/locomotive/{components → old}/_developers.scss +0 -0
- data/app/assets/stylesheets/locomotive/{components → old}/_list.scss +15 -21
- data/app/assets/stylesheets/locomotive/old/_live_editing.scss +37 -0
- data/app/assets/stylesheets/locomotive/{components → old}/_main.scss +4 -14
- data/app/assets/stylesheets/locomotive/{base → old}/_nav.scss +0 -0
- data/app/assets/stylesheets/locomotive/old/_scrollable.scss +11 -0
- data/app/assets/stylesheets/locomotive/{components/misc/_nav.scss → old/_search_bars.scss} +8 -14
- data/app/assets/stylesheets/locomotive/{components → old}/_translations.scss +0 -0
- data/app/assets/stylesheets/locomotive/{globals → old}/_variables.scss +47 -12
- data/app/assets/stylesheets/locomotive/{base → old}/form/_array_input.scss +20 -27
- data/app/assets/stylesheets/locomotive/{base → old}/form/_base.scss +1 -0
- data/app/assets/stylesheets/locomotive/{base → old}/form/_code.scss +0 -0
- data/app/assets/stylesheets/locomotive/{base → old}/form/_color_input.scss +0 -0
- data/app/assets/stylesheets/locomotive/{base → old}/form/_document_picker.scss +0 -0
- data/app/assets/stylesheets/locomotive/{base → old}/form/_file_input.scss +14 -20
- data/app/assets/stylesheets/locomotive/{base → old}/form/_link.scss +0 -0
- data/app/assets/stylesheets/locomotive/{base → old}/form/_markdown.scss +0 -0
- data/app/assets/stylesheets/locomotive/{base → old}/form/_popover.scss +0 -0
- data/app/assets/stylesheets/locomotive/{base → old}/form/_rte.scss +8 -0
- data/app/assets/stylesheets/locomotive/{base → old}/form/_select2.scss +35 -0
- data/app/assets/stylesheets/locomotive/{base → old}/form/_tags.scss +0 -0
- data/app/assets/stylesheets/locomotive/{base → old}/form/_toggle.scss +4 -10
- data/app/controllers/locomotive/content_entries_controller.rb +1 -1
- data/app/controllers/locomotive/current_site_metafields_controller.rb +34 -0
- data/app/controllers/locomotive/custom_fields/select_options_controller.rb +4 -0
- data/app/controllers/locomotive/pages_controller.rb +1 -1
- data/app/helpers/locomotive/base_helper.rb +13 -0
- data/app/helpers/locomotive/current_site_metafields_helper.rb +126 -0
- data/app/helpers/locomotive/my_account_helper.rb +1 -1
- data/app/helpers/locomotive/shared/pages_helper.rb +4 -0
- data/app/helpers/locomotive/sites_helper.rb +9 -11
- data/app/inputs/locomotive/file_input.rb +3 -3
- data/app/inputs/locomotive/image_input.rb +97 -0
- data/app/inputs/locomotive/rte_input.rb +2 -1
- data/app/inputs/locomotive/simple_image_input.rb +5 -68
- data/app/models/locomotive/concerns/site/metafields.rb +96 -0
- data/app/models/locomotive/editable_text.rb +2 -1
- data/app/models/locomotive/site.rb +1 -0
- data/app/policies/locomotive/page_policy.rb +6 -0
- data/app/services/locomotive/content_entry_service.rb +3 -0
- data/app/services/locomotive/site_metafields_service.rb +39 -0
- data/app/views/locomotive/current_site/edit.html.slim +3 -0
- data/app/views/locomotive/current_site_metafields/form/_panes.html.slim +19 -0
- data/app/views/locomotive/current_site_metafields/form/_tabs.html.slim +6 -0
- data/app/views/locomotive/current_site_metafields/index.html.slim +26 -0
- data/app/views/locomotive/editable_elements/_form.html.slim +1 -1
- data/app/views/locomotive/layouts/application.html.slim +22 -19
- data/app/views/locomotive/layouts/live_editing.html.slim +19 -30
- data/app/views/locomotive/pages/form/_main.html.slim +3 -0
- data/app/views/locomotive/shared/_account_navigation.slim +9 -2
- data/app/views/locomotive/shared/_head.html.slim +4 -0
- data/app/views/locomotive/shared/_locale_picker_link.html.slim +1 -1
- data/app/views/locomotive/shared/_navigation.html.slim +30 -0
- data/app/views/locomotive/shared/_sidebar.html.slim +42 -26
- data/app/views/locomotive/shared/rte/_toolbar.html.slim +76 -68
- data/app/views/locomotive/shared/sidebar/_content_types.html.slim +11 -11
- data/app/views/locomotive/shared/sidebar/_link.html.slim +0 -3
- data/app/views/locomotive/shared/sidebar/_page.html.slim +8 -13
- data/app/views/locomotive/shared/sidebar/_pages.html.slim +4 -7
- data/app/views/locomotive/sites/index.html.slim +0 -1
- data/config/locales/carrierwave.cs.yml +4 -0
- data/config/locales/carrierwave.de.yml +4 -0
- data/config/locales/cs.yml +318 -0
- data/config/locales/de.yml +318 -0
- data/config/locales/default.cs.yml +13 -0
- data/config/locales/default.de.yml +13 -0
- data/config/locales/default.fr.yml +13 -1
- data/config/locales/devise.cs.yml +61 -0
- data/config/locales/devise.de.yml +61 -0
- data/config/locales/devise.fr.yml +61 -1
- data/config/locales/el.yml +0 -2
- data/config/locales/en.yml +9 -0
- data/config/locales/flash.cs.yml +79 -0
- data/config/locales/flash.de.yml +79 -0
- data/config/locales/flash.en.yml +4 -0
- data/config/locales/flash.fr.yml +82 -1
- data/config/locales/fr.yml +323 -0
- data/config/locales/inputs.cs.yml +19 -0
- data/config/locales/inputs.de.yml +19 -0
- data/config/locales/inputs.fr.yml +19 -1
- data/config/locales/mongoid.cs.yml +47 -0
- data/config/locales/mongoid.de.yml +38 -0
- data/config/locales/mongoid.fr.yml +35 -0
- data/config/locales/simple_form.cs.yml +152 -0
- data/config/locales/simple_form.de.yml +36 -0
- data/config/locales/simple_form.el.yml +0 -1
- data/config/locales/simple_form.fr.yml +153 -1
- data/config/routes.rb +4 -0
- data/lib/generators/locomotive/install/templates/locomotive.rb +2 -2
- data/lib/locomotive/configuration.rb +1 -1
- data/lib/locomotive/dependencies.rb +1 -0
- data/lib/locomotive/engine.rb +0 -1
- data/lib/locomotive/middlewares/site.rb +1 -1
- data/lib/locomotive/mongoid/patches.rb +8 -0
- data/lib/locomotive/steam/middlewares/page_editing.rb +1 -1
- data/lib/locomotive/version.rb +1 -1
- data/spec/dummy/config/initializers/locomotive.rb +1 -1
- data/spec/models/locomotive/concerns/site/metafields_spec.rb +121 -0
- data/spec/requests/locomotive/steam/cache_spec.rb +1 -1
- data/vendor/assets/components/locomotive/eonasdan-bootstrap-datetimepicker/bootstrap-datetimepicker.css +5 -0
- data/vendor/assets/components/locomotive/eonasdan-bootstrap-datetimepicker/bootstrap-datetimepicker.js +9 -0
- data/vendor/assets/components/locomotive/moment-timezone/moment-timezone.js +7 -0
- data/vendor/assets/components/locomotive/moment/moment.js +3606 -0
- data/vendor/assets/components/locomotive/select2/select2.js +0 -3
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/CONTRIBUTING.md +38 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/Gruntfile.js +191 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/LICENSE +21 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/README.md +37 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/bower.json +35 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker-standalone.css +103 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.css +373 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css +5 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js +9 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/component.json +9 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/composer.json +28 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/docs/ChangeLog.md +222 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/docs/ContributorsGuide.md +126 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/docs/Events.md +96 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/docs/Extras.md +95 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/docs/FAQ.md +22 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/docs/Functions.md +670 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/docs/Installing.md +161 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/docs/Options.md +473 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/docs/Version 4 Changelog.md +6 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/docs/Version 4 Contributors guide.md +6 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/docs/index.md +592 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/mkdocs.yml +17 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/package.json +43 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js +2552 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/src/less/_bootstrap-datetimepicker.less +352 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/src/less/bootstrap-datetimepicker-build.less +17 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/src/nuget/Bootstrap.v3.Datetimepicker.CSS.nuspec +34 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/src/nuget/Bootstrap.v3.Datetimepicker.nuspec +34 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/src/nuget/NuGet.exe +0 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/src/nuget/install.ps1 +2 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/src/sass/_bootstrap-datetimepicker.scss +343 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/src/sass/bootstrap-datetimepicker-build.scss +16 -0
- data/vendor/assets/components/locomotive_sources/eonasdan-bootstrap-datetimepicker/tasks/bump_version.js +88 -0
- data/vendor/assets/components/locomotive_sources/moment-timezone/LICENSE +20 -0
- data/vendor/assets/components/locomotive_sources/moment-timezone/README.md +36 -0
- data/vendor/assets/components/locomotive_sources/moment-timezone/bower.json +18 -0
- data/vendor/assets/components/locomotive_sources/moment-timezone/builds/moment-timezone-with-data-2010-2020.js +1189 -0
- data/vendor/assets/components/locomotive_sources/moment-timezone/builds/moment-timezone-with-data-2010-2020.min.js +7 -0
- data/vendor/assets/components/locomotive_sources/moment-timezone/builds/moment-timezone-with-data.js +1189 -0
- data/vendor/assets/components/locomotive_sources/moment-timezone/builds/moment-timezone-with-data.min.js +7 -0
- data/vendor/assets/components/locomotive_sources/moment-timezone/builds/moment-timezone.min.js +6 -0
- data/vendor/assets/components/locomotive_sources/moment-timezone/changelog.md +101 -0
- data/vendor/assets/components/locomotive_sources/moment-timezone/composer.json +43 -0
- data/vendor/assets/components/locomotive_sources/moment-timezone/data/meta/latest.json +5012 -0
- data/vendor/assets/components/locomotive_sources/moment-timezone/data/packed/latest.json +590 -0
- data/vendor/assets/components/locomotive_sources/moment-timezone/data/unpacked/latest.json +124081 -0
- data/vendor/assets/components/locomotive_sources/moment-timezone/moment-timezone-utils.js +316 -0
- data/vendor/assets/components/locomotive_sources/moment-timezone/moment-timezone.js +599 -0
- data/vendor/assets/components/locomotive_sources/moment/CHANGELOG.md +496 -0
- data/vendor/assets/components/locomotive_sources/moment/LICENSE +22 -0
- data/vendor/assets/components/locomotive_sources/moment/README.md +58 -0
- data/vendor/assets/components/locomotive_sources/moment/bower.json +22 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/af.js +73 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/ar-ma.js +59 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/ar-sa.js +103 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/ar-tn.js +57 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/ar.js +136 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/az.js +104 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/be.js +134 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/bg.js +90 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/bn.js +113 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/bo.js +110 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/br.js +107 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/bs.js +141 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/ca.js +79 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/cs.js +171 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/cv.js +63 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/cy.js +79 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/da.js +60 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/de-at.js +77 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/de.js +76 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/dv.js +99 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/el.js +98 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/en-au.js +66 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/en-ca.js +63 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/en-gb.js +67 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/en-ie.js +67 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/en-nz.js +66 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/eo.js +73 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/es.js +79 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/et.js +80 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/eu.js +64 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/fa.js +105 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/fi.js +107 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/fo.js +60 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/fr-ca.js +58 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/fr-ch.js +62 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/fr.js +62 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/fy.js +71 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/gd.js +76 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/gl.js +75 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/he.js +82 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/hi.js +123 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/hr.js +143 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/hu.js +109 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/hy-am.js +95 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/id.js +83 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/is.js +127 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/it.js +70 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/ja.js +65 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/jv.js +83 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/ka.js +89 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/kk.js +87 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/km.js +58 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/ko.js +68 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/lb.js +134 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/lo.js +69 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/lt.js +115 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/lv.js +96 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/me.js +109 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/mk.js +90 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/ml.js +71 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/mr.js +158 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/ms-my.js +82 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/ms.js +82 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/my.js +93 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/nb.js +61 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/ne.js +121 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/nl.js +71 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/nn.js +60 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/pl.js +105 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/pt-br.js +60 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/pt.js +64 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/ro.js +74 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/ru.js +166 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/se.js +61 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/si.js +66 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/sk.js +150 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/sl.js +160 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/sq.js +69 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/sr-cyrl.js +108 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/sr.js +108 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/sv.js +67 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/sw.js +58 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/ta.js +129 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/te.js +88 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/th.js +65 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/tl-ph.js +62 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/tlh.js +119 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/tr.js +90 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/tzl.js +87 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/tzm-latn.js +58 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/tzm.js +58 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/uk.js +146 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/uz.js +58 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/vi.js +66 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/zh-cn.js +127 -0
- data/vendor/assets/components/locomotive_sources/moment/locale/zh-tw.js +101 -0
- data/vendor/assets/components/locomotive_sources/moment/min/locales.js +7548 -0
- data/vendor/assets/components/locomotive_sources/moment/min/locales.min.js +72 -0
- data/vendor/assets/components/locomotive_sources/moment/min/moment-with-locales.js +11144 -0
- data/vendor/assets/components/locomotive_sources/moment/min/moment-with-locales.min.js +74 -0
- data/vendor/assets/components/locomotive_sources/moment/min/moment.min.js +7 -0
- data/vendor/assets/components/locomotive_sources/moment/min/tests.js +46196 -0
- data/vendor/assets/components/locomotive_sources/moment/moment.js +3606 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/create/check-overflow.js +34 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/create/date-from-array.js +21 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/create/from-anything.js +101 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/create/from-array.js +136 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/create/from-object.js +16 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/create/from-string-and-array.js +50 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/create/from-string-and-format.js +104 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/create/from-string.js +120 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/create/local.js +5 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/create/parsing-flags.js +22 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/create/utc.js +5 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/create/valid.js +37 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/duration/abs.js +18 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/duration/add-subtract.js +21 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/duration/as.js +55 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/duration/bubble.js +61 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/duration/constructor.js +41 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/duration/create.js +117 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/duration/duration.js +12 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/duration/get.js +25 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/duration/humanize.js +64 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/duration/iso-string.js +52 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/duration/prototype.js +48 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/format/format.js +92 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/locale/calendar.js +15 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/locale/constructor.js +2 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/locale/en.js +15 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/locale/formats.js +23 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/locale/invalid.js +5 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/locale/lists.js +48 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/locale/locale.js +35 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/locale/locales.js +118 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/locale/ordinal.js +7 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/locale/pre-post-format.js +3 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/locale/prototype.js +76 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/locale/relative.js +29 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/locale/set.js +16 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/add-subtract.js +52 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/calendar.js +21 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/clone.js +5 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/compare.js +57 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/constructor.js +74 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/creation-data.js +9 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/diff.js +61 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/format.js +28 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/from.js +17 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/get-set.js +43 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/locale.js +34 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/min-max.js +63 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/moment.js +28 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/now.js +3 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/prototype.js +149 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/start-end-of.js +52 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/to-type.js +34 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/to.js +17 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/moment/valid.js +15 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/parse/regex.js +54 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/parse/token.js +32 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/units/aliases.js +29 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/units/constants.js +9 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/units/day-of-month.js +32 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/units/day-of-week.js +162 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/units/day-of-year.js +32 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/units/hour.js +129 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/units/millisecond.js +64 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/units/minute.js +24 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/units/month.js +209 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/units/offset.js +219 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/units/quarter.js +27 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/units/second.js +24 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/units/timestamp.js +20 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/units/timezone.js +16 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/units/units.js +20 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/units/week-calendar-utils.js +65 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/units/week-year.js +101 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/units/week.js +61 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/units/year.js +70 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/abs-ceil.js +7 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/abs-floor.js +7 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/compare-arrays.js +16 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/defaults.js +10 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/deprecate.js +33 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/extend.js +19 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/has-own-prop.js +3 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/hooks.js +13 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/is-array.js +3 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/is-date.js +3 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/is-function.js +3 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/is-undefined.js +3 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/map.js +7 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/to-int.js +12 -0
- data/vendor/assets/components/locomotive_sources/moment/src/lib/utils/zero-fill.js +7 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/af.js +63 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/ar-ma.js +50 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/ar-sa.js +94 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/ar-tn.js +48 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/ar.js +127 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/az.js +95 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/be.js +125 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/bg.js +81 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/bn.js +104 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/bo.js +101 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/br.js +98 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/bs.js +132 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/ca.js +70 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/cs.js +162 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/cv.js +53 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/cy.js +70 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/da.js +51 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/de-at.js +67 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/de.js +66 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/dv.js +89 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/el.js +86 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/en-au.js +57 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/en-ca.js +54 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/en-gb.js +58 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/en-ie.js +58 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/en-nz.js +56 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/eo.js +64 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/es.js +70 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/et.js +71 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/eu.js +55 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/fa.js +96 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/fi.js +98 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/fo.js +51 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/fr-ca.js +49 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/fr-ch.js +53 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/fr.js +53 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/fy.js +62 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/gd.js +67 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/gl.js +66 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/he.js +73 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/hi.js +114 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/hr.js +134 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/hu.js +100 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/hy-am.js +86 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/id.js +74 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/is.js +118 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/it.js +61 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/ja.js +56 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/jv.js +73 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/ka.js +80 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/kk.js +77 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/km.js +49 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/ko.js +59 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/lb.js +125 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/lo.js +60 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/lt.js +106 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/lv.js +87 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/me.js +99 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/mk.js +81 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/ml.js +62 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/mr.js +149 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/ms-my.js +73 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/ms.js +73 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/my.js +84 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/nb.js +52 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/ne.js +112 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/nl.js +62 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/nn.js +51 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/pl.js +95 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/pt-br.js +51 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/pt.js +55 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/ro.js +65 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/ru.js +156 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/se.js +51 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/si.js +56 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/sk.js +141 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/sl.js +150 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/sq.js +60 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/sr-cyrl.js +99 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/sr.js +99 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/sv.js +58 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/sw.js +49 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/ta.js +120 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/te.js +78 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/th.js +56 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/tl-ph.js +53 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/tlh.js +109 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/tr.js +81 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/tzl.js +78 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/tzm-latn.js +49 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/tzm.js +49 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/uk.js +137 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/uz.js +49 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/vi.js +57 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/zh-cn.js +118 -0
- data/vendor/assets/components/locomotive_sources/moment/src/locale/zh-tw.js +91 -0
- data/vendor/assets/components/locomotive_sources/moment/src/moment.js +71 -0
- data/vendor/assets/components/locomotive_sources/moment/templates/amd-named.js +7 -0
- data/vendor/assets/components/locomotive_sources/moment/templates/amd.js +7 -0
- data/vendor/assets/components/locomotive_sources/moment/templates/default.js +5 -0
- data/vendor/assets/components/locomotive_sources/moment/templates/globals.js +5 -0
- data/vendor/assets/components/locomotive_sources/moment/templates/locale-header.js +6 -0
- data/vendor/assets/components/locomotive_sources/moment/templates/test-header.js +6 -0
- data/vendor/assets/javascripts/locomotive/vendor.js +1 -2
- data/vendor/assets/stylesheets/locomotive/wysihtml5_editor.css +1 -1
- metadata +458 -100
- data/app/assets/stylesheets/locomotive/account/_files.scss +0 -125
- data/app/assets/stylesheets/locomotive/base/_all.scss +0 -6
- data/app/assets/stylesheets/locomotive/base/_fonts.scss +0 -27
- data/app/assets/stylesheets/locomotive/base/_form.scss +0 -18
- data/app/assets/stylesheets/locomotive/base/_iframe.scss +0 -4
- data/app/assets/stylesheets/locomotive/base/_typography.scss +0 -6
- data/app/assets/stylesheets/locomotive/base/form/_api_key.scss +0 -24
- data/app/assets/stylesheets/locomotive/base/form/_date.scss +0 -11
- data/app/assets/stylesheets/locomotive/components/_drawer.scss +0 -24
- data/app/assets/stylesheets/locomotive/components/_header.scss +0 -3
- data/app/assets/stylesheets/locomotive/components/_live_editing.scss +0 -95
- data/app/assets/stylesheets/locomotive/components/_misc.scss +0 -3
- data/app/assets/stylesheets/locomotive/components/_sidebar.scss +0 -5
- data/app/assets/stylesheets/locomotive/components/_sites.scss +0 -130
- data/app/assets/stylesheets/locomotive/components/_transitions.scss +0 -149
- data/app/assets/stylesheets/locomotive/components/header/_account.scss +0 -63
- data/app/assets/stylesheets/locomotive/components/header/_base.scss +0 -91
- data/app/assets/stylesheets/locomotive/components/header/_responsive.scss +0 -34
- data/app/assets/stylesheets/locomotive/components/misc/_modal.scss +0 -13
- data/app/assets/stylesheets/locomotive/components/misc/_notify.scss +0 -25
- data/app/assets/stylesheets/locomotive/components/sidebar/_base.scss +0 -58
- data/app/assets/stylesheets/locomotive/components/sidebar/_content_types.scss +0 -30
- data/app/assets/stylesheets/locomotive/components/sidebar/_link.scss +0 -36
- data/app/assets/stylesheets/locomotive/components/sidebar/_my_account.scss +0 -21
- data/app/assets/stylesheets/locomotive/components/sidebar/_pages_tree.scss +0 -108
- data/app/assets/stylesheets/locomotive/globals/_mixins.scss +0 -34
- data/app/assets/stylesheets/locomotive/layouts/_live_editing.scss +0 -33
- data/app/assets/stylesheets/locomotive/layouts/_main.scss +0 -62
- data/app/assets/stylesheets/locomotive/layouts/_not_logged_in.scss +0 -33
- data/app/assets/stylesheets/locomotive/layouts/_responsive.scss +0 -12
- data/app/views/locomotive/shared/_header.html.slim +0 -30
- data/app/views/locomotive/shared/_sidebar_without_site.html.slim +0 -5
- data/app/views/locomotive/shared/header/_account.html.slim +0 -4
- data/app/views/locomotive/shared/header/_account_menu.html.slim +0 -5
- data/app/views/locomotive/shared/header/_brand.html.slim +0 -3
- data/app/views/locomotive/shared/header/_site.html.slim +0 -8
- data/app/views/locomotive/shared/sidebar/_my_account.html.slim +0 -8
- data/vendor/assets/javascripts/locomotive/bootstrap-datetimepicker.js +0 -1395
- data/vendor/assets/javascripts/locomotive/moment.js +0 -2808
- data/vendor/assets/stylesheets/locomotive/bootstrap-datetimepicker.css +0 -235
@@ -48,7 +48,7 @@ class Locomotive.Views.Inputs.FileView extends Backbone.View
|
|
48
48
|
|
49
49
|
window.application_view.drawer_view.close()
|
50
50
|
|
51
|
-
url =
|
51
|
+
url = window.absolute_url(data.url)
|
52
52
|
|
53
53
|
window.remote_file_to_base64 url, (base64) =>
|
54
54
|
if base64
|
@@ -138,13 +138,6 @@ class Locomotive.Views.Inputs.FileView extends Backbone.View
|
|
138
138
|
reader.onload = (e) -> callback(e.target.result)
|
139
139
|
reader.readAsDataURL(file)
|
140
140
|
|
141
|
-
absolute_url: (url) ->
|
142
|
-
return url if url.indexOf('http') == 0
|
143
|
-
|
144
|
-
http = location.protocol
|
145
|
-
slashes = http.concat("//")
|
146
|
-
slashes.concat(window.location.host).concat(url)
|
147
|
-
|
148
141
|
showEl: (el) -> el.removeClass('hide')
|
149
142
|
hideEl: (el) -> el.addClass('hide')
|
150
143
|
|
@@ -0,0 +1,84 @@
|
|
1
|
+
Locomotive.Views.Inputs ||= {}
|
2
|
+
|
3
|
+
class Locomotive.Views.Inputs.ImageView extends Backbone.View
|
4
|
+
|
5
|
+
events:
|
6
|
+
'click *[data-action=delete]': 'mark_file_as_deleted'
|
7
|
+
'click *[data-action=undo]': 'undo'
|
8
|
+
'click a.file-browse': 'open_content_assets_drawer'
|
9
|
+
|
10
|
+
initialize: ->
|
11
|
+
_.bindAll(@, 'change_file')
|
12
|
+
@pubsub_token = PubSub.subscribe 'file_picker.select', @change_file
|
13
|
+
|
14
|
+
render: ->
|
15
|
+
@$spinner = @$('.file-wrapper .spinner')
|
16
|
+
|
17
|
+
@urls =
|
18
|
+
default: @$('.file-wrapper').data('default-url')
|
19
|
+
current: @$('.file-wrapper').data('url')
|
20
|
+
|
21
|
+
@initial_state = if @urls.current == '' then 'no_file' else 'existing_file'
|
22
|
+
@urls.current = @urls.default if _.isEmpty(@urls.current)
|
23
|
+
|
24
|
+
@resize_format = @$('.file-wrapper').data('resize')
|
25
|
+
@no_file_label = @$('.file-wrapper').data('no-file-label')
|
26
|
+
|
27
|
+
open_content_assets_drawer: (event) ->
|
28
|
+
event.stopPropagation() & event.preventDefault()
|
29
|
+
|
30
|
+
window.application_view.drawer_view.open(
|
31
|
+
$(event.target).attr('href'),
|
32
|
+
Locomotive.Views.ContentAssets.PickerView,
|
33
|
+
{ parent_view: @ })
|
34
|
+
|
35
|
+
mark_file_as_deleted: (event) ->
|
36
|
+
if @initial_state == 'existing_file'
|
37
|
+
@current_filename = @$('.file-name').html()
|
38
|
+
@update_ui false, true, @urls.default, @no_file_label
|
39
|
+
|
40
|
+
undo: (event) ->
|
41
|
+
@update_ui true, false, @urls.current, @current_filename || @no_file_label
|
42
|
+
|
43
|
+
change_file: (msg, data) ->
|
44
|
+
return unless data.parent_view.cid == @.cid
|
45
|
+
|
46
|
+
window.application_view.drawer_view.close()
|
47
|
+
|
48
|
+
url = window.absolute_url(data.url)
|
49
|
+
|
50
|
+
# update the textfield storing the URL of the image
|
51
|
+
@set_file_url(url)
|
52
|
+
|
53
|
+
@current_filename ||= @$('.file-name').html()
|
54
|
+
|
55
|
+
@$spinner.show() & @update_filename(data.filename)
|
56
|
+
|
57
|
+
# ask for a cropped/resized version of the image
|
58
|
+
window.resize_image url, @resize_format, (resized_image) =>
|
59
|
+
@update_ui true, true, resized_image, data.filename
|
60
|
+
@$spinner.hide()
|
61
|
+
|
62
|
+
update_ui: (with_file, undo_enabled, url, filename) ->
|
63
|
+
@set_file_url('') unless with_file
|
64
|
+
|
65
|
+
if undo_enabled
|
66
|
+
@$('*[data-action=delete]').hide()
|
67
|
+
@$('*[data-action=undo]').show()
|
68
|
+
else
|
69
|
+
@$('*[data-action=undo]').hide()
|
70
|
+
@$('*[data-action=delete]').show() unless @initial_state == 'no_file'
|
71
|
+
|
72
|
+
@$('.file-image img').attr('src', url)
|
73
|
+
|
74
|
+
@update_filename(filename)
|
75
|
+
|
76
|
+
update_filename: (name) ->
|
77
|
+
@$('.file-name').html(name) unless _.isEmpty(name)
|
78
|
+
|
79
|
+
set_file_url: (url) ->
|
80
|
+
@$('.file input[type=text]').val(url)
|
81
|
+
|
82
|
+
remove: ->
|
83
|
+
super
|
84
|
+
PubSub.unsubscribe(@pubsub_token) if @pubsub_token?
|
@@ -9,7 +9,8 @@ class Locomotive.Views.Inputs.Rte.FileView extends Backbone.View
|
|
9
9
|
picker: false
|
10
10
|
|
11
11
|
container:
|
12
|
-
dataset:
|
12
|
+
dataset:
|
13
|
+
showdialogonselection: true
|
13
14
|
|
14
15
|
initialize: ->
|
15
16
|
_.bindAll(@, 'change_image', 'insert_file', 'hide')
|
@@ -28,8 +29,6 @@ class Locomotive.Views.Inputs.Rte.FileView extends Backbone.View
|
|
28
29
|
command = @editor.toolbar.commandMapping['insertFile:null']
|
29
30
|
command.dialog = @
|
30
31
|
|
31
|
-
# console.log "[insertFileView] attach_editor"
|
32
|
-
|
33
32
|
create_popover: ->
|
34
33
|
@$popover.show()
|
35
34
|
@$link.popover
|
@@ -106,6 +105,9 @@ class Locomotive.Views.Inputs.Rte.FileView extends Backbone.View
|
|
106
105
|
@$link.popover('show')
|
107
106
|
@opened.popover = true
|
108
107
|
|
108
|
+
update: (state) ->
|
109
|
+
# do nothing
|
110
|
+
|
109
111
|
hide: ->
|
110
112
|
# console.log "[insertFileView] hide, opened =#{@opened}"
|
111
113
|
if @opened.picker
|
@@ -0,0 +1,14 @@
|
|
1
|
+
#= require ./file_view
|
2
|
+
|
3
|
+
Locomotive.Views.Inputs.Rte ||= {}
|
4
|
+
|
5
|
+
class Locomotive.Views.Inputs.Rte.ImageView extends Locomotive.Views.Inputs.Rte.FileView
|
6
|
+
|
7
|
+
initialize: ->
|
8
|
+
super()
|
9
|
+
@$link = @$('a[data-wysihtml5-command=insertImage]')
|
10
|
+
@$popover = @$link.next('.image-dialog-content')
|
11
|
+
|
12
|
+
attach_editor: ->
|
13
|
+
command = @editor.toolbar.commandMapping['insertImage:null']
|
14
|
+
command.dialog = @
|
@@ -6,7 +6,7 @@ class Locomotive.Views.Inputs.Rte.LinkView extends Backbone.View
|
|
6
6
|
|
7
7
|
container:
|
8
8
|
dataset:
|
9
|
-
showdialogonselection:
|
9
|
+
showdialogonselection: false
|
10
10
|
|
11
11
|
initialize: ->
|
12
12
|
_.bindAll(@, 'apply', 'show', 'hide')
|
@@ -15,6 +15,8 @@ class Locomotive.Views.Inputs.Rte.LinkView extends Backbone.View
|
|
15
15
|
@editor = @options.editor
|
16
16
|
@$content = @$link.next('.link-dialog-content')
|
17
17
|
|
18
|
+
@$content.find('.input.select select:not(.disable-select2)').data('select2').$dropdown.addClass('rte-select2-dropdown')
|
19
|
+
|
18
20
|
render: ->
|
19
21
|
@attach_editor()
|
20
22
|
@create_popover()
|
@@ -23,8 +25,8 @@ class Locomotive.Views.Inputs.Rte.LinkView extends Backbone.View
|
|
23
25
|
create_popover: ->
|
24
26
|
@$content.show()
|
25
27
|
@$link.popover
|
26
|
-
container: '.
|
27
|
-
placement: '
|
28
|
+
container: '.editable-elements'
|
29
|
+
placement: 'right'
|
28
30
|
content: @$content
|
29
31
|
html: true
|
30
32
|
trigger: 'manual'
|
@@ -75,7 +77,11 @@ class Locomotive.Views.Inputs.Rte.LinkView extends Backbone.View
|
|
75
77
|
|
76
78
|
@isOpen = true
|
77
79
|
|
80
|
+
update: (state) ->
|
81
|
+
# do nothing
|
82
|
+
|
78
83
|
hide: ->
|
84
|
+
@_input_el('target', 'select').select2('close')
|
79
85
|
@$link.popover('hide')
|
80
86
|
@isOpen = false
|
81
87
|
|
@@ -13,6 +13,8 @@ class Locomotive.Views.Inputs.Rte.TableView extends Backbone.View
|
|
13
13
|
@$content = @$link.next('.table-dialog-content')
|
14
14
|
|
15
15
|
render: ->
|
16
|
+
return if @$link.size() == 0
|
17
|
+
|
16
18
|
@create_popover()
|
17
19
|
|
18
20
|
@attach_events()
|
@@ -21,8 +23,8 @@ class Locomotive.Views.Inputs.Rte.TableView extends Backbone.View
|
|
21
23
|
create_popover: ->
|
22
24
|
@$content.show()
|
23
25
|
@$link.popover
|
24
|
-
container: '.
|
25
|
-
placement: '
|
26
|
+
container: '.editable-elements'
|
27
|
+
placement: 'right'
|
26
28
|
content: @$content
|
27
29
|
html: true
|
28
30
|
trigger: 'manual'
|
@@ -60,6 +62,9 @@ class Locomotive.Views.Inputs.Rte.TableView extends Backbone.View
|
|
60
62
|
|
61
63
|
@$content.parents('form')[0].reset()
|
62
64
|
|
65
|
+
update: (state) ->
|
66
|
+
# do nothing
|
67
|
+
|
63
68
|
hide: ->
|
64
69
|
# console.log "[TableView] hide"
|
65
70
|
@$link.popover('hide')
|
@@ -9,7 +9,7 @@ class Locomotive.Views.Inputs.RteView extends Backbone.View
|
|
9
9
|
'highlight textarea': 'highlight'
|
10
10
|
|
11
11
|
initialize: ->
|
12
|
-
_.bindAll(@, '
|
12
|
+
_.bindAll(@, 'register_editor_events', 'on_content_change', 'resize')
|
13
13
|
|
14
14
|
@tokens = [
|
15
15
|
PubSub.subscribe 'application_view.resize', @resize
|
@@ -25,13 +25,12 @@ class Locomotive.Views.Inputs.RteView extends Backbone.View
|
|
25
25
|
|
26
26
|
@editor = new wysihtml5.Editor $textarea.attr('id'),
|
27
27
|
toolbar: "wysihtml5-toolbar-#{$textarea.attr('id')}"
|
28
|
-
useLineBreaks:
|
28
|
+
useLineBreaks: $textarea.data('inline')
|
29
29
|
parserRules: wysihtml5ParserRules
|
30
30
|
stylesheets: ['<%= stylesheet_path("locomotive/wysihtml5_editor") %>']
|
31
|
+
showToolbarDialogsOnSelection: false
|
31
32
|
|
32
|
-
@editor.on 'load', @
|
33
|
-
@editor.on 'change', @on_content_change
|
34
|
-
@editor.on 'aftercommand:composer', @on_content_change
|
33
|
+
@editor.on 'load', @register_editor_events
|
35
34
|
|
36
35
|
render_views: ->
|
37
36
|
that = @
|
@@ -40,6 +39,7 @@ class Locomotive.Views.Inputs.RteView extends Backbone.View
|
|
40
39
|
that.views = [
|
41
40
|
that.build_and_render_view(Locomotive.Views.Inputs.Rte.LinkView),
|
42
41
|
that.build_and_render_view(Locomotive.Views.Inputs.Rte.FileView),
|
42
|
+
that.build_and_render_view(Locomotive.Views.Inputs.Rte.ImageView),
|
43
43
|
that.build_and_render_view(Locomotive.Views.Inputs.Rte.TableView),
|
44
44
|
that.build_and_render_view(Locomotive.Views.Inputs.Rte.EditTableView)
|
45
45
|
]
|
@@ -74,11 +74,24 @@ class Locomotive.Views.Inputs.RteView extends Backbone.View
|
|
74
74
|
view.render()
|
75
75
|
view
|
76
76
|
|
77
|
-
|
77
|
+
register_editor_events: ->
|
78
|
+
# keyup events
|
78
79
|
@$('.wysihtml5-sandbox').contents().find('body').on 'keyup', =>
|
79
80
|
@on_content_change()
|
80
81
|
|
82
|
+
# double click (links)
|
83
|
+
@$('.wysihtml5-sandbox').contents().find('body').on 'dblclick', =>
|
84
|
+
selectedNode = @editor.composer.selection.getSelectedNode()
|
85
|
+
link = wysihtml5.dom.getParentElement(selectedNode, { query: 'a' }, 4)
|
86
|
+
|
87
|
+
if link
|
88
|
+
@editor.toolbar.commandMapping['createLink:null'].link.click()
|
89
|
+
|
90
|
+
@editor.on 'change', @on_content_change
|
91
|
+
@editor.on 'aftercommand:composer', @on_content_change
|
92
|
+
|
81
93
|
on_content_change: ->
|
94
|
+
console.log 'modified'
|
82
95
|
PubSub.publish 'inputs.text_changed',
|
83
96
|
view: @
|
84
97
|
content: @editor.getValue()
|
@@ -1,35 +1,25 @@
|
|
1
|
+
#= require ./image_view
|
2
|
+
|
1
3
|
Locomotive.Views.Inputs ||= {}
|
2
4
|
|
3
|
-
class Locomotive.Views.Inputs.SimpleImageView extends
|
5
|
+
class Locomotive.Views.Inputs.SimpleImageView extends Locomotive.Views.Inputs.ImageView
|
4
6
|
|
5
|
-
events:
|
6
|
-
'
|
7
|
-
'click *[data-action=undo]': 'undo'
|
8
|
-
'change input[type=file]': 'change_file'
|
7
|
+
events: _.extend {}, Locomotive.Views.Inputs.ImageView.prototype.events,
|
8
|
+
'change input[type=file]': 'change_file'
|
9
9
|
|
10
10
|
render: ->
|
11
|
-
|
11
|
+
super
|
12
|
+
|
12
13
|
@$fields =
|
13
14
|
file: @$('input[type=file]')
|
14
15
|
remove: @$('input[type=hidden].remove')
|
15
16
|
|
16
|
-
@urls =
|
17
|
-
default: @$('.file-wrapper').data('default-url')
|
18
|
-
current: @$('.file-wrapper').data('url')
|
19
|
-
|
20
|
-
@urls.current = @urls.default if _.isEmpty(@urls.current)
|
21
|
-
|
22
|
-
@resize_format = @$('.file-wrapper').data('resize')
|
23
|
-
@no_file_label = @$('.file-wrapper').data('no-file-label')
|
24
|
-
@initial_state = if @urls.current? then 'existing_file' else 'no_file'
|
25
|
-
|
26
|
-
mark_file_as_deleted: (event) ->
|
27
|
-
if @initial_state == 'existing_file'
|
28
|
-
@current_filename = @$('.file-name').html()
|
29
|
-
@update_ui false, true, @urls.default, @no_file_label
|
30
|
-
|
31
17
|
undo: (event) ->
|
32
|
-
|
18
|
+
# reset file input
|
19
|
+
@$fields.file.wrap('<form>').parent('form').trigger('reset')
|
20
|
+
@$fields.file.unwrap()
|
21
|
+
|
22
|
+
super
|
33
23
|
|
34
24
|
change_file: (event) ->
|
35
25
|
file = if event.target.files then event.target.files[0] else null
|
@@ -46,26 +36,13 @@ class Locomotive.Views.Inputs.SimpleImageView extends Backbone.View
|
|
46
36
|
@update_ui true, true, resized_image, file.name
|
47
37
|
@$spinner.hide()
|
48
38
|
|
49
|
-
image_to_base_64: (file, callback) ->
|
50
|
-
reader = new FileReader()
|
51
|
-
reader.onload = (e) -> callback(e.target.result)
|
52
|
-
reader.readAsDataURL(file)
|
53
|
-
|
54
39
|
update_ui: (with_file, undo_enabled, url, filename) ->
|
55
40
|
value = if with_file then '0' else '1'
|
56
41
|
@$fields.remove.val(value)
|
57
42
|
|
58
|
-
|
59
|
-
@$('*[data-action=delete]').hide()
|
60
|
-
@$('*[data-action=undo]').show()
|
61
|
-
else
|
62
|
-
@$('*[data-action=undo]').hide()
|
63
|
-
@$('*[data-action=delete]').show()
|
64
|
-
|
65
|
-
@$('.file-image img').attr('src', url)
|
66
|
-
|
67
|
-
@update_filename(filename)
|
68
|
-
|
69
|
-
update_filename: (name) ->
|
70
|
-
@$('.file-name').html(name) unless _.isEmpty(name)
|
43
|
+
super
|
71
44
|
|
45
|
+
image_to_base_64: (file, callback) ->
|
46
|
+
reader = new FileReader()
|
47
|
+
reader.onload = (e) -> callback(e.target.result)
|
48
|
+
reader.readAsDataURL(file)
|
@@ -2,7 +2,7 @@ Locomotive.Views.Shared ||= {}
|
|
2
2
|
|
3
3
|
class Locomotive.Views.Shared.DrawerView extends Backbone.View
|
4
4
|
|
5
|
-
el: '
|
5
|
+
el: '.content-main > .drawer'
|
6
6
|
|
7
7
|
delays:
|
8
8
|
fade: 50 # see the _transitions.css.scss file
|
@@ -16,7 +16,7 @@ class Locomotive.Views.Shared.DrawerView extends Backbone.View
|
|
16
16
|
super
|
17
17
|
|
18
18
|
open: (url, view_klass, options = {}) ->
|
19
|
-
console.log "[DrawerView] open, stack(#{@stack.length}) opened = #{$(
|
19
|
+
console.log "[DrawerView] open, stack(#{@stack.length}) opened = #{$(@el).hasClass('drawer-open')}, #{url}"
|
20
20
|
entry = { url: url, view_klass: view_klass, options: options }
|
21
21
|
@push(entry)
|
22
22
|
|
@@ -64,7 +64,8 @@ class Locomotive.Views.Shared.DrawerView extends Backbone.View
|
|
64
64
|
|
65
65
|
hide: (entry, callback) ->
|
66
66
|
if @stack.length == 0
|
67
|
-
$('body').removeClass('drawer-opened')
|
67
|
+
# $('body').removeClass('drawer-opened')
|
68
|
+
$(@el).removeClass('drawer-open')
|
68
69
|
else
|
69
70
|
entry.view.$el.addClass('fadeout') if entry?
|
70
71
|
|
@@ -84,9 +85,9 @@ class Locomotive.Views.Shared.DrawerView extends Backbone.View
|
|
84
85
|
|
85
86
|
container: (preserve) ->
|
86
87
|
if preserve? && preserve
|
87
|
-
@$('> .inner').find('> div')
|
88
|
+
@$('> .content-inner').find('> div')
|
88
89
|
else
|
89
|
-
@$('> .inner').html('<div></div>').find('> div')
|
90
|
+
@$('> .content-inner').html('<div></div>').find('> div')
|
90
91
|
|
91
92
|
_show: (entry, container) ->
|
92
93
|
_klass = entry.view_klass
|
@@ -95,4 +96,5 @@ class Locomotive.Views.Shared.DrawerView extends Backbone.View
|
|
95
96
|
entry.view = new _klass(attributes)
|
96
97
|
entry.view.render()
|
97
98
|
|
98
|
-
$('body').addClass('drawer-opened')
|
99
|
+
# $('body').addClass('drawer-opened')
|
100
|
+
$(@el).addClass('drawer-open')
|
@@ -7,17 +7,21 @@ class Locomotive.Views.Shared.FormView extends Backbone.View
|
|
7
7
|
namespace: null
|
8
8
|
|
9
9
|
events:
|
10
|
-
'submit form':
|
11
|
-
'ajax:aborted:required':
|
10
|
+
'submit form': 'save'
|
11
|
+
'ajax:aborted:required': 'show_empty_form_message'
|
12
|
+
'keyup input, textarea': 'modifying'
|
12
13
|
|
13
14
|
render: ->
|
14
15
|
@inputs = []
|
15
16
|
|
16
17
|
@display_active_nav()
|
17
18
|
|
19
|
+
@register_unsaved_content()
|
20
|
+
|
18
21
|
@enable_hover()
|
19
22
|
|
20
23
|
@enable_simple_image_inputs()
|
24
|
+
@enable_image_inputs()
|
21
25
|
@enable_file_inputs()
|
22
26
|
@enable_array_inputs()
|
23
27
|
@enable_toggle_inputs()
|
@@ -33,6 +37,14 @@ class Locomotive.Views.Shared.FormView extends Backbone.View
|
|
33
37
|
|
34
38
|
return @
|
35
39
|
|
40
|
+
register_unsaved_content: ->
|
41
|
+
# reset the unsaved content since this is a new form
|
42
|
+
window.unsaved_content = false
|
43
|
+
|
44
|
+
@tokens = [
|
45
|
+
PubSub.subscribe 'inputs.text_changed', => @modifying()
|
46
|
+
]
|
47
|
+
|
36
48
|
display_active_nav: ->
|
37
49
|
url = document.location.toString()
|
38
50
|
if url.match('#')
|
@@ -51,6 +63,7 @@ class Locomotive.Views.Shared.FormView extends Backbone.View
|
|
51
63
|
@$('form button[type=submit], form input[type=submit]').button('reset')
|
52
64
|
|
53
65
|
save: (event) ->
|
66
|
+
window.unsaved_content = false
|
54
67
|
@change_state()
|
55
68
|
@record_active_tab()
|
56
69
|
|
@@ -74,6 +87,13 @@ class Locomotive.Views.Shared.FormView extends Backbone.View
|
|
74
87
|
view.render()
|
75
88
|
self.inputs.push(view)
|
76
89
|
|
90
|
+
enable_image_inputs: ->
|
91
|
+
self = @
|
92
|
+
@$('.input.image').each ->
|
93
|
+
view = new Locomotive.Views.Inputs.ImageView(el: $(@))
|
94
|
+
view.render()
|
95
|
+
self.inputs.push(view)
|
96
|
+
|
77
97
|
enable_file_inputs: ->
|
78
98
|
self = @
|
79
99
|
@$('.input.file').each ->
|
@@ -99,17 +119,15 @@ class Locomotive.Views.Shared.FormView extends Backbone.View
|
|
99
119
|
enable_date_inputs: ->
|
100
120
|
@$('.input.date input[type=text]').each ->
|
101
121
|
$(@).datetimepicker
|
102
|
-
|
103
|
-
|
104
|
-
widgetParent: '.main'
|
122
|
+
locale: window.content_locale
|
123
|
+
widgetParent: $(this).parents('.form-wrapper')
|
105
124
|
format: $(@).data('format')
|
106
125
|
|
107
126
|
enable_datetime_inputs: ->
|
108
127
|
@$('.input.date-time input[type=text]').each ->
|
109
128
|
$(@).datetimepicker
|
110
|
-
|
111
|
-
|
112
|
-
widgetParent: '.main'
|
129
|
+
locale: window.content_locale
|
130
|
+
widgetParent: $(this).parents('.form-wrapper')
|
113
131
|
use24hours: true
|
114
132
|
useseconds: false
|
115
133
|
format: $(@).data('format')
|
@@ -151,8 +169,12 @@ class Locomotive.Views.Shared.FormView extends Backbone.View
|
|
151
169
|
view.render()
|
152
170
|
self.inputs.push(view)
|
153
171
|
|
172
|
+
modifying: (event) ->
|
173
|
+
window.unsaved_content = true
|
174
|
+
|
154
175
|
remove: ->
|
155
176
|
_.each @inputs, (view) -> view.remove()
|
177
|
+
_.each @tokens, (token) -> PubSub.unsubscribe(token)
|
156
178
|
|
157
179
|
@$('.input.select select:not(.disable-select2)').select2('destroy')
|
158
180
|
@$('.input.tags input[type=text]').tagsinput('destroy')
|