Skip to content

Commit

Permalink
Merge branch '2-0-stable' into canonical
Browse files Browse the repository at this point in the history
  • Loading branch information
parndt committed May 25, 2012
2 parents 408fd16 + be6ff4a commit 26fd31e
Show file tree
Hide file tree
Showing 54 changed files with 787 additions and 552 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ notifications:
env:
- DB=postgresql
- DB=mysql
matrix:
allow_failures:
- rvm: rbx
rvm:
- 1.8.7
- 1.9.3
# - rbx
- rbx
- jruby
2 changes: 1 addition & 1 deletion authentication/refinerycms-authentication.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Gem::Specification.new do |s|
s.email = %q{info@refinerycms.com}
s.homepage = %q{http://refinerycms.com}
s.rubyforge_project = %q{refinerycms}
s.authors = ['Philip Arndt', 'Uģis Ozols', 'David Jones', 'Steven Heidel']
s.authors = ['Philip Arndt', 'Uģis Ozols', 'Rob Yurkowski', 'David Jones', 'Steven Heidel']
s.license = %q{MIT}
s.require_paths = %w(lib)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
end

it "loads plugins" do
user_plugin = Refinery::Plugins.registered.detect { |plugin| plugin.name == "refinery_users" }
plugins = Refinery::Plugins.new
plugins.should_receive(:in_menu).once{ [] }
plugins << user_plugin
plugins.should_receive(:in_menu).once{ [user_plugin] }

Refinery::Plugins.should_receive(:registered).at_least(1).times{ plugins }
get :new
Expand Down
38 changes: 30 additions & 8 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,36 @@

* [See full list](https://github.com/resolve/refinerycms/compare/2-0-stable...master)

## 2.0.4 [unreleased]
* Fixed stack level too deep error in Refinery::Menu#inspect. [Uģis Ozols](https://github.com/ugisozols)
* Fixed spec fails for newly generated engines and bumped gem versions in generated Gemfile. [Uģis Ozols](https://github.com/ugisozols)
* Fixed dialog opening issue when Refinery was mounted at different path than /. [Uģis Ozols](https://github.com/ugisozols)
* Added ability to specify site name in I18n locales too. [Philip Arndt](https://github.com/parndt)
* If parent page has custom view/layout template specified set this template as selected when editing sub page. [xyz](https://github.com/xyz)
* Fixed page ambiguity for different pages with the same slug in find_by_path. [Nicholas Schultz-Møller](https://github.com/nicholassm)
* Added Refinery::Core.force_ssl config option. [Philip Arndt](https://github.com/parndt)
## 2.0.5 [unreleased]
* Now extension/form generators will add all attributes to attr_accessible. [#1613](https://github.com/resolve/refinerycms/pull/1613). [Uģis Ozols](https://github.com/ugisozols)
* Fixed a bug where `refinerycms-images` was trying to load `refinerycms-resources`. [#1651](https://github.com/resolve/refinerycms/issues/1651). [Philip Arndt](https://github.com/parndt)
* Use new page part names (:body, :side_body) when generating extensions. [Uģis Ozols](https://github.com/ugisozols)
* Now extension generator will merge two seeds file in case user generates multiple resources for one extension. [#1532](https://github.com/resolve/refinerycms/issues/1532). [Uģis Ozols](https://github.com/ugisozols)
* Fix refinery:override bug where it won't match js files with more than extension. [#1685](https://github.com/resolve/refinerycms/issues/1685). [Uģis Ozols](https://github.com/ugisozols) and [Philip Arndt](https://github.com/parndt)
* Now `refinerycms-images` and `refinerycms-resources` will inherit the s3_region configuration from `refinerycms-core`.
[#1687](https://github.com/resolve/refinerycms/pull/1687). [Julien Palmas](https://github.com/bartocc)

## 2.0.4 [14 May 2012]
* IMPORTANT: Fixed a security issue whereby the user could bypass some access restrictions in the backend. [#1636](https://github.com/resolve/refinerycms/pull/1636). [Rob Yurkowski](https://github.com/robyurkowski) and [Uģis Ozols](https://github.com/ugisozols)
* Fixed stack level too deep error in Refinery::Menu#inspect. [#1551](https://github.com/resolve/refinerycms/pull/1551). [Uģis Ozols](https://github.com/ugisozols)
* Fixed spec fails for newly generated engines and bumped gem versions in generated Gemfile. [#1553](https://github.com/resolve/refinerycms/issues/1553). [Uģis Ozols](https://github.com/ugisozols)
* Fixed dialog opening issue when Refinery was mounted at different path than /. [#1555](https://github.com/resolve/refinerycms/issues/1555). [Uģis Ozols](https://github.com/ugisozols)
* Added ability to specify site name in I18n locales too. [#1576](https://github.com/resolve/refinerycms/pull/1576). [Philip Arndt](https://github.com/parndt)
* If parent page has custom view/layout template specified set this template as selected when editing sub page. [#1581](https://github.com/resolve/refinerycms/pull/1581). [xyz](https://github.com/xyz)
* Fixed page ambiguity for different pages with the same slug in find_by_path. [#1586](https://github.com/resolve/refinerycms/pull/1586). [Nicholas Schultz-Møller](https://github.com/nicholassm)
* Added Refinery::Core.force_ssl config option. [#1540](https://github.com/resolve/refinerycms/pull/1540). [Philip Arndt](https://github.com/parndt)
* Fixed bugs with page sweeper. [#1615](https://github.com/resolve/refinerycms/pull/1615). [f3ng3r](https://github.com/f3ng3r)
* Fixed image toggler show/hide bug. [#1587](https://github.com/resolve/refinerycms/issues/1587). [Gabriel Paladino](https://github.com/gabpaladino) & [Uģis Ozols](https://github.com/ugisozols)
* Fixed site bar caching bug when `cache_pages_full` is enabled and user is logged in. [#1609](https://github.com/resolve/refinerycms/pull/1609). [TheMaster](https://github.com/TheMaster)
* Made sure plugin params are set before checking exclusion, and removed unused variable. [#1602](https://github.com/resolve/refinerycms/pull/1602). [Rob Yurkowski](https://github.com/robyurkowski)
* Fixed link addition bug in the backend when switching locale. [#1583](https://github.com/resolve/refinerycms/pull/1583). [Vít Krchov](https://github.com/vita)
* Fixed bug with invalidating cached urls for all frontend locales. [#1479](https://github.com/resolve/refinerycms/pull/1479), [#1534](https://github.com/resolve/refinerycms/pull/1534). [Vít Krchov](https://github.com/vita), [Rob Yurkowski](https://github.com/robyurkowski) & [Uģis Ozols](https://github.com/ugisozols)
* Fixed image picker bug in Firefox 11 where content of the page was blank until you move the popup. [#1637](https://github.com/resolve/refinerycms/pull/1637). [Nelly Natalí](https://github.com/nnatali)
* Modified `Refinery.route_for_model` to fix a bug with the refinerycms-search plugin. [#1661](https://github.com/resolve/refinerycms/pull/1661). [Philip Arndt](https://github.com/parndt)
* Fixed engine generator for when you don't have a title field. [#1619](https://github.com/resolve/refinerycms/pull/1619). [Jean-Philippe Boily](https://github.com/jipiboily)
* Fixed `content_fu`. [#1628](https://github.com/resolve/refinerycms/issues/1628) [Philip Arndt](https://github.com/parndt)
* Added Russian translations for the preview button. [Vasiliy Ermolovich](https://github.com/nashby)
* Manually loaded translations associations to avoid N+1 queries in the pages backend. [#1633](https://github.com/resolve/refinerycms/pull/1633). [thedarkone](https://github.com/thedarkone)

## 2.0.3 [2 April 2012]
* Fixed missing authentication initializer. [Uģis Ozols](https://github.com/ugisozols)
Expand Down
64 changes: 33 additions & 31 deletions core/app/assets/javascripts/refinery/admin.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -63,38 +63,40 @@ $.fn.applyMinimumHeightFromChildren = function() {
}

init_modal_dialogs = function(){
$('a[href*="dialog=true"]').not('#dialog_container a').each(function(i, anchor) {
$(anchor).data({
'dialog-width': parseInt($($(anchor).attr('href').match("width=([0-9]*)")).last().get(0), 10)||928
, 'dialog-height': parseInt($($(anchor).attr('href').match("height=([0-9]*)")).last().get(0), 10)||473
, 'dialog-title': ($(anchor).attr('title') || $(anchor).attr('name') || $(anchor).html() || null)
}).attr('href', $(anchor).attr('href').replace(/(\&(amp\;)?)?dialog\=true/, '')
.replace(/(\&(amp\;)?)?width\=\d+/, '')
.replace(/(\&(amp\;)?)?height\=\d+/, '')
.replace(/(\?&(amp\;)?)/, '?')
.replace(/\?$/, ''))
.click(function(e){
$anchor = $(this);
iframe_src = (iframe_src = $anchor.attr('href'))
+ (iframe_src.indexOf('?') > -1 ? '&' : '?')
+ 'app_dialog=true&dialog=true';

iframe = $("<iframe id='dialog_iframe' frameborder='0' marginheight='0' marginwidth='0' border='0'></iframe>");
if(!$.browser.msie) { iframe.corner('8px'); }
iframe.dialog({
title: $anchor.data('dialog-title')
, modal: true
, resizable: false
, autoOpen: true
, width: $anchor.data('dialog-width')
, height: $anchor.data('dialog-height')
, open: onOpenDialog
, close: onCloseDialog
});

iframe.attr('src', iframe_src);
e.preventDefault();
$(document).on('click', 'a[href*="dialog=true"]:not(#dialog_container a)', function(e) {
var $anchor = $(this),
href = $anchor.attr('href'),
width = parseInt($(href.match("width=([0-9]*)")).last().get(0), 10)||928,
height = parseInt($(href.match("height=([0-9]*)")).last().get(0), 10)||473,
title = $anchor.attr('title') || $anchor.attr('name') || $anchor.html() || null;

href = href.replace(/(\&(amp\;)?)?dialog\=true/, '')
.replace(/(\&(amp\;)?)?width\=\d+/, '')
.replace(/(\&(amp\;)?)?height\=\d+/, '')
.replace(/(\?&(amp\;)?)/, '?')
.replace(/\?$/, '');

iframe_src = (iframe_src = href)
+ (iframe_src.indexOf('?') > -1 ? '&' : '?')
+ 'app_dialog=true&dialog=true';

iframe = $("<iframe id='dialog_iframe' frameborder='0' marginheight='0' marginwidth='0' border='0'></iframe>");
if(!$.browser.msie) { iframe.corner('8px'); }
iframe.dialog({
title: title
, modal: true
, resizable: false
, autoOpen: true
, width: width
, height: height
, open: onOpenDialog
, close: onCloseDialog
, open: function(event, ui) {
iframe.attr('src', iframe_src);
}
});

e.preventDefault();
});
};

Expand Down
2 changes: 1 addition & 1 deletion core/app/assets/javascripts/refinery/boot_wym.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ var wymeditor_boot_options = $.extend({
+ "</form>"
+ "</div>"

, dialogPath: "/refinery/dialogs/"
, dialogPath: "<%= Refinery::Core::Engine.routes.url_helpers.admin_dialogs_path %>/"
, dialogFeatures: {
width: 866
, height: 455
Expand Down
62 changes: 31 additions & 31 deletions core/app/assets/javascripts/refinery/modal_dialogs.js.erb
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
init_modal_dialogs = function(){
$('a[href*="dialog=true"]').not('#dialog_container a').each(function(i, anchor) {
$(anchor).data({
'dialog-width': parseInt($($(anchor).attr('href').match("width=([0-9]*)")).last().get(0), 10)||928
, 'dialog-height': parseInt($($(anchor).attr('href').match("height=([0-9]*)")).last().get(0), 10)||473
, 'dialog-title': ($(anchor).attr('title') || $(anchor).attr('name') || $(anchor).html() || null)
}).attr('href', $(anchor).attr('href').replace(/(\&(amp\;)?)?dialog\=true/, '')
.replace(/(\&(amp\;)?)?width\=\d+/, '')
.replace(/(\&(amp\;)?)?height\=\d+/, '')
.replace(/(\?&(amp\;)?)/, '?')
.replace(/\?$/, ''))
.click(function(e){
$anchor = $(this);
iframe_src = (iframe_src = $anchor.attr('href'))
+ (iframe_src.indexOf('?') > -1 ? '&' : '?')
+ 'app_dialog=true&dialog=true';

iframe = $("<iframe id='dialog_iframe' frameborder='0' marginheight='0' marginwidth='0' border='0'></iframe>");
if(!$.browser.msie) { iframe.corner('8px'); }
iframe.dialog({
title: $anchor.data('dialog-title')
, modal: true
, resizable: false
, autoOpen: true
, width: $anchor.data('dialog-width')
, height: $anchor.data('dialog-height')
, open: onOpenDialog
, close: onCloseDialog
});

iframe.attr('src', iframe_src);
e.preventDefault();
$(document).on('click', 'a[href*="dialog=true"]:not(#dialog_container a)', function(e) {
var $anchor = $(this),
href = $anchor.attr('href'),
width = parseInt($(href.match("width=([0-9]*)")).last().get(0), 10)||928,
height = parseInt($(href.match("height=([0-9]*)")).last().get(0), 10)||473,
title = $anchor.attr('title') || $anchor.attr('name') || $anchor.html() || null;

href = href.replace(/(\&(amp\;)?)?dialog\=true/, '')
.replace(/(\&(amp\;)?)?width\=\d+/, '')
.replace(/(\&(amp\;)?)?height\=\d+/, '')
.replace(/(\?&(amp\;)?)/, '?')
.replace(/\?$/, '');

iframe_src = (iframe_src = href)
+ (iframe_src.indexOf('?') > -1 ? '&' : '?')
+ 'app_dialog=true&dialog=true';

iframe = $("<iframe id='dialog_iframe' frameborder='0' marginheight='0' marginwidth='0' border='0'></iframe>");
if(!$.browser.msie) { iframe.corner('8px'); }
iframe.dialog({
title: title
, modal: true
, resizable: false
, autoOpen: true
, width: width
, height: height
, open: onOpenDialog
, close: onCloseDialog
});

iframe.attr('src', iframe_src);
e.preventDefault();
});
};

Expand Down
Loading

0 comments on commit 26fd31e

Please sign in to comment.