activeadmin_cms 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NmU5ODcxMmM0OGJjMTAyYTc2ODJiNDZmOGY3MDY3YzU1YTgxMDgxNw==
4
+ NjExZTBjOTk0ZmNiODRjNzU4ZWVhNWIwMzliZjU4NGM0N2FkYzMwYg==
5
5
  data.tar.gz: !binary |-
6
- OGM2ODkxYmMwNmFmNTUwMWUxYTFmOTBkNmUwZWQ4N2U1NWJhMTc1OQ==
6
+ MzUwYmNiMDUyZjkxNzk3M2Q3MDM3YzUyZDg5ZjE5OWI2OTM5YTA1Yw==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- YTM2ZjVkZDAzZGZmOWM2OWMwMWE0NjA0NDM5ZGEzYzcyY2M2ZDgxYWU1Y2I5
10
- YTA1ZWRjY2I1ZDhiNDNmODk1OTRkYmNjMDgxOThkYjg2NTRiOGQ2NGM2MmNj
11
- MjI0MjdlZGI3Yzc2NTYxYjY5N2QwNDFkZGNjZjI5NjA1MDMxNzY=
9
+ N2VhZDVlNTRjZTRkNmIxOWVlMjExNzQyYzVkNzI2Yzg5Y2I3ZTE4NDQzYzk0
10
+ MDg3Y2JhYWIzNGUxZjM5MWRiNDZmNWI0YzdkNGYxYzkxZTc2NTZjZTFkZTdl
11
+ MjdhZjZmOTk2MzRiNmJiNDM1M2NkOWQwZGJkZDVkMzQ5MzNmNWM=
12
12
  data.tar.gz: !binary |-
13
- OWQyMDQ0ZTc1NzEwMTU5ZWJiYTMxMDI3NjkzNTRlODQwYmYyNzg3NDg2MWE4
14
- ZDFlOTE5ZjE4NzUwOTNiOWZkZGU2OTk4YmUxMzE2MDA3YTE1ZmNkZDNjMzMz
15
- Yjg3MzQ3YmU5MmMwYjMwMmQ4N2E2ZDhhZmU2NTE5NDAxNzgxOWE=
13
+ OGI3YTMwYzE4NGVjZmNhYmFmN2VhNGQ2N2ZjYmM3MTQzMjNiYjlkYzhjNGFm
14
+ ODJjOTczZGViOWQwMTc3ZTRmYTUxODYxMDZhMTI0ZDNhNDI5MDY1MTBiM2Qx
15
+ Yzg5MDYyN2NlMGIxMjU3ZjQ1NGY2NDJhNmI4NjdmMjA5OGFmM2M=
data/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ == 0.0.8
2
+ * Added ability to edit js/css content
3
+
1
4
  == 0.0.7
2
5
  * Added simple assets uploader
3
6
 
@@ -71,7 +71,10 @@ ActiveAdmin.register ActiveadminCms::Page, as: 'Page' do
71
71
 
72
72
  controller do
73
73
  def permitted_params
74
- params.permit page: [:title, :draft_content, :category, :asset_ids, :slug]
74
+ params.permit page: [
75
+ :draft_content, :draft_js_content, :draft_css_content,
76
+ :title, :category, :asset_ids, :slug
77
+ ]
75
78
  end
76
79
  end
77
80
 
@@ -1,5 +1,5 @@
1
1
  //= require ace/ace
2
- //= require ace/theme-tomorrow.js
2
+ //= require ace/theme-chrome.js
3
3
  //= require ace/mode-html.js
4
4
  //= require_self
5
5
 
@@ -7,21 +7,40 @@ if (!window.EditorWrapper) {
7
7
  window.EditorWrapper = {}
8
8
  }
9
9
 
