/* Minification failed. Returning unminified contents.
(2,10): run-time error CSS1031: Expected selector, found 'reportBug('
(2,10): run-time error CSS1025: Expected comma or open brace, found 'reportBug('
(68,1): run-time error CSS1019: Unexpected token, found '$'
(68,2): run-time error CSS1019: Unexpected token, found '('
(68,12): run-time error CSS1031: Expected selector, found '('
(68,12): run-time error CSS1025: Expected comma or open brace, found '('
(143,2): run-time error CSS1019: Unexpected token, found ')'
 */

function reportBug(e) {
    try {
        bugReporterModel = kendo.observable({
            reportBug: function (e) {
                try {
                    var bugParameters = {};
                    bugParameters.title = e.data.issuetitle;
                    bugParameters.platform = e.data.platform;
                    bugParameters.priorty = e.data.priorty;
                    bugParameters.description = e.data.description;
                    bugParameters.steps = e.data.steps;
                    bugParameters.screenshots = e.data.screenshot;

                    if (e.data.title == "") {
                        kendo.alert("You must enter a Title.");
                        return;
                    }
                    if (e.data.platform == "") {
                        kendo.alert("You must enter the Platform.");
                        return;
                    }
                    if (e.data.priorty == "") {
                        kendo.alert("You must enter the Issue Type.");
                        return;
                    }
                    if (e.data.description == "") {
                        kendo.alert("You must enter a Description.");
                        return;
                    }

                    $.ajax({
                        url: "/api/BugReporter/BugReporter",
                        type: "POST",
                        contentType: "application/json",
                        dataType: "json",
                        data: kendo.stringify(bugParameters),
                        success: function (result) {
                            console.log("Issue was submitted");

                            kendo.alert("The Issue was Submitted.");

                        },
                        error: function (result) {
                            kendo.alert("Error submitting the Issue information.");
                        }
                    });

                }
                catch (ex) {
                    console.log("Error: BugReporter : Company.js");
                    console.log(ex.message);
                    console.log(ex);
                    console.log("**************************************");
                }

            }
        });
    }
    catch (ex) {
        console.log("Error: initShipToAddress : ScheduleShipToDetailMobile.js");
        console.log(ex.message);
        console.log(ex);
        console.log("**************************************");
    }
}

$(function () {
    try {
        url = "";
        //the following 3 variables are global variables for the main controls
        //myholdToDrag = true;
        mymobile = true;
        myeditable = true;
        //myroutes = {};


        //***************************************************************************
        //get the salesman_skey and salesman_name
    } catch (ex) {
        console.log("Error: BugReporter : bugreporterStart.js");
        console.log(ex.message);
        console.log(ex);
        console.log("**************************************");

    }
    bugReporterModel = kendo.observable({
        reportBug: function (e) {
            try {
                var bugParameters = {};
                bugParameters.title = e.data.issuetitle;
                bugParameters.platform = e.data.platform;
                bugParameters.priorty = e.data.priorty;
                bugParameters.description = e.data.description;
                bugParameters.steps = e.data.steps;
                bugParameters.screenshots = e.data.screenshots;

                if (e.data.issuetitle == "") {
                    kendo.alert("You must enter a Title.");
                    return;
                }
                if (e.data.platform == "") {
                    kendo.alert("You must enter the Platform.");
                    return;
                }
                if (e.data.priorty == "") {
                    kendo.alert("You must enter the Issue Type.");
                    return;
                }
                if (e.data.description == "") {
                    kendo.alert("You must enter a Description.");
                    return;
                }

                $.ajax({
                    url: "/api/BugReporter/BugReporter",
                    type: "POST",
                    contentType: "application/json",
                    dataType: "json",
                    data: kendo.stringify(bugParameters),
                    success: function (result) {
                        console.log("Issue was submitted");

                        kendo.alert("The Issue was Submitted.");

                    },
                    error: function (result) {
                        kendo.alert("Error submitting the Issue information.");
                    }
                });

            }
            catch (ex) {
                console.log("Error: BugReporter : Company.js");
                console.log(ex.message);
                console.log(ex);
                console.log("**************************************");
            }

        }
    });

});
 

