From 670ec60f6c54a532bccdf8e32eb1db0052007a16 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Tue, 25 Jun 2013 00:54:45 +0000 Subject: [PATCH] + add the function of loadColorbox. --- www/js/my.full.js | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/www/js/my.full.js b/www/js/my.full.js index d73f83cffa..0913090f54 100644 --- a/www/js/my.full.js +++ b/www/js/my.full.js @@ -817,6 +817,38 @@ function selectItem(SelectID) } } +/** + * Load Colorbox for List. + * + * @access public + * @return void + */ +function loadColorbox(colorboxClass, replaceID) +{ + $('.' + colorboxClass).colorbox( + { + width:900, + height:500, + iframe:true, + transition:'none', + onCleanup:function() + { + saveWindowSize(); + var link = self.location.href; + var onlybody = config.requestType == 'PATH_INFO' ? "?onlybody=yes" : '&onlybody=yes'; + + link = link + onlybody; + $.get(link, function(data) + { + $('#' + replaceID).replaceWith(data) + loadColorbox(colorboxClass, replaceID) + $('.colored').colorize(); + $('tfoot td').css('background', 'white').unbind('click').unbind('hover'); + }); + } + }); +} + /* Ping the server every some minutes to keep the session. */ needPing = true;