Subversion Repositories SmartDukaan

Rev

Blame | Last modification | View Log | RSS feed

<style>
    .table-striped > tbody > tr:nth-child(odd) > td {
        background: white;
        background-color: white;
    }

    .table-striped > tbody > tr:nth-child(even) > td {
        background: white;
        background-color: white;
    }

    .table-striped > tbody > tr:hover > td,
    .table-striped > tbody > tr:hover {
        background-color: #e98c8f;
        color: white;
    }

    .btn:hover {
        color: #2b669a;
        text-decoration: none;
    }

    .btn-primary:hover {
        color: #2b669a;
        text-decoration: none;
    }


</style>

<section class="wrapper">

    <div id="upload-table">
        <div class="row">
            <div class="col-lg-12">
                <form class="form-horizontal">
                    <label class="control-label col-sm-2" for="excelfile">Add Order CSV File:</label>
                    <div class="col-lg-3">
                        <div class="input-group">
                            <input class="form-control" type="file" id="entityupload" name="uploadfile"
                                   value="Upload Images">
                            <span class="input-group-btn">
                                                <button class="btn btn-default entityfileupload">
                                                            Upload
                                                        </button>
                                                </span>
                        </div>
                    </div>

                </form>
            </div>
        </div>

    </div>

</section>
<script type="text/javascript">
    $(document).ready(function () {
        $('button.entityfileupload').on('click', function () {
            var fileSelector = $('#entityupload')[0];
            if (fileSelector != undefined && fileSelector.files[0] != undefined) {
                if (confirm("Confirm Upload?")) {
                    doAjaxUploadRequestHandler("${rc.contextPath}/bulkOrder/upload", "POST", fileSelector.files[0], function (response) {
                        if (response) {
                            alert("Content updated successfully");
                        }
                    });
                }
            } else {
                alert("Please upload file!");
            }
            return false;
        });
    });


</script>