Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
M
mongoose
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
mongoose
Commits
6f8751b4
Commit
6f8751b4
authored
Feb 07, 2014
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chat server is going to be in its own dir
parent
877c4dc6
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
7 additions
and
7 deletions
+7
-7
favicon.ico
examples/chat_server/web_root/favicon.ico
+0
-0
index.html
examples/chat_server/web_root/index.html
+0
-0
jquery.js
examples/chat_server/web_root/jquery.js
+0
-0
login.html
examples/chat_server/web_root/login.html
+0
-0
logo.png
examples/chat_server/web_root/logo.png
+0
-0
main.js
examples/chat_server/web_root/main.js
+7
-7
style.css
examples/chat_server/web_root/style.css
+0
-0
No files found.
examples/chat_
html
_root/favicon.ico
→
examples/chat_
server/web
_root/favicon.ico
View file @
6f8751b4
File moved
examples/chat_
html
_root/index.html
→
examples/chat_
server/web
_root/index.html
View file @
6f8751b4
File moved
examples/chat_
html
_root/jquery.js
→
examples/chat_
server/web
_root/jquery.js
View file @
6f8751b4
File moved
examples/chat_
html
_root/login.html
→
examples/chat_
server/web
_root/login.html
View file @
6f8751b4
File moved
examples/chat_
html
_root/logo.png
→
examples/chat_
server/web
_root/logo.png
View file @
6f8751b4
File moved
examples/chat_
html
_root/main.js
→
examples/chat_
server/web
_root/main.js
View file @
6f8751b4
...
...
@@ -3,7 +3,7 @@
var
chat
=
{
// Backend URL, string.
// 'http://backend.address.com' or '' if backend is the same as frontend
backendUrl
:
''
,
backendUrl
:
'
api.lp
'
,
maxVisibleMessages
:
10
,
errorMessageFadeOutTimeoutMs
:
2000
,
errorMessageFadeOutTimer
:
null
,
...
...
@@ -49,9 +49,7 @@ chat.refresh = function(data) {
chat
.
getMessages
=
function
(
enter_loop
)
{
$
.
ajax
({
dataType
:
'jsonp'
,
url
:
chat
.
backendUrl
+
'/ajax/get_messages'
,
data
:
{
last_id
:
chat
.
lastMessageId
},
data
:
{
last_id
:
chat
.
lastMessageId
,
cmd
:
'get_messages'
},
success
:
chat
.
refresh
,
error
:
function
()
{
},
...
...
@@ -82,9 +80,7 @@ chat.handleMessageInput = function(ev) {
return
;
//input.disabled = true;
$
.
ajax
({
dataType
:
'jsonp'
,
url
:
chat
.
backendUrl
+
'/ajax/send_message'
,
data
:
{
text
:
input
.
value
},
data
:
{
text
:
input
.
value
,
cmd
:
'send_message'
},
success
:
function
(
ev
)
{
input
.
value
=
''
;
input
.
disabled
=
false
;
...
...
@@ -98,6 +94,10 @@ chat.handleMessageInput = function(ev) {
};
$
(
document
).
ready
(
function
()
{
$
.
ajaxSetup
({
dataType
:
'json'
,
url
:
chat
.
backendUrl
});
$
(
'.menu-item'
).
click
(
chat
.
handleMenuItemClick
);
$
(
'.message-input'
).
keypress
(
chat
.
handleMessageInput
);
chat
.
getMessages
(
true
);
...
...
examples/chat_
html
_root/style.css
→
examples/chat_
server/web
_root/style.css
View file @
6f8751b4
File moved
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