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
9ef94886
Commit
9ef94886
authored
Dec 11, 2012
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IE8 fixes. Also avoid ajax call when opening chatroom
parent
f968f56e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
converse.js
converse.js
+12
-11
No files found.
converse.js
View file @
9ef94886
...
...
@@ -287,7 +287,7 @@
var
msg
=
xmppchat
.
storage
.
getLastMessage
(
this
.
model
.
get
(
'
jid
'
));
if
(
typeof
msg
!==
'
undefined
'
)
{
var
prev_date
=
new
Date
(
Date
.
parse
(
msg
.
split
(
'
'
,
2
)[
0
]));
var
prev_date
=
new
Date
(
Date
(
msg
.
split
(
'
'
,
2
)[
0
]));
if
(
this
.
isDifferentDay
(
prev_date
,
now
))
{
$chat_content
.
append
(
$
(
'
<div class="chat-date"> </div>
'
));
$chat_content
.
append
(
$
(
'
<div class="chat-date"></div>
'
).
text
(
now
.
toString
().
substring
(
0
,
15
)));
...
...
@@ -383,13 +383,13 @@
date
=
msg_array
[
0
];
if
(
i
===
0
)
{
this_date
=
new
Date
(
Date
.
parse
(
date
));
this_date
=
new
Date
(
Date
(
date
));
if
(
this
.
isDifferentDay
(
this_date
,
new
Date
()))
{
$content
.
append
(
$
(
'
<div class="chat-date"></div>
'
).
text
(
this_date
.
toString
().
substring
(
0
,
15
)));
}
}
else
{
prev_date
=
this_date
;
this_date
=
new
Date
(
Date
.
parse
(
date
));
this_date
=
new
Date
(
Date
(
date
));
if
(
this
.
isDifferentDay
(
prev_date
,
this_date
))
{
$content
.
append
(
$
(
'
<div class="chat-date"> </div>
'
));
$content
.
append
(
$
(
'
<div class="chat-date"></div>
'
).
text
(
this_date
.
toString
().
substring
(
0
,
15
)));
...
...
@@ -988,9 +988,7 @@
show
:
function
()
{
this
.
$el
.
css
({
'
opacity
'
:
0
});
this
.
$el
.
css
({
'
display
'
:
'
inline
'
});
this
.
$el
.
animate
({
opacity
:
'
1
'
},
200
);
this
.
$el
.
animate
({
opacity
:
'
1
'
},
200
);
return
this
;
},
...
...
@@ -1062,14 +1060,17 @@
},
openChat
:
function
(
jid
)
{
var
view
;
jid
=
Strophe
.
getBareJidFromJid
(
jid
);
if
(
!
this
.
model
.
get
(
jid
))
{
if
(
this
.
model
.
get
(
jid
))
{
this
.
showChat
(
jid
);
}
else
if
(
this
.
isChatRoom
(
jid
))
{
view
=
this
.
createChatBox
(
jid
);
}
else
{
$
.
getJSON
(
portal_url
+
"
/xmpp-userinfo?user_id=
"
+
Strophe
.
getNodeFromJid
(
jid
),
$
.
proxy
(
function
(
data
)
{
view
=
this
.
createChatBox
(
jid
,
data
);
},
this
));
}
else
{
this
.
showChat
(
jid
);
}
}
},
showChat
:
function
(
jid
)
{
...
...
@@ -1607,7 +1608,7 @@
initialize
:
function
()
{
this
.
set
({
'
status
'
:
this
.
getStatus
(),
'
status_message
'
:
this
.
getStatusMessage
()
,
'
status_message
'
:
this
.
getStatusMessage
()
});
},
...
...
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