|
@@ -2,6 +2,16 @@
|
|
|
this.Documents = new Mongo.Collection("documents");
|
|
|
|
|
|
if (Meteor.isClient) {
|
|
|
+ Meteor.setInterval(function () {
|
|
|
+ Session.set("current_date", new Date());
|
|
|
+ }, 1000);
|
|
|
+
|
|
|
+ Template.date_display.helpers({
|
|
|
+ current_date: function () {
|
|
|
+ return Session.get("current_date");
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
Template.editor.helpers({
|
|
|
docid: function () {
|
|
|
let doc = Documents.findOne();
|
|
@@ -9,12 +19,6 @@ if (Meteor.isClient) {
|
|
|
}
|
|
|
});
|
|
|
|
|
|
- Template.date_display.helpers({
|
|
|
- current_date: function () {
|
|
|
- return new Date();
|
|
|
- }
|
|
|
-
|
|
|
- });
|
|
|
}
|
|
|
|
|
|
if (Meteor.isServer) {
|