alchemy_cms 2.2.rc13 → 2.2.rc14
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +3 -0
- data/alchemy_cms.gemspec +1 -0
- data/app/assets/javascripts/alchemy/alchemy.base.js +95 -94
- data/app/assets/javascripts/alchemy/alchemy.buttons.js +15 -11
- data/app/assets/javascripts/alchemy/alchemy.datepicker.js +18 -18
- data/app/assets/javascripts/alchemy/alchemy.dirty.js +20 -20
- data/app/assets/javascripts/alchemy/alchemy.dragndrop.js +50 -44
- data/app/assets/javascripts/alchemy/alchemy.element_editor_selector.js +15 -12
- data/app/assets/javascripts/alchemy/alchemy.elements_window.js +47 -43
- data/app/assets/javascripts/alchemy/alchemy.file_progress.js +27 -17
- data/app/assets/javascripts/alchemy/alchemy.growler.js +19 -15
- data/app/assets/javascripts/alchemy/alchemy.html5.js +1 -2
- data/app/assets/javascripts/alchemy/alchemy.image_cropper.js +10 -11
- data/app/assets/javascripts/alchemy/alchemy.jquery_loader.js +6 -6
- data/app/assets/javascripts/alchemy/alchemy.js_extensions.js +4 -6
- data/app/assets/javascripts/alchemy/alchemy.menubar.js +16 -20
- data/app/assets/javascripts/alchemy/alchemy.page_sorter.js +18 -16
- data/app/assets/javascripts/alchemy/alchemy.preview.js +30 -30
- data/app/assets/javascripts/alchemy/alchemy.preview_window.js +50 -42
- data/app/assets/javascripts/alchemy/alchemy.routes.js.erb +11 -11
- data/app/assets/javascripts/alchemy/alchemy.swf_upload.js +83 -86
- data/app/assets/javascripts/alchemy/alchemy.uploader.js +106 -112
- data/app/assets/javascripts/alchemy/alchemy.windows.js +158 -130
- data/app/assets/stylesheets/alchemy/base.css.scss +7 -1
- data/app/assets/stylesheets/alchemy/buttons.css.scss +31 -25
- data/app/assets/stylesheets/alchemy/elements.css.scss +4 -0
- data/app/controllers/alchemy/admin/base_controller.rb +5 -1
- data/app/helpers/alchemy/admin/base_helper.rb +21 -13
- data/app/helpers/alchemy/admin/contents_helper.rb +52 -11
- data/app/helpers/alchemy/admin/elements_helper.rb +0 -1
- data/app/helpers/alchemy/admin/essences_helper.rb +5 -5
- data/app/helpers/alchemy/essences_helper.rb +1 -0
- data/app/models/alchemy/content.rb +102 -91
- data/app/models/alchemy/essence_boolean.rb +8 -0
- data/app/models/alchemy/essence_select.rb +7 -0
- data/app/sweepers/alchemy/content_sweeper.rb +2 -4
- data/app/views/alchemy/admin/clipboard/clear.js.erb +3 -2
- data/app/views/alchemy/admin/clipboard/index.html.erb +2 -2
- data/app/views/alchemy/admin/contents/create.js.erb +2 -0
- data/app/views/alchemy/admin/contents/destroy.js.coffee +4 -0
- data/app/views/alchemy/admin/contents/new.html.erb +1 -1
- data/app/views/alchemy/admin/elements/_element_foot.html.erb +3 -2
- data/app/views/alchemy/admin/elements/create.js.coffee +31 -0
- data/app/views/alchemy/admin/elements/fold.js.coffee +37 -0
- data/app/views/alchemy/admin/essence_pictures/assign.js.coffee +15 -0
- data/app/views/alchemy/admin/essence_pictures/destroy.js.coffee +19 -0
- data/app/views/alchemy/admin/essence_pictures/edit.html.erb +12 -2
- data/app/views/alchemy/admin/layoutpages/_layoutpage.html.erb +1 -1
- data/app/views/alchemy/admin/pages/_page.html.erb +1 -1
- data/app/views/alchemy/admin/pages/destroy.js.coffee +19 -0
- data/app/views/alchemy/admin/pages/edit.html.erb +5 -5
- data/app/views/alchemy/admin/pages/update.js.coffee +36 -0
- data/app/views/alchemy/admin/resources/_form.html.erb +12 -1
- data/app/views/alchemy/admin/resources/_resource.html.erb +6 -3
- data/app/views/alchemy/admin/resources/_table.html.erb +1 -1
- data/app/views/alchemy/admin/trash/clear.js.coffee +4 -0
- data/app/views/alchemy/admin/trash/index.html.erb +4 -4
- data/app/views/alchemy/elements/_article_editor.html.erb +4 -2
- data/app/views/alchemy/elements/_article_view.html.erb +7 -7
- data/app/views/alchemy/elements/_download_editor.html.erb +4 -1
- data/app/views/alchemy/elements/_download_view.html.erb +7 -3
- data/app/views/alchemy/elements/_image_mosaic_editor.html.erb +1 -0
- data/app/views/alchemy/elements/_image_mosaic_view.html.erb +11 -9
- data/app/views/alchemy/essences/_essence_boolean_editor.html.erb +14 -0
- data/app/views/alchemy/essences/_essence_boolean_view.html.erb +1 -0
- data/app/views/alchemy/essences/_essence_date_editor.html.erb +1 -1
- data/app/views/alchemy/essences/_essence_file_editor.html.erb +1 -0
- data/app/views/alchemy/essences/_essence_html_editor.html.erb +1 -1
- data/app/views/alchemy/essences/_essence_richtext_editor.html.erb +1 -1
- data/app/views/alchemy/essences/_essence_select_editor.html.erb +35 -0
- data/app/views/alchemy/essences/_essence_select_view.html.erb +1 -0
- data/app/views/alchemy/essences/_essence_text_editor.html.erb +29 -77
- data/app/views/alchemy/essences/_essence_text_view.html.erb +2 -2
- data/config/alchemy/elements.yml +72 -44
- data/config/locales/alchemy.de.yml +46 -45
- data/config/locales/alchemy.en.yml +90 -89
- data/db/migrate/20120608085509_create_alchemy_essence_selects.rb +11 -0
- data/db/migrate/20120611221734_create_alchemy_essence_booleans.rb +11 -0
- data/lib/alchemy/authentication_helpers.rb +3 -7
- data/lib/alchemy/engine.rb +3 -4
- data/lib/alchemy/essence.rb +24 -16
- data/lib/alchemy/resource.rb +22 -3
- data/lib/alchemy/resources_helper.rb +8 -0
- data/lib/alchemy/seeder.rb +26 -1
- data/lib/alchemy/upgrader.rb +70 -1
- data/lib/alchemy/version.rb +1 -1
- data/lib/alchemy_cms.rb +1 -0
- data/spec/controllers/admin/clipboard_controller_spec.rb +16 -4
- data/spec/controllers/admin/contents_controller_spec.rb +21 -4
- data/spec/dummy/app/models/event.rb +1 -1
- data/spec/dummy/db/schema.rb +18 -1
- data/spec/helpers/admin/contents_helper_spec.rb +3 -2
- data/spec/models/clipboard_spec.rb +14 -3
- data/spec/models/essence_boolean_spec.rb +15 -0
- data/spec/models/essence_select_spec.rb +15 -0
- data/spec/models/resource_spec.rb +113 -0
- metadata +40 -12
- data/app/views/alchemy/admin/contents/destroy.js.erb +0 -7
- data/app/views/alchemy/admin/elements/create.js.erb +0 -36
- data/app/views/alchemy/admin/elements/fold.js.erb +0 -41
- data/app/views/alchemy/admin/essence_pictures/assign.js.erb +0 -16
- data/app/views/alchemy/admin/essence_pictures/destroy.js.erb +0 -20
- data/app/views/alchemy/admin/pages/destroy.js.erb +0 -12
- data/app/views/alchemy/admin/pages/update.js.erb +0 -40
- data/app/views/alchemy/admin/trash/clear.js.erb +0 -3
- data/spec/dummy/app/models/.gitkeep +0 -0
@@ -1,4 +1,4 @@
|
|
1
1
|
class Event < ActiveRecord::Base
|
2
|
-
attr_accessible :name, :hidden_name, :starts_at, :ends_at, :description, :published, :entrance_fee
|
2
|
+
attr_accessible :name, :hidden_name, :starts_at, :ends_at, :description, :published, :entrance_fee, :location_id
|
3
3
|
validates_presence_of :name
|
4
4
|
end
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
#
|
12
12
|
# It's strongly recommended to check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(:version =>
|
14
|
+
ActiveRecord::Schema.define(:version => 20120611221734) do
|
15
15
|
|
16
16
|
create_table "alchemy_attachments", :force => true do |t|
|
17
17
|
t.string "name"
|
@@ -24,6 +24,14 @@ ActiveRecord::Schema.define(:version => 20120302040145) do
|
|
24
24
|
t.datetime "updated_at", :null => false
|
25
25
|
end
|
26
26
|
|
27
|
+
create_table "alchemy_essence_booleans", :force => true do |t|
|
28
|
+
t.boolean "value"
|
29
|
+
t.timestamps
|
30
|
+
t.userstamps
|
31
|
+
end
|
32
|
+
|
33
|
+
add_index "alchemy_essence_booleans", ["value"], :name => "index_alchemy_essence_booleans_on_value"
|
34
|
+
|
27
35
|
create_table "alchemy_cells", :force => true do |t|
|
28
36
|
t.integer "page_id"
|
29
37
|
t.string "name"
|
@@ -145,6 +153,14 @@ ActiveRecord::Schema.define(:version => 20120302040145) do
|
|
145
153
|
t.datetime "updated_at", :null => false
|
146
154
|
end
|
147
155
|
|
156
|
+
create_table "alchemy_essence_selects", :force => true do |t|
|
157
|
+
t.string "value"
|
158
|
+
t.timestamps
|
159
|
+
t.userstamps
|
160
|
+
end
|
161
|
+
|
162
|
+
add_index "alchemy_essence_selects", ["value"], :name => "index_alchemy_essence_selects_on_value"
|
163
|
+
|
148
164
|
create_table "alchemy_essence_texts", :force => true do |t|
|
149
165
|
t.text "body"
|
150
166
|
t.string "link"
|
@@ -275,6 +291,7 @@ ActiveRecord::Schema.define(:version => 20120302040145) do
|
|
275
291
|
t.text "description"
|
276
292
|
t.decimal "entrance_fee", :precision => 6, :scale => 2
|
277
293
|
t.boolean "published"
|
294
|
+
t.integer "location_id"
|
278
295
|
t.datetime "created_at", :null => false
|
279
296
|
t.datetime "updated_at", :null => false
|
280
297
|
end
|
@@ -16,11 +16,12 @@ describe Alchemy::Admin::ContentsHelper do
|
|
16
16
|
|
17
17
|
it "should render a link to add new content to element" do
|
18
18
|
helper.stub!(:render_icon).and_return('')
|
19
|
-
helper.render_new_content_link(@element).should match(/
|
19
|
+
helper.render_new_content_link(@element).should match(/a.+href.*admin\/elements\/#{@element.id}\/contents\/new/m)
|
20
20
|
end
|
21
21
|
|
22
22
|
it "should render a link to create a content in element" do
|
23
|
-
helper.
|
23
|
+
helper.stub!(:render_icon).and_return('')
|
24
|
+
helper.render_create_content_link(@element, 'headline').should match(/a.+href.*admin\/contents.+class.+button new_content_link.*data-method.+post/)
|
24
25
|
end
|
25
26
|
|
26
27
|
end
|
@@ -81,10 +81,21 @@ module Alchemy
|
|
81
81
|
end
|
82
82
|
|
83
83
|
describe '#clear' do
|
84
|
-
|
85
|
-
|
86
|
-
|
84
|
+
|
85
|
+
context "passing a category" do
|
86
|
+
it "should clear the category collection" do
|
87
|
+
clipboard.clear(:elements)
|
88
|
+
clipboard[:elements].should be_empty
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
context "passing no category" do
|
93
|
+
it "should clear the complete clipboard" do
|
94
|
+
clipboard.clear
|
95
|
+
clipboard.should be_empty
|
96
|
+
end
|
87
97
|
end
|
98
|
+
|
88
99
|
end
|
89
100
|
|
90
101
|
describe '#get' do
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module Alchemy
|
4
|
+
describe EssenceBoolean do
|
5
|
+
|
6
|
+
it "should act as essence" do
|
7
|
+
expect { EssenceBoolean.new.acts_as_essence? }.should_not raise_error(NoMethodError)
|
8
|
+
end
|
9
|
+
|
10
|
+
it "should have correct partial path" do
|
11
|
+
EssenceBoolean.new.to_partial_path.should == 'alchemy/essences/essence_boolean_view'
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module Alchemy
|
4
|
+
describe EssenceSelect do
|
5
|
+
|
6
|
+
it "should act as essence" do
|
7
|
+
expect { EssenceSelect.new.acts_as_essence? }.should_not raise_error(NoMethodError)
|
8
|
+
end
|
9
|
+
|
10
|
+
it "should have correct partial path" do
|
11
|
+
EssenceSelect.new.to_partial_path.should == 'alchemy/essences/essence_select_view'
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,113 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module Alchemy
|
4
|
+
describe Resource do
|
5
|
+
|
6
|
+
def module_definition
|
7
|
+
{
|
8
|
+
"name" => "event_list",
|
9
|
+
"engine_name" => "event_engine",
|
10
|
+
"navigation" => {
|
11
|
+
"name" => "modules.event_list",
|
12
|
+
"controller" => "admin/events",
|
13
|
+
"action" => "index",
|
14
|
+
"image" => "/assets/event_list_module.png"
|
15
|
+
}
|
16
|
+
}
|
17
|
+
end
|
18
|
+
|
19
|
+
def resource_relations
|
20
|
+
{
|
21
|
+
"event" => {
|
22
|
+
"location_id" => {
|
23
|
+
"attr_method" => "location#name",
|
24
|
+
"attr_type" => "string"
|
25
|
+
}
|
26
|
+
}
|
27
|
+
}
|
28
|
+
end
|
29
|
+
|
30
|
+
let(:resource) { Resource.new("admin/events", module_definition) }
|
31
|
+
|
32
|
+
describe "#initialize" do
|
33
|
+
it "should set an instance variable wich holds the controller path" do
|
34
|
+
resource.instance_variable_get(:@controller_path).should == "admin/events"
|
35
|
+
end
|
36
|
+
|
37
|
+
it "should set an instance variable wich holds the module definition" do
|
38
|
+
resource.instance_variable_get(:@module_definition).should == module_definition
|
39
|
+
end
|
40
|
+
|
41
|
+
it "should set the standard rails database attributes to be skipped" do
|
42
|
+
resource.skip_attributes.should == %W[id updated_at created_at creator_id updater_id]
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
describe "#model" do
|
47
|
+
it "should return the classified and constantized model name" do
|
48
|
+
resource.model.should == Event
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
describe "#resources_name" do
|
53
|
+
it "should return the resources name as a string" do
|
54
|
+
resource.resources_name.should == "events"
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
describe "#model_name" do
|
59
|
+
it "should return the model name (singularized and as a string)" do
|
60
|
+
resource.model_name.should == "event"
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
describe "#permission_scope" do
|
65
|
+
it "should set an instance variable wich holds the permission scope for declarative authorization" do
|
66
|
+
resource.permission_scope
|
67
|
+
resource.instance_variable_get(:@_permission).should == :admin_events
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
describe "#namespace_for_scope" do
|
72
|
+
it "should return the namespace" do
|
73
|
+
resource.namespace_for_scope.should == ["admin"]
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
describe "#attributes" do
|
78
|
+
it "should not return the to be skipped attributes" do
|
79
|
+
resource.class.const_get(:DEFAULT_SKIPPED_ATTRIBUTES).each do |skipped_attr|
|
80
|
+
resource.attributes.detect{|a| a[:name] == skipped_attr }.should == nil
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
context "when resource relations defined in the config.yml" do
|
85
|
+
it "should use the attribute location#name instead of location_id" do
|
86
|
+
Config.stub(:get).with(:resource_relations).and_return(resource_relations)
|
87
|
+
resource.attributes.detect{|a| a[:name] == "location#name" }.should == {:name=>"location#name", :type=> :string}
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
context "when no resource relations defined in the config.yml" do
|
92
|
+
it "should use the attribute location_id" do
|
93
|
+
Config.stub(:get).with(:resource_relations).and_return(nil)
|
94
|
+
resource.attributes.detect{|a| a[:name] == "location_id" }.should == {:name=>"location_id", :type=> :integer}
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
end
|
99
|
+
|
100
|
+
describe "#engine_name" do
|
101
|
+
it "should return the engine name of the module" do
|
102
|
+
resource.engine_name.should == "event_engine"
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
describe "#in_engine?" do
|
107
|
+
it "should return true if the module is shipped within an engine" do
|
108
|
+
resource.in_engine?.should == true
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
end
|
113
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alchemy_cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.rc14
|
5
5
|
prerelease: 4
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2012-06-
|
15
|
+
date: 2012-06-11 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: rails
|
@@ -222,6 +222,22 @@ dependencies:
|
|
222
222
|
- - ~>
|
223
223
|
- !ruby/object:Gem::Version
|
224
224
|
version: 3.2.3
|
225
|
+
- !ruby/object:Gem::Dependency
|
226
|
+
name: coffee-rails
|
227
|
+
requirement: !ruby/object:Gem::Requirement
|
228
|
+
none: false
|
229
|
+
requirements:
|
230
|
+
- - ~>
|
231
|
+
- !ruby/object:Gem::Version
|
232
|
+
version: 3.2.1
|
233
|
+
type: :runtime
|
234
|
+
prerelease: false
|
235
|
+
version_requirements: !ruby/object:Gem::Requirement
|
236
|
+
none: false
|
237
|
+
requirements:
|
238
|
+
- - ~>
|
239
|
+
- !ruby/object:Gem::Version
|
240
|
+
version: 3.2.1
|
225
241
|
- !ruby/object:Gem::Dependency
|
226
242
|
name: bumpy
|
227
243
|
requirement: !ruby/object:Gem::Requirement
|
@@ -468,12 +484,14 @@ files:
|
|
468
484
|
- app/models/alchemy/content.rb
|
469
485
|
- app/models/alchemy/element.rb
|
470
486
|
- app/models/alchemy/essence_audio.rb
|
487
|
+
- app/models/alchemy/essence_boolean.rb
|
471
488
|
- app/models/alchemy/essence_date.rb
|
472
489
|
- app/models/alchemy/essence_file.rb
|
473
490
|
- app/models/alchemy/essence_flash.rb
|
474
491
|
- app/models/alchemy/essence_html.rb
|
475
492
|
- app/models/alchemy/essence_picture.rb
|
476
493
|
- app/models/alchemy/essence_richtext.rb
|
494
|
+
- app/models/alchemy/essence_select.rb
|
477
495
|
- app/models/alchemy/essence_text.rb
|
478
496
|
- app/models/alchemy/essence_video.rb
|
479
497
|
- app/models/alchemy/folded_page.rb
|
@@ -502,7 +520,7 @@ files:
|
|
502
520
|
- app/views/alchemy/admin/clipboard/remove.js.erb
|
503
521
|
- app/views/alchemy/admin/contents/_missing.html.erb
|
504
522
|
- app/views/alchemy/admin/contents/create.js.erb
|
505
|
-
- app/views/alchemy/admin/contents/destroy.js.
|
523
|
+
- app/views/alchemy/admin/contents/destroy.js.coffee
|
506
524
|
- app/views/alchemy/admin/contents/new.html.erb
|
507
525
|
- app/views/alchemy/admin/contents/order.js.erb
|
508
526
|
- app/views/alchemy/admin/dashboard/index.html.erb
|
@@ -513,8 +531,8 @@ files:
|
|
513
531
|
- app/views/alchemy/admin/elements/_elements_select.html.erb
|
514
532
|
- app/views/alchemy/admin/elements/_new_element_form.html.erb
|
515
533
|
- app/views/alchemy/admin/elements/_picture_editor.html.erb
|
516
|
-
- app/views/alchemy/admin/elements/create.js.
|
517
|
-
- app/views/alchemy/admin/elements/fold.js.
|
534
|
+
- app/views/alchemy/admin/elements/create.js.coffee
|
535
|
+
- app/views/alchemy/admin/elements/fold.js.coffee
|
518
536
|
- app/views/alchemy/admin/elements/index.html.erb
|
519
537
|
- app/views/alchemy/admin/elements/list.js.erb
|
520
538
|
- app/views/alchemy/admin/elements/new.html.erb
|
@@ -523,9 +541,9 @@ files:
|
|
523
541
|
- app/views/alchemy/admin/elements/update.js.erb
|
524
542
|
- app/views/alchemy/admin/essence_files/assign.js.erb
|
525
543
|
- app/views/alchemy/admin/essence_files/edit.html.erb
|
526
|
-
- app/views/alchemy/admin/essence_pictures/assign.js.
|
544
|
+
- app/views/alchemy/admin/essence_pictures/assign.js.coffee
|
527
545
|
- app/views/alchemy/admin/essence_pictures/crop.html.erb
|
528
|
-
- app/views/alchemy/admin/essence_pictures/destroy.js.
|
546
|
+
- app/views/alchemy/admin/essence_pictures/destroy.js.coffee
|
529
547
|
- app/views/alchemy/admin/essence_pictures/edit.html.erb
|
530
548
|
- app/views/alchemy/admin/essence_pictures/save_link.js.erb
|
531
549
|
- app/views/alchemy/admin/essence_pictures/update.js.erb
|
@@ -547,7 +565,7 @@ files:
|
|
547
565
|
- app/views/alchemy/admin/pages/_sitemap.html.erb
|
548
566
|
- app/views/alchemy/admin/pages/configure.html.erb
|
549
567
|
- app/views/alchemy/admin/pages/configure_external.html.erb
|
550
|
-
- app/views/alchemy/admin/pages/destroy.js.
|
568
|
+
- app/views/alchemy/admin/pages/destroy.js.coffee
|
551
569
|
- app/views/alchemy/admin/pages/edit.html.erb
|
552
570
|
- app/views/alchemy/admin/pages/flush.js.erb
|
553
571
|
- app/views/alchemy/admin/pages/fold.js.erb
|
@@ -558,7 +576,7 @@ files:
|
|
558
576
|
- app/views/alchemy/admin/pages/show.html.erb
|
559
577
|
- app/views/alchemy/admin/pages/sort.js.erb
|
560
578
|
- app/views/alchemy/admin/pages/unlock.js.erb
|
561
|
-
- app/views/alchemy/admin/pages/update.js.
|
579
|
+
- app/views/alchemy/admin/pages/update.js.coffee
|
562
580
|
- app/views/alchemy/admin/partials/_flash.html.erb
|
563
581
|
- app/views/alchemy/admin/partials/_flash_notices.html.erb
|
564
582
|
- app/views/alchemy/admin/partials/_flash_upload.html.erb
|
@@ -588,7 +606,7 @@ files:
|
|
588
606
|
- app/views/alchemy/admin/resources/edit.html.erb
|
589
607
|
- app/views/alchemy/admin/resources/index.html.erb
|
590
608
|
- app/views/alchemy/admin/resources/new.html.erb
|
591
|
-
- app/views/alchemy/admin/trash/clear.js.
|
609
|
+
- app/views/alchemy/admin/trash/clear.js.coffee
|
592
610
|
- app/views/alchemy/admin/trash/index.html.erb
|
593
611
|
- app/views/alchemy/admin/users/_table.html.erb
|
594
612
|
- app/views/alchemy/admin/users/_user.html.erb
|
@@ -645,6 +663,8 @@ files:
|
|
645
663
|
- app/views/alchemy/elements/show.js.erb
|
646
664
|
- app/views/alchemy/essences/_essence_audio_editor.html.erb
|
647
665
|
- app/views/alchemy/essences/_essence_audio_view.html.erb
|
666
|
+
- app/views/alchemy/essences/_essence_boolean_editor.html.erb
|
667
|
+
- app/views/alchemy/essences/_essence_boolean_view.html.erb
|
648
668
|
- app/views/alchemy/essences/_essence_date_editor.html.erb
|
649
669
|
- app/views/alchemy/essences/_essence_date_view.html.erb
|
650
670
|
- app/views/alchemy/essences/_essence_file_editor.html.erb
|
@@ -658,6 +678,8 @@ files:
|
|
658
678
|
- app/views/alchemy/essences/_essence_picture_view.html.erb
|
659
679
|
- app/views/alchemy/essences/_essence_richtext_editor.html.erb
|
660
680
|
- app/views/alchemy/essences/_essence_richtext_view.html.erb
|
681
|
+
- app/views/alchemy/essences/_essence_select_editor.html.erb
|
682
|
+
- app/views/alchemy/essences/_essence_select_view.html.erb
|
661
683
|
- app/views/alchemy/essences/_essence_text_editor.html.erb
|
662
684
|
- app/views/alchemy/essences/_essence_text_view.html.erb
|
663
685
|
- app/views/alchemy/essences/_essence_video_editor.html.erb
|
@@ -751,6 +773,8 @@ files:
|
|
751
773
|
- db/migrate/20110919110451_add_default_role_to_users.rb
|
752
774
|
- db/migrate/20111116125112_namespace_alchemy_models.rb
|
753
775
|
- db/migrate/20120216135355_add_country_code_to_languages.rb
|
776
|
+
- db/migrate/20120608085509_create_alchemy_essence_selects.rb
|
777
|
+
- db/migrate/20120611221734_create_alchemy_essence_booleans.rb
|
754
778
|
- lib/alchemy/auth_engine.rb
|
755
779
|
- lib/alchemy/authentication_helpers.rb
|
756
780
|
- lib/alchemy/capistrano.rb
|
@@ -818,7 +842,6 @@ files:
|
|
818
842
|
- spec/dummy/app/controllers/errors_controller.rb
|
819
843
|
- spec/dummy/app/helpers/application_helper.rb
|
820
844
|
- spec/dummy/app/mailers/.gitkeep
|
821
|
-
- spec/dummy/app/models/.gitkeep
|
822
845
|
- spec/dummy/app/models/event.rb
|
823
846
|
- spec/dummy/app/views/layouts/.gitkeep
|
824
847
|
- spec/dummy/config.ru
|
@@ -877,11 +900,14 @@ files:
|
|
877
900
|
- spec/models/clipboard_spec.rb
|
878
901
|
- spec/models/content_spec.rb
|
879
902
|
- spec/models/element_spec.rb
|
903
|
+
- spec/models/essence_boolean_spec.rb
|
880
904
|
- spec/models/essence_picture_spec.rb
|
881
905
|
- spec/models/essence_richtext_spec.rb
|
906
|
+
- spec/models/essence_select_spec.rb
|
882
907
|
- spec/models/language_spec.rb
|
883
908
|
- spec/models/page_spec.rb
|
884
909
|
- spec/models/picture_spec.rb
|
910
|
+
- spec/models/resource_spec.rb
|
885
911
|
- spec/models/user_spec.rb
|
886
912
|
- spec/page_layout_spec.rb
|
887
913
|
- spec/routing_spec.rb
|
@@ -1035,7 +1061,6 @@ test_files:
|
|
1035
1061
|
- spec/dummy/app/controllers/errors_controller.rb
|
1036
1062
|
- spec/dummy/app/helpers/application_helper.rb
|
1037
1063
|
- spec/dummy/app/mailers/.gitkeep
|
1038
|
-
- spec/dummy/app/models/.gitkeep
|
1039
1064
|
- spec/dummy/app/models/event.rb
|
1040
1065
|
- spec/dummy/app/views/layouts/.gitkeep
|
1041
1066
|
- spec/dummy/config.ru
|
@@ -1094,11 +1119,14 @@ test_files:
|
|
1094
1119
|
- spec/models/clipboard_spec.rb
|
1095
1120
|
- spec/models/content_spec.rb
|
1096
1121
|
- spec/models/element_spec.rb
|
1122
|
+
- spec/models/essence_boolean_spec.rb
|
1097
1123
|
- spec/models/essence_picture_spec.rb
|
1098
1124
|
- spec/models/essence_richtext_spec.rb
|
1125
|
+
- spec/models/essence_select_spec.rb
|
1099
1126
|
- spec/models/language_spec.rb
|
1100
1127
|
- spec/models/page_spec.rb
|
1101
1128
|
- spec/models/picture_spec.rb
|
1129
|
+
- spec/models/resource_spec.rb
|
1102
1130
|
- spec/models/user_spec.rb
|
1103
1131
|
- spec/page_layout_spec.rb
|
1104
1132
|
- spec/routing_spec.rb
|
@@ -1,36 +0,0 @@
|
|
1
|
-
(function($) {
|
2
|
-
|
3
|
-
var $el;
|
4
|
-
|
5
|
-
<% if @cutted_element_id %>
|
6
|
-
$('.element_editor[data-element-id="<%= @cutted_element_id %>"]').remove();
|
7
|
-
<% end %>
|
8
|
-
|
9
|
-
<%- if @page.can_have_cells? -%>
|
10
|
-
Alchemy.selectOrCreateCellTab('<%= @cell.nil? ? "for_other_elements" : @cell.name -%>', '<%= @cell.nil? ? t("other Elements") : @cell.name_for_label -%>');
|
11
|
-
<%- end -%>
|
12
|
-
|
13
|
-
$('#cell_<%= @cell.nil? ? "for_other_elements" : @cell.name -%>').append('<%= escape_javascript render(:partial => "element", :object => @element, :locals => {:draggable => true}) -%>');
|
14
|
-
$('#cell_<%= @cell.nil? ? "for_other_elements" : @cell.name -%>').sortable('refresh');
|
15
|
-
Alchemy.growl('<%= t("successfully_added_element") -%>');
|
16
|
-
Alchemy.closeCurrentWindow();
|
17
|
-
|
18
|
-
<%- @element.rtf_contents.each do |content| -%>
|
19
|
-
Alchemy.Tinymce.addEditor('<%= content.form_field_id -%>');
|
20
|
-
<%- end -%>
|
21
|
-
|
22
|
-
Alchemy.PreviewWindow.refresh();
|
23
|
-
Alchemy.ElementEditorSelector.init();
|
24
|
-
|
25
|
-
$el = $('#element_<%= @element.id -%>');
|
26
|
-
$el.trigger('Alchemy.SelectElementEditor');
|
27
|
-
Alchemy.ElementDirtyObserver($el);
|
28
|
-
Alchemy.SelectBox('select', $el);
|
29
|
-
Alchemy.ButtonObserver('button.button', $el);
|
30
|
-
Alchemy.Datepicker('input[type="date"]', $el);
|
31
|
-
|
32
|
-
<%- if @clipboard.blank? -%>
|
33
|
-
$('#clipboard_button .icon.clipboard').removeClass('full');
|
34
|
-
<%- end -%>
|
35
|
-
|
36
|
-
})(jQuery);
|