Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2018-01-04 13:11:13 +01:00
commit 8179543674
27 changed files with 46 additions and 73 deletions

View File

@ -1175,9 +1175,9 @@
-webkit-animation-fill-mode: forwards;
-moz-animation-fill-mode: forwards;
animation-fill-mode: forwards;
-webkit-animation-duration: 750;
-moz-animation-duration: 750;
animation-duration: 750;
-webkit-animation-duration: 0.75s;
-moz-animation-duration: 0.75s;
animation-duration: 0.75s;
-webkit-animation-timing-function: ease;
-moz-animation-timing-function: ease;
animation-timing-function: ease; }
@ -1935,9 +1935,9 @@
-webkit-animation-fill-mode: forwards;
-moz-animation-fill-mode: forwards;
animation-fill-mode: forwards;
-webkit-animation-duration: 750;
-moz-animation-duration: 750;
animation-duration: 750;
-webkit-animation-duration: 0.75s;
-moz-animation-duration: 0.75s;
animation-duration: 0.75s;
-webkit-animation-timing-function: ease;
-moz-animation-timing-function: ease;
animation-timing-function: ease;

View File

@ -1175,9 +1175,9 @@
-webkit-animation-fill-mode: forwards;
-moz-animation-fill-mode: forwards;
animation-fill-mode: forwards;
-webkit-animation-duration: 750;
-moz-animation-duration: 750;
animation-duration: 750;
-webkit-animation-duration: 0.75s;
-moz-animation-duration: 0.75s;
animation-duration: 0.75s;
-webkit-animation-timing-function: ease;
-moz-animation-timing-function: ease;
animation-timing-function: ease; }
@ -1425,9 +1425,9 @@ body {
-webkit-animation-fill-mode: forwards;
-moz-animation-fill-mode: forwards;
animation-fill-mode: forwards;
-webkit-animation-duration: 750;
-moz-animation-duration: 750;
animation-duration: 750;
-webkit-animation-duration: 0.75s;
-moz-animation-duration: 0.75s;
animation-duration: 0.75s;
-webkit-animation-timing-function: ease;
-moz-animation-timing-function: ease;
animation-timing-function: ease;
@ -2021,9 +2021,9 @@ body {
-webkit-animation-fill-mode: forwards;
-moz-animation-fill-mode: forwards;
animation-fill-mode: forwards;
-webkit-animation-duration: 750;
-moz-animation-duration: 750;
animation-duration: 750;
-webkit-animation-duration: 0.75s;
-moz-animation-duration: 0.75s;
animation-duration: 0.75s;
-webkit-animation-timing-function: ease;
-moz-animation-timing-function: ease;
animation-timing-function: ease;
@ -2418,9 +2418,9 @@ body {
-webkit-animation-fill-mode: forwards;
-moz-animation-fill-mode: forwards;
animation-fill-mode: forwards;
-webkit-animation-duration: 750;
-moz-animation-duration: 750;
animation-duration: 750;
-webkit-animation-duration: 0.75s;
-moz-animation-duration: 0.75s;
animation-duration: 0.75s;
-webkit-animation-timing-function: ease;
-moz-animation-timing-function: ease;
animation-timing-function: ease;

View File

@ -53,7 +53,6 @@
"jasmine-core": "2.6.4",
"jed": "0.5.4",
"jquery": "2.2.3",
"jquery.browser": ">=0.1.0",
"jshint": "^2.9.4",
"lodash": "4.17.4",
"lodash-template-loader": "^2.0.0",

View File

@ -1,8 +1,8 @@
@mixin fade-in {
opacity:0; /* make things invisible upon start */
opacity: 0; /* make things invisible upon start */
@include animation-name(fadein);
@include animation-fill-mode(forwards);
@include animation-duration(750);
@include animation-duration(0.75s);
@include animation-timing-function(ease);
}

View File

@ -1,6 +1,6 @@
(function (root, factory) {
define([
"jquery.noconflict",
"jquery",
"jasmine",
"utils",
"converse-core",

View File

@ -1,5 +1,5 @@
(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;

View File

@ -1,5 +1,5 @@
(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;

View File

@ -1,6 +1,6 @@
(function (root, factory) {
define([
"jquery.noconflict",
"jquery",
"jasmine",
"converse-core",
"mock",

View File

@ -1,5 +1,5 @@
(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._;

View File

@ -1,5 +1,5 @@
(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;

View File

@ -1,5 +1,5 @@
(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._;

View File

@ -1,5 +1,5 @@
(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;

View File

@ -1,5 +1,5 @@
(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;

View File

@ -1,5 +1,5 @@
(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;

View File

@ -1,6 +1,6 @@
(function (root, factory) {
define([
"jquery.noconflict",
"jquery",
"converse-core",
"mock",
"test_utils",

View File

@ -1,5 +1,5 @@
(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() {

View File

@ -5,8 +5,6 @@
include: ["converse"],
exclude: [
"awesomplete",
"jquery",
"jquery.noconflict",
"backbone.browserStorage",
"backbone.overview",
"moment",

View File

@ -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",
"jquery": "src/jquery-stub",
"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' }
},

View File

@ -289,7 +289,6 @@
this.model.on('sendMessage', this.sendMessage, this);
this.render().renderToolbar().insertHeading().fetchMessages();
u.refreshWebkit();
_converse.emit('chatBoxOpened', this);
_converse.emit('chatBoxInitialized', this);
},
@ -968,7 +967,6 @@
hide () {
this.el.classList.add('hidden');
u.refreshWebkit();
return this;
},

View File

@ -386,7 +386,6 @@
return;
}
u.addClass('hidden', this.el);
u.refreshWebkit();
_converse.emit('chatBoxClosed', this);
if (!_converse.connection.connected) {
_converse.controlboxtoggle.render();
@ -396,7 +395,6 @@
},
onControlBoxToggleHidden () {
u.refreshWebkit();
this.model.set('closed', false);
this.el.classList.remove('hidden');
_converse.emit('controlBoxOpened', this);

View File

@ -108,7 +108,6 @@
}
));
this.content = this.el.querySelector('.chat-content');
utils.refreshWebkit();
return this;
},

View File

@ -475,7 +475,6 @@
if (this.model.get('connection_status') !== converse.ROOMSTATUS.ENTERED) {
this.showSpinner();
}
u.refreshWebkit();
return this;
},

4
src/jquery-stub.js vendored Normal file
View File

@ -0,0 +1,4 @@
/*global define */
define([], function () {
return Object;
});

View File

@ -11,14 +11,12 @@
define([
"sizzle",
"es6-promise",
"jquery.browser",
"lodash.noconflict",
"strophe",
], factory);
}(this, function (
sizzle,
Promise,
jQBrowser,
_,
Strophe
) {
@ -396,20 +394,6 @@
}
};
u.refreshWebkit = function () {
/* This works around a webkit bug. Refreshes the browser's viewport,
* otherwise chatboxes are not moved along when one is closed.
*/
if (jQBrowser.webkit && window.requestAnimationFrame) {
window.requestAnimationFrame(function () {
var conversejs = document.getElementById('conversejs');
conversejs.style.display = 'none';
var tmp = conversejs.offsetHeight; // jshint ignore:line
conversejs.style.display = 'block';
});
}
};
u.stringToNode = function (s) {
/* Converts an HTML string into a DOM Node.
* Expects that the HTML string has only one top-level element,

View File

@ -1,6 +1,6 @@
(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;
}

View File

@ -1,6 +1,7 @@
/*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

View File

@ -1,6 +1,6 @@
(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();
};