generators/restbox/templates/javascripts/restbox.js in restbox-0.1.2 vs generators/restbox/templates/javascripts/restbox.js in restbox-0.2.0
- old
+ new
@@ -1,8 +1,8 @@
/*
* RestBox - Simple overlay to work with jQuery and Rails
- * Copyright (c) 2009
+ * Copyright (c) 2010
* Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php
*/
(function($) {
@@ -33,11 +33,14 @@
// just fade screen in, load content when reqest includes content param
if (options.content.length != 0) {
$('div#restbox_screen').show();
$('div#restbox_container').show();
- $('div#restbox_container div#restbox_content').removeClass(options.loadingClass).html(options.content);
- $('div#restbox_container div#restbox_content').css({top: -($('div#restbox_content').height() + 100) / 2});
+ if (options.container_class) {
+ $('div#restbox_container').addClass(options.container_class);
+ };
+ $('div#restbox_container div#restbox_content').removeClass(options.loadingClass).html(options.content);
+ $('div#restbox_container div#restbox_content').css({top: -($('div#restbox_content').height() + 100) / 2});
$('div#restbox_container div#restbox_content').animate({opacity: "100"}, 3000);
} else {
$('div#restbox_screen').fadeIn(120, function() {
$('div#restbox_container').show()
\ No newline at end of file