10
+ var addEditor = function (id, content_id, lang) {
11
+ var $content = $('#' + content_id)
12
+ $content.hide()
13
+ var editor = ace.edit(id)
14
+ var session = editor.getSession()
15
+ editor.setTheme("ace/theme/chrome");
16
+ editor.setFontSize("16px");
17
+ session.setMode("ace/mode/" + lang);
18
+ session.setUseWrapMode(true);
19
+ session.setTabSize(2);
20
+ editor.on('change', function (e) {
21
+ $content.val(editor.getValue())
22
+ })
23
+ editor.setValue($content.val())
24
+ return editor;
25
+ }
26
+
10
27
  $(function (){
11
- if ($('#editor').length) {
12
- var $content = $('#page_draft_content')
13
- $content.hide()
14
- var editor = ace.edit("editor")
15
- editor.setTheme("ace/theme/tomorrow");
16
- editor.getSession().setMode("ace/mode/html");
17
- editor.getSession().setUseWrapMode(true);
18
- editor.setFontSize("16px");
19
- editor.on('change', function (e) {
20
- $content.val(editor.getValue())
21
- })
22
28
 
29
+ // html editor
30
+ if ($('#html-editor').length) {
31
+ var editor = addEditor("html-editor", "page_draft_content", "html")
23
32
  window.EditorWrapper.insert = function (data) {
24
33
  editor.insert(data);
25
34
  }
26
35
  }
36
+
37
+ // css editor
38
+ if ($('#css-editor').length) {
39
+ addEditor("css-editor", "page_draft_css_content", "css")
40
+ }
41
+
42
+ // js editor
43
+ if ($('#js-editor').length) {
44
+ addEditor("js-editor", "page_draft_js_content", "javascript")
45
+ }
27
46
  })
@@ -40,8 +40,10 @@ $(function () {
40
40
  var assetIds = getAssetIds()
41
41
  assetIds.splice( assetIds.indexOf($el.data('id')), 1 );
42
42
  setAssetIds(assetIds)
43
+ return false;
43
44
  })
44
45
  $(document).on('click', '#uploader-images .asset', function () {
45
- EditorWrapper.insert($(this).data('url'))
46
+ EditorWrapper.insert($(this).data('url'));
47
+ return false;
46
48
  })
47
49
  })
@@ -1,23 +1,2 @@
1
1
  //= require activeadmin_cms/editor/ace
2
-
3
- #active_admin_content #assets-container {
4
- padding: 10px;
5
- }
6
-
7
- #active_admin_content #assets-container #uploader-images li {
8
- display: inline-block;
9
- width: 100px;
10
- height: 100px;
11
- position: relative;
12
- cursor: pointer;
13
- }
14
-
15
- #active_admin_content #assets-container #uploader-images li .delete {
16
- position: absolute;
17
- top: 5px;
18
- right: 5px;
19
- cursor: pointer;
20
- background: #fff;
21
- font-size: 16px;
22
- padding: 2px 6px;
23
- }
2
+ //= require activeadmin_cms/partials/uploader
@@ -0,0 +1,13 @@
1
+ #activeadmin-cms-page {
2
+ form {
3
+ position: relative;
4
+ }
5
+ .editor {
6
+ width: 100%;
7
+ height: 250px;
8
+ position: relative;
9
+ }
10
+ #html-editor {
11
+ height: 500px;
12
+ }
13
+ }
@@ -0,0 +1,72 @@
1
+ #activeadmin-cms-page {
2
+ span.editor-label {
3
+ text-align: center;
4
+ width: 100%;
5
+ display: block;
6
+ font-weight: bold;
7
+ }
8
+ #page_slug_input {
9
+ abbr { display: none; }
10
+ label { margin-top: 8px; }
11
+ input { width: 78%; box-sizing: border-box; }
12
+ }
13
+ #page_title_input, #page_category_input, #page_slug_input {
14
+ padding: 5px 10px;
15
+ label {
16
+ text-align: right;
17
+ margin-right: 2%;
18
+ }
19
+ }
20
+
21
+ #page_draft_content_input,
22
+ #page_draft_css_content_input,
23
+ #page_draft_js_content_input {
24
+ display: none;
25
+ }
26
+
27
+ #assets-container {
28
+ padding: 10px;
29
+ margin-left: 50px;
30
+
31
+ #uploader-images li {
32
+ display: inline-block;
33
+ width: 100px;
34
+ height: 100px;
35
+ position: relative;
36
+ cursor: pointer;
37
+ margin-right: 5px;
38
+
39
+ .delete {
40
+ position: absolute;
41
+ top: 5px;
42
+ right: 5px;
43
+ cursor: pointer;
44
+ background: #fff;
45
+ font-size: 16px;
46
+ padding: 2px 6px;
47
+ }
48
+ }
49
+ }
50
+
51
+ #uploader {
52
+ position: relative;
53
+ width: 100%;
54
+ padding: 20px 0;
55
+ text-align: center;
56
+
57
+ .button {
58
+ margin-top: 10px;
59
+ }
60
+
61
+ input {
62
+ position: absolute;
63
+ top: 50px;
64
+ left: 50%;
65
+ width: 164px;
66
+ margin-left: -82px;
67
+ opacity: 0;
68
+ height: 42px;
69
+ cursor: pointer;
70
+ }
71
+ }
72
+ }
@@ -3,6 +3,8 @@ module ActiveadminCms
3
3
  class << self
