//----JavaScript Document(是定义编辑、预览、正常浏览模式下共同使用输出)---- //----JavaScript Document(是定义可视化~辑器模式下输出)---- ///处理详细模块的高? $.PluginInfoViewHeight = function (o) { $(window).load(function () { o.c = $("#" + o.curr); o.t = $("#" + o.currtop); o.c.height = o.c.length ? o.c.outerHeight(true) : 0; o.t.h = o.t.length ? o.t.height() : 0; o.t.height(o.t.h < o.c.height ? o.c.height : o.t.h); o.cr = o.containerid.split(","); o.ar = o.areakey.split(","); o.d = o.c.height - o.t.h; o.cr.forEach(function (cri) { o.crt = $("#" + cri); if (o.crt.length > 0) { o.crt.height(o.d > 0 ? o.d + o.crt.height() : o.crt.height()); } if (cri.indexOf("_proot")<0) { o.crt.ms = o.crt.find("div[data-type]"); o.crt.ms.each(function () { if ($(this).offset().top - o.crt.offset().top > o.c.offset().top) { $(this).css("top", $(this).offset().top - o.crt.offset().top + o.d); } }); } }); o.ar.forEach(function (ari) { o.crt = $("#" + ari); if (o.crt.length > 0) { o.crt.height(o.d > 0 ? o.d + o.crt.height() : o.crt.height()); } }); }); } // 讄Z? $.SetHome=function(obj, vrl) { try { obj.style.behavior = 'url(#default#homepage)'; obj.setHomePage(vrl); } catch (e) { if (window.netscape) { try { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); } catch (e) { alert("此操作被览器拒l!\n请在览器地址栏输入“about:config”ƈ回R\n然后?[signed.applets.codebase_principal_support]的D|ؓ'true',双击卛_?); } var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch); prefs.setCharPref('browser.startup.homepage', vrl); } else { alert("您的览器不支持Q请按照下面步骤操作Q?.打开览器设|?.点击讄|页?.输入Q? + vrl + "点击定?); } } } // 加入收藏 兼容360和IE6 $.shoucang =function (sTitle, sURL) { try { window.external.addFavorite(sURL, sTitle); } catch (e) { try { window.sidebar.addPanel(sTitle, sURL, ""); } catch (e) { alert("加入收藏p|Q请使用Ctrl+Dq行d"); } } } ///***异步加蝲点击? $.AjaxModelClick = function (modelId) { window.onload = function () { $._modelthis = $("div[data-id='" + modelId + "']"); $.ajaxArray = $._modelthis.find("*[ajaxviewid]"); $.ajaxArray.each(function (item) { $.post("/online_editsite/webjsonhtml_ashx/web_retuenCilckCount.ashx", { modelId: modelId, infoId: $($.ajaxArray[item]).attr("ajaxviewid") }, function (result) { $($.ajaxArray[item]).html(result); }); }); } }