- IE window.open does not support base href tag. Fixed.
parent
70cebe97fc
commit
dde7806b38
|
@ -223,7 +223,8 @@ mindplot.widget.Menu = new Class({
|
||||||
this._registerTooltip('export', $msg('EXPORT'));
|
this._registerTooltip('export', $msg('EXPORT'));
|
||||||
|
|
||||||
this._addButton('print', false, false, function () {
|
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'));
|
this._registerTooltip('print', $msg('PRINT'));
|
||||||
|
|
|
@ -131,7 +131,10 @@ jQuery.fn.dialogForm = function(options) {
|
||||||
var resourceId = jqXHR.getResponseHeader("ResourceId");
|
var resourceId = jqXHR.getResponseHeader("ResourceId");
|
||||||
var redirectUrl = options.redirect;
|
var redirectUrl = options.redirect;
|
||||||
redirectUrl = redirectUrl.replace("{header.resourceId}", resourceId);
|
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) {
|
} else if (options.postUpdate) {
|
||||||
options.postUpdate(formData);
|
options.postUpdate(formData);
|
||||||
|
@ -263,7 +266,7 @@ $(function() {
|
||||||
$("#newBtn").click(
|
$("#newBtn").click(
|
||||||
function () {
|
function () {
|
||||||
$("#new-dialog-modal").dialogForm({
|
$("#new-dialog-modal").dialogForm({
|
||||||
redirect: "/c/maps/{header.resourceId}/edit",
|
redirect:"c/maps/{header.resourceId}/edit",
|
||||||
url:"service/maps"
|
url:"service/maps"
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -283,7 +286,7 @@ $(function() {
|
||||||
|
|
||||||
// Initialize dialog ...
|
// Initialize dialog ...
|
||||||
$("#duplicate-dialog-modal").dialogForm({
|
$("#duplicate-dialog-modal").dialogForm({
|
||||||
redirect: "/c/maps/{header.resourceId}/edit",
|
redirect:"c/maps/{header.resourceId}/edit",
|
||||||
url:"service/maps/" + mapId
|
url:"service/maps/" + mapId
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -344,7 +347,9 @@ $(function() {
|
||||||
$("#printBtn").click(function () {
|
$("#printBtn").click(function () {
|
||||||
var mapIds = $('#mindmapListTable').dataTableExt.getSelectedMapsIds();
|
var mapIds = $('#mindmapListTable').dataTableExt.getSelectedMapsIds();
|
||||||
if (mapIds.length > 0) {
|
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