i'm implementing a chat with multiple floatboxes. each box is scrollable and user resizeable within it's allowed ranges when maximized. but additional each box get's it's own minimize and maximize icon which fires the win_minmax function. when minimized the boxes should be smaller then the on creation defined ranges and also not user resizeable any more.
i tried it with the samebox option, but this always destroys my content and i don't want to completely reload and recreate the boxes when user does just a simple minimize.
win: function(key){
fb.start('/lib/msg.php?cmd=' + 'win' +
'&id_ref=' + msg.partner.id_ref[key] +
'&ref_type=' + msg.partner.ref_type[key] +
'&key=' + key, {
type: 'ajax',
contentScroll: true,
boxScroll: false,
enableDragResize: true,
modal: false,
caption: '<div id=\'msg-topmnu-' + msg.partner.instance[key] + '\'></div>',
height: BOX_HEIGHT_MSG,
width: BOX_WIDTH_MSG,
minBoxHeight: BOX_HEIGHT_MSG,
minBoxWidth: BOX_WIDTH_MSG,
minContentHeight: BOX_HEIGHT_MSG,
minContentWidth: BOX_WIDTH_MSG,
instanceName: msg.partner.instance[key],
afterItemStart: function(){
wait_ajax();
},
afterItemEnd: function(){
lazy_stop();
}
});
}
},
win_minmax: function(key){
if (msg.partner.win[key] == 1){
//min -> max
msg.partner.win[key] = 2;
$('#msg-win-minmax-' + msg.partner.instance[key])
.attr('src', '/img/ico/msg_win_min@' + pixel_ratio + '.png')
fb.getInstance(msg.partner.instance[key]).resize(BOX_WIDTH_MSG, BOX_HEIGHT_MSG);
}else{
//max -> min
msg.partner.win[key] = 1;
$('#msg-win-minmax-' + msg.partner.instance[key])
.attr('src', '/img/ico/msg_win_max@' + pixel_ratio + '.png')
fb.getInstance(msg.partner.instance[key]).resize(BOX_WIDTH_MSG, 0);
}
}
}
the above code doesn't resize because of the minimum limits created on start - and also no idea how to disable resize.
thanks for your help!