push_type_admin 0.1.1 → 0.2.0.beta2
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/app/assets/javascripts/push_type/admin.js.coffee +6 -20
- data/app/assets/javascripts/push_type/admin_assets.js.coffee.erb +1 -0
- data/app/assets/javascripts/push_type/assets.js.coffee +2 -10
- data/app/assets/stylesheets/push_type/admin.scss +1 -6
- data/app/assets/stylesheets/push_type/admin_assets.scss.erb +1 -0
- data/app/assets/stylesheets/push_type/tagsinput.scss +51 -0
- data/app/controllers/push_type/assets_controller.rb +11 -5
- data/app/controllers/push_type/nodes_controller.rb +2 -2
- data/app/controllers/push_type/users_controller.rb +1 -1
- data/app/helpers/push_type/assets_helper.rb +20 -7
- data/app/helpers/push_type/nodes_helper.rb +15 -0
- data/app/views/layouts/push_type/admin.html.erb +2 -2
- data/app/views/push_type/assets/_form.html.haml +2 -2
- data/app/views/push_type/assets/index.html.haml +2 -2
- data/app/views/push_type/fields/_tags.html.haml +3 -0
- data/app/views/push_type/nodes/_form_fields.html.haml +1 -1
- data/app/views/push_type/nodes/_new_node_button.html.haml +10 -10
- data/app/views/push_type/nodes/index.html.haml +4 -3
- data/lib/push_type/admin/assets.rb +19 -0
- data/lib/push_type/admin/engine.rb +10 -1
- data/lib/push_type/admin.rb +1 -2
- data/test/controllers/push_type/assets_controller_test.rb +21 -0
- data/test/dummy/app/assets/javascripts/application.js +1 -1
- data/test/dummy/app/assets/stylesheets/application.css +1 -1
- data/test/dummy/bin/rails +1 -1
- data/test/dummy/bin/setup +29 -0
- data/test/dummy/config/environments/development.rb +4 -0
- data/test/dummy/config/environments/production.rb +13 -12
- data/test/dummy/config/environments/test.rb +5 -2
- data/test/dummy/config/initializers/assets.rb +3 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +1 -1
- data/test/dummy/config/initializers/push_type.rb +11 -1
- data/test/dummy/config/secrets.yml +2 -2
- data/test/dummy/config.ru +1 -1
- data/test/dummy/db/migrate/{20150108182226_create_push_type_users.push_type.rb → 20150208150316_create_push_type_users.push_type.rb} +1 -1
- data/test/dummy/db/migrate/{20150108182227_create_push_type_nodes.push_type.rb → 20150208150317_create_push_type_nodes.push_type.rb} +1 -1
- data/test/dummy/db/migrate/{20150108182228_create_push_type_node_hierarchies.push_type.rb → 20150208150318_create_push_type_node_hierarchies.push_type.rb} +0 -0
- data/test/dummy/db/migrate/{20150108182229_create_push_type_assets.push_type.rb → 20150208150319_create_push_type_assets.push_type.rb} +0 -0
- data/test/dummy/db/schema.rb +7 -7
- data/test/dummy/log/test.log +2577 -1693
- data/test/dummy/tmp/cache/assets/test/sass/2df752541ff0a319141a1cb83ca971d2ffd2d050/admin.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/2df752541ff0a319141a1cb83ca971d2ffd2d050/admin_assets.scss.erbc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/{4192f8fb8ca1d6fcdfe4b8f89f72b4ba9c4efa8f → 2df752541ff0a319141a1cb83ca971d2ffd2d050}/foundation_and_overrides.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/2df752541ff0a319141a1cb83ca971d2ffd2d050/tagsinput.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/356cbb24ba380fa6c5255d546317e2ce23ea8cd6/_functions.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/b51672fface3a4ec5947e1db3f21f77baa80aed8/_accordion.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/b51672fface3a4ec5947e1db3f21f77baa80aed8/_alert-boxes.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/b51672fface3a4ec5947e1db3f21f77baa80aed8/_block-grid.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/b51672fface3a4ec5947e1db3f21f77baa80aed8/_breadcrumbs.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/b51672fface3a4ec5947e1db3f21f77baa80aed8/_button-groups.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/b51672fface3a4ec5947e1db3f21f77baa80aed8/_buttons.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/b51672fface3a4ec5947e1db3f21f77baa80aed8/_clearing.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/b51672fface3a4ec5947e1db3f21f77baa80aed8/_dropdown-buttons.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/b51672fface3a4ec5947e1db3f21f77baa80aed8/_dropdown.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/b51672fface3a4ec5947e1db3f21f77baa80aed8/_flex-video.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/b51672fface3a4ec5947e1db3f21f77baa80aed8/_forms.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/b51672fface3a4ec5947e1db3f21f77baa80aed8/_global.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/b51672fface3a4ec5947e1db3f21f77baa80aed8/_grid.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/b51672fface3a4ec5947e1db3f21f77baa80aed8/_icon-bar.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/b51672fface3a4ec5947e1db3f21f77baa80aed8/_inline-lists.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/b51672fface3a4ec5947e1db3f21f77baa80aed8/_joyride.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/b51672fface3a4ec5947e1db3f21f77baa80aed8/_keystrokes.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/b51672fface3a4ec5947e1db3f21f77baa80aed8/_labels.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/b51672fface3a4ec5947e1db3f21f77baa80aed8/_magellan.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/b51672fface3a4ec5947e1db3f21f77baa80aed8/_offcanvas.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/b51672fface3a4ec5947e1db3f21f77baa80aed8/_orbit.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/b51672fface3a4ec5947e1db3f21f77baa80aed8/_pagination.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/b51672fface3a4ec5947e1db3f21f77baa80aed8/_panels.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/b51672fface3a4ec5947e1db3f21f77baa80aed8/_pricing-tables.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/b51672fface3a4ec5947e1db3f21f77baa80aed8/_progress-bars.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/b51672fface3a4ec5947e1db3f21f77baa80aed8/_range-slider.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/b51672fface3a4ec5947e1db3f21f77baa80aed8/_reveal.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/b51672fface3a4ec5947e1db3f21f77baa80aed8/_side-nav.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/b51672fface3a4ec5947e1db3f21f77baa80aed8/_split-buttons.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/b51672fface3a4ec5947e1db3f21f77baa80aed8/_sub-nav.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/b51672fface3a4ec5947e1db3f21f77baa80aed8/_switches.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/b51672fface3a4ec5947e1db3f21f77baa80aed8/_tables.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/b51672fface3a4ec5947e1db3f21f77baa80aed8/_tabs.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/b51672fface3a4ec5947e1db3f21f77baa80aed8/_thumbs.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/b51672fface3a4ec5947e1db3f21f77baa80aed8/_tooltips.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/b51672fface3a4ec5947e1db3f21f77baa80aed8/_top-bar.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/b51672fface3a4ec5947e1db3f21f77baa80aed8/_type.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/b51672fface3a4ec5947e1db3f21f77baa80aed8/_visibility.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/d416499186bc6a8ba276a69cc9d9fffa030e66bc/foundation-icons.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/deb1394852fa60b8a5f9d5ea21f0c1f44e511075/foundation.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/00ae61e049df7e5570b8c57835868cfe +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/042e6dec69dbf88f86f5e8c360b52bcb +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/090f2c9bc57f8e73105a98a800051354 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/0a01f1c3288f982772ed595695292767 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/0b83e9e8467b82a0991df336697846e0 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/0e01ae9de0f3914c8317853aedd9ace4 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/1505f3ddd93d7be2405c81d84a45cbfb +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/161b66dc0b76d65e577b5465f86cb767 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/1da46bb361bbd7b80dc66e5737dbf2a7 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/226a629ec094e8ad208f2c273121699a +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/23c10c485dbe7ea46614928874120ecf +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/2599cde7c63354f12928a204c42fe68b +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/25da091131e25acf0f55a6528a94f309 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/2821176477eee8de7b9581f0564d0947 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/2a00ce050c10f75691b820576ec3aefd +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/2c745da65bdbc8ebb88b6bce026972b9 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/3508023b6222e6b0876c773e38ec700d +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/488d63b20534d2642d48b86b5a267a3b +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/4fc498f23125a9811434c6d5d5b43b64 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/508e9ca93a5c6a60e79e3496654497cf +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/55d7985953b175268932d2f7e50f64e0 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/67d67f783372c9b99e2ff84c12d38dfb +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/6d21cd96abbcb6506d99fb93e8a11196 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/7326e3e660754d56c46671c7347c5e97 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/7879ec7699a19e017377e1b57702e3e5 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/7925f8f38f5165ad9d36a7d73dd00c06 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/7ea9d575b03f8effb678d4dcedf3d079 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/7f0b91f5fa71c52d3cbe1f108fb7c942 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/81ba6a364949bd4ffe2732ae5745012d +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/81e2498e0e1457dd93b47780ae28fc03 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/81ebadcc1f5568d97bfe59f0929ab498 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/897553ff72f546645e24e94feec75255 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/8a34d99aaa243ebb4e60f483a5b5a817 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/8d531fdb806de0724337e0b80e253914 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/8da458b8df4bfbd9fb0eed86c36442d4 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/8df98e9b5189ffce4cf77a33533416a6 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/91e13d81afe9041372ad8f79ee9159f4 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/92716c1d1cdd92efe79de35a47956fc9 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/959fa77a7302a3002d5fb1394575117b +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/969e05674f51d3b5b500e605e0292573 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/987bf17b1a3915d5c6d95ebda01e8f49 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/9aef3ae1f0c62b895d86ab60901dd450 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/a010781c05d478892856f75c751d6ab4 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/a590260912e62280bb115dd52a953b18 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/a6453a78eb0c813a0b69a12cb7c4ab2c +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/a721a930039ed66bd3f092ab1e9c8de6 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/a970f64c67051f35069f45d8dad113a5 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/a9b8decaa2942e8913458c9f35da2693 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/aaf7959dea629271d23756ab876bc035 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/ac1b1f0c521a6acb5833209d7b18d888 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/ada55ab3ebb32ffd74145d341fbbcb06 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/b24f2d6f62512f4cb11c6a2e44bf90e4 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/b3d0193a1439465426a4d051a161291d +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/b657c356e24f45a8b92d4f4da9ff361d +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/b76beafa9aef0c7a18bf63fe612ecd17 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/b771c2de3967bda011cf04e0979497cf +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/b78741de2e56d8ac6629bb0dbf1d5c20 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/ba87909b8d71ddaedd84c3f6c00dce72 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/bbfc8dec2c2cc07cf4c1708597316a77 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/bc732efa6ca399217b023bd1e04f0404 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/bd5b45287cfdac63ed7199b7982da02f +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/bee4e1605077e29abd380b05b645cbb4 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/c206fbd33f49ab785c6ddf4bcffd3b93 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/c2b59fd99edc4b53754f7cb4e160452f +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/cb761fc7bfc4c192abf5c946f863ab1e +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/cf51890ac703ed5a5d704515a4721815 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/d2215e57429ecae68a054210e665d787 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/d30a320df486e076298c602d428f3145 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/d3921fc37cc437f0933c4dee9d089fd8 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/d8daf6c8e5df881485c0e1139a275f6d +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/d9e5382620928a6b4a8cd70bdac10aa3 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/df90022afc0d52f16bc498be20a5967d +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/e1c3eff1f3886da4c71a854d42077d10 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/e28b8ab6a5b3ff792f45d5a6b7d806bc +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/e540a9dc1aa001f8c4cba7a6b00f69d2 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/e6e78e14e8c962d31e6148ca56230af9 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/edaf2543a96ee921c30a071b3a73036f +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/edd24c59de6c00e4e68dbbdf2775984a +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/eeb045e353d91335ea6ec8a8869c322f +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/f100237ea34e5360da23f95cca21c340 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/{505162da4e90217e5f52f5e8f1922a0d → f4b5b11e7111666c7eac22f943308692} +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/f5fcab9d313889bf6d14a05040aff5bc +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/f66bf7665e75e4d537977c71a5e39a4e +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/f7cf86568d1c692cb0a565614f282572 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/f96cec87308c4d1efa7993c38b770ba3 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/fa7e1f9a13f606e2603a17f8e00aa32a +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/{fcce52ee43ecad8cb3f18fc8f13a66b7 → fada546ecac912f7782a46cf40ec29af} +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/fd06309bc284d80f9c2a30f32ed8df14 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/fd5e59fed8301f86b74e551534fce2b2 +0 -0
- data/test/helpers/push_type/assets_helper_test.rb +30 -0
- data/test/helpers/push_type/nodes_helper_test.rb +29 -0
- data/test/lib/push_type/admin/assets_test.rb +29 -0
- data/test/test_helper.rb +2 -0
- data/vendor/assets/javascripts/bootstrap-tagsinput.js +617 -0
- metadata +153 -201
- data/app/assets/javascripts/push_type/asset_pipeline.js.coffee.erb +0 -17
- data/app/assets/stylesheets/push_type/froala_theme.scss +0 -373
- data/config/initializers/kaminari_config.rb +0 -10
- data/test/dummy/tmp/cache/assets/test/sass/4192f8fb8ca1d6fcdfe4b8f89f72b4ba9c4efa8f/admin.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/4192f8fb8ca1d6fcdfe4b8f89f72b4ba9c4efa8f/froala_theme.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/53cc07db53069364c4116d03ae9493d85566d502/_functions.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_accordion.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_alert-boxes.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_block-grid.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_breadcrumbs.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_button-groups.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_buttons.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_clearing.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_dropdown-buttons.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_dropdown.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_flex-video.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_forms.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_global.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_grid.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_icon-bar.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_inline-lists.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_joyride.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_keystrokes.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_labels.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_magellan.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_offcanvas.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_orbit.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_pagination.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_panels.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_pricing-tables.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_progress-bars.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_range-slider.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_reveal.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_side-nav.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_split-buttons.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_sub-nav.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_switches.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_tables.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_tabs.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_thumbs.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_tooltips.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_top-bar.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_type.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/669496e8548de1a6ba1641898c1b30c67ab8fac2/_visibility.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/68968d876746de0885a03aacd18ec354e154ffed/foundation-icons.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sass/805c0b657f4b79d174c13bc42a4759a57d5a5484/foundation.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/0448802b256c25a379824969bf01241e +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/0a170bcd46595a69e9181ea5eb52ec6f +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/1c63cb75109171c505bf1b6b3f26513b +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/22578effd3d5017b533efd147a1b4407 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/2479bd5cbccdeac3ab4df62c2c12e8d3 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/25b238c2ec907a80d53955a0bb81073c +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/2d1bc2b9dc5ee0ed5635abc31fb1bc88 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/31c57ad31a65f9a951c6d7268cdedae5 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/3d4f40cd6363f1841fa7c17dcbd281ce +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/47dcfb84d9a092ad939f512e1d3db43c +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/55d58e1add1ca367e262464e83ad82cf +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/59992ed1702654aa166f8572af80a301 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/5ef293117afc54aeaa16d32cbd16dd38 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/600202d00479f08d2e69019e34d12e65 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/75c5663a92b2003b794d5f5d184fde44 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/7b63c613f1053bde6004342003178a0e +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/7d07558d12b9bd9b9dfa778344bab4ac +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/805c63977d339feb2ea7b61e1141a32f +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/853c1095ab6e7f4eba1f3406f0f3bba6 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/8f8914547a4f22638b676f968bc18d68 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/8feb3d758b7824f15b301f9dc024c3f6 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/932f699ead87a4b9910d47334ed14d60 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/9896c5d1de4e8661c3b424aec81f7e8c +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/a427bb8cde4beaf2d4483ad3554d2297 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/a96494099d559bfd8cb5257e21cb196c +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/aaa6dc2bd59e21dd14b0c86a308a1d1f +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/badf6e6ab7c3d1cc2b180e5883005a40 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/c190d0bdd188c43629f35b9f463b86af +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/c42a7aac68d827f88bcc25a41cdb5591 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/c5ef052e357af6829f6c522a38916fc7 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/c988fd2c5c9497ccef54f79a9e444ac6 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/cd078b38e48bcd1e121d801b46b2616f +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/d1cebb5323d93da406dfb152a0c55568 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/e568172da8ab8581f83f98dad0a73d29 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/e5e4aa0b0cc633e1e2e25614fd922803 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/f02093872b151ddb0fd1074fe83ff846 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/f7013d94f76b09bce94f78e2453f7eae +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/f92aeb6f9539612517848945ee03aff8 +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b3283ed56c6b6c2cb1e116645d4390e7e1895c37
|
|
4
|
+
data.tar.gz: aeb9a25918ea7524614dea92a501e2aac8eda409
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7a5cae1c9126f84edbd704ef0abd4595ddae5e2708b3b09568b0326ac90e76a0b21c1723880720294153447a4f0dafd31b8048a4aa74aa56c3f335205e6ed239
|
|
7
|
+
data.tar.gz: 21c9f2d6e9978ce66cd824199993490f178125023e4aab31e4ab1a7767317539faf4233ea68ab405b69e769efdefafe95dc65f799a5cf61fd053c58cce584747
|
|
@@ -16,15 +16,13 @@
|
|
|
16
16
|
#= require foundation
|
|
17
17
|
#= require confirm_with_reveal
|
|
18
18
|
#= require angular
|
|
19
|
-
#= require froala_editor.min
|
|
20
|
-
#= require plugins/lists.min
|
|
21
|
-
#= require plugins/file_upload.min
|
|
22
|
-
#= require plugins/video.min
|
|
23
19
|
#= require jquery.sticky
|
|
24
20
|
#= require jquery.sortable
|
|
25
21
|
#= require jquery.filedrop
|
|
26
22
|
#= require moment
|
|
27
23
|
#= require_self
|
|
24
|
+
#= require bootstrap-tagsinput
|
|
25
|
+
#= stub push_type/admin_assets
|
|
28
26
|
#= require_tree .
|
|
29
27
|
|
|
30
28
|
Turbolinks.enableProgressBar()
|
|
@@ -54,21 +52,9 @@ $(document).on 'ready page:load', ->
|
|
|
54
52
|
obj = { prev: ui.item.prev().data('id'), next: ui.item.next().data('id') }
|
|
55
53
|
$.post "/push_type/nodes/#{ ui.item.data('id') }/position", obj, 'json'
|
|
56
54
|
|
|
57
|
-
$('textarea.froala', '.rich_text').editable
|
|
58
|
-
inlineMode: false
|
|
59
|
-
height: 400
|
|
60
|
-
buttons: ['bold', 'italic', 'underline', 'sep', 'formatBlock', 'align', 'insertOrderedList', 'insertUnorderedList', 'sep', 'createLink', 'insertImage', 'uploadFile', 'insertVideo', 'table', 'sep', 'removeFormat', 'undo', 'redo', 'sep' ,'html']
|
|
61
|
-
blockTags:
|
|
62
|
-
n: 'Normal'
|
|
63
|
-
h1: 'Heading 1'
|
|
64
|
-
h2: 'Heading 2'
|
|
65
|
-
theme: 'pt'
|
|
66
|
-
|
|
67
|
-
$('textarea.froala', '.rich_text').on 'editable.focus', (e, editor) ->
|
|
68
|
-
editor.$box.addClass 'focus'
|
|
69
|
-
|
|
70
|
-
$('textarea.froala', '.rich_text').on 'editable.blur', (e, editor) ->
|
|
71
|
-
editor.$box.removeClass 'focus'
|
|
72
|
-
|
|
73
55
|
$(document).confirmWithReveal()
|
|
74
56
|
|
|
57
|
+
$('.tagsinput', '.tags').tagsinput
|
|
58
|
+
tagClass: 'label secondary radius'
|
|
59
|
+
|
|
60
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<% PushType.config.admin_assets.javascripts.each { |js| require_asset(js) } %>
|
|
@@ -6,13 +6,9 @@
|
|
|
6
6
|
$scope.editUrl = (asset) ->
|
|
7
7
|
$scope.assetUrl.replace(/~id/, asset.id)
|
|
8
8
|
|
|
9
|
-
$scope.previewthumbUrl = (asset) ->
|
|
10
|
-
url = asset.preview_thumb_url
|
|
11
|
-
if asset['image?'] then url else asset_path(url)
|
|
12
|
-
|
|
13
9
|
$scope.afterUpload = (asset) ->
|
|
14
10
|
$scope.assets.unshift(asset)
|
|
15
|
-
$scope.assets = $scope.assets.slice(0,
|
|
11
|
+
$scope.assets = $scope.assets.slice(0, 20)
|
|
16
12
|
|
|
17
13
|
]
|
|
18
14
|
|
|
@@ -33,10 +29,6 @@
|
|
|
33
29
|
$scope.uploadedDate = ->
|
|
34
30
|
moment($scope.asset.created_at).format('Do MMM YYYY, h:mma')
|
|
35
31
|
|
|
36
|
-
$scope.previewthumbUrl = ->
|
|
37
|
-
url = $scope.asset.preview_thumb_url
|
|
38
|
-
if $scope.asset['image?'] then url else asset_path(url)
|
|
39
|
-
|
|
40
32
|
$scope.afterUpload = (asset) ->
|
|
41
33
|
$scope.asset = asset
|
|
42
34
|
|
|
@@ -55,7 +47,7 @@
|
|
|
55
47
|
dragLeave: -> $(this).removeClass('hover')
|
|
56
48
|
drop: -> $(this).removeClass('hover')
|
|
57
49
|
uploadFinished: (i, file, response, time) ->
|
|
58
|
-
scope.afterUpload(response)
|
|
50
|
+
scope.afterUpload(response.asset)
|
|
59
51
|
scope.$apply() unless scope.$$phase
|
|
60
52
|
|
|
61
53
|
|
|
@@ -11,9 +11,6 @@
|
|
|
11
11
|
* file per style scope.
|
|
12
12
|
*
|
|
13
13
|
*= require_self
|
|
14
|
-
*= require froala_editor.min
|
|
15
|
-
*= require froala_style.min
|
|
16
|
-
*= require font-awesome
|
|
17
14
|
*/
|
|
18
15
|
|
|
19
16
|
@import "foundation_and_overrides";
|
|
@@ -530,7 +527,5 @@ form .asset-upload {
|
|
|
530
527
|
}
|
|
531
528
|
}
|
|
532
529
|
|
|
533
|
-
|
|
534
|
-
|
|
535
530
|
@import "foundation-icons";
|
|
536
|
-
@import "
|
|
531
|
+
@import "tagsinput";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<% PushType.config.admin_assets.stylesheets.each { |css| require_asset(css) } %>
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
.bootstrap-tagsinput {
|
|
2
|
+
margin-bottom: 1rem;
|
|
3
|
+
padding: 0.3rem;
|
|
4
|
+
min-height: 42px;
|
|
5
|
+
font-size: $input-font-size;
|
|
6
|
+
line-height: 1.5em;
|
|
7
|
+
color: $input-font-color;
|
|
8
|
+
background-color: $input-bg-color;
|
|
9
|
+
border: 1px solid $input-border-color;
|
|
10
|
+
border-radius: 0;
|
|
11
|
+
box-shadow: $input-box-shadow;
|
|
12
|
+
cursor: text;
|
|
13
|
+
|
|
14
|
+
input {
|
|
15
|
+
display: inline;
|
|
16
|
+
width: auto !important;
|
|
17
|
+
max-width: inherit;
|
|
18
|
+
margin: 0.2rem;
|
|
19
|
+
padding: 0;
|
|
20
|
+
background-color: transparent;
|
|
21
|
+
border: none;
|
|
22
|
+
box-shadow: none;
|
|
23
|
+
outline: none;
|
|
24
|
+
|
|
25
|
+
&:focus {
|
|
26
|
+
background-color: inherit;
|
|
27
|
+
border: none;
|
|
28
|
+
box-shadow: none;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.tag {
|
|
33
|
+
margin: 0.2rem;
|
|
34
|
+
font-size: rem-calc(16);
|
|
35
|
+
color: $input-font-color;
|
|
36
|
+
|
|
37
|
+
[data-role="remove"] {
|
|
38
|
+
margin-left: 0.5rem;
|
|
39
|
+
color: $base;
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
}
|
|
42
|
+
[data-role="remove"]:after {
|
|
43
|
+
content: 'x';
|
|
44
|
+
padding: 0 2px;
|
|
45
|
+
font-weight: 600;
|
|
46
|
+
}
|
|
47
|
+
[data-role="remove"]:hover {
|
|
48
|
+
color: $white;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -3,13 +3,11 @@ require_dependency "push_type/admin_controller"
|
|
|
3
3
|
module PushType
|
|
4
4
|
class AssetsController < AdminController
|
|
5
5
|
|
|
6
|
-
before_filter :build_asset, only: [:new, :create]
|
|
6
|
+
before_filter :build_asset, only: [:new, :create, :upload]
|
|
7
7
|
before_filter :load_asset, only: [:edit, :update, :destroy]
|
|
8
8
|
|
|
9
|
-
respond_to :json, only: :upload
|
|
10
|
-
|
|
11
9
|
def index
|
|
12
|
-
@assets = PushType::Asset.not_trash.page(params[:page])
|
|
10
|
+
@assets = PushType::Asset.not_trash.page(params[:page]).per(20)
|
|
13
11
|
end
|
|
14
12
|
|
|
15
13
|
def new
|
|
@@ -25,7 +23,15 @@ module PushType
|
|
|
25
23
|
end
|
|
26
24
|
|
|
27
25
|
def upload
|
|
28
|
-
|
|
26
|
+
respond_to do |format|
|
|
27
|
+
format.json do
|
|
28
|
+
if @asset.save
|
|
29
|
+
render json: { asset: view_context.asset_hash(@asset).as_json }, status: :created
|
|
30
|
+
else
|
|
31
|
+
render json: { errors: @asset.errors.as_json }, status: :unprocessable_entity
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
29
35
|
end
|
|
30
36
|
|
|
31
37
|
def edit
|
|
@@ -7,7 +7,7 @@ module PushType
|
|
|
7
7
|
before_filter :load_node, only: [:edit, :update, :destroy, :position]
|
|
8
8
|
|
|
9
9
|
def index
|
|
10
|
-
@nodes = node_scope.not_trash.page(params[:page])
|
|
10
|
+
@nodes = node_scope.not_trash.page(params[:page]).per(30)
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
def new
|
|
@@ -69,7 +69,7 @@ module PushType
|
|
|
69
69
|
end
|
|
70
70
|
|
|
71
71
|
def node_params
|
|
72
|
-
fields = [:title, :slug, :status, :published_at, :published_to] + @node.
|
|
72
|
+
fields = [:title, :slug, :status, :published_at, :published_to] + @node.field_params
|
|
73
73
|
params.fetch(@node.type.underscore.to_sym, {}).permit(*fields)
|
|
74
74
|
end
|
|
75
75
|
|
|
@@ -1,14 +1,27 @@
|
|
|
1
1
|
module PushType
|
|
2
2
|
module AssetsHelper
|
|
3
3
|
|
|
4
|
-
def
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
def assets_array(assets)
|
|
5
|
+
assets.map { |a| asset_hash(a) }
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
def asset_hash(asset)
|
|
9
|
+
hash = [ :id, :file_name, :file_size, :mime_type, :created_at, :new_record?, :image?, :description_or_file_name ].inject({}) do |h, att|
|
|
10
|
+
h.update att => asset.send(att)
|
|
10
11
|
end
|
|
11
|
-
|
|
12
|
+
hash.update preview_thumb_url: asset_preview_thumb_url(asset)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def asset_preview_thumb_url(asset)
|
|
16
|
+
if asset.image?
|
|
17
|
+
main_app.media_path(file_uid: asset.file_uid, style: :push_type_thumb)
|
|
18
|
+
else
|
|
19
|
+
image_path(asset_icon(asset))
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def asset_icon(asset)
|
|
24
|
+
"push_type/icon-file-#{ asset.kind }.png"
|
|
12
25
|
end
|
|
13
26
|
|
|
14
27
|
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module PushType
|
|
2
|
+
module NodesHelper
|
|
3
|
+
|
|
4
|
+
def nodes_array(nodes)
|
|
5
|
+
nodes.map { |n| node_hash(n) }
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
def node_hash(asset)
|
|
9
|
+
hash = [ :type, :title, :slug, :status, :published_at, :published_to, :new_record?, :published? ].inject({}) do |h, att|
|
|
10
|
+
h.update att => asset.send(att)
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<title>PushType :: <%= yield :title %></title>
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
7
|
<%= javascript_include_tag 'vendor/modernizr' %>
|
|
8
|
-
<%= javascript_include_tag 'push_type/admin' %>
|
|
9
|
-
<%= stylesheet_link_tag 'push_type/admin', '//fonts.googleapis.com/css?family=Lato:300,300italic,400,700', media: 'all' %>
|
|
8
|
+
<%= javascript_include_tag 'push_type/admin', 'push_type/admin_assets' %>
|
|
9
|
+
<%= stylesheet_link_tag 'push_type/admin', 'push_type/admin_assets', '//fonts.googleapis.com/css?family=Lato:300,300italic,400,700', media: 'all' %>
|
|
10
10
|
<%= csrf_meta_tags %>
|
|
11
11
|
</head>
|
|
12
12
|
<body>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
%div{ ng: { controller: 'AssetUploadCtrl', init: "asset=#{ @asset.to_json }; createUrl='#{ push_type.assets_path }'; updateUrl='#{ push_type.asset_path('~id') }'" } }
|
|
1
|
+
%div{ ng: { controller: 'AssetUploadCtrl', init: "asset=#{ asset_hash(@asset).to_json }; createUrl='#{ push_type.assets_path }'; updateUrl='#{ push_type.asset_path('~id') }'" } }
|
|
2
2
|
= form_for @asset, url: '{{ saveUrl() }}', method: 'post' do |f|
|
|
3
3
|
= hidden_field_tag :_method, '{{ method() }}'
|
|
4
4
|
.large-8.columns
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
= f.file_field :file
|
|
19
19
|
%div{ ng: { show: "!asset['new_record?']" } }
|
|
20
20
|
.small-4.medium-3.columns
|
|
21
|
-
%img.preview{ alt: '{{ asset.file_name }}', ng: { src: '{{
|
|
21
|
+
%img.preview{ alt: '{{ asset.file_name }}', ng: { src: '{{ asset.preview_thumb_url }}' } }
|
|
22
22
|
.small-8.medium-9.columns
|
|
23
23
|
%table
|
|
24
24
|
%tr
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
= link_to ficon(:plus, 'New upload'), push_type.new_asset_path, class: 'button radius success'
|
|
9
9
|
|
|
10
10
|
- else
|
|
11
|
-
%div{ ng: { controller: 'AssetListCtrl', init: "assets=#{ @assets.
|
|
11
|
+
%div{ ng: { controller: 'AssetListCtrl', init: "assets=#{ assets_array(@assets).to_json }; assetUrl='#{ push_type.edit_asset_path('~id') }'" } }
|
|
12
12
|
.large-8.columns
|
|
13
13
|
%section
|
|
14
14
|
%ul.asset-list.small-block-grid-2.medium-block-grid-4
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
%article.asset-list-item
|
|
17
17
|
%a{ ng: { href: '{{ editUrl(asset) }}' } }
|
|
18
18
|
.preview
|
|
19
|
-
%img{ alt: '{{ asset.file_name }}', ng: { src: '{{
|
|
19
|
+
%img{ alt: '{{ asset.file_name }}', ng: { src: '{{ asset.preview_thumb_url }}' } }
|
|
20
20
|
.title {{ asset.description_or_file_name }}
|
|
21
21
|
|
|
22
22
|
.large-4.columns
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
%div{ ng: { controller: 'NodeFormCtrl', init: "node=#{ @node.to_json
|
|
1
|
+
%div{ ng: { controller: 'NodeFormCtrl', init: "node=#{ node_hash(@node).to_json }" } }
|
|
2
2
|
.large-8.columns
|
|
3
3
|
.container
|
|
4
4
|
.head
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
- if @parent
|
|
2
|
-
- if @parent.
|
|
3
|
-
= link_to ficon(:page_add, "New #{ @parent.
|
|
4
|
-
- elsif @parent.
|
|
5
|
-
= link_to ficon(:page_add, 'New content'), push_type.new_node_node_path(kind: @parent.
|
|
2
|
+
- if @parent.child_nodes.size == 1
|
|
3
|
+
= link_to ficon(:page_add, "New #{ @parent.child_nodes.first.humanize.downcase }"), push_type.new_node_node_path(kind: @parent.child_nodes.first), class: 'button radius success'
|
|
4
|
+
- elsif @parent.child_nodes.size > 1
|
|
5
|
+
= link_to ficon(:page_add, 'New content'), push_type.new_node_node_path(kind: @parent.child_nodes.first), class: 'button radius success dropdown', data: { dropdown: 'new-node' }
|
|
6
6
|
%ul#new-node.f-dropdown
|
|
7
|
-
- for kind in @parent.
|
|
7
|
+
- for kind in @parent.child_nodes
|
|
8
8
|
%li= link_to "New #{ kind.humanize.downcase }", push_type.new_node_node_path(kind: kind)
|
|
9
9
|
|
|
10
10
|
- else
|
|
11
|
-
- if PushType.
|
|
12
|
-
= link_to ficon(:page_add, "New #{ PushType.
|
|
13
|
-
- elsif PushType.
|
|
14
|
-
= link_to ficon(:page_add, 'New content'), push_type.new_node_path(kind: PushType.
|
|
11
|
+
- if PushType.root_nodes.size == 1
|
|
12
|
+
= link_to ficon(:page_add, "New #{ PushType.root_nodes.first.humanize.downcase }"), push_type.new_node_path(kind: PushType.root_nodes.first), class: 'button radius success'
|
|
13
|
+
- elsif PushType.root_nodes.size > 1
|
|
14
|
+
= link_to ficon(:page_add, 'New content'), push_type.new_node_path(kind: PushType.root_nodes.first), class: 'button radius success dropdown', data: { dropdown: 'new-node' }
|
|
15
15
|
%ul#new-node.f-dropdown
|
|
16
|
-
- for kind in PushType.
|
|
16
|
+
- for kind in PushType.root_nodes
|
|
17
17
|
%li= link_to "New #{ kind.humanize.downcase }", push_type.new_node_path(kind: kind)
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
%h3 No content
|
|
27
27
|
%p There is no content in this section yet.
|
|
28
28
|
- else
|
|
29
|
-
%ul.node-list.sortable
|
|
29
|
+
%ul.node-list{ class: ('sortable' if !@parent || @parent.sortable?) }
|
|
30
30
|
- for node in @nodes.all
|
|
31
31
|
%li.node-list-item{ data: { id: node.id } }
|
|
32
32
|
= link_to push_type.edit_node_path(node) do
|
|
@@ -39,9 +39,10 @@
|
|
|
39
39
|
%span= pluralize node.child_ids.size, 'child'
|
|
40
40
|
.buttons
|
|
41
41
|
= link_to ficon(:magnifying_glass), '#'
|
|
42
|
-
- unless node.
|
|
42
|
+
- unless node.child_nodes.empty?
|
|
43
43
|
= link_to ficon(:folder), push_type.node_nodes_path(node)
|
|
44
|
-
.
|
|
44
|
+
- if !@parent || @parent.sortable?
|
|
45
|
+
.handle
|
|
45
46
|
|
|
46
47
|
.large-4.columns
|
|
47
48
|
.side-panel{ :'side-panel' => true }
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module PushType
|
|
2
|
+
module Admin
|
|
3
|
+
class Assets
|
|
4
|
+
|
|
5
|
+
attr_accessor :javascripts, :stylesheets
|
|
6
|
+
|
|
7
|
+
def initialize
|
|
8
|
+
@javascripts = []
|
|
9
|
+
@stylesheets = []
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def register(lib)
|
|
13
|
+
@javascripts << lib
|
|
14
|
+
@stylesheets << lib
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -1,16 +1,25 @@
|
|
|
1
|
+
require 'push_type/admin/assets'
|
|
2
|
+
|
|
1
3
|
module PushType
|
|
2
4
|
module Admin
|
|
3
5
|
class Engine < ::Rails::Engine
|
|
4
6
|
isolate_namespace PushType
|
|
5
7
|
engine_name 'push_type_admin'
|
|
6
8
|
|
|
9
|
+
config.admin_assets = PushType::Admin::Assets.new
|
|
10
|
+
|
|
7
11
|
config.generators do |g|
|
|
8
12
|
g.assets false
|
|
9
13
|
g.helper false
|
|
10
14
|
g.test_framework :minitest, spec: true, fixture: false
|
|
11
15
|
end
|
|
12
16
|
|
|
13
|
-
config.assets.precompile += %w(
|
|
17
|
+
config.assets.precompile += %w(
|
|
18
|
+
push_type/admin.css
|
|
19
|
+
push_type/admin.js
|
|
20
|
+
push_type/admin_assets.css
|
|
21
|
+
push_type/admin_assets.js
|
|
22
|
+
)
|
|
14
23
|
end
|
|
15
24
|
end
|
|
16
25
|
end
|
data/lib/push_type/admin.rb
CHANGED
|
@@ -7,13 +7,12 @@ require 'foundation-rails'
|
|
|
7
7
|
require 'foundation-icons-sass-rails'
|
|
8
8
|
require 'jquery-rails'
|
|
9
9
|
require 'angularjs-rails'
|
|
10
|
-
require 'wysiwyg-rails'
|
|
11
|
-
require 'font-awesome-rails'
|
|
12
10
|
require 'momentjs-rails'
|
|
13
11
|
require 'turbolinks'
|
|
14
12
|
|
|
15
13
|
require 'breadcrumbs'
|
|
16
14
|
require 'kaminari'
|
|
15
|
+
require 'jbuilder'
|
|
17
16
|
|
|
18
17
|
module PushType
|
|
19
18
|
|
|
@@ -40,6 +40,27 @@ module PushType
|
|
|
40
40
|
end
|
|
41
41
|
end
|
|
42
42
|
|
|
43
|
+
describe 'POST #upload' do
|
|
44
|
+
let(:json_response) { JSON.parse(response.body) }
|
|
45
|
+
let(:action!) { post :upload, format: :json, asset: asset_attrs }
|
|
46
|
+
describe 'with valid asset' do
|
|
47
|
+
before { action! }
|
|
48
|
+
it { response.must_respond_with :success }
|
|
49
|
+
it { json_response['asset'].must_be :present? }
|
|
50
|
+
it { json_response['errors'].wont_be :present? }
|
|
51
|
+
end
|
|
52
|
+
describe 'asset count' do
|
|
53
|
+
it { proc { action! }.must_change 'Asset.count', 1 }
|
|
54
|
+
end
|
|
55
|
+
describe 'with in-valid asset' do
|
|
56
|
+
let(:asset_attrs) { {} }
|
|
57
|
+
before { action! }
|
|
58
|
+
it { response.must_respond_with :unprocessable_entity }
|
|
59
|
+
it { json_response['asset'].wont_be :present? }
|
|
60
|
+
it { json_response['errors'].must_be :present? }
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
43
64
|
describe 'GET #edit' do
|
|
44
65
|
before { get :edit, id: asset.id }
|
|
45
66
|
it { response.must_render_template 'edit' }
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// listed below.
|
|
3
3
|
//
|
|
4
4
|
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
|
5
|
-
// or vendor/assets/javascripts
|
|
5
|
+
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
|
|
6
6
|
//
|
|
7
7
|
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
|
8
8
|
// compiled file.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* listed below.
|
|
4
4
|
*
|
|
5
5
|
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
|
6
|
-
* or vendor/assets/stylesheets
|
|
6
|
+
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
|
7
7
|
*
|
|
8
8
|
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
|
9
9
|
* compiled file so the styles you add here take precedence over styles defined in any styles
|
data/test/dummy/bin/rails
CHANGED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
require 'pathname'
|
|
3
|
+
|
|
4
|
+
# path to your application root.
|
|
5
|
+
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
|
|
6
|
+
|
|
7
|
+
Dir.chdir APP_ROOT do
|
|
8
|
+
# This script is a starting point to setup your application.
|
|
9
|
+
# Add necessary setup steps to this file:
|
|
10
|
+
|
|
11
|
+
puts "== Installing dependencies =="
|
|
12
|
+
system "gem install bundler --conservative"
|
|
13
|
+
system "bundle check || bundle install"
|
|
14
|
+
|
|
15
|
+
# puts "\n== Copying sample files =="
|
|
16
|
+
# unless File.exist?("config/database.yml")
|
|
17
|
+
# system "cp config/database.yml.sample config/database.yml"
|
|
18
|
+
# end
|
|
19
|
+
|
|
20
|
+
puts "\n== Preparing database =="
|
|
21
|
+
system "bin/rake db:setup"
|
|
22
|
+
|
|
23
|
+
puts "\n== Removing old logs and tempfiles =="
|
|
24
|
+
system "rm -f log/*"
|
|
25
|
+
system "rm -rf tmp/cache"
|
|
26
|
+
|
|
27
|
+
puts "\n== Restarting application server =="
|
|
28
|
+
system "touch tmp/restart.txt"
|
|
29
|
+
end
|
|
@@ -27,6 +27,10 @@ Rails.application.configure do
|
|
|
27
27
|
# number of complex assets.
|
|
28
28
|
config.assets.debug = true
|
|
29
29
|
|
|
30
|
+
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
|
|
31
|
+
# yet still be able to expire them through the digest params.
|
|
32
|
+
config.assets.digest = true
|
|
33
|
+
|
|
30
34
|
# Adds additional error checking when serving assets at runtime.
|
|
31
35
|
# Checks for improperly declared sprockets dependencies.
|
|
32
36
|
# Raises helpful error messages.
|
|
@@ -16,11 +16,13 @@ Rails.application.configure do
|
|
|
16
16
|
|
|
17
17
|
# Enable Rack::Cache to put a simple HTTP cache in front of your application
|
|
18
18
|
# Add `rack-cache` to your Gemfile before enabling this.
|
|
19
|
-
# For large-scale production use, consider using a caching reverse proxy like
|
|
19
|
+
# For large-scale production use, consider using a caching reverse proxy like
|
|
20
|
+
# NGINX, varnish or squid.
|
|
20
21
|
# config.action_dispatch.rack_cache = true
|
|
21
22
|
|
|
22
|
-
# Disable
|
|
23
|
-
|
|
23
|
+
# Disable serving static files from the `/public` folder by default since
|
|
24
|
+
# Apache or NGINX already handles this.
|
|
25
|
+
config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
|
|
24
26
|
|
|
25
27
|
# Compress JavaScripts and CSS.
|
|
26
28
|
config.assets.js_compressor = :uglifier
|
|
@@ -29,20 +31,22 @@ Rails.application.configure do
|
|
|
29
31
|
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
|
30
32
|
config.assets.compile = false
|
|
31
33
|
|
|
32
|
-
#
|
|
34
|
+
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
|
|
35
|
+
# yet still be able to expire them through the digest params.
|
|
33
36
|
config.assets.digest = true
|
|
34
37
|
|
|
35
38
|
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
|
|
36
39
|
|
|
37
40
|
# Specifies the header that your server uses for sending files.
|
|
38
|
-
# config.action_dispatch.x_sendfile_header =
|
|
39
|
-
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for
|
|
41
|
+
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
|
|
42
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
|
|
40
43
|
|
|
41
44
|
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
|
42
45
|
# config.force_ssl = true
|
|
43
46
|
|
|
44
|
-
#
|
|
45
|
-
|
|
47
|
+
# Use the lowest log level to ensure availability of diagnostic information
|
|
48
|
+
# when problems arise.
|
|
49
|
+
config.log_level = :debug
|
|
46
50
|
|
|
47
51
|
# Prepend all log lines with the following tags.
|
|
48
52
|
# config.log_tags = [ :subdomain, :uuid ]
|
|
@@ -54,7 +58,7 @@ Rails.application.configure do
|
|
|
54
58
|
# config.cache_store = :mem_cache_store
|
|
55
59
|
|
|
56
60
|
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
|
57
|
-
# config.action_controller.asset_host =
|
|
61
|
+
# config.action_controller.asset_host = 'http://assets.example.com'
|
|
58
62
|
|
|
59
63
|
# Ignore bad email addresses and do not raise email delivery errors.
|
|
60
64
|
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
|
@@ -67,9 +71,6 @@ Rails.application.configure do
|
|
|
67
71
|
# Send deprecation notices to registered listeners.
|
|
68
72
|
config.active_support.deprecation = :notify
|
|
69
73
|
|
|
70
|
-
# Disable automatic flushing of the log to improve performance.
|
|
71
|
-
# config.autoflush_log = false
|
|
72
|
-
|
|
73
74
|
# Use default logging formatter so that PID and timestamp are not suppressed.
|
|
74
75
|
config.log_formatter = ::Logger::Formatter.new
|
|
75
76
|
|
|
@@ -12,8 +12,8 @@ Rails.application.configure do
|
|
|
12
12
|
# preloads Rails for running tests, you may have to set it to true.
|
|
13
13
|
config.eager_load = false
|
|
14
14
|
|
|
15
|
-
# Configure static
|
|
16
|
-
config.
|
|
15
|
+
# Configure static file server for tests with Cache-Control for performance.
|
|
16
|
+
config.serve_static_files = true
|
|
17
17
|
config.static_cache_control = 'public, max-age=3600'
|
|
18
18
|
|
|
19
19
|
# Show full error reports and disable caching.
|
|
@@ -31,6 +31,9 @@ Rails.application.configure do
|
|
|
31
31
|
# ActionMailer::Base.deliveries array.
|
|
32
32
|
config.action_mailer.delivery_method = :test
|
|
33
33
|
|
|
34
|
+
# Randomize the order test cases are executed.
|
|
35
|
+
config.active_support.test_order = :random
|
|
36
|
+
|
|
34
37
|
# Print deprecation notices to the stderr.
|
|
35
38
|
config.active_support.deprecation = :stderr
|
|
36
39
|
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
# Version of your assets, change this if you want to expire all your assets.
|
|
4
4
|
Rails.application.config.assets.version = '1.0'
|
|
5
5
|
|
|
6
|
+
# Add additional assets to the asset load path
|
|
7
|
+
# Rails.application.config.assets.paths << Emoji.images_path
|
|
8
|
+
|
|
6
9
|
# Precompile additional assets.
|
|
7
10
|
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
|
8
11
|
# Rails.application.config.assets.precompile += %w( search.js )
|