当我单击模块选择对话框中的模块时,DNN刷新页面(在悬停的、可拖动的元素出现在页面上之前)。这只会使用我们的皮肤(https://github.com/2sic/dnn-theme-bootstrap3-instant)。
DNN正在寻找带有Teleriks findComponent方法的元素findComponent(它似乎是ajax包装器)。由于找不到元素,DNN执行页面重新加载。
我们的皮肤内容窗格:
<div id="ContentPane" runat="server" containertype="G" containername="Invisible Container" containersrc="default.ascx"></div>触发重新加载(最后一次函数调用)的DNN代码:
refreshPane: function (paneName, args, callback, callOnReload) {
var paneId;
if (!paneName) {
paneId = this.getModuleManager().getPane().attr('id');
} else {
paneId = this.getPaneById(paneName).attr('id');
}
var pane = $('#' + paneId);
var parentPane = pane.data('parentpane');
if (parentPane) {
this.refreshPane(parentPane, args, callback);
return;
}
//set module manager to current refresh pane.
this._moduleManager = pane.data('dnnModuleManager');
var ajaxPanel = $find(paneId + "_SyncPanel");
if (ajaxPanel) {
//remove action menus from DOM bbefore fresh pane.
var handler = this;
pane.find('div.DnnModule').each(function () {
var moduleId = handler._moduleManager._findModuleId($(this));
$('#moduleActions-' + moduleId).remove();
});
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(this._refreshCompleteHandler);
this._refreshPaneId = paneId;
this._refreshCallback = callback;
ajaxPanel.ajaxRequest(args);
} else {
//save the args into cookie, after page reload then catch the cookie
//and float the module for drag
if (args && !this._noFloat) {
this._setCookie('CEM_CallbackData', args);
}
if (callOnReload && typeof callback == "function") {
callback.call($('#' + paneId), [true]);
}
location.reload();
}
}发布于 2017-06-01 12:04:42
过了一段时间,我们发现了问题所在。我们的皮肤使用的是<%=SkinPath%>语法而不是<%#SkinPath%>,这导致DNN强制重新加载。这可能与文档的生命周期有关。
https://stackoverflow.com/questions/44302811
复制相似问题