Add wordwrap to the event text.
This commit is contained in:
parent
62910c02f2
commit
b414752231
2 changed files with 4 additions and 2 deletions
5
event.js
5
event.js
|
@ -20,7 +20,8 @@ var
|
|||
,strftime = require('strftime')
|
||||
,fs = require('fs')
|
||||
,glob = require('glob')
|
||||
,jq = require('jquery');
|
||||
,jq = require('jquery')
|
||||
,wrap = require('wordwrap')(72);
|
||||
|
||||
function nextDay(x){
|
||||
var now = new Date();
|
||||
|
@ -62,7 +63,7 @@ EventTool.prototype.processEventData = function() {
|
|||
item['enddate'] = strftime('%Y-%m-%d %H:%M',el.enddate);
|
||||
item['endtime'] = strftime('%H:%M',el.enddate);
|
||||
item['heading'] = el.heading;
|
||||
item['text'] = el.text;
|
||||
item['text'] = wrap(el.text);
|
||||
view.events.push(item);
|
||||
});
|
||||
return view;
|
||||
|
|
|
@ -10,5 +10,6 @@
|
|||
, "glob": "latest"
|
||||
, "jquery": "latest"
|
||||
, "request": "latest"
|
||||
, "wordwrap": "latest"
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue