
//========show alert通知訊息============

function showAlert(status, msg) {
    console.log('showAlert=' + status)
    color = 'alert-success';
    if (status !== 'True' && status !== true) {
        color = 'alert-danger';
        status = 'Error!';
    }
    else {
        status = 'Success!';
    }
    $.doTimeout('alert');
    $('#msgDiv').html('<div class="alert ' + color + ' alert-dismissible">' +
        '<button type="button" class="close" data-dismiss="alert">&times;</button>' +
        ' <strong>' + status + '</strong> ' + msg + '</div>');
    $("#msgDiv").show();
    $.doTimeout('alert', 4000, function () {
        $("#msgDiv").slideUp(200, function () {
            $(this).alert('close');
        });
    })

}


//========END show alert通知訊息============


    //$('#FinancialItemId').change(function () {
    //alert($(this).children('option:selected').data('has-believer'));
    //});



    //分頁使用
    //停用submit先將form表單補上page後 在重新submit
    $('#selectPage button').click(function (e) {
        e.preventDefault();
        //console.log('id=' + $(this).data('page'))
        var input_Page = $("<input>").attr("type", "hidden").attr("name", "page").val($(this).data('page'));

        $('form').append(input_Page);

        //console.log('form=' + $('form').serialize());
        $('form').submit();

    })

$('#cancelBtn').click(function () {
    $('input').val('');
})
