Merge pull request #262 from integ3r/dialog

Dialog fixup: Careless swap of collapse and expand callbacks
This commit is contained in:
Jon Atkins 2013-05-10 20:56:10 -07:00
commit 76aeafbfa5

View File

@ -116,9 +116,9 @@ window.dialog = function(options) {
if($(this).data('collapseExpandCallback')) { if($(this).data('collapseExpandCallback')) {
$.proxy($(this).data('collapseExpandCallback'), this)(!collapsed); $.proxy($(this).data('collapseExpandCallback'), this)(!collapsed);
} else { } else {
if(collapsed && $(this).data('collapseCallback')) { if(!collapsed && $(this).data('collapseCallback')) {
$.proxy($(this).data('collapseCallback'), this)(); $.proxy($(this).data('collapseCallback'), this)();
} else if (!collapsed && $(this).data('expandCallback')) { } else if (collapsed && $(this).data('expandCallback')) {
$.proxy($(this).data('expandCallback'), this)(); $.proxy($(this).data('expandCallback'), this)();
} }
} }