Commit 4652385b authored by JC Brand's avatar JC Brand

Remove jQuery from non-tests config

parent 7cf9c9ef
(function (root, factory) {
define([
"jquery.noconflict",
"jquery",
"jasmine",
"utils",
"converse-core",
......
(function (root, factory) {
define(["jquery.noconflict", "jasmine", "mock", "converse-core", "test-utils", "utils" ], factory);
define(["jquery", "jasmine", "mock", "converse-core", "test-utils", "utils" ], factory);
} (this, function ($, jasmine, mock, converse, test_utils, utils) {
var _ = converse.env._;
var $pres = converse.env.$pres;
......
(function (root, factory) {
define(["jquery.noconflict", "jasmine", "mock", "converse-core", "test-utils"], factory);
define(["jquery", "jasmine", "mock", "converse-core", "test-utils"], factory);
} (this, function ($, jasmine, mock, converse, test_utils) {
var _ = converse.env._;
var $pres = converse.env.$pres;
......
(function (root, factory) {
define([
"jquery.noconflict",
"jquery",
"jasmine",
"converse-core",
"mock",
......
(function (root, factory) {
define(["jquery.noconflict", "jasmine", "mock", "converse-core", "test-utils"], factory);
define(["jquery", "jasmine", "mock", "converse-core", "test-utils"], factory);
} (this, function ($, jasmine, mock, converse, test_utils) {
"use strict";
var _ = converse.env._;
......
(function (root, factory) {
define(["jquery.noconflict", "jasmine", "mock", "converse-core", "test-utils"], factory);
define(["jquery", "jasmine", "mock", "converse-core", "test-utils"], factory);
} (this, function ($, jasmine, mock, converse, test_utils) {
var _ = converse.env._;
var $msg = converse.env.$msg;
......
(function (root, factory) {
define(["jquery.noconflict", "jasmine", "mock", "converse-core", "test-utils", "utils"], factory);
define(["jquery", "jasmine", "mock", "converse-core", "test-utils", "utils"], factory);
} (this, function ($, jasmine, mock, converse, test_utils, utils) {
"use strict";
var _ = converse.env._;
......
(function (root, factory) {
define(["jquery.noconflict", "jasmine", "mock", "converse-core", "test-utils"], factory);
define(["jquery", "jasmine", "mock", "converse-core", "test-utils"], factory);
} (this, function ($, jasmine, mock, converse, test_utils) {
var Strophe = converse.env.Strophe;
var b64_sha1 = converse.env.b64_sha1;
......
(function (root, factory) {
define(["jquery.noconflict", "jasmine", "mock", "converse-core", "test-utils"], factory);
define(["jquery", "jasmine", "mock", "converse-core", "test-utils"], factory);
} (this, function ($, jasmine, mock, converse, test_utils) {
var Strophe = converse.env.Strophe;
var $iq = converse.env.$iq;
......
(function (root, factory) {
define(["jquery.noconflict", "jasmine", "mock", "converse-core", "test-utils"], factory);
define(["jquery", "jasmine", "mock", "converse-core", "test-utils"], factory);
} (this, function ($, jasmine, mock, converse, test_utils) {
var _ = converse.env._;
var $pres = converse.env.$pres;
......
(function (root, factory) {
define([
"jquery.noconflict",
"jquery",
"converse-core",
"mock",
"test_utils",
......
(function (root, factory) {
define(["jquery.noconflict", "jasmine", "mock", "converse-core", "test-utils"], factory);
define(["jquery", "jasmine", "mock", "converse-core", "test-utils"], factory);
} (this, function ($, jasmine, mock, converse, test_utils) {
return describe("The XMPPStatus model", function() {
......
......@@ -5,8 +5,6 @@
include: ["converse"],
exclude: [
"awesomplete",
"jquery",
"jquery.noconflict",
"backbone.browserStorage",
"backbone.overview",
"moment",
......
......@@ -31,9 +31,7 @@ require.config({
"form-utils": "src/form-utils",
"i18n": "src/i18n",
"jed": "node_modules/jed/jed",
"jquery": "node_modules/jquery/dist/jquery",
"jquery.browser": "node_modules/jquery.browser/dist/jquery.browser",
"jquery.noconflict": "src/jquery.noconflict",
"lodash": "node_modules/lodash/lodash",
"lodash.converter": "3rdparty/lodash.fp",
"lodash.fp": "src/lodash.fp",
......@@ -106,7 +104,6 @@ require.config({
// '*' means all modules will get the '*.noconflict' version
// as their dependency.
'*': {
'jquery': 'jquery.noconflict',
'backbone': 'backbone.noconflict',
'lodash': 'lodash.noconflict'
},
......@@ -114,7 +111,6 @@ require.config({
// If this line was not here, there would
// be an unresolvable cyclic dependency.
'backbone.noconflict': { 'backbone': 'backbone' },
'jquery.noconflict': { 'jquery': 'jquery' },
'lodash.noconflict': { 'lodash': 'lodash' }
},
......
/*global define */
define([], function () {
return Object;
});
(function (root, factory) {
define("mock", ['jquery.noconflict', 'converse'], factory);
}(this, function ($, converse) {
define("mock", ['converse'], factory);
}(this, function (converse) {
var _ = converse.env._;
var Promise = converse.env.Promise;
var Strophe = converse.env.Strophe;
......@@ -115,7 +115,6 @@
}, settings || {}));
_converse.ChatBoxViews.prototype.trimChat = function () {};
window.converse_disable_effects = true;
$.fx.off = true;
return _converse;
}
......
/*global config */
// Extra test dependencies
config.paths.jquery = "node_modules/jquery/dist/jquery";
config.paths.mock = "tests/mock";
config.paths['wait-until-promise'] = "node_modules/wait-until-promise/index";
config.paths['test-utils'] = "tests/utils";
......@@ -57,7 +58,7 @@ var specs = [
require(['console-reporter', 'mock', 'sinon', 'wait-until-promise', 'pluggable'],
function(ConsoleReporter, mock, sinon, waitUntilPromise, pluggable) {
window.sinon = sinon;
window.waitUntilPromise = waitUntilPromise['default'];
window.waitUntilPromise = waitUntilPromise.default;
window.localStorage.clear();
window.sessionStorage.clear();
// Load the specs
......
(function (root, factory) {
define(['jquery.noconflict', 'converse', 'es6-promise', 'mock', 'wait-until-promise'], factory);
}(this, function ($, converse_api, Promise, mock, waitUntilPromise) {
define(['converse', 'es6-promise', 'mock', 'wait-until-promise'], factory);
}(this, function (converse_api, Promise, mock, waitUntilPromise) {
var _ = converse_api.env._;
var $msg = converse_api.env.$msg;
var $pres = converse_api.env.$pres;
......@@ -76,15 +76,13 @@
utils.openContactsPanel = function (converse) {
this.openControlBox(converse);
var cbview = converse.chatboxviews.get('controlbox');
var $tabs = $(cbview.el).find('#controlbox-tabs');
$tabs.find('li').first().find('a')[0].click();
cbview.el.querySelector('#controlbox-tabs li:first-child a').click();
};
utils.openRoomsPanel = function (converse) {
utils.openControlBox();
var cbview = converse.chatboxviews.get('controlbox');
var $tabs = $(cbview.el).find('#controlbox-tabs');
$tabs.find('li').last().find('a')[0].click();
cbview.el.querySelector('#controlbox-tabs li:last-child a').click();
};
utils.openChatBoxes = function (converse, amount) {
......@@ -170,7 +168,7 @@
utils.clearChatBoxMessages = function (converse, jid) {
var view = converse.chatboxviews.get(jid);
$(view.el).find('.chat-content').empty();
view.el.querySelector('.chat-content').innerHTML = '';
view.model.messages.reset();
view.model.messages.browserStorage._clear();
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment