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
076af097
Commit
076af097
authored
Jun 14, 2017
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make spinner into a template
parent
e1dace59
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
15 deletions
+23
-15
css/converse.css
css/converse.css
+1
-1
css/inverse.css
css/inverse.css
+1
-1
sass/_core.scss
sass/_core.scss
+1
-1
src/converse-chatview.js
src/converse-chatview.js
+6
-4
src/converse-muc.js
src/converse-muc.js
+8
-6
src/converse-register.js
src/converse-register.js
+5
-2
src/templates/spinner.html
src/templates/spinner.html
+1
-0
No files found.
css/converse.css
View file @
076af097
...
...
@@ -1352,7 +1352,7 @@
text-align
:
center
;
display
:
block
;
margin
:
0
;
padding
:
5
0%
0
;
}
padding
:
1
0%
0
;
}
#converse-embedded-chat
.hor_centered
,
#conversejs
.hor_centered
{
text-align
:
center
;
...
...
css/inverse.css
View file @
076af097
...
...
@@ -1352,7 +1352,7 @@
text-align
:
center
;
display
:
block
;
margin
:
0
;
padding
:
5
0%
0
;
}
padding
:
1
0%
0
;
}
#converse-embedded-chat
.hor_centered
,
#conversejs
.hor_centered
{
text-align
:
center
;
...
...
sass/_core.scss
View file @
076af097
...
...
@@ -135,7 +135,7 @@
text-align
:
center
;
display
:
block
;
margin
:
0
;
padding
:
5
0%
0
;
padding
:
1
0%
0
;
}
.hor_centered
{
text-align
:
center
;
...
...
src/converse-chatview.js
View file @
076af097
...
...
@@ -15,7 +15,8 @@
"
tpl!message
"
,
"
tpl!help_message
"
,
"
tpl!toolbar
"
,
"
tpl!avatar
"
"
tpl!avatar
"
,
"
tpl!spinner
"
],
factory
);
}(
this
,
function
(
converse
,
...
...
@@ -25,7 +26,8 @@
tpl_message
,
tpl_help_message
,
tpl_toolbar
,
tpl_avatar
tpl_avatar
,
tpl_spinner
)
{
"
use strict
"
;
var
$
=
converse
.
env
.
jQuery
,
...
...
@@ -196,7 +198,7 @@
addSpinner
:
function
()
{
if
(
_
.
isNull
(
this
.
el
.
querySelector
(
'
.spinner
'
)))
{
this
.
$content
.
prepend
(
'
<span class="spinner"/>
'
);
this
.
$content
.
prepend
(
tpl_spinner
);
}
},
...
...
@@ -385,7 +387,7 @@
})));
}
if
(
spinner
===
true
)
{
this
.
$content
.
append
(
'
<span class="spinner"/>
'
);
this
.
$content
.
append
(
tpl_spinner
);
}
else
if
(
spinner
===
false
)
{
this
.
$content
.
find
(
'
span.spinner
'
).
remove
();
}
...
...
src/converse-muc.js
View file @
076af097
...
...
@@ -29,6 +29,7 @@
"
tpl!room_description
"
,
"
tpl!room_item
"
,
"
tpl!room_panel
"
,
"
tpl!spinner
"
,
"
awesomplete
"
,
"
converse-chatview
"
],
factory
);
...
...
@@ -51,6 +52,7 @@
tpl_room_description
,
tpl_room_item
,
tpl_room_panel
,
tpl_spinner
,
Awesomplete
)
{
...
...
@@ -401,7 +403,7 @@
if
(
_
.
isNull
(
body
))
{
return
;
// The message has no text
}
if
(
thi
s
.
isNewMessage
(
stanza
)
&&
this
.
newMessageWillBeHidden
())
{
if
(
util
s
.
isNewMessage
(
stanza
)
&&
this
.
newMessageWillBeHidden
())
{
this
.
save
({
'
num_unread_general
'
:
this
.
get
(
'
num_unread_general
'
)
+
1
});
if
(
this
.
isUserMentioned
(
body
.
textContent
))
{
this
.
save
({
'
num_unread
'
:
this
.
get
(
'
num_unread
'
)
+
1
});
...
...
@@ -1537,7 +1539,7 @@
nick_el
.
classList
.
remove
(
'
error
'
);
}
this
.
$el
.
find
(
'
.chatroom-form-container
'
)
.
replaceWith
(
'
<span class="spinner centered"/>
'
);
.
replaceWith
(
tpl_spinner
);
this
.
join
(
nick
);
},
...
...
@@ -1651,7 +1653,7 @@
submitPassword
:
function
(
ev
)
{
ev
.
preventDefault
();
var
password
=
this
.
$el
.
find
(
'
.chatroom-form
'
).
find
(
'
input[type=password]
'
).
val
();
this
.
$el
.
find
(
'
.chatroom-form-container
'
).
replaceWith
(
'
<span class="spinner centered"/>
'
);
this
.
$el
.
find
(
'
.chatroom-form-container
'
).
replaceWith
(
tpl_spinner
);
this
.
join
(
this
.
model
.
get
(
'
nick
'
),
password
);
},
...
...
@@ -1895,7 +1897,7 @@
showSpinner
:
function
()
{
this
.
$
(
'
.chatroom-body
'
).
children
().
addClass
(
'
hidden
'
);
this
.
$el
.
find
(
'
.chatroom-body
'
).
prepend
(
'
<span class="spinner centered"/>
'
);
this
.
$el
.
find
(
'
.chatroom-body
'
).
prepend
(
tpl_spinner
);
},
hideSpinner
:
function
()
{
...
...
@@ -2503,7 +2505,7 @@
this
.
$el
.
find
(
'
input.new-chatroom-name
'
).
removeClass
(
'
error
'
);
$server
.
removeClass
(
'
error
'
);
$available_chatrooms
.
empty
();
$
(
'
input#show-rooms
'
).
hide
().
after
(
'
<span class="spinner"/>
'
);
$
(
'
input#show-rooms
'
).
hide
().
after
(
tpl_spinner
);
this
.
model
.
save
({
muc_domain
:
server
});
this
.
updateRoomsList
();
},
...
...
@@ -2564,7 +2566,7 @@
$div
.
remove
();
}
else
{
$parent
.
find
(
'
span.spinner
'
).
remove
();
$parent
.
append
(
'
<span class="spinner hor_centered"/>
'
);
$parent
.
append
(
tpl_spinner
);
_converse
.
connection
.
disco
.
info
(
$
(
target
).
attr
(
'
data-room-jid
'
),
null
,
_
.
partial
(
this
.
insertRoomInfo
,
$parent
[
0
])
);
...
...
src/converse-register.js
View file @
076af097
...
...
@@ -16,6 +16,7 @@
"
tpl!register_tab
"
,
"
tpl!registration_form
"
,
"
tpl!registration_request
"
,
"
tpl!spinner
"
,
"
converse-controlbox
"
],
factory
);
}(
this
,
function
(
...
...
@@ -24,7 +25,9 @@
tpl_register_panel
,
tpl_register_tab
,
tpl_registration_form
,
tpl_registration_request
)
{
tpl_registration_request
,
tpl_spinner
)
{
"
use strict
"
;
...
...
@@ -316,7 +319,7 @@
_converse
.
connection
.
reset
();
that
=
this
;
this
.
$
(
'
form
'
).
hide
(
function
()
{
$
(
this
).
replaceWith
(
'
<span class="spinner centered"/>
'
);
$
(
this
).
replaceWith
(
tpl_spinner
);
if
(
that
.
fields
.
password
&&
that
.
fields
.
username
)
{
// automatically log the user in
_converse
.
connection
.
connect
(
...
...
src/templates/spinner.html
0 → 100644
View file @
076af097
<span
class=
"spinner centered"
/>
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