refinerycms 0.9.2.2 → 0.9.3
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/public/javascripts/wymeditor/boot_wym.js +8 -17
- data/public/javascripts/wymeditor/jquery.refinery.wymeditor.js +29 -35
- data/vendor/plugins/authentication/init.rb +1 -1
- data/vendor/plugins/images/init.rb +1 -1
- data/vendor/plugins/inquiries/init.rb +1 -1
- data/vendor/plugins/news/init.rb +1 -0
- data/vendor/plugins/pages/app/views/admin/pages/_form.html.erb +2 -2
- data/vendor/plugins/pages/init.rb +1 -1
- data/vendor/plugins/refinery/lib/refinery/plugin.rb +2 -2
- data/vendor/plugins/refinery_settings/init.rb +1 -1
- metadata +2 -2
@@ -1,10 +1,15 @@
|
|
1
|
-
jQuery.noConflict();
|
1
|
+
jQuery.noConflict();
|
2
|
+
var wymeditor_inputs = [];
|
2
3
|
jQuery(function()
|
3
4
|
{
|
4
5
|
var wym_editors_loaded = 0;
|
5
|
-
|
6
|
+
wymeditor_inputs = jQuery('.wymeditor');
|
7
|
+
wymeditor_inputs.hide();
|
8
|
+
wymeditor_inputs.wymeditor(
|
6
9
|
{
|
7
10
|
skin: 'refinery'
|
11
|
+
, basePath: "/javascripts/wymeditor/"
|
12
|
+
, wymPath: "/javascripts/wymeditor/jquery.refinery.wymeditor.js"
|
8
13
|
, cssSkinPath: "/stylesheets/wymeditor/skins/"
|
9
14
|
, jsSkinPath: "/javascripts/wymeditor/skins/"
|
10
15
|
, langPath: "/javascripts/wymeditor/lang/"
|
@@ -136,9 +141,8 @@ jQuery(function()
|
|
136
141
|
, postInit: function(wym)
|
137
142
|
{
|
138
143
|
wym._iframe.style.height = wym._element.height() + "px";
|
139
|
-
|
140
144
|
wym_editors_loaded += 1;
|
141
|
-
if(WYMeditor.INSTANCES.length == wym_editors_loaded){
|
145
|
+
if(WYMeditor.INSTANCES.length == wym_editors_loaded){
|
142
146
|
WYMeditor.loaded();
|
143
147
|
}
|
144
148
|
}
|
@@ -146,18 +150,5 @@ jQuery(function()
|
|
146
150
|
|
147
151
|
});
|
148
152
|
|
149
|
-
WYMeditor.XhtmlParser.prototype.normalizeTag = function(tag)
|
150
|
-
{
|
151
|
-
// hack to solve unknown issue of whole page being eaten by safari on dialog open. (TODO: revisit)
|
152
|
-
if (jQuery.browser.safari && tag.id == "content")
|
153
|
-
{}
|
154
|
-
else
|
155
|
-
{
|
156
|
-
tag = tag.replace(/^([\s<\/>]*)|([\s<\/>]*)$/gm,'').toLowerCase();
|
157
|
-
}
|
158
|
-
var tags = this._Listener.getTagReplacements();
|
159
|
-
return tags[tag] ? tags[tag] : tag;
|
160
|
-
};
|
161
|
-
|
162
153
|
// custom function added by us to hook into when all wymeditor instances on the page have finally loaded:
|
163
154
|
WYMeditor.loaded = function(){}
|
@@ -30,17 +30,16 @@ if(!WYMeditor) var WYMeditor = {};
|
|
30
30
|
|
31
31
|
//Wrap the Firebug console in WYMeditor.console
|
32
32
|
(function() {
|
33
|
-
|
34
|
-
|
35
|
-
|
33
|
+
if ( !window.console || !console.firebug ) {
|
34
|
+
var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
|
35
|
+
"group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
|
36
36
|
|
37
|
-
|
38
|
-
|
39
|
-
|
37
|
+
WYMeditor.console = {};
|
38
|
+
for (var i = 0; i < names.length; ++i)
|
39
|
+
WYMeditor.console[names[i]] = function() {}
|
40
40
|
|
41
|
-
|
41
|
+
} else WYMeditor.console = window.console;
|
42
42
|
})();
|
43
|
-
|
44
43
|
jQuery.extend(WYMeditor, {
|
45
44
|
|
46
45
|
/*
|
@@ -238,7 +237,6 @@ jQuery.extend(WYMeditor, {
|
|
238
237
|
*/
|
239
238
|
|
240
239
|
editor : function(elem, options) {
|
241
|
-
|
242
240
|
/*
|
243
241
|
Constructor: WYMeditor.editor
|
244
242
|
|
@@ -271,31 +269,23 @@ jQuery.extend(WYMeditor, {
|
|
271
269
|
//store the HTML option, if any
|
272
270
|
if(this._options.html) this._html = this._options.html;
|
273
271
|
//get or compute the base path (where the main JS file is located)
|
274
|
-
this._options.basePath = this._options.basePath
|
275
|
-
|| this.computeBasePath();
|
272
|
+
this._options.basePath = this._options.basePath || this.computeBasePath();
|
276
273
|
//get or set the skin path (where the skin files are located)
|
277
|
-
this._options.skinPath = this._options.skinPath
|
278
|
-
|| this._options.basePath + WYMeditor.SKINS_DEFAULT_PATH
|
279
|
-
+ this._options.skin + '/';
|
274
|
+
this._options.skinPath = this._options.skinPath || this._options.basePath + WYMeditor.SKINS_DEFAULT_PATH + this._options.skin + '/';
|
280
275
|
// set css and js skin paths
|
281
276
|
this._options.cssSkinPath = (this._options.cssSkinPath || this._options.skinPath) + this._options.skin + "/";
|
282
277
|
this._options.jsSkinPath = (this._options.jsSkinPath || this._options.skinPath) + this._options.skin + "/";
|
283
278
|
//get or compute the main JS file location
|
284
|
-
this._options.wymPath = this._options.wymPath
|
285
|
-
|| this.computeWymPath();
|
279
|
+
this._options.wymPath = this._options.wymPath || this.computeWymPath();
|
286
280
|
//get or set the language files path
|
287
|
-
this._options.langPath = this._options.langPath
|
288
|
-
|| this._options.basePath + WYMeditor.LANG_DEFAULT_PATH;
|
281
|
+
this._options.langPath = this._options.langPath || this._options.basePath + WYMeditor.LANG_DEFAULT_PATH;
|
289
282
|
//get or set the designmode iframe's base path
|
290
|
-
this._options.iframeBasePath = this._options.iframeBasePath
|
291
|
-
|| this._options.basePath + WYMeditor.IFRAME_DEFAULT;
|
283
|
+
this._options.iframeBasePath = this._options.iframeBasePath || this._options.basePath + WYMeditor.IFRAME_DEFAULT;
|
292
284
|
//get or compute the jQuery JS file location
|
293
|
-
this._options.jQueryPath = this._options.jQueryPath
|
294
|
-
|| this.computeJqueryPath();
|
285
|
+
this._options.jQueryPath = this._options.jQueryPath || this.computeJqueryPath();
|
295
286
|
|
296
287
|
//initialize the editor instance
|
297
288
|
this.init();
|
298
|
-
|
299
289
|
}
|
300
290
|
|
301
291
|
});
|
@@ -1165,7 +1155,9 @@ WYMeditor.editor.prototype.replaceStrings = function(sVal) {
|
|
1165
1155
|
eval(jQuery.ajax({url:this._options.langPath
|
1166
1156
|
+ this._options.lang + '.js', async:false}).responseText);
|
1167
1157
|
} catch(e) {
|
1158
|
+
if (WYMeditor.console) {
|
1168
1159
|
WYMeditor.console.error("WYMeditor: error while parsing language file.");
|
1160
|
+
}
|
1169
1161
|
return sVal;
|
1170
1162
|
}
|
1171
1163
|
}
|
@@ -1394,27 +1386,29 @@ WYMeditor.editor.prototype.addCssRules = function(doc, aCss) {
|
|
1394
1386
|
/********** CONFIGURATION **********/
|
1395
1387
|
|
1396
1388
|
WYMeditor.editor.prototype.computeBasePath = function() {
|
1397
|
-
|
1398
|
-
|
1399
|
-
|
1389
|
+
if ((script_path = this.computeWymPath()) != null) {
|
1390
|
+
if ((src_parts = script_path.split('/')).length > 1) { src_parts.pop(); }
|
1391
|
+
return src_parts.join('/') + "/";
|
1392
|
+
}
|
1393
|
+
else {
|
1394
|
+
return null;
|
1395
|
+
}
|
1400
1396
|
};
|
1401
1397
|
|
1402
1398
|
WYMeditor.editor.prototype.computeWymPath = function() {
|
1403
|
-
|
1404
|
-
return (s.src && s.src.match(/jquery\.refinery\.wymeditor(\.pack){0,1}\.js(\?.*)?$/ ))
|
1405
|
-
})).attr('src');
|
1399
|
+
return jQuery('script[src*=jquery.refinery.wymeditor]').attr('src');
|
1406
1400
|
};
|
1407
1401
|
|
1408
1402
|
WYMeditor.editor.prototype.computeJqueryPath = function() {
|
1409
|
-
|
1410
|
-
|
1411
|
-
|
1403
|
+
return jQuery(jQuery.grep(jQuery('script'), function(s){
|
1404
|
+
return (s.src && s.src.match(/jquery(-(.*)){0,1}(\.pack|\.min|\.packed)?\.js(\?.*)?$/ ))
|
1405
|
+
})).attr('src');
|
1412
1406
|
};
|
1413
1407
|
|
1414
1408
|
WYMeditor.editor.prototype.computeCssPath = function() {
|
1415
|
-
|
1416
|
-
|
1417
|
-
|
1409
|
+
return jQuery(jQuery.grep(jQuery('link'), function(s){
|
1410
|
+
return (s.href && s.href.match(/wymeditor\/skins\/(.*)screen\.css(\?.*)?$/ ))
|
1411
|
+
})).attr('href');
|
1418
1412
|
};
|
1419
1413
|
|
1420
1414
|
WYMeditor.editor.prototype.configureEditorUsingRawCss = function() {
|
@@ -3,6 +3,6 @@ Refinery::Plugin.register do |plugin|
|
|
3
3
|
plugin.title = "Images"
|
4
4
|
plugin.description = "Manage images"
|
5
5
|
plugin.version = 1.0
|
6
|
-
plugin.menu_match = /admin\/(images)|(image_dialogs)
|
6
|
+
plugin.menu_match = /admin\/((images)|(image_dialogs))$/
|
7
7
|
plugin.activity = {:class => Image, :title => 'title', :url_prefix => 'edit', :conditions => "parent_id IS NULL", :created_image => "image_add.png", :updated_image => "image_edit.png"}
|
8
8
|
end
|
@@ -3,7 +3,7 @@ Refinery::Plugin.register do |plugin|
|
|
3
3
|
plugin.title = "Inquiries"
|
4
4
|
plugin.description = "Provides a contact form and stores inquiries"
|
5
5
|
plugin.version = 1.0
|
6
|
-
plugin.menu_match = /admin\/((inquiries)|(inquiry_settings))
|
6
|
+
plugin.menu_match = /admin\/((inquiries)|(inquiry_settings))$/
|
7
7
|
plugin.activity = [
|
8
8
|
{:class => Inquiry, :title => "name", :url_prefix => "", :created_image => "user_comment.png", :updated_image => "user_edit.png"},
|
9
9
|
{:class => InquirySetting, :url_prefix => "edit", :title => 'name', :url_prefix => 'edit', :created_image => "user_comment.png", :updated_image => "user_edit.png"}
|
data/vendor/plugins/news/init.rb
CHANGED
@@ -3,5 +3,6 @@ Refinery::Plugin.register do |plugin|
|
|
3
3
|
plugin.title = "News"
|
4
4
|
plugin.description = "Provides a blog-like news section"
|
5
5
|
plugin.version = 1.0
|
6
|
+
plugin.menu_match = /admin\/((news)|(news_items))$/
|
6
7
|
plugin.activity = {:class => NewsItem, :title => 'title', :url_prefix => 'edit'}
|
7
8
|
end
|
@@ -10,7 +10,7 @@
|
|
10
10
|
<ul id='page_parts'>
|
11
11
|
<% @page.parts.each do |p| %>
|
12
12
|
<li class='tab'>
|
13
|
-
<%= link_to p.title.titleize, "#part_#{p.title}" %>
|
13
|
+
<%= link_to p.title.titleize, "#part_#{p.title}", :class => ((@page.parts.index(p) == 0) ? "active" : nil) %>
|
14
14
|
</li>
|
15
15
|
<% end %>
|
16
16
|
</ul>
|
@@ -133,7 +133,7 @@
|
|
133
133
|
$('custom_title_' + type).show();
|
134
134
|
}
|
135
135
|
|
136
|
-
FastInit.addOnLoad(function(){
|
136
|
+
FastInit.addOnLoad(function(){
|
137
137
|
$('toggle_advanced_options').observe('click', function(e)
|
138
138
|
{
|
139
139
|
$('more_options').toggle();
|
@@ -3,6 +3,6 @@ Refinery::Plugin.register do |plugin|
|
|
3
3
|
plugin.title = "Pages"
|
4
4
|
plugin.description = "Manage content pages"
|
5
5
|
plugin.version = 1.0
|
6
|
-
plugin.menu_match = /admin\/(pages)|(page_dialogs)|(page_parts)
|
6
|
+
plugin.menu_match = /admin\/((pages)|(page_dialogs)|(page_parts))$/
|
7
7
|
plugin.activity = {:class => Page, :url_prefix => "edit_", :title => "title", :created_image => "page_add.png", :updated_image => "page_edit.png"}
|
8
8
|
end
|
@@ -12,7 +12,7 @@ module Refinery
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def highlighted?(params)
|
15
|
-
params[:controller] =~ menu_match
|
15
|
+
params[:controller] =~ self.menu_match
|
16
16
|
end
|
17
17
|
|
18
18
|
def activity
|
@@ -32,7 +32,7 @@ module Refinery
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def menu_match
|
35
|
-
@menu_match ||= /admin\/#{self.title.downcase}
|
35
|
+
@menu_match ||= /admin\/#{self.title.gsub(" ", "_").downcase}$/
|
36
36
|
end
|
37
37
|
|
38
38
|
def hide_from_menu
|
@@ -4,6 +4,6 @@ Refinery::Plugin.register do |plugin|
|
|
4
4
|
plugin.description = "Manage Refinery settings"
|
5
5
|
plugin.version = 1.0
|
6
6
|
plugin.url = "/admin/settings"
|
7
|
-
plugin.menu_match = /admin\/((refinery_settings)|(settings))
|
7
|
+
plugin.menu_match = /admin\/((refinery_settings)|(settings))$/
|
8
8
|
plugin.activity = {:class => RefinerySetting, :title => 'title', :url_prefix => 'edit', :created_image => "cog_add.png", :updated_image => "cog_edit.png"}
|
9
9
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: refinerycms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Resolve Digital
|
@@ -11,7 +11,7 @@ autorequire:
|
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
13
|
|
14
|
-
date: 2009-10-
|
14
|
+
date: 2009-10-12 00:00:00 +13:00
|
15
15
|
default_executable:
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|