mobile support
This commit is contained in:
parent
fb377b2625
commit
3014336d6c
@ -26,3 +26,4 @@ ongoworks:security
|
|||||||
percolate:synced-cron
|
percolate:synced-cron
|
||||||
momentjs:moment
|
momentjs:moment
|
||||||
fortawesome:fontawesome
|
fortawesome:fontawesome
|
||||||
|
mystor:device-detection
|
||||||
|
|||||||
@ -53,6 +53,7 @@ mobile-status-bar@1.0.6
|
|||||||
momentjs:moment@2.11.2
|
momentjs:moment@2.11.2
|
||||||
mongo@1.1.3
|
mongo@1.1.3
|
||||||
mongo-id@1.0.1
|
mongo-id@1.0.1
|
||||||
|
mystor:device-detection@0.2.0
|
||||||
npm-mongo@1.4.39_1
|
npm-mongo@1.4.39_1
|
||||||
oauth@1.1.6
|
oauth@1.1.6
|
||||||
oauth2@1.1.5
|
oauth2@1.1.5
|
||||||
|
|||||||
@ -3,7 +3,11 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
{{> client}}
|
{{#if isDesktop}}
|
||||||
|
{{> client}}
|
||||||
|
{{else}}
|
||||||
|
{{> phone}}
|
||||||
|
{{/if}}
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|
||||||
@ -59,4 +63,9 @@
|
|||||||
<a class="github" target="_blank" href="https://github.com/yamanq/scheduleac">Github</a>
|
<a class="github" target="_blank" href="https://github.com/yamanq/scheduleac">Github</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template name="phone">
|
||||||
|
<p class="type">{{aftertext}} </p><p class="date">{{pretext}} </p>
|
||||||
|
<button class="nextb">Next</button>
|
||||||
</template>
|
</template>
|
||||||
@ -3,6 +3,7 @@ var clicked = false;
|
|||||||
allowedu["ybq987@gmail.com"] = true;
|
allowedu["ybq987@gmail.com"] = true;
|
||||||
allowedu["dweinger@bloomfield.org"] = true;
|
allowedu["dweinger@bloomfield.org"] = true;
|
||||||
allowedu["ksjdragon@gmail.com"]= true;
|
allowedu["ksjdragon@gmail.com"]= true;
|
||||||
|
currentcard = 0;
|
||||||
|
|
||||||
Meteor.subscribe('schedule');
|
Meteor.subscribe('schedule');
|
||||||
|
|
||||||
@ -159,5 +160,29 @@ function getScale(index, start) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Template.phone.helpers({
|
||||||
|
pretext: function() {
|
||||||
|
cole = schedule.find({}, {sort: {timestamp: 1}}).fetch();
|
||||||
|
date = moment(cole[currentcard].pretext);
|
||||||
|
date = date.calendar(null, {
|
||||||
|
sameDay: '[Today]',
|
||||||
|
nextDay: '[Tomorrow]',
|
||||||
|
nextWeek: 'dddd',
|
||||||
|
lastDay: '[Yesterday]',
|
||||||
|
lastWeek: '[Last] dddd',
|
||||||
|
sameElse: 'DD/MM/YYYY'
|
||||||
|
});
|
||||||
|
return date
|
||||||
|
},
|
||||||
|
|
||||||
|
aftertext: function() {
|
||||||
|
cole = schedule.find({}, {sort: {timestamp: 1}}).fetch();
|
||||||
|
return cole[currentcard].aftertext;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
Template.phone.events({
|
||||||
|
'click nextb': function() {
|
||||||
|
currentcard += 1;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|||||||
@ -10,7 +10,7 @@ schedule.permit(['insert', 'update', 'remove']).never().apply();
|
|||||||
SyncedCron.add({
|
SyncedCron.add({
|
||||||
name: 'Remove Entries past today',
|
name: 'Remove Entries past today',
|
||||||
schedule: function(parser) {
|
schedule: function(parser) {
|
||||||
return parser.recur().on('07:46:00').time();
|
return parser.recur().on('00:00:00').time();
|
||||||
},
|
},
|
||||||
job: function() {
|
job: function() {
|
||||||
var today = moment().format("X");
|
var today = moment().format("X");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user