Nuvolar_Scanner_Android.StorageLocationFoldSelect = function (params) {
    "use strict";

    var viewModel = {
        viewShown: function (e) {
            dxListDataSource = null;
            currentnavigate("StorageLocationFoldSelect");
            if (IsLoggedOn == false) {
                Nuvolar_Scanner_Android.app.navigate("Login", { root: false });
            }
            else {
                SimpleQuery.UserName = username();
                SimpleQuery.Password = password();
                SimpleQuery.Database = database();
                SimpleQuery.Query = 'DX_GetStorageLocationFoldSelect_dxList';
                JSON_Text = JSON.stringify(SimpleQuery, null);
                $.getJSON(URL(), 'id=' + JSON_Text, function (results) {
                    dxListDataSource = JSON.parse(JSON.parse(results).Result);
                    $("#dxlist").dxList({ dataSource: dxListDataSource });
                }).done(function () {
                    //alert("second success");
                }).fail(function (jqXHR, textStatus, errorThrown) {
                    DevExpress.ui.notify("Kapcsolati hiba, próbálja meg újra!", "error", 2000);
                });
            };
        },
        dxListItemClickAction: function (e) {
            if (e.itemData.key != '') {
                //alert(e.itemData.key);
                Nuvolar_Scanner_Android.app.navigate({ view: "StorageLocationFoldEdit", id: e.itemData.key });
            };
        }
    };

    return viewModel;
};