Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added gitignore

  • Loading branch information...
commit 1058a3cf2f0dbbcb5b9eb67da169ef8a53600ae0 2 parents e750418 + 4ed985f
Toan Tran authored March 24, 2012
18  coffee/repository/matches2.coffee
... ...
@@ -0,0 +1,18 @@
  1
+baseDb = require('./base')
  2
+baseRepo = new baseDb.repository('matches')
  3
+
  4
+{Db, ObjectId, Timestamp, Connection, Server, checkError, errorHandler, getDb} = baseDb
  5
+
  6
+exports.create = () ->
  7
+  baseRepo.create.apply baseRepo, arguments
  8
+exports.read = () ->
  9
+  baseRepo.read.apply baseRepo, arguments
  10
+exports.update = () ->
  11
+  baseRepo.update.apply baseRepo, arguments
  12
+exports.save = () ->
  13
+  baseRepo.save.apply baseRepo, arguments  
  14
+exports.remove = () ->
  15
+  baseRepo.remove.apply baseRepo, arguments
  16
+exports.getById = () ->
  17
+  baseRepo.getById.apply baseRepo, arguments
  18
+exports.ObjectId = ObjectId
18  coffee/repository/news.coffee
... ...
@@ -0,0 +1,18 @@
  1
+baseDb = require('./base')
  2
+baseRepo = new baseDb.repository('news')
  3
+
  4
+{Db, ObjectId, Timestamp, Connection, Server, checkError, errorHandler, getDb} = baseDb
  5
+
  6
+exports.create = () ->
  7
+  baseRepo.create.apply baseRepo, arguments
  8
+exports.read = () ->
  9
+  baseRepo.read.apply baseRepo, arguments
  10
+exports.update = () ->
  11
+  baseRepo.update.apply baseRepo, arguments
  12
+exports.save = () ->
  13
+  baseRepo.save.apply baseRepo, arguments  
  14
+exports.remove = () ->
  15
+  baseRepo.remove.apply baseRepo, arguments
  16
+exports.getById = () ->
  17
+  baseRepo.getById.apply baseRepo, arguments
  18
+exports.ObjectId = ObjectId
50  coffee/repository/teams2.coffee
... ...
@@ -0,0 +1,50 @@
  1
+baseDb = require('./base')
  2
+baseRepo = new baseDb.repository('teams')
  3
+
  4
+{Db, ObjectId, Timestamp, Connection, Server, checkError, errorHandler, getDb} = baseDb
  5
+
  6
+exports.create = () ->
  7
+  baseRepo.create.apply baseRepo, arguments
  8
+exports.read = () ->
  9
+  baseRepo.read.apply baseRepo, arguments
  10
+exports.update = () ->
  11
+  baseRepo.update.apply baseRepo, arguments
  12
+exports.save = () ->
  13
+  baseRepo.save.apply baseRepo, arguments  
  14
+exports.remove = () ->
  15
+  baseRepo.remove.apply baseRepo, arguments
  16
+exports.getById = () ->
  17
+  baseRepo.getById.apply baseRepo, arguments
  18
+exports.ObjectId = ObjectId
  19
+
  20
+
  21
+exports.removeChallenge = ( teamid, otherteamid, callback = ->) ->
  22
+  console.assert teamid, 'teamid cannot be null'
  23
+  throw 'teamid cannot be null' if not teamid  
  24
+  console.assert otherteamid, 'otherteamid cannot be null'
  25
+  throw 'otherteamid cannot be null' if not otherteamid
  26
+  
  27
+  teamid = new ObjectId(teamid) if typeof teamid is 'string'
  28
+  otherteamid = new ObjectId(otherteamid) if typeof otherteamid is 'string'  
  29
+  
  30
+  findObj = 
  31
+    _id: teamid
  32
+  removingLog = 
  33
+    type: 'challengeremoved'
  34
+    data: 
  35
+      teamid: otherteamid
  36
+    createdat: new Date()
  37
+  updateObj = 
  38
+    $set:
  39
+      updatedat: new Date()
  40
+    $pull:
  41
+      challenges:
  42
+        teamid: otherteamid
  43
+    $addToSet:
  44
+      logs: removingLog
  45
+
  46
+  try
  47
+    baseRepo.update findObj, updateObj, {}, callback
  48
+  catch e
  49
+    console.trace e
  50
+    callback e
8  public/stylesheets/style.css
... ...
@@ -0,0 +1,8 @@
  1
+body {
  2
+  padding: 50px;
  3
+  font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;
  4
+}
  5
+
  6
+a {
  7
+  color: #00B7FF;
  8
+}
3  public/stylesheets/style.less
@@ -58,6 +58,7 @@
58 58
 .clear-float {
59 59
   clear: both;
60 60
 }
  61
+<<<<<<< HEAD
61 62
 
62 63
 .map-container {
63 64
   width: 100%;
@@ -68,3 +69,5 @@
68 69
   width: 100%;
69 70
   height: 100%;
70 71
 }
  72
+=======
  73
+>>>>>>> 1447554d9579db7439cc78d091ebc9563dd26626
36  repository/news.js
... ...
@@ -0,0 +1,36 @@
  1
+(function() {
  2
+  var Connection, Db, ObjectId, Server, Timestamp, baseDb, baseRepo, checkError, errorHandler, getDb;
  3
+
  4
+  baseDb = require('./base');
  5
+
  6
+  baseRepo = new baseDb.repository('news');
  7
+
  8
+  Db = baseDb.Db, ObjectId = baseDb.ObjectId, Timestamp = baseDb.Timestamp, Connection = baseDb.Connection, Server = baseDb.Server, checkError = baseDb.checkError, errorHandler = baseDb.errorHandler, getDb = baseDb.getDb;
  9
+
  10
+  exports.create = function() {
  11
+    return baseRepo.create.apply(baseRepo, arguments);
  12
+  };
  13
+
  14
+  exports.read = function() {
  15
+    return baseRepo.read.apply(baseRepo, arguments);
  16
+  };
  17
+
  18
+  exports.update = function() {
  19
+    return baseRepo.update.apply(baseRepo, arguments);
  20
+  };
  21
+
  22
+  exports.save = function() {
  23
+    return baseRepo.save.apply(baseRepo, arguments);
  24
+  };
  25
+
  26
+  exports.remove = function() {
  27
+    return baseRepo.remove.apply(baseRepo, arguments);
  28
+  };
  29
+
  30
+  exports.getById = function() {
  31
+    return baseRepo.getById.apply(baseRepo, arguments);
  32
+  };
  33
+
  34
+  exports.ObjectId = ObjectId;
  35
+
  36
+}).call(this);
5  views/index.jade
... ...
@@ -1,3 +1,4 @@
  1
+<<<<<<< HEAD
1 2
 .row
2 3
   .span12
3 4
     .map-container
@@ -5,3 +6,7 @@
5 6
       
6 7
 script(type='text/javascript', src='http://maps.googleapis.com/maps/api/js?key=AIzaSyDt3Wg9EIXvoW5qpro4e-hl9sgarNTmEnE&sensor=false')
7 8
 script(type='text/javascript', src='js/index.js')
  9
+=======
  10
+h1= title
  11
+p Welcome to #{title}
  12
+>>>>>>> 1447554d9579db7439cc78d091ebc9563dd26626
1  views/layout.jade
@@ -5,7 +5,6 @@
5 5
   - var roles = []
6 6
 - if (loggedIn)
7 7
   roles = request.session.user.roles || []
8  
-
9 8
   
10 9
 !!! 5
11 10
 html.nojs

0 notes on commit 1058a3c

Please sign in to comment.
Something went wrong with that request. Please try again.