4
4
  def publish(page)
5
5
  page.content = page.draft_content
6
+ page.css_content = page.draft_css_content
7
+ page.js_content = page.draft_js_content
6
8
  page.published = true
7
9
  page.save
8
10
  end
@@ -1,26 +1,44 @@
1
1
  - config = ActiveadminCms::Engine.config
2
- = semantic_form_for [:admin, @page] do |f|
3
- = f.inputs do
4
- = f.input :title
5
- = f.input :slug
2
+ #activeadmin-cms-page
3
+ = semantic_form_for [:admin, @page] do |f|
4
+ = f.inputs do
5
+ = f.input :title, placeholder: 'Page title'
6
+ = f.input :slug, label: "http://#{request.host}/"
6
7
 
7
- - if config.page_categories.any?
8
- = f.input :category, collection: config.page_categories, include_blank: false
8
+ - if config.page_categories.any?
9
+ = f.input :category, collection: config.page_categories, include_blank: false
9
10
 
10
- = f.input :draft_content, label: false
11
- li#editor-container
12
- - if config.page_editor_backend = 'ace_editor'
13
- #editor= @page.draft_content
11
+ = f.input :draft_content, label: false
12
+ li#html-editor-container.editor-container
13
+ - if config.page_editor_backend = 'ace_editor'
14
+ #html-editor.editor
14
15
 
15
- = f.input :asset_ids, as: :hidden
16
- li#assets-container
17
- ul#uploader-images
18
- - @page.assets.each do |asset|
19
- li.asset data-id=(asset.id) data-url=(asset.image_url)
20
- span.delete x
21
- = image_tag asset.image_thumb_url, width: 100, height: 100
22
- input#uploader-file type="file"
16
+ = f.input :asset_ids, as: :hidden
23
17
  #uploader
24
- = f.actions
25
- = f.submit('Save')
26
- = f.submit('Save & Publish')
18
+ .description
19
+ ' Drag & drop asset here or
20
+ br
21
+ = link_to 'choose from computer', '#', class: 'button'
22
+ input#uploader-file type="file"
23
+ li#assets-container
24
+ ul#uploader-images
25
+ - @page.assets.each do |asset|
26
+ li.asset data-id=(asset.id) data-url=(asset.image_url)
27
+ span.delete x
28
+ = image_tag asset.image_thumb_url, width: 100, height: 100
29
+
30
+ span.editor-label CSS Editor
31
+ = f.input :draft_css_content, label: false
32
+ li#css-editor-container.editor-container
33
+ - if config.page_editor_backend = 'ace_editor'
34
+ #css-editor.editor
35
+
36
+ span.editor-label JS Editor
37
+ = f.input :draft_js_content, label: false
38
+ li#js-editor-container.editor-container
39
+ - if config.page_editor_backend = 'ace_editor'
40
+ #js-editor.editor
41
+
42
+ = f.actions
43
+ = f.submit('Save')
44
+ = f.submit('Save & Publish')
@@ -0,0 +1,8 @@
1
+ class AddJsAndCssToPages < ActiveRecord::Migration
2
+ def change
3
+ add_column :activeadmin_cms_pages, :js_content, :text
4
+ add_column :activeadmin_cms_pages, :css_content, :text
5
+ add_column :activeadmin_cms_pages, :draft_js_content, :text
6
+ add_column :activeadmin_cms_pages, :draft_css_content, :text
7
+ end
8
+ end
@@ -1,3 +1,3 @@
1
1
  module ActiveadminCms
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
Binary file
@@ -11,7 +11,7 @@
11
11
  #
12
12
  # It's strongly recommended that you check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(version: 20131020224503) do
14
+ ActiveRecord::Schema.define(version: 20131024214930) do
15
15
 
16
16
  create_table "activeadmin_cms_assets", force: true do |t|
17
17
  t.integer "content_id"
@@ -31,10 +31,14 @@ ActiveRecord::Schema.define(version: 20131020224503) do
31
31
  t.string "category"
32
32
  t.text "content"
33
33
  t.text "draft_content"
