mirror of https://gitee.com/karson/fastadmin.git
修复在单独打开的页面addtabs无法打开页面的问题
parent
90849c34fc
commit
ed2f472e35
|
|
@ -56,10 +56,13 @@ define(['fast', 'template', 'moment'], function (Fast, Template, Moment) {
|
||||||
var id = Math.floor(new Date().valueOf() * Math.random());
|
var id = Math.floor(new Date().valueOf() * Math.random());
|
||||||
icon = typeof icon !== 'undefined' ? icon : 'fa fa-circle-o';
|
icon = typeof icon !== 'undefined' ? icon : 'fa fa-circle-o';
|
||||||
title = typeof title !== 'undefined' ? title : '';
|
title = typeof title !== 'undefined' ? title : '';
|
||||||
top.window.$("<a />").append('<i class="' + icon + '"></i> <span>' + title + '</span>').prop("href", url).attr({
|
var newAnchor = top.window.$("<a />").prop('href', url).attr('url', url).append('<i class="' + icon + '"></i> <span>' + title + '</span>').addClass("hide").appendTo(top.window.document.body);
|
||||||
url: url,
|
if (window.self === window.top && Config.controllername + '/' + Config.actionname !== 'index/index') {
|
||||||
addtabs: id
|
newAnchor.prop('target', '_blank').get(0).click();
|
||||||
}).addClass("hide").appendTo(top.window.document.body).trigger("click");
|
newAnchor.remove();
|
||||||
|
} else {
|
||||||
|
newAnchor.attr('addtabs', id).trigger("click");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -204,9 +204,6 @@ define(['jquery', 'bootstrap', 'backend', 'addtabs', 'adminlte', 'form'], functi
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//这一行需要放在点击左侧链接事件之前
|
|
||||||
var addtabs = Config.referer ? sessionStorage.getItem("addtabs") : null;
|
|
||||||
|
|
||||||
//绑定tabs事件,如果需要点击强制刷新iframe,则请将iframeForceRefresh置为true,iframeForceRefreshTable只强制刷新表格
|
//绑定tabs事件,如果需要点击强制刷新iframe,则请将iframeForceRefresh置为true,iframeForceRefreshTable只强制刷新表格
|
||||||
nav.addtabs({iframeHeight: "100%", iframeForceRefresh: false, iframeForceRefreshTable: true, simple: $("[data-config='simplenav']").prop("checked"), nav: nav});
|
nav.addtabs({iframeHeight: "100%", iframeForceRefresh: false, iframeForceRefreshTable: true, simple: $("[data-config='simplenav']").prop("checked"), nav: nav});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue