Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
vanskins committed Jul 9, 2015
0 parents commit d8e4138
Show file tree
Hide file tree
Showing 13 changed files with 160 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .meteor/.finished-upgraders
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file contains information which helps Meteor properly upgrade your
# app when you run 'meteor update'. You should check it into version control
# with your project.

notices-for-0.9.0
notices-for-0.9.1
0.9.4-platform-file
notices-for-facebook-graph-api-2
1 change: 1 addition & 0 deletions .meteor/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
local
7 changes: 7 additions & 0 deletions .meteor/.id
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This file contains a token that is unique to your project.
# Check it into your repository along with the rest of this directory.
# It can be used for purposes such as:
# - ensuring you don't accidentally deploy one app on top of another
# - providing package authors with aggregated statistics

1ram8tu8na2fqffk8cy
10 changes: 10 additions & 0 deletions .meteor/packages
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Meteor packages used by this project, one per line.
# Check this file (and the other files in this directory) into your repository.
#
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.

meteor-platform
autopublish
insecure
twbs:bootstrap
2 changes: 2 additions & 0 deletions .meteor/platforms
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
server
browser
1 change: 1 addition & 0 deletions .meteor/release
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[email protected]
1 change: 1 addition & 0 deletions READ.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#chat-application-
21 changes: 21 additions & 0 deletions client/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<head>

<title>Chat App</title>
</head>

<body>




<div class="page-header">
<center>
<h1>
<b>Simple Chat Application</b>
</h1>
</center>
</div>

{{> appChat}}

</body>
29 changes: 29 additions & 0 deletions client/templates/chat-template.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<template name = "appChat">

<div class = "container">
<form class="form">
<div class = "form-group">
<label>Username:</label>
<input type="text" class="form-control txtName" placeholder = "Username"/>
</div>
<div class = "form-group">
<label>Message:</label>
<textarea type="text" class="form-control txtText" placeholder = "Type a Message"></textarea>
</div>
</form>
</div>
{{#each Messages}}
<div class = "container" style="border:solid;border-width:1px;border-top:none;border-left:none ;border-right:none ;background-color:white;margin-top:20px;border-bottom:none">
<div><button class = "btn btn-default btn-small btnDelete" style = "border:none"><span class="glyphicon glyphicon-remove-circle"></span></button></div>
<div style = "font-size:18px;color:#0033FF"><b>{{name}}</b> </div>
<div><i>{{createdAt}}</i></div>
<div style= "margin-top:10px;margin-bottom:10px"><i style= "font-size:26px">{{text}}</i> </div>

</div>



{{/each}}


</template>
30 changes: 30 additions & 0 deletions client/templates/chat-template.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Template.appChat.helpers({
Messages: function(){

return Messages.find({}, {sort: {createdAt: -1}, limit: 10})
}


});

Template.appChat.events({

"click .btnDelete": function (event) {
Messages.remove(this._id);
return false;
},
"keyup .txtText": function (event){
if(event.keyCode == 13){

Messages.insert({
name: $(".txtName").val(),
text: $(".txtText").val(),
createdAt: new Date()
})
}

false;
}


});
1 change: 1 addition & 0 deletions library/chatController.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Messages = new Mongo.Collection("Messages")
Empty file added library/commentController.js
Empty file.

0 comments on commit d8e4138

Please sign in to comment.