app/assets/javascripts/caboose/modal_controller.js in caboose-cms-0.8.52 vs app/assets/javascripts/caboose/modal_controller.js in caboose-cms-0.8.53
- old
+ new
@@ -3,19 +3,19 @@
modal_width: false,
modal_height: false,
modal_element: false,
parent_controller: false,
-
+
modal: function(el, width, height, callback)
{
var that = this;
if (!width) width = that.modal_width ? that.modal_width : 400;
if (!height) height = that.modal_height ? that.modal_height : $(el).outerHeight(true);
that.modal_element = el;
- el.attr('id', 'the_modal').addClass('modal').css('width', '' + width + 'px');
- $.colorbox({
+ el.attr('id', 'the_modal').addClass('modal').css('width', '' + width + 'px');
+ var options = {
html: el,
initialWidth: width,
//initialHeight: height,
innerWidth: width,
//innerHeight: height,
@@ -25,11 +25,14 @@
onComplete: function() {
var arr = ['TopLeft','TopCenter','TopRight','BottomLeft','BottomCenter','BottomRight','MiddleLeft','MiddleRight'];
for (var i in arr) $('#cbox' + arr[i]).css('background-color', '#fff !important');
$("#cboxClose").hide();
if (callback) callback();
- }
- });
+ }
+ };
+ if (that.trapFocus === false)
+ options['trapFocus'] = false;
+ $.colorbox(options);
},
last_size: 0,
autosize: function(msg, msg_container, flag)
{