if($('a.iframe').size()) $("a.iframe").colorbox({width:450, height:190, iframe:true, transition:'none', scrolling:true}); if($('a.webapp').size()) $("a.webapp").colorbox({width:700, height:400, iframe:true, transition:'none', scrolling:true}); if($('a.apiapp').size()) $("a.apiapp").colorbox({width:700, height:330, iframe:true, transition:'none', scrolling:true}); if($('a.popup').size()) $("a.popup").colorbox({width:900, height:600, iframe:true, transition:'none', scrolling:true}); function popup(width, height) { if(width != 0 && height != 0) $("a.popup").colorbox({width:width, height:height}); } var show = new Array(); var url = new Array(); function toggleShowapp(webappID, webappName) { if(show[webappID] == undefined) { height = document.documentElement.clientHeight - 110; if(url[webappID] == undefined) url[webappID] = $('#useapp' + webappID).attr('href'); $('#useapp' + webappID).attr('href', '#iframe' + webappID); var html = "

" + webappName + "

"; $('#webapps').parent().parent().after(html); show[webappID] = true; } else if(show[webappID]) { $('#iframe' + webappID).hide(); show[webappID] = false; } else { $('#iframe' + webappID).show(); show[webappID] = true; } } function setSize(target) { $('.size').hide(); $('.customSize').hide(); if(target == 'popup') { $('.size').show(); customSize($('#size').val()); } } function addView(webappID) { $.get(createLink('webapp', 'ajaxAddView', 'webappID=' + webappID)); } function customSize(value) { $('.customSize').hide(); if(value == 'custom') $('.customSize').show(); } $(function(){ setSize($('#target').val()); $('#target').change(function(){setSize($(this).val())}); $('#size').change(function(){customSize($(this).val())}); $('#modulemenu ul li').removeClass('active'); if(typeof(module) != "undefined") $('#modulemenu ul li #submenu' + module).parent().addClass('active'); })