How to use the alloy.createCollection function in alloy

To help you get started, we’ve selected a few alloy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github matomo-org / matomo-mobile-2 / app / lib / login.js View on Github external
function disableSslValidation()
{
    var settings = Alloy.createCollection('AppSettings').settings();
    settings.setValidateSsl(false);
    settings.save();
}
github matomo-org / matomo-mobile-2 / specs / models / piwikReports_spec.js View on Github external
beforeEach(function() {
        reportCollection = Alloy.createCollection('piwikReports');
    });
github BOXOUT-THINKERS / TiOpenChat / Resources / iphone / alloy / controllers / contactsBan.js View on Github external
$.getView().addEventListener("open", function() {
        var allContactsCol = Alloy.Collections.instance("contacts");
        var models = allContactsCol.filter(function(model) {
            return model.get("User_objectId_To") && !(model.get("isHidden") || model.get("isBlock"));
        });
        friendContactsCol = Alloy.createCollection("contacts");
        friendContactsCol.reset(models);
        drawContacts();
        Alloy.Globals.stopWaiting();
    });
    var drawContacts = function() {
github matomo-org / matomo-mobile-2 / app / lib / login.js View on Github external
function isSslValidationEnabled()
{
    var settings = Alloy.createCollection('AppSettings').settings();
    return settings.shouldValidateSsl();
}
github matomo-org / matomo-mobile-2 / app / lib / settings / changeLanguage.js View on Github external
function getSettings()
{
    return Alloy.createCollection('AppSettings').settings();
}
github BOXOUT-THINKERS / TiOpenChat / Resources / iphone / alloy / controllers / setting / banFriendManage.js View on Github external
$.getView().addEventListener("open", function() {
        var allContactsCol = Alloy.Collections.instance("contacts");
        var models = allContactsCol.filter(function(model) {
            return model.get("User_objectId_To") && model.get("isBlock");
        });
        banContactsCol = Alloy.createCollection("contacts");
        banContactsCol.reset(models);
        drawBanFriend();
    });
    $.listView.addEventListener("itemclick", function(e) {
github matomo-org / matomo-mobile-2 / app / lib / Piwik / Tracker.js View on Github external
function getSettings()
{
    return Alloy.createCollection('AppSettings').settings();
}
github matomo-org / matomo-mobile-2 / specs / models / piwikAccessVerification_spec.js View on Github external
function expectAccessTokenToBe(account, valid)
{
    var done = false;
    var site = Alloy.createCollection('piwikAccessVerification');

    site.fetch({
        account: account,
        success: function (siteCollection) {
            done = true;
        }
    });

    waitsFor(function() {
        return done;
    }, 'Loading piwikAccessVerification never completed', 10000);

    runs(function() {
        expect(site.hasAccessToAtLeastOneWebsite()).toEqual(valid);
    });
}
github matomo-org / matomo-mobile-2 / app / assets / alloy / sync / piwikapi.js View on Github external
function getPersistentCache()
{
    var persistentCache = Alloy.createCollection('persistentCache');
    persistentCache.fetch();
    return persistentCache;
}
github matomo-org / matomo-mobile-2 / app / lib / settings / changeReportDate.js View on Github external
function getSettings()
{
    return Alloy.createCollection('AppSettings').settings();
}