34
- t.boolean "published", default: false
34
+ t.boolean "published", default: false
35
35
  t.datetime "created_at"
36
36
  t.datetime "updated_at"
37
37
  t.string "slug"
38
+ t.text "js_content"
39
+ t.text "css_content"
40
+ t.text "draft_js_content"
41
+ t.text "draft_css_content"
38
42
  end
39
43
 
40
44
  add_index "activeadmin_cms_pages", ["category"], name: "index_activeadmin_cms_pages_on_category"
Binary file
@@ -68,3 +68,19 @@ Migrating to CreateActiveadminCmsAssets (20131020224503)
68
68
  SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131020224503"]]
69
69
   (1.0ms) commit transaction
70
70
  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
71
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
72
+ Migrating to AddJsAndCssToPages (20131024214930)
73
+  (0.1ms) begin transaction
74
+  (0.2ms) ALTER TABLE "pages" ADD "js_content" text
75
+ SQLite3::SQLException: no such table: pages: ALTER TABLE "pages" ADD "js_content" text
76
+  (0.1ms) rollback transaction
77
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
78
+ Migrating to AddJsAndCssToPages (20131024214930)
79
+  (0.1ms) begin transaction
80
+  (0.5ms) ALTER TABLE "activeadmin_cms_pages" ADD "js_content" text
81
+  (0.2ms) ALTER TABLE "activeadmin_cms_pages" ADD "css_content" text
82
+  (0.2ms) ALTER TABLE "activeadmin_cms_pages" ADD "draft_js_content" text
83
+  (0.2ms) ALTER TABLE "activeadmin_cms_pages" ADD "draft_css_content" text
84
+ SQL (21.5ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131024214930"]]
85
+  (0.9ms) commit transaction
86
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
@@ -858,3 +858,112 @@ ActiveadminCmsTest: test_truth
858
858
   (0.0ms) SAVEPOINT active_record_1
859
859
   (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
860
860
   (0.1ms) rollback transaction
861
+  (0.1ms) begin transaction
862
+ -----------------------------------------------------
863
+ #publish: test_0001_should change status to published
864
+ -----------------------------------------------------
865
+  (0.1ms) SAVEPOINT active_record_1
866
+  (0.0ms) RELEASE SAVEPOINT active_record_1
867
+  (0.0ms) SAVEPOINT active_record_1
868
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
869
+  (0.1ms) rollback transaction
870
+  (0.0ms) begin transaction
871
+ -----------------------------------------------------
872
+ #publish: test_0001_should change status to published
873
+ -----------------------------------------------------
874
+  (0.0ms) SAVEPOINT active_record_1
875
+  (0.0ms) RELEASE SAVEPOINT active_record_1
876
+  (0.0ms) SAVEPOINT active_record_1
877
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
878
+  (0.0ms) rollback transaction
879
+  (0.0ms) begin transaction
880
+ --------------------------------------------------
881
+ #publish: test_0002_should move content from draft
882
+ --------------------------------------------------
883
+  (0.0ms) SAVEPOINT active_record_1
884
+  (0.0ms) RELEASE SAVEPOINT active_record_1
885
+  (0.0ms) SAVEPOINT active_record_1
886
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
887
+  (0.0ms) rollback transaction
888
+  (0.0ms) begin transaction
889
+ ------------------------------
890
+ ActiveadminCmsTest: test_truth
891
+ ------------------------------
892
+  (0.0ms) SAVEPOINT active_record_1
893
+  (0.0ms) RELEASE SAVEPOINT active_record_1
894
+  (0.0ms) SAVEPOINT active_record_1
895
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
896
+  (0.0ms) rollback transaction
897
+  (1.3ms) CREATE TABLE "activeadmin_cms_assets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "content_id" integer, "content_type" varchar(255), "image_file_name" varchar(255), "image_content_type" varchar(255), "image_file_size" integer, "image_updated_at" datetime, "created_at" datetime, "updated_at" datetime) 
898
+  (0.9ms) CREATE INDEX "index_activeadmin_cms_assets_on_content_type_and_content_id" ON "activeadmin_cms_assets" ("content_type", "content_id")
899
+  (1.4ms) CREATE TABLE "activeadmin_cms_pages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "category" varchar(255), "content" text, "draft_content" text, "published" boolean DEFAULT 'f', "created_at" datetime, "updated_at" datetime, "slug" varchar(255), "js_content" text, "css_content" text, "draft_js_content" text, "draft_css_content" text) 
900
+  (1.2ms) CREATE INDEX "index_activeadmin_cms_pages_on_category" ON "activeadmin_cms_pages" ("category")
901
+  (1.0ms) CREATE INDEX "index_activeadmin_cms_pages_on_slug" ON "activeadmin_cms_pages" ("slug")
902
+  (1.1ms) CREATE TABLE "activeadmin_cms_posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "content" text, "published" boolean DEFAULT 'f', "created_at" datetime, "updated_at" datetime)
903
+  (1.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
904
+  (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
905
+  (0.1ms) SELECT version FROM "schema_migrations"
906
+  (1.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20131024214930')
907
+  (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20131020140024')
908
+  (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20131020152912')
909
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20131020181730')
910
+  (1.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20131020224503')
911
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
912
+  (1.3ms) DELETE FROM "activeadmin_cms_assets";
913
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
914
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'activeadmin_cms_assets';
915
+  (5.8ms) DELETE FROM "activeadmin_cms_pages";
916
+  (0.1ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
917
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'activeadmin_cms_pages';
918
+  (1.3ms) DELETE FROM "activeadmin_cms_posts";
919
+  (0.2ms) SELECT name FROM sqlite_master WHERE type='table' AND name='sqlite_sequence';
920
+  (0.1ms) DELETE FROM sqlite_sequence where name = 'activeadmin_cms_posts';
921
+  (0.1ms) begin transaction
922
+ -----------------------------------------------------
923
+ #publish: test_0001_should change status to published
924
+ -----------------------------------------------------
925
+  (0.0ms) SAVEPOINT active_record_1
926
+  (0.2ms) RELEASE SAVEPOINT active_record_1
927
+  (0.0ms) SAVEPOINT active_record_1
928
+ SQL (30.5ms) INSERT INTO "activeadmin_cms_posts" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["content", "Foo content"], ["created_at", Thu, 24 Oct 2013 22:16:16 UTC +00:00], ["title", "Foo post"], ["updated_at", Thu, 24 Oct 2013 22:16:16 UTC +00:00]]
929
+ SQL (0.2ms) UPDATE "activeadmin_cms_posts" SET "published" = ?, "updated_at" = ? WHERE "activeadmin_cms_posts"."id" = 1 [["published", true], ["updated_at", Thu, 24 Oct 2013 22:16:16 UTC +00:00]]
930
+ ActiveadminCms::Post Load (0.1ms) SELECT "activeadmin_cms_posts".* FROM "activeadmin_cms_posts" WHERE "activeadmin_cms_posts"."id" = ? LIMIT 1 [["id", 1]]
931
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
932
+  (0.5ms) rollback transaction
933
+  (0.1ms) begin transaction
934
+ -----------------------------------------------------
935
+ #publish: test_0001_should change status to published
936
+ -----------------------------------------------------
937
+  (0.0ms) SAVEPOINT active_record_1
938
+  (0.0ms) RELEASE SAVEPOINT active_record_1
939
+  (0.0ms) SAVEPOINT active_record_1
940
+ ActiveadminCms::Page Exists (0.1ms) SELECT 1 AS one FROM "activeadmin_cms_pages" WHERE "activeadmin_cms_pages"."slug" = 'slug-1' LIMIT 1
941
+ SQL (0.5ms) INSERT INTO "activeadmin_cms_pages" ("content", "created_at", "slug", "title", "updated_at") VALUES (?, ?, ?, ?, ?) [["content", "Foo content"], ["created_at", Thu, 24 Oct 2013 22:16:16 UTC +00:00], ["slug", "slug-1"], ["title", "Foo page"], ["updated_at", Thu, 24 Oct 2013 22:16:16 UTC +00:00]]
942
+ ActiveadminCms::Page Exists (0.1ms) SELECT 1 AS one FROM "activeadmin_cms_pages" WHERE ("activeadmin_cms_pages"."slug" = 'slug-1' AND "activeadmin_cms_pages"."id" != 1) LIMIT 1
943
+ SQL (0.2ms) UPDATE "activeadmin_cms_pages" SET "content" = ?, "published" = ?, "updated_at" = ? WHERE "activeadmin_cms_pages"."id" = 1 [["content", nil], ["published", true], ["updated_at", Thu, 24 Oct 2013 22:16:16 UTC +00:00]]
944
+ ActiveadminCms::Page Load (0.1ms) SELECT "activeadmin_cms_pages".* FROM "activeadmin_cms_pages" WHERE "activeadmin_cms_pages"."id" = ? LIMIT 1 [["id", 1]]
945
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
946
+  (0.5ms) rollback transaction
947
+  (0.0ms) begin transaction
948
+ --------------------------------------------------
949
+ #publish: test_0002_should move content from draft
950
+ --------------------------------------------------
951
+  (0.0ms) SAVEPOINT active_record_1
952
+  (0.0ms) RELEASE SAVEPOINT active_record_1
953
+  (0.0ms) SAVEPOINT active_record_1
954
+ ActiveadminCms::Page Exists (0.1ms) SELECT 1 AS one FROM "activeadmin_cms_pages" WHERE "activeadmin_cms_pages"."slug" = 'slug-2' LIMIT 1
955
+ SQL (0.3ms) INSERT INTO "activeadmin_cms_pages" ("content", "created_at", "slug", "title", "updated_at") VALUES (?, ?, ?, ?, ?) [["content", "Foo content"], ["created_at", Thu, 24 Oct 2013 22:16:16 UTC +00:00], ["slug", "slug-2"], ["title", "Foo page"], ["updated_at", Thu, 24 Oct 2013 22:16:16 UTC +00:00]]
956
+ ActiveadminCms::Page Exists (0.1ms) SELECT 1 AS one FROM "activeadmin_cms_pages" WHERE ("activeadmin_cms_pages"."slug" = 'slug-2' AND "activeadmin_cms_pages"."id" != 1) LIMIT 1
957
+ SQL (0.1ms) UPDATE "activeadmin_cms_pages" SET "draft_content" = ?, "content" = ?, "published" = ?, "updated_at" = ? WHERE "activeadmin_cms_pages"."id" = 1 [["draft_content", "new content"], ["content", "new content"], ["published", true], ["updated_at", Thu, 24 Oct 2013 22:16:16 UTC +00:00]]
958
+ ActiveadminCms::Page Load (0.0ms) SELECT "activeadmin_cms_pages".* FROM "activeadmin_cms_pages" WHERE "activeadmin_cms_pages"."id" = ? LIMIT 1 [["id", 1]]
959
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
960
+  (0.4ms) rollback transaction
961
+  (0.0ms) begin transaction
962
+ ------------------------------
963
+ ActiveadminCmsTest: test_truth
964
+ ------------------------------
965
+  (0.1ms) SAVEPOINT active_record_1
966
+  (0.0ms) RELEASE SAVEPOINT active_record_1
967
+  (0.0ms) SAVEPOINT active_record_1
968
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
969
+  (0.0ms) rollback transaction
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeadmin_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Iskander Haziev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-21 00:00:00.000000000 Z
11
+ date: 2013-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -219,7 +219,8 @@ files:
219
219
  - app/assets/javascripts/activeadmin_cms/editor/ace.js
220
220
  - app/assets/javascripts/activeadmin_cms/helpers/assets_uploader.js
221
221
  - app/assets/stylesheets/activeadmin_cms/base.css
222
- - app/assets/stylesheets/activeadmin_cms/editor/ace.css
222
+ - app/assets/stylesheets/activeadmin_cms/editor/ace.css.scss
223
+ - app/assets/stylesheets/activeadmin_cms/partials/uploader.css.scss
223
224
  - app/controllers/activeadmin_cms/application_controller.rb
224
225
  - app/controllers/activeadmin_cms/assets_controller.rb
225
226
  - app/models/activeadmin_cms/asset.rb
@@ -240,6 +241,7 @@ files:
240
241
  - db/migrate/20131020152912_create_activeadmin_cms_pages.rb
241
242
  - db/migrate/20131020181730_add_slug_to_activeadmin_cms_pages.rb
242
243
  - db/migrate/20131020224503_create_activeadmin_cms_assets.rb
244
+ - db/migrate/20131024214930_add_js_and_css_to_pages.rb
243
245
  - lib/activeadmin_cms/engine.rb
244
246
  - lib/activeadmin_cms/version.rb
245
247
  - lib/activeadmin_cms.rb
@@ -1,8 +0,0 @@
1
- #active_admin_content form.activeadmin_cms_page {
2
- position: relative;
3
- }
4
- #active_admin_content form.activeadmin_cms_page #editor {
5
- width: 100%;
6
- height: 500px;
7
- position: relative;
8
- }