comfortable_mexican_sofa 1.4.8 → 1.4.9
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.
- data/VERSION +1 -1
- data/app/assets/javascripts/comfortable_mexican_sofa/wymeditor/jquery.wymeditor.cms.js +83 -1
- data/app/controllers/cms_content_controller.rb +3 -1
- data/comfortable_mexican_sofa.gemspec +2 -2
- data/db/migrate/01_create_cms.rb +0 -2
- data/db/migrate/upgrades/02_upgrade_to_1_1_0.rb +0 -2
- data/db/migrate/upgrades/03_upgrade_to_1_2_0.rb +0 -2
- data/db/migrate/upgrades/04_upgrade_to_1_3_0.rb +0 -2
- data/db/migrate/upgrades/05_upgrade_to_1_4_0.rb +0 -2
- metadata +9 -9
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.4.
|
|
1
|
+
1.4.9
|
|
@@ -337,4 +337,86 @@ WYMeditor.editor.prototype.xhtml = function() {
|
|
|
337
337
|
var reg = /(>)(<)(\/*)/g;
|
|
338
338
|
html = html.replace(reg, '$1\r\n$2$3');
|
|
339
339
|
return html;
|
|
340
|
-
};
|
|
340
|
+
};
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* WYMeditor : what you see is What You Mean web-based editor
|
|
344
|
+
* Copyright (c) 2005 - 2009 Jean-Francois Hovinne, http://www.wymeditor.org/
|
|
345
|
+
* Dual licensed under the MIT (MIT-license.txt)
|
|
346
|
+
* and GPL (GPL-license.txt) licenses.
|
|
347
|
+
*
|
|
348
|
+
* For further information visit:
|
|
349
|
+
* http://www.wymeditor.org/
|
|
350
|
+
*
|
|
351
|
+
* File Name:
|
|
352
|
+
* jquery.wymeditor.embed.js
|
|
353
|
+
* Experimental embed plugin
|
|
354
|
+
*
|
|
355
|
+
* File Authors:
|
|
356
|
+
* Jonatan Lundin (jonatan.lundin a-t gmail dotcom)
|
|
357
|
+
* Roger Hu (roger.hu a-t gmail dotcom)
|
|
358
|
+
* Scott Nixon (citadelgrad a-t gmail dotcom)
|
|
359
|
+
*/
|
|
360
|
+
|
|
361
|
+
(function () {
|
|
362
|
+
function removeItem(item, arr) {
|
|
363
|
+
for (var i = arr.length; i--;) {
|
|
364
|
+
if (arr[i] === item) {
|
|
365
|
+
arr.splice(i, 1);
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
return arr;
|
|
369
|
+
}
|
|
370
|
+
if (WYMeditor && WYMeditor.XhtmlValidator._tags.param.attributes) {
|
|
371
|
+
|
|
372
|
+
WYMeditor.XhtmlValidator._tags.embed = {
|
|
373
|
+
"attributes":[
|
|
374
|
+
"allowscriptaccess",
|
|
375
|
+
"allowfullscreen",
|
|
376
|
+
"height",
|
|
377
|
+
"src",
|
|
378
|
+
"type",
|
|
379
|
+
"width"
|
|
380
|
+
]
|
|
381
|
+
};
|
|
382
|
+
|
|
383
|
+
WYMeditor.XhtmlValidator._tags.param.attributes = {
|
|
384
|
+
'0':'name',
|
|
385
|
+
'1':'type',
|
|
386
|
+
'valuetype':/^(data|ref|object)$/,
|
|
387
|
+
'2':'valuetype',
|
|
388
|
+
'3':'value'
|
|
389
|
+
};
|
|
390
|
+
|
|
391
|
+
WYMeditor.XhtmlValidator._tags.iframe = {
|
|
392
|
+
"attributes":[
|
|
393
|
+
"allowfullscreen",
|
|
394
|
+
"width",
|
|
395
|
+
"height",
|
|
396
|
+
"src",
|
|
397
|
+
"title",
|
|
398
|
+
"frameborder"
|
|
399
|
+
]
|
|
400
|
+
};
|
|
401
|
+
|
|
402
|
+
// Override the XhtmlSaxListener to allow param, embed and iframe.
|
|
403
|
+
//
|
|
404
|
+
// We have to do an explicit override
|
|
405
|
+
// of the function instead of just changing the startup parameters
|
|
406
|
+
// because those are only used on creation, and changing them after
|
|
407
|
+
// the fact won't affect the existing XhtmlSaxListener
|
|
408
|
+
var XhtmlSaxListener = WYMeditor.XhtmlSaxListener;
|
|
409
|
+
WYMeditor.XhtmlSaxListener = function () {
|
|
410
|
+
var listener = XhtmlSaxListener.call(this);
|
|
411
|
+
// param, embed and iframe should be inline tags so that they can
|
|
412
|
+
// be nested inside other elements
|
|
413
|
+
removeItem('param', listener.block_tags);
|
|
414
|
+
listener.inline_tags.push('param');
|
|
415
|
+
listener.inline_tags.push('embed');
|
|
416
|
+
listener.inline_tags.push('iframe');
|
|
417
|
+
return listener;
|
|
418
|
+
};
|
|
419
|
+
|
|
420
|
+
WYMeditor.XhtmlSaxListener.prototype = XhtmlSaxListener.prototype;
|
|
421
|
+
}
|
|
422
|
+
})();
|
|
@@ -42,7 +42,9 @@ protected
|
|
|
42
42
|
end
|
|
43
43
|
|
|
44
44
|
if @cms_site
|
|
45
|
-
params[:cms_path].
|
|
45
|
+
if params[:cms_path].present?
|
|
46
|
+
params[:cms_path].gsub!(/^#{@cms_site.path}/, '').gsub!(/^\//, '')
|
|
47
|
+
end
|
|
46
48
|
I18n.locale = @cms_site.locale
|
|
47
49
|
else
|
|
48
50
|
I18n.locale = I18n.default_locale
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = %q{comfortable_mexican_sofa}
|
|
8
|
-
s.version = "1.4.
|
|
8
|
+
s.version = "1.4.9"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
11
|
s.authors = ["Oleg Khabarov", "The Working Group Inc"]
|
|
12
|
-
s.date = %q{2011-09-
|
|
12
|
+
s.date = %q{2011-09-06}
|
|
13
13
|
s.description = %q{}
|
|
14
14
|
s.email = %q{oleg@theworkinggroup.ca}
|
|
15
15
|
s.extra_rdoc_files = [
|
data/db/migrate/01_create_cms.rb
CHANGED
|
@@ -108,7 +108,6 @@ class CreateCms < ActiveRecord::Migration
|
|
|
108
108
|
add_index :cms_categorizations, [:category_id, :categorized_type, :categorized_id], :unique => true,
|
|
109
109
|
:name => 'index_cms_categorizations_on_cat_id_and_catd_type_and_catd_id'
|
|
110
110
|
|
|
111
|
-
ActiveRecord::Base.establish_connection
|
|
112
111
|
end
|
|
113
112
|
|
|
114
113
|
def self.down
|
|
@@ -125,6 +124,5 @@ class CreateCms < ActiveRecord::Migration
|
|
|
125
124
|
drop_table :cms_categories
|
|
126
125
|
drop_table :cms_categorizations
|
|
127
126
|
|
|
128
|
-
ActiveRecord::Base.establish_connection
|
|
129
127
|
end
|
|
130
128
|
end
|
|
@@ -7,7 +7,6 @@ class UpgradeTo110 < ActiveRecord::Migration
|
|
|
7
7
|
rename_column :cms_blocks, :cms_page_id, :page_id
|
|
8
8
|
rename_column :cms_snippets, :cms_site_id, :site_id
|
|
9
9
|
rename_column :cms_uploads, :cms_site_id, :site_id
|
|
10
|
-
ActiveRecord::Base.establish_connection
|
|
11
10
|
end
|
|
12
11
|
|
|
13
12
|
def self.down
|
|
@@ -18,6 +17,5 @@ class UpgradeTo110 < ActiveRecord::Migration
|
|
|
18
17
|
rename_column :cms_layouts, :site_id, :cms_site_id
|
|
19
18
|
rename_column :cms_pages, :layout_id, :cms_layout_id
|
|
20
19
|
rename_column :cms_pages, :site_id, :cms_site_id
|
|
21
|
-
ActiveRecord::Base.establish_connection
|
|
22
20
|
end
|
|
23
21
|
end
|
|
@@ -8,12 +8,10 @@ class UpgradeTo120 < ActiveRecord::Migration
|
|
|
8
8
|
t.datetime :created_at
|
|
9
9
|
end
|
|
10
10
|
add_index :cms_revisions, [:record_type, :record_id, :created_at]
|
|
11
|
-
ActiveRecord::Base.establish_connection
|
|
12
11
|
end
|
|
13
12
|
|
|
14
13
|
def self.down
|
|
15
14
|
ComfortableMexicanSofa.establish_connection(ActiveRecord::Base)
|
|
16
15
|
drop_table :cms_revisions
|
|
17
|
-
ActiveRecord::Base.establish_connection
|
|
18
16
|
end
|
|
19
17
|
end
|
|
@@ -9,7 +9,6 @@ class UpgradeTo130 < ActiveRecord::Migration
|
|
|
9
9
|
add_column :cms_layouts, :is_shared, :boolean, :null => false, :default => false
|
|
10
10
|
add_column :cms_pages, :is_shared, :boolean, :null => false, :default => false
|
|
11
11
|
add_column :cms_snippets, :is_shared, :boolean, :null => false, :default => false
|
|
12
|
-
ActiveRecord::Base.establish_connection
|
|
13
12
|
end
|
|
14
13
|
|
|
15
14
|
def self.down
|
|
@@ -22,6 +21,5 @@ class UpgradeTo130 < ActiveRecord::Migration
|
|
|
22
21
|
remove_column :cms_layouts, :is_shared
|
|
23
22
|
remove_column :cms_pages, :is_shared
|
|
24
23
|
remove_column :cms_snippets, :is_shared
|
|
25
|
-
ActiveRecord::Base.establish_connection
|
|
26
24
|
end
|
|
27
25
|
end
|
|
@@ -20,7 +20,6 @@ class UpgradeTo140 < ActiveRecord::Migration
|
|
|
20
20
|
end
|
|
21
21
|
add_index :cms_categorizations, [:category_id, :categorized_type, :categorized_id], :unique => true,
|
|
22
22
|
:name => 'index_cms_categorizations_on_cat_id_and_catd_type_and_catd_id'
|
|
23
|
-
ActiveRecord::Base.establish_connection
|
|
24
23
|
end
|
|
25
24
|
|
|
26
25
|
def self.down
|
|
@@ -32,6 +31,5 @@ class UpgradeTo140 < ActiveRecord::Migration
|
|
|
32
31
|
|
|
33
32
|
drop_table :cms_categories
|
|
34
33
|
drop_table :cms_categorizations
|
|
35
|
-
ActiveRecord::Base.establish_connection
|
|
36
34
|
end
|
|
37
35
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: comfortable_mexican_sofa
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.4.
|
|
4
|
+
version: 1.4.9
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -10,12 +10,12 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2011-09-
|
|
13
|
+
date: 2011-09-06 00:00:00.000000000 -04:00
|
|
14
14
|
default_executable:
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
17
17
|
name: rails
|
|
18
|
-
requirement: &
|
|
18
|
+
requirement: &70300779511500 !ruby/object:Gem::Requirement
|
|
19
19
|
none: false
|
|
20
20
|
requirements:
|
|
21
21
|
- - ! '>='
|
|
@@ -23,10 +23,10 @@ dependencies:
|
|
|
23
23
|
version: 3.0.0
|
|
24
24
|
type: :runtime
|
|
25
25
|
prerelease: false
|
|
26
|
-
version_requirements: *
|
|
26
|
+
version_requirements: *70300779511500
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: active_link_to
|
|
29
|
-
requirement: &
|
|
29
|
+
requirement: &70300779510480 !ruby/object:Gem::Requirement
|
|
30
30
|
none: false
|
|
31
31
|
requirements:
|
|
32
32
|
- - ! '>='
|
|
@@ -34,10 +34,10 @@ dependencies:
|
|
|
34
34
|
version: 1.0.0
|
|
35
35
|
type: :runtime
|
|
36
36
|
prerelease: false
|
|
37
|
-
version_requirements: *
|
|
37
|
+
version_requirements: *70300779510480
|
|
38
38
|
- !ruby/object:Gem::Dependency
|
|
39
39
|
name: paperclip
|
|
40
|
-
requirement: &
|
|
40
|
+
requirement: &70300779509540 !ruby/object:Gem::Requirement
|
|
41
41
|
none: false
|
|
42
42
|
requirements:
|
|
43
43
|
- - ! '>='
|
|
@@ -45,7 +45,7 @@ dependencies:
|
|
|
45
45
|
version: 2.3.14
|
|
46
46
|
type: :runtime
|
|
47
47
|
prerelease: false
|
|
48
|
-
version_requirements: *
|
|
48
|
+
version_requirements: *70300779509540
|
|
49
49
|
description: ''
|
|
50
50
|
email: oleg@theworkinggroup.ca
|
|
51
51
|
executables: []
|
|
@@ -347,7 +347,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
347
347
|
version: '0'
|
|
348
348
|
segments:
|
|
349
349
|
- 0
|
|
350
|
-
hash:
|
|
350
|
+
hash: 99875934053295203
|
|
351
351
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
352
352
|
none: false
|
|
353
353
|
requirements:
|