From 4e32cd55266f37bf5e42ab1d01c687485a196af9 Mon Sep 17 00:00:00 2001 From: Sinevia Date: Tue, 3 Sep 2019 01:02:11 +0100 Subject: [PATCH] Update initialize.js --- initialize.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/initialize.js b/initialize.js index 15215a3..ae09f03 100644 --- a/initialize.js +++ b/initialize.js @@ -306,7 +306,7 @@ function Initialize() { return language; }; - this.to = function (url, data) { + this.to = function (url, data, options) { if (url.match("^http://") || url.match("^https://")) { // External url } else { @@ -321,7 +321,14 @@ function Initialize() { url = url + (url.indexOf('?') <0 ? '?' : '&') + queryString; } - window.location.href = url; + var options = (typeof options === 'undefined') ? {} : options; + + if(options.target === "_blank") { + window.location.href = url; + window.open(url, '_blank', "resizable,scrollbars,status"); + } else { + window.location.href = url; + } return false; // otherwise links will be triggered };