Skip to content

Commit d86dc5d

Browse files
committed
removed overview and added 140 symb trimming to description
1 parent 3f79415 commit d86dc5d

File tree

4 files changed

+7
-17
lines changed

4 files changed

+7
-17
lines changed

lib/schema.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ var Event = new Schema({
2424
, endsAt : Date
2525
, lastSync : Date
2626
, imageUrl : { type: String, match: /^$|^https?\:\/\// }
27-
, overview : { type: String, required: true }
2827
, description : String
2928
, author : { type: String, requried: true }
3029
, location : { type: String, required: true }

server.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ app.post('/events/new.json', andRequireUser, function(req, res){
144144
, startsAt: new Date(req.body.startsAtDate + ' ' + req.body.startsAtTime)
145145
, endsAt: new Date(req.body.endsAtDate + ' ' + req.body.endsAtTime)
146146
, imageUrl: req.body.imageUrl
147-
, overview: req.body.overview
148147
, location: req.body.location
149148
, description: req.body.description
150149
, author: req.session.auth.twitter.user.name
@@ -178,7 +177,6 @@ app.put('/events/:id.json', andRequireUser, function(req, res){
178177
event.set('startsAt' , new Date(req.body.startsAtDate + ' ' + req.body.startsAtTime));
179178
event.set('endsAt' , new Date(req.body.endsAtDate + ' ' + req.body.endsAtTime));
180179
event.set('imageUrl' , req.body.imageUrl);
181-
event.set('overview' , req.body.overview);
182180
event.set('location' , req.body.location);
183181
event.set('description' , req.body.description);
184182

views/backbone/_events.ejs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@
5555
<small>{{ hash }}</small>
5656
{% } %}
5757
</h3>
58-
<p>{% if (typeof overview !== 'undefined' ) { %}{{ overview }}{% } %}</p>
58+
<p>
59+
{% if (typeof description !== 'undefined') { %}
60+
{{ description.substr(0, 140) }}
61+
{% } %}
62+
</p>
5963
<ul class="infobar">
6064
{% if (typeof startsAt !== 'undefined') { %}
6165
<li class="time-precise">{{ dateFormat(startsAt, 'yyyy-mm-dd, h:MM') }}</li>
@@ -133,14 +137,10 @@
133137
<hr />
134138

135139
<p>
136-
{% if (typeof description != 'undefined' && '' !== description) { %}
140+
{% if (typeof description != 'undefined') { %}
137141
{{ description }}
138142
{% } else { %}
139-
{% if (typeof overview != 'undefined') { %}
140-
{{ overview }}
141-
{% } else { %}
142-
No description provided
143-
{% } %}
143+
No description provided
144144
{% } %}
145145

146146
{% if (USERNAME === author) { %}

views/backbone/_eventsForms.ejs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,6 @@
5555
</div>
5656
</div>
5757

58-
<div class="clearfix overview">
59-
<label for="event_overview">Overview</label>
60-
<div class="input">
61-
<textarea name="overview" id="event_overview" class="xxlarge">{{ model.get('overview') }}</textarea>
62-
</div>
63-
</div>
64-
6558
<div class="clearfix description">
6659
<label for="event_description">Description</label>
6760
<div class="input">

0 commit comments

Comments
 (0)