Merge pull request #25 from matheus-morfi/spinnertocss
using span with css instead of img
This commit is contained in:
commit
e20d653fa0
14
converse.js
14
converse.js
@ -1161,7 +1161,7 @@
|
|||||||
'<p class="chatroom-topic"><p/>' +
|
'<p class="chatroom-topic"><p/>' +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
'<div class="chat-body">' +
|
'<div class="chat-body">' +
|
||||||
'<img class="spinner centered" src="images/spinner.gif"/>' +
|
'<span class="spinner centered"/>' +
|
||||||
'</div>'),
|
'</div>'),
|
||||||
|
|
||||||
chatarea_template: _.template(
|
chatarea_template: _.template(
|
||||||
@ -1246,7 +1246,7 @@
|
|||||||
'hidden': 'hidden',
|
'hidden': 'hidden',
|
||||||
'list-single': 'dropdown'
|
'list-single': 'dropdown'
|
||||||
};
|
};
|
||||||
$form.find('img.spinner').remove();
|
$form.find('span.spinner').remove();
|
||||||
$form.append($('<legend>').text(title));
|
$form.append($('<legend>').text(title));
|
||||||
if (instructions != title) {
|
if (instructions != title) {
|
||||||
$form.append($('<p>').text(instructions));
|
$form.append($('<p>').text(instructions));
|
||||||
@ -1355,7 +1355,7 @@
|
|||||||
this.$el.find('.chat-body').append(
|
this.$el.find('.chat-body').append(
|
||||||
$('<div class="chatroom-form-container">'+
|
$('<div class="chatroom-form-container">'+
|
||||||
'<form class="chatroom-form">'+
|
'<form class="chatroom-form">'+
|
||||||
'<img class="spinner centered" src="images/spinner.gif"/>'+
|
'<span class="spinner centered"/>'+
|
||||||
'</form>'+
|
'</form>'+
|
||||||
'</div>'));
|
'</div>'));
|
||||||
converse.connection.muc.configure(
|
converse.connection.muc.configure(
|
||||||
@ -1368,12 +1368,12 @@
|
|||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
var password = this.$el.find('.chatroom-form').find('input[type=password]').val();
|
var password = this.$el.find('.chatroom-form').find('input[type=password]').val();
|
||||||
this.$el.find('.chatroom-form-container').replaceWith(
|
this.$el.find('.chatroom-form-container').replaceWith(
|
||||||
'<img class="spinner centered" src="images/spinner.gif"/>');
|
'<span class="spinner centered"/>');
|
||||||
this.connect(password);
|
this.connect(password);
|
||||||
},
|
},
|
||||||
|
|
||||||
renderPasswordForm: function () {
|
renderPasswordForm: function () {
|
||||||
this.$el.find('img.centered.spinner').remove();
|
this.$el.find('span.centered.spinner').remove();
|
||||||
this.$el.find('.chat-body').append(
|
this.$el.find('.chat-body').append(
|
||||||
$('<div class="chatroom-form-container">'+
|
$('<div class="chatroom-form-container">'+
|
||||||
'<form class="chatroom-form">'+
|
'<form class="chatroom-form">'+
|
||||||
@ -1388,7 +1388,7 @@
|
|||||||
showDisconnectMessage: function (msg) {
|
showDisconnectMessage: function (msg) {
|
||||||
this.$el.find('.chat-area').remove();
|
this.$el.find('.chat-area').remove();
|
||||||
this.$el.find('.participants').remove();
|
this.$el.find('.participants').remove();
|
||||||
this.$el.find('img.centered.spinner').remove();
|
this.$el.find('span.centered.spinner').remove();
|
||||||
this.$el.find('.chat-body').append($('<p>'+msg+'</p>'));
|
this.$el.find('.chat-body').append($('<p>'+msg+'</p>'));
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -2509,7 +2509,7 @@
|
|||||||
connection = new Strophe.Connection(converse.bosh_service_url);
|
connection = new Strophe.Connection(converse.bosh_service_url);
|
||||||
if ($form) {
|
if ($form) {
|
||||||
$button = $form.find('input[type=submit]');
|
$button = $form.find('input[type=submit]');
|
||||||
$button.hide().after('<img class="spinner login-submit" src="images/spinner.gif"/>');
|
$button.hide().after('<span class="spinner login-submit"/>');
|
||||||
}
|
}
|
||||||
connection.connect(jid, password, $.proxy(function (status, message) {
|
connection.connect(jid, password, $.proxy(function (status, message) {
|
||||||
if (status === Strophe.Status.CONNECTED) {
|
if (status === Strophe.Status.CONNECTED) {
|
||||||
|
Loading…
Reference in New Issue
Block a user