push_type_wysiwyg 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.
Files changed (73) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.md +20 -0
  3. data/README.md +3 -0
  4. data/app/assets/javascripts/push_type/froala_overrides/file_upload.js +133 -0
  5. data/app/assets/javascripts/push_type/froala_overrides/froala_editor.js +34 -0
  6. data/app/assets/javascripts/push_type/froala_overrides/image_editor.js +215 -0
  7. data/app/assets/javascripts/push_type/froala_overrides/media_manager.js +184 -0
  8. data/app/assets/javascripts/push_type/media_styles.js.coffee.erb +5 -0
  9. data/app/assets/javascripts/push_type/wysiwyg.js.coffee +50 -0
  10. data/app/assets/stylesheets/push_type/froala_overrides.scss +77 -0
  11. data/app/assets/stylesheets/push_type/pt_theme.scss +373 -0
  12. data/app/assets/stylesheets/push_type/wysiwyg.scss +36 -0
  13. data/app/controllers/push_type/wysiwyg_media_controller.rb +43 -0
  14. data/app/fields/push_type/wysiwyg_field.rb +10 -0
  15. data/app/helpers/push_type/wysiwyg_media_helper.rb +34 -0
  16. data/config/routes.rb +3 -0
  17. data/lib/push_type/wysiwyg/engine.rb +16 -0
  18. data/lib/push_type/wysiwyg.rb +14 -0
  19. data/lib/push_type_wysiwyg.rb +2 -0
  20. data/lib/tasks/push_type_tasks.rake +4 -0
  21. data/test/controllers/push_type/wysiwyg_media_controller_test.rb +58 -0
  22. data/test/dummy/README.rdoc +28 -0
  23. data/test/dummy/Rakefile +6 -0
  24. data/test/dummy/app/assets/javascripts/application.js +16 -0
  25. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  26. data/test/dummy/app/controllers/application_controller.rb +5 -0
  27. data/test/dummy/app/helpers/application_helper.rb +2 -0
  28. data/test/dummy/app/models/page.rb +10 -0
  29. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  30. data/test/dummy/app/views/nodes/page.html.erb +3 -0
  31. data/test/dummy/bin/bundle +3 -0
  32. data/test/dummy/bin/rails +4 -0
  33. data/test/dummy/bin/rake +4 -0
  34. data/test/dummy/bin/setup +29 -0
  35. data/test/dummy/config/application.rb +14 -0
  36. data/test/dummy/config/boot.rb +4 -0
  37. data/test/dummy/config/database.yml +85 -0
  38. data/test/dummy/config/environment.rb +5 -0
  39. data/test/dummy/config/environments/development.rb +41 -0
  40. data/test/dummy/config/environments/production.rb +79 -0
  41. data/test/dummy/config/environments/test.rb +42 -0
  42. data/test/dummy/config/initializers/assets.rb +11 -0
  43. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  44. data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
  45. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  46. data/test/dummy/config/initializers/inflections.rb +16 -0
  47. data/test/dummy/config/initializers/mime_types.rb +4 -0
  48. data/test/dummy/config/initializers/push_type.rb +15 -0
  49. data/test/dummy/config/initializers/session_store.rb +3 -0
  50. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  51. data/test/dummy/config/locales/en.yml +23 -0
  52. data/test/dummy/config/routes.rb +59 -0
  53. data/test/dummy/config/secrets.yml +22 -0
  54. data/test/dummy/config.ru +4 -0
  55. data/test/dummy/db/migrate/20150208150336_create_push_type_users.push_type.rb +13 -0
  56. data/test/dummy/db/migrate/20150208150337_create_push_type_nodes.push_type.rb +25 -0
  57. data/test/dummy/db/migrate/20150208150338_create_push_type_node_hierarchies.push_type.rb +17 -0
  58. data/test/dummy/db/migrate/20150208150339_create_push_type_assets.push_type.rb +19 -0
  59. data/test/dummy/db/schema.rb +67 -0
  60. data/test/dummy/db/seeds.rb +7 -0
  61. data/test/dummy/log/test.log +1309 -0
  62. data/test/dummy/public/404.html +67 -0
  63. data/test/dummy/public/422.html +67 -0
  64. data/test/dummy/public/500.html +66 -0
  65. data/test/dummy/public/favicon.ico +0 -0
  66. data/test/dummy/public/robots.txt +5 -0
  67. data/test/dummy/tmp/cache/assets/test/sprockets/0a170bcd46595a69e9181ea5eb52ec6f +0 -0
  68. data/test/dummy/tmp/cache/assets/test/sprockets/853c1095ab6e7f4eba1f3406f0f3bba6 +0 -0
  69. data/test/helpers/push_type/wysiwyg_media_helper_test.rb +41 -0
  70. data/test/models/push_type/wysiwyg_field_test.rb +9 -0
  71. data/test/test_helper.rb +21 -0
  72. data/vendor/assets/javascripts/jquery.simplePagination.js +334 -0
  73. metadata +252 -0
@@ -0,0 +1,25 @@
1
+ # This migration comes from push_type (originally 20141117204630)
2
+ class CreatePushTypeNodes < ActiveRecord::Migration
3
+ def change
4
+ enable_extension 'uuid-ossp' unless extension_enabled?('uuid-ossp')
5
+ create_table :push_type_nodes, id: :uuid, default: 'uuid_generate_v4()' do |t|
6
+ t.string :type
7
+ t.string :title
8
+ t.string :slug
9
+ t.jsonb :field_store
10
+
11
+ t.uuid :parent_id
12
+ t.integer :sort_order
13
+
14
+ t.integer :status
15
+ t.datetime :published_at
16
+ t.datetime :published_to
17
+
18
+ t.uuid :creator_id
19
+ t.uuid :updater_id
20
+
21
+ t.timestamps
22
+ t.datetime :deleted_at
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,17 @@
1
+ # This migration comes from push_type (originally 20141117210644)
2
+ class CreatePushTypeNodeHierarchies < ActiveRecord::Migration
3
+ def change
4
+ create_table :push_type_node_hierarchies, id: false do |t|
5
+ t.uuid :ancestor_id, null: false
6
+ t.uuid :descendant_id, null: false
7
+ t.integer :generations, null: false
8
+ end
9
+
10
+ add_index :push_type_node_hierarchies, [:ancestor_id, :descendant_id, :generations],
11
+ unique: true,
12
+ name: "anc_desc_idx"
13
+
14
+ add_index :push_type_node_hierarchies, [:descendant_id],
15
+ name: "desc_idx"
16
+ end
17
+ end
@@ -0,0 +1,19 @@
1
+ # This migration comes from push_type (originally 20141127151930)
2
+ class CreatePushTypeAssets < ActiveRecord::Migration
3
+ def change
4
+ enable_extension 'uuid-ossp' unless extension_enabled?('uuid-ossp')
5
+ create_table :push_type_assets, id: :uuid, default: 'uuid_generate_v4()' do |t|
6
+ t.string :file_uid
7
+ t.string :file_name
8
+ t.integer :file_size
9
+ t.string :file_ext
10
+ t.string :mime_type
11
+ t.string :description
12
+
13
+ t.uuid :uploader_id
14
+
15
+ t.timestamps
16
+ t.datetime :deleted_at
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,67 @@
1
+ # encoding: UTF-8
2
+ # This file is auto-generated from the current state of the database. Instead
3
+ # of editing this file, please use the migrations feature of Active Record to
4
+ # incrementally modify your database, and then regenerate this schema definition.
5
+ #
6
+ # Note that this schema.rb definition is the authoritative source for your
7
+ # database schema. If you need to create the application database on another
8
+ # system, you should be using db:schema:load, not running all the migrations
9
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
11
+ #
12
+ # It's strongly recommended that you check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(version: 20150208150339) do
15
+
16
+ # These are extensions that must be enabled in order to support this database
17
+ enable_extension "plpgsql"
18
+ enable_extension "uuid-ossp"
19
+
20
+ create_table "push_type_assets", id: :uuid, default: "uuid_generate_v4()", force: :cascade do |t|
21
+ t.string "file_uid"
22
+ t.string "file_name"
23
+ t.integer "file_size"
24
+ t.string "file_ext"
25
+ t.string "mime_type"
26
+ t.string "description"
27
+ t.uuid "uploader_id"
28
+ t.datetime "created_at"
29
+ t.datetime "updated_at"
30
+ t.datetime "deleted_at"
31
+ end
32
+
33
+ create_table "push_type_node_hierarchies", id: false, force: :cascade do |t|
34
+ t.uuid "ancestor_id", null: false
35
+ t.uuid "descendant_id", null: false
36
+ t.integer "generations", null: false
37
+ end
38
+
39
+ add_index "push_type_node_hierarchies", ["ancestor_id", "descendant_id", "generations"], name: "anc_desc_idx", unique: true, using: :btree
40
+ add_index "push_type_node_hierarchies", ["descendant_id"], name: "desc_idx", using: :btree
41
+
42
+ create_table "push_type_nodes", id: :uuid, default: "uuid_generate_v4()", force: :cascade do |t|
43
+ t.string "type"
44
+ t.string "title"
45
+ t.string "slug"
46
+ t.jsonb "field_store"
47
+ t.uuid "parent_id"
48
+ t.integer "sort_order"
49
+ t.integer "status"
50
+ t.datetime "published_at"
51
+ t.datetime "published_to"
52
+ t.uuid "creator_id"
53
+ t.uuid "updater_id"
54
+ t.datetime "created_at"
55
+ t.datetime "updated_at"
56
+ t.datetime "deleted_at"
57
+ end
58
+
59
+ create_table "push_type_users", id: :uuid, default: "uuid_generate_v4()", force: :cascade do |t|
60
+ t.string "name"
61
+ t.string "email"
62
+ t.jsonb "field_store"
63
+ t.datetime "created_at"
64
+ t.datetime "updated_at"
65
+ end
66
+
67
+ end
@@ -0,0 +1,7 @@
1
+ # This file should contain all the record creation needed to seed the database with its default values.
2
+ # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
3
+ #
4
+ # Examples:
5
+ #
6
+ # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
7
+ # Mayor.create(name: 'Emanuel', city: cities.first)