|
|
@ -80,8 +80,8 @@ $submitPort.click(function(event) { |
|
|
|
// Event listener for submit button click
|
|
|
|
// Event listener for submit button click
|
|
|
|
$sendPort.click(function(event) { |
|
|
|
$sendPort.click(function(event) { |
|
|
|
if (stockList.length > 1){ |
|
|
|
if (stockList.length > 1){ |
|
|
|
$('#confirmMes').text("投資組合已開始建立,請等待完成訊息,或1分鐘後至分析結果區查看!") |
|
|
|
// $('#confirmMes').replaceWith("<span>投資組合已開始建立,請等待完成訊息,或1分鐘後至分析結果區查看!</span>")
|
|
|
|
$('#confirmModal').modal('show');
|
|
|
|
// $('#confirmModal').modal('show');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$submitPort.prop('disabled', true); |
|
|
|
$submitPort.prop('disabled', true); |
|
|
@ -101,11 +101,11 @@ $sendPort.click(function(event) { |
|
|
|
console.log(response); |
|
|
|
console.log(response); |
|
|
|
// var res = JSON.parse(response);
|
|
|
|
// var res = JSON.parse(response);
|
|
|
|
event.preventDefault(); |
|
|
|
event.preventDefault(); |
|
|
|
$('#modalTitle').text('完成建立') |
|
|
|
// $('#modalTitle').text('完成建立')
|
|
|
|
$('#confirmMes').replaceWith(response); |
|
|
|
$('#sucMes').html(response); |
|
|
|
if (stockList.length > 0){ |
|
|
|
// <span>投資組合建立時間間隔(或與登入時間間隔)必須大於60秒</span>
|
|
|
|
$('#confirmModal').modal('show');
|
|
|
|
$('#confirmModal').modal('show');
|
|
|
|
} |
|
|
|
|
|
|
|
$submitPort.prop('disabled', false); |
|
|
|
$submitPort.prop('disabled', false); |
|
|
|
}, |
|
|
|
}, |
|
|
|
error: function(xhr) { |
|
|
|
error: function(xhr) { |
|
|
|