mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-05 07:03:24 +01:00
- IE window.open does not support base href tag. Fixed.
This commit is contained in:
parent
70cebe97fc
commit
dde7806b38
@ -223,7 +223,8 @@ mindplot.widget.Menu = new Class({
|
||||
this._registerTooltip('export', $msg('EXPORT'));
|
||||
|
||||
this._addButton('print', false, false, function () {
|
||||
window.open('c/maps/' + mapId + '/print');
|
||||
var baseUrl = window.location.href.substring(0, window.location.href.lastIndexOf("c/maps/"));
|
||||
window.open(baseUrl + 'c/maps/' + mapId + '/print');
|
||||
});
|
||||
|
||||
this._registerTooltip('print', $msg('PRINT'));
|
||||
|
@ -131,7 +131,10 @@ jQuery.fn.dialogForm = function(options) {
|
||||
var resourceId = jqXHR.getResponseHeader("ResourceId");
|
||||
var redirectUrl = options.redirect;
|
||||
redirectUrl = redirectUrl.replace("{header.resourceId}", resourceId);
|
||||
window.location = redirectUrl;
|
||||
|
||||
// Hack: IE ignore the base href tag ...
|
||||
var baseUrl = window.location.href.substring(0, window.location.href.lastIndexOf("c/maps/"));
|
||||
window.open(baseUrl + redirectUrl, '_self');
|
||||
|
||||
} else if (options.postUpdate) {
|
||||
options.postUpdate(formData);
|
||||
@ -263,7 +266,7 @@ $(function() {
|
||||
$("#newBtn").click(
|
||||
function () {
|
||||
$("#new-dialog-modal").dialogForm({
|
||||
redirect: "/c/maps/{header.resourceId}/edit",
|
||||
redirect:"c/maps/{header.resourceId}/edit",
|
||||
url:"service/maps"
|
||||
});
|
||||
});
|
||||
@ -283,7 +286,7 @@ $(function() {
|
||||
|
||||
// Initialize dialog ...
|
||||
$("#duplicate-dialog-modal").dialogForm({
|
||||
redirect: "/c/maps/{header.resourceId}/edit",
|
||||
redirect:"c/maps/{header.resourceId}/edit",
|
||||
url:"service/maps/" + mapId
|
||||
});
|
||||
}
|
||||
@ -344,7 +347,9 @@ $(function() {
|
||||
$("#printBtn").click(function () {
|
||||
var mapIds = $('#mindmapListTable').dataTableExt.getSelectedMapsIds();
|
||||
if (mapIds.length > 0) {
|
||||
window.open('c/maps/' + mapIds[0] + '/print');
|
||||
// Hack: IE ignore the base href tag ...
|
||||
var baseUrl = window.location.href.substring(0, window.location.href.lastIndexOf("c/maps/"));
|
||||
window.open(baseUrl + 'c/maps/' + mapIds[0] + '/print');
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user