Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
ce3e063c
Commit
ce3e063c
authored
Jun 23, 2017
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Generate new dist files
parent
66fd9a9f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2430 additions
and
663 deletions
+2430
-663
dist/converse-mobile.js
dist/converse-mobile.js
+46
-40
dist/converse-no-dependencies.js
dist/converse-no-dependencies.js
+2290
-541
dist/converse.js
dist/converse.js
+48
-42
dist/inverse.js
dist/inverse.js
+46
-40
No files found.
dist/converse-mobile.js
View file @
ce3e063c
...
...
@@ -45500,11 +45500,11 @@ return __p
return model.collection && model.collection.browserStorage;
}
utils.sa
veWithFallback = function (model, attr
s) {
if (utils.isPersistableModel(
this
)) {
model.save(attrs);
utils.sa
feSave = function (model, attribute
s) {
if (utils.isPersistableModel(
model
)) {
model.save(attr
ibute
s);
} else {
model.set(attrs);
model.set(attr
ibute
s);
}
}
return utils;
...
...
@@ -48927,13 +48927,15 @@ return Backbone.BrowserStorage;
};
this.logOut = function () {
_converse.chatboxviews.closeAllChatBoxes();
_converse.clearSession();
_converse.setDisconnectionCause(_converse.LOGOUT, undefined, true);
if (!_.isUndefined(_converse.connection)) {
_converse.connection.disconnect();
} else {
_converse._tearDown();
}
_converse.chatboxviews.closeAllChatBoxes();
_converse.clearSession();
_converse._tearDown();
_converse.emit('logout');
};
...
...
@@ -50417,7 +50419,9 @@ return Backbone.BrowserStorage;
"Either when calling converse.initialize, or when calling " +
"_converse.api.user.login.");
}
this.connection.reset();
if (!this.connection.reconnecting) {
this.connection.reset();
}
this.connection.connect(this.jid.toLowerCase(), null, this.onConnectStatusChanged);
} else if (this.authentication === _converse.LOGIN) {
var password = _.isNil(credentials) ? (_converse.connection.pass || this.password) : credentials.password;
...
...
@@ -50436,7 +50440,9 @@ return Backbone.BrowserStorage;
} else {
this.jid = Strophe.getBareJidFromJid(this.jid).toLowerCase()+'/'+resource;
}
this.connection.reset();
if (!this.connection.reconnecting) {
this.connection.reset();
}
this.connection.connect(this.jid, password, this.onConnectStatusChanged);
}
};
...
...
@@ -52729,9 +52735,7 @@ return __p
},
afterShown: function (focus) {
if (this.model.collection.browserStorage) {
// Without a connection, we haven't yet initialized
// localstorage
if (utils.isPersistableModel(this.model)) {
this.model.save();
}
this.setChatState(_converse.ACTIVE);
...
...
@@ -52792,7 +52796,7 @@ return __p
scrolled = false;
this.onScrolledDown();
}
utils.sa
veWithFallback
(this.model, {'scrolled': scrolled});
utils.sa
feSave
(this.model, {'scrolled': scrolled});
}, 150),
viewUnreadMessages: function () {
...
...
@@ -52977,6 +52981,14 @@ return __p
//
// New functions which don't exist yet can also be added.
_tearDown: function () {
var rooms = this.chatboxes.where({'type': CHATROOMS_TYPE});
_.each(rooms, function (room) {
utils.safeSave(room, {'connection_status': ROOMSTATUS.DISCONNECTED});
});
this.__super__._tearDown.call(this, arguments);
},
Features: {
addClientFeatures: function () {
var _converse = this.__super__._converse;
...
...
@@ -53254,7 +53266,7 @@ return __p
},
clearUnreadMsgCounter: function() {
utils.sa
veWithFallback(this,
{
utils.sa
feSave(this,
{
'num_unread': 0,
'num_unread_general': 0
});
...
...
@@ -54069,14 +54081,16 @@ return __p
return this;
},
cleanup: function () {
if (this.model.collection && this.model.collection.browserStorage) {
this.model.save('connection_status', ROOMSTATUS.DISCONNECTED);
} else {
this.model.set('connection_status', ROOMSTATUS.DISCONNECTED);
sendUnavailablePresence: function (exit_msg) {
var presence = $pres({
type: "unavailable",
from: _converse.connection.jid,
to: this.getRoomJIDAndNick()
});
if (exit_msg !== null) {
presence.c("status", exit_msg);
}
this.removeHandlers();
_converse.ChatBoxView.prototype.close.apply(this, arguments);
_converse.connection.sendPresence(presence);
},
leave: function(exit_msg) {
...
...
@@ -54089,26 +54103,15 @@ return __p
this.hide();
this.occupantsview.model.reset();
this.occupantsview.model.browserStorage._clear();
if (!_converse.connection.connected ||
this.model.get('connection_status') === ROOMSTATUS.DISCONNECTED) {
// Don't send out a stanza if we're not connected.
this.cleanup();
return;
}
var presence = $pres({
type: "unavailable",
from: _converse.connection.jid,
to: this.getRoomJIDAndNick()
});
if (exit_msg !== null) {
presence.c("status", exit_msg);
if (_converse.connection.connected) {
this.sendUnavailablePresence(exit_msg);
}
_converse.connection.sendPresence(
presence,
this.cleanup.bind(this),
this.cleanup.bind(this),
2000
utils.safeSave(
this.model,
{'connection_status': ROOMSTATUS.DISCONNECTED}
);
this.removeHandlers();
_converse.ChatBoxView.prototype.close.apply(this, arguments);
},
renderConfigurationForm: function (stanza) {
...
...
@@ -54119,7 +54122,8 @@ return __p
* either submitted the form, or canceled it.
*
* Parameters:
* (XMLElement) stanza: The IQ stanza containing the room config.
* (XMLElement) stanza: The IQ stanza containing the room
* config.
*/
var that = this,
$body = this.$('.chatroom-body');
...
...
@@ -55628,7 +55632,9 @@ return __p
_converse.chatboxviews.each(function (view) {
if (view.model.get('type') === CHATROOMS_TYPE) {
view.model.save('connection_status', ROOMSTATUS.DISCONNECTED);
view.registerHandlers();
view.join();
view.fetchMessages();
}
});
};
dist/converse-no-dependencies.js
View file @
ce3e063c
This source diff could not be displayed because it is too large. You can
view the blob
instead.
dist/converse.js
View file @
ce3e063c
...
...
@@ -45500,11 +45500,11 @@ return __p
return model.collection && model.collection.browserStorage;
}
utils.sa
veWithFallback = function (model, attr
s) {
if (utils.isPersistableModel(
this
)) {
model.save(attrs);
utils.sa
feSave = function (model, attribute
s) {
if (utils.isPersistableModel(
model
)) {
model.save(attr
ibute
s);
} else {
model.set(attrs);
model.set(attr
ibute
s);
}
}
return utils;
...
...
@@ -48927,13 +48927,15 @@ return Backbone.BrowserStorage;
};
this.logOut = function () {
_converse.chatboxviews.closeAllChatBoxes();
_converse.clearSession();
_converse.setDisconnectionCause(_converse.LOGOUT, undefined, true);
if (!_.isUndefined(_converse.connection)) {
_converse.connection.disconnect();
} else {
_converse._tearDown();
}
_converse.chatboxviews.closeAllChatBoxes();
_converse.clearSession();
_converse._tearDown();
_converse.emit('logout');
};
...
...
@@ -50417,7 +50419,9 @@ return Backbone.BrowserStorage;
"Either when calling converse.initialize, or when calling " +
"_converse.api.user.login.");
}
this.connection.reset();
if (!this.connection.reconnecting) {
this.connection.reset();
}
this.connection.connect(this.jid.toLowerCase(), null, this.onConnectStatusChanged);
} else if (this.authentication === _converse.LOGIN) {
var password = _.isNil(credentials) ? (_converse.connection.pass || this.password) : credentials.password;
...
...
@@ -50436,7 +50440,9 @@ return Backbone.BrowserStorage;
} else {
this.jid = Strophe.getBareJidFromJid(this.jid).toLowerCase()+'/'+resource;
}
this.connection.reset();
if (!this.connection.reconnecting) {
this.connection.reset();
}
this.connection.connect(this.jid, password, this.onConnectStatusChanged);
}
};
...
...
@@ -51717,9 +51723,7 @@ return __p
},
afterShown: function (focus) {
if (this.model.collection.browserStorage) {
// Without a connection, we haven't yet initialized
// localstorage
if (utils.isPersistableModel(this.model)) {
this.model.save();
}
this.setChatState(_converse.ACTIVE);
...
...
@@ -51780,7 +51784,7 @@ return __p
scrolled = false;
this.onScrolledDown();
}
utils.sa
veWithFallback
(this.model, {'scrolled': scrolled});
utils.sa
feSave
(this.model, {'scrolled': scrolled});
}, 150),
viewUnreadMessages: function () {
...
...
@@ -55250,6 +55254,14 @@ define("awesomplete", (function (global) {
//
// New functions which don't exist yet can also be added.
_tearDown: function () {
var rooms = this.chatboxes.where({'type': CHATROOMS_TYPE});
_.each(rooms, function (room) {
utils.safeSave(room, {'connection_status': ROOMSTATUS.DISCONNECTED});
});
this.__super__._tearDown.call(this, arguments);
},
Features: {
addClientFeatures: function () {
var _converse = this.__super__._converse;
...
...
@@ -55527,7 +55539,7 @@ define("awesomplete", (function (global) {
},
clearUnreadMsgCounter: function() {
utils.sa
veWithFallback(this,
{
utils.sa
feSave(this,
{
'num_unread': 0,
'num_unread_general': 0
});
...
...
@@ -56342,14 +56354,16 @@ define("awesomplete", (function (global) {
return this;
},
cleanup: function () {
if (this.model.collection && this.model.collection.browserStorage) {
this.model.save('connection_status', ROOMSTATUS.DISCONNECTED);
} else {
this.model.set('connection_status', ROOMSTATUS.DISCONNECTED);
sendUnavailablePresence: function (exit_msg) {
var presence = $pres({
type: "unavailable",
from: _converse.connection.jid,
to: this.getRoomJIDAndNick()
});
if (exit_msg !== null) {
presence.c("status", exit_msg);
}
this.removeHandlers();
_converse.ChatBoxView.prototype.close.apply(this, arguments);
_converse.connection.sendPresence(presence);
},
leave: function(exit_msg) {
...
...
@@ -56362,26 +56376,15 @@ define("awesomplete", (function (global) {
this.hide();
this.occupantsview.model.reset();
this.occupantsview.model.browserStorage._clear();
if (!_converse.connection.connected ||
this.model.get('connection_status') === ROOMSTATUS.DISCONNECTED) {
// Don't send out a stanza if we're not connected.
this.cleanup();
return;
}
var presence = $pres({
type: "unavailable",
from: _converse.connection.jid,
to: this.getRoomJIDAndNick()
});
if (exit_msg !== null) {
presence.c("status", exit_msg);
if (_converse.connection.connected) {
this.sendUnavailablePresence(exit_msg);
}
_converse.connection.sendPresence(
presence,
this.cleanup.bind(this),
this.cleanup.bind(this),
2000
utils.safeSave(
this.model,
{'connection_status': ROOMSTATUS.DISCONNECTED}
);
this.removeHandlers();
_converse.ChatBoxView.prototype.close.apply(this, arguments);
},
renderConfigurationForm: function (stanza) {
...
...
@@ -56392,7 +56395,8 @@ define("awesomplete", (function (global) {
* either submitted the form, or canceled it.
*
* Parameters:
* (XMLElement) stanza: The IQ stanza containing the room config.
* (XMLElement) stanza: The IQ stanza containing the room
* config.
*/
var that = this,
$body = this.$('.chatroom-body');
...
...
@@ -57901,7 +57905,9 @@ define("awesomplete", (function (global) {
_converse.chatboxviews.each(function (view) {
if (view.model.get('type') === CHATROOMS_TYPE) {
view.model.save('connection_status', ROOMSTATUS.DISCONNECTED);
view.registerHandlers();
view.join();
view.fetchMessages();
}
});
};
...
...
@@ -68528,14 +68534,14 @@ return __p
},
maximize: function () {
utils.sa
veWithFallback(this,
{
utils.sa
feSave(this,
{
'minimized': false,
'time_opened': moment().valueOf()
});
},
minimize: function () {
utils.sa
veWithFallback(this,
{
utils.sa
feSave(this,
{
'minimized': true,
'time_minimized': moment().format()
});
dist/inverse.js
View file @
ce3e063c
...
...
@@ -45500,11 +45500,11 @@ return __p
return model.collection && model.collection.browserStorage;
}
utils.sa
veWithFallback = function (model, attr
s) {
if (utils.isPersistableModel(
this
)) {
model.save(attrs);
utils.sa
feSave = function (model, attribute
s) {
if (utils.isPersistableModel(
model
)) {
model.save(attr
ibute
s);
} else {
model.set(attrs);
model.set(attr
ibute
s);
}
}
return utils;
...
...
@@ -48927,13 +48927,15 @@ return Backbone.BrowserStorage;
};
this.logOut = function () {
_converse.chatboxviews.closeAllChatBoxes();
_converse.clearSession();
_converse.setDisconnectionCause(_converse.LOGOUT, undefined, true);
if (!_.isUndefined(_converse.connection)) {
_converse.connection.disconnect();
} else {
_converse._tearDown();
}
_converse.chatboxviews.closeAllChatBoxes();
_converse.clearSession();
_converse._tearDown();
_converse.emit('logout');
};
...
...
@@ -50417,7 +50419,9 @@ return Backbone.BrowserStorage;
"Either when calling converse.initialize, or when calling " +
"_converse.api.user.login.");
}
this.connection.reset();
if (!this.connection.reconnecting) {
this.connection.reset();
}
this.connection.connect(this.jid.toLowerCase(), null, this.onConnectStatusChanged);
} else if (this.authentication === _converse.LOGIN) {
var password = _.isNil(credentials) ? (_converse.connection.pass || this.password) : credentials.password;
...
...
@@ -50436,7 +50440,9 @@ return Backbone.BrowserStorage;
} else {
this.jid = Strophe.getBareJidFromJid(this.jid).toLowerCase()+'/'+resource;
}
this.connection.reset();
if (!this.connection.reconnecting) {
this.connection.reset();
}
this.connection.connect(this.jid, password, this.onConnectStatusChanged);
}
};
...
...
@@ -51717,9 +51723,7 @@ return __p
},
afterShown: function (focus) {
if (this.model.collection.browserStorage) {
// Without a connection, we haven't yet initialized
// localstorage
if (utils.isPersistableModel(this.model)) {
this.model.save();
}
this.setChatState(_converse.ACTIVE);
...
...
@@ -51780,7 +51784,7 @@ return __p
scrolled = false;
this.onScrolledDown();
}
utils.sa
veWithFallback
(this.model, {'scrolled': scrolled});
utils.sa
feSave
(this.model, {'scrolled': scrolled});
}, 150),
viewUnreadMessages: function () {
...
...
@@ -55250,6 +55254,14 @@ define("awesomplete", (function (global) {
//
// New functions which don't exist yet can also be added.
_tearDown: function () {
var rooms = this.chatboxes.where({'type': CHATROOMS_TYPE});
_.each(rooms, function (room) {
utils.safeSave(room, {'connection_status': ROOMSTATUS.DISCONNECTED});
});
this.__super__._tearDown.call(this, arguments);
},
Features: {
addClientFeatures: function () {
var _converse = this.__super__._converse;
...
...
@@ -55527,7 +55539,7 @@ define("awesomplete", (function (global) {
},
clearUnreadMsgCounter: function() {
utils.sa
veWithFallback(this,
{
utils.sa
feSave(this,
{
'num_unread': 0,
'num_unread_general': 0
});
...
...
@@ -56342,14 +56354,16 @@ define("awesomplete", (function (global) {
return this;
},
cleanup: function () {
if (this.model.collection && this.model.collection.browserStorage) {
this.model.save('connection_status', ROOMSTATUS.DISCONNECTED);
} else {
this.model.set('connection_status', ROOMSTATUS.DISCONNECTED);
sendUnavailablePresence: function (exit_msg) {
var presence = $pres({
type: "unavailable",
from: _converse.connection.jid,
to: this.getRoomJIDAndNick()
});
if (exit_msg !== null) {
presence.c("status", exit_msg);
}
this.removeHandlers();
_converse.ChatBoxView.prototype.close.apply(this, arguments);
_converse.connection.sendPresence(presence);
},
leave: function(exit_msg) {
...
...
@@ -56362,26 +56376,15 @@ define("awesomplete", (function (global) {
this.hide();
this.occupantsview.model.reset();
this.occupantsview.model.browserStorage._clear();
if (!_converse.connection.connected ||
this.model.get('connection_status') === ROOMSTATUS.DISCONNECTED) {
// Don't send out a stanza if we're not connected.
this.cleanup();
return;
}
var presence = $pres({
type: "unavailable",
from: _converse.connection.jid,
to: this.getRoomJIDAndNick()
});
if (exit_msg !== null) {
presence.c("status", exit_msg);
if (_converse.connection.connected) {
this.sendUnavailablePresence(exit_msg);
}
_converse.connection.sendPresence(
presence,
this.cleanup.bind(this),
this.cleanup.bind(this),
2000
utils.safeSave(
this.model,
{'connection_status': ROOMSTATUS.DISCONNECTED}
);
this.removeHandlers();
_converse.ChatBoxView.prototype.close.apply(this, arguments);
},
renderConfigurationForm: function (stanza) {
...
...
@@ -56392,7 +56395,8 @@ define("awesomplete", (function (global) {
* either submitted the form, or canceled it.
*
* Parameters:
* (XMLElement) stanza: The IQ stanza containing the room config.
* (XMLElement) stanza: The IQ stanza containing the room
* config.
*/
var that = this,
$body = this.$('.chatroom-body');
...
...
@@ -57901,7 +57905,9 @@ define("awesomplete", (function (global) {
_converse.chatboxviews.each(function (view) {
if (view.model.get('type') === CHATROOMS_TYPE) {
view.model.save('connection_status', ROOMSTATUS.DISCONNECTED);
view.registerHandlers();
view.join();
view.fetchMessages();
}
});
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment