Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function disableSslValidation()
{
var settings = Alloy.createCollection('AppSettings').settings();
settings.setValidateSsl(false);
settings.save();
}
beforeEach(function() {
reportCollection = Alloy.createCollection('piwikReports');
});
$.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() {
function isSslValidationEnabled()
{
var settings = Alloy.createCollection('AppSettings').settings();
return settings.shouldValidateSsl();
}
function getSettings()
{
return Alloy.createCollection('AppSettings').settings();
}
$.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) {
function getSettings()
{
return Alloy.createCollection('AppSettings').settings();
}
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);
});
}
function getPersistentCache()
{
var persistentCache = Alloy.createCollection('persistentCache');
persistentCache.fetch();
return persistentCache;
}
function getSettings()
{
return Alloy.createCollection('AppSettings').settings();
}