0
モジュール選択ダイアログ内のモジュールをクリックすると、DNNはそのページをリフレッシュします(ホバーリングの前に、ドラッグ可能な要素がページに表示されます)。これは私たちのスキン(https://github.com/2sic/dnn-theme-bootstrap3-instant)を使用してのみ発生します。モジュール選択時にページリロードを防止するDNN 9
DNNはTeleriks findComponent
メソッドで#dnn_ContentPane_SyncPanel
(これは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();
}
}