From 345ae9c999e1492cdd6d108e74895e29d155de30 Mon Sep 17 00:00:00 2001 From: Amam Mustofa Date: Sat, 16 Feb 2019 10:34:06 +0800 Subject: [PATCH 1/5] fix dialog overlapping and intermitten chart issue --- src/viewtransaction/viewTransaction.es6 | 2 +- src/windows/windows.es6 | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/viewtransaction/viewTransaction.es6 b/src/viewtransaction/viewTransaction.es6 index fdb744e3e4..616e996254 100644 --- a/src/viewtransaction/viewTransaction.es6 +++ b/src/viewtransaction/viewTransaction.es6 @@ -350,7 +350,7 @@ function drawXLines(contract, state, chart) { } if (is_sold_before_expiry) drawXLine({ line_time: sell_time, label: 'end_time', dashStyle: 'Dash' }); - if (!is_path_dependent) drawXLine({ line_time: date_expiry, label: 'end_time', dashStyle: 'Dash' }); + if (!is_path_dependent) drawXLine({ line_time: date_expiry && exit_tick_time, label: 'end_time', dashStyle: 'Dash' }); } function drawPurchaseTime({ purchase_time }) { diff --git a/src/windows/windows.es6 b/src/windows/windows.es6 index b5bd24cfd0..d9a7d0aa4a 100644 --- a/src/windows/windows.es6 +++ b/src/windows/windows.es6 @@ -341,12 +341,12 @@ export const createBlankWindow = function($html,options) { }); dialog.bind('dialogextendmaximize', () => { - dialog.css({ zIndex: 99999 }); + dialog.css({ zIndex: dialog.closest('.ui-dialog').css('z-index')*1 + 3000 }); }); dialog.bind('dialogextendrestore', () => { - dialog.css({ zIndex: 100 }); + dialog.css({ zIndex: dialog.closest('.ui-dialog').css('z-index')*1 - 3000 }); dialog.draggable('option', 'containment', false); - }) + }); if(options.destroy) { /* register for destroy event which have been patched */ blankWindow.on('dialogdestroy', options.destroy); From 83f002037d06187b949c180d054da19425ea0c76 Mon Sep 17 00:00:00 2001 From: Amam Mustofa Date: Sat, 16 Feb 2019 10:41:51 +0800 Subject: [PATCH 2/5] add validation restore --- src/windows/windows.es6 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/windows/windows.es6 b/src/windows/windows.es6 index d9a7d0aa4a..07b5b265c4 100644 --- a/src/windows/windows.es6 +++ b/src/windows/windows.es6 @@ -344,8 +344,10 @@ export const createBlankWindow = function($html,options) { dialog.css({ zIndex: dialog.closest('.ui-dialog').css('z-index')*1 + 3000 }); }); dialog.bind('dialogextendrestore', () => { - dialog.css({ zIndex: dialog.closest('.ui-dialog').css('z-index')*1 - 3000 }); - dialog.draggable('option', 'containment', false); + if (dialog.closest('.ui-dialog').css('z-index') > 3000) { + dialog.css({ zIndex: dialog.closest('.ui-dialog').css('z-index')*1 - 3000 }); + dialog.draggable('option', 'containment', false); + } }); if(options.destroy) { /* register for destroy event which have been patched */ From 3f8bf5040b44967700663aa77fdbed9d09b472b6 Mon Sep 17 00:00:00 2001 From: Amam Mustofa Date: Tue, 19 Feb 2019 13:32:44 +0800 Subject: [PATCH 3/5] alter logic to draw endtime --- src/viewtransaction/viewTransaction.es6 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/viewtransaction/viewTransaction.es6 b/src/viewtransaction/viewTransaction.es6 index 616e996254..496143c02e 100644 --- a/src/viewtransaction/viewTransaction.es6 +++ b/src/viewtransaction/viewTransaction.es6 @@ -350,7 +350,7 @@ function drawXLines(contract, state, chart) { } if (is_sold_before_expiry) drawXLine({ line_time: sell_time, label: 'end_time', dashStyle: 'Dash' }); - if (!is_path_dependent) drawXLine({ line_time: date_expiry && exit_tick_time, label: 'end_time', dashStyle: 'Dash' }); + if (!is_path_dependent && date_expiry) drawXLine({ line_time: date_expiry, label: 'end_time', dashStyle: 'Dash' }); } function drawPurchaseTime({ purchase_time }) { From 8a6a458fc1379ff268c0d432b064555d7c8654bc Mon Sep 17 00:00:00 2001 From: Amam Mustofa Date: Tue, 19 Feb 2019 14:13:29 +0800 Subject: [PATCH 4/5] git or logic exit tick time when date expiry not present --- src/viewtransaction/viewTransaction.es6 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/viewtransaction/viewTransaction.es6 b/src/viewtransaction/viewTransaction.es6 index 496143c02e..deca8c1a23 100644 --- a/src/viewtransaction/viewTransaction.es6 +++ b/src/viewtransaction/viewTransaction.es6 @@ -350,7 +350,7 @@ function drawXLines(contract, state, chart) { } if (is_sold_before_expiry) drawXLine({ line_time: sell_time, label: 'end_time', dashStyle: 'Dash' }); - if (!is_path_dependent && date_expiry) drawXLine({ line_time: date_expiry, label: 'end_time', dashStyle: 'Dash' }); + if (!is_path_dependent) drawXLine({ line_time: (date_expiry || exit_tick_time), label: 'end_time', dashStyle: 'Dash' }); } function drawPurchaseTime({ purchase_time }) { From 97365e0721b6cfa323b756d1cc048bca28e060a2 Mon Sep 17 00:00:00 2001 From: Amam Mustofa Date: Tue, 19 Feb 2019 15:40:20 +0800 Subject: [PATCH 5/5] revert date expiry change --- src/viewtransaction/viewTransaction.es6 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/viewtransaction/viewTransaction.es6 b/src/viewtransaction/viewTransaction.es6 index deca8c1a23..fdb744e3e4 100644 --- a/src/viewtransaction/viewTransaction.es6 +++ b/src/viewtransaction/viewTransaction.es6 @@ -350,7 +350,7 @@ function drawXLines(contract, state, chart) { } if (is_sold_before_expiry) drawXLine({ line_time: sell_time, label: 'end_time', dashStyle: 'Dash' }); - if (!is_path_dependent) drawXLine({ line_time: (date_expiry || exit_tick_time), label: 'end_time', dashStyle: 'Dash' }); + if (!is_path_dependent) drawXLine({ line_time: date_expiry, label: 'end_time', dashStyle: 'Dash' }); } function drawPurchaseTime({ purchase_time }) {