refinerycms 0.9.5.7 → 0.9.5.8
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/refinery/dialog.js +1 -1
- data/public/javascripts/thickbox.js +3 -3
- data/public/javascripts/wymeditor/jquery.refinery.wymeditor.js +1 -1
- data/vendor/plugins/images/app/views/admin/images/_form.html.erb +1 -2
- data/vendor/plugins/inquiries/app/controllers/inquiries_controller.rb +17 -9
- data/vendor/plugins/news/app/controllers/news_items_controller.rb +16 -6
- data/vendor/plugins/pages/app/controllers/pages_controller.rb +10 -2
- data/vendor/plugins/pages/app/views/admin/pages/_form.html.erb +8 -1
- data/vendor/plugins/refinery/app/views/shared/admin/_make_sortable.html.erb +11 -13
- data/vendor/plugins/refinery/lib/crud.rb +10 -2
- data/vendor/plugins/refinery/lib/refinery/admin_base_controller.rb +1 -1
- data/vendor/plugins/refinery/lib/refinery/application_controller.rb +1 -1
- metadata +2 -2
@@ -33,7 +33,7 @@ FastInit.addOnLoad(function()
|
|
33
33
|
switch_area(selected);
|
34
34
|
}
|
35
35
|
|
36
|
-
$$('.close_dialog').each(function(close) {
|
36
|
+
$$('#TB_window .close_dialog').each(function(close) {
|
37
37
|
close.observe('click', function(e)
|
38
38
|
{
|
39
39
|
if (parent && typeof(parent.tb_remove) == "function") {
|
@@ -129,7 +129,7 @@ function tb_show(caption, url, imageGroup, ajax_loaded_callback) {//function cal
|
|
129
129
|
TB_HEIGHT = imageHeight + 60;
|
130
130
|
jQuery("#TB_window").append("<a href='' id='TB_ImageOff' title='Close'><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt='"+caption+"'/></a>" + "<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='Close'>close</a> or Esc Key</div>");
|
131
131
|
|
132
|
-
jQuery(".close_dialog").click(tb_remove);
|
132
|
+
jQuery("#TB_window .close_dialog").click(tb_remove);
|
133
133
|
|
134
134
|
if (!(TB_PrevHTML === "")) {
|
135
135
|
function goPrev(){
|
@@ -222,7 +222,7 @@ function tb_show(caption, url, imageGroup, ajax_loaded_callback) {//function cal
|
|
222
222
|
}
|
223
223
|
}
|
224
224
|
|
225
|
-
jQuery(".close_dialog").click(tb_remove);
|
225
|
+
jQuery("#TB_window .close_dialog").click(tb_remove);
|
226
226
|
|
227
227
|
if(url.indexOf('TB_inline') != -1){
|
228
228
|
jQuery("#TB_ajaxContent").append(jQuery('#' + params['inlineId']).children());
|
@@ -306,7 +306,7 @@ function tb_showIframe(){
|
|
306
306
|
|
307
307
|
function tb_remove() {
|
308
308
|
jQuery("#TB_imageOff").unbind("click");
|
309
|
-
jQuery(".close_dialog").unbind("click");
|
309
|
+
jQuery("#TB_window .close_dialog").unbind("click");
|
310
310
|
jQuery("#TB_window").fadeOut("fast",function(){jQuery('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();});
|
311
311
|
jQuery("#TB_load").remove();
|
312
312
|
if (typeof document.body.style.maxHeight == "undefined") {//if IE 6
|
@@ -1528,7 +1528,7 @@ WYMeditor.INIT_DIALOG = function(wym, selected, isIframe) {
|
|
1528
1528
|
var dialogType = doc.getElementById('wym_dialog_type').value;
|
1529
1529
|
var replaceable = wym._selected_image ? jQuery(wym._selected_image) : jQuery(wym._doc.body).find('#replace_me_with_' + wym._current_unique_stamp);
|
1530
1530
|
|
1531
|
-
[dialog.select(".close_dialog"), $(doc.body).select(".close_dialog")].flatten().uniq().each(function(button)
|
1531
|
+
[dialog.select("#TB_window .close_dialog"), $(doc.body).select("#TB_window .close_dialog")].flatten().uniq().each(function(button)
|
1532
1532
|
{
|
1533
1533
|
button.observe('click', function(e){this.close_dialog(e, true)}.bind(wym));
|
1534
1534
|
});
|
@@ -12,8 +12,7 @@
|
|
12
12
|
</div>
|
13
13
|
<div class='form-actions'>
|
14
14
|
<%= f.submit 'Save', :id => "submit_button" %>
|
15
|
-
or
|
16
|
-
<%= link_to "Cancel", admin_images_url, :title => "Cancelling will lose all changes you've made to this image", :class => 'close_dialog' %>
|
15
|
+
<%= "or #{link_to "Cancel", admin_images_url, :title => "Cancelling will lose all changes you've made to this image", :class => "close_dialog"}" if !from_dialog? or @thickbox %>
|
17
16
|
</div>
|
18
17
|
|
19
18
|
<% if @thickbox %>
|
@@ -1,41 +1,49 @@
|
|
1
1
|
class InquiriesController < ApplicationController
|
2
|
-
|
2
|
+
|
3
3
|
before_filter :find_page, :only => [:create, :new]
|
4
|
-
|
4
|
+
|
5
5
|
def thank_you
|
6
6
|
@page = Page.find_by_menu_match("^/inquiries/thank_you$", :include => [:parts, :slugs])
|
7
|
+
|
8
|
+
respond_to do |wants|
|
9
|
+
wants.html
|
10
|
+
end
|
7
11
|
end
|
8
|
-
|
12
|
+
|
9
13
|
def new
|
10
14
|
@inquiry = Inquiry.new
|
15
|
+
|
16
|
+
respond_to do |wants|
|
17
|
+
wants.html
|
18
|
+
end
|
11
19
|
end
|
12
|
-
|
20
|
+
|
13
21
|
def create
|
14
22
|
@inquiry = Inquiry.new(params[:inquiry])
|
15
|
-
|
23
|
+
|
16
24
|
if @inquiry.save
|
17
25
|
begin
|
18
26
|
InquiryMailer.deliver_notification(@inquiry, request)
|
19
27
|
rescue
|
20
28
|
logger.warn "There was an error delivering an inquiry notification.\n#{$!}\n"
|
21
29
|
end
|
22
|
-
|
30
|
+
|
23
31
|
begin
|
24
32
|
InquiryMailer.deliver_confirmation(@inquiry, request)
|
25
33
|
rescue
|
26
34
|
logger.warn "There was an error delivering an inquiry confirmation:\n#{$!}\n"
|
27
35
|
end
|
28
|
-
|
36
|
+
|
29
37
|
redirect_to thank_you_inquiries_url
|
30
38
|
else
|
31
39
|
render :action => 'new'
|
32
40
|
end
|
33
41
|
end
|
34
|
-
|
42
|
+
|
35
43
|
protected
|
36
44
|
|
37
45
|
def find_page
|
38
46
|
@page = Page.find_by_link_url('/inquiries/new', :include => [:parts, :slugs])
|
39
47
|
end
|
40
|
-
|
48
|
+
|
41
49
|
end
|
@@ -1,11 +1,21 @@
|
|
1
1
|
class NewsItemsController < ApplicationController
|
2
|
-
|
2
|
+
|
3
3
|
before_filter :get_latest_posts
|
4
4
|
before_filter :load_page, :only => [:index, :show]
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
|
6
|
+
def index
|
7
|
+
respond_to do |wants|
|
8
|
+
wants.html
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
def show
|
13
|
+
@news_item = NewsItem.find(params[:id], :conditions => ["publish_date < ?", Time.now])
|
14
|
+
|
15
|
+
respond_to do |wants|
|
16
|
+
wants.html
|
17
|
+
end
|
18
|
+
end
|
9
19
|
|
10
20
|
protected
|
11
21
|
|
@@ -16,5 +26,5 @@ protected
|
|
16
26
|
def load_page
|
17
27
|
@page = Page.find_by_link_url("/news", :include => [:parts, :slugs])
|
18
28
|
end
|
19
|
-
|
29
|
+
|
20
30
|
end
|
@@ -3,18 +3,26 @@ class PagesController < ApplicationController
|
|
3
3
|
def home
|
4
4
|
@page = Page.find_by_link_url("/", :include => [:parts, :slugs])
|
5
5
|
error_404 if @page.nil?
|
6
|
+
|
7
|
+
respond_to do |wants|
|
8
|
+
wants.html
|
9
|
+
end
|
6
10
|
end
|
7
11
|
|
8
12
|
def show
|
9
13
|
@page = Page.find(params[:id], :include => [:parts, :slugs])
|
10
|
-
|
14
|
+
|
11
15
|
error_404 unless @page.live? or (logged_in? and current_user.authorized_plugins.include?("Pages"))
|
12
|
-
|
16
|
+
|
13
17
|
# if the admin wants this to be a "placeholder" page which goes to its first child, go to that instead.
|
14
18
|
if @page.skip_to_first_child
|
15
19
|
first_live_child = @page.children.find_by_draft(false, :order => "position ASC")
|
16
20
|
redirect_to first_live_child.url unless first_live_child.nil?
|
17
21
|
end
|
22
|
+
|
23
|
+
respond_to do |wants|
|
24
|
+
wants.html
|
25
|
+
end
|
18
26
|
end
|
19
27
|
|
20
28
|
end
|
@@ -116,7 +116,10 @@
|
|
116
116
|
</div>
|
117
117
|
<div class='form-actions'>
|
118
118
|
<%= f.submit 'Save', :id => "submit_button", :class => "wymupdate" %>
|
119
|
-
or
|
119
|
+
or
|
120
|
+
<%= hidden_field_tag :continue_editing, false %>
|
121
|
+
<%= f.submit 'Save & Continue Editing', :id => "submit_continue_button", :class => "wymupdate" %>
|
122
|
+
or
|
120
123
|
<%= link_to "Cancel", admin_pages_url, :title => "Cancelling will lose all changes you've made to this page", :id => "cancel_button", :class => "close_dialog" %>
|
121
124
|
</div>
|
122
125
|
<div id='new_page_part_dialog' style='display: none'>
|
@@ -160,6 +163,10 @@
|
|
160
163
|
}
|
161
164
|
});
|
162
165
|
|
166
|
+
$('submit_continue_button').observe("click", function(e) {
|
167
|
+
$('continue_editing').value = true;
|
168
|
+
});
|
169
|
+
|
163
170
|
<% if RefinerySetting.find_or_set(:new_page_parts, false) %>
|
164
171
|
$('add_page_part').observe('click', function(e) {
|
165
172
|
tb_show('Create Content Section', '#?auto_size_content=true&draggable=true&titlebar=true&inlineId=new_page_part_dialog&TB_inline=true&modal=true');
|
@@ -6,6 +6,7 @@
|
|
6
6
|
content_for :head do
|
7
7
|
%>
|
8
8
|
<script type='text/javascript'>
|
9
|
+
reordering_button_enabled = true;
|
9
10
|
FastInit.addOnLoad(function()
|
10
11
|
{
|
11
12
|
$('reorder_action').observe('click', enable_reordering);
|
@@ -14,17 +15,15 @@
|
|
14
15
|
|
15
16
|
disable_reordering = function(e)
|
16
17
|
{
|
17
|
-
|
18
|
+
if (reordering_button_enabled) {
|
19
|
+
$('<%= list_id %>').removeClassName('reordering');
|
18
20
|
|
19
|
-
|
21
|
+
Sortable.destroy("<%= list_id %>");
|
20
22
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
{
|
26
|
-
e.stop();
|
27
|
-
}
|
23
|
+
$('reorder_action_done').hide();
|
24
|
+
$('reorder_action').show();
|
25
|
+
}
|
26
|
+
if (e) { e.stop(); }
|
28
27
|
}
|
29
28
|
|
30
29
|
enable_reordering = function(e)
|
@@ -50,11 +49,13 @@
|
|
50
49
|
, scroll: window
|
51
50
|
, tree: <%= tree %>
|
52
51
|
, onUpdate:function() {
|
52
|
+
reordering_button_enabled = false;
|
53
53
|
new Ajax.Updater('<%= list_id %>', '<%= update_url %>',
|
54
54
|
{
|
55
55
|
asynchronous:true
|
56
56
|
, evalScripts:true
|
57
57
|
, parameters: Sortable.serialize('<%= list_id %>') + '&tree=<%= tree %>' + '&authenticity_token=' + encodeURIComponent($('reorder_authenticity_token').value)
|
58
|
+
, onComplete: function(e) { reordering_button_enabled = true; }
|
58
59
|
});
|
59
60
|
}
|
60
61
|
});
|
@@ -62,10 +63,7 @@
|
|
62
63
|
$('reorder_action').hide();
|
63
64
|
$('reorder_action_done').show();
|
64
65
|
|
65
|
-
if (e)
|
66
|
-
{
|
67
|
-
e.stop();
|
68
|
-
}
|
66
|
+
if (e) { e.stop(); }
|
69
67
|
}
|
70
68
|
</script>
|
71
69
|
<% end %>
|
@@ -37,7 +37,11 @@ module Crud
|
|
37
37
|
@#{singular_name} = #{class_name}.create(params[:#{singular_name}])
|
38
38
|
if @#{singular_name}.valid?
|
39
39
|
flash[:notice] = "'\#{@#{singular_name}.#{options[:title_attribute]}}' was successfully created."
|
40
|
-
|
40
|
+
unless params[:continue_editing] =~ /true|on|1/
|
41
|
+
redirect_to admin_#{plural_name}_url
|
42
|
+
else
|
43
|
+
redirect_to :back
|
44
|
+
end
|
41
45
|
else
|
42
46
|
render :action => 'new'
|
43
47
|
end
|
@@ -51,7 +55,11 @@ module Crud
|
|
51
55
|
@#{singular_name}.update_attributes(params[:#{singular_name}])
|
52
56
|
if @#{singular_name}.valid?
|
53
57
|
flash[:notice] = "'\#{@#{singular_name}.#{options[:title_attribute]}}' was successfully updated."
|
54
|
-
|
58
|
+
unless params[:continue_editing] =~ /true|on|1/
|
59
|
+
redirect_to admin_#{plural_name}_url
|
60
|
+
else
|
61
|
+
redirect_to :back
|
62
|
+
end
|
55
63
|
else
|
56
64
|
render :action => 'edit'
|
57
65
|
end
|
@@ -19,7 +19,7 @@ protected
|
|
19
19
|
def error_404
|
20
20
|
@page = Page.find_by_menu_match("^/404$", :include => [:parts, :slugs])
|
21
21
|
@page[:body] = @page[:body].gsub(/href=(\'|\")\/(\'|\")/, "href='/admin'").gsub("home page", "Dashboard")
|
22
|
-
render :template => "/pages/show"
|
22
|
+
render :template => "/pages/show", :status => 404
|
23
23
|
end
|
24
24
|
|
25
25
|
def restrict_plugins
|
@@ -13,7 +13,7 @@ class Refinery::ApplicationController < ActionController::Base
|
|
13
13
|
|
14
14
|
def error_404
|
15
15
|
@page = Page.find_by_menu_match("^/404$", :include => [:parts, :slugs])
|
16
|
-
render :template => "/pages/show"
|
16
|
+
render :template => "/pages/show", :status => 404
|
17
17
|
end
|
18
18
|
|
19
19
|
def home_page?
|
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.5.
|
4
|
+
version: 0.9.5.8
|
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-11-
|
14
|
+
date: 2009-11-16 00:00:00 +13:00
|
15
15
|
default_executable: refinery
|
16
16
|
dependencies: []
|
17
17
